Subversion Repositories eFlore/Applications.cel

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
3205 delphine 1
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["vendor"],{
2
 
3
/***/ "./node_modules/@angular/animations/fesm5/animations.js":
4
/*!**************************************************************!*\
5
  !*** ./node_modules/@angular/animations/fesm5/animations.js ***!
6
  \**************************************************************/
7
/*! exports provided: AnimationBuilder, AnimationFactory, AUTO_STYLE, animate, animateChild, animation, group, keyframes, query, sequence, stagger, state, style, transition, trigger, useAnimation, NoopAnimationPlayer, ɵPRE_STYLE, ɵAnimationGroupPlayer */
8
/***/ (function(module, __webpack_exports__, __webpack_require__) {
9
 
10
"use strict";
11
__webpack_require__.r(__webpack_exports__);
12
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationBuilder", function() { return AnimationBuilder; });
13
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationFactory", function() { return AnimationFactory; });
14
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AUTO_STYLE", function() { return AUTO_STYLE; });
15
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animate", function() { return animate; });
16
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animateChild", function() { return animateChild; });
17
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animation", function() { return animation; });
18
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "group", function() { return group; });
19
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keyframes", function() { return keyframes; });
20
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "query", function() { return query; });
21
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequence", function() { return sequence; });
22
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stagger", function() { return stagger; });
23
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "state", function() { return state; });
24
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "style", function() { return style; });
25
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transition", function() { return transition; });
26
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "trigger", function() { return trigger; });
27
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useAnimation", function() { return useAnimation; });
28
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NoopAnimationPlayer", function() { return NoopAnimationPlayer; });
29
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵPRE_STYLE", function() { return ɵPRE_STYLE; });
30
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵAnimationGroupPlayer", function() { return AnimationGroupPlayer; });
31
/**
32
 * @license Angular v6.0.3
33
 * (c) 2010-2018 Google, Inc. https://angular.io/
34
 * License: MIT
35
 */
36
 
37
/**
38
 * AnimationBuilder is an injectable service that is available when the {@link
39
 * BrowserAnimationsModule BrowserAnimationsModule} or {@link NoopAnimationsModule
40
 * NoopAnimationsModule} modules are used within an application.
41
 *
42
 * The purpose if this service is to produce an animation sequence programmatically within an
43
 * angular component or directive.
44
 *
45
 * Programmatic animations are first built and then a player is created when the build animation is
46
 * attached to an element.
47
 *
48
 * ```ts
49
 * // remember to include the BrowserAnimationsModule module for this to work...
50
 * import {AnimationBuilder} from '@angular/animations';
51
 *
52
 * class MyCmp {
53
 *   constructor(private _builder: AnimationBuilder) {}
54
 *
55
 *   makeAnimation(element: any) {
56
 *     // first build the animation
57
 *     const myAnimation = this._builder.build([
58
 *       style({ width: 0 }),
59
 *       animate(1000, style({ width: '100px' }))
60
 *     ]);
61
 *
62
 *     // then create a player from it
63
 *     const player = myAnimation.create(element);
64
 *
65
 *     player.play();
66
 *   }
67
 * }
68
 * ```
69
 *
70
 * When an animation is built an instance of {@link AnimationFactory AnimationFactory} will be
71
 * returned. Using that an {@link AnimationPlayer AnimationPlayer} can be created which can then be
72
 * used to start the animation.
73
 *
74
 * @experimental Animation support is experimental.
75
 */
76
var AnimationBuilder = /** @class */ (function () {
77
    function AnimationBuilder() {
78
    }
79
    return AnimationBuilder;
80
}());
81
/**
82
 * An instance of `AnimationFactory` is returned from {@link AnimationBuilder#build
83
 * AnimationBuilder.build}.
84
 *
85
 * @experimental Animation support is experimental.
86
 */
87
var AnimationFactory = /** @class */ (function () {
88
    function AnimationFactory() {
89
    }
90
    return AnimationFactory;
91
}());
92
 
93
/**
94
 * @experimental Animation support is experimental.
95
 */
96
var AUTO_STYLE = '*';
97
/**
98
 * `trigger` is an animation-specific function that is designed to be used inside of Angular's
99
 * animation DSL language. If this information is new, please navigate to the
100
 * {@link Component#animations component animations metadata page} to gain a better
101
 * understanding of how animations in Angular are used.
102
 *
103
 * `trigger` Creates an animation trigger which will a list of {@link state state} and
104
 * {@link transition transition} entries that will be evaluated when the expression
105
 * bound to the trigger changes.
106
 *
107
 * Triggers are registered within the component annotation data under the
108
 * {@link Component#animations animations section}. An animation trigger can be placed on an element
109
 * within a template by referencing the name of the trigger followed by the expression value that
110
 the
111
 * trigger is bound to (in the form of `[@triggerName]="expression"`.
112
 *
113
 * Animation trigger bindings strigify values and then match the previous and current values against
114
 * any linked transitions. If a boolean value is provided into the trigger binding then it will both
115
 * be represented as `1` or `true` and `0` or `false` for a true and false boolean values
116
 * respectively.
117
 *
118
 * ### Usage
119
 *
120
 * `trigger` will create an animation trigger reference based on the provided `name` value. The
121
 * provided `animation` value is expected to be an array consisting of {@link state state} and
122
 * {@link transition transition} declarations.
123
 *
124
 * ```typescript
125
 * @Component({
126
 *   selector: 'my-component',
127
 *   templateUrl: 'my-component-tpl.html',
128
 *   animations: [
129
 *     trigger("myAnimationTrigger", [
130
 *       state(...),
131
 *       state(...),
132
 *       transition(...),
133
 *       transition(...)
134
 *     ])
135
 *   ]
136
 * })
137
 * class MyComponent {
138
 *   myStatusExp = "something";
139
 * }
140
 * ```
141
 *
142
 * The template associated with this component will make use of the `myAnimationTrigger` animation
143
 trigger by binding to an element within its template code.
144
 *
145
 * ```html
146
 * <!-- somewhere inside of my-component-tpl.html -->
147
 * <div [@myAnimationTrigger]="myStatusExp">...</div>
148
 * ```
149
 *
150
 * ### Using an inline function
151
 * The `transition` animation method also supports reading an inline function which can decide
152
 * if its associated animation should be run.
153
 *
154
 * ```
155
 * // this method will be run each time the `myAnimationTrigger`
156
 * // trigger value changes...
157
 * function myInlineMatcherFn(fromState: string, toState: string, element: any, params: {[key:
158
 string]: any}): boolean {
159
 *   // notice that `element` and `params` are also available here
160
 *   return toState == 'yes-please-animate';
161
 * }
162
 *
163
 * @Component({
164
 *   selector: 'my-component',
165
 *   templateUrl: 'my-component-tpl.html',
166
 *   animations: [
167
 *     trigger('myAnimationTrigger', [
168
 *       transition(myInlineMatcherFn, [
169
 *         // the animation sequence code
170
 *       ]),
171
 *     ])
172
 *   ]
173
 * })
174
 * class MyComponent {
175
 *   myStatusExp = "yes-please-animate";
176
 * }
177
 * ```
178
 *
179
 * The inline method will be run each time the trigger
180
 * value changes
181
 *
182
 * ## Disable Animations
183
 * A special animation control binding called `@.disabled` can be placed on an element which will
184
 then disable animations for any inner animation triggers situated within the element as well as
185
 any animations on the element itself.
186
 *
187
 * When true, the `@.disabled` binding will prevent all animations from rendering. The example
188
 below shows how to use this feature:
189
 *
190
 * ```ts
191
 * @Component({
192
 *   selector: 'my-component',
193
 *   template: `
194
 *     <div [@.disabled]="isDisabled">
195
 *       <div [@childAnimation]="exp"></div>
196
 *     </div>
197
 *   `,
198
 *   animations: [
199
 *     trigger("childAnimation", [
200
 *       // ...
201
 *     ])
202
 *   ]
203
 * })
204
 * class MyComponent {
205
 *   isDisabled = true;
206
 *   exp = '...';
207
 * }
208
 * ```
209
 *
210
 * The `@childAnimation` trigger will not animate because `@.disabled` prevents it from happening
211
 (when true).
212
 *
213
 * Note that `@.disabled` will only disable all animations (this means any animations running on
214
 * the same element will also be disabled).
215
 *
216
 * ### Disabling Animations Application-wide
217
 * When an area of the template is set to have animations disabled, **all** inner components will
218
 also have their animations disabled as well. This means that all animations for an angular
219
 application can be disabled by placing a host binding set on `@.disabled` on the topmost Angular
220
 component.
221
 *
222
 * ```ts
223
 * import {Component, HostBinding} from '@angular/core';
224
 *
225
 * @Component({
226
 *   selector: 'app-component',
227
 *   templateUrl: 'app.component.html',
228
 * })
229
 * class AppComponent {
230
 *   @HostBinding('@.disabled')
231
 *   public animationsDisabled = true;
232
 * }
233
 * ```
234
 *
235
 * ### What about animations that us `query()` and `animateChild()`?
236
 * Despite inner animations being disabled, a parent animation can {@link query query} for inner
237
 elements located in disabled areas of the template and still animate them as it sees fit. This is
238
 also the case for when a sub animation is queried by a parent and then later animated using {@link
239
 animateChild animateChild}.
240
 
241
 * ### Detecting when an animation is disabled
242
 * If a region of the DOM (or the entire application) has its animations disabled, then animation
243
 * trigger callbacks will still fire just as normal (only for zero seconds).
244
 *
245
 * When a trigger callback fires it will provide an instance of an {@link AnimationEvent}. If
246
 animations
247
 * are disabled then the `.disabled` flag on the event will be true.
248
 *
249
 * @experimental Animation support is experimental.
250
 */
251
function trigger(name, definitions) {
252
    return { type: 7 /* Trigger */, name: name, definitions: definitions, options: {} };
253
}
254
/**
255
 * `animate` is an animation-specific function that is designed to be used inside of Angular's
256
 * animation DSL language. If this information is new, please navigate to the {@link
257
 * Component#animations component animations metadata page} to gain a better understanding of
258
 * how animations in Angular are used.
259
 *
260
 * `animate` specifies an animation step that will apply the provided `styles` data for a given
261
 * amount of time based on the provided `timing` expression value. Calls to `animate` are expected
262
 * to be used within {@link sequence an animation sequence}, {@link group group}, or {@link
263
 * transition transition}.
264
 *
265
 * ### Usage
266
 *
267
 * The `animate` function accepts two input parameters: `timing` and `styles`:
268
 *
269
 * - `timing` is a string based value that can be a combination of a duration with optional delay
270
 * and easing values. The format for the expression breaks down to `duration delay easing`
271
 * (therefore a value such as `1s 100ms ease-out` will be parse itself into `duration=1000,
272
 * delay=100, easing=ease-out`. If a numeric value is provided then that will be used as the
273
 * `duration` value in millisecond form.
274
 * - `styles` is the style input data which can either be a call to {@link style style} or {@link
275
 * keyframes keyframes}. If left empty then the styles from the destination state will be collected
276
 * and used (this is useful when describing an animation step that will complete an animation by
277
 * {@link transition#the-final-animate-call animating to the final state}).
278
 *
279
 * ```typescript
280
 * // various functions for specifying timing data
281
 * animate(500, style(...))
282
 * animate("1s", style(...))
283
 * animate("100ms 0.5s", style(...))
284
 * animate("5s ease", style(...))
285
 * animate("5s 10ms cubic-bezier(.17,.67,.88,.1)", style(...))
286
 *
287
 * // either style() of keyframes() can be used
288
 * animate(500, style({ background: "red" }))
289
 * animate(500, keyframes([
290
 *   style({ background: "blue" })),
291
 *   style({ background: "red" }))
292
 * ])
293
 * ```
294
 *
295
 * {@example core/animation/ts/dsl/animation_example.ts region='Component'}
296
 *
297
 * @experimental Animation support is experimental.
298
 */
299
function animate(timings, styles) {
300
    if (styles === void 0) { styles = null; }
301
    return { type: 4 /* Animate */, styles: styles, timings: timings };
302
}
303
/**
304
 * `group` is an animation-specific function that is designed to be used inside of Angular's
305
 * animation DSL language. If this information is new, please navigate to the {@link
306
 * Component#animations component animations metadata page} to gain a better understanding of
307
 * how animations in Angular are used.
308
 *
309
 * `group` specifies a list of animation steps that are all run in parallel. Grouped animations are
310
 * useful when a series of styles must be animated/closed off at different starting/ending times.
311
 *
312
 * The `group` function can either be used within a {@link sequence sequence} or a {@link transition
313
 * transition} and it will only continue to the next instruction once all of the inner animation
314
 * steps have completed.
315
 *
316
 * ### Usage
317
 *
318
 * The `steps` data that is passed into the `group` animation function can either consist of {@link
319
 * style style} or {@link animate animate} function calls. Each call to `style()` or `animate()`
320
 * within a group will be executed instantly (use {@link keyframes keyframes} or a {@link
321
 * animate#usage animate() with a delay value} to offset styles to be applied at a later time).
322
 *
323
 * ```typescript
324
 * group([
325
 *   animate("1s", { background: "black" }))
326
 *   animate("2s", { color: "white" }))
327
 * ])
328
 * ```
329
 *
330
 * {@example core/animation/ts/dsl/animation_example.ts region='Component'}
331
 *
332
 * @experimental Animation support is experimental.
333
 */
334
function group(steps, options) {
335
    if (options === void 0) { options = null; }
336
    return { type: 3 /* Group */, steps: steps, options: options };
337
}
338
/**
339
 * `sequence` is an animation-specific function that is designed to be used inside of Angular's
340
 * animation DSL language. If this information is new, please navigate to the {@link
341
 * Component#animations component animations metadata page} to gain a better understanding of
342
 * how animations in Angular are used.
343
 *
344
 * `sequence` Specifies a list of animation steps that are run one by one. (`sequence` is used by
345
 * default when an array is passed as animation data into {@link transition transition}.)
346
 *
347
 * The `sequence` function can either be used within a {@link group group} or a {@link transition
348
 * transition} and it will only continue to the next instruction once each of the inner animation
349
 * steps have completed.
350
 *
351
 * To perform animation styling in parallel with other animation steps then have a look at the
352
 * {@link group group} animation function.
353
 *
354
 * ### Usage
355
 *
356
 * The `steps` data that is passed into the `sequence` animation function can either consist of
357
 * {@link style style} or {@link animate animate} function calls. A call to `style()` will apply the
358
 * provided styling data immediately while a call to `animate()` will apply its styling data over a
359
 * given time depending on its timing data.
360
 *
361
 * ```typescript
362
 * sequence([
363
 *   style({ opacity: 0 })),
364
 *   animate("1s", { opacity: 1 }))
365
 * ])
366
 * ```
367
 *
368
 * {@example core/animation/ts/dsl/animation_example.ts region='Component'}
369
 *
370
 * @experimental Animation support is experimental.
371
 */
372
function sequence(steps, options) {
373
    if (options === void 0) { options = null; }
374
    return { type: 2 /* Sequence */, steps: steps, options: options };
375
}
376
/**
377
 * `style` is an animation-specific function that is designed to be used inside of Angular's
378
 * animation DSL language. If this information is new, please navigate to the {@link
379
 * Component#animations component animations metadata page} to gain a better understanding of
380
 * how animations in Angular are used.
381
 *
382
 * `style` declares a key/value object containing CSS properties/styles that can then be used for
383
 * {@link state animation states}, within an {@link sequence animation sequence}, or as styling data
384
 * for both {@link animate animate} and {@link keyframes keyframes}.
385
 *
386
 * ### Usage
387
 *
388
 * `style` takes in a key/value string map as data and expects one or more CSS property/value pairs
389
 * to be defined.
390
 *
391
 * ```typescript
392
 * // string values are used for css properties
393
 * style({ background: "red", color: "blue" })
394
 *
395
 * // numerical (pixel) values are also supported
396
 * style({ width: 100, height: 0 })
397
 * ```
398
 *
399
 * #### Auto-styles (using `*`)
400
 *
401
 * When an asterix (`*`) character is used as a value then it will be detected from the element
402
 * being animated and applied as animation data when the animation starts.
403
 *
404
 * This feature proves useful for a state depending on layout and/or environment factors; in such
405
 * cases the styles are calculated just before the animation starts.
406
 *
407
 * ```typescript
408
 * // the steps below will animate from 0 to the
409
 * // actual height of the element
410
 * style({ height: 0 }),
411
 * animate("1s", style({ height: "*" }))
412
 * ```
413
 *
414
 * {@example core/animation/ts/dsl/animation_example.ts region='Component'}
415
 *
416
 * @experimental Animation support is experimental.
417
 */
418
function style(tokens) {
419
    return { type: 6 /* Style */, styles: tokens, offset: null };
420
}
421
/**
422
 * `state` is an animation-specific function that is designed to be used inside of Angular's
423
 * animation DSL language. If this information is new, please navigate to the {@link
424
 * Component#animations component animations metadata page} to gain a better understanding of
425
 * how animations in Angular are used.
426
 *
427
 * `state` declares an animation state within the given trigger. When a state is active within a
428
 * component then its associated styles will persist on the element that the trigger is attached to
429
 * (even when the animation ends).
430
 *
431
 * To animate between states, have a look at the animation {@link transition transition} DSL
432
 * function. To register states to an animation trigger please have a look at the {@link trigger
433
 * trigger} function.
434
 *
435
 * #### The `void` state
436
 *
437
 * The `void` state value is a reserved word that angular uses to determine when the element is not
438
 * apart of the application anymore (e.g. when an `ngIf` evaluates to false then the state of the
439
 * associated element is void).
440
 *
441
 * #### The `*` (default) state
442
 *
443
 * The `*` state (when styled) is a fallback state that will be used if the state that is being
444
 * animated is not declared within the trigger.
445
 *
446
 * ### Usage
447
 *
448
 * `state` will declare an animation state with its associated styles
449
 * within the given trigger.
450
 *
451
 * - `stateNameExpr` can be one or more state names separated by commas.
452
 * - `styles` refers to the {@link style styling data} that will be persisted on the element once
453
 * the state has been reached.
454
 *
455
 * ```typescript
456
 * // "void" is a reserved name for a state and is used to represent
457
 * // the state in which an element is detached from from the application.
458
 * state("void", style({ height: 0 }))
459
 *
460
 * // user-defined states
461
 * state("closed", style({ height: 0 }))
462
 * state("open, visible", style({ height: "*" }))
463
 * ```
464
 *
465
 * {@example core/animation/ts/dsl/animation_example.ts region='Component'}
466
 *
467
 * @experimental Animation support is experimental.
468
 */
469
function state(name, styles, options) {
470
    return { type: 0 /* State */, name: name, styles: styles, options: options };
471
}
472
/**
473
 * `keyframes` is an animation-specific function that is designed to be used inside of Angular's
474
 * animation DSL language. If this information is new, please navigate to the {@link
475
 * Component#animations component animations metadata page} to gain a better understanding of
476
 * how animations in Angular are used.
477
 *
478
 * `keyframes` specifies a collection of {@link style style} entries each optionally characterized
479
 * by an `offset` value.
480
 *
481
 * ### Usage
482
 *
483
 * The `keyframes` animation function is designed to be used alongside the {@link animate animate}
484
 * animation function. Instead of applying animations from where they are currently to their
485
 * destination, keyframes can describe how each style entry is applied and at what point within the
486
 * animation arc (much like CSS Keyframe Animations do).
487
 *
488
 * For each `style()` entry an `offset` value can be set. Doing so allows to specify at what
489
 * percentage of the animate time the styles will be applied.
490
 *
491
 * ```typescript
492
 * // the provided offset values describe when each backgroundColor value is applied.
493
 * animate("5s", keyframes([
494
 *   style({ backgroundColor: "red", offset: 0 }),
495
 *   style({ backgroundColor: "blue", offset: 0.2 }),
496
 *   style({ backgroundColor: "orange", offset: 0.3 }),
497
 *   style({ backgroundColor: "black", offset: 1 })
498
 * ]))
499
 * ```
500
 *
501
 * Alternatively, if there are no `offset` values used within the style entries then the offsets
502
 * will be calculated automatically.
503
 *
504
 * ```typescript
505
 * animate("5s", keyframes([
506
 *   style({ backgroundColor: "red" }) // offset = 0
507
 *   style({ backgroundColor: "blue" }) // offset = 0.33
508
 *   style({ backgroundColor: "orange" }) // offset = 0.66
509
 *   style({ backgroundColor: "black" }) // offset = 1
510
 * ]))
511
 * ```
512
 *
513
 * {@example core/animation/ts/dsl/animation_example.ts region='Component'}
514
 *
515
 * @experimental Animation support is experimental.
516
 */
517
function keyframes(steps) {
518
    return { type: 5 /* Keyframes */, steps: steps };
519
}
520
/**
521
 * `transition` is an animation-specific function that is designed to be used inside of Angular's
522
 * animation DSL language. If this information is new, please navigate to the {@link
523
 * Component#animations component animations metadata page} to gain a better understanding of
524
 * how animations in Angular are used.
525
 *
526
 * `transition` declares the {@link sequence sequence of animation steps} that will be run when the
527
 * provided `stateChangeExpr` value is satisfied. The `stateChangeExpr` consists of a `state1 =>
528
 * state2` which consists of two known states (use an asterix (`*`) to refer to a dynamic starting
529
 * and/or ending state).
530
 *
531
 * A function can also be provided as the `stateChangeExpr` argument for a transition and this
532
 * function will be executed each time a state change occurs. If the value returned within the
533
 * function is true then the associated animation will be run.
534
 *
535
 * Animation transitions are placed within an {@link trigger animation trigger}. For an transition
536
 * to animate to a state value and persist its styles then one or more {@link state animation
537
 * states} is expected to be defined.
538
 *
539
 * ### Usage
540
 *
541
 * An animation transition is kicked off the `stateChangeExpr` predicate evaluates to true based on
542
 * what the previous state is and what the current state has become. In other words, if a transition
543
 * is defined that matches the old/current state criteria then the associated animation will be
544
 * triggered.
545
 *
546
 * ```typescript
547
 * // all transition/state changes are defined within an animation trigger
548
 * trigger("myAnimationTrigger", [
549
 *   // if a state is defined then its styles will be persisted when the
550
 *   // animation has fully completed itself
551
 *   state("on", style({ background: "green" })),
552
 *   state("off", style({ background: "grey" })),
553
 *
554
 *   // a transition animation that will be kicked off when the state value
555
 *   // bound to "myAnimationTrigger" changes from "on" to "off"
556
 *   transition("on => off", animate(500)),
557
 *
558
 *   // it is also possible to do run the same animation for both directions
559
 *   transition("on <=> off", animate(500)),
560
 *
561
 *   // or to define multiple states pairs separated by commas
562
 *   transition("on => off, off => void", animate(500)),
563
 *
564
 *   // this is a catch-all state change for when an element is inserted into
565
 *   // the page and the destination state is unknown
566
 *   transition("void => *", [
567
 *     style({ opacity: 0 }),
568
 *     animate(500)
569
 *   ]),
570
 *
571
 *   // this will capture a state change between any states
572
 *   transition("* => *", animate("1s 0s")),
573
 *
574
 *   // you can also go full out and include a function
575
 *   transition((fromState, toState) => {
576
 *     // when `true` then it will allow the animation below to be invoked
577
 *     return fromState == "off" && toState == "on";
578
 *   }, animate("1s 0s"))
579
 * ])
580
 * ```
581
 *
582
 * The template associated with this component will make use of the `myAnimationTrigger` animation
583
 * trigger by binding to an element within its template code.
584
 *
585
 * ```html
586
 * <!-- somewhere inside of my-component-tpl.html -->
587
 * <div [@myAnimationTrigger]="myStatusExp">...</div>
588
 * ```
589
 *
590
 * #### The final `animate` call
591
 *
592
 * If the final step within the transition steps is a call to `animate()` that **only** uses a
593
 * timing value with **no style data** then it will be automatically used as the final animation arc
594
 * for the element to animate itself to the final state. This involves an automatic mix of
595
 * adding/removing CSS styles so that the element will be in the exact state it should be for the
596
 * applied state to be presented correctly.
597
 *
598
 * ```
599
 * // start off by hiding the element, but make sure that it animates properly to whatever state
600
 * // is currently active for "myAnimationTrigger"
601
 * transition("void => *", [
602
 *   style({ opacity: 0 }),
603
 *   animate(500)
604
 * ])
605
 * ```
606
 *
607
 * ### Using :enter and :leave
608
 *
609
 * Given that enter (insertion) and leave (removal) animations are so common, the `transition`
610
 * function accepts both `:enter` and `:leave` values which are aliases for the `void => *` and `*
611
 * => void` state changes.
612
 *
613
 * ```
614
 * transition(":enter", [
615
 *   style({ opacity: 0 }),
616
 *   animate(500, style({ opacity: 1 }))
617
 * ]),
618
 * transition(":leave", [
619
 *   animate(500, style({ opacity: 0 }))
620
 * ])
621
 * ```
622
 *
623
 * ### Boolean values
624
 * if a trigger binding value is a boolean value then it can be matched using a transition
625
 * expression that compares `true` and `false` or `1` and `0`.
626
 *
627
 * ```
628
 * // in the template
629
 * <div [@openClose]="open ? true : false">...</div>
630
 *
631
 * // in the component metadata
632
 * trigger('openClose', [
633
 *   state('true', style({ height: '*' })),
634
 *   state('false', style({ height: '0px' })),
635
 *   transition('false <=> true', animate(500))
636
 * ])
637
 * ```
638
 *
639
 * ### Using :increment and :decrement
640
 * In addition to the :enter and :leave transition aliases, the :increment and :decrement aliases
641
 * can be used to kick off a transition when a numeric value has increased or decreased in value.
642
 *
643
 * ```
644
 * import {group, animate, query, transition, style, trigger} from '@angular/animations';
645
 * import {Component} from '@angular/core';
646
 *
647
 * @Component({
648
 *   selector: 'banner-carousel-component',
649
 *   styles: [`
650
 *     .banner-container {
651
 *        position:relative;
652
 *        height:500px;
653
 *        overflow:hidden;
654
 *      }
655
 *     .banner-container > .banner {
656
 *        position:absolute;
657
 *        left:0;
658
 *        top:0;
659
 *        font-size:200px;
660
 *        line-height:500px;
661
 *        font-weight:bold;
662
 *        text-align:center;
663
 *        width:100%;
664
 *      }
665
 *   `],
666
 *   template: `
667
 *     <button (click)="previous()">Previous</button>
668
 *     <button (click)="next()">Next</button>
669
 *     <hr>
670
 *     <div [@bannerAnimation]="selectedIndex" class="banner-container">
671
 *       <div class="banner" *ngFor="let banner of banners"> {{ banner }} </div>
672
 *     </div>
673
 *   `,
674
 *   animations: [
675
 *     trigger('bannerAnimation', [
676
 *       transition(":increment", group([
677
 *         query(':enter', [
678
 *           style({ left: '100%' }),
679
 *           animate('0.5s ease-out', style('*'))
680
 *         ]),
681
 *         query(':leave', [
682
 *           animate('0.5s ease-out', style({ left: '-100%' }))
683
 *         ])
684
 *       ])),
685
 *       transition(":decrement", group([
686
 *         query(':enter', [
687
 *           style({ left: '-100%' }),
688
 *           animate('0.5s ease-out', style('*'))
689
 *         ]),
690
 *         query(':leave', [
691
 *           animate('0.5s ease-out', style({ left: '100%' }))
692
 *         ])
693
 *       ]))
694
 *     ])
695
 *   ]
696
 * })
697
 * class BannerCarouselComponent {
698
 *   allBanners: string[] = ['1', '2', '3', '4'];
699
 *   selectedIndex: number = 0;
700
 *
701
 *   get banners() {
702
 *      return [this.allBanners[this.selectedIndex]];
703
 *   }
704
 *
705
 *   previous() {
706
 *     this.selectedIndex = Math.max(this.selectedIndex - 1, 0);
707
 *   }
708
 *
709
 *   next() {
710
 *     this.selectedIndex = Math.min(this.selectedIndex + 1, this.allBanners.length - 1);
711
 *   }
712
 * }
713
 * ```
714
 *
715
 * {@example core/animation/ts/dsl/animation_example.ts region='Component'}
716
 *
717
 * @experimental Animation support is experimental.
718
 */
719
function transition(stateChangeExpr, steps, options) {
720
    if (options === void 0) { options = null; }
721
    return { type: 1 /* Transition */, expr: stateChangeExpr, animation: steps, options: options };
722
}
723
/**
724
 * `animation` is an animation-specific function that is designed to be used inside of Angular's
725
 * animation DSL language.
726
 *
727
 * `var myAnimation = animation(...)` is designed to produce a reusable animation that can be later
728
 * invoked in another animation or sequence. Reusable animations are designed to make use of
729
 * animation parameters and the produced animation can be used via the `useAnimation` method.
730
 *
731
 * ```
732
 * var fadeAnimation = animation([
733
 *   style({ opacity: '{{ start }}' }),
734
 *   animate('{{ time }}',
735
 *     style({ opacity: '{{ end }}'}))
736
 * ], { params: { time: '1000ms', start: 0, end: 1 }});
737
 * ```
738
 *
739
 * If parameters are attached to an animation then they act as **default parameter values**. When an
740
 * animation is invoked via `useAnimation` then parameter values are allowed to be passed in
741
 * directly. If any of the passed in parameter values are missing then the default values will be
742
 * used.
743
 *
744
 * ```
745
 * useAnimation(fadeAnimation, {
746
 *   params: {
747
 *     time: '2s',
748
 *     start: 1,
749
 *     end: 0
750
 *   }
751
 * })
752
 * ```
753
 *
754
 * If one or more parameter values are missing before animated then an error will be thrown.
755
 *
756
 * @experimental Animation support is experimental.
757
 */
758
function animation(steps, options) {
759
    if (options === void 0) { options = null; }
760
    return { type: 8 /* Reference */, animation: steps, options: options };
761
}
762
/**
763
 * `animateChild` is an animation-specific function that is designed to be used inside of Angular's
764
 * animation DSL language. It works by allowing a queried element to execute its own
765
 * animation within the animation sequence.
766
 *
767
 * Each time an animation is triggered in angular, the parent animation
768
 * will always get priority and any child animations will be blocked. In order
769
 * for a child animation to run, the parent animation must query each of the elements
770
 * containing child animations and then allow the animations to run using `animateChild`.
771
 *
772
 * The example HTML code below shows both parent and child elements that have animation
773
 * triggers that will execute at the same time.
774
 *
775
 * ```html
776
 * <!-- parent-child.component.html -->
777
 * <button (click)="exp =! exp">Toggle</button>
778
 * <hr>
779
 *
780
 * <div [@parentAnimation]="exp">
781
 *   <header>Hello</header>
782
 *   <div [@childAnimation]="exp">
783
 *       one
784
 *   </div>
785
 *   <div [@childAnimation]="exp">
786
 *       two
787
 *   </div>
788
 *   <div [@childAnimation]="exp">
789
 *       three
790
 *   </div>
791
 * </div>
792
 * ```
793
 *
794
 * Now when the `exp` value changes to true, only the `parentAnimation` animation will animate
795
 * because it has priority. However, using `query` and `animateChild` each of the inner animations
796
 * can also fire:
797
 *
798
 * ```ts
799
 * // parent-child.component.ts
800
 * import {trigger, transition, animate, style, query, animateChild} from '@angular/animations';
801
 * @Component({
802
 *   selector: 'parent-child-component',
803
 *   animations: [
804
 *     trigger('parentAnimation', [
805
 *       transition('false => true', [
806
 *         query('header', [
807
 *           style({ opacity: 0 }),
808
 *           animate(500, style({ opacity: 1 }))
809
 *         ]),
810
 *         query('@childAnimation', [
811
 *           animateChild()
812
 *         ])
813
 *       ])
814
 *     ]),
815
 *     trigger('childAnimation', [
816
 *       transition('false => true', [
817
 *         style({ opacity: 0 }),
818
 *         animate(500, style({ opacity: 1 }))
819
 *       ])
820
 *     ])
821
 *   ]
822
 * })
823
 * class ParentChildCmp {
824
 *   exp: boolean = false;
825
 * }
826
 * ```
827
 *
828
 * In the animation code above, when the `parentAnimation` transition kicks off it first queries to
829
 * find the header element and fades it in. It then finds each of the sub elements that contain the
830
 * `@childAnimation` trigger and then allows for their animations to fire.
831
 *
832
 * This example can be further extended by using stagger:
833
 *
834
 * ```ts
835
 * query('@childAnimation', stagger(100, [
836
 *   animateChild()
837
 * ]))
838
 * ```
839
 *
840
 * Now each of the sub animations start off with respect to the `100ms` staggering step.
841
 *
842
 * ## The first frame of child animations
843
 * When sub animations are executed using `animateChild` the animation engine will always apply the
844
 * first frame of every sub animation immediately at the start of the animation sequence. This way
845
 * the parent animation does not need to set any initial styling data on the sub elements before the
846
 * sub animations kick off.
847
 *
848
 * In the example above the first frame of the `childAnimation`'s `false => true` transition
849
 * consists of a style of `opacity: 0`. This is applied immediately when the `parentAnimation`
850
 * animation transition sequence starts. Only then when the `@childAnimation` is queried and called
851
 * with `animateChild` will it then animate to its destination of `opacity: 1`.
852
 *
853
 * Note that this feature designed to be used alongside {@link query query()} and it will only work
854
 * with animations that are assigned using the Angular animation DSL (this means that CSS keyframes
855
 * and transitions are not handled by this API).
856
 *
857
 * @experimental Animation support is experimental.
858
 */
859
function animateChild(options) {
860
    if (options === void 0) { options = null; }
861
    return { type: 9 /* AnimateChild */, options: options };
862
}
863
/**
864
 * `useAnimation` is an animation-specific function that is designed to be used inside of Angular's
865
 * animation DSL language. It is used to kick off a reusable animation that is created using {@link
866
 * animation animation()}.
867
 *
868
 * @experimental Animation support is experimental.
869
 */
870
function useAnimation(animation, options) {
871
    if (options === void 0) { options = null; }
872
    return { type: 10 /* AnimateRef */, animation: animation, options: options };
873
}
874
/**
875
 * `query` is an animation-specific function that is designed to be used inside of Angular's
876
 * animation DSL language.
877
 *
878
 * query() is used to find one or more inner elements within the current element that is
879
 * being animated within the sequence. The provided animation steps are applied
880
 * to the queried element (by default, an array is provided, then this will be
881
 * treated as an animation sequence).
882
 *
883
 * ### Usage
884
 *
885
 * query() is designed to collect multiple elements and works internally by using
886
 * `element.querySelectorAll`. An additional options object can be provided which
887
 * can be used to limit the total amount of items to be collected.
888
 *
889
 * ```js
890
 * query('div', [
891
 *   animate(...),
892
 *   animate(...)
893
 * ], { limit: 1 })
894
 * ```
895
 *
896
 * query(), by default, will throw an error when zero items are found. If a query
897
 * has the `optional` flag set to true then this error will be ignored.
898
 *
899
 * ```js
900
 * query('.some-element-that-may-not-be-there', [
901
 *   animate(...),
902
 *   animate(...)
903
 * ], { optional: true })
904
 * ```
905
 *
906
 * ### Special Selector Values
907
 *
908
 * The selector value within a query can collect elements that contain angular-specific
909
 * characteristics
910
 * using special pseudo-selectors tokens.
911
 *
912
 * These include:
913
 *
914
 *  - Querying for newly inserted/removed elements using `query(":enter")`/`query(":leave")`
915
 *  - Querying all currently animating elements using `query(":animating")`
916
 *  - Querying elements that contain an animation trigger using `query("@triggerName")`
917
 *  - Querying all elements that contain an animation triggers using `query("@*")`
918
 *  - Including the current element into the animation sequence using `query(":self")`
919
 *
920
 *
921
 *  Each of these pseudo-selector tokens can be merged together into a combined query selector
922
 * string:
923
 *
924
 *  ```
925
 *  query(':self, .record:enter, .record:leave, @subTrigger', [...])
926
 *  ```
927
 *
928
 * ### Demo
929
 *
930
 * ```
931
 * @Component({
932
 *   selector: 'inner',
933
 *   template: `
934
 *     <div [@queryAnimation]="exp">
935
 *       <h1>Title</h1>
936
 *       <div class="content">
937
 *         Blah blah blah
938
 *       </div>
939
 *     </div>
940
 *   `,
941
 *   animations: [
942
 *    trigger('queryAnimation', [
943
 *      transition('* => goAnimate', [
944
 *        // hide the inner elements
945
 *        query('h1', style({ opacity: 0 })),
946
 *        query('.content', style({ opacity: 0 })),
947
 *
948
 *        // animate the inner elements in, one by one
949
 *        query('h1', animate(1000, style({ opacity: 1 })),
950
 *        query('.content', animate(1000, style({ opacity: 1 })),
951
 *      ])
952
 *    ])
953
 *  ]
954
 * })
955
 * class Cmp {
956
 *   exp = '';
957
 *
958
 *   goAnimate() {
959
 *     this.exp = 'goAnimate';
960
 *   }
961
 * }
962
 * ```
963
 *
964
 * @experimental Animation support is experimental.
965
 */
966
function query(selector, animation, options) {
967
    if (options === void 0) { options = null; }
968
    return { type: 11 /* Query */, selector: selector, animation: animation, options: options };
969
}
970
/**
971
 * `stagger` is an animation-specific function that is designed to be used inside of Angular's
972
 * animation DSL language. It is designed to be used inside of an animation {@link query query()}
973
 * and works by issuing a timing gap between after each queried item is animated.
974
 *
975
 * ### Usage
976
 *
977
 * In the example below there is a container element that wraps a list of items stamped out
978
 * by an ngFor. The container element contains an animation trigger that will later be set
979
 * to query for each of the inner items.
980
 *
981
 * ```html
982
 * <!-- list.component.html -->
983
 * <button (click)="toggle()">Show / Hide Items</button>
984
 * <hr />
985
 * <div [@listAnimation]="items.length">
986
 *   <div *ngFor="let item of items">
987
 *     {{ item }}
988
 *   </div>
989
 * </div>
990
 * ```
991
 *
992
 * The component code for this looks as such:
993
 *
994
 * ```ts
995
 * import {trigger, transition, style, animate, query, stagger} from '@angular/animations';
996
 * @Component({
997
 *   templateUrl: 'list.component.html',
998
 *   animations: [
999
 *     trigger('listAnimation', [
1000
 *        //...
1001
 *     ])
1002
 *   ]
1003
 * })
1004
 * class ListComponent {
1005
 *   items = [];
1006
 *
1007
 *   showItems() {
1008
 *     this.items = [0,1,2,3,4];
1009
 *   }
1010
 *
1011
 *   hideItems() {
1012
 *     this.items = [];
1013
 *   }
1014
 *
1015
 *   toggle() {
1016
 *     this.items.length ? this.hideItems() : this.showItems();
1017
 *   }
1018
 * }
1019
 * ```
1020
 *
1021
 * And now for the animation trigger code:
1022
 *
1023
 * ```ts
1024
 * trigger('listAnimation', [
1025
 *   transition('* => *', [ // each time the binding value changes
1026
 *     query(':leave', [
1027
 *       stagger(100, [
1028
 *         animate('0.5s', style({ opacity: 0 }))
1029
 *       ])
1030
 *     ]),
1031
 *     query(':enter', [
1032
 *       style({ opacity: 0 }),
1033
 *       stagger(100, [
1034
 *         animate('0.5s', style({ opacity: 1 }))
1035
 *       ])
1036
 *     ])
1037
 *   ])
1038
 * ])
1039
 * ```
1040
 *
1041
 * Now each time the items are added/removed then either the opacity
1042
 * fade-in animation will run or each removed item will be faded out.
1043
 * When either of these animations occur then a stagger effect will be
1044
 * applied after each item's animation is started.
1045
 *
1046
 * @experimental Animation support is experimental.
1047
 */
1048
function stagger(timings, animation) {
1049
    return { type: 12 /* Stagger */, timings: timings, animation: animation };
1050
}
1051
 
1052
/**
1053
 * @license
1054
 * Copyright Google Inc. All Rights Reserved.
1055
 *
1056
 * Use of this source code is governed by an MIT-style license that can be
1057
 * found in the LICENSE file at https://angular.io/license
1058
 */
1059
function scheduleMicroTask(cb) {
1060
    Promise.resolve(null).then(cb);
1061
}
1062
 
1063
/**
1064
 * @experimental Animation support is experimental.
1065
 */
1066
var NoopAnimationPlayer = /** @class */ (function () {
1067
    function NoopAnimationPlayer(duration, delay) {
1068
        if (duration === void 0) { duration = 0; }
1069
        if (delay === void 0) { delay = 0; }
1070
        this._onDoneFns = [];
1071
        this._onStartFns = [];
1072
        this._onDestroyFns = [];
1073
        this._started = false;
1074
        this._destroyed = false;
1075
        this._finished = false;
1076
        this.parentPlayer = null;
1077
        this.totalTime = duration + delay;
1078
    }
1079
    NoopAnimationPlayer.prototype._onFinish = function () {
1080
        if (!this._finished) {
1081
            this._finished = true;
1082
            this._onDoneFns.forEach(function (fn) { return fn(); });
1083
            this._onDoneFns = [];
1084
        }
1085
    };
1086
    NoopAnimationPlayer.prototype.onStart = function (fn) { this._onStartFns.push(fn); };
1087
    NoopAnimationPlayer.prototype.onDone = function (fn) { this._onDoneFns.push(fn); };
1088
    NoopAnimationPlayer.prototype.onDestroy = function (fn) { this._onDestroyFns.push(fn); };
1089
    NoopAnimationPlayer.prototype.hasStarted = function () { return this._started; };
1090
    NoopAnimationPlayer.prototype.init = function () { };
1091
    NoopAnimationPlayer.prototype.play = function () {
1092
        if (!this.hasStarted()) {
1093
            this._onStart();
1094
            this.triggerMicrotask();
1095
        }
1096
        this._started = true;
1097
    };
1098
    /* @internal */
1099
    /* @internal */
1100
    NoopAnimationPlayer.prototype.triggerMicrotask = /* @internal */
1101
    function () {
1102
        var _this = this;
1103
        scheduleMicroTask(function () { return _this._onFinish(); });
1104
    };
1105
    NoopAnimationPlayer.prototype._onStart = function () {
1106
        this._onStartFns.forEach(function (fn) { return fn(); });
1107
        this._onStartFns = [];
1108
    };
1109
    NoopAnimationPlayer.prototype.pause = function () { };
1110
    NoopAnimationPlayer.prototype.restart = function () { };
1111
    NoopAnimationPlayer.prototype.finish = function () { this._onFinish(); };
1112
    NoopAnimationPlayer.prototype.destroy = function () {
1113
        if (!this._destroyed) {
1114
            this._destroyed = true;
1115
            if (!this.hasStarted()) {
1116
                this._onStart();
1117
            }
1118
            this.finish();
1119
            this._onDestroyFns.forEach(function (fn) { return fn(); });
1120
            this._onDestroyFns = [];
1121
        }
1122
    };
1123
    NoopAnimationPlayer.prototype.reset = function () { };
1124
    NoopAnimationPlayer.prototype.setPosition = function (p) { };
1125
    NoopAnimationPlayer.prototype.getPosition = function () { return 0; };
1126
    /* @internal */
1127
    /* @internal */
1128
    NoopAnimationPlayer.prototype.triggerCallback = /* @internal */
1129
    function (phaseName) {
1130
        var methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;
1131
        methods.forEach(function (fn) { return fn(); });
1132
        methods.length = 0;
1133
    };
1134
    return NoopAnimationPlayer;
1135
}());
1136
 
1137
/**
1138
 * @license
1139
 * Copyright Google Inc. All Rights Reserved.
1140
 *
1141
 * Use of this source code is governed by an MIT-style license that can be
1142
 * found in the LICENSE file at https://angular.io/license
1143
 */
1144
var AnimationGroupPlayer = /** @class */ (function () {
1145
    function AnimationGroupPlayer(_players) {
1146
        var _this = this;
1147
        this._onDoneFns = [];
1148
        this._onStartFns = [];
1149
        this._finished = false;
1150
        this._started = false;
1151
        this._destroyed = false;
1152
        this._onDestroyFns = [];
1153
        this.parentPlayer = null;
1154
        this.totalTime = 0;
1155
        this.players = _players;
1156
        var doneCount = 0;
1157
        var destroyCount = 0;
1158
        var startCount = 0;
1159
        var total = this.players.length;
1160
        if (total == 0) {
1161
            scheduleMicroTask(function () { return _this._onFinish(); });
1162
        }
1163
        else {
1164
            this.players.forEach(function (player) {
1165
                player.onDone(function () {
1166
                    if (++doneCount == total) {
1167
                        _this._onFinish();
1168
                    }
1169
                });
1170
                player.onDestroy(function () {
1171
                    if (++destroyCount == total) {
1172
                        _this._onDestroy();
1173
                    }
1174
                });
1175
                player.onStart(function () {
1176
                    if (++startCount == total) {
1177
                        _this._onStart();
1178
                    }
1179
                });
1180
            });
1181
        }
1182
        this.totalTime = this.players.reduce(function (time, player) { return Math.max(time, player.totalTime); }, 0);
1183
    }
1184
    AnimationGroupPlayer.prototype._onFinish = function () {
1185
        if (!this._finished) {
1186
            this._finished = true;
1187
            this._onDoneFns.forEach(function (fn) { return fn(); });
1188
            this._onDoneFns = [];
1189
        }
1190
    };
1191
    AnimationGroupPlayer.prototype.init = function () { this.players.forEach(function (player) { return player.init(); }); };
1192
    AnimationGroupPlayer.prototype.onStart = function (fn) { this._onStartFns.push(fn); };
1193
    AnimationGroupPlayer.prototype._onStart = function () {
1194
        if (!this.hasStarted()) {
1195
            this._started = true;
1196
            this._onStartFns.forEach(function (fn) { return fn(); });
1197
            this._onStartFns = [];
1198
        }
1199
    };
1200
    AnimationGroupPlayer.prototype.onDone = function (fn) { this._onDoneFns.push(fn); };
1201
    AnimationGroupPlayer.prototype.onDestroy = function (fn) { this._onDestroyFns.push(fn); };
1202
    AnimationGroupPlayer.prototype.hasStarted = function () { return this._started; };
1203
    AnimationGroupPlayer.prototype.play = function () {
1204
        if (!this.parentPlayer) {
1205
            this.init();
1206
        }
1207
        this._onStart();
1208
        this.players.forEach(function (player) { return player.play(); });
1209
    };
1210
    AnimationGroupPlayer.prototype.pause = function () { this.players.forEach(function (player) { return player.pause(); }); };
1211
    AnimationGroupPlayer.prototype.restart = function () { this.players.forEach(function (player) { return player.restart(); }); };
1212
    AnimationGroupPlayer.prototype.finish = function () {
1213
        this._onFinish();
1214
        this.players.forEach(function (player) { return player.finish(); });
1215
    };
1216
    AnimationGroupPlayer.prototype.destroy = function () { this._onDestroy(); };
1217
    AnimationGroupPlayer.prototype._onDestroy = function () {
1218
        if (!this._destroyed) {
1219
            this._destroyed = true;
1220
            this._onFinish();
1221
            this.players.forEach(function (player) { return player.destroy(); });
1222
            this._onDestroyFns.forEach(function (fn) { return fn(); });
1223
            this._onDestroyFns = [];
1224
        }
1225
    };
1226
    AnimationGroupPlayer.prototype.reset = function () {
1227
        this.players.forEach(function (player) { return player.reset(); });
1228
        this._destroyed = false;
1229
        this._finished = false;
1230
        this._started = false;
1231
    };
1232
    AnimationGroupPlayer.prototype.setPosition = function (p) {
1233
        var timeAtPosition = p * this.totalTime;
1234
        this.players.forEach(function (player) {
1235
            var position = player.totalTime ? Math.min(1, timeAtPosition / player.totalTime) : 1;
1236
            player.setPosition(position);
1237
        });
1238
    };
1239
    AnimationGroupPlayer.prototype.getPosition = function () {
1240
        var min = 0;
1241
        this.players.forEach(function (player) {
1242
            var p = player.getPosition();
1243
            min = Math.min(p, min);
1244
        });
1245
        return min;
1246
    };
1247
    AnimationGroupPlayer.prototype.beforeDestroy = function () {
1248
        this.players.forEach(function (player) {
1249
            if (player.beforeDestroy) {
1250
                player.beforeDestroy();
1251
            }
1252
        });
1253
    };
1254
    /* @internal */
1255
    /* @internal */
1256
    AnimationGroupPlayer.prototype.triggerCallback = /* @internal */
1257
    function (phaseName) {
1258
        var methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;
1259
        methods.forEach(function (fn) { return fn(); });
1260
        methods.length = 0;
1261
    };
1262
    return AnimationGroupPlayer;
1263
}());
1264
 
1265
var ɵPRE_STYLE = '!';
1266
 
1267
/**
1268
 * @license
1269
 * Copyright Google Inc. All Rights Reserved.
1270
 *
1271
 * Use of this source code is governed by an MIT-style license that can be
1272
 * found in the LICENSE file at https://angular.io/license
1273
 */
1274
 
1275
/**
1276
 * @license
1277
 * Copyright Google Inc. All Rights Reserved.
1278
 *
1279
 * Use of this source code is governed by an MIT-style license that can be
1280
 * found in the LICENSE file at https://angular.io/license
1281
 */
1282
 
1283
/**
1284
 * @license
1285
 * Copyright Google Inc. All Rights Reserved.
1286
 *
1287
 * Use of this source code is governed by an MIT-style license that can be
1288
 * found in the LICENSE file at https://angular.io/license
1289
 */
1290
 
1291
/**
1292
 * Generated bundle index. Do not edit.
1293
 */
1294
 
1295
 
1296
//# sourceMappingURL=animations.js.map
1297
 
1298
 
1299
/***/ }),
1300
 
1301
/***/ "./node_modules/@angular/animations/fesm5/browser.js":
1302
/*!***********************************************************!*\
1303
  !*** ./node_modules/@angular/animations/fesm5/browser.js ***!
1304
  \***********************************************************/
1305
/*! exports provided: AnimationDriver, ɵAnimation, ɵAnimationStyleNormalizer, ɵNoopAnimationStyleNormalizer, ɵWebAnimationsStyleNormalizer, ɵAnimationDriver, ɵNoopAnimationDriver, ɵAnimationEngine, ɵCssKeyframesDriver, ɵCssKeyframesPlayer, ɵcontainsElement, ɵinvokeQuery, ɵmatchesElement, ɵvalidateStyleProperty, ɵWebAnimationsDriver, ɵsupportsWebAnimations, ɵWebAnimationsPlayer, ɵallowPreviousPlayerStylesMerge */
1306
/***/ (function(module, __webpack_exports__, __webpack_require__) {
1307
 
1308
"use strict";
1309
__webpack_require__.r(__webpack_exports__);
1310
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationDriver", function() { return AnimationDriver; });
1311
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵAnimation", function() { return Animation; });
1312
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵAnimationStyleNormalizer", function() { return AnimationStyleNormalizer; });
1313
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNoopAnimationStyleNormalizer", function() { return NoopAnimationStyleNormalizer; });
1314
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵWebAnimationsStyleNormalizer", function() { return WebAnimationsStyleNormalizer; });
1315
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵAnimationDriver", function() { return AnimationDriver; });
1316
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNoopAnimationDriver", function() { return NoopAnimationDriver; });
1317
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵAnimationEngine", function() { return AnimationEngine; });
1318
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵCssKeyframesDriver", function() { return CssKeyframesDriver; });
1319
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵCssKeyframesPlayer", function() { return CssKeyframesPlayer; });
1320
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcontainsElement", function() { return containsElement; });
1321
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinvokeQuery", function() { return invokeQuery; });
1322
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵmatchesElement", function() { return matchesElement; });
1323
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵvalidateStyleProperty", function() { return validateStyleProperty; });
1324
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵWebAnimationsDriver", function() { return WebAnimationsDriver; });
1325
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵsupportsWebAnimations", function() { return supportsWebAnimations; });
1326
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵWebAnimationsPlayer", function() { return WebAnimationsPlayer; });
1327
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵallowPreviousPlayerStylesMerge", function() { return allowPreviousPlayerStylesMerge; });
1328
/* harmony import */ var _angular_animations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/animations */ "./node_modules/@angular/animations/fesm5/animations.js");
1329
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
1330
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
1331
/**
1332
 * @license Angular v6.0.3
1333
 * (c) 2010-2018 Google, Inc. https://angular.io/
1334
 * License: MIT
1335
 */
1336
 
1337
 
1338
 
1339
 
1340
 
1341
function optimizeGroupPlayer(players) {
1342
    switch (players.length) {
1343
        case 0:
1344
            return new _angular_animations__WEBPACK_IMPORTED_MODULE_0__["NoopAnimationPlayer"]();
1345
        case 1:
1346
            return players[0];
1347
        default:
1348
            return new _angular_animations__WEBPACK_IMPORTED_MODULE_0__["ɵAnimationGroupPlayer"](players);
1349
    }
1350
}
1351
function normalizeKeyframes(driver, normalizer, element, keyframes, preStyles, postStyles) {
1352
    if (preStyles === void 0) { preStyles = {}; }
1353
    if (postStyles === void 0) { postStyles = {}; }
1354
    var errors = [];
1355
    var normalizedKeyframes = [];
1356
    var previousOffset = -1;
1357
    var previousKeyframe = null;
1358
    keyframes.forEach(function (kf) {
1359
        var offset = kf['offset'];
1360
        var isSameOffset = offset == previousOffset;
1361
        var normalizedKeyframe = (isSameOffset && previousKeyframe) || {};
1362
        Object.keys(kf).forEach(function (prop) {
1363
            var normalizedProp = prop;
1364
            var normalizedValue = kf[prop];
1365
            if (prop !== 'offset') {
1366
                normalizedProp = normalizer.normalizePropertyName(normalizedProp, errors);
1367
                switch (normalizedValue) {
1368
                    case _angular_animations__WEBPACK_IMPORTED_MODULE_0__["ɵPRE_STYLE"]:
1369
                        normalizedValue = preStyles[prop];
1370
                        break;
1371
                    case _angular_animations__WEBPACK_IMPORTED_MODULE_0__["AUTO_STYLE"]:
1372
                        normalizedValue = postStyles[prop];
1373
                        break;
1374
                    default:
1375
                        normalizedValue =
1376
                            normalizer.normalizeStyleValue(prop, normalizedProp, normalizedValue, errors);
1377
                        break;
1378
                }
1379
            }
1380
            normalizedKeyframe[normalizedProp] = normalizedValue;
1381
        });
1382
        if (!isSameOffset) {
1383
            normalizedKeyframes.push(normalizedKeyframe);
1384
        }
1385
        previousKeyframe = normalizedKeyframe;
1386
        previousOffset = offset;
1387
    });
1388
    if (errors.length) {
1389
        var LINE_START = '\n - ';
1390
        throw new Error("Unable to animate due to the following errors:" + LINE_START + errors.join(LINE_START));
1391
    }
1392
    return normalizedKeyframes;
1393
}
1394
function listenOnPlayer(player, eventName, event, callback) {
1395
    switch (eventName) {
1396
        case 'start':
1397
            player.onStart(function () { return callback(event && copyAnimationEvent(event, 'start', player)); });
1398
            break;
1399
        case 'done':
1400
            player.onDone(function () { return callback(event && copyAnimationEvent(event, 'done', player)); });
1401
            break;
1402
        case 'destroy':
1403
            player.onDestroy(function () { return callback(event && copyAnimationEvent(event, 'destroy', player)); });
1404
            break;
1405
    }
1406
}
1407
function copyAnimationEvent(e, phaseName, player) {
1408
    var totalTime = player.totalTime;
1409
    var disabled = player.disabled ? true : false;
1410
    var event = makeAnimationEvent(e.element, e.triggerName, e.fromState, e.toState, phaseName || e.phaseName, totalTime == undefined ? e.totalTime : totalTime, disabled);
1411
    var data = e['_data'];
1412
    if (data != null) {
1413
        event['_data'] = data;
1414
    }
1415
    return event;
1416
}
1417
function makeAnimationEvent(element, triggerName, fromState, toState, phaseName, totalTime, disabled) {
1418
    if (phaseName === void 0) { phaseName = ''; }
1419
    if (totalTime === void 0) { totalTime = 0; }
1420
    return { element: element, triggerName: triggerName, fromState: fromState, toState: toState, phaseName: phaseName, totalTime: totalTime, disabled: !!disabled };
1421
}
1422
function getOrSetAsInMap(map, key, defaultValue) {
1423
    var value;
1424
    if (map instanceof Map) {
1425
        value = map.get(key);
1426
        if (!value) {
1427
            map.set(key, value = defaultValue);
1428
        }
1429
    }
1430
    else {
1431
        value = map[key];
1432
        if (!value) {
1433
            value = map[key] = defaultValue;
1434
        }
1435
    }
1436
    return value;
1437
}
1438
function parseTimelineCommand(command) {
1439
    var separatorPos = command.indexOf(':');
1440
    var id = command.substring(1, separatorPos);
1441
    var action = command.substr(separatorPos + 1);
1442
    return [id, action];
1443
}
1444
var _contains = function (elm1, elm2) { return false; };
1445
var _matches = function (element, selector) {
1446
    return false;
1447
};
1448
var _query = function (element, selector, multi) {
1449
    return [];
1450
};
1451
if (typeof Element != 'undefined') {
1452
    // this is well supported in all browsers
1453
    _contains = function (elm1, elm2) { return elm1.contains(elm2); };
1454
    if (Element.prototype.matches) {
1455
        _matches = function (element, selector) { return element.matches(selector); };
1456
    }
1457
    else {
1458
        var proto = Element.prototype;
1459
        var fn_1 = proto.matchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector ||
1460
            proto.oMatchesSelector || proto.webkitMatchesSelector;
1461
        if (fn_1) {
1462
            _matches = function (element, selector) { return fn_1.apply(element, [selector]); };
1463
        }
1464
    }
1465
    _query = function (element, selector, multi) {
1466
        var results = [];
1467
        if (multi) {
1468
            results.push.apply(results, Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__spread"])(element.querySelectorAll(selector)));
1469
        }
1470
        else {
1471
            var elm = element.querySelector(selector);
1472
            if (elm) {
1473
                results.push(elm);
1474
            }
1475
        }
1476
        return results;
1477
    };
1478
}
1479
function containsVendorPrefix(prop) {
1480
    // Webkit is the only real popular vendor prefix nowadays
1481
    // cc: http://shouldiprefix.com/
1482
    return prop.substring(1, 6) == 'ebkit'; // webkit or Webkit
1483
}
1484
var _CACHED_BODY = null;
1485
var _IS_WEBKIT = false;
1486
function validateStyleProperty(prop) {
1487
    if (!_CACHED_BODY) {
1488
        _CACHED_BODY = getBodyNode() || {};
1489
        _IS_WEBKIT = _CACHED_BODY.style ? ('WebkitAppearance' in _CACHED_BODY.style) : false;
1490
    }
1491
    var result = true;
1492
    if (_CACHED_BODY.style && !containsVendorPrefix(prop)) {
1493
        result = prop in _CACHED_BODY.style;
1494
        if (!result && _IS_WEBKIT) {
1495
            var camelProp = 'Webkit' + prop.charAt(0).toUpperCase() + prop.substr(1);
1496
            result = camelProp in _CACHED_BODY.style;
1497
        }
1498
    }
1499
    return result;
1500
}
1501
function getBodyNode() {
1502
    if (typeof document != 'undefined') {
1503
        return document.body;
1504
    }
1505
    return null;
1506
}
1507
var matchesElement = _matches;
1508
var containsElement = _contains;
1509
var invokeQuery = _query;
1510
function hypenatePropsObject(object) {
1511
    var newObj = {};
1512
    Object.keys(object).forEach(function (prop) {
1513
        var newProp = prop.replace(/([a-z])([A-Z])/g, '$1-$2');
1514
        newObj[newProp] = object[prop];
1515
    });
1516
    return newObj;
1517
}
1518
 
1519
/**
1520
 * @experimental
1521
 */
1522
var NoopAnimationDriver = /** @class */ (function () {
1523
    function NoopAnimationDriver() {
1524
    }
1525
    NoopAnimationDriver.prototype.validateStyleProperty = function (prop) { return validateStyleProperty(prop); };
1526
    NoopAnimationDriver.prototype.matchesElement = function (element, selector) {
1527
        return matchesElement(element, selector);
1528
    };
1529
    NoopAnimationDriver.prototype.containsElement = function (elm1, elm2) { return containsElement(elm1, elm2); };
1530
    NoopAnimationDriver.prototype.query = function (element, selector, multi) {
1531
        return invokeQuery(element, selector, multi);
1532
    };
1533
    NoopAnimationDriver.prototype.computeStyle = function (element, prop, defaultValue) {
1534
        return defaultValue || '';
1535
    };
1536
    NoopAnimationDriver.prototype.animate = function (element, keyframes, duration, delay, easing, previousPlayers, scrubberAccessRequested) {
1537
        if (previousPlayers === void 0) { previousPlayers = []; }
1538
        return new _angular_animations__WEBPACK_IMPORTED_MODULE_0__["NoopAnimationPlayer"](duration, delay);
1539
    };
1540
    NoopAnimationDriver.decorators = [
1541
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }
1542
    ];
1543
    /** @nocollapse */
1544
    NoopAnimationDriver.ctorParameters = function () { return []; };
1545
    return NoopAnimationDriver;
1546
}());
1547
/**
1548
 * @experimental
1549
 */
1550
var AnimationDriver = /** @class */ (function () {
1551
    function AnimationDriver() {
1552
    }
1553
    AnimationDriver.NOOP = new NoopAnimationDriver();
1554
    return AnimationDriver;
1555
}());
1556
 
1557
var ONE_SECOND = 1000;
1558
var SUBSTITUTION_EXPR_START = '{{';
1559
var SUBSTITUTION_EXPR_END = '}}';
1560
var ENTER_CLASSNAME = 'ng-enter';
1561
var LEAVE_CLASSNAME = 'ng-leave';
1562
 
1563
 
1564
var NG_TRIGGER_CLASSNAME = 'ng-trigger';
1565
var NG_TRIGGER_SELECTOR = '.ng-trigger';
1566
var NG_ANIMATING_CLASSNAME = 'ng-animating';
1567
var NG_ANIMATING_SELECTOR = '.ng-animating';
1568
function resolveTimingValue(value) {
1569
    if (typeof value == 'number')
1570
        return value;
1571
    var matches = value.match(/^(-?[\.\d]+)(m?s)/);
1572
    if (!matches || matches.length < 2)
1573
        return 0;
1574
    return _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);
1575
}
1576
function _convertTimeValueToMS(value, unit) {
1577
    switch (unit) {
1578
        case 's':
1579
            return value * ONE_SECOND;
1580
        default:
1581
            // ms or something else
1582
            return value;
1583
    }
1584
}
1585
function resolveTiming(timings, errors, allowNegativeValues) {
1586
    return timings.hasOwnProperty('duration') ?
1587
        timings :
1588
        parseTimeExpression(timings, errors, allowNegativeValues);
1589
}
1590
function parseTimeExpression(exp, errors, allowNegativeValues) {
1591
    var regex = /^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;
1592
    var duration;
1593
    var delay = 0;
1594
    var easing = '';
1595
    if (typeof exp === 'string') {
1596
        var matches = exp.match(regex);
1597
        if (matches === null) {
1598
            errors.push("The provided timing value \"" + exp + "\" is invalid.");
1599
            return { duration: 0, delay: 0, easing: '' };
1600
        }
1601
        duration = _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);
1602
        var delayMatch = matches[3];
1603
        if (delayMatch != null) {
1604
            delay = _convertTimeValueToMS(Math.floor(parseFloat(delayMatch)), matches[4]);
1605
        }
1606
        var easingVal = matches[5];
1607
        if (easingVal) {
1608
            easing = easingVal;
1609
        }
1610
    }
1611
    else {
1612
        duration = exp;
1613
    }
1614
    if (!allowNegativeValues) {
1615
        var containsErrors = false;
1616
        var startIndex = errors.length;
1617
        if (duration < 0) {
1618
            errors.push("Duration values below 0 are not allowed for this animation step.");
1619
            containsErrors = true;
1620
        }
1621
        if (delay < 0) {
1622
            errors.push("Delay values below 0 are not allowed for this animation step.");
1623
            containsErrors = true;
1624
        }
1625
        if (containsErrors) {
1626
            errors.splice(startIndex, 0, "The provided timing value \"" + exp + "\" is invalid.");
1627
        }
1628
    }
1629
    return { duration: duration, delay: delay, easing: easing };
1630
}
1631
function copyObj(obj, destination) {
1632
    if (destination === void 0) { destination = {}; }
1633
    Object.keys(obj).forEach(function (prop) { destination[prop] = obj[prop]; });
1634
    return destination;
1635
}
1636
function normalizeStyles(styles) {
1637
    var normalizedStyles = {};
1638
    if (Array.isArray(styles)) {
1639
        styles.forEach(function (data) { return copyStyles(data, false, normalizedStyles); });
1640
    }
1641
    else {
1642
        copyStyles(styles, false, normalizedStyles);
1643
    }
1644
    return normalizedStyles;
1645
}
1646
function copyStyles(styles, readPrototype, destination) {
1647
    if (destination === void 0) { destination = {}; }
1648
    if (readPrototype) {
1649
        // we make use of a for-in loop so that the
1650
        // prototypically inherited properties are
1651
        // revealed from the backFill map
1652
        for (var prop in styles) {
1653
            destination[prop] = styles[prop];
1654
        }
1655
    }
1656
    else {
1657
        copyObj(styles, destination);
1658
    }
1659
    return destination;
1660
}
1661
function setStyles(element, styles) {
1662
    if (element['style']) {
1663
        Object.keys(styles).forEach(function (prop) {
1664
            var camelProp = dashCaseToCamelCase(prop);
1665
            element.style[camelProp] = styles[prop];
1666
        });
1667
    }
1668
}
1669
function eraseStyles(element, styles) {
1670
    if (element['style']) {
1671
        Object.keys(styles).forEach(function (prop) {
1672
            var camelProp = dashCaseToCamelCase(prop);
1673
            element.style[camelProp] = '';
1674
        });
1675
    }
1676
}
1677
function normalizeAnimationEntry(steps) {
1678
    if (Array.isArray(steps)) {
1679
        if (steps.length == 1)
1680
            return steps[0];
1681
        return Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["sequence"])(steps);
1682
    }
1683
    return steps;
1684
}
1685
function validateStyleParams(value, options, errors) {
1686
    var params = options.params || {};
1687
    var matches = extractStyleParams(value);
1688
    if (matches.length) {
1689
        matches.forEach(function (varName) {
1690
            if (!params.hasOwnProperty(varName)) {
1691
                errors.push("Unable to resolve the local animation param " + varName + " in the given list of values");
1692
            }
1693
        });
1694
    }
1695
}
1696
var PARAM_REGEX = new RegExp(SUBSTITUTION_EXPR_START + "\\s*(.+?)\\s*" + SUBSTITUTION_EXPR_END, 'g');
1697
function extractStyleParams(value) {
1698
    var params = [];
1699
    if (typeof value === 'string') {
1700
        var val = value.toString();
1701
        var match = void 0;
1702
        while (match = PARAM_REGEX.exec(val)) {
1703
            params.push(match[1]);
1704
        }
1705
        PARAM_REGEX.lastIndex = 0;
1706
    }
1707
    return params;
1708
}
1709
function interpolateParams(value, params, errors) {
1710
    var original = value.toString();
1711
    var str = original.replace(PARAM_REGEX, function (_, varName) {
1712
        var localVal = params[varName];
1713
        // this means that the value was never overridden by the data passed in by the user
1714
        if (!params.hasOwnProperty(varName)) {
1715
            errors.push("Please provide a value for the animation param " + varName);
1716
            localVal = '';
1717
        }
1718
        return localVal.toString();
1719
    });
1720
    // we do this to assert that numeric values stay as they are
1721
    return str == original ? value : str;
1722
}
1723
function iteratorToArray(iterator) {
1724
    var arr = [];
1725
    var item = iterator.next();
1726
    while (!item.done) {
1727
        arr.push(item.value);
1728
        item = iterator.next();
1729
    }
1730
    return arr;
1731
}
1732
 
1733
var DASH_CASE_REGEXP = /-+([a-z0-9])/g;
1734
function dashCaseToCamelCase(input) {
1735
    return input.replace(DASH_CASE_REGEXP, function () {
1736
        var m = [];
1737
        for (var _i = 0; _i < arguments.length; _i++) {
1738
            m[_i] = arguments[_i];
1739
        }
1740
        return m[1].toUpperCase();
1741
    });
1742
}
1743
function allowPreviousPlayerStylesMerge(duration, delay) {
1744
    return duration === 0 || delay === 0;
1745
}
1746
function balancePreviousStylesIntoKeyframes(element, keyframes, previousStyles) {
1747
    var previousStyleProps = Object.keys(previousStyles);
1748
    if (previousStyleProps.length && keyframes.length) {
1749
        var startingKeyframe_1 = keyframes[0];
1750
        var missingStyleProps_1 = [];
1751
        previousStyleProps.forEach(function (prop) {
1752
            if (!startingKeyframe_1.hasOwnProperty(prop)) {
1753
                missingStyleProps_1.push(prop);
1754
            }
1755
            startingKeyframe_1[prop] = previousStyles[prop];
1756
        });
1757
        if (missingStyleProps_1.length) {
1758
            var _loop_1 = function () {
1759
                var kf = keyframes[i];
1760
                missingStyleProps_1.forEach(function (prop) { kf[prop] = computeStyle(element, prop); });
1761
            };
1762
            // tslint:disable-next-line
1763
            for (var i = 1; i < keyframes.length; i++) {
1764
                _loop_1();
1765
            }
1766
        }
1767
    }
1768
    return keyframes;
1769
}
1770
function visitDslNode(visitor, node, context) {
1771
    switch (node.type) {
1772
        case 7 /* Trigger */:
1773
            return visitor.visitTrigger(node, context);
1774
        case 0 /* State */:
1775
            return visitor.visitState(node, context);
1776
        case 1 /* Transition */:
1777
            return visitor.visitTransition(node, context);
1778
        case 2 /* Sequence */:
1779
            return visitor.visitSequence(node, context);
1780
        case 3 /* Group */:
1781
            return visitor.visitGroup(node, context);
1782
        case 4 /* Animate */:
1783
            return visitor.visitAnimate(node, context);
1784
        case 5 /* Keyframes */:
1785
            return visitor.visitKeyframes(node, context);
1786
        case 6 /* Style */:
1787
            return visitor.visitStyle(node, context);
1788
        case 8 /* Reference */:
1789
            return visitor.visitReference(node, context);
1790
        case 9 /* AnimateChild */:
1791
            return visitor.visitAnimateChild(node, context);
1792
        case 10 /* AnimateRef */:
1793
            return visitor.visitAnimateRef(node, context);
1794
        case 11 /* Query */:
1795
            return visitor.visitQuery(node, context);
1796
        case 12 /* Stagger */:
1797
            return visitor.visitStagger(node, context);
1798
        default:
1799
            throw new Error("Unable to resolve animation metadata node #" + node.type);
1800
    }
1801
}
1802
function computeStyle(element, prop) {
1803
    return window.getComputedStyle(element)[prop];
1804
}
1805
 
1806
/**
1807
 * @license
1808
 * Copyright Google Inc. All Rights Reserved.
1809
 *
1810
 * Use of this source code is governed by an MIT-style license that can be
1811
 * found in the LICENSE file at https://angular.io/license
1812
 */
1813
var ANY_STATE = '*';
1814
function parseTransitionExpr(transitionValue, errors) {
1815
    var expressions = [];
1816
    if (typeof transitionValue == 'string') {
1817
        transitionValue
1818
            .split(/\s*,\s*/)
1819
            .forEach(function (str) { return parseInnerTransitionStr(str, expressions, errors); });
1820
    }
1821
    else {
1822
        expressions.push(transitionValue);
1823
    }
1824
    return expressions;
1825
}
1826
function parseInnerTransitionStr(eventStr, expressions, errors) {
1827
    if (eventStr[0] == ':') {
1828
        var result = parseAnimationAlias(eventStr, errors);
1829
        if (typeof result == 'function') {
1830
            expressions.push(result);
1831
            return;
1832
        }
1833
        eventStr = result;
1834
    }
1835
    var match = eventStr.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);
1836
    if (match == null || match.length < 4) {
1837
        errors.push("The provided transition expression \"" + eventStr + "\" is not supported");
1838
        return expressions;
1839
    }
1840
    var fromState = match[1];
1841
    var separator = match[2];
1842
    var toState = match[3];
1843
    expressions.push(makeLambdaFromStates(fromState, toState));
1844
    var isFullAnyStateExpr = fromState == ANY_STATE && toState == ANY_STATE;
1845
    if (separator[0] == '<' && !isFullAnyStateExpr) {
1846
        expressions.push(makeLambdaFromStates(toState, fromState));
1847
    }
1848
}
1849
function parseAnimationAlias(alias, errors) {
1850
    switch (alias) {
1851
        case ':enter':
1852
            return 'void => *';
1853
        case ':leave':
1854
            return '* => void';
1855
        case ':increment':
1856
            return function (fromState, toState) { return parseFloat(toState) > parseFloat(fromState); };
1857
        case ':decrement':
1858
            return function (fromState, toState) { return parseFloat(toState) < parseFloat(fromState); };
1859
        default:
1860
            errors.push("The transition alias value \"" + alias + "\" is not supported");
1861
            return '* => *';
1862
    }
1863
}
1864
// DO NOT REFACTOR ... keep the follow set instantiations
1865
// with the values intact (closure compiler for some reason
1866
// removes follow-up lines that add the values outside of
1867
// the constructor...
1868
var TRUE_BOOLEAN_VALUES = new Set(['true', '1']);
1869
var FALSE_BOOLEAN_VALUES = new Set(['false', '0']);
1870
function makeLambdaFromStates(lhs, rhs) {
1871
    var LHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(lhs) || FALSE_BOOLEAN_VALUES.has(lhs);
1872
    var RHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(rhs) || FALSE_BOOLEAN_VALUES.has(rhs);
1873
    return function (fromState, toState) {
1874
        var lhsMatch = lhs == ANY_STATE || lhs == fromState;
1875
        var rhsMatch = rhs == ANY_STATE || rhs == toState;
1876
        if (!lhsMatch && LHS_MATCH_BOOLEAN && typeof fromState === 'boolean') {
1877
            lhsMatch = fromState ? TRUE_BOOLEAN_VALUES.has(lhs) : FALSE_BOOLEAN_VALUES.has(lhs);
1878
        }
1879
        if (!rhsMatch && RHS_MATCH_BOOLEAN && typeof toState === 'boolean') {
1880
            rhsMatch = toState ? TRUE_BOOLEAN_VALUES.has(rhs) : FALSE_BOOLEAN_VALUES.has(rhs);
1881
        }
1882
        return lhsMatch && rhsMatch;
1883
    };
1884
}
1885
 
1886
var SELF_TOKEN = ':self';
1887
var SELF_TOKEN_REGEX = new RegExp("s*" + SELF_TOKEN + "s*,?", 'g');
1888
/*
1889
 * [Validation]
1890
 * The visitor code below will traverse the animation AST generated by the animation verb functions
1891
 * (the output is a tree of objects) and attempt to perform a series of validations on the data. The
1892
 * following corner-cases will be validated:
1893
 *
1894
 * 1. Overlap of animations
1895
 * Given that a CSS property cannot be animated in more than one place at the same time, it's
1896
 * important that this behaviour is detected and validated. The way in which this occurs is that
1897
 * each time a style property is examined, a string-map containing the property will be updated with
1898
 * the start and end times for when the property is used within an animation step.
1899
 *
1900
 * If there are two or more parallel animations that are currently running (these are invoked by the
1901
 * group()) on the same element then the validator will throw an error. Since the start/end timing
1902
 * values are collected for each property then if the current animation step is animating the same
1903
 * property and its timing values fall anywhere into the window of time that the property is
1904
 * currently being animated within then this is what causes an error.
1905
 *
1906
 * 2. Timing values
1907
 * The validator will validate to see if a timing value of `duration delay easing` or
1908
 * `durationNumber` is valid or not.
1909
 *
1910
 * (note that upon validation the code below will replace the timing data with an object containing
1911
 * {duration,delay,easing}.
1912
 *
1913
 * 3. Offset Validation
1914
 * Each of the style() calls are allowed to have an offset value when placed inside of keyframes().
1915
 * Offsets within keyframes() are considered valid when:
1916
 *
1917
 *   - No offsets are used at all
1918
 *   - Each style() entry contains an offset value
1919
 *   - Each offset is between 0 and 1
1920
 *   - Each offset is greater to or equal than the previous one
1921
 *
1922
 * Otherwise an error will be thrown.
1923
 */
1924
function buildAnimationAst(driver, metadata, errors) {
1925
    return new AnimationAstBuilderVisitor(driver).build(metadata, errors);
1926
}
1927
var ROOT_SELECTOR = '';
1928
var AnimationAstBuilderVisitor = /** @class */ (function () {
1929
    function AnimationAstBuilderVisitor(_driver) {
1930
        this._driver = _driver;
1931
    }
1932
    AnimationAstBuilderVisitor.prototype.build = function (metadata, errors) {
1933
        var context = new AnimationAstBuilderContext(errors);
1934
        this._resetContextStyleTimingState(context);
1935
        return visitDslNode(this, normalizeAnimationEntry(metadata), context);
1936
    };
1937
    AnimationAstBuilderVisitor.prototype._resetContextStyleTimingState = function (context) {
1938
        context.currentQuerySelector = ROOT_SELECTOR;
1939
        context.collectedStyles = {};
1940
        context.collectedStyles[ROOT_SELECTOR] = {};
1941
        context.currentTime = 0;
1942
    };
1943
    AnimationAstBuilderVisitor.prototype.visitTrigger = function (metadata, context) {
1944
        var _this = this;
1945
        var queryCount = context.queryCount = 0;
1946
        var depCount = context.depCount = 0;
1947
        var states = [];
1948
        var transitions = [];
1949
        if (metadata.name.charAt(0) == '@') {
1950
            context.errors.push('animation triggers cannot be prefixed with an `@` sign (e.g. trigger(\'@foo\', [...]))');
1951
        }
1952
        metadata.definitions.forEach(function (def) {
1953
            _this._resetContextStyleTimingState(context);
1954
            if (def.type == 0 /* State */) {
1955
                var stateDef_1 = def;
1956
                var name_1 = stateDef_1.name;
1957
                name_1.toString().split(/\s*,\s*/).forEach(function (n) {
1958
                    stateDef_1.name = n;
1959
                    states.push(_this.visitState(stateDef_1, context));
1960
                });
1961
                stateDef_1.name = name_1;
1962
            }
1963
            else if (def.type == 1 /* Transition */) {
1964
                var transition = _this.visitTransition(def, context);
1965
                queryCount += transition.queryCount;
1966
                depCount += transition.depCount;
1967
                transitions.push(transition);
1968
            }
1969
            else {
1970
                context.errors.push('only state() and transition() definitions can sit inside of a trigger()');
1971
            }
1972
        });
1973
        return {
1974
            type: 7 /* Trigger */,
1975
            name: metadata.name, states: states, transitions: transitions, queryCount: queryCount, depCount: depCount,
1976
            options: null
1977
        };
1978
    };
1979
    AnimationAstBuilderVisitor.prototype.visitState = function (metadata, context) {
1980
        var styleAst = this.visitStyle(metadata.styles, context);
1981
        var astParams = (metadata.options && metadata.options.params) || null;
1982
        if (styleAst.containsDynamicStyles) {
1983
            var missingSubs_1 = new Set();
1984
            var params_1 = astParams || {};
1985
            styleAst.styles.forEach(function (value) {
1986
                if (isObject(value)) {
1987
                    var stylesObj_1 = value;
1988
                    Object.keys(stylesObj_1).forEach(function (prop) {
1989
                        extractStyleParams(stylesObj_1[prop]).forEach(function (sub) {
1990
                            if (!params_1.hasOwnProperty(sub)) {
1991
                                missingSubs_1.add(sub);
1992
                            }
1993
                        });
1994
                    });
1995
                }
1996
            });
1997
            if (missingSubs_1.size) {
1998
                var missingSubsArr = iteratorToArray(missingSubs_1.values());
1999
                context.errors.push("state(\"" + metadata.name + "\", ...) must define default values for all the following style substitutions: " + missingSubsArr.join(', '));
2000
            }
2001
        }
2002
        return {
2003
            type: 0 /* State */,
2004
            name: metadata.name,
2005
            style: styleAst,
2006
            options: astParams ? { params: astParams } : null
2007
        };
2008
    };
2009
    AnimationAstBuilderVisitor.prototype.visitTransition = function (metadata, context) {
2010
        context.queryCount = 0;
2011
        context.depCount = 0;
2012
        var animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);
2013
        var matchers = parseTransitionExpr(metadata.expr, context.errors);
2014
        return {
2015
            type: 1 /* Transition */,
2016
            matchers: matchers,
2017
            animation: animation,
2018
            queryCount: context.queryCount,
2019
            depCount: context.depCount,
2020
            options: normalizeAnimationOptions(metadata.options)
2021
        };
2022
    };
2023
    AnimationAstBuilderVisitor.prototype.visitSequence = function (metadata, context) {
2024
        var _this = this;
2025
        return {
2026
            type: 2 /* Sequence */,
2027
            steps: metadata.steps.map(function (s) { return visitDslNode(_this, s, context); }),
2028
            options: normalizeAnimationOptions(metadata.options)
2029
        };
2030
    };
2031
    AnimationAstBuilderVisitor.prototype.visitGroup = function (metadata, context) {
2032
        var _this = this;
2033
        var currentTime = context.currentTime;
2034
        var furthestTime = 0;
2035
        var steps = metadata.steps.map(function (step) {
2036
            context.currentTime = currentTime;
2037
            var innerAst = visitDslNode(_this, step, context);
2038
            furthestTime = Math.max(furthestTime, context.currentTime);
2039
            return innerAst;
2040
        });
2041
        context.currentTime = furthestTime;
2042
        return {
2043
            type: 3 /* Group */,
2044
            steps: steps,
2045
            options: normalizeAnimationOptions(metadata.options)
2046
        };
2047
    };
2048
    AnimationAstBuilderVisitor.prototype.visitAnimate = function (metadata, context) {
2049
        var timingAst = constructTimingAst(metadata.timings, context.errors);
2050
        context.currentAnimateTimings = timingAst;
2051
        var styleAst;
2052
        var styleMetadata = metadata.styles ? metadata.styles : Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({});
2053
        if (styleMetadata.type == 5 /* Keyframes */) {
2054
            styleAst = this.visitKeyframes(styleMetadata, context);
2055
        }
2056
        else {
2057
            var styleMetadata_1 = metadata.styles;
2058
            var isEmpty = false;
2059
            if (!styleMetadata_1) {
2060
                isEmpty = true;
2061
                var newStyleData = {};
2062
                if (timingAst.easing) {
2063
                    newStyleData['easing'] = timingAst.easing;
2064
                }
2065
                styleMetadata_1 = Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])(newStyleData);
2066
            }
2067
            context.currentTime += timingAst.duration + timingAst.delay;
2068
            var _styleAst = this.visitStyle(styleMetadata_1, context);
2069
            _styleAst.isEmptyStep = isEmpty;
2070
            styleAst = _styleAst;
2071
        }
2072
        context.currentAnimateTimings = null;
2073
        return {
2074
            type: 4 /* Animate */,
2075
            timings: timingAst,
2076
            style: styleAst,
2077
            options: null
2078
        };
2079
    };
2080
    AnimationAstBuilderVisitor.prototype.visitStyle = function (metadata, context) {
2081
        var ast = this._makeStyleAst(metadata, context);
2082
        this._validateStyleAst(ast, context);
2083
        return ast;
2084
    };
2085
    AnimationAstBuilderVisitor.prototype._makeStyleAst = function (metadata, context) {
2086
        var styles = [];
2087
        if (Array.isArray(metadata.styles)) {
2088
            metadata.styles.forEach(function (styleTuple) {
2089
                if (typeof styleTuple == 'string') {
2090
                    if (styleTuple == _angular_animations__WEBPACK_IMPORTED_MODULE_0__["AUTO_STYLE"]) {
2091
                        styles.push(styleTuple);
2092
                    }
2093
                    else {
2094
                        context.errors.push("The provided style string value " + styleTuple + " is not allowed.");
2095
                    }
2096
                }
2097
                else {
2098
                    styles.push(styleTuple);
2099
                }
2100
            });
2101
        }
2102
        else {
2103
            styles.push(metadata.styles);
2104
        }
2105
        var containsDynamicStyles = false;
2106
        var collectedEasing = null;
2107
        styles.forEach(function (styleData) {
2108
            if (isObject(styleData)) {
2109
                var styleMap = styleData;
2110
                var easing = styleMap['easing'];
2111
                if (easing) {
2112
                    collectedEasing = easing;
2113
                    delete styleMap['easing'];
2114
                }
2115
                if (!containsDynamicStyles) {
2116
                    for (var prop in styleMap) {
2117
                        var value = styleMap[prop];
2118
                        if (value.toString().indexOf(SUBSTITUTION_EXPR_START) >= 0) {
2119
                            containsDynamicStyles = true;
2120
                            break;
2121
                        }
2122
                    }
2123
                }
2124
            }
2125
        });
2126
        return {
2127
            type: 6 /* Style */,
2128
            styles: styles,
2129
            easing: collectedEasing,
2130
            offset: metadata.offset, containsDynamicStyles: containsDynamicStyles,
2131
            options: null
2132
        };
2133
    };
2134
    AnimationAstBuilderVisitor.prototype._validateStyleAst = function (ast, context) {
2135
        var _this = this;
2136
        var timings = context.currentAnimateTimings;
2137
        var endTime = context.currentTime;
2138
        var startTime = context.currentTime;
2139
        if (timings && startTime > 0) {
2140
            startTime -= timings.duration + timings.delay;
2141
        }
2142
        ast.styles.forEach(function (tuple) {
2143
            if (typeof tuple == 'string')
2144
                return;
2145
            Object.keys(tuple).forEach(function (prop) {
2146
                if (!_this._driver.validateStyleProperty(prop)) {
2147
                    context.errors.push("The provided animation property \"" + prop + "\" is not a supported CSS property for animations");
2148
                    return;
2149
                }
2150
                var collectedStyles = context.collectedStyles[context.currentQuerySelector];
2151
                var collectedEntry = collectedStyles[prop];
2152
                var updateCollectedStyle = true;
2153
                if (collectedEntry) {
2154
                    if (startTime != endTime && startTime >= collectedEntry.startTime &&
2155
                        endTime <= collectedEntry.endTime) {
2156
                        context.errors.push("The CSS property \"" + prop + "\" that exists between the times of \"" + collectedEntry.startTime + "ms\" and \"" + collectedEntry.endTime + "ms\" is also being animated in a parallel animation between the times of \"" + startTime + "ms\" and \"" + endTime + "ms\"");
2157
                        updateCollectedStyle = false;
2158
                    }
2159
                    // we always choose the smaller start time value since we
2160
                    // want to have a record of the entire animation window where
2161
                    // the style property is being animated in between
2162
                    startTime = collectedEntry.startTime;
2163
                }
2164
                if (updateCollectedStyle) {
2165
                    collectedStyles[prop] = { startTime: startTime, endTime: endTime };
2166
                }
2167
                if (context.options) {
2168
                    validateStyleParams(tuple[prop], context.options, context.errors);
2169
                }
2170
            });
2171
        });
2172
    };
2173
    AnimationAstBuilderVisitor.prototype.visitKeyframes = function (metadata, context) {
2174
        var _this = this;
2175
        var ast = { type: 5 /* Keyframes */, styles: [], options: null };
2176
        if (!context.currentAnimateTimings) {
2177
            context.errors.push("keyframes() must be placed inside of a call to animate()");
2178
            return ast;
2179
        }
2180
        var MAX_KEYFRAME_OFFSET = 1;
2181
        var totalKeyframesWithOffsets = 0;
2182
        var offsets = [];
2183
        var offsetsOutOfOrder = false;
2184
        var keyframesOutOfRange = false;
2185
        var previousOffset = 0;
2186
        var keyframes = metadata.steps.map(function (styles) {
2187
            var style$$1 = _this._makeStyleAst(styles, context);
2188
            var offsetVal = style$$1.offset != null ? style$$1.offset : consumeOffset(style$$1.styles);
2189
            var offset = 0;
2190
            if (offsetVal != null) {
2191
                totalKeyframesWithOffsets++;
2192
                offset = style$$1.offset = offsetVal;
2193
            }
2194
            keyframesOutOfRange = keyframesOutOfRange || offset < 0 || offset > 1;
2195
            offsetsOutOfOrder = offsetsOutOfOrder || offset < previousOffset;
2196
            previousOffset = offset;
2197
            offsets.push(offset);
2198
            return style$$1;
2199
        });
2200
        if (keyframesOutOfRange) {
2201
            context.errors.push("Please ensure that all keyframe offsets are between 0 and 1");
2202
        }
2203
        if (offsetsOutOfOrder) {
2204
            context.errors.push("Please ensure that all keyframe offsets are in order");
2205
        }
2206
        var length = metadata.steps.length;
2207
        var generatedOffset = 0;
2208
        if (totalKeyframesWithOffsets > 0 && totalKeyframesWithOffsets < length) {
2209
            context.errors.push("Not all style() steps within the declared keyframes() contain offsets");
2210
        }
2211
        else if (totalKeyframesWithOffsets == 0) {
2212
            generatedOffset = MAX_KEYFRAME_OFFSET / (length - 1);
2213
        }
2214
        var limit = length - 1;
2215
        var currentTime = context.currentTime;
2216
        var currentAnimateTimings = (context.currentAnimateTimings);
2217
        var animateDuration = currentAnimateTimings.duration;
2218
        keyframes.forEach(function (kf, i) {
2219
            var offset = generatedOffset > 0 ? (i == limit ? 1 : (generatedOffset * i)) : offsets[i];
2220
            var durationUpToThisFrame = offset * animateDuration;
2221
            context.currentTime = currentTime + currentAnimateTimings.delay + durationUpToThisFrame;
2222
            currentAnimateTimings.duration = durationUpToThisFrame;
2223
            _this._validateStyleAst(kf, context);
2224
            kf.offset = offset;
2225
            ast.styles.push(kf);
2226
        });
2227
        return ast;
2228
    };
2229
    AnimationAstBuilderVisitor.prototype.visitReference = function (metadata, context) {
2230
        return {
2231
            type: 8 /* Reference */,
2232
            animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),
2233
            options: normalizeAnimationOptions(metadata.options)
2234
        };
2235
    };
2236
    AnimationAstBuilderVisitor.prototype.visitAnimateChild = function (metadata, context) {
2237
        context.depCount++;
2238
        return {
2239
            type: 9 /* AnimateChild */,
2240
            options: normalizeAnimationOptions(metadata.options)
2241
        };
2242
    };
2243
    AnimationAstBuilderVisitor.prototype.visitAnimateRef = function (metadata, context) {
2244
        return {
2245
            type: 10 /* AnimateRef */,
2246
            animation: this.visitReference(metadata.animation, context),
2247
            options: normalizeAnimationOptions(metadata.options)
2248
        };
2249
    };
2250
    AnimationAstBuilderVisitor.prototype.visitQuery = function (metadata, context) {
2251
        var parentSelector = (context.currentQuerySelector);
2252
        var options = (metadata.options || {});
2253
        context.queryCount++;
2254
        context.currentQuery = metadata;
2255
        var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__read"])(normalizeSelector(metadata.selector), 2), selector = _a[0], includeSelf = _a[1];
2256
        context.currentQuerySelector =
2257
            parentSelector.length ? (parentSelector + ' ' + selector) : selector;
2258
        getOrSetAsInMap(context.collectedStyles, context.currentQuerySelector, {});
2259
        var animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);
2260
        context.currentQuery = null;
2261
        context.currentQuerySelector = parentSelector;
2262
        return {
2263
            type: 11 /* Query */,
2264
            selector: selector,
2265
            limit: options.limit || 0,
2266
            optional: !!options.optional, includeSelf: includeSelf, animation: animation,
2267
            originalSelector: metadata.selector,
2268
            options: normalizeAnimationOptions(metadata.options)
2269
        };
2270
    };
2271
    AnimationAstBuilderVisitor.prototype.visitStagger = function (metadata, context) {
2272
        if (!context.currentQuery) {
2273
            context.errors.push("stagger() can only be used inside of query()");
2274
        }
2275
        var timings = metadata.timings === 'full' ?
2276
            { duration: 0, delay: 0, easing: 'full' } :
2277
            resolveTiming(metadata.timings, context.errors, true);
2278
        return {
2279
            type: 12 /* Stagger */,
2280
            animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context), timings: timings,
2281
            options: null
2282
        };
2283
    };
2284
    return AnimationAstBuilderVisitor;
2285
}());
2286
function normalizeSelector(selector) {
2287
    var hasAmpersand = selector.split(/\s*,\s*/).find(function (token) { return token == SELF_TOKEN; }) ? true : false;
2288
    if (hasAmpersand) {
2289
        selector = selector.replace(SELF_TOKEN_REGEX, '');
2290
    }
2291
    // the :enter and :leave selectors are filled in at runtime during timeline building
2292
    selector = selector.replace(/@\*/g, NG_TRIGGER_SELECTOR)
2293
        .replace(/@\w+/g, function (match) { return NG_TRIGGER_SELECTOR + '-' + match.substr(1); })
2294
        .replace(/:animating/g, NG_ANIMATING_SELECTOR);
2295
    return [selector, hasAmpersand];
2296
}
2297
function normalizeParams(obj) {
2298
    return obj ? copyObj(obj) : null;
2299
}
2300
var AnimationAstBuilderContext = /** @class */ (function () {
2301
    function AnimationAstBuilderContext(errors) {
2302
        this.errors = errors;
2303
        this.queryCount = 0;
2304
        this.depCount = 0;
2305
        this.currentTransition = null;
2306
        this.currentQuery = null;
2307
        this.currentQuerySelector = null;
2308
        this.currentAnimateTimings = null;
2309
        this.currentTime = 0;
2310
        this.collectedStyles = {};
2311
        this.options = null;
2312
    }
2313
    return AnimationAstBuilderContext;
2314
}());
2315
function consumeOffset(styles) {
2316
    if (typeof styles == 'string')
2317
        return null;
2318
    var offset = null;
2319
    if (Array.isArray(styles)) {
2320
        styles.forEach(function (styleTuple) {
2321
            if (isObject(styleTuple) && styleTuple.hasOwnProperty('offset')) {
2322
                var obj = styleTuple;
2323
                offset = parseFloat(obj['offset']);
2324
                delete obj['offset'];
2325
            }
2326
        });
2327
    }
2328
    else if (isObject(styles) && styles.hasOwnProperty('offset')) {
2329
        var obj = styles;
2330
        offset = parseFloat(obj['offset']);
2331
        delete obj['offset'];
2332
    }
2333
    return offset;
2334
}
2335
function isObject(value) {
2336
    return !Array.isArray(value) && typeof value == 'object';
2337
}
2338
function constructTimingAst(value, errors) {
2339
    var timings = null;
2340
    if (value.hasOwnProperty('duration')) {
2341
        timings = value;
2342
    }
2343
    else if (typeof value == 'number') {
2344
        var duration = resolveTiming(value, errors).duration;
2345
        return makeTimingAst(duration, 0, '');
2346
    }
2347
    var strValue = value;
2348
    var isDynamic = strValue.split(/\s+/).some(function (v) { return v.charAt(0) == '{' && v.charAt(1) == '{'; });
2349
    if (isDynamic) {
2350
        var ast = makeTimingAst(0, 0, '');
2351
        ast.dynamic = true;
2352
        ast.strValue = strValue;
2353
        return ast;
2354
    }
2355
    timings = timings || resolveTiming(strValue, errors);
2356
    return makeTimingAst(timings.duration, timings.delay, timings.easing);
2357
}
2358
function normalizeAnimationOptions(options) {
2359
    if (options) {
2360
        options = copyObj(options);
2361
        if (options['params']) {
2362
            options['params'] = (normalizeParams(options['params']));
2363
        }
2364
    }
2365
    else {
2366
        options = {};
2367
    }
2368
    return options;
2369
}
2370
function makeTimingAst(duration, delay, easing) {
2371
    return { duration: duration, delay: delay, easing: easing };
2372
}
2373
 
2374
function createTimelineInstruction(element, keyframes, preStyleProps, postStyleProps, duration, delay, easing, subTimeline) {
2375
    if (easing === void 0) { easing = null; }
2376
    if (subTimeline === void 0) { subTimeline = false; }
2377
    return {
2378
        type: 1 /* TimelineAnimation */,
2379
        element: element,
2380
        keyframes: keyframes,
2381
        preStyleProps: preStyleProps,
2382
        postStyleProps: postStyleProps,
2383
        duration: duration,
2384
        delay: delay,
2385
        totalTime: duration + delay, easing: easing, subTimeline: subTimeline
2386
    };
2387
}
2388
 
2389
var ElementInstructionMap = /** @class */ (function () {
2390
    function ElementInstructionMap() {
2391
        this._map = new Map();
2392
    }
2393
    ElementInstructionMap.prototype.consume = function (element) {
2394
        var instructions = this._map.get(element);
2395
        if (instructions) {
2396
            this._map.delete(element);
2397
        }
2398
        else {
2399
            instructions = [];
2400
        }
2401
        return instructions;
2402
    };
2403
    ElementInstructionMap.prototype.append = function (element, instructions) {
2404
        var existingInstructions = this._map.get(element);
2405
        if (!existingInstructions) {
2406
            this._map.set(element, existingInstructions = []);
2407
        }
2408
        existingInstructions.push.apply(existingInstructions, Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__spread"])(instructions));
2409
    };
2410
    ElementInstructionMap.prototype.has = function (element) { return this._map.has(element); };
2411
    ElementInstructionMap.prototype.clear = function () { this._map.clear(); };
2412
    return ElementInstructionMap;
2413
}());
2414
 
2415
var ONE_FRAME_IN_MILLISECONDS = 1;
2416
var ENTER_TOKEN = ':enter';
2417
var ENTER_TOKEN_REGEX = new RegExp(ENTER_TOKEN, 'g');
2418
var LEAVE_TOKEN = ':leave';
2419
var LEAVE_TOKEN_REGEX = new RegExp(LEAVE_TOKEN, 'g');
2420
/*
2421
 * The code within this file aims to generate web-animations-compatible keyframes from Angular's
2422
 * animation DSL code.
2423
 *
2424
 * The code below will be converted from:
2425
 *
2426
 * ```
2427
 * sequence([
2428
 *   style({ opacity: 0 }),
2429
 *   animate(1000, style({ opacity: 0 }))
2430
 * ])
2431
 * ```
2432
 *
2433
 * To:
2434
 * ```
2435
 * keyframes = [{ opacity: 0, offset: 0 }, { opacity: 1, offset: 1 }]
2436
 * duration = 1000
2437
 * delay = 0
2438
 * easing = ''
2439
 * ```
2440
 *
2441
 * For this operation to cover the combination of animation verbs (style, animate, group, etc...) a
2442
 * combination of prototypical inheritance, AST traversal and merge-sort-like algorithms are used.
2443
 *
2444
 * [AST Traversal]
2445
 * Each of the animation verbs, when executed, will return an string-map object representing what
2446
 * type of action it is (style, animate, group, etc...) and the data associated with it. This means
2447
 * that when functional composition mix of these functions is evaluated (like in the example above)
2448
 * then it will end up producing a tree of objects representing the animation itself.
2449
 *
2450
 * When this animation object tree is processed by the visitor code below it will visit each of the
2451
 * verb statements within the visitor. And during each visit it will build the context of the
2452
 * animation keyframes by interacting with the `TimelineBuilder`.
2453
 *
2454
 * [TimelineBuilder]
2455
 * This class is responsible for tracking the styles and building a series of keyframe objects for a
2456
 * timeline between a start and end time. The builder starts off with an initial timeline and each
2457
 * time the AST comes across a `group()`, `keyframes()` or a combination of the two wihtin a
2458
 * `sequence()` then it will generate a sub timeline for each step as well as a new one after
2459
 * they are complete.
2460
 *
2461
 * As the AST is traversed, the timing state on each of the timelines will be incremented. If a sub
2462
 * timeline was created (based on one of the cases above) then the parent timeline will attempt to
2463
 * merge the styles used within the sub timelines into itself (only with group() this will happen).
2464
 * This happens with a merge operation (much like how the merge works in mergesort) and it will only
2465
 * copy the most recently used styles from the sub timelines into the parent timeline. This ensures
2466
 * that if the styles are used later on in another phase of the animation then they will be the most
2467
 * up-to-date values.
2468
 *
2469
 * [How Missing Styles Are Updated]
2470
 * Each timeline has a `backFill` property which is responsible for filling in new styles into
2471
 * already processed keyframes if a new style shows up later within the animation sequence.
2472
 *
2473
 * ```
2474
 * sequence([
2475
 *   style({ width: 0 }),
2476
 *   animate(1000, style({ width: 100 })),
2477
 *   animate(1000, style({ width: 200 })),
2478
 *   animate(1000, style({ width: 300 }))
2479
 *   animate(1000, style({ width: 400, height: 400 })) // notice how `height` doesn't exist anywhere
2480
 * else
2481
 * ])
2482
 * ```
2483
 *
2484
 * What is happening here is that the `height` value is added later in the sequence, but is missing
2485
 * from all previous animation steps. Therefore when a keyframe is created it would also be missing
2486
 * from all previous keyframes up until where it is first used. For the timeline keyframe generation
2487
 * to properly fill in the style it will place the previous value (the value from the parent
2488
 * timeline) or a default value of `*` into the backFill object. Given that each of the keyframe
2489
 * styles are objects that prototypically inhert from the backFill object, this means that if a
2490
 * value is added into the backFill then it will automatically propagate any missing values to all
2491
 * keyframes. Therefore the missing `height` value will be properly filled into the already
2492
 * processed keyframes.
2493
 *
2494
 * When a sub-timeline is created it will have its own backFill property. This is done so that
2495
 * styles present within the sub-timeline do not accidentally seep into the previous/future timeline
2496
 * keyframes
2497
 *
2498
 * (For prototypically-inherited contents to be detected a `for(i in obj)` loop must be used.)
2499
 *
2500
 * [Validation]
2501
 * The code in this file is not responsible for validation. That functionality happens with within
2502
 * the `AnimationValidatorVisitor` code.
2503
 */
2504
function buildAnimationTimelines(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors) {
2505
    if (startingStyles === void 0) { startingStyles = {}; }
2506
    if (finalStyles === void 0) { finalStyles = {}; }
2507
    if (errors === void 0) { errors = []; }
2508
    return new AnimationTimelineBuilderVisitor().buildKeyframes(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors);
2509
}
2510
var AnimationTimelineBuilderVisitor = /** @class */ (function () {
2511
    function AnimationTimelineBuilderVisitor() {
2512
    }
2513
    AnimationTimelineBuilderVisitor.prototype.buildKeyframes = function (driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors) {
2514
        if (errors === void 0) { errors = []; }
2515
        subInstructions = subInstructions || new ElementInstructionMap();
2516
        var context = new AnimationTimelineContext(driver, rootElement, subInstructions, enterClassName, leaveClassName, errors, []);
2517
        context.options = options;
2518
        context.currentTimeline.setStyles([startingStyles], null, context.errors, options);
2519
        visitDslNode(this, ast, context);
2520
        // this checks to see if an actual animation happened
2521
        var timelines = context.timelines.filter(function (timeline) { return timeline.containsAnimation(); });
2522
        if (timelines.length && Object.keys(finalStyles).length) {
2523
            var tl = timelines[timelines.length - 1];
2524
            if (!tl.allowOnlyTimelineStyles()) {
2525
                tl.setStyles([finalStyles], null, context.errors, options);
2526
            }
2527
        }
2528
        return timelines.length ? timelines.map(function (timeline) { return timeline.buildKeyframes(); }) :
2529
            [createTimelineInstruction(rootElement, [], [], [], 0, 0, '', false)];
2530
    };
2531
    AnimationTimelineBuilderVisitor.prototype.visitTrigger = function (ast, context) {
2532
        // these values are not visited in this AST
2533
    };
2534
    AnimationTimelineBuilderVisitor.prototype.visitState = function (ast, context) {
2535
        // these values are not visited in this AST
2536
    };
2537
    AnimationTimelineBuilderVisitor.prototype.visitTransition = function (ast, context) {
2538
        // these values are not visited in this AST
2539
    };
2540
    AnimationTimelineBuilderVisitor.prototype.visitAnimateChild = function (ast, context) {
2541
        var elementInstructions = context.subInstructions.consume(context.element);
2542
        if (elementInstructions) {
2543
            var innerContext = context.createSubContext(ast.options);
2544
            var startTime = context.currentTimeline.currentTime;
2545
            var endTime = this._visitSubInstructions(elementInstructions, innerContext, innerContext.options);
2546
            if (startTime != endTime) {
2547
                // we do this on the upper context because we created a sub context for
2548
                // the sub child animations
2549
                context.transformIntoNewTimeline(endTime);
2550
            }
2551
        }
2552
        context.previousNode = ast;
2553
    };
2554
    AnimationTimelineBuilderVisitor.prototype.visitAnimateRef = function (ast, context) {
2555
        var innerContext = context.createSubContext(ast.options);
2556
        innerContext.transformIntoNewTimeline();
2557
        this.visitReference(ast.animation, innerContext);
2558
        context.transformIntoNewTimeline(innerContext.currentTimeline.currentTime);
2559
        context.previousNode = ast;
2560
    };
2561
    AnimationTimelineBuilderVisitor.prototype._visitSubInstructions = function (instructions, context, options) {
2562
        var startTime = context.currentTimeline.currentTime;
2563
        var furthestTime = startTime;
2564
        // this is a special-case for when a user wants to skip a sub
2565
        // animation from being fired entirely.
2566
        var duration = options.duration != null ? resolveTimingValue(options.duration) : null;
2567
        var delay = options.delay != null ? resolveTimingValue(options.delay) : null;
2568
        if (duration !== 0) {
2569
            instructions.forEach(function (instruction) {
2570
                var instructionTimings = context.appendInstructionToTimeline(instruction, duration, delay);
2571
                furthestTime =
2572
                    Math.max(furthestTime, instructionTimings.duration + instructionTimings.delay);
2573
            });
2574
        }
2575
        return furthestTime;
2576
    };
2577
    AnimationTimelineBuilderVisitor.prototype.visitReference = function (ast, context) {
2578
        context.updateOptions(ast.options, true);
2579
        visitDslNode(this, ast.animation, context);
2580
        context.previousNode = ast;
2581
    };
2582
    AnimationTimelineBuilderVisitor.prototype.visitSequence = function (ast, context) {
2583
        var _this = this;
2584
        var subContextCount = context.subContextCount;
2585
        var ctx = context;
2586
        var options = ast.options;
2587
        if (options && (options.params || options.delay)) {
2588
            ctx = context.createSubContext(options);
2589
            ctx.transformIntoNewTimeline();
2590
            if (options.delay != null) {
2591
                if (ctx.previousNode.type == 6 /* Style */) {
2592
                    ctx.currentTimeline.snapshotCurrentStyles();
2593
                    ctx.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;
2594
                }
2595
                var delay = resolveTimingValue(options.delay);
2596
                ctx.delayNextStep(delay);
2597
            }
2598
        }
2599
        if (ast.steps.length) {
2600
            ast.steps.forEach(function (s) { return visitDslNode(_this, s, ctx); });
2601
            // this is here just incase the inner steps only contain or end with a style() call
2602
            ctx.currentTimeline.applyStylesToKeyframe();
2603
            // this means that some animation function within the sequence
2604
            // ended up creating a sub timeline (which means the current
2605
            // timeline cannot overlap with the contents of the sequence)
2606
            if (ctx.subContextCount > subContextCount) {
2607
                ctx.transformIntoNewTimeline();
2608
            }
2609
        }
2610
        context.previousNode = ast;
2611
    };
2612
    AnimationTimelineBuilderVisitor.prototype.visitGroup = function (ast, context) {
2613
        var _this = this;
2614
        var innerTimelines = [];
2615
        var furthestTime = context.currentTimeline.currentTime;
2616
        var delay = ast.options && ast.options.delay ? resolveTimingValue(ast.options.delay) : 0;
2617
        ast.steps.forEach(function (s) {
2618
            var innerContext = context.createSubContext(ast.options);
2619
            if (delay) {
2620
                innerContext.delayNextStep(delay);
2621
            }
2622
            visitDslNode(_this, s, innerContext);
2623
            furthestTime = Math.max(furthestTime, innerContext.currentTimeline.currentTime);
2624
            innerTimelines.push(innerContext.currentTimeline);
2625
        });
2626
        // this operation is run after the AST loop because otherwise
2627
        // if the parent timeline's collected styles were updated then
2628
        // it would pass in invalid data into the new-to-be forked items
2629
        innerTimelines.forEach(function (timeline) { return context.currentTimeline.mergeTimelineCollectedStyles(timeline); });
2630
        context.transformIntoNewTimeline(furthestTime);
2631
        context.previousNode = ast;
2632
    };
2633
    AnimationTimelineBuilderVisitor.prototype._visitTiming = function (ast, context) {
2634
        if (ast.dynamic) {
2635
            var strValue = ast.strValue;
2636
            var timingValue = context.params ? interpolateParams(strValue, context.params, context.errors) : strValue;
2637
            return resolveTiming(timingValue, context.errors);
2638
        }
2639
        else {
2640
            return { duration: ast.duration, delay: ast.delay, easing: ast.easing };
2641
        }
2642
    };
2643
    AnimationTimelineBuilderVisitor.prototype.visitAnimate = function (ast, context) {
2644
        var timings = context.currentAnimateTimings = this._visitTiming(ast.timings, context);
2645
        var timeline = context.currentTimeline;
2646
        if (timings.delay) {
2647
            context.incrementTime(timings.delay);
2648
            timeline.snapshotCurrentStyles();
2649
        }
2650
        var style$$1 = ast.style;
2651
        if (style$$1.type == 5 /* Keyframes */) {
2652
            this.visitKeyframes(style$$1, context);
2653
        }
2654
        else {
2655
            context.incrementTime(timings.duration);
2656
            this.visitStyle(style$$1, context);
2657
            timeline.applyStylesToKeyframe();
2658
        }
2659
        context.currentAnimateTimings = null;
2660
        context.previousNode = ast;
2661
    };
2662
    AnimationTimelineBuilderVisitor.prototype.visitStyle = function (ast, context) {
2663
        var timeline = context.currentTimeline;
2664
        var timings = (context.currentAnimateTimings);
2665
        // this is a special case for when a style() call
2666
        // directly follows  an animate() call (but not inside of an animate() call)
2667
        if (!timings && timeline.getCurrentStyleProperties().length) {
2668
            timeline.forwardFrame();
2669
        }
2670
        var easing = (timings && timings.easing) || ast.easing;
2671
        if (ast.isEmptyStep) {
2672
            timeline.applyEmptyStep(easing);
2673
        }
2674
        else {
2675
            timeline.setStyles(ast.styles, easing, context.errors, context.options);
2676
        }
2677
        context.previousNode = ast;
2678
    };
2679
    AnimationTimelineBuilderVisitor.prototype.visitKeyframes = function (ast, context) {
2680
        var currentAnimateTimings = (context.currentAnimateTimings);
2681
        var startTime = (context.currentTimeline).duration;
2682
        var duration = currentAnimateTimings.duration;
2683
        var innerContext = context.createSubContext();
2684
        var innerTimeline = innerContext.currentTimeline;
2685
        innerTimeline.easing = currentAnimateTimings.easing;
2686
        ast.styles.forEach(function (step) {
2687
            var offset = step.offset || 0;
2688
            innerTimeline.forwardTime(offset * duration);
2689
            innerTimeline.setStyles(step.styles, step.easing, context.errors, context.options);
2690
            innerTimeline.applyStylesToKeyframe();
2691
        });
2692
        // this will ensure that the parent timeline gets all the styles from
2693
        // the child even if the new timeline below is not used
2694
        context.currentTimeline.mergeTimelineCollectedStyles(innerTimeline);
2695
        // we do this because the window between this timeline and the sub timeline
2696
        // should ensure that the styles within are exactly the same as they were before
2697
        context.transformIntoNewTimeline(startTime + duration);
2698
        context.previousNode = ast;
2699
    };
2700
    AnimationTimelineBuilderVisitor.prototype.visitQuery = function (ast, context) {
2701
        var _this = this;
2702
        // in the event that the first step before this is a style step we need
2703
        // to ensure the styles are applied before the children are animated
2704
        var startTime = context.currentTimeline.currentTime;
2705
        var options = (ast.options || {});
2706
        var delay = options.delay ? resolveTimingValue(options.delay) : 0;
2707
        if (delay && (context.previousNode.type === 6 /* Style */ ||
2708
            (startTime == 0 && context.currentTimeline.getCurrentStyleProperties().length))) {
2709
            context.currentTimeline.snapshotCurrentStyles();
2710
            context.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;
2711
        }
2712
        var furthestTime = startTime;
2713
        var elms = context.invokeQuery(ast.selector, ast.originalSelector, ast.limit, ast.includeSelf, options.optional ? true : false, context.errors);
2714
        context.currentQueryTotal = elms.length;
2715
        var sameElementTimeline = null;
2716
        elms.forEach(function (element, i) {
2717
            context.currentQueryIndex = i;
2718
            var innerContext = context.createSubContext(ast.options, element);
2719
            if (delay) {
2720
                innerContext.delayNextStep(delay);
2721
            }
2722
            if (element === context.element) {
2723
                sameElementTimeline = innerContext.currentTimeline;
2724
            }
2725
            visitDslNode(_this, ast.animation, innerContext);
2726
            // this is here just incase the inner steps only contain or end
2727
            // with a style() call (which is here to signal that this is a preparatory
2728
            // call to style an element before it is animated again)
2729
            innerContext.currentTimeline.applyStylesToKeyframe();
2730
            var endTime = innerContext.currentTimeline.currentTime;
2731
            furthestTime = Math.max(furthestTime, endTime);
2732
        });
2733
        context.currentQueryIndex = 0;
2734
        context.currentQueryTotal = 0;
2735
        context.transformIntoNewTimeline(furthestTime);
2736
        if (sameElementTimeline) {
2737
            context.currentTimeline.mergeTimelineCollectedStyles(sameElementTimeline);
2738
            context.currentTimeline.snapshotCurrentStyles();
2739
        }
2740
        context.previousNode = ast;
2741
    };
2742
    AnimationTimelineBuilderVisitor.prototype.visitStagger = function (ast, context) {
2743
        var parentContext = (context.parentContext);
2744
        var tl = context.currentTimeline;
2745
        var timings = ast.timings;
2746
        var duration = Math.abs(timings.duration);
2747
        var maxTime = duration * (context.currentQueryTotal - 1);
2748
        var delay = duration * context.currentQueryIndex;
2749
        var staggerTransformer = timings.duration < 0 ? 'reverse' : timings.easing;
2750
        switch (staggerTransformer) {
2751
            case 'reverse':
2752
                delay = maxTime - delay;
2753
                break;
2754
            case 'full':
2755
                delay = parentContext.currentStaggerTime;
2756
                break;
2757
        }
2758
        var timeline = context.currentTimeline;
2759
        if (delay) {
2760
            timeline.delayNextStep(delay);
2761
        }
2762
        var startingTime = timeline.currentTime;
2763
        visitDslNode(this, ast.animation, context);
2764
        context.previousNode = ast;
2765
        // time = duration + delay
2766
        // the reason why this computation is so complex is because
2767
        // the inner timeline may either have a delay value or a stretched
2768
        // keyframe depending on if a subtimeline is not used or is used.
2769
        parentContext.currentStaggerTime =
2770
            (tl.currentTime - startingTime) + (tl.startTime - parentContext.currentTimeline.startTime);
2771
    };
2772
    return AnimationTimelineBuilderVisitor;
2773
}());
2774
var DEFAULT_NOOP_PREVIOUS_NODE = {};
2775
var AnimationTimelineContext = /** @class */ (function () {
2776
    function AnimationTimelineContext(_driver, element, subInstructions, _enterClassName, _leaveClassName, errors, timelines, initialTimeline) {
2777
        this._driver = _driver;
2778
        this.element = element;
2779
        this.subInstructions = subInstructions;
2780
        this._enterClassName = _enterClassName;
2781
        this._leaveClassName = _leaveClassName;
2782
        this.errors = errors;
2783
        this.timelines = timelines;
2784
        this.parentContext = null;
2785
        this.currentAnimateTimings = null;
2786
        this.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;
2787
        this.subContextCount = 0;
2788
        this.options = {};
2789
        this.currentQueryIndex = 0;
2790
        this.currentQueryTotal = 0;
2791
        this.currentStaggerTime = 0;
2792
        this.currentTimeline = initialTimeline || new TimelineBuilder(this._driver, element, 0);
2793
        timelines.push(this.currentTimeline);
2794
    }
2795
    Object.defineProperty(AnimationTimelineContext.prototype, "params", {
2796
        get: function () { return this.options.params; },
2797
        enumerable: true,
2798
        configurable: true
2799
    });
2800
    AnimationTimelineContext.prototype.updateOptions = function (options, skipIfExists) {
2801
        var _this = this;
2802
        if (!options)
2803
            return;
2804
        var newOptions = options;
2805
        var optionsToUpdate = this.options;
2806
        // NOTE: this will get patched up when other animation methods support duration overrides
2807
        if (newOptions.duration != null) {
2808
            optionsToUpdate.duration = resolveTimingValue(newOptions.duration);
2809
        }
2810
        if (newOptions.delay != null) {
2811
            optionsToUpdate.delay = resolveTimingValue(newOptions.delay);
2812
        }
2813
        var newParams = newOptions.params;
2814
        if (newParams) {
2815
            var paramsToUpdate_1 = (optionsToUpdate.params);
2816
            if (!paramsToUpdate_1) {
2817
                paramsToUpdate_1 = this.options.params = {};
2818
            }
2819
            Object.keys(newParams).forEach(function (name) {
2820
                if (!skipIfExists || !paramsToUpdate_1.hasOwnProperty(name)) {
2821
                    paramsToUpdate_1[name] = interpolateParams(newParams[name], paramsToUpdate_1, _this.errors);
2822
                }
2823
            });
2824
        }
2825
    };
2826
    AnimationTimelineContext.prototype._copyOptions = function () {
2827
        var options = {};
2828
        if (this.options) {
2829
            var oldParams_1 = this.options.params;
2830
            if (oldParams_1) {
2831
                var params_1 = options['params'] = {};
2832
                Object.keys(oldParams_1).forEach(function (name) { params_1[name] = oldParams_1[name]; });
2833
            }
2834
        }
2835
        return options;
2836
    };
2837
    AnimationTimelineContext.prototype.createSubContext = function (options, element, newTime) {
2838
        if (options === void 0) { options = null; }
2839
        var target = element || this.element;
2840
        var context = new AnimationTimelineContext(this._driver, target, this.subInstructions, this._enterClassName, this._leaveClassName, this.errors, this.timelines, this.currentTimeline.fork(target, newTime || 0));
2841
        context.previousNode = this.previousNode;
2842
        context.currentAnimateTimings = this.currentAnimateTimings;
2843
        context.options = this._copyOptions();
2844
        context.updateOptions(options);
2845
        context.currentQueryIndex = this.currentQueryIndex;
2846
        context.currentQueryTotal = this.currentQueryTotal;
2847
        context.parentContext = this;
2848
        this.subContextCount++;
2849
        return context;
2850
    };
2851
    AnimationTimelineContext.prototype.transformIntoNewTimeline = function (newTime) {
2852
        this.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;
2853
        this.currentTimeline = this.currentTimeline.fork(this.element, newTime);
2854
        this.timelines.push(this.currentTimeline);
2855
        return this.currentTimeline;
2856
    };
2857
    AnimationTimelineContext.prototype.appendInstructionToTimeline = function (instruction, duration, delay) {
2858
        var updatedTimings = {
2859
            duration: duration != null ? duration : instruction.duration,
2860
            delay: this.currentTimeline.currentTime + (delay != null ? delay : 0) + instruction.delay,
2861
            easing: ''
2862
        };
2863
        var builder = new SubTimelineBuilder(this._driver, instruction.element, instruction.keyframes, instruction.preStyleProps, instruction.postStyleProps, updatedTimings, instruction.stretchStartingKeyframe);
2864
        this.timelines.push(builder);
2865
        return updatedTimings;
2866
    };
2867
    AnimationTimelineContext.prototype.incrementTime = function (time) {
2868
        this.currentTimeline.forwardTime(this.currentTimeline.duration + time);
2869
    };
2870
    AnimationTimelineContext.prototype.delayNextStep = function (delay) {
2871
        // negative delays are not yet supported
2872
        if (delay > 0) {
2873
            this.currentTimeline.delayNextStep(delay);
2874
        }
2875
    };
2876
    AnimationTimelineContext.prototype.invokeQuery = function (selector, originalSelector, limit, includeSelf, optional, errors) {
2877
        var results = [];
2878
        if (includeSelf) {
2879
            results.push(this.element);
2880
        }
2881
        if (selector.length > 0) {
2882
            // if :self is only used then the selector is empty
2883
            selector = selector.replace(ENTER_TOKEN_REGEX, '.' + this._enterClassName);
2884
            selector = selector.replace(LEAVE_TOKEN_REGEX, '.' + this._leaveClassName);
2885
            var multi = limit != 1;
2886
            var elements = this._driver.query(this.element, selector, multi);
2887
            if (limit !== 0) {
2888
                elements = limit < 0 ? elements.slice(elements.length + limit, elements.length) :
2889
                    elements.slice(0, limit);
2890
            }
2891
            results.push.apply(results, Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__spread"])(elements));
2892
        }
2893
        if (!optional && results.length == 0) {
2894
            errors.push("`query(\"" + originalSelector + "\")` returned zero elements. (Use `query(\"" + originalSelector + "\", { optional: true })` if you wish to allow this.)");
2895
        }
2896
        return results;
2897
    };
2898
    return AnimationTimelineContext;
2899
}());
2900
var TimelineBuilder = /** @class */ (function () {
2901
    function TimelineBuilder(_driver, element, startTime, _elementTimelineStylesLookup) {
2902
        this._driver = _driver;
2903
        this.element = element;
2904
        this.startTime = startTime;
2905
        this._elementTimelineStylesLookup = _elementTimelineStylesLookup;
2906
        this.duration = 0;
2907
        this._previousKeyframe = {};
2908
        this._currentKeyframe = {};
2909
        this._keyframes = new Map();
2910
        this._styleSummary = {};
2911
        this._pendingStyles = {};
2912
        this._backFill = {};
2913
        this._currentEmptyStepKeyframe = null;
2914
        if (!this._elementTimelineStylesLookup) {
2915
            this._elementTimelineStylesLookup = new Map();
2916
        }
2917
        this._localTimelineStyles = Object.create(this._backFill, {});
2918
        this._globalTimelineStyles = (this._elementTimelineStylesLookup.get(element));
2919
        if (!this._globalTimelineStyles) {
2920
            this._globalTimelineStyles = this._localTimelineStyles;
2921
            this._elementTimelineStylesLookup.set(element, this._localTimelineStyles);
2922
        }
2923
        this._loadKeyframe();
2924
    }
2925
    TimelineBuilder.prototype.containsAnimation = function () {
2926
        switch (this._keyframes.size) {
2927
            case 0:
2928
                return false;
2929
            case 1:
2930
                return this.getCurrentStyleProperties().length > 0;
2931
            default:
2932
                return true;
2933
        }
2934
    };
2935
    TimelineBuilder.prototype.getCurrentStyleProperties = function () { return Object.keys(this._currentKeyframe); };
2936
    Object.defineProperty(TimelineBuilder.prototype, "currentTime", {
2937
        get: function () { return this.startTime + this.duration; },
2938
        enumerable: true,
2939
        configurable: true
2940
    });
2941
    TimelineBuilder.prototype.delayNextStep = function (delay) {
2942
        // in the event that a style() step is placed right before a stagger()
2943
        // and that style() step is the very first style() value in the animation
2944
        // then we need to make a copy of the keyframe [0, copy, 1] so that the delay
2945
        // properly applies the style() values to work with the stagger...
2946
        var hasPreStyleStep = this._keyframes.size == 1 && Object.keys(this._pendingStyles).length;
2947
        if (this.duration || hasPreStyleStep) {
2948
            this.forwardTime(this.currentTime + delay);
2949
            if (hasPreStyleStep) {
2950
                this.snapshotCurrentStyles();
2951
            }
2952
        }
2953
        else {
2954
            this.startTime += delay;
2955
        }
2956
    };
2957
    TimelineBuilder.prototype.fork = function (element, currentTime) {
2958
        this.applyStylesToKeyframe();
2959
        return new TimelineBuilder(this._driver, element, currentTime || this.currentTime, this._elementTimelineStylesLookup);
2960
    };
2961
    TimelineBuilder.prototype._loadKeyframe = function () {
2962
        if (this._currentKeyframe) {
2963
            this._previousKeyframe = this._currentKeyframe;
2964
        }
2965
        this._currentKeyframe = (this._keyframes.get(this.duration));
2966
        if (!this._currentKeyframe) {
2967
            this._currentKeyframe = Object.create(this._backFill, {});
2968
            this._keyframes.set(this.duration, this._currentKeyframe);
2969
        }
2970
    };
2971
    TimelineBuilder.prototype.forwardFrame = function () {
2972
        this.duration += ONE_FRAME_IN_MILLISECONDS;
2973
        this._loadKeyframe();
2974
    };
2975
    TimelineBuilder.prototype.forwardTime = function (time) {
2976
        this.applyStylesToKeyframe();
2977
        this.duration = time;
2978
        this._loadKeyframe();
2979
    };
2980
    TimelineBuilder.prototype._updateStyle = function (prop, value) {
2981
        this._localTimelineStyles[prop] = value;
2982
        this._globalTimelineStyles[prop] = value;
2983
        this._styleSummary[prop] = { time: this.currentTime, value: value };
2984
    };
2985
    TimelineBuilder.prototype.allowOnlyTimelineStyles = function () { return this._currentEmptyStepKeyframe !== this._currentKeyframe; };
2986
    TimelineBuilder.prototype.applyEmptyStep = function (easing) {
2987
        var _this = this;
2988
        if (easing) {
2989
            this._previousKeyframe['easing'] = easing;
2990
        }
2991
        // special case for animate(duration):
2992
        // all missing styles are filled with a `*` value then
2993
        // if any destination styles are filled in later on the same
2994
        // keyframe then they will override the overridden styles
2995
        // We use `_globalTimelineStyles` here because there may be
2996
        // styles in previous keyframes that are not present in this timeline
2997
        Object.keys(this._globalTimelineStyles).forEach(function (prop) {
2998
            _this._backFill[prop] = _this._globalTimelineStyles[prop] || _angular_animations__WEBPACK_IMPORTED_MODULE_0__["AUTO_STYLE"];
2999
            _this._currentKeyframe[prop] = _angular_animations__WEBPACK_IMPORTED_MODULE_0__["AUTO_STYLE"];
3000
        });
3001
        this._currentEmptyStepKeyframe = this._currentKeyframe;
3002
    };
3003
    TimelineBuilder.prototype.setStyles = function (input, easing, errors, options) {
3004
        var _this = this;
3005
        if (easing) {
3006
            this._previousKeyframe['easing'] = easing;
3007
        }
3008
        var params = (options && options.params) || {};
3009
        var styles = flattenStyles(input, this._globalTimelineStyles);
3010
        Object.keys(styles).forEach(function (prop) {
3011
            var val = interpolateParams(styles[prop], params, errors);
3012
            _this._pendingStyles[prop] = val;
3013
            if (!_this._localTimelineStyles.hasOwnProperty(prop)) {
3014
                _this._backFill[prop] = _this._globalTimelineStyles.hasOwnProperty(prop) ?
3015
                    _this._globalTimelineStyles[prop] :
3016
                    _angular_animations__WEBPACK_IMPORTED_MODULE_0__["AUTO_STYLE"];
3017
            }
3018
            _this._updateStyle(prop, val);
3019
        });
3020
    };
3021
    TimelineBuilder.prototype.applyStylesToKeyframe = function () {
3022
        var _this = this;
3023
        var styles = this._pendingStyles;
3024
        var props = Object.keys(styles);
3025
        if (props.length == 0)
3026
            return;
3027
        this._pendingStyles = {};
3028
        props.forEach(function (prop) {
3029
            var val = styles[prop];
3030
            _this._currentKeyframe[prop] = val;
3031
        });
3032
        Object.keys(this._localTimelineStyles).forEach(function (prop) {
3033
            if (!_this._currentKeyframe.hasOwnProperty(prop)) {
3034
                _this._currentKeyframe[prop] = _this._localTimelineStyles[prop];
3035
            }
3036
        });
3037
    };
3038
    TimelineBuilder.prototype.snapshotCurrentStyles = function () {
3039
        var _this = this;
3040
        Object.keys(this._localTimelineStyles).forEach(function (prop) {
3041
            var val = _this._localTimelineStyles[prop];
3042
            _this._pendingStyles[prop] = val;
3043
            _this._updateStyle(prop, val);
3044
        });
3045
    };
3046
    TimelineBuilder.prototype.getFinalKeyframe = function () { return this._keyframes.get(this.duration); };
3047
    Object.defineProperty(TimelineBuilder.prototype, "properties", {
3048
        get: function () {
3049
            var properties = [];
3050
            for (var prop in this._currentKeyframe) {
3051
                properties.push(prop);
3052
            }
3053
            return properties;
3054
        },
3055
        enumerable: true,
3056
        configurable: true
3057
    });
3058
    TimelineBuilder.prototype.mergeTimelineCollectedStyles = function (timeline) {
3059
        var _this = this;
3060
        Object.keys(timeline._styleSummary).forEach(function (prop) {
3061
            var details0 = _this._styleSummary[prop];
3062
            var details1 = timeline._styleSummary[prop];
3063
            if (!details0 || details1.time > details0.time) {
3064
                _this._updateStyle(prop, details1.value);
3065
            }
3066
        });
3067
    };
3068
    TimelineBuilder.prototype.buildKeyframes = function () {
3069
        var _this = this;
3070
        this.applyStylesToKeyframe();
3071
        var preStyleProps = new Set();
3072
        var postStyleProps = new Set();
3073
        var isEmpty = this._keyframes.size === 1 && this.duration === 0;
3074
        var finalKeyframes = [];
3075
        this._keyframes.forEach(function (keyframe, time) {
3076
            var finalKeyframe = copyStyles(keyframe, true);
3077
            Object.keys(finalKeyframe).forEach(function (prop) {
3078
                var value = finalKeyframe[prop];
3079
                if (value == _angular_animations__WEBPACK_IMPORTED_MODULE_0__["ɵPRE_STYLE"]) {
3080
                    preStyleProps.add(prop);
3081
                }
3082
                else if (value == _angular_animations__WEBPACK_IMPORTED_MODULE_0__["AUTO_STYLE"]) {
3083
                    postStyleProps.add(prop);
3084
                }
3085
            });
3086
            if (!isEmpty) {
3087
                finalKeyframe['offset'] = time / _this.duration;
3088
            }
3089
            finalKeyframes.push(finalKeyframe);
3090
        });
3091
        var preProps = preStyleProps.size ? iteratorToArray(preStyleProps.values()) : [];
3092
        var postProps = postStyleProps.size ? iteratorToArray(postStyleProps.values()) : [];
3093
        // special case for a 0-second animation (which is designed just to place styles onscreen)
3094
        if (isEmpty) {
3095
            var kf0 = finalKeyframes[0];
3096
            var kf1 = copyObj(kf0);
3097
            kf0['offset'] = 0;
3098
            kf1['offset'] = 1;
3099
            finalKeyframes = [kf0, kf1];
3100
        }
3101
        return createTimelineInstruction(this.element, finalKeyframes, preProps, postProps, this.duration, this.startTime, this.easing, false);
3102
    };
3103
    return TimelineBuilder;
3104
}());
3105
var SubTimelineBuilder = /** @class */ (function (_super) {
3106
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(SubTimelineBuilder, _super);
3107
    function SubTimelineBuilder(driver, element, keyframes, preStyleProps, postStyleProps, timings, _stretchStartingKeyframe) {
3108
        if (_stretchStartingKeyframe === void 0) { _stretchStartingKeyframe = false; }
3109
        var _this = _super.call(this, driver, element, timings.delay) || this;
3110
        _this.element = element;
3111
        _this.keyframes = keyframes;
3112
        _this.preStyleProps = preStyleProps;
3113
        _this.postStyleProps = postStyleProps;
3114
        _this._stretchStartingKeyframe = _stretchStartingKeyframe;
3115
        _this.timings = { duration: timings.duration, delay: timings.delay, easing: timings.easing };
3116
        return _this;
3117
    }
3118
    SubTimelineBuilder.prototype.containsAnimation = function () { return this.keyframes.length > 1; };
3119
    SubTimelineBuilder.prototype.buildKeyframes = function () {
3120
        var keyframes = this.keyframes;
3121
        var _a = this.timings, delay = _a.delay, duration = _a.duration, easing = _a.easing;
3122
        if (this._stretchStartingKeyframe && delay) {
3123
            var newKeyframes = [];
3124
            var totalTime = duration + delay;
3125
            var startingGap = delay / totalTime;
3126
            // the original starting keyframe now starts once the delay is done
3127
            var newFirstKeyframe = copyStyles(keyframes[0], false);
3128
            newFirstKeyframe['offset'] = 0;
3129
            newKeyframes.push(newFirstKeyframe);
3130
            var oldFirstKeyframe = copyStyles(keyframes[0], false);
3131
            oldFirstKeyframe['offset'] = roundOffset(startingGap);
3132
            newKeyframes.push(oldFirstKeyframe);
3133
            /*
3134
                    When the keyframe is stretched then it means that the delay before the animation
3135
                    starts is gone. Instead the first keyframe is placed at the start of the animation
3136
                    and it is then copied to where it starts when the original delay is over. This basically
3137
                    means nothing animates during that delay, but the styles are still renderered. For this
3138
                    to work the original offset values that exist in the original keyframes must be "warped"
3139
                    so that they can take the new keyframe + delay into account.
3140
 
3141
                    delay=1000, duration=1000, keyframes = 0 .5 1
3142
 
3143
                    turns into
3144
 
3145
                    delay=0, duration=2000, keyframes = 0 .33 .66 1
3146
                   */
3147
            // offsets between 1 ... n -1 are all warped by the keyframe stretch
3148
            var limit = keyframes.length - 1;
3149
            for (var i = 1; i <= limit; i++) {
3150
                var kf = copyStyles(keyframes[i], false);
3151
                var oldOffset = kf['offset'];
3152
                var timeAtKeyframe = delay + oldOffset * duration;
3153
                kf['offset'] = roundOffset(timeAtKeyframe / totalTime);
3154
                newKeyframes.push(kf);
3155
            }
3156
            // the new starting keyframe should be added at the start
3157
            duration = totalTime;
3158
            delay = 0;
3159
            easing = '';
3160
            keyframes = newKeyframes;
3161
        }
3162
        return createTimelineInstruction(this.element, keyframes, this.preStyleProps, this.postStyleProps, duration, delay, easing, true);
3163
    };
3164
    return SubTimelineBuilder;
3165
}(TimelineBuilder));
3166
function roundOffset(offset, decimalPoints) {
3167
    if (decimalPoints === void 0) { decimalPoints = 3; }
3168
    var mult = Math.pow(10, decimalPoints - 1);
3169
    return Math.round(offset * mult) / mult;
3170
}
3171
function flattenStyles(input, allStyles) {
3172
    var styles = {};
3173
    var allProperties;
3174
    input.forEach(function (token) {
3175
        if (token === '*') {
3176
            allProperties = allProperties || Object.keys(allStyles);
3177
            allProperties.forEach(function (prop) { styles[prop] = _angular_animations__WEBPACK_IMPORTED_MODULE_0__["AUTO_STYLE"]; });
3178
        }
3179
        else {
3180
            copyStyles(token, false, styles);
3181
        }
3182
    });
3183
    return styles;
3184
}
3185
 
3186
var Animation = /** @class */ (function () {
3187
    function Animation(_driver, input) {
3188
        this._driver = _driver;
3189
        var errors = [];
3190
        var ast = buildAnimationAst(_driver, input, errors);
3191
        if (errors.length) {
3192
            var errorMessage = "animation validation failed:\n" + errors.join("\n");
3193
            throw new Error(errorMessage);
3194
        }
3195
        this._animationAst = ast;
3196
    }
3197
    Animation.prototype.buildTimelines = function (element, startingStyles, destinationStyles, options, subInstructions) {
3198
        var start = Array.isArray(startingStyles) ? normalizeStyles(startingStyles) :
3199
            startingStyles;
3200
        var dest = Array.isArray(destinationStyles) ? normalizeStyles(destinationStyles) :
3201
            destinationStyles;
3202
        var errors = [];
3203
        subInstructions = subInstructions || new ElementInstructionMap();
3204
        var result = buildAnimationTimelines(this._driver, element, this._animationAst, ENTER_CLASSNAME, LEAVE_CLASSNAME, start, dest, options, subInstructions, errors);
3205
        if (errors.length) {
3206
            var errorMessage = "animation building failed:\n" + errors.join("\n");
3207
            throw new Error(errorMessage);
3208
        }
3209
        return result;
3210
    };
3211
    return Animation;
3212
}());
3213
 
3214
/**
3215
 * @license
3216
 * Copyright Google Inc. All Rights Reserved.
3217
 *
3218
 * Use of this source code is governed by an MIT-style license that can be
3219
 * found in the LICENSE file at https://angular.io/license
3220
 */
3221
/**
3222
 * @experimental Animation support is experimental.
3223
 */
3224
var AnimationStyleNormalizer = /** @class */ (function () {
3225
    function AnimationStyleNormalizer() {
3226
    }
3227
    return AnimationStyleNormalizer;
3228
}());
3229
/**
3230
 * @experimental Animation support is experimental.
3231
 */
3232
var NoopAnimationStyleNormalizer = /** @class */ (function () {
3233
    function NoopAnimationStyleNormalizer() {
3234
    }
3235
    NoopAnimationStyleNormalizer.prototype.normalizePropertyName = function (propertyName, errors) { return propertyName; };
3236
    NoopAnimationStyleNormalizer.prototype.normalizeStyleValue = function (userProvidedProperty, normalizedProperty, value, errors) {
3237
        return value;
3238
    };
3239
    return NoopAnimationStyleNormalizer;
3240
}());
3241
 
3242
var WebAnimationsStyleNormalizer = /** @class */ (function (_super) {
3243
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(WebAnimationsStyleNormalizer, _super);
3244
    function WebAnimationsStyleNormalizer() {
3245
        return _super !== null && _super.apply(this, arguments) || this;
3246
    }
3247
    WebAnimationsStyleNormalizer.prototype.normalizePropertyName = function (propertyName, errors) {
3248
        return dashCaseToCamelCase(propertyName);
3249
    };
3250
    WebAnimationsStyleNormalizer.prototype.normalizeStyleValue = function (userProvidedProperty, normalizedProperty, value, errors) {
3251
        var unit = '';
3252
        var strVal = value.toString().trim();
3253
        if (DIMENSIONAL_PROP_MAP[normalizedProperty] && value !== 0 && value !== '0') {
3254
            if (typeof value === 'number') {
3255
                unit = 'px';
3256
            }
3257
            else {
3258
                var valAndSuffixMatch = value.match(/^[+-]?[\d\.]+([a-z]*)$/);
3259
                if (valAndSuffixMatch && valAndSuffixMatch[1].length == 0) {
3260
                    errors.push("Please provide a CSS unit value for " + userProvidedProperty + ":" + value);
3261
                }
3262
            }
3263
        }
3264
        return strVal + unit;
3265
    };
3266
    return WebAnimationsStyleNormalizer;
3267
}(AnimationStyleNormalizer));
3268
var DIMENSIONAL_PROP_MAP = makeBooleanMap('width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective'
3269
    .split(','));
3270
function makeBooleanMap(keys) {
3271
    var map = {};
3272
    keys.forEach(function (key) { return map[key] = true; });
3273
    return map;
3274
}
3275
 
3276
function createTransitionInstruction(element, triggerName, fromState, toState, isRemovalTransition, fromStyles, toStyles, timelines, queriedElements, preStyleProps, postStyleProps, totalTime, errors) {
3277
    return {
3278
        type: 0 /* TransitionAnimation */,
3279
        element: element,
3280
        triggerName: triggerName,
3281
        isRemovalTransition: isRemovalTransition,
3282
        fromState: fromState,
3283
        fromStyles: fromStyles,
3284
        toState: toState,
3285
        toStyles: toStyles,
3286
        timelines: timelines,
3287
        queriedElements: queriedElements,
3288
        preStyleProps: preStyleProps,
3289
        postStyleProps: postStyleProps,
3290
        totalTime: totalTime,
3291
        errors: errors
3292
    };
3293
}
3294
 
3295
var EMPTY_OBJECT = {};
3296
var AnimationTransitionFactory = /** @class */ (function () {
3297
    function AnimationTransitionFactory(_triggerName, ast, _stateStyles) {
3298
        this._triggerName = _triggerName;
3299
        this.ast = ast;
3300
        this._stateStyles = _stateStyles;
3301
    }
3302
    AnimationTransitionFactory.prototype.match = function (currentState, nextState, element, params) {
3303
        return oneOrMoreTransitionsMatch(this.ast.matchers, currentState, nextState, element, params);
3304
    };
3305
    AnimationTransitionFactory.prototype.buildStyles = function (stateName, params, errors) {
3306
        var backupStateStyler = this._stateStyles['*'];
3307
        var stateStyler = this._stateStyles[stateName];
3308
        var backupStyles = backupStateStyler ? backupStateStyler.buildStyles(params, errors) : {};
3309
        return stateStyler ? stateStyler.buildStyles(params, errors) : backupStyles;
3310
    };
3311
    AnimationTransitionFactory.prototype.build = function (driver, element, currentState, nextState, enterClassName, leaveClassName, currentOptions, nextOptions, subInstructions) {
3312
        var errors = [];
3313
        var transitionAnimationParams = this.ast.options && this.ast.options.params || EMPTY_OBJECT;
3314
        var currentAnimationParams = currentOptions && currentOptions.params || EMPTY_OBJECT;
3315
        var currentStateStyles = this.buildStyles(currentState, currentAnimationParams, errors);
3316
        var nextAnimationParams = nextOptions && nextOptions.params || EMPTY_OBJECT;
3317
        var nextStateStyles = this.buildStyles(nextState, nextAnimationParams, errors);
3318
        var queriedElements = new Set();
3319
        var preStyleMap = new Map();
3320
        var postStyleMap = new Map();
3321
        var isRemoval = nextState === 'void';
3322
        var animationOptions = { params: Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__assign"])({}, transitionAnimationParams, nextAnimationParams) };
3323
        var timelines = buildAnimationTimelines(driver, element, this.ast.animation, enterClassName, leaveClassName, currentStateStyles, nextStateStyles, animationOptions, subInstructions, errors);
3324
        var totalTime = 0;
3325
        timelines.forEach(function (tl) { totalTime = Math.max(tl.duration + tl.delay, totalTime); });
3326
        if (errors.length) {
3327
            return createTransitionInstruction(element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles, nextStateStyles, [], [], preStyleMap, postStyleMap, totalTime, errors);
3328
        }
3329
        timelines.forEach(function (tl) {
3330
            var elm = tl.element;
3331
            var preProps = getOrSetAsInMap(preStyleMap, elm, {});
3332
            tl.preStyleProps.forEach(function (prop) { return preProps[prop] = true; });
3333
            var postProps = getOrSetAsInMap(postStyleMap, elm, {});
3334
            tl.postStyleProps.forEach(function (prop) { return postProps[prop] = true; });
3335
            if (elm !== element) {
3336
                queriedElements.add(elm);
3337
            }
3338
        });
3339
        var queriedElementsList = iteratorToArray(queriedElements.values());
3340
        return createTransitionInstruction(element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles, nextStateStyles, timelines, queriedElementsList, preStyleMap, postStyleMap, totalTime);
3341
    };
3342
    return AnimationTransitionFactory;
3343
}());
3344
function oneOrMoreTransitionsMatch(matchFns, currentState, nextState, element, params) {
3345
    return matchFns.some(function (fn) { return fn(currentState, nextState, element, params); });
3346
}
3347
var AnimationStateStyles = /** @class */ (function () {
3348
    function AnimationStateStyles(styles, defaultParams) {
3349
        this.styles = styles;
3350
        this.defaultParams = defaultParams;
3351
    }
3352
    AnimationStateStyles.prototype.buildStyles = function (params, errors) {
3353
        var finalStyles = {};
3354
        var combinedParams = copyObj(this.defaultParams);
3355
        Object.keys(params).forEach(function (key) {
3356
            var value = params[key];
3357
            if (value != null) {
3358
                combinedParams[key] = value;
3359
            }
3360
        });
3361
        this.styles.styles.forEach(function (value) {
3362
            if (typeof value !== 'string') {
3363
                var styleObj_1 = value;
3364
                Object.keys(styleObj_1).forEach(function (prop) {
3365
                    var val = styleObj_1[prop];
3366
                    if (val.length > 1) {
3367
                        val = interpolateParams(val, combinedParams, errors);
3368
                    }
3369
                    finalStyles[prop] = val;
3370
                });
3371
            }
3372
        });
3373
        return finalStyles;
3374
    };
3375
    return AnimationStateStyles;
3376
}());
3377
 
3378
/**
3379
 * @experimental Animation support is experimental.
3380
 */
3381
function buildTrigger(name, ast) {
3382
    return new AnimationTrigger(name, ast);
3383
}
3384
/**
3385
* @experimental Animation support is experimental.
3386
*/
3387
var AnimationTrigger = /** @class */ (function () {
3388
    function AnimationTrigger(name, ast) {
3389
        var _this = this;
3390
        this.name = name;
3391
        this.ast = ast;
3392
        this.transitionFactories = [];
3393
        this.states = {};
3394
        ast.states.forEach(function (ast) {
3395
            var defaultParams = (ast.options && ast.options.params) || {};
3396
            _this.states[ast.name] = new AnimationStateStyles(ast.style, defaultParams);
3397
        });
3398
        balanceProperties(this.states, 'true', '1');
3399
        balanceProperties(this.states, 'false', '0');
3400
        ast.transitions.forEach(function (ast) {
3401
            _this.transitionFactories.push(new AnimationTransitionFactory(name, ast, _this.states));
3402
        });
3403
        this.fallbackTransition = createFallbackTransition(name, this.states);
3404
    }
3405
    Object.defineProperty(AnimationTrigger.prototype, "containsQueries", {
3406
        get: function () { return this.ast.queryCount > 0; },
3407
        enumerable: true,
3408
        configurable: true
3409
    });
3410
    AnimationTrigger.prototype.matchTransition = function (currentState, nextState, element, params) {
3411
        var entry = this.transitionFactories.find(function (f) { return f.match(currentState, nextState, element, params); });
3412
        return entry || null;
3413
    };
3414
    AnimationTrigger.prototype.matchStyles = function (currentState, params, errors) {
3415
        return this.fallbackTransition.buildStyles(currentState, params, errors);
3416
    };
3417
    return AnimationTrigger;
3418
}());
3419
function createFallbackTransition(triggerName, states) {
3420
    var matchers = [function (fromState, toState) { return true; }];
3421
    var animation = { type: 2 /* Sequence */, steps: [], options: null };
3422
    var transition = {
3423
        type: 1 /* Transition */,
3424
        animation: animation,
3425
        matchers: matchers,
3426
        options: null,
3427
        queryCount: 0,
3428
        depCount: 0
3429
    };
3430
    return new AnimationTransitionFactory(triggerName, transition, states);
3431
}
3432
function balanceProperties(obj, key1, key2) {
3433
    if (obj.hasOwnProperty(key1)) {
3434
        if (!obj.hasOwnProperty(key2)) {
3435
            obj[key2] = obj[key1];
3436
        }
3437
    }
3438
    else if (obj.hasOwnProperty(key2)) {
3439
        obj[key1] = obj[key2];
3440
    }
3441
}
3442
 
3443
var EMPTY_INSTRUCTION_MAP = new ElementInstructionMap();
3444
var TimelineAnimationEngine = /** @class */ (function () {
3445
    function TimelineAnimationEngine(_driver, _normalizer) {
3446
        this._driver = _driver;
3447
        this._normalizer = _normalizer;
3448
        this._animations = {};
3449
        this._playersById = {};
3450
        this.players = [];
3451
    }
3452
    TimelineAnimationEngine.prototype.register = function (id, metadata) {
3453
        var errors = [];
3454
        var ast = buildAnimationAst(this._driver, metadata, errors);
3455
        if (errors.length) {
3456
            throw new Error("Unable to build the animation due to the following errors: " + errors.join("\n"));
3457
        }
3458
        else {
3459
            this._animations[id] = ast;
3460
        }
3461
    };
3462
    TimelineAnimationEngine.prototype._buildPlayer = function (i, preStyles, postStyles) {
3463
        var element = i.element;
3464
        var keyframes = normalizeKeyframes(this._driver, this._normalizer, element, i.keyframes, preStyles, postStyles);
3465
        return this._driver.animate(element, keyframes, i.duration, i.delay, i.easing, [], true);
3466
    };
3467
    TimelineAnimationEngine.prototype.create = function (id, element, options) {
3468
        var _this = this;
3469
        if (options === void 0) { options = {}; }
3470
        var errors = [];
3471
        var ast = this._animations[id];
3472
        var instructions;
3473
        var autoStylesMap = new Map();
3474
        if (ast) {
3475
            instructions = buildAnimationTimelines(this._driver, element, ast, ENTER_CLASSNAME, LEAVE_CLASSNAME, {}, {}, options, EMPTY_INSTRUCTION_MAP, errors);
3476
            instructions.forEach(function (inst) {
3477
                var styles = getOrSetAsInMap(autoStylesMap, inst.element, {});
3478
                inst.postStyleProps.forEach(function (prop) { return styles[prop] = null; });
3479
            });
3480
        }
3481
        else {
3482
            errors.push('The requested animation doesn\'t exist or has already been destroyed');
3483
            instructions = [];
3484
        }
3485
        if (errors.length) {
3486
            throw new Error("Unable to create the animation due to the following errors: " + errors.join("\n"));
3487
        }
3488
        autoStylesMap.forEach(function (styles, element) {
3489
            Object.keys(styles).forEach(function (prop) { styles[prop] = _this._driver.computeStyle(element, prop, _angular_animations__WEBPACK_IMPORTED_MODULE_0__["AUTO_STYLE"]); });
3490
        });
3491
        var players = instructions.map(function (i) {
3492
            var styles = autoStylesMap.get(i.element);
3493
            return _this._buildPlayer(i, {}, styles);
3494
        });
3495
        var player = optimizeGroupPlayer(players);
3496
        this._playersById[id] = player;
3497
        player.onDestroy(function () { return _this.destroy(id); });
3498
        this.players.push(player);
3499
        return player;
3500
    };
3501
    TimelineAnimationEngine.prototype.destroy = function (id) {
3502
        var player = this._getPlayer(id);
3503
        player.destroy();
3504
        delete this._playersById[id];
3505
        var index = this.players.indexOf(player);
3506
        if (index >= 0) {
3507
            this.players.splice(index, 1);
3508
        }
3509
    };
3510
    TimelineAnimationEngine.prototype._getPlayer = function (id) {
3511
        var player = this._playersById[id];
3512
        if (!player) {
3513
            throw new Error("Unable to find the timeline player referenced by " + id);
3514
        }
3515
        return player;
3516
    };
3517
    TimelineAnimationEngine.prototype.listen = function (id, element, eventName, callback) {
3518
        // triggerName, fromState, toState are all ignored for timeline animations
3519
        var baseEvent = makeAnimationEvent(element, '', '', '');
3520
        listenOnPlayer(this._getPlayer(id), eventName, baseEvent, callback);
3521
        return function () { };
3522
    };
3523
    TimelineAnimationEngine.prototype.command = function (id, element, command, args) {
3524
        if (command == 'register') {
3525
            this.register(id, args[0]);
3526
            return;
3527
        }
3528
        if (command == 'create') {
3529
            var options = (args[0] || {});
3530
            this.create(id, element, options);
3531
            return;
3532
        }
3533
        var player = this._getPlayer(id);
3534
        switch (command) {
3535
            case 'play':
3536
                player.play();
3537
                break;
3538
            case 'pause':
3539
                player.pause();
3540
                break;
3541
            case 'reset':
3542
                player.reset();
3543
                break;
3544
            case 'restart':
3545
                player.restart();
3546
                break;
3547
            case 'finish':
3548
                player.finish();
3549
                break;
3550
            case 'init':
3551
                player.init();
3552
                break;
3553
            case 'setPosition':
3554
                player.setPosition(parseFloat(args[0]));
3555
                break;
3556
            case 'destroy':
3557
                this.destroy(id);
3558
                break;
3559
        }
3560
    };
3561
    return TimelineAnimationEngine;
3562
}());
3563
 
3564
var QUEUED_CLASSNAME = 'ng-animate-queued';
3565
var QUEUED_SELECTOR = '.ng-animate-queued';
3566
var DISABLED_CLASSNAME = 'ng-animate-disabled';
3567
var DISABLED_SELECTOR = '.ng-animate-disabled';
3568
var STAR_CLASSNAME = 'ng-star-inserted';
3569
var STAR_SELECTOR = '.ng-star-inserted';
3570
var EMPTY_PLAYER_ARRAY = [];
3571
var NULL_REMOVAL_STATE = {
3572
    namespaceId: '',
3573
    setForRemoval: false,
3574
    setForMove: false,
3575
    hasAnimation: false,
3576
    removedBeforeQueried: false
3577
};
3578
var NULL_REMOVED_QUERIED_STATE = {
3579
    namespaceId: '',
3580
    setForMove: false,
3581
    setForRemoval: false,
3582
    hasAnimation: false,
3583
    removedBeforeQueried: true
3584
};
3585
var REMOVAL_FLAG = '__ng_removed';
3586
var StateValue = /** @class */ (function () {
3587
    function StateValue(input, namespaceId) {
3588
        if (namespaceId === void 0) { namespaceId = ''; }
3589
        this.namespaceId = namespaceId;
3590
        var isObj = input && input.hasOwnProperty('value');
3591
        var value = isObj ? input['value'] : input;
3592
        this.value = normalizeTriggerValue(value);
3593
        if (isObj) {
3594
            var options = copyObj(input);
3595
            delete options['value'];
3596
            this.options = options;
3597
        }
3598
        else {
3599
            this.options = {};
3600
        }
3601
        if (!this.options.params) {
3602
            this.options.params = {};
3603
        }
3604
    }
3605
    Object.defineProperty(StateValue.prototype, "params", {
3606
        get: function () { return this.options.params; },
3607
        enumerable: true,
3608
        configurable: true
3609
    });
3610
    StateValue.prototype.absorbOptions = function (options) {
3611
        var newParams = options.params;
3612
        if (newParams) {
3613
            var oldParams_1 = (this.options.params);
3614
            Object.keys(newParams).forEach(function (prop) {
3615
                if (oldParams_1[prop] == null) {
3616
                    oldParams_1[prop] = newParams[prop];
3617
                }
3618
            });
3619
        }
3620
    };
3621
    return StateValue;
3622
}());
3623
var VOID_VALUE = 'void';
3624
var DEFAULT_STATE_VALUE = new StateValue(VOID_VALUE);
3625
var DELETED_STATE_VALUE = new StateValue('DELETED');
3626
var AnimationTransitionNamespace = /** @class */ (function () {
3627
    function AnimationTransitionNamespace(id, hostElement, _engine) {
3628
        this.id = id;
3629
        this.hostElement = hostElement;
3630
        this._engine = _engine;
3631
        this.players = [];
3632
        this._triggers = {};
3633
        this._queue = [];
3634
        this._elementListeners = new Map();
3635
        this._hostClassName = 'ng-tns-' + id;
3636
        addClass(hostElement, this._hostClassName);
3637
    }
3638
    AnimationTransitionNamespace.prototype.listen = function (element, name, phase, callback) {
3639
        var _this = this;
3640
        if (!this._triggers.hasOwnProperty(name)) {
3641
            throw new Error("Unable to listen on the animation trigger event \"" + phase + "\" because the animation trigger \"" + name + "\" doesn't exist!");
3642
        }
3643
        if (phase == null || phase.length == 0) {
3644
            throw new Error("Unable to listen on the animation trigger \"" + name + "\" because the provided event is undefined!");
3645
        }
3646
        if (!isTriggerEventValid(phase)) {
3647
            throw new Error("The provided animation trigger event \"" + phase + "\" for the animation trigger \"" + name + "\" is not supported!");
3648
        }
3649
        var listeners = getOrSetAsInMap(this._elementListeners, element, []);
3650
        var data = { name: name, phase: phase, callback: callback };
3651
        listeners.push(data);
3652
        var triggersWithStates = getOrSetAsInMap(this._engine.statesByElement, element, {});
3653
        if (!triggersWithStates.hasOwnProperty(name)) {
3654
            addClass(element, NG_TRIGGER_CLASSNAME);
3655
            addClass(element, NG_TRIGGER_CLASSNAME + '-' + name);
3656
            triggersWithStates[name] = DEFAULT_STATE_VALUE;
3657
        }
3658
        return function () {
3659
            // the event listener is removed AFTER the flush has occurred such
3660
            // that leave animations callbacks can fire (otherwise if the node
3661
            // is removed in between then the listeners would be deregistered)
3662
            // the event listener is removed AFTER the flush has occurred such
3663
            // that leave animations callbacks can fire (otherwise if the node
3664
            // is removed in between then the listeners would be deregistered)
3665
            _this._engine.afterFlush(function () {
3666
                var index = listeners.indexOf(data);
3667
                if (index >= 0) {
3668
                    listeners.splice(index, 1);
3669
                }
3670
                if (!_this._triggers[name]) {
3671
                    delete triggersWithStates[name];
3672
                }
3673
            });
3674
        };
3675
    };
3676
    AnimationTransitionNamespace.prototype.register = function (name, ast) {
3677
        if (this._triggers[name]) {
3678
            // throw
3679
            return false;
3680
        }
3681
        else {
3682
            this._triggers[name] = ast;
3683
            return true;
3684
        }
3685
    };
3686
    AnimationTransitionNamespace.prototype._getTrigger = function (name) {
3687
        var trigger = this._triggers[name];
3688
        if (!trigger) {
3689
            throw new Error("The provided animation trigger \"" + name + "\" has not been registered!");
3690
        }
3691
        return trigger;
3692
    };
3693
    AnimationTransitionNamespace.prototype.trigger = function (element, triggerName, value, defaultToFallback) {
3694
        var _this = this;
3695
        if (defaultToFallback === void 0) { defaultToFallback = true; }
3696
        var trigger = this._getTrigger(triggerName);
3697
        var player = new TransitionAnimationPlayer(this.id, triggerName, element);
3698
        var triggersWithStates = this._engine.statesByElement.get(element);
3699
        if (!triggersWithStates) {
3700
            addClass(element, NG_TRIGGER_CLASSNAME);
3701
            addClass(element, NG_TRIGGER_CLASSNAME + '-' + triggerName);
3702
            this._engine.statesByElement.set(element, triggersWithStates = {});
3703
        }
3704
        var fromState = triggersWithStates[triggerName];
3705
        var toState = new StateValue(value, this.id);
3706
        var isObj = value && value.hasOwnProperty('value');
3707
        if (!isObj && fromState) {
3708
            toState.absorbOptions(fromState.options);
3709
        }
3710
        triggersWithStates[triggerName] = toState;
3711
        if (!fromState) {
3712
            fromState = DEFAULT_STATE_VALUE;
3713
        }
3714
        else if (fromState === DELETED_STATE_VALUE) {
3715
            return player;
3716
        }
3717
        var isRemoval = toState.value === VOID_VALUE;
3718
        // normally this isn't reached by here, however, if an object expression
3719
        // is passed in then it may be a new object each time. Comparing the value
3720
        // is important since that will stay the same despite there being a new object.
3721
        // The removal arc here is special cased because the same element is triggered
3722
        // twice in the event that it contains animations on the outer/inner portions
3723
        // of the host container
3724
        if (!isRemoval && fromState.value === toState.value) {
3725
            // this means that despite the value not changing, some inner params
3726
            // have changed which means that the animation final styles need to be applied
3727
            if (!objEquals(fromState.params, toState.params)) {
3728
                var errors = [];
3729
                var fromStyles_1 = trigger.matchStyles(fromState.value, fromState.params, errors);
3730
                var toStyles_1 = trigger.matchStyles(toState.value, toState.params, errors);
3731
                if (errors.length) {
3732
                    this._engine.reportError(errors);
3733
                }
3734
                else {
3735
                    this._engine.afterFlush(function () {
3736
                        eraseStyles(element, fromStyles_1);
3737
                        setStyles(element, toStyles_1);
3738
                    });
3739
                }
3740
            }
3741
            return;
3742
        }
3743
        var playersOnElement = getOrSetAsInMap(this._engine.playersByElement, element, []);
3744
        playersOnElement.forEach(function (player) {
3745
            // only remove the player if it is queued on the EXACT same trigger/namespace
3746
            // we only also deal with queued players here because if the animation has
3747
            // started then we want to keep the player alive until the flush happens
3748
            // (which is where the previousPlayers are passed into the new palyer)
3749
            if (player.namespaceId == _this.id && player.triggerName == triggerName && player.queued) {
3750
                player.destroy();
3751
            }
3752
        });
3753
        var transition = trigger.matchTransition(fromState.value, toState.value, element, toState.params);
3754
        var isFallbackTransition = false;
3755
        if (!transition) {
3756
            if (!defaultToFallback)
3757
                return;
3758
            transition = trigger.fallbackTransition;
3759
            isFallbackTransition = true;
3760
        }
3761
        this._engine.totalQueuedPlayers++;
3762
        this._queue.push({ element: element, triggerName: triggerName, transition: transition, fromState: fromState, toState: toState, player: player, isFallbackTransition: isFallbackTransition });
3763
        if (!isFallbackTransition) {
3764
            addClass(element, QUEUED_CLASSNAME);
3765
            player.onStart(function () { removeClass(element, QUEUED_CLASSNAME); });
3766
        }
3767
        player.onDone(function () {
3768
            var index = _this.players.indexOf(player);
3769
            if (index >= 0) {
3770
                _this.players.splice(index, 1);
3771
            }
3772
            var players = _this._engine.playersByElement.get(element);
3773
            if (players) {
3774
                var index_1 = players.indexOf(player);
3775
                if (index_1 >= 0) {
3776
                    players.splice(index_1, 1);
3777
                }
3778
            }
3779
        });
3780
        this.players.push(player);
3781
        playersOnElement.push(player);
3782
        return player;
3783
    };
3784
    AnimationTransitionNamespace.prototype.deregister = function (name) {
3785
        var _this = this;
3786
        delete this._triggers[name];
3787
        this._engine.statesByElement.forEach(function (stateMap, element) { delete stateMap[name]; });
3788
        this._elementListeners.forEach(function (listeners, element) {
3789
            _this._elementListeners.set(element, listeners.filter(function (entry) { return entry.name != name; }));
3790
        });
3791
    };
3792
    AnimationTransitionNamespace.prototype.clearElementCache = function (element) {
3793
        this._engine.statesByElement.delete(element);
3794
        this._elementListeners.delete(element);
3795
        var elementPlayers = this._engine.playersByElement.get(element);
3796
        if (elementPlayers) {
3797
            elementPlayers.forEach(function (player) { return player.destroy(); });
3798
            this._engine.playersByElement.delete(element);
3799
        }
3800
    };
3801
    AnimationTransitionNamespace.prototype._signalRemovalForInnerTriggers = function (rootElement, context, animate) {
3802
        var _this = this;
3803
        if (animate === void 0) { animate = false; }
3804
        // emulate a leave animation for all inner nodes within this node.
3805
        // If there are no animations found for any of the nodes then clear the cache
3806
        // for the element.
3807
        this._engine.driver.query(rootElement, NG_TRIGGER_SELECTOR, true).forEach(function (elm) {
3808
            // this means that an inner remove() operation has already kicked off
3809
            // the animation on this element...
3810
            if (elm[REMOVAL_FLAG])
3811
                return;
3812
            var namespaces = _this._engine.fetchNamespacesByElement(elm);
3813
            if (namespaces.size) {
3814
                namespaces.forEach(function (ns) { return ns.triggerLeaveAnimation(elm, context, false, true); });
3815
            }
3816
            else {
3817
                _this.clearElementCache(elm);
3818
            }
3819
        });
3820
    };
3821
    AnimationTransitionNamespace.prototype.triggerLeaveAnimation = function (element, context, destroyAfterComplete, defaultToFallback) {
3822
        var _this = this;
3823
        var triggerStates = this._engine.statesByElement.get(element);
3824
        if (triggerStates) {
3825
            var players_1 = [];
3826
            Object.keys(triggerStates).forEach(function (triggerName) {
3827
                // this check is here in the event that an element is removed
3828
                // twice (both on the host level and the component level)
3829
                if (_this._triggers[triggerName]) {
3830
                    var player = _this.trigger(element, triggerName, VOID_VALUE, defaultToFallback);
3831
                    if (player) {
3832
                        players_1.push(player);
3833
                    }
3834
                }
3835
            });
3836
            if (players_1.length) {
3837
                this._engine.markElementAsRemoved(this.id, element, true, context);
3838
                if (destroyAfterComplete) {
3839
                    optimizeGroupPlayer(players_1).onDone(function () { return _this._engine.processLeaveNode(element); });
3840
                }
3841
                return true;
3842
            }
3843
        }
3844
        return false;
3845
    };
3846
    AnimationTransitionNamespace.prototype.prepareLeaveAnimationListeners = function (element) {
3847
        var _this = this;
3848
        var listeners = this._elementListeners.get(element);
3849
        if (listeners) {
3850
            var visitedTriggers_1 = new Set();
3851
            listeners.forEach(function (listener) {
3852
                var triggerName = listener.name;
3853
                if (visitedTriggers_1.has(triggerName))
3854
                    return;
3855
                visitedTriggers_1.add(triggerName);
3856
                var trigger = _this._triggers[triggerName];
3857
                var transition = trigger.fallbackTransition;
3858
                var elementStates = (_this._engine.statesByElement.get(element));
3859
                var fromState = elementStates[triggerName] || DEFAULT_STATE_VALUE;
3860
                var toState = new StateValue(VOID_VALUE);
3861
                var player = new TransitionAnimationPlayer(_this.id, triggerName, element);
3862
                _this._engine.totalQueuedPlayers++;
3863
                _this._queue.push({
3864
                    element: element,
3865
                    triggerName: triggerName,
3866
                    transition: transition,
3867
                    fromState: fromState,
3868
                    toState: toState,
3869
                    player: player,
3870
                    isFallbackTransition: true
3871
                });
3872
            });
3873
        }
3874
    };
3875
    AnimationTransitionNamespace.prototype.removeNode = function (element, context) {
3876
        var _this = this;
3877
        var engine = this._engine;
3878
        if (element.childElementCount) {
3879
            this._signalRemovalForInnerTriggers(element, context, true);
3880
        }
3881
        // this means that a * => VOID animation was detected and kicked off
3882
        if (this.triggerLeaveAnimation(element, context, true))
3883
            return;
3884
        // find the player that is animating and make sure that the
3885
        // removal is delayed until that player has completed
3886
        var containsPotentialParentTransition = false;
3887
        if (engine.totalAnimations) {
3888
            var currentPlayers = engine.players.length ? engine.playersByQueriedElement.get(element) : [];
3889
            // when this `if statement` does not continue forward it means that
3890
            // a previous animation query has selected the current element and
3891
            // is animating it. In this situation want to continue forwards and
3892
            // allow the element to be queued up for animation later.
3893
            if (currentPlayers && currentPlayers.length) {
3894
                containsPotentialParentTransition = true;
3895
            }
3896
            else {
3897
                var parent_1 = element;
3898
                while (parent_1 = parent_1.parentNode) {
3899
                    var triggers = engine.statesByElement.get(parent_1);
3900
                    if (triggers) {
3901
                        containsPotentialParentTransition = true;
3902
                        break;
3903
                    }
3904
                }
3905
            }
3906
        }
3907
        // at this stage we know that the element will either get removed
3908
        // during flush or will be picked up by a parent query. Either way
3909
        // we need to fire the listeners for this element when it DOES get
3910
        // removed (once the query parent animation is done or after flush)
3911
        this.prepareLeaveAnimationListeners(element);
3912
        // whether or not a parent has an animation we need to delay the deferral of the leave
3913
        // operation until we have more information (which we do after flush() has been called)
3914
        if (containsPotentialParentTransition) {
3915
            engine.markElementAsRemoved(this.id, element, false, context);
3916
        }
3917
        else {
3918
            // we do this after the flush has occurred such
3919
            // that the callbacks can be fired
3920
            engine.afterFlush(function () { return _this.clearElementCache(element); });
3921
            engine.destroyInnerAnimations(element);
3922
            engine._onRemovalComplete(element, context);
3923
        }
3924
    };
3925
    AnimationTransitionNamespace.prototype.insertNode = function (element, parent) { addClass(element, this._hostClassName); };
3926
    AnimationTransitionNamespace.prototype.drainQueuedTransitions = function (microtaskId) {
3927
        var _this = this;
3928
        var instructions = [];
3929
        this._queue.forEach(function (entry) {
3930
            var player = entry.player;
3931
            if (player.destroyed)
3932
                return;
3933
            var element = entry.element;
3934
            var listeners = _this._elementListeners.get(element);
3935
            if (listeners) {
3936
                listeners.forEach(function (listener) {
3937
                    if (listener.name == entry.triggerName) {
3938
                        var baseEvent = makeAnimationEvent(element, entry.triggerName, entry.fromState.value, entry.toState.value);
3939
                        baseEvent['_data'] = microtaskId;
3940
                        listenOnPlayer(entry.player, listener.phase, baseEvent, listener.callback);
3941
                    }
3942
                });
3943
            }
3944
            if (player.markedForDestroy) {
3945
                _this._engine.afterFlush(function () {
3946
                    // now we can destroy the element properly since the event listeners have
3947
                    // been bound to the player
3948
                    player.destroy();
3949
                });
3950
            }
3951
            else {
3952
                instructions.push(entry);
3953
            }
3954
        });
3955
        this._queue = [];
3956
        return instructions.sort(function (a, b) {
3957
            // if depCount == 0 them move to front
3958
            // otherwise if a contains b then move back
3959
            var d0 = a.transition.ast.depCount;
3960
            var d1 = b.transition.ast.depCount;
3961
            if (d0 == 0 || d1 == 0) {
3962
                return d0 - d1;
3963
            }
3964
            return _this._engine.driver.containsElement(a.element, b.element) ? 1 : -1;
3965
        });
3966
    };
3967
    AnimationTransitionNamespace.prototype.destroy = function (context) {
3968
        this.players.forEach(function (p) { return p.destroy(); });
3969
        this._signalRemovalForInnerTriggers(this.hostElement, context);
3970
    };
3971
    AnimationTransitionNamespace.prototype.elementContainsData = function (element) {
3972
        var containsData = false;
3973
        if (this._elementListeners.has(element))
3974
            containsData = true;
3975
        containsData =
3976
            (this._queue.find(function (entry) { return entry.element === element; }) ? true : false) || containsData;
3977
        return containsData;
3978
    };
3979
    return AnimationTransitionNamespace;
3980
}());
3981
var TransitionAnimationEngine = /** @class */ (function () {
3982
    function TransitionAnimationEngine(driver, _normalizer) {
3983
        this.driver = driver;
3984
        this._normalizer = _normalizer;
3985
        this.players = [];
3986
        this.newHostElements = new Map();
3987
        this.playersByElement = new Map();
3988
        this.playersByQueriedElement = new Map();
3989
        this.statesByElement = new Map();
3990
        this.disabledNodes = new Set();
3991
        this.totalAnimations = 0;
3992
        this.totalQueuedPlayers = 0;
3993
        this._namespaceLookup = {};
3994
        this._namespaceList = [];
3995
        this._flushFns = [];
3996
        this._whenQuietFns = [];
3997
        this.namespacesByHostElement = new Map();
3998
        this.collectedEnterElements = [];
3999
        this.collectedLeaveElements = [];
4000
        // this method is designed to be overridden by the code that uses this engine
4001
        this.onRemovalComplete = function (element, context) { };
4002
    }
4003
    /** @internal */
4004
    /** @internal */
4005
    TransitionAnimationEngine.prototype._onRemovalComplete = /** @internal */
4006
    function (element, context) { this.onRemovalComplete(element, context); };
4007
    Object.defineProperty(TransitionAnimationEngine.prototype, "queuedPlayers", {
4008
        get: function () {
4009
            var players = [];
4010
            this._namespaceList.forEach(function (ns) {
4011
                ns.players.forEach(function (player) {
4012
                    if (player.queued) {
4013
                        players.push(player);
4014
                    }
4015
                });
4016
            });
4017
            return players;
4018
        },
4019
        enumerable: true,
4020
        configurable: true
4021
    });
4022
    TransitionAnimationEngine.prototype.createNamespace = function (namespaceId, hostElement) {
4023
        var ns = new AnimationTransitionNamespace(namespaceId, hostElement, this);
4024
        if (hostElement.parentNode) {
4025
            this._balanceNamespaceList(ns, hostElement);
4026
        }
4027
        else {
4028
            // defer this later until flush during when the host element has
4029
            // been inserted so that we know exactly where to place it in
4030
            // the namespace list
4031
            this.newHostElements.set(hostElement, ns);
4032
            // given that this host element is apart of the animation code, it
4033
            // may or may not be inserted by a parent node that is an of an
4034
            // animation renderer type. If this happens then we can still have
4035
            // access to this item when we query for :enter nodes. If the parent
4036
            // is a renderer then the set data-structure will normalize the entry
4037
            this.collectEnterElement(hostElement);
4038
        }
4039
        return this._namespaceLookup[namespaceId] = ns;
4040
    };
4041
    TransitionAnimationEngine.prototype._balanceNamespaceList = function (ns, hostElement) {
4042
        var limit = this._namespaceList.length - 1;
4043
        if (limit >= 0) {
4044
            var found = false;
4045
            for (var i = limit; i >= 0; i--) {
4046
                var nextNamespace = this._namespaceList[i];
4047
                if (this.driver.containsElement(nextNamespace.hostElement, hostElement)) {
4048
                    this._namespaceList.splice(i + 1, 0, ns);
4049
                    found = true;
4050
                    break;
4051
                }
4052
            }
4053
            if (!found) {
4054
                this._namespaceList.splice(0, 0, ns);
4055
            }
4056
        }
4057
        else {
4058
            this._namespaceList.push(ns);
4059
        }
4060
        this.namespacesByHostElement.set(hostElement, ns);
4061
        return ns;
4062
    };
4063
    TransitionAnimationEngine.prototype.register = function (namespaceId, hostElement) {
4064
        var ns = this._namespaceLookup[namespaceId];
4065
        if (!ns) {
4066
            ns = this.createNamespace(namespaceId, hostElement);
4067
        }
4068
        return ns;
4069
    };
4070
    TransitionAnimationEngine.prototype.registerTrigger = function (namespaceId, name, trigger) {
4071
        var ns = this._namespaceLookup[namespaceId];
4072
        if (ns && ns.register(name, trigger)) {
4073
            this.totalAnimations++;
4074
        }
4075
    };
4076
    TransitionAnimationEngine.prototype.destroy = function (namespaceId, context) {
4077
        var _this = this;
4078
        if (!namespaceId)
4079
            return;
4080
        var ns = this._fetchNamespace(namespaceId);
4081
        this.afterFlush(function () {
4082
            _this.namespacesByHostElement.delete(ns.hostElement);
4083
            delete _this._namespaceLookup[namespaceId];
4084
            var index = _this._namespaceList.indexOf(ns);
4085
            if (index >= 0) {
4086
                _this._namespaceList.splice(index, 1);
4087
            }
4088
        });
4089
        this.afterFlushAnimationsDone(function () { return ns.destroy(context); });
4090
    };
4091
    TransitionAnimationEngine.prototype._fetchNamespace = function (id) { return this._namespaceLookup[id]; };
4092
    TransitionAnimationEngine.prototype.fetchNamespacesByElement = function (element) {
4093
        // normally there should only be one namespace per element, however
4094
        // if @triggers are placed on both the component element and then
4095
        // its host element (within the component code) then there will be
4096
        // two namespaces returned. We use a set here to simply the dedupe
4097
        // of namespaces incase there are multiple triggers both the elm and host
4098
        var namespaces = new Set();
4099
        var elementStates = this.statesByElement.get(element);
4100
        if (elementStates) {
4101
            var keys = Object.keys(elementStates);
4102
            for (var i = 0; i < keys.length; i++) {
4103
                var nsId = elementStates[keys[i]].namespaceId;
4104
                if (nsId) {
4105
                    var ns = this._fetchNamespace(nsId);
4106
                    if (ns) {
4107
                        namespaces.add(ns);
4108
                    }
4109
                }
4110
            }
4111
        }
4112
        return namespaces;
4113
    };
4114
    TransitionAnimationEngine.prototype.trigger = function (namespaceId, element, name, value) {
4115
        if (isElementNode(element)) {
4116
            var ns = this._fetchNamespace(namespaceId);
4117
            if (ns) {
4118
                ns.trigger(element, name, value);
4119
                return true;
4120
            }
4121
        }
4122
        return false;
4123
    };
4124
    TransitionAnimationEngine.prototype.insertNode = function (namespaceId, element, parent, insertBefore) {
4125
        if (!isElementNode(element))
4126
            return;
4127
        // special case for when an element is removed and reinserted (move operation)
4128
        // when this occurs we do not want to use the element for deletion later
4129
        var details = element[REMOVAL_FLAG];
4130
        if (details && details.setForRemoval) {
4131
            details.setForRemoval = false;
4132
            details.setForMove = true;
4133
            var index = this.collectedLeaveElements.indexOf(element);
4134
            if (index >= 0) {
4135
                this.collectedLeaveElements.splice(index, 1);
4136
            }
4137
        }
4138
        // in the event that the namespaceId is blank then the caller
4139
        // code does not contain any animation code in it, but it is
4140
        // just being called so that the node is marked as being inserted
4141
        if (namespaceId) {
4142
            var ns = this._fetchNamespace(namespaceId);
4143
            // This if-statement is a workaround for router issue #21947.
4144
            // The router sometimes hits a race condition where while a route
4145
            // is being instantiated a new navigation arrives, triggering leave
4146
            // animation of DOM that has not been fully initialized, until this
4147
            // is resolved, we need to handle the scenario when DOM is not in a
4148
            // consistent state during the animation.
4149
            if (ns) {
4150
                ns.insertNode(element, parent);
4151
            }
4152
        }
4153
        // only *directives and host elements are inserted before
4154
        if (insertBefore) {
4155
            this.collectEnterElement(element);
4156
        }
4157
    };
4158
    TransitionAnimationEngine.prototype.collectEnterElement = function (element) { this.collectedEnterElements.push(element); };
4159
    TransitionAnimationEngine.prototype.markElementAsDisabled = function (element, value) {
4160
        if (value) {
4161
            if (!this.disabledNodes.has(element)) {
4162
                this.disabledNodes.add(element);
4163
                addClass(element, DISABLED_CLASSNAME);
4164
            }
4165
        }
4166
        else if (this.disabledNodes.has(element)) {
4167
            this.disabledNodes.delete(element);
4168
            removeClass(element, DISABLED_CLASSNAME);
4169
        }
4170
    };
4171
    TransitionAnimationEngine.prototype.removeNode = function (namespaceId, element, context) {
4172
        if (!isElementNode(element)) {
4173
            this._onRemovalComplete(element, context);
4174
            return;
4175
        }
4176
        var ns = namespaceId ? this._fetchNamespace(namespaceId) : null;
4177
        if (ns) {
4178
            ns.removeNode(element, context);
4179
        }
4180
        else {
4181
            this.markElementAsRemoved(namespaceId, element, false, context);
4182
        }
4183
    };
4184
    TransitionAnimationEngine.prototype.markElementAsRemoved = function (namespaceId, element, hasAnimation, context) {
4185
        this.collectedLeaveElements.push(element);
4186
        element[REMOVAL_FLAG] = {
4187
            namespaceId: namespaceId,
4188
            setForRemoval: context, hasAnimation: hasAnimation,
4189
            removedBeforeQueried: false
4190
        };
4191
    };
4192
    TransitionAnimationEngine.prototype.listen = function (namespaceId, element, name, phase, callback) {
4193
        if (isElementNode(element)) {
4194
            return this._fetchNamespace(namespaceId).listen(element, name, phase, callback);
4195
        }
4196
        return function () { };
4197
    };
4198
    TransitionAnimationEngine.prototype._buildInstruction = function (entry, subTimelines, enterClassName, leaveClassName) {
4199
        return entry.transition.build(this.driver, entry.element, entry.fromState.value, entry.toState.value, enterClassName, leaveClassName, entry.fromState.options, entry.toState.options, subTimelines);
4200
    };
4201
    TransitionAnimationEngine.prototype.destroyInnerAnimations = function (containerElement) {
4202
        var _this = this;
4203
        var elements = this.driver.query(containerElement, NG_TRIGGER_SELECTOR, true);
4204
        elements.forEach(function (element) { return _this.destroyActiveAnimationsForElement(element); });
4205
        if (this.playersByQueriedElement.size == 0)
4206
            return;
4207
        elements = this.driver.query(containerElement, NG_ANIMATING_SELECTOR, true);
4208
        elements.forEach(function (element) { return _this.finishActiveQueriedAnimationOnElement(element); });
4209
    };
4210
    TransitionAnimationEngine.prototype.destroyActiveAnimationsForElement = function (element) {
4211
        var players = this.playersByElement.get(element);
4212
        if (players) {
4213
            players.forEach(function (player) {
4214
                // special case for when an element is set for destruction, but hasn't started.
4215
                // in this situation we want to delay the destruction until the flush occurs
4216
                // so that any event listeners attached to the player are triggered.
4217
                if (player.queued) {
4218
                    player.markedForDestroy = true;
4219
                }
4220
                else {
4221
                    player.destroy();
4222
                }
4223
            });
4224
        }
4225
        var stateMap = this.statesByElement.get(element);
4226
        if (stateMap) {
4227
            Object.keys(stateMap).forEach(function (triggerName) { return stateMap[triggerName] = DELETED_STATE_VALUE; });
4228
        }
4229
    };
4230
    TransitionAnimationEngine.prototype.finishActiveQueriedAnimationOnElement = function (element) {
4231
        var players = this.playersByQueriedElement.get(element);
4232
        if (players) {
4233
            players.forEach(function (player) { return player.finish(); });
4234
        }
4235
    };
4236
    TransitionAnimationEngine.prototype.whenRenderingDone = function () {
4237
        var _this = this;
4238
        return new Promise(function (resolve) {
4239
            if (_this.players.length) {
4240
                return optimizeGroupPlayer(_this.players).onDone(function () { return resolve(); });
4241
            }
4242
            else {
4243
                resolve();
4244
            }
4245
        });
4246
    };
4247
    TransitionAnimationEngine.prototype.processLeaveNode = function (element) {
4248
        var _this = this;
4249
        var details = element[REMOVAL_FLAG];
4250
        if (details && details.setForRemoval) {
4251
            // this will prevent it from removing it twice
4252
            element[REMOVAL_FLAG] = NULL_REMOVAL_STATE;
4253
            if (details.namespaceId) {
4254
                this.destroyInnerAnimations(element);
4255
                var ns = this._fetchNamespace(details.namespaceId);
4256
                if (ns) {
4257
                    ns.clearElementCache(element);
4258
                }
4259
            }
4260
            this._onRemovalComplete(element, details.setForRemoval);
4261
        }
4262
        if (this.driver.matchesElement(element, DISABLED_SELECTOR)) {
4263
            this.markElementAsDisabled(element, false);
4264
        }
4265
        this.driver.query(element, DISABLED_SELECTOR, true).forEach(function (node) {
4266
            _this.markElementAsDisabled(element, false);
4267
        });
4268
    };
4269
    TransitionAnimationEngine.prototype.flush = function (microtaskId) {
4270
        var _this = this;
4271
        if (microtaskId === void 0) { microtaskId = -1; }
4272
        var players = [];
4273
        if (this.newHostElements.size) {
4274
            this.newHostElements.forEach(function (ns, element) { return _this._balanceNamespaceList(ns, element); });
4275
            this.newHostElements.clear();
4276
        }
4277
        if (this.totalAnimations && this.collectedEnterElements.length) {
4278
            for (var i = 0; i < this.collectedEnterElements.length; i++) {
4279
                var elm = this.collectedEnterElements[i];
4280
                addClass(elm, STAR_CLASSNAME);
4281
            }
4282
        }
4283
        if (this._namespaceList.length &&
4284
            (this.totalQueuedPlayers || this.collectedLeaveElements.length)) {
4285
            var cleanupFns = [];
4286
            try {
4287
                players = this._flushAnimations(cleanupFns, microtaskId);
4288
            }
4289
            finally {
4290
                for (var i = 0; i < cleanupFns.length; i++) {
4291
                    cleanupFns[i]();
4292
                }
4293
            }
4294
        }
4295
        else {
4296
            for (var i = 0; i < this.collectedLeaveElements.length; i++) {
4297
                var element = this.collectedLeaveElements[i];
4298
                this.processLeaveNode(element);
4299
            }
4300
        }
4301
        this.totalQueuedPlayers = 0;
4302
        this.collectedEnterElements.length = 0;
4303
        this.collectedLeaveElements.length = 0;
4304
        this._flushFns.forEach(function (fn) { return fn(); });
4305
        this._flushFns = [];
4306
        if (this._whenQuietFns.length) {
4307
            // we move these over to a variable so that
4308
            // if any new callbacks are registered in another
4309
            // flush they do not populate the existing set
4310
            var quietFns_1 = this._whenQuietFns;
4311
            this._whenQuietFns = [];
4312
            if (players.length) {
4313
                optimizeGroupPlayer(players).onDone(function () { quietFns_1.forEach(function (fn) { return fn(); }); });
4314
            }
4315
            else {
4316
                quietFns_1.forEach(function (fn) { return fn(); });
4317
            }
4318
        }
4319
    };
4320
    TransitionAnimationEngine.prototype.reportError = function (errors) {
4321
        throw new Error("Unable to process animations due to the following failed trigger transitions\n " + errors.join('\n'));
4322
    };
4323
    TransitionAnimationEngine.prototype._flushAnimations = function (cleanupFns, microtaskId) {
4324
        var _this = this;
4325
        var subTimelines = new ElementInstructionMap();
4326
        var skippedPlayers = [];
4327
        var skippedPlayersMap = new Map();
4328
        var queuedInstructions = [];
4329
        var queriedElements = new Map();
4330
        var allPreStyleElements = new Map();
4331
        var allPostStyleElements = new Map();
4332
        var disabledElementsSet = new Set();
4333
        this.disabledNodes.forEach(function (node) {
4334
            disabledElementsSet.add(node);
4335
            var nodesThatAreDisabled = _this.driver.query(node, QUEUED_SELECTOR, true);
4336
            for (var i_1 = 0; i_1 < nodesThatAreDisabled.length; i_1++) {
4337
                disabledElementsSet.add(nodesThatAreDisabled[i_1]);
4338
            }
4339
        });
4340
        var bodyNode = getBodyNode();
4341
        var allTriggerElements = Array.from(this.statesByElement.keys());
4342
        var enterNodeMap = buildRootMap(allTriggerElements, this.collectedEnterElements);
4343
        // this must occur before the instructions are built below such that
4344
        // the :enter queries match the elements (since the timeline queries
4345
        // are fired during instruction building).
4346
        var enterNodeMapIds = new Map();
4347
        var i = 0;
4348
        enterNodeMap.forEach(function (nodes, root) {
4349
            var className = ENTER_CLASSNAME + i++;
4350
            enterNodeMapIds.set(root, className);
4351
            nodes.forEach(function (node) { return addClass(node, className); });
4352
        });
4353
        var allLeaveNodes = [];
4354
        var mergedLeaveNodes = new Set();
4355
        var leaveNodesWithoutAnimations = new Set();
4356
        for (var i_2 = 0; i_2 < this.collectedLeaveElements.length; i_2++) {
4357
            var element = this.collectedLeaveElements[i_2];
4358
            var details = element[REMOVAL_FLAG];
4359
            if (details && details.setForRemoval) {
4360
                allLeaveNodes.push(element);
4361
                mergedLeaveNodes.add(element);
4362
                if (details.hasAnimation) {
4363
                    this.driver.query(element, STAR_SELECTOR, true).forEach(function (elm) { return mergedLeaveNodes.add(elm); });
4364
                }
4365
                else {
4366
                    leaveNodesWithoutAnimations.add(element);
4367
                }
4368
            }
4369
        }
4370
        var leaveNodeMapIds = new Map();
4371
        var leaveNodeMap = buildRootMap(allTriggerElements, Array.from(mergedLeaveNodes));
4372
        leaveNodeMap.forEach(function (nodes, root) {
4373
            var className = LEAVE_CLASSNAME + i++;
4374
            leaveNodeMapIds.set(root, className);
4375
            nodes.forEach(function (node) { return addClass(node, className); });
4376
        });
4377
        cleanupFns.push(function () {
4378
            enterNodeMap.forEach(function (nodes, root) {
4379
                var className = (enterNodeMapIds.get(root));
4380
                nodes.forEach(function (node) { return removeClass(node, className); });
4381
            });
4382
            leaveNodeMap.forEach(function (nodes, root) {
4383
                var className = (leaveNodeMapIds.get(root));
4384
                nodes.forEach(function (node) { return removeClass(node, className); });
4385
            });
4386
            allLeaveNodes.forEach(function (element) { _this.processLeaveNode(element); });
4387
        });
4388
        var allPlayers = [];
4389
        var erroneousTransitions = [];
4390
        for (var i_3 = this._namespaceList.length - 1; i_3 >= 0; i_3--) {
4391
            var ns = this._namespaceList[i_3];
4392
            ns.drainQueuedTransitions(microtaskId).forEach(function (entry) {
4393
                var player = entry.player;
4394
                var element = entry.element;
4395
                allPlayers.push(player);
4396
                if (_this.collectedEnterElements.length) {
4397
                    var details = element[REMOVAL_FLAG];
4398
                    // move animations are currently not supported...
4399
                    if (details && details.setForMove) {
4400
                        player.destroy();
4401
                        return;
4402
                    }
4403
                }
4404
                if (!bodyNode || !_this.driver.containsElement(bodyNode, element)) {
4405
                    player.destroy();
4406
                    return;
4407
                }
4408
                var leaveClassName = (leaveNodeMapIds.get(element));
4409
                var enterClassName = (enterNodeMapIds.get(element));
4410
                var instruction = (_this._buildInstruction(entry, subTimelines, enterClassName, leaveClassName));
4411
                if (instruction.errors && instruction.errors.length) {
4412
                    erroneousTransitions.push(instruction);
4413
                    return;
4414
                }
4415
                // if a unmatched transition is queued to go then it SHOULD NOT render
4416
                // an animation and cancel the previously running animations.
4417
                if (entry.isFallbackTransition) {
4418
                    player.onStart(function () { return eraseStyles(element, instruction.fromStyles); });
4419
                    player.onDestroy(function () { return setStyles(element, instruction.toStyles); });
4420
                    skippedPlayers.push(player);
4421
                    return;
4422
                }
4423
                // this means that if a parent animation uses this animation as a sub trigger
4424
                // then it will instruct the timeline builder to not add a player delay, but
4425
                // instead stretch the first keyframe gap up until the animation starts. The
4426
                // reason this is important is to prevent extra initialization styles from being
4427
                // required by the user in the animation.
4428
                instruction.timelines.forEach(function (tl) { return tl.stretchStartingKeyframe = true; });
4429
                subTimelines.append(element, instruction.timelines);
4430
                var tuple = { instruction: instruction, player: player, element: element };
4431
                queuedInstructions.push(tuple);
4432
                instruction.queriedElements.forEach(function (element) { return getOrSetAsInMap(queriedElements, element, []).push(player); });
4433
                instruction.preStyleProps.forEach(function (stringMap, element) {
4434
                    var props = Object.keys(stringMap);
4435
                    if (props.length) {
4436
                        var setVal_1 = (allPreStyleElements.get(element));
4437
                        if (!setVal_1) {
4438
                            allPreStyleElements.set(element, setVal_1 = new Set());
4439
                        }
4440
                        props.forEach(function (prop) { return setVal_1.add(prop); });
4441
                    }
4442
                });
4443
                instruction.postStyleProps.forEach(function (stringMap, element) {
4444
                    var props = Object.keys(stringMap);
4445
                    var setVal = (allPostStyleElements.get(element));
4446
                    if (!setVal) {
4447
                        allPostStyleElements.set(element, setVal = new Set());
4448
                    }
4449
                    props.forEach(function (prop) { return setVal.add(prop); });
4450
                });
4451
            });
4452
        }
4453
        if (erroneousTransitions.length) {
4454
            var errors_1 = [];
4455
            erroneousTransitions.forEach(function (instruction) {
4456
                errors_1.push("@" + instruction.triggerName + " has failed due to:\n");
4457
                instruction.errors.forEach(function (error) { return errors_1.push("- " + error + "\n"); });
4458
            });
4459
            allPlayers.forEach(function (player) { return player.destroy(); });
4460
            this.reportError(errors_1);
4461
        }
4462
        var allPreviousPlayersMap = new Map();
4463
        // this map works to tell which element in the DOM tree is contained by
4464
        // which animation. Further down below this map will get populated once
4465
        // the players are built and in doing so it can efficiently figure out
4466
        // if a sub player is skipped due to a parent player having priority.
4467
        var animationElementMap = new Map();
4468
        queuedInstructions.forEach(function (entry) {
4469
            var element = entry.element;
4470
            if (subTimelines.has(element)) {
4471
                animationElementMap.set(element, element);
4472
                _this._beforeAnimationBuild(entry.player.namespaceId, entry.instruction, allPreviousPlayersMap);
4473
            }
4474
        });
4475
        skippedPlayers.forEach(function (player) {
4476
            var element = player.element;
4477
            var previousPlayers = _this._getPreviousPlayers(element, false, player.namespaceId, player.triggerName, null);
4478
            previousPlayers.forEach(function (prevPlayer) {
4479
                getOrSetAsInMap(allPreviousPlayersMap, element, []).push(prevPlayer);
4480
                prevPlayer.destroy();
4481
            });
4482
        });
4483
        // this is a special case for nodes that will be removed (either by)
4484
        // having their own leave animations or by being queried in a container
4485
        // that will be removed once a parent animation is complete. The idea
4486
        // here is that * styles must be identical to ! styles because of
4487
        // backwards compatibility (* is also filled in by default in many places).
4488
        // Otherwise * styles will return an empty value or auto since the element
4489
        // that is being getComputedStyle'd will not be visible (since * = destination)
4490
        var replaceNodes = allLeaveNodes.filter(function (node) {
4491
            return replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements);
4492
        });
4493
        // POST STAGE: fill the * styles
4494
        var postStylesMap = new Map();
4495
        var allLeaveQueriedNodes = cloakAndComputeStyles(postStylesMap, this.driver, leaveNodesWithoutAnimations, allPostStyleElements, _angular_animations__WEBPACK_IMPORTED_MODULE_0__["AUTO_STYLE"]);
4496
        allLeaveQueriedNodes.forEach(function (node) {
4497
            if (replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements)) {
4498
                replaceNodes.push(node);
4499
            }
4500
        });
4501
        // PRE STAGE: fill the ! styles
4502
        var preStylesMap = new Map();
4503
        enterNodeMap.forEach(function (nodes, root) {
4504
            cloakAndComputeStyles(preStylesMap, _this.driver, new Set(nodes), allPreStyleElements, _angular_animations__WEBPACK_IMPORTED_MODULE_0__["ɵPRE_STYLE"]);
4505
        });
4506
        replaceNodes.forEach(function (node) {
4507
            var post = postStylesMap.get(node);
4508
            var pre = preStylesMap.get(node);
4509
            postStylesMap.set(node, Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__assign"])({}, post, pre));
4510
        });
4511
        var rootPlayers = [];
4512
        var subPlayers = [];
4513
        var NO_PARENT_ANIMATION_ELEMENT_DETECTED = {};
4514
        queuedInstructions.forEach(function (entry) {
4515
            var element = entry.element, player = entry.player, instruction = entry.instruction;
4516
            // this means that it was never consumed by a parent animation which
4517
            // means that it is independent and therefore should be set for animation
4518
            if (subTimelines.has(element)) {
4519
                if (disabledElementsSet.has(element)) {
4520
                    player.onDestroy(function () { return setStyles(element, instruction.toStyles); });
4521
                    player.disabled = true;
4522
                    player.overrideTotalTime(instruction.totalTime);
4523
                    skippedPlayers.push(player);
4524
                    return;
4525
                }
4526
                // this will flow up the DOM and query the map to figure out
4527
                // if a parent animation has priority over it. In the situation
4528
                // that a parent is detected then it will cancel the loop. If
4529
                // nothing is detected, or it takes a few hops to find a parent,
4530
                // then it will fill in the missing nodes and signal them as having
4531
                // a detected parent (or a NO_PARENT value via a special constant).
4532
                var parentWithAnimation_1 = NO_PARENT_ANIMATION_ELEMENT_DETECTED;
4533
                if (animationElementMap.size > 1) {
4534
                    var elm = element;
4535
                    var parentsToAdd = [];
4536
                    while (elm = elm.parentNode) {
4537
                        var detectedParent = animationElementMap.get(elm);
4538
                        if (detectedParent) {
4539
                            parentWithAnimation_1 = detectedParent;
4540
                            break;
4541
                        }
4542
                        parentsToAdd.push(elm);
4543
                    }
4544
                    parentsToAdd.forEach(function (parent) { return animationElementMap.set(parent, parentWithAnimation_1); });
4545
                }
4546
                var innerPlayer = _this._buildAnimation(player.namespaceId, instruction, allPreviousPlayersMap, skippedPlayersMap, preStylesMap, postStylesMap);
4547
                player.setRealPlayer(innerPlayer);
4548
                if (parentWithAnimation_1 === NO_PARENT_ANIMATION_ELEMENT_DETECTED) {
4549
                    rootPlayers.push(player);
4550
                }
4551
                else {
4552
                    var parentPlayers = _this.playersByElement.get(parentWithAnimation_1);
4553
                    if (parentPlayers && parentPlayers.length) {
4554
                        player.parentPlayer = optimizeGroupPlayer(parentPlayers);
4555
                    }
4556
                    skippedPlayers.push(player);
4557
                }
4558
            }
4559
            else {
4560
                eraseStyles(element, instruction.fromStyles);
4561
                player.onDestroy(function () { return setStyles(element, instruction.toStyles); });
4562
                // there still might be a ancestor player animating this
4563
                // element therefore we will still add it as a sub player
4564
                // even if its animation may be disabled
4565
                subPlayers.push(player);
4566
                if (disabledElementsSet.has(element)) {
4567
                    skippedPlayers.push(player);
4568
                }
4569
            }
4570
        });
4571
        // find all of the sub players' corresponding inner animation player
4572
        subPlayers.forEach(function (player) {
4573
            // even if any players are not found for a sub animation then it
4574
            // will still complete itself after the next tick since it's Noop
4575
            var playersForElement = skippedPlayersMap.get(player.element);
4576
            if (playersForElement && playersForElement.length) {
4577
                var innerPlayer = optimizeGroupPlayer(playersForElement);
4578
                player.setRealPlayer(innerPlayer);
4579
            }
4580
        });
4581
        // the reason why we don't actually play the animation is
4582
        // because all that a skipped player is designed to do is to
4583
        // fire the start/done transition callback events
4584
        skippedPlayers.forEach(function (player) {
4585
            if (player.parentPlayer) {
4586
                player.syncPlayerEvents(player.parentPlayer);
4587
            }
4588
            else {
4589
                player.destroy();
4590
            }
4591
        });
4592
        // run through all of the queued removals and see if they
4593
        // were picked up by a query. If not then perform the removal
4594
        // operation right away unless a parent animation is ongoing.
4595
        for (var i_4 = 0; i_4 < allLeaveNodes.length; i_4++) {
4596
            var element = allLeaveNodes[i_4];
4597
            var details = element[REMOVAL_FLAG];
4598
            removeClass(element, LEAVE_CLASSNAME);
4599
            // this means the element has a removal animation that is being
4600
            // taken care of and therefore the inner elements will hang around
4601
            // until that animation is over (or the parent queried animation)
4602
            if (details && details.hasAnimation)
4603
                continue;
4604
            var players = [];
4605
            // if this element is queried or if it contains queried children
4606
            // then we want for the element not to be removed from the page
4607
            // until the queried animations have finished
4608
            if (queriedElements.size) {
4609
                var queriedPlayerResults = queriedElements.get(element);
4610
                if (queriedPlayerResults && queriedPlayerResults.length) {
4611
                    players.push.apply(players, Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__spread"])(queriedPlayerResults));
4612
                }
4613
                var queriedInnerElements = this.driver.query(element, NG_ANIMATING_SELECTOR, true);
4614
                for (var j = 0; j < queriedInnerElements.length; j++) {
4615
                    var queriedPlayers = queriedElements.get(queriedInnerElements[j]);
4616
                    if (queriedPlayers && queriedPlayers.length) {
4617
                        players.push.apply(players, Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__spread"])(queriedPlayers));
4618
                    }
4619
                }
4620
            }
4621
            var activePlayers = players.filter(function (p) { return !p.destroyed; });
4622
            if (activePlayers.length) {
4623
                removeNodesAfterAnimationDone(this, element, activePlayers);
4624
            }
4625
            else {
4626
                this.processLeaveNode(element);
4627
            }
4628
        }
4629
        // this is required so the cleanup method doesn't remove them
4630
        allLeaveNodes.length = 0;
4631
        rootPlayers.forEach(function (player) {
4632
            _this.players.push(player);
4633
            player.onDone(function () {
4634
                player.destroy();
4635
                var index = _this.players.indexOf(player);
4636
                _this.players.splice(index, 1);
4637
            });
4638
            player.play();
4639
        });
4640
        return rootPlayers;
4641
    };
4642
    TransitionAnimationEngine.prototype.elementContainsData = function (namespaceId, element) {
4643
        var containsData = false;
4644
        var details = element[REMOVAL_FLAG];
4645
        if (details && details.setForRemoval)
4646
            containsData = true;
4647
        if (this.playersByElement.has(element))
4648
            containsData = true;
4649
        if (this.playersByQueriedElement.has(element))
4650
            containsData = true;
4651
        if (this.statesByElement.has(element))
4652
            containsData = true;
4653
        return this._fetchNamespace(namespaceId).elementContainsData(element) || containsData;
4654
    };
4655
    TransitionAnimationEngine.prototype.afterFlush = function (callback) { this._flushFns.push(callback); };
4656
    TransitionAnimationEngine.prototype.afterFlushAnimationsDone = function (callback) { this._whenQuietFns.push(callback); };
4657
    TransitionAnimationEngine.prototype._getPreviousPlayers = function (element, isQueriedElement, namespaceId, triggerName, toStateValue) {
4658
        var players = [];
4659
        if (isQueriedElement) {
4660
            var queriedElementPlayers = this.playersByQueriedElement.get(element);
4661
            if (queriedElementPlayers) {
4662
                players = queriedElementPlayers;
4663
            }
4664
        }
4665
        else {
4666
            var elementPlayers = this.playersByElement.get(element);
4667
            if (elementPlayers) {
4668
                var isRemovalAnimation_1 = !toStateValue || toStateValue == VOID_VALUE;
4669
                elementPlayers.forEach(function (player) {
4670
                    if (player.queued)
4671
                        return;
4672
                    if (!isRemovalAnimation_1 && player.triggerName != triggerName)
4673
                        return;
4674
                    players.push(player);
4675
                });
4676
            }
4677
        }
4678
        if (namespaceId || triggerName) {
4679
            players = players.filter(function (player) {
4680
                if (namespaceId && namespaceId != player.namespaceId)
4681
                    return false;
4682
                if (triggerName && triggerName != player.triggerName)
4683
                    return false;
4684
                return true;
4685
            });
4686
        }
4687
        return players;
4688
    };
4689
    TransitionAnimationEngine.prototype._beforeAnimationBuild = function (namespaceId, instruction, allPreviousPlayersMap) {
4690
        var triggerName = instruction.triggerName;
4691
        var rootElement = instruction.element;
4692
        // when a removal animation occurs, ALL previous players are collected
4693
        // and destroyed (even if they are outside of the current namespace)
4694
        var targetNameSpaceId = instruction.isRemovalTransition ? undefined : namespaceId;
4695
        var targetTriggerName = instruction.isRemovalTransition ? undefined : triggerName;
4696
        var _loop_1 = function (timelineInstruction) {
4697
            var element = timelineInstruction.element;
4698
            var isQueriedElement = element !== rootElement;
4699
            var players = getOrSetAsInMap(allPreviousPlayersMap, element, []);
4700
            var previousPlayers = this_1._getPreviousPlayers(element, isQueriedElement, targetNameSpaceId, targetTriggerName, instruction.toState);
4701
            previousPlayers.forEach(function (player) {
4702
                var realPlayer = player.getRealPlayer();
4703
                if (realPlayer.beforeDestroy) {
4704
                    realPlayer.beforeDestroy();
4705
                }
4706
                player.destroy();
4707
                players.push(player);
4708
            });
4709
        };
4710
        var this_1 = this;
4711
        try {
4712
            for (var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__values"])(instruction.timelines), _b = _a.next(); !_b.done; _b = _a.next()) {
4713
                var timelineInstruction = _b.value;
4714
                _loop_1(timelineInstruction);
4715
            }
4716
        }
4717
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
4718
        finally {
4719
            try {
4720
                if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
4721
            }
4722
            finally { if (e_1) throw e_1.error; }
4723
        }
4724
        // this needs to be done so that the PRE/POST styles can be
4725
        // computed properly without interfering with the previous animation
4726
        eraseStyles(rootElement, instruction.fromStyles);
4727
        var e_1, _c;
4728
    };
4729
    TransitionAnimationEngine.prototype._buildAnimation = function (namespaceId, instruction, allPreviousPlayersMap, skippedPlayersMap, preStylesMap, postStylesMap) {
4730
        var _this = this;
4731
        var triggerName = instruction.triggerName;
4732
        var rootElement = instruction.element;
4733
        // we first run this so that the previous animation player
4734
        // data can be passed into the successive animation players
4735
        var allQueriedPlayers = [];
4736
        var allConsumedElements = new Set();
4737
        var allSubElements = new Set();
4738
        var allNewPlayers = instruction.timelines.map(function (timelineInstruction) {
4739
            var element = timelineInstruction.element;
4740
            allConsumedElements.add(element);
4741
            // FIXME (matsko): make sure to-be-removed animations are removed properly
4742
            var details = element[REMOVAL_FLAG];
4743
            if (details && details.removedBeforeQueried)
4744
                return new _angular_animations__WEBPACK_IMPORTED_MODULE_0__["NoopAnimationPlayer"](timelineInstruction.duration, timelineInstruction.delay);
4745
            var isQueriedElement = element !== rootElement;
4746
            var previousPlayers = flattenGroupPlayers((allPreviousPlayersMap.get(element) || EMPTY_PLAYER_ARRAY)
4747
                .map(function (p) { return p.getRealPlayer(); }))
4748
                .filter(function (p) {
4749
                // the `element` is not apart of the AnimationPlayer definition, but
4750
                // Mock/WebAnimations
4751
                // use the element within their implementation. This will be added in Angular5 to
4752
                // AnimationPlayer
4753
                var pp = p;
4754
                return pp.element ? pp.element === element : false;
4755
            });
4756
            var preStyles = preStylesMap.get(element);
4757
            var postStyles = postStylesMap.get(element);
4758
            var keyframes = normalizeKeyframes(_this.driver, _this._normalizer, element, timelineInstruction.keyframes, preStyles, postStyles);
4759
            var player = _this._buildPlayer(timelineInstruction, keyframes, previousPlayers);
4760
            // this means that this particular player belongs to a sub trigger. It is
4761
            // important that we match this player up with the corresponding (@trigger.listener)
4762
            if (timelineInstruction.subTimeline && skippedPlayersMap) {
4763
                allSubElements.add(element);
4764
            }
4765
            if (isQueriedElement) {
4766
                var wrappedPlayer = new TransitionAnimationPlayer(namespaceId, triggerName, element);
4767
                wrappedPlayer.setRealPlayer(player);
4768
                allQueriedPlayers.push(wrappedPlayer);
4769
            }
4770
            return player;
4771
        });
4772
        allQueriedPlayers.forEach(function (player) {
4773
            getOrSetAsInMap(_this.playersByQueriedElement, player.element, []).push(player);
4774
            player.onDone(function () { return deleteOrUnsetInMap(_this.playersByQueriedElement, player.element, player); });
4775
        });
4776
        allConsumedElements.forEach(function (element) { return addClass(element, NG_ANIMATING_CLASSNAME); });
4777
        var player = optimizeGroupPlayer(allNewPlayers);
4778
        player.onDestroy(function () {
4779
            allConsumedElements.forEach(function (element) { return removeClass(element, NG_ANIMATING_CLASSNAME); });
4780
            setStyles(rootElement, instruction.toStyles);
4781
        });
4782
        // this basically makes all of the callbacks for sub element animations
4783
        // be dependent on the upper players for when they finish
4784
        allSubElements.forEach(function (element) { getOrSetAsInMap(skippedPlayersMap, element, []).push(player); });
4785
        return player;
4786
    };
4787
    TransitionAnimationEngine.prototype._buildPlayer = function (instruction, keyframes, previousPlayers) {
4788
        if (keyframes.length > 0) {
4789
            return this.driver.animate(instruction.element, keyframes, instruction.duration, instruction.delay, instruction.easing, previousPlayers);
4790
        }
4791
        // special case for when an empty transition|definition is provided
4792
        // ... there is no point in rendering an empty animation
4793
        return new _angular_animations__WEBPACK_IMPORTED_MODULE_0__["NoopAnimationPlayer"](instruction.duration, instruction.delay);
4794
    };
4795
    return TransitionAnimationEngine;
4796
}());
4797
var TransitionAnimationPlayer = /** @class */ (function () {
4798
    function TransitionAnimationPlayer(namespaceId, triggerName, element) {
4799
        this.namespaceId = namespaceId;
4800
        this.triggerName = triggerName;
4801
        this.element = element;
4802
        this._player = new _angular_animations__WEBPACK_IMPORTED_MODULE_0__["NoopAnimationPlayer"]();
4803
        this._containsRealPlayer = false;
4804
        this._queuedCallbacks = {};
4805
        this.destroyed = false;
4806
        this.markedForDestroy = false;
4807
        this.disabled = false;
4808
        this.queued = true;
4809
        this.totalTime = 0;
4810
    }
4811
    TransitionAnimationPlayer.prototype.setRealPlayer = function (player) {
4812
        var _this = this;
4813
        if (this._containsRealPlayer)
4814
            return;
4815
        this._player = player;
4816
        Object.keys(this._queuedCallbacks).forEach(function (phase) {
4817
            _this._queuedCallbacks[phase].forEach(function (callback) { return listenOnPlayer(player, phase, undefined, callback); });
4818
        });
4819
        this._queuedCallbacks = {};
4820
        this._containsRealPlayer = true;
4821
        this.overrideTotalTime(player.totalTime);
4822
        this.queued = false;
4823
    };
4824
    TransitionAnimationPlayer.prototype.getRealPlayer = function () { return this._player; };
4825
    TransitionAnimationPlayer.prototype.overrideTotalTime = function (totalTime) { this.totalTime = totalTime; };
4826
    TransitionAnimationPlayer.prototype.syncPlayerEvents = function (player) {
4827
        var _this = this;
4828
        var p = this._player;
4829
        if (p.triggerCallback) {
4830
            player.onStart(function () { return p.triggerCallback('start'); });
4831
        }
4832
        player.onDone(function () { return _this.finish(); });
4833
        player.onDestroy(function () { return _this.destroy(); });
4834
    };
4835
    TransitionAnimationPlayer.prototype._queueEvent = function (name, callback) {
4836
        getOrSetAsInMap(this._queuedCallbacks, name, []).push(callback);
4837
    };
4838
    TransitionAnimationPlayer.prototype.onDone = function (fn) {
4839
        if (this.queued) {
4840
            this._queueEvent('done', fn);
4841
        }
4842
        this._player.onDone(fn);
4843
    };
4844
    TransitionAnimationPlayer.prototype.onStart = function (fn) {
4845
        if (this.queued) {
4846
            this._queueEvent('start', fn);
4847
        }
4848
        this._player.onStart(fn);
4849
    };
4850
    TransitionAnimationPlayer.prototype.onDestroy = function (fn) {
4851
        if (this.queued) {
4852
            this._queueEvent('destroy', fn);
4853
        }
4854
        this._player.onDestroy(fn);
4855
    };
4856
    TransitionAnimationPlayer.prototype.init = function () { this._player.init(); };
4857
    TransitionAnimationPlayer.prototype.hasStarted = function () { return this.queued ? false : this._player.hasStarted(); };
4858
    TransitionAnimationPlayer.prototype.play = function () { !this.queued && this._player.play(); };
4859
    TransitionAnimationPlayer.prototype.pause = function () { !this.queued && this._player.pause(); };
4860
    TransitionAnimationPlayer.prototype.restart = function () { !this.queued && this._player.restart(); };
4861
    TransitionAnimationPlayer.prototype.finish = function () { this._player.finish(); };
4862
    TransitionAnimationPlayer.prototype.destroy = function () {
4863
        this.destroyed = true;
4864
        this._player.destroy();
4865
    };
4866
    TransitionAnimationPlayer.prototype.reset = function () { !this.queued && this._player.reset(); };
4867
    TransitionAnimationPlayer.prototype.setPosition = function (p) {
4868
        if (!this.queued) {
4869
            this._player.setPosition(p);
4870
        }
4871
    };
4872
    TransitionAnimationPlayer.prototype.getPosition = function () { return this.queued ? 0 : this._player.getPosition(); };
4873
    /* @internal */
4874
    /* @internal */
4875
    TransitionAnimationPlayer.prototype.triggerCallback = /* @internal */
4876
    function (phaseName) {
4877
        var p = this._player;
4878
        if (p.triggerCallback) {
4879
            p.triggerCallback(phaseName);
4880
        }
4881
    };
4882
    return TransitionAnimationPlayer;
4883
}());
4884
function deleteOrUnsetInMap(map, key, value) {
4885
    var currentValues;
4886
    if (map instanceof Map) {
4887
        currentValues = map.get(key);
4888
        if (currentValues) {
4889
            if (currentValues.length) {
4890
                var index = currentValues.indexOf(value);
4891
                currentValues.splice(index, 1);
4892
            }
4893
            if (currentValues.length == 0) {
4894
                map.delete(key);
4895
            }
4896
        }
4897
    }
4898
    else {
4899
        currentValues = map[key];
4900
        if (currentValues) {
4901
            if (currentValues.length) {
4902
                var index = currentValues.indexOf(value);
4903
                currentValues.splice(index, 1);
4904
            }
4905
            if (currentValues.length == 0) {
4906
                delete map[key];
4907
            }
4908
        }
4909
    }
4910
    return currentValues;
4911
}
4912
function normalizeTriggerValue(value) {
4913
    // we use `!= null` here because it's the most simple
4914
    // way to test against a "falsy" value without mixing
4915
    // in empty strings or a zero value. DO NOT OPTIMIZE.
4916
    return value != null ? value : null;
4917
}
4918
function isElementNode(node) {
4919
    return node && node['nodeType'] === 1;
4920
}
4921
function isTriggerEventValid(eventName) {
4922
    return eventName == 'start' || eventName == 'done';
4923
}
4924
function cloakElement(element, value) {
4925
    var oldValue = element.style.display;
4926
    element.style.display = value != null ? value : 'none';
4927
    return oldValue;
4928
}
4929
function cloakAndComputeStyles(valuesMap, driver, elements, elementPropsMap, defaultStyle) {
4930
    var cloakVals = [];
4931
    elements.forEach(function (element) { return cloakVals.push(cloakElement(element)); });
4932
    var failedElements = [];
4933
    elementPropsMap.forEach(function (props, element) {
4934
        var styles = {};
4935
        props.forEach(function (prop) {
4936
            var value = styles[prop] = driver.computeStyle(element, prop, defaultStyle);
4937
            // there is no easy way to detect this because a sub element could be removed
4938
            // by a parent animation element being detached.
4939
            if (!value || value.length == 0) {
4940
                element[REMOVAL_FLAG] = NULL_REMOVED_QUERIED_STATE;
4941
                failedElements.push(element);
4942
            }
4943
        });
4944
        valuesMap.set(element, styles);
4945
    });
4946
    // we use a index variable here since Set.forEach(a, i) does not return
4947
    // an index value for the closure (but instead just the value)
4948
    var i = 0;
4949
    elements.forEach(function (element) { return cloakElement(element, cloakVals[i++]); });
4950
    return failedElements;
4951
}
4952
/*
4953
Since the Angular renderer code will return a collection of inserted
4954
nodes in all areas of a DOM tree, it's up to this algorithm to figure
4955
out which nodes are roots for each animation @trigger.
4956
 
4957
By placing each inserted node into a Set and traversing upwards, it
4958
is possible to find the @trigger elements and well any direct *star
4959
insertion nodes, if a @trigger root is found then the enter element
4960
is placed into the Map[@trigger] spot.
4961
 */
4962
function buildRootMap(roots, nodes) {
4963
    var rootMap = new Map();
4964
    roots.forEach(function (root) { return rootMap.set(root, []); });
4965
    if (nodes.length == 0)
4966
        return rootMap;
4967
    var NULL_NODE = 1;
4968
    var nodeSet = new Set(nodes);
4969
    var localRootMap = new Map();
4970
    function getRoot(node) {
4971
        if (!node)
4972
            return NULL_NODE;
4973
        var root = localRootMap.get(node);
4974
        if (root)
4975
            return root;
4976
        var parent = node.parentNode;
4977
        if (rootMap.has(parent)) {
4978
            // ngIf inside @trigger
4979
            root = parent;
4980
        }
4981
        else if (nodeSet.has(parent)) {
4982
            // ngIf inside ngIf
4983
            root = NULL_NODE;
4984
        }
4985
        else {
4986
            // recurse upwards
4987
            root = getRoot(parent);
4988
        }
4989
        localRootMap.set(node, root);
4990
        return root;
4991
    }
4992
    nodes.forEach(function (node) {
4993
        var root = getRoot(node);
4994
        if (root !== NULL_NODE) {
4995
            rootMap.get(root).push(node);
4996
        }
4997
    });
4998
    return rootMap;
4999
}
5000
var CLASSES_CACHE_KEY = '$$classes';
5001
function addClass(element, className) {
5002
    if (element.classList) {
5003
        element.classList.add(className);
5004
    }
5005
    else {
5006
        var classes = element[CLASSES_CACHE_KEY];
5007
        if (!classes) {
5008
            classes = element[CLASSES_CACHE_KEY] = {};
5009
        }
5010
        classes[className] = true;
5011
    }
5012
}
5013
function removeClass(element, className) {
5014
    if (element.classList) {
5015
        element.classList.remove(className);
5016
    }
5017
    else {
5018
        var classes = element[CLASSES_CACHE_KEY];
5019
        if (classes) {
5020
            delete classes[className];
5021
        }
5022
    }
5023
}
5024
function removeNodesAfterAnimationDone(engine, element, players) {
5025
    optimizeGroupPlayer(players).onDone(function () { return engine.processLeaveNode(element); });
5026
}
5027
function flattenGroupPlayers(players) {
5028
    var finalPlayers = [];
5029
    _flattenGroupPlayersRecur(players, finalPlayers);
5030
    return finalPlayers;
5031
}
5032
function _flattenGroupPlayersRecur(players, finalPlayers) {
5033
    for (var i = 0; i < players.length; i++) {
5034
        var player = players[i];
5035
        if (player instanceof _angular_animations__WEBPACK_IMPORTED_MODULE_0__["ɵAnimationGroupPlayer"]) {
5036
            _flattenGroupPlayersRecur(player.players, finalPlayers);
5037
        }
5038
        else {
5039
            finalPlayers.push(player);
5040
        }
5041
    }
5042
}
5043
function objEquals(a, b) {
5044
    var k1 = Object.keys(a);
5045
    var k2 = Object.keys(b);
5046
    if (k1.length != k2.length)
5047
        return false;
5048
    for (var i = 0; i < k1.length; i++) {
5049
        var prop = k1[i];
5050
        if (!b.hasOwnProperty(prop) || a[prop] !== b[prop])
5051
            return false;
5052
    }
5053
    return true;
5054
}
5055
function replacePostStylesAsPre(element, allPreStyleElements, allPostStyleElements) {
5056
    var postEntry = allPostStyleElements.get(element);
5057
    if (!postEntry)
5058
        return false;
5059
    var preEntry = allPreStyleElements.get(element);
5060
    if (preEntry) {
5061
        postEntry.forEach(function (data) { return preEntry.add(data); });
5062
    }
5063
    else {
5064
        allPreStyleElements.set(element, postEntry);
5065
    }
5066
    allPostStyleElements.delete(element);
5067
    return true;
5068
}
5069
 
5070
var AnimationEngine = /** @class */ (function () {
5071
    function AnimationEngine(_driver, normalizer) {
5072
        var _this = this;
5073
        this._driver = _driver;
5074
        this._triggerCache = {};
5075
        // this method is designed to be overridden by the code that uses this engine
5076
        this.onRemovalComplete = function (element, context) { };
5077
        this._transitionEngine = new TransitionAnimationEngine(_driver, normalizer);
5078
        this._timelineEngine = new TimelineAnimationEngine(_driver, normalizer);
5079
        this._transitionEngine.onRemovalComplete = function (element, context) {
5080
            return _this.onRemovalComplete(element, context);
5081
        };
5082
    }
5083
    AnimationEngine.prototype.registerTrigger = function (componentId, namespaceId, hostElement, name, metadata) {
5084
        var cacheKey = componentId + '-' + name;
5085
        var trigger = this._triggerCache[cacheKey];
5086
        if (!trigger) {
5087
            var errors = [];
5088
            var ast = buildAnimationAst(this._driver, metadata, errors);
5089
            if (errors.length) {
5090
                throw new Error("The animation trigger \"" + name + "\" has failed to build due to the following errors:\n - " + errors.join("\n - "));
5091
            }
5092
            trigger = buildTrigger(name, ast);
5093
            this._triggerCache[cacheKey] = trigger;
5094
        }
5095
        this._transitionEngine.registerTrigger(namespaceId, name, trigger);
5096
    };
5097
    AnimationEngine.prototype.register = function (namespaceId, hostElement) {
5098
        this._transitionEngine.register(namespaceId, hostElement);
5099
    };
5100
    AnimationEngine.prototype.destroy = function (namespaceId, context) {
5101
        this._transitionEngine.destroy(namespaceId, context);
5102
    };
5103
    AnimationEngine.prototype.onInsert = function (namespaceId, element, parent, insertBefore) {
5104
        this._transitionEngine.insertNode(namespaceId, element, parent, insertBefore);
5105
    };
5106
    AnimationEngine.prototype.onRemove = function (namespaceId, element, context) {
5107
        this._transitionEngine.removeNode(namespaceId, element, context);
5108
    };
5109
    AnimationEngine.prototype.disableAnimations = function (element, disable) {
5110
        this._transitionEngine.markElementAsDisabled(element, disable);
5111
    };
5112
    AnimationEngine.prototype.process = function (namespaceId, element, property, value) {
5113
        if (property.charAt(0) == '@') {
5114
            var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__read"])(parseTimelineCommand(property), 2), id = _a[0], action = _a[1];
5115
            var args = value;
5116
            this._timelineEngine.command(id, element, action, args);
5117
        }
5118
        else {
5119
            this._transitionEngine.trigger(namespaceId, element, property, value);
5120
        }
5121
    };
5122
    AnimationEngine.prototype.listen = function (namespaceId, element, eventName, eventPhase, callback) {
5123
        // @@listen
5124
        if (eventName.charAt(0) == '@') {
5125
            var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__read"])(parseTimelineCommand(eventName), 2), id = _a[0], action = _a[1];
5126
            return this._timelineEngine.listen(id, element, action, callback);
5127
        }
5128
        return this._transitionEngine.listen(namespaceId, element, eventName, eventPhase, callback);
5129
    };
5130
    AnimationEngine.prototype.flush = function (microtaskId) {
5131
        if (microtaskId === void 0) { microtaskId = -1; }
5132
        this._transitionEngine.flush(microtaskId);
5133
    };
5134
    Object.defineProperty(AnimationEngine.prototype, "players", {
5135
        get: function () {
5136
            return this._transitionEngine.players
5137
                .concat(this._timelineEngine.players);
5138
        },
5139
        enumerable: true,
5140
        configurable: true
5141
    });
5142
    AnimationEngine.prototype.whenRenderingDone = function () { return this._transitionEngine.whenRenderingDone(); };
5143
    return AnimationEngine;
5144
}());
5145
 
5146
/**
5147
 * @license
5148
 * Copyright Google Inc. All Rights Reserved.
5149
 *
5150
 * Use of this source code is governed by an MIT-style license that can be
5151
 * found in the LICENSE file at https://angular.io/license
5152
 */
5153
var ELAPSED_TIME_MAX_DECIMAL_PLACES = 3;
5154
var ANIMATION_PROP = 'animation';
5155
var ANIMATIONEND_EVENT = 'animationend';
5156
var ONE_SECOND$1 = 1000;
5157
var ElementAnimationStyleHandler = /** @class */ (function () {
5158
    function ElementAnimationStyleHandler(_element, _name, _duration, _delay, _easing, _fillMode, _onDoneFn) {
5159
        var _this = this;
5160
        this._element = _element;
5161
        this._name = _name;
5162
        this._duration = _duration;
5163
        this._delay = _delay;
5164
        this._easing = _easing;
5165
        this._fillMode = _fillMode;
5166
        this._onDoneFn = _onDoneFn;
5167
        this._finished = false;
5168
        this._destroyed = false;
5169
        this._startTime = 0;
5170
        this._position = 0;
5171
        this._eventFn = function (e) { return _this._handleCallback(e); };
5172
    }
5173
    ElementAnimationStyleHandler.prototype.apply = function () {
5174
        applyKeyframeAnimation(this._element, this._duration + "ms " + this._easing + " " + this._delay + "ms 1 normal " + this._fillMode + " " + this._name);
5175
        addRemoveAnimationEvent(this._element, this._eventFn, false);
5176
        this._startTime = Date.now();
5177
    };
5178
    ElementAnimationStyleHandler.prototype.pause = function () { playPauseAnimation(this._element, this._name, 'paused'); };
5179
    ElementAnimationStyleHandler.prototype.resume = function () { playPauseAnimation(this._element, this._name, 'running'); };
5180
    ElementAnimationStyleHandler.prototype.setPosition = function (position) {
5181
        var index = findIndexForAnimation(this._element, this._name);
5182
        this._position = position * this._duration;
5183
        setAnimationStyle(this._element, 'Delay', "-" + this._position + "ms", index);
5184
    };
5185
    ElementAnimationStyleHandler.prototype.getPosition = function () { return this._position; };
5186
    ElementAnimationStyleHandler.prototype._handleCallback = function (event) {
5187
        var timestamp = event._ngTestManualTimestamp || Date.now();
5188
        var elapsedTime = parseFloat(event.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES)) * ONE_SECOND$1;
5189
        if (event.animationName == this._name &&
5190
            Math.max(timestamp - this._startTime, 0) >= this._delay && elapsedTime >= this._duration) {
5191
            this.finish();
5192
        }
5193
    };
5194
    ElementAnimationStyleHandler.prototype.finish = function () {
5195
        if (this._finished)
5196
            return;
5197
        this._finished = true;
5198
        this._onDoneFn();
5199
        addRemoveAnimationEvent(this._element, this._eventFn, true);
5200
    };
5201
    ElementAnimationStyleHandler.prototype.destroy = function () {
5202
        if (this._destroyed)
5203
            return;
5204
        this._destroyed = true;
5205
        this.finish();
5206
        removeKeyframeAnimation(this._element, this._name);
5207
    };
5208
    return ElementAnimationStyleHandler;
5209
}());
5210
function playPauseAnimation(element, name, status) {
5211
    var index = findIndexForAnimation(element, name);
5212
    setAnimationStyle(element, 'PlayState', status, index);
5213
}
5214
function applyKeyframeAnimation(element, value) {
5215
    var anim = getAnimationStyle(element, '').trim();
5216
    var index = 0;
5217
    if (anim.length) {
5218
        index = countChars(anim, ',') + 1;
5219
        value = anim + ", " + value;
5220
    }
5221
    setAnimationStyle(element, '', value);
5222
    return index;
5223
}
5224
function removeKeyframeAnimation(element, name) {
5225
    var anim = getAnimationStyle(element, '');
5226
    var tokens = anim.split(',');
5227
    var index = findMatchingTokenIndex(tokens, name);
5228
    if (index >= 0) {
5229
        tokens.splice(index, 1);
5230
        var newValue = tokens.join(',');
5231
        setAnimationStyle(element, '', newValue);
5232
    }
5233
}
5234
function findIndexForAnimation(element, value) {
5235
    var anim = getAnimationStyle(element, '');
5236
    if (anim.indexOf(',') > 0) {
5237
        var tokens = anim.split(',');
5238
        return findMatchingTokenIndex(tokens, value);
5239
    }
5240
    return findMatchingTokenIndex([anim], value);
5241
}
5242
function findMatchingTokenIndex(tokens, searchToken) {
5243
    for (var i = 0; i < tokens.length; i++) {
5244
        if (tokens[i].indexOf(searchToken) >= 0) {
5245
            return i;
5246
        }
5247
    }
5248
    return -1;
5249
}
5250
function addRemoveAnimationEvent(element, fn, doRemove) {
5251
    doRemove ? element.removeEventListener(ANIMATIONEND_EVENT, fn) :
5252
        element.addEventListener(ANIMATIONEND_EVENT, fn);
5253
}
5254
function setAnimationStyle(element, name, value, index) {
5255
    var prop = ANIMATION_PROP + name;
5256
    if (index != null) {
5257
        var oldValue = element.style[prop];
5258
        if (oldValue.length) {
5259
            var tokens = oldValue.split(',');
5260
            tokens[index] = value;
5261
            value = tokens.join(',');
5262
        }
5263
    }
5264
    element.style[prop] = value;
5265
}
5266
function getAnimationStyle(element, name) {
5267
    return element.style[ANIMATION_PROP + name];
5268
}
5269
function countChars(value, char) {
5270
    var count = 0;
5271
    for (var i = 0; i < value.length; i++) {
5272
        var c = value.charAt(i);
5273
        if (c === char)
5274
            count++;
5275
    }
5276
    return count;
5277
}
5278
 
5279
var DEFAULT_FILL_MODE = 'forwards';
5280
var DEFAULT_EASING = 'linear';
5281
var AnimatorControlState;
5282
(function (AnimatorControlState) {
5283
    AnimatorControlState[AnimatorControlState["INITIALIZED"] = 1] = "INITIALIZED";
5284
    AnimatorControlState[AnimatorControlState["STARTED"] = 2] = "STARTED";
5285
    AnimatorControlState[AnimatorControlState["FINISHED"] = 3] = "FINISHED";
5286
    AnimatorControlState[AnimatorControlState["DESTROYED"] = 4] = "DESTROYED";
5287
})(AnimatorControlState || (AnimatorControlState = {}));
5288
var CssKeyframesPlayer = /** @class */ (function () {
5289
    function CssKeyframesPlayer(element, keyframes, animationName, _duration, _delay, easing, _finalStyles) {
5290
        this.element = element;
5291
        this.keyframes = keyframes;
5292
        this.animationName = animationName;
5293
        this._duration = _duration;
5294
        this._delay = _delay;
5295
        this._finalStyles = _finalStyles;
5296
        this._onDoneFns = [];
5297
        this._onStartFns = [];
5298
        this._onDestroyFns = [];
5299
        this._started = false;
5300
        this.currentSnapshot = {};
5301
        this.state = 0;
5302
        this.easing = easing || DEFAULT_EASING;
5303
        this.totalTime = _duration + _delay;
5304
        this._buildStyler();
5305
    }
5306
    CssKeyframesPlayer.prototype.onStart = function (fn) { this._onStartFns.push(fn); };
5307
    CssKeyframesPlayer.prototype.onDone = function (fn) { this._onDoneFns.push(fn); };
5308
    CssKeyframesPlayer.prototype.onDestroy = function (fn) { this._onDestroyFns.push(fn); };
5309
    CssKeyframesPlayer.prototype.destroy = function () {
5310
        this.init();
5311
        if (this.state >= AnimatorControlState.DESTROYED)
5312
            return;
5313
        this.state = AnimatorControlState.DESTROYED;
5314
        this._styler.destroy();
5315
        this._flushStartFns();
5316
        this._flushDoneFns();
5317
        this._onDestroyFns.forEach(function (fn) { return fn(); });
5318
        this._onDestroyFns = [];
5319
    };
5320
    CssKeyframesPlayer.prototype._flushDoneFns = function () {
5321
        this._onDoneFns.forEach(function (fn) { return fn(); });
5322
        this._onDoneFns = [];
5323
    };
5324
    CssKeyframesPlayer.prototype._flushStartFns = function () {
5325
        this._onStartFns.forEach(function (fn) { return fn(); });
5326
        this._onStartFns = [];
5327
    };
5328
    CssKeyframesPlayer.prototype.finish = function () {
5329
        this.init();
5330
        if (this.state >= AnimatorControlState.FINISHED)
5331
            return;
5332
        this.state = AnimatorControlState.FINISHED;
5333
        this._styler.finish();
5334
        this._flushStartFns();
5335
        this._flushDoneFns();
5336
    };
5337
    CssKeyframesPlayer.prototype.setPosition = function (value) { this._styler.setPosition(value); };
5338
    CssKeyframesPlayer.prototype.getPosition = function () { return this._styler.getPosition(); };
5339
    CssKeyframesPlayer.prototype.hasStarted = function () { return this.state >= AnimatorControlState.STARTED; };
5340
    CssKeyframesPlayer.prototype.init = function () {
5341
        if (this.state >= AnimatorControlState.INITIALIZED)
5342
            return;
5343
        this.state = AnimatorControlState.INITIALIZED;
5344
        var elm = this.element;
5345
        this._styler.apply();
5346
        if (this._delay) {
5347
            this._styler.pause();
5348
        }
5349
    };
5350
    CssKeyframesPlayer.prototype.play = function () {
5351
        this.init();
5352
        if (!this.hasStarted()) {
5353
            this._flushStartFns();
5354
            this.state = AnimatorControlState.STARTED;
5355
        }
5356
        this._styler.resume();
5357
    };
5358
    CssKeyframesPlayer.prototype.pause = function () {
5359
        this.init();
5360
        this._styler.pause();
5361
    };
5362
    CssKeyframesPlayer.prototype.restart = function () {
5363
        this.reset();
5364
        this.play();
5365
    };
5366
    CssKeyframesPlayer.prototype.reset = function () {
5367
        this._styler.destroy();
5368
        this._buildStyler();
5369
        this._styler.apply();
5370
    };
5371
    CssKeyframesPlayer.prototype._buildStyler = function () {
5372
        var _this = this;
5373
        this._styler = new ElementAnimationStyleHandler(this.element, this.animationName, this._duration, this._delay, this.easing, DEFAULT_FILL_MODE, function () { return _this.finish(); });
5374
    };
5375
    /* @internal */
5376
    /* @internal */
5377
    CssKeyframesPlayer.prototype.triggerCallback = /* @internal */
5378
    function (phaseName) {
5379
        var methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;
5380
        methods.forEach(function (fn) { return fn(); });
5381
        methods.length = 0;
5382
    };
5383
    CssKeyframesPlayer.prototype.beforeDestroy = function () {
5384
        var _this = this;
5385
        this.init();
5386
        var styles = {};
5387
        if (this.hasStarted()) {
5388
            var finished_1 = this.state >= AnimatorControlState.FINISHED;
5389
            Object.keys(this._finalStyles).forEach(function (prop) {
5390
                if (prop != 'offset') {
5391
                    styles[prop] = finished_1 ? _this._finalStyles[prop] : computeStyle(_this.element, prop);
5392
                }
5393
            });
5394
        }
5395
        this.currentSnapshot = styles;
5396
    };
5397
    return CssKeyframesPlayer;
5398
}());
5399
 
5400
var DirectStylePlayer = /** @class */ (function (_super) {
5401
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(DirectStylePlayer, _super);
5402
    function DirectStylePlayer(element, styles) {
5403
        var _this = _super.call(this) || this;
5404
        _this.element = element;
5405
        _this._startingStyles = {};
5406
        _this.__initialized = false;
5407
        _this._styles = hypenatePropsObject(styles);
5408
        return _this;
5409
    }
5410
    DirectStylePlayer.prototype.init = function () {
5411
        var _this = this;
5412
        if (this.__initialized || !this._startingStyles)
5413
            return;
5414
        this.__initialized = true;
5415
        Object.keys(this._styles).forEach(function (prop) {
5416
            _this._startingStyles[prop] = _this.element.style[prop];
5417
        });
5418
        _super.prototype.init.call(this);
5419
    };
5420
    DirectStylePlayer.prototype.play = function () {
5421
        var _this = this;
5422
        if (!this._startingStyles)
5423
            return;
5424
        this.init();
5425
        Object.keys(this._styles)
5426
            .forEach(function (prop) { return _this.element.style.setProperty(prop, _this._styles[prop]); });
5427
        _super.prototype.play.call(this);
5428
    };
5429
    DirectStylePlayer.prototype.destroy = function () {
5430
        var _this = this;
5431
        if (!this._startingStyles)
5432
            return;
5433
        Object.keys(this._startingStyles).forEach(function (prop) {
5434
            var value = _this._startingStyles[prop];
5435
            if (value) {
5436
                _this.element.style.setProperty(prop, value);
5437
            }
5438
            else {
5439
                _this.element.style.removeProperty(prop);
5440
            }
5441
        });
5442
        this._startingStyles = null;
5443
        _super.prototype.destroy.call(this);
5444
    };
5445
    return DirectStylePlayer;
5446
}(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["NoopAnimationPlayer"]));
5447
 
5448
var KEYFRAMES_NAME_PREFIX = 'gen_css_kf_';
5449
var TAB_SPACE = ' ';
5450
var CssKeyframesDriver = /** @class */ (function () {
5451
    function CssKeyframesDriver() {
5452
        this._count = 0;
5453
        this._head = document.querySelector('head');
5454
        this._warningIssued = false;
5455
    }
5456
    CssKeyframesDriver.prototype.validateStyleProperty = function (prop) { return validateStyleProperty(prop); };
5457
    CssKeyframesDriver.prototype.matchesElement = function (element, selector) {
5458
        return matchesElement(element, selector);
5459
    };
5460
    CssKeyframesDriver.prototype.containsElement = function (elm1, elm2) { return containsElement(elm1, elm2); };
5461
    CssKeyframesDriver.prototype.query = function (element, selector, multi) {
5462
        return invokeQuery(element, selector, multi);
5463
    };
5464
    CssKeyframesDriver.prototype.computeStyle = function (element, prop, defaultValue) {
5465
        return window.getComputedStyle(element)[prop];
5466
    };
5467
    CssKeyframesDriver.prototype.buildKeyframeElement = function (element, name, keyframes) {
5468
        keyframes = keyframes.map(function (kf) { return hypenatePropsObject(kf); });
5469
        var keyframeStr = "@keyframes " + name + " {\n";
5470
        var tab = '';
5471
        keyframes.forEach(function (kf) {
5472
            tab = TAB_SPACE;
5473
            var offset = parseFloat(kf.offset);
5474
            keyframeStr += "" + tab + offset * 100 + "% {\n";
5475
            tab += TAB_SPACE;
5476
            Object.keys(kf).forEach(function (prop) {
5477
                var value = kf[prop];
5478
                switch (prop) {
5479
                    case 'offset':
5480
                        return;
5481
                    case 'easing':
5482
                        if (value) {
5483
                            keyframeStr += tab + "animation-timing-function: " + value + ";\n";
5484
                        }
5485
                        return;
5486
                    default:
5487
                        keyframeStr += "" + tab + prop + ": " + value + ";\n";
5488
                        return;
5489
                }
5490
            });
5491
            keyframeStr += tab + "}\n";
5492
        });
5493
        keyframeStr += "}\n";
5494
        var kfElm = document.createElement('style');
5495
        kfElm.innerHTML = keyframeStr;
5496
        return kfElm;
5497
    };
5498
    CssKeyframesDriver.prototype.animate = function (element, keyframes, duration, delay, easing, previousPlayers, scrubberAccessRequested) {
5499
        if (previousPlayers === void 0) { previousPlayers = []; }
5500
        if (scrubberAccessRequested) {
5501
            this._notifyFaultyScrubber();
5502
        }
5503
        var previousCssKeyframePlayers = previousPlayers.filter(function (player) { return player instanceof CssKeyframesPlayer; });
5504
        var previousStyles = {};
5505
        if (allowPreviousPlayerStylesMerge(duration, delay)) {
5506
            previousCssKeyframePlayers.forEach(function (player) {
5507
                var styles = player.currentSnapshot;
5508
                Object.keys(styles).forEach(function (prop) { return previousStyles[prop] = styles[prop]; });
5509
            });
5510
        }
5511
        keyframes = balancePreviousStylesIntoKeyframes(element, keyframes, previousStyles);
5512
        var finalStyles = flattenKeyframesIntoStyles(keyframes);
5513
        // if there is no animation then there is no point in applying
5514
        // styles and waiting for an event to get fired. This causes lag.
5515
        // It's better to just directly apply the styles to the element
5516
        // via the direct styling animation player.
5517
        if (duration == 0) {
5518
            return new DirectStylePlayer(element, finalStyles);
5519
        }
5520
        var animationName = "" + KEYFRAMES_NAME_PREFIX + this._count++;
5521
        var kfElm = this.buildKeyframeElement(element, animationName, keyframes);
5522
        document.querySelector('head').appendChild(kfElm);
5523
        var player = new CssKeyframesPlayer(element, keyframes, animationName, duration, delay, easing, finalStyles);
5524
        player.onDestroy(function () { return removeElement(kfElm); });
5525
        return player;
5526
    };
5527
    CssKeyframesDriver.prototype._notifyFaultyScrubber = function () {
5528
        if (!this._warningIssued) {
5529
            console.warn('@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\n', '  visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill.');
5530
            this._warningIssued = true;
5531
        }
5532
    };
5533
    return CssKeyframesDriver;
5534
}());
5535
function flattenKeyframesIntoStyles(keyframes) {
5536
    var flatKeyframes = {};
5537
    if (keyframes) {
5538
        var kfs = Array.isArray(keyframes) ? keyframes : [keyframes];
5539
        kfs.forEach(function (kf) {
5540
            Object.keys(kf).forEach(function (prop) {
5541
                if (prop == 'offset' || prop == 'easing')
5542
                    return;
5543
                flatKeyframes[prop] = kf[prop];
5544
            });
5545
        });
5546
    }
5547
    return flatKeyframes;
5548
}
5549
function removeElement(node) {
5550
    node.parentNode.removeChild(node);
5551
}
5552
 
5553
var WebAnimationsPlayer = /** @class */ (function () {
5554
    function WebAnimationsPlayer(element, keyframes, options) {
5555
        this.element = element;
5556
        this.keyframes = keyframes;
5557
        this.options = options;
5558
        this._onDoneFns = [];
5559
        this._onStartFns = [];
5560
        this._onDestroyFns = [];
5561
        this._initialized = false;
5562
        this._finished = false;
5563
        this._started = false;
5564
        this._destroyed = false;
5565
        this.time = 0;
5566
        this.parentPlayer = null;
5567
        this.currentSnapshot = {};
5568
        this._duration = options['duration'];
5569
        this._delay = options['delay'] || 0;
5570
        this.time = this._duration + this._delay;
5571
    }
5572
    WebAnimationsPlayer.prototype._onFinish = function () {
5573
        if (!this._finished) {
5574
            this._finished = true;
5575
            this._onDoneFns.forEach(function (fn) { return fn(); });
5576
            this._onDoneFns = [];
5577
        }
5578
    };
5579
    WebAnimationsPlayer.prototype.init = function () {
5580
        this._buildPlayer();
5581
        this._preparePlayerBeforeStart();
5582
    };
5583
    WebAnimationsPlayer.prototype._buildPlayer = function () {
5584
        var _this = this;
5585
        if (this._initialized)
5586
            return;
5587
        this._initialized = true;
5588
        var keyframes = this.keyframes;
5589
        this.domPlayer =
5590
            this._triggerWebAnimation(this.element, keyframes, this.options);
5591
        this._finalKeyframe = keyframes.length ? keyframes[keyframes.length - 1] : {};
5592
        this.domPlayer.addEventListener('finish', function () { return _this._onFinish(); });
5593
    };
5594
    WebAnimationsPlayer.prototype._preparePlayerBeforeStart = function () {
5595
        // this is required so that the player doesn't start to animate right away
5596
        if (this._delay) {
5597
            this._resetDomPlayerState();
5598
        }
5599
        else {
5600
            this.domPlayer.pause();
5601
        }
5602
    };
5603
    /** @internal */
5604
    /** @internal */
5605
    WebAnimationsPlayer.prototype._triggerWebAnimation = /** @internal */
5606
    function (element, keyframes, options) {
5607
        // jscompiler doesn't seem to know animate is a native property because it's not fully
5608
        // supported yet across common browsers (we polyfill it for Edge/Safari) [CL #143630929]
5609
        return element['animate'](keyframes, options);
5610
    };
5611
    WebAnimationsPlayer.prototype.onStart = function (fn) { this._onStartFns.push(fn); };
5612
    WebAnimationsPlayer.prototype.onDone = function (fn) { this._onDoneFns.push(fn); };
5613
    WebAnimationsPlayer.prototype.onDestroy = function (fn) { this._onDestroyFns.push(fn); };
5614
    WebAnimationsPlayer.prototype.play = function () {
5615
        this._buildPlayer();
5616
        if (!this.hasStarted()) {
5617
            this._onStartFns.forEach(function (fn) { return fn(); });
5618
            this._onStartFns = [];
5619
            this._started = true;
5620
        }
5621
        this.domPlayer.play();
5622
    };
5623
    WebAnimationsPlayer.prototype.pause = function () {
5624
        this.init();
5625
        this.domPlayer.pause();
5626
    };
5627
    WebAnimationsPlayer.prototype.finish = function () {
5628
        this.init();
5629
        this._onFinish();
5630
        this.domPlayer.finish();
5631
    };
5632
    WebAnimationsPlayer.prototype.reset = function () {
5633
        this._resetDomPlayerState();
5634
        this._destroyed = false;
5635
        this._finished = false;
5636
        this._started = false;
5637
    };
5638
    WebAnimationsPlayer.prototype._resetDomPlayerState = function () {
5639
        if (this.domPlayer) {
5640
            this.domPlayer.cancel();
5641
        }
5642
    };
5643
    WebAnimationsPlayer.prototype.restart = function () {
5644
        this.reset();
5645
        this.play();
5646
    };
5647
    WebAnimationsPlayer.prototype.hasStarted = function () { return this._started; };
5648
    WebAnimationsPlayer.prototype.destroy = function () {
5649
        if (!this._destroyed) {
5650
            this._destroyed = true;
5651
            this._resetDomPlayerState();
5652
            this._onFinish();
5653
            this._onDestroyFns.forEach(function (fn) { return fn(); });
5654
            this._onDestroyFns = [];
5655
        }
5656
    };
5657
    WebAnimationsPlayer.prototype.setPosition = function (p) { this.domPlayer.currentTime = p * this.time; };
5658
    WebAnimationsPlayer.prototype.getPosition = function () { return this.domPlayer.currentTime / this.time; };
5659
    Object.defineProperty(WebAnimationsPlayer.prototype, "totalTime", {
5660
        get: function () { return this._delay + this._duration; },
5661
        enumerable: true,
5662
        configurable: true
5663
    });
5664
    WebAnimationsPlayer.prototype.beforeDestroy = function () {
5665
        var _this = this;
5666
        var styles = {};
5667
        if (this.hasStarted()) {
5668
            Object.keys(this._finalKeyframe).forEach(function (prop) {
5669
                if (prop != 'offset') {
5670
                    styles[prop] =
5671
                        _this._finished ? _this._finalKeyframe[prop] : computeStyle(_this.element, prop);
5672
                }
5673
            });
5674
        }
5675
        this.currentSnapshot = styles;
5676
    };
5677
    /* @internal */
5678
    /* @internal */
5679
    WebAnimationsPlayer.prototype.triggerCallback = /* @internal */
5680
    function (phaseName) {
5681
        var methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;
5682
        methods.forEach(function (fn) { return fn(); });
5683
        methods.length = 0;
5684
    };
5685
    return WebAnimationsPlayer;
5686
}());
5687
 
5688
var WebAnimationsDriver = /** @class */ (function () {
5689
    function WebAnimationsDriver() {
5690
        this._isNativeImpl = /\{\s*\[native\s+code\]\s*\}/.test(getElementAnimateFn().toString());
5691
        this._cssKeyframesDriver = new CssKeyframesDriver();
5692
    }
5693
    WebAnimationsDriver.prototype.validateStyleProperty = function (prop) { return validateStyleProperty(prop); };
5694
    WebAnimationsDriver.prototype.matchesElement = function (element, selector) {
5695
        return matchesElement(element, selector);
5696
    };
5697
    WebAnimationsDriver.prototype.containsElement = function (elm1, elm2) { return containsElement(elm1, elm2); };
5698
    WebAnimationsDriver.prototype.query = function (element, selector, multi) {
5699
        return invokeQuery(element, selector, multi);
5700
    };
5701
    WebAnimationsDriver.prototype.computeStyle = function (element, prop, defaultValue) {
5702
        return window.getComputedStyle(element)[prop];
5703
    };
5704
    WebAnimationsDriver.prototype.overrideWebAnimationsSupport = function (supported) { this._isNativeImpl = supported; };
5705
    WebAnimationsDriver.prototype.animate = function (element, keyframes, duration, delay, easing, previousPlayers, scrubberAccessRequested) {
5706
        if (previousPlayers === void 0) { previousPlayers = []; }
5707
        var useKeyframes = !scrubberAccessRequested && !this._isNativeImpl;
5708
        if (useKeyframes) {
5709
            return this._cssKeyframesDriver.animate(element, keyframes, duration, delay, easing, previousPlayers);
5710
        }
5711
        var fill = delay == 0 ? 'both' : 'forwards';
5712
        var playerOptions = { duration: duration, delay: delay, fill: fill };
5713
        // we check for this to avoid having a null|undefined value be present
5714
        // for the easing (which results in an error for certain browsers #9752)
5715
        if (easing) {
5716
            playerOptions['easing'] = easing;
5717
        }
5718
        var previousStyles = {};
5719
        var previousWebAnimationPlayers = previousPlayers.filter(function (player) { return player instanceof WebAnimationsPlayer; });
5720
        if (allowPreviousPlayerStylesMerge(duration, delay)) {
5721
            previousWebAnimationPlayers.forEach(function (player) {
5722
                var styles = player.currentSnapshot;
5723
                Object.keys(styles).forEach(function (prop) { return previousStyles[prop] = styles[prop]; });
5724
            });
5725
        }
5726
        keyframes = keyframes.map(function (styles) { return copyStyles(styles, false); });
5727
        keyframes = balancePreviousStylesIntoKeyframes(element, keyframes, previousStyles);
5728
        return new WebAnimationsPlayer(element, keyframes, playerOptions);
5729
    };
5730
    return WebAnimationsDriver;
5731
}());
5732
function supportsWebAnimations() {
5733
    return typeof getElementAnimateFn() === 'function';
5734
}
5735
function getElementAnimateFn() {
5736
    return (typeof Element !== 'undefined' && Element.prototype['animate']) || {};
5737
}
5738
 
5739
/**
5740
 * @license
5741
 * Copyright Google Inc. All Rights Reserved.
5742
 *
5743
 * Use of this source code is governed by an MIT-style license that can be
5744
 * found in the LICENSE file at https://angular.io/license
5745
 */
5746
 
5747
/**
5748
 * @license
5749
 * Copyright Google Inc. All Rights Reserved.
5750
 *
5751
 * Use of this source code is governed by an MIT-style license that can be
5752
 * found in the LICENSE file at https://angular.io/license
5753
 */
5754
 
5755
/**
5756
 * @license
5757
 * Copyright Google Inc. All Rights Reserved.
5758
 *
5759
 * Use of this source code is governed by an MIT-style license that can be
5760
 * found in the LICENSE file at https://angular.io/license
5761
 */
5762
 
5763
/**
5764
 * Generated bundle index. Do not edit.
5765
 */
5766
 
5767
 
5768
//# sourceMappingURL=browser.js.map
5769
 
5770
 
5771
/***/ }),
5772
 
5773
/***/ "./node_modules/@angular/cdk/esm5/a11y.es5.js":
5774
/*!****************************************************!*\
5775
  !*** ./node_modules/@angular/cdk/esm5/a11y.es5.js ***!
5776
  \****************************************************/
5777
/*! exports provided: MESSAGES_CONTAINER_ID, CDK_DESCRIBEDBY_ID_PREFIX, CDK_DESCRIBEDBY_HOST_ATTRIBUTE, AriaDescriber, ARIA_DESCRIBER_PROVIDER_FACTORY, ARIA_DESCRIBER_PROVIDER, ActiveDescendantKeyManager, FocusKeyManager, ListKeyManager, FocusTrap, FocusTrapFactory, CdkTrapFocus, InteractivityChecker, LiveAnnouncer, CdkAriaLive, LIVE_ANNOUNCER_PROVIDER_FACTORY, LIVE_ANNOUNCER_PROVIDER, LIVE_ANNOUNCER_ELEMENT_TOKEN, LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY, TOUCH_BUFFER_MS, FocusMonitor, CdkMonitorFocus, FOCUS_MONITOR_PROVIDER_FACTORY, FOCUS_MONITOR_PROVIDER, isFakeMousedownFromScreenReader, A11yModule */
5778
/***/ (function(module, __webpack_exports__, __webpack_require__) {
5779
 
5780
"use strict";
5781
__webpack_require__.r(__webpack_exports__);
5782
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MESSAGES_CONTAINER_ID", function() { return MESSAGES_CONTAINER_ID; });
5783
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CDK_DESCRIBEDBY_ID_PREFIX", function() { return CDK_DESCRIBEDBY_ID_PREFIX; });
5784
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CDK_DESCRIBEDBY_HOST_ATTRIBUTE", function() { return CDK_DESCRIBEDBY_HOST_ATTRIBUTE; });
5785
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AriaDescriber", function() { return AriaDescriber; });
5786
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARIA_DESCRIBER_PROVIDER_FACTORY", function() { return ARIA_DESCRIBER_PROVIDER_FACTORY; });
5787
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARIA_DESCRIBER_PROVIDER", function() { return ARIA_DESCRIBER_PROVIDER; });
5788
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActiveDescendantKeyManager", function() { return ActiveDescendantKeyManager; });
5789
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FocusKeyManager", function() { return FocusKeyManager; });
5790
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ListKeyManager", function() { return ListKeyManager; });
5791
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FocusTrap", function() { return FocusTrap; });
5792
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FocusTrapFactory", function() { return FocusTrapFactory; });
5793
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkTrapFocus", function() { return CdkTrapFocus; });
5794
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InteractivityChecker", function() { return InteractivityChecker; });
5795
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LiveAnnouncer", function() { return LiveAnnouncer; });
5796
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkAriaLive", function() { return CdkAriaLive; });
5797
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LIVE_ANNOUNCER_PROVIDER_FACTORY", function() { return LIVE_ANNOUNCER_PROVIDER_FACTORY; });
5798
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LIVE_ANNOUNCER_PROVIDER", function() { return LIVE_ANNOUNCER_PROVIDER; });
5799
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LIVE_ANNOUNCER_ELEMENT_TOKEN", function() { return LIVE_ANNOUNCER_ELEMENT_TOKEN; });
5800
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY", function() { return LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY; });
5801
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TOUCH_BUFFER_MS", function() { return TOUCH_BUFFER_MS; });
5802
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FocusMonitor", function() { return FocusMonitor; });
5803
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkMonitorFocus", function() { return CdkMonitorFocus; });
5804
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FOCUS_MONITOR_PROVIDER_FACTORY", function() { return FOCUS_MONITOR_PROVIDER_FACTORY; });
5805
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FOCUS_MONITOR_PROVIDER", function() { return FOCUS_MONITOR_PROVIDER; });
5806
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFakeMousedownFromScreenReader", function() { return isFakeMousedownFromScreenReader; });
5807
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A11yModule", function() { return A11yModule; });
5808
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
5809
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
5810
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
5811
/* harmony import */ var _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/keycodes */ "./node_modules/@angular/cdk/esm5/keycodes.es5.js");
5812
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
5813
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
5814
/* harmony import */ var _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/cdk/platform */ "./node_modules/@angular/cdk/esm5/platform.es5.js");
5815
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
5816
/* harmony import */ var _angular_cdk_observers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/cdk/observers */ "./node_modules/@angular/cdk/esm5/observers.es5.js");
5817
/**
5818
 * @license
5819
 * Copyright Google LLC All Rights Reserved.
5820
 *
5821
 * Use of this source code is governed by an MIT-style license that can be
5822
 * found in the LICENSE file at https://angular.io/license
5823
 */
5824
 
5825
 
5826
 
5827
 
5828
 
5829
 
5830
 
5831
 
5832
 
5833
 
5834
/**
5835
 * @fileoverview added by tsickle
5836
 * @suppress {checkTypes} checked by tsc
5837
 */
5838
 
5839
/**
5840
 * IDs are deliminated by an empty space, as per the spec.
5841
 */
5842
var /** @type {?} */ ID_DELIMINATOR = ' ';
5843
/**
5844
 * Adds the given ID to the specified ARIA attribute on an element.
5845
 * Used for attributes such as aria-labelledby, aria-owns, etc.
5846
 * @param {?} el
5847
 * @param {?} attr
5848
 * @param {?} id
5849
 * @return {?}
5850
 */
5851
function addAriaReferencedId(el, attr, id) {
5852
    var /** @type {?} */ ids = getAriaReferenceIds(el, attr);
5853
    if (ids.some(function (existingId) { return existingId.trim() == id.trim(); })) {
5854
        return;
5855
    }
5856
    ids.push(id.trim());
5857
    el.setAttribute(attr, ids.join(ID_DELIMINATOR));
5858
}
5859
/**
5860
 * Removes the given ID from the specified ARIA attribute on an element.
5861
 * Used for attributes such as aria-labelledby, aria-owns, etc.
5862
 * @param {?} el
5863
 * @param {?} attr
5864
 * @param {?} id
5865
 * @return {?}
5866
 */
5867
function removeAriaReferencedId(el, attr, id) {
5868
    var /** @type {?} */ ids = getAriaReferenceIds(el, attr);
5869
    var /** @type {?} */ filteredIds = ids.filter(function (val) { return val != id.trim(); });
5870
    el.setAttribute(attr, filteredIds.join(ID_DELIMINATOR));
5871
}
5872
/**
5873
 * Gets the list of IDs referenced by the given ARIA attribute on an element.
5874
 * Used for attributes such as aria-labelledby, aria-owns, etc.
5875
 * @param {?} el
5876
 * @param {?} attr
5877
 * @return {?}
5878
 */
5879
function getAriaReferenceIds(el, attr) {
5880
    // Get string array of all individual ids (whitespace deliminated) in the attribute value
5881
    return (el.getAttribute(attr) || '').match(/\S+/g) || [];
5882
}
5883
 
5884
/**
5885
 * @fileoverview added by tsickle
5886
 * @suppress {checkTypes} checked by tsc
5887
 */
5888
/**
5889
 * ID used for the body container where all messages are appended.
5890
 */
5891
var /** @type {?} */ MESSAGES_CONTAINER_ID = 'cdk-describedby-message-container';
5892
/**
5893
 * ID prefix used for each created message element.
5894
 */
5895
var /** @type {?} */ CDK_DESCRIBEDBY_ID_PREFIX = 'cdk-describedby-message';
5896
/**
5897
 * Attribute given to each host element that is described by a message element.
5898
 */
5899
var /** @type {?} */ CDK_DESCRIBEDBY_HOST_ATTRIBUTE = 'cdk-describedby-host';
5900
/**
5901
 * Global incremental identifier for each registered message element.
5902
 */
5903
var /** @type {?} */ nextId = 0;
5904
/**
5905
 * Global map of all registered message elements that have been placed into the document.
5906
 */
5907
var /** @type {?} */ messageRegistry = new Map();
5908
/**
5909
 * Container for all registered messages.
5910
 */
5911
var /** @type {?} */ messagesContainer = null;
5912
/**
5913
 * Utility that creates visually hidden elements with a message content. Useful for elements that
5914
 * want to use aria-describedby to further describe themselves without adding additional visual
5915
 * content.
5916
 * \@docs-private
5917
 */
5918
var AriaDescriber = /** @class */ (function () {
5919
    function AriaDescriber(_document) {
5920
        this._document = _document;
5921
    }
5922
    /**
5923
     * Adds to the host element an aria-describedby reference to a hidden element that contains
5924
     * the message. If the same message has already been registered, then it will reuse the created
5925
     * message element.
5926
     */
5927
    /**
5928
     * Adds to the host element an aria-describedby reference to a hidden element that contains
5929
     * the message. If the same message has already been registered, then it will reuse the created
5930
     * message element.
5931
     * @param {?} hostElement
5932
     * @param {?} message
5933
     * @return {?}
5934
     */
5935
    AriaDescriber.prototype.describe = /**
5936
     * Adds to the host element an aria-describedby reference to a hidden element that contains
5937
     * the message. If the same message has already been registered, then it will reuse the created
5938
     * message element.
5939
     * @param {?} hostElement
5940
     * @param {?} message
5941
     * @return {?}
5942
     */
5943
    function (hostElement, message) {
5944
        if (!this._canBeDescribed(hostElement, message)) {
5945
            return;
5946
        }
5947
        if (!messageRegistry.has(message)) {
5948
            this._createMessageElement(message);
5949
        }
5950
        if (!this._isElementDescribedByMessage(hostElement, message)) {
5951
            this._addMessageReference(hostElement, message);
5952
        }
5953
    };
5954
    /** Removes the host element's aria-describedby reference to the message element. */
5955
    /**
5956
     * Removes the host element's aria-describedby reference to the message element.
5957
     * @param {?} hostElement
5958
     * @param {?} message
5959
     * @return {?}
5960
     */
5961
    AriaDescriber.prototype.removeDescription = /**
5962
     * Removes the host element's aria-describedby reference to the message element.
5963
     * @param {?} hostElement
5964
     * @param {?} message
5965
     * @return {?}
5966
     */
5967
    function (hostElement, message) {
5968
        if (!this._canBeDescribed(hostElement, message)) {
5969
            return;
5970
        }
5971
        if (this._isElementDescribedByMessage(hostElement, message)) {
5972
            this._removeMessageReference(hostElement, message);
5973
        }
5974
        var /** @type {?} */ registeredMessage = messageRegistry.get(message);
5975
        if (registeredMessage && registeredMessage.referenceCount === 0) {
5976
            this._deleteMessageElement(message);
5977
        }
5978
        if (messagesContainer && messagesContainer.childNodes.length === 0) {
5979
            this._deleteMessagesContainer();
5980
        }
5981
    };
5982
    /** Unregisters all created message elements and removes the message container. */
5983
    /**
5984
     * Unregisters all created message elements and removes the message container.
5985
     * @return {?}
5986
     */
5987
    AriaDescriber.prototype.ngOnDestroy = /**
5988
     * Unregisters all created message elements and removes the message container.
5989
     * @return {?}
5990
     */
5991
    function () {
5992
        var /** @type {?} */ describedElements = this._document.querySelectorAll("[" + CDK_DESCRIBEDBY_HOST_ATTRIBUTE + "]");
5993
        for (var /** @type {?} */ i = 0; i < describedElements.length; i++) {
5994
            this._removeCdkDescribedByReferenceIds(describedElements[i]);
5995
            describedElements[i].removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE);
5996
        }
5997
        if (messagesContainer) {
5998
            this._deleteMessagesContainer();
5999
        }
6000
        messageRegistry.clear();
6001
    };
6002
    /**
6003
     * Creates a new element in the visually hidden message container element with the message
6004
     * as its content and adds it to the message registry.
6005
     * @param {?} message
6006
     * @return {?}
6007
     */
6008
    AriaDescriber.prototype._createMessageElement = /**
6009
     * Creates a new element in the visually hidden message container element with the message
6010
     * as its content and adds it to the message registry.
6011
     * @param {?} message
6012
     * @return {?}
6013
     */
6014
    function (message) {
6015
        var /** @type {?} */ messageElement = this._document.createElement('div');
6016
        messageElement.setAttribute('id', CDK_DESCRIBEDBY_ID_PREFIX + "-" + nextId++);
6017
        messageElement.appendChild(/** @type {?} */ ((this._document.createTextNode(message))));
6018
        this._createMessagesContainer(); /** @type {?} */
6019
        ((messagesContainer)).appendChild(messageElement);
6020
        messageRegistry.set(message, { messageElement: messageElement, referenceCount: 0 });
6021
    };
6022
    /**
6023
     * Deletes the message element from the global messages container.
6024
     * @param {?} message
6025
     * @return {?}
6026
     */
6027
    AriaDescriber.prototype._deleteMessageElement = /**
6028
     * Deletes the message element from the global messages container.
6029
     * @param {?} message
6030
     * @return {?}
6031
     */
6032
    function (message) {
6033
        var /** @type {?} */ registeredMessage = messageRegistry.get(message);
6034
        var /** @type {?} */ messageElement = registeredMessage && registeredMessage.messageElement;
6035
        if (messagesContainer && messageElement) {
6036
            messagesContainer.removeChild(messageElement);
6037
        }
6038
        messageRegistry.delete(message);
6039
    };
6040
    /**
6041
     * Creates the global container for all aria-describedby messages.
6042
     * @return {?}
6043
     */
6044
    AriaDescriber.prototype._createMessagesContainer = /**
6045
     * Creates the global container for all aria-describedby messages.
6046
     * @return {?}
6047
     */
6048
    function () {
6049
        if (!messagesContainer) {
6050
            var /** @type {?} */ preExistingContainer = this._document.getElementById(MESSAGES_CONTAINER_ID);
6051
            // When going from the server to the client, we may end up in a situation where there's
6052
            // already a container on the page, but we don't have a reference to it. Clear the
6053
            // old container so we don't get duplicates. Doing this, instead of emptying the previous
6054
            // container, should be slightly faster.
6055
            if (preExistingContainer) {
6056
                /** @type {?} */ ((preExistingContainer.parentNode)).removeChild(preExistingContainer);
6057
            }
6058
            messagesContainer = this._document.createElement('div');
6059
            messagesContainer.id = MESSAGES_CONTAINER_ID;
6060
            messagesContainer.setAttribute('aria-hidden', 'true');
6061
            messagesContainer.style.display = 'none';
6062
            this._document.body.appendChild(messagesContainer);
6063
        }
6064
    };
6065
    /**
6066
     * Deletes the global messages container.
6067
     * @return {?}
6068
     */
6069
    AriaDescriber.prototype._deleteMessagesContainer = /**
6070
     * Deletes the global messages container.
6071
     * @return {?}
6072
     */
6073
    function () {
6074
        if (messagesContainer && messagesContainer.parentNode) {
6075
            messagesContainer.parentNode.removeChild(messagesContainer);
6076
            messagesContainer = null;
6077
        }
6078
    };
6079
    /**
6080
     * Removes all cdk-describedby messages that are hosted through the element.
6081
     * @param {?} element
6082
     * @return {?}
6083
     */
6084
    AriaDescriber.prototype._removeCdkDescribedByReferenceIds = /**
6085
     * Removes all cdk-describedby messages that are hosted through the element.
6086
     * @param {?} element
6087
     * @return {?}
6088
     */
6089
    function (element) {
6090
        // Remove all aria-describedby reference IDs that are prefixed by CDK_DESCRIBEDBY_ID_PREFIX
6091
        var /** @type {?} */ originalReferenceIds = getAriaReferenceIds(element, 'aria-describedby')
6092
            .filter(function (id) { return id.indexOf(CDK_DESCRIBEDBY_ID_PREFIX) != 0; });
6093
        element.setAttribute('aria-describedby', originalReferenceIds.join(' '));
6094
    };
6095
    /**
6096
     * Adds a message reference to the element using aria-describedby and increments the registered
6097
     * message's reference count.
6098
     * @param {?} element
6099
     * @param {?} message
6100
     * @return {?}
6101
     */
6102
    AriaDescriber.prototype._addMessageReference = /**
6103
     * Adds a message reference to the element using aria-describedby and increments the registered
6104
     * message's reference count.
6105
     * @param {?} element
6106
     * @param {?} message
6107
     * @return {?}
6108
     */
6109
    function (element, message) {
6110
        var /** @type {?} */ registeredMessage = /** @type {?} */ ((messageRegistry.get(message)));
6111
        // Add the aria-describedby reference and set the
6112
        // describedby_host attribute to mark the element.
6113
        addAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id);
6114
        element.setAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE, '');
6115
        registeredMessage.referenceCount++;
6116
    };
6117
    /**
6118
     * Removes a message reference from the element using aria-describedby
6119
     * and decrements the registered message's reference count.
6120
     * @param {?} element
6121
     * @param {?} message
6122
     * @return {?}
6123
     */
6124
    AriaDescriber.prototype._removeMessageReference = /**
6125
     * Removes a message reference from the element using aria-describedby
6126
     * and decrements the registered message's reference count.
6127
     * @param {?} element
6128
     * @param {?} message
6129
     * @return {?}
6130
     */
6131
    function (element, message) {
6132
        var /** @type {?} */ registeredMessage = /** @type {?} */ ((messageRegistry.get(message)));
6133
        registeredMessage.referenceCount--;
6134
        removeAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id);
6135
        element.removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE);
6136
    };
6137
    /**
6138
     * Returns true if the element has been described by the provided message ID.
6139
     * @param {?} element
6140
     * @param {?} message
6141
     * @return {?}
6142
     */
6143
    AriaDescriber.prototype._isElementDescribedByMessage = /**
6144
     * Returns true if the element has been described by the provided message ID.
6145
     * @param {?} element
6146
     * @param {?} message
6147
     * @return {?}
6148
     */
6149
    function (element, message) {
6150
        var /** @type {?} */ referenceIds = getAriaReferenceIds(element, 'aria-describedby');
6151
        var /** @type {?} */ registeredMessage = messageRegistry.get(message);
6152
        var /** @type {?} */ messageId = registeredMessage && registeredMessage.messageElement.id;
6153
        return !!messageId && referenceIds.indexOf(messageId) != -1;
6154
    };
6155
    /**
6156
     * Determines whether a message can be described on a particular element.
6157
     * @param {?} element
6158
     * @param {?} message
6159
     * @return {?}
6160
     */
6161
    AriaDescriber.prototype._canBeDescribed = /**
6162
     * Determines whether a message can be described on a particular element.
6163
     * @param {?} element
6164
     * @param {?} message
6165
     * @return {?}
6166
     */
6167
    function (element, message) {
6168
        return element.nodeType === this._document.ELEMENT_NODE && message != null &&
6169
            !!("" + message).trim();
6170
    };
6171
    AriaDescriber.decorators = [
6172
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"], args: [{ providedIn: 'root' },] },
6173
    ];
6174
    /** @nocollapse */
6175
    AriaDescriber.ctorParameters = function () { return [
6176
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"],] },] },
6177
    ]; };
6178
    /** @nocollapse */ AriaDescriber.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["defineInjectable"])({ factory: function AriaDescriber_Factory() { return new AriaDescriber(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"])); }, token: AriaDescriber, providedIn: "root" });
6179
    return AriaDescriber;
6180
}());
6181
/**
6182
 * \@docs-private \@deprecated \@breaking-change 7.0.0
6183
 * @param {?} parentDispatcher
6184
 * @param {?} _document
6185
 * @return {?}
6186
 */
6187
function ARIA_DESCRIBER_PROVIDER_FACTORY(parentDispatcher, _document) {
6188
    return parentDispatcher || new AriaDescriber(_document);
6189
}
6190
/**
6191
 * \@docs-private \@deprecated \@breaking-change 7.0.0
6192
 */
6193
var /** @type {?} */ ARIA_DESCRIBER_PROVIDER = {
6194
    // If there is already an AriaDescriber available, use that. Otherwise, provide a new one.
6195
    provide: AriaDescriber,
6196
    deps: [
6197
        [new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"](), new _angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"](), AriaDescriber],
6198
        /** @type {?} */ (_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"])
6199
    ],
6200
    useFactory: ARIA_DESCRIBER_PROVIDER_FACTORY
6201
};
6202
 
6203
/**
6204
 * @fileoverview added by tsickle
6205
 * @suppress {checkTypes} checked by tsc
6206
 */
6207
// unsupported: template constraints.
6208
/**
6209
 * This class manages keyboard events for selectable lists. If you pass it a query list
6210
 * of items, it will set the active item correctly when arrow events occur.
6211
 * @template T
6212
 */
6213
var
6214
// unsupported: template constraints.
6215
/**
6216
 * This class manages keyboard events for selectable lists. If you pass it a query list
6217
 * of items, it will set the active item correctly when arrow events occur.
6218
 * @template T
6219
 */
6220
ListKeyManager = /** @class */ (function () {
6221
    function ListKeyManager(_items) {
6222
        var _this = this;
6223
        this._items = _items;
6224
        this._activeItemIndex = -1;
6225
        this._wrap = false;
6226
        this._letterKeyStream = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
6227
        this._typeaheadSubscription = rxjs__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY;
6228
        this._vertical = true;
6229
        /**
6230
         * Predicate function that can be used to check whether an item should be skipped
6231
         * by the key manager. By default, disabled items are skipped.
6232
         */
6233
        this._skipPredicateFn = function (item) { return item.disabled; };
6234
        this._pressedLetters = [];
6235
        /**
6236
         * Stream that emits any time the TAB key is pressed, so components can react
6237
         * when focus is shifted off of the list.
6238
         */
6239
        this.tabOut = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
6240
        /**
6241
         * Stream that emits whenever the active item of the list manager changes.
6242
         */
6243
        this.change = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
6244
        // We allow for the items to be an array because, in some cases, the consumer may
6245
        // not have access to a QueryList of the items they want to manage (e.g. when the
6246
        // items aren't being collected via `ViewChildren` or `ContentChildren`).
6247
        if (_items instanceof _angular_core__WEBPACK_IMPORTED_MODULE_1__["QueryList"]) {
6248
            _items.changes.subscribe(function (newItems) {
6249
                if (_this._activeItem) {
6250
                    var /** @type {?} */ itemArray = newItems.toArray();
6251
                    var /** @type {?} */ newIndex = itemArray.indexOf(_this._activeItem);
6252
                    if (newIndex > -1 && newIndex !== _this._activeItemIndex) {
6253
                        _this._activeItemIndex = newIndex;
6254
                    }
6255
                }
6256
            });
6257
        }
6258
    }
6259
    /**
6260
     * Sets the predicate function that determines which items should be skipped by the
6261
     * list key manager.
6262
     * @param predicate Function that determines whether the given item should be skipped.
6263
     */
6264
    /**
6265
     * Sets the predicate function that determines which items should be skipped by the
6266
     * list key manager.
6267
     * @param {?} predicate Function that determines whether the given item should be skipped.
6268
     * @return {?}
6269
     */
6270
    ListKeyManager.prototype.skipPredicate = /**
6271
     * Sets the predicate function that determines which items should be skipped by the
6272
     * list key manager.
6273
     * @param {?} predicate Function that determines whether the given item should be skipped.
6274
     * @return {?}
6275
     */
6276
    function (predicate) {
6277
        this._skipPredicateFn = predicate;
6278
        return this;
6279
    };
6280
    /**
6281
     * Configures wrapping mode, which determines whether the active item will wrap to
6282
     * the other end of list when there are no more items in the given direction.
6283
     * @param shouldWrap Whether the list should wrap when reaching the end.
6284
     */
6285
    /**
6286
     * Configures wrapping mode, which determines whether the active item will wrap to
6287
     * the other end of list when there are no more items in the given direction.
6288
     * @param {?=} shouldWrap Whether the list should wrap when reaching the end.
6289
     * @return {?}
6290
     */
6291
    ListKeyManager.prototype.withWrap = /**
6292
     * Configures wrapping mode, which determines whether the active item will wrap to
6293
     * the other end of list when there are no more items in the given direction.
6294
     * @param {?=} shouldWrap Whether the list should wrap when reaching the end.
6295
     * @return {?}
6296
     */
6297
    function (shouldWrap) {
6298
        if (shouldWrap === void 0) { shouldWrap = true; }
6299
        this._wrap = shouldWrap;
6300
        return this;
6301
    };
6302
    /**
6303
     * Configures whether the key manager should be able to move the selection vertically.
6304
     * @param enabled Whether vertical selection should be enabled.
6305
     */
6306
    /**
6307
     * Configures whether the key manager should be able to move the selection vertically.
6308
     * @param {?=} enabled Whether vertical selection should be enabled.
6309
     * @return {?}
6310
     */
6311
    ListKeyManager.prototype.withVerticalOrientation = /**
6312
     * Configures whether the key manager should be able to move the selection vertically.
6313
     * @param {?=} enabled Whether vertical selection should be enabled.
6314
     * @return {?}
6315
     */
6316
    function (enabled) {
6317
        if (enabled === void 0) { enabled = true; }
6318
        this._vertical = enabled;
6319
        return this;
6320
    };
6321
    /**
6322
     * Configures the key manager to move the selection horizontally.
6323
     * Passing in `null` will disable horizontal movement.
6324
     * @param direction Direction in which the selection can be moved.
6325
     */
6326
    /**
6327
     * Configures the key manager to move the selection horizontally.
6328
     * Passing in `null` will disable horizontal movement.
6329
     * @param {?} direction Direction in which the selection can be moved.
6330
     * @return {?}
6331
     */
6332
    ListKeyManager.prototype.withHorizontalOrientation = /**
6333
     * Configures the key manager to move the selection horizontally.
6334
     * Passing in `null` will disable horizontal movement.
6335
     * @param {?} direction Direction in which the selection can be moved.
6336
     * @return {?}
6337
     */
6338
    function (direction) {
6339
        this._horizontal = direction;
6340
        return this;
6341
    };
6342
    /**
6343
     * Turns on typeahead mode which allows users to set the active item by typing.
6344
     * @param debounceInterval Time to wait after the last keystroke before setting the active item.
6345
     */
6346
    /**
6347
     * Turns on typeahead mode which allows users to set the active item by typing.
6348
     * @param {?=} debounceInterval Time to wait after the last keystroke before setting the active item.
6349
     * @return {?}
6350
     */
6351
    ListKeyManager.prototype.withTypeAhead = /**
6352
     * Turns on typeahead mode which allows users to set the active item by typing.
6353
     * @param {?=} debounceInterval Time to wait after the last keystroke before setting the active item.
6354
     * @return {?}
6355
     */
6356
    function (debounceInterval) {
6357
        var _this = this;
6358
        if (debounceInterval === void 0) { debounceInterval = 200; }
6359
        if (this._items.length && this._items.some(function (item) { return typeof item.getLabel !== 'function'; })) {
6360
            throw Error('ListKeyManager items in typeahead mode must implement the `getLabel` method.');
6361
        }
6362
        this._typeaheadSubscription.unsubscribe();
6363
        // Debounce the presses of non-navigational keys, collect the ones that correspond to letters
6364
        // and convert those letters back into a string. Afterwards find the first item that starts
6365
        // with that string and select it.
6366
        this._typeaheadSubscription = this._letterKeyStream.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["tap"])(function (keyCode) { return _this._pressedLetters.push(keyCode); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["debounceTime"])(debounceInterval), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["filter"])(function () { return _this._pressedLetters.length > 0; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["map"])(function () { return _this._pressedLetters.join(''); })).subscribe(function (inputString) {
6367
            var /** @type {?} */ items = _this._getItemsArray();
6368
            // Start at 1 because we want to start searching at the item immediately
6369
            // following the current active item.
6370
            for (var /** @type {?} */ i = 1; i < items.length + 1; i++) {
6371
                var /** @type {?} */ index = (_this._activeItemIndex + i) % items.length;
6372
                var /** @type {?} */ item = items[index];
6373
                if (!_this._skipPredicateFn(item) && /** @type {?} */ ((item.getLabel))().toUpperCase().trim().indexOf(inputString) === 0) {
6374
                    _this.setActiveItem(index);
6375
                    break;
6376
                }
6377
            }
6378
            _this._pressedLetters = [];
6379
        });
6380
        return this;
6381
    };
6382
    /**
6383
     * @param {?} item
6384
     * @return {?}
6385
     */
6386
    ListKeyManager.prototype.setActiveItem = /**
6387
     * @param {?} item
6388
     * @return {?}
6389
     */
6390
    function (item) {
6391
        var /** @type {?} */ previousIndex = this._activeItemIndex;
6392
        this.updateActiveItem(item);
6393
        if (this._activeItemIndex !== previousIndex) {
6394
            this.change.next(this._activeItemIndex);
6395
        }
6396
    };
6397
    /**
6398
     * Sets the active item depending on the key event passed in.
6399
     * @param event Keyboard event to be used for determining which element should be active.
6400
     */
6401
    /**
6402
     * Sets the active item depending on the key event passed in.
6403
     * @param {?} event Keyboard event to be used for determining which element should be active.
6404
     * @return {?}
6405
     */
6406
    ListKeyManager.prototype.onKeydown = /**
6407
     * Sets the active item depending on the key event passed in.
6408
     * @param {?} event Keyboard event to be used for determining which element should be active.
6409
     * @return {?}
6410
     */
6411
    function (event) {
6412
        var /** @type {?} */ keyCode = event.keyCode;
6413
        switch (keyCode) {
6414
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["TAB"]:
6415
                this.tabOut.next();
6416
                return;
6417
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["DOWN_ARROW"]:
6418
                if (this._vertical) {
6419
                    this.setNextItemActive();
6420
                    break;
6421
                }
6422
                else {
6423
                    return;
6424
                }
6425
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["UP_ARROW"]:
6426
                if (this._vertical) {
6427
                    this.setPreviousItemActive();
6428
                    break;
6429
                }
6430
                else {
6431
                    return;
6432
                }
6433
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["RIGHT_ARROW"]:
6434
                if (this._horizontal === 'ltr') {
6435
                    this.setNextItemActive();
6436
                    break;
6437
                }
6438
                else if (this._horizontal === 'rtl') {
6439
                    this.setPreviousItemActive();
6440
                    break;
6441
                }
6442
                else {
6443
                    return;
6444
                }
6445
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["LEFT_ARROW"]:
6446
                if (this._horizontal === 'ltr') {
6447
                    this.setPreviousItemActive();
6448
                    break;
6449
                }
6450
                else if (this._horizontal === 'rtl') {
6451
                    this.setNextItemActive();
6452
                    break;
6453
                }
6454
                else {
6455
                    return;
6456
                }
6457
            default:
6458
                // Attempt to use the `event.key` which also maps it to the user's keyboard language,
6459
                // otherwise fall back to resolving alphanumeric characters via the keyCode.
6460
                if (event.key && event.key.length === 1) {
6461
                    this._letterKeyStream.next(event.key.toLocaleUpperCase());
6462
                }
6463
                else if ((keyCode >= _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["A"] && keyCode <= _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["Z"]) || (keyCode >= _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["ZERO"] && keyCode <= _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["NINE"])) {
6464
                    this._letterKeyStream.next(String.fromCharCode(keyCode));
6465
                }
6466
                // Note that we return here, in order to avoid preventing
6467
                // the default action of non-navigational keys.
6468
                return;
6469
        }
6470
        this._pressedLetters = [];
6471
        event.preventDefault();
6472
    };
6473
    Object.defineProperty(ListKeyManager.prototype, "activeItemIndex", {
6474
        /** Index of the currently active item. */
6475
        get: /**
6476
         * Index of the currently active item.
6477
         * @return {?}
6478
         */
6479
        function () {
6480
            return this._activeItemIndex;
6481
        },
6482
        enumerable: true,
6483
        configurable: true
6484
    });
6485
    Object.defineProperty(ListKeyManager.prototype, "activeItem", {
6486
        /** The active item. */
6487
        get: /**
6488
         * The active item.
6489
         * @return {?}
6490
         */
6491
        function () {
6492
            return this._activeItem;
6493
        },
6494
        enumerable: true,
6495
        configurable: true
6496
    });
6497
    /** Sets the active item to the first enabled item in the list. */
6498
    /**
6499
     * Sets the active item to the first enabled item in the list.
6500
     * @return {?}
6501
     */
6502
    ListKeyManager.prototype.setFirstItemActive = /**
6503
     * Sets the active item to the first enabled item in the list.
6504
     * @return {?}
6505
     */
6506
    function () {
6507
        this._setActiveItemByIndex(0, 1);
6508
    };
6509
    /** Sets the active item to the last enabled item in the list. */
6510
    /**
6511
     * Sets the active item to the last enabled item in the list.
6512
     * @return {?}
6513
     */
6514
    ListKeyManager.prototype.setLastItemActive = /**
6515
     * Sets the active item to the last enabled item in the list.
6516
     * @return {?}
6517
     */
6518
    function () {
6519
        this._setActiveItemByIndex(this._items.length - 1, -1);
6520
    };
6521
    /** Sets the active item to the next enabled item in the list. */
6522
    /**
6523
     * Sets the active item to the next enabled item in the list.
6524
     * @return {?}
6525
     */
6526
    ListKeyManager.prototype.setNextItemActive = /**
6527
     * Sets the active item to the next enabled item in the list.
6528
     * @return {?}
6529
     */
6530
    function () {
6531
        this._activeItemIndex < 0 ? this.setFirstItemActive() : this._setActiveItemByDelta(1);
6532
    };
6533
    /** Sets the active item to a previous enabled item in the list. */
6534
    /**
6535
     * Sets the active item to a previous enabled item in the list.
6536
     * @return {?}
6537
     */
6538
    ListKeyManager.prototype.setPreviousItemActive = /**
6539
     * Sets the active item to a previous enabled item in the list.
6540
     * @return {?}
6541
     */
6542
    function () {
6543
        this._activeItemIndex < 0 && this._wrap ? this.setLastItemActive()
6544
            : this._setActiveItemByDelta(-1);
6545
    };
6546
    /**
6547
     * @param {?} item
6548
     * @return {?}
6549
     */
6550
    ListKeyManager.prototype.updateActiveItem = /**
6551
     * @param {?} item
6552
     * @return {?}
6553
     */
6554
    function (item) {
6555
        var /** @type {?} */ itemArray = this._getItemsArray();
6556
        var /** @type {?} */ index = typeof item === 'number' ? item : itemArray.indexOf(item);
6557
        this._activeItemIndex = index;
6558
        this._activeItem = itemArray[index];
6559
    };
6560
    /**
6561
     * Allows setting of the activeItemIndex without any other effects.
6562
     * @param index The new activeItemIndex.
6563
     * @deprecated Use `updateActiveItem` instead.
6564
     * @breaking-change 7.0.0
6565
     */
6566
    /**
6567
     * Allows setting of the activeItemIndex without any other effects.
6568
     * @deprecated Use `updateActiveItem` instead.
6569
     * \@breaking-change 7.0.0
6570
     * @param {?} index The new activeItemIndex.
6571
     * @return {?}
6572
     */
6573
    ListKeyManager.prototype.updateActiveItemIndex = /**
6574
     * Allows setting of the activeItemIndex without any other effects.
6575
     * @deprecated Use `updateActiveItem` instead.
6576
     * \@breaking-change 7.0.0
6577
     * @param {?} index The new activeItemIndex.
6578
     * @return {?}
6579
     */
6580
    function (index) {
6581
        this.updateActiveItem(index);
6582
    };
6583
    /**
6584
     * This method sets the active item, given a list of items and the delta between the
6585
     * currently active item and the new active item. It will calculate differently
6586
     * depending on whether wrap mode is turned on.
6587
     * @param {?} delta
6588
     * @return {?}
6589
     */
6590
    ListKeyManager.prototype._setActiveItemByDelta = /**
6591
     * This method sets the active item, given a list of items and the delta between the
6592
     * currently active item and the new active item. It will calculate differently
6593
     * depending on whether wrap mode is turned on.
6594
     * @param {?} delta
6595
     * @return {?}
6596
     */
6597
    function (delta) {
6598
        this._wrap ? this._setActiveInWrapMode(delta) : this._setActiveInDefaultMode(delta);
6599
    };
6600
    /**
6601
     * Sets the active item properly given "wrap" mode. In other words, it will continue to move
6602
     * down the list until it finds an item that is not disabled, and it will wrap if it
6603
     * encounters either end of the list.
6604
     * @param {?} delta
6605
     * @return {?}
6606
     */
6607
    ListKeyManager.prototype._setActiveInWrapMode = /**
6608
     * Sets the active item properly given "wrap" mode. In other words, it will continue to move
6609
     * down the list until it finds an item that is not disabled, and it will wrap if it
6610
     * encounters either end of the list.
6611
     * @param {?} delta
6612
     * @return {?}
6613
     */
6614
    function (delta) {
6615
        var /** @type {?} */ items = this._getItemsArray();
6616
        for (var /** @type {?} */ i = 1; i <= items.length; i++) {
6617
            var /** @type {?} */ index = (this._activeItemIndex + (delta * i) + items.length) % items.length;
6618
            var /** @type {?} */ item = items[index];
6619
            if (!this._skipPredicateFn(item)) {
6620
                this.setActiveItem(index);
6621
                return;
6622
            }
6623
        }
6624
    };
6625
    /**
6626
     * Sets the active item properly given the default mode. In other words, it will
6627
     * continue to move down the list until it finds an item that is not disabled. If
6628
     * it encounters either end of the list, it will stop and not wrap.
6629
     * @param {?} delta
6630
     * @return {?}
6631
     */
6632
    ListKeyManager.prototype._setActiveInDefaultMode = /**
6633
     * Sets the active item properly given the default mode. In other words, it will
6634
     * continue to move down the list until it finds an item that is not disabled. If
6635
     * it encounters either end of the list, it will stop and not wrap.
6636
     * @param {?} delta
6637
     * @return {?}
6638
     */
6639
    function (delta) {
6640
        this._setActiveItemByIndex(this._activeItemIndex + delta, delta);
6641
    };
6642
    /**
6643
     * Sets the active item to the first enabled item starting at the index specified. If the
6644
     * item is disabled, it will move in the fallbackDelta direction until it either
6645
     * finds an enabled item or encounters the end of the list.
6646
     * @param {?} index
6647
     * @param {?} fallbackDelta
6648
     * @return {?}
6649
     */
6650
    ListKeyManager.prototype._setActiveItemByIndex = /**
6651
     * Sets the active item to the first enabled item starting at the index specified. If the
6652
     * item is disabled, it will move in the fallbackDelta direction until it either
6653
     * finds an enabled item or encounters the end of the list.
6654
     * @param {?} index
6655
     * @param {?} fallbackDelta
6656
     * @return {?}
6657
     */
6658
    function (index, fallbackDelta) {
6659
        var /** @type {?} */ items = this._getItemsArray();
6660
        if (!items[index]) {
6661
            return;
6662
        }
6663
        while (this._skipPredicateFn(items[index])) {
6664
            index += fallbackDelta;
6665
            if (!items[index]) {
6666
                return;
6667
            }
6668
        }
6669
        this.setActiveItem(index);
6670
    };
6671
    /**
6672
     * Returns the items as an array.
6673
     * @return {?}
6674
     */
6675
    ListKeyManager.prototype._getItemsArray = /**
6676
     * Returns the items as an array.
6677
     * @return {?}
6678
     */
6679
    function () {
6680
        return this._items instanceof _angular_core__WEBPACK_IMPORTED_MODULE_1__["QueryList"] ? this._items.toArray() : this._items;
6681
    };
6682
    return ListKeyManager;
6683
}());
6684
 
6685
/**
6686
 * @fileoverview added by tsickle
6687
 * @suppress {checkTypes} checked by tsc
6688
 */
6689
/**
6690
 * @template T
6691
 */
6692
var  /**
6693
 * @template T
6694
 */
6695
ActiveDescendantKeyManager = /** @class */ (function (_super) {
6696
    Object(tslib__WEBPACK_IMPORTED_MODULE_5__["__extends"])(ActiveDescendantKeyManager, _super);
6697
    function ActiveDescendantKeyManager() {
6698
        return _super !== null && _super.apply(this, arguments) || this;
6699
    }
6700
    /**
6701
     * @param {?} index
6702
     * @return {?}
6703
     */
6704
    ActiveDescendantKeyManager.prototype.setActiveItem = /**
6705
     * @param {?} index
6706
     * @return {?}
6707
     */
6708
    function (index) {
6709
        if (this.activeItem) {
6710
            this.activeItem.setInactiveStyles();
6711
        }
6712
        _super.prototype.setActiveItem.call(this, index);
6713
        if (this.activeItem) {
6714
            this.activeItem.setActiveStyles();
6715
        }
6716
    };
6717
    return ActiveDescendantKeyManager;
6718
}(ListKeyManager));
6719
 
6720
/**
6721
 * @fileoverview added by tsickle
6722
 * @suppress {checkTypes} checked by tsc
6723
 */
6724
/**
6725
 * @template T
6726
 */
6727
var  /**
6728
 * @template T
6729
 */
6730
FocusKeyManager = /** @class */ (function (_super) {
6731
    Object(tslib__WEBPACK_IMPORTED_MODULE_5__["__extends"])(FocusKeyManager, _super);
6732
    function FocusKeyManager() {
6733
        var _this = _super !== null && _super.apply(this, arguments) || this;
6734
        _this._origin = 'program';
6735
        return _this;
6736
    }
6737
    /**
6738
     * Sets the focus origin that will be passed in to the items for any subsequent `focus` calls.
6739
     * @param origin Focus origin to be used when focusing items.
6740
     */
6741
    /**
6742
     * Sets the focus origin that will be passed in to the items for any subsequent `focus` calls.
6743
     * @param {?} origin Focus origin to be used when focusing items.
6744
     * @return {?}
6745
     */
6746
    FocusKeyManager.prototype.setFocusOrigin = /**
6747
     * Sets the focus origin that will be passed in to the items for any subsequent `focus` calls.
6748
     * @param {?} origin Focus origin to be used when focusing items.
6749
     * @return {?}
6750
     */
6751
    function (origin) {
6752
        this._origin = origin;
6753
        return this;
6754
    };
6755
    /**
6756
     * @param {?} item
6757
     * @return {?}
6758
     */
6759
    FocusKeyManager.prototype.setActiveItem = /**
6760
     * @param {?} item
6761
     * @return {?}
6762
     */
6763
    function (item) {
6764
        _super.prototype.setActiveItem.call(this, item);
6765
        if (this.activeItem) {
6766
            this.activeItem.focus(this._origin);
6767
        }
6768
    };
6769
    return FocusKeyManager;
6770
}(ListKeyManager));
6771
 
6772
/**
6773
 * @fileoverview added by tsickle
6774
 * @suppress {checkTypes} checked by tsc
6775
 */
6776
/**
6777
 * Utility for checking the interactivity of an element, such as whether is is focusable or
6778
 * tabbable.
6779
 */
6780
var InteractivityChecker = /** @class */ (function () {
6781
    function InteractivityChecker(_platform) {
6782
        this._platform = _platform;
6783
    }
6784
    /**
6785
     * Gets whether an element is disabled.
6786
     *
6787
     * @param element Element to be checked.
6788
     * @returns Whether the element is disabled.
6789
     */
6790
    /**
6791
     * Gets whether an element is disabled.
6792
     *
6793
     * @param {?} element Element to be checked.
6794
     * @return {?} Whether the element is disabled.
6795
     */
6796
    InteractivityChecker.prototype.isDisabled = /**
6797
     * Gets whether an element is disabled.
6798
     *
6799
     * @param {?} element Element to be checked.
6800
     * @return {?} Whether the element is disabled.
6801
     */
6802
    function (element) {
6803
        // This does not capture some cases, such as a non-form control with a disabled attribute or
6804
        // a form control inside of a disabled form, but should capture the most common cases.
6805
        return element.hasAttribute('disabled');
6806
    };
6807
    /**
6808
     * Gets whether an element is visible for the purposes of interactivity.
6809
     *
6810
     * This will capture states like `display: none` and `visibility: hidden`, but not things like
6811
     * being clipped by an `overflow: hidden` parent or being outside the viewport.
6812
     *
6813
     * @returns Whether the element is visible.
6814
     */
6815
    /**
6816
     * Gets whether an element is visible for the purposes of interactivity.
6817
     *
6818
     * This will capture states like `display: none` and `visibility: hidden`, but not things like
6819
     * being clipped by an `overflow: hidden` parent or being outside the viewport.
6820
     *
6821
     * @param {?} element
6822
     * @return {?} Whether the element is visible.
6823
     */
6824
    InteractivityChecker.prototype.isVisible = /**
6825
     * Gets whether an element is visible for the purposes of interactivity.
6826
     *
6827
     * This will capture states like `display: none` and `visibility: hidden`, but not things like
6828
     * being clipped by an `overflow: hidden` parent or being outside the viewport.
6829
     *
6830
     * @param {?} element
6831
     * @return {?} Whether the element is visible.
6832
     */
6833
    function (element) {
6834
        return hasGeometry(element) && getComputedStyle(element).visibility === 'visible';
6835
    };
6836
    /**
6837
     * Gets whether an element can be reached via Tab key.
6838
     * Assumes that the element has already been checked with isFocusable.
6839
     *
6840
     * @param element Element to be checked.
6841
     * @returns Whether the element is tabbable.
6842
     */
6843
    /**
6844
     * Gets whether an element can be reached via Tab key.
6845
     * Assumes that the element has already been checked with isFocusable.
6846
     *
6847
     * @param {?} element Element to be checked.
6848
     * @return {?} Whether the element is tabbable.
6849
     */
6850
    InteractivityChecker.prototype.isTabbable = /**
6851
     * Gets whether an element can be reached via Tab key.
6852
     * Assumes that the element has already been checked with isFocusable.
6853
     *
6854
     * @param {?} element Element to be checked.
6855
     * @return {?} Whether the element is tabbable.
6856
     */
6857
    function (element) {
6858
        // Nothing is tabbable on the the server 😎
6859
        if (!this._platform.isBrowser) {
6860
            return false;
6861
        }
6862
        var /** @type {?} */ frameElement = getFrameElement(getWindow(element));
6863
        if (frameElement) {
6864
            var /** @type {?} */ frameType = frameElement && frameElement.nodeName.toLowerCase();
6865
            // Frame elements inherit their tabindex onto all child elements.
6866
            if (getTabIndexValue(frameElement) === -1) {
6867
                return false;
6868
            }
6869
            // Webkit and Blink consider anything inside of an <object> element as non-tabbable.
6870
            if ((this._platform.BLINK || this._platform.WEBKIT) && frameType === 'object') {
6871
                return false;
6872
            }
6873
            // Webkit and Blink disable tabbing to an element inside of an invisible frame.
6874
            if ((this._platform.BLINK || this._platform.WEBKIT) && !this.isVisible(frameElement)) {
6875
                return false;
6876
            }
6877
        }
6878
        var /** @type {?} */ nodeName = element.nodeName.toLowerCase();
6879
        var /** @type {?} */ tabIndexValue = getTabIndexValue(element);
6880
        if (element.hasAttribute('contenteditable')) {
6881
            return tabIndexValue !== -1;
6882
        }
6883
        if (nodeName === 'iframe') {
6884
            // The frames may be tabbable depending on content, but it's not possibly to reliably
6885
            // investigate the content of the frames.
6886
            return false;
6887
        }
6888
        if (nodeName === 'audio') {
6889
            if (!element.hasAttribute('controls')) {
6890
                // By default an <audio> element without the controls enabled is not tabbable.
6891
                return false;
6892
            }
6893
            else if (this._platform.BLINK) {
6894
                // In Blink <audio controls> elements are always tabbable.
6895
                return true;
6896
            }
6897
        }
6898
        if (nodeName === 'video') {
6899
            if (!element.hasAttribute('controls') && this._platform.TRIDENT) {
6900
                // In Trident a <video> element without the controls enabled is not tabbable.
6901
                return false;
6902
            }
6903
            else if (this._platform.BLINK || this._platform.FIREFOX) {
6904
                // In Chrome and Firefox <video controls> elements are always tabbable.
6905
                return true;
6906
            }
6907
        }
6908
        if (nodeName === 'object' && (this._platform.BLINK || this._platform.WEBKIT)) {
6909
            // In all Blink and WebKit based browsers <object> elements are never tabbable.
6910
            return false;
6911
        }
6912
        // In iOS the browser only considers some specific elements as tabbable.
6913
        if (this._platform.WEBKIT && this._platform.IOS && !isPotentiallyTabbableIOS(element)) {
6914
            return false;
6915
        }
6916
        return element.tabIndex >= 0;
6917
    };
6918
    /**
6919
     * Gets whether an element can be focused by the user.
6920
     *
6921
     * @param element Element to be checked.
6922
     * @returns Whether the element is focusable.
6923
     */
6924
    /**
6925
     * Gets whether an element can be focused by the user.
6926
     *
6927
     * @param {?} element Element to be checked.
6928
     * @return {?} Whether the element is focusable.
6929
     */
6930
    InteractivityChecker.prototype.isFocusable = /**
6931
     * Gets whether an element can be focused by the user.
6932
     *
6933
     * @param {?} element Element to be checked.
6934
     * @return {?} Whether the element is focusable.
6935
     */
6936
    function (element) {
6937
        // Perform checks in order of left to most expensive.
6938
        // Again, naive approach that does not capture many edge cases and browser quirks.
6939
        return isPotentiallyFocusable(element) && !this.isDisabled(element) && this.isVisible(element);
6940
    };
6941
    InteractivityChecker.decorators = [
6942
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"], args: [{ providedIn: 'root' },] },
6943
    ];
6944
    /** @nocollapse */
6945
    InteractivityChecker.ctorParameters = function () { return [
6946
        { type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_6__["Platform"], },
6947
    ]; };
6948
    /** @nocollapse */ InteractivityChecker.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["defineInjectable"])({ factory: function InteractivityChecker_Factory() { return new InteractivityChecker(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_6__["Platform"])); }, token: InteractivityChecker, providedIn: "root" });
6949
    return InteractivityChecker;
6950
}());
6951
/**
6952
 * Returns the frame element from a window object. Since browsers like MS Edge throw errors if
6953
 * the frameElement property is being accessed from a different host address, this property
6954
 * should be accessed carefully.
6955
 * @param {?} window
6956
 * @return {?}
6957
 */
6958
function getFrameElement(window) {
6959
    try {
6960
        return /** @type {?} */ (window.frameElement);
6961
    }
6962
    catch (/** @type {?} */ e) {
6963
        return null;
6964
    }
6965
}
6966
/**
6967
 * Checks whether the specified element has any geometry / rectangles.
6968
 * @param {?} element
6969
 * @return {?}
6970
 */
6971
function hasGeometry(element) {
6972
    // Use logic from jQuery to check for an invisible element.
6973
    // See https://github.com/jquery/jquery/blob/master/src/css/hiddenVisibleSelectors.js#L12
6974
    return !!(element.offsetWidth || element.offsetHeight ||
6975
        (typeof element.getClientRects === 'function' && element.getClientRects().length));
6976
}
6977
/**
6978
 * Gets whether an element's
6979
 * @param {?} element
6980
 * @return {?}
6981
 */
6982
function isNativeFormElement(element) {
6983
    var /** @type {?} */ nodeName = element.nodeName.toLowerCase();
6984
    return nodeName === 'input' ||
6985
        nodeName === 'select' ||
6986
        nodeName === 'button' ||
6987
        nodeName === 'textarea';
6988
}
6989
/**
6990
 * Gets whether an element is an `<input type="hidden">`.
6991
 * @param {?} element
6992
 * @return {?}
6993
 */
6994
function isHiddenInput(element) {
6995
    return isInputElement(element) && element.type == 'hidden';
6996
}
6997
/**
6998
 * Gets whether an element is an anchor that has an href attribute.
6999
 * @param {?} element
7000
 * @return {?}
7001
 */
7002
function isAnchorWithHref(element) {
7003
    return isAnchorElement(element) && element.hasAttribute('href');
7004
}
7005
/**
7006
 * Gets whether an element is an input element.
7007
 * @param {?} element
7008
 * @return {?}
7009
 */
7010
function isInputElement(element) {
7011
    return element.nodeName.toLowerCase() == 'input';
7012
}
7013
/**
7014
 * Gets whether an element is an anchor element.
7015
 * @param {?} element
7016
 * @return {?}
7017
 */
7018
function isAnchorElement(element) {
7019
    return element.nodeName.toLowerCase() == 'a';
7020
}
7021
/**
7022
 * Gets whether an element has a valid tabindex.
7023
 * @param {?} element
7024
 * @return {?}
7025
 */
7026
function hasValidTabIndex(element) {
7027
    if (!element.hasAttribute('tabindex') || element.tabIndex === undefined) {
7028
        return false;
7029
    }
7030
    var /** @type {?} */ tabIndex = element.getAttribute('tabindex');
7031
    // IE11 parses tabindex="" as the value "-32768"
7032
    if (tabIndex == '-32768') {
7033
        return false;
7034
    }
7035
    return !!(tabIndex && !isNaN(parseInt(tabIndex, 10)));
7036
}
7037
/**
7038
 * Returns the parsed tabindex from the element attributes instead of returning the
7039
 * evaluated tabindex from the browsers defaults.
7040
 * @param {?} element
7041
 * @return {?}
7042
 */
7043
function getTabIndexValue(element) {
7044
    if (!hasValidTabIndex(element)) {
7045
        return null;
7046
    }
7047
    // See browser issue in Gecko https://bugzilla.mozilla.org/show_bug.cgi?id=1128054
7048
    var /** @type {?} */ tabIndex = parseInt(element.getAttribute('tabindex') || '', 10);
7049
    return isNaN(tabIndex) ? -1 : tabIndex;
7050
}
7051
/**
7052
 * Checks whether the specified element is potentially tabbable on iOS
7053
 * @param {?} element
7054
 * @return {?}
7055
 */
7056
function isPotentiallyTabbableIOS(element) {
7057
    var /** @type {?} */ nodeName = element.nodeName.toLowerCase();
7058
    var /** @type {?} */ inputType = nodeName === 'input' && (/** @type {?} */ (element)).type;
7059
    return inputType === 'text'
7060
        || inputType === 'password'
7061
        || nodeName === 'select'
7062
        || nodeName === 'textarea';
7063
}
7064
/**
7065
 * Gets whether an element is potentially focusable without taking current visible/disabled state
7066
 * into account.
7067
 * @param {?} element
7068
 * @return {?}
7069
 */
7070
function isPotentiallyFocusable(element) {
7071
    // Inputs are potentially focusable *unless* they're type="hidden".
7072
    if (isHiddenInput(element)) {
7073
        return false;
7074
    }
7075
    return isNativeFormElement(element) ||
7076
        isAnchorWithHref(element) ||
7077
        element.hasAttribute('contenteditable') ||
7078
        hasValidTabIndex(element);
7079
}
7080
/**
7081
 * Gets the parent window of a DOM node with regards of being inside of an iframe.
7082
 * @param {?} node
7083
 * @return {?}
7084
 */
7085
function getWindow(node) {
7086
    return node.ownerDocument.defaultView || window;
7087
}
7088
 
7089
/**
7090
 * @fileoverview added by tsickle
7091
 * @suppress {checkTypes} checked by tsc
7092
 */
7093
/**
7094
 * Class that allows for trapping focus within a DOM element.
7095
 *
7096
 * This class currently uses a relatively simple approach to focus trapping.
7097
 * It assumes that the tab order is the same as DOM order, which is not necessarily true.
7098
 * Things like `tabIndex > 0`, flex `order`, and shadow roots can cause to two to misalign.
7099
 */
7100
var  /**
7101
 * Class that allows for trapping focus within a DOM element.
7102
 *
7103
 * This class currently uses a relatively simple approach to focus trapping.
7104
 * It assumes that the tab order is the same as DOM order, which is not necessarily true.
7105
 * Things like `tabIndex > 0`, flex `order`, and shadow roots can cause to two to misalign.
7106
 */
7107
FocusTrap = /** @class */ (function () {
7108
    function FocusTrap(_element, _checker, _ngZone, _document, deferAnchors) {
7109
        if (deferAnchors === void 0) { deferAnchors = false; }
7110
        this._element = _element;
7111
        this._checker = _checker;
7112
        this._ngZone = _ngZone;
7113
        this._document = _document;
7114
        this._hasAttached = false;
7115
        this._enabled = true;
7116
        if (!deferAnchors) {
7117
            this.attachAnchors();
7118
        }
7119
    }
7120
    Object.defineProperty(FocusTrap.prototype, "enabled", {
7121
        /** Whether the focus trap is active. */
7122
        get: /**
7123
         * Whether the focus trap is active.
7124
         * @return {?}
7125
         */
7126
        function () { return this._enabled; },
7127
        set: /**
7128
         * @param {?} val
7129
         * @return {?}
7130
         */
7131
        function (val) {
7132
            this._enabled = val;
7133
            if (this._startAnchor && this._endAnchor) {
7134
                this._startAnchor.tabIndex = this._endAnchor.tabIndex = this._enabled ? 0 : -1;
7135
            }
7136
        },
7137
        enumerable: true,
7138
        configurable: true
7139
    });
7140
    /** Destroys the focus trap by cleaning up the anchors. */
7141
    /**
7142
     * Destroys the focus trap by cleaning up the anchors.
7143
     * @return {?}
7144
     */
7145
    FocusTrap.prototype.destroy = /**
7146
     * Destroys the focus trap by cleaning up the anchors.
7147
     * @return {?}
7148
     */
7149
    function () {
7150
        if (this._startAnchor && this._startAnchor.parentNode) {
7151
            this._startAnchor.parentNode.removeChild(this._startAnchor);
7152
        }
7153
        if (this._endAnchor && this._endAnchor.parentNode) {
7154
            this._endAnchor.parentNode.removeChild(this._endAnchor);
7155
        }
7156
        this._startAnchor = this._endAnchor = null;
7157
    };
7158
    /**
7159
     * Inserts the anchors into the DOM. This is usually done automatically
7160
     * in the constructor, but can be deferred for cases like directives with `*ngIf`.
7161
     * @returns Whether the focus trap managed to attach successfuly. This may not be the case
7162
     * if the target element isn't currently in the DOM.
7163
     */
7164
    /**
7165
     * Inserts the anchors into the DOM. This is usually done automatically
7166
     * in the constructor, but can be deferred for cases like directives with `*ngIf`.
7167
     * @return {?} Whether the focus trap managed to attach successfuly. This may not be the case
7168
     * if the target element isn't currently in the DOM.
7169
     */
7170
    FocusTrap.prototype.attachAnchors = /**
7171
     * Inserts the anchors into the DOM. This is usually done automatically
7172
     * in the constructor, but can be deferred for cases like directives with `*ngIf`.
7173
     * @return {?} Whether the focus trap managed to attach successfuly. This may not be the case
7174
     * if the target element isn't currently in the DOM.
7175
     */
7176
    function () {
7177
        var _this = this;
7178
        // If we're not on the browser, there can be no focus to trap.
7179
        if (this._hasAttached) {
7180
            return true;
7181
        }
7182
        this._ngZone.runOutsideAngular(function () {
7183
            if (!_this._startAnchor) {
7184
                _this._startAnchor = _this._createAnchor(); /** @type {?} */
7185
                ((_this._startAnchor)).addEventListener('focus', function () { return _this.focusLastTabbableElement(); });
7186
            }
7187
            if (!_this._endAnchor) {
7188
                _this._endAnchor = _this._createAnchor(); /** @type {?} */
7189
                ((_this._endAnchor)).addEventListener('focus', function () { return _this.focusFirstTabbableElement(); });
7190
            }
7191
        });
7192
        if (this._element.parentNode) {
7193
            this._element.parentNode.insertBefore(/** @type {?} */ ((this._startAnchor)), this._element);
7194
            this._element.parentNode.insertBefore(/** @type {?} */ ((this._endAnchor)), this._element.nextSibling);
7195
            this._hasAttached = true;
7196
        }
7197
        return this._hasAttached;
7198
    };
7199
    /**
7200
     * Waits for the zone to stabilize, then either focuses the first element that the
7201
     * user specified, or the first tabbable element.
7202
     * @returns Returns a promise that resolves with a boolean, depending
7203
     * on whether focus was moved successfuly.
7204
     */
7205
    /**
7206
     * Waits for the zone to stabilize, then either focuses the first element that the
7207
     * user specified, or the first tabbable element.
7208
     * @return {?} Returns a promise that resolves with a boolean, depending
7209
     * on whether focus was moved successfuly.
7210
     */
7211
    FocusTrap.prototype.focusInitialElementWhenReady = /**
7212
     * Waits for the zone to stabilize, then either focuses the first element that the
7213
     * user specified, or the first tabbable element.
7214
     * @return {?} Returns a promise that resolves with a boolean, depending
7215
     * on whether focus was moved successfuly.
7216
     */
7217
    function () {
7218
        var _this = this;
7219
        return new Promise(function (resolve) {
7220
            _this._executeOnStable(function () { return resolve(_this.focusInitialElement()); });
7221
        });
7222
    };
7223
    /**
7224
     * Waits for the zone to stabilize, then focuses
7225
     * the first tabbable element within the focus trap region.
7226
     * @returns Returns a promise that resolves with a boolean, depending
7227
     * on whether focus was moved successfuly.
7228
     */
7229
    /**
7230
     * Waits for the zone to stabilize, then focuses
7231
     * the first tabbable element within the focus trap region.
7232
     * @return {?} Returns a promise that resolves with a boolean, depending
7233
     * on whether focus was moved successfuly.
7234
     */
7235
    FocusTrap.prototype.focusFirstTabbableElementWhenReady = /**
7236
     * Waits for the zone to stabilize, then focuses
7237
     * the first tabbable element within the focus trap region.
7238
     * @return {?} Returns a promise that resolves with a boolean, depending
7239
     * on whether focus was moved successfuly.
7240
     */
7241
    function () {
7242
        var _this = this;
7243
        return new Promise(function (resolve) {
7244
            _this._executeOnStable(function () { return resolve(_this.focusFirstTabbableElement()); });
7245
        });
7246
    };
7247
    /**
7248
     * Waits for the zone to stabilize, then focuses
7249
     * the last tabbable element within the focus trap region.
7250
     * @returns Returns a promise that resolves with a boolean, depending
7251
     * on whether focus was moved successfuly.
7252
     */
7253
    /**
7254
     * Waits for the zone to stabilize, then focuses
7255
     * the last tabbable element within the focus trap region.
7256
     * @return {?} Returns a promise that resolves with a boolean, depending
7257
     * on whether focus was moved successfuly.
7258
     */
7259
    FocusTrap.prototype.focusLastTabbableElementWhenReady = /**
7260
     * Waits for the zone to stabilize, then focuses
7261
     * the last tabbable element within the focus trap region.
7262
     * @return {?} Returns a promise that resolves with a boolean, depending
7263
     * on whether focus was moved successfuly.
7264
     */
7265
    function () {
7266
        var _this = this;
7267
        return new Promise(function (resolve) {
7268
            _this._executeOnStable(function () { return resolve(_this.focusLastTabbableElement()); });
7269
        });
7270
    };
7271
    /**
7272
     * Get the specified boundary element of the trapped region.
7273
     * @param {?} bound The boundary to get (start or end of trapped region).
7274
     * @return {?} The boundary element.
7275
     */
7276
    FocusTrap.prototype._getRegionBoundary = /**
7277
     * Get the specified boundary element of the trapped region.
7278
     * @param {?} bound The boundary to get (start or end of trapped region).
7279
     * @return {?} The boundary element.
7280
     */
7281
    function (bound) {
7282
        // Contains the deprecated version of selector, for temporary backwards comparability.
7283
        var /** @type {?} */ markers = /** @type {?} */ (this._element.querySelectorAll("[cdk-focus-region-" + bound + "], " +
7284
            ("[cdkFocusRegion" + bound + "], ") +
7285
            ("[cdk-focus-" + bound + "]")));
7286
        for (var /** @type {?} */ i = 0; i < markers.length; i++) {
7287
            // @breaking-change 7.0.0
7288
            if (markers[i].hasAttribute("cdk-focus-" + bound)) {
7289
                console.warn("Found use of deprecated attribute 'cdk-focus-" + bound + "', " +
7290
                    ("use 'cdkFocusRegion" + bound + "' instead. The deprecated ") +
7291
                    "attribute will be removed in 7.0.0.", markers[i]);
7292
            }
7293
            else if (markers[i].hasAttribute("cdk-focus-region-" + bound)) {
7294
                console.warn("Found use of deprecated attribute 'cdk-focus-region-" + bound + "', " +
7295
                    ("use 'cdkFocusRegion" + bound + "' instead. The deprecated attribute ") +
7296
                    "will be removed in 7.0.0.", markers[i]);
7297
            }
7298
        }
7299
        if (bound == 'start') {
7300
            return markers.length ? markers[0] : this._getFirstTabbableElement(this._element);
7301
        }
7302
        return markers.length ?
7303
            markers[markers.length - 1] : this._getLastTabbableElement(this._element);
7304
    };
7305
    /**
7306
     * Focuses the element that should be focused when the focus trap is initialized.
7307
     * @returns Whether focus was moved successfuly.
7308
     */
7309
    /**
7310
     * Focuses the element that should be focused when the focus trap is initialized.
7311
     * @return {?} Whether focus was moved successfuly.
7312
     */
7313
    FocusTrap.prototype.focusInitialElement = /**
7314
     * Focuses the element that should be focused when the focus trap is initialized.
7315
     * @return {?} Whether focus was moved successfuly.
7316
     */
7317
    function () {
7318
        // Contains the deprecated version of selector, for temporary backwards comparability.
7319
        var /** @type {?} */ redirectToElement = /** @type {?} */ (this._element.querySelector("[cdk-focus-initial], " +
7320
            "[cdkFocusInitial]"));
7321
        if (redirectToElement) {
7322
            // @breaking-change 7.0.0
7323
            if (redirectToElement.hasAttribute("cdk-focus-initial")) {
7324
                console.warn("Found use of deprecated attribute 'cdk-focus-initial', " +
7325
                    "use 'cdkFocusInitial' instead. The deprecated attribute " +
7326
                    "will be removed in 7.0.0", redirectToElement);
7327
            }
7328
            redirectToElement.focus();
7329
            return true;
7330
        }
7331
        return this.focusFirstTabbableElement();
7332
    };
7333
    /**
7334
     * Focuses the first tabbable element within the focus trap region.
7335
     * @returns Whether focus was moved successfuly.
7336
     */
7337
    /**
7338
     * Focuses the first tabbable element within the focus trap region.
7339
     * @return {?} Whether focus was moved successfuly.
7340
     */
7341
    FocusTrap.prototype.focusFirstTabbableElement = /**
7342
     * Focuses the first tabbable element within the focus trap region.
7343
     * @return {?} Whether focus was moved successfuly.
7344
     */
7345
    function () {
7346
        var /** @type {?} */ redirectToElement = this._getRegionBoundary('start');
7347
        if (redirectToElement) {
7348
            redirectToElement.focus();
7349
        }
7350
        return !!redirectToElement;
7351
    };
7352
    /**
7353
     * Focuses the last tabbable element within the focus trap region.
7354
     * @returns Whether focus was moved successfuly.
7355
     */
7356
    /**
7357
     * Focuses the last tabbable element within the focus trap region.
7358
     * @return {?} Whether focus was moved successfuly.
7359
     */
7360
    FocusTrap.prototype.focusLastTabbableElement = /**
7361
     * Focuses the last tabbable element within the focus trap region.
7362
     * @return {?} Whether focus was moved successfuly.
7363
     */
7364
    function () {
7365
        var /** @type {?} */ redirectToElement = this._getRegionBoundary('end');
7366
        if (redirectToElement) {
7367
            redirectToElement.focus();
7368
        }
7369
        return !!redirectToElement;
7370
    };
7371
    /**
7372
     * Checks whether the focus trap has successfuly been attached.
7373
     */
7374
    /**
7375
     * Checks whether the focus trap has successfuly been attached.
7376
     * @return {?}
7377
     */
7378
    FocusTrap.prototype.hasAttached = /**
7379
     * Checks whether the focus trap has successfuly been attached.
7380
     * @return {?}
7381
     */
7382
    function () {
7383
        return this._hasAttached;
7384
    };
7385
    /**
7386
     * Get the first tabbable element from a DOM subtree (inclusive).
7387
     * @param {?} root
7388
     * @return {?}
7389
     */
7390
    FocusTrap.prototype._getFirstTabbableElement = /**
7391
     * Get the first tabbable element from a DOM subtree (inclusive).
7392
     * @param {?} root
7393
     * @return {?}
7394
     */
7395
    function (root) {
7396
        if (this._checker.isFocusable(root) && this._checker.isTabbable(root)) {
7397
            return root;
7398
        }
7399
        // Iterate in DOM order. Note that IE doesn't have `children` for SVG so we fall
7400
        // back to `childNodes` which includes text nodes, comments etc.
7401
        var /** @type {?} */ children = root.children || root.childNodes;
7402
        for (var /** @type {?} */ i = 0; i < children.length; i++) {
7403
            var /** @type {?} */ tabbableChild = children[i].nodeType === this._document.ELEMENT_NODE ?
7404
                this._getFirstTabbableElement(/** @type {?} */ (children[i])) :
7405
                null;
7406
            if (tabbableChild) {
7407
                return tabbableChild;
7408
            }
7409
        }
7410
        return null;
7411
    };
7412
    /**
7413
     * Get the last tabbable element from a DOM subtree (inclusive).
7414
     * @param {?} root
7415
     * @return {?}
7416
     */
7417
    FocusTrap.prototype._getLastTabbableElement = /**
7418
     * Get the last tabbable element from a DOM subtree (inclusive).
7419
     * @param {?} root
7420
     * @return {?}
7421
     */
7422
    function (root) {
7423
        if (this._checker.isFocusable(root) && this._checker.isTabbable(root)) {
7424
            return root;
7425
        }
7426
        // Iterate in reverse DOM order.
7427
        var /** @type {?} */ children = root.children || root.childNodes;
7428
        for (var /** @type {?} */ i = children.length - 1; i >= 0; i--) {
7429
            var /** @type {?} */ tabbableChild = children[i].nodeType === this._document.ELEMENT_NODE ?
7430
                this._getLastTabbableElement(/** @type {?} */ (children[i])) :
7431
                null;
7432
            if (tabbableChild) {
7433
                return tabbableChild;
7434
            }
7435
        }
7436
        return null;
7437
    };
7438
    /**
7439
     * Creates an anchor element.
7440
     * @return {?}
7441
     */
7442
    FocusTrap.prototype._createAnchor = /**
7443
     * Creates an anchor element.
7444
     * @return {?}
7445
     */
7446
    function () {
7447
        var /** @type {?} */ anchor = this._document.createElement('div');
7448
        anchor.tabIndex = this._enabled ? 0 : -1;
7449
        anchor.classList.add('cdk-visually-hidden');
7450
        anchor.classList.add('cdk-focus-trap-anchor');
7451
        return anchor;
7452
    };
7453
    /**
7454
     * Executes a function when the zone is stable.
7455
     * @param {?} fn
7456
     * @return {?}
7457
     */
7458
    FocusTrap.prototype._executeOnStable = /**
7459
     * Executes a function when the zone is stable.
7460
     * @param {?} fn
7461
     * @return {?}
7462
     */
7463
    function (fn) {
7464
        if (this._ngZone.isStable) {
7465
            fn();
7466
        }
7467
        else {
7468
            this._ngZone.onStable.asObservable().pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["take"])(1)).subscribe(fn);
7469
        }
7470
    };
7471
    return FocusTrap;
7472
}());
7473
/**
7474
 * Factory that allows easy instantiation of focus traps.
7475
 */
7476
var FocusTrapFactory = /** @class */ (function () {
7477
    function FocusTrapFactory(_checker, _ngZone, _document) {
7478
        this._checker = _checker;
7479
        this._ngZone = _ngZone;
7480
        this._document = _document;
7481
    }
7482
    /**
7483
     * Creates a focus-trapped region around the given element.
7484
     * @param element The element around which focus will be trapped.
7485
     * @param deferCaptureElements Defers the creation of focus-capturing elements to be done
7486
     *     manually by the user.
7487
     * @returns The created focus trap instance.
7488
     */
7489
    /**
7490
     * Creates a focus-trapped region around the given element.
7491
     * @param {?} element The element around which focus will be trapped.
7492
     * @param {?=} deferCaptureElements Defers the creation of focus-capturing elements to be done
7493
     *     manually by the user.
7494
     * @return {?} The created focus trap instance.
7495
     */
7496
    FocusTrapFactory.prototype.create = /**
7497
     * Creates a focus-trapped region around the given element.
7498
     * @param {?} element The element around which focus will be trapped.
7499
     * @param {?=} deferCaptureElements Defers the creation of focus-capturing elements to be done
7500
     *     manually by the user.
7501
     * @return {?} The created focus trap instance.
7502
     */
7503
    function (element, deferCaptureElements) {
7504
        if (deferCaptureElements === void 0) { deferCaptureElements = false; }
7505
        return new FocusTrap(element, this._checker, this._ngZone, this._document, deferCaptureElements);
7506
    };
7507
    FocusTrapFactory.decorators = [
7508
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"], args: [{ providedIn: 'root' },] },
7509
    ];
7510
    /** @nocollapse */
7511
    FocusTrapFactory.ctorParameters = function () { return [
7512
        { type: InteractivityChecker, },
7513
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"], },
7514
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"],] },] },
7515
    ]; };
7516
    /** @nocollapse */ FocusTrapFactory.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["defineInjectable"])({ factory: function FocusTrapFactory_Factory() { return new FocusTrapFactory(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(InteractivityChecker), Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]), Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"])); }, token: FocusTrapFactory, providedIn: "root" });
7517
    return FocusTrapFactory;
7518
}());
7519
/**
7520
 * Directive for trapping focus within a region.
7521
 */
7522
var CdkTrapFocus = /** @class */ (function () {
7523
    function CdkTrapFocus(_elementRef, _focusTrapFactory, _document) {
7524
        this._elementRef = _elementRef;
7525
        this._focusTrapFactory = _focusTrapFactory;
7526
        /**
7527
         * Previously focused element to restore focus to upon destroy when using autoCapture.
7528
         */
7529
        this._previouslyFocusedElement = null;
7530
        this._document = _document;
7531
        this.focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement, true);
7532
    }
7533
    Object.defineProperty(CdkTrapFocus.prototype, "enabled", {
7534
        get: /**
7535
         * Whether the focus trap is active.
7536
         * @return {?}
7537
         */
7538
        function () { return this.focusTrap.enabled; },
7539
        set: /**
7540
         * @param {?} value
7541
         * @return {?}
7542
         */
7543
        function (value) { this.focusTrap.enabled = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_7__["coerceBooleanProperty"])(value); },
7544
        enumerable: true,
7545
        configurable: true
7546
    });
7547
    Object.defineProperty(CdkTrapFocus.prototype, "autoCapture", {
7548
        get: /**
7549
         * Whether the directive should automatially move focus into the trapped region upon
7550
         * initialization and return focus to the previous activeElement upon destruction.
7551
         * @return {?}
7552
         */
7553
        function () { return this._autoCapture; },
7554
        set: /**
7555
         * @param {?} value
7556
         * @return {?}
7557
         */
7558
        function (value) { this._autoCapture = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_7__["coerceBooleanProperty"])(value); },
7559
        enumerable: true,
7560
        configurable: true
7561
    });
7562
    /**
7563
     * @return {?}
7564
     */
7565
    CdkTrapFocus.prototype.ngOnDestroy = /**
7566
     * @return {?}
7567
     */
7568
    function () {
7569
        this.focusTrap.destroy();
7570
        // If we stored a previously focused element when using autoCapture, return focus to that
7571
        // element now that the trapped region is being destroyed.
7572
        if (this._previouslyFocusedElement) {
7573
            this._previouslyFocusedElement.focus();
7574
            this._previouslyFocusedElement = null;
7575
        }
7576
    };
7577
    /**
7578
     * @return {?}
7579
     */
7580
    CdkTrapFocus.prototype.ngAfterContentInit = /**
7581
     * @return {?}
7582
     */
7583
    function () {
7584
        this.focusTrap.attachAnchors();
7585
        if (this.autoCapture) {
7586
            this._previouslyFocusedElement = /** @type {?} */ (this._document.activeElement);
7587
            this.focusTrap.focusInitialElementWhenReady();
7588
        }
7589
    };
7590
    /**
7591
     * @return {?}
7592
     */
7593
    CdkTrapFocus.prototype.ngDoCheck = /**
7594
     * @return {?}
7595
     */
7596
    function () {
7597
        if (!this.focusTrap.hasAttached()) {
7598
            this.focusTrap.attachAnchors();
7599
        }
7600
    };
7601
    CdkTrapFocus.decorators = [
7602
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
7603
                    selector: '[cdkTrapFocus]',
7604
                    exportAs: 'cdkTrapFocus',
7605
                },] },
7606
    ];
7607
    /** @nocollapse */
7608
    CdkTrapFocus.ctorParameters = function () { return [
7609
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
7610
        { type: FocusTrapFactory, },
7611
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"],] },] },
7612
    ]; };
7613
    CdkTrapFocus.propDecorators = {
7614
        "enabled": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['cdkTrapFocus',] },],
7615
        "autoCapture": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['cdkTrapFocusAutoCapture',] },],
7616
    };
7617
    return CdkTrapFocus;
7618
}());
7619
 
7620
/**
7621
 * @fileoverview added by tsickle
7622
 * @suppress {checkTypes} checked by tsc
7623
 */
7624
// The token for the live announcer element is defined in a separate file from LiveAnnouncer
7625
// as a workaround for https://github.com/angular/angular/issues/22559
7626
var /** @type {?} */ LIVE_ANNOUNCER_ELEMENT_TOKEN = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('liveAnnouncerElement', {
7627
    providedIn: 'root',
7628
    factory: LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY,
7629
});
7630
/**
7631
 * \@docs-private
7632
 * @return {?}
7633
 */
7634
function LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY() {
7635
    return null;
7636
}
7637
 
7638
/**
7639
 * @fileoverview added by tsickle
7640
 * @suppress {checkTypes} checked by tsc
7641
 */
7642
var LiveAnnouncer = /** @class */ (function () {
7643
    function LiveAnnouncer(elementToken, _document) {
7644
        // We inject the live element and document as `any` because the constructor signature cannot
7645
        // reference browser globals (HTMLElement, Document) on non-browser environments, since having
7646
        // a class decorator causes TypeScript to preserve the constructor signature types.
7647
        this._document = _document;
7648
        this._liveElement = elementToken || this._createLiveElement();
7649
    }
7650
    /**
7651
     * Announces a message to screenreaders.
7652
     * @param message Message to be announced to the screenreader
7653
     * @param politeness The politeness of the announcer element
7654
     * @returns Promise that will be resolved when the message is added to the DOM.
7655
     */
7656
    /**
7657
     * Announces a message to screenreaders.
7658
     * @param {?} message Message to be announced to the screenreader
7659
     * @param {?=} politeness The politeness of the announcer element
7660
     * @return {?} Promise that will be resolved when the message is added to the DOM.
7661
     */
7662
    LiveAnnouncer.prototype.announce = /**
7663
     * Announces a message to screenreaders.
7664
     * @param {?} message Message to be announced to the screenreader
7665
     * @param {?=} politeness The politeness of the announcer element
7666
     * @return {?} Promise that will be resolved when the message is added to the DOM.
7667
     */
7668
    function (message, politeness) {
7669
        var _this = this;
7670
        if (politeness === void 0) { politeness = 'polite'; }
7671
        this._liveElement.textContent = '';
7672
        // TODO: ensure changing the politeness works on all environments we support.
7673
        this._liveElement.setAttribute('aria-live', politeness);
7674
        // This 100ms timeout is necessary for some browser + screen-reader combinations:
7675
        // - Both JAWS and NVDA over IE11 will not announce anything without a non-zero timeout.
7676
        // - With Chrome and IE11 with NVDA or JAWS, a repeated (identical) message won't be read a
7677
        //   second time without clearing and then using a non-zero delay.
7678
        // (using JAWS 17 at time of this writing).
7679
        return new Promise(function (resolve) {
7680
            setTimeout(function () {
7681
                _this._liveElement.textContent = message;
7682
                resolve();
7683
            }, 100);
7684
        });
7685
    };
7686
    /**
7687
     * @return {?}
7688
     */
7689
    LiveAnnouncer.prototype.ngOnDestroy = /**
7690
     * @return {?}
7691
     */
7692
    function () {
7693
        if (this._liveElement && this._liveElement.parentNode) {
7694
            this._liveElement.parentNode.removeChild(this._liveElement);
7695
        }
7696
    };
7697
    /**
7698
     * @return {?}
7699
     */
7700
    LiveAnnouncer.prototype._createLiveElement = /**
7701
     * @return {?}
7702
     */
7703
    function () {
7704
        var /** @type {?} */ elementClass = 'cdk-live-announcer-element';
7705
        var /** @type {?} */ previousElements = this._document.getElementsByClassName(elementClass);
7706
        // Remove any old containers. This can happen when coming in from a server-side-rendered page.
7707
        for (var /** @type {?} */ i = 0; i < previousElements.length; i++) {
7708
            /** @type {?} */ ((previousElements[i].parentNode)).removeChild(previousElements[i]);
7709
        }
7710
        var /** @type {?} */ liveEl = this._document.createElement('div');
7711
        liveEl.classList.add(elementClass);
7712
        liveEl.classList.add('cdk-visually-hidden');
7713
        liveEl.setAttribute('aria-atomic', 'true');
7714
        liveEl.setAttribute('aria-live', 'polite');
7715
        this._document.body.appendChild(liveEl);
7716
        return liveEl;
7717
    };
7718
    LiveAnnouncer.decorators = [
7719
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"], args: [{ providedIn: 'root' },] },
7720
    ];
7721
    /** @nocollapse */
7722
    LiveAnnouncer.ctorParameters = function () { return [
7723
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [LIVE_ANNOUNCER_ELEMENT_TOKEN,] },] },
7724
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"],] },] },
7725
    ]; };
7726
    /** @nocollapse */ LiveAnnouncer.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["defineInjectable"])({ factory: function LiveAnnouncer_Factory() { return new LiveAnnouncer(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(LIVE_ANNOUNCER_ELEMENT_TOKEN, 8), Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"])); }, token: LiveAnnouncer, providedIn: "root" });
7727
    return LiveAnnouncer;
7728
}());
7729
/**
7730
 * A directive that works similarly to aria-live, but uses the LiveAnnouncer to ensure compatibility
7731
 * with a wider range of browsers and screen readers.
7732
 */
7733
var CdkAriaLive = /** @class */ (function () {
7734
    function CdkAriaLive(_elementRef, _liveAnnouncer, _contentObserver, _ngZone) {
7735
        this._elementRef = _elementRef;
7736
        this._liveAnnouncer = _liveAnnouncer;
7737
        this._contentObserver = _contentObserver;
7738
        this._ngZone = _ngZone;
7739
        this._politeness = 'off';
7740
    }
7741
    Object.defineProperty(CdkAriaLive.prototype, "politeness", {
7742
        get: /**
7743
         * The aria-live politeness level to use when announcing messages.
7744
         * @return {?}
7745
         */
7746
        function () { return this._politeness; },
7747
        set: /**
7748
         * @param {?} value
7749
         * @return {?}
7750
         */
7751
        function (value) {
7752
            var _this = this;
7753
            this._politeness = value === 'polite' || value === 'assertive' ? value : 'off';
7754
            if (this._politeness === 'off') {
7755
                if (this._subscription) {
7756
                    this._subscription.unsubscribe();
7757
                    this._subscription = null;
7758
                }
7759
            }
7760
            else {
7761
                if (!this._subscription) {
7762
                    this._subscription = this._ngZone.runOutsideAngular(function () {
7763
                        return _this._contentObserver.observe(_this._elementRef.nativeElement).subscribe(function () {
7764
                            return _this._liveAnnouncer.announce(_this._elementRef.nativeElement.innerText, _this._politeness);
7765
                        });
7766
                    });
7767
                }
7768
            }
7769
        },
7770
        enumerable: true,
7771
        configurable: true
7772
    });
7773
    /**
7774
     * @return {?}
7775
     */
7776
    CdkAriaLive.prototype.ngOnDestroy = /**
7777
     * @return {?}
7778
     */
7779
    function () {
7780
        if (this._subscription) {
7781
            this._subscription.unsubscribe();
7782
        }
7783
    };
7784
    CdkAriaLive.decorators = [
7785
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
7786
                    selector: '[cdkAriaLive]',
7787
                    exportAs: 'cdkAriaLive',
7788
                },] },
7789
    ];
7790
    /** @nocollapse */
7791
    CdkAriaLive.ctorParameters = function () { return [
7792
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
7793
        { type: LiveAnnouncer, },
7794
        { type: _angular_cdk_observers__WEBPACK_IMPORTED_MODULE_8__["ContentObserver"], },
7795
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"], },
7796
    ]; };
7797
    CdkAriaLive.propDecorators = {
7798
        "politeness": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['cdkAriaLive',] },],
7799
    };
7800
    return CdkAriaLive;
7801
}());
7802
/**
7803
 * \@docs-private \@deprecated \@breaking-change 7.0.0
7804
 * @param {?} parentDispatcher
7805
 * @param {?} liveElement
7806
 * @param {?} _document
7807
 * @return {?}
7808
 */
7809
function LIVE_ANNOUNCER_PROVIDER_FACTORY(parentDispatcher, liveElement, _document) {
7810
    return parentDispatcher || new LiveAnnouncer(liveElement, _document);
7811
}
7812
/**
7813
 * \@docs-private \@deprecated \@breaking-change 7.0.0
7814
 */
7815
var /** @type {?} */ LIVE_ANNOUNCER_PROVIDER = {
7816
    // If there is already a LiveAnnouncer available, use that. Otherwise, provide a new one.
7817
    provide: LiveAnnouncer,
7818
    deps: [
7819
        [new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"](), new _angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"](), LiveAnnouncer],
7820
        [new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"](), new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"](LIVE_ANNOUNCER_ELEMENT_TOKEN)],
7821
        _angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"],
7822
    ],
7823
    useFactory: LIVE_ANNOUNCER_PROVIDER_FACTORY
7824
};
7825
 
7826
/**
7827
 * @fileoverview added by tsickle
7828
 * @suppress {checkTypes} checked by tsc
7829
 */
7830
// This is the value used by AngularJS Material. Through trial and error (on iPhone 6S) they found
7831
// that a value of around 650ms seems appropriate.
7832
var /** @type {?} */ TOUCH_BUFFER_MS = 650;
7833
/**
7834
 * Monitors mouse and keyboard events to determine the cause of focus events.
7835
 */
7836
var FocusMonitor = /** @class */ (function () {
7837
    function FocusMonitor(_ngZone, _platform) {
7838
        this._ngZone = _ngZone;
7839
        this._platform = _platform;
7840
        /**
7841
         * The focus origin that the next focus event is a result of.
7842
         */
7843
        this._origin = null;
7844
        /**
7845
         * Whether the window has just been focused.
7846
         */
7847
        this._windowFocused = false;
7848
        /**
7849
         * Map of elements being monitored to their info.
7850
         */
7851
        this._elementInfo = new Map();
7852
        /**
7853
         * A map of global objects to lists of current listeners.
7854
         */
7855
        this._unregisterGlobalListeners = function () { };
7856
        /**
7857
         * The number of elements currently being monitored.
7858
         */
7859
        this._monitoredElementCount = 0;
7860
    }
7861
    /**
7862
     * Monitors focus on an element and applies appropriate CSS classes.
7863
     * @param element The element to monitor
7864
     * @param checkChildren Whether to count the element as focused when its children are focused.
7865
     * @returns An observable that emits when the focus state of the element changes.
7866
     *     When the element is blurred, null will be emitted.
7867
     */
7868
    /**
7869
     * Monitors focus on an element and applies appropriate CSS classes.
7870
     * @param {?} element The element to monitor
7871
     * @param {?=} checkChildren Whether to count the element as focused when its children are focused.
7872
     * @return {?} An observable that emits when the focus state of the element changes.
7873
     *     When the element is blurred, null will be emitted.
7874
     */
7875
    FocusMonitor.prototype.monitor = /**
7876
     * Monitors focus on an element and applies appropriate CSS classes.
7877
     * @param {?} element The element to monitor
7878
     * @param {?=} checkChildren Whether to count the element as focused when its children are focused.
7879
     * @return {?} An observable that emits when the focus state of the element changes.
7880
     *     When the element is blurred, null will be emitted.
7881
     */
7882
    function (element, checkChildren) {
7883
        var _this = this;
7884
        if (checkChildren === void 0) { checkChildren = false; }
7885
        // Do nothing if we're not on the browser platform.
7886
        if (!this._platform.isBrowser) {
7887
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(null);
7888
        }
7889
        // Check if we're already monitoring this element.
7890
        if (this._elementInfo.has(element)) {
7891
            var /** @type {?} */ cachedInfo = this._elementInfo.get(element); /** @type {?} */
7892
            ((cachedInfo)).checkChildren = checkChildren;
7893
            return /** @type {?} */ ((cachedInfo)).subject.asObservable();
7894
        }
7895
        // Create monitored element info.
7896
        var /** @type {?} */ info = {
7897
            unlisten: function () { },
7898
            checkChildren: checkChildren,
7899
            subject: new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"]()
7900
        };
7901
        this._elementInfo.set(element, info);
7902
        this._incrementMonitoredElementCount();
7903
        // Start listening. We need to listen in capture phase since focus events don't bubble.
7904
        var /** @type {?} */ focusListener = function (event) { return _this._onFocus(event, element); };
7905
        var /** @type {?} */ blurListener = function (event) { return _this._onBlur(event, element); };
7906
        this._ngZone.runOutsideAngular(function () {
7907
            element.addEventListener('focus', focusListener, true);
7908
            element.addEventListener('blur', blurListener, true);
7909
        });
7910
        // Create an unlisten function for later.
7911
        info.unlisten = function () {
7912
            element.removeEventListener('focus', focusListener, true);
7913
            element.removeEventListener('blur', blurListener, true);
7914
        };
7915
        return info.subject.asObservable();
7916
    };
7917
    /**
7918
     * Stops monitoring an element and removes all focus classes.
7919
     * @param element The element to stop monitoring.
7920
     */
7921
    /**
7922
     * Stops monitoring an element and removes all focus classes.
7923
     * @param {?} element The element to stop monitoring.
7924
     * @return {?}
7925
     */
7926
    FocusMonitor.prototype.stopMonitoring = /**
7927
     * Stops monitoring an element and removes all focus classes.
7928
     * @param {?} element The element to stop monitoring.
7929
     * @return {?}
7930
     */
7931
    function (element) {
7932
        var /** @type {?} */ elementInfo = this._elementInfo.get(element);
7933
        if (elementInfo) {
7934
            elementInfo.unlisten();
7935
            elementInfo.subject.complete();
7936
            this._setClasses(element);
7937
            this._elementInfo.delete(element);
7938
            this._decrementMonitoredElementCount();
7939
        }
7940
    };
7941
    /**
7942
     * Focuses the element via the specified focus origin.
7943
     * @param element Element to focus.
7944
     * @param origin Focus origin.
7945
     * @param options Options that can be used to configure the focus behavior.
7946
     */
7947
    /**
7948
     * Focuses the element via the specified focus origin.
7949
     * @param {?} element Element to focus.
7950
     * @param {?} origin Focus origin.
7951
     * @param {?=} options Options that can be used to configure the focus behavior.
7952
     * @return {?}
7953
     */
7954
    FocusMonitor.prototype.focusVia = /**
7955
     * Focuses the element via the specified focus origin.
7956
     * @param {?} element Element to focus.
7957
     * @param {?} origin Focus origin.
7958
     * @param {?=} options Options that can be used to configure the focus behavior.
7959
     * @return {?}
7960
     */
7961
    function (element, origin, options) {
7962
        this._setOriginForCurrentEventQueue(origin);
7963
        // `focus` isn't available on the server
7964
        if (typeof element.focus === 'function') {
7965
            // Cast the element to `any`, because the TS typings don't have the `options` parameter yet.
7966
            (/** @type {?} */ (element)).focus(options);
7967
        }
7968
    };
7969
    /**
7970
     * @return {?}
7971
     */
7972
    FocusMonitor.prototype.ngOnDestroy = /**
7973
     * @return {?}
7974
     */
7975
    function () {
7976
        var _this = this;
7977
        this._elementInfo.forEach(function (_info, element) { return _this.stopMonitoring(element); });
7978
    };
7979
    /**
7980
     * Register necessary event listeners on the document and window.
7981
     * @return {?}
7982
     */
7983
    FocusMonitor.prototype._registerGlobalListeners = /**
7984
     * Register necessary event listeners on the document and window.
7985
     * @return {?}
7986
     */
7987
    function () {
7988
        var _this = this;
7989
        // Do nothing if we're not on the browser platform.
7990
        if (!this._platform.isBrowser) {
7991
            return;
7992
        }
7993
        // On keydown record the origin and clear any touch event that may be in progress.
7994
        var /** @type {?} */ documentKeydownListener = function () {
7995
            _this._lastTouchTarget = null;
7996
            _this._setOriginForCurrentEventQueue('keyboard');
7997
        };
7998
        // On mousedown record the origin only if there is not touch target, since a mousedown can
7999
        // happen as a result of a touch event.
8000
        var /** @type {?} */ documentMousedownListener = function () {
8001
            if (!_this._lastTouchTarget) {
8002
                _this._setOriginForCurrentEventQueue('mouse');
8003
            }
8004
        };
8005
        // When the touchstart event fires the focus event is not yet in the event queue. This means
8006
        // we can't rely on the trick used above (setting timeout of 1ms). Instead we wait 650ms to
8007
        // see if a focus happens.
8008
        var /** @type {?} */ documentTouchstartListener = function (event) {
8009
            if (_this._touchTimeoutId != null) {
8010
                clearTimeout(_this._touchTimeoutId);
8011
            }
8012
            _this._lastTouchTarget = event.target;
8013
            _this._touchTimeoutId = setTimeout(function () { return _this._lastTouchTarget = null; }, TOUCH_BUFFER_MS);
8014
        };
8015
        // Make a note of when the window regains focus, so we can restore the origin info for the
8016
        // focused element.
8017
        var /** @type {?} */ windowFocusListener = function () {
8018
            _this._windowFocused = true;
8019
            _this._windowFocusTimeoutId = setTimeout(function () { return _this._windowFocused = false; });
8020
        };
8021
        // Note: we listen to events in the capture phase so we can detect them even if the user stops
8022
        // propagation.
8023
        this._ngZone.runOutsideAngular(function () {
8024
            document.addEventListener('keydown', documentKeydownListener, true);
8025
            document.addEventListener('mousedown', documentMousedownListener, true);
8026
            document.addEventListener('touchstart', documentTouchstartListener, Object(_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_6__["supportsPassiveEventListeners"])() ? (/** @type {?} */ ({ passive: true, capture: true })) : true);
8027
            window.addEventListener('focus', windowFocusListener);
8028
        });
8029
        this._unregisterGlobalListeners = function () {
8030
            document.removeEventListener('keydown', documentKeydownListener, true);
8031
            document.removeEventListener('mousedown', documentMousedownListener, true);
8032
            document.removeEventListener('touchstart', documentTouchstartListener, Object(_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_6__["supportsPassiveEventListeners"])() ? (/** @type {?} */ ({ passive: true, capture: true })) : true);
8033
            window.removeEventListener('focus', windowFocusListener);
8034
            // Clear timeouts for all potentially pending timeouts to prevent the leaks.
8035
            clearTimeout(_this._windowFocusTimeoutId);
8036
            clearTimeout(_this._touchTimeoutId);
8037
            clearTimeout(_this._originTimeoutId);
8038
        };
8039
    };
8040
    /**
8041
     * @param {?} element
8042
     * @param {?} className
8043
     * @param {?} shouldSet
8044
     * @return {?}
8045
     */
8046
    FocusMonitor.prototype._toggleClass = /**
8047
     * @param {?} element
8048
     * @param {?} className
8049
     * @param {?} shouldSet
8050
     * @return {?}
8051
     */
8052
    function (element, className, shouldSet) {
8053
        if (shouldSet) {
8054
            element.classList.add(className);
8055
        }
8056
        else {
8057
            element.classList.remove(className);
8058
        }
8059
    };
8060
    /**
8061
     * Sets the focus classes on the element based on the given focus origin.
8062
     * @param {?} element The element to update the classes on.
8063
     * @param {?=} origin The focus origin.
8064
     * @return {?}
8065
     */
8066
    FocusMonitor.prototype._setClasses = /**
8067
     * Sets the focus classes on the element based on the given focus origin.
8068
     * @param {?} element The element to update the classes on.
8069
     * @param {?=} origin The focus origin.
8070
     * @return {?}
8071
     */
8072
    function (element, origin) {
8073
        var /** @type {?} */ elementInfo = this._elementInfo.get(element);
8074
        if (elementInfo) {
8075
            this._toggleClass(element, 'cdk-focused', !!origin);
8076
            this._toggleClass(element, 'cdk-touch-focused', origin === 'touch');
8077
            this._toggleClass(element, 'cdk-keyboard-focused', origin === 'keyboard');
8078
            this._toggleClass(element, 'cdk-mouse-focused', origin === 'mouse');
8079
            this._toggleClass(element, 'cdk-program-focused', origin === 'program');
8080
        }
8081
    };
8082
    /**
8083
     * Sets the origin and schedules an async function to clear it at the end of the event queue.
8084
     * @param {?} origin The origin to set.
8085
     * @return {?}
8086
     */
8087
    FocusMonitor.prototype._setOriginForCurrentEventQueue = /**
8088
     * Sets the origin and schedules an async function to clear it at the end of the event queue.
8089
     * @param {?} origin The origin to set.
8090
     * @return {?}
8091
     */
8092
    function (origin) {
8093
        var _this = this;
8094
        this._ngZone.runOutsideAngular(function () {
8095
            _this._origin = origin;
8096
            // Sometimes the focus origin won't be valid in Firefox because Firefox seems to focus *one*
8097
            // tick after the interaction event fired. To ensure the focus origin is always correct,
8098
            // the focus origin will be determined at the beginning of the next tick.
8099
            // Sometimes the focus origin won't be valid in Firefox because Firefox seems to focus *one*
8100
            // tick after the interaction event fired. To ensure the focus origin is always correct,
8101
            // the focus origin will be determined at the beginning of the next tick.
8102
            _this._originTimeoutId = setTimeout(function () { return _this._origin = null; }, 1);
8103
        });
8104
    };
8105
    /**
8106
     * Checks whether the given focus event was caused by a touchstart event.
8107
     * @param {?} event The focus event to check.
8108
     * @return {?} Whether the event was caused by a touch.
8109
     */
8110
    FocusMonitor.prototype._wasCausedByTouch = /**
8111
     * Checks whether the given focus event was caused by a touchstart event.
8112
     * @param {?} event The focus event to check.
8113
     * @return {?} Whether the event was caused by a touch.
8114
     */
8115
    function (event) {
8116
        // Note(mmalerba): This implementation is not quite perfect, there is a small edge case.
8117
        // Consider the following dom structure:
8118
        //
8119
        // <div #parent tabindex="0" cdkFocusClasses>
8120
        //   <div #child (click)="#parent.focus()"></div>
8121
        // </div>
8122
        //
8123
        // If the user touches the #child element and the #parent is programmatically focused as a
8124
        // result, this code will still consider it to have been caused by the touch event and will
8125
        // apply the cdk-touch-focused class rather than the cdk-program-focused class. This is a
8126
        // relatively small edge-case that can be worked around by using
8127
        // focusVia(parentEl, 'program') to focus the parent element.
8128
        //
8129
        // If we decide that we absolutely must handle this case correctly, we can do so by listening
8130
        // for the first focus event after the touchstart, and then the first blur event after that
8131
        // focus event. When that blur event fires we know that whatever follows is not a result of the
8132
        // touchstart.
8133
        var /** @type {?} */ focusTarget = event.target;
8134
        return this._lastTouchTarget instanceof Node && focusTarget instanceof Node &&
8135
            (focusTarget === this._lastTouchTarget || focusTarget.contains(this._lastTouchTarget));
8136
    };
8137
    /**
8138
     * Handles focus events on a registered element.
8139
     * @param {?} event The focus event.
8140
     * @param {?} element The monitored element.
8141
     * @return {?}
8142
     */
8143
    FocusMonitor.prototype._onFocus = /**
8144
     * Handles focus events on a registered element.
8145
     * @param {?} event The focus event.
8146
     * @param {?} element The monitored element.
8147
     * @return {?}
8148
     */
8149
    function (event, element) {
8150
        // NOTE(mmalerba): We currently set the classes based on the focus origin of the most recent
8151
        // focus event affecting the monitored element. If we want to use the origin of the first event
8152
        // instead we should check for the cdk-focused class here and return if the element already has
8153
        // it. (This only matters for elements that have includesChildren = true).
8154
        // If we are not counting child-element-focus as focused, make sure that the event target is the
8155
        // monitored element itself.
8156
        var /** @type {?} */ elementInfo = this._elementInfo.get(element);
8157
        if (!elementInfo || (!elementInfo.checkChildren && element !== event.target)) {
8158
            return;
8159
        }
8160
        // If we couldn't detect a cause for the focus event, it's due to one of three reasons:
8161
        // 1) The window has just regained focus, in which case we want to restore the focused state of
8162
        //    the element from before the window blurred.
8163
        // 2) It was caused by a touch event, in which case we mark the origin as 'touch'.
8164
        // 3) The element was programmatically focused, in which case we should mark the origin as
8165
        //    'program'.
8166
        var /** @type {?} */ origin = this._origin;
8167
        if (!origin) {
8168
            if (this._windowFocused && this._lastFocusOrigin) {
8169
                origin = this._lastFocusOrigin;
8170
            }
8171
            else if (this._wasCausedByTouch(event)) {
8172
                origin = 'touch';
8173
            }
8174
            else {
8175
                origin = 'program';
8176
            }
8177
        }
8178
        this._setClasses(element, origin);
8179
        this._emitOrigin(elementInfo.subject, origin);
8180
        this._lastFocusOrigin = origin;
8181
    };
8182
    /**
8183
     * Handles blur events on a registered element.
8184
     * @param event The blur event.
8185
     * @param element The monitored element.
8186
     */
8187
    /**
8188
     * Handles blur events on a registered element.
8189
     * @param {?} event The blur event.
8190
     * @param {?} element The monitored element.
8191
     * @return {?}
8192
     */
8193
    FocusMonitor.prototype._onBlur = /**
8194
     * Handles blur events on a registered element.
8195
     * @param {?} event The blur event.
8196
     * @param {?} element The monitored element.
8197
     * @return {?}
8198
     */
8199
    function (event, element) {
8200
        // If we are counting child-element-focus as focused, make sure that we aren't just blurring in
8201
        // order to focus another child of the monitored element.
8202
        var /** @type {?} */ elementInfo = this._elementInfo.get(element);
8203
        if (!elementInfo || (elementInfo.checkChildren && event.relatedTarget instanceof Node &&
8204
            element.contains(event.relatedTarget))) {
8205
            return;
8206
        }
8207
        this._setClasses(element);
8208
        this._emitOrigin(elementInfo.subject, null);
8209
    };
8210
    /**
8211
     * @param {?} subject
8212
     * @param {?} origin
8213
     * @return {?}
8214
     */
8215
    FocusMonitor.prototype._emitOrigin = /**
8216
     * @param {?} subject
8217
     * @param {?} origin
8218
     * @return {?}
8219
     */
8220
    function (subject, origin) {
8221
        this._ngZone.run(function () { return subject.next(origin); });
8222
    };
8223
    /**
8224
     * @return {?}
8225
     */
8226
    FocusMonitor.prototype._incrementMonitoredElementCount = /**
8227
     * @return {?}
8228
     */
8229
    function () {
8230
        // Register global listeners when first element is monitored.
8231
        if (++this._monitoredElementCount == 1) {
8232
            this._registerGlobalListeners();
8233
        }
8234
    };
8235
    /**
8236
     * @return {?}
8237
     */
8238
    FocusMonitor.prototype._decrementMonitoredElementCount = /**
8239
     * @return {?}
8240
     */
8241
    function () {
8242
        // Unregister global listeners when last element is unmonitored.
8243
        if (!--this._monitoredElementCount) {
8244
            this._unregisterGlobalListeners();
8245
            this._unregisterGlobalListeners = function () { };
8246
        }
8247
    };
8248
    FocusMonitor.decorators = [
8249
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"], args: [{ providedIn: 'root' },] },
8250
    ];
8251
    /** @nocollapse */
8252
    FocusMonitor.ctorParameters = function () { return [
8253
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"], },
8254
        { type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_6__["Platform"], },
8255
    ]; };
8256
    /** @nocollapse */ FocusMonitor.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["defineInjectable"])({ factory: function FocusMonitor_Factory() { return new FocusMonitor(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]), Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_6__["Platform"])); }, token: FocusMonitor, providedIn: "root" });
8257
    return FocusMonitor;
8258
}());
8259
/**
8260
 * Directive that determines how a particular element was focused (via keyboard, mouse, touch, or
8261
 * programmatically) and adds corresponding classes to the element.
8262
 *
8263
 * There are two variants of this directive:
8264
 * 1) cdkMonitorElementFocus: does not consider an element to be focused if one of its children is
8265
 *    focused.
8266
 * 2) cdkMonitorSubtreeFocus: considers an element focused if it or any of its children are focused.
8267
 */
8268
var CdkMonitorFocus = /** @class */ (function () {
8269
    function CdkMonitorFocus(_elementRef, _focusMonitor) {
8270
        var _this = this;
8271
        this._elementRef = _elementRef;
8272
        this._focusMonitor = _focusMonitor;
8273
        this.cdkFocusChange = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
8274
        this._monitorSubscription = this._focusMonitor.monitor(this._elementRef.nativeElement, this._elementRef.nativeElement.hasAttribute('cdkMonitorSubtreeFocus'))
8275
            .subscribe(function (origin) { return _this.cdkFocusChange.emit(origin); });
8276
    }
8277
    /**
8278
     * @return {?}
8279
     */
8280
    CdkMonitorFocus.prototype.ngOnDestroy = /**
8281
     * @return {?}
8282
     */
8283
    function () {
8284
        this._focusMonitor.stopMonitoring(this._elementRef.nativeElement);
8285
        this._monitorSubscription.unsubscribe();
8286
    };
8287
    CdkMonitorFocus.decorators = [
8288
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
8289
                    selector: '[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]',
8290
                },] },
8291
    ];
8292
    /** @nocollapse */
8293
    CdkMonitorFocus.ctorParameters = function () { return [
8294
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
8295
        { type: FocusMonitor, },
8296
    ]; };
8297
    CdkMonitorFocus.propDecorators = {
8298
        "cdkFocusChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"] },],
8299
    };
8300
    return CdkMonitorFocus;
8301
}());
8302
/**
8303
 * \@docs-private \@deprecated \@breaking-change 7.0.0
8304
 * @param {?} parentDispatcher
8305
 * @param {?} ngZone
8306
 * @param {?} platform
8307
 * @return {?}
8308
 */
8309
function FOCUS_MONITOR_PROVIDER_FACTORY(parentDispatcher, ngZone, platform) {
8310
    return parentDispatcher || new FocusMonitor(ngZone, platform);
8311
}
8312
/**
8313
 * \@docs-private \@deprecated \@breaking-change 7.0.0
8314
 */
8315
var /** @type {?} */ FOCUS_MONITOR_PROVIDER = {
8316
    // If there is already a FocusMonitor available, use that. Otherwise, provide a new one.
8317
    provide: FocusMonitor,
8318
    deps: [[new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"](), new _angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"](), FocusMonitor], _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"], _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_6__["Platform"]],
8319
    useFactory: FOCUS_MONITOR_PROVIDER_FACTORY
8320
};
8321
 
8322
/**
8323
 * @fileoverview added by tsickle
8324
 * @suppress {checkTypes} checked by tsc
8325
 */
8326
 
8327
/**
8328
 * Screenreaders will often fire fake mousedown events when a focusable element
8329
 * is activated using the keyboard. We can typically distinguish between these faked
8330
 * mousedown events and real mousedown events using the "buttons" property. While
8331
 * real mousedowns will indicate the mouse button that was pressed (e.g. "1" for
8332
 * the left mouse button), faked mousedowns will usually set the property value to 0.
8333
 * @param {?} event
8334
 * @return {?}
8335
 */
8336
function isFakeMousedownFromScreenReader(event) {
8337
    return event.buttons === 0;
8338
}
8339
 
8340
/**
8341
 * @fileoverview added by tsickle
8342
 * @suppress {checkTypes} checked by tsc
8343
 */
8344
var A11yModule = /** @class */ (function () {
8345
    function A11yModule() {
8346
    }
8347
    A11yModule.decorators = [
8348
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{
8349
                    imports: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"], _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_6__["PlatformModule"], _angular_cdk_observers__WEBPACK_IMPORTED_MODULE_8__["ObserversModule"]],
8350
                    declarations: [CdkAriaLive, CdkTrapFocus, CdkMonitorFocus],
8351
                    exports: [CdkAriaLive, CdkTrapFocus, CdkMonitorFocus],
8352
                },] },
8353
    ];
8354
    return A11yModule;
8355
}());
8356
 
8357
/**
8358
 * @fileoverview added by tsickle
8359
 * @suppress {checkTypes} checked by tsc
8360
 */
8361
 
8362
/**
8363
 * @fileoverview added by tsickle
8364
 * @suppress {checkTypes} checked by tsc
8365
 */
8366
 
8367
 
8368
//# sourceMappingURL=a11y.es5.js.map
8369
 
8370
 
8371
/***/ }),
8372
 
8373
/***/ "./node_modules/@angular/cdk/esm5/accordion.es5.js":
8374
/*!*********************************************************!*\
8375
  !*** ./node_modules/@angular/cdk/esm5/accordion.es5.js ***!
8376
  \*********************************************************/
8377
/*! exports provided: CdkAccordionItem, CdkAccordion, CdkAccordionModule */
8378
/***/ (function(module, __webpack_exports__, __webpack_require__) {
8379
 
8380
"use strict";
8381
__webpack_require__.r(__webpack_exports__);
8382
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkAccordionItem", function() { return CdkAccordionItem; });
8383
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkAccordion", function() { return CdkAccordion; });
8384
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkAccordionModule", function() { return CdkAccordionModule; });
8385
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
8386
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
8387
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
8388
/* harmony import */ var _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/collections */ "./node_modules/@angular/cdk/esm5/collections.es5.js");
8389
/**
8390
 * @license
8391
 * Copyright Google LLC All Rights Reserved.
8392
 *
8393
 * Use of this source code is governed by an MIT-style license that can be
8394
 * found in the LICENSE file at https://angular.io/license
8395
 */
8396
 
8397
 
8398
 
8399
 
8400
 
8401
/**
8402
 * @fileoverview added by tsickle
8403
 * @suppress {checkTypes} checked by tsc
8404
 */
8405
/**
8406
 * Used to generate unique ID for each accordion.
8407
 */
8408
var /** @type {?} */ nextId = 0;
8409
/**
8410
 * Directive whose purpose is to manage the expanded state of CdkAccordionItem children.
8411
 */
8412
var CdkAccordion = /** @class */ (function () {
8413
    function CdkAccordion() {
8414
        /**
8415
         * Stream that emits true/false when openAll/closeAll is triggered.
8416
         */
8417
        this._openCloseAllActions = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
8418
        /**
8419
         * A readonly id value to use for unique selection coordination.
8420
         */
8421
        this.id = "cdk-accordion-" + nextId++;
8422
        this._multi = false;
8423
    }
8424
    Object.defineProperty(CdkAccordion.prototype, "multi", {
8425
        get: /**
8426
         * Whether the accordion should allow multiple expanded accordion items simultaneously.
8427
         * @return {?}
8428
         */
8429
        function () { return this._multi; },
8430
        set: /**
8431
         * @param {?} multi
8432
         * @return {?}
8433
         */
8434
        function (multi) { this._multi = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceBooleanProperty"])(multi); },
8435
        enumerable: true,
8436
        configurable: true
8437
    });
8438
    /** Opens all enabled accordion items in an accordion where multi is enabled. */
8439
    /**
8440
     * Opens all enabled accordion items in an accordion where multi is enabled.
8441
     * @return {?}
8442
     */
8443
    CdkAccordion.prototype.openAll = /**
8444
     * Opens all enabled accordion items in an accordion where multi is enabled.
8445
     * @return {?}
8446
     */
8447
    function () {
8448
        this._openCloseAll(true);
8449
    };
8450
    /** Closes all enabled accordion items in an accordion where multi is enabled. */
8451
    /**
8452
     * Closes all enabled accordion items in an accordion where multi is enabled.
8453
     * @return {?}
8454
     */
8455
    CdkAccordion.prototype.closeAll = /**
8456
     * Closes all enabled accordion items in an accordion where multi is enabled.
8457
     * @return {?}
8458
     */
8459
    function () {
8460
        this._openCloseAll(false);
8461
    };
8462
    /**
8463
     * @param {?} expanded
8464
     * @return {?}
8465
     */
8466
    CdkAccordion.prototype._openCloseAll = /**
8467
     * @param {?} expanded
8468
     * @return {?}
8469
     */
8470
    function (expanded) {
8471
        if (this.multi) {
8472
            this._openCloseAllActions.next(expanded);
8473
        }
8474
    };
8475
    CdkAccordion.decorators = [
8476
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
8477
                    selector: 'cdk-accordion, [cdkAccordion]',
8478
                    exportAs: 'cdkAccordion',
8479
                },] },
8480
    ];
8481
    /** @nocollapse */
8482
    CdkAccordion.propDecorators = {
8483
        "multi": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
8484
    };
8485
    return CdkAccordion;
8486
}());
8487
 
8488
/**
8489
 * @fileoverview added by tsickle
8490
 * @suppress {checkTypes} checked by tsc
8491
 */
8492
/**
8493
 * Used to generate unique ID for each accordion item.
8494
 */
8495
var /** @type {?} */ nextId$1 = 0;
8496
var ɵ0 = undefined;
8497
/**
8498
 * An basic directive expected to be extended and decorated as a component.  Sets up all
8499
 * events and attributes needed to be managed by a CdkAccordion parent.
8500
 */
8501
var CdkAccordionItem = /** @class */ (function () {
8502
    function CdkAccordionItem(accordion, _changeDetectorRef, _expansionDispatcher) {
8503
        var _this = this;
8504
        this.accordion = accordion;
8505
        this._changeDetectorRef = _changeDetectorRef;
8506
        this._expansionDispatcher = _expansionDispatcher;
8507
        /**
8508
         * Subscription to openAll/closeAll events.
8509
         */
8510
        this._openCloseAllSubscription = rxjs__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY;
8511
        /**
8512
         * Event emitted every time the AccordionItem is closed.
8513
         */
8514
        this.closed = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
8515
        /**
8516
         * Event emitted every time the AccordionItem is opened.
8517
         */
8518
        this.opened = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
8519
        /**
8520
         * Event emitted when the AccordionItem is destroyed.
8521
         */
8522
        this.destroyed = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
8523
        /**
8524
         * Emits whenever the expanded state of the accordion changes.
8525
         * Primarily used to facilitate two-way binding.
8526
         * \@docs-private
8527
         */
8528
        this.expandedChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
8529
        /**
8530
         * The unique AccordionItem id.
8531
         */
8532
        this.id = "cdk-accordion-child-" + nextId$1++;
8533
        this._expanded = false;
8534
        this._disabled = false;
8535
        /**
8536
         * Unregister function for _expansionDispatcher.
8537
         */
8538
        this._removeUniqueSelectionListener = function () { };
8539
        this._removeUniqueSelectionListener =
8540
            _expansionDispatcher.listen(function (id, accordionId) {
8541
                if (_this.accordion && !_this.accordion.multi &&
8542
                    _this.accordion.id === accordionId && _this.id !== id) {
8543
                    _this.expanded = false;
8544
                }
8545
            });
8546
        // When an accordion item is hosted in an accordion, subscribe to open/close events.
8547
        if (this.accordion) {
8548
            this._openCloseAllSubscription = this._subscribeToOpenCloseAllActions();
8549
        }
8550
    }
8551
    Object.defineProperty(CdkAccordionItem.prototype, "expanded", {
8552
        get: /**
8553
         * Whether the AccordionItem is expanded.
8554
         * @return {?}
8555
         */
8556
        function () { return this._expanded; },
8557
        set: /**
8558
         * @param {?} expanded
8559
         * @return {?}
8560
         */
8561
        function (expanded) {
8562
            expanded = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceBooleanProperty"])(expanded);
8563
            // Only emit events and update the internal value if the value changes.
8564
            if (this._expanded !== expanded) {
8565
                this._expanded = expanded;
8566
                this.expandedChange.emit(expanded);
8567
                if (expanded) {
8568
                    this.opened.emit();
8569
                    /**
8570
                     * In the unique selection dispatcher, the id parameter is the id of the CdkAccordionItem,
8571
                     * the name value is the id of the accordion.
8572
                     */
8573
                    var /** @type {?} */ accordionId = this.accordion ? this.accordion.id : this.id;
8574
                    this._expansionDispatcher.notify(this.id, accordionId);
8575
                }
8576
                else {
8577
                    this.closed.emit();
8578
                }
8579
                // Ensures that the animation will run when the value is set outside of an `@Input`.
8580
                // This includes cases like the open, close and toggle methods.
8581
                this._changeDetectorRef.markForCheck();
8582
            }
8583
        },
8584
        enumerable: true,
8585
        configurable: true
8586
    });
8587
    Object.defineProperty(CdkAccordionItem.prototype, "disabled", {
8588
        get: /**
8589
         * Whether the AccordionItem is disabled.
8590
         * @return {?}
8591
         */
8592
        function () { return this._disabled; },
8593
        set: /**
8594
         * @param {?} disabled
8595
         * @return {?}
8596
         */
8597
        function (disabled) { this._disabled = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceBooleanProperty"])(disabled); },
8598
        enumerable: true,
8599
        configurable: true
8600
    });
8601
    /** Emits an event for the accordion item being destroyed. */
8602
    /**
8603
     * Emits an event for the accordion item being destroyed.
8604
     * @return {?}
8605
     */
8606
    CdkAccordionItem.prototype.ngOnDestroy = /**
8607
     * Emits an event for the accordion item being destroyed.
8608
     * @return {?}
8609
     */
8610
    function () {
8611
        this.opened.complete();
8612
        this.closed.complete();
8613
        this.destroyed.emit();
8614
        this.destroyed.complete();
8615
        this._removeUniqueSelectionListener();
8616
        this._openCloseAllSubscription.unsubscribe();
8617
    };
8618
    /** Toggles the expanded state of the accordion item. */
8619
    /**
8620
     * Toggles the expanded state of the accordion item.
8621
     * @return {?}
8622
     */
8623
    CdkAccordionItem.prototype.toggle = /**
8624
     * Toggles the expanded state of the accordion item.
8625
     * @return {?}
8626
     */
8627
    function () {
8628
        if (!this.disabled) {
8629
            this.expanded = !this.expanded;
8630
        }
8631
    };
8632
    /** Sets the expanded state of the accordion item to false. */
8633
    /**
8634
     * Sets the expanded state of the accordion item to false.
8635
     * @return {?}
8636
     */
8637
    CdkAccordionItem.prototype.close = /**
8638
     * Sets the expanded state of the accordion item to false.
8639
     * @return {?}
8640
     */
8641
    function () {
8642
        if (!this.disabled) {
8643
            this.expanded = false;
8644
        }
8645
    };
8646
    /** Sets the expanded state of the accordion item to true. */
8647
    /**
8648
     * Sets the expanded state of the accordion item to true.
8649
     * @return {?}
8650
     */
8651
    CdkAccordionItem.prototype.open = /**
8652
     * Sets the expanded state of the accordion item to true.
8653
     * @return {?}
8654
     */
8655
    function () {
8656
        if (!this.disabled) {
8657
            this.expanded = true;
8658
        }
8659
    };
8660
    /**
8661
     * @return {?}
8662
     */
8663
    CdkAccordionItem.prototype._subscribeToOpenCloseAllActions = /**
8664
     * @return {?}
8665
     */
8666
    function () {
8667
        var _this = this;
8668
        return this.accordion._openCloseAllActions.subscribe(function (expanded) {
8669
            // Only change expanded state if item is enabled
8670
            if (!_this.disabled) {
8671
                _this.expanded = expanded;
8672
            }
8673
        });
8674
    };
8675
    CdkAccordionItem.decorators = [
8676
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
8677
                    selector: 'cdk-accordion-item, [cdkAccordionItem]',
8678
                    exportAs: 'cdkAccordionItem',
8679
                    providers: [
8680
                        // Provide CdkAccordion as undefined to prevent nested accordion items from registering
8681
                        // to the same accordion.
8682
                        { provide: CdkAccordion, useValue: ɵ0 },
8683
                    ],
8684
                },] },
8685
    ];
8686
    /** @nocollapse */
8687
    CdkAccordionItem.ctorParameters = function () { return [
8688
        { type: CdkAccordion, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["SkipSelf"] },] },
8689
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"], },
8690
        { type: _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_3__["UniqueSelectionDispatcher"], },
8691
    ]; };
8692
    CdkAccordionItem.propDecorators = {
8693
        "closed": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
8694
        "opened": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
8695
        "destroyed": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
8696
        "expandedChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
8697
        "expanded": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
8698
        "disabled": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
8699
    };
8700
    return CdkAccordionItem;
8701
}());
8702
 
8703
/**
8704
 * @fileoverview added by tsickle
8705
 * @suppress {checkTypes} checked by tsc
8706
 */
8707
var CdkAccordionModule = /** @class */ (function () {
8708
    function CdkAccordionModule() {
8709
    }
8710
    CdkAccordionModule.decorators = [
8711
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
8712
                    exports: [CdkAccordion, CdkAccordionItem],
8713
                    declarations: [CdkAccordion, CdkAccordionItem],
8714
                },] },
8715
    ];
8716
    return CdkAccordionModule;
8717
}());
8718
 
8719
/**
8720
 * @fileoverview added by tsickle
8721
 * @suppress {checkTypes} checked by tsc
8722
 */
8723
 
8724
/**
8725
 * @fileoverview added by tsickle
8726
 * @suppress {checkTypes} checked by tsc
8727
 */
8728
 
8729
 
8730
//# sourceMappingURL=accordion.es5.js.map
8731
 
8732
 
8733
/***/ }),
8734
 
8735
/***/ "./node_modules/@angular/cdk/esm5/bidi.es5.js":
8736
/*!****************************************************!*\
8737
  !*** ./node_modules/@angular/cdk/esm5/bidi.es5.js ***!
8738
  \****************************************************/
8739
/*! exports provided: Directionality, DIR_DOCUMENT, Dir, BidiModule, ɵa */
8740
/***/ (function(module, __webpack_exports__, __webpack_require__) {
8741
 
8742
"use strict";
8743
__webpack_require__.r(__webpack_exports__);
8744
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Directionality", function() { return Directionality; });
8745
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DIR_DOCUMENT", function() { return DIR_DOCUMENT; });
8746
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Dir", function() { return Dir; });
8747
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BidiModule", function() { return BidiModule; });
8748
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵa", function() { return DIR_DOCUMENT_FACTORY; });
8749
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
8750
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
8751
/**
8752
 * @license
8753
 * Copyright Google LLC All Rights Reserved.
8754
 *
8755
 * Use of this source code is governed by an MIT-style license that can be
8756
 * found in the LICENSE file at https://angular.io/license
8757
 */
8758
 
8759
 
8760
 
8761
/**
8762
 * @fileoverview added by tsickle
8763
 * @suppress {checkTypes} checked by tsc
8764
 */
8765
/**
8766
 * Injection token used to inject the document into Directionality.
8767
 * This is used so that the value can be faked in tests.
8768
 *
8769
 * We can't use the real document in tests because changing the real `dir` causes geometry-based
8770
 * tests in Safari to fail.
8771
 *
8772
 * We also can't re-provide the DOCUMENT token from platform-brower because the unit tests
8773
 * themselves use things like `querySelector` in test code.
8774
 *
8775
 * This token is defined in a separate file from Directionality as a workaround for
8776
 * https://github.com/angular/angular/issues/22559
8777
 *
8778
 * \@docs-private
8779
 */
8780
var /** @type {?} */ DIR_DOCUMENT = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('cdk-dir-doc', {
8781
    providedIn: 'root',
8782
    factory: DIR_DOCUMENT_FACTORY,
8783
});
8784
/**
8785
 * \@docs-private
8786
 * @return {?}
8787
 */
8788
function DIR_DOCUMENT_FACTORY() {
8789
    return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]);
8790
}
8791
 
8792
/**
8793
 * @fileoverview added by tsickle
8794
 * @suppress {checkTypes} checked by tsc
8795
 */
8796
/**
8797
 * The directionality (LTR / RTL) context for the application (or a subtree of it).
8798
 * Exposes the current direction and a stream of direction changes.
8799
 */
8800
var Directionality = /** @class */ (function () {
8801
    function Directionality(_document) {
8802
        /**
8803
         * The current 'ltr' or 'rtl' value.
8804
         */
8805
        this.value = 'ltr';
8806
        /**
8807
         * Stream that emits whenever the 'ltr' / 'rtl' state changes.
8808
         */
8809
        this.change = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
8810
        if (_document) {
8811
            // TODO: handle 'auto' value -
8812
            // We still need to account for dir="auto".
8813
            // It looks like HTMLElemenet.dir is also "auto" when that's set to the attribute,
8814
            // but getComputedStyle return either "ltr" or "rtl". avoiding getComputedStyle for now
8815
            var /** @type {?} */ bodyDir = _document.body ? _document.body.dir : null;
8816
            var /** @type {?} */ htmlDir = _document.documentElement ? _document.documentElement.dir : null;
8817
            var /** @type {?} */ value = bodyDir || htmlDir;
8818
            this.value = (value === 'ltr' || value === 'rtl') ? value : 'ltr';
8819
        }
8820
    }
8821
    /**
8822
     * @return {?}
8823
     */
8824
    Directionality.prototype.ngOnDestroy = /**
8825
     * @return {?}
8826
     */
8827
    function () {
8828
        this.change.complete();
8829
    };
8830
    Directionality.decorators = [
8831
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"], args: [{ providedIn: 'root' },] },
8832
    ];
8833
    /** @nocollapse */
8834
    Directionality.ctorParameters = function () { return [
8835
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [DIR_DOCUMENT,] },] },
8836
    ]; };
8837
    /** @nocollapse */ Directionality.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["defineInjectable"])({ factory: function Directionality_Factory() { return new Directionality(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(DIR_DOCUMENT, 8)); }, token: Directionality, providedIn: "root" });
8838
    return Directionality;
8839
}());
8840
 
8841
/**
8842
 * @fileoverview added by tsickle
8843
 * @suppress {checkTypes} checked by tsc
8844
 */
8845
/**
8846
 * Directive to listen for changes of direction of part of the DOM.
8847
 *
8848
 * Provides itself as Directionality such that descendant directives only need to ever inject
8849
 * Directionality to get the closest direction.
8850
 */
8851
var Dir = /** @class */ (function () {
8852
    function Dir() {
8853
        this._dir = 'ltr';
8854
        /**
8855
         * Whether the `value` has been set to its initial value.
8856
         */
8857
        this._isInitialized = false;
8858
        /**
8859
         * Event emitted when the direction changes.
8860
         */
8861
        this.change = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
8862
    }
8863
    Object.defineProperty(Dir.prototype, "dir", {
8864
        get: /**
8865
         * \@docs-private
8866
         * @return {?}
8867
         */
8868
        function () { return this._dir; },
8869
        set: /**
8870
         * @param {?} value
8871
         * @return {?}
8872
         */
8873
        function (value) {
8874
            var /** @type {?} */ old = this._dir;
8875
            this._dir = (value === 'ltr' || value === 'rtl') ? value : 'ltr';
8876
            if (old !== this._dir && this._isInitialized) {
8877
                this.change.emit(this._dir);
8878
            }
8879
        },
8880
        enumerable: true,
8881
        configurable: true
8882
    });
8883
    Object.defineProperty(Dir.prototype, "value", {
8884
        /** Current layout direction of the element. */
8885
        get: /**
8886
         * Current layout direction of the element.
8887
         * @return {?}
8888
         */
8889
        function () { return this.dir; },
8890
        enumerable: true,
8891
        configurable: true
8892
    });
8893
    /** Initialize once default value has been set. */
8894
    /**
8895
     * Initialize once default value has been set.
8896
     * @return {?}
8897
     */
8898
    Dir.prototype.ngAfterContentInit = /**
8899
     * Initialize once default value has been set.
8900
     * @return {?}
8901
     */
8902
    function () {
8903
        this._isInitialized = true;
8904
    };
8905
    /**
8906
     * @return {?}
8907
     */
8908
    Dir.prototype.ngOnDestroy = /**
8909
     * @return {?}
8910
     */
8911
    function () {
8912
        this.change.complete();
8913
    };
8914
    Dir.decorators = [
8915
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
8916
                    selector: '[dir]',
8917
                    providers: [{ provide: Directionality, useExisting: Dir }],
8918
                    host: { '[dir]': 'dir' },
8919
                    exportAs: 'dir',
8920
                },] },
8921
    ];
8922
    /** @nocollapse */
8923
    Dir.propDecorators = {
8924
        "change": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"], args: ['dirChange',] },],
8925
        "dir": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
8926
    };
8927
    return Dir;
8928
}());
8929
 
8930
/**
8931
 * @fileoverview added by tsickle
8932
 * @suppress {checkTypes} checked by tsc
8933
 */
8934
var BidiModule = /** @class */ (function () {
8935
    function BidiModule() {
8936
    }
8937
    BidiModule.decorators = [
8938
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{
8939
                    exports: [Dir],
8940
                    declarations: [Dir],
8941
                },] },
8942
    ];
8943
    return BidiModule;
8944
}());
8945
 
8946
/**
8947
 * @fileoverview added by tsickle
8948
 * @suppress {checkTypes} checked by tsc
8949
 */
8950
 
8951
/**
8952
 * @fileoverview added by tsickle
8953
 * @suppress {checkTypes} checked by tsc
8954
 */
8955
 
8956
 
8957
//# sourceMappingURL=bidi.es5.js.map
8958
 
8959
 
8960
/***/ }),
8961
 
8962
/***/ "./node_modules/@angular/cdk/esm5/coercion.es5.js":
8963
/*!********************************************************!*\
8964
  !*** ./node_modules/@angular/cdk/esm5/coercion.es5.js ***!
8965
  \********************************************************/
8966
/*! exports provided: coerceBooleanProperty, coerceNumberProperty, _isNumberValue, coerceArray, coerceCssPixelValue */
8967
/***/ (function(module, __webpack_exports__, __webpack_require__) {
8968
 
8969
"use strict";
8970
__webpack_require__.r(__webpack_exports__);
8971
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "coerceBooleanProperty", function() { return coerceBooleanProperty; });
8972
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "coerceNumberProperty", function() { return coerceNumberProperty; });
8973
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_isNumberValue", function() { return _isNumberValue; });
8974
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "coerceArray", function() { return coerceArray; });
8975
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "coerceCssPixelValue", function() { return coerceCssPixelValue; });
8976
/**
8977
 * @license
8978
 * Copyright Google LLC All Rights Reserved.
8979
 *
8980
 * Use of this source code is governed by an MIT-style license that can be
8981
 * found in the LICENSE file at https://angular.io/license
8982
 */
8983
/**
8984
 * @fileoverview added by tsickle
8985
 * @suppress {checkTypes} checked by tsc
8986
 */
8987
 
8988
/**
8989
 * Coerces a data-bound value (typically a string) to a boolean.
8990
 * @param {?} value
8991
 * @return {?}
8992
 */
8993
function coerceBooleanProperty(value) {
8994
    return value != null && "" + value !== 'false';
8995
}
8996
 
8997
/**
8998
 * @fileoverview added by tsickle
8999
 * @suppress {checkTypes} checked by tsc
9000
 */
9001
 
9002
/**
9003
 * @param {?} value
9004
 * @param {?=} fallbackValue
9005
 * @return {?}
9006
 */
9007
function coerceNumberProperty(value, fallbackValue) {
9008
    if (fallbackValue === void 0) { fallbackValue = 0; }
9009
    return _isNumberValue(value) ? Number(value) : fallbackValue;
9010
}
9011
/**
9012
 * Whether the provided value is considered a number.
9013
 * \@docs-private
9014
 * @param {?} value
9015
 * @return {?}
9016
 */
9017
function _isNumberValue(value) {
9018
    // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,
9019
    // and other non-number values as NaN, where Number just uses 0) but it considers the string
9020
    // '123hello' to be a valid number. Therefore we also check if Number(value) is NaN.
9021
    return !isNaN(parseFloat(/** @type {?} */ (value))) && !isNaN(Number(value));
9022
}
9023
 
9024
/**
9025
 * @fileoverview added by tsickle
9026
 * @suppress {checkTypes} checked by tsc
9027
 */
9028
 
9029
/**
9030
 * Wraps the provided value in an array, unless the provided value is an array.
9031
 * @template T
9032
 * @param {?} value
9033
 * @return {?}
9034
 */
9035
function coerceArray(value) {
9036
    return Array.isArray(value) ? value : [value];
9037
}
9038
 
9039
/**
9040
 * @fileoverview added by tsickle
9041
 * @suppress {checkTypes} checked by tsc
9042
 */
9043
 
9044
/**
9045
 * Coerces a value to a CSS pixel value.
9046
 * @param {?} value
9047
 * @return {?}
9048
 */
9049
function coerceCssPixelValue(value) {
9050
    if (value == null) {
9051
        return '';
9052
    }
9053
    return typeof value === 'string' ? value : value + "px";
9054
}
9055
 
9056
/**
9057
 * @fileoverview added by tsickle
9058
 * @suppress {checkTypes} checked by tsc
9059
 */
9060
 
9061
/**
9062
 * @fileoverview added by tsickle
9063
 * @suppress {checkTypes} checked by tsc
9064
 */
9065
 
9066
 
9067
//# sourceMappingURL=coercion.es5.js.map
9068
 
9069
 
9070
/***/ }),
9071
 
9072
/***/ "./node_modules/@angular/cdk/esm5/collections.es5.js":
9073
/*!***********************************************************!*\
9074
  !*** ./node_modules/@angular/cdk/esm5/collections.es5.js ***!
9075
  \***********************************************************/
9076
/*! exports provided: UniqueSelectionDispatcher, ArrayDataSource, DataSource, SelectionModel, getMultipleValuesInSingleSelectionError */
9077
/***/ (function(module, __webpack_exports__, __webpack_require__) {
9078
 
9079
"use strict";
9080
__webpack_require__.r(__webpack_exports__);
9081
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UniqueSelectionDispatcher", function() { return UniqueSelectionDispatcher; });
9082
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ArrayDataSource", function() { return ArrayDataSource; });
9083
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DataSource", function() { return DataSource; });
9084
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionModel", function() { return SelectionModel; });
9085
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMultipleValuesInSingleSelectionError", function() { return getMultipleValuesInSingleSelectionError; });
9086
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
9087
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
9088
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
9089
/**
9090
 * @license
9091
 * Copyright Google LLC All Rights Reserved.
9092
 *
9093
 * Use of this source code is governed by an MIT-style license that can be
9094
 * found in the LICENSE file at https://angular.io/license
9095
 */
9096
 
9097
 
9098
 
9099
 
9100
/**
9101
 * @fileoverview added by tsickle
9102
 * @suppress {checkTypes} checked by tsc
9103
 */
9104
 
9105
/**
9106
 * @abstract
9107
 * @template T
9108
 */
9109
var  /**
9110
 * @abstract
9111
 * @template T
9112
 */
9113
DataSource = /** @class */ (function () {
9114
    function DataSource() {
9115
    }
9116
    return DataSource;
9117
}());
9118
 
9119
/**
9120
 * @fileoverview added by tsickle
9121
 * @suppress {checkTypes} checked by tsc
9122
 */
9123
/**
9124
 * DataSource wrapper for a native array.
9125
 * @template T
9126
 */
9127
var  /**
9128
 * DataSource wrapper for a native array.
9129
 * @template T
9130
 */
9131
ArrayDataSource = /** @class */ (function (_super) {
9132
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ArrayDataSource, _super);
9133
    function ArrayDataSource(_data) {
9134
        var _this = _super.call(this) || this;
9135
        _this._data = _data;
9136
        return _this;
9137
    }
9138
    /**
9139
     * @return {?}
9140
     */
9141
    ArrayDataSource.prototype.connect = /**
9142
     * @return {?}
9143
     */
9144
    function () {
9145
        return this._data instanceof rxjs__WEBPACK_IMPORTED_MODULE_1__["Observable"] ? this._data : Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["of"])(this._data);
9146
    };
9147
    /**
9148
     * @return {?}
9149
     */
9150
    ArrayDataSource.prototype.disconnect = /**
9151
     * @return {?}
9152
     */
9153
    function () { };
9154
    return ArrayDataSource;
9155
}(DataSource));
9156
 
9157
/**
9158
 * @fileoverview added by tsickle
9159
 * @suppress {checkTypes} checked by tsc
9160
 */
9161
/**
9162
 * Class to be used to power selecting one or more options from a list.
9163
 * @template T
9164
 */
9165
var  /**
9166
 * Class to be used to power selecting one or more options from a list.
9167
 * @template T
9168
 */
9169
SelectionModel = /** @class */ (function () {
9170
    function SelectionModel(_multiple, initiallySelectedValues, _emitChanges) {
9171
        if (_multiple === void 0) { _multiple = false; }
9172
        if (_emitChanges === void 0) { _emitChanges = true; }
9173
        var _this = this;
9174
        this._multiple = _multiple;
9175
        this._emitChanges = _emitChanges;
9176
        /**
9177
         * Currently-selected values.
9178
         */
9179
        this._selection = new Set();
9180
        /**
9181
         * Keeps track of the deselected options that haven't been emitted by the change event.
9182
         */
9183
        this._deselectedToEmit = [];
9184
        /**
9185
         * Keeps track of the selected options that haven't been emitted by the change event.
9186
         */
9187
        this._selectedToEmit = [];
9188
        /**
9189
         * Event emitted when the value has changed.
9190
         */
9191
        this.onChange = this._emitChanges ? new rxjs__WEBPACK_IMPORTED_MODULE_1__["Subject"]() : null;
9192
        if (initiallySelectedValues && initiallySelectedValues.length) {
9193
            if (_multiple) {
9194
                initiallySelectedValues.forEach(function (value) { return _this._markSelected(value); });
9195
            }
9196
            else {
9197
                this._markSelected(initiallySelectedValues[0]);
9198
            }
9199
            // Clear the array in order to avoid firing the change event for preselected values.
9200
            this._selectedToEmit.length = 0;
9201
        }
9202
    }
9203
    Object.defineProperty(SelectionModel.prototype, "selected", {
9204
        /** Selected values. */
9205
        get: /**
9206
         * Selected values.
9207
         * @return {?}
9208
         */
9209
        function () {
9210
            if (!this._selected) {
9211
                this._selected = Array.from(this._selection.values());
9212
            }
9213
            return this._selected;
9214
        },
9215
        enumerable: true,
9216
        configurable: true
9217
    });
9218
    /**
9219
     * Selects a value or an array of values.
9220
     */
9221
    /**
9222
     * Selects a value or an array of values.
9223
     * @param {...?} values
9224
     * @return {?}
9225
     */
9226
    SelectionModel.prototype.select = /**
9227
     * Selects a value or an array of values.
9228
     * @param {...?} values
9229
     * @return {?}
9230
     */
9231
    function () {
9232
        var _this = this;
9233
        var values = [];
9234
        for (var _i = 0; _i < arguments.length; _i++) {
9235
            values[_i] = arguments[_i];
9236
        }
9237
        this._verifyValueAssignment(values);
9238
        values.forEach(function (value) { return _this._markSelected(value); });
9239
        this._emitChangeEvent();
9240
    };
9241
    /**
9242
     * Deselects a value or an array of values.
9243
     */
9244
    /**
9245
     * Deselects a value or an array of values.
9246
     * @param {...?} values
9247
     * @return {?}
9248
     */
9249
    SelectionModel.prototype.deselect = /**
9250
     * Deselects a value or an array of values.
9251
     * @param {...?} values
9252
     * @return {?}
9253
     */
9254
    function () {
9255
        var _this = this;
9256
        var values = [];
9257
        for (var _i = 0; _i < arguments.length; _i++) {
9258
            values[_i] = arguments[_i];
9259
        }
9260
        this._verifyValueAssignment(values);
9261
        values.forEach(function (value) { return _this._unmarkSelected(value); });
9262
        this._emitChangeEvent();
9263
    };
9264
    /**
9265
     * Toggles a value between selected and deselected.
9266
     */
9267
    /**
9268
     * Toggles a value between selected and deselected.
9269
     * @param {?} value
9270
     * @return {?}
9271
     */
9272
    SelectionModel.prototype.toggle = /**
9273
     * Toggles a value between selected and deselected.
9274
     * @param {?} value
9275
     * @return {?}
9276
     */
9277
    function (value) {
9278
        this.isSelected(value) ? this.deselect(value) : this.select(value);
9279
    };
9280
    /**
9281
     * Clears all of the selected values.
9282
     */
9283
    /**
9284
     * Clears all of the selected values.
9285
     * @return {?}
9286
     */
9287
    SelectionModel.prototype.clear = /**
9288
     * Clears all of the selected values.
9289
     * @return {?}
9290
     */
9291
    function () {
9292
        this._unmarkAll();
9293
        this._emitChangeEvent();
9294
    };
9295
    /**
9296
     * Determines whether a value is selected.
9297
     */
9298
    /**
9299
     * Determines whether a value is selected.
9300
     * @param {?} value
9301
     * @return {?}
9302
     */
9303
    SelectionModel.prototype.isSelected = /**
9304
     * Determines whether a value is selected.
9305
     * @param {?} value
9306
     * @return {?}
9307
     */
9308
    function (value) {
9309
        return this._selection.has(value);
9310
    };
9311
    /**
9312
     * Determines whether the model does not have a value.
9313
     */
9314
    /**
9315
     * Determines whether the model does not have a value.
9316
     * @return {?}
9317
     */
9318
    SelectionModel.prototype.isEmpty = /**
9319
     * Determines whether the model does not have a value.
9320
     * @return {?}
9321
     */
9322
    function () {
9323
        return this._selection.size === 0;
9324
    };
9325
    /**
9326
     * Determines whether the model has a value.
9327
     */
9328
    /**
9329
     * Determines whether the model has a value.
9330
     * @return {?}
9331
     */
9332
    SelectionModel.prototype.hasValue = /**
9333
     * Determines whether the model has a value.
9334
     * @return {?}
9335
     */
9336
    function () {
9337
        return !this.isEmpty();
9338
    };
9339
    /**
9340
     * Sorts the selected values based on a predicate function.
9341
     */
9342
    /**
9343
     * Sorts the selected values based on a predicate function.
9344
     * @param {?=} predicate
9345
     * @return {?}
9346
     */
9347
    SelectionModel.prototype.sort = /**
9348
     * Sorts the selected values based on a predicate function.
9349
     * @param {?=} predicate
9350
     * @return {?}
9351
     */
9352
    function (predicate) {
9353
        if (this._multiple && this.selected) {
9354
            /** @type {?} */ ((this._selected)).sort(predicate);
9355
        }
9356
    };
9357
    /**
9358
     * Gets whether multiple values can be selected.
9359
     */
9360
    /**
9361
     * Gets whether multiple values can be selected.
9362
     * @return {?}
9363
     */
9364
    SelectionModel.prototype.isMultipleSelection = /**
9365
     * Gets whether multiple values can be selected.
9366
     * @return {?}
9367
     */
9368
    function () {
9369
        return this._multiple;
9370
    };
9371
    /**
9372
     * Emits a change event and clears the records of selected and deselected values.
9373
     * @return {?}
9374
     */
9375
    SelectionModel.prototype._emitChangeEvent = /**
9376
     * Emits a change event and clears the records of selected and deselected values.
9377
     * @return {?}
9378
     */
9379
    function () {
9380
        // Clear the selected values so they can be re-cached.
9381
        this._selected = null;
9382
        if (this._selectedToEmit.length || this._deselectedToEmit.length) {
9383
            if (this.onChange) {
9384
                this.onChange.next({
9385
                    source: this,
9386
                    added: this._selectedToEmit,
9387
                    removed: this._deselectedToEmit
9388
                });
9389
            }
9390
            this._deselectedToEmit = [];
9391
            this._selectedToEmit = [];
9392
        }
9393
    };
9394
    /**
9395
     * Selects a value.
9396
     * @param {?} value
9397
     * @return {?}
9398
     */
9399
    SelectionModel.prototype._markSelected = /**
9400
     * Selects a value.
9401
     * @param {?} value
9402
     * @return {?}
9403
     */
9404
    function (value) {
9405
        if (!this.isSelected(value)) {
9406
            if (!this._multiple) {
9407
                this._unmarkAll();
9408
            }
9409
            this._selection.add(value);
9410
            if (this._emitChanges) {
9411
                this._selectedToEmit.push(value);
9412
            }
9413
        }
9414
    };
9415
    /**
9416
     * Deselects a value.
9417
     * @param {?} value
9418
     * @return {?}
9419
     */
9420
    SelectionModel.prototype._unmarkSelected = /**
9421
     * Deselects a value.
9422
     * @param {?} value
9423
     * @return {?}
9424
     */
9425
    function (value) {
9426
        if (this.isSelected(value)) {
9427
            this._selection.delete(value);
9428
            if (this._emitChanges) {
9429
                this._deselectedToEmit.push(value);
9430
            }
9431
        }
9432
    };
9433
    /**
9434
     * Clears out the selected values.
9435
     * @return {?}
9436
     */
9437
    SelectionModel.prototype._unmarkAll = /**
9438
     * Clears out the selected values.
9439
     * @return {?}
9440
     */
9441
    function () {
9442
        var _this = this;
9443
        if (!this.isEmpty()) {
9444
            this._selection.forEach(function (value) { return _this._unmarkSelected(value); });
9445
        }
9446
    };
9447
    /**
9448
     * Verifies the value assignment and throws an error if the specified value array is
9449
     * including multiple values while the selection model is not supporting multiple values.
9450
     * @param {?} values
9451
     * @return {?}
9452
     */
9453
    SelectionModel.prototype._verifyValueAssignment = /**
9454
     * Verifies the value assignment and throws an error if the specified value array is
9455
     * including multiple values while the selection model is not supporting multiple values.
9456
     * @param {?} values
9457
     * @return {?}
9458
     */
9459
    function (values) {
9460
        if (values.length > 1 && !this._multiple) {
9461
            throw getMultipleValuesInSingleSelectionError();
9462
        }
9463
    };
9464
    return SelectionModel;
9465
}());
9466
/**
9467
 * Returns an error that reports that multiple values are passed into a selection model
9468
 * with a single value.
9469
 * @return {?}
9470
 */
9471
function getMultipleValuesInSingleSelectionError() {
9472
    return Error('Cannot pass multiple values into SelectionModel with single-value mode.');
9473
}
9474
 
9475
/**
9476
 * @fileoverview added by tsickle
9477
 * @suppress {checkTypes} checked by tsc
9478
 */
9479
/**
9480
 * Class to coordinate unique selection based on name.
9481
 * Intended to be consumed as an Angular service.
9482
 * This service is needed because native radio change events are only fired on the item currently
9483
 * being selected, and we still need to uncheck the previous selection.
9484
 *
9485
 * This service does not *store* any IDs and names because they may change at any time, so it is
9486
 * less error-prone if they are simply passed through when the events occur.
9487
 */
9488
var UniqueSelectionDispatcher = /** @class */ (function () {
9489
    function UniqueSelectionDispatcher() {
9490
        this._listeners = [];
9491
    }
9492
    /**
9493
     * Notify other items that selection for the given name has been set.
9494
     * @param id ID of the item.
9495
     * @param name Name of the item.
9496
     */
9497
    /**
9498
     * Notify other items that selection for the given name has been set.
9499
     * @param {?} id ID of the item.
9500
     * @param {?} name Name of the item.
9501
     * @return {?}
9502
     */
9503
    UniqueSelectionDispatcher.prototype.notify = /**
9504
     * Notify other items that selection for the given name has been set.
9505
     * @param {?} id ID of the item.
9506
     * @param {?} name Name of the item.
9507
     * @return {?}
9508
     */
9509
    function (id, name) {
9510
        for (var _i = 0, _a = this._listeners; _i < _a.length; _i++) {
9511
            var listener = _a[_i];
9512
            listener(id, name);
9513
        }
9514
    };
9515
    /**
9516
     * Listen for future changes to item selection.
9517
     * @return Function used to deregister listener
9518
     */
9519
    /**
9520
     * Listen for future changes to item selection.
9521
     * @param {?} listener
9522
     * @return {?} Function used to deregister listener
9523
     */
9524
    UniqueSelectionDispatcher.prototype.listen = /**
9525
     * Listen for future changes to item selection.
9526
     * @param {?} listener
9527
     * @return {?} Function used to deregister listener
9528
     */
9529
    function (listener) {
9530
        var _this = this;
9531
        this._listeners.push(listener);
9532
        return function () {
9533
            _this._listeners = _this._listeners.filter(function (registered) {
9534
                return listener !== registered;
9535
            });
9536
        };
9537
    };
9538
    /**
9539
     * @return {?}
9540
     */
9541
    UniqueSelectionDispatcher.prototype.ngOnDestroy = /**
9542
     * @return {?}
9543
     */
9544
    function () {
9545
        this._listeners = [];
9546
    };
9547
    UniqueSelectionDispatcher.decorators = [
9548
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Injectable"], args: [{ providedIn: 'root' },] },
9549
    ];
9550
    /** @nocollapse */ UniqueSelectionDispatcher.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["defineInjectable"])({ factory: function UniqueSelectionDispatcher_Factory() { return new UniqueSelectionDispatcher(); }, token: UniqueSelectionDispatcher, providedIn: "root" });
9551
    return UniqueSelectionDispatcher;
9552
}());
9553
 
9554
/**
9555
 * @fileoverview added by tsickle
9556
 * @suppress {checkTypes} checked by tsc
9557
 */
9558
 
9559
/**
9560
 * @fileoverview added by tsickle
9561
 * @suppress {checkTypes} checked by tsc
9562
 */
9563
 
9564
 
9565
//# sourceMappingURL=collections.es5.js.map
9566
 
9567
 
9568
/***/ }),
9569
 
9570
/***/ "./node_modules/@angular/cdk/esm5/keycodes.es5.js":
9571
/*!********************************************************!*\
9572
  !*** ./node_modules/@angular/cdk/esm5/keycodes.es5.js ***!
9573
  \********************************************************/
9574
/*! exports provided: MAC_ENTER, BACKSPACE, TAB, NUM_CENTER, ENTER, SHIFT, CONTROL, ALT, PAUSE, CAPS_LOCK, ESCAPE, SPACE, PAGE_UP, PAGE_DOWN, END, HOME, LEFT_ARROW, UP_ARROW, RIGHT_ARROW, DOWN_ARROW, PLUS_SIGN, PRINT_SCREEN, INSERT, DELETE, ZERO, ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, FF_SEMICOLON, FF_EQUALS, QUESTION_MARK, AT_SIGN, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, META, MAC_WK_CMD_LEFT, MAC_WK_CMD_RIGHT, CONTEXT_MENU, NUMPAD_ZERO, NUMPAD_ONE, NUMPAD_TWO, NUMPAD_THREE, NUMPAD_FOUR, NUMPAD_FIVE, NUMPAD_SIX, NUMPAD_SEVEN, NUMPAD_EIGHT, NUMPAD_NINE, NUMPAD_MULTIPLY, NUMPAD_PLUS, NUMPAD_MINUS, NUMPAD_PERIOD, NUMPAD_DIVIDE, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, NUM_LOCK, SCROLL_LOCK, FIRST_MEDIA, FF_MINUS, MUTE, VOLUME_DOWN, VOLUME_UP, FF_MUTE, FF_VOLUME_DOWN, LAST_MEDIA, FF_VOLUME_UP, SEMICOLON, EQUALS, COMMA, DASH, SLASH, APOSTROPHE, TILDE, OPEN_SQUARE_BRACKET, BACKSLASH, CLOSE_SQUARE_BRACKET, SINGLE_QUOTE, MAC_META */
9575
/***/ (function(module, __webpack_exports__, __webpack_require__) {
9576
 
9577
"use strict";
9578
__webpack_require__.r(__webpack_exports__);
9579
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAC_ENTER", function() { return MAC_ENTER; });
9580
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BACKSPACE", function() { return BACKSPACE; });
9581
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TAB", function() { return TAB; });
9582
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NUM_CENTER", function() { return NUM_CENTER; });
9583
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ENTER", function() { return ENTER; });
9584
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SHIFT", function() { return SHIFT; });
9585
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONTROL", function() { return CONTROL; });
9586
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ALT", function() { return ALT; });
9587
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PAUSE", function() { return PAUSE; });
9588
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CAPS_LOCK", function() { return CAPS_LOCK; });
9589
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ESCAPE", function() { return ESCAPE; });
9590
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SPACE", function() { return SPACE; });
9591
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PAGE_UP", function() { return PAGE_UP; });
9592
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PAGE_DOWN", function() { return PAGE_DOWN; });
9593
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "END", function() { return END; });
9594
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HOME", function() { return HOME; });
9595
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LEFT_ARROW", function() { return LEFT_ARROW; });
9596
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UP_ARROW", function() { return UP_ARROW; });
9597
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RIGHT_ARROW", function() { return RIGHT_ARROW; });
9598
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DOWN_ARROW", function() { return DOWN_ARROW; });
9599
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PLUS_SIGN", function() { return PLUS_SIGN; });
9600
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PRINT_SCREEN", function() { return PRINT_SCREEN; });
9601
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "INSERT", function() { return INSERT; });
9602
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DELETE", function() { return DELETE; });
9603
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZERO", function() { return ZERO; });
9604
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ONE", function() { return ONE; });
9605
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TWO", function() { return TWO; });
9606
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "THREE", function() { return THREE; });
9607
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FOUR", function() { return FOUR; });
9608
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FIVE", function() { return FIVE; });
9609
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SIX", function() { return SIX; });
9610
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SEVEN", function() { return SEVEN; });
9611
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EIGHT", function() { return EIGHT; });
9612
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NINE", function() { return NINE; });
9613
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FF_SEMICOLON", function() { return FF_SEMICOLON; });
9614
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FF_EQUALS", function() { return FF_EQUALS; });
9615
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QUESTION_MARK", function() { return QUESTION_MARK; });
9616
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AT_SIGN", function() { return AT_SIGN; });
9617
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return A; });
9618
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return B; });
9619
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return C; });
9620
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return D; });
9621
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return E; });
9622
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return F; });
9623
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return G; });
9624
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return H; });
9625
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return I; });
9626
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return J; });
9627
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return K; });
9628
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return L; });
9629
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return M; });
9630
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return N; });
9631
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "O", function() { return O; });
9632
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "P", function() { return P; });
9633
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return Q; });
9634
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "R", function() { return R; });
9635
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "S", function() { return S; });
9636
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "T", function() { return T; });
9637
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "U", function() { return U; });
9638
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "V", function() { return V; });
9639
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "W", function() { return W; });
9640
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "X", function() { return X; });
9641
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Y", function() { return Y; });
9642
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Z", function() { return Z; });
9643
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "META", function() { return META; });
9644
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAC_WK_CMD_LEFT", function() { return MAC_WK_CMD_LEFT; });
9645
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAC_WK_CMD_RIGHT", function() { return MAC_WK_CMD_RIGHT; });
9646
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONTEXT_MENU", function() { return CONTEXT_MENU; });
9647
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NUMPAD_ZERO", function() { return NUMPAD_ZERO; });
9648
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NUMPAD_ONE", function() { return NUMPAD_ONE; });
9649
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NUMPAD_TWO", function() { return NUMPAD_TWO; });
9650
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NUMPAD_THREE", function() { return NUMPAD_THREE; });
9651
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NUMPAD_FOUR", function() { return NUMPAD_FOUR; });
9652
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NUMPAD_FIVE", function() { return NUMPAD_FIVE; });
9653
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NUMPAD_SIX", function() { return NUMPAD_SIX; });
9654
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NUMPAD_SEVEN", function() { return NUMPAD_SEVEN; });
9655
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NUMPAD_EIGHT", function() { return NUMPAD_EIGHT; });
9656
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NUMPAD_NINE", function() { return NUMPAD_NINE; });
9657
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NUMPAD_MULTIPLY", function() { return NUMPAD_MULTIPLY; });
9658
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NUMPAD_PLUS", function() { return NUMPAD_PLUS; });
9659
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NUMPAD_MINUS", function() { return NUMPAD_MINUS; });
9660
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NUMPAD_PERIOD", function() { return NUMPAD_PERIOD; });
9661
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NUMPAD_DIVIDE", function() { return NUMPAD_DIVIDE; });
9662
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F1", function() { return F1; });
9663
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F2", function() { return F2; });
9664
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F3", function() { return F3; });
9665
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F4", function() { return F4; });
9666
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F5", function() { return F5; });
9667
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F6", function() { return F6; });
9668
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F7", function() { return F7; });
9669
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F8", function() { return F8; });
9670
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F9", function() { return F9; });
9671
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F10", function() { return F10; });
9672
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F11", function() { return F11; });
9673
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F12", function() { return F12; });
9674
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NUM_LOCK", function() { return NUM_LOCK; });
9675
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCROLL_LOCK", function() { return SCROLL_LOCK; });
9676
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FIRST_MEDIA", function() { return FIRST_MEDIA; });
9677
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FF_MINUS", function() { return FF_MINUS; });
9678
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MUTE", function() { return MUTE; });
9679
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VOLUME_DOWN", function() { return VOLUME_DOWN; });
9680
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VOLUME_UP", function() { return VOLUME_UP; });
9681
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FF_MUTE", function() { return FF_MUTE; });
9682
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FF_VOLUME_DOWN", function() { return FF_VOLUME_DOWN; });
9683
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LAST_MEDIA", function() { return LAST_MEDIA; });
9684
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FF_VOLUME_UP", function() { return FF_VOLUME_UP; });
9685
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SEMICOLON", function() { return SEMICOLON; });
9686
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EQUALS", function() { return EQUALS; });
9687
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "COMMA", function() { return COMMA; });
9688
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DASH", function() { return DASH; });
9689
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SLASH", function() { return SLASH; });
9690
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APOSTROPHE", function() { return APOSTROPHE; });
9691
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TILDE", function() { return TILDE; });
9692
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OPEN_SQUARE_BRACKET", function() { return OPEN_SQUARE_BRACKET; });
9693
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BACKSLASH", function() { return BACKSLASH; });
9694
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CLOSE_SQUARE_BRACKET", function() { return CLOSE_SQUARE_BRACKET; });
9695
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SINGLE_QUOTE", function() { return SINGLE_QUOTE; });
9696
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAC_META", function() { return MAC_META; });
9697
/**
9698
 * @license
9699
 * Copyright Google LLC All Rights Reserved.
9700
 *
9701
 * Use of this source code is governed by an MIT-style license that can be
9702
 * found in the LICENSE file at https://angular.io/license
9703
 */
9704
/**
9705
 * @fileoverview added by tsickle
9706
 * @suppress {checkTypes} checked by tsc
9707
 */
9708
 
9709
var /** @type {?} */ MAC_ENTER = 3;
9710
var /** @type {?} */ BACKSPACE = 8;
9711
var /** @type {?} */ TAB = 9;
9712
var /** @type {?} */ NUM_CENTER = 12;
9713
var /** @type {?} */ ENTER = 13;
9714
var /** @type {?} */ SHIFT = 16;
9715
var /** @type {?} */ CONTROL = 17;
9716
var /** @type {?} */ ALT = 18;
9717
var /** @type {?} */ PAUSE = 19;
9718
var /** @type {?} */ CAPS_LOCK = 20;
9719
var /** @type {?} */ ESCAPE = 27;
9720
var /** @type {?} */ SPACE = 32;
9721
var /** @type {?} */ PAGE_UP = 33;
9722
var /** @type {?} */ PAGE_DOWN = 34;
9723
var /** @type {?} */ END = 35;
9724
var /** @type {?} */ HOME = 36;
9725
var /** @type {?} */ LEFT_ARROW = 37;
9726
var /** @type {?} */ UP_ARROW = 38;
9727
var /** @type {?} */ RIGHT_ARROW = 39;
9728
var /** @type {?} */ DOWN_ARROW = 40;
9729
var /** @type {?} */ PLUS_SIGN = 43;
9730
var /** @type {?} */ PRINT_SCREEN = 44;
9731
var /** @type {?} */ INSERT = 45;
9732
var /** @type {?} */ DELETE = 46;
9733
var /** @type {?} */ ZERO = 48;
9734
var /** @type {?} */ ONE = 49;
9735
var /** @type {?} */ TWO = 50;
9736
var /** @type {?} */ THREE = 51;
9737
var /** @type {?} */ FOUR = 52;
9738
var /** @type {?} */ FIVE = 53;
9739
var /** @type {?} */ SIX = 54;
9740
var /** @type {?} */ SEVEN = 55;
9741
var /** @type {?} */ EIGHT = 56;
9742
var /** @type {?} */ NINE = 57;
9743
var /** @type {?} */ FF_SEMICOLON = 59; // Firefox (Gecko) fires this for semicolon instead of 186
9744
var /** @type {?} */ FF_EQUALS = 61; // Firefox (Gecko) fires this for equals instead of 187
9745
var /** @type {?} */ QUESTION_MARK = 63;
9746
var /** @type {?} */ AT_SIGN = 64;
9747
var /** @type {?} */ A = 65;
9748
var /** @type {?} */ B = 66;
9749
var /** @type {?} */ C = 67;
9750
var /** @type {?} */ D = 68;
9751
var /** @type {?} */ E = 69;
9752
var /** @type {?} */ F = 70;
9753
var /** @type {?} */ G = 71;
9754
var /** @type {?} */ H = 72;
9755
var /** @type {?} */ I = 73;
9756
var /** @type {?} */ J = 74;
9757
var /** @type {?} */ K = 75;
9758
var /** @type {?} */ L = 76;
9759
var /** @type {?} */ M = 77;
9760
var /** @type {?} */ N = 78;
9761
var /** @type {?} */ O = 79;
9762
var /** @type {?} */ P = 80;
9763
var /** @type {?} */ Q = 81;
9764
var /** @type {?} */ R = 82;
9765
var /** @type {?} */ S = 83;
9766
var /** @type {?} */ T = 84;
9767
var /** @type {?} */ U = 85;
9768
var /** @type {?} */ V = 86;
9769
var /** @type {?} */ W = 87;
9770
var /** @type {?} */ X = 88;
9771
var /** @type {?} */ Y = 89;
9772
var /** @type {?} */ Z = 90;
9773
var /** @type {?} */ META = 91; // WIN_KEY_LEFT
9774
var /** @type {?} */ MAC_WK_CMD_LEFT = 91;
9775
var /** @type {?} */ MAC_WK_CMD_RIGHT = 93;
9776
var /** @type {?} */ CONTEXT_MENU = 93;
9777
var /** @type {?} */ NUMPAD_ZERO = 96;
9778
var /** @type {?} */ NUMPAD_ONE = 97;
9779
var /** @type {?} */ NUMPAD_TWO = 98;
9780
var /** @type {?} */ NUMPAD_THREE = 99;
9781
var /** @type {?} */ NUMPAD_FOUR = 100;
9782
var /** @type {?} */ NUMPAD_FIVE = 101;
9783
var /** @type {?} */ NUMPAD_SIX = 102;
9784
var /** @type {?} */ NUMPAD_SEVEN = 103;
9785
var /** @type {?} */ NUMPAD_EIGHT = 104;
9786
var /** @type {?} */ NUMPAD_NINE = 105;
9787
var /** @type {?} */ NUMPAD_MULTIPLY = 106;
9788
var /** @type {?} */ NUMPAD_PLUS = 107;
9789
var /** @type {?} */ NUMPAD_MINUS = 109;
9790
var /** @type {?} */ NUMPAD_PERIOD = 110;
9791
var /** @type {?} */ NUMPAD_DIVIDE = 111;
9792
var /** @type {?} */ F1 = 112;
9793
var /** @type {?} */ F2 = 113;
9794
var /** @type {?} */ F3 = 114;
9795
var /** @type {?} */ F4 = 115;
9796
var /** @type {?} */ F5 = 116;
9797
var /** @type {?} */ F6 = 117;
9798
var /** @type {?} */ F7 = 118;
9799
var /** @type {?} */ F8 = 119;
9800
var /** @type {?} */ F9 = 120;
9801
var /** @type {?} */ F10 = 121;
9802
var /** @type {?} */ F11 = 122;
9803
var /** @type {?} */ F12 = 123;
9804
var /** @type {?} */ NUM_LOCK = 144;
9805
var /** @type {?} */ SCROLL_LOCK = 145;
9806
var /** @type {?} */ FIRST_MEDIA = 166;
9807
var /** @type {?} */ FF_MINUS = 173;
9808
var /** @type {?} */ MUTE = 173; // Firefox (Gecko) fires 181 for MUTE
9809
var /** @type {?} */ VOLUME_DOWN = 174; // Firefox (Gecko) fires 182 for VOLUME_DOWN
9810
var /** @type {?} */ VOLUME_UP = 175; // Firefox (Gecko) fires 183 for VOLUME_UP
9811
var /** @type {?} */ FF_MUTE = 181;
9812
var /** @type {?} */ FF_VOLUME_DOWN = 182;
9813
var /** @type {?} */ LAST_MEDIA = 183;
9814
var /** @type {?} */ FF_VOLUME_UP = 183;
9815
var /** @type {?} */ SEMICOLON = 186; // Firefox (Gecko) fires 59 for SEMICOLON
9816
var /** @type {?} */ EQUALS = 187; // Firefox (Gecko) fires 61 for EQUALS
9817
var /** @type {?} */ COMMA = 188;
9818
var /** @type {?} */ DASH = 189; // Firefox (Gecko) fires 173 for DASH/MINUS
9819
var /** @type {?} */ SLASH = 191;
9820
var /** @type {?} */ APOSTROPHE = 192;
9821
var /** @type {?} */ TILDE = 192;
9822
var /** @type {?} */ OPEN_SQUARE_BRACKET = 219;
9823
var /** @type {?} */ BACKSLASH = 220;
9824
var /** @type {?} */ CLOSE_SQUARE_BRACKET = 221;
9825
var /** @type {?} */ SINGLE_QUOTE = 222;
9826
var /** @type {?} */ MAC_META = 224;
9827
 
9828
/**
9829
 * @fileoverview added by tsickle
9830
 * @suppress {checkTypes} checked by tsc
9831
 */
9832
 
9833
/**
9834
 * @fileoverview added by tsickle
9835
 * @suppress {checkTypes} checked by tsc
9836
 */
9837
 
9838
 
9839
//# sourceMappingURL=keycodes.es5.js.map
9840
 
9841
 
9842
/***/ }),
9843
 
9844
/***/ "./node_modules/@angular/cdk/esm5/layout.es5.js":
9845
/*!******************************************************!*\
9846
  !*** ./node_modules/@angular/cdk/esm5/layout.es5.js ***!
9847
  \******************************************************/
9848
/*! exports provided: LayoutModule, BreakpointObserver, Breakpoints, MediaMatcher */
9849
/***/ (function(module, __webpack_exports__, __webpack_require__) {
9850
 
9851
"use strict";
9852
__webpack_require__.r(__webpack_exports__);
9853
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LayoutModule", function() { return LayoutModule; });
9854
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BreakpointObserver", function() { return BreakpointObserver; });
9855
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Breakpoints", function() { return Breakpoints; });
9856
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MediaMatcher", function() { return MediaMatcher; });
9857
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
9858
/* harmony import */ var _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/cdk/platform */ "./node_modules/@angular/cdk/esm5/platform.es5.js");
9859
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
9860
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
9861
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
9862
/**
9863
 * @license
9864
 * Copyright Google LLC All Rights Reserved.
9865
 *
9866
 * Use of this source code is governed by an MIT-style license that can be
9867
 * found in the LICENSE file at https://angular.io/license
9868
 */
9869
 
9870
 
9871
 
9872
 
9873
 
9874
 
9875
/**
9876
 * @fileoverview added by tsickle
9877
 * @suppress {checkTypes} checked by tsc
9878
 */
9879
var LayoutModule = /** @class */ (function () {
9880
    function LayoutModule() {
9881
    }
9882
    LayoutModule.decorators = [
9883
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"] },
9884
    ];
9885
    return LayoutModule;
9886
}());
9887
 
9888
/**
9889
 * @fileoverview added by tsickle
9890
 * @suppress {checkTypes} checked by tsc
9891
 */
9892
/**
9893
 * Global registry for all dynamically-created, injected media queries.
9894
 */
9895
var /** @type {?} */ mediaQueriesForWebkitCompatibility = new Set();
9896
/**
9897
 * Style tag that holds all of the dynamically-created media queries.
9898
 */
9899
var /** @type {?} */ mediaQueryStyleNode;
9900
/**
9901
 * A utility for calling matchMedia queries.
9902
 */
9903
var MediaMatcher = /** @class */ (function () {
9904
    function MediaMatcher(platform) {
9905
        this.platform = platform;
9906
        this._matchMedia = this.platform.isBrowser && window.matchMedia ?
9907
            // matchMedia is bound to the window scope intentionally as it is an illegal invocation to
9908
            // call it from a different scope.
9909
            window.matchMedia.bind(window) :
9910
            noopMatchMedia;
9911
    }
9912
    /**
9913
     * Evaluates the given media query and returns the native MediaQueryList from which results
9914
     * can be retrieved.
9915
     * Confirms the layout engine will trigger for the selector query provided and returns the
9916
     * MediaQueryList for the query provided.
9917
     */
9918
    /**
9919
     * Evaluates the given media query and returns the native MediaQueryList from which results
9920
     * can be retrieved.
9921
     * Confirms the layout engine will trigger for the selector query provided and returns the
9922
     * MediaQueryList for the query provided.
9923
     * @param {?} query
9924
     * @return {?}
9925
     */
9926
    MediaMatcher.prototype.matchMedia = /**
9927
     * Evaluates the given media query and returns the native MediaQueryList from which results
9928
     * can be retrieved.
9929
     * Confirms the layout engine will trigger for the selector query provided and returns the
9930
     * MediaQueryList for the query provided.
9931
     * @param {?} query
9932
     * @return {?}
9933
     */
9934
    function (query) {
9935
        if (this.platform.WEBKIT) {
9936
            createEmptyStyleRule(query);
9937
        }
9938
        return this._matchMedia(query);
9939
    };
9940
    MediaMatcher.decorators = [
9941
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"], args: [{ providedIn: 'root' },] },
9942
    ];
9943
    /** @nocollapse */
9944
    MediaMatcher.ctorParameters = function () { return [
9945
        { type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_1__["Platform"], },
9946
    ]; };
9947
    /** @nocollapse */ MediaMatcher.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["defineInjectable"])({ factory: function MediaMatcher_Factory() { return new MediaMatcher(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["inject"])(_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_1__["Platform"])); }, token: MediaMatcher, providedIn: "root" });
9948
    return MediaMatcher;
9949
}());
9950
/**
9951
 * For Webkit engines that only trigger the MediaQueryListListener when
9952
 * there is at least one CSS selector for the respective media query.
9953
 * @param {?} query
9954
 * @return {?}
9955
 */
9956
function createEmptyStyleRule(query) {
9957
    if (mediaQueriesForWebkitCompatibility.has(query)) {
9958
        return;
9959
    }
9960
    try {
9961
        if (!mediaQueryStyleNode) {
9962
            mediaQueryStyleNode = document.createElement('style');
9963
            mediaQueryStyleNode.setAttribute('type', 'text/css');
9964
            document.head.appendChild(mediaQueryStyleNode);
9965
        }
9966
        if (mediaQueryStyleNode.sheet) {
9967
            (/** @type {?} */ (mediaQueryStyleNode.sheet))
9968
                .insertRule("@media " + query + " {.fx-query-test{ }}", 0);
9969
            mediaQueriesForWebkitCompatibility.add(query);
9970
        }
9971
    }
9972
    catch (/** @type {?} */ e) {
9973
        console.error(e);
9974
    }
9975
}
9976
/**
9977
 * No-op matchMedia replacement for non-browser platforms.
9978
 * @param {?} query
9979
 * @return {?}
9980
 */
9981
function noopMatchMedia(query) {
9982
    return {
9983
        matches: query === 'all' || query === '',
9984
        media: query,
9985
        addListener: function () { },
9986
        removeListener: function () { }
9987
    };
9988
}
9989
 
9990
/**
9991
 * @fileoverview added by tsickle
9992
 * @suppress {checkTypes} checked by tsc
9993
 */
9994
/**
9995
 * Utility for checking the matching state of \@media queries.
9996
 */
9997
var BreakpointObserver = /** @class */ (function () {
9998
    function BreakpointObserver(mediaMatcher, zone) {
9999
        this.mediaMatcher = mediaMatcher;
10000
        this.zone = zone;
10001
        /**
10002
         * A map of all media queries currently being listened for.
10003
         */
10004
        this._queries = new Map();
10005
        /**
10006
         * A subject for all other observables to takeUntil based on.
10007
         */
10008
        this._destroySubject = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
10009
    }
10010
    /** Completes the active subject, signalling to all other observables to complete. */
10011
    /**
10012
     * Completes the active subject, signalling to all other observables to complete.
10013
     * @return {?}
10014
     */
10015
    BreakpointObserver.prototype.ngOnDestroy = /**
10016
     * Completes the active subject, signalling to all other observables to complete.
10017
     * @return {?}
10018
     */
10019
    function () {
10020
        this._destroySubject.next();
10021
        this._destroySubject.complete();
10022
    };
10023
    /**
10024
     * Whether one or more media queries match the current viewport size.
10025
     * @param value One or more media queries to check.
10026
     * @returns Whether any of the media queries match.
10027
     */
10028
    /**
10029
     * Whether one or more media queries match the current viewport size.
10030
     * @param {?} value One or more media queries to check.
10031
     * @return {?} Whether any of the media queries match.
10032
     */
10033
    BreakpointObserver.prototype.isMatched = /**
10034
     * Whether one or more media queries match the current viewport size.
10035
     * @param {?} value One or more media queries to check.
10036
     * @return {?} Whether any of the media queries match.
10037
     */
10038
    function (value) {
10039
        var _this = this;
10040
        var /** @type {?} */ queries = splitQueries(Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_4__["coerceArray"])(value));
10041
        return queries.some(function (mediaQuery) { return _this._registerQuery(mediaQuery).mql.matches; });
10042
    };
10043
    /**
10044
     * Gets an observable of results for the given queries that will emit new results for any changes
10045
     * in matching of the given queries.
10046
     * @param value One or more media queries to check.
10047
     * @returns A stream of matches for the given queries.
10048
     */
10049
    /**
10050
     * Gets an observable of results for the given queries that will emit new results for any changes
10051
     * in matching of the given queries.
10052
     * @param {?} value One or more media queries to check.
10053
     * @return {?} A stream of matches for the given queries.
10054
     */
10055
    BreakpointObserver.prototype.observe = /**
10056
     * Gets an observable of results for the given queries that will emit new results for any changes
10057
     * in matching of the given queries.
10058
     * @param {?} value One or more media queries to check.
10059
     * @return {?} A stream of matches for the given queries.
10060
     */
10061
    function (value) {
10062
        var _this = this;
10063
        var /** @type {?} */ queries = splitQueries(Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_4__["coerceArray"])(value));
10064
        var /** @type {?} */ observables = queries.map(function (query) { return _this._registerQuery(query).observable; });
10065
        return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["combineLatest"])(observables).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (breakpointStates) {
10066
            var /** @type {?} */ response = {
10067
                matches: false,
10068
                breakpoints: {},
10069
            };
10070
            breakpointStates.forEach(function (state) {
10071
                response.matches = response.matches || state.matches;
10072
                response.breakpoints[state.query] = state.matches;
10073
            });
10074
            return response;
10075
        }));
10076
    };
10077
    /**
10078
     * Registers a specific query to be listened for.
10079
     * @param {?} query
10080
     * @return {?}
10081
     */
10082
    BreakpointObserver.prototype._registerQuery = /**
10083
     * Registers a specific query to be listened for.
10084
     * @param {?} query
10085
     * @return {?}
10086
     */
10087
    function (query) {
10088
        var _this = this;
10089
        // Only set up a new MediaQueryList if it is not already being listened for.
10090
        if (this._queries.has(query)) {
10091
            return /** @type {?} */ ((this._queries.get(query)));
10092
        }
10093
        var /** @type {?} */ mql = this.mediaMatcher.matchMedia(query);
10094
        // Create callback for match changes and add it is as a listener.
10095
        var /** @type {?} */ queryObservable = Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["fromEventPattern"])(
10096
        // Listener callback methods are wrapped to be placed back in ngZone. Callbacks must be placed
10097
        // back into the zone because matchMedia is only included in Zone.js by loading the
10098
        // webapis-media-query.js file alongside the zone.js file.  Additionally, some browsers do not
10099
        // have MediaQueryList inherit from EventTarget, which causes inconsistencies in how Zone.js
10100
        // patches it.
10101
        // Listener callback methods are wrapped to be placed back in ngZone. Callbacks must be placed
10102
        // back into the zone because matchMedia is only included in Zone.js by loading the
10103
        // webapis-media-query.js file alongside the zone.js file.  Additionally, some browsers do not
10104
        // have MediaQueryList inherit from EventTarget, which causes inconsistencies in how Zone.js
10105
        // patches it.
10106
        function (listener) {
10107
            mql.addListener(function (e) { return _this.zone.run(function () { return listener(e); }); });
10108
        }, function (listener) {
10109
            mql.removeListener(function (e) { return _this.zone.run(function () { return listener(e); }); });
10110
        })
10111
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["takeUntil"])(this._destroySubject), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["startWith"])(mql), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (nextMql) { return ({ query: query, matches: nextMql.matches }); }));
10112
        // Add the MediaQueryList to the set of queries.
10113
        var /** @type {?} */ output = { observable: queryObservable, mql: mql };
10114
        this._queries.set(query, output);
10115
        return output;
10116
    };
10117
    BreakpointObserver.decorators = [
10118
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"], args: [{ providedIn: 'root' },] },
10119
    ];
10120
    /** @nocollapse */
10121
    BreakpointObserver.ctorParameters = function () { return [
10122
        { type: MediaMatcher, },
10123
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], },
10124
    ]; };
10125
    /** @nocollapse */ BreakpointObserver.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["defineInjectable"])({ factory: function BreakpointObserver_Factory() { return new BreakpointObserver(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["inject"])(MediaMatcher), Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"])); }, token: BreakpointObserver, providedIn: "root" });
10126
    return BreakpointObserver;
10127
}());
10128
/**
10129
 * Split each query string into separate query strings if two queries are provided as comma
10130
 * separated.
10131
 * @param {?} queries
10132
 * @return {?}
10133
 */
10134
function splitQueries(queries) {
10135
    return queries.map(function (query) { return query.split(','); })
10136
        .reduce(function (a1, a2) { return a1.concat(a2); })
10137
        .map(function (query) { return query.trim(); });
10138
}
10139
 
10140
/**
10141
 * @fileoverview added by tsickle
10142
 * @suppress {checkTypes} checked by tsc
10143
 */
10144
 
10145
var /** @type {?} */ Breakpoints = {
10146
    XSmall: '(max-width: 599px)',
10147
    Small: '(min-width: 600px) and (max-width: 959px)',
10148
    Medium: '(min-width: 960px) and (max-width: 1279px)',
10149
    Large: '(min-width: 1280px) and (max-width: 1919px)',
10150
    XLarge: '(min-width: 1920px)',
10151
    Handset: '(max-width: 599px) and (orientation: portrait), ' +
10152
        '(max-width: 959px) and (orientation: landscape)',
10153
    Tablet: '(min-width: 600px) and (max-width: 839px) and (orientation: portrait), ' +
10154
        '(min-width: 960px) and (max-width: 1279px) and (orientation: landscape)',
10155
    Web: '(min-width: 840px) and (orientation: portrait), ' +
10156
        '(min-width: 1280px) and (orientation: landscape)',
10157
    HandsetPortrait: '(max-width: 599px) and (orientation: portrait)',
10158
    TabletPortrait: '(min-width: 600px) and (max-width: 839px) and (orientation: portrait)',
10159
    WebPortrait: '(min-width: 840px) and (orientation: portrait)',
10160
    HandsetLandscape: '(max-width: 959px) and (orientation: landscape)',
10161
    TabletLandscape: '(min-width: 960px) and (max-width: 1279px) and (orientation: landscape)',
10162
    WebLandscape: '(min-width: 1280px) and (orientation: landscape)',
10163
};
10164
 
10165
/**
10166
 * @fileoverview added by tsickle
10167
 * @suppress {checkTypes} checked by tsc
10168
 */
10169
 
10170
/**
10171
 * @fileoverview added by tsickle
10172
 * @suppress {checkTypes} checked by tsc
10173
 */
10174
 
10175
 
10176
//# sourceMappingURL=layout.es5.js.map
10177
 
10178
 
10179
/***/ }),
10180
 
10181
/***/ "./node_modules/@angular/cdk/esm5/observers.es5.js":
10182
/*!*********************************************************!*\
10183
  !*** ./node_modules/@angular/cdk/esm5/observers.es5.js ***!
10184
  \*********************************************************/
10185
/*! exports provided: MutationObserverFactory, ContentObserver, CdkObserveContent, ObserversModule */
10186
/***/ (function(module, __webpack_exports__, __webpack_require__) {
10187
 
10188
"use strict";
10189
__webpack_require__.r(__webpack_exports__);
10190
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MutationObserverFactory", function() { return MutationObserverFactory; });
10191
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContentObserver", function() { return ContentObserver; });
10192
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkObserveContent", function() { return CdkObserveContent; });
10193
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserversModule", function() { return ObserversModule; });
10194
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
10195
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
10196
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
10197
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
10198
/**
10199
 * @license
10200
 * Copyright Google LLC All Rights Reserved.
10201
 *
10202
 * Use of this source code is governed by an MIT-style license that can be
10203
 * found in the LICENSE file at https://angular.io/license
10204
 */
10205
 
10206
 
10207
 
10208
 
10209
 
10210
/**
10211
 * @fileoverview added by tsickle
10212
 * @suppress {checkTypes} checked by tsc
10213
 */
10214
/**
10215
 * Factory that creates a new MutationObserver and allows us to stub it out in unit tests.
10216
 * \@docs-private
10217
 */
10218
var MutationObserverFactory = /** @class */ (function () {
10219
    function MutationObserverFactory() {
10220
    }
10221
    /**
10222
     * @param {?} callback
10223
     * @return {?}
10224
     */
10225
    MutationObserverFactory.prototype.create = /**
10226
     * @param {?} callback
10227
     * @return {?}
10228
     */
10229
    function (callback) {
10230
        return typeof MutationObserver === 'undefined' ? null : new MutationObserver(callback);
10231
    };
10232
    MutationObserverFactory.decorators = [
10233
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"], args: [{ providedIn: 'root' },] },
10234
    ];
10235
    /** @nocollapse */ MutationObserverFactory.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["defineInjectable"])({ factory: function MutationObserverFactory_Factory() { return new MutationObserverFactory(); }, token: MutationObserverFactory, providedIn: "root" });
10236
    return MutationObserverFactory;
10237
}());
10238
/**
10239
 * An injectable service that allows watching elements for changes to their content.
10240
 */
10241
var ContentObserver = /** @class */ (function () {
10242
    function ContentObserver(_mutationObserverFactory) {
10243
        this._mutationObserverFactory = _mutationObserverFactory;
10244
        /**
10245
         * Keeps track of the existing MutationObservers so they can be reused.
10246
         */
10247
        this._observedElements = new Map();
10248
    }
10249
    /**
10250
     * @return {?}
10251
     */
10252
    ContentObserver.prototype.ngOnDestroy = /**
10253
     * @return {?}
10254
     */
10255
    function () {
10256
        var _this = this;
10257
        this._observedElements.forEach(function (_, element) { return _this._cleanupObserver(element); });
10258
    };
10259
    /**
10260
     * Observe content changes on an element.
10261
     * @param element The element to observe for content changes.
10262
     */
10263
    /**
10264
     * Observe content changes on an element.
10265
     * @param {?} element The element to observe for content changes.
10266
     * @return {?}
10267
     */
10268
    ContentObserver.prototype.observe = /**
10269
     * Observe content changes on an element.
10270
     * @param {?} element The element to observe for content changes.
10271
     * @return {?}
10272
     */
10273
    function (element) {
10274
        var _this = this;
10275
        return rxjs__WEBPACK_IMPORTED_MODULE_2__["Observable"].create(function (observer) {
10276
            var /** @type {?} */ stream = _this._observeElement(element);
10277
            var /** @type {?} */ subscription = stream.subscribe(observer);
10278
            return function () {
10279
                subscription.unsubscribe();
10280
                _this._unobserveElement(element);
10281
            };
10282
        });
10283
    };
10284
    /**
10285
     * Observes the given element by using the existing MutationObserver if available, or creating a
10286
     * new one if not.
10287
     * @param {?} element
10288
     * @return {?}
10289
     */
10290
    ContentObserver.prototype._observeElement = /**
10291
     * Observes the given element by using the existing MutationObserver if available, or creating a
10292
     * new one if not.
10293
     * @param {?} element
10294
     * @return {?}
10295
     */
10296
    function (element) {
10297
        if (!this._observedElements.has(element)) {
10298
            var /** @type {?} */ stream_1 = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
10299
            var /** @type {?} */ observer = this._mutationObserverFactory.create(function (mutations) { return stream_1.next(mutations); });
10300
            if (observer) {
10301
                observer.observe(element, {
10302
                    characterData: true,
10303
                    childList: true,
10304
                    subtree: true
10305
                });
10306
            }
10307
            this._observedElements.set(element, { observer: observer, stream: stream_1, count: 1 });
10308
        }
10309
        else {
10310
            /** @type {?} */ ((this._observedElements.get(element))).count++;
10311
        }
10312
        return /** @type {?} */ ((this._observedElements.get(element))).stream;
10313
    };
10314
    /**
10315
     * Un-observes the given element and cleans up the underlying MutationObserver if nobody else is
10316
     * observing this element.
10317
     * @param {?} element
10318
     * @return {?}
10319
     */
10320
    ContentObserver.prototype._unobserveElement = /**
10321
     * Un-observes the given element and cleans up the underlying MutationObserver if nobody else is
10322
     * observing this element.
10323
     * @param {?} element
10324
     * @return {?}
10325
     */
10326
    function (element) {
10327
        if (this._observedElements.has(element)) {
10328
            /** @type {?} */ ((this._observedElements.get(element))).count--;
10329
            if (!/** @type {?} */ ((this._observedElements.get(element))).count) {
10330
                this._cleanupObserver(element);
10331
            }
10332
        }
10333
    };
10334
    /**
10335
     * Clean up the underlying MutationObserver for the specified element.
10336
     * @param {?} element
10337
     * @return {?}
10338
     */
10339
    ContentObserver.prototype._cleanupObserver = /**
10340
     * Clean up the underlying MutationObserver for the specified element.
10341
     * @param {?} element
10342
     * @return {?}
10343
     */
10344
    function (element) {
10345
        if (this._observedElements.has(element)) {
10346
            var _a = /** @type {?} */ ((this._observedElements.get(element))), observer = _a.observer, stream = _a.stream;
10347
            if (observer) {
10348
                observer.disconnect();
10349
            }
10350
            stream.complete();
10351
            this._observedElements.delete(element);
10352
        }
10353
    };
10354
    ContentObserver.decorators = [
10355
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"], args: [{ providedIn: 'root' },] },
10356
    ];
10357
    /** @nocollapse */
10358
    ContentObserver.ctorParameters = function () { return [
10359
        { type: MutationObserverFactory, },
10360
    ]; };
10361
    /** @nocollapse */ ContentObserver.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["defineInjectable"])({ factory: function ContentObserver_Factory() { return new ContentObserver(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(MutationObserverFactory)); }, token: ContentObserver, providedIn: "root" });
10362
    return ContentObserver;
10363
}());
10364
/**
10365
 * Directive that triggers a callback whenever the content of
10366
 * its associated element has changed.
10367
 */
10368
var CdkObserveContent = /** @class */ (function () {
10369
    function CdkObserveContent(_contentObserver, _elementRef, _ngZone) {
10370
        this._contentObserver = _contentObserver;
10371
        this._elementRef = _elementRef;
10372
        this._ngZone = _ngZone;
10373
        /**
10374
         * Event emitted for each change in the element's content.
10375
         */
10376
        this.event = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
10377
        this._disabled = false;
10378
        this._currentSubscription = null;
10379
    }
10380
    Object.defineProperty(CdkObserveContent.prototype, "disabled", {
10381
        get: /**
10382
         * Whether observing content is disabled. This option can be used
10383
         * to disconnect the underlying MutationObserver until it is needed.
10384
         * @return {?}
10385
         */
10386
        function () { return this._disabled; },
10387
        set: /**
10388
         * @param {?} value
10389
         * @return {?}
10390
         */
10391
        function (value) {
10392
            this._disabled = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_0__["coerceBooleanProperty"])(value);
10393
            if (this._disabled) {
10394
                this._unsubscribe();
10395
            }
10396
            else {
10397
                this._subscribe();
10398
            }
10399
        },
10400
        enumerable: true,
10401
        configurable: true
10402
    });
10403
    Object.defineProperty(CdkObserveContent.prototype, "debounce", {
10404
        get: /**
10405
         * Debounce interval for emitting the changes.
10406
         * @return {?}
10407
         */
10408
        function () { return this._debounce; },
10409
        set: /**
10410
         * @param {?} value
10411
         * @return {?}
10412
         */
10413
        function (value) {
10414
            this._debounce = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_0__["coerceNumberProperty"])(value);
10415
            this._subscribe();
10416
        },
10417
        enumerable: true,
10418
        configurable: true
10419
    });
10420
    /**
10421
     * @return {?}
10422
     */
10423
    CdkObserveContent.prototype.ngAfterContentInit = /**
10424
     * @return {?}
10425
     */
10426
    function () {
10427
        if (!this._currentSubscription && !this.disabled) {
10428
            this._subscribe();
10429
        }
10430
    };
10431
    /**
10432
     * @return {?}
10433
     */
10434
    CdkObserveContent.prototype.ngOnDestroy = /**
10435
     * @return {?}
10436
     */
10437
    function () {
10438
        this._unsubscribe();
10439
    };
10440
    /**
10441
     * @return {?}
10442
     */
10443
    CdkObserveContent.prototype._subscribe = /**
10444
     * @return {?}
10445
     */
10446
    function () {
10447
        var _this = this;
10448
        this._unsubscribe();
10449
        var /** @type {?} */ stream = this._contentObserver.observe(this._elementRef.nativeElement);
10450
        // TODO(mmalerba): We shouldn't be emitting on this @Output() outside the zone.
10451
        // Consider brining it back inside the zone next time we're making breaking changes.
10452
        // Bringing it back inside can cause things like infinite change detection loops and changed
10453
        // after checked errors if people's code isn't handling it properly.
10454
        this._ngZone.runOutsideAngular(function () {
10455
            _this._currentSubscription =
10456
                (_this.debounce ? stream.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["debounceTime"])(_this.debounce)) : stream).subscribe(_this.event);
10457
        });
10458
    };
10459
    /**
10460
     * @return {?}
10461
     */
10462
    CdkObserveContent.prototype._unsubscribe = /**
10463
     * @return {?}
10464
     */
10465
    function () {
10466
        if (this._currentSubscription) {
10467
            this._currentSubscription.unsubscribe();
10468
        }
10469
    };
10470
    CdkObserveContent.decorators = [
10471
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
10472
                    selector: '[cdkObserveContent]',
10473
                    exportAs: 'cdkObserveContent',
10474
                },] },
10475
    ];
10476
    /** @nocollapse */
10477
    CdkObserveContent.ctorParameters = function () { return [
10478
        { type: ContentObserver, },
10479
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
10480
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"], },
10481
    ]; };
10482
    CdkObserveContent.propDecorators = {
10483
        "event": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"], args: ['cdkObserveContent',] },],
10484
        "disabled": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['cdkObserveContentDisabled',] },],
10485
        "debounce": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
10486
    };
10487
    return CdkObserveContent;
10488
}());
10489
var ObserversModule = /** @class */ (function () {
10490
    function ObserversModule() {
10491
    }
10492
    ObserversModule.decorators = [
10493
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{
10494
                    exports: [CdkObserveContent],
10495
                    declarations: [CdkObserveContent],
10496
                    providers: [MutationObserverFactory]
10497
                },] },
10498
    ];
10499
    return ObserversModule;
10500
}());
10501
 
10502
/**
10503
 * @fileoverview added by tsickle
10504
 * @suppress {checkTypes} checked by tsc
10505
 */
10506
 
10507
/**
10508
 * @fileoverview added by tsickle
10509
 * @suppress {checkTypes} checked by tsc
10510
 */
10511
 
10512
 
10513
//# sourceMappingURL=observers.es5.js.map
10514
 
10515
 
10516
/***/ }),
10517
 
10518
/***/ "./node_modules/@angular/cdk/esm5/overlay.es5.js":
10519
/*!*******************************************************!*\
10520
  !*** ./node_modules/@angular/cdk/esm5/overlay.es5.js ***!
10521
  \*******************************************************/
10522
/*! exports provided: ViewportRuler, VIEWPORT_RULER_PROVIDER, CdkScrollable, ScrollDispatcher, Overlay, OverlayContainer, CdkOverlayOrigin, CdkConnectedOverlay, FullscreenOverlayContainer, OverlayRef, OverlayKeyboardDispatcher, OverlayPositionBuilder, GlobalPositionStrategy, ConnectedPositionStrategy, FlexibleConnectedPositionStrategy, OverlayConfig, ConnectionPositionPair, ScrollingVisibility, ConnectedOverlayPositionChange, validateVerticalPosition, validateHorizontalPosition, ScrollStrategyOptions, RepositionScrollStrategy, CloseScrollStrategy, NoopScrollStrategy, BlockScrollStrategy, OverlayModule, OVERLAY_PROVIDERS, ɵg, ɵf, ɵb, ɵa, ɵc, ɵe, ɵd */
10523
/***/ (function(module, __webpack_exports__, __webpack_require__) {
10524
 
10525
"use strict";
10526
__webpack_require__.r(__webpack_exports__);
10527
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Overlay", function() { return Overlay; });
10528
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OverlayContainer", function() { return OverlayContainer; });
10529
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkOverlayOrigin", function() { return CdkOverlayOrigin; });
10530
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkConnectedOverlay", function() { return CdkConnectedOverlay; });
10531
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FullscreenOverlayContainer", function() { return FullscreenOverlayContainer; });
10532
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OverlayRef", function() { return OverlayRef; });
10533
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OverlayKeyboardDispatcher", function() { return OverlayKeyboardDispatcher; });
10534
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OverlayPositionBuilder", function() { return OverlayPositionBuilder; });
10535
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GlobalPositionStrategy", function() { return GlobalPositionStrategy; });
10536
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectedPositionStrategy", function() { return ConnectedPositionStrategy; });
10537
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FlexibleConnectedPositionStrategy", function() { return FlexibleConnectedPositionStrategy; });
10538
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OverlayConfig", function() { return OverlayConfig; });
10539
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectionPositionPair", function() { return ConnectionPositionPair; });
10540
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollingVisibility", function() { return ScrollingVisibility; });
10541
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectedOverlayPositionChange", function() { return ConnectedOverlayPositionChange; });
10542
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validateVerticalPosition", function() { return validateVerticalPosition; });
10543
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validateHorizontalPosition", function() { return validateHorizontalPosition; });
10544
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollStrategyOptions", function() { return ScrollStrategyOptions; });
10545
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RepositionScrollStrategy", function() { return RepositionScrollStrategy; });
10546
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CloseScrollStrategy", function() { return CloseScrollStrategy; });
10547
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NoopScrollStrategy", function() { return NoopScrollStrategy; });
10548
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BlockScrollStrategy", function() { return BlockScrollStrategy; });
10549
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OverlayModule", function() { return OverlayModule; });
10550
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OVERLAY_PROVIDERS", function() { return OVERLAY_PROVIDERS; });
10551
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵg", function() { return OVERLAY_KEYBOARD_DISPATCHER_PROVIDER; });
10552
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵf", function() { return OVERLAY_KEYBOARD_DISPATCHER_PROVIDER_FACTORY; });
10553
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵb", function() { return OVERLAY_CONTAINER_PROVIDER; });
10554
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵa", function() { return OVERLAY_CONTAINER_PROVIDER_FACTORY; });
10555
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵc", function() { return CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY; });
10556
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵe", function() { return CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER; });
10557
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵd", function() { return CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY; });
10558
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
10559
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
10560
/* harmony import */ var _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/cdk/scrolling */ "./node_modules/@angular/cdk/esm5/scrolling.es5.js");
10561
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ViewportRuler", function() { return _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_2__["ViewportRuler"]; });
10562
 
10563
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VIEWPORT_RULER_PROVIDER", function() { return _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_2__["VIEWPORT_RULER_PROVIDER"]; });
10564
 
10565
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CdkScrollable", function() { return _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_2__["CdkScrollable"]; });
10566
 
10567
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ScrollDispatcher", function() { return _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_2__["ScrollDispatcher"]; });
10568
 
10569
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
10570
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
10571
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
10572
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
10573
/* harmony import */ var _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/cdk/platform */ "./node_modules/@angular/cdk/esm5/platform.es5.js");
10574
/* harmony import */ var _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/cdk/bidi */ "./node_modules/@angular/cdk/esm5/bidi.es5.js");
10575
/* harmony import */ var _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/cdk/portal */ "./node_modules/@angular/cdk/esm5/portal.es5.js");
10576
/* harmony import */ var _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/cdk/keycodes */ "./node_modules/@angular/cdk/esm5/keycodes.es5.js");
10577
/**
10578
 * @license
10579
 * Copyright Google LLC All Rights Reserved.
10580
 *
10581
 * Use of this source code is governed by an MIT-style license that can be
10582
 * found in the LICENSE file at https://angular.io/license
10583
 */
10584
 
10585
 
10586
 
10587
 
10588
 
10589
 
10590
 
10591
 
10592
 
10593
 
10594
 
10595
 
10596
 
10597
/**
10598
 * @fileoverview added by tsickle
10599
 * @suppress {checkTypes} checked by tsc
10600
 */
10601
 
10602
/**
10603
 * Scroll strategy that doesn't do anything.
10604
 */
10605
var  /**
10606
 * Scroll strategy that doesn't do anything.
10607
 */
10608
NoopScrollStrategy = /** @class */ (function () {
10609
    function NoopScrollStrategy() {
10610
    }
10611
    /** Does nothing, as this scroll strategy is a no-op. */
10612
    /**
10613
     * Does nothing, as this scroll strategy is a no-op.
10614
     * @return {?}
10615
     */
10616
    NoopScrollStrategy.prototype.enable = /**
10617
     * Does nothing, as this scroll strategy is a no-op.
10618
     * @return {?}
10619
     */
10620
    function () { };
10621
    /** Does nothing, as this scroll strategy is a no-op. */
10622
    /**
10623
     * Does nothing, as this scroll strategy is a no-op.
10624
     * @return {?}
10625
     */
10626
    NoopScrollStrategy.prototype.disable = /**
10627
     * Does nothing, as this scroll strategy is a no-op.
10628
     * @return {?}
10629
     */
10630
    function () { };
10631
    /** Does nothing, as this scroll strategy is a no-op. */
10632
    /**
10633
     * Does nothing, as this scroll strategy is a no-op.
10634
     * @return {?}
10635
     */
10636
    NoopScrollStrategy.prototype.attach = /**
10637
     * Does nothing, as this scroll strategy is a no-op.
10638
     * @return {?}
10639
     */
10640
    function () { };
10641
    return NoopScrollStrategy;
10642
}());
10643
 
10644
/**
10645
 * @fileoverview added by tsickle
10646
 * @suppress {checkTypes} checked by tsc
10647
 */
10648
/**
10649
 * Initial configuration used when creating an overlay.
10650
 */
10651
var  /**
10652
 * Initial configuration used when creating an overlay.
10653
 */
10654
OverlayConfig = /** @class */ (function () {
10655
    function OverlayConfig(config) {
10656
        var _this = this;
10657
        /**
10658
         * Strategy to be used when handling scroll events while the overlay is open.
10659
         */
10660
        this.scrollStrategy = new NoopScrollStrategy();
10661
        /**
10662
         * Custom class to add to the overlay pane.
10663
         */
10664
        this.panelClass = '';
10665
        /**
10666
         * Whether the overlay has a backdrop.
10667
         */
10668
        this.hasBackdrop = false;
10669
        /**
10670
         * Custom class to add to the backdrop
10671
         */
10672
        this.backdropClass = 'cdk-overlay-dark-backdrop';
10673
        if (config) {
10674
            Object.keys(config)
10675
                .filter(function (key) { return typeof config[key] !== 'undefined'; })
10676
                .forEach(function (key) { return _this[key] = config[key]; });
10677
        }
10678
    }
10679
    return OverlayConfig;
10680
}());
10681
 
10682
/**
10683
 * @fileoverview added by tsickle
10684
 * @suppress {checkTypes} checked by tsc
10685
 */
10686
/**
10687
 * The points of the origin element and the overlay element to connect.
10688
 */
10689
var  /**
10690
 * The points of the origin element and the overlay element to connect.
10691
 */
10692
ConnectionPositionPair = /** @class */ (function () {
10693
    function ConnectionPositionPair(origin, overlay, offsetX, offsetY) {
10694
        this.offsetX = offsetX;
10695
        this.offsetY = offsetY;
10696
        this.originX = origin.originX;
10697
        this.originY = origin.originY;
10698
        this.overlayX = overlay.overlayX;
10699
        this.overlayY = overlay.overlayY;
10700
    }
10701
    return ConnectionPositionPair;
10702
}());
10703
/**
10704
 * Set of properties regarding the position of the origin and overlay relative to the viewport
10705
 * with respect to the containing Scrollable elements.
10706
 *
10707
 * The overlay and origin are clipped if any part of their bounding client rectangle exceeds the
10708
 * bounds of any one of the strategy's Scrollable's bounding client rectangle.
10709
 *
10710
 * The overlay and origin are outside view if there is no overlap between their bounding client
10711
 * rectangle and any one of the strategy's Scrollable's bounding client rectangle.
10712
 *
10713
 *       -----------                    -----------
10714
 *       | outside |                    | clipped |
10715
 *       |  view   |              --------------------------
10716
 *       |         |              |     |         |        |
10717
 *       ----------               |     -----------        |
10718
 *  --------------------------    |                        |
10719
 *  |                        |    |      Scrollable        |
10720
 *  |                        |    |                        |
10721
 *  |                        |     --------------------------
10722
 *  |      Scrollable        |
10723
 *  |                        |
10724
 *  --------------------------
10725
 *
10726
 *  \@docs-private
10727
 */
10728
var  /**
10729
 * Set of properties regarding the position of the origin and overlay relative to the viewport
10730
 * with respect to the containing Scrollable elements.
10731
 *
10732
 * The overlay and origin are clipped if any part of their bounding client rectangle exceeds the
10733
 * bounds of any one of the strategy's Scrollable's bounding client rectangle.
10734
 *
10735
 * The overlay and origin are outside view if there is no overlap between their bounding client
10736
 * rectangle and any one of the strategy's Scrollable's bounding client rectangle.
10737
 *
10738
 *       -----------                    -----------
10739
 *       | outside |                    | clipped |
10740
 *       |  view   |              --------------------------
10741
 *       |         |              |     |         |        |
10742
 *       ----------               |     -----------        |
10743
 *  --------------------------    |                        |
10744
 *  |                        |    |      Scrollable        |
10745
 *  |                        |    |                        |
10746
 *  |                        |     --------------------------
10747
 *  |      Scrollable        |
10748
 *  |                        |
10749
 *  --------------------------
10750
 *
10751
 *  \@docs-private
10752
 */
10753
ScrollingVisibility = /** @class */ (function () {
10754
    function ScrollingVisibility() {
10755
    }
10756
    return ScrollingVisibility;
10757
}());
10758
/**
10759
 * The change event emitted by the strategy when a fallback position is used.
10760
 */
10761
var ConnectedOverlayPositionChange = /** @class */ (function () {
10762
    function ConnectedOverlayPositionChange(connectionPair, /** @docs-private */
10763
    scrollableViewProperties) {
10764
        this.connectionPair = connectionPair;
10765
        this.scrollableViewProperties = scrollableViewProperties;
10766
    }
10767
    /** @nocollapse */
10768
    ConnectedOverlayPositionChange.ctorParameters = function () { return [
10769
        { type: ConnectionPositionPair, },
10770
        { type: ScrollingVisibility, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
10771
    ]; };
10772
    return ConnectedOverlayPositionChange;
10773
}());
10774
/**
10775
 * Validates whether a vertical position property matches the expected values.
10776
 * \@docs-private
10777
 * @param {?} property Name of the property being validated.
10778
 * @param {?} value Value of the property being validated.
10779
 * @return {?}
10780
 */
10781
function validateVerticalPosition(property, value) {
10782
    if (value !== 'top' && value !== 'bottom' && value !== 'center') {
10783
        throw Error("ConnectedPosition: Invalid " + property + " \"" + value + "\". " +
10784
            "Expected \"top\", \"bottom\" or \"center\".");
10785
    }
10786
}
10787
/**
10788
 * Validates whether a horizontal position property matches the expected values.
10789
 * \@docs-private
10790
 * @param {?} property Name of the property being validated.
10791
 * @param {?} value Value of the property being validated.
10792
 * @return {?}
10793
 */
10794
function validateHorizontalPosition(property, value) {
10795
    if (value !== 'start' && value !== 'end' && value !== 'center') {
10796
        throw Error("ConnectedPosition: Invalid " + property + " \"" + value + "\". " +
10797
            "Expected \"start\", \"end\" or \"center\".");
10798
    }
10799
}
10800
 
10801
/**
10802
 * @fileoverview added by tsickle
10803
 * @suppress {checkTypes} checked by tsc
10804
 */
10805
/**
10806
 * Strategy that will prevent the user from scrolling while the overlay is visible.
10807
 */
10808
var  /**
10809
 * Strategy that will prevent the user from scrolling while the overlay is visible.
10810
 */
10811
BlockScrollStrategy = /** @class */ (function () {
10812
    function BlockScrollStrategy(_viewportRuler, document) {
10813
        this._viewportRuler = _viewportRuler;
10814
        this._previousHTMLStyles = { top: '', left: '' };
10815
        this._isEnabled = false;
10816
        this._document = document;
10817
    }
10818
    /** Attaches this scroll strategy to an overlay. */
10819
    /**
10820
     * Attaches this scroll strategy to an overlay.
10821
     * @return {?}
10822
     */
10823
    BlockScrollStrategy.prototype.attach = /**
10824
     * Attaches this scroll strategy to an overlay.
10825
     * @return {?}
10826
     */
10827
    function () { };
10828
    /** Blocks page-level scroll while the attached overlay is open. */
10829
    /**
10830
     * Blocks page-level scroll while the attached overlay is open.
10831
     * @return {?}
10832
     */
10833
    BlockScrollStrategy.prototype.enable = /**
10834
     * Blocks page-level scroll while the attached overlay is open.
10835
     * @return {?}
10836
     */
10837
    function () {
10838
        if (this._canBeEnabled()) {
10839
            var /** @type {?} */ root = this._document.documentElement;
10840
            this._previousScrollPosition = this._viewportRuler.getViewportScrollPosition();
10841
            // Cache the previous inline styles in case the user had set them.
10842
            this._previousHTMLStyles.left = root.style.left || '';
10843
            this._previousHTMLStyles.top = root.style.top || '';
10844
            // Note: we're using the `html` node, instead of the `body`, because the `body` may
10845
            // have the user agent margin, whereas the `html` is guaranteed not to have one.
10846
            root.style.left = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceCssPixelValue"])(-this._previousScrollPosition.left);
10847
            root.style.top = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceCssPixelValue"])(-this._previousScrollPosition.top);
10848
            root.classList.add('cdk-global-scrollblock');
10849
            this._isEnabled = true;
10850
        }
10851
    };
10852
    /** Unblocks page-level scroll while the attached overlay is open. */
10853
    /**
10854
     * Unblocks page-level scroll while the attached overlay is open.
10855
     * @return {?}
10856
     */
10857
    BlockScrollStrategy.prototype.disable = /**
10858
     * Unblocks page-level scroll while the attached overlay is open.
10859
     * @return {?}
10860
     */
10861
    function () {
10862
        if (this._isEnabled) {
10863
            var /** @type {?} */ html = this._document.documentElement;
10864
            var /** @type {?} */ body = this._document.body;
10865
            var /** @type {?} */ previousHtmlScrollBehavior = html.style['scrollBehavior'] || '';
10866
            var /** @type {?} */ previousBodyScrollBehavior = body.style['scrollBehavior'] || '';
10867
            this._isEnabled = false;
10868
            html.style.left = this._previousHTMLStyles.left;
10869
            html.style.top = this._previousHTMLStyles.top;
10870
            html.classList.remove('cdk-global-scrollblock');
10871
            // Disable user-defined smooth scrolling temporarily while we restore the scroll position.
10872
            // See https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior
10873
            html.style['scrollBehavior'] = body.style['scrollBehavior'] = 'auto';
10874
            window.scroll(this._previousScrollPosition.left, this._previousScrollPosition.top);
10875
            html.style['scrollBehavior'] = previousHtmlScrollBehavior;
10876
            body.style['scrollBehavior'] = previousBodyScrollBehavior;
10877
        }
10878
    };
10879
    /**
10880
     * @return {?}
10881
     */
10882
    BlockScrollStrategy.prototype._canBeEnabled = /**
10883
     * @return {?}
10884
     */
10885
    function () {
10886
        // Since the scroll strategies can't be singletons, we have to use a global CSS class
10887
        // (`cdk-global-scrollblock`) to make sure that we don't try to disable global
10888
        // scrolling multiple times.
10889
        var /** @type {?} */ html = this._document.documentElement;
10890
        if (html.classList.contains('cdk-global-scrollblock') || this._isEnabled) {
10891
            return false;
10892
        }
10893
        var /** @type {?} */ body = this._document.body;
10894
        var /** @type {?} */ viewport = this._viewportRuler.getViewportSize();
10895
        return body.scrollHeight > viewport.height || body.scrollWidth > viewport.width;
10896
    };
10897
    return BlockScrollStrategy;
10898
}());
10899
 
10900
/**
10901
 * @fileoverview added by tsickle
10902
 * @suppress {checkTypes} checked by tsc
10903
 */
10904
/**
10905
 * Returns an error to be thrown when attempting to attach an already-attached scroll strategy.
10906
 * @return {?}
10907
 */
10908
function getMatScrollStrategyAlreadyAttachedError() {
10909
    return Error("Scroll strategy has already been attached.");
10910
}
10911
 
10912
/**
10913
 * @fileoverview added by tsickle
10914
 * @suppress {checkTypes} checked by tsc
10915
 */
10916
/**
10917
 * Strategy that will close the overlay as soon as the user starts scrolling.
10918
 */
10919
var  /**
10920
 * Strategy that will close the overlay as soon as the user starts scrolling.
10921
 */
10922
CloseScrollStrategy = /** @class */ (function () {
10923
    function CloseScrollStrategy(_scrollDispatcher, _ngZone, _viewportRuler, _config) {
10924
        var _this = this;
10925
        this._scrollDispatcher = _scrollDispatcher;
10926
        this._ngZone = _ngZone;
10927
        this._viewportRuler = _viewportRuler;
10928
        this._config = _config;
10929
        this._scrollSubscription = null;
10930
        /**
10931
         * Detaches the overlay ref and disables the scroll strategy.
10932
         */
10933
        this._detach = function () {
10934
            _this.disable();
10935
            if (_this._overlayRef.hasAttached()) {
10936
                _this._ngZone.run(function () { return _this._overlayRef.detach(); });
10937
            }
10938
        };
10939
    }
10940
    /** Attaches this scroll strategy to an overlay. */
10941
    /**
10942
     * Attaches this scroll strategy to an overlay.
10943
     * @param {?} overlayRef
10944
     * @return {?}
10945
     */
10946
    CloseScrollStrategy.prototype.attach = /**
10947
     * Attaches this scroll strategy to an overlay.
10948
     * @param {?} overlayRef
10949
     * @return {?}
10950
     */
10951
    function (overlayRef) {
10952
        if (this._overlayRef) {
10953
            throw getMatScrollStrategyAlreadyAttachedError();
10954
        }
10955
        this._overlayRef = overlayRef;
10956
    };
10957
    /** Enables the closing of the attached overlay on scroll. */
10958
    /**
10959
     * Enables the closing of the attached overlay on scroll.
10960
     * @return {?}
10961
     */
10962
    CloseScrollStrategy.prototype.enable = /**
10963
     * Enables the closing of the attached overlay on scroll.
10964
     * @return {?}
10965
     */
10966
    function () {
10967
        var _this = this;
10968
        if (this._scrollSubscription) {
10969
            return;
10970
        }
10971
        var /** @type {?} */ stream = this._scrollDispatcher.scrolled(0);
10972
        if (this._config && this._config.threshold && this._config.threshold > 1) {
10973
            this._initialScrollPosition = this._viewportRuler.getViewportScrollPosition().top;
10974
            this._scrollSubscription = stream.subscribe(function () {
10975
                var /** @type {?} */ scrollPosition = _this._viewportRuler.getViewportScrollPosition().top;
10976
                if (Math.abs(scrollPosition - _this._initialScrollPosition) > /** @type {?} */ ((/** @type {?} */ ((_this._config)).threshold))) {
10977
                    _this._detach();
10978
                }
10979
                else {
10980
                    _this._overlayRef.updatePosition();
10981
                }
10982
            });
10983
        }
10984
        else {
10985
            this._scrollSubscription = stream.subscribe(this._detach);
10986
        }
10987
    };
10988
    /** Disables the closing the attached overlay on scroll. */
10989
    /**
10990
     * Disables the closing the attached overlay on scroll.
10991
     * @return {?}
10992
     */
10993
    CloseScrollStrategy.prototype.disable = /**
10994
     * Disables the closing the attached overlay on scroll.
10995
     * @return {?}
10996
     */
10997
    function () {
10998
        if (this._scrollSubscription) {
10999
            this._scrollSubscription.unsubscribe();
11000
            this._scrollSubscription = null;
11001
        }
11002
    };
11003
    return CloseScrollStrategy;
11004
}());
11005
 
11006
/**
11007
 * @fileoverview added by tsickle
11008
 * @suppress {checkTypes} checked by tsc
11009
 */
11010
 
11011
// TODO(jelbourn): move this to live with the rest of the scrolling code
11012
// TODO(jelbourn): someday replace this with IntersectionObservers
11013
/**
11014
 * Gets whether an element is scrolled outside of view by any of its parent scrolling containers.
11015
 * \@docs-private
11016
 * @param {?} element Dimensions of the element (from getBoundingClientRect)
11017
 * @param {?} scrollContainers Dimensions of element's scrolling containers (from getBoundingClientRect)
11018
 * @return {?} Whether the element is scrolled out of view
11019
 */
11020
function isElementScrolledOutsideView(element, scrollContainers) {
11021
    return scrollContainers.some(function (containerBounds) {
11022
        var /** @type {?} */ outsideAbove = element.bottom < containerBounds.top;
11023
        var /** @type {?} */ outsideBelow = element.top > containerBounds.bottom;
11024
        var /** @type {?} */ outsideLeft = element.right < containerBounds.left;
11025
        var /** @type {?} */ outsideRight = element.left > containerBounds.right;
11026
        return outsideAbove || outsideBelow || outsideLeft || outsideRight;
11027
    });
11028
}
11029
/**
11030
 * Gets whether an element is clipped by any of its scrolling containers.
11031
 * \@docs-private
11032
 * @param {?} element Dimensions of the element (from getBoundingClientRect)
11033
 * @param {?} scrollContainers Dimensions of element's scrolling containers (from getBoundingClientRect)
11034
 * @return {?} Whether the element is clipped
11035
 */
11036
function isElementClippedByScrolling(element, scrollContainers) {
11037
    return scrollContainers.some(function (scrollContainerRect) {
11038
        var /** @type {?} */ clippedAbove = element.top < scrollContainerRect.top;
11039
        var /** @type {?} */ clippedBelow = element.bottom > scrollContainerRect.bottom;
11040
        var /** @type {?} */ clippedLeft = element.left < scrollContainerRect.left;
11041
        var /** @type {?} */ clippedRight = element.right > scrollContainerRect.right;
11042
        return clippedAbove || clippedBelow || clippedLeft || clippedRight;
11043
    });
11044
}
11045
 
11046
/**
11047
 * @fileoverview added by tsickle
11048
 * @suppress {checkTypes} checked by tsc
11049
 */
11050
/**
11051
 * Strategy that will update the element position as the user is scrolling.
11052
 */
11053
var  /**
11054
 * Strategy that will update the element position as the user is scrolling.
11055
 */
11056
RepositionScrollStrategy = /** @class */ (function () {
11057
    function RepositionScrollStrategy(_scrollDispatcher, _viewportRuler, _ngZone, _config) {
11058
        this._scrollDispatcher = _scrollDispatcher;
11059
        this._viewportRuler = _viewportRuler;
11060
        this._ngZone = _ngZone;
11061
        this._config = _config;
11062
        this._scrollSubscription = null;
11063
    }
11064
    /** Attaches this scroll strategy to an overlay. */
11065
    /**
11066
     * Attaches this scroll strategy to an overlay.
11067
     * @param {?} overlayRef
11068
     * @return {?}
11069
     */
11070
    RepositionScrollStrategy.prototype.attach = /**
11071
     * Attaches this scroll strategy to an overlay.
11072
     * @param {?} overlayRef
11073
     * @return {?}
11074
     */
11075
    function (overlayRef) {
11076
        if (this._overlayRef) {
11077
            throw getMatScrollStrategyAlreadyAttachedError();
11078
        }
11079
        this._overlayRef = overlayRef;
11080
    };
11081
    /** Enables repositioning of the attached overlay on scroll. */
11082
    /**
11083
     * Enables repositioning of the attached overlay on scroll.
11084
     * @return {?}
11085
     */
11086
    RepositionScrollStrategy.prototype.enable = /**
11087
     * Enables repositioning of the attached overlay on scroll.
11088
     * @return {?}
11089
     */
11090
    function () {
11091
        var _this = this;
11092
        if (!this._scrollSubscription) {
11093
            var /** @type {?} */ throttle = this._config ? this._config.scrollThrottle : 0;
11094
            this._scrollSubscription = this._scrollDispatcher.scrolled(throttle).subscribe(function () {
11095
                _this._overlayRef.updatePosition();
11096
                // TODO(crisbeto): make `close` on by default once all components can handle it.
11097
                if (_this._config && _this._config.autoClose) {
11098
                    var /** @type {?} */ overlayRect = _this._overlayRef.overlayElement.getBoundingClientRect();
11099
                    var _a = _this._viewportRuler.getViewportSize(), width = _a.width, height = _a.height;
11100
                    // TODO(crisbeto): include all ancestor scroll containers here once
11101
                    // we have a way of exposing the trigger element to the scroll strategy.
11102
                    var /** @type {?} */ parentRects = [{ width: width, height: height, bottom: height, right: width, top: 0, left: 0 }];
11103
                    if (isElementScrolledOutsideView(overlayRect, parentRects)) {
11104
                        _this.disable();
11105
                        _this._ngZone.run(function () { return _this._overlayRef.detach(); });
11106
                    }
11107
                }
11108
            });
11109
        }
11110
    };
11111
    /** Disables repositioning of the attached overlay on scroll. */
11112
    /**
11113
     * Disables repositioning of the attached overlay on scroll.
11114
     * @return {?}
11115
     */
11116
    RepositionScrollStrategy.prototype.disable = /**
11117
     * Disables repositioning of the attached overlay on scroll.
11118
     * @return {?}
11119
     */
11120
    function () {
11121
        if (this._scrollSubscription) {
11122
            this._scrollSubscription.unsubscribe();
11123
            this._scrollSubscription = null;
11124
        }
11125
    };
11126
    return RepositionScrollStrategy;
11127
}());
11128
 
11129
/**
11130
 * @fileoverview added by tsickle
11131
 * @suppress {checkTypes} checked by tsc
11132
 */
11133
/**
11134
 * Options for how an overlay will handle scrolling.
11135
 *
11136
 * Users can provide a custom value for `ScrollStrategyOptions` to replace the default
11137
 * behaviors. This class primarily acts as a factory for ScrollStrategy instances.
11138
 */
11139
var ScrollStrategyOptions = /** @class */ (function () {
11140
    function ScrollStrategyOptions(_scrollDispatcher, _viewportRuler, _ngZone, document) {
11141
        var _this = this;
11142
        this._scrollDispatcher = _scrollDispatcher;
11143
        this._viewportRuler = _viewportRuler;
11144
        this._ngZone = _ngZone;
11145
        /**
11146
         * Do nothing on scroll.
11147
         */
11148
        this.noop = function () { return new NoopScrollStrategy(); };
11149
        /**
11150
         * Close the overlay as soon as the user scrolls.
11151
         * @param config Configuration to be used inside the scroll strategy.
11152
         */
11153
        this.close = function (config) {
11154
            return new CloseScrollStrategy(_this._scrollDispatcher, _this._ngZone, _this._viewportRuler, config);
11155
        };
11156
        /**
11157
         * Block scrolling.
11158
         */
11159
        this.block = function () { return new BlockScrollStrategy(_this._viewportRuler, _this._document); };
11160
        /**
11161
         * Update the overlay's position on scroll.
11162
         * @param config Configuration to be used inside the scroll strategy.
11163
         * Allows debouncing the reposition calls.
11164
         */
11165
        this.reposition = function (config) {
11166
            return new RepositionScrollStrategy(_this._scrollDispatcher, _this._viewportRuler, _this._ngZone, config);
11167
        };
11168
        this._document = document;
11169
    }
11170
    ScrollStrategyOptions.decorators = [
11171
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"], args: [{ providedIn: 'root' },] },
11172
    ];
11173
    /** @nocollapse */
11174
    ScrollStrategyOptions.ctorParameters = function () { return [
11175
        { type: _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_2__["ScrollDispatcher"], },
11176
        { type: _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_2__["ViewportRuler"], },
11177
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], },
11178
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"],] },] },
11179
    ]; };
11180
    /** @nocollapse */ ScrollStrategyOptions.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["defineInjectable"])({ factory: function ScrollStrategyOptions_Factory() { return new ScrollStrategyOptions(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["inject"])(_angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_2__["ScrollDispatcher"]), Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["inject"])(_angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_2__["ViewportRuler"]), Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"]), Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["inject"])(_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"])); }, token: ScrollStrategyOptions, providedIn: "root" });
11181
    return ScrollStrategyOptions;
11182
}());
11183
 
11184
/**
11185
 * @fileoverview added by tsickle
11186
 * @suppress {checkTypes} checked by tsc
11187
 */
11188
 
11189
/**
11190
 * @fileoverview added by tsickle
11191
 * @suppress {checkTypes} checked by tsc
11192
 */
11193
/**
11194
 * Service for dispatching keyboard events that land on the body to appropriate overlay ref,
11195
 * if any. It maintains a list of attached overlays to determine best suited overlay based
11196
 * on event target and order of overlay opens.
11197
 */
11198
var OverlayKeyboardDispatcher = /** @class */ (function () {
11199
    function OverlayKeyboardDispatcher(document) {
11200
        var _this = this;
11201
        /**
11202
         * Currently attached overlays in the order they were attached.
11203
         */
11204
        this._attachedOverlays = [];
11205
        /**
11206
         * Keyboard event listener that will be attached to the body.
11207
         */
11208
        this._keydownListener = function (event) {
11209
            var /** @type {?} */ overlays = _this._attachedOverlays;
11210
            for (var /** @type {?} */ i = overlays.length - 1; i > -1; i--) {
11211
                // Dispatch the keydown event to the top overlay which has subscribers to its keydown events.
11212
                // We want to target the most recent overlay, rather than trying to match where the event came
11213
                // from, because some components might open an overlay, but keep focus on a trigger element
11214
                // (e.g. for select and autocomplete). We skip overlays without keydown event subscriptions,
11215
                // because we don't want overlays that don't handle keyboard events to block the ones below
11216
                // them that do.
11217
                if (overlays[i]._keydownEventSubscriptions > 0) {
11218
                    overlays[i]._keydownEvents.next(event);
11219
                    break;
11220
                }
11221
            }
11222
        };
11223
        this._document = document;
11224
    }
11225
    /**
11226
     * @return {?}
11227
     */
11228
    OverlayKeyboardDispatcher.prototype.ngOnDestroy = /**
11229
     * @return {?}
11230
     */
11231
    function () {
11232
        this._detach();
11233
    };
11234
    /** Add a new overlay to the list of attached overlay refs. */
11235
    /**
11236
     * Add a new overlay to the list of attached overlay refs.
11237
     * @param {?} overlayRef
11238
     * @return {?}
11239
     */
11240
    OverlayKeyboardDispatcher.prototype.add = /**
11241
     * Add a new overlay to the list of attached overlay refs.
11242
     * @param {?} overlayRef
11243
     * @return {?}
11244
     */
11245
    function (overlayRef) {
11246
        // Ensure that we don't get the same overlay multiple times.
11247
        this.remove(overlayRef);
11248
        // Lazily start dispatcher once first overlay is added
11249
        if (!this._isAttached) {
11250
            this._document.body.addEventListener('keydown', this._keydownListener, true);
11251
            this._isAttached = true;
11252
        }
11253
        this._attachedOverlays.push(overlayRef);
11254
    };
11255
    /** Remove an overlay from the list of attached overlay refs. */
11256
    /**
11257
     * Remove an overlay from the list of attached overlay refs.
11258
     * @param {?} overlayRef
11259
     * @return {?}
11260
     */
11261
    OverlayKeyboardDispatcher.prototype.remove = /**
11262
     * Remove an overlay from the list of attached overlay refs.
11263
     * @param {?} overlayRef
11264
     * @return {?}
11265
     */
11266
    function (overlayRef) {
11267
        var /** @type {?} */ index = this._attachedOverlays.indexOf(overlayRef);
11268
        if (index > -1) {
11269
            this._attachedOverlays.splice(index, 1);
11270
        }
11271
        // Remove the global listener once there are no more overlays.
11272
        if (this._attachedOverlays.length === 0) {
11273
            this._detach();
11274
        }
11275
    };
11276
    /**
11277
     * Detaches the global keyboard event listener.
11278
     * @return {?}
11279
     */
11280
    OverlayKeyboardDispatcher.prototype._detach = /**
11281
     * Detaches the global keyboard event listener.
11282
     * @return {?}
11283
     */
11284
    function () {
11285
        if (this._isAttached) {
11286
            this._document.body.removeEventListener('keydown', this._keydownListener, true);
11287
            this._isAttached = false;
11288
        }
11289
    };
11290
    OverlayKeyboardDispatcher.decorators = [
11291
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"], args: [{ providedIn: 'root' },] },
11292
    ];
11293
    /** @nocollapse */
11294
    OverlayKeyboardDispatcher.ctorParameters = function () { return [
11295
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"],] },] },
11296
    ]; };
11297
    /** @nocollapse */ OverlayKeyboardDispatcher.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["defineInjectable"])({ factory: function OverlayKeyboardDispatcher_Factory() { return new OverlayKeyboardDispatcher(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["inject"])(_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"])); }, token: OverlayKeyboardDispatcher, providedIn: "root" });
11298
    return OverlayKeyboardDispatcher;
11299
}());
11300
/**
11301
 * \@docs-private \@deprecated \@breaking-change 7.0.0
11302
 * @param {?} dispatcher
11303
 * @param {?} _document
11304
 * @return {?}
11305
 */
11306
function OVERLAY_KEYBOARD_DISPATCHER_PROVIDER_FACTORY(dispatcher, _document) {
11307
    return dispatcher || new OverlayKeyboardDispatcher(_document);
11308
}
11309
/**
11310
 * \@docs-private \@deprecated \@breaking-change 7.0.0
11311
 */
11312
var /** @type {?} */ OVERLAY_KEYBOARD_DISPATCHER_PROVIDER = {
11313
    // If there is already an OverlayKeyboardDispatcher available, use that.
11314
    // Otherwise, provide a new one.
11315
    provide: OverlayKeyboardDispatcher,
11316
    deps: [
11317
        [new _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"](), new _angular_core__WEBPACK_IMPORTED_MODULE_0__["SkipSelf"](), OverlayKeyboardDispatcher],
11318
        /** @type {?} */ (
11319
        // Coerce to `InjectionToken` so that the `deps` match the "shape"
11320
        // of the type expected by Angular
11321
        _angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"])
11322
    ],
11323
    useFactory: OVERLAY_KEYBOARD_DISPATCHER_PROVIDER_FACTORY
11324
};
11325
 
11326
/**
11327
 * @fileoverview added by tsickle
11328
 * @suppress {checkTypes} checked by tsc
11329
 */
11330
/**
11331
 * Container inside which all overlays will render.
11332
 */
11333
var OverlayContainer = /** @class */ (function () {
11334
    function OverlayContainer(_document) {
11335
        this._document = _document;
11336
    }
11337
    /**
11338
     * @return {?}
11339
     */
11340
    OverlayContainer.prototype.ngOnDestroy = /**
11341
     * @return {?}
11342
     */
11343
    function () {
11344
        if (this._containerElement && this._containerElement.parentNode) {
11345
            this._containerElement.parentNode.removeChild(this._containerElement);
11346
        }
11347
    };
11348
    /**
11349
     * This method returns the overlay container element. It will lazily
11350
     * create the element the first time  it is called to facilitate using
11351
     * the container in non-browser environments.
11352
     * @returns the container element
11353
     */
11354
    /**
11355
     * This method returns the overlay container element. It will lazily
11356
     * create the element the first time  it is called to facilitate using
11357
     * the container in non-browser environments.
11358
     * @return {?} the container element
11359
     */
11360
    OverlayContainer.prototype.getContainerElement = /**
11361
     * This method returns the overlay container element. It will lazily
11362
     * create the element the first time  it is called to facilitate using
11363
     * the container in non-browser environments.
11364
     * @return {?} the container element
11365
     */
11366
    function () {
11367
        if (!this._containerElement) {
11368
            this._createContainer();
11369
        }
11370
        return this._containerElement;
11371
    };
11372
    /**
11373
     * Create the overlay container element, which is simply a div
11374
     * with the 'cdk-overlay-container' class on the document body.
11375
     */
11376
    /**
11377
     * Create the overlay container element, which is simply a div
11378
     * with the 'cdk-overlay-container' class on the document body.
11379
     * @return {?}
11380
     */
11381
    OverlayContainer.prototype._createContainer = /**
11382
     * Create the overlay container element, which is simply a div
11383
     * with the 'cdk-overlay-container' class on the document body.
11384
     * @return {?}
11385
     */
11386
    function () {
11387
        var /** @type {?} */ container = this._document.createElement('div');
11388
        container.classList.add('cdk-overlay-container');
11389
        this._document.body.appendChild(container);
11390
        this._containerElement = container;
11391
    };
11392
    OverlayContainer.decorators = [
11393
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"], args: [{ providedIn: 'root' },] },
11394
    ];
11395
    /** @nocollapse */
11396
    OverlayContainer.ctorParameters = function () { return [
11397
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"],] },] },
11398
    ]; };
11399
    /** @nocollapse */ OverlayContainer.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["defineInjectable"])({ factory: function OverlayContainer_Factory() { return new OverlayContainer(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["inject"])(_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"])); }, token: OverlayContainer, providedIn: "root" });
11400
    return OverlayContainer;
11401
}());
11402
/**
11403
 * \@docs-private \@deprecated \@breaking-change 7.0.0
11404
 * @param {?} parentContainer
11405
 * @param {?} _document
11406
 * @return {?}
11407
 */
11408
function OVERLAY_CONTAINER_PROVIDER_FACTORY(parentContainer, _document) {
11409
    return parentContainer || new OverlayContainer(_document);
11410
}
11411
/**
11412
 * \@docs-private \@deprecated \@breaking-change 7.0.0
11413
 */
11414
var /** @type {?} */ OVERLAY_CONTAINER_PROVIDER = {
11415
    // If there is already an OverlayContainer available, use that. Otherwise, provide a new one.
11416
    provide: OverlayContainer,
11417
    deps: [
11418
        [new _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"](), new _angular_core__WEBPACK_IMPORTED_MODULE_0__["SkipSelf"](), OverlayContainer],
11419
        /** @type {?} */ (_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"] // We need to use the InjectionToken somewhere to keep TS happy
11420
        ) // We need to use the InjectionToken somewhere to keep TS happy
11421
    ],
11422
    useFactory: OVERLAY_CONTAINER_PROVIDER_FACTORY
11423
};
11424
 
11425
/**
11426
 * @fileoverview added by tsickle
11427
 * @suppress {checkTypes} checked by tsc
11428
 */
11429
/**
11430
 * Reference to an overlay that has been created with the Overlay service.
11431
 * Used to manipulate or dispose of said overlay.
11432
 */
11433
var  /**
11434
 * Reference to an overlay that has been created with the Overlay service.
11435
 * Used to manipulate or dispose of said overlay.
11436
 */
11437
OverlayRef = /** @class */ (function () {
11438
    function OverlayRef(_portalOutlet, _host, _pane, _config, _ngZone, _keyboardDispatcher, _document) {
11439
        var _this = this;
11440
        this._portalOutlet = _portalOutlet;
11441
        this._host = _host;
11442
        this._pane = _pane;
11443
        this._config = _config;
11444
        this._ngZone = _ngZone;
11445
        this._keyboardDispatcher = _keyboardDispatcher;
11446
        this._document = _document;
11447
        this._backdropElement = null;
11448
        this._backdropClick = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
11449
        this._attachments = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
11450
        this._detachments = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
11451
        this._keydownEventsObservable = rxjs__WEBPACK_IMPORTED_MODULE_5__["Observable"].create(function (observer) {
11452
            var /** @type {?} */ subscription = _this._keydownEvents.subscribe(observer);
11453
            _this._keydownEventSubscriptions++;
11454
            return function () {
11455
                subscription.unsubscribe();
11456
                _this._keydownEventSubscriptions--;
11457
            };
11458
        });
11459
        /**
11460
         * Stream of keydown events dispatched to this overlay.
11461
         */
11462
        this._keydownEvents = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
11463
        /**
11464
         * Amount of subscriptions to the keydown events.
11465
         */
11466
        this._keydownEventSubscriptions = 0;
11467
        if (_config.scrollStrategy) {
11468
            _config.scrollStrategy.attach(this);
11469
        }
11470
    }
11471
    Object.defineProperty(OverlayRef.prototype, "overlayElement", {
11472
        /** The overlay's HTML element */
11473
        get: /**
11474
         * The overlay's HTML element
11475
         * @return {?}
11476
         */
11477
        function () {
11478
            return this._pane;
11479
        },
11480
        enumerable: true,
11481
        configurable: true
11482
    });
11483
    Object.defineProperty(OverlayRef.prototype, "backdropElement", {
11484
        /** The overlay's backdrop HTML element. */
11485
        get: /**
11486
         * The overlay's backdrop HTML element.
11487
         * @return {?}
11488
         */
11489
        function () {
11490
            return this._backdropElement;
11491
        },
11492
        enumerable: true,
11493
        configurable: true
11494
    });
11495
    Object.defineProperty(OverlayRef.prototype, "hostElement", {
11496
        /**
11497
         * Wrapper around the panel element. Can be used for advanced
11498
         * positioning where a wrapper with specific styling is
11499
         * required around the overlay pane.
11500
         */
11501
        get: /**
11502
         * Wrapper around the panel element. Can be used for advanced
11503
         * positioning where a wrapper with specific styling is
11504
         * required around the overlay pane.
11505
         * @return {?}
11506
         */
11507
        function () {
11508
            return this._host;
11509
        },
11510
        enumerable: true,
11511
        configurable: true
11512
    });
11513
    /**
11514
     * Attaches content, given via a Portal, to the overlay.
11515
     * If the overlay is configured to have a backdrop, it will be created.
11516
     *
11517
     * @param portal Portal instance to which to attach the overlay.
11518
     * @returns The portal attachment result.
11519
     */
11520
    /**
11521
     * Attaches content, given via a Portal, to the overlay.
11522
     * If the overlay is configured to have a backdrop, it will be created.
11523
     *
11524
     * @param {?} portal Portal instance to which to attach the overlay.
11525
     * @return {?} The portal attachment result.
11526
     */
11527
    OverlayRef.prototype.attach = /**
11528
     * Attaches content, given via a Portal, to the overlay.
11529
     * If the overlay is configured to have a backdrop, it will be created.
11530
     *
11531
     * @param {?} portal Portal instance to which to attach the overlay.
11532
     * @return {?} The portal attachment result.
11533
     */
11534
    function (portal) {
11535
        var _this = this;
11536
        var /** @type {?} */ attachResult = this._portalOutlet.attach(portal);
11537
        if (this._config.positionStrategy) {
11538
            this._config.positionStrategy.attach(this);
11539
        }
11540
        // Update the pane element with the given configuration.
11541
        if (!this._host.parentElement && this._previousHostParent) {
11542
            this._previousHostParent.appendChild(this._host);
11543
        }
11544
        this._updateStackingOrder();
11545
        this._updateElementSize();
11546
        this._updateElementDirection();
11547
        if (this._config.scrollStrategy) {
11548
            this._config.scrollStrategy.enable();
11549
        }
11550
        // Update the position once the zone is stable so that the overlay will be fully rendered
11551
        // before attempting to position it, as the position may depend on the size of the rendered
11552
        // content.
11553
        this._ngZone.onStable
11554
            .asObservable()
11555
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_6__["take"])(1))
11556
            .subscribe(function () {
11557
            // The overlay could've been detached before the zone has stabilized.
11558
            if (_this.hasAttached()) {
11559
                _this.updatePosition();
11560
            }
11561
        });
11562
        // Enable pointer events for the overlay pane element.
11563
        this._togglePointerEvents(true);
11564
        if (this._config.hasBackdrop) {
11565
            this._attachBackdrop();
11566
        }
11567
        if (this._config.panelClass) {
11568
            this._toggleClasses(this._pane, this._config.panelClass, true);
11569
        }
11570
        // Only emit the `attachments` event once all other setup is done.
11571
        this._attachments.next();
11572
        // Track this overlay by the keyboard dispatcher
11573
        this._keyboardDispatcher.add(this);
11574
        return attachResult;
11575
    };
11576
    /**
11577
     * Detaches an overlay from a portal.
11578
     * @returns The portal detachment result.
11579
     */
11580
    /**
11581
     * Detaches an overlay from a portal.
11582
     * @return {?} The portal detachment result.
11583
     */
11584
    OverlayRef.prototype.detach = /**
11585
     * Detaches an overlay from a portal.
11586
     * @return {?} The portal detachment result.
11587
     */
11588
    function () {
11589
        var _this = this;
11590
        if (!this.hasAttached()) {
11591
            return;
11592
        }
11593
        this.detachBackdrop();
11594
        // When the overlay is detached, the pane element should disable pointer events.
11595
        // This is necessary because otherwise the pane element will cover the page and disable
11596
        // pointer events therefore. Depends on the position strategy and the applied pane boundaries.
11597
        this._togglePointerEvents(false);
11598
        if (this._config.positionStrategy && this._config.positionStrategy.detach) {
11599
            this._config.positionStrategy.detach();
11600
        }
11601
        if (this._config.scrollStrategy) {
11602
            this._config.scrollStrategy.disable();
11603
        }
11604
        if (this._config.panelClass) {
11605
            this._toggleClasses(this._pane, this._config.panelClass, false);
11606
        }
11607
        var /** @type {?} */ detachmentResult = this._portalOutlet.detach();
11608
        // Only emit after everything is detached.
11609
        this._detachments.next();
11610
        // Remove this overlay from keyboard dispatcher tracking.
11611
        this._keyboardDispatcher.remove(this);
11612
        // Keeping the host element in DOM the can cause scroll jank, because it still gets rendered,
11613
        // even though it's transparent and unclickable. We can't remove the host here immediately,
11614
        // because the overlay pane's content might still be animating. This stream helps us avoid
11615
        // interrupting the animation by waiting for the pane to become empty.
11616
        var /** @type {?} */ subscription = this._ngZone.onStable
11617
            .asObservable()
11618
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_6__["takeUntil"])(Object(rxjs__WEBPACK_IMPORTED_MODULE_5__["merge"])(this._attachments, this._detachments)))
11619
            .subscribe(function () {
11620
            // Needs a couple of checks for the pane and host, because
11621
            // they may have been removed by the time the zone stabilizes.
11622
            if (!_this._pane || !_this._host || _this._pane.children.length === 0) {
11623
                if (_this._host && _this._host.parentElement) {
11624
                    _this._previousHostParent = _this._host.parentElement;
11625
                    _this._previousHostParent.removeChild(_this._host);
11626
                }
11627
                subscription.unsubscribe();
11628
            }
11629
        });
11630
        return detachmentResult;
11631
    };
11632
    /** Cleans up the overlay from the DOM. */
11633
    /**
11634
     * Cleans up the overlay from the DOM.
11635
     * @return {?}
11636
     */
11637
    OverlayRef.prototype.dispose = /**
11638
     * Cleans up the overlay from the DOM.
11639
     * @return {?}
11640
     */
11641
    function () {
11642
        var /** @type {?} */ isAttached = this.hasAttached();
11643
        if (this._config.positionStrategy) {
11644
            this._config.positionStrategy.dispose();
11645
        }
11646
        if (this._config.scrollStrategy) {
11647
            this._config.scrollStrategy.disable();
11648
        }
11649
        this.detachBackdrop();
11650
        this._keyboardDispatcher.remove(this);
11651
        this._portalOutlet.dispose();
11652
        this._attachments.complete();
11653
        this._backdropClick.complete();
11654
        this._keydownEvents.complete();
11655
        if (this._host && this._host.parentNode) {
11656
            this._host.parentNode.removeChild(this._host);
11657
            this._host = /** @type {?} */ ((null));
11658
        }
11659
        this._previousHostParent = this._pane = /** @type {?} */ ((null));
11660
        if (isAttached) {
11661
            this._detachments.next();
11662
        }
11663
        this._detachments.complete();
11664
    };
11665
    /** Whether the overlay has attached content. */
11666
    /**
11667
     * Whether the overlay has attached content.
11668
     * @return {?}
11669
     */
11670
    OverlayRef.prototype.hasAttached = /**
11671
     * Whether the overlay has attached content.
11672
     * @return {?}
11673
     */
11674
    function () {
11675
        return this._portalOutlet.hasAttached();
11676
    };
11677
    /** Gets an observable that emits when the backdrop has been clicked. */
11678
    /**
11679
     * Gets an observable that emits when the backdrop has been clicked.
11680
     * @return {?}
11681
     */
11682
    OverlayRef.prototype.backdropClick = /**
11683
     * Gets an observable that emits when the backdrop has been clicked.
11684
     * @return {?}
11685
     */
11686
    function () {
11687
        return this._backdropClick.asObservable();
11688
    };
11689
    /** Gets an observable that emits when the overlay has been attached. */
11690
    /**
11691
     * Gets an observable that emits when the overlay has been attached.
11692
     * @return {?}
11693
     */
11694
    OverlayRef.prototype.attachments = /**
11695
     * Gets an observable that emits when the overlay has been attached.
11696
     * @return {?}
11697
     */
11698
    function () {
11699
        return this._attachments.asObservable();
11700
    };
11701
    /** Gets an observable that emits when the overlay has been detached. */
11702
    /**
11703
     * Gets an observable that emits when the overlay has been detached.
11704
     * @return {?}
11705
     */
11706
    OverlayRef.prototype.detachments = /**
11707
     * Gets an observable that emits when the overlay has been detached.
11708
     * @return {?}
11709
     */
11710
    function () {
11711
        return this._detachments.asObservable();
11712
    };
11713
    /** Gets an observable of keydown events targeted to this overlay. */
11714
    /**
11715
     * Gets an observable of keydown events targeted to this overlay.
11716
     * @return {?}
11717
     */
11718
    OverlayRef.prototype.keydownEvents = /**
11719
     * Gets an observable of keydown events targeted to this overlay.
11720
     * @return {?}
11721
     */
11722
    function () {
11723
        return this._keydownEventsObservable;
11724
    };
11725
    /** Gets the the current overlay configuration, which is immutable. */
11726
    /**
11727
     * Gets the the current overlay configuration, which is immutable.
11728
     * @return {?}
11729
     */
11730
    OverlayRef.prototype.getConfig = /**
11731
     * Gets the the current overlay configuration, which is immutable.
11732
     * @return {?}
11733
     */
11734
    function () {
11735
        return this._config;
11736
    };
11737
    /** Updates the position of the overlay based on the position strategy. */
11738
    /**
11739
     * Updates the position of the overlay based on the position strategy.
11740
     * @return {?}
11741
     */
11742
    OverlayRef.prototype.updatePosition = /**
11743
     * Updates the position of the overlay based on the position strategy.
11744
     * @return {?}
11745
     */
11746
    function () {
11747
        if (this._config.positionStrategy) {
11748
            this._config.positionStrategy.apply();
11749
        }
11750
    };
11751
    /** Update the size properties of the overlay. */
11752
    /**
11753
     * Update the size properties of the overlay.
11754
     * @param {?} sizeConfig
11755
     * @return {?}
11756
     */
11757
    OverlayRef.prototype.updateSize = /**
11758
     * Update the size properties of the overlay.
11759
     * @param {?} sizeConfig
11760
     * @return {?}
11761
     */
11762
    function (sizeConfig) {
11763
        this._config = Object(tslib__WEBPACK_IMPORTED_MODULE_4__["__assign"])({}, this._config, sizeConfig);
11764
        this._updateElementSize();
11765
    };
11766
    /** Sets the LTR/RTL direction for the overlay. */
11767
    /**
11768
     * Sets the LTR/RTL direction for the overlay.
11769
     * @param {?} dir
11770
     * @return {?}
11771
     */
11772
    OverlayRef.prototype.setDirection = /**
11773
     * Sets the LTR/RTL direction for the overlay.
11774
     * @param {?} dir
11775
     * @return {?}
11776
     */
11777
    function (dir) {
11778
        this._config = Object(tslib__WEBPACK_IMPORTED_MODULE_4__["__assign"])({}, this._config, { direction: dir });
11779
        this._updateElementDirection();
11780
    };
11781
    /**
11782
     * Returns the layout direction of the overlay panel.
11783
     */
11784
    /**
11785
     * Returns the layout direction of the overlay panel.
11786
     * @return {?}
11787
     */
11788
    OverlayRef.prototype.getDirection = /**
11789
     * Returns the layout direction of the overlay panel.
11790
     * @return {?}
11791
     */
11792
    function () {
11793
        var /** @type {?} */ direction = this._config.direction;
11794
        if (!direction) {
11795
            return 'ltr';
11796
        }
11797
        return typeof direction === 'string' ? direction : direction.value;
11798
    };
11799
    /**
11800
     * Updates the text direction of the overlay panel.
11801
     * @return {?}
11802
     */
11803
    OverlayRef.prototype._updateElementDirection = /**
11804
     * Updates the text direction of the overlay panel.
11805
     * @return {?}
11806
     */
11807
    function () {
11808
        this._host.setAttribute('dir', this.getDirection());
11809
    };
11810
    /**
11811
     * Updates the size of the overlay element based on the overlay config.
11812
     * @return {?}
11813
     */
11814
    OverlayRef.prototype._updateElementSize = /**
11815
     * Updates the size of the overlay element based on the overlay config.
11816
     * @return {?}
11817
     */
11818
    function () {
11819
        var /** @type {?} */ style = this._pane.style;
11820
        style.width = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceCssPixelValue"])(this._config.width);
11821
        style.height = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceCssPixelValue"])(this._config.height);
11822
        style.minWidth = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceCssPixelValue"])(this._config.minWidth);
11823
        style.minHeight = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceCssPixelValue"])(this._config.minHeight);
11824
        style.maxWidth = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceCssPixelValue"])(this._config.maxWidth);
11825
        style.maxHeight = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceCssPixelValue"])(this._config.maxHeight);
11826
    };
11827
    /**
11828
     * Toggles the pointer events for the overlay pane element.
11829
     * @param {?} enablePointer
11830
     * @return {?}
11831
     */
11832
    OverlayRef.prototype._togglePointerEvents = /**
11833
     * Toggles the pointer events for the overlay pane element.
11834
     * @param {?} enablePointer
11835
     * @return {?}
11836
     */
11837
    function (enablePointer) {
11838
        this._pane.style.pointerEvents = enablePointer ? 'auto' : 'none';
11839
    };
11840
    /**
11841
     * Attaches a backdrop for this overlay.
11842
     * @return {?}
11843
     */
11844
    OverlayRef.prototype._attachBackdrop = /**
11845
     * Attaches a backdrop for this overlay.
11846
     * @return {?}
11847
     */
11848
    function () {
11849
        var _this = this;
11850
        var /** @type {?} */ showingClass = 'cdk-overlay-backdrop-showing';
11851
        this._backdropElement = this._document.createElement('div');
11852
        this._backdropElement.classList.add('cdk-overlay-backdrop');
11853
        if (this._config.backdropClass) {
11854
            this._toggleClasses(this._backdropElement, this._config.backdropClass, true);
11855
        } /** @type {?} */
11856
        ((
11857
        // Insert the backdrop before the pane in the DOM order,
11858
        // in order to handle stacked overlays properly.
11859
        this._host.parentElement)).insertBefore(this._backdropElement, this._host);
11860
        // Forward backdrop clicks such that the consumer of the overlay can perform whatever
11861
        // action desired when such a click occurs (usually closing the overlay).
11862
        this._backdropElement.addEventListener('click', function (event) { return _this._backdropClick.next(event); });
11863
        // Add class to fade-in the backdrop after one frame.
11864
        if (typeof requestAnimationFrame !== 'undefined') {
11865
            this._ngZone.runOutsideAngular(function () {
11866
                requestAnimationFrame(function () {
11867
                    if (_this._backdropElement) {
11868
                        _this._backdropElement.classList.add(showingClass);
11869
                    }
11870
                });
11871
            });
11872
        }
11873
        else {
11874
            this._backdropElement.classList.add(showingClass);
11875
        }
11876
    };
11877
    /**
11878
     * Updates the stacking order of the element, moving it to the top if necessary.
11879
     * This is required in cases where one overlay was detached, while another one,
11880
     * that should be behind it, was destroyed. The next time both of them are opened,
11881
     * the stacking will be wrong, because the detached element's pane will still be
11882
     * in its original DOM position.
11883
     * @return {?}
11884
     */
11885
    OverlayRef.prototype._updateStackingOrder = /**
11886
     * Updates the stacking order of the element, moving it to the top if necessary.
11887
     * This is required in cases where one overlay was detached, while another one,
11888
     * that should be behind it, was destroyed. The next time both of them are opened,
11889
     * the stacking will be wrong, because the detached element's pane will still be
11890
     * in its original DOM position.
11891
     * @return {?}
11892
     */
11893
    function () {
11894
        if (this._host.nextSibling) {
11895
            /** @type {?} */ ((this._host.parentNode)).appendChild(this._host);
11896
        }
11897
    };
11898
    /** Detaches the backdrop (if any) associated with the overlay. */
11899
    /**
11900
     * Detaches the backdrop (if any) associated with the overlay.
11901
     * @return {?}
11902
     */
11903
    OverlayRef.prototype.detachBackdrop = /**
11904
     * Detaches the backdrop (if any) associated with the overlay.
11905
     * @return {?}
11906
     */
11907
    function () {
11908
        var _this = this;
11909
        var /** @type {?} */ backdropToDetach = this._backdropElement;
11910
        if (backdropToDetach) {
11911
            var /** @type {?} */ timeoutId_1;
11912
            var /** @type {?} */ finishDetach_1 = function () {
11913
                // It may not be attached to anything in certain cases (e.g. unit tests).
11914
                if (backdropToDetach && backdropToDetach.parentNode) {
11915
                    backdropToDetach.parentNode.removeChild(backdropToDetach);
11916
                }
11917
                // It is possible that a new portal has been attached to this overlay since we started
11918
                // removing the backdrop. If that is the case, only clear the backdrop reference if it
11919
                // is still the same instance that we started to remove.
11920
                if (_this._backdropElement == backdropToDetach) {
11921
                    _this._backdropElement = null;
11922
                }
11923
                clearTimeout(timeoutId_1);
11924
            };
11925
            backdropToDetach.classList.remove('cdk-overlay-backdrop-showing');
11926
            if (this._config.backdropClass) {
11927
                this._toggleClasses(backdropToDetach, this._config.backdropClass, false);
11928
            }
11929
            this._ngZone.runOutsideAngular(function () {
11930
                /** @type {?} */ ((backdropToDetach)).addEventListener('transitionend', finishDetach_1);
11931
            });
11932
            // If the backdrop doesn't have a transition, the `transitionend` event won't fire.
11933
            // In this case we make it unclickable and we try to remove it after a delay.
11934
            backdropToDetach.style.pointerEvents = 'none';
11935
            // Run this outside the Angular zone because there's nothing that Angular cares about.
11936
            // If it were to run inside the Angular zone, every test that used Overlay would have to be
11937
            // either async or fakeAsync.
11938
            // Run this outside the Angular zone because there's nothing that Angular cares about.
11939
            // If it were to run inside the Angular zone, every test that used Overlay would have to be
11940
            // either async or fakeAsync.
11941
            timeoutId_1 = this._ngZone.runOutsideAngular(function () { return setTimeout(finishDetach_1, 500); });
11942
        }
11943
    };
11944
    /**
11945
     * Toggles a single CSS class or an array of classes on an element.
11946
     * @param {?} element
11947
     * @param {?} cssClasses
11948
     * @param {?} isAdd
11949
     * @return {?}
11950
     */
11951
    OverlayRef.prototype._toggleClasses = /**
11952
     * Toggles a single CSS class or an array of classes on an element.
11953
     * @param {?} element
11954
     * @param {?} cssClasses
11955
     * @param {?} isAdd
11956
     * @return {?}
11957
     */
11958
    function (element, cssClasses, isAdd) {
11959
        var /** @type {?} */ classList = element.classList;
11960
        Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceArray"])(cssClasses).forEach(function (cssClass) {
11961
            // We can't do a spread here, because IE doesn't support setting multiple classes.
11962
            isAdd ? classList.add(cssClass) : classList.remove(cssClass);
11963
        });
11964
    };
11965
    return OverlayRef;
11966
}());
11967
 
11968
/**
11969
 * @fileoverview added by tsickle
11970
 * @suppress {checkTypes} checked by tsc
11971
 */
11972
/**
11973
 * A strategy for positioning overlays. Using this strategy, an overlay is given an
11974
 * implicit position relative some origin element. The relative position is defined in terms of
11975
 * a point on the origin element that is connected to a point on the overlay element. For example,
11976
 * a basic dropdown is connecting the bottom-left corner of the origin to the top-left corner
11977
 * of the overlay.
11978
 */
11979
var  /**
11980
 * A strategy for positioning overlays. Using this strategy, an overlay is given an
11981
 * implicit position relative some origin element. The relative position is defined in terms of
11982
 * a point on the origin element that is connected to a point on the overlay element. For example,
11983
 * a basic dropdown is connecting the bottom-left corner of the origin to the top-left corner
11984
 * of the overlay.
11985
 */
11986
FlexibleConnectedPositionStrategy = /** @class */ (function () {
11987
    function FlexibleConnectedPositionStrategy(connectedTo, _viewportRuler, _document, _platform, _overlayContainer) {
11988
        var _this = this;
11989
        this._viewportRuler = _viewportRuler;
11990
        this._document = _document;
11991
        this._platform = _platform;
11992
        this._overlayContainer = _overlayContainer;
11993
        /**
11994
         * Whether we're performing the very first positioning of the overlay.
11995
         */
11996
        this._isInitialRender = true;
11997
        /**
11998
         * Last size used for the bounding box. Used to avoid resizing the overlay after open.
11999
         */
12000
        this._lastBoundingBoxSize = { width: 0, height: 0 };
12001
        /**
12002
         * Whether the overlay was pushed in a previous positioning.
12003
         */
12004
        this._isPushed = false;
12005
        /**
12006
         * Whether the overlay can be pushed on-screen on the initial open.
12007
         */
12008
        this._canPush = true;
12009
        /**
12010
         * Whether the overlay can grow via flexible width/height after the initial open.
12011
         */
12012
        this._growAfterOpen = false;
12013
        /**
12014
         * Whether the overlay's width and height can be constrained to fit within the viewport.
12015
         */
12016
        this._hasFlexibleDimensions = true;
12017
        /**
12018
         * Whether the overlay position is locked.
12019
         */
12020
        this._positionLocked = false;
12021
        /**
12022
         * Amount of space that must be maintained between the overlay and the edge of the viewport.
12023
         */
12024
        this._viewportMargin = 0;
12025
        /**
12026
         * The Scrollable containers used to check scrollable view properties on position change.
12027
         */
12028
        this.scrollables = [];
12029
        /**
12030
         * Ordered list of preferred positions, from most to least desirable.
12031
         */
12032
        this._preferredPositions = [];
12033
        /**
12034
         * Subject that emits whenever the position changes.
12035
         */
12036
        this._positionChanges = new rxjs__WEBPACK_IMPORTED_MODULE_5__["Subject"]();
12037
        /**
12038
         * Subscription to viewport size changes.
12039
         */
12040
        this._resizeSubscription = rxjs__WEBPACK_IMPORTED_MODULE_5__["Subscription"].EMPTY;
12041
        /**
12042
         * Default offset for the overlay along the x axis.
12043
         */
12044
        this._offsetX = 0;
12045
        /**
12046
         * Default offset for the overlay along the y axis.
12047
         */
12048
        this._offsetY = 0;
12049
        /**
12050
         * Amount of subscribers to the `positionChanges` stream.
12051
         */
12052
        this._positionChangeSubscriptions = 0;
12053
        /**
12054
         * Observable sequence of position changes.
12055
         */
12056
        this.positionChanges = rxjs__WEBPACK_IMPORTED_MODULE_5__["Observable"].create(function (observer) {
12057
            var /** @type {?} */ subscription = _this._positionChanges.subscribe(observer);
12058
            _this._positionChangeSubscriptions++;
12059
            return function () {
12060
                subscription.unsubscribe();
12061
                _this._positionChangeSubscriptions--;
12062
            };
12063
        });
12064
        this.setOrigin(connectedTo);
12065
    }
12066
    Object.defineProperty(FlexibleConnectedPositionStrategy.prototype, "positions", {
12067
        /** Ordered list of preferred positions, from most to least desirable. */
12068
        get: /**
12069
         * Ordered list of preferred positions, from most to least desirable.
12070
         * @return {?}
12071
         */
12072
        function () {
12073
            return this._preferredPositions;
12074
        },
12075
        enumerable: true,
12076
        configurable: true
12077
    });
12078
    /** Attaches this position strategy to an overlay. */
12079
    /**
12080
     * Attaches this position strategy to an overlay.
12081
     * @param {?} overlayRef
12082
     * @return {?}
12083
     */
12084
    FlexibleConnectedPositionStrategy.prototype.attach = /**
12085
     * Attaches this position strategy to an overlay.
12086
     * @param {?} overlayRef
12087
     * @return {?}
12088
     */
12089
    function (overlayRef) {
12090
        var _this = this;
12091
        if (this._overlayRef && overlayRef !== this._overlayRef) {
12092
            throw Error('This position strategy is already attached to an overlay');
12093
        }
12094
        this._validatePositions();
12095
        overlayRef.hostElement.classList.add('cdk-overlay-connected-position-bounding-box');
12096
        this._overlayRef = overlayRef;
12097
        this._boundingBox = overlayRef.hostElement;
12098
        this._pane = overlayRef.overlayElement;
12099
        this._resizeSubscription.unsubscribe();
12100
        this._resizeSubscription = this._viewportRuler.change().subscribe(function () { return _this.apply(); });
12101
    };
12102
    /**
12103
     * Updates the position of the overlay element, using whichever preferred position relative
12104
     * to the origin best fits on-screen.
12105
     *
12106
     * The selection of a position goes as follows:
12107
     *  - If any positions fit completely within the viewport as-is,
12108
     *      choose the first position that does so.
12109
     *  - If flexible dimensions are enabled and at least one satifies the given minimum width/height,
12110
     *      choose the position with the greatest available size modified by the positions' weight.
12111
     *  - If pushing is enabled, take the position that went off-screen the least and push it
12112
     *      on-screen.
12113
     *  - If none of the previous criteria were met, use the position that goes off-screen the least.
12114
     * @docs-private
12115
     */
12116
    /**
12117
     * Updates the position of the overlay element, using whichever preferred position relative
12118
     * to the origin best fits on-screen.
12119
     *
12120
     * The selection of a position goes as follows:
12121
     *  - If any positions fit completely within the viewport as-is,
12122
     *      choose the first position that does so.
12123
     *  - If flexible dimensions are enabled and at least one satifies the given minimum width/height,
12124
     *      choose the position with the greatest available size modified by the positions' weight.
12125
     *  - If pushing is enabled, take the position that went off-screen the least and push it
12126
     *      on-screen.
12127
     *  - If none of the previous criteria were met, use the position that goes off-screen the least.
12128
     * \@docs-private
12129
     * @return {?}
12130
     */
12131
    FlexibleConnectedPositionStrategy.prototype.apply = /**
12132
     * Updates the position of the overlay element, using whichever preferred position relative
12133
     * to the origin best fits on-screen.
12134
     *
12135
     * The selection of a position goes as follows:
12136
     *  - If any positions fit completely within the viewport as-is,
12137
     *      choose the first position that does so.
12138
     *  - If flexible dimensions are enabled and at least one satifies the given minimum width/height,
12139
     *      choose the position with the greatest available size modified by the positions' weight.
12140
     *  - If pushing is enabled, take the position that went off-screen the least and push it
12141
     *      on-screen.
12142
     *  - If none of the previous criteria were met, use the position that goes off-screen the least.
12143
     * \@docs-private
12144
     * @return {?}
12145
     */
12146
    function () {
12147
        // We shouldn't do anything if the strategy was disposed or we're on the server.
12148
        // @breaking-change 7.0.0 Remove `_platform` null check once it's guaranteed to be defined.
12149
        if (this._isDisposed || (this._platform && !this._platform.isBrowser)) {
12150
            return;
12151
        }
12152
        // If the position has been applied already (e.g. when the overlay was opened) and the
12153
        // consumer opted into locking in the position, re-use the old position, in order to
12154
        // prevent the overlay from jumping around.
12155
        if (!this._isInitialRender && this._positionLocked && this._lastPosition) {
12156
            this.reapplyLastPosition();
12157
            return;
12158
        }
12159
        this._resetOverlayElementStyles();
12160
        this._resetBoundingBoxStyles();
12161
        // We need the bounding rects for the origin and the overlay to determine how to position
12162
        // the overlay relative to the origin.
12163
        // We use the viewport rect to determine whether a position would go off-screen.
12164
        this._viewportRect = this._getNarrowedViewportRect();
12165
        this._originRect = this._origin.getBoundingClientRect();
12166
        this._overlayRect = this._pane.getBoundingClientRect();
12167
        var /** @type {?} */ originRect = this._originRect;
12168
        var /** @type {?} */ overlayRect = this._overlayRect;
12169
        var /** @type {?} */ viewportRect = this._viewportRect;
12170
        // Positions where the overlay will fit with flexible dimensions.
12171
        var /** @type {?} */ flexibleFits = [];
12172
        // Fallback if none of the preferred positions fit within the viewport.
12173
        var /** @type {?} */ fallback;
12174
        // Go through each of the preferred positions looking for a good fit.
12175
        // If a good fit is found, it will be applied immediately.
12176
        for (var _i = 0, _a = this._preferredPositions; _i < _a.length; _i++) {
12177
            var pos = _a[_i];
12178
            // Get the exact (x, y) coordinate for the point-of-origin on the origin element.
12179
            var /** @type {?} */ originPoint = this._getOriginPoint(originRect, pos);
12180
            // From that point-of-origin, get the exact (x, y) coordinate for the top-left corner of the
12181
            // overlay in this position. We use the top-left corner for calculations and later translate
12182
            // this into an appropriate (top, left, bottom, right) style.
12183
            var /** @type {?} */ overlayPoint = this._getOverlayPoint(originPoint, overlayRect, pos);
12184
            // Calculate how well the overlay would fit into the viewport with this point.
12185
            var /** @type {?} */ overlayFit = this._getOverlayFit(overlayPoint, overlayRect, viewportRect, pos);
12186
            // If the overlay, without any further work, fits into the viewport, use this position.
12187
            if (overlayFit.isCompletelyWithinViewport) {
12188
                this._isPushed = false;
12189
                this._applyPosition(pos, originPoint);
12190
                return;
12191
            }
12192
            // If the overlay has flexible dimensions, we can use this position
12193
            // so long as there's enough space for the minimum dimensions.
12194
            if (this._canFitWithFlexibleDimensions(overlayFit, overlayPoint, viewportRect)) {
12195
                // Save positions where the overlay will fit with flexible dimensions. We will use these
12196
                // if none of the positions fit *without* flexible dimensions.
12197
                flexibleFits.push({
12198
                    position: pos,
12199
                    origin: originPoint,
12200
                    overlayRect: overlayRect,
12201
                    boundingBoxRect: this._calculateBoundingBoxRect(originPoint, pos)
12202
                });
12203
                continue;
12204
            }
12205
            // If the current preferred position does not fit on the screen, remember the position
12206
            // if it has more visible area on-screen than we've seen and move onto the next preferred
12207
            // position.
12208
            if (!fallback || fallback.overlayFit.visibleArea < overlayFit.visibleArea) {
12209
                fallback = { overlayFit: overlayFit, overlayPoint: overlayPoint, originPoint: originPoint, position: pos, overlayRect: overlayRect };
12210
            }
12211
        }
12212
        // If there are any positions where the overlay would fit with flexible dimensions, choose the
12213
        // one that has the greatest area available modified by the position's weight
12214
        if (flexibleFits.length) {
12215
            var /** @type {?} */ bestFit = null;
12216
            var /** @type {?} */ bestScore = -1;
12217
            for (var _b = 0, flexibleFits_1 = flexibleFits; _b < flexibleFits_1.length; _b++) {
12218
                var fit_1 = flexibleFits_1[_b];
12219
                var /** @type {?} */ score = fit_1.boundingBoxRect.width * fit_1.boundingBoxRect.height * (fit_1.position.weight || 1);
12220
                if (score > bestScore) {
12221
                    bestScore = score;
12222
                    bestFit = fit_1;
12223
                }
12224
            }
12225
            this._isPushed = false;
12226
            this._applyPosition(/** @type {?} */ ((bestFit)).position, /** @type {?} */ ((bestFit)).origin);
12227
            return;
12228
        }
12229
        // When none of the preferred positions fit within the viewport, take the position
12230
        // that went off-screen the least and attempt to push it on-screen.
12231
        if (this._canPush) {
12232
            // TODO(jelbourn): after pushing, the opening "direction" of the overlay might not make sense.
12233
            this._isPushed = true;
12234
            this._applyPosition(/** @type {?} */ ((fallback)).position, /** @type {?} */ ((fallback)).originPoint);
12235
            return;
12236
        }
12237
        // All options for getting the overlay within the viewport have been exhausted, so go with the
12238
        // position that went off-screen the least.
12239
        this._applyPosition(/** @type {?} */ ((fallback)).position, /** @type {?} */ ((fallback)).originPoint);
12240
    };
12241
    /**
12242
     * @return {?}
12243
     */
12244
    FlexibleConnectedPositionStrategy.prototype.detach = /**
12245
     * @return {?}
12246
     */
12247
    function () {
12248
        this._resizeSubscription.unsubscribe();
12249
    };
12250
    /** Cleanup after the element gets destroyed. */
12251
    /**
12252
     * Cleanup after the element gets destroyed.
12253
     * @return {?}
12254
     */
12255
    FlexibleConnectedPositionStrategy.prototype.dispose = /**
12256
     * Cleanup after the element gets destroyed.
12257
     * @return {?}
12258
     */
12259
    function () {
12260
        if (!this._isDisposed) {
12261
            this.detach();
12262
            this._boundingBox = null;
12263
            this._positionChanges.complete();
12264
            this._isDisposed = true;
12265
        }
12266
    };
12267
    /**
12268
     * This re-aligns the overlay element with the trigger in its last calculated position,
12269
     * even if a position higher in the "preferred positions" list would now fit. This
12270
     * allows one to re-align the panel without changing the orientation of the panel.
12271
     */
12272
    /**
12273
     * This re-aligns the overlay element with the trigger in its last calculated position,
12274
     * even if a position higher in the "preferred positions" list would now fit. This
12275
     * allows one to re-align the panel without changing the orientation of the panel.
12276
     * @return {?}
12277
     */
12278
    FlexibleConnectedPositionStrategy.prototype.reapplyLastPosition = /**
12279
     * This re-aligns the overlay element with the trigger in its last calculated position,
12280
     * even if a position higher in the "preferred positions" list would now fit. This
12281
     * allows one to re-align the panel without changing the orientation of the panel.
12282
     * @return {?}
12283
     */
12284
    function () {
12285
        if (!this._isDisposed && (!this._platform || this._platform.isBrowser)) {
12286
            this._originRect = this._origin.getBoundingClientRect();
12287
            this._overlayRect = this._pane.getBoundingClientRect();
12288
            this._viewportRect = this._getNarrowedViewportRect();
12289
            var /** @type {?} */ lastPosition = this._lastPosition || this._preferredPositions[0];
12290
            var /** @type {?} */ originPoint = this._getOriginPoint(this._originRect, lastPosition);
12291
            this._applyPosition(lastPosition, originPoint);
12292
        }
12293
    };
12294
    /**
12295
     * Sets the list of Scrollable containers that host the origin element so that
12296
     * on reposition we can evaluate if it or the overlay has been clipped or outside view. Every
12297
     * Scrollable must be an ancestor element of the strategy's origin element.
12298
     */
12299
    /**
12300
     * Sets the list of Scrollable containers that host the origin element so that
12301
     * on reposition we can evaluate if it or the overlay has been clipped or outside view. Every
12302
     * Scrollable must be an ancestor element of the strategy's origin element.
12303
     * @param {?} scrollables
12304
     * @return {?}
12305
     */
12306
    FlexibleConnectedPositionStrategy.prototype.withScrollableContainers = /**
12307
     * Sets the list of Scrollable containers that host the origin element so that
12308
     * on reposition we can evaluate if it or the overlay has been clipped or outside view. Every
12309
     * Scrollable must be an ancestor element of the strategy's origin element.
12310
     * @param {?} scrollables
12311
     * @return {?}
12312
     */
12313
    function (scrollables) {
12314
        this.scrollables = scrollables;
12315
    };
12316
    /**
12317
     * Adds new preferred positions.
12318
     * @param positions List of positions options for this overlay.
12319
     */
12320
    /**
12321
     * Adds new preferred positions.
12322
     * @param {?} positions List of positions options for this overlay.
12323
     * @return {?}
12324
     */
12325
    FlexibleConnectedPositionStrategy.prototype.withPositions = /**
12326
     * Adds new preferred positions.
12327
     * @param {?} positions List of positions options for this overlay.
12328
     * @return {?}
12329
     */
12330
    function (positions) {
12331
        this._preferredPositions = positions;
12332
        // If the last calculated position object isn't part of the positions anymore, clear
12333
        // it in order to avoid it being picked up if the consumer tries to re-apply.
12334
        if (positions.indexOf(/** @type {?} */ ((this._lastPosition))) === -1) {
12335
            this._lastPosition = null;
12336
        }
12337
        this._validatePositions();
12338
        return this;
12339
    };
12340
    /**
12341
     * Sets a minimum distance the overlay may be positioned to the edge of the viewport.
12342
     * @param margin Required margin between the overlay and the viewport edge in pixels.
12343
     */
12344
    /**
12345
     * Sets a minimum distance the overlay may be positioned to the edge of the viewport.
12346
     * @param {?} margin Required margin between the overlay and the viewport edge in pixels.
12347
     * @return {?}
12348
     */
12349
    FlexibleConnectedPositionStrategy.prototype.withViewportMargin = /**
12350
     * Sets a minimum distance the overlay may be positioned to the edge of the viewport.
12351
     * @param {?} margin Required margin between the overlay and the viewport edge in pixels.
12352
     * @return {?}
12353
     */
12354
    function (margin) {
12355
        this._viewportMargin = margin;
12356
        return this;
12357
    };
12358
    /** Sets whether the overlay's width and height can be constrained to fit within the viewport. */
12359
    /**
12360
     * Sets whether the overlay's width and height can be constrained to fit within the viewport.
12361
     * @param {?=} flexibleDimensions
12362
     * @return {?}
12363
     */
12364
    FlexibleConnectedPositionStrategy.prototype.withFlexibleDimensions = /**
12365
     * Sets whether the overlay's width and height can be constrained to fit within the viewport.
12366
     * @param {?=} flexibleDimensions
12367
     * @return {?}
12368
     */
12369
    function (flexibleDimensions) {
12370
        if (flexibleDimensions === void 0) { flexibleDimensions = true; }
12371
        this._hasFlexibleDimensions = flexibleDimensions;
12372
        return this;
12373
    };
12374
    /** Sets whether the overlay can grow after the initial open via flexible width/height. */
12375
    /**
12376
     * Sets whether the overlay can grow after the initial open via flexible width/height.
12377
     * @param {?=} growAfterOpen
12378
     * @return {?}
12379
     */
12380
    FlexibleConnectedPositionStrategy.prototype.withGrowAfterOpen = /**
12381
     * Sets whether the overlay can grow after the initial open via flexible width/height.
12382
     * @param {?=} growAfterOpen
12383
     * @return {?}
12384
     */
12385
    function (growAfterOpen) {
12386
        if (growAfterOpen === void 0) { growAfterOpen = true; }
12387
        this._growAfterOpen = growAfterOpen;
12388
        return this;
12389
    };
12390
    /** Sets whether the overlay can be pushed on-screen if none of the provided positions fit. */
12391
    /**
12392
     * Sets whether the overlay can be pushed on-screen if none of the provided positions fit.
12393
     * @param {?=} canPush
12394
     * @return {?}
12395
     */
12396
    FlexibleConnectedPositionStrategy.prototype.withPush = /**
12397
     * Sets whether the overlay can be pushed on-screen if none of the provided positions fit.
12398
     * @param {?=} canPush
12399
     * @return {?}
12400
     */
12401
    function (canPush) {
12402
        if (canPush === void 0) { canPush = true; }
12403
        this._canPush = canPush;
12404
        return this;
12405
    };
12406
    /**
12407
     * Sets whether the overlay's position should be locked in after it is positioned
12408
     * initially. When an overlay is locked in, it won't attempt to reposition itself
12409
     * when the position is re-applied (e.g. when the user scrolls away).
12410
     * @param isLocked Whether the overlay should locked in.
12411
     */
12412
    /**
12413
     * Sets whether the overlay's position should be locked in after it is positioned
12414
     * initially. When an overlay is locked in, it won't attempt to reposition itself
12415
     * when the position is re-applied (e.g. when the user scrolls away).
12416
     * @param {?=} isLocked Whether the overlay should locked in.
12417
     * @return {?}
12418
     */
12419
    FlexibleConnectedPositionStrategy.prototype.withLockedPosition = /**
12420
     * Sets whether the overlay's position should be locked in after it is positioned
12421
     * initially. When an overlay is locked in, it won't attempt to reposition itself
12422
     * when the position is re-applied (e.g. when the user scrolls away).
12423
     * @param {?=} isLocked Whether the overlay should locked in.
12424
     * @return {?}
12425
     */
12426
    function (isLocked) {
12427
        if (isLocked === void 0) { isLocked = true; }
12428
        this._positionLocked = isLocked;
12429
        return this;
12430
    };
12431
    /**
12432
     * Sets the origin element, relative to which to position the overlay.
12433
     * @param origin Reference to the new origin element.
12434
     */
12435
    /**
12436
     * Sets the origin element, relative to which to position the overlay.
12437
     * @param {?} origin Reference to the new origin element.
12438
     * @return {?}
12439
     */
12440
    FlexibleConnectedPositionStrategy.prototype.setOrigin = /**
12441
     * Sets the origin element, relative to which to position the overlay.
12442
     * @param {?} origin Reference to the new origin element.
12443
     * @return {?}
12444
     */
12445
    function (origin) {
12446
        this._origin = origin instanceof _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] ? origin.nativeElement : origin;
12447
        return this;
12448
    };
12449
    /**
12450
     * Sets the default offset for the overlay's connection point on the x-axis.
12451
     * @param offset New offset in the X axis.
12452
     */
12453
    /**
12454
     * Sets the default offset for the overlay's connection point on the x-axis.
12455
     * @param {?} offset New offset in the X axis.
12456
     * @return {?}
12457
     */
12458
    FlexibleConnectedPositionStrategy.prototype.withDefaultOffsetX = /**
12459
     * Sets the default offset for the overlay's connection point on the x-axis.
12460
     * @param {?} offset New offset in the X axis.
12461
     * @return {?}
12462
     */
12463
    function (offset) {
12464
        this._offsetX = offset;
12465
        return this;
12466
    };
12467
    /**
12468
     * Sets the default offset for the overlay's connection point on the y-axis.
12469
     * @param offset New offset in the Y axis.
12470
     */
12471
    /**
12472
     * Sets the default offset for the overlay's connection point on the y-axis.
12473
     * @param {?} offset New offset in the Y axis.
12474
     * @return {?}
12475
     */
12476
    FlexibleConnectedPositionStrategy.prototype.withDefaultOffsetY = /**
12477
     * Sets the default offset for the overlay's connection point on the y-axis.
12478
     * @param {?} offset New offset in the Y axis.
12479
     * @return {?}
12480
     */
12481
    function (offset) {
12482
        this._offsetY = offset;
12483
        return this;
12484
    };
12485
    /**
12486
     * Configures that the position strategy should set a `transform-origin` on some elements
12487
     * inside the overlay, depending on the current position that is being applied. This is
12488
     * useful for the cases where the origin of an animation can change depending on the
12489
     * alignment of the overlay.
12490
     * @param selector CSS selector that will be used to find the target
12491
     *    elements onto which to set the transform origin.
12492
     */
12493
    /**
12494
     * Configures that the position strategy should set a `transform-origin` on some elements
12495
     * inside the overlay, depending on the current position that is being applied. This is
12496
     * useful for the cases where the origin of an animation can change depending on the
12497
     * alignment of the overlay.
12498
     * @param {?} selector CSS selector that will be used to find the target
12499
     *    elements onto which to set the transform origin.
12500
     * @return {?}
12501
     */
12502
    FlexibleConnectedPositionStrategy.prototype.withTransformOriginOn = /**
12503
     * Configures that the position strategy should set a `transform-origin` on some elements
12504
     * inside the overlay, depending on the current position that is being applied. This is
12505
     * useful for the cases where the origin of an animation can change depending on the
12506
     * alignment of the overlay.
12507
     * @param {?} selector CSS selector that will be used to find the target
12508
     *    elements onto which to set the transform origin.
12509
     * @return {?}
12510
     */
12511
    function (selector) {
12512
        this._transformOriginSelector = selector;
12513
        return this;
12514
    };
12515
    /**
12516
     * Gets the (x, y) coordinate of a connection point on the origin based on a relative position.
12517
     * @param {?} originRect
12518
     * @param {?} pos
12519
     * @return {?}
12520
     */
12521
    FlexibleConnectedPositionStrategy.prototype._getOriginPoint = /**
12522
     * Gets the (x, y) coordinate of a connection point on the origin based on a relative position.
12523
     * @param {?} originRect
12524
     * @param {?} pos
12525
     * @return {?}
12526
     */
12527
    function (originRect, pos) {
12528
        var /** @type {?} */ x;
12529
        if (pos.originX == 'center') {
12530
            // Note: when centering we should always use the `left`
12531
            // offset, otherwise the position will be wrong in RTL.
12532
            x = originRect.left + (originRect.width / 2);
12533
        }
12534
        else {
12535
            var /** @type {?} */ startX = this._isRtl() ? originRect.right : originRect.left;
12536
            var /** @type {?} */ endX = this._isRtl() ? originRect.left : originRect.right;
12537
            x = pos.originX == 'start' ? startX : endX;
12538
        }
12539
        var /** @type {?} */ y;
12540
        if (pos.originY == 'center') {
12541
            y = originRect.top + (originRect.height / 2);
12542
        }
12543
        else {
12544
            y = pos.originY == 'top' ? originRect.top : originRect.bottom;
12545
        }
12546
        return { x: x, y: y };
12547
    };
12548
    /**
12549
     * Gets the (x, y) coordinate of the top-left corner of the overlay given a given position and
12550
     * origin point to which the overlay should be connected.
12551
     * @param {?} originPoint
12552
     * @param {?} overlayRect
12553
     * @param {?} pos
12554
     * @return {?}
12555
     */
12556
    FlexibleConnectedPositionStrategy.prototype._getOverlayPoint = /**
12557
     * Gets the (x, y) coordinate of the top-left corner of the overlay given a given position and
12558
     * origin point to which the overlay should be connected.
12559
     * @param {?} originPoint
12560
     * @param {?} overlayRect
12561
     * @param {?} pos
12562
     * @return {?}
12563
     */
12564
    function (originPoint, overlayRect, pos) {
12565
        // Calculate the (overlayStartX, overlayStartY), the start of the
12566
        // potential overlay position relative to the origin point.
12567
        var /** @type {?} */ overlayStartX;
12568
        if (pos.overlayX == 'center') {
12569
            overlayStartX = -overlayRect.width / 2;
12570
        }
12571
        else if (pos.overlayX === 'start') {
12572
            overlayStartX = this._isRtl() ? -overlayRect.width : 0;
12573
        }
12574
        else {
12575
            overlayStartX = this._isRtl() ? 0 : -overlayRect.width;
12576
        }
12577
        var /** @type {?} */ overlayStartY;
12578
        if (pos.overlayY == 'center') {
12579
            overlayStartY = -overlayRect.height / 2;
12580
        }
12581
        else {
12582
            overlayStartY = pos.overlayY == 'top' ? 0 : -overlayRect.height;
12583
        }
12584
        // The (x, y) coordinates of the overlay.
12585
        return {
12586
            x: originPoint.x + overlayStartX,
12587
            y: originPoint.y + overlayStartY,
12588
        };
12589
    };
12590
    /**
12591
     * Gets how well an overlay at the given point will fit within the viewport.
12592
     * @param {?} point
12593
     * @param {?} overlay
12594
     * @param {?} viewport
12595
     * @param {?} position
12596
     * @return {?}
12597
     */
12598
    FlexibleConnectedPositionStrategy.prototype._getOverlayFit = /**
12599
     * Gets how well an overlay at the given point will fit within the viewport.
12600
     * @param {?} point
12601
     * @param {?} overlay
12602
     * @param {?} viewport
12603
     * @param {?} position
12604
     * @return {?}
12605
     */
12606
    function (point, overlay, viewport, position) {
12607
        var x = point.x, y = point.y;
12608
        var /** @type {?} */ offsetX = this._getOffset(position, 'x');
12609
        var /** @type {?} */ offsetY = this._getOffset(position, 'y');
12610
        // Account for the offsets since they could push the overlay out of the viewport.
12611
        if (offsetX) {
12612
            x += offsetX;
12613
        }
12614
        if (offsetY) {
12615
            y += offsetY;
12616
        }
12617
        // How much the overlay would overflow at this position, on each side.
12618
        var /** @type {?} */ leftOverflow = 0 - x;
12619
        var /** @type {?} */ rightOverflow = (x + overlay.width) - viewport.width;
12620
        var /** @type {?} */ topOverflow = 0 - y;
12621
        var /** @type {?} */ bottomOverflow = (y + overlay.height) - viewport.height;
12622
        // Visible parts of the element on each axis.
12623
        var /** @type {?} */ visibleWidth = this._subtractOverflows(overlay.width, leftOverflow, rightOverflow);
12624
        var /** @type {?} */ visibleHeight = this._subtractOverflows(overlay.height, topOverflow, bottomOverflow);
12625
        var /** @type {?} */ visibleArea = visibleWidth * visibleHeight;
12626
        return {
12627
            visibleArea: visibleArea,
12628
            isCompletelyWithinViewport: (overlay.width * overlay.height) === visibleArea,
12629
            fitsInViewportVertically: visibleHeight === overlay.height,
12630
            fitsInViewportHorizontally: visibleWidth == overlay.width,
12631
        };
12632
    };
12633
    /**
12634
     * Whether the overlay can fit within the viewport when it may resize either its width or height.
12635
     * @param {?} fit How well the overlay fits in the viewport at some position.
12636
     * @param {?} point The (x, y) coordinates of the overlat at some position.
12637
     * @param {?} viewport The geometry of the viewport.
12638
     * @return {?}
12639
     */
12640
    FlexibleConnectedPositionStrategy.prototype._canFitWithFlexibleDimensions = /**
12641
     * Whether the overlay can fit within the viewport when it may resize either its width or height.
12642
     * @param {?} fit How well the overlay fits in the viewport at some position.
12643
     * @param {?} point The (x, y) coordinates of the overlat at some position.
12644
     * @param {?} viewport The geometry of the viewport.
12645
     * @return {?}
12646
     */
12647
    function (fit, point, viewport) {
12648
        if (this._hasFlexibleDimensions) {
12649
            var /** @type {?} */ availableHeight = viewport.bottom - point.y;
12650
            var /** @type {?} */ availableWidth = viewport.right - point.x;
12651
            var /** @type {?} */ minHeight = this._overlayRef.getConfig().minHeight;
12652
            var /** @type {?} */ minWidth = this._overlayRef.getConfig().minWidth;
12653
            var /** @type {?} */ verticalFit = fit.fitsInViewportVertically ||
12654
                (minHeight != null && minHeight <= availableHeight);
12655
            var /** @type {?} */ horizontalFit = fit.fitsInViewportHorizontally ||
12656
                (minWidth != null && minWidth <= availableWidth);
12657
            return verticalFit && horizontalFit;
12658
        }
12659
    };
12660
    /**
12661
     * Gets the point at which the overlay can be "pushed" on-screen. If the overlay is larger than
12662
     * the viewport, the top-left corner will be pushed on-screen (with overflow occuring on the
12663
     * right and bottom).
12664
     *
12665
     * @param {?} start The starting point from which the overlay is pushed.
12666
     * @param {?} overlay The overlay dimensions.
12667
     * @return {?} The point at which to position the overlay after pushing. This is effectively a new
12668
     *     originPoint.
12669
     */
12670
    FlexibleConnectedPositionStrategy.prototype._pushOverlayOnScreen = /**
12671
     * Gets the point at which the overlay can be "pushed" on-screen. If the overlay is larger than
12672
     * the viewport, the top-left corner will be pushed on-screen (with overflow occuring on the
12673
     * right and bottom).
12674
     *
12675
     * @param {?} start The starting point from which the overlay is pushed.
12676
     * @param {?} overlay The overlay dimensions.
12677
     * @return {?} The point at which to position the overlay after pushing. This is effectively a new
12678
     *     originPoint.
12679
     */
12680
    function (start, overlay) {
12681
        var /** @type {?} */ viewport = this._viewportRect;
12682
        // Determine how much the overlay goes outside the viewport on each side, which we'll use to
12683
        // decide which direction to push it.
12684
        var /** @type {?} */ overflowRight = Math.max(start.x + overlay.width - viewport.right, 0);
12685
        var /** @type {?} */ overflowBottom = Math.max(start.y + overlay.height - viewport.bottom, 0);
12686
        var /** @type {?} */ overflowTop = Math.max(viewport.top - start.y, 0);
12687
        var /** @type {?} */ overflowLeft = Math.max(viewport.left - start.x, 0);
12688
        // Amount by which to push the overlay in each direction such that it remains on-screen.
12689
        var /** @type {?} */ pushX, /** @type {?} */ pushY = 0;
12690
        // If the overlay fits completely within the bounds of the viewport, push it from whichever
12691
        // direction is goes off-screen. Otherwise, push the top-left corner such that its in the
12692
        // viewport and allow for the trailing end of the overlay to go out of bounds.
12693
        if (overlay.width <= viewport.width) {
12694
            pushX = overflowLeft || -overflowRight;
12695
        }
12696
        else {
12697
            pushX = viewport.left - start.x;
12698
        }
12699
        if (overlay.height <= viewport.height) {
12700
            pushY = overflowTop || -overflowBottom;
12701
        }
12702
        else {
12703
            pushY = viewport.top - start.y;
12704
        }
12705
        return {
12706
            x: start.x + pushX,
12707
            y: start.y + pushY,
12708
        };
12709
    };
12710
    /**
12711
     * Applies a computed position to the overlay and emits a position change.
12712
     * @param {?} position The position preference
12713
     * @param {?} originPoint The point on the origin element where the overlay is connected.
12714
     * @return {?}
12715
     */
12716
    FlexibleConnectedPositionStrategy.prototype._applyPosition = /**
12717
     * Applies a computed position to the overlay and emits a position change.
12718
     * @param {?} position The position preference
12719
     * @param {?} originPoint The point on the origin element where the overlay is connected.
12720
     * @return {?}
12721
     */
12722
    function (position, originPoint) {
12723
        this._setTransformOrigin(position);
12724
        this._setOverlayElementStyles(originPoint, position);
12725
        this._setBoundingBoxStyles(originPoint, position);
12726
        // Save the last connected position in case the position needs to be re-calculated.
12727
        this._lastPosition = position;
12728
        // Notify that the position has been changed along with its change properties.
12729
        // We only emit if we've got any subscriptions, because the scroll visibility
12730
        // calculcations can be somewhat expensive.
12731
        if (this._positionChangeSubscriptions > 0) {
12732
            var /** @type {?} */ scrollableViewProperties = this._getScrollVisibility();
12733
            var /** @type {?} */ changeEvent = new ConnectedOverlayPositionChange(position, scrollableViewProperties);
12734
            this._positionChanges.next(changeEvent);
12735
        }
12736
        this._isInitialRender = false;
12737
    };
12738
    /**
12739
     * Sets the transform origin based on the configured selector and the passed-in position.
12740
     * @param {?} position
12741
     * @return {?}
12742
     */
12743
    FlexibleConnectedPositionStrategy.prototype._setTransformOrigin = /**
12744
     * Sets the transform origin based on the configured selector and the passed-in position.
12745
     * @param {?} position
12746
     * @return {?}
12747
     */
12748
    function (position) {
12749
        if (!this._transformOriginSelector) {
12750
            return;
12751
        }
12752
        var /** @type {?} */ elements = /** @type {?} */ ((this._boundingBox)).querySelectorAll(this._transformOriginSelector);
12753
        var /** @type {?} */ xOrigin;
12754
        var /** @type {?} */ yOrigin = position.overlayY;
12755
        if (position.overlayX === 'center') {
12756
            xOrigin = 'center';
12757
        }
12758
        else if (this._isRtl()) {
12759
            xOrigin = position.overlayX === 'start' ? 'right' : 'left';
12760
        }
12761
        else {
12762
            xOrigin = position.overlayX === 'start' ? 'left' : 'right';
12763
        }
12764
        for (var /** @type {?} */ i = 0; i < elements.length; i++) {
12765
            elements[i].style.transformOrigin = xOrigin + " " + yOrigin;
12766
        }
12767
    };
12768
    /**
12769
     * Gets the position and size of the overlay's sizing container.
12770
     *
12771
     * This method does no measuring and applies no styles so that we can cheaply compute the
12772
     * bounds for all positions and choose the best fit based on these results.
12773
     * @param {?} origin
12774
     * @param {?} position
12775
     * @return {?}
12776
     */
12777
    FlexibleConnectedPositionStrategy.prototype._calculateBoundingBoxRect = /**
12778
     * Gets the position and size of the overlay's sizing container.
12779
     *
12780
     * This method does no measuring and applies no styles so that we can cheaply compute the
12781
     * bounds for all positions and choose the best fit based on these results.
12782
     * @param {?} origin
12783
     * @param {?} position
12784
     * @return {?}
12785
     */
12786
    function (origin, position) {
12787
        var /** @type {?} */ viewport = this._viewportRect;
12788
        var /** @type {?} */ isRtl = this._isRtl();
12789
        var /** @type {?} */ height, /** @type {?} */ top, /** @type {?} */ bottom;
12790
        if (position.overlayY === 'top') {
12791
            // Overlay is opening "downward" and thus is bound by the bottom viewport edge.
12792
            top = origin.y;
12793
            height = viewport.bottom - origin.y;
12794
        }
12795
        else if (position.overlayY === 'bottom') {
12796
            // Overlay is opening "upward" and thus is bound by the top viewport edge. We need to add
12797
            // the viewport margin back in, because the viewport rect is narrowed down to remove the
12798
            // margin, whereas the `origin` position is calculated based on its `ClientRect`.
12799
            bottom = viewport.height - origin.y + this._viewportMargin * 2;
12800
            height = viewport.height - bottom + this._viewportMargin;
12801
        }
12802
        else {
12803
            // If neither top nor bottom, it means that the overlay
12804
            // is vertically centered on the origin point.
12805
            var /** @type {?} */ smallestDistanceToViewportEdge = Math.min(viewport.bottom - origin.y, origin.y - viewport.left);
12806
            var /** @type {?} */ previousHeight = this._lastBoundingBoxSize.height;
12807
            height = smallestDistanceToViewportEdge * 2;
12808
            top = origin.y - smallestDistanceToViewportEdge;
12809
            if (height > previousHeight && !this._isInitialRender && !this._growAfterOpen) {
12810
                top = origin.y - (previousHeight / 2);
12811
            }
12812
        }
12813
        // The overlay is opening 'right-ward' (the content flows to the right).
12814
        var /** @type {?} */ isBoundedByRightViewportEdge = (position.overlayX === 'start' && !isRtl) ||
12815
            (position.overlayX === 'end' && isRtl);
12816
        // The overlay is opening 'left-ward' (the content flows to the left).
12817
        var /** @type {?} */ isBoundedByLeftViewportEdge = (position.overlayX === 'end' && !isRtl) ||
12818
            (position.overlayX === 'start' && isRtl);
12819
        var /** @type {?} */ width, /** @type {?} */ left, /** @type {?} */ right;
12820
        if (isBoundedByLeftViewportEdge) {
12821
            right = viewport.right - origin.x + this._viewportMargin;
12822
            width = origin.x - viewport.left;
12823
        }
12824
        else if (isBoundedByRightViewportEdge) {
12825
            left = origin.x;
12826
            width = viewport.right - origin.x;
12827
        }
12828
        else {
12829
            // If neither start nor end, it means that the overlay
12830
            // is horizontally centered on the origin point.
12831
            var /** @type {?} */ smallestDistanceToViewportEdge = Math.min(viewport.right - origin.x, origin.x - viewport.top);
12832
            var /** @type {?} */ previousWidth = this._lastBoundingBoxSize.width;
12833
            width = smallestDistanceToViewportEdge * 2;
12834
            left = origin.x - smallestDistanceToViewportEdge;
12835
            if (width > previousWidth && !this._isInitialRender && !this._growAfterOpen) {
12836
                left = origin.x - (previousWidth / 2);
12837
            }
12838
        }
12839
        return { top: top, left: left, bottom: bottom, right: right, width: width, height: height };
12840
    };
12841
    /**
12842
     * Sets the position and size of the overlay's sizing wrapper. The wrapper is positioned on the
12843
     * origin's connection point and stetches to the bounds of the viewport.
12844
     *
12845
     * @param {?} origin The point on the origin element where the overlay is connected.
12846
     * @param {?} position The position preference
12847
     * @return {?}
12848
     */
12849
    FlexibleConnectedPositionStrategy.prototype._setBoundingBoxStyles = /**
12850
     * Sets the position and size of the overlay's sizing wrapper. The wrapper is positioned on the
12851
     * origin's connection point and stetches to the bounds of the viewport.
12852
     *
12853
     * @param {?} origin The point on the origin element where the overlay is connected.
12854
     * @param {?} position The position preference
12855
     * @return {?}
12856
     */
12857
    function (origin, position) {
12858
        var /** @type {?} */ boundingBoxRect = this._calculateBoundingBoxRect(origin, position);
12859
        // It's weird if the overlay *grows* while scrolling, so we take the last size into account
12860
        // when applying a new size.
12861
        if (!this._isInitialRender && !this._growAfterOpen) {
12862
            boundingBoxRect.height = Math.min(boundingBoxRect.height, this._lastBoundingBoxSize.height);
12863
            boundingBoxRect.width = Math.min(boundingBoxRect.width, this._lastBoundingBoxSize.width);
12864
        }
12865
        var /** @type {?} */ styles = /** @type {?} */ ({});
12866
        if (this._hasExactPosition()) {
12867
            styles.top = styles.left = '0';
12868
            styles.bottom = styles.right = '';
12869
            styles.width = styles.height = '100%';
12870
        }
12871
        else {
12872
            var /** @type {?} */ maxHeight = this._overlayRef.getConfig().maxHeight;
12873
            var /** @type {?} */ maxWidth = this._overlayRef.getConfig().maxWidth;
12874
            styles.height = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceCssPixelValue"])(boundingBoxRect.height);
12875
            styles.top = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceCssPixelValue"])(boundingBoxRect.top);
12876
            styles.bottom = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceCssPixelValue"])(boundingBoxRect.bottom);
12877
            styles.width = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceCssPixelValue"])(boundingBoxRect.width);
12878
            styles.left = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceCssPixelValue"])(boundingBoxRect.left);
12879
            styles.right = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceCssPixelValue"])(boundingBoxRect.right);
12880
            // Push the pane content towards the proper direction.
12881
            if (position.overlayX === 'center') {
12882
                styles.alignItems = 'center';
12883
            }
12884
            else {
12885
                styles.alignItems = position.overlayX === 'end' ? 'flex-end' : 'flex-start';
12886
            }
12887
            if (position.overlayY === 'center') {
12888
                styles.justifyContent = 'center';
12889
            }
12890
            else {
12891
                styles.justifyContent = position.overlayY === 'bottom' ? 'flex-end' : 'flex-start';
12892
            }
12893
            if (maxHeight) {
12894
                styles.maxHeight = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceCssPixelValue"])(maxHeight);
12895
            }
12896
            if (maxWidth) {
12897
                styles.maxWidth = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceCssPixelValue"])(maxWidth);
12898
            }
12899
        }
12900
        this._lastBoundingBoxSize = boundingBoxRect;
12901
        extendStyles(/** @type {?} */ ((this._boundingBox)).style, styles);
12902
    };
12903
    /**
12904
     * Resets the styles for the bounding box so that a new positioning can be computed.
12905
     * @return {?}
12906
     */
12907
    FlexibleConnectedPositionStrategy.prototype._resetBoundingBoxStyles = /**
12908
     * Resets the styles for the bounding box so that a new positioning can be computed.
12909
     * @return {?}
12910
     */
12911
    function () {
12912
        extendStyles(/** @type {?} */ ((this._boundingBox)).style, /** @type {?} */ ({
12913
            top: '0',
12914
            left: '0',
12915
            right: '0',
12916
            bottom: '0',
12917
            height: '',
12918
            width: '',
12919
            alignItems: '',
12920
            justifyContent: '',
12921
        }));
12922
    };
12923
    /**
12924
     * Resets the styles for the overlay pane so that a new positioning can be computed.
12925
     * @return {?}
12926
     */
12927
    FlexibleConnectedPositionStrategy.prototype._resetOverlayElementStyles = /**
12928
     * Resets the styles for the overlay pane so that a new positioning can be computed.
12929
     * @return {?}
12930
     */
12931
    function () {
12932
        extendStyles(this._pane.style, /** @type {?} */ ({
12933
            top: '',
12934
            left: '',
12935
            bottom: '',
12936
            right: '',
12937
            position: '',
12938
        }));
12939
    };
12940
    /**
12941
     * Sets positioning styles to the overlay element.
12942
     * @param {?} originPoint
12943
     * @param {?} position
12944
     * @return {?}
12945
     */
12946
    FlexibleConnectedPositionStrategy.prototype._setOverlayElementStyles = /**
12947
     * Sets positioning styles to the overlay element.
12948
     * @param {?} originPoint
12949
     * @param {?} position
12950
     * @return {?}
12951
     */
12952
    function (originPoint, position) {
12953
        var /** @type {?} */ styles = /** @type {?} */ ({});
12954
        if (this._hasExactPosition()) {
12955
            extendStyles(styles, this._getExactOverlayY(position, originPoint));
12956
            extendStyles(styles, this._getExactOverlayX(position, originPoint));
12957
        }
12958
        else {
12959
            styles.position = 'static';
12960
        }
12961
        // Use a transform to apply the offsets. We do this because the `center` positions rely on
12962
        // being in the normal flex flow and setting a `top` / `left` at all will completely throw
12963
        // off the position. We also can't use margins, because they won't have an effect in some
12964
        // cases where the element doesn't have anything to "push off of". Finally, this works
12965
        // better both with flexible and non-flexible positioning.
12966
        var /** @type {?} */ transformString = '';
12967
        var /** @type {?} */ offsetX = this._getOffset(position, 'x');
12968
        var /** @type {?} */ offsetY = this._getOffset(position, 'y');
12969
        if (offsetX) {
12970
            transformString += "translateX(" + offsetX + "px) ";
12971
        }
12972
        if (offsetY) {
12973
            transformString += "translateY(" + offsetY + "px)";
12974
        }
12975
        styles.transform = transformString.trim();
12976
        // If a maxWidth or maxHeight is specified on the overlay, we remove them. We do this because
12977
        // we need these values to both be set to "100%" for the automatic flexible sizing to work.
12978
        // The maxHeight and maxWidth are set on the boundingBox in order to enforce the constraint.
12979
        if (this._hasFlexibleDimensions && this._overlayRef.getConfig().maxHeight) {
12980
            styles.maxHeight = '';
12981
        }
12982
        if (this._hasFlexibleDimensions && this._overlayRef.getConfig().maxWidth) {
12983
            styles.maxWidth = '';
12984
        }
12985
        extendStyles(this._pane.style, styles);
12986
    };
12987
    /**
12988
     * Gets the exact top/bottom for the overlay when not using flexible sizing or when pushing.
12989
     * @param {?} position
12990
     * @param {?} originPoint
12991
     * @return {?}
12992
     */
12993
    FlexibleConnectedPositionStrategy.prototype._getExactOverlayY = /**
12994
     * Gets the exact top/bottom for the overlay when not using flexible sizing or when pushing.
12995
     * @param {?} position
12996
     * @param {?} originPoint
12997
     * @return {?}
12998
     */
12999
    function (position, originPoint) {
13000
        // Reset any existing styles. This is necessary in case the
13001
        // preferred position has changed since the last `apply`.
13002
        var /** @type {?} */ styles = /** @type {?} */ ({ top: null, bottom: null });
13003
        var /** @type {?} */ overlayPoint = this._getOverlayPoint(originPoint, this._overlayRect, position);
13004
        if (this._isPushed) {
13005
            overlayPoint = this._pushOverlayOnScreen(overlayPoint, this._overlayRect);
13006
        }
13007
        // @breaking-change 7.0.0 Currently the `_overlayContainer` is optional in order to avoid a
13008
        // breaking change. The null check here can be removed once the `_overlayContainer` becomes
13009
        // a required parameter.
13010
        var /** @type {?} */ virtualKeyboardOffset = this._overlayContainer ?
13011
            this._overlayContainer.getContainerElement().getBoundingClientRect().top : 0;
13012
        // Normally this would be zero, however when the overlay is attached to an input (e.g. in an
13013
        // autocomplete), mobile browsers will shift everything in order to put the input in the middle
13014
        // of the screen and to make space for the virtual keyboard. We need to account for this offset,
13015
        // otherwise our positioning will be thrown off.
13016
        overlayPoint.y -= virtualKeyboardOffset;
13017
        // We want to set either `top` or `bottom` based on whether the overlay wants to appear
13018
        // above or below the origin and the direction in which the element will expand.
13019
        if (position.overlayY === 'bottom') {
13020
            // When using `bottom`, we adjust the y position such that it is the distance
13021
            // from the bottom of the viewport rather than the top.
13022
            var /** @type {?} */ documentHeight = this._document.documentElement.clientHeight;
13023
            styles.bottom = documentHeight - (overlayPoint.y + this._overlayRect.height) + "px";
13024
        }
13025
        else {
13026
            styles.top = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceCssPixelValue"])(overlayPoint.y);
13027
        }
13028
        return styles;
13029
    };
13030
    /**
13031
     * Gets the exact left/right for the overlay when not using flexible sizing or when pushing.
13032
     * @param {?} position
13033
     * @param {?} originPoint
13034
     * @return {?}
13035
     */
13036
    FlexibleConnectedPositionStrategy.prototype._getExactOverlayX = /**
13037
     * Gets the exact left/right for the overlay when not using flexible sizing or when pushing.
13038
     * @param {?} position
13039
     * @param {?} originPoint
13040
     * @return {?}
13041
     */
13042
    function (position, originPoint) {
13043
        // Reset any existing styles. This is necessary in case the preferred position has
13044
        // changed since the last `apply`.
13045
        var /** @type {?} */ styles = /** @type {?} */ ({ left: null, right: null });
13046
        var /** @type {?} */ overlayPoint = this._getOverlayPoint(originPoint, this._overlayRect, position);
13047
        if (this._isPushed) {
13048
            overlayPoint = this._pushOverlayOnScreen(overlayPoint, this._overlayRect);
13049
        }
13050
        // We want to set either `left` or `right` based on whether the overlay wants to appear "before"
13051
        // or "after" the origin, which determines the direction in which the element will expand.
13052
        // For the horizontal axis, the meaning of "before" and "after" change based on whether the
13053
        // page is in RTL or LTR.
13054
        var /** @type {?} */ horizontalStyleProperty;
13055
        if (this._isRtl()) {
13056
            horizontalStyleProperty = position.overlayX === 'end' ? 'left' : 'right';
13057
        }
13058
        else {
13059
            horizontalStyleProperty = position.overlayX === 'end' ? 'right' : 'left';
13060
        }
13061
        // When we're setting `right`, we adjust the x position such that it is the distance
13062
        // from the right edge of the viewport rather than the left edge.
13063
        if (horizontalStyleProperty === 'right') {
13064
            var /** @type {?} */ documentWidth = this._document.documentElement.clientWidth;
13065
            styles.right = documentWidth - (overlayPoint.x + this._overlayRect.width) + "px";
13066
        }
13067
        else {
13068
            styles.left = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceCssPixelValue"])(overlayPoint.x);
13069
        }
13070
        return styles;
13071
    };
13072
    /**
13073
     * Gets the view properties of the trigger and overlay, including whether they are clipped
13074
     * or completely outside the view of any of the strategy's scrollables.
13075
     * @return {?}
13076
     */
13077
    FlexibleConnectedPositionStrategy.prototype._getScrollVisibility = /**
13078
     * Gets the view properties of the trigger and overlay, including whether they are clipped
13079
     * or completely outside the view of any of the strategy's scrollables.
13080
     * @return {?}
13081
     */
13082
    function () {
13083
        // Note: needs fresh rects since the position could've changed.
13084
        var /** @type {?} */ originBounds = this._origin.getBoundingClientRect();
13085
        var /** @type {?} */ overlayBounds = this._pane.getBoundingClientRect();
13086
        // TODO(jelbourn): instead of needing all of the client rects for these scrolling containers
13087
        // every time, we should be able to use the scrollTop of the containers if the size of those
13088
        // containers hasn't changed.
13089
        var /** @type {?} */ scrollContainerBounds = this.scrollables.map(function (scrollable) {
13090
            return scrollable.getElementRef().nativeElement.getBoundingClientRect();
13091
        });
13092
        return {
13093
            isOriginClipped: isElementClippedByScrolling(originBounds, scrollContainerBounds),
13094
            isOriginOutsideView: isElementScrolledOutsideView(originBounds, scrollContainerBounds),
13095
            isOverlayClipped: isElementClippedByScrolling(overlayBounds, scrollContainerBounds),
13096
            isOverlayOutsideView: isElementScrolledOutsideView(overlayBounds, scrollContainerBounds),
13097
        };
13098
    };
13099
    /**
13100
     * Subtracts the amount that an element is overflowing on an axis from it's length.
13101
     * @param {?} length
13102
     * @param {...?} overflows
13103
     * @return {?}
13104
     */
13105
    FlexibleConnectedPositionStrategy.prototype._subtractOverflows = /**
13106
     * Subtracts the amount that an element is overflowing on an axis from it's length.
13107
     * @param {?} length
13108
     * @param {...?} overflows
13109
     * @return {?}
13110
     */
13111
    function (length) {
13112
        var overflows = [];
13113
        for (var _i = 1; _i < arguments.length; _i++) {
13114
            overflows[_i - 1] = arguments[_i];
13115
        }
13116
        return overflows.reduce(function (currentValue, currentOverflow) {
13117
            return currentValue - Math.max(currentOverflow, 0);
13118
        }, length);
13119
    };
13120
    /**
13121
     * Narrows the given viewport rect by the current _viewportMargin.
13122
     * @return {?}
13123
     */
13124
    FlexibleConnectedPositionStrategy.prototype._getNarrowedViewportRect = /**
13125
     * Narrows the given viewport rect by the current _viewportMargin.
13126
     * @return {?}
13127
     */
13128
    function () {
13129
        // We recalculate the viewport rect here ourselves, rather than using the ViewportRuler,
13130
        // because we want to use the `clientWidth` and `clientHeight` as the base. The difference
13131
        // being that the client properties don't include the scrollbar, as opposed to `innerWidth`
13132
        // and `innerHeight` that do. This is necessary, because the overlay container uses
13133
        // 100% `width` and `height` which don't include the scrollbar either.
13134
        var /** @type {?} */ width = this._document.documentElement.clientWidth;
13135
        var /** @type {?} */ height = this._document.documentElement.clientHeight;
13136
        var /** @type {?} */ scrollPosition = this._viewportRuler.getViewportScrollPosition();
13137
        return {
13138
            top: scrollPosition.top + this._viewportMargin,
13139
            left: scrollPosition.left + this._viewportMargin,
13140
            right: scrollPosition.left + width - this._viewportMargin,
13141
            bottom: scrollPosition.top + height - this._viewportMargin,
13142
            width: width - (2 * this._viewportMargin),
13143
            height: height - (2 * this._viewportMargin),
13144
        };
13145
    };
13146
    /**
13147
     * Whether the we're dealing with an RTL context
13148
     * @return {?}
13149
     */
13150
    FlexibleConnectedPositionStrategy.prototype._isRtl = /**
13151
     * Whether the we're dealing with an RTL context
13152
     * @return {?}
13153
     */
13154
    function () {
13155
        return this._overlayRef.getDirection() === 'rtl';
13156
    };
13157
    /**
13158
     * Determines whether the overlay uses exact or flexible positioning.
13159
     * @return {?}
13160
     */
13161
    FlexibleConnectedPositionStrategy.prototype._hasExactPosition = /**
13162
     * Determines whether the overlay uses exact or flexible positioning.
13163
     * @return {?}
13164
     */
13165
    function () {
13166
        return !this._hasFlexibleDimensions || this._isPushed;
13167
    };
13168
    /**
13169
     * Retrieves the offset of a position along the x or y axis.
13170
     * @param {?} position
13171
     * @param {?} axis
13172
     * @return {?}
13173
     */
13174
    FlexibleConnectedPositionStrategy.prototype._getOffset = /**
13175
     * Retrieves the offset of a position along the x or y axis.
13176
     * @param {?} position
13177
     * @param {?} axis
13178
     * @return {?}
13179
     */
13180
    function (position, axis) {
13181
        if (axis === 'x') {
13182
            // We don't do something like `position['offset' + axis]` in
13183
            // order to avoid breking minifiers that rename properties.
13184
            return position.offsetX == null ? this._offsetX : position.offsetX;
13185
        }
13186
        return position.offsetY == null ? this._offsetY : position.offsetY;
13187
    };
13188
    /**
13189
     * Validates that the current position match the expected values.
13190
     * @return {?}
13191
     */
13192
    FlexibleConnectedPositionStrategy.prototype._validatePositions = /**
13193
     * Validates that the current position match the expected values.
13194
     * @return {?}
13195
     */
13196
    function () {
13197
        if (!this._preferredPositions.length) {
13198
            throw Error('FlexibleConnectedPositionStrategy: At least one position is required.');
13199
        }
13200
        // TODO(crisbeto): remove these once Angular's template type
13201
        // checking is advanced enough to catch these cases.
13202
        this._preferredPositions.forEach(function (pair) {
13203
            validateHorizontalPosition('originX', pair.originX);
13204
            validateVerticalPosition('originY', pair.originY);
13205
            validateHorizontalPosition('overlayX', pair.overlayX);
13206
            validateVerticalPosition('overlayY', pair.overlayY);
13207
        });
13208
    };
13209
    return FlexibleConnectedPositionStrategy;
13210
}());
13211
/**
13212
 * Shallow-extends a stylesheet object with another stylesheet object.
13213
 * @param {?} dest
13214
 * @param {?} source
13215
 * @return {?}
13216
 */
13217
function extendStyles(dest, source) {
13218
    for (var /** @type {?} */ key in source) {
13219
        if (source.hasOwnProperty(key)) {
13220
            dest[key] = source[key];
13221
        }
13222
    }
13223
    return dest;
13224
}
13225
 
13226
/**
13227
 * @fileoverview added by tsickle
13228
 * @suppress {checkTypes} checked by tsc
13229
 */
13230
/**
13231
 * A strategy for positioning overlays. Using this strategy, an overlay is given an
13232
 * implicit position relative to some origin element. The relative position is defined in terms of
13233
 * a point on the origin element that is connected to a point on the overlay element. For example,
13234
 * a basic dropdown is connecting the bottom-left corner of the origin to the top-left corner
13235
 * of the overlay.
13236
 * @deprecated Use `FlexibleConnectedPositionStrategy` instead.
13237
 * \@breaking-change 7.0.0
13238
 */
13239
var  /**
13240
 * A strategy for positioning overlays. Using this strategy, an overlay is given an
13241
 * implicit position relative to some origin element. The relative position is defined in terms of
13242
 * a point on the origin element that is connected to a point on the overlay element. For example,
13243
 * a basic dropdown is connecting the bottom-left corner of the origin to the top-left corner
13244
 * of the overlay.
13245
 * @deprecated Use `FlexibleConnectedPositionStrategy` instead.
13246
 * \@breaking-change 7.0.0
13247
 */
13248
ConnectedPositionStrategy = /** @class */ (function () {
13249
    function ConnectedPositionStrategy(originPos, overlayPos, connectedTo, viewportRuler, document,
13250
    // @breaking-change 7.0.0 `platform` parameter to be made required.
13251
    // @breaking-change 7.0.0 `platform` parameter to be made required.
13252
    platform) {
13253
        /**
13254
         * Ordered list of preferred positions, from most to least desirable.
13255
         */
13256
        this._preferredPositions = [];
13257
        // Since the `ConnectedPositionStrategy` is deprecated and we don't want to maintain
13258
        // the extra logic, we create an instance of the positioning strategy that has some
13259
        // defaults that make it behave as the old position strategy and to which we'll
13260
        // proxy all of the API calls.
13261
        this._positionStrategy =
13262
            new FlexibleConnectedPositionStrategy(connectedTo, viewportRuler, document, platform)
13263
                .withFlexibleDimensions(false)
13264
                .withPush(false)
13265
                .withViewportMargin(0);
13266
        this.withFallbackPosition(originPos, overlayPos);
13267
    }
13268
    Object.defineProperty(ConnectedPositionStrategy.prototype, "_isRtl", {
13269
        /** Whether the we're dealing with an RTL context */
13270
        get: /**
13271
         * Whether the we're dealing with an RTL context
13272
         * @return {?}
13273
         */
13274
        function () {
13275
            return this._overlayRef.getDirection() === 'rtl';
13276
        },
13277
        enumerable: true,
13278
        configurable: true
13279
    });
13280
    Object.defineProperty(ConnectedPositionStrategy.prototype, "onPositionChange", {
13281
        /** Emits an event when the connection point changes. */
13282
        get: /**
13283
         * Emits an event when the connection point changes.
13284
         * @return {?}
13285
         */
13286
        function () {
13287
            return this._positionStrategy.positionChanges;
13288
        },
13289
        enumerable: true,
13290
        configurable: true
13291
    });
13292
    Object.defineProperty(ConnectedPositionStrategy.prototype, "positions", {
13293
        /** Ordered list of preferred positions, from most to least desirable. */
13294
        get: /**
13295
         * Ordered list of preferred positions, from most to least desirable.
13296
         * @return {?}
13297
         */
13298
        function () {
13299
            return this._preferredPositions;
13300
        },
13301
        enumerable: true,
13302
        configurable: true
13303
    });
13304
    /** Attach this position strategy to an overlay. */
13305
    /**
13306
     * Attach this position strategy to an overlay.
13307
     * @param {?} overlayRef
13308
     * @return {?}
13309
     */
13310
    ConnectedPositionStrategy.prototype.attach = /**
13311
     * Attach this position strategy to an overlay.
13312
     * @param {?} overlayRef
13313
     * @return {?}
13314
     */
13315
    function (overlayRef) {
13316
        this._overlayRef = overlayRef;
13317
        this._positionStrategy.attach(overlayRef);
13318
        if (this._direction) {
13319
            overlayRef.setDirection(this._direction);
13320
            this._direction = null;
13321
        }
13322
    };
13323
    /** Disposes all resources used by the position strategy. */
13324
    /**
13325
     * Disposes all resources used by the position strategy.
13326
     * @return {?}
13327
     */
13328
    ConnectedPositionStrategy.prototype.dispose = /**
13329
     * Disposes all resources used by the position strategy.
13330
     * @return {?}
13331
     */
13332
    function () {
13333
        this._positionStrategy.dispose();
13334
    };
13335
    /** @docs-private */
13336
    /**
13337
     * \@docs-private
13338
     * @return {?}
13339
     */
13340
    ConnectedPositionStrategy.prototype.detach = /**
13341
     * \@docs-private
13342
     * @return {?}
13343
     */
13344
    function () {
13345
        this._positionStrategy.detach();
13346
    };
13347
    /**
13348
     * Updates the position of the overlay element, using whichever preferred position relative
13349
     * to the origin fits on-screen.
13350
     * @docs-private
13351
     */
13352
    /**
13353
     * Updates the position of the overlay element, using whichever preferred position relative
13354
     * to the origin fits on-screen.
13355
     * \@docs-private
13356
     * @return {?}
13357
     */
13358
    ConnectedPositionStrategy.prototype.apply = /**
13359
     * Updates the position of the overlay element, using whichever preferred position relative
13360
     * to the origin fits on-screen.
13361
     * \@docs-private
13362
     * @return {?}
13363
     */
13364
    function () {
13365
        this._positionStrategy.apply();
13366
    };
13367
    /**
13368
     * Re-positions the overlay element with the trigger in its last calculated position,
13369
     * even if a position higher in the "preferred positions" list would now fit. This
13370
     * allows one to re-align the panel without changing the orientation of the panel.
13371
     */
13372
    /**
13373
     * Re-positions the overlay element with the trigger in its last calculated position,
13374
     * even if a position higher in the "preferred positions" list would now fit. This
13375
     * allows one to re-align the panel without changing the orientation of the panel.
13376
     * @return {?}
13377
     */
13378
    ConnectedPositionStrategy.prototype.recalculateLastPosition = /**
13379
     * Re-positions the overlay element with the trigger in its last calculated position,
13380
     * even if a position higher in the "preferred positions" list would now fit. This
13381
     * allows one to re-align the panel without changing the orientation of the panel.
13382
     * @return {?}
13383
     */
13384
    function () {
13385
        this._positionStrategy.reapplyLastPosition();
13386
    };
13387
    /**
13388
     * Sets the list of Scrollable containers that host the origin element so that
13389
     * on reposition we can evaluate if it or the overlay has been clipped or outside view. Every
13390
     * Scrollable must be an ancestor element of the strategy's origin element.
13391
     */
13392
    /**
13393
     * Sets the list of Scrollable containers that host the origin element so that
13394
     * on reposition we can evaluate if it or the overlay has been clipped or outside view. Every
13395
     * Scrollable must be an ancestor element of the strategy's origin element.
13396
     * @param {?} scrollables
13397
     * @return {?}
13398
     */
13399
    ConnectedPositionStrategy.prototype.withScrollableContainers = /**
13400
     * Sets the list of Scrollable containers that host the origin element so that
13401
     * on reposition we can evaluate if it or the overlay has been clipped or outside view. Every
13402
     * Scrollable must be an ancestor element of the strategy's origin element.
13403
     * @param {?} scrollables
13404
     * @return {?}
13405
     */
13406
    function (scrollables) {
13407
        this._positionStrategy.withScrollableContainers(scrollables);
13408
    };
13409
    /**
13410
     * Adds a new preferred fallback position.
13411
     * @param originPos
13412
     * @param overlayPos
13413
     */
13414
    /**
13415
     * Adds a new preferred fallback position.
13416
     * @param {?} originPos
13417
     * @param {?} overlayPos
13418
     * @param {?=} offsetX
13419
     * @param {?=} offsetY
13420
     * @return {?}
13421
     */
13422
    ConnectedPositionStrategy.prototype.withFallbackPosition = /**
13423
     * Adds a new preferred fallback position.
13424
     * @param {?} originPos
13425
     * @param {?} overlayPos
13426
     * @param {?=} offsetX
13427
     * @param {?=} offsetY
13428
     * @return {?}
13429
     */
13430
    function (originPos, overlayPos, offsetX, offsetY) {
13431
        var /** @type {?} */ position = new ConnectionPositionPair(originPos, overlayPos, offsetX, offsetY);
13432
        this._preferredPositions.push(position);
13433
        this._positionStrategy.withPositions(this._preferredPositions);
13434
        return this;
13435
    };
13436
    /**
13437
     * Sets the layout direction so the overlay's position can be adjusted to match.
13438
     * @param dir New layout direction.
13439
     */
13440
    /**
13441
     * Sets the layout direction so the overlay's position can be adjusted to match.
13442
     * @param {?} dir New layout direction.
13443
     * @return {?}
13444
     */
13445
    ConnectedPositionStrategy.prototype.withDirection = /**
13446
     * Sets the layout direction so the overlay's position can be adjusted to match.
13447
     * @param {?} dir New layout direction.
13448
     * @return {?}
13449
     */
13450
    function (dir) {
13451
        // Since the direction might be declared before the strategy is attached,
13452
        // we save the value in a temporary property and we'll transfer it to the
13453
        // overlay ref on attachment.
13454
        if (this._overlayRef) {
13455
            this._overlayRef.setDirection(dir);
13456
        }
13457
        else {
13458
            this._direction = dir;
13459
        }
13460
        return this;
13461
    };
13462
    /**
13463
     * Sets an offset for the overlay's connection point on the x-axis
13464
     * @param offset New offset in the X axis.
13465
     */
13466
    /**
13467
     * Sets an offset for the overlay's connection point on the x-axis
13468
     * @param {?} offset New offset in the X axis.
13469
     * @return {?}
13470
     */
13471
    ConnectedPositionStrategy.prototype.withOffsetX = /**
13472
     * Sets an offset for the overlay's connection point on the x-axis
13473
     * @param {?} offset New offset in the X axis.
13474
     * @return {?}
13475
     */
13476
    function (offset) {
13477
        this._positionStrategy.withDefaultOffsetX(offset);
13478
        return this;
13479
    };
13480
    /**
13481
     * Sets an offset for the overlay's connection point on the y-axis
13482
     * @param  offset New offset in the Y axis.
13483
     */
13484
    /**
13485
     * Sets an offset for the overlay's connection point on the y-axis
13486
     * @param {?} offset New offset in the Y axis.
13487
     * @return {?}
13488
     */
13489
    ConnectedPositionStrategy.prototype.withOffsetY = /**
13490
     * Sets an offset for the overlay's connection point on the y-axis
13491
     * @param {?} offset New offset in the Y axis.
13492
     * @return {?}
13493
     */
13494
    function (offset) {
13495
        this._positionStrategy.withDefaultOffsetY(offset);
13496
        return this;
13497
    };
13498
    /**
13499
     * Sets whether the overlay's position should be locked in after it is positioned
13500
     * initially. When an overlay is locked in, it won't attempt to reposition itself
13501
     * when the position is re-applied (e.g. when the user scrolls away).
13502
     * @param isLocked Whether the overlay should locked in.
13503
     */
13504
    /**
13505
     * Sets whether the overlay's position should be locked in after it is positioned
13506
     * initially. When an overlay is locked in, it won't attempt to reposition itself
13507
     * when the position is re-applied (e.g. when the user scrolls away).
13508
     * @param {?} isLocked Whether the overlay should locked in.
13509
     * @return {?}
13510
     */
13511
    ConnectedPositionStrategy.prototype.withLockedPosition = /**
13512
     * Sets whether the overlay's position should be locked in after it is positioned
13513
     * initially. When an overlay is locked in, it won't attempt to reposition itself
13514
     * when the position is re-applied (e.g. when the user scrolls away).
13515
     * @param {?} isLocked Whether the overlay should locked in.
13516
     * @return {?}
13517
     */
13518
    function (isLocked) {
13519
        this._positionStrategy.withLockedPosition(isLocked);
13520
        return this;
13521
    };
13522
    /**
13523
     * Overwrites the current set of positions with an array of new ones.
13524
     * @param positions Position pairs to be set on the strategy.
13525
     */
13526
    /**
13527
     * Overwrites the current set of positions with an array of new ones.
13528
     * @param {?} positions Position pairs to be set on the strategy.
13529
     * @return {?}
13530
     */
13531
    ConnectedPositionStrategy.prototype.withPositions = /**
13532
     * Overwrites the current set of positions with an array of new ones.
13533
     * @param {?} positions Position pairs to be set on the strategy.
13534
     * @return {?}
13535
     */
13536
    function (positions) {
13537
        this._preferredPositions = positions.slice();
13538
        this._positionStrategy.withPositions(this._preferredPositions);
13539
        return this;
13540
    };
13541
    /**
13542
     * Sets the origin element, relative to which to position the overlay.
13543
     * @param origin Reference to the new origin element.
13544
     */
13545
    /**
13546
     * Sets the origin element, relative to which to position the overlay.
13547
     * @param {?} origin Reference to the new origin element.
13548
     * @return {?}
13549
     */
13550
    ConnectedPositionStrategy.prototype.setOrigin = /**
13551
     * Sets the origin element, relative to which to position the overlay.
13552
     * @param {?} origin Reference to the new origin element.
13553
     * @return {?}
13554
     */
13555
    function (origin) {
13556
        this._positionStrategy.setOrigin(origin);
13557
        return this;
13558
    };
13559
    return ConnectedPositionStrategy;
13560
}());
13561
 
13562
/**
13563
 * @fileoverview added by tsickle
13564
 * @suppress {checkTypes} checked by tsc
13565
 */
13566
 
13567
/**
13568
 * A strategy for positioning overlays. Using this strategy, an overlay is given an
13569
 * explicit position relative to the browser's viewport. We use flexbox, instead of
13570
 * transforms, in order to avoid issues with subpixel rendering which can cause the
13571
 * element to become blurry.
13572
 */
13573
var  /**
13574
 * A strategy for positioning overlays. Using this strategy, an overlay is given an
13575
 * explicit position relative to the browser's viewport. We use flexbox, instead of
13576
 * transforms, in order to avoid issues with subpixel rendering which can cause the
13577
 * element to become blurry.
13578
 */
13579
GlobalPositionStrategy = /** @class */ (function () {
13580
    function GlobalPositionStrategy() {
13581
        this._cssPosition = 'static';
13582
        this._topOffset = '';
13583
        this._bottomOffset = '';
13584
        this._leftOffset = '';
13585
        this._rightOffset = '';
13586
        this._alignItems = '';
13587
        this._justifyContent = '';
13588
        this._width = '';
13589
        this._height = '';
13590
    }
13591
    /**
13592
     * @param {?} overlayRef
13593
     * @return {?}
13594
     */
13595
    GlobalPositionStrategy.prototype.attach = /**
13596
     * @param {?} overlayRef
13597
     * @return {?}
13598
     */
13599
    function (overlayRef) {
13600
        var /** @type {?} */ config = overlayRef.getConfig();
13601
        this._overlayRef = overlayRef;
13602
        if (this._width && !config.width) {
13603
            overlayRef.updateSize({ width: this._width });
13604
        }
13605
        if (this._height && !config.height) {
13606
            overlayRef.updateSize({ height: this._height });
13607
        }
13608
        overlayRef.hostElement.classList.add('cdk-global-overlay-wrapper');
13609
    };
13610
    /**
13611
     * Sets the top position of the overlay. Clears any previously set vertical position.
13612
     * @param value New top offset.
13613
     */
13614
    /**
13615
     * Sets the top position of the overlay. Clears any previously set vertical position.
13616
     * @param {?=} value New top offset.
13617
     * @return {?}
13618
     */
13619
    GlobalPositionStrategy.prototype.top = /**
13620
     * Sets the top position of the overlay. Clears any previously set vertical position.
13621
     * @param {?=} value New top offset.
13622
     * @return {?}
13623
     */
13624
    function (value) {
13625
        if (value === void 0) { value = ''; }
13626
        this._bottomOffset = '';
13627
        this._topOffset = value;
13628
        this._alignItems = 'flex-start';
13629
        return this;
13630
    };
13631
    /**
13632
     * Sets the left position of the overlay. Clears any previously set horizontal position.
13633
     * @param value New left offset.
13634
     */
13635
    /**
13636
     * Sets the left position of the overlay. Clears any previously set horizontal position.
13637
     * @param {?=} value New left offset.
13638
     * @return {?}
13639
     */
13640
    GlobalPositionStrategy.prototype.left = /**
13641
     * Sets the left position of the overlay. Clears any previously set horizontal position.
13642
     * @param {?=} value New left offset.
13643
     * @return {?}
13644
     */
13645
    function (value) {
13646
        if (value === void 0) { value = ''; }
13647
        this._rightOffset = '';
13648
        this._leftOffset = value;
13649
        this._justifyContent = 'flex-start';
13650
        return this;
13651
    };
13652
    /**
13653
     * Sets the bottom position of the overlay. Clears any previously set vertical position.
13654
     * @param value New bottom offset.
13655
     */
13656
    /**
13657
     * Sets the bottom position of the overlay. Clears any previously set vertical position.
13658
     * @param {?=} value New bottom offset.
13659
     * @return {?}
13660
     */
13661
    GlobalPositionStrategy.prototype.bottom = /**
13662
     * Sets the bottom position of the overlay. Clears any previously set vertical position.
13663
     * @param {?=} value New bottom offset.
13664
     * @return {?}
13665
     */
13666
    function (value) {
13667
        if (value === void 0) { value = ''; }
13668
        this._topOffset = '';
13669
        this._bottomOffset = value;
13670
        this._alignItems = 'flex-end';
13671
        return this;
13672
    };
13673
    /**
13674
     * Sets the right position of the overlay. Clears any previously set horizontal position.
13675
     * @param value New right offset.
13676
     */
13677
    /**
13678
     * Sets the right position of the overlay. Clears any previously set horizontal position.
13679
     * @param {?=} value New right offset.
13680
     * @return {?}
13681
     */
13682
    GlobalPositionStrategy.prototype.right = /**
13683
     * Sets the right position of the overlay. Clears any previously set horizontal position.
13684
     * @param {?=} value New right offset.
13685
     * @return {?}
13686
     */
13687
    function (value) {
13688
        if (value === void 0) { value = ''; }
13689
        this._leftOffset = '';
13690
        this._rightOffset = value;
13691
        this._justifyContent = 'flex-end';
13692
        return this;
13693
    };
13694
    /**
13695
     * Sets the overlay width and clears any previously set width.
13696
     * @param value New width for the overlay
13697
     * @deprecated Pass the `width` through the `OverlayConfig`.
13698
     * @breaking-change 7.0.0
13699
     */
13700
    /**
13701
     * Sets the overlay width and clears any previously set width.
13702
     * @deprecated Pass the `width` through the `OverlayConfig`.
13703
     * \@breaking-change 7.0.0
13704
     * @param {?=} value New width for the overlay
13705
     * @return {?}
13706
     */
13707
    GlobalPositionStrategy.prototype.width = /**
13708
     * Sets the overlay width and clears any previously set width.
13709
     * @deprecated Pass the `width` through the `OverlayConfig`.
13710
     * \@breaking-change 7.0.0
13711
     * @param {?=} value New width for the overlay
13712
     * @return {?}
13713
     */
13714
    function (value) {
13715
        if (value === void 0) { value = ''; }
13716
        if (this._overlayRef) {
13717
            this._overlayRef.updateSize({ width: value });
13718
        }
13719
        else {
13720
            this._width = value;
13721
        }
13722
        return this;
13723
    };
13724
    /**
13725
     * Sets the overlay height and clears any previously set height.
13726
     * @param value New height for the overlay
13727
     * @deprecated Pass the `height` through the `OverlayConfig`.
13728
     * @breaking-change 7.0.0
13729
     */
13730
    /**
13731
     * Sets the overlay height and clears any previously set height.
13732
     * @deprecated Pass the `height` through the `OverlayConfig`.
13733
     * \@breaking-change 7.0.0
13734
     * @param {?=} value New height for the overlay
13735
     * @return {?}
13736
     */
13737
    GlobalPositionStrategy.prototype.height = /**
13738
     * Sets the overlay height and clears any previously set height.
13739
     * @deprecated Pass the `height` through the `OverlayConfig`.
13740
     * \@breaking-change 7.0.0
13741
     * @param {?=} value New height for the overlay
13742
     * @return {?}
13743
     */
13744
    function (value) {
13745
        if (value === void 0) { value = ''; }
13746
        if (this._overlayRef) {
13747
            this._overlayRef.updateSize({ height: value });
13748
        }
13749
        else {
13750
            this._height = value;
13751
        }
13752
        return this;
13753
    };
13754
    /**
13755
     * Centers the overlay horizontally with an optional offset.
13756
     * Clears any previously set horizontal position.
13757
     *
13758
     * @param offset Overlay offset from the horizontal center.
13759
     */
13760
    /**
13761
     * Centers the overlay horizontally with an optional offset.
13762
     * Clears any previously set horizontal position.
13763
     *
13764
     * @param {?=} offset Overlay offset from the horizontal center.
13765
     * @return {?}
13766
     */
13767
    GlobalPositionStrategy.prototype.centerHorizontally = /**
13768
     * Centers the overlay horizontally with an optional offset.
13769
     * Clears any previously set horizontal position.
13770
     *
13771
     * @param {?=} offset Overlay offset from the horizontal center.
13772
     * @return {?}
13773
     */
13774
    function (offset) {
13775
        if (offset === void 0) { offset = ''; }
13776
        this.left(offset);
13777
        this._justifyContent = 'center';
13778
        return this;
13779
    };
13780
    /**
13781
     * Centers the overlay vertically with an optional offset.
13782
     * Clears any previously set vertical position.
13783
     *
13784
     * @param offset Overlay offset from the vertical center.
13785
     */
13786
    /**
13787
     * Centers the overlay vertically with an optional offset.
13788
     * Clears any previously set vertical position.
13789
     *
13790
     * @param {?=} offset Overlay offset from the vertical center.
13791
     * @return {?}
13792
     */
13793
    GlobalPositionStrategy.prototype.centerVertically = /**
13794
     * Centers the overlay vertically with an optional offset.
13795
     * Clears any previously set vertical position.
13796
     *
13797
     * @param {?=} offset Overlay offset from the vertical center.
13798
     * @return {?}
13799
     */
13800
    function (offset) {
13801
        if (offset === void 0) { offset = ''; }
13802
        this.top(offset);
13803
        this._alignItems = 'center';
13804
        return this;
13805
    };
13806
    /**
13807
     * Apply the position to the element.
13808
     * @docs-private
13809
     */
13810
    /**
13811
     * Apply the position to the element.
13812
     * \@docs-private
13813
     * @return {?}
13814
     */
13815
    GlobalPositionStrategy.prototype.apply = /**
13816
     * Apply the position to the element.
13817
     * \@docs-private
13818
     * @return {?}
13819
     */
13820
    function () {
13821
        // Since the overlay ref applies the strategy asynchronously, it could
13822
        // have been disposed before it ends up being applied. If that is the
13823
        // case, we shouldn't do anything.
13824
        if (!this._overlayRef.hasAttached()) {
13825
            return;
13826
        }
13827
        var /** @type {?} */ styles = this._overlayRef.overlayElement.style;
13828
        var /** @type {?} */ parentStyles = this._overlayRef.hostElement.style;
13829
        var /** @type {?} */ config = this._overlayRef.getConfig();
13830
        styles.position = this._cssPosition;
13831
        styles.marginLeft = config.width === '100%' ? '0' : this._leftOffset;
13832
        styles.marginTop = config.height === '100%' ? '0' : this._topOffset;
13833
        styles.marginBottom = this._bottomOffset;
13834
        styles.marginRight = this._rightOffset;
13835
        if (config.width === '100%') {
13836
            parentStyles.justifyContent = 'flex-start';
13837
        }
13838
        else if (this._justifyContent === 'center') {
13839
            parentStyles.justifyContent = 'center';
13840
        }
13841
        else if (this._overlayRef.getConfig().direction === 'rtl') {
13842
            // In RTL the browser will invert `flex-start` and `flex-end` automatically, but we
13843
            // don't want that because our positioning is explicitly `left` and `right`, hence
13844
            // why we do another inversion to ensure that the overlay stays in the same position.
13845
            // TODO: reconsider this if we add `start` and `end` methods.
13846
            if (this._justifyContent === 'flex-start') {
13847
                parentStyles.justifyContent = 'flex-end';
13848
            }
13849
            else if (this._justifyContent === 'flex-end') {
13850
                parentStyles.justifyContent = 'flex-start';
13851
            }
13852
        }
13853
        else {
13854
            parentStyles.justifyContent = this._justifyContent;
13855
        }
13856
        parentStyles.alignItems = config.height === '100%' ? 'flex-start' : this._alignItems;
13857
    };
13858
    /**
13859
     * Noop implemented as a part of the PositionStrategy interface.
13860
     * @docs-private
13861
     */
13862
    /**
13863
     * Noop implemented as a part of the PositionStrategy interface.
13864
     * \@docs-private
13865
     * @return {?}
13866
     */
13867
    GlobalPositionStrategy.prototype.dispose = /**
13868
     * Noop implemented as a part of the PositionStrategy interface.
13869
     * \@docs-private
13870
     * @return {?}
13871
     */
13872
    function () { };
13873
    return GlobalPositionStrategy;
13874
}());
13875
 
13876
/**
13877
 * @fileoverview added by tsickle
13878
 * @suppress {checkTypes} checked by tsc
13879
 */
13880
/**
13881
 * Builder for overlay position strategy.
13882
 */
13883
var OverlayPositionBuilder = /** @class */ (function () {
13884
    function OverlayPositionBuilder(_viewportRuler, _document,
13885
    // @breaking-change 7.0.0 `_platform` and `_overlayContainer` parameters to be made required.
13886
    _platform, _overlayContainer) {
13887
        this._viewportRuler = _viewportRuler;
13888
        this._document = _document;
13889
        this._platform = _platform;
13890
        this._overlayContainer = _overlayContainer;
13891
    }
13892
    /**
13893
     * Creates a global position strategy.
13894
     */
13895
    /**
13896
     * Creates a global position strategy.
13897
     * @return {?}
13898
     */
13899
    OverlayPositionBuilder.prototype.global = /**
13900
     * Creates a global position strategy.
13901
     * @return {?}
13902
     */
13903
    function () {
13904
        return new GlobalPositionStrategy();
13905
    };
13906
    /**
13907
     * Creates a relative position strategy.
13908
     * @param elementRef
13909
     * @param originPos
13910
     * @param overlayPos
13911
     * @deprecated Use `flexibleConnectedTo` instead.
13912
     * @breaking-change 7.0.0
13913
     */
13914
    /**
13915
     * Creates a relative position strategy.
13916
     * @deprecated Use `flexibleConnectedTo` instead.
13917
     * \@breaking-change 7.0.0
13918
     * @param {?} elementRef
13919
     * @param {?} originPos
13920
     * @param {?} overlayPos
13921
     * @return {?}
13922
     */
13923
    OverlayPositionBuilder.prototype.connectedTo = /**
13924
     * Creates a relative position strategy.
13925
     * @deprecated Use `flexibleConnectedTo` instead.
13926
     * \@breaking-change 7.0.0
13927
     * @param {?} elementRef
13928
     * @param {?} originPos
13929
     * @param {?} overlayPos
13930
     * @return {?}
13931
     */
13932
    function (elementRef, originPos, overlayPos) {
13933
        return new ConnectedPositionStrategy(originPos, overlayPos, elementRef, this._viewportRuler, this._document);
13934
    };
13935
    /**
13936
     * Creates a flexible position strategy.
13937
     * @param elementRef
13938
     */
13939
    /**
13940
     * Creates a flexible position strategy.
13941
     * @param {?} elementRef
13942
     * @return {?}
13943
     */
13944
    OverlayPositionBuilder.prototype.flexibleConnectedTo = /**
13945
     * Creates a flexible position strategy.
13946
     * @param {?} elementRef
13947
     * @return {?}
13948
     */
13949
    function (elementRef) {
13950
        return new FlexibleConnectedPositionStrategy(elementRef, this._viewportRuler, this._document, this._platform, this._overlayContainer);
13951
    };
13952
    OverlayPositionBuilder.decorators = [
13953
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"], args: [{ providedIn: 'root' },] },
13954
    ];
13955
    /** @nocollapse */
13956
    OverlayPositionBuilder.ctorParameters = function () { return [
13957
        { type: _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_2__["ViewportRuler"], },
13958
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"],] },] },
13959
        { type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_7__["Platform"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
13960
        { type: OverlayContainer, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
13961
    ]; };
13962
    /** @nocollapse */ OverlayPositionBuilder.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["defineInjectable"])({ factory: function OverlayPositionBuilder_Factory() { return new OverlayPositionBuilder(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["inject"])(_angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_2__["ViewportRuler"]), Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["inject"])(_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"]), Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["inject"])(_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_7__["Platform"], 8), Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["inject"])(OverlayContainer, 8)); }, token: OverlayPositionBuilder, providedIn: "root" });
13963
    return OverlayPositionBuilder;
13964
}());
13965
 
13966
/**
13967
 * @fileoverview added by tsickle
13968
 * @suppress {checkTypes} checked by tsc
13969
 */
13970
/**
13971
 * Next overlay unique ID.
13972
 */
13973
var /** @type {?} */ nextUniqueId = 0;
13974
/**
13975
 * Service to create Overlays. Overlays are dynamically added pieces of floating UI, meant to be
13976
 * used as a low-level building block for other components. Dialogs, tooltips, menus,
13977
 * selects, etc. can all be built using overlays. The service should primarily be used by authors
13978
 * of re-usable components rather than developers building end-user applications.
13979
 *
13980
 * An overlay *is* a PortalOutlet, so any kind of Portal can be loaded into one.
13981
 */
13982
var Overlay = /** @class */ (function () {
13983
    function Overlay(scrollStrategies, _overlayContainer, _componentFactoryResolver, _positionBuilder, _keyboardDispatcher, _injector, _ngZone, _document, _directionality) {
13984
        this.scrollStrategies = scrollStrategies;
13985
        this._overlayContainer = _overlayContainer;
13986
        this._componentFactoryResolver = _componentFactoryResolver;
13987
        this._positionBuilder = _positionBuilder;
13988
        this._keyboardDispatcher = _keyboardDispatcher;
13989
        this._injector = _injector;
13990
        this._ngZone = _ngZone;
13991
        this._document = _document;
13992
        this._directionality = _directionality;
13993
    }
13994
    /**
13995
     * Creates an overlay.
13996
     * @param config Configuration applied to the overlay.
13997
     * @returns Reference to the created overlay.
13998
     */
13999
    /**
14000
     * Creates an overlay.
14001
     * @param {?=} config Configuration applied to the overlay.
14002
     * @return {?} Reference to the created overlay.
14003
     */
14004
    Overlay.prototype.create = /**
14005
     * Creates an overlay.
14006
     * @param {?=} config Configuration applied to the overlay.
14007
     * @return {?} Reference to the created overlay.
14008
     */
14009
    function (config) {
14010
        var /** @type {?} */ host = this._createHostElement();
14011
        var /** @type {?} */ pane = this._createPaneElement(host);
14012
        var /** @type {?} */ portalOutlet = this._createPortalOutlet(pane);
14013
        var /** @type {?} */ overlayConfig = new OverlayConfig(config);
14014
        overlayConfig.direction = overlayConfig.direction || this._directionality.value;
14015
        return new OverlayRef(portalOutlet, host, pane, overlayConfig, this._ngZone, this._keyboardDispatcher, this._document);
14016
    };
14017
    /**
14018
     * Gets a position builder that can be used, via fluent API,
14019
     * to construct and configure a position strategy.
14020
     * @returns An overlay position builder.
14021
     */
14022
    /**
14023
     * Gets a position builder that can be used, via fluent API,
14024
     * to construct and configure a position strategy.
14025
     * @return {?} An overlay position builder.
14026
     */
14027
    Overlay.prototype.position = /**
14028
     * Gets a position builder that can be used, via fluent API,
14029
     * to construct and configure a position strategy.
14030
     * @return {?} An overlay position builder.
14031
     */
14032
    function () {
14033
        return this._positionBuilder;
14034
    };
14035
    /**
14036
     * Creates the DOM element for an overlay and appends it to the overlay container.
14037
     * @param {?} host
14038
     * @return {?} Newly-created pane element
14039
     */
14040
    Overlay.prototype._createPaneElement = /**
14041
     * Creates the DOM element for an overlay and appends it to the overlay container.
14042
     * @param {?} host
14043
     * @return {?} Newly-created pane element
14044
     */
14045
    function (host) {
14046
        var /** @type {?} */ pane = this._document.createElement('div');
14047
        pane.id = "cdk-overlay-" + nextUniqueId++;
14048
        pane.classList.add('cdk-overlay-pane');
14049
        host.appendChild(pane);
14050
        return pane;
14051
    };
14052
    /**
14053
     * Creates the host element that wraps around an overlay
14054
     * and can be used for advanced positioning.
14055
     * @return {?} Newly-create host element.
14056
     */
14057
    Overlay.prototype._createHostElement = /**
14058
     * Creates the host element that wraps around an overlay
14059
     * and can be used for advanced positioning.
14060
     * @return {?} Newly-create host element.
14061
     */
14062
    function () {
14063
        var /** @type {?} */ host = this._document.createElement('div');
14064
        this._overlayContainer.getContainerElement().appendChild(host);
14065
        return host;
14066
    };
14067
    /**
14068
     * Create a DomPortalOutlet into which the overlay content can be loaded.
14069
     * @param {?} pane The DOM element to turn into a portal outlet.
14070
     * @return {?} A portal outlet for the given DOM element.
14071
     */
14072
    Overlay.prototype._createPortalOutlet = /**
14073
     * Create a DomPortalOutlet into which the overlay content can be loaded.
14074
     * @param {?} pane The DOM element to turn into a portal outlet.
14075
     * @return {?} A portal outlet for the given DOM element.
14076
     */
14077
    function (pane) {
14078
        // We have to resolve the ApplicationRef later in order to allow people
14079
        // to use overlay-based providers during app initialization.
14080
        if (!this._appRef) {
14081
            this._appRef = this._injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ApplicationRef"]);
14082
        }
14083
        return new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_9__["DomPortalOutlet"](pane, this._componentFactoryResolver, this._appRef, this._injector);
14084
    };
14085
    Overlay.decorators = [
14086
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] },
14087
    ];
14088
    /** @nocollapse */
14089
    Overlay.ctorParameters = function () { return [
14090
        { type: ScrollStrategyOptions, },
14091
        { type: OverlayContainer, },
14092
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ComponentFactoryResolver"], },
14093
        { type: OverlayPositionBuilder, },
14094
        { type: OverlayKeyboardDispatcher, },
14095
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"], },
14096
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], },
14097
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"],] },] },
14098
        { type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_8__["Directionality"], },
14099
    ]; };
14100
    return Overlay;
14101
}());
14102
 
14103
/**
14104
 * @fileoverview added by tsickle
14105
 * @suppress {checkTypes} checked by tsc
14106
 */
14107
/**
14108
 * Default set of positions for the overlay. Follows the behavior of a dropdown.
14109
 */
14110
var /** @type {?} */ defaultPositionList = [
14111
    {
14112
        originX: 'start',
14113
        originY: 'bottom',
14114
        overlayX: 'start',
14115
        overlayY: 'top'
14116
    },
14117
    {
14118
        originX: 'start',
14119
        originY: 'top',
14120
        overlayX: 'start',
14121
        overlayY: 'bottom'
14122
    },
14123
    {
14124
        originX: 'end',
14125
        originY: 'top',
14126
        overlayX: 'end',
14127
        overlayY: 'bottom'
14128
    },
14129
    {
14130
        originX: 'end',
14131
        originY: 'bottom',
14132
        overlayX: 'end',
14133
        overlayY: 'top'
14134
    }
14135
];
14136
/**
14137
 * Injection token that determines the scroll handling while the connected overlay is open.
14138
 */
14139
var /** @type {?} */ CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('cdk-connected-overlay-scroll-strategy');
14140
/**
14141
 * Directive applied to an element to make it usable as an origin for an Overlay using a
14142
 * ConnectedPositionStrategy.
14143
 */
14144
var CdkOverlayOrigin = /** @class */ (function () {
14145
    function CdkOverlayOrigin(elementRef) {
14146
        this.elementRef = elementRef;
14147
    }
14148
    CdkOverlayOrigin.decorators = [
14149
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
14150
                    selector: '[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]',
14151
                    exportAs: 'cdkOverlayOrigin',
14152
                },] },
14153
    ];
14154
    /** @nocollapse */
14155
    CdkOverlayOrigin.ctorParameters = function () { return [
14156
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
14157
    ]; };
14158
    return CdkOverlayOrigin;
14159
}());
14160
/**
14161
 * Directive to facilitate declarative creation of an
14162
 * Overlay using a FlexibleConnectedPositionStrategy.
14163
 */
14164
var CdkConnectedOverlay = /** @class */ (function () {
14165
    // TODO(jelbourn): inputs for size, scroll behavior, animation, etc.
14166
    function CdkConnectedOverlay(_overlay, templateRef, viewContainerRef, _scrollStrategy, _dir) {
14167
        this._overlay = _overlay;
14168
        this._scrollStrategy = _scrollStrategy;
14169
        this._dir = _dir;
14170
        this._hasBackdrop = false;
14171
        this._lockPosition = false;
14172
        this._growAfterOpen = false;
14173
        this._flexibleDimensions = false;
14174
        this._push = false;
14175
        this._backdropSubscription = rxjs__WEBPACK_IMPORTED_MODULE_5__["Subscription"].EMPTY;
14176
        /**
14177
         * Margin between the overlay and the viewport edges.
14178
         */
14179
        this.viewportMargin = 0;
14180
        /**
14181
         * Strategy to be used when handling scroll events while the overlay is open.
14182
         */
14183
        this.scrollStrategy = this._scrollStrategy();
14184
        /**
14185
         * Whether the overlay is open.
14186
         */
14187
        this.open = false;
14188
        /**
14189
         * Event emitted when the backdrop is clicked.
14190
         */
14191
        this.backdropClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
14192
        /**
14193
         * Event emitted when the position has changed.
14194
         */
14195
        this.positionChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
14196
        /**
14197
         * Event emitted when the overlay has been attached.
14198
         */
14199
        this.attach = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
14200
        /**
14201
         * Event emitted when the overlay has been detached.
14202
         */
14203
        this.detach = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
14204
        /**
14205
         * Emits when there are keyboard events that are targeted at the overlay.
14206
         */
14207
        this.overlayKeydown = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
14208
        this._templatePortal = new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_9__["TemplatePortal"](templateRef, viewContainerRef);
14209
    }
14210
    Object.defineProperty(CdkConnectedOverlay.prototype, "offsetX", {
14211
        get: /**
14212
         * The offset in pixels for the overlay connection point on the x-axis
14213
         * @return {?}
14214
         */
14215
        function () { return this._offsetX; },
14216
        set: /**
14217
         * @param {?} offsetX
14218
         * @return {?}
14219
         */
14220
        function (offsetX) {
14221
            this._offsetX = offsetX;
14222
            if (this._position) {
14223
                this._setPositions(this._position);
14224
            }
14225
        },
14226
        enumerable: true,
14227
        configurable: true
14228
    });
14229
    Object.defineProperty(CdkConnectedOverlay.prototype, "offsetY", {
14230
        get: /**
14231
         * The offset in pixels for the overlay connection point on the y-axis
14232
         * @return {?}
14233
         */
14234
        function () { return this._offsetY; },
14235
        set: /**
14236
         * @param {?} offsetY
14237
         * @return {?}
14238
         */
14239
        function (offsetY) {
14240
            this._offsetY = offsetY;
14241
            if (this._position) {
14242
                this._setPositions(this._position);
14243
            }
14244
        },
14245
        enumerable: true,
14246
        configurable: true
14247
    });
14248
    Object.defineProperty(CdkConnectedOverlay.prototype, "hasBackdrop", {
14249
        get: /**
14250
         * Whether or not the overlay should attach a backdrop.
14251
         * @return {?}
14252
         */
14253
        function () { return this._hasBackdrop; },
14254
        set: /**
14255
         * @param {?} value
14256
         * @return {?}
14257
         */
14258
        function (value) { this._hasBackdrop = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceBooleanProperty"])(value); },
14259
        enumerable: true,
14260
        configurable: true
14261
    });
14262
    Object.defineProperty(CdkConnectedOverlay.prototype, "lockPosition", {
14263
        get: /**
14264
         * Whether or not the overlay should be locked when scrolling.
14265
         * @return {?}
14266
         */
14267
        function () { return this._lockPosition; },
14268
        set: /**
14269
         * @param {?} value
14270
         * @return {?}
14271
         */
14272
        function (value) { this._lockPosition = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceBooleanProperty"])(value); },
14273
        enumerable: true,
14274
        configurable: true
14275
    });
14276
    Object.defineProperty(CdkConnectedOverlay.prototype, "flexibleDiemsions", {
14277
        get: /**
14278
         * Whether the overlay's width and height can be constrained to fit within the viewport.
14279
         * @return {?}
14280
         */
14281
        function () { return this._flexibleDimensions; },
14282
        set: /**
14283
         * @param {?} value
14284
         * @return {?}
14285
         */
14286
        function (value) { this._flexibleDimensions = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceBooleanProperty"])(value); },
14287
        enumerable: true,
14288
        configurable: true
14289
    });
14290
    Object.defineProperty(CdkConnectedOverlay.prototype, "growAfterOpen", {
14291
        get: /**
14292
         * Whether the overlay can grow after the initial open when flexible positioning is turned on.
14293
         * @return {?}
14294
         */
14295
        function () { return this._growAfterOpen; },
14296
        set: /**
14297
         * @param {?} value
14298
         * @return {?}
14299
         */
14300
        function (value) { this._growAfterOpen = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceBooleanProperty"])(value); },
14301
        enumerable: true,
14302
        configurable: true
14303
    });
14304
    Object.defineProperty(CdkConnectedOverlay.prototype, "push", {
14305
        get: /**
14306
         * Whether the overlay can be pushed on-screen if none of the provided positions fit.
14307
         * @return {?}
14308
         */
14309
        function () { return this._push; },
14310
        set: /**
14311
         * @param {?} value
14312
         * @return {?}
14313
         */
14314
        function (value) { this._push = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceBooleanProperty"])(value); },
14315
        enumerable: true,
14316
        configurable: true
14317
    });
14318
    Object.defineProperty(CdkConnectedOverlay.prototype, "overlayRef", {
14319
        /** The associated overlay reference. */
14320
        get: /**
14321
         * The associated overlay reference.
14322
         * @return {?}
14323
         */
14324
        function () {
14325
            return this._overlayRef;
14326
        },
14327
        enumerable: true,
14328
        configurable: true
14329
    });
14330
    Object.defineProperty(CdkConnectedOverlay.prototype, "dir", {
14331
        /** The element's layout direction. */
14332
        get: /**
14333
         * The element's layout direction.
14334
         * @return {?}
14335
         */
14336
        function () {
14337
            return this._dir ? this._dir.value : 'ltr';
14338
        },
14339
        enumerable: true,
14340
        configurable: true
14341
    });
14342
    /**
14343
     * @return {?}
14344
     */
14345
    CdkConnectedOverlay.prototype.ngOnDestroy = /**
14346
     * @return {?}
14347
     */
14348
    function () {
14349
        this._destroyOverlay();
14350
    };
14351
    /**
14352
     * @param {?} changes
14353
     * @return {?}
14354
     */
14355
    CdkConnectedOverlay.prototype.ngOnChanges = /**
14356
     * @param {?} changes
14357
     * @return {?}
14358
     */
14359
    function (changes) {
14360
        if (this._position) {
14361
            if (changes['positions']) {
14362
                this._position.withPositions(this.positions);
14363
            }
14364
            if (changes['lockPosition']) {
14365
                this._position.withLockedPosition(this.lockPosition);
14366
            }
14367
            if (changes['origin']) {
14368
                this._position.setOrigin(this.origin.elementRef);
14369
                if (this.open) {
14370
                    this._position.apply();
14371
                }
14372
            }
14373
        }
14374
        if (changes['open']) {
14375
            this.open ? this._attachOverlay() : this._detachOverlay();
14376
        }
14377
    };
14378
    /**
14379
     * Creates an overlay
14380
     * @return {?}
14381
     */
14382
    CdkConnectedOverlay.prototype._createOverlay = /**
14383
     * Creates an overlay
14384
     * @return {?}
14385
     */
14386
    function () {
14387
        if (!this.positions || !this.positions.length) {
14388
            this.positions = defaultPositionList;
14389
        }
14390
        this._overlayRef = this._overlay.create(this._buildConfig());
14391
    };
14392
    /**
14393
     * Builds the overlay config based on the directive's inputs
14394
     * @return {?}
14395
     */
14396
    CdkConnectedOverlay.prototype._buildConfig = /**
14397
     * Builds the overlay config based on the directive's inputs
14398
     * @return {?}
14399
     */
14400
    function () {
14401
        var /** @type {?} */ positionStrategy = this._position = this._createPositionStrategy();
14402
        var /** @type {?} */ overlayConfig = new OverlayConfig({
14403
            direction: this._dir,
14404
            positionStrategy: positionStrategy,
14405
            scrollStrategy: this.scrollStrategy,
14406
            hasBackdrop: this.hasBackdrop
14407
        });
14408
        if (this.width || this.width === 0) {
14409
            overlayConfig.width = this.width;
14410
        }
14411
        if (this.height || this.height === 0) {
14412
            overlayConfig.height = this.height;
14413
        }
14414
        if (this.minWidth || this.minWidth === 0) {
14415
            overlayConfig.minWidth = this.minWidth;
14416
        }
14417
        if (this.minHeight || this.minHeight === 0) {
14418
            overlayConfig.minHeight = this.minHeight;
14419
        }
14420
        if (this.backdropClass) {
14421
            overlayConfig.backdropClass = this.backdropClass;
14422
        }
14423
        return overlayConfig;
14424
    };
14425
    /**
14426
     * Returns the position strategy of the overlay to be set on the overlay config
14427
     * @return {?}
14428
     */
14429
    CdkConnectedOverlay.prototype._createPositionStrategy = /**
14430
     * Returns the position strategy of the overlay to be set on the overlay config
14431
     * @return {?}
14432
     */
14433
    function () {
14434
        var _this = this;
14435
        var /** @type {?} */ strategy = this._overlay.position()
14436
            .flexibleConnectedTo(this.origin.elementRef)
14437
            .withFlexibleDimensions(this.flexibleDiemsions)
14438
            .withPush(this.push)
14439
            .withGrowAfterOpen(this.growAfterOpen)
14440
            .withViewportMargin(this.viewportMargin)
14441
            .withLockedPosition(this.lockPosition);
14442
        this._setPositions(strategy);
14443
        strategy.positionChanges.subscribe(function (p) { return _this.positionChange.emit(p); });
14444
        return strategy;
14445
    };
14446
    /**
14447
     * Sets the primary and fallback positions of a positions strategy,
14448
     * based on the current directive inputs.
14449
     * @param {?} positionStrategy
14450
     * @return {?}
14451
     */
14452
    CdkConnectedOverlay.prototype._setPositions = /**
14453
     * Sets the primary and fallback positions of a positions strategy,
14454
     * based on the current directive inputs.
14455
     * @param {?} positionStrategy
14456
     * @return {?}
14457
     */
14458
    function (positionStrategy) {
14459
        var _this = this;
14460
        var /** @type {?} */ positions = this.positions.map(function (pos) {
14461
            return ({
14462
                originX: pos.originX,
14463
                originY: pos.originY,
14464
                overlayX: pos.overlayX,
14465
                overlayY: pos.overlayY,
14466
                offsetX: pos.offsetX || _this.offsetX,
14467
                offsetY: pos.offsetY || _this.offsetY
14468
            });
14469
        });
14470
        positionStrategy.withPositions(positions);
14471
    };
14472
    /**
14473
     * Attaches the overlay and subscribes to backdrop clicks if backdrop exists
14474
     * @return {?}
14475
     */
14476
    CdkConnectedOverlay.prototype._attachOverlay = /**
14477
     * Attaches the overlay and subscribes to backdrop clicks if backdrop exists
14478
     * @return {?}
14479
     */
14480
    function () {
14481
        var _this = this;
14482
        if (!this._overlayRef) {
14483
            this._createOverlay(); /** @type {?} */
14484
            ((this._overlayRef)).keydownEvents().subscribe(function (event) {
14485
                _this.overlayKeydown.next(event);
14486
                if (event.keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_10__["ESCAPE"]) {
14487
                    _this._detachOverlay();
14488
                }
14489
            });
14490
        }
14491
        else {
14492
            // Update the overlay size, in case the directive's inputs have changed
14493
            this._overlayRef.updateSize({
14494
                width: this.width,
14495
                minWidth: this.minWidth,
14496
                height: this.height,
14497
                minHeight: this.minHeight,
14498
            });
14499
        }
14500
        if (!this._overlayRef.hasAttached()) {
14501
            this._overlayRef.attach(this._templatePortal);
14502
            this.attach.emit();
14503
        }
14504
        if (this.hasBackdrop) {
14505
            this._backdropSubscription = this._overlayRef.backdropClick().subscribe(function (event) {
14506
                _this.backdropClick.emit(event);
14507
            });
14508
        }
14509
    };
14510
    /**
14511
     * Detaches the overlay and unsubscribes to backdrop clicks if backdrop exists
14512
     * @return {?}
14513
     */
14514
    CdkConnectedOverlay.prototype._detachOverlay = /**
14515
     * Detaches the overlay and unsubscribes to backdrop clicks if backdrop exists
14516
     * @return {?}
14517
     */
14518
    function () {
14519
        if (this._overlayRef) {
14520
            this._overlayRef.detach();
14521
            this.detach.emit();
14522
        }
14523
        this._backdropSubscription.unsubscribe();
14524
    };
14525
    /**
14526
     * Destroys the overlay created by this directive.
14527
     * @return {?}
14528
     */
14529
    CdkConnectedOverlay.prototype._destroyOverlay = /**
14530
     * Destroys the overlay created by this directive.
14531
     * @return {?}
14532
     */
14533
    function () {
14534
        if (this._overlayRef) {
14535
            this._overlayRef.dispose();
14536
        }
14537
        this._backdropSubscription.unsubscribe();
14538
    };
14539
    CdkConnectedOverlay.decorators = [
14540
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
14541
                    selector: '[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]',
14542
                    exportAs: 'cdkConnectedOverlay'
14543
                },] },
14544
    ];
14545
    /** @nocollapse */
14546
    CdkConnectedOverlay.ctorParameters = function () { return [
14547
        { type: Overlay, },
14548
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"], },
14549
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
14550
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY,] },] },
14551
        { type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_8__["Directionality"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
14552
    ]; };
14553
    CdkConnectedOverlay.propDecorators = {
14554
        "origin": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['cdkConnectedOverlayOrigin',] },],
14555
        "positions": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['cdkConnectedOverlayPositions',] },],
14556
        "offsetX": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['cdkConnectedOverlayOffsetX',] },],
14557
        "offsetY": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['cdkConnectedOverlayOffsetY',] },],
14558
        "width": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['cdkConnectedOverlayWidth',] },],
14559
        "height": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['cdkConnectedOverlayHeight',] },],
14560
        "minWidth": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['cdkConnectedOverlayMinWidth',] },],
14561
        "minHeight": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['cdkConnectedOverlayMinHeight',] },],
14562
        "backdropClass": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['cdkConnectedOverlayBackdropClass',] },],
14563
        "viewportMargin": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['cdkConnectedOverlayViewportMargin',] },],
14564
        "scrollStrategy": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['cdkConnectedOverlayScrollStrategy',] },],
14565
        "open": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['cdkConnectedOverlayOpen',] },],
14566
        "hasBackdrop": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['cdkConnectedOverlayHasBackdrop',] },],
14567
        "lockPosition": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['cdkConnectedOverlayLockPosition',] },],
14568
        "flexibleDiemsions": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['cdkConnectedOverlayFlexibleDimensions',] },],
14569
        "growAfterOpen": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['cdkConnectedOverlayGrowAfterOpen',] },],
14570
        "push": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['cdkConnectedOverlayPush',] },],
14571
        "backdropClick": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
14572
        "positionChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
14573
        "attach": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
14574
        "detach": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
14575
        "overlayKeydown": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
14576
    };
14577
    return CdkConnectedOverlay;
14578
}());
14579
/**
14580
 * \@docs-private
14581
 * @param {?} overlay
14582
 * @return {?}
14583
 */
14584
function CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {
14585
    return function () { return overlay.scrollStrategies.reposition(); };
14586
}
14587
/**
14588
 * \@docs-private
14589
 */
14590
var /** @type {?} */ CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER = {
14591
    provide: CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY,
14592
    deps: [Overlay],
14593
    useFactory: CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY,
14594
};
14595
 
14596
/**
14597
 * @fileoverview added by tsickle
14598
 * @suppress {checkTypes} checked by tsc
14599
 */
14600
var OverlayModule = /** @class */ (function () {
14601
    function OverlayModule() {
14602
    }
14603
    OverlayModule.decorators = [
14604
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
14605
                    imports: [_angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_8__["BidiModule"], _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_9__["PortalModule"], _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_2__["ScrollDispatchModule"]],
14606
                    exports: [CdkConnectedOverlay, CdkOverlayOrigin, _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_2__["ScrollDispatchModule"]],
14607
                    declarations: [CdkConnectedOverlay, CdkOverlayOrigin],
14608
                    providers: [
14609
                        Overlay,
14610
                        CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER,
14611
                    ],
14612
                },] },
14613
    ];
14614
    return OverlayModule;
14615
}());
14616
/**
14617
 * @deprecated Use `OverlayModule` instead.
14618
 * \@breaking-change 7.0.0
14619
 */
14620
var /** @type {?} */ OVERLAY_PROVIDERS = [
14621
    Overlay,
14622
    OverlayPositionBuilder,
14623
    OVERLAY_KEYBOARD_DISPATCHER_PROVIDER,
14624
    _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_2__["VIEWPORT_RULER_PROVIDER"],
14625
    OVERLAY_CONTAINER_PROVIDER,
14626
    CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER,
14627
];
14628
 
14629
/**
14630
 * @fileoverview added by tsickle
14631
 * @suppress {checkTypes} checked by tsc
14632
 */
14633
/**
14634
 * Alternative to OverlayContainer that supports correct displaying of overlay elements in
14635
 * Fullscreen mode
14636
 * https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen
14637
 *
14638
 * Should be provided in the root component.
14639
 */
14640
var FullscreenOverlayContainer = /** @class */ (function (_super) {
14641
    Object(tslib__WEBPACK_IMPORTED_MODULE_4__["__extends"])(FullscreenOverlayContainer, _super);
14642
    function FullscreenOverlayContainer(_document) {
14643
        return _super.call(this, _document) || this;
14644
    }
14645
    /**
14646
     * @return {?}
14647
     */
14648
    FullscreenOverlayContainer.prototype.ngOnDestroy = /**
14649
     * @return {?}
14650
     */
14651
    function () {
14652
        _super.prototype.ngOnDestroy.call(this);
14653
        if (this._fullScreenEventName && this._fullScreenListener) {
14654
            this._document.removeEventListener(this._fullScreenEventName, this._fullScreenListener);
14655
        }
14656
    };
14657
    /**
14658
     * @return {?}
14659
     */
14660
    FullscreenOverlayContainer.prototype._createContainer = /**
14661
     * @return {?}
14662
     */
14663
    function () {
14664
        var _this = this;
14665
        _super.prototype._createContainer.call(this);
14666
        this._adjustParentForFullscreenChange();
14667
        this._addFullscreenChangeListener(function () { return _this._adjustParentForFullscreenChange(); });
14668
    };
14669
    /**
14670
     * @return {?}
14671
     */
14672
    FullscreenOverlayContainer.prototype._adjustParentForFullscreenChange = /**
14673
     * @return {?}
14674
     */
14675
    function () {
14676
        if (!this._containerElement) {
14677
            return;
14678
        }
14679
        var /** @type {?} */ fullscreenElement = this.getFullscreenElement();
14680
        var /** @type {?} */ parent = fullscreenElement || this._document.body;
14681
        parent.appendChild(this._containerElement);
14682
    };
14683
    /**
14684
     * @param {?} fn
14685
     * @return {?}
14686
     */
14687
    FullscreenOverlayContainer.prototype._addFullscreenChangeListener = /**
14688
     * @param {?} fn
14689
     * @return {?}
14690
     */
14691
    function (fn) {
14692
        var /** @type {?} */ eventName = this._getEventName();
14693
        if (eventName) {
14694
            if (this._fullScreenListener) {
14695
                this._document.removeEventListener(eventName, this._fullScreenListener);
14696
            }
14697
            this._document.addEventListener(eventName, fn);
14698
            this._fullScreenListener = fn;
14699
        }
14700
    };
14701
    /**
14702
     * @return {?}
14703
     */
14704
    FullscreenOverlayContainer.prototype._getEventName = /**
14705
     * @return {?}
14706
     */
14707
    function () {
14708
        if (!this._fullScreenEventName) {
14709
            if (this._document.fullscreenEnabled) {
14710
                this._fullScreenEventName = 'fullscreenchange';
14711
            }
14712
            else if (this._document.webkitFullscreenEnabled) {
14713
                this._fullScreenEventName = 'webkitfullscreenchange';
14714
            }
14715
            else if ((/** @type {?} */ (this._document)).mozFullScreenEnabled) {
14716
                this._fullScreenEventName = 'mozfullscreenchange';
14717
            }
14718
            else if ((/** @type {?} */ (this._document)).msFullscreenEnabled) {
14719
                this._fullScreenEventName = 'MSFullscreenChange';
14720
            }
14721
        }
14722
        return this._fullScreenEventName;
14723
    };
14724
    /**
14725
     * When the page is put into fullscreen mode, a specific element is specified.
14726
     * Only that element and its children are visible when in fullscreen mode.
14727
     */
14728
    /**
14729
     * When the page is put into fullscreen mode, a specific element is specified.
14730
     * Only that element and its children are visible when in fullscreen mode.
14731
     * @return {?}
14732
     */
14733
    FullscreenOverlayContainer.prototype.getFullscreenElement = /**
14734
     * When the page is put into fullscreen mode, a specific element is specified.
14735
     * Only that element and its children are visible when in fullscreen mode.
14736
     * @return {?}
14737
     */
14738
    function () {
14739
        return this._document.fullscreenElement ||
14740
            this._document.webkitFullscreenElement ||
14741
            (/** @type {?} */ (this._document)).mozFullScreenElement ||
14742
            (/** @type {?} */ (this._document)).msFullscreenElement ||
14743
            null;
14744
    };
14745
    FullscreenOverlayContainer.decorators = [
14746
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] },
14747
    ];
14748
    /** @nocollapse */
14749
    FullscreenOverlayContainer.ctorParameters = function () { return [
14750
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"],] },] },
14751
    ]; };
14752
    return FullscreenOverlayContainer;
14753
}(OverlayContainer));
14754
 
14755
/**
14756
 * @fileoverview added by tsickle
14757
 * @suppress {checkTypes} checked by tsc
14758
 */
14759
 
14760
/**
14761
 * @fileoverview added by tsickle
14762
 * @suppress {checkTypes} checked by tsc
14763
 */
14764
 
14765
 
14766
//# sourceMappingURL=overlay.es5.js.map
14767
 
14768
 
14769
/***/ }),
14770
 
14771
/***/ "./node_modules/@angular/cdk/esm5/platform.es5.js":
14772
/*!********************************************************!*\
14773
  !*** ./node_modules/@angular/cdk/esm5/platform.es5.js ***!
14774
  \********************************************************/
14775
/*! exports provided: Platform, supportsPassiveEventListeners, supportsScrollBehavior, getSupportedInputTypes, PlatformModule */
14776
/***/ (function(module, __webpack_exports__, __webpack_require__) {
14777
 
14778
"use strict";
14779
__webpack_require__.r(__webpack_exports__);
14780
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Platform", function() { return Platform; });
14781
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportsPassiveEventListeners", function() { return supportsPassiveEventListeners; });
14782
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportsScrollBehavior", function() { return supportsScrollBehavior; });
14783
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSupportedInputTypes", function() { return getSupportedInputTypes; });
14784
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PlatformModule", function() { return PlatformModule; });
14785
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
14786
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
14787
/**
14788
 * @license
14789
 * Copyright Google LLC All Rights Reserved.
14790
 *
14791
 * Use of this source code is governed by an MIT-style license that can be
14792
 * found in the LICENSE file at https://angular.io/license
14793
 */
14794
 
14795
 
14796
 
14797
/**
14798
 * @fileoverview added by tsickle
14799
 * @suppress {checkTypes} checked by tsc
14800
 */
14801
// Whether the current platform supports the V8 Break Iterator. The V8 check
14802
// is necessary to detect all Blink based browsers.
14803
var /** @type {?} */ hasV8BreakIterator = (typeof Intl !== 'undefined' && (/** @type {?} */ (Intl)).v8BreakIterator);
14804
/**
14805
 * Service to detect the current platform by comparing the userAgent strings and
14806
 * checking browser-specific global properties.
14807
 */
14808
var Platform = /** @class */ (function () {
14809
    /**
14810
     * @breaking-change v7.0.0 remove optional decorator
14811
     */
14812
    function Platform(_platformId) {
14813
        this._platformId = _platformId;
14814
        /**
14815
         * Whether the Angular application is being rendered in the browser.
14816
         * We want to use the Angular platform check because if the Document is shimmed
14817
         * without the navigator, the following checks will fail. This is preferred because
14818
         * sometimes the Document may be shimmed without the user's knowledge or intention
14819
         */
14820
        this.isBrowser = this._platformId ?
14821
            Object(_angular_common__WEBPACK_IMPORTED_MODULE_1__["isPlatformBrowser"])(this._platformId) : typeof document === 'object' && !!document;
14822
        /**
14823
         * Whether the current browser is Microsoft Edge.
14824
         */
14825
        this.EDGE = this.isBrowser && /(edge)/i.test(navigator.userAgent);
14826
        /**
14827
         * Whether the current rendering engine is Microsoft Trident.
14828
         */
14829
        this.TRIDENT = this.isBrowser && /(msie|trident)/i.test(navigator.userAgent);
14830
        /**
14831
         * Whether the current rendering engine is Blink.
14832
         */
14833
        this.BLINK = this.isBrowser && (!!((/** @type {?} */ (window)).chrome || hasV8BreakIterator) &&
14834
            typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT);
14835
        /**
14836
         * Whether the current rendering engine is WebKit.
14837
         */
14838
        this.WEBKIT = this.isBrowser &&
14839
            /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;
14840
        /**
14841
         * Whether the current platform is Apple iOS.
14842
         */
14843
        this.IOS = this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) &&
14844
            !(/** @type {?} */ (window)).MSStream;
14845
        /**
14846
         * Whether the current browser is Firefox.
14847
         */
14848
        this.FIREFOX = this.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);
14849
        /**
14850
         * Whether the current platform is Android.
14851
         */
14852
        this.ANDROID = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT;
14853
        /**
14854
         * Whether the current browser is Safari.
14855
         */
14856
        this.SAFARI = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;
14857
    }
14858
    Platform.decorators = [
14859
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"], args: [{ providedIn: 'root' },] },
14860
    ];
14861
    /** @nocollapse */
14862
    Platform.ctorParameters = function () { return [
14863
        { type: Object, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"],] },] },
14864
    ]; };
14865
    /** @nocollapse */ Platform.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["defineInjectable"])({ factory: function Platform_Factory() { return new Platform(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"], 8)); }, token: Platform, providedIn: "root" });
14866
    return Platform;
14867
}());
14868
 
14869
/**
14870
 * @fileoverview added by tsickle
14871
 * @suppress {checkTypes} checked by tsc
14872
 */
14873
 
14874
/**
14875
 * Cached result of whether the user's browser supports passive event listeners.
14876
 */
14877
var /** @type {?} */ supportsPassiveEvents;
14878
/**
14879
 * Checks whether the user's browser supports passive event listeners.
14880
 * See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md
14881
 * @return {?}
14882
 */
14883
function supportsPassiveEventListeners() {
14884
    if (supportsPassiveEvents == null && typeof window !== 'undefined') {
14885
        try {
14886
            window.addEventListener('test', /** @type {?} */ ((null)), Object.defineProperty({}, 'passive', {
14887
                get: function () { return supportsPassiveEvents = true; }
14888
            }));
14889
        }
14890
        finally {
14891
            supportsPassiveEvents = supportsPassiveEvents || false;
14892
        }
14893
    }
14894
    return supportsPassiveEvents;
14895
}
14896
/**
14897
 * Check whether the browser supports scroll behaviors.
14898
 * @return {?}
14899
 */
14900
function supportsScrollBehavior() {
14901
    return !!(document && document.documentElement && document.documentElement.style &&
14902
        'scrollBehavior' in document.documentElement.style);
14903
}
14904
/**
14905
 * Cached result Set of input types support by the current browser.
14906
 */
14907
var /** @type {?} */ supportedInputTypes;
14908
/**
14909
 * Types of `<input>` that *might* be supported.
14910
 */
14911
var /** @type {?} */ candidateInputTypes = [
14912
    'color',
14913
    'button',
14914
    'checkbox',
14915
    'date',
14916
    'datetime-local',
14917
    'email',
14918
    'file',
14919
    'hidden',
14920
    'image',
14921
    'month',
14922
    'number',
14923
    'password',
14924
    'radio',
14925
    'range',
14926
    'reset',
14927
    'search',
14928
    'submit',
14929
    'tel',
14930
    'text',
14931
    'time',
14932
    'url',
14933
    'week',
14934
];
14935
/**
14936
 * @return {?} The input types supported by this browser.
14937
 */
14938
function getSupportedInputTypes() {
14939
    // Result is cached.
14940
    if (supportedInputTypes) {
14941
        return supportedInputTypes;
14942
    }
14943
    // We can't check if an input type is not supported until we're on the browser, so say that
14944
    // everything is supported when not on the browser. We don't use `Platform` here since it's
14945
    // just a helper function and can't inject it.
14946
    if (typeof document !== 'object' || !document) {
14947
        supportedInputTypes = new Set(candidateInputTypes);
14948
        return supportedInputTypes;
14949
    }
14950
    var /** @type {?} */ featureTestInput = document.createElement('input');
14951
    supportedInputTypes = new Set(candidateInputTypes.filter(function (value) {
14952
        featureTestInput.setAttribute('type', value);
14953
        return featureTestInput.type === value;
14954
    }));
14955
    return supportedInputTypes;
14956
}
14957
 
14958
/**
14959
 * @fileoverview added by tsickle
14960
 * @suppress {checkTypes} checked by tsc
14961
 */
14962
var PlatformModule = /** @class */ (function () {
14963
    function PlatformModule() {
14964
    }
14965
    PlatformModule.decorators = [
14966
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"] },
14967
    ];
14968
    return PlatformModule;
14969
}());
14970
 
14971
/**
14972
 * @fileoverview added by tsickle
14973
 * @suppress {checkTypes} checked by tsc
14974
 */
14975
 
14976
/**
14977
 * @fileoverview added by tsickle
14978
 * @suppress {checkTypes} checked by tsc
14979
 */
14980
 
14981
 
14982
//# sourceMappingURL=platform.es5.js.map
14983
 
14984
 
14985
/***/ }),
14986
 
14987
/***/ "./node_modules/@angular/cdk/esm5/portal.es5.js":
14988
/*!******************************************************!*\
14989
  !*** ./node_modules/@angular/cdk/esm5/portal.es5.js ***!
14990
  \******************************************************/
14991
/*! exports provided: DomPortalHost, PortalHostDirective, TemplatePortalDirective, BasePortalHost, Portal, ComponentPortal, TemplatePortal, BasePortalOutlet, DomPortalOutlet, CdkPortal, CdkPortalOutlet, PortalModule, PortalInjector */
14992
/***/ (function(module, __webpack_exports__, __webpack_require__) {
14993
 
14994
"use strict";
14995
__webpack_require__.r(__webpack_exports__);
14996
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DomPortalHost", function() { return DomPortalOutlet; });
14997
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PortalHostDirective", function() { return CdkPortalOutlet; });
14998
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TemplatePortalDirective", function() { return CdkPortal; });
14999
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BasePortalHost", function() { return BasePortalOutlet; });
15000
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Portal", function() { return Portal; });
15001
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComponentPortal", function() { return ComponentPortal; });
15002
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TemplatePortal", function() { return TemplatePortal; });
15003
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BasePortalOutlet", function() { return BasePortalOutlet; });
15004
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DomPortalOutlet", function() { return DomPortalOutlet; });
15005
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkPortal", function() { return CdkPortal; });
15006
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkPortalOutlet", function() { return CdkPortalOutlet; });
15007
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PortalModule", function() { return PortalModule; });
15008
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PortalInjector", function() { return PortalInjector; });
15009
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
15010
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
15011
/**
15012
 * @license
15013
 * Copyright Google LLC All Rights Reserved.
15014
 *
15015
 * Use of this source code is governed by an MIT-style license that can be
15016
 * found in the LICENSE file at https://angular.io/license
15017
 */
15018
 
15019
 
15020
 
15021
/**
15022
 * @fileoverview added by tsickle
15023
 * @suppress {checkTypes} checked by tsc
15024
 */
15025
 
15026
/**
15027
 * Throws an exception when attempting to attach a null portal to a host.
15028
 * \@docs-private
15029
 * @return {?}
15030
 */
15031
function throwNullPortalError() {
15032
    throw Error('Must provide a portal to attach');
15033
}
15034
/**
15035
 * Throws an exception when attempting to attach a portal to a host that is already attached.
15036
 * \@docs-private
15037
 * @return {?}
15038
 */
15039
function throwPortalAlreadyAttachedError() {
15040
    throw Error('Host already has a portal attached');
15041
}
15042
/**
15043
 * Throws an exception when attempting to attach a portal to an already-disposed host.
15044
 * \@docs-private
15045
 * @return {?}
15046
 */
15047
function throwPortalOutletAlreadyDisposedError() {
15048
    throw Error('This PortalOutlet has already been disposed');
15049
}
15050
/**
15051
 * Throws an exception when attempting to attach an unknown portal type.
15052
 * \@docs-private
15053
 * @return {?}
15054
 */
15055
function throwUnknownPortalTypeError() {
15056
    throw Error('Attempting to attach an unknown Portal type. BasePortalOutlet accepts either ' +
15057
        'a ComponentPortal or a TemplatePortal.');
15058
}
15059
/**
15060
 * Throws an exception when attempting to attach a portal to a null host.
15061
 * \@docs-private
15062
 * @return {?}
15063
 */
15064
function throwNullPortalOutletError() {
15065
    throw Error('Attempting to attach a portal to a null PortalOutlet');
15066
}
15067
/**
15068
 * Throws an exception when attempting to detach a portal that is not attached.
15069
 * \@docs-private
15070
 * @return {?}
15071
 */
15072
function throwNoPortalAttachedError() {
15073
    throw Error('Attempting to detach a portal that is not attached to a host');
15074
}
15075
 
15076
/**
15077
 * @fileoverview added by tsickle
15078
 * @suppress {checkTypes} checked by tsc
15079
 */
15080
/**
15081
 * A `Portal` is something that you want to render somewhere else.
15082
 * It can be attach to / detached from a `PortalOutlet`.
15083
 * @abstract
15084
 * @template T
15085
 */
15086
var  /**
15087
 * A `Portal` is something that you want to render somewhere else.
15088
 * It can be attach to / detached from a `PortalOutlet`.
15089
 * @abstract
15090
 * @template T
15091
 */
15092
Portal = /** @class */ (function () {
15093
    function Portal() {
15094
    }
15095
    /** Attach this portal to a host. */
15096
    /**
15097
     * Attach this portal to a host.
15098
     * @param {?} host
15099
     * @return {?}
15100
     */
15101
    Portal.prototype.attach = /**
15102
     * Attach this portal to a host.
15103
     * @param {?} host
15104
     * @return {?}
15105
     */
15106
    function (host) {
15107
        if (host == null) {
15108
            throwNullPortalOutletError();
15109
        }
15110
        if (host.hasAttached()) {
15111
            throwPortalAlreadyAttachedError();
15112
        }
15113
        this._attachedHost = host;
15114
        return /** @type {?} */ (host.attach(this));
15115
    };
15116
    /** Detach this portal from its host */
15117
    /**
15118
     * Detach this portal from its host
15119
     * @return {?}
15120
     */
15121
    Portal.prototype.detach = /**
15122
     * Detach this portal from its host
15123
     * @return {?}
15124
     */
15125
    function () {
15126
        var /** @type {?} */ host = this._attachedHost;
15127
        if (host == null) {
15128
            throwNoPortalAttachedError();
15129
        }
15130
        else {
15131
            this._attachedHost = null;
15132
            host.detach();
15133
        }
15134
    };
15135
    Object.defineProperty(Portal.prototype, "isAttached", {
15136
        /** Whether this portal is attached to a host. */
15137
        get: /**
15138
         * Whether this portal is attached to a host.
15139
         * @return {?}
15140
         */
15141
        function () {
15142
            return this._attachedHost != null;
15143
        },
15144
        enumerable: true,
15145
        configurable: true
15146
    });
15147
    /**
15148
     * Sets the PortalOutlet reference without performing `attach()`. This is used directly by
15149
     * the PortalOutlet when it is performing an `attach()` or `detach()`.
15150
     */
15151
    /**
15152
     * Sets the PortalOutlet reference without performing `attach()`. This is used directly by
15153
     * the PortalOutlet when it is performing an `attach()` or `detach()`.
15154
     * @param {?} host
15155
     * @return {?}
15156
     */
15157
    Portal.prototype.setAttachedHost = /**
15158
     * Sets the PortalOutlet reference without performing `attach()`. This is used directly by
15159
     * the PortalOutlet when it is performing an `attach()` or `detach()`.
15160
     * @param {?} host
15161
     * @return {?}
15162
     */
15163
    function (host) {
15164
        this._attachedHost = host;
15165
    };
15166
    return Portal;
15167
}());
15168
/**
15169
 * A `ComponentPortal` is a portal that instantiates some Component upon attachment.
15170
 * @template T
15171
 */
15172
var  /**
15173
 * A `ComponentPortal` is a portal that instantiates some Component upon attachment.
15174
 * @template T
15175
 */
15176
ComponentPortal = /** @class */ (function (_super) {
15177
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ComponentPortal, _super);
15178
    function ComponentPortal(component, viewContainerRef, injector) {
15179
        var _this = _super.call(this) || this;
15180
        _this.component = component;
15181
        _this.viewContainerRef = viewContainerRef;
15182
        _this.injector = injector;
15183
        return _this;
15184
    }
15185
    return ComponentPortal;
15186
}(Portal));
15187
/**
15188
 * A `TemplatePortal` is a portal that represents some embedded template (TemplateRef).
15189
 * @template C
15190
 */
15191
var  /**
15192
 * A `TemplatePortal` is a portal that represents some embedded template (TemplateRef).
15193
 * @template C
15194
 */
15195
TemplatePortal = /** @class */ (function (_super) {
15196
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TemplatePortal, _super);
15197
    function TemplatePortal(template, viewContainerRef, context) {
15198
        var _this = _super.call(this) || this;
15199
        _this.templateRef = template;
15200
        _this.viewContainerRef = viewContainerRef;
15201
        _this.context = context;
15202
        return _this;
15203
    }
15204
    Object.defineProperty(TemplatePortal.prototype, "origin", {
15205
        get: /**
15206
         * @return {?}
15207
         */
15208
        function () {
15209
            return this.templateRef.elementRef;
15210
        },
15211
        enumerable: true,
15212
        configurable: true
15213
    });
15214
    /**
15215
     * Attach the the portal to the provided `PortalOutlet`.
15216
     * When a context is provided it will override the `context` property of the `TemplatePortal`
15217
     * instance.
15218
     */
15219
    /**
15220
     * Attach the the portal to the provided `PortalOutlet`.
15221
     * When a context is provided it will override the `context` property of the `TemplatePortal`
15222
     * instance.
15223
     * @param {?} host
15224
     * @param {?=} context
15225
     * @return {?}
15226
     */
15227
    TemplatePortal.prototype.attach = /**
15228
     * Attach the the portal to the provided `PortalOutlet`.
15229
     * When a context is provided it will override the `context` property of the `TemplatePortal`
15230
     * instance.
15231
     * @param {?} host
15232
     * @param {?=} context
15233
     * @return {?}
15234
     */
15235
    function (host, context) {
15236
        if (context === void 0) { context = this.context; }
15237
        this.context = context;
15238
        return _super.prototype.attach.call(this, host);
15239
    };
15240
    /**
15241
     * @return {?}
15242
     */
15243
    TemplatePortal.prototype.detach = /**
15244
     * @return {?}
15245
     */
15246
    function () {
15247
        this.context = undefined;
15248
        return _super.prototype.detach.call(this);
15249
    };
15250
    return TemplatePortal;
15251
}(Portal));
15252
/**
15253
 * Partial implementation of PortalOutlet that handles attaching
15254
 * ComponentPortal and TemplatePortal.
15255
 * @abstract
15256
 */
15257
var  /**
15258
 * Partial implementation of PortalOutlet that handles attaching
15259
 * ComponentPortal and TemplatePortal.
15260
 * @abstract
15261
 */
15262
BasePortalOutlet = /** @class */ (function () {
15263
    function BasePortalOutlet() {
15264
        /**
15265
         * Whether this host has already been permanently disposed.
15266
         */
15267
        this._isDisposed = false;
15268
    }
15269
    /** Whether this host has an attached portal. */
15270
    /**
15271
     * Whether this host has an attached portal.
15272
     * @return {?}
15273
     */
15274
    BasePortalOutlet.prototype.hasAttached = /**
15275
     * Whether this host has an attached portal.
15276
     * @return {?}
15277
     */
15278
    function () {
15279
        return !!this._attachedPortal;
15280
    };
15281
    /** Attaches a portal. */
15282
    /**
15283
     * Attaches a portal.
15284
     * @param {?} portal
15285
     * @return {?}
15286
     */
15287
    BasePortalOutlet.prototype.attach = /**
15288
     * Attaches a portal.
15289
     * @param {?} portal
15290
     * @return {?}
15291
     */
15292
    function (portal) {
15293
        if (!portal) {
15294
            throwNullPortalError();
15295
        }
15296
        if (this.hasAttached()) {
15297
            throwPortalAlreadyAttachedError();
15298
        }
15299
        if (this._isDisposed) {
15300
            throwPortalOutletAlreadyDisposedError();
15301
        }
15302
        if (portal instanceof ComponentPortal) {
15303
            this._attachedPortal = portal;
15304
            return this.attachComponentPortal(portal);
15305
        }
15306
        else if (portal instanceof TemplatePortal) {
15307
            this._attachedPortal = portal;
15308
            return this.attachTemplatePortal(portal);
15309
        }
15310
        throwUnknownPortalTypeError();
15311
    };
15312
    /** Detaches a previously attached portal. */
15313
    /**
15314
     * Detaches a previously attached portal.
15315
     * @return {?}
15316
     */
15317
    BasePortalOutlet.prototype.detach = /**
15318
     * Detaches a previously attached portal.
15319
     * @return {?}
15320
     */
15321
    function () {
15322
        if (this._attachedPortal) {
15323
            this._attachedPortal.setAttachedHost(null);
15324
            this._attachedPortal = null;
15325
        }
15326
        this._invokeDisposeFn();
15327
    };
15328
    /** Permanently dispose of this portal host. */
15329
    /**
15330
     * Permanently dispose of this portal host.
15331
     * @return {?}
15332
     */
15333
    BasePortalOutlet.prototype.dispose = /**
15334
     * Permanently dispose of this portal host.
15335
     * @return {?}
15336
     */
15337
    function () {
15338
        if (this.hasAttached()) {
15339
            this.detach();
15340
        }
15341
        this._invokeDisposeFn();
15342
        this._isDisposed = true;
15343
    };
15344
    /** @docs-private */
15345
    /**
15346
     * \@docs-private
15347
     * @param {?} fn
15348
     * @return {?}
15349
     */
15350
    BasePortalOutlet.prototype.setDisposeFn = /**
15351
     * \@docs-private
15352
     * @param {?} fn
15353
     * @return {?}
15354
     */
15355
    function (fn) {
15356
        this._disposeFn = fn;
15357
    };
15358
    /**
15359
     * @return {?}
15360
     */
15361
    BasePortalOutlet.prototype._invokeDisposeFn = /**
15362
     * @return {?}
15363
     */
15364
    function () {
15365
        if (this._disposeFn) {
15366
            this._disposeFn();
15367
            this._disposeFn = null;
15368
        }
15369
    };
15370
    return BasePortalOutlet;
15371
}());
15372
 
15373
/**
15374
 * @fileoverview added by tsickle
15375
 * @suppress {checkTypes} checked by tsc
15376
 */
15377
/**
15378
 * A PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular
15379
 * application context.
15380
 */
15381
var  /**
15382
 * A PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular
15383
 * application context.
15384
 */
15385
DomPortalOutlet = /** @class */ (function (_super) {
15386
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(DomPortalOutlet, _super);
15387
    function DomPortalOutlet(outletElement, _componentFactoryResolver, _appRef, _defaultInjector) {
15388
        var _this = _super.call(this) || this;
15389
        _this.outletElement = outletElement;
15390
        _this._componentFactoryResolver = _componentFactoryResolver;
15391
        _this._appRef = _appRef;
15392
        _this._defaultInjector = _defaultInjector;
15393
        return _this;
15394
    }
15395
    /**
15396
     * Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver.
15397
     * @param portal Portal to be attached
15398
     * @returns Reference to the created component.
15399
     */
15400
    /**
15401
     * Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver.
15402
     * @template T
15403
     * @param {?} portal Portal to be attached
15404
     * @return {?} Reference to the created component.
15405
     */
15406
    DomPortalOutlet.prototype.attachComponentPortal = /**
15407
     * Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver.
15408
     * @template T
15409
     * @param {?} portal Portal to be attached
15410
     * @return {?} Reference to the created component.
15411
     */
15412
    function (portal) {
15413
        var _this = this;
15414
        var /** @type {?} */ componentFactory = this._componentFactoryResolver.resolveComponentFactory(portal.component);
15415
        var /** @type {?} */ componentRef;
15416
        // If the portal specifies a ViewContainerRef, we will use that as the attachment point
15417
        // for the component (in terms of Angular's component tree, not rendering).
15418
        // When the ViewContainerRef is missing, we use the factory to create the component directly
15419
        // and then manually attach the view to the application.
15420
        if (portal.viewContainerRef) {
15421
            componentRef = portal.viewContainerRef.createComponent(componentFactory, portal.viewContainerRef.length, portal.injector || portal.viewContainerRef.parentInjector);
15422
            this.setDisposeFn(function () { return componentRef.destroy(); });
15423
        }
15424
        else {
15425
            componentRef = componentFactory.create(portal.injector || this._defaultInjector);
15426
            this._appRef.attachView(componentRef.hostView);
15427
            this.setDisposeFn(function () {
15428
                _this._appRef.detachView(componentRef.hostView);
15429
                componentRef.destroy();
15430
            });
15431
        }
15432
        // At this point the component has been instantiated, so we move it to the location in the DOM
15433
        // where we want it to be rendered.
15434
        this.outletElement.appendChild(this._getComponentRootNode(componentRef));
15435
        return componentRef;
15436
    };
15437
    /**
15438
     * Attaches a template portal to the DOM as an embedded view.
15439
     * @param portal Portal to be attached.
15440
     * @returns Reference to the created embedded view.
15441
     */
15442
    /**
15443
     * Attaches a template portal to the DOM as an embedded view.
15444
     * @template C
15445
     * @param {?} portal Portal to be attached.
15446
     * @return {?} Reference to the created embedded view.
15447
     */
15448
    DomPortalOutlet.prototype.attachTemplatePortal = /**
15449
     * Attaches a template portal to the DOM as an embedded view.
15450
     * @template C
15451
     * @param {?} portal Portal to be attached.
15452
     * @return {?} Reference to the created embedded view.
15453
     */
15454
    function (portal) {
15455
        var _this = this;
15456
        var /** @type {?} */ viewContainer = portal.viewContainerRef;
15457
        var /** @type {?} */ viewRef = viewContainer.createEmbeddedView(portal.templateRef, portal.context);
15458
        viewRef.detectChanges();
15459
        // The method `createEmbeddedView` will add the view as a child of the viewContainer.
15460
        // But for the DomPortalOutlet the view can be added everywhere in the DOM
15461
        // (e.g Overlay Container) To move the view to the specified host element. We just
15462
        // re-append the existing root nodes.
15463
        viewRef.rootNodes.forEach(function (rootNode) { return _this.outletElement.appendChild(rootNode); });
15464
        this.setDisposeFn((function () {
15465
            var /** @type {?} */ index = viewContainer.indexOf(viewRef);
15466
            if (index !== -1) {
15467
                viewContainer.remove(index);
15468
            }
15469
        }));
15470
        // TODO(jelbourn): Return locals from view.
15471
        return viewRef;
15472
    };
15473
    /**
15474
     * Clears out a portal from the DOM.
15475
     */
15476
    /**
15477
     * Clears out a portal from the DOM.
15478
     * @return {?}
15479
     */
15480
    DomPortalOutlet.prototype.dispose = /**
15481
     * Clears out a portal from the DOM.
15482
     * @return {?}
15483
     */
15484
    function () {
15485
        _super.prototype.dispose.call(this);
15486
        if (this.outletElement.parentNode != null) {
15487
            this.outletElement.parentNode.removeChild(this.outletElement);
15488
        }
15489
    };
15490
    /**
15491
     * Gets the root HTMLElement for an instantiated component.
15492
     * @param {?} componentRef
15493
     * @return {?}
15494
     */
15495
    DomPortalOutlet.prototype._getComponentRootNode = /**
15496
     * Gets the root HTMLElement for an instantiated component.
15497
     * @param {?} componentRef
15498
     * @return {?}
15499
     */
15500
    function (componentRef) {
15501
        return /** @type {?} */ ((/** @type {?} */ (componentRef.hostView)).rootNodes[0]);
15502
    };
15503
    return DomPortalOutlet;
15504
}(BasePortalOutlet));
15505
 
15506
/**
15507
 * @fileoverview added by tsickle
15508
 * @suppress {checkTypes} checked by tsc
15509
 */
15510
/**
15511
 * Directive version of a `TemplatePortal`. Because the directive *is* a TemplatePortal,
15512
 * the directive instance itself can be attached to a host, enabling declarative use of portals.
15513
 */
15514
var CdkPortal = /** @class */ (function (_super) {
15515
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CdkPortal, _super);
15516
    function CdkPortal(templateRef, viewContainerRef) {
15517
        return _super.call(this, templateRef, viewContainerRef) || this;
15518
    }
15519
    CdkPortal.decorators = [
15520
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
15521
                    selector: '[cdk-portal], [cdkPortal], [portal]',
15522
                    exportAs: 'cdkPortal',
15523
                },] },
15524
    ];
15525
    /** @nocollapse */
15526
    CdkPortal.ctorParameters = function () { return [
15527
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["TemplateRef"], },
15528
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"], },
15529
    ]; };
15530
    return CdkPortal;
15531
}(TemplatePortal));
15532
/**
15533
 * Directive version of a PortalOutlet. Because the directive *is* a PortalOutlet, portals can be
15534
 * directly attached to it, enabling declarative use.
15535
 *
15536
 * Usage:
15537
 * `<ng-template [cdkPortalOutlet]="greeting"></ng-template>`
15538
 */
15539
var CdkPortalOutlet = /** @class */ (function (_super) {
15540
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CdkPortalOutlet, _super);
15541
    function CdkPortalOutlet(_componentFactoryResolver, _viewContainerRef) {
15542
        var _this = _super.call(this) || this;
15543
        _this._componentFactoryResolver = _componentFactoryResolver;
15544
        _this._viewContainerRef = _viewContainerRef;
15545
        /**
15546
         * Whether the portal component is initialized.
15547
         */
15548
        _this._isInitialized = false;
15549
        _this.attached = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
15550
        return _this;
15551
    }
15552
    Object.defineProperty(CdkPortalOutlet.prototype, "portal", {
15553
        /** Portal associated with the Portal outlet. */
15554
        get: /**
15555
         * Portal associated with the Portal outlet.
15556
         * @return {?}
15557
         */
15558
        function () {
15559
            return this._attachedPortal;
15560
        },
15561
        set: /**
15562
         * @param {?} portal
15563
         * @return {?}
15564
         */
15565
        function (portal) {
15566
            // Ignore the cases where the `portal` is set to a falsy value before the lifecycle hooks have
15567
            // run. This handles the cases where the user might do something like `<div cdkPortalOutlet>`
15568
            // and attach a portal programmatically in the parent component. When Angular does the first CD
15569
            // round, it will fire the setter with empty string, causing the user's content to be cleared.
15570
            if (this.hasAttached() && !portal && !this._isInitialized) {
15571
                return;
15572
            }
15573
            if (this.hasAttached()) {
15574
                _super.prototype.detach.call(this);
15575
            }
15576
            if (portal) {
15577
                _super.prototype.attach.call(this, portal);
15578
            }
15579
            this._attachedPortal = portal;
15580
        },
15581
        enumerable: true,
15582
        configurable: true
15583
    });
15584
    Object.defineProperty(CdkPortalOutlet.prototype, "attachedRef", {
15585
        /** Component or view reference that is attached to the portal. */
15586
        get: /**
15587
         * Component or view reference that is attached to the portal.
15588
         * @return {?}
15589
         */
15590
        function () {
15591
            return this._attachedRef;
15592
        },
15593
        enumerable: true,
15594
        configurable: true
15595
    });
15596
    /**
15597
     * @return {?}
15598
     */
15599
    CdkPortalOutlet.prototype.ngOnInit = /**
15600
     * @return {?}
15601
     */
15602
    function () {
15603
        this._isInitialized = true;
15604
    };
15605
    /**
15606
     * @return {?}
15607
     */
15608
    CdkPortalOutlet.prototype.ngOnDestroy = /**
15609
     * @return {?}
15610
     */
15611
    function () {
15612
        _super.prototype.dispose.call(this);
15613
        this._attachedPortal = null;
15614
        this._attachedRef = null;
15615
    };
15616
    /**
15617
     * Attach the given ComponentPortal to this PortalOutlet using the ComponentFactoryResolver.
15618
     *
15619
     * @param portal Portal to be attached to the portal outlet.
15620
     * @returns Reference to the created component.
15621
     */
15622
    /**
15623
     * Attach the given ComponentPortal to this PortalOutlet using the ComponentFactoryResolver.
15624
     *
15625
     * @template T
15626
     * @param {?} portal Portal to be attached to the portal outlet.
15627
     * @return {?} Reference to the created component.
15628
     */
15629
    CdkPortalOutlet.prototype.attachComponentPortal = /**
15630
     * Attach the given ComponentPortal to this PortalOutlet using the ComponentFactoryResolver.
15631
     *
15632
     * @template T
15633
     * @param {?} portal Portal to be attached to the portal outlet.
15634
     * @return {?} Reference to the created component.
15635
     */
15636
    function (portal) {
15637
        portal.setAttachedHost(this);
15638
        // If the portal specifies an origin, use that as the logical location of the component
15639
        // in the application tree. Otherwise use the location of this PortalOutlet.
15640
        var /** @type {?} */ viewContainerRef = portal.viewContainerRef != null ?
15641
            portal.viewContainerRef :
15642
            this._viewContainerRef;
15643
        var /** @type {?} */ componentFactory = this._componentFactoryResolver.resolveComponentFactory(portal.component);
15644
        var /** @type {?} */ ref = viewContainerRef.createComponent(componentFactory, viewContainerRef.length, portal.injector || viewContainerRef.parentInjector);
15645
        _super.prototype.setDisposeFn.call(this, function () { return ref.destroy(); });
15646
        this._attachedPortal = portal;
15647
        this._attachedRef = ref;
15648
        this.attached.emit(ref);
15649
        return ref;
15650
    };
15651
    /**
15652
     * Attach the given TemplatePortal to this PortlHost as an embedded View.
15653
     * @param portal Portal to be attached.
15654
     * @returns Reference to the created embedded view.
15655
     */
15656
    /**
15657
     * Attach the given TemplatePortal to this PortlHost as an embedded View.
15658
     * @template C
15659
     * @param {?} portal Portal to be attached.
15660
     * @return {?} Reference to the created embedded view.
15661
     */
15662
    CdkPortalOutlet.prototype.attachTemplatePortal = /**
15663
     * Attach the given TemplatePortal to this PortlHost as an embedded View.
15664
     * @template C
15665
     * @param {?} portal Portal to be attached.
15666
     * @return {?} Reference to the created embedded view.
15667
     */
15668
    function (portal) {
15669
        var _this = this;
15670
        portal.setAttachedHost(this);
15671
        var /** @type {?} */ viewRef = this._viewContainerRef.createEmbeddedView(portal.templateRef, portal.context);
15672
        _super.prototype.setDisposeFn.call(this, function () { return _this._viewContainerRef.clear(); });
15673
        this._attachedPortal = portal;
15674
        this._attachedRef = viewRef;
15675
        this.attached.emit(viewRef);
15676
        return viewRef;
15677
    };
15678
    CdkPortalOutlet.decorators = [
15679
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
15680
                    selector: '[cdkPortalOutlet], [cdkPortalHost], [portalHost]',
15681
                    exportAs: 'cdkPortalOutlet, cdkPortalHost',
15682
                    inputs: ['portal: cdkPortalOutlet']
15683
                },] },
15684
    ];
15685
    /** @nocollapse */
15686
    CdkPortalOutlet.ctorParameters = function () { return [
15687
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"], },
15688
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"], },
15689
    ]; };
15690
    CdkPortalOutlet.propDecorators = {
15691
        "attached": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"] },],
15692
    };
15693
    return CdkPortalOutlet;
15694
}(BasePortalOutlet));
15695
var PortalModule = /** @class */ (function () {
15696
    function PortalModule() {
15697
    }
15698
    PortalModule.decorators = [
15699
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{
15700
                    exports: [CdkPortal, CdkPortalOutlet],
15701
                    declarations: [CdkPortal, CdkPortalOutlet],
15702
                },] },
15703
    ];
15704
    return PortalModule;
15705
}());
15706
 
15707
/**
15708
 * @fileoverview added by tsickle
15709
 * @suppress {checkTypes} checked by tsc
15710
 */
15711
 
15712
/**
15713
 * Custom injector to be used when providing custom
15714
 * injection tokens to components inside a portal.
15715
 * \@docs-private
15716
 */
15717
var  /**
15718
 * Custom injector to be used when providing custom
15719
 * injection tokens to components inside a portal.
15720
 * \@docs-private
15721
 */
15722
PortalInjector = /** @class */ (function () {
15723
    function PortalInjector(_parentInjector, _customTokens) {
15724
        this._parentInjector = _parentInjector;
15725
        this._customTokens = _customTokens;
15726
    }
15727
    /**
15728
     * @param {?} token
15729
     * @param {?=} notFoundValue
15730
     * @return {?}
15731
     */
15732
    PortalInjector.prototype.get = /**
15733
     * @param {?} token
15734
     * @param {?=} notFoundValue
15735
     * @return {?}
15736
     */
15737
    function (token, notFoundValue) {
15738
        var /** @type {?} */ value = this._customTokens.get(token);
15739
        if (typeof value !== 'undefined') {
15740
            return value;
15741
        }
15742
        return this._parentInjector.get(token, notFoundValue);
15743
    };
15744
    return PortalInjector;
15745
}());
15746
 
15747
/**
15748
 * @fileoverview added by tsickle
15749
 * @suppress {checkTypes} checked by tsc
15750
 */
15751
 
15752
/**
15753
 * @fileoverview added by tsickle
15754
 * @suppress {checkTypes} checked by tsc
15755
 */
15756
 
15757
 
15758
//# sourceMappingURL=portal.es5.js.map
15759
 
15760
 
15761
/***/ }),
15762
 
15763
/***/ "./node_modules/@angular/cdk/esm5/scrolling.es5.js":
15764
/*!*********************************************************!*\
15765
  !*** ./node_modules/@angular/cdk/esm5/scrolling.es5.js ***!
15766
  \*********************************************************/
15767
/*! exports provided: DEFAULT_SCROLL_TIME, ScrollDispatcher, SCROLL_DISPATCHER_PROVIDER_FACTORY, SCROLL_DISPATCHER_PROVIDER, CdkScrollable, DEFAULT_RESIZE_TIME, ViewportRuler, VIEWPORT_RULER_PROVIDER_FACTORY, VIEWPORT_RULER_PROVIDER, ScrollDispatchModule */
15768
/***/ (function(module, __webpack_exports__, __webpack_require__) {
15769
 
15770
"use strict";
15771
__webpack_require__.r(__webpack_exports__);
15772
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_SCROLL_TIME", function() { return DEFAULT_SCROLL_TIME; });
15773
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollDispatcher", function() { return ScrollDispatcher; });
15774
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCROLL_DISPATCHER_PROVIDER_FACTORY", function() { return SCROLL_DISPATCHER_PROVIDER_FACTORY; });
15775
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCROLL_DISPATCHER_PROVIDER", function() { return SCROLL_DISPATCHER_PROVIDER; });
15776
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkScrollable", function() { return CdkScrollable; });
15777
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_RESIZE_TIME", function() { return DEFAULT_RESIZE_TIME; });
15778
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewportRuler", function() { return ViewportRuler; });
15779
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VIEWPORT_RULER_PROVIDER_FACTORY", function() { return VIEWPORT_RULER_PROVIDER_FACTORY; });
15780
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VIEWPORT_RULER_PROVIDER", function() { return VIEWPORT_RULER_PROVIDER; });
15781
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollDispatchModule", function() { return ScrollDispatchModule; });
15782
/* harmony import */ var _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/cdk/platform */ "./node_modules/@angular/cdk/esm5/platform.es5.js");
15783
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
15784
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
15785
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
15786
/**
15787
 * @license
15788
 * Copyright Google LLC All Rights Reserved.
15789
 *
15790
 * Use of this source code is governed by an MIT-style license that can be
15791
 * found in the LICENSE file at https://angular.io/license
15792
 */
15793
 
15794
 
15795
 
15796
 
15797
 
15798
/**
15799
 * @fileoverview added by tsickle
15800
 * @suppress {checkTypes} checked by tsc
15801
 */
15802
/**
15803
 * Time in ms to throttle the scrolling events by default.
15804
 */
15805
var /** @type {?} */ DEFAULT_SCROLL_TIME = 20;
15806
/**
15807
 * Service contained all registered Scrollable references and emits an event when any one of the
15808
 * Scrollable references emit a scrolled event.
15809
 */
15810
var ScrollDispatcher = /** @class */ (function () {
15811
    function ScrollDispatcher(_ngZone, _platform) {
15812
        this._ngZone = _ngZone;
15813
        this._platform = _platform;
15814
        /**
15815
         * Subject for notifying that a registered scrollable reference element has been scrolled.
15816
         */
15817
        this._scrolled = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
15818
        /**
15819
         * Keeps track of the global `scroll` and `resize` subscriptions.
15820
         */
15821
        this._globalSubscription = null;
15822
        /**
15823
         * Keeps track of the amount of subscriptions to `scrolled`. Used for cleaning up afterwards.
15824
         */
15825
        this._scrolledCount = 0;
15826
        /**
15827
         * Map of all the scrollable references that are registered with the service and their
15828
         * scroll event subscriptions.
15829
         */
15830
        this.scrollContainers = new Map();
15831
    }
15832
    /**
15833
     * Registers a scrollable instance with the service and listens for its scrolled events. When the
15834
     * scrollable is scrolled, the service emits the event to its scrolled observable.
15835
     * @param scrollable Scrollable instance to be registered.
15836
     */
15837
    /**
15838
     * Registers a scrollable instance with the service and listens for its scrolled events. When the
15839
     * scrollable is scrolled, the service emits the event to its scrolled observable.
15840
     * @param {?} scrollable Scrollable instance to be registered.
15841
     * @return {?}
15842
     */
15843
    ScrollDispatcher.prototype.register = /**
15844
     * Registers a scrollable instance with the service and listens for its scrolled events. When the
15845
     * scrollable is scrolled, the service emits the event to its scrolled observable.
15846
     * @param {?} scrollable Scrollable instance to be registered.
15847
     * @return {?}
15848
     */
15849
    function (scrollable) {
15850
        var _this = this;
15851
        var /** @type {?} */ scrollSubscription = scrollable.elementScrolled()
15852
            .subscribe(function () { return _this._scrolled.next(scrollable); });
15853
        this.scrollContainers.set(scrollable, scrollSubscription);
15854
    };
15855
    /**
15856
     * Deregisters a Scrollable reference and unsubscribes from its scroll event observable.
15857
     * @param scrollable Scrollable instance to be deregistered.
15858
     */
15859
    /**
15860
     * Deregisters a Scrollable reference and unsubscribes from its scroll event observable.
15861
     * @param {?} scrollable Scrollable instance to be deregistered.
15862
     * @return {?}
15863
     */
15864
    ScrollDispatcher.prototype.deregister = /**
15865
     * Deregisters a Scrollable reference and unsubscribes from its scroll event observable.
15866
     * @param {?} scrollable Scrollable instance to be deregistered.
15867
     * @return {?}
15868
     */
15869
    function (scrollable) {
15870
        var /** @type {?} */ scrollableReference = this.scrollContainers.get(scrollable);
15871
        if (scrollableReference) {
15872
            scrollableReference.unsubscribe();
15873
            this.scrollContainers.delete(scrollable);
15874
        }
15875
    };
15876
    /**
15877
     * Returns an observable that emits an event whenever any of the registered Scrollable
15878
     * references (or window, document, or body) fire a scrolled event. Can provide a time in ms
15879
     * to override the default "throttle" time.
15880
     *
15881
     * **Note:** in order to avoid hitting change detection for every scroll event,
15882
     * all of the events emitted from this stream will be run outside the Angular zone.
15883
     * If you need to update any data bindings as a result of a scroll event, you have
15884
     * to run the callback using `NgZone.run`.
15885
     */
15886
    /**
15887
     * Returns an observable that emits an event whenever any of the registered Scrollable
15888
     * references (or window, document, or body) fire a scrolled event. Can provide a time in ms
15889
     * to override the default "throttle" time.
15890
     *
15891
     * **Note:** in order to avoid hitting change detection for every scroll event,
15892
     * all of the events emitted from this stream will be run outside the Angular zone.
15893
     * If you need to update any data bindings as a result of a scroll event, you have
15894
     * to run the callback using `NgZone.run`.
15895
     * @param {?=} auditTimeInMs
15896
     * @return {?}
15897
     */
15898
    ScrollDispatcher.prototype.scrolled = /**
15899
     * Returns an observable that emits an event whenever any of the registered Scrollable
15900
     * references (or window, document, or body) fire a scrolled event. Can provide a time in ms
15901
     * to override the default "throttle" time.
15902
     *
15903
     * **Note:** in order to avoid hitting change detection for every scroll event,
15904
     * all of the events emitted from this stream will be run outside the Angular zone.
15905
     * If you need to update any data bindings as a result of a scroll event, you have
15906
     * to run the callback using `NgZone.run`.
15907
     * @param {?=} auditTimeInMs
15908
     * @return {?}
15909
     */
15910
    function (auditTimeInMs) {
15911
        var _this = this;
15912
        if (auditTimeInMs === void 0) { auditTimeInMs = DEFAULT_SCROLL_TIME; }
15913
        return this._platform.isBrowser ? rxjs__WEBPACK_IMPORTED_MODULE_2__["Observable"].create(function (observer) {
15914
            if (!_this._globalSubscription) {
15915
                _this._addGlobalListener();
15916
            }
15917
            // In the case of a 0ms delay, use an observable without auditTime
15918
            // since it does add a perceptible delay in processing overhead.
15919
            var /** @type {?} */ subscription = auditTimeInMs > 0 ?
15920
                _this._scrolled.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["auditTime"])(auditTimeInMs)).subscribe(observer) :
15921
                _this._scrolled.subscribe(observer);
15922
            _this._scrolledCount++;
15923
            return function () {
15924
                subscription.unsubscribe();
15925
                _this._scrolledCount--;
15926
                if (!_this._scrolledCount) {
15927
                    _this._removeGlobalListener();
15928
                }
15929
            };
15930
        }) : Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])();
15931
    };
15932
    /**
15933
     * @return {?}
15934
     */
15935
    ScrollDispatcher.prototype.ngOnDestroy = /**
15936
     * @return {?}
15937
     */
15938
    function () {
15939
        var _this = this;
15940
        this._removeGlobalListener();
15941
        this.scrollContainers.forEach(function (_, container) { return _this.deregister(container); });
15942
        this._scrolled.complete();
15943
    };
15944
    /**
15945
     * Returns an observable that emits whenever any of the
15946
     * scrollable ancestors of an element are scrolled.
15947
     * @param elementRef Element whose ancestors to listen for.
15948
     * @param auditTimeInMs Time to throttle the scroll events.
15949
     */
15950
    /**
15951
     * Returns an observable that emits whenever any of the
15952
     * scrollable ancestors of an element are scrolled.
15953
     * @param {?} elementRef Element whose ancestors to listen for.
15954
     * @param {?=} auditTimeInMs Time to throttle the scroll events.
15955
     * @return {?}
15956
     */
15957
    ScrollDispatcher.prototype.ancestorScrolled = /**
15958
     * Returns an observable that emits whenever any of the
15959
     * scrollable ancestors of an element are scrolled.
15960
     * @param {?} elementRef Element whose ancestors to listen for.
15961
     * @param {?=} auditTimeInMs Time to throttle the scroll events.
15962
     * @return {?}
15963
     */
15964
    function (elementRef, auditTimeInMs) {
15965
        var /** @type {?} */ ancestors = this.getAncestorScrollContainers(elementRef);
15966
        return this.scrolled(auditTimeInMs).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["filter"])(function (target) {
15967
            return !target || ancestors.indexOf(target) > -1;
15968
        }));
15969
    };
15970
    /** Returns all registered Scrollables that contain the provided element. */
15971
    /**
15972
     * Returns all registered Scrollables that contain the provided element.
15973
     * @param {?} elementRef
15974
     * @return {?}
15975
     */
15976
    ScrollDispatcher.prototype.getAncestorScrollContainers = /**
15977
     * Returns all registered Scrollables that contain the provided element.
15978
     * @param {?} elementRef
15979
     * @return {?}
15980
     */
15981
    function (elementRef) {
15982
        var _this = this;
15983
        var /** @type {?} */ scrollingContainers = [];
15984
        this.scrollContainers.forEach(function (_subscription, scrollable) {
15985
            if (_this._scrollableContainsElement(scrollable, elementRef)) {
15986
                scrollingContainers.push(scrollable);
15987
            }
15988
        });
15989
        return scrollingContainers;
15990
    };
15991
    /**
15992
     * Returns true if the element is contained within the provided Scrollable.
15993
     * @param {?} scrollable
15994
     * @param {?} elementRef
15995
     * @return {?}
15996
     */
15997
    ScrollDispatcher.prototype._scrollableContainsElement = /**
15998
     * Returns true if the element is contained within the provided Scrollable.
15999
     * @param {?} scrollable
16000
     * @param {?} elementRef
16001
     * @return {?}
16002
     */
16003
    function (scrollable, elementRef) {
16004
        var /** @type {?} */ element = elementRef.nativeElement;
16005
        var /** @type {?} */ scrollableElement = scrollable.getElementRef().nativeElement;
16006
        // Traverse through the element parents until we reach null, checking if any of the elements
16007
        // are the scrollable's element.
16008
        do {
16009
            if (element == scrollableElement) {
16010
                return true;
16011
            }
16012
        } while (element = element.parentElement);
16013
        return false;
16014
    };
16015
    /**
16016
     * Sets up the global scroll listeners.
16017
     * @return {?}
16018
     */
16019
    ScrollDispatcher.prototype._addGlobalListener = /**
16020
     * Sets up the global scroll listeners.
16021
     * @return {?}
16022
     */
16023
    function () {
16024
        var _this = this;
16025
        this._globalSubscription = this._ngZone.runOutsideAngular(function () {
16026
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["fromEvent"])(window.document, 'scroll').subscribe(function () { return _this._scrolled.next(); });
16027
        });
16028
    };
16029
    /**
16030
     * Cleans up the global scroll listener.
16031
     * @return {?}
16032
     */
16033
    ScrollDispatcher.prototype._removeGlobalListener = /**
16034
     * Cleans up the global scroll listener.
16035
     * @return {?}
16036
     */
16037
    function () {
16038
        if (this._globalSubscription) {
16039
            this._globalSubscription.unsubscribe();
16040
            this._globalSubscription = null;
16041
        }
16042
    };
16043
    ScrollDispatcher.decorators = [
16044
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"], args: [{ providedIn: 'root' },] },
16045
    ];
16046
    /** @nocollapse */
16047
    ScrollDispatcher.ctorParameters = function () { return [
16048
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"], },
16049
        { type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_0__["Platform"], },
16050
    ]; };
16051
    /** @nocollapse */ ScrollDispatcher.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["defineInjectable"])({ factory: function ScrollDispatcher_Factory() { return new ScrollDispatcher(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]), Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_0__["Platform"])); }, token: ScrollDispatcher, providedIn: "root" });
16052
    return ScrollDispatcher;
16053
}());
16054
/**
16055
 * \@docs-private \@deprecated \@breaking-change 7.0.0
16056
 * @param {?} parentDispatcher
16057
 * @param {?} ngZone
16058
 * @param {?} platform
16059
 * @return {?}
16060
 */
16061
function SCROLL_DISPATCHER_PROVIDER_FACTORY(parentDispatcher, ngZone, platform) {
16062
    return parentDispatcher || new ScrollDispatcher(ngZone, platform);
16063
}
16064
/**
16065
 * \@docs-private \@deprecated \@breaking-change 7.0.0
16066
 */
16067
var /** @type {?} */ SCROLL_DISPATCHER_PROVIDER = {
16068
    // If there is already a ScrollDispatcher available, use that. Otherwise, provide a new one.
16069
    provide: ScrollDispatcher,
16070
    deps: [[new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"](), new _angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"](), ScrollDispatcher], _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"], _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_0__["Platform"]],
16071
    useFactory: SCROLL_DISPATCHER_PROVIDER_FACTORY
16072
};
16073
 
16074
/**
16075
 * @fileoverview added by tsickle
16076
 * @suppress {checkTypes} checked by tsc
16077
 */
16078
/**
16079
 * Sends an event when the directive's element is scrolled. Registers itself with the
16080
 * ScrollDispatcher service to include itself as part of its collection of scrolling events that it
16081
 * can be listened to through the service.
16082
 */
16083
var CdkScrollable = /** @class */ (function () {
16084
    function CdkScrollable(_elementRef, _scroll, _ngZone) {
16085
        var _this = this;
16086
        this._elementRef = _elementRef;
16087
        this._scroll = _scroll;
16088
        this._ngZone = _ngZone;
16089
        this._elementScrolled = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
16090
        this._scrollListener = function (event) { return _this._elementScrolled.next(event); };
16091
    }
16092
    /**
16093
     * @return {?}
16094
     */
16095
    CdkScrollable.prototype.ngOnInit = /**
16096
     * @return {?}
16097
     */
16098
    function () {
16099
        var _this = this;
16100
        this._ngZone.runOutsideAngular(function () {
16101
            _this.getElementRef().nativeElement.addEventListener('scroll', _this._scrollListener);
16102
        });
16103
        this._scroll.register(this);
16104
    };
16105
    /**
16106
     * @return {?}
16107
     */
16108
    CdkScrollable.prototype.ngOnDestroy = /**
16109
     * @return {?}
16110
     */
16111
    function () {
16112
        this._scroll.deregister(this);
16113
        if (this._scrollListener) {
16114
            this.getElementRef().nativeElement.removeEventListener('scroll', this._scrollListener);
16115
        }
16116
        this._elementScrolled.complete();
16117
    };
16118
    /**
16119
     * Returns observable that emits when a scroll event is fired on the host element.
16120
     */
16121
    /**
16122
     * Returns observable that emits when a scroll event is fired on the host element.
16123
     * @return {?}
16124
     */
16125
    CdkScrollable.prototype.elementScrolled = /**
16126
     * Returns observable that emits when a scroll event is fired on the host element.
16127
     * @return {?}
16128
     */
16129
    function () {
16130
        return this._elementScrolled.asObservable();
16131
    };
16132
    /**
16133
     * @return {?}
16134
     */
16135
    CdkScrollable.prototype.getElementRef = /**
16136
     * @return {?}
16137
     */
16138
    function () {
16139
        return this._elementRef;
16140
    };
16141
    CdkScrollable.decorators = [
16142
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
16143
                    selector: '[cdk-scrollable], [cdkScrollable]'
16144
                },] },
16145
    ];
16146
    /** @nocollapse */
16147
    CdkScrollable.ctorParameters = function () { return [
16148
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
16149
        { type: ScrollDispatcher, },
16150
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"], },
16151
    ]; };
16152
    return CdkScrollable;
16153
}());
16154
 
16155
/**
16156
 * @fileoverview added by tsickle
16157
 * @suppress {checkTypes} checked by tsc
16158
 */
16159
/**
16160
 * Time in ms to throttle the resize events by default.
16161
 */
16162
var /** @type {?} */ DEFAULT_RESIZE_TIME = 20;
16163
/**
16164
 * Simple utility for getting the bounds of the browser viewport.
16165
 * \@docs-private
16166
 */
16167
var ViewportRuler = /** @class */ (function () {
16168
    function ViewportRuler(_platform, ngZone) {
16169
        var _this = this;
16170
        this._platform = _platform;
16171
        this._change = _platform.isBrowser ? ngZone.runOutsideAngular(function () {
16172
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["merge"])(Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["fromEvent"])(window, 'resize'), Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["fromEvent"])(window, 'orientationchange'));
16173
        }) : Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])();
16174
        this._invalidateCache = this.change().subscribe(function () { return _this._updateViewportSize(); });
16175
    }
16176
    /**
16177
     * @return {?}
16178
     */
16179
    ViewportRuler.prototype.ngOnDestroy = /**
16180
     * @return {?}
16181
     */
16182
    function () {
16183
        this._invalidateCache.unsubscribe();
16184
    };
16185
    /** Returns the viewport's width and height. */
16186
    /**
16187
     * Returns the viewport's width and height.
16188
     * @return {?}
16189
     */
16190
    ViewportRuler.prototype.getViewportSize = /**
16191
     * Returns the viewport's width and height.
16192
     * @return {?}
16193
     */
16194
    function () {
16195
        if (!this._viewportSize) {
16196
            this._updateViewportSize();
16197
        }
16198
        var /** @type {?} */ output = { width: this._viewportSize.width, height: this._viewportSize.height };
16199
        // If we're not on a browser, don't cache the size since it'll be mocked out anyway.
16200
        if (!this._platform.isBrowser) {
16201
            this._viewportSize = /** @type {?} */ ((null));
16202
        }
16203
        return output;
16204
    };
16205
    /** Gets a ClientRect for the viewport's bounds. */
16206
    /**
16207
     * Gets a ClientRect for the viewport's bounds.
16208
     * @return {?}
16209
     */
16210
    ViewportRuler.prototype.getViewportRect = /**
16211
     * Gets a ClientRect for the viewport's bounds.
16212
     * @return {?}
16213
     */
16214
    function () {
16215
        // Use the document element's bounding rect rather than the window scroll properties
16216
        // (e.g. pageYOffset, scrollY) due to in issue in Chrome and IE where window scroll
16217
        // properties and client coordinates (boundingClientRect, clientX/Y, etc.) are in different
16218
        // conceptual viewports. Under most circumstances these viewports are equivalent, but they
16219
        // can disagree when the page is pinch-zoomed (on devices that support touch).
16220
        // See https://bugs.chromium.org/p/chromium/issues/detail?id=489206#c4
16221
        // We use the documentElement instead of the body because, by default (without a css reset)
16222
        // browsers typically give the document body an 8px margin, which is not included in
16223
        // getBoundingClientRect().
16224
        var /** @type {?} */ scrollPosition = this.getViewportScrollPosition();
16225
        var _a = this.getViewportSize(), width = _a.width, height = _a.height;
16226
        return {
16227
            top: scrollPosition.top,
16228
            left: scrollPosition.left,
16229
            bottom: scrollPosition.top + height,
16230
            right: scrollPosition.left + width,
16231
            height: height,
16232
            width: width,
16233
        };
16234
    };
16235
    /** Gets the (top, left) scroll position of the viewport. */
16236
    /**
16237
     * Gets the (top, left) scroll position of the viewport.
16238
     * @return {?}
16239
     */
16240
    ViewportRuler.prototype.getViewportScrollPosition = /**
16241
     * Gets the (top, left) scroll position of the viewport.
16242
     * @return {?}
16243
     */
16244
    function () {
16245
        // While we can get a reference to the fake document
16246
        // during SSR, it doesn't have getBoundingClientRect.
16247
        if (!this._platform.isBrowser) {
16248
            return { top: 0, left: 0 };
16249
        }
16250
        // The top-left-corner of the viewport is determined by the scroll position of the document
16251
        // body, normally just (scrollLeft, scrollTop). However, Chrome and Firefox disagree about
16252
        // whether `document.body` or `document.documentElement` is the scrolled element, so reading
16253
        // `scrollTop` and `scrollLeft` is inconsistent. However, using the bounding rect of
16254
        // `document.documentElement` works consistently, where the `top` and `left` values will
16255
        // equal negative the scroll position.
16256
        var /** @type {?} */ documentRect = document.documentElement.getBoundingClientRect();
16257
        var /** @type {?} */ top = -documentRect.top || document.body.scrollTop || window.scrollY ||
16258
            document.documentElement.scrollTop || 0;
16259
        var /** @type {?} */ left = -documentRect.left || document.body.scrollLeft || window.scrollX ||
16260
            document.documentElement.scrollLeft || 0;
16261
        return { top: top, left: left };
16262
    };
16263
    /**
16264
     * Returns a stream that emits whenever the size of the viewport changes.
16265
     * @param throttleTime Time in milliseconds to throttle the stream.
16266
     */
16267
    /**
16268
     * Returns a stream that emits whenever the size of the viewport changes.
16269
     * @param {?=} throttleTime Time in milliseconds to throttle the stream.
16270
     * @return {?}
16271
     */
16272
    ViewportRuler.prototype.change = /**
16273
     * Returns a stream that emits whenever the size of the viewport changes.
16274
     * @param {?=} throttleTime Time in milliseconds to throttle the stream.
16275
     * @return {?}
16276
     */
16277
    function (throttleTime) {
16278
        if (throttleTime === void 0) { throttleTime = DEFAULT_RESIZE_TIME; }
16279
        return throttleTime > 0 ? this._change.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["auditTime"])(throttleTime)) : this._change;
16280
    };
16281
    /**
16282
     * Updates the cached viewport size.
16283
     * @return {?}
16284
     */
16285
    ViewportRuler.prototype._updateViewportSize = /**
16286
     * Updates the cached viewport size.
16287
     * @return {?}
16288
     */
16289
    function () {
16290
        this._viewportSize = this._platform.isBrowser ?
16291
            { width: window.innerWidth, height: window.innerHeight } :
16292
            { width: 0, height: 0 };
16293
    };
16294
    ViewportRuler.decorators = [
16295
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"], args: [{ providedIn: 'root' },] },
16296
    ];
16297
    /** @nocollapse */
16298
    ViewportRuler.ctorParameters = function () { return [
16299
        { type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_0__["Platform"], },
16300
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"], },
16301
    ]; };
16302
    /** @nocollapse */ ViewportRuler.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["defineInjectable"])({ factory: function ViewportRuler_Factory() { return new ViewportRuler(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_0__["Platform"]), Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"])); }, token: ViewportRuler, providedIn: "root" });
16303
    return ViewportRuler;
16304
}());
16305
/**
16306
 * \@docs-private \@deprecated \@breaking-change 7.0.0
16307
 * @param {?} parentRuler
16308
 * @param {?} platform
16309
 * @param {?} ngZone
16310
 * @return {?}
16311
 */
16312
function VIEWPORT_RULER_PROVIDER_FACTORY(parentRuler, platform, ngZone) {
16313
    return parentRuler || new ViewportRuler(platform, ngZone);
16314
}
16315
/**
16316
 * \@docs-private \@deprecated \@breaking-change 7.0.0
16317
 */
16318
var /** @type {?} */ VIEWPORT_RULER_PROVIDER = {
16319
    // If there is already a ViewportRuler available, use that. Otherwise, provide a new one.
16320
    provide: ViewportRuler,
16321
    deps: [[new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"](), new _angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"](), ViewportRuler], _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_0__["Platform"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]],
16322
    useFactory: VIEWPORT_RULER_PROVIDER_FACTORY
16323
};
16324
 
16325
/**
16326
 * @fileoverview added by tsickle
16327
 * @suppress {checkTypes} checked by tsc
16328
 */
16329
var ScrollDispatchModule = /** @class */ (function () {
16330
    function ScrollDispatchModule() {
16331
    }
16332
    ScrollDispatchModule.decorators = [
16333
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{
16334
                    imports: [_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_0__["PlatformModule"]],
16335
                    exports: [CdkScrollable],
16336
                    declarations: [CdkScrollable],
16337
                },] },
16338
    ];
16339
    return ScrollDispatchModule;
16340
}());
16341
 
16342
/**
16343
 * @fileoverview added by tsickle
16344
 * @suppress {checkTypes} checked by tsc
16345
 */
16346
 
16347
/**
16348
 * @fileoverview added by tsickle
16349
 * @suppress {checkTypes} checked by tsc
16350
 */
16351
 
16352
 
16353
//# sourceMappingURL=scrolling.es5.js.map
16354
 
16355
 
16356
/***/ }),
16357
 
16358
/***/ "./node_modules/@angular/cdk/esm5/stepper.es5.js":
16359
/*!*******************************************************!*\
16360
  !*** ./node_modules/@angular/cdk/esm5/stepper.es5.js ***!
16361
  \*******************************************************/
16362
/*! exports provided: StepperSelectionEvent, CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious, CdkStepperModule */
16363
/***/ (function(module, __webpack_exports__, __webpack_require__) {
16364
 
16365
"use strict";
16366
__webpack_require__.r(__webpack_exports__);
16367
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StepperSelectionEvent", function() { return StepperSelectionEvent; });
16368
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkStep", function() { return CdkStep; });
16369
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkStepper", function() { return CdkStepper; });
16370
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkStepLabel", function() { return CdkStepLabel; });
16371
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkStepperNext", function() { return CdkStepperNext; });
16372
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkStepperPrevious", function() { return CdkStepperPrevious; });
16373
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkStepperModule", function() { return CdkStepperModule; });
16374
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
16375
/* harmony import */ var _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/cdk/a11y */ "./node_modules/@angular/cdk/esm5/a11y.es5.js");
16376
/* harmony import */ var _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/cdk/bidi */ "./node_modules/@angular/cdk/esm5/bidi.es5.js");
16377
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
16378
/* harmony import */ var _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/cdk/keycodes */ "./node_modules/@angular/cdk/esm5/keycodes.es5.js");
16379
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
16380
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
16381
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
16382
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
16383
/**
16384
 * @license
16385
 * Copyright Google LLC All Rights Reserved.
16386
 *
16387
 * Use of this source code is governed by an MIT-style license that can be
16388
 * found in the LICENSE file at https://angular.io/license
16389
 */
16390
 
16391
 
16392
 
16393
 
16394
 
16395
 
16396
 
16397
 
16398
 
16399
 
16400
/**
16401
 * @fileoverview added by tsickle
16402
 * @suppress {checkTypes} checked by tsc
16403
 */
16404
var CdkStepLabel = /** @class */ (function () {
16405
    function CdkStepLabel(template) {
16406
        this.template = template;
16407
    }
16408
    CdkStepLabel.decorators = [
16409
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
16410
                    selector: '[cdkStepLabel]',
16411
                },] },
16412
    ];
16413
    /** @nocollapse */
16414
    CdkStepLabel.ctorParameters = function () { return [
16415
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"], },
16416
    ]; };
16417
    return CdkStepLabel;
16418
}());
16419
 
16420
/**
16421
 * @fileoverview added by tsickle
16422
 * @suppress {checkTypes} checked by tsc
16423
 */
16424
/**
16425
 * Used to generate unique ID for each stepper component.
16426
 */
16427
var /** @type {?} */ nextId = 0;
16428
/**
16429
 * Change event emitted on selection changes.
16430
 */
16431
var  /**
16432
 * Change event emitted on selection changes.
16433
 */
16434
StepperSelectionEvent = /** @class */ (function () {
16435
    function StepperSelectionEvent() {
16436
    }
16437
    return StepperSelectionEvent;
16438
}());
16439
var CdkStep = /** @class */ (function () {
16440
    function CdkStep(_stepper) {
16441
        this._stepper = _stepper;
16442
        /**
16443
         * Whether user has seen the expanded step content or not.
16444
         */
16445
        this.interacted = false;
16446
        this._editable = true;
16447
        this._optional = false;
16448
        this._customCompleted = null;
16449
    }
16450
    Object.defineProperty(CdkStep.prototype, "editable", {
16451
        get: /**
16452
         * Whether the user can return to this step once it has been marked as complted.
16453
         * @return {?}
16454
         */
16455
        function () { return this._editable; },
16456
        set: /**
16457
         * @param {?} value
16458
         * @return {?}
16459
         */
16460
        function (value) {
16461
            this._editable = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceBooleanProperty"])(value);
16462
        },
16463
        enumerable: true,
16464
        configurable: true
16465
    });
16466
    Object.defineProperty(CdkStep.prototype, "optional", {
16467
        get: /**
16468
         * Whether the completion of step is optional.
16469
         * @return {?}
16470
         */
16471
        function () { return this._optional; },
16472
        set: /**
16473
         * @param {?} value
16474
         * @return {?}
16475
         */
16476
        function (value) {
16477
            this._optional = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceBooleanProperty"])(value);
16478
        },
16479
        enumerable: true,
16480
        configurable: true
16481
    });
16482
    Object.defineProperty(CdkStep.prototype, "completed", {
16483
        get: /**
16484
         * Whether step is marked as completed.
16485
         * @return {?}
16486
         */
16487
        function () {
16488
            return this._customCompleted == null ? this._defaultCompleted : this._customCompleted;
16489
        },
16490
        set: /**
16491
         * @param {?} value
16492
         * @return {?}
16493
         */
16494
        function (value) {
16495
            this._customCompleted = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceBooleanProperty"])(value);
16496
        },
16497
        enumerable: true,
16498
        configurable: true
16499
    });
16500
    Object.defineProperty(CdkStep.prototype, "_defaultCompleted", {
16501
        get: /**
16502
         * @return {?}
16503
         */
16504
        function () {
16505
            return this.stepControl ? this.stepControl.valid && this.interacted : this.interacted;
16506
        },
16507
        enumerable: true,
16508
        configurable: true
16509
    });
16510
    /** Selects this step component. */
16511
    /**
16512
     * Selects this step component.
16513
     * @return {?}
16514
     */
16515
    CdkStep.prototype.select = /**
16516
     * Selects this step component.
16517
     * @return {?}
16518
     */
16519
    function () {
16520
        this._stepper.selected = this;
16521
    };
16522
    /** Resets the step to its initial state. Note that this includes resetting form data. */
16523
    /**
16524
     * Resets the step to its initial state. Note that this includes resetting form data.
16525
     * @return {?}
16526
     */
16527
    CdkStep.prototype.reset = /**
16528
     * Resets the step to its initial state. Note that this includes resetting form data.
16529
     * @return {?}
16530
     */
16531
    function () {
16532
        this.interacted = false;
16533
        if (this._customCompleted != null) {
16534
            this._customCompleted = false;
16535
        }
16536
        if (this.stepControl) {
16537
            this.stepControl.reset();
16538
        }
16539
    };
16540
    /**
16541
     * @return {?}
16542
     */
16543
    CdkStep.prototype.ngOnChanges = /**
16544
     * @return {?}
16545
     */
16546
    function () {
16547
        // Since basically all inputs of the MatStep get proxied through the view down to the
16548
        // underlying MatStepHeader, we have to make sure that change detection runs correctly.
16549
        this._stepper._stateChanged();
16550
    };
16551
    CdkStep.decorators = [
16552
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'cdk-step',
16553
                    exportAs: 'cdkStep',
16554
                    template: '<ng-template><ng-content></ng-content></ng-template>',
16555
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
16556
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
16557
                },] },
16558
    ];
16559
    /** @nocollapse */
16560
    CdkStep.ctorParameters = function () { return [
16561
        { type: CdkStepper, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () { return CdkStepper; }),] },] },
16562
    ]; };
16563
    CdkStep.propDecorators = {
16564
        "stepLabel": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"], args: [CdkStepLabel,] },],
16565
        "content": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"],] },],
16566
        "stepControl": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
16567
        "label": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
16568
        "ariaLabel": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['aria-label',] },],
16569
        "ariaLabelledby": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['aria-labelledby',] },],
16570
        "editable": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
16571
        "optional": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
16572
        "completed": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
16573
    };
16574
    return CdkStep;
16575
}());
16576
var CdkStepper = /** @class */ (function () {
16577
    function CdkStepper(_dir, _changeDetectorRef) {
16578
        this._dir = _dir;
16579
        this._changeDetectorRef = _changeDetectorRef;
16580
        /**
16581
         * Emits when the component is destroyed.
16582
         */
16583
        this._destroyed = new rxjs__WEBPACK_IMPORTED_MODULE_6__["Subject"]();
16584
        this._linear = false;
16585
        this._selectedIndex = 0;
16586
        /**
16587
         * Event emitted when the selected step has changed.
16588
         */
16589
        this.selectionChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
16590
        this._orientation = 'horizontal';
16591
        this._groupId = nextId++;
16592
    }
16593
    Object.defineProperty(CdkStepper.prototype, "linear", {
16594
        get: /**
16595
         * Whether the validity of previous steps should be checked or not.
16596
         * @return {?}
16597
         */
16598
        function () { return this._linear; },
16599
        set: /**
16600
         * @param {?} value
16601
         * @return {?}
16602
         */
16603
        function (value) { this._linear = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceBooleanProperty"])(value); },
16604
        enumerable: true,
16605
        configurable: true
16606
    });
16607
    Object.defineProperty(CdkStepper.prototype, "selectedIndex", {
16608
        get: /**
16609
         * The index of the selected step.
16610
         * @return {?}
16611
         */
16612
        function () { return this._selectedIndex; },
16613
        set: /**
16614
         * @param {?} index
16615
         * @return {?}
16616
         */
16617
        function (index) {
16618
            if (this._steps) {
16619
                // Ensure that the index can't be out of bounds.
16620
                if (index < 0 || index > this._steps.length - 1) {
16621
                    throw Error('cdkStepper: Cannot assign out-of-bounds value to `selectedIndex`.');
16622
                }
16623
                if (this._selectedIndex != index &&
16624
                    !this._anyControlsInvalidOrPending(index) &&
16625
                    (index >= this._selectedIndex || this._steps.toArray()[index].editable)) {
16626
                    this._updateSelectedItemIndex(index);
16627
                }
16628
            }
16629
            else {
16630
                this._selectedIndex = index;
16631
            }
16632
        },
16633
        enumerable: true,
16634
        configurable: true
16635
    });
16636
    Object.defineProperty(CdkStepper.prototype, "selected", {
16637
        get: /**
16638
         * The step that is selected.
16639
         * @return {?}
16640
         */
16641
        function () {
16642
            // @breaking-change 7.0.0 Change return type to `CdkStep | undefined`.
16643
            return this._steps ? this._steps.toArray()[this.selectedIndex] : /** @type {?} */ ((undefined));
16644
        },
16645
        set: /**
16646
         * @param {?} step
16647
         * @return {?}
16648
         */
16649
        function (step) {
16650
            this.selectedIndex = this._steps ? this._steps.toArray().indexOf(step) : -1;
16651
        },
16652
        enumerable: true,
16653
        configurable: true
16654
    });
16655
    /**
16656
     * @return {?}
16657
     */
16658
    CdkStepper.prototype.ngAfterViewInit = /**
16659
     * @return {?}
16660
     */
16661
    function () {
16662
        var _this = this;
16663
        this._keyManager = new _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_1__["FocusKeyManager"](this._stepHeader)
16664
            .withWrap()
16665
            .withVerticalOrientation(this._orientation === 'vertical');
16666
        (this._dir ? /** @type {?} */ (this._dir.change) : Object(rxjs__WEBPACK_IMPORTED_MODULE_6__["of"])())
16667
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_7__["startWith"])(this._layoutDirection()), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_7__["takeUntil"])(this._destroyed))
16668
            .subscribe(function (direction) { return _this._keyManager.withHorizontalOrientation(direction); });
16669
        this._keyManager.updateActiveItemIndex(this._selectedIndex);
16670
    };
16671
    /**
16672
     * @return {?}
16673
     */
16674
    CdkStepper.prototype.ngOnDestroy = /**
16675
     * @return {?}
16676
     */
16677
    function () {
16678
        this._destroyed.next();
16679
        this._destroyed.complete();
16680
    };
16681
    /** Selects and focuses the next step in list. */
16682
    /**
16683
     * Selects and focuses the next step in list.
16684
     * @return {?}
16685
     */
16686
    CdkStepper.prototype.next = /**
16687
     * Selects and focuses the next step in list.
16688
     * @return {?}
16689
     */
16690
    function () {
16691
        this.selectedIndex = Math.min(this._selectedIndex + 1, this._steps.length - 1);
16692
    };
16693
    /** Selects and focuses the previous step in list. */
16694
    /**
16695
     * Selects and focuses the previous step in list.
16696
     * @return {?}
16697
     */
16698
    CdkStepper.prototype.previous = /**
16699
     * Selects and focuses the previous step in list.
16700
     * @return {?}
16701
     */
16702
    function () {
16703
        this.selectedIndex = Math.max(this._selectedIndex - 1, 0);
16704
    };
16705
    /** Resets the stepper to its initial state. Note that this includes clearing form data. */
16706
    /**
16707
     * Resets the stepper to its initial state. Note that this includes clearing form data.
16708
     * @return {?}
16709
     */
16710
    CdkStepper.prototype.reset = /**
16711
     * Resets the stepper to its initial state. Note that this includes clearing form data.
16712
     * @return {?}
16713
     */
16714
    function () {
16715
        this._updateSelectedItemIndex(0);
16716
        this._steps.forEach(function (step) { return step.reset(); });
16717
        this._stateChanged();
16718
    };
16719
    /** Returns a unique id for each step label element. */
16720
    /**
16721
     * Returns a unique id for each step label element.
16722
     * @param {?} i
16723
     * @return {?}
16724
     */
16725
    CdkStepper.prototype._getStepLabelId = /**
16726
     * Returns a unique id for each step label element.
16727
     * @param {?} i
16728
     * @return {?}
16729
     */
16730
    function (i) {
16731
        return "cdk-step-label-" + this._groupId + "-" + i;
16732
    };
16733
    /** Returns unique id for each step content element. */
16734
    /**
16735
     * Returns unique id for each step content element.
16736
     * @param {?} i
16737
     * @return {?}
16738
     */
16739
    CdkStepper.prototype._getStepContentId = /**
16740
     * Returns unique id for each step content element.
16741
     * @param {?} i
16742
     * @return {?}
16743
     */
16744
    function (i) {
16745
        return "cdk-step-content-" + this._groupId + "-" + i;
16746
    };
16747
    /** Marks the component to be change detected. */
16748
    /**
16749
     * Marks the component to be change detected.
16750
     * @return {?}
16751
     */
16752
    CdkStepper.prototype._stateChanged = /**
16753
     * Marks the component to be change detected.
16754
     * @return {?}
16755
     */
16756
    function () {
16757
        this._changeDetectorRef.markForCheck();
16758
    };
16759
    /** Returns position state of the step with the given index. */
16760
    /**
16761
     * Returns position state of the step with the given index.
16762
     * @param {?} index
16763
     * @return {?}
16764
     */
16765
    CdkStepper.prototype._getAnimationDirection = /**
16766
     * Returns position state of the step with the given index.
16767
     * @param {?} index
16768
     * @return {?}
16769
     */
16770
    function (index) {
16771
        var /** @type {?} */ position = index - this._selectedIndex;
16772
        if (position < 0) {
16773
            return this._layoutDirection() === 'rtl' ? 'next' : 'previous';
16774
        }
16775
        else if (position > 0) {
16776
            return this._layoutDirection() === 'rtl' ? 'previous' : 'next';
16777
        }
16778
        return 'current';
16779
    };
16780
    /** Returns the type of icon to be displayed. */
16781
    /**
16782
     * Returns the type of icon to be displayed.
16783
     * @param {?} index
16784
     * @return {?}
16785
     */
16786
    CdkStepper.prototype._getIndicatorType = /**
16787
     * Returns the type of icon to be displayed.
16788
     * @param {?} index
16789
     * @return {?}
16790
     */
16791
    function (index) {
16792
        var /** @type {?} */ step = this._steps.toArray()[index];
16793
        if (!step.completed || this._selectedIndex == index) {
16794
            return 'number';
16795
        }
16796
        else {
16797
            return step.editable ? 'edit' : 'done';
16798
        }
16799
    };
16800
    /** Returns the index of the currently-focused step header. */
16801
    /**
16802
     * Returns the index of the currently-focused step header.
16803
     * @return {?}
16804
     */
16805
    CdkStepper.prototype._getFocusIndex = /**
16806
     * Returns the index of the currently-focused step header.
16807
     * @return {?}
16808
     */
16809
    function () {
16810
        return this._keyManager ? this._keyManager.activeItemIndex : this._selectedIndex;
16811
    };
16812
    /**
16813
     * @param {?} newIndex
16814
     * @return {?}
16815
     */
16816
    CdkStepper.prototype._updateSelectedItemIndex = /**
16817
     * @param {?} newIndex
16818
     * @return {?}
16819
     */
16820
    function (newIndex) {
16821
        var /** @type {?} */ stepsArray = this._steps.toArray();
16822
        this.selectionChange.emit({
16823
            selectedIndex: newIndex,
16824
            previouslySelectedIndex: this._selectedIndex,
16825
            selectedStep: stepsArray[newIndex],
16826
            previouslySelectedStep: stepsArray[this._selectedIndex],
16827
        });
16828
        this._keyManager.updateActiveItemIndex(newIndex);
16829
        this._selectedIndex = newIndex;
16830
        this._stateChanged();
16831
    };
16832
    /**
16833
     * @param {?} event
16834
     * @return {?}
16835
     */
16836
    CdkStepper.prototype._onKeydown = /**
16837
     * @param {?} event
16838
     * @return {?}
16839
     */
16840
    function (event) {
16841
        var /** @type {?} */ keyCode = event.keyCode;
16842
        if (this._keyManager.activeItemIndex != null && (keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_4__["SPACE"] || keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_4__["ENTER"])) {
16843
            this.selectedIndex = this._keyManager.activeItemIndex;
16844
            event.preventDefault();
16845
        }
16846
        else if (keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_4__["HOME"]) {
16847
            this._keyManager.setFirstItemActive();
16848
            event.preventDefault();
16849
        }
16850
        else if (keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_4__["END"]) {
16851
            this._keyManager.setLastItemActive();
16852
            event.preventDefault();
16853
        }
16854
        else {
16855
            this._keyManager.onKeydown(event);
16856
        }
16857
    };
16858
    /**
16859
     * @param {?} index
16860
     * @return {?}
16861
     */
16862
    CdkStepper.prototype._anyControlsInvalidOrPending = /**
16863
     * @param {?} index
16864
     * @return {?}
16865
     */
16866
    function (index) {
16867
        var /** @type {?} */ steps = this._steps.toArray();
16868
        steps[this._selectedIndex].interacted = true;
16869
        if (this._linear && index >= 0) {
16870
            return steps.slice(0, index).some(function (step) {
16871
                var /** @type {?} */ control = step.stepControl;
16872
                var /** @type {?} */ isIncomplete = control ?
16873
                    (control.invalid || control.pending || !step.interacted) :
16874
                    !step.completed;
16875
                return isIncomplete && !step.optional;
16876
            });
16877
        }
16878
        return false;
16879
    };
16880
    /**
16881
     * @return {?}
16882
     */
16883
    CdkStepper.prototype._layoutDirection = /**
16884
     * @return {?}
16885
     */
16886
    function () {
16887
        return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';
16888
    };
16889
    CdkStepper.decorators = [
16890
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
16891
                    selector: '[cdkStepper]',
16892
                    exportAs: 'cdkStepper',
16893
                },] },
16894
    ];
16895
    /** @nocollapse */
16896
    CdkStepper.ctorParameters = function () { return [
16897
        { type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_2__["Directionality"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
16898
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"], },
16899
    ]; };
16900
    CdkStepper.propDecorators = {
16901
        "_steps": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"], args: [CdkStep,] },],
16902
        "linear": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
16903
        "selectedIndex": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
16904
        "selected": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
16905
        "selectionChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
16906
    };
16907
    return CdkStepper;
16908
}());
16909
 
16910
/**
16911
 * @fileoverview added by tsickle
16912
 * @suppress {checkTypes} checked by tsc
16913
 */
16914
/**
16915
 * Button that moves to the next step in a stepper workflow.
16916
 */
16917
var CdkStepperNext = /** @class */ (function () {
16918
    function CdkStepperNext(_stepper) {
16919
        this._stepper = _stepper;
16920
        /**
16921
         * Type of the next button. Defaults to "submit" if not specified.
16922
         */
16923
        this.type = 'submit';
16924
    }
16925
    CdkStepperNext.decorators = [
16926
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
16927
                    selector: 'button[cdkStepperNext]',
16928
                    host: {
16929
                        '(click)': '_stepper.next()',
16930
                        '[type]': 'type',
16931
                    }
16932
                },] },
16933
    ];
16934
    /** @nocollapse */
16935
    CdkStepperNext.ctorParameters = function () { return [
16936
        { type: CdkStepper, },
16937
    ]; };
16938
    CdkStepperNext.propDecorators = {
16939
        "type": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
16940
    };
16941
    return CdkStepperNext;
16942
}());
16943
/**
16944
 * Button that moves to the previous step in a stepper workflow.
16945
 */
16946
var CdkStepperPrevious = /** @class */ (function () {
16947
    function CdkStepperPrevious(_stepper) {
16948
        this._stepper = _stepper;
16949
        /**
16950
         * Type of the previous button. Defaults to "button" if not specified.
16951
         */
16952
        this.type = 'button';
16953
    }
16954
    CdkStepperPrevious.decorators = [
16955
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
16956
                    selector: 'button[cdkStepperPrevious]',
16957
                    host: {
16958
                        '(click)': '_stepper.previous()',
16959
                        '[type]': 'type',
16960
                    }
16961
                },] },
16962
    ];
16963
    /** @nocollapse */
16964
    CdkStepperPrevious.ctorParameters = function () { return [
16965
        { type: CdkStepper, },
16966
    ]; };
16967
    CdkStepperPrevious.propDecorators = {
16968
        "type": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
16969
    };
16970
    return CdkStepperPrevious;
16971
}());
16972
 
16973
/**
16974
 * @fileoverview added by tsickle
16975
 * @suppress {checkTypes} checked by tsc
16976
 */
16977
var CdkStepperModule = /** @class */ (function () {
16978
    function CdkStepperModule() {
16979
    }
16980
    CdkStepperModule.decorators = [
16981
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
16982
                    imports: [_angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_2__["BidiModule"], _angular_common__WEBPACK_IMPORTED_MODULE_8__["CommonModule"]],
16983
                    exports: [CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious],
16984
                    declarations: [CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious]
16985
                },] },
16986
    ];
16987
    return CdkStepperModule;
16988
}());
16989
 
16990
/**
16991
 * @fileoverview added by tsickle
16992
 * @suppress {checkTypes} checked by tsc
16993
 */
16994
 
16995
/**
16996
 * @fileoverview added by tsickle
16997
 * @suppress {checkTypes} checked by tsc
16998
 */
16999
 
17000
 
17001
//# sourceMappingURL=stepper.es5.js.map
17002
 
17003
 
17004
/***/ }),
17005
 
17006
/***/ "./node_modules/@angular/cdk/esm5/table.es5.js":
17007
/*!*****************************************************!*\
17008
  !*** ./node_modules/@angular/cdk/esm5/table.es5.js ***!
17009
  \*****************************************************/
17010
/*! exports provided: DataSource, DataRowOutlet, HeaderRowOutlet, FooterRowOutlet, CDK_TABLE_TEMPLATE, CdkTable, CdkCellDef, CdkHeaderCellDef, CdkFooterCellDef, CdkColumnDefBase, _CdkColumnDefBase, CdkColumnDef, BaseCdkCell, CdkHeaderCell, CdkFooterCell, CdkCell, CDK_ROW_TEMPLATE, BaseRowDef, CdkHeaderRowDefBase, _CdkHeaderRowDefBase, CdkHeaderRowDef, CdkFooterRowDefBase, _CdkFooterRowDefBase, CdkFooterRowDef, CdkRowDef, CdkCellOutlet, CdkHeaderRow, CdkFooterRow, CdkRow, CdkTableModule, STICKY_DIRECTIONS, StickyStyler, mixinHasStickyInput */
17011
/***/ (function(module, __webpack_exports__, __webpack_require__) {
17012
 
17013
"use strict";
17014
__webpack_require__.r(__webpack_exports__);
17015
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DataRowOutlet", function() { return DataRowOutlet; });
17016
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderRowOutlet", function() { return HeaderRowOutlet; });
17017
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FooterRowOutlet", function() { return FooterRowOutlet; });
17018
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CDK_TABLE_TEMPLATE", function() { return CDK_TABLE_TEMPLATE; });
17019
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkTable", function() { return CdkTable; });
17020
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkCellDef", function() { return CdkCellDef; });
17021
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkHeaderCellDef", function() { return CdkHeaderCellDef; });
17022
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkFooterCellDef", function() { return CdkFooterCellDef; });
17023
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkColumnDefBase", function() { return CdkColumnDefBase; });
17024
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_CdkColumnDefBase", function() { return _CdkColumnDefBase; });
17025
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkColumnDef", function() { return CdkColumnDef; });
17026
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseCdkCell", function() { return BaseCdkCell; });
17027
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkHeaderCell", function() { return CdkHeaderCell; });
17028
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkFooterCell", function() { return CdkFooterCell; });
17029
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkCell", function() { return CdkCell; });
17030
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CDK_ROW_TEMPLATE", function() { return CDK_ROW_TEMPLATE; });
17031
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseRowDef", function() { return BaseRowDef; });
17032
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkHeaderRowDefBase", function() { return CdkHeaderRowDefBase; });
17033
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_CdkHeaderRowDefBase", function() { return _CdkHeaderRowDefBase; });
17034
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkHeaderRowDef", function() { return CdkHeaderRowDef; });
17035
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkFooterRowDefBase", function() { return CdkFooterRowDefBase; });
17036
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_CdkFooterRowDefBase", function() { return _CdkFooterRowDefBase; });
17037
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkFooterRowDef", function() { return CdkFooterRowDef; });
17038
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkRowDef", function() { return CdkRowDef; });
17039
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkCellOutlet", function() { return CdkCellOutlet; });
17040
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkHeaderRow", function() { return CdkHeaderRow; });
17041
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkFooterRow", function() { return CdkFooterRow; });
17042
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkRow", function() { return CdkRow; });
17043
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkTableModule", function() { return CdkTableModule; });
17044
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "STICKY_DIRECTIONS", function() { return STICKY_DIRECTIONS; });
17045
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StickyStyler", function() { return StickyStyler; });
17046
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mixinHasStickyInput", function() { return mixinHasStickyInput; });
17047
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
17048
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
17049
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
17050
/* harmony import */ var _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/collections */ "./node_modules/@angular/cdk/esm5/collections.es5.js");
17051
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DataSource", function() { return _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_3__["DataSource"]; });
17052
 
17053
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
17054
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
17055
/* harmony import */ var _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/cdk/bidi */ "./node_modules/@angular/cdk/esm5/bidi.es5.js");
17056
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
17057
/**
17058
 * @license
17059
 * Copyright Google LLC All Rights Reserved.
17060
 *
17061
 * Use of this source code is governed by an MIT-style license that can be
17062
 * found in the LICENSE file at https://angular.io/license
17063
 */
17064
 
17065
 
17066
 
17067
 
17068
 
17069
 
17070
 
17071
 
17072
 
17073
 
17074
/**
17075
 * @fileoverview added by tsickle
17076
 * @suppress {checkTypes} checked by tsc
17077
 */
17078
/**
17079
 * Mixin to provide a directive with a function that checks if the sticky input has been
17080
 * changed since the last time the function was called. Essentially adds a dirty-check to the
17081
 * sticky value.
17082
 * @template T
17083
 * @param {?} base
17084
 * @return {?}
17085
 */
17086
function mixinHasStickyInput(base) {
17087
    return /** @class */ (function (_super) {
17088
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(class_1, _super);
17089
        function class_1() {
17090
            var args = [];
17091
            for (var _i = 0; _i < arguments.length; _i++) {
17092
                args[_i] = arguments[_i];
17093
            }
17094
            var _this = _super.apply(this, args) || this;
17095
            _this._sticky = false;
17096
            /**
17097
             * Whether the sticky input has changed since it was last checked.
17098
             */
17099
            _this._hasStickyChanged = false;
17100
            return _this;
17101
        }
17102
        Object.defineProperty(class_1.prototype, "sticky", {
17103
            /** Whether sticky positioning should be applied. */
17104
            get: /**
17105
             * Whether sticky positioning should be applied.
17106
             * @return {?}
17107
             */
17108
            function () { return this._sticky; },
17109
            set: /**
17110
             * @param {?} v
17111
             * @return {?}
17112
             */
17113
            function (v) {
17114
                var /** @type {?} */ prevValue = this._sticky;
17115
                this._sticky = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceBooleanProperty"])(v);
17116
                this._hasStickyChanged = prevValue !== this._sticky;
17117
            },
17118
            enumerable: true,
17119
            configurable: true
17120
        });
17121
        /** Whether the sticky value has changed since this was last called. */
17122
        /**
17123
         * Whether the sticky value has changed since this was last called.
17124
         * @return {?}
17125
         */
17126
        class_1.prototype.hasStickyChanged = /**
17127
         * Whether the sticky value has changed since this was last called.
17128
         * @return {?}
17129
         */
17130
        function () {
17131
            var /** @type {?} */ hasStickyChanged = this._hasStickyChanged;
17132
            this._hasStickyChanged = false;
17133
            return hasStickyChanged;
17134
        };
17135
        /** Resets the dirty check for cases where the sticky state has been used without checking. */
17136
        /**
17137
         * Resets the dirty check for cases where the sticky state has been used without checking.
17138
         * @return {?}
17139
         */
17140
        class_1.prototype.resetStickyChanged = /**
17141
         * Resets the dirty check for cases where the sticky state has been used without checking.
17142
         * @return {?}
17143
         */
17144
        function () {
17145
            this._hasStickyChanged = false;
17146
        };
17147
        return class_1;
17148
    }(base));
17149
}
17150
 
17151
/**
17152
 * @fileoverview added by tsickle
17153
 * @suppress {checkTypes} checked by tsc
17154
 */
17155
/**
17156
 * Cell definition for a CDK table.
17157
 * Captures the template of a column's data row cell as well as cell-specific properties.
17158
 */
17159
var CdkCellDef = /** @class */ (function () {
17160
    function CdkCellDef(template) {
17161
        this.template = template;
17162
    }
17163
    CdkCellDef.decorators = [
17164
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Directive"], args: [{ selector: '[cdkCellDef]' },] },
17165
    ];
17166
    /** @nocollapse */
17167
    CdkCellDef.ctorParameters = function () { return [
17168
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["TemplateRef"], },
17169
    ]; };
17170
    return CdkCellDef;
17171
}());
17172
/**
17173
 * Header cell definition for a CDK table.
17174
 * Captures the template of a column's header cell and as well as cell-specific properties.
17175
 */
17176
var CdkHeaderCellDef = /** @class */ (function () {
17177
    function CdkHeaderCellDef(template) {
17178
        this.template = template;
17179
    }
17180
    CdkHeaderCellDef.decorators = [
17181
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Directive"], args: [{ selector: '[cdkHeaderCellDef]' },] },
17182
    ];
17183
    /** @nocollapse */
17184
    CdkHeaderCellDef.ctorParameters = function () { return [
17185
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["TemplateRef"], },
17186
    ]; };
17187
    return CdkHeaderCellDef;
17188
}());
17189
/**
17190
 * Footer cell definition for a CDK table.
17191
 * Captures the template of a column's footer cell and as well as cell-specific properties.
17192
 */
17193
var CdkFooterCellDef = /** @class */ (function () {
17194
    function CdkFooterCellDef(template) {
17195
        this.template = template;
17196
    }
17197
    CdkFooterCellDef.decorators = [
17198
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Directive"], args: [{ selector: '[cdkFooterCellDef]' },] },
17199
    ];
17200
    /** @nocollapse */
17201
    CdkFooterCellDef.ctorParameters = function () { return [
17202
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["TemplateRef"], },
17203
    ]; };
17204
    return CdkFooterCellDef;
17205
}());
17206
/**
17207
 * \@docs-private
17208
 */
17209
var  /**
17210
 * \@docs-private
17211
 */
17212
CdkColumnDefBase = /** @class */ (function () {
17213
    function CdkColumnDefBase() {
17214
    }
17215
    return CdkColumnDefBase;
17216
}());
17217
var /** @type {?} */ _CdkColumnDefBase = mixinHasStickyInput(CdkColumnDefBase);
17218
/**
17219
 * Column definition for the CDK table.
17220
 * Defines a set of cells available for a table column.
17221
 */
17222
var CdkColumnDef = /** @class */ (function (_super) {
17223
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CdkColumnDef, _super);
17224
    function CdkColumnDef() {
17225
        var _this = _super !== null && _super.apply(this, arguments) || this;
17226
        _this._stickyEnd = false;
17227
        return _this;
17228
    }
17229
    Object.defineProperty(CdkColumnDef.prototype, "name", {
17230
        get: /**
17231
         * Unique name for this column.
17232
         * @return {?}
17233
         */
17234
        function () { return this._name; },
17235
        set: /**
17236
         * @param {?} name
17237
         * @return {?}
17238
         */
17239
        function (name) {
17240
            // If the directive is set without a name (updated programatically), then this setter will
17241
            // trigger with an empty string and should not overwrite the programatically set value.
17242
            if (!name) {
17243
                return;
17244
            }
17245
            this._name = name;
17246
            this.cssClassFriendlyName = name.replace(/[^a-z0-9_-]/ig, '-');
17247
        },
17248
        enumerable: true,
17249
        configurable: true
17250
    });
17251
    Object.defineProperty(CdkColumnDef.prototype, "stickyEnd", {
17252
        get: /**
17253
         * Whether this column should be sticky positioned on the end of the row. Should make sure
17254
         * that it mimics the `CanStick` mixin such that `_hasStickyChanged` is set to true if the value
17255
         * has been changed.
17256
         * @return {?}
17257
         */
17258
        function () { return this._stickyEnd; },
17259
        set: /**
17260
         * @param {?} v
17261
         * @return {?}
17262
         */
17263
        function (v) {
17264
            var /** @type {?} */ prevValue = this._stickyEnd;
17265
            this._stickyEnd = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceBooleanProperty"])(v);
17266
            this._hasStickyChanged = prevValue !== this._stickyEnd;
17267
        },
17268
        enumerable: true,
17269
        configurable: true
17270
    });
17271
    CdkColumnDef.decorators = [
17272
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Directive"], args: [{
17273
                    selector: '[cdkColumnDef]',
17274
                    inputs: ['sticky']
17275
                },] },
17276
    ];
17277
    /** @nocollapse */
17278
    CdkColumnDef.propDecorators = {
17279
        "name": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"], args: ['cdkColumnDef',] },],
17280
        "stickyEnd": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"], args: ['stickyEnd',] },],
17281
        "cell": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ContentChild"], args: [CdkCellDef,] },],
17282
        "headerCell": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ContentChild"], args: [CdkHeaderCellDef,] },],
17283
        "footerCell": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ContentChild"], args: [CdkFooterCellDef,] },],
17284
    };
17285
    return CdkColumnDef;
17286
}(_CdkColumnDefBase));
17287
/**
17288
 * Base class for the cells. Adds a CSS classname that identifies the column it renders in.
17289
 */
17290
var  /**
17291
 * Base class for the cells. Adds a CSS classname that identifies the column it renders in.
17292
 */
17293
BaseCdkCell = /** @class */ (function () {
17294
    function BaseCdkCell(columnDef, elementRef) {
17295
        var /** @type {?} */ columnClassName = "cdk-column-" + columnDef.cssClassFriendlyName;
17296
        elementRef.nativeElement.classList.add(columnClassName);
17297
    }
17298
    return BaseCdkCell;
17299
}());
17300
/**
17301
 * Header cell template container that adds the right classes and role.
17302
 */
17303
var CdkHeaderCell = /** @class */ (function (_super) {
17304
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CdkHeaderCell, _super);
17305
    function CdkHeaderCell(columnDef, elementRef) {
17306
        return _super.call(this, columnDef, elementRef) || this;
17307
    }
17308
    CdkHeaderCell.decorators = [
17309
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Directive"], args: [{
17310
                    selector: 'cdk-header-cell, th[cdk-header-cell]',
17311
                    host: {
17312
                        'class': 'cdk-header-cell',
17313
                        'role': 'columnheader',
17314
                    },
17315
                },] },
17316
    ];
17317
    /** @nocollapse */
17318
    CdkHeaderCell.ctorParameters = function () { return [
17319
        { type: CdkColumnDef, },
17320
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ElementRef"], },
17321
    ]; };
17322
    return CdkHeaderCell;
17323
}(BaseCdkCell));
17324
/**
17325
 * Footer cell template container that adds the right classes and role.
17326
 */
17327
var CdkFooterCell = /** @class */ (function (_super) {
17328
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CdkFooterCell, _super);
17329
    function CdkFooterCell(columnDef, elementRef) {
17330
        return _super.call(this, columnDef, elementRef) || this;
17331
    }
17332
    CdkFooterCell.decorators = [
17333
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Directive"], args: [{
17334
                    selector: 'cdk-footer-cell, td[cdk-footer-cell]',
17335
                    host: {
17336
                        'class': 'cdk-footer-cell',
17337
                        'role': 'gridcell',
17338
                    },
17339
                },] },
17340
    ];
17341
    /** @nocollapse */
17342
    CdkFooterCell.ctorParameters = function () { return [
17343
        { type: CdkColumnDef, },
17344
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ElementRef"], },
17345
    ]; };
17346
    return CdkFooterCell;
17347
}(BaseCdkCell));
17348
/**
17349
 * Cell template container that adds the right classes and role.
17350
 */
17351
var CdkCell = /** @class */ (function (_super) {
17352
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CdkCell, _super);
17353
    function CdkCell(columnDef, elementRef) {
17354
        return _super.call(this, columnDef, elementRef) || this;
17355
    }
17356
    CdkCell.decorators = [
17357
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Directive"], args: [{
17358
                    selector: 'cdk-cell, td[cdk-cell]',
17359
                    host: {
17360
                        'class': 'cdk-cell',
17361
                        'role': 'gridcell',
17362
                    },
17363
                },] },
17364
    ];
17365
    /** @nocollapse */
17366
    CdkCell.ctorParameters = function () { return [
17367
        { type: CdkColumnDef, },
17368
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ElementRef"], },
17369
    ]; };
17370
    return CdkCell;
17371
}(BaseCdkCell));
17372
 
17373
/**
17374
 * @fileoverview added by tsickle
17375
 * @suppress {checkTypes} checked by tsc
17376
 */
17377
/**
17378
 * The row template that can be used by the mat-table. Should not be used outside of the
17379
 * material library.
17380
 */
17381
var /** @type {?} */ CDK_ROW_TEMPLATE = "<ng-container cdkCellOutlet></ng-container>";
17382
/**
17383
 * Base class for the CdkHeaderRowDef and CdkRowDef that handles checking their columns inputs
17384
 * for changes and notifying the table.
17385
 * @abstract
17386
 */
17387
var  /**
17388
 * Base class for the CdkHeaderRowDef and CdkRowDef that handles checking their columns inputs
17389
 * for changes and notifying the table.
17390
 * @abstract
17391
 */
17392
BaseRowDef = /** @class */ (function () {
17393
    function BaseRowDef(template, _differs) {
17394
        this.template = template;
17395
        this._differs = _differs;
17396
    }
17397
    /**
17398
     * @param {?} changes
17399
     * @return {?}
17400
     */
17401
    BaseRowDef.prototype.ngOnChanges = /**
17402
     * @param {?} changes
17403
     * @return {?}
17404
     */
17405
    function (changes) {
17406
        // Create a new columns differ if one does not yet exist. Initialize it based on initial value
17407
        // of the columns property or an empty array if none is provided.
17408
        if (!this._columnsDiffer) {
17409
            var /** @type {?} */ columns = (changes['columns'] && changes['columns'].currentValue) || [];
17410
            this._columnsDiffer = this._differs.find(columns).create();
17411
            this._columnsDiffer.diff(columns);
17412
        }
17413
    };
17414
    /**
17415
     * Returns the difference between the current columns and the columns from the last diff, or null
17416
     * if there is no difference.
17417
     */
17418
    /**
17419
     * Returns the difference between the current columns and the columns from the last diff, or null
17420
     * if there is no difference.
17421
     * @return {?}
17422
     */
17423
    BaseRowDef.prototype.getColumnsDiff = /**
17424
     * Returns the difference between the current columns and the columns from the last diff, or null
17425
     * if there is no difference.
17426
     * @return {?}
17427
     */
17428
    function () {
17429
        return this._columnsDiffer.diff(this.columns);
17430
    };
17431
    /** Gets this row def's relevant cell template from the provided column def. */
17432
    /**
17433
     * Gets this row def's relevant cell template from the provided column def.
17434
     * @param {?} column
17435
     * @return {?}
17436
     */
17437
    BaseRowDef.prototype.extractCellTemplate = /**
17438
     * Gets this row def's relevant cell template from the provided column def.
17439
     * @param {?} column
17440
     * @return {?}
17441
     */
17442
    function (column) {
17443
        if (this instanceof CdkHeaderRowDef) {
17444
            return column.headerCell.template;
17445
        }
17446
        if (this instanceof CdkFooterRowDef) {
17447
            return column.footerCell.template;
17448
        }
17449
        else {
17450
            return column.cell.template;
17451
        }
17452
    };
17453
    return BaseRowDef;
17454
}());
17455
/**
17456
 * \@docs-private
17457
 */
17458
var  /**
17459
 * \@docs-private
17460
 */
17461
CdkHeaderRowDefBase = /** @class */ (function (_super) {
17462
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CdkHeaderRowDefBase, _super);
17463
    function CdkHeaderRowDefBase() {
17464
        return _super !== null && _super.apply(this, arguments) || this;
17465
    }
17466
    return CdkHeaderRowDefBase;
17467
}(BaseRowDef));
17468
var /** @type {?} */ _CdkHeaderRowDefBase = mixinHasStickyInput(CdkHeaderRowDefBase);
17469
/**
17470
 * Header row definition for the CDK table.
17471
 * Captures the header row's template and other header properties such as the columns to display.
17472
 */
17473
var CdkHeaderRowDef = /** @class */ (function (_super) {
17474
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CdkHeaderRowDef, _super);
17475
    function CdkHeaderRowDef(template, _differs) {
17476
        return _super.call(this, template, _differs) || this;
17477
    }
17478
    // Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.
17479
    // Explicitly define it so that the method is called as part of the Angular lifecycle.
17480
    /**
17481
     * @param {?} changes
17482
     * @return {?}
17483
     */
17484
    CdkHeaderRowDef.prototype.ngOnChanges = /**
17485
     * @param {?} changes
17486
     * @return {?}
17487
     */
17488
    function (changes) {
17489
        _super.prototype.ngOnChanges.call(this, changes);
17490
    };
17491
    CdkHeaderRowDef.decorators = [
17492
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Directive"], args: [{
17493
                    selector: '[cdkHeaderRowDef]',
17494
                    inputs: ['columns: cdkHeaderRowDef', 'sticky: cdkHeaderRowDefSticky'],
17495
                },] },
17496
    ];
17497
    /** @nocollapse */
17498
    CdkHeaderRowDef.ctorParameters = function () { return [
17499
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["TemplateRef"], },
17500
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["IterableDiffers"], },
17501
    ]; };
17502
    return CdkHeaderRowDef;
17503
}(_CdkHeaderRowDefBase));
17504
/**
17505
 * \@docs-private
17506
 */
17507
var  /**
17508
 * \@docs-private
17509
 */
17510
CdkFooterRowDefBase = /** @class */ (function (_super) {
17511
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CdkFooterRowDefBase, _super);
17512
    function CdkFooterRowDefBase() {
17513
        return _super !== null && _super.apply(this, arguments) || this;
17514
    }
17515
    return CdkFooterRowDefBase;
17516
}(BaseRowDef));
17517
var /** @type {?} */ _CdkFooterRowDefBase = mixinHasStickyInput(CdkFooterRowDefBase);
17518
/**
17519
 * Footer row definition for the CDK table.
17520
 * Captures the footer row's template and other footer properties such as the columns to display.
17521
 */
17522
var CdkFooterRowDef = /** @class */ (function (_super) {
17523
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CdkFooterRowDef, _super);
17524
    function CdkFooterRowDef(template, _differs) {
17525
        return _super.call(this, template, _differs) || this;
17526
    }
17527
    // Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.
17528
    // Explicitly define it so that the method is called as part of the Angular lifecycle.
17529
    /**
17530
     * @param {?} changes
17531
     * @return {?}
17532
     */
17533
    CdkFooterRowDef.prototype.ngOnChanges = /**
17534
     * @param {?} changes
17535
     * @return {?}
17536
     */
17537
    function (changes) {
17538
        _super.prototype.ngOnChanges.call(this, changes);
17539
    };
17540
    CdkFooterRowDef.decorators = [
17541
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Directive"], args: [{
17542
                    selector: '[cdkFooterRowDef]',
17543
                    inputs: ['columns: cdkFooterRowDef', 'sticky: cdkFooterRowDefSticky'],
17544
                },] },
17545
    ];
17546
    /** @nocollapse */
17547
    CdkFooterRowDef.ctorParameters = function () { return [
17548
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["TemplateRef"], },
17549
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["IterableDiffers"], },
17550
    ]; };
17551
    return CdkFooterRowDef;
17552
}(_CdkFooterRowDefBase));
17553
/**
17554
 * Data row definition for the CDK table.
17555
 * Captures the header row's template and other row properties such as the columns to display and
17556
 * a when predicate that describes when this row should be used.
17557
 * @template T
17558
 */
17559
var CdkRowDef = /** @class */ (function (_super) {
17560
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CdkRowDef, _super);
17561
    // TODO(andrewseguin): Add an input for providing a switch function to determine
17562
    //   if this template should be used.
17563
    function CdkRowDef(template, _differs) {
17564
        return _super.call(this, template, _differs) || this;
17565
    }
17566
    CdkRowDef.decorators = [
17567
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Directive"], args: [{
17568
                    selector: '[cdkRowDef]',
17569
                    inputs: ['columns: cdkRowDefColumns', 'when: cdkRowDefWhen'],
17570
                },] },
17571
    ];
17572
    /** @nocollapse */
17573
    CdkRowDef.ctorParameters = function () { return [
17574
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["TemplateRef"], },
17575
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["IterableDiffers"], },
17576
    ]; };
17577
    return CdkRowDef;
17578
}(BaseRowDef));
17579
/**
17580
 * Outlet for rendering cells inside of a row or header row.
17581
 * \@docs-private
17582
 */
17583
var CdkCellOutlet = /** @class */ (function () {
17584
    function CdkCellOutlet(_viewContainer) {
17585
        this._viewContainer = _viewContainer;
17586
        CdkCellOutlet.mostRecentCellOutlet = this;
17587
    }
17588
    /**
17589
     * @return {?}
17590
     */
17591
    CdkCellOutlet.prototype.ngOnDestroy = /**
17592
     * @return {?}
17593
     */
17594
    function () {
17595
        // If this was the last outlet being rendered in the view, remove the reference
17596
        // from the static property after it has been destroyed to avoid leaking memory.
17597
        if (CdkCellOutlet.mostRecentCellOutlet === this) {
17598
            CdkCellOutlet.mostRecentCellOutlet = null;
17599
        }
17600
    };
17601
    /**
17602
     * Static property containing the latest constructed instance of this class.
17603
     * Used by the CDK table when each CdkHeaderRow and CdkRow component is created using
17604
     * createEmbeddedView. After one of these components are created, this property will provide
17605
     * a handle to provide that component's cells and context. After init, the CdkCellOutlet will
17606
     * construct the cells with the provided context.
17607
     */
17608
    CdkCellOutlet.mostRecentCellOutlet = null;
17609
    CdkCellOutlet.decorators = [
17610
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Directive"], args: [{ selector: '[cdkCellOutlet]' },] },
17611
    ];
17612
    /** @nocollapse */
17613
    CdkCellOutlet.ctorParameters = function () { return [
17614
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ViewContainerRef"], },
17615
    ]; };
17616
    return CdkCellOutlet;
17617
}());
17618
/**
17619
 * Header template container that contains the cell outlet. Adds the right class and role.
17620
 */
17621
var CdkHeaderRow = /** @class */ (function () {
17622
    function CdkHeaderRow() {
17623
    }
17624
    CdkHeaderRow.decorators = [
17625
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Component"], args: [{selector: 'cdk-header-row, tr[cdk-header-row]',
17626
                    template: CDK_ROW_TEMPLATE,
17627
                    host: {
17628
                        'class': 'cdk-header-row',
17629
                        'role': 'row',
17630
                    },
17631
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ChangeDetectionStrategy"].OnPush,
17632
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ViewEncapsulation"].None,
17633
                },] },
17634
    ];
17635
    return CdkHeaderRow;
17636
}());
17637
/**
17638
 * Footer template container that contains the cell outlet. Adds the right class and role.
17639
 */
17640
var CdkFooterRow = /** @class */ (function () {
17641
    function CdkFooterRow() {
17642
    }
17643
    CdkFooterRow.decorators = [
17644
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Component"], args: [{selector: 'cdk-footer-row, tr[cdk-footer-row]',
17645
                    template: CDK_ROW_TEMPLATE,
17646
                    host: {
17647
                        'class': 'cdk-footer-row',
17648
                        'role': 'row',
17649
                    },
17650
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ChangeDetectionStrategy"].OnPush,
17651
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ViewEncapsulation"].None,
17652
                },] },
17653
    ];
17654
    return CdkFooterRow;
17655
}());
17656
/**
17657
 * Data row template container that contains the cell outlet. Adds the right class and role.
17658
 */
17659
var CdkRow = /** @class */ (function () {
17660
    function CdkRow() {
17661
    }
17662
    CdkRow.decorators = [
17663
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Component"], args: [{selector: 'cdk-row, tr[cdk-row]',
17664
                    template: CDK_ROW_TEMPLATE,
17665
                    host: {
17666
                        'class': 'cdk-row',
17667
                        'role': 'row',
17668
                    },
17669
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ChangeDetectionStrategy"].OnPush,
17670
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ViewEncapsulation"].None,
17671
                },] },
17672
    ];
17673
    return CdkRow;
17674
}());
17675
 
17676
/**
17677
 * @fileoverview added by tsickle
17678
 * @suppress {checkTypes} checked by tsc
17679
 */
17680
 
17681
/**
17682
 * Returns an error to be thrown when attempting to find an unexisting column.
17683
 * \@docs-private
17684
 * @param {?} id Id whose lookup failed.
17685
 * @return {?}
17686
 */
17687
function getTableUnknownColumnError(id) {
17688
    return Error("Could not find column with id \"" + id + "\".");
17689
}
17690
/**
17691
 * Returns an error to be thrown when two column definitions have the same name.
17692
 * \@docs-private
17693
 * @param {?} name
17694
 * @return {?}
17695
 */
17696
function getTableDuplicateColumnNameError(name) {
17697
    return Error("Duplicate column definition name provided: \"" + name + "\".");
17698
}
17699
/**
17700
 * Returns an error to be thrown when there are multiple rows that are missing a when function.
17701
 * \@docs-private
17702
 * @return {?}
17703
 */
17704
function getTableMultipleDefaultRowDefsError() {
17705
    return Error("There can only be one default row without a when predicate function.");
17706
}
17707
/**
17708
 * Returns an error to be thrown when there are no matching row defs for a particular set of data.
17709
 * \@docs-private
17710
 * @param {?} data
17711
 * @return {?}
17712
 */
17713
function getTableMissingMatchingRowDefError(data) {
17714
    return Error("Could not find a matching row definition for the" +
17715
        ("provided row data: " + JSON.stringify(data)));
17716
}
17717
/**
17718
 * Returns an error to be thrown when there is no row definitions present in the content.
17719
 * \@docs-private
17720
 * @return {?}
17721
 */
17722
function getTableMissingRowDefsError() {
17723
    return Error('Missing definitions for header, footer, and row; ' +
17724
        'cannot determine which columns should be rendered.');
17725
}
17726
/**
17727
 * Returns an error to be thrown when the data source does not match the compatible types.
17728
 * \@docs-private
17729
 * @return {?}
17730
 */
17731
function getTableUnknownDataSourceError() {
17732
    return Error("Provided data source did not match an array, Observable, or DataSource");
17733
}
17734
 
17735
/**
17736
 * @fileoverview added by tsickle
17737
 * @suppress {checkTypes} checked by tsc
17738
 */
17739
 
17740
/**
17741
 * List of all possible directions that can be used for sticky positioning.
17742
 * \@docs-private
17743
 */
17744
var /** @type {?} */ STICKY_DIRECTIONS = ['top', 'bottom', 'left', 'right'];
17745
/**
17746
 * Applies and removes sticky positioning styles to the `CdkTable` rows and columns cells.
17747
 * \@docs-private
17748
 */
17749
var  /**
17750
 * Applies and removes sticky positioning styles to the `CdkTable` rows and columns cells.
17751
 * \@docs-private
17752
 */
17753
StickyStyler = /** @class */ (function () {
17754
    /**
17755
     * @param isNativeHtmlTable Whether the sticky logic should be based on a table
17756
     *     that uses the native `<table>` element.
17757
     * @param stickCellCss The CSS class that will be applied to every row/cell that has
17758
     *     sticky positioning applied.
17759
     * @param direction The directionality context of the table (ltr/rtl); affects column positioning
17760
     *     by reversing left/right positions.
17761
     */
17762
    function StickyStyler(isNativeHtmlTable, stickCellCss, direction) {
17763
        this.isNativeHtmlTable = isNativeHtmlTable;
17764
        this.stickCellCss = stickCellCss;
17765
        this.direction = direction;
17766
    }
17767
    /**
17768
     * Clears the sticky positioning styles from the row and its cells by resetting the `position`
17769
     * style, setting the zIndex to 0, and unsetting each provided sticky direction.
17770
     * @param rows The list of rows that should be cleared from sticking in the provided directions
17771
     * @param stickyDirections The directions that should no longer be set as sticky on the rows.
17772
     */
17773
    /**
17774
     * Clears the sticky positioning styles from the row and its cells by resetting the `position`
17775
     * style, setting the zIndex to 0, and unsetting each provided sticky direction.
17776
     * @param {?} rows The list of rows that should be cleared from sticking in the provided directions
17777
     * @param {?} stickyDirections The directions that should no longer be set as sticky on the rows.
17778
     * @return {?}
17779
     */
17780
    StickyStyler.prototype.clearStickyPositioning = /**
17781
     * Clears the sticky positioning styles from the row and its cells by resetting the `position`
17782
     * style, setting the zIndex to 0, and unsetting each provided sticky direction.
17783
     * @param {?} rows The list of rows that should be cleared from sticking in the provided directions
17784
     * @param {?} stickyDirections The directions that should no longer be set as sticky on the rows.
17785
     * @return {?}
17786
     */
17787
    function (rows, stickyDirections) {
17788
        for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {
17789
            var row = rows_1[_i];
17790
            // If the row isn't an element (e.g. if it's an `ng-container`),
17791
            // it won't have inline styles or `children` so we skip it.
17792
            if (row.nodeType !== row.ELEMENT_NODE) {
17793
                continue;
17794
            }
17795
            this._removeStickyStyle(row, stickyDirections);
17796
            for (var /** @type {?} */ i = 0; i < row.children.length; i++) {
17797
                var /** @type {?} */ cell = /** @type {?} */ (row.children[i]);
17798
                this._removeStickyStyle(cell, stickyDirections);
17799
            }
17800
        }
17801
    };
17802
    /**
17803
     * Applies sticky left and right positions to the cells of each row according to the sticky
17804
     * states of the rendered column definitions.
17805
     * @param rows The rows that should have its set of cells stuck according to the sticky states.
17806
     * @param stickyStartStates A list of boolean states where each state represents whether the cell
17807
     *     in this index position should be stuck to the start of the row.
17808
     * @param stickyEndStates A list of boolean states where each state represents whether the cell
17809
     *     in this index position should be stuck to the end of the row.
17810
     */
17811
    /**
17812
     * Applies sticky left and right positions to the cells of each row according to the sticky
17813
     * states of the rendered column definitions.
17814
     * @param {?} rows The rows that should have its set of cells stuck according to the sticky states.
17815
     * @param {?} stickyStartStates A list of boolean states where each state represents whether the cell
17816
     *     in this index position should be stuck to the start of the row.
17817
     * @param {?} stickyEndStates A list of boolean states where each state represents whether the cell
17818
     *     in this index position should be stuck to the end of the row.
17819
     * @return {?}
17820
     */
17821
    StickyStyler.prototype.updateStickyColumns = /**
17822
     * Applies sticky left and right positions to the cells of each row according to the sticky
17823
     * states of the rendered column definitions.
17824
     * @param {?} rows The rows that should have its set of cells stuck according to the sticky states.
17825
     * @param {?} stickyStartStates A list of boolean states where each state represents whether the cell
17826
     *     in this index position should be stuck to the start of the row.
17827
     * @param {?} stickyEndStates A list of boolean states where each state represents whether the cell
17828
     *     in this index position should be stuck to the end of the row.
17829
     * @return {?}
17830
     */
17831
    function (rows, stickyStartStates, stickyEndStates) {
17832
        var /** @type {?} */ hasStickyColumns = stickyStartStates.some(function (state) { return state; }) || stickyEndStates.some(function (state) { return state; });
17833
        if (!rows.length || !hasStickyColumns) {
17834
            return;
17835
        }
17836
        var /** @type {?} */ firstRow = rows[0];
17837
        var /** @type {?} */ numCells = firstRow.children.length;
17838
        var /** @type {?} */ cellWidths = this._getCellWidths(firstRow);
17839
        var /** @type {?} */ startPositions = this._getStickyStartColumnPositions(cellWidths, stickyStartStates);
17840
        var /** @type {?} */ endPositions = this._getStickyEndColumnPositions(cellWidths, stickyEndStates);
17841
        var /** @type {?} */ isRtl = this.direction === 'rtl';
17842
        for (var _i = 0, rows_2 = rows; _i < rows_2.length; _i++) {
17843
            var row = rows_2[_i];
17844
            for (var /** @type {?} */ i = 0; i < numCells; i++) {
17845
                var /** @type {?} */ cell = /** @type {?} */ (row.children[i]);
17846
                if (stickyStartStates[i]) {
17847
                    this._addStickyStyle(cell, isRtl ? 'right' : 'left', startPositions[i]);
17848
                }
17849
                if (stickyEndStates[i]) {
17850
                    this._addStickyStyle(cell, isRtl ? 'left' : 'right', endPositions[i]);
17851
                }
17852
            }
17853
        }
17854
    };
17855
    /**
17856
     * Applies sticky positioning to the row's cells if using the native table layout, and to the
17857
     * row itself otherwise.
17858
     * @param rowsToStick The list of rows that should be stuck according to their corresponding
17859
     *     sticky state and to the provided top or bottom position.
17860
     * @param stickyStates A list of boolean states where each state represents whether the row
17861
     *     should be stuck in the particular top or bottom position.
17862
     * @param position The position direction in which the row should be stuck if that row should be
17863
     *     sticky.
17864
     *
17865
     */
17866
    /**
17867
     * Applies sticky positioning to the row's cells if using the native table layout, and to the
17868
     * row itself otherwise.
17869
     * @param {?} rowsToStick The list of rows that should be stuck according to their corresponding
17870
     *     sticky state and to the provided top or bottom position.
17871
     * @param {?} stickyStates A list of boolean states where each state represents whether the row
17872
     *     should be stuck in the particular top or bottom position.
17873
     * @param {?} position The position direction in which the row should be stuck if that row should be
17874
     *     sticky.
17875
     *
17876
     * @return {?}
17877
     */
17878
    StickyStyler.prototype.stickRows = /**
17879
     * Applies sticky positioning to the row's cells if using the native table layout, and to the
17880
     * row itself otherwise.
17881
     * @param {?} rowsToStick The list of rows that should be stuck according to their corresponding
17882
     *     sticky state and to the provided top or bottom position.
17883
     * @param {?} stickyStates A list of boolean states where each state represents whether the row
17884
     *     should be stuck in the particular top or bottom position.
17885
     * @param {?} position The position direction in which the row should be stuck if that row should be
17886
     *     sticky.
17887
     *
17888
     * @return {?}
17889
     */
17890
    function (rowsToStick, stickyStates, position) {
17891
        // If positioning the rows to the bottom, reverse their order when evaluating the sticky
17892
        // position such that the last row stuck will be "bottom: 0px" and so on.
17893
        var /** @type {?} */ rows = position === 'bottom' ? rowsToStick.reverse() : rowsToStick;
17894
        var /** @type {?} */ stickyHeight = 0;
17895
        for (var /** @type {?} */ rowIndex = 0; rowIndex < rows.length; rowIndex++) {
17896
            if (!stickyStates[rowIndex]) {
17897
                continue;
17898
            }
17899
            var /** @type {?} */ row = rows[rowIndex];
17900
            if (this.isNativeHtmlTable) {
17901
                for (var /** @type {?} */ j = 0; j < row.children.length; j++) {
17902
                    var /** @type {?} */ cell = /** @type {?} */ (row.children[j]);
17903
                    this._addStickyStyle(cell, position, stickyHeight);
17904
                }
17905
            }
17906
            else {
17907
                // Flex does not respect the stick positioning on the cells, needs to be applied to the row.
17908
                // If this is applied on a native table, Safari causes the header to fly in wrong direction.
17909
                this._addStickyStyle(row, position, stickyHeight);
17910
            }
17911
            stickyHeight += row.getBoundingClientRect().height;
17912
        }
17913
    };
17914
    /**
17915
     * When using the native table in Safari, sticky footer cells do not stick. The only way to stick
17916
     * footer rows is to apply sticky styling to the tfoot container. This should only be done if
17917
     * all footer rows are sticky. If not all footer rows are sticky, remove sticky positioning from
17918
     * the tfoot element.
17919
     */
17920
    /**
17921
     * When using the native table in Safari, sticky footer cells do not stick. The only way to stick
17922
     * footer rows is to apply sticky styling to the tfoot container. This should only be done if
17923
     * all footer rows are sticky. If not all footer rows are sticky, remove sticky positioning from
17924
     * the tfoot element.
17925
     * @param {?} tableElement
17926
     * @param {?} stickyStates
17927
     * @return {?}
17928
     */
17929
    StickyStyler.prototype.updateStickyFooterContainer = /**
17930
     * When using the native table in Safari, sticky footer cells do not stick. The only way to stick
17931
     * footer rows is to apply sticky styling to the tfoot container. This should only be done if
17932
     * all footer rows are sticky. If not all footer rows are sticky, remove sticky positioning from
17933
     * the tfoot element.
17934
     * @param {?} tableElement
17935
     * @param {?} stickyStates
17936
     * @return {?}
17937
     */
17938
    function (tableElement, stickyStates) {
17939
        if (!this.isNativeHtmlTable) {
17940
            return;
17941
        }
17942
        var /** @type {?} */ tfoot = /** @type {?} */ ((tableElement.querySelector('tfoot')));
17943
        if (stickyStates.some(function (state) { return !state; })) {
17944
            this._removeStickyStyle(tfoot, ['bottom']);
17945
        }
17946
        else {
17947
            this._addStickyStyle(tfoot, 'bottom', 0);
17948
        }
17949
    };
17950
    /**
17951
     * Removes the sticky style on the element by removing the sticky cell CSS class, re-evaluating
17952
     * the zIndex, removing each of the provided sticky directions, and removing the
17953
     * sticky position if there are no more directions.
17954
     */
17955
    /**
17956
     * Removes the sticky style on the element by removing the sticky cell CSS class, re-evaluating
17957
     * the zIndex, removing each of the provided sticky directions, and removing the
17958
     * sticky position if there are no more directions.
17959
     * @param {?} element
17960
     * @param {?} stickyDirections
17961
     * @return {?}
17962
     */
17963
    StickyStyler.prototype._removeStickyStyle = /**
17964
     * Removes the sticky style on the element by removing the sticky cell CSS class, re-evaluating
17965
     * the zIndex, removing each of the provided sticky directions, and removing the
17966
     * sticky position if there are no more directions.
17967
     * @param {?} element
17968
     * @param {?} stickyDirections
17969
     * @return {?}
17970
     */
17971
    function (element, stickyDirections) {
17972
        for (var _i = 0, stickyDirections_1 = stickyDirections; _i < stickyDirections_1.length; _i++) {
17973
            var dir = stickyDirections_1[_i];
17974
            element.style[dir] = '';
17975
        }
17976
        element.style.zIndex = this._getCalculatedZIndex(element);
17977
        // If the element no longer has any more sticky directions, remove sticky positioning and
17978
        // the sticky CSS class.
17979
        var /** @type {?} */ hasDirection = STICKY_DIRECTIONS.some(function (dir) { return !!element.style[dir]; });
17980
        if (!hasDirection) {
17981
            element.style.position = '';
17982
            element.classList.remove(this.stickCellCss);
17983
        }
17984
    };
17985
    /**
17986
     * Adds the sticky styling to the element by adding the sticky style class, changing position
17987
     * to be sticky (and -webkit-sticky), setting the appropriate zIndex, and adding a sticky
17988
     * direction and value.
17989
     */
17990
    /**
17991
     * Adds the sticky styling to the element by adding the sticky style class, changing position
17992
     * to be sticky (and -webkit-sticky), setting the appropriate zIndex, and adding a sticky
17993
     * direction and value.
17994
     * @param {?} element
17995
     * @param {?} dir
17996
     * @param {?} dirValue
17997
     * @return {?}
17998
     */
17999
    StickyStyler.prototype._addStickyStyle = /**
18000
     * Adds the sticky styling to the element by adding the sticky style class, changing position
18001
     * to be sticky (and -webkit-sticky), setting the appropriate zIndex, and adding a sticky
18002
     * direction and value.
18003
     * @param {?} element
18004
     * @param {?} dir
18005
     * @param {?} dirValue
18006
     * @return {?}
18007
     */
18008
    function (element, dir, dirValue) {
18009
        element.classList.add(this.stickCellCss);
18010
        element.style[dir] = dirValue + "px";
18011
        element.style.cssText += 'position: -webkit-sticky; position: sticky; ';
18012
        element.style.zIndex = this._getCalculatedZIndex(element);
18013
    };
18014
    /**
18015
     * Calculate what the z-index should be for the element, depending on what directions (top,
18016
     * bottom, left, right) have been set. It should be true that elements with a top direction
18017
     * should have the highest index since these are elements like a table header. If any of those
18018
     * elements are also sticky in another direction, then they should appear above other elements
18019
     * that are only sticky top (e.g. a sticky column on a sticky header). Bottom-sticky elements
18020
     * (e.g. footer rows) should then be next in the ordering such that they are below the header
18021
     * but above any non-sticky elements. Finally, left/right sticky elements (e.g. sticky columns)
18022
     * should minimally increment so that they are above non-sticky elements but below top and bottom
18023
     * elements.
18024
     */
18025
    /**
18026
     * Calculate what the z-index should be for the element, depending on what directions (top,
18027
     * bottom, left, right) have been set. It should be true that elements with a top direction
18028
     * should have the highest index since these are elements like a table header. If any of those
18029
     * elements are also sticky in another direction, then they should appear above other elements
18030
     * that are only sticky top (e.g. a sticky column on a sticky header). Bottom-sticky elements
18031
     * (e.g. footer rows) should then be next in the ordering such that they are below the header
18032
     * but above any non-sticky elements. Finally, left/right sticky elements (e.g. sticky columns)
18033
     * should minimally increment so that they are above non-sticky elements but below top and bottom
18034
     * elements.
18035
     * @param {?} element
18036
     * @return {?}
18037
     */
18038
    StickyStyler.prototype._getCalculatedZIndex = /**
18039
     * Calculate what the z-index should be for the element, depending on what directions (top,
18040
     * bottom, left, right) have been set. It should be true that elements with a top direction
18041
     * should have the highest index since these are elements like a table header. If any of those
18042
     * elements are also sticky in another direction, then they should appear above other elements
18043
     * that are only sticky top (e.g. a sticky column on a sticky header). Bottom-sticky elements
18044
     * (e.g. footer rows) should then be next in the ordering such that they are below the header
18045
     * but above any non-sticky elements. Finally, left/right sticky elements (e.g. sticky columns)
18046
     * should minimally increment so that they are above non-sticky elements but below top and bottom
18047
     * elements.
18048
     * @param {?} element
18049
     * @return {?}
18050
     */
18051
    function (element) {
18052
        var /** @type {?} */ zIndexIncrements = {
18053
            top: 100,
18054
            bottom: 10,
18055
            left: 1,
18056
            right: 1,
18057
        };
18058
        var /** @type {?} */ zIndex = 0;
18059
        for (var _i = 0, STICKY_DIRECTIONS_1 = STICKY_DIRECTIONS; _i < STICKY_DIRECTIONS_1.length; _i++) {
18060
            var dir = STICKY_DIRECTIONS_1[_i];
18061
            if (element.style[dir]) {
18062
                zIndex += zIndexIncrements[dir];
18063
            }
18064
        }
18065
        return zIndex ? "" + zIndex : '';
18066
    };
18067
    /** Gets the widths for each cell in the provided row. */
18068
    /**
18069
     * Gets the widths for each cell in the provided row.
18070
     * @param {?} row
18071
     * @return {?}
18072
     */
18073
    StickyStyler.prototype._getCellWidths = /**
18074
     * Gets the widths for each cell in the provided row.
18075
     * @param {?} row
18076
     * @return {?}
18077
     */
18078
    function (row) {
18079
        var /** @type {?} */ cellWidths = [];
18080
        var /** @type {?} */ firstRowCells = row.children;
18081
        for (var /** @type {?} */ i = 0; i < firstRowCells.length; i++) {
18082
            var /** @type {?} */ cell = /** @type {?} */ (firstRowCells[i]);
18083
            cellWidths.push(cell.getBoundingClientRect().width);
18084
        }
18085
        return cellWidths;
18086
    };
18087
    /**
18088
     * Determines the left and right positions of each sticky column cell, which will be the
18089
     * accumulation of all sticky column cell widths to the left and right, respectively.
18090
     * Non-sticky cells do not need to have a value set since their positions will not be applied.
18091
     */
18092
    /**
18093
     * Determines the left and right positions of each sticky column cell, which will be the
18094
     * accumulation of all sticky column cell widths to the left and right, respectively.
18095
     * Non-sticky cells do not need to have a value set since their positions will not be applied.
18096
     * @param {?} widths
18097
     * @param {?} stickyStates
18098
     * @return {?}
18099
     */
18100
    StickyStyler.prototype._getStickyStartColumnPositions = /**
18101
     * Determines the left and right positions of each sticky column cell, which will be the
18102
     * accumulation of all sticky column cell widths to the left and right, respectively.
18103
     * Non-sticky cells do not need to have a value set since their positions will not be applied.
18104
     * @param {?} widths
18105
     * @param {?} stickyStates
18106
     * @return {?}
18107
     */
18108
    function (widths, stickyStates) {
18109
        var /** @type {?} */ positions = [];
18110
        var /** @type {?} */ nextPosition = 0;
18111
        for (var /** @type {?} */ i = 0; i < widths.length; i++) {
18112
            if (stickyStates[i]) {
18113
                positions[i] = nextPosition;
18114
                nextPosition += widths[i];
18115
            }
18116
        }
18117
        return positions;
18118
    };
18119
    /**
18120
     * Determines the left and right positions of each sticky column cell, which will be the
18121
     * accumulation of all sticky column cell widths to the left and right, respectively.
18122
     * Non-sticky cells do not need to have a value set since their positions will not be applied.
18123
     */
18124
    /**
18125
     * Determines the left and right positions of each sticky column cell, which will be the
18126
     * accumulation of all sticky column cell widths to the left and right, respectively.
18127
     * Non-sticky cells do not need to have a value set since their positions will not be applied.
18128
     * @param {?} widths
18129
     * @param {?} stickyStates
18130
     * @return {?}
18131
     */
18132
    StickyStyler.prototype._getStickyEndColumnPositions = /**
18133
     * Determines the left and right positions of each sticky column cell, which will be the
18134
     * accumulation of all sticky column cell widths to the left and right, respectively.
18135
     * Non-sticky cells do not need to have a value set since their positions will not be applied.
18136
     * @param {?} widths
18137
     * @param {?} stickyStates
18138
     * @return {?}
18139
     */
18140
    function (widths, stickyStates) {
18141
        var /** @type {?} */ positions = [];
18142
        var /** @type {?} */ nextPosition = 0;
18143
        for (var /** @type {?} */ i = widths.length; i > 0; i--) {
18144
            if (stickyStates[i]) {
18145
                positions[i] = nextPosition;
18146
                nextPosition += widths[i];
18147
            }
18148
        }
18149
        return positions;
18150
    };
18151
    return StickyStyler;
18152
}());
18153
 
18154
/**
18155
 * @fileoverview added by tsickle
18156
 * @suppress {checkTypes} checked by tsc
18157
 */
18158
/**
18159
 * Provides a handle for the table to grab the view container's ng-container to insert data rows.
18160
 * \@docs-private
18161
 */
18162
var DataRowOutlet = /** @class */ (function () {
18163
    function DataRowOutlet(viewContainer, elementRef) {
18164
        this.viewContainer = viewContainer;
18165
        this.elementRef = elementRef;
18166
    }
18167
    DataRowOutlet.decorators = [
18168
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Directive"], args: [{ selector: '[rowOutlet]' },] },
18169
    ];
18170
    /** @nocollapse */
18171
    DataRowOutlet.ctorParameters = function () { return [
18172
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ViewContainerRef"], },
18173
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ElementRef"], },
18174
    ]; };
18175
    return DataRowOutlet;
18176
}());
18177
/**
18178
 * Provides a handle for the table to grab the view container's ng-container to insert the header.
18179
 * \@docs-private
18180
 */
18181
var HeaderRowOutlet = /** @class */ (function () {
18182
    function HeaderRowOutlet(viewContainer, elementRef) {
18183
        this.viewContainer = viewContainer;
18184
        this.elementRef = elementRef;
18185
    }
18186
    HeaderRowOutlet.decorators = [
18187
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Directive"], args: [{ selector: '[headerRowOutlet]' },] },
18188
    ];
18189
    /** @nocollapse */
18190
    HeaderRowOutlet.ctorParameters = function () { return [
18191
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ViewContainerRef"], },
18192
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ElementRef"], },
18193
    ]; };
18194
    return HeaderRowOutlet;
18195
}());
18196
/**
18197
 * Provides a handle for the table to grab the view container's ng-container to insert the footer.
18198
 * \@docs-private
18199
 */
18200
var FooterRowOutlet = /** @class */ (function () {
18201
    function FooterRowOutlet(viewContainer, elementRef) {
18202
        this.viewContainer = viewContainer;
18203
        this.elementRef = elementRef;
18204
    }
18205
    FooterRowOutlet.decorators = [
18206
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Directive"], args: [{ selector: '[footerRowOutlet]' },] },
18207
    ];
18208
    /** @nocollapse */
18209
    FooterRowOutlet.ctorParameters = function () { return [
18210
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ViewContainerRef"], },
18211
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ElementRef"], },
18212
    ]; };
18213
    return FooterRowOutlet;
18214
}());
18215
/**
18216
 * The table template that can be used by the mat-table. Should not be used outside of the
18217
 * material library.
18218
 * \@docs-private
18219
 */
18220
var /** @type {?} */ CDK_TABLE_TEMPLATE = "\n  <ng-container headerRowOutlet></ng-container>\n  <ng-container rowOutlet></ng-container>\n  <ng-container footerRowOutlet></ng-container>";
18221
/**
18222
 * Class used to conveniently type the embedded view ref for rows with a context.
18223
 * \@docs-private
18224
 * @abstract
18225
 * @template T
18226
 */
18227
var /**
18228
 * Class used to conveniently type the embedded view ref for rows with a context.
18229
 * \@docs-private
18230
 * @abstract
18231
 * @template T
18232
 */
18233
RowViewRef = /** @class */ (function (_super) {
18234
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(RowViewRef, _super);
18235
    function RowViewRef() {
18236
        return _super !== null && _super.apply(this, arguments) || this;
18237
    }
18238
    return RowViewRef;
18239
}(_angular_core__WEBPACK_IMPORTED_MODULE_2__["EmbeddedViewRef"]));
18240
/**
18241
 * A data table that can render a header row, data rows, and a footer row.
18242
 * Uses the dataSource input to determine the data to be rendered. The data can be provided either
18243
 * as a data array, an Observable stream that emits the data array to render, or a DataSource with a
18244
 * connect function that will return an Observable stream that emits the data array to render.
18245
 * @template T
18246
 */
18247
var CdkTable = /** @class */ (function () {
18248
    function CdkTable(_differs, _changeDetectorRef, _elementRef, role, _dir) {
18249
        this._differs = _differs;
18250
        this._changeDetectorRef = _changeDetectorRef;
18251
        this._elementRef = _elementRef;
18252
        this._dir = _dir;
18253
        /**
18254
         * Subject that emits when the component has been destroyed.
18255
         */
18256
        this._onDestroy = new rxjs__WEBPACK_IMPORTED_MODULE_4__["Subject"]();
18257
        /**
18258
         * Map of all the user's defined columns (header, data, and footer cell template) identified by
18259
         * name. Collection populated by the column definitions gathered by `ContentChildren` as well as
18260
         * any custom column definitions added to `_customColumnDefs`.
18261
         */
18262
        this._columnDefsByName = new Map();
18263
        /**
18264
         * Column definitions that were defined outside of the direct content children of the table.
18265
         * These will be defined when, e.g., creating a wrapper around the cdkTable that has
18266
         * column definitions as *it's* content child.
18267
         */
18268
        this._customColumnDefs = new Set();
18269
        /**
18270
         * Data row definitions that were defined outside of the direct content children of the table.
18271
         * These will be defined when, e.g., creating a wrapper around the cdkTable that has
18272
         * built-in data rows as *it's* content child.
18273
         */
18274
        this._customRowDefs = new Set();
18275
        /**
18276
         * Header row definitions that were defined outside of the direct content children of the table.
18277
         * These will be defined when, e.g., creating a wrapper around the cdkTable that has
18278
         * built-in header rows as *it's* content child.
18279
         */
18280
        this._customHeaderRowDefs = new Set();
18281
        /**
18282
         * Footer row definitions that were defined outside of the direct content children of the table.
18283
         * These will be defined when, e.g., creating a wrapper around the cdkTable that has a
18284
         * built-in footer row as *it's* content child.
18285
         */
18286
        this._customFooterRowDefs = new Set();
18287
        /**
18288
         * Whether the header row definition has been changed. Triggers an update to the header row after
18289
         * content is checked. Initialized as true so that the table renders the initial set of rows.
18290
         */
18291
        this._headerRowDefChanged = true;
18292
        /**
18293
         * Whether the footer row definition has been changed. Triggers an update to the footer row after
18294
         * content is checked. Initialized as true so that the table renders the initial set of rows.
18295
         */
18296
        this._footerRowDefChanged = true;
18297
        /**
18298
         * Cache of the latest rendered `RenderRow` objects as a map for easy retrieval when constructing
18299
         * a new list of `RenderRow` objects for rendering rows. Since the new list is constructed with
18300
         * the cached `RenderRow` objects when possible, the row identity is preserved when the data
18301
         * and row template matches, which allows the `IterableDiffer` to check rows by reference
18302
         * and understand which rows are added/moved/removed.
18303
         *
18304
         * Implemented as a map of maps where the first key is the `data: T` object and the second is the
18305
         * `CdkRowDef<T>` object. With the two keys, the cache points to a `RenderRow<T>` object that
18306
         * contains an array of created pairs. The array is necessary to handle cases where the data
18307
         * array contains multiple duplicate data objects and each instantiated `RenderRow` must be
18308
         * stored.
18309
         */
18310
        this._cachedRenderRowsMap = new Map();
18311
        /**
18312
         * CSS class added to any row or cell that has sticky positioning applied. May be overriden by
18313
         * table subclasses.
18314
         */
18315
        this.stickyCssClass = 'cdk-table-sticky';
18316
        this._multiTemplateDataRows = false;
18317
        /**
18318
         * Stream containing the latest information on what rows are being displayed on screen.
18319
         * Can be used by the data source to as a heuristic of what data should be provided.
18320
         */
18321
        this.viewChange = new rxjs__WEBPACK_IMPORTED_MODULE_4__["BehaviorSubject"]({ start: 0, end: Number.MAX_VALUE });
18322
        if (!role) {
18323
            this._elementRef.nativeElement.setAttribute('role', 'grid');
18324
        }
18325
        this._isNativeHtmlTable = this._elementRef.nativeElement.nodeName === 'TABLE';
18326
    }
18327
    Object.defineProperty(CdkTable.prototype, "trackBy", {
18328
        get: /**
18329
         * Tracking function that will be used to check the differences in data changes. Used similarly
18330
         * to `ngFor` `trackBy` function. Optimize row operations by identifying a row based on its data
18331
         * relative to the function to know if a row should be added/removed/moved.
18332
         * Accepts a function that takes two parameters, `index` and `item`.
18333
         * @return {?}
18334
         */
18335
        function () { return this._trackByFn; },
18336
        set: /**
18337
         * @param {?} fn
18338
         * @return {?}
18339
         */
18340
        function (fn) {
18341
            if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["isDevMode"])() &&
18342
                fn != null && typeof fn !== 'function' && /** @type {?} */ (console) && /** @type {?} */ (console.warn)) {
18343
                console.warn("trackBy must be a function, but received " + JSON.stringify(fn) + ".");
18344
            }
18345
            this._trackByFn = fn;
18346
        },
18347
        enumerable: true,
18348
        configurable: true
18349
    });
18350
    Object.defineProperty(CdkTable.prototype, "dataSource", {
18351
        get: /**
18352
         * The table's source of data, which can be provided in three ways (in order of complexity):
18353
         *   - Simple data array (each object represents one table row)
18354
         *   - Stream that emits a data array each time the array changes
18355
         *   - `DataSource` object that implements the connect/disconnect interface.
18356
         *
18357
         * If a data array is provided, the table must be notified when the array's objects are
18358
         * added, removed, or moved. This can be done by calling the `renderRows()` function which will
18359
         * render the diff since the last table render. If the data array reference is changed, the table
18360
         * will automatically trigger an update to the rows.
18361
         *
18362
         * When providing an Observable stream, the table will trigger an update automatically when the
18363
         * stream emits a new array of data.
18364
         *
18365
         * Finally, when providing a `DataSource` object, the table will use the Observable stream
18366
         * provided by the connect function and trigger updates when that stream emits new data array
18367
         * values. During the table's ngOnDestroy or when the data source is removed from the table, the
18368
         * table will call the DataSource's `disconnect` function (may be useful for cleaning up any
18369
         * subscriptions registered during the connect process).
18370
         * @return {?}
18371
         */
18372
        function () { return this._dataSource; },
18373
        set: /**
18374
         * @param {?} dataSource
18375
         * @return {?}
18376
         */
18377
        function (dataSource) {
18378
            if (this._dataSource !== dataSource) {
18379
                this._switchDataSource(dataSource);
18380
            }
18381
        },
18382
        enumerable: true,
18383
        configurable: true
18384
    });
18385
    Object.defineProperty(CdkTable.prototype, "multiTemplateDataRows", {
18386
        get: /**
18387
         * Whether to allow multiple rows per data object by evaluating which rows evaluate their 'when'
18388
         * predicate to true. If `multiTemplateDataRows` is false, which is the default value, then each
18389
         * dataobject will render the first row that evaluates its when predicate to true, in the order
18390
         * defined in the table, or otherwise the default row which does not have a when predicate.
18391
         * @return {?}
18392
         */
18393
        function () { return this._multiTemplateDataRows; },
18394
        set: /**
18395
         * @param {?} v
18396
         * @return {?}
18397
         */
18398
        function (v) {
18399
            this._multiTemplateDataRows = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceBooleanProperty"])(v);
18400
            if (this._rowOutlet.viewContainer.length) {
18401
                this._forceRenderDataRows();
18402
            }
18403
        },
18404
        enumerable: true,
18405
        configurable: true
18406
    });
18407
    /**
18408
     * @return {?}
18409
     */
18410
    CdkTable.prototype.ngOnInit = /**
18411
     * @return {?}
18412
     */
18413
    function () {
18414
        var _this = this;
18415
        this._setupStickyStyler();
18416
        if (this._isNativeHtmlTable) {
18417
            this._applyNativeTableSections();
18418
        }
18419
        // Set up the trackBy function so that it uses the `RenderRow` as its identity by default. If
18420
        // the user has provided a custom trackBy, return the result of that function as evaluated
18421
        // with the values of the `RenderRow`'s data and index.
18422
        this._dataDiffer = this._differs.find([]).create(function (_i, dataRow) {
18423
            return _this.trackBy ? _this.trackBy(dataRow.dataIndex, dataRow.data) : dataRow;
18424
        });
18425
    };
18426
    /**
18427
     * @return {?}
18428
     */
18429
    CdkTable.prototype.ngAfterContentChecked = /**
18430
     * @return {?}
18431
     */
18432
    function () {
18433
        // Cache the row and column definitions gathered by ContentChildren and programmatic injection.
18434
        this._cacheRowDefs();
18435
        this._cacheColumnDefs();
18436
        // Make sure that the user has at least added header, footer, or data row def.
18437
        if (!this._headerRowDefs.length && !this._footerRowDefs.length && !this._rowDefs.length) {
18438
            throw getTableMissingRowDefsError();
18439
        }
18440
        // Render updates if the list of columns have been changed for the header, row, or footer defs.
18441
        this._renderUpdatedColumns();
18442
        // If the header row definition has been changed, trigger a render to the header row.
18443
        if (this._headerRowDefChanged) {
18444
            this._forceRenderHeaderRows();
18445
            this._headerRowDefChanged = false;
18446
        }
18447
        // If the footer row definition has been changed, trigger a render to the footer row.
18448
        if (this._footerRowDefChanged) {
18449
            this._forceRenderFooterRows();
18450
            this._footerRowDefChanged = false;
18451
        }
18452
        // If there is a data source and row definitions, connect to the data source unless a
18453
        // connection has already been made.
18454
        if (this.dataSource && this._rowDefs.length > 0 && !this._renderChangeSubscription) {
18455
            this._observeRenderChanges();
18456
        }
18457
        this._checkStickyStates();
18458
    };
18459
    /**
18460
     * @return {?}
18461
     */
18462
    CdkTable.prototype.ngOnDestroy = /**
18463
     * @return {?}
18464
     */
18465
    function () {
18466
        this._rowOutlet.viewContainer.clear();
18467
        this._headerRowOutlet.viewContainer.clear();
18468
        this._footerRowOutlet.viewContainer.clear();
18469
        this._cachedRenderRowsMap.clear();
18470
        this._onDestroy.next();
18471
        this._onDestroy.complete();
18472
        if (this.dataSource instanceof _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_3__["DataSource"]) {
18473
            this.dataSource.disconnect(this);
18474
        }
18475
    };
18476
    /**
18477
     * Renders rows based on the table's latest set of data, which was either provided directly as an
18478
     * input or retrieved through an Observable stream (directly or from a DataSource).
18479
     * Checks for differences in the data since the last diff to perform only the necessary
18480
     * changes (add/remove/move rows).
18481
     *
18482
     * If the table's data source is a DataSource or Observable, this will be invoked automatically
18483
     * each time the provided Observable stream emits a new data array. Otherwise if your data is
18484
     * an array, this function will need to be called to render any changes.
18485
     */
18486
    /**
18487
     * Renders rows based on the table's latest set of data, which was either provided directly as an
18488
     * input or retrieved through an Observable stream (directly or from a DataSource).
18489
     * Checks for differences in the data since the last diff to perform only the necessary
18490
     * changes (add/remove/move rows).
18491
     *
18492
     * If the table's data source is a DataSource or Observable, this will be invoked automatically
18493
     * each time the provided Observable stream emits a new data array. Otherwise if your data is
18494
     * an array, this function will need to be called to render any changes.
18495
     * @return {?}
18496
     */
18497
    CdkTable.prototype.renderRows = /**
18498
     * Renders rows based on the table's latest set of data, which was either provided directly as an
18499
     * input or retrieved through an Observable stream (directly or from a DataSource).
18500
     * Checks for differences in the data since the last diff to perform only the necessary
18501
     * changes (add/remove/move rows).
18502
     *
18503
     * If the table's data source is a DataSource or Observable, this will be invoked automatically
18504
     * each time the provided Observable stream emits a new data array. Otherwise if your data is
18505
     * an array, this function will need to be called to render any changes.
18506
     * @return {?}
18507
     */
18508
    function () {
18509
        var _this = this;
18510
        this._renderRows = this._getAllRenderRows();
18511
        var /** @type {?} */ changes = this._dataDiffer.diff(this._renderRows);
18512
        if (!changes) {
18513
            return;
18514
        }
18515
        var /** @type {?} */ viewContainer = this._rowOutlet.viewContainer;
18516
        changes.forEachOperation(function (record, prevIndex, currentIndex) {
18517
            if (record.previousIndex == null) {
18518
                _this._insertRow(record.item, currentIndex);
18519
            }
18520
            else if (currentIndex == null) {
18521
                viewContainer.remove(prevIndex);
18522
            }
18523
            else {
18524
                var /** @type {?} */ view = /** @type {?} */ (viewContainer.get(prevIndex));
18525
                viewContainer.move(/** @type {?} */ ((view)), currentIndex);
18526
            }
18527
        });
18528
        // Update the meta context of a row's context data (index, count, first, last, ...)
18529
        this._updateRowIndexContext();
18530
        // Update rows that did not get added/removed/moved but may have had their identity changed,
18531
        // e.g. if trackBy matched data on some property but the actual data reference changed.
18532
        changes.forEachIdentityChange(function (record) {
18533
            var /** @type {?} */ rowView = /** @type {?} */ (viewContainer.get(/** @type {?} */ ((record.currentIndex))));
18534
            rowView.context.$implicit = record.item.data;
18535
        });
18536
        this.updateStickyColumnStyles();
18537
    };
18538
    /**
18539
     * Sets the header row definition to be used. Overrides the header row definition gathered by
18540
     * using `ContentChild`, if one exists. Sets a flag that will re-render the header row after the
18541
     * table's content is checked.
18542
     * @docs-private
18543
     * @deprecated Use `addHeaderRowDef` and `removeHeaderRowDef` instead
18544
     * @breaking-change 8.0.0
18545
     */
18546
    /**
18547
     * Sets the header row definition to be used. Overrides the header row definition gathered by
18548
     * using `ContentChild`, if one exists. Sets a flag that will re-render the header row after the
18549
     * table's content is checked.
18550
     * \@docs-private
18551
     * @deprecated Use `addHeaderRowDef` and `removeHeaderRowDef` instead
18552
     * \@breaking-change 8.0.0
18553
     * @param {?} headerRowDef
18554
     * @return {?}
18555
     */
18556
    CdkTable.prototype.setHeaderRowDef = /**
18557
     * Sets the header row definition to be used. Overrides the header row definition gathered by
18558
     * using `ContentChild`, if one exists. Sets a flag that will re-render the header row after the
18559
     * table's content is checked.
18560
     * \@docs-private
18561
     * @deprecated Use `addHeaderRowDef` and `removeHeaderRowDef` instead
18562
     * \@breaking-change 8.0.0
18563
     * @param {?} headerRowDef
18564
     * @return {?}
18565
     */
18566
    function (headerRowDef) {
18567
        this._customHeaderRowDefs = new Set([headerRowDef]);
18568
        this._headerRowDefChanged = true;
18569
    };
18570
    /**
18571
     * Sets the footer row definition to be used. Overrides the footer row definition gathered by
18572
     * using `ContentChild`, if one exists. Sets a flag that will re-render the footer row after the
18573
     * table's content is checked.
18574
     * @docs-private
18575
     * @deprecated Use `addFooterRowDef` and `removeFooterRowDef` instead
18576
     * @breaking-change 8.0.0
18577
     */
18578
    /**
18579
     * Sets the footer row definition to be used. Overrides the footer row definition gathered by
18580
     * using `ContentChild`, if one exists. Sets a flag that will re-render the footer row after the
18581
     * table's content is checked.
18582
     * \@docs-private
18583
     * @deprecated Use `addFooterRowDef` and `removeFooterRowDef` instead
18584
     * \@breaking-change 8.0.0
18585
     * @param {?} footerRowDef
18586
     * @return {?}
18587
     */
18588
    CdkTable.prototype.setFooterRowDef = /**
18589
     * Sets the footer row definition to be used. Overrides the footer row definition gathered by
18590
     * using `ContentChild`, if one exists. Sets a flag that will re-render the footer row after the
18591
     * table's content is checked.
18592
     * \@docs-private
18593
     * @deprecated Use `addFooterRowDef` and `removeFooterRowDef` instead
18594
     * \@breaking-change 8.0.0
18595
     * @param {?} footerRowDef
18596
     * @return {?}
18597
     */
18598
    function (footerRowDef) {
18599
        this._customFooterRowDefs = new Set([footerRowDef]);
18600
        this._footerRowDefChanged = true;
18601
    };
18602
    /** Adds a column definition that was not included as part of the content children. */
18603
    /**
18604
     * Adds a column definition that was not included as part of the content children.
18605
     * @param {?} columnDef
18606
     * @return {?}
18607
     */
18608
    CdkTable.prototype.addColumnDef = /**
18609
     * Adds a column definition that was not included as part of the content children.
18610
     * @param {?} columnDef
18611
     * @return {?}
18612
     */
18613
    function (columnDef) {
18614
        this._customColumnDefs.add(columnDef);
18615
    };
18616
    /** Removes a column definition that was not included as part of the content children. */
18617
    /**
18618
     * Removes a column definition that was not included as part of the content children.
18619
     * @param {?} columnDef
18620
     * @return {?}
18621
     */
18622
    CdkTable.prototype.removeColumnDef = /**
18623
     * Removes a column definition that was not included as part of the content children.
18624
     * @param {?} columnDef
18625
     * @return {?}
18626
     */
18627
    function (columnDef) {
18628
        this._customColumnDefs.delete(columnDef);
18629
    };
18630
    /** Adds a row definition that was not included as part of the content children. */
18631
    /**
18632
     * Adds a row definition that was not included as part of the content children.
18633
     * @param {?} rowDef
18634
     * @return {?}
18635
     */
18636
    CdkTable.prototype.addRowDef = /**
18637
     * Adds a row definition that was not included as part of the content children.
18638
     * @param {?} rowDef
18639
     * @return {?}
18640
     */
18641
    function (rowDef) {
18642
        this._customRowDefs.add(rowDef);
18643
    };
18644
    /** Removes a row definition that was not included as part of the content children. */
18645
    /**
18646
     * Removes a row definition that was not included as part of the content children.
18647
     * @param {?} rowDef
18648
     * @return {?}
18649
     */
18650
    CdkTable.prototype.removeRowDef = /**
18651
     * Removes a row definition that was not included as part of the content children.
18652
     * @param {?} rowDef
18653
     * @return {?}
18654
     */
18655
    function (rowDef) {
18656
        this._customRowDefs.delete(rowDef);
18657
    };
18658
    /** Adds a header row definition that was not included as part of the content children. */
18659
    /**
18660
     * Adds a header row definition that was not included as part of the content children.
18661
     * @param {?} headerRowDef
18662
     * @return {?}
18663
     */
18664
    CdkTable.prototype.addHeaderRowDef = /**
18665
     * Adds a header row definition that was not included as part of the content children.
18666
     * @param {?} headerRowDef
18667
     * @return {?}
18668
     */
18669
    function (headerRowDef) {
18670
        this._customHeaderRowDefs.add(headerRowDef);
18671
        this._headerRowDefChanged = true;
18672
    };
18673
    /** Removes a header row definition that was not included as part of the content children. */
18674
    /**
18675
     * Removes a header row definition that was not included as part of the content children.
18676
     * @param {?} headerRowDef
18677
     * @return {?}
18678
     */
18679
    CdkTable.prototype.removeHeaderRowDef = /**
18680
     * Removes a header row definition that was not included as part of the content children.
18681
     * @param {?} headerRowDef
18682
     * @return {?}
18683
     */
18684
    function (headerRowDef) {
18685
        this._customHeaderRowDefs.delete(headerRowDef);
18686
        this._headerRowDefChanged = true;
18687
    };
18688
    /** Adds a footer row definition that was not included as part of the content children. */
18689
    /**
18690
     * Adds a footer row definition that was not included as part of the content children.
18691
     * @param {?} footerRowDef
18692
     * @return {?}
18693
     */
18694
    CdkTable.prototype.addFooterRowDef = /**
18695
     * Adds a footer row definition that was not included as part of the content children.
18696
     * @param {?} footerRowDef
18697
     * @return {?}
18698
     */
18699
    function (footerRowDef) {
18700
        this._customFooterRowDefs.add(footerRowDef);
18701
        this._footerRowDefChanged = true;
18702
    };
18703
    /** Removes a footer row definition that was not included as part of the content children. */
18704
    /**
18705
     * Removes a footer row definition that was not included as part of the content children.
18706
     * @param {?} footerRowDef
18707
     * @return {?}
18708
     */
18709
    CdkTable.prototype.removeFooterRowDef = /**
18710
     * Removes a footer row definition that was not included as part of the content children.
18711
     * @param {?} footerRowDef
18712
     * @return {?}
18713
     */
18714
    function (footerRowDef) {
18715
        this._customFooterRowDefs.delete(footerRowDef);
18716
        this._footerRowDefChanged = true;
18717
    };
18718
    /**
18719
     * Updates the header sticky styles. First resets all applied styles with respect to the cells
18720
     * sticking to the top. Then, evaluating which cells need to be stuck to the top. This is
18721
     * automatically called when the header row changes its displayed set of columns, or if its
18722
     * sticky input changes. May be called manually for cases where the cell content changes outside
18723
     * of these events.
18724
     */
18725
    /**
18726
     * Updates the header sticky styles. First resets all applied styles with respect to the cells
18727
     * sticking to the top. Then, evaluating which cells need to be stuck to the top. This is
18728
     * automatically called when the header row changes its displayed set of columns, or if its
18729
     * sticky input changes. May be called manually for cases where the cell content changes outside
18730
     * of these events.
18731
     * @return {?}
18732
     */
18733
    CdkTable.prototype.updateStickyHeaderRowStyles = /**
18734
     * Updates the header sticky styles. First resets all applied styles with respect to the cells
18735
     * sticking to the top. Then, evaluating which cells need to be stuck to the top. This is
18736
     * automatically called when the header row changes its displayed set of columns, or if its
18737
     * sticky input changes. May be called manually for cases where the cell content changes outside
18738
     * of these events.
18739
     * @return {?}
18740
     */
18741
    function () {
18742
        var /** @type {?} */ headerRows = this._getRenderedRows(this._headerRowOutlet);
18743
        this._stickyStyler.clearStickyPositioning(headerRows, ['top']);
18744
        var /** @type {?} */ stickyStates = this._headerRowDefs.map(function (def) { return def.sticky; });
18745
        this._stickyStyler.stickRows(headerRows, stickyStates, 'top');
18746
        // Reset the dirty state of the sticky input change since it has been used.
18747
        this._headerRowDefs.forEach(function (def) { return def.resetStickyChanged(); });
18748
    };
18749
    /**
18750
     * Updates the footer sticky styles. First resets all applied styles with respect to the cells
18751
     * sticking to the bottom. Then, evaluating which cells need to be stuck to the bottom. This is
18752
     * automatically called when the footer row changes its displayed set of columns, or if its
18753
     * sticky input changes. May be called manually for cases where the cell content changes outside
18754
     * of these events.
18755
     */
18756
    /**
18757
     * Updates the footer sticky styles. First resets all applied styles with respect to the cells
18758
     * sticking to the bottom. Then, evaluating which cells need to be stuck to the bottom. This is
18759
     * automatically called when the footer row changes its displayed set of columns, or if its
18760
     * sticky input changes. May be called manually for cases where the cell content changes outside
18761
     * of these events.
18762
     * @return {?}
18763
     */
18764
    CdkTable.prototype.updateStickyFooterRowStyles = /**
18765
     * Updates the footer sticky styles. First resets all applied styles with respect to the cells
18766
     * sticking to the bottom. Then, evaluating which cells need to be stuck to the bottom. This is
18767
     * automatically called when the footer row changes its displayed set of columns, or if its
18768
     * sticky input changes. May be called manually for cases where the cell content changes outside
18769
     * of these events.
18770
     * @return {?}
18771
     */
18772
    function () {
18773
        var /** @type {?} */ footerRows = this._getRenderedRows(this._footerRowOutlet);
18774
        this._stickyStyler.clearStickyPositioning(footerRows, ['bottom']);
18775
        var /** @type {?} */ stickyStates = this._footerRowDefs.map(function (def) { return def.sticky; });
18776
        this._stickyStyler.stickRows(footerRows, stickyStates, 'bottom');
18777
        this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement, stickyStates);
18778
        // Reset the dirty state of the sticky input change since it has been used.
18779
        this._footerRowDefs.forEach(function (def) { return def.resetStickyChanged(); });
18780
    };
18781
    /**
18782
     * Updates the column sticky styles. First resets all applied styles with respect to the cells
18783
     * sticking to the left and right. Then sticky styles are added for the left and right according
18784
     * to the column definitions for each cell in each row. This is automatically called when
18785
     * the data source provides a new set of data or when a column definition changes its sticky
18786
     * input. May be called manually for cases where the cell content changes outside of these events.
18787
     */
18788
    /**
18789
     * Updates the column sticky styles. First resets all applied styles with respect to the cells
18790
     * sticking to the left and right. Then sticky styles are added for the left and right according
18791
     * to the column definitions for each cell in each row. This is automatically called when
18792
     * the data source provides a new set of data or when a column definition changes its sticky
18793
     * input. May be called manually for cases where the cell content changes outside of these events.
18794
     * @return {?}
18795
     */
18796
    CdkTable.prototype.updateStickyColumnStyles = /**
18797
     * Updates the column sticky styles. First resets all applied styles with respect to the cells
18798
     * sticking to the left and right. Then sticky styles are added for the left and right according
18799
     * to the column definitions for each cell in each row. This is automatically called when
18800
     * the data source provides a new set of data or when a column definition changes its sticky
18801
     * input. May be called manually for cases where the cell content changes outside of these events.
18802
     * @return {?}
18803
     */
18804
    function () {
18805
        var _this = this;
18806
        var /** @type {?} */ headerRows = this._getRenderedRows(this._headerRowOutlet);
18807
        var /** @type {?} */ dataRows = this._getRenderedRows(this._rowOutlet);
18808
        var /** @type {?} */ footerRows = this._getRenderedRows(this._footerRowOutlet);
18809
        // Clear the left and right positioning from all columns in the table across all rows since
18810
        // sticky columns span across all table sections (header, data, footer)
18811
        this._stickyStyler.clearStickyPositioning(headerRows.concat(dataRows, footerRows), ['left', 'right']);
18812
        // Update the sticky styles for each header row depending on the def's sticky state
18813
        headerRows.forEach(function (headerRow, i) {
18814
            _this._addStickyColumnStyles([headerRow], _this._headerRowDefs[i]);
18815
        });
18816
        // Update the sticky styles for each data row depending on its def's sticky state
18817
        this._rowDefs.forEach(function (rowDef) {
18818
            // Collect all the rows rendered with this row definition.
18819
            var /** @type {?} */ rows = [];
18820
            for (var /** @type {?} */ i = 0; i < dataRows.length; i++) {
18821
                if (_this._renderRows[i].rowDef === rowDef) {
18822
                    rows.push(dataRows[i]);
18823
                }
18824
            }
18825
            _this._addStickyColumnStyles(rows, rowDef);
18826
        });
18827
        // Update the sticky styles for each footer row depending on the def's sticky state
18828
        footerRows.forEach(function (footerRow, i) {
18829
            _this._addStickyColumnStyles([footerRow], _this._footerRowDefs[i]);
18830
        });
18831
        // Reset the dirty state of the sticky input change since it has been used.
18832
        Array.from(this._columnDefsByName.values()).forEach(function (def) { return def.resetStickyChanged(); });
18833
    };
18834
    /**
18835
     * Get the list of RenderRow objects to render according to the current list of data and defined
18836
     * row definitions. If the previous list already contained a particular pair, it should be reused
18837
     * so that the differ equates their references.
18838
     * @return {?}
18839
     */
18840
    CdkTable.prototype._getAllRenderRows = /**
18841
     * Get the list of RenderRow objects to render according to the current list of data and defined
18842
     * row definitions. If the previous list already contained a particular pair, it should be reused
18843
     * so that the differ equates their references.
18844
     * @return {?}
18845
     */
18846
    function () {
18847
        var /** @type {?} */ renderRows = [];
18848
        // Store the cache and create a new one. Any re-used RenderRow objects will be moved into the
18849
        // new cache while unused ones can be picked up by garbage collection.
18850
        var /** @type {?} */ prevCachedRenderRows = this._cachedRenderRowsMap;
18851
        this._cachedRenderRowsMap = new Map();
18852
        // For each data object, get the list of rows that should be rendered, represented by the
18853
        // respective `RenderRow` object which is the pair of `data` and `CdkRowDef`.
18854
        for (var /** @type {?} */ i = 0; i < this._data.length; i++) {
18855
            var /** @type {?} */ data = this._data[i];
18856
            var /** @type {?} */ renderRowsForData = this._getRenderRowsForData(data, i, prevCachedRenderRows.get(data));
18857
            if (!this._cachedRenderRowsMap.has(data)) {
18858
                this._cachedRenderRowsMap.set(data, new WeakMap());
18859
            }
18860
            for (var /** @type {?} */ j = 0; j < renderRowsForData.length; j++) {
18861
                var /** @type {?} */ renderRow = renderRowsForData[j];
18862
                var /** @type {?} */ cache = /** @type {?} */ ((this._cachedRenderRowsMap.get(renderRow.data)));
18863
                if (cache.has(renderRow.rowDef)) {
18864
                    /** @type {?} */ ((cache.get(renderRow.rowDef))).push(renderRow);
18865
                }
18866
                else {
18867
                    cache.set(renderRow.rowDef, [renderRow]);
18868
                }
18869
                renderRows.push(renderRow);
18870
            }
18871
        }
18872
        return renderRows;
18873
    };
18874
    /**
18875
     * Gets a list of `RenderRow<T>` for the provided data object and any `CdkRowDef` objects that
18876
     * should be rendered for this data. Reuses the cached RenderRow objects if they match the same
18877
     * `(T, CdkRowDef)` pair.
18878
     * @param {?} data
18879
     * @param {?} dataIndex
18880
     * @param {?=} cache
18881
     * @return {?}
18882
     */
18883
    CdkTable.prototype._getRenderRowsForData = /**
18884
     * Gets a list of `RenderRow<T>` for the provided data object and any `CdkRowDef` objects that
18885
     * should be rendered for this data. Reuses the cached RenderRow objects if they match the same
18886
     * `(T, CdkRowDef)` pair.
18887
     * @param {?} data
18888
     * @param {?} dataIndex
18889
     * @param {?=} cache
18890
     * @return {?}
18891
     */
18892
    function (data, dataIndex, cache) {
18893
        var /** @type {?} */ rowDefs = this._getRowDefs(data, dataIndex);
18894
        return rowDefs.map(function (rowDef) {
18895
            var /** @type {?} */ cachedRenderRows = (cache && cache.has(rowDef)) ? /** @type {?} */ ((cache.get(rowDef))) : [];
18896
            if (cachedRenderRows.length) {
18897
                var /** @type {?} */ dataRow = /** @type {?} */ ((cachedRenderRows.shift()));
18898
                dataRow.dataIndex = dataIndex;
18899
                return dataRow;
18900
            }
18901
            else {
18902
                return { data: data, rowDef: rowDef, dataIndex: dataIndex };
18903
            }
18904
        });
18905
    };
18906
    /**
18907
     * Update the map containing the content's column definitions.
18908
     * @return {?}
18909
     */
18910
    CdkTable.prototype._cacheColumnDefs = /**
18911
     * Update the map containing the content's column definitions.
18912
     * @return {?}
18913
     */
18914
    function () {
18915
        var _this = this;
18916
        this._columnDefsByName.clear();
18917
        var /** @type {?} */ columnDefs = mergeQueryListAndSet(this._contentColumnDefs, this._customColumnDefs);
18918
        columnDefs.forEach(function (columnDef) {
18919
            if (_this._columnDefsByName.has(columnDef.name)) {
18920
                throw getTableDuplicateColumnNameError(columnDef.name);
18921
            }
18922
            _this._columnDefsByName.set(columnDef.name, columnDef);
18923
        });
18924
    };
18925
    /**
18926
     * Update the list of all available row definitions that can be used.
18927
     * @return {?}
18928
     */
18929
    CdkTable.prototype._cacheRowDefs = /**
18930
     * Update the list of all available row definitions that can be used.
18931
     * @return {?}
18932
     */
18933
    function () {
18934
        this._headerRowDefs =
18935
            mergeQueryListAndSet(this._contentHeaderRowDefs, this._customHeaderRowDefs);
18936
        this._footerRowDefs =
18937
            mergeQueryListAndSet(this._contentFooterRowDefs, this._customFooterRowDefs);
18938
        this._rowDefs =
18939
            mergeQueryListAndSet(this._contentRowDefs, this._customRowDefs);
18940
        // After all row definitions are determined, find the row definition to be considered default.
18941
        var /** @type {?} */ defaultRowDefs = this._rowDefs.filter(function (def) { return !def.when; });
18942
        if (!this.multiTemplateDataRows && defaultRowDefs.length > 1) {
18943
            throw getTableMultipleDefaultRowDefsError();
18944
        }
18945
        this._defaultRowDef = defaultRowDefs[0];
18946
    };
18947
    /**
18948
     * Check if the header, data, or footer rows have changed what columns they want to display or
18949
     * whether the sticky states have changed for the header or footer. If there is a diff, then
18950
     * re-render that section.
18951
     * @return {?}
18952
     */
18953
    CdkTable.prototype._renderUpdatedColumns = /**
18954
     * Check if the header, data, or footer rows have changed what columns they want to display or
18955
     * whether the sticky states have changed for the header or footer. If there is a diff, then
18956
     * re-render that section.
18957
     * @return {?}
18958
     */
18959
    function () {
18960
        var /** @type {?} */ columnsDiffReducer = function (acc, def) { return acc || !!def.getColumnsDiff(); };
18961
        // Force re-render data rows if the list of column definitions have changed.
18962
        if (this._rowDefs.reduce(columnsDiffReducer, false)) {
18963
            this._forceRenderDataRows();
18964
        }
18965
        // Force re-render header/footer rows if the list of column definitions have changed..
18966
        if (this._headerRowDefs.reduce(columnsDiffReducer, false)) {
18967
            this._forceRenderHeaderRows();
18968
        }
18969
        if (this._footerRowDefs.reduce(columnsDiffReducer, false)) {
18970
            this._forceRenderFooterRows();
18971
        }
18972
    };
18973
    /**
18974
     * Switch to the provided data source by resetting the data and unsubscribing from the current
18975
     * render change subscription if one exists. If the data source is null, interpret this by
18976
     * clearing the row outlet. Otherwise start listening for new data.
18977
     * @param {?} dataSource
18978
     * @return {?}
18979
     */
18980
    CdkTable.prototype._switchDataSource = /**
18981
     * Switch to the provided data source by resetting the data and unsubscribing from the current
18982
     * render change subscription if one exists. If the data source is null, interpret this by
18983
     * clearing the row outlet. Otherwise start listening for new data.
18984
     * @param {?} dataSource
18985
     * @return {?}
18986
     */
18987
    function (dataSource) {
18988
        this._data = [];
18989
        if (this.dataSource instanceof _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_3__["DataSource"]) {
18990
            this.dataSource.disconnect(this);
18991
        }
18992
        // Stop listening for data from the previous data source.
18993
        if (this._renderChangeSubscription) {
18994
            this._renderChangeSubscription.unsubscribe();
18995
            this._renderChangeSubscription = null;
18996
        }
18997
        if (!dataSource) {
18998
            if (this._dataDiffer) {
18999
                this._dataDiffer.diff([]);
19000
            }
19001
            this._rowOutlet.viewContainer.clear();
19002
        }
19003
        this._dataSource = dataSource;
19004
    };
19005
    /**
19006
     * Set up a subscription for the data provided by the data source.
19007
     * @return {?}
19008
     */
19009
    CdkTable.prototype._observeRenderChanges = /**
19010
     * Set up a subscription for the data provided by the data source.
19011
     * @return {?}
19012
     */
19013
    function () {
19014
        var _this = this;
19015
        // If no data source has been set, there is nothing to observe for changes.
19016
        if (!this.dataSource) {
19017
            return;
19018
        }
19019
        var /** @type {?} */ dataStream;
19020
        // Check if the datasource is a DataSource object by observing if it has a connect function.
19021
        // Cannot check this.dataSource['connect'] due to potential property renaming, nor can it
19022
        // checked as an instanceof DataSource<T> since the table should allow for data sources
19023
        // that did not explicitly extend DataSource<T>.
19024
        if ((/** @type {?} */ (this.dataSource)).connect instanceof Function) {
19025
            dataStream = (/** @type {?} */ (this.dataSource)).connect(this);
19026
        }
19027
        else if (this.dataSource instanceof rxjs__WEBPACK_IMPORTED_MODULE_4__["Observable"]) {
19028
            dataStream = this.dataSource;
19029
        }
19030
        else if (Array.isArray(this.dataSource)) {
19031
            dataStream = Object(rxjs__WEBPACK_IMPORTED_MODULE_4__["of"])(this.dataSource);
19032
        }
19033
        if (dataStream === undefined) {
19034
            throw getTableUnknownDataSourceError();
19035
        }
19036
        this._renderChangeSubscription = dataStream
19037
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["takeUntil"])(this._onDestroy))
19038
            .subscribe(function (data) {
19039
            _this._data = data || [];
19040
            _this.renderRows();
19041
        });
19042
    };
19043
    /**
19044
     * Clears any existing content in the header row outlet and creates a new embedded view
19045
     * in the outlet using the header row definition.
19046
     * @return {?}
19047
     */
19048
    CdkTable.prototype._forceRenderHeaderRows = /**
19049
     * Clears any existing content in the header row outlet and creates a new embedded view
19050
     * in the outlet using the header row definition.
19051
     * @return {?}
19052
     */
19053
    function () {
19054
        var _this = this;
19055
        // Clear the header row outlet if any content exists.
19056
        if (this._headerRowOutlet.viewContainer.length > 0) {
19057
            this._headerRowOutlet.viewContainer.clear();
19058
        }
19059
        this._headerRowDefs.forEach(function (def, i) { return _this._renderRow(_this._headerRowOutlet, def, i); });
19060
        this.updateStickyHeaderRowStyles();
19061
        this.updateStickyColumnStyles();
19062
    };
19063
    /**
19064
     * Clears any existing content in the footer row outlet and creates a new embedded view
19065
     * in the outlet using the footer row definition.
19066
     * @return {?}
19067
     */
19068
    CdkTable.prototype._forceRenderFooterRows = /**
19069
     * Clears any existing content in the footer row outlet and creates a new embedded view
19070
     * in the outlet using the footer row definition.
19071
     * @return {?}
19072
     */
19073
    function () {
19074
        var _this = this;
19075
        // Clear the footer row outlet if any content exists.
19076
        if (this._footerRowOutlet.viewContainer.length > 0) {
19077
            this._footerRowOutlet.viewContainer.clear();
19078
        }
19079
        this._footerRowDefs.forEach(function (def, i) { return _this._renderRow(_this._footerRowOutlet, def, i); });
19080
        this.updateStickyFooterRowStyles();
19081
        this.updateStickyColumnStyles();
19082
    };
19083
    /**
19084
     * Adds the sticky column styles for the rows according to the columns' stick states.
19085
     * @param {?} rows
19086
     * @param {?} rowDef
19087
     * @return {?}
19088
     */
19089
    CdkTable.prototype._addStickyColumnStyles = /**
19090
     * Adds the sticky column styles for the rows according to the columns' stick states.
19091
     * @param {?} rows
19092
     * @param {?} rowDef
19093
     * @return {?}
19094
     */
19095
    function (rows, rowDef) {
19096
        var _this = this;
19097
        var /** @type {?} */ columnDefs = Array.from(rowDef.columns || []).map(function (c) { return ((_this._columnDefsByName.get(c))); });
19098
        var /** @type {?} */ stickyStartStates = columnDefs.map(function (columnDef) { return columnDef.sticky; });
19099
        var /** @type {?} */ stickyEndStates = columnDefs.map(function (columnDef) { return columnDef.stickyEnd; });
19100
        this._stickyStyler.updateStickyColumns(rows, stickyStartStates, stickyEndStates);
19101
    };
19102
    /** Gets the list of rows that have been rendered in the row outlet. */
19103
    /**
19104
     * Gets the list of rows that have been rendered in the row outlet.
19105
     * @param {?} rowOutlet
19106
     * @return {?}
19107
     */
19108
    CdkTable.prototype._getRenderedRows = /**
19109
     * Gets the list of rows that have been rendered in the row outlet.
19110
     * @param {?} rowOutlet
19111
     * @return {?}
19112
     */
19113
    function (rowOutlet) {
19114
        var /** @type {?} */ renderedRows = [];
19115
        for (var /** @type {?} */ i = 0; i < rowOutlet.viewContainer.length; i++) {
19116
            var /** @type {?} */ viewRef = (/** @type {?} */ (((rowOutlet.viewContainer.get(i)))));
19117
            renderedRows.push(viewRef.rootNodes[0]);
19118
        }
19119
        return renderedRows;
19120
    };
19121
    /**
19122
     * Get the matching row definitions that should be used for this row data. If there is only
19123
     * one row definition, it is returned. Otherwise, find the row definitions that has a when
19124
     * predicate that returns true with the data. If none return true, return the default row
19125
     * definition.
19126
     */
19127
    /**
19128
     * Get the matching row definitions that should be used for this row data. If there is only
19129
     * one row definition, it is returned. Otherwise, find the row definitions that has a when
19130
     * predicate that returns true with the data. If none return true, return the default row
19131
     * definition.
19132
     * @param {?} data
19133
     * @param {?} dataIndex
19134
     * @return {?}
19135
     */
19136
    CdkTable.prototype._getRowDefs = /**
19137
     * Get the matching row definitions that should be used for this row data. If there is only
19138
     * one row definition, it is returned. Otherwise, find the row definitions that has a when
19139
     * predicate that returns true with the data. If none return true, return the default row
19140
     * definition.
19141
     * @param {?} data
19142
     * @param {?} dataIndex
19143
     * @return {?}
19144
     */
19145
    function (data, dataIndex) {
19146
        if (this._rowDefs.length == 1) {
19147
            return [this._rowDefs[0]];
19148
        }
19149
        var /** @type {?} */ rowDefs = [];
19150
        if (this.multiTemplateDataRows) {
19151
            rowDefs = this._rowDefs.filter(function (def) { return !def.when || def.when(dataIndex, data); });
19152
        }
19153
        else {
19154
            var /** @type {?} */ rowDef = this._rowDefs.find(function (def) { return def.when && def.when(dataIndex, data); }) || this._defaultRowDef;
19155
            if (rowDef) {
19156
                rowDefs.push(rowDef);
19157
            }
19158
        }
19159
        if (!rowDefs.length) {
19160
            throw getTableMissingMatchingRowDefError(data);
19161
        }
19162
        return rowDefs;
19163
    };
19164
    /**
19165
     * Create the embedded view for the data row template and place it in the correct index location
19166
     * within the data row view container.
19167
     * @param {?} renderRow
19168
     * @param {?} renderIndex
19169
     * @return {?}
19170
     */
19171
    CdkTable.prototype._insertRow = /**
19172
     * Create the embedded view for the data row template and place it in the correct index location
19173
     * within the data row view container.
19174
     * @param {?} renderRow
19175
     * @param {?} renderIndex
19176
     * @return {?}
19177
     */
19178
    function (renderRow, renderIndex) {
19179
        var /** @type {?} */ rowDef = renderRow.rowDef;
19180
        var /** @type {?} */ context = { $implicit: renderRow.data };
19181
        this._renderRow(this._rowOutlet, rowDef, renderIndex, context);
19182
    };
19183
    /**
19184
     * Creates a new row template in the outlet and fills it with the set of cell templates.
19185
     * Optionally takes a context to provide to the row and cells, as well as an optional index
19186
     * of where to place the new row template in the outlet.
19187
     * @param {?} outlet
19188
     * @param {?} rowDef
19189
     * @param {?} index
19190
     * @param {?=} context
19191
     * @return {?}
19192
     */
19193
    CdkTable.prototype._renderRow = /**
19194
     * Creates a new row template in the outlet and fills it with the set of cell templates.
19195
     * Optionally takes a context to provide to the row and cells, as well as an optional index
19196
     * of where to place the new row template in the outlet.
19197
     * @param {?} outlet
19198
     * @param {?} rowDef
19199
     * @param {?} index
19200
     * @param {?=} context
19201
     * @return {?}
19202
     */
19203
    function (outlet, rowDef, index, context) {
19204
        if (context === void 0) { context = {}; }
19205
        // TODO(andrewseguin): enforce that one outlet was instantiated from createEmbeddedView
19206
        outlet.viewContainer.createEmbeddedView(rowDef.template, context, index);
19207
        for (var _a = 0, _b = this._getCellTemplates(rowDef); _a < _b.length; _a++) {
19208
            var cellTemplate = _b[_a];
19209
            if (CdkCellOutlet.mostRecentCellOutlet) {
19210
                CdkCellOutlet.mostRecentCellOutlet._viewContainer.createEmbeddedView(cellTemplate, context);
19211
            }
19212
        }
19213
        this._changeDetectorRef.markForCheck();
19214
    };
19215
    /**
19216
     * Updates the index-related context for each row to reflect any changes in the index of the rows,
19217
     * e.g. first/last/even/odd.
19218
     * @return {?}
19219
     */
19220
    CdkTable.prototype._updateRowIndexContext = /**
19221
     * Updates the index-related context for each row to reflect any changes in the index of the rows,
19222
     * e.g. first/last/even/odd.
19223
     * @return {?}
19224
     */
19225
    function () {
19226
        var /** @type {?} */ viewContainer = this._rowOutlet.viewContainer;
19227
        for (var /** @type {?} */ renderIndex = 0, /** @type {?} */ count = viewContainer.length; renderIndex < count; renderIndex++) {
19228
            var /** @type {?} */ viewRef = /** @type {?} */ (viewContainer.get(renderIndex));
19229
            var /** @type {?} */ context = /** @type {?} */ (viewRef.context);
19230
            context.count = count;
19231
            context.first = renderIndex === 0;
19232
            context.last = renderIndex === count - 1;
19233
            context.even = renderIndex % 2 === 0;
19234
            context.odd = !context.even;
19235
            if (this.multiTemplateDataRows) {
19236
                context.dataIndex = this._renderRows[renderIndex].dataIndex;
19237
                context.renderIndex = renderIndex;
19238
            }
19239
            else {
19240
                context.index = this._renderRows[renderIndex].dataIndex;
19241
            }
19242
        }
19243
    };
19244
    /**
19245
     * Gets the column definitions for the provided row def.
19246
     * @param {?} rowDef
19247
     * @return {?}
19248
     */
19249
    CdkTable.prototype._getCellTemplates = /**
19250
     * Gets the column definitions for the provided row def.
19251
     * @param {?} rowDef
19252
     * @return {?}
19253
     */
19254
    function (rowDef) {
19255
        var _this = this;
19256
        if (!rowDef || !rowDef.columns) {
19257
            return [];
19258
        }
19259
        return Array.from(rowDef.columns, function (columnId) {
19260
            var /** @type {?} */ column = _this._columnDefsByName.get(columnId);
19261
            if (!column) {
19262
                throw getTableUnknownColumnError(columnId);
19263
            }
19264
            return rowDef.extractCellTemplate(column);
19265
        });
19266
    };
19267
    /**
19268
     * Adds native table sections (e.g. tbody) and moves the row outlets into them.
19269
     * @return {?}
19270
     */
19271
    CdkTable.prototype._applyNativeTableSections = /**
19272
     * Adds native table sections (e.g. tbody) and moves the row outlets into them.
19273
     * @return {?}
19274
     */
19275
    function () {
19276
        var /** @type {?} */ sections = [
19277
            { tag: 'thead', outlet: this._headerRowOutlet },
19278
            { tag: 'tbody', outlet: this._rowOutlet },
19279
            { tag: 'tfoot', outlet: this._footerRowOutlet },
19280
        ];
19281
        for (var _a = 0, sections_1 = sections; _a < sections_1.length; _a++) {
19282
            var section = sections_1[_a];
19283
            var /** @type {?} */ element = document.createElement(section.tag);
19284
            element.appendChild(section.outlet.elementRef.nativeElement);
19285
            this._elementRef.nativeElement.appendChild(element);
19286
        }
19287
    };
19288
    /**
19289
     * Forces a re-render of the data rows. Should be called in cases where there has been an input
19290
     * change that affects the evaluation of which rows should be rendered, e.g. toggling
19291
     * `multiTemplateDataRows` or adding/removing row definitions.
19292
     * @return {?}
19293
     */
19294
    CdkTable.prototype._forceRenderDataRows = /**
19295
     * Forces a re-render of the data rows. Should be called in cases where there has been an input
19296
     * change that affects the evaluation of which rows should be rendered, e.g. toggling
19297
     * `multiTemplateDataRows` or adding/removing row definitions.
19298
     * @return {?}
19299
     */
19300
    function () {
19301
        this._dataDiffer.diff([]);
19302
        this._rowOutlet.viewContainer.clear();
19303
        this.renderRows();
19304
        this.updateStickyColumnStyles();
19305
    };
19306
    /**
19307
     * Checks if there has been a change in sticky states since last check and applies the correct
19308
     * sticky styles. Since checking resets the "dirty" state, this should only be performed once
19309
     * during a change detection and after the inputs are settled (after content check).
19310
     * @return {?}
19311
     */
19312
    CdkTable.prototype._checkStickyStates = /**
19313
     * Checks if there has been a change in sticky states since last check and applies the correct
19314
     * sticky styles. Since checking resets the "dirty" state, this should only be performed once
19315
     * during a change detection and after the inputs are settled (after content check).
19316
     * @return {?}
19317
     */
19318
    function () {
19319
        var /** @type {?} */ stickyCheckReducer = function (acc, d) {
19320
            return acc || d.hasStickyChanged();
19321
        };
19322
        // Note that the check needs to occur for every definition since it notifies the definition
19323
        // that it can reset its dirty state. Using another operator like `some` may short-circuit
19324
        // remaining definitions and leave them in an unchecked state.
19325
        if (this._headerRowDefs.reduce(stickyCheckReducer, false)) {
19326
            this.updateStickyHeaderRowStyles();
19327
        }
19328
        if (this._footerRowDefs.reduce(stickyCheckReducer, false)) {
19329
            this.updateStickyFooterRowStyles();
19330
        }
19331
        if (Array.from(this._columnDefsByName.values()).reduce(stickyCheckReducer, false)) {
19332
            this.updateStickyColumnStyles();
19333
        }
19334
    };
19335
    /**
19336
     * Creates the sticky styler that will be used for sticky rows and columns. Listens
19337
     * for directionality changes and provides the latest direction to the styler. Re-applies column
19338
     * stickiness when directionality changes.
19339
     * @return {?}
19340
     */
19341
    CdkTable.prototype._setupStickyStyler = /**
19342
     * Creates the sticky styler that will be used for sticky rows and columns. Listens
19343
     * for directionality changes and provides the latest direction to the styler. Re-applies column
19344
     * stickiness when directionality changes.
19345
     * @return {?}
19346
     */
19347
    function () {
19348
        var _this = this;
19349
        var /** @type {?} */ direction = this._dir ? this._dir.value : 'ltr';
19350
        this._stickyStyler = new StickyStyler(this._isNativeHtmlTable, this.stickyCssClass, direction);
19351
        (this._dir ? this._dir.change : Object(rxjs__WEBPACK_IMPORTED_MODULE_4__["of"])())
19352
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["takeUntil"])(this._onDestroy))
19353
            .subscribe(function (value) {
19354
            _this._stickyStyler.direction = value;
19355
            _this.updateStickyColumnStyles();
19356
        });
19357
    };
19358
    CdkTable.decorators = [
19359
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Component"], args: [{selector: 'cdk-table, table[cdk-table]',
19360
                    exportAs: 'cdkTable',
19361
                    template: CDK_TABLE_TEMPLATE,
19362
                    host: {
19363
                        'class': 'cdk-table',
19364
                    },
19365
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ViewEncapsulation"].None,
19366
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ChangeDetectionStrategy"].OnPush,
19367
                },] },
19368
    ];
19369
    /** @nocollapse */
19370
    CdkTable.ctorParameters = function () { return [
19371
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["IterableDiffers"], },
19372
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ChangeDetectorRef"], },
19373
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ElementRef"], },
19374
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Attribute"], args: ['role',] },] },
19375
        { type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_6__["Directionality"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Optional"] },] },
19376
    ]; };
19377
    CdkTable.propDecorators = {
19378
        "trackBy": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"] },],
19379
        "dataSource": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"] },],
19380
        "multiTemplateDataRows": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"] },],
19381
        "_rowOutlet": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ViewChild"], args: [DataRowOutlet,] },],
19382
        "_headerRowOutlet": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ViewChild"], args: [HeaderRowOutlet,] },],
19383
        "_footerRowOutlet": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ViewChild"], args: [FooterRowOutlet,] },],
19384
        "_contentColumnDefs": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ContentChildren"], args: [CdkColumnDef,] },],
19385
        "_contentRowDefs": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ContentChildren"], args: [CdkRowDef,] },],
19386
        "_contentHeaderRowDefs": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ContentChildren"], args: [CdkHeaderRowDef,] },],
19387
        "_contentFooterRowDefs": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ContentChildren"], args: [CdkFooterRowDef,] },],
19388
    };
19389
    return CdkTable;
19390
}());
19391
/**
19392
 * Utility function that gets a merged list of the entries in a QueryList and values of a Set.
19393
 * @template T
19394
 * @param {?} queryList
19395
 * @param {?} set
19396
 * @return {?}
19397
 */
19398
function mergeQueryListAndSet(queryList, set) {
19399
    return queryList.toArray().concat(Array.from(set));
19400
}
19401
 
19402
/**
19403
 * @fileoverview added by tsickle
19404
 * @suppress {checkTypes} checked by tsc
19405
 */
19406
var /** @type {?} */ EXPORTED_DECLARATIONS = [
19407
    CdkTable,
19408
    CdkRowDef,
19409
    CdkCellDef,
19410
    CdkCellOutlet,
19411
    CdkHeaderCellDef,
19412
    CdkFooterCellDef,
19413
    CdkColumnDef,
19414
    CdkCell,
19415
    CdkRow,
19416
    CdkHeaderCell,
19417
    CdkFooterCell,
19418
    CdkHeaderRow,
19419
    CdkHeaderRowDef,
19420
    CdkFooterRow,
19421
    CdkFooterRowDef,
19422
    DataRowOutlet,
19423
    HeaderRowOutlet,
19424
    FooterRowOutlet,
19425
];
19426
var CdkTableModule = /** @class */ (function () {
19427
    function CdkTableModule() {
19428
    }
19429
    CdkTableModule.decorators = [
19430
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["NgModule"], args: [{
19431
                    imports: [_angular_common__WEBPACK_IMPORTED_MODULE_7__["CommonModule"]],
19432
                    exports: EXPORTED_DECLARATIONS,
19433
                    declarations: EXPORTED_DECLARATIONS
19434
                },] },
19435
    ];
19436
    return CdkTableModule;
19437
}());
19438
 
19439
/**
19440
 * @fileoverview added by tsickle
19441
 * @suppress {checkTypes} checked by tsc
19442
 */
19443
 
19444
/**
19445
 * @fileoverview added by tsickle
19446
 * @suppress {checkTypes} checked by tsc
19447
 */
19448
 
19449
 
19450
//# sourceMappingURL=table.es5.js.map
19451
 
19452
 
19453
/***/ }),
19454
 
19455
/***/ "./node_modules/@angular/cdk/esm5/text-field.es5.js":
19456
/*!**********************************************************!*\
19457
  !*** ./node_modules/@angular/cdk/esm5/text-field.es5.js ***!
19458
  \**********************************************************/
19459
/*! exports provided: AutofillMonitor, CdkAutofill, CdkTextareaAutosize, TextFieldModule */
19460
/***/ (function(module, __webpack_exports__, __webpack_require__) {
19461
 
19462
"use strict";
19463
__webpack_require__.r(__webpack_exports__);
19464
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AutofillMonitor", function() { return AutofillMonitor; });
19465
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkAutofill", function() { return CdkAutofill; });
19466
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkTextareaAutosize", function() { return CdkTextareaAutosize; });
19467
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextFieldModule", function() { return TextFieldModule; });
19468
/* harmony import */ var _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/cdk/platform */ "./node_modules/@angular/cdk/esm5/platform.es5.js");
19469
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
19470
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
19471
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
19472
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
19473
/**
19474
 * @license
19475
 * Copyright Google LLC All Rights Reserved.
19476
 *
19477
 * Use of this source code is governed by an MIT-style license that can be
19478
 * found in the LICENSE file at https://angular.io/license
19479
 */
19480
 
19481
 
19482
 
19483
 
19484
 
19485
 
19486
/**
19487
 * @fileoverview added by tsickle
19488
 * @suppress {checkTypes} checked by tsc
19489
 */
19490
/**
19491
 * Options to pass to the animationstart listener.
19492
 */
19493
var /** @type {?} */ listenerOptions = Object(_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_0__["supportsPassiveEventListeners"])() ? { passive: true } : false;
19494
/**
19495
 * An injectable service that can be used to monitor the autofill state of an input.
19496
 * Based on the following blog post:
19497
 * https://medium.com/\@brunn/detecting-autofilled-fields-in-javascript-aed598d25da7
19498
 */
19499
var AutofillMonitor = /** @class */ (function () {
19500
    function AutofillMonitor(_platform, _ngZone) {
19501
        this._platform = _platform;
19502
        this._ngZone = _ngZone;
19503
        this._monitoredElements = new Map();
19504
    }
19505
    /**
19506
     * Monitor for changes in the autofill state of the given input element.
19507
     * @param element The element to monitor.
19508
     * @return A stream of autofill state changes.
19509
     */
19510
    /**
19511
     * Monitor for changes in the autofill state of the given input element.
19512
     * @param {?} element The element to monitor.
19513
     * @return {?} A stream of autofill state changes.
19514
     */
19515
    AutofillMonitor.prototype.monitor = /**
19516
     * Monitor for changes in the autofill state of the given input element.
19517
     * @param {?} element The element to monitor.
19518
     * @return {?} A stream of autofill state changes.
19519
     */
19520
    function (element) {
19521
        var _this = this;
19522
        if (!this._platform.isBrowser) {
19523
            return rxjs__WEBPACK_IMPORTED_MODULE_2__["EMPTY"];
19524
        }
19525
        var /** @type {?} */ info = this._monitoredElements.get(element);
19526
        if (info) {
19527
            return info.subject.asObservable();
19528
        }
19529
        var /** @type {?} */ result = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
19530
        var /** @type {?} */ cssClass = 'cdk-text-field-autofilled';
19531
        var /** @type {?} */ listener = function (event) {
19532
            // Animation events fire on initial element render, we check for the presence of the autofill
19533
            // CSS class to make sure this is a real change in state, not just the initial render before
19534
            // we fire off events.
19535
            if (event.animationName === 'cdk-text-field-autofill-start' &&
19536
                !element.classList.contains(cssClass)) {
19537
                element.classList.add(cssClass);
19538
                _this._ngZone.run(function () { return result.next({ target: /** @type {?} */ (event.target), isAutofilled: true }); });
19539
            }
19540
            else if (event.animationName === 'cdk-text-field-autofill-end' &&
19541
                element.classList.contains(cssClass)) {
19542
                element.classList.remove(cssClass);
19543
                _this._ngZone.run(function () { return result.next({ target: /** @type {?} */ (event.target), isAutofilled: false }); });
19544
            }
19545
        };
19546
        this._ngZone.runOutsideAngular(function () {
19547
            element.addEventListener('animationstart', listener, listenerOptions);
19548
            element.classList.add('cdk-text-field-autofill-monitored');
19549
        });
19550
        this._monitoredElements.set(element, {
19551
            subject: result,
19552
            unlisten: function () {
19553
                element.removeEventListener('animationstart', listener, listenerOptions);
19554
            }
19555
        });
19556
        return result.asObservable();
19557
    };
19558
    /**
19559
     * Stop monitoring the autofill state of the given input element.
19560
     * @param element The element to stop monitoring.
19561
     */
19562
    /**
19563
     * Stop monitoring the autofill state of the given input element.
19564
     * @param {?} element The element to stop monitoring.
19565
     * @return {?}
19566
     */
19567
    AutofillMonitor.prototype.stopMonitoring = /**
19568
     * Stop monitoring the autofill state of the given input element.
19569
     * @param {?} element The element to stop monitoring.
19570
     * @return {?}
19571
     */
19572
    function (element) {
19573
        var /** @type {?} */ info = this._monitoredElements.get(element);
19574
        if (info) {
19575
            info.unlisten();
19576
            info.subject.complete();
19577
            element.classList.remove('cdk-text-field-autofill-monitored');
19578
            element.classList.remove('cdk-text-field-autofilled');
19579
            this._monitoredElements.delete(element);
19580
        }
19581
    };
19582
    /**
19583
     * @return {?}
19584
     */
19585
    AutofillMonitor.prototype.ngOnDestroy = /**
19586
     * @return {?}
19587
     */
19588
    function () {
19589
        var _this = this;
19590
        this._monitoredElements.forEach(function (_info, element) { return _this.stopMonitoring(element); });
19591
    };
19592
    AutofillMonitor.decorators = [
19593
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"], args: [{ providedIn: 'root' },] },
19594
    ];
19595
    /** @nocollapse */
19596
    AutofillMonitor.ctorParameters = function () { return [
19597
        { type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_0__["Platform"], },
19598
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"], },
19599
    ]; };
19600
    /** @nocollapse */ AutofillMonitor.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["defineInjectable"])({ factory: function AutofillMonitor_Factory() { return new AutofillMonitor(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_0__["Platform"]), Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"])); }, token: AutofillMonitor, providedIn: "root" });
19601
    return AutofillMonitor;
19602
}());
19603
/**
19604
 * A directive that can be used to monitor the autofill state of an input.
19605
 */
19606
var CdkAutofill = /** @class */ (function () {
19607
    function CdkAutofill(_elementRef, _autofillMonitor) {
19608
        this._elementRef = _elementRef;
19609
        this._autofillMonitor = _autofillMonitor;
19610
        /**
19611
         * Emits when the autofill state of the element changes.
19612
         */
19613
        this.cdkAutofill = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
19614
    }
19615
    /**
19616
     * @return {?}
19617
     */
19618
    CdkAutofill.prototype.ngOnInit = /**
19619
     * @return {?}
19620
     */
19621
    function () {
19622
        var _this = this;
19623
        this._autofillMonitor
19624
            .monitor(this._elementRef.nativeElement)
19625
            .subscribe(function (event) { return _this.cdkAutofill.emit(event); });
19626
    };
19627
    /**
19628
     * @return {?}
19629
     */
19630
    CdkAutofill.prototype.ngOnDestroy = /**
19631
     * @return {?}
19632
     */
19633
    function () {
19634
        this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement);
19635
    };
19636
    CdkAutofill.decorators = [
19637
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
19638
                    selector: '[cdkAutofill]',
19639
                },] },
19640
    ];
19641
    /** @nocollapse */
19642
    CdkAutofill.ctorParameters = function () { return [
19643
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
19644
        { type: AutofillMonitor, },
19645
    ]; };
19646
    CdkAutofill.propDecorators = {
19647
        "cdkAutofill": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"] },],
19648
    };
19649
    return CdkAutofill;
19650
}());
19651
 
19652
/**
19653
 * @fileoverview added by tsickle
19654
 * @suppress {checkTypes} checked by tsc
19655
 */
19656
/**
19657
 * Directive to automatically resize a textarea to fit its content.
19658
 */
19659
var CdkTextareaAutosize = /** @class */ (function () {
19660
    function CdkTextareaAutosize(_elementRef, _platform, _ngZone) {
19661
        this._elementRef = _elementRef;
19662
        this._platform = _platform;
19663
        this._ngZone = _ngZone;
19664
        this._destroyed = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
19665
        this._enabled = true;
19666
        this._textareaElement = /** @type {?} */ (this._elementRef.nativeElement);
19667
    }
19668
    Object.defineProperty(CdkTextareaAutosize.prototype, "minRows", {
19669
        get: /**
19670
         * Minimum amount of rows in the textarea.
19671
         * @return {?}
19672
         */
19673
        function () { return this._minRows; },
19674
        set: /**
19675
         * @param {?} value
19676
         * @return {?}
19677
         */
19678
        function (value) {
19679
            this._minRows = value;
19680
            this._setMinHeight();
19681
        },
19682
        enumerable: true,
19683
        configurable: true
19684
    });
19685
    Object.defineProperty(CdkTextareaAutosize.prototype, "maxRows", {
19686
        get: /**
19687
         * Maximum amount of rows in the textarea.
19688
         * @return {?}
19689
         */
19690
        function () { return this._maxRows; },
19691
        set: /**
19692
         * @param {?} value
19693
         * @return {?}
19694
         */
19695
        function (value) {
19696
            this._maxRows = value;
19697
            this._setMaxHeight();
19698
        },
19699
        enumerable: true,
19700
        configurable: true
19701
    });
19702
    Object.defineProperty(CdkTextareaAutosize.prototype, "enabled", {
19703
        get: /**
19704
         * Whether autosizing is enabled or not
19705
         * @return {?}
19706
         */
19707
        function () { return this._enabled; },
19708
        set: /**
19709
         * @param {?} value
19710
         * @return {?}
19711
         */
19712
        function (value) {
19713
            value = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceBooleanProperty"])(value);
19714
            // Only act if the actual value changed. This specifically helps to not run
19715
            // resizeToFitContent too early (i.e. before ngAfterViewInit)
19716
            if (this._enabled !== value) {
19717
                (this._enabled = value) ? this.resizeToFitContent(true) : this.reset();
19718
            }
19719
        },
19720
        enumerable: true,
19721
        configurable: true
19722
    });
19723
    /** Sets the minimum height of the textarea as determined by minRows. */
19724
    /**
19725
     * Sets the minimum height of the textarea as determined by minRows.
19726
     * @return {?}
19727
     */
19728
    CdkTextareaAutosize.prototype._setMinHeight = /**
19729
     * Sets the minimum height of the textarea as determined by minRows.
19730
     * @return {?}
19731
     */
19732
    function () {
19733
        var /** @type {?} */ minHeight = this.minRows && this._cachedLineHeight ?
19734
            this.minRows * this._cachedLineHeight + "px" : null;
19735
        if (minHeight) {
19736
            this._setTextareaStyle('minHeight', minHeight);
19737
        }
19738
    };
19739
    /** Sets the maximum height of the textarea as determined by maxRows. */
19740
    /**
19741
     * Sets the maximum height of the textarea as determined by maxRows.
19742
     * @return {?}
19743
     */
19744
    CdkTextareaAutosize.prototype._setMaxHeight = /**
19745
     * Sets the maximum height of the textarea as determined by maxRows.
19746
     * @return {?}
19747
     */
19748
    function () {
19749
        var /** @type {?} */ maxHeight = this.maxRows && this._cachedLineHeight ?
19750
            this.maxRows * this._cachedLineHeight + "px" : null;
19751
        if (maxHeight) {
19752
            this._setTextareaStyle('maxHeight', maxHeight);
19753
        }
19754
    };
19755
    /**
19756
     * @return {?}
19757
     */
19758
    CdkTextareaAutosize.prototype.ngAfterViewInit = /**
19759
     * @return {?}
19760
     */
19761
    function () {
19762
        var _this = this;
19763
        if (this._platform.isBrowser) {
19764
            // Remember the height which we started with in case autosizing is disabled
19765
            this._initialHeight = this._textareaElement.style.height;
19766
            this.resizeToFitContent();
19767
            this._ngZone.runOutsideAngular(function () {
19768
                Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["fromEvent"])(window, 'resize')
19769
                    .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["auditTime"])(16), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["takeUntil"])(_this._destroyed))
19770
                    .subscribe(function () { return _this.resizeToFitContent(true); });
19771
            });
19772
        }
19773
    };
19774
    /**
19775
     * @return {?}
19776
     */
19777
    CdkTextareaAutosize.prototype.ngOnDestroy = /**
19778
     * @return {?}
19779
     */
19780
    function () {
19781
        this._destroyed.next();
19782
        this._destroyed.complete();
19783
    };
19784
    /**
19785
     * Sets a style property on the textarea element.
19786
     * @param {?} property
19787
     * @param {?} value
19788
     * @return {?}
19789
     */
19790
    CdkTextareaAutosize.prototype._setTextareaStyle = /**
19791
     * Sets a style property on the textarea element.
19792
     * @param {?} property
19793
     * @param {?} value
19794
     * @return {?}
19795
     */
19796
    function (property, value) {
19797
        this._textareaElement.style[property] = value;
19798
    };
19799
    /**
19800
     * Cache the height of a single-row textarea if it has not already been cached.
19801
     *
19802
     * We need to know how large a single "row" of a textarea is in order to apply minRows and
19803
     * maxRows. For the initial version, we will assume that the height of a single line in the
19804
     * textarea does not ever change.
19805
     * @return {?}
19806
     */
19807
    CdkTextareaAutosize.prototype._cacheTextareaLineHeight = /**
19808
     * Cache the height of a single-row textarea if it has not already been cached.
19809
     *
19810
     * We need to know how large a single "row" of a textarea is in order to apply minRows and
19811
     * maxRows. For the initial version, we will assume that the height of a single line in the
19812
     * textarea does not ever change.
19813
     * @return {?}
19814
     */
19815
    function () {
19816
        if (this._cachedLineHeight) {
19817
            return;
19818
        }
19819
        // Use a clone element because we have to override some styles.
19820
        var /** @type {?} */ textareaClone = /** @type {?} */ (this._textareaElement.cloneNode(false));
19821
        textareaClone.rows = 1;
19822
        // Use `position: absolute` so that this doesn't cause a browser layout and use
19823
        // `visibility: hidden` so that nothing is rendered. Clear any other styles that
19824
        // would affect the height.
19825
        textareaClone.style.position = 'absolute';
19826
        textareaClone.style.visibility = 'hidden';
19827
        textareaClone.style.border = 'none';
19828
        textareaClone.style.padding = '0';
19829
        textareaClone.style.height = '';
19830
        textareaClone.style.minHeight = '';
19831
        textareaClone.style.maxHeight = '';
19832
        // In Firefox it happens that textarea elements are always bigger than the specified amount
19833
        // of rows. This is because Firefox tries to add extra space for the horizontal scrollbar.
19834
        // As a workaround that removes the extra space for the scrollbar, we can just set overflow
19835
        // to hidden. This ensures that there is no invalid calculation of the line height.
19836
        // See Firefox bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=33654
19837
        textareaClone.style.overflow = 'hidden'; /** @type {?} */
19838
        ((this._textareaElement.parentNode)).appendChild(textareaClone);
19839
        this._cachedLineHeight = textareaClone.clientHeight; /** @type {?} */
19840
        ((this._textareaElement.parentNode)).removeChild(textareaClone);
19841
        // Min and max heights have to be re-calculated if the cached line height changes
19842
        this._setMinHeight();
19843
        this._setMaxHeight();
19844
    };
19845
    /**
19846
     * @return {?}
19847
     */
19848
    CdkTextareaAutosize.prototype.ngDoCheck = /**
19849
     * @return {?}
19850
     */
19851
    function () {
19852
        if (this._platform.isBrowser) {
19853
            this.resizeToFitContent();
19854
        }
19855
    };
19856
    /**
19857
     * Resize the textarea to fit its content.
19858
     * @param force Whether to force a height recalculation. By default the height will be
19859
     *    recalculated only if the value changed since the last call.
19860
     */
19861
    /**
19862
     * Resize the textarea to fit its content.
19863
     * @param {?=} force Whether to force a height recalculation. By default the height will be
19864
     *    recalculated only if the value changed since the last call.
19865
     * @return {?}
19866
     */
19867
    CdkTextareaAutosize.prototype.resizeToFitContent = /**
19868
     * Resize the textarea to fit its content.
19869
     * @param {?=} force Whether to force a height recalculation. By default the height will be
19870
     *    recalculated only if the value changed since the last call.
19871
     * @return {?}
19872
     */
19873
    function (force) {
19874
        var _this = this;
19875
        if (force === void 0) { force = false; }
19876
        // If autosizing is disabled, just skip everything else
19877
        if (!this._enabled) {
19878
            return;
19879
        }
19880
        this._cacheTextareaLineHeight();
19881
        // If we haven't determined the line-height yet, we know we're still hidden and there's no point
19882
        // in checking the height of the textarea.
19883
        if (!this._cachedLineHeight) {
19884
            return;
19885
        }
19886
        var /** @type {?} */ textarea = /** @type {?} */ (this._elementRef.nativeElement);
19887
        var /** @type {?} */ value = textarea.value;
19888
        // Only resize of the value changed since these calculations can be expensive.
19889
        if (value === this._previousValue && !force) {
19890
            return;
19891
        }
19892
        var /** @type {?} */ placeholderText = textarea.placeholder;
19893
        // Reset the textarea height to auto in order to shrink back to its default size.
19894
        // Also temporarily force overflow:hidden, so scroll bars do not interfere with calculations.
19895
        // Long placeholders that are wider than the textarea width may lead to a bigger scrollHeight
19896
        // value. To ensure that the scrollHeight is not bigger than the content, the placeholders
19897
        // need to be removed temporarily.
19898
        textarea.classList.add('cdk-textarea-autosize-measuring');
19899
        textarea.placeholder = '';
19900
        // The cdk-textarea-autosize-measuring class includes a 2px padding to workaround an issue with
19901
        // Chrome, so we account for that extra space here by subtracting 4 (2px top + 2px bottom).
19902
        var /** @type {?} */ height = textarea.scrollHeight - 4;
19903
        // Use the scrollHeight to know how large the textarea *would* be if fit its entire value.
19904
        textarea.style.height = height + "px";
19905
        textarea.classList.remove('cdk-textarea-autosize-measuring');
19906
        textarea.placeholder = placeholderText;
19907
        // On Firefox resizing the textarea will prevent it from scrolling to the caret position.
19908
        // We need to re-set the selection in order for it to scroll to the proper position.
19909
        if (typeof requestAnimationFrame !== 'undefined') {
19910
            this._ngZone.runOutsideAngular(function () {
19911
                return requestAnimationFrame(function () {
19912
                    var selectionStart = textarea.selectionStart, selectionEnd = textarea.selectionEnd;
19913
                    // IE will throw an "Unspecified error" if we try to set the selection range after the
19914
                    // element has been removed from the DOM. Assert that the directive hasn't been destroyed
19915
                    // between the time we requested the animation frame and when it was executed.
19916
                    // Also note that we have to assert that the textarea is focused before we set the
19917
                    // selection range. Setting the selection range on a non-focused textarea will cause
19918
                    // it to receive focus on IE and Edge.
19919
                    if (!_this._destroyed.isStopped && document.activeElement === textarea) {
19920
                        textarea.setSelectionRange(selectionStart, selectionEnd);
19921
                    }
19922
                });
19923
            });
19924
        }
19925
        this._previousValue = value;
19926
    };
19927
    /**
19928
     * Resets the textarea to it's original size
19929
     */
19930
    /**
19931
     * Resets the textarea to it's original size
19932
     * @return {?}
19933
     */
19934
    CdkTextareaAutosize.prototype.reset = /**
19935
     * Resets the textarea to it's original size
19936
     * @return {?}
19937
     */
19938
    function () {
19939
        // Do not try to change the textarea, if the initialHeight has not been determined yet
19940
        // This might potentially remove styles when reset() is called before ngAfterViewInit
19941
        if (this._initialHeight === undefined) {
19942
            return;
19943
        }
19944
        this._textareaElement.style.height = this._initialHeight;
19945
    };
19946
    /**
19947
     * @return {?}
19948
     */
19949
    CdkTextareaAutosize.prototype._noopInputHandler = /**
19950
     * @return {?}
19951
     */
19952
    function () {
19953
        // no-op handler that ensures we're running change detection on input events.
19954
    };
19955
    CdkTextareaAutosize.decorators = [
19956
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
19957
                    selector: 'textarea[cdkTextareaAutosize]',
19958
                    exportAs: 'cdkTextareaAutosize',
19959
                    host: {
19960
                        'class': 'cdk-textarea-autosize',
19961
                        // Textarea elements that have the directive applied should have a single row by default.
19962
                        // Browsers normally show two rows by default and therefore this limits the minRows binding.
19963
                        'rows': '1',
19964
                        '(input)': '_noopInputHandler()',
19965
                    },
19966
                },] },
19967
    ];
19968
    /** @nocollapse */
19969
    CdkTextareaAutosize.ctorParameters = function () { return [
19970
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
19971
        { type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_0__["Platform"], },
19972
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"], },
19973
    ]; };
19974
    CdkTextareaAutosize.propDecorators = {
19975
        "minRows": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['cdkAutosizeMinRows',] },],
19976
        "maxRows": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['cdkAutosizeMaxRows',] },],
19977
        "enabled": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['cdkTextareaAutosize',] },],
19978
    };
19979
    return CdkTextareaAutosize;
19980
}());
19981
 
19982
/**
19983
 * @fileoverview added by tsickle
19984
 * @suppress {checkTypes} checked by tsc
19985
 */
19986
var TextFieldModule = /** @class */ (function () {
19987
    function TextFieldModule() {
19988
    }
19989
    TextFieldModule.decorators = [
19990
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{
19991
                    declarations: [CdkAutofill, CdkTextareaAutosize],
19992
                    imports: [_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_0__["PlatformModule"]],
19993
                    exports: [CdkAutofill, CdkTextareaAutosize],
19994
                },] },
19995
    ];
19996
    return TextFieldModule;
19997
}());
19998
 
19999
/**
20000
 * @fileoverview added by tsickle
20001
 * @suppress {checkTypes} checked by tsc
20002
 */
20003
 
20004
/**
20005
 * @fileoverview added by tsickle
20006
 * @suppress {checkTypes} checked by tsc
20007
 */
20008
 
20009
 
20010
//# sourceMappingURL=text-field.es5.js.map
20011
 
20012
 
20013
/***/ }),
20014
 
20015
/***/ "./node_modules/@angular/cdk/esm5/tree.es5.js":
20016
/*!****************************************************!*\
20017
  !*** ./node_modules/@angular/cdk/esm5/tree.es5.js ***!
20018
  \****************************************************/
20019
/*! exports provided: BaseTreeControl, FlatTreeControl, NestedTreeControl, CdkNestedTreeNode, CdkTreeNodeOutletContext, CdkTreeNodeDef, CdkTreeNodePadding, CdkTreeNodeOutlet, CdkTree, CdkTreeNode, getTreeNoValidDataSourceError, getTreeMultipleDefaultNodeDefsError, getTreeMissingMatchingNodeDefError, getTreeControlMissingError, getTreeControlFunctionsMissingError, CdkTreeModule, CdkTreeNodeToggle */
20020
/***/ (function(module, __webpack_exports__, __webpack_require__) {
20021
 
20022
"use strict";
20023
__webpack_require__.r(__webpack_exports__);
20024
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseTreeControl", function() { return BaseTreeControl; });
20025
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FlatTreeControl", function() { return FlatTreeControl; });
20026
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NestedTreeControl", function() { return NestedTreeControl; });
20027
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkNestedTreeNode", function() { return CdkNestedTreeNode; });
20028
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkTreeNodeOutletContext", function() { return CdkTreeNodeOutletContext; });
20029
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkTreeNodeDef", function() { return CdkTreeNodeDef; });
20030
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkTreeNodePadding", function() { return CdkTreeNodePadding; });
20031
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkTreeNodeOutlet", function() { return CdkTreeNodeOutlet; });
20032
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkTree", function() { return CdkTree; });
20033
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkTreeNode", function() { return CdkTreeNode; });
20034
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTreeNoValidDataSourceError", function() { return getTreeNoValidDataSourceError; });
20035
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTreeMultipleDefaultNodeDefsError", function() { return getTreeMultipleDefaultNodeDefsError; });
20036
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTreeMissingMatchingNodeDefError", function() { return getTreeMissingMatchingNodeDefError; });
20037
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTreeControlMissingError", function() { return getTreeControlMissingError; });
20038
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTreeControlFunctionsMissingError", function() { return getTreeControlFunctionsMissingError; });
20039
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkTreeModule", function() { return CdkTreeModule; });
20040
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CdkTreeNodeToggle", function() { return CdkTreeNodeToggle; });
20041
/* harmony import */ var _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/cdk/collections */ "./node_modules/@angular/cdk/esm5/collections.es5.js");
20042
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
20043
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
20044
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
20045
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
20046
/* harmony import */ var _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/cdk/bidi */ "./node_modules/@angular/cdk/esm5/bidi.es5.js");
20047
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
20048
/* harmony import */ var _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/cdk/a11y */ "./node_modules/@angular/cdk/esm5/a11y.es5.js");
20049
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
20050
/**
20051
 * @license
20052
 * Copyright Google LLC All Rights Reserved.
20053
 *
20054
 * Use of this source code is governed by an MIT-style license that can be
20055
 * found in the LICENSE file at https://angular.io/license
20056
 */
20057
 
20058
 
20059
 
20060
 
20061
 
20062
 
20063
 
20064
 
20065
 
20066
 
20067
/**
20068
 * @fileoverview added by tsickle
20069
 * @suppress {checkTypes} checked by tsc
20070
 */
20071
/**
20072
 * Base tree control. It has basic toggle/expand/collapse operations on a single data node.
20073
 * @abstract
20074
 * @template T
20075
 */
20076
var  /**
20077
 * Base tree control. It has basic toggle/expand/collapse operations on a single data node.
20078
 * @abstract
20079
 * @template T
20080
 */
20081
BaseTreeControl = /** @class */ (function () {
20082
    function BaseTreeControl() {
20083
        /**
20084
         * A selection model with multi-selection to track expansion status.
20085
         */
20086
        this.expansionModel = new _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_0__["SelectionModel"](true);
20087
    }
20088
    /** Toggles one single data node's expanded/collapsed state. */
20089
    /**
20090
     * Toggles one single data node's expanded/collapsed state.
20091
     * @param {?} dataNode
20092
     * @return {?}
20093
     */
20094
    BaseTreeControl.prototype.toggle = /**
20095
     * Toggles one single data node's expanded/collapsed state.
20096
     * @param {?} dataNode
20097
     * @return {?}
20098
     */
20099
    function (dataNode) {
20100
        this.expansionModel.toggle(dataNode);
20101
    };
20102
    /** Expands one single data node. */
20103
    /**
20104
     * Expands one single data node.
20105
     * @param {?} dataNode
20106
     * @return {?}
20107
     */
20108
    BaseTreeControl.prototype.expand = /**
20109
     * Expands one single data node.
20110
     * @param {?} dataNode
20111
     * @return {?}
20112
     */
20113
    function (dataNode) {
20114
        this.expansionModel.select(dataNode);
20115
    };
20116
    /** Collapses one single data node. */
20117
    /**
20118
     * Collapses one single data node.
20119
     * @param {?} dataNode
20120
     * @return {?}
20121
     */
20122
    BaseTreeControl.prototype.collapse = /**
20123
     * Collapses one single data node.
20124
     * @param {?} dataNode
20125
     * @return {?}
20126
     */
20127
    function (dataNode) {
20128
        this.expansionModel.deselect(dataNode);
20129
    };
20130
    /** Whether a given data node is expanded or not. Returns true if the data node is expanded. */
20131
    /**
20132
     * Whether a given data node is expanded or not. Returns true if the data node is expanded.
20133
     * @param {?} dataNode
20134
     * @return {?}
20135
     */
20136
    BaseTreeControl.prototype.isExpanded = /**
20137
     * Whether a given data node is expanded or not. Returns true if the data node is expanded.
20138
     * @param {?} dataNode
20139
     * @return {?}
20140
     */
20141
    function (dataNode) {
20142
        return this.expansionModel.isSelected(dataNode);
20143
    };
20144
    /** Toggles a subtree rooted at `node` recursively. */
20145
    /**
20146
     * Toggles a subtree rooted at `node` recursively.
20147
     * @param {?} dataNode
20148
     * @return {?}
20149
     */
20150
    BaseTreeControl.prototype.toggleDescendants = /**
20151
     * Toggles a subtree rooted at `node` recursively.
20152
     * @param {?} dataNode
20153
     * @return {?}
20154
     */
20155
    function (dataNode) {
20156
        this.expansionModel.isSelected(dataNode)
20157
            ? this.collapseDescendants(dataNode)
20158
            : this.expandDescendants(dataNode);
20159
    };
20160
    /** Collapse all dataNodes in the tree. */
20161
    /**
20162
     * Collapse all dataNodes in the tree.
20163
     * @return {?}
20164
     */
20165
    BaseTreeControl.prototype.collapseAll = /**
20166
     * Collapse all dataNodes in the tree.
20167
     * @return {?}
20168
     */
20169
    function () {
20170
        this.expansionModel.clear();
20171
    };
20172
    /** Expands a subtree rooted at given data node recursively. */
20173
    /**
20174
     * Expands a subtree rooted at given data node recursively.
20175
     * @param {?} dataNode
20176
     * @return {?}
20177
     */
20178
    BaseTreeControl.prototype.expandDescendants = /**
20179
     * Expands a subtree rooted at given data node recursively.
20180
     * @param {?} dataNode
20181
     * @return {?}
20182
     */
20183
    function (dataNode) {
20184
        var /** @type {?} */ toBeProcessed = [dataNode];
20185
        toBeProcessed.push.apply(toBeProcessed, this.getDescendants(dataNode));
20186
        (_a = this.expansionModel).select.apply(_a, toBeProcessed);
20187
        var _a;
20188
    };
20189
    /** Collapses a subtree rooted at given data node recursively. */
20190
    /**
20191
     * Collapses a subtree rooted at given data node recursively.
20192
     * @param {?} dataNode
20193
     * @return {?}
20194
     */
20195
    BaseTreeControl.prototype.collapseDescendants = /**
20196
     * Collapses a subtree rooted at given data node recursively.
20197
     * @param {?} dataNode
20198
     * @return {?}
20199
     */
20200
    function (dataNode) {
20201
        var /** @type {?} */ toBeProcessed = [dataNode];
20202
        toBeProcessed.push.apply(toBeProcessed, this.getDescendants(dataNode));
20203
        (_a = this.expansionModel).deselect.apply(_a, toBeProcessed);
20204
        var _a;
20205
    };
20206
    return BaseTreeControl;
20207
}());
20208
 
20209
/**
20210
 * @fileoverview added by tsickle
20211
 * @suppress {checkTypes} checked by tsc
20212
 */
20213
/**
20214
 * Flat tree control. Able to expand/collapse a subtree recursively for flattened tree.
20215
 * @template T
20216
 */
20217
var  /**
20218
 * Flat tree control. Able to expand/collapse a subtree recursively for flattened tree.
20219
 * @template T
20220
 */
20221
FlatTreeControl = /** @class */ (function (_super) {
20222
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(FlatTreeControl, _super);
20223
    /** Construct with flat tree data node functions getLevel and isExpandable. */
20224
    function FlatTreeControl(getLevel, isExpandable) {
20225
        var _this = _super.call(this) || this;
20226
        _this.getLevel = getLevel;
20227
        _this.isExpandable = isExpandable;
20228
        return _this;
20229
    }
20230
    /**
20231
     * Gets a list of the data node's subtree of descendent data nodes.
20232
     *
20233
     * To make this working, the `dataNodes` of the TreeControl must be flattened tree nodes
20234
     * with correct levels.
20235
     */
20236
    /**
20237
     * Gets a list of the data node's subtree of descendent data nodes.
20238
     *
20239
     * To make this working, the `dataNodes` of the TreeControl must be flattened tree nodes
20240
     * with correct levels.
20241
     * @param {?} dataNode
20242
     * @return {?}
20243
     */
20244
    FlatTreeControl.prototype.getDescendants = /**
20245
     * Gets a list of the data node's subtree of descendent data nodes.
20246
     *
20247
     * To make this working, the `dataNodes` of the TreeControl must be flattened tree nodes
20248
     * with correct levels.
20249
     * @param {?} dataNode
20250
     * @return {?}
20251
     */
20252
    function (dataNode) {
20253
        var /** @type {?} */ startIndex = this.dataNodes.indexOf(dataNode);
20254
        var /** @type {?} */ results = [];
20255
        // Goes through flattened tree nodes in the `dataNodes` array, and get all descendants.
20256
        // The level of descendants of a tree node must be greater than the level of the given
20257
        // tree node.
20258
        // If we reach a node whose level is equal to the level of the tree node, we hit a sibling.
20259
        // If we reach a node whose level is greater than the level of the tree node, we hit a
20260
        // sibling of an ancestor.
20261
        for (var /** @type {?} */ i = startIndex + 1; i < this.dataNodes.length && this.getLevel(dataNode) < this.getLevel(this.dataNodes[i]); i++) {
20262
            results.push(this.dataNodes[i]);
20263
        }
20264
        return results;
20265
    };
20266
    /**
20267
     * Expands all data nodes in the tree.
20268
     *
20269
     * To make this working, the `dataNodes` variable of the TreeControl must be set to all flattened
20270
     * data nodes of the tree.
20271
     */
20272
    /**
20273
     * Expands all data nodes in the tree.
20274
     *
20275
     * To make this working, the `dataNodes` variable of the TreeControl must be set to all flattened
20276
     * data nodes of the tree.
20277
     * @return {?}
20278
     */
20279
    FlatTreeControl.prototype.expandAll = /**
20280
     * Expands all data nodes in the tree.
20281
     *
20282
     * To make this working, the `dataNodes` variable of the TreeControl must be set to all flattened
20283
     * data nodes of the tree.
20284
     * @return {?}
20285
     */
20286
    function () {
20287
        (_a = this.expansionModel).select.apply(_a, this.dataNodes);
20288
        var _a;
20289
    };
20290
    return FlatTreeControl;
20291
}(BaseTreeControl));
20292
 
20293
/**
20294
 * @fileoverview added by tsickle
20295
 * @suppress {checkTypes} checked by tsc
20296
 */
20297
/**
20298
 * Nested tree control. Able to expand/collapse a subtree recursively for NestedNode type.
20299
 * @template T
20300
 */
20301
var  /**
20302
 * Nested tree control. Able to expand/collapse a subtree recursively for NestedNode type.
20303
 * @template T
20304
 */
20305
NestedTreeControl = /** @class */ (function (_super) {
20306
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(NestedTreeControl, _super);
20307
    /** Construct with nested tree function getChildren. */
20308
    function NestedTreeControl(getChildren) {
20309
        var _this = _super.call(this) || this;
20310
        _this.getChildren = getChildren;
20311
        return _this;
20312
    }
20313
    /**
20314
     * Expands all dataNodes in the tree.
20315
     *
20316
     * To make this working, the `dataNodes` variable of the TreeControl must be set to all root level
20317
     * data nodes of the tree.
20318
     */
20319
    /**
20320
     * Expands all dataNodes in the tree.
20321
     *
20322
     * To make this working, the `dataNodes` variable of the TreeControl must be set to all root level
20323
     * data nodes of the tree.
20324
     * @return {?}
20325
     */
20326
    NestedTreeControl.prototype.expandAll = /**
20327
     * Expands all dataNodes in the tree.
20328
     *
20329
     * To make this working, the `dataNodes` variable of the TreeControl must be set to all root level
20330
     * data nodes of the tree.
20331
     * @return {?}
20332
     */
20333
    function () {
20334
        var _this = this;
20335
        this.expansionModel.clear();
20336
        var /** @type {?} */ allNodes = this.dataNodes.reduce(function (accumulator, dataNode) {
20337
            return accumulator.concat(_this.getDescendants(dataNode), [dataNode]);
20338
        }, []);
20339
        (_a = this.expansionModel).select.apply(_a, allNodes);
20340
        var _a;
20341
    };
20342
    /** Gets a list of descendant dataNodes of a subtree rooted at given data node recursively. */
20343
    /**
20344
     * Gets a list of descendant dataNodes of a subtree rooted at given data node recursively.
20345
     * @param {?} dataNode
20346
     * @return {?}
20347
     */
20348
    NestedTreeControl.prototype.getDescendants = /**
20349
     * Gets a list of descendant dataNodes of a subtree rooted at given data node recursively.
20350
     * @param {?} dataNode
20351
     * @return {?}
20352
     */
20353
    function (dataNode) {
20354
        var /** @type {?} */ descendants = [];
20355
        this._getDescendants(descendants, dataNode);
20356
        // Remove the node itself
20357
        return descendants.splice(1);
20358
    };
20359
    /** A helper function to get descendants recursively. */
20360
    /**
20361
     * A helper function to get descendants recursively.
20362
     * @param {?} descendants
20363
     * @param {?} dataNode
20364
     * @return {?}
20365
     */
20366
    NestedTreeControl.prototype._getDescendants = /**
20367
     * A helper function to get descendants recursively.
20368
     * @param {?} descendants
20369
     * @param {?} dataNode
20370
     * @return {?}
20371
     */
20372
    function (descendants, dataNode) {
20373
        var _this = this;
20374
        descendants.push(dataNode);
20375
        var /** @type {?} */ childrenNodes = this.getChildren(dataNode);
20376
        if (Array.isArray(childrenNodes)) {
20377
            childrenNodes.forEach(function (child) { return _this._getDescendants(descendants, child); });
20378
        }
20379
        else if (childrenNodes instanceof rxjs__WEBPACK_IMPORTED_MODULE_2__["Observable"]) {
20380
            childrenNodes.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["take"])(1)).subscribe(function (children) {
20381
                children.forEach(function (child) { return _this._getDescendants(descendants, child); });
20382
            });
20383
        }
20384
    };
20385
    return NestedTreeControl;
20386
}(BaseTreeControl));
20387
 
20388
/**
20389
 * @fileoverview added by tsickle
20390
 * @suppress {checkTypes} checked by tsc
20391
 */
20392
/**
20393
 * Context provided to the tree node component.
20394
 * @template T
20395
 */
20396
var  /**
20397
 * Context provided to the tree node component.
20398
 * @template T
20399
 */
20400
CdkTreeNodeOutletContext = /** @class */ (function () {
20401
    function CdkTreeNodeOutletContext(data) {
20402
        this.$implicit = data;
20403
    }
20404
    return CdkTreeNodeOutletContext;
20405
}());
20406
/**
20407
 * Data node definition for the CdkTree.
20408
 * Captures the node's template and a when predicate that describes when this node should be used.
20409
 * @template T
20410
 */
20411
var CdkTreeNodeDef = /** @class */ (function () {
20412
    /** @docs-private */
20413
    function CdkTreeNodeDef(template) {
20414
        this.template = template;
20415
    }
20416
    CdkTreeNodeDef.decorators = [
20417
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Directive"], args: [{
20418
                    selector: '[cdkTreeNodeDef]',
20419
                    inputs: [
20420
                        'when: cdkTreeNodeDefWhen'
20421
                    ],
20422
                },] },
20423
    ];
20424
    /** @nocollapse */
20425
    CdkTreeNodeDef.ctorParameters = function () { return [
20426
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["TemplateRef"], },
20427
    ]; };
20428
    return CdkTreeNodeDef;
20429
}());
20430
 
20431
/**
20432
 * @fileoverview added by tsickle
20433
 * @suppress {checkTypes} checked by tsc
20434
 */
20435
/**
20436
 * Outlet for nested CdkNode. Put `[cdkTreeNodeOutlet]` on a tag to place children dataNodes
20437
 * inside the outlet.
20438
 */
20439
var CdkTreeNodeOutlet = /** @class */ (function () {
20440
    function CdkTreeNodeOutlet(viewContainer) {
20441
        this.viewContainer = viewContainer;
20442
    }
20443
    CdkTreeNodeOutlet.decorators = [
20444
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Directive"], args: [{
20445
                    selector: '[cdkTreeNodeOutlet]'
20446
                },] },
20447
    ];
20448
    /** @nocollapse */
20449
    CdkTreeNodeOutlet.ctorParameters = function () { return [
20450
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewContainerRef"], },
20451
    ]; };
20452
    return CdkTreeNodeOutlet;
20453
}());
20454
 
20455
/**
20456
 * @fileoverview added by tsickle
20457
 * @suppress {checkTypes} checked by tsc
20458
 */
20459
 
20460
/**
20461
 * Returns an error to be thrown when there is no usable data.
20462
 * \@docs-private
20463
 * @return {?}
20464
 */
20465
function getTreeNoValidDataSourceError() {
20466
    return Error("A valid data source must be provided.");
20467
}
20468
/**
20469
 * Returns an error to be thrown when there are multiple nodes that are missing a when function.
20470
 * \@docs-private
20471
 * @return {?}
20472
 */
20473
function getTreeMultipleDefaultNodeDefsError() {
20474
    return Error("There can only be one default row without a when predicate function.");
20475
}
20476
/**
20477
 * Returns an error to be thrown when there are no matching node defs for a particular set of data.
20478
 * \@docs-private
20479
 * @return {?}
20480
 */
20481
function getTreeMissingMatchingNodeDefError() {
20482
    return Error("Could not find a matching node definition for the provided node data.");
20483
}
20484
/**
20485
 * Returns an error to be thrown when there are tree control.
20486
 * \@docs-private
20487
 * @return {?}
20488
 */
20489
function getTreeControlMissingError() {
20490
    return Error("Could not find a tree control for the tree.");
20491
}
20492
/**
20493
 * Returns an error to be thrown when tree control did not implement functions for flat/nested node.
20494
 * \@docs-private
20495
 * @return {?}
20496
 */
20497
function getTreeControlFunctionsMissingError() {
20498
    return Error("Could not find functions for nested/flat tree in tree control.");
20499
}
20500
 
20501
/**
20502
 * @fileoverview added by tsickle
20503
 * @suppress {checkTypes} checked by tsc
20504
 */
20505
/**
20506
 * CDK tree component that connects with a data source to retrieve data of type `T` and renders
20507
 * dataNodes with hierarchy. Updates the dataNodes when new data is provided by the data source.
20508
 * @template T
20509
 */
20510
var CdkTree = /** @class */ (function () {
20511
    function CdkTree(_differs, _changeDetectorRef) {
20512
        this._differs = _differs;
20513
        this._changeDetectorRef = _changeDetectorRef;
20514
        /**
20515
         * Subject that emits when the component has been destroyed.
20516
         */
20517
        this._onDestroy = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
20518
        /**
20519
         * Level of nodes
20520
         */
20521
        this._levels = new Map();
20522
        /**
20523
         * Stream containing the latest information on what rows are being displayed on screen.
20524
         * Can be used by the data source to as a heuristic of what data should be provided.
20525
         */
20526
        this.viewChange = new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"]({ start: 0, end: Number.MAX_VALUE });
20527
    }
20528
    Object.defineProperty(CdkTree.prototype, "dataSource", {
20529
        get: /**
20530
         * Provides a stream containing the latest data array to render. Influenced by the tree's
20531
         * stream of view window (what dataNodes are currently on screen).
20532
         * Data source can be an observable of data array, or a dara array to render.
20533
         * @return {?}
20534
         */
20535
        function () { return this._dataSource; },
20536
        set: /**
20537
         * @param {?} dataSource
20538
         * @return {?}
20539
         */
20540
        function (dataSource) {
20541
            if (this._dataSource !== dataSource) {
20542
                this._switchDataSource(dataSource);
20543
            }
20544
        },
20545
        enumerable: true,
20546
        configurable: true
20547
    });
20548
    /**
20549
     * @return {?}
20550
     */
20551
    CdkTree.prototype.ngOnInit = /**
20552
     * @return {?}
20553
     */
20554
    function () {
20555
        this._dataDiffer = this._differs.find([]).create(this.trackBy);
20556
        if (!this.treeControl) {
20557
            throw getTreeControlMissingError();
20558
        }
20559
    };
20560
    /**
20561
     * @return {?}
20562
     */
20563
    CdkTree.prototype.ngOnDestroy = /**
20564
     * @return {?}
20565
     */
20566
    function () {
20567
        this._nodeOutlet.viewContainer.clear();
20568
        this._onDestroy.next();
20569
        this._onDestroy.complete();
20570
        if (this._dataSource && typeof (/** @type {?} */ (this._dataSource)).disconnect === 'function') {
20571
            (/** @type {?} */ (this.dataSource)).disconnect(this);
20572
        }
20573
        if (this._dataSubscription) {
20574
            this._dataSubscription.unsubscribe();
20575
            this._dataSubscription = null;
20576
        }
20577
    };
20578
    /**
20579
     * @return {?}
20580
     */
20581
    CdkTree.prototype.ngAfterContentChecked = /**
20582
     * @return {?}
20583
     */
20584
    function () {
20585
        var /** @type {?} */ defaultNodeDefs = this._nodeDefs.filter(function (def) { return !def.when; });
20586
        if (defaultNodeDefs.length > 1) {
20587
            throw getTreeMultipleDefaultNodeDefsError();
20588
        }
20589
        this._defaultNodeDef = defaultNodeDefs[0];
20590
        if (this.dataSource && this._nodeDefs && !this._dataSubscription) {
20591
            this._observeRenderChanges();
20592
        }
20593
    };
20594
    /**
20595
     * Switch to the provided data source by resetting the data and unsubscribing from the current
20596
     * render change subscription if one exists. If the data source is null, interpret this by
20597
     * clearing the node outlet. Otherwise start listening for new data.
20598
     * @param {?} dataSource
20599
     * @return {?}
20600
     */
20601
    CdkTree.prototype._switchDataSource = /**
20602
     * Switch to the provided data source by resetting the data and unsubscribing from the current
20603
     * render change subscription if one exists. If the data source is null, interpret this by
20604
     * clearing the node outlet. Otherwise start listening for new data.
20605
     * @param {?} dataSource
20606
     * @return {?}
20607
     */
20608
    function (dataSource) {
20609
        if (this._dataSource && typeof (/** @type {?} */ (this._dataSource)).disconnect === 'function') {
20610
            (/** @type {?} */ (this.dataSource)).disconnect(this);
20611
        }
20612
        if (this._dataSubscription) {
20613
            this._dataSubscription.unsubscribe();
20614
            this._dataSubscription = null;
20615
        }
20616
        // Remove the all dataNodes if there is now no data source
20617
        if (!dataSource) {
20618
            this._nodeOutlet.viewContainer.clear();
20619
        }
20620
        this._dataSource = dataSource;
20621
        if (this._nodeDefs) {
20622
            this._observeRenderChanges();
20623
        }
20624
    };
20625
    /**
20626
     * Set up a subscription for the data provided by the data source.
20627
     * @return {?}
20628
     */
20629
    CdkTree.prototype._observeRenderChanges = /**
20630
     * Set up a subscription for the data provided by the data source.
20631
     * @return {?}
20632
     */
20633
    function () {
20634
        var _this = this;
20635
        var /** @type {?} */ dataStream;
20636
        // Cannot use `instanceof DataSource` since the data source could be a literal with
20637
        // `connect` function and may not extends DataSource.
20638
        if (typeof (/** @type {?} */ (this._dataSource)).connect === 'function') {
20639
            dataStream = (/** @type {?} */ (this._dataSource)).connect(this);
20640
        }
20641
        else if (this._dataSource instanceof rxjs__WEBPACK_IMPORTED_MODULE_2__["Observable"]) {
20642
            dataStream = this._dataSource;
20643
        }
20644
        else if (Array.isArray(this._dataSource)) {
20645
            dataStream = Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(this._dataSource);
20646
        }
20647
        if (dataStream) {
20648
            this._dataSubscription = dataStream.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["takeUntil"])(this._onDestroy))
20649
                .subscribe(function (data) { return _this.renderNodeChanges(data); });
20650
        }
20651
        else {
20652
            throw getTreeNoValidDataSourceError();
20653
        }
20654
    };
20655
    /** Check for changes made in the data and render each change (node added/removed/moved). */
20656
    /**
20657
     * Check for changes made in the data and render each change (node added/removed/moved).
20658
     * @param {?} data
20659
     * @param {?=} dataDiffer
20660
     * @param {?=} viewContainer
20661
     * @param {?=} parentData
20662
     * @return {?}
20663
     */
20664
    CdkTree.prototype.renderNodeChanges = /**
20665
     * Check for changes made in the data and render each change (node added/removed/moved).
20666
     * @param {?} data
20667
     * @param {?=} dataDiffer
20668
     * @param {?=} viewContainer
20669
     * @param {?=} parentData
20670
     * @return {?}
20671
     */
20672
    function (data, dataDiffer, viewContainer, parentData) {
20673
        var _this = this;
20674
        if (dataDiffer === void 0) { dataDiffer = this._dataDiffer; }
20675
        if (viewContainer === void 0) { viewContainer = this._nodeOutlet.viewContainer; }
20676
        var /** @type {?} */ changes = dataDiffer.diff(data);
20677
        if (!changes) {
20678
            return;
20679
        }
20680
        changes.forEachOperation(function (item, adjustedPreviousIndex, currentIndex) {
20681
            if (item.previousIndex == null) {
20682
                _this.insertNode(data[currentIndex], currentIndex, viewContainer, parentData);
20683
            }
20684
            else if (currentIndex == null) {
20685
                viewContainer.remove(adjustedPreviousIndex);
20686
                _this._levels.delete(item.item);
20687
            }
20688
            else {
20689
                var /** @type {?} */ view = viewContainer.get(adjustedPreviousIndex);
20690
                viewContainer.move(/** @type {?} */ ((view)), currentIndex);
20691
            }
20692
        });
20693
        this._changeDetectorRef.detectChanges();
20694
    };
20695
    /**
20696
     * Finds the matching node definition that should be used for this node data. If there is only
20697
     * one node definition, it is returned. Otherwise, find the node definition that has a when
20698
     * predicate that returns true with the data. If none return true, return the default node
20699
     * definition.
20700
     */
20701
    /**
20702
     * Finds the matching node definition that should be used for this node data. If there is only
20703
     * one node definition, it is returned. Otherwise, find the node definition that has a when
20704
     * predicate that returns true with the data. If none return true, return the default node
20705
     * definition.
20706
     * @param {?} data
20707
     * @param {?} i
20708
     * @return {?}
20709
     */
20710
    CdkTree.prototype._getNodeDef = /**
20711
     * Finds the matching node definition that should be used for this node data. If there is only
20712
     * one node definition, it is returned. Otherwise, find the node definition that has a when
20713
     * predicate that returns true with the data. If none return true, return the default node
20714
     * definition.
20715
     * @param {?} data
20716
     * @param {?} i
20717
     * @return {?}
20718
     */
20719
    function (data, i) {
20720
        if (this._nodeDefs.length === 1) {
20721
            return this._nodeDefs.first;
20722
        }
20723
        var /** @type {?} */ nodeDef = this._nodeDefs.find(function (def) { return def.when && def.when(i, data); }) || this._defaultNodeDef;
20724
        if (!nodeDef) {
20725
            throw getTreeMissingMatchingNodeDefError();
20726
        }
20727
        return nodeDef;
20728
    };
20729
    /**
20730
     * Create the embedded view for the data node template and place it in the correct index location
20731
     * within the data node view container.
20732
     */
20733
    /**
20734
     * Create the embedded view for the data node template and place it in the correct index location
20735
     * within the data node view container.
20736
     * @param {?} nodeData
20737
     * @param {?} index
20738
     * @param {?=} viewContainer
20739
     * @param {?=} parentData
20740
     * @return {?}
20741
     */
20742
    CdkTree.prototype.insertNode = /**
20743
     * Create the embedded view for the data node template and place it in the correct index location
20744
     * within the data node view container.
20745
     * @param {?} nodeData
20746
     * @param {?} index
20747
     * @param {?=} viewContainer
20748
     * @param {?=} parentData
20749
     * @return {?}
20750
     */
20751
    function (nodeData, index, viewContainer, parentData) {
20752
        var /** @type {?} */ node = this._getNodeDef(nodeData, index);
20753
        // Node context that will be provided to created embedded view
20754
        var /** @type {?} */ context = new CdkTreeNodeOutletContext(nodeData);
20755
        // If the tree is flat tree, then use the `getLevel` function in flat tree control
20756
        // Otherwise, use the level of parent node.
20757
        if (this.treeControl.getLevel) {
20758
            context.level = this.treeControl.getLevel(nodeData);
20759
        }
20760
        else if (typeof parentData !== 'undefined' && this._levels.has(parentData)) {
20761
            context.level = /** @type {?} */ ((this._levels.get(parentData))) + 1;
20762
        }
20763
        else {
20764
            context.level = 0;
20765
        }
20766
        this._levels.set(nodeData, context.level);
20767
        // Use default tree nodeOutlet, or nested node's nodeOutlet
20768
        var /** @type {?} */ container = viewContainer ? viewContainer : this._nodeOutlet.viewContainer;
20769
        container.createEmbeddedView(node.template, context, index);
20770
        // Set the data to just created `CdkTreeNode`.
20771
        // The `CdkTreeNode` created from `createEmbeddedView` will be saved in static variable
20772
        //     `mostRecentTreeNode`. We get it from static variable and pass the node data to it.
20773
        if (CdkTreeNode.mostRecentTreeNode) {
20774
            CdkTreeNode.mostRecentTreeNode.data = nodeData;
20775
        }
20776
    };
20777
    CdkTree.decorators = [
20778
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"], args: [{selector: 'cdk-tree',
20779
                    exportAs: 'cdkTree',
20780
                    template: "<ng-container cdkTreeNodeOutlet></ng-container>",
20781
                    host: {
20782
                        'class': 'cdk-tree',
20783
                        'role': 'tree',
20784
                    },
20785
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewEncapsulation"].None,
20786
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ChangeDetectionStrategy"].OnPush
20787
                },] },
20788
    ];
20789
    /** @nocollapse */
20790
    CdkTree.ctorParameters = function () { return [
20791
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["IterableDiffers"], },
20792
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ChangeDetectorRef"], },
20793
    ]; };
20794
    CdkTree.propDecorators = {
20795
        "dataSource": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
20796
        "treeControl": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
20797
        "trackBy": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
20798
        "_nodeOutlet": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: [CdkTreeNodeOutlet,] },],
20799
        "_nodeDefs": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ContentChildren"], args: [CdkTreeNodeDef,] },],
20800
    };
20801
    return CdkTree;
20802
}());
20803
/**
20804
 * Tree node for CdkTree. It contains the data in the tree node.
20805
 * @template T
20806
 */
20807
var CdkTreeNode = /** @class */ (function () {
20808
    function CdkTreeNode(_elementRef, _tree) {
20809
        this._elementRef = _elementRef;
20810
        this._tree = _tree;
20811
        /**
20812
         * Subject that emits when the component has been destroyed.
20813
         */
20814
        this._destroyed = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
20815
        /**
20816
         * The role of the node should be 'group' if it's an internal node,
20817
         * and 'treeitem' if it's a leaf node.
20818
         */
20819
        this.role = 'treeitem';
20820
        CdkTreeNode.mostRecentTreeNode = /** @type {?} */ (this);
20821
    }
20822
    Object.defineProperty(CdkTreeNode.prototype, "data", {
20823
        /** The tree node's data. */
20824
        get: /**
20825
         * The tree node's data.
20826
         * @return {?}
20827
         */
20828
        function () { return this._data; },
20829
        set: /**
20830
         * @param {?} value
20831
         * @return {?}
20832
         */
20833
        function (value) {
20834
            this._data = value;
20835
            this._setRoleFromData();
20836
        },
20837
        enumerable: true,
20838
        configurable: true
20839
    });
20840
    Object.defineProperty(CdkTreeNode.prototype, "isExpanded", {
20841
        get: /**
20842
         * @return {?}
20843
         */
20844
        function () {
20845
            return this._tree.treeControl.isExpanded(this._data);
20846
        },
20847
        enumerable: true,
20848
        configurable: true
20849
    });
20850
    Object.defineProperty(CdkTreeNode.prototype, "level", {
20851
        get: /**
20852
         * @return {?}
20853
         */
20854
        function () {
20855
            return this._tree.treeControl.getLevel ? this._tree.treeControl.getLevel(this._data) : 0;
20856
        },
20857
        enumerable: true,
20858
        configurable: true
20859
    });
20860
    /**
20861
     * @return {?}
20862
     */
20863
    CdkTreeNode.prototype.ngOnDestroy = /**
20864
     * @return {?}
20865
     */
20866
    function () {
20867
        // If this is the last tree node being destroyed,
20868
        // clear out the reference to avoid leaking memory.
20869
        if (CdkTreeNode.mostRecentTreeNode === this) {
20870
            CdkTreeNode.mostRecentTreeNode = null;
20871
        }
20872
        this._destroyed.next();
20873
        this._destroyed.complete();
20874
    };
20875
    /** Focuses the menu item. Implements for FocusableOption. */
20876
    /**
20877
     * Focuses the menu item. Implements for FocusableOption.
20878
     * @return {?}
20879
     */
20880
    CdkTreeNode.prototype.focus = /**
20881
     * Focuses the menu item. Implements for FocusableOption.
20882
     * @return {?}
20883
     */
20884
    function () {
20885
        this._elementRef.nativeElement.focus();
20886
    };
20887
    /**
20888
     * @return {?}
20889
     */
20890
    CdkTreeNode.prototype._setRoleFromData = /**
20891
     * @return {?}
20892
     */
20893
    function () {
20894
        var _this = this;
20895
        if (this._tree.treeControl.isExpandable) {
20896
            this.role = this._tree.treeControl.isExpandable(this._data) ? 'group' : 'treeitem';
20897
        }
20898
        else {
20899
            if (!this._tree.treeControl.getChildren) {
20900
                throw getTreeControlFunctionsMissingError();
20901
            }
20902
            var /** @type {?} */ childrenNodes = this._tree.treeControl.getChildren(this._data);
20903
            if (Array.isArray(childrenNodes)) {
20904
                this._setRoleFromChildren(/** @type {?} */ (childrenNodes));
20905
            }
20906
            else if (childrenNodes instanceof rxjs__WEBPACK_IMPORTED_MODULE_2__["Observable"]) {
20907
                childrenNodes.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["takeUntil"])(this._destroyed))
20908
                    .subscribe(function (children) { return _this._setRoleFromChildren(children); });
20909
            }
20910
        }
20911
    };
20912
    /**
20913
     * @param {?} children
20914
     * @return {?}
20915
     */
20916
    CdkTreeNode.prototype._setRoleFromChildren = /**
20917
     * @param {?} children
20918
     * @return {?}
20919
     */
20920
    function (children) {
20921
        this.role = children && children.length ? 'group' : 'treeitem';
20922
    };
20923
    /**
20924
     * The most recently created `CdkTreeNode`. We save it in static variable so we can retrieve it
20925
     * in `CdkTree` and set the data to it.
20926
     */
20927
    CdkTreeNode.mostRecentTreeNode = null;
20928
    CdkTreeNode.decorators = [
20929
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Directive"], args: [{
20930
                    selector: 'cdk-tree-node',
20931
                    exportAs: 'cdkTreeNode',
20932
                    host: {
20933
                        '[attr.aria-expanded]': 'isExpanded',
20934
                        '[attr.aria-level]': 'role === "treeitem" ? level : null',
20935
                        '[attr.role]': 'role',
20936
                        'class': 'cdk-tree-node',
20937
                    },
20938
                },] },
20939
    ];
20940
    /** @nocollapse */
20941
    CdkTreeNode.ctorParameters = function () { return [
20942
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ElementRef"], },
20943
        { type: CdkTree, },
20944
    ]; };
20945
    CdkTreeNode.propDecorators = {
20946
        "role": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
20947
    };
20948
    return CdkTreeNode;
20949
}());
20950
 
20951
/**
20952
 * @fileoverview added by tsickle
20953
 * @suppress {checkTypes} checked by tsc
20954
 */
20955
/**
20956
 * Nested node is a child of `<cdk-tree>`. It works with nested tree.
20957
 * By using `cdk-nested-tree-node` component in tree node template, children of the parent node will
20958
 * be added in the `cdkTreeNodeOutlet` in tree node template.
20959
 * For example:
20960
 *   ```html
20961
 *   <cdk-mested-tree-node>
20962
 *     {{node.name}}
20963
 *     <ng-template cdkTreeNodeOutlet></ng-template>
20964
 *   </cdk-tree-node>
20965
 *   ```
20966
 * The children of node will be automatically added to `cdkTreeNodeOutlet`, the result dom will be
20967
 * like this:
20968
 *   ```html
20969
 *   <cdk-nested-tree-node>
20970
 *     {{node.name}}
20971
 *      <cdk-nested-tree-node>{{child1.name}}</cdk-tree-node>
20972
 *      <cdk-nested-tree-node>{{child2.name}}</cdk-tree-node>
20973
 *   </cdk-tree-node>
20974
 *   ```
20975
 * @template T
20976
 */
20977
var CdkNestedTreeNode = /** @class */ (function (_super) {
20978
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(CdkNestedTreeNode, _super);
20979
    function CdkNestedTreeNode(_elementRef, _tree, _differs) {
20980
        var _this = _super.call(this, _elementRef, _tree) || this;
20981
        _this._elementRef = _elementRef;
20982
        _this._tree = _tree;
20983
        _this._differs = _differs;
20984
        return _this;
20985
    }
20986
    /**
20987
     * @return {?}
20988
     */
20989
    CdkNestedTreeNode.prototype.ngAfterContentInit = /**
20990
     * @return {?}
20991
     */
20992
    function () {
20993
        var _this = this;
20994
        this._dataDiffer = this._differs.find([]).create(this._tree.trackBy);
20995
        if (!this._tree.treeControl.getChildren) {
20996
            throw getTreeControlFunctionsMissingError();
20997
        }
20998
        var /** @type {?} */ childrenNodes = this._tree.treeControl.getChildren(this.data);
20999
        if (Array.isArray(childrenNodes)) {
21000
            this.updateChildrenNodes(/** @type {?} */ (childrenNodes));
21001
        }
21002
        else if (childrenNodes instanceof rxjs__WEBPACK_IMPORTED_MODULE_2__["Observable"]) {
21003
            childrenNodes.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["takeUntil"])(this._destroyed))
21004
                .subscribe(function (result) { return _this.updateChildrenNodes(result); });
21005
        }
21006
        this.nodeOutlet.changes.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["takeUntil"])(this._destroyed))
21007
            .subscribe(function () { return _this.updateChildrenNodes(); });
21008
    };
21009
    /**
21010
     * @return {?}
21011
     */
21012
    CdkNestedTreeNode.prototype.ngOnDestroy = /**
21013
     * @return {?}
21014
     */
21015
    function () {
21016
        this._clear();
21017
        _super.prototype.ngOnDestroy.call(this);
21018
    };
21019
    /** Add children dataNodes to the NodeOutlet */
21020
    /**
21021
     * Add children dataNodes to the NodeOutlet
21022
     * @param {?=} children
21023
     * @return {?}
21024
     */
21025
    CdkNestedTreeNode.prototype.updateChildrenNodes = /**
21026
     * Add children dataNodes to the NodeOutlet
21027
     * @param {?=} children
21028
     * @return {?}
21029
     */
21030
    function (children) {
21031
        if (children) {
21032
            this._children = children;
21033
        }
21034
        if (this.nodeOutlet.length && this._children) {
21035
            var /** @type {?} */ viewContainer = this.nodeOutlet.first.viewContainer;
21036
            this._tree.renderNodeChanges(this._children, this._dataDiffer, viewContainer, this._data);
21037
        }
21038
        else {
21039
            // Reset the data differ if there's no children nodes displayed
21040
            this._dataDiffer.diff([]);
21041
        }
21042
    };
21043
    /** Clear the children dataNodes. */
21044
    /**
21045
     * Clear the children dataNodes.
21046
     * @return {?}
21047
     */
21048
    CdkNestedTreeNode.prototype._clear = /**
21049
     * Clear the children dataNodes.
21050
     * @return {?}
21051
     */
21052
    function () {
21053
        if (this.nodeOutlet && this.nodeOutlet.first) {
21054
            this.nodeOutlet.first.viewContainer.clear();
21055
            this._dataDiffer.diff([]);
21056
        }
21057
    };
21058
    CdkNestedTreeNode.decorators = [
21059
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Directive"], args: [{
21060
                    selector: 'cdk-nested-tree-node',
21061
                    exportAs: 'cdkNestedTreeNode',
21062
                    host: {
21063
                        '[attr.aria-expanded]': 'isExpanded',
21064
                        '[attr.role]': 'role',
21065
                        'class': 'cdk-tree-node cdk-nested-tree-node',
21066
                    },
21067
                    providers: [{ provide: CdkTreeNode, useExisting: CdkNestedTreeNode }]
21068
                },] },
21069
    ];
21070
    /** @nocollapse */
21071
    CdkNestedTreeNode.ctorParameters = function () { return [
21072
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ElementRef"], },
21073
        { type: CdkTree, },
21074
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["IterableDiffers"], },
21075
    ]; };
21076
    CdkNestedTreeNode.propDecorators = {
21077
        "nodeOutlet": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ContentChildren"], args: [CdkTreeNodeOutlet,] },],
21078
    };
21079
    return CdkNestedTreeNode;
21080
}(CdkTreeNode));
21081
 
21082
/**
21083
 * @fileoverview added by tsickle
21084
 * @suppress {checkTypes} checked by tsc
21085
 */
21086
/**
21087
 * Indent for the children tree dataNodes.
21088
 * This directive will add left-padding to the node to show hierarchy.
21089
 * @template T
21090
 */
21091
var CdkTreeNodePadding = /** @class */ (function () {
21092
    function CdkTreeNodePadding(_treeNode, _tree, _renderer, _element, _dir) {
21093
        var _this = this;
21094
        this._treeNode = _treeNode;
21095
        this._tree = _tree;
21096
        this._renderer = _renderer;
21097
        this._element = _element;
21098
        this._dir = _dir;
21099
        /**
21100
         * Subject that emits when the component has been destroyed.
21101
         */
21102
        this._destroyed = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
21103
        this._indent = 40;
21104
        this._setPadding();
21105
        if (this._dir) {
21106
            this._dir.change.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["takeUntil"])(this._destroyed)).subscribe(function () { return _this._setPadding(); });
21107
        }
21108
    }
21109
    Object.defineProperty(CdkTreeNodePadding.prototype, "level", {
21110
        get: /**
21111
         * The level of depth of the tree node. The padding will be `level * indent` pixels.
21112
         * @return {?}
21113
         */
21114
        function () { return this._level; },
21115
        set: /**
21116
         * @param {?} value
21117
         * @return {?}
21118
         */
21119
        function (value) {
21120
            this._level = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_6__["coerceNumberProperty"])(value);
21121
            this._setPadding();
21122
        },
21123
        enumerable: true,
21124
        configurable: true
21125
    });
21126
    Object.defineProperty(CdkTreeNodePadding.prototype, "indent", {
21127
        get: /**
21128
         * The indent for each level. Default number 40px from material design menu sub-menu spec.
21129
         * @return {?}
21130
         */
21131
        function () { return this._indent; },
21132
        set: /**
21133
         * @param {?} value
21134
         * @return {?}
21135
         */
21136
        function (value) {
21137
            this._indent = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_6__["coerceNumberProperty"])(value);
21138
            this._setPadding();
21139
        },
21140
        enumerable: true,
21141
        configurable: true
21142
    });
21143
    /**
21144
     * @return {?}
21145
     */
21146
    CdkTreeNodePadding.prototype.ngOnDestroy = /**
21147
     * @return {?}
21148
     */
21149
    function () {
21150
        this._destroyed.next();
21151
        this._destroyed.complete();
21152
    };
21153
    /** The padding indent value for the tree node. Returns a string with px numbers if not null. */
21154
    /**
21155
     * The padding indent value for the tree node. Returns a string with px numbers if not null.
21156
     * @return {?}
21157
     */
21158
    CdkTreeNodePadding.prototype._paddingIndent = /**
21159
     * The padding indent value for the tree node. Returns a string with px numbers if not null.
21160
     * @return {?}
21161
     */
21162
    function () {
21163
        var /** @type {?} */ nodeLevel = (this._treeNode.data && this._tree.treeControl.getLevel)
21164
            ? this._tree.treeControl.getLevel(this._treeNode.data)
21165
            : null;
21166
        var /** @type {?} */ level = this._level || nodeLevel;
21167
        return level ? level * this._indent + "px" : null;
21168
    };
21169
    /**
21170
     * @return {?}
21171
     */
21172
    CdkTreeNodePadding.prototype._setPadding = /**
21173
     * @return {?}
21174
     */
21175
    function () {
21176
        var /** @type {?} */ padding = this._paddingIndent();
21177
        var /** @type {?} */ paddingProp = this._dir && this._dir.value === 'rtl' ? 'paddingRight' : 'paddingLeft';
21178
        this._renderer.setStyle(this._element.nativeElement, paddingProp, padding);
21179
    };
21180
    CdkTreeNodePadding.decorators = [
21181
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Directive"], args: [{
21182
                    selector: '[cdkTreeNodePadding]',
21183
                },] },
21184
    ];
21185
    /** @nocollapse */
21186
    CdkTreeNodePadding.ctorParameters = function () { return [
21187
        { type: CdkTreeNode, },
21188
        { type: CdkTree, },
21189
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Renderer2"], },
21190
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ElementRef"], },
21191
        { type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_5__["Directionality"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Optional"] },] },
21192
    ]; };
21193
    CdkTreeNodePadding.propDecorators = {
21194
        "level": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"], args: ['cdkTreeNodePadding',] },],
21195
        "indent": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"], args: ['cdkTreeNodePaddingIndent',] },],
21196
    };
21197
    return CdkTreeNodePadding;
21198
}());
21199
 
21200
/**
21201
 * @fileoverview added by tsickle
21202
 * @suppress {checkTypes} checked by tsc
21203
 */
21204
/**
21205
 * Node toggle to expand/collapse the node.
21206
 * @template T
21207
 */
21208
var CdkTreeNodeToggle = /** @class */ (function () {
21209
    function CdkTreeNodeToggle(_tree, _treeNode) {
21210
        this._tree = _tree;
21211
        this._treeNode = _treeNode;
21212
        this._recursive = false;
21213
    }
21214
    Object.defineProperty(CdkTreeNodeToggle.prototype, "recursive", {
21215
        get: /**
21216
         * Whether expand/collapse the node recursively.
21217
         * @return {?}
21218
         */
21219
        function () { return this._recursive; },
21220
        set: /**
21221
         * @param {?} value
21222
         * @return {?}
21223
         */
21224
        function (value) { this._recursive = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_6__["coerceBooleanProperty"])(value); },
21225
        enumerable: true,
21226
        configurable: true
21227
    });
21228
    /**
21229
     * @param {?} event
21230
     * @return {?}
21231
     */
21232
    CdkTreeNodeToggle.prototype._toggle = /**
21233
     * @param {?} event
21234
     * @return {?}
21235
     */
21236
    function (event) {
21237
        this.recursive
21238
            ? this._tree.treeControl.toggleDescendants(this._treeNode.data)
21239
            : this._tree.treeControl.toggle(this._treeNode.data);
21240
        event.stopPropagation();
21241
    };
21242
    CdkTreeNodeToggle.decorators = [
21243
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Directive"], args: [{
21244
                    selector: '[cdkTreeNodeToggle]',
21245
                    host: {
21246
                        '(click)': '_toggle($event)',
21247
                    }
21248
                },] },
21249
    ];
21250
    /** @nocollapse */
21251
    CdkTreeNodeToggle.ctorParameters = function () { return [
21252
        { type: CdkTree, },
21253
        { type: CdkTreeNode, },
21254
    ]; };
21255
    CdkTreeNodeToggle.propDecorators = {
21256
        "recursive": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"], args: ['cdkTreeNodeToggleRecursive',] },],
21257
    };
21258
    return CdkTreeNodeToggle;
21259
}());
21260
 
21261
/**
21262
 * @fileoverview added by tsickle
21263
 * @suppress {checkTypes} checked by tsc
21264
 */
21265
var /** @type {?} */ EXPORTED_DECLARATIONS = [
21266
    CdkNestedTreeNode,
21267
    CdkTreeNodeDef,
21268
    CdkTreeNodePadding,
21269
    CdkTreeNodeToggle,
21270
    CdkTree,
21271
    CdkTreeNode,
21272
    CdkTreeNodeOutlet,
21273
];
21274
var CdkTreeModule = /** @class */ (function () {
21275
    function CdkTreeModule() {
21276
    }
21277
    CdkTreeModule.decorators = [
21278
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["NgModule"], args: [{
21279
                    imports: [_angular_common__WEBPACK_IMPORTED_MODULE_8__["CommonModule"]],
21280
                    exports: EXPORTED_DECLARATIONS,
21281
                    declarations: EXPORTED_DECLARATIONS,
21282
                    providers: [_angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_7__["FocusMonitor"], CdkTreeNodeDef]
21283
                },] },
21284
    ];
21285
    return CdkTreeModule;
21286
}());
21287
 
21288
/**
21289
 * @fileoverview added by tsickle
21290
 * @suppress {checkTypes} checked by tsc
21291
 */
21292
 
21293
/**
21294
 * @fileoverview added by tsickle
21295
 * @suppress {checkTypes} checked by tsc
21296
 */
21297
 
21298
 
21299
//# sourceMappingURL=tree.es5.js.map
21300
 
21301
 
21302
/***/ }),
21303
 
21304
/***/ "./node_modules/@angular/common/fesm5/common.js":
21305
/*!******************************************************!*\
21306
  !*** ./node_modules/@angular/common/fesm5/common.js ***!
21307
  \******************************************************/
21308
/*! exports provided: ɵangular_packages_common_common_e, ɵangular_packages_common_common_d, ɵangular_packages_common_common_a, ɵangular_packages_common_common_b, ɵangular_packages_common_common_g, ɵangular_packages_common_common_f, ɵregisterLocaleData, formatDate, formatCurrency, formatNumber, formatPercent, NgLocaleLocalization, NgLocalization, registerLocaleData, Plural, NumberFormatStyle, FormStyle, TranslationWidth, FormatWidth, NumberSymbol, WeekDay, getNumberOfCurrencyDigits, getCurrencySymbol, getLocaleDayPeriods, getLocaleDayNames, getLocaleMonthNames, getLocaleId, getLocaleEraNames, getLocaleWeekEndRange, getLocaleFirstDayOfWeek, getLocaleDateFormat, getLocaleDateTimeFormat, getLocaleExtraDayPeriodRules, getLocaleExtraDayPeriods, getLocalePluralCase, getLocaleTimeFormat, getLocaleNumberSymbol, getLocaleNumberFormat, getLocaleCurrencyName, getLocaleCurrencySymbol, ɵparseCookieValue, CommonModule, DeprecatedI18NPipesModule, NgClass, NgForOf, NgForOfContext, NgIf, NgIfContext, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, NgComponentOutlet, DOCUMENT, AsyncPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, JsonPipe, LowerCasePipe, CurrencyPipe, DecimalPipe, PercentPipe, SlicePipe, UpperCasePipe, TitleCasePipe, DeprecatedDatePipe, DeprecatedCurrencyPipe, DeprecatedDecimalPipe, DeprecatedPercentPipe, ɵPLATFORM_BROWSER_ID, ɵPLATFORM_SERVER_ID, ɵPLATFORM_WORKER_APP_ID, ɵPLATFORM_WORKER_UI_ID, isPlatformBrowser, isPlatformServer, isPlatformWorkerApp, isPlatformWorkerUi, VERSION, PlatformLocation, LOCATION_INITIALIZED, LocationStrategy, APP_BASE_HREF, HashLocationStrategy, PathLocationStrategy, Location */
21309
/***/ (function(module, __webpack_exports__, __webpack_require__) {
21310
 
21311
"use strict";
21312
__webpack_require__.r(__webpack_exports__);
21313
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_e", function() { return COMMON_DIRECTIVES; });
21314
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_d", function() { return findLocaleData; });
21315
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_a", function() { return DEPRECATED_PLURAL_FN; });
21316
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_b", function() { return getPluralCase; });
21317
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_g", function() { return COMMON_DEPRECATED_I18N_PIPES; });
21318
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_f", function() { return COMMON_PIPES; });
21319
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵregisterLocaleData", function() { return registerLocaleData; });
21320
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatDate", function() { return formatDate; });
21321
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatCurrency", function() { return formatCurrency; });
21322
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatNumber", function() { return formatNumber; });
21323
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatPercent", function() { return formatPercent; });
21324
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgLocaleLocalization", function() { return NgLocaleLocalization; });
21325
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgLocalization", function() { return NgLocalization; });
21326
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerLocaleData", function() { return registerLocaleData; });
21327
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Plural", function() { return Plural; });
21328
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberFormatStyle", function() { return NumberFormatStyle; });
21329
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormStyle", function() { return FormStyle; });
21330
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TranslationWidth", function() { return TranslationWidth; });
21331
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormatWidth", function() { return FormatWidth; });
21332
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberSymbol", function() { return NumberSymbol; });
21333
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WeekDay", function() { return WeekDay; });
21334
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNumberOfCurrencyDigits", function() { return getNumberOfCurrencyDigits; });
21335
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCurrencySymbol", function() { return getCurrencySymbol; });
21336
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleDayPeriods", function() { return getLocaleDayPeriods; });
21337
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleDayNames", function() { return getLocaleDayNames; });
21338
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleMonthNames", function() { return getLocaleMonthNames; });
21339
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleId", function() { return getLocaleId; });
21340
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleEraNames", function() { return getLocaleEraNames; });
21341
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleWeekEndRange", function() { return getLocaleWeekEndRange; });
21342
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleFirstDayOfWeek", function() { return getLocaleFirstDayOfWeek; });
21343
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleDateFormat", function() { return getLocaleDateFormat; });
21344
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleDateTimeFormat", function() { return getLocaleDateTimeFormat; });
21345
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleExtraDayPeriodRules", function() { return getLocaleExtraDayPeriodRules; });
21346
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleExtraDayPeriods", function() { return getLocaleExtraDayPeriods; });
21347
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocalePluralCase", function() { return getLocalePluralCase; });
21348
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleTimeFormat", function() { return getLocaleTimeFormat; });
21349
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleNumberSymbol", function() { return getLocaleNumberSymbol; });
21350
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleNumberFormat", function() { return getLocaleNumberFormat; });
21351
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleCurrencyName", function() { return getLocaleCurrencyName; });
21352
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleCurrencySymbol", function() { return getLocaleCurrencySymbol; });
21353
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵparseCookieValue", function() { return parseCookieValue; });
21354
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CommonModule", function() { return CommonModule; });
21355
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeprecatedI18NPipesModule", function() { return DeprecatedI18NPipesModule; });
21356
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgClass", function() { return NgClass; });
21357
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgForOf", function() { return NgForOf; });
21358
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgForOfContext", function() { return NgForOfContext; });
21359
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgIf", function() { return NgIf; });
21360
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgIfContext", function() { return NgIfContext; });
21361
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgPlural", function() { return NgPlural; });
21362
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgPluralCase", function() { return NgPluralCase; });
21363
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgStyle", function() { return NgStyle; });
21364
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgSwitch", function() { return NgSwitch; });
21365
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgSwitchCase", function() { return NgSwitchCase; });
21366
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgSwitchDefault", function() { return NgSwitchDefault; });
21367
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgTemplateOutlet", function() { return NgTemplateOutlet; });
21368
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgComponentOutlet", function() { return NgComponentOutlet; });
21369
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DOCUMENT", function() { return DOCUMENT; });
21370
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncPipe", function() { return AsyncPipe; });
21371
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DatePipe", function() { return DatePipe; });
21372
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I18nPluralPipe", function() { return I18nPluralPipe; });
21373
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I18nSelectPipe", function() { return I18nSelectPipe; });
21374
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonPipe", function() { return JsonPipe; });
21375
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LowerCasePipe", function() { return LowerCasePipe; });
21376
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CurrencyPipe", function() { return CurrencyPipe; });
21377
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DecimalPipe", function() { return DecimalPipe; });
21378
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PercentPipe", function() { return PercentPipe; });
21379
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SlicePipe", function() { return SlicePipe; });
21380
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UpperCasePipe", function() { return UpperCasePipe; });
21381
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TitleCasePipe", function() { return TitleCasePipe; });
21382
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeprecatedDatePipe", function() { return DeprecatedDatePipe; });
21383
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeprecatedCurrencyPipe", function() { return DeprecatedCurrencyPipe; });
21384
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeprecatedDecimalPipe", function() { return DeprecatedDecimalPipe; });
21385
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeprecatedPercentPipe", function() { return DeprecatedPercentPipe; });
21386
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵPLATFORM_BROWSER_ID", function() { return PLATFORM_BROWSER_ID; });
21387
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵPLATFORM_SERVER_ID", function() { return PLATFORM_SERVER_ID; });
21388
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵPLATFORM_WORKER_APP_ID", function() { return PLATFORM_WORKER_APP_ID; });
21389
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵPLATFORM_WORKER_UI_ID", function() { return PLATFORM_WORKER_UI_ID; });
21390
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPlatformBrowser", function() { return isPlatformBrowser; });
21391
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPlatformServer", function() { return isPlatformServer; });
21392
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPlatformWorkerApp", function() { return isPlatformWorkerApp; });
21393
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPlatformWorkerUi", function() { return isPlatformWorkerUi; });
21394
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; });
21395
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PlatformLocation", function() { return PlatformLocation; });
21396
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LOCATION_INITIALIZED", function() { return LOCATION_INITIALIZED; });
21397
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocationStrategy", function() { return LocationStrategy; });
21398
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APP_BASE_HREF", function() { return APP_BASE_HREF; });
21399
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HashLocationStrategy", function() { return HashLocationStrategy; });
21400
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PathLocationStrategy", function() { return PathLocationStrategy; });
21401
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Location", function() { return Location; });
21402
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
21403
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
21404
/**
21405
 * @license Angular v6.0.3
21406
 * (c) 2010-2018 Google, Inc. https://angular.io/
21407
 * License: MIT
21408
 */
21409
 
21410
 
21411
 
21412
 
21413
/**
21414
 * @license
21415
 * Copyright Google Inc. All Rights Reserved.
21416
 *
21417
 * Use of this source code is governed by an MIT-style license that can be
21418
 * found in the LICENSE file at https://angular.io/license
21419
 */
21420
/**
21421
 * This class should not be used directly by an application developer. Instead, use
21422
 * {@link Location}.
21423
 *
21424
 * `PlatformLocation` encapsulates all calls to DOM apis, which allows the Router to be platform
21425
 * agnostic.
21426
 * This means that we can have different implementation of `PlatformLocation` for the different
21427
 * platforms that angular supports. For example, `@angular/platform-browser` provides an
21428
 * implementation specific to the browser environment, while `@angular/platform-webworker` provides
21429
 * one suitable for use with web workers.
21430
 *
21431
 * The `PlatformLocation` class is used directly by all implementations of {@link LocationStrategy}
21432
 * when they need to interact with the DOM apis like pushState, popState, etc...
21433
 *
21434
 * {@link LocationStrategy} in turn is used by the {@link Location} service which is used directly
21435
 * by the {@link Router} in order to navigate between routes. Since all interactions between {@link
21436
 * Router} /
21437
 * {@link Location} / {@link LocationStrategy} and DOM apis flow through the `PlatformLocation`
21438
 * class they are all platform independent.
21439
 *
21440
 *
21441
 */
21442
var PlatformLocation = /** @class */ (function () {
21443
    function PlatformLocation() {
21444
    }
21445
    return PlatformLocation;
21446
}());
21447
/**
21448
 * @description Indicates when a location is initialized.
21449
 * @experimental
21450
 */
21451
var LOCATION_INITIALIZED = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('Location Initialized');
21452
 
21453
/**
21454
 * @license
21455
 * Copyright Google Inc. All Rights Reserved.
21456
 *
21457
 * Use of this source code is governed by an MIT-style license that can be
21458
 * found in the LICENSE file at https://angular.io/license
21459
 */
21460
/**
21461
 * `LocationStrategy` is responsible for representing and reading route state
21462
 * from the browser's URL. Angular provides two strategies:
21463
 * {@link HashLocationStrategy} and {@link PathLocationStrategy}.
21464
 *
21465
 * This is used under the hood of the {@link Location} service.
21466
 *
21467
 * Applications should use the {@link Router} or {@link Location} services to
21468
 * interact with application route state.
21469
 *
21470
 * For instance, {@link HashLocationStrategy} produces URLs like
21471
 * `http://example.com#/foo`, and {@link PathLocationStrategy} produces
21472
 * `http://example.com/foo` as an equivalent URL.
21473
 *
21474
 * See these two classes for more.
21475
 *
21476
 *
21477
 */
21478
var LocationStrategy = /** @class */ (function () {
21479
    function LocationStrategy() {
21480
    }
21481
    return LocationStrategy;
21482
}());
21483
/**
21484
 * The `APP_BASE_HREF` token represents the base href to be used with the
21485
 * {@link PathLocationStrategy}.
21486
 *
21487
 * If you're using {@link PathLocationStrategy}, you must provide a provider to a string
21488
 * representing the URL prefix that should be preserved when generating and recognizing
21489
 * URLs.
21490
 *
21491
 * ### Example
21492
 *
21493
 * ```typescript
21494
 * import {Component, NgModule} from '@angular/core';
21495
 * import {APP_BASE_HREF} from '@angular/common';
21496
 *
21497
 * @NgModule({
21498
 *   providers: [{provide: APP_BASE_HREF, useValue: '/my/app'}]
21499
 * })
21500
 * class AppModule {}
21501
 * ```
21502
 *
21503
 *
21504
 */
21505
var APP_BASE_HREF = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('appBaseHref');
21506
 
21507
/**
21508
 * @license
21509
 * Copyright Google Inc. All Rights Reserved.
21510
 *
21511
 * Use of this source code is governed by an MIT-style license that can be
21512
 * found in the LICENSE file at https://angular.io/license
21513
 */
21514
/**
21515
 * @description
21516
 *
21517
 * A service that applications can use to interact with a browser's URL.
21518
 *
21519
 * Depending on which {@link LocationStrategy} is used, `Location` will either persist
21520
 * to the URL's path or the URL's hash segment.
21521
 *
21522
 * Note: it's better to use {@link Router#navigate} service to trigger route changes. Use
21523
 * `Location` only if you need to interact with or create normalized URLs outside of
21524
 * routing.
21525
 *
21526
 * `Location` is responsible for normalizing the URL against the application's base href.
21527
 * A normalized URL is absolute from the URL host, includes the application's base href, and has no
21528
 * trailing slash:
21529
 * - `/my/app/user/123` is normalized
21530
 * - `my/app/user/123` **is not** normalized
21531
 * - `/my/app/user/123/` **is not** normalized
21532
 *
21533
 * ### Example
21534
 * {@example common/location/ts/path_location_component.ts region='LocationComponent'}
21535
 *
21536
 */
21537
var Location = /** @class */ (function () {
21538
    function Location(platformStrategy) {
21539
        var _this = this;
21540
        /** @internal */
21541
        this._subject = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
21542
        this._platformStrategy = platformStrategy;
21543
        var browserBaseHref = this._platformStrategy.getBaseHref();
21544
        this._baseHref = Location.stripTrailingSlash(_stripIndexHtml(browserBaseHref));
21545
        this._platformStrategy.onPopState(function (ev) {
21546
            _this._subject.emit({
21547
                'url': _this.path(true),
21548
                'pop': true,
21549
                'state': ev.state,
21550
                'type': ev.type,
21551
            });
21552
        });
21553
    }
21554
    /**
21555
     * Returns the normalized URL path.
21556
     */
21557
    // TODO: vsavkin. Remove the boolean flag and always include hash once the deprecated router is
21558
    // removed.
21559
    /**
21560
       * Returns the normalized URL path.
21561
       */
21562
    // TODO: vsavkin. Remove the boolean flag and always include hash once the deprecated router is
21563
    // removed.
21564
    Location.prototype.path = /**
21565
       * Returns the normalized URL path.
21566
       */
21567
    // TODO: vsavkin. Remove the boolean flag and always include hash once the deprecated router is
21568
    // removed.
21569
    function (includeHash) {
21570
        if (includeHash === void 0) { includeHash = false; }
21571
        return this.normalize(this._platformStrategy.path(includeHash));
21572
    };
21573
    /**
21574
     * Normalizes the given path and compares to the current normalized path.
21575
     */
21576
    /**
21577
       * Normalizes the given path and compares to the current normalized path.
21578
       */
21579
    Location.prototype.isCurrentPathEqualTo = /**
21580
       * Normalizes the given path and compares to the current normalized path.
21581
       */
21582
    function (path, query) {
21583
        if (query === void 0) { query = ''; }
21584
        return this.path() == this.normalize(path + Location.normalizeQueryParams(query));
21585
    };
21586
    /**
21587
     * Given a string representing a URL, returns the normalized URL path without leading or
21588
     * trailing slashes.
21589
     */
21590
    /**
21591
       * Given a string representing a URL, returns the normalized URL path without leading or
21592
       * trailing slashes.
21593
       */
21594
    Location.prototype.normalize = /**
21595
       * Given a string representing a URL, returns the normalized URL path without leading or
21596
       * trailing slashes.
21597
       */
21598
    function (url) {
21599
        return Location.stripTrailingSlash(_stripBaseHref(this._baseHref, _stripIndexHtml(url)));
21600
    };
21601
    /**
21602
     * Given a string representing a URL, returns the platform-specific external URL path.
21603
     * If the given URL doesn't begin with a leading slash (`'/'`), this method adds one
21604
     * before normalizing. This method will also add a hash if `HashLocationStrategy` is
21605
     * used, or the `APP_BASE_HREF` if the `PathLocationStrategy` is in use.
21606
     */
21607
    /**
21608
       * Given a string representing a URL, returns the platform-specific external URL path.
21609
       * If the given URL doesn't begin with a leading slash (`'/'`), this method adds one
21610
       * before normalizing. This method will also add a hash if `HashLocationStrategy` is
21611
       * used, or the `APP_BASE_HREF` if the `PathLocationStrategy` is in use.
21612
       */
21613
    Location.prototype.prepareExternalUrl = /**
21614
       * Given a string representing a URL, returns the platform-specific external URL path.
21615
       * If the given URL doesn't begin with a leading slash (`'/'`), this method adds one
21616
       * before normalizing. This method will also add a hash if `HashLocationStrategy` is
21617
       * used, or the `APP_BASE_HREF` if the `PathLocationStrategy` is in use.
21618
       */
21619
    function (url) {
21620
        if (url && url[0] !== '/') {
21621
            url = '/' + url;
21622
        }
21623
        return this._platformStrategy.prepareExternalUrl(url);
21624
    };
21625
    // TODO: rename this method to pushState
21626
    /**
21627
     * Changes the browsers URL to the normalized version of the given URL, and pushes a
21628
     * new item onto the platform's history.
21629
     */
21630
    // TODO: rename this method to pushState
21631
    /**
21632
       * Changes the browsers URL to the normalized version of the given URL, and pushes a
21633
       * new item onto the platform's history.
21634
       */
21635
    Location.prototype.go =
21636
    // TODO: rename this method to pushState
21637
    /**
21638
       * Changes the browsers URL to the normalized version of the given URL, and pushes a
21639
       * new item onto the platform's history.
21640
       */
21641
    function (path, query, state) {
21642
        if (query === void 0) { query = ''; }
21643
        if (state === void 0) { state = null; }
21644
        this._platformStrategy.pushState(state, '', path, query);
21645
    };
21646
    /**
21647
     * Changes the browsers URL to the normalized version of the given URL, and replaces
21648
     * the top item on the platform's history stack.
21649
     */
21650
    /**
21651
       * Changes the browsers URL to the normalized version of the given URL, and replaces
21652
       * the top item on the platform's history stack.
21653
       */
21654
    Location.prototype.replaceState = /**
21655
       * Changes the browsers URL to the normalized version of the given URL, and replaces
21656
       * the top item on the platform's history stack.
21657
       */
21658
    function (path, query, state) {
21659
        if (query === void 0) { query = ''; }
21660
        if (state === void 0) { state = null; }
21661
        this._platformStrategy.replaceState(state, '', path, query);
21662
    };
21663
    /**
21664
     * Navigates forward in the platform's history.
21665
     */
21666
    /**
21667
       * Navigates forward in the platform's history.
21668
       */
21669
    Location.prototype.forward = /**
21670
       * Navigates forward in the platform's history.
21671
       */
21672
    function () { this._platformStrategy.forward(); };
21673
    /**
21674
     * Navigates back in the platform's history.
21675
     */
21676
    /**
21677
       * Navigates back in the platform's history.
21678
       */
21679
    Location.prototype.back = /**
21680
       * Navigates back in the platform's history.
21681
       */
21682
    function () { this._platformStrategy.back(); };
21683
    /**
21684
     * Subscribe to the platform's `popState` events.
21685
     */
21686
    /**
21687
       * Subscribe to the platform's `popState` events.
21688
       */
21689
    Location.prototype.subscribe = /**
21690
       * Subscribe to the platform's `popState` events.
21691
       */
21692
    function (onNext, onThrow, onReturn) {
21693
        return this._subject.subscribe({ next: onNext, error: onThrow, complete: onReturn });
21694
    };
21695
    /**
21696
     * Given a string of url parameters, prepend with '?' if needed, otherwise return parameters as
21697
     * is.
21698
     */
21699
    /**
21700
       * Given a string of url parameters, prepend with '?' if needed, otherwise return parameters as
21701
       * is.
21702
       */
21703
    Location.normalizeQueryParams = /**
21704
       * Given a string of url parameters, prepend with '?' if needed, otherwise return parameters as
21705
       * is.
21706
       */
21707
    function (params) {
21708
        return params && params[0] !== '?' ? '?' + params : params;
21709
    };
21710
    /**
21711
     * Given 2 parts of a url, join them with a slash if needed.
21712
     */
21713
    /**
21714
       * Given 2 parts of a url, join them with a slash if needed.
21715
       */
21716
    Location.joinWithSlash = /**
21717
       * Given 2 parts of a url, join them with a slash if needed.
21718
       */
21719
    function (start, end) {
21720
        if (start.length == 0) {
21721
            return end;
21722
        }
21723
        if (end.length == 0) {
21724
            return start;
21725
        }
21726
        var slashes = 0;
21727
        if (start.endsWith('/')) {
21728
            slashes++;
21729
        }
21730
        if (end.startsWith('/')) {
21731
            slashes++;
21732
        }
21733
        if (slashes == 2) {
21734
            return start + end.substring(1);
21735
        }
21736
        if (slashes == 1) {
21737
            return start + end;
21738
        }
21739
        return start + '/' + end;
21740
    };
21741
    /**
21742
     * If url has a trailing slash, remove it, otherwise return url as is. This
21743
     * method looks for the first occurrence of either #, ?, or the end of the
21744
     * line as `/` characters after any of these should not be replaced.
21745
     */
21746
    /**
21747
       * If url has a trailing slash, remove it, otherwise return url as is. This
21748
       * method looks for the first occurrence of either #, ?, or the end of the
21749
       * line as `/` characters after any of these should not be replaced.
21750
       */
21751
    Location.stripTrailingSlash = /**
21752
       * If url has a trailing slash, remove it, otherwise return url as is. This
21753
       * method looks for the first occurrence of either #, ?, or the end of the
21754
       * line as `/` characters after any of these should not be replaced.
21755
       */
21756
    function (url) {
21757
        var match = url.match(/#|\?|$/);
21758
        var pathEndIdx = match && match.index || url.length;
21759
        var droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);
21760
        return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);
21761
    };
21762
    Location.decorators = [
21763
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }
21764
    ];
21765
    /** @nocollapse */
21766
    Location.ctorParameters = function () { return [
21767
        { type: LocationStrategy, },
21768
    ]; };
21769
    return Location;
21770
}());
21771
function _stripBaseHref(baseHref, url) {
21772
    return baseHref && url.startsWith(baseHref) ? url.substring(baseHref.length) : url;
21773
}
21774
function _stripIndexHtml(url) {
21775
    return url.replace(/\/index.html$/, '');
21776
}
21777
 
21778
/**
21779
 * @license
21780
 * Copyright Google Inc. All Rights Reserved.
21781
 *
21782
 * Use of this source code is governed by an MIT-style license that can be
21783
 * found in the LICENSE file at https://angular.io/license
21784
 */
21785
/**
21786
 * @description
21787
 * A {@link LocationStrategy} used to configure the {@link Location} service to
21788
 * represent its state in the
21789
 * [hash fragment](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax)
21790
 * of the browser's URL.
21791
 *
21792
 * For instance, if you call `location.go('/foo')`, the browser's URL will become
21793
 * `example.com#/foo`.
21794
 *
21795
 * ### Example
21796
 *
21797
 * {@example common/location/ts/hash_location_component.ts region='LocationComponent'}
21798
 *
21799
 *
21800
 */
21801
var HashLocationStrategy = /** @class */ (function (_super) {
21802
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(HashLocationStrategy, _super);
21803
    function HashLocationStrategy(_platformLocation, _baseHref) {
21804
        var _this = _super.call(this) || this;
21805
        _this._platformLocation = _platformLocation;
21806
        _this._baseHref = '';
21807
        if (_baseHref != null) {
21808
            _this._baseHref = _baseHref;
21809
        }
21810
        return _this;
21811
    }
21812
    HashLocationStrategy.prototype.onPopState = function (fn) {
21813
        this._platformLocation.onPopState(fn);
21814
        this._platformLocation.onHashChange(fn);
21815
    };
21816
    HashLocationStrategy.prototype.getBaseHref = function () { return this._baseHref; };
21817
    HashLocationStrategy.prototype.path = function (includeHash) {
21818
        if (includeHash === void 0) { includeHash = false; }
21819
        // the hash value is always prefixed with a `#`
21820
        // and if it is empty then it will stay empty
21821
        var path = this._platformLocation.hash;
21822
        if (path == null)
21823
            path = '#';
21824
        return path.length > 0 ? path.substring(1) : path;
21825
    };
21826
    HashLocationStrategy.prototype.prepareExternalUrl = function (internal) {
21827
        var url = Location.joinWithSlash(this._baseHref, internal);
21828
        return url.length > 0 ? ('#' + url) : url;
21829
    };
21830
    HashLocationStrategy.prototype.pushState = function (state, title, path, queryParams) {
21831
        var url = this.prepareExternalUrl(path + Location.normalizeQueryParams(queryParams));
21832
        if (url.length == 0) {
21833
            url = this._platformLocation.pathname;
21834
        }
21835
        this._platformLocation.pushState(state, title, url);
21836
    };
21837
    HashLocationStrategy.prototype.replaceState = function (state, title, path, queryParams) {
21838
        var url = this.prepareExternalUrl(path + Location.normalizeQueryParams(queryParams));
21839
        if (url.length == 0) {
21840
            url = this._platformLocation.pathname;
21841
        }
21842
        this._platformLocation.replaceState(state, title, url);
21843
    };
21844
    HashLocationStrategy.prototype.forward = function () { this._platformLocation.forward(); };
21845
    HashLocationStrategy.prototype.back = function () { this._platformLocation.back(); };
21846
    HashLocationStrategy.decorators = [
21847
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }
21848
    ];
21849
    /** @nocollapse */
21850
    HashLocationStrategy.ctorParameters = function () { return [
21851
        { type: PlatformLocation, },
21852
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [APP_BASE_HREF,] },] },
21853
    ]; };
21854
    return HashLocationStrategy;
21855
}(LocationStrategy));
21856
 
21857
/**
21858
 * @license
21859
 * Copyright Google Inc. All Rights Reserved.
21860
 *
21861
 * Use of this source code is governed by an MIT-style license that can be
21862
 * found in the LICENSE file at https://angular.io/license
21863
 */
21864
/**
21865
 * @description
21866
 * A {@link LocationStrategy} used to configure the {@link Location} service to
21867
 * represent its state in the
21868
 * [path](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax) of the
21869
 * browser's URL.
21870
 *
21871
 * If you're using `PathLocationStrategy`, you must provide a {@link APP_BASE_HREF}
21872
 * or add a base element to the document. This URL prefix that will be preserved
21873
 * when generating and recognizing URLs.
21874
 *
21875
 * For instance, if you provide an `APP_BASE_HREF` of `'/my/app'` and call
21876
 * `location.go('/foo')`, the browser's URL will become
21877
 * `example.com/my/app/foo`.
21878
 *
21879
 * Similarly, if you add `<base href='/my/app'/>` to the document and call
21880
 * `location.go('/foo')`, the browser's URL will become
21881
 * `example.com/my/app/foo`.
21882
 *
21883
 * ### Example
21884
 *
21885
 * {@example common/location/ts/path_location_component.ts region='LocationComponent'}
21886
 *
21887
 *
21888
 */
21889
var PathLocationStrategy = /** @class */ (function (_super) {
21890
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(PathLocationStrategy, _super);
21891
    function PathLocationStrategy(_platformLocation, href) {
21892
        var _this = _super.call(this) || this;
21893
        _this._platformLocation = _platformLocation;
21894
        if (href == null) {
21895
            href = _this._platformLocation.getBaseHrefFromDOM();
21896
        }
21897
        if (href == null) {
21898
            throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");
21899
        }
21900
        _this._baseHref = href;
21901
        return _this;
21902
    }
21903
    PathLocationStrategy.prototype.onPopState = function (fn) {
21904
        this._platformLocation.onPopState(fn);
21905
        this._platformLocation.onHashChange(fn);
21906
    };
21907
    PathLocationStrategy.prototype.getBaseHref = function () { return this._baseHref; };
21908
    PathLocationStrategy.prototype.prepareExternalUrl = function (internal) {
21909
        return Location.joinWithSlash(this._baseHref, internal);
21910
    };
21911
    PathLocationStrategy.prototype.path = function (includeHash) {
21912
        if (includeHash === void 0) { includeHash = false; }
21913
        var pathname = this._platformLocation.pathname +
21914
            Location.normalizeQueryParams(this._platformLocation.search);
21915
        var hash = this._platformLocation.hash;
21916
        return hash && includeHash ? "" + pathname + hash : pathname;
21917
    };
21918
    PathLocationStrategy.prototype.pushState = function (state, title, url, queryParams) {
21919
        var externalUrl = this.prepareExternalUrl(url + Location.normalizeQueryParams(queryParams));
21920
        this._platformLocation.pushState(state, title, externalUrl);
21921
    };
21922
    PathLocationStrategy.prototype.replaceState = function (state, title, url, queryParams) {
21923
        var externalUrl = this.prepareExternalUrl(url + Location.normalizeQueryParams(queryParams));
21924
        this._platformLocation.replaceState(state, title, externalUrl);
21925
    };
21926
    PathLocationStrategy.prototype.forward = function () { this._platformLocation.forward(); };
21927
    PathLocationStrategy.prototype.back = function () { this._platformLocation.back(); };
21928
    PathLocationStrategy.decorators = [
21929
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }
21930
    ];
21931
    /** @nocollapse */
21932
    PathLocationStrategy.ctorParameters = function () { return [
21933
        { type: PlatformLocation, },
21934
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [APP_BASE_HREF,] },] },
21935
    ]; };
21936
    return PathLocationStrategy;
21937
}(LocationStrategy));
21938
 
21939
/**
21940
 * @license
21941
 * Copyright Google Inc. All Rights Reserved.
21942
 *
21943
 * Use of this source code is governed by an MIT-style license that can be
21944
 * found in the LICENSE file at https://angular.io/license
21945
 */
21946
 
21947
/**
21948
 * @license
21949
 * Copyright Google Inc. All Rights Reserved.
21950
 *
21951
 * Use of this source code is governed by an MIT-style license that can be
21952
 * found in the LICENSE file at https://angular.io/license
21953
 */
21954
// THIS CODE IS GENERATED - DO NOT MODIFY
21955
// See angular/tools/gulp-tasks/cldr/extract.js
21956
var u = undefined;
21957
function plural(n) {
21958
    var i = Math.floor(Math.abs(n)), v = n.toString().replace(/^[^.]*\.?/, '').length;
21959
    if (i === 1 && v === 0)
21960
        return 1;
21961
    return 5;
21962
}
21963
var localeEn = [
21964
    'en', [['a', 'p'], ['AM', 'PM'], u], [['AM', 'PM'], u, u],
21965
    [
21966
        ['S', 'M', 'T', 'W', 'T', 'F', 'S'], ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
21967
        ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
21968
        ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']
21969
    ],
21970
    u,
21971
    [
21972
        ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
21973
        ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
21974
        [
21975
            'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September',
21976
            'October', 'November', 'December'
21977
        ]
21978
    ],
21979
    u, [['B', 'A'], ['BC', 'AD'], ['Before Christ', 'Anno Domini']], 0, [6, 0],
21980
    ['M/d/yy', 'MMM d, y', 'MMMM d, y', 'EEEE, MMMM d, y'],
21981
    ['h:mm a', 'h:mm:ss a', 'h:mm:ss a z', 'h:mm:ss a zzzz'], ['{1}, {0}', u, '{1} \'at\' {0}', u],
21982
    ['.', ',', ';', '%', '+', '-', 'E', '×', '‰', '∞', 'NaN', ':'],
21983
    ['#,##0.###', '#,##0%', '¤#,##0.00', '#E0'], '$', 'US Dollar', {}, plural
21984
];
21985
 
21986
/**
21987
 * @license
21988
 * Copyright Google Inc. All Rights Reserved.
21989
 *
21990
 * Use of this source code is governed by an MIT-style license that can be
21991
 * found in the LICENSE file at https://angular.io/license
21992
 */
21993
/**
21994
 * @experimental i18n support is experimental.
21995
 */
21996
var LOCALE_DATA = {};
21997
/**
21998
 * Register global data to be used internally by Angular. See the
21999
 * {@linkDocs guide/i18n#i18n-pipes "I18n guide"} to know how to import additional locale data.
22000
 *
22001
 * @experimental i18n support is experimental.
22002
 */
22003
// The signature registerLocaleData(data: any, extraData?: any) is deprecated since v5.1
22004
function registerLocaleData(data, localeId, extraData) {
22005
    if (typeof localeId !== 'string') {
22006
        extraData = localeId;
22007
        localeId = data[0 /* LocaleId */];
22008
    }
22009
    localeId = localeId.toLowerCase().replace(/_/g, '-');
22010
    LOCALE_DATA[localeId] = data;
22011
    if (extraData) {
22012
        LOCALE_DATA[localeId][19 /* ExtraData */] = extraData;
22013
    }
22014
}
22015
 
22016
/**
22017
 * @license
22018
 * Copyright Google Inc. All Rights Reserved.
22019
 *
22020
 * Use of this source code is governed by an MIT-style license that can be
22021
 * found in the LICENSE file at https://angular.io/license
22022
 */
22023
/** @internal */
22024
var CURRENCIES_EN = {
22025
    'ADP': [undefined, undefined, 0],
22026
    'AFN': [undefined, undefined, 0],
22027
    'ALL': [undefined, undefined, 0],
22028
    'AMD': [undefined, undefined, 0],
22029
    'AOA': [undefined, 'Kz'],
22030
    'ARS': [undefined, '$'],
22031
    'AUD': ['A$', '$'],
22032
    'BAM': [undefined, 'KM'],
22033
    'BBD': [undefined, '$'],
22034
    'BDT': [undefined, '৳'],
22035
    'BHD': [undefined, undefined, 3],
22036
    'BIF': [undefined, undefined, 0],
22037
    'BMD': [undefined, '$'],
22038
    'BND': [undefined, '$'],
22039
    'BOB': [undefined, 'Bs'],
22040
    'BRL': ['R$'],
22041
    'BSD': [undefined, '$'],
22042
    'BWP': [undefined, 'P'],
22043
    'BYN': [undefined, 'р.', 2],
22044
    'BYR': [undefined, undefined, 0],
22045
    'BZD': [undefined, '$'],
22046
    'CAD': ['CA$', '$', 2],
22047
    'CHF': [undefined, undefined, 2],
22048
    'CLF': [undefined, undefined, 4],
22049
    'CLP': [undefined, '$', 0],
22050
    'CNY': ['CN¥', '¥'],
22051
    'COP': [undefined, '$', 0],
22052
    'CRC': [undefined, '₡', 2],
22053
    'CUC': [undefined, '$'],
22054
    'CUP': [undefined, '$'],
22055
    'CZK': [undefined, 'Kč', 2],
22056
    'DJF': [undefined, undefined, 0],
22057
    'DKK': [undefined, 'kr', 2],
22058
    'DOP': [undefined, '$'],
22059
    'EGP': [undefined, 'E£'],
22060
    'ESP': [undefined, '₧', 0],
22061
    'EUR': ['€'],
22062
    'FJD': [undefined, '$'],
22063
    'FKP': [undefined, '£'],
22064
    'GBP': ['£'],
22065
    'GEL': [undefined, '₾'],
22066
    'GIP': [undefined, '£'],
22067
    'GNF': [undefined, 'FG', 0],
22068
    'GTQ': [undefined, 'Q'],
22069
    'GYD': [undefined, '$', 0],
22070
    'HKD': ['HK$', '$'],
22071
    'HNL': [undefined, 'L'],
22072
    'HRK': [undefined, 'kn'],
22073
    'HUF': [undefined, 'Ft', 2],
22074
    'IDR': [undefined, 'Rp', 0],
22075
    'ILS': ['₪'],
22076
    'INR': ['₹'],
22077
    'IQD': [undefined, undefined, 0],
22078
    'IRR': [undefined, undefined, 0],
22079
    'ISK': [undefined, 'kr', 0],
22080
    'ITL': [undefined, undefined, 0],
22081
    'JMD': [undefined, '$'],
22082
    'JOD': [undefined, undefined, 3],
22083
    'JPY': ['¥', undefined, 0],
22084
    'KHR': [undefined, '៛'],
22085
    'KMF': [undefined, 'CF', 0],
22086
    'KPW': [undefined, '₩', 0],
22087
    'KRW': ['₩', undefined, 0],
22088
    'KWD': [undefined, undefined, 3],
22089
    'KYD': [undefined, '$'],
22090
    'KZT': [undefined, '₸'],
22091
    'LAK': [undefined, '₭', 0],
22092
    'LBP': [undefined, 'L£', 0],
22093
    'LKR': [undefined, 'Rs'],
22094
    'LRD': [undefined, '$'],
22095
    'LTL': [undefined, 'Lt'],
22096
    'LUF': [undefined, undefined, 0],
22097
    'LVL': [undefined, 'Ls'],
22098
    'LYD': [undefined, undefined, 3],
22099
    'MGA': [undefined, 'Ar', 0],
22100
    'MGF': [undefined, undefined, 0],
22101
    'MMK': [undefined, 'K', 0],
22102
    'MNT': [undefined, '₮', 0],
22103
    'MRO': [undefined, undefined, 0],
22104
    'MUR': [undefined, 'Rs', 0],
22105
    'MXN': ['MX$', '$'],
22106
    'MYR': [undefined, 'RM'],
22107
    'NAD': [undefined, '$'],
22108
    'NGN': [undefined, '₦'],
22109
    'NIO': [undefined, 'C$'],
22110
    'NOK': [undefined, 'kr', 2],
22111
    'NPR': [undefined, 'Rs'],
22112
    'NZD': ['NZ$', '$'],
22113
    'OMR': [undefined, undefined, 3],
22114
    'PHP': [undefined, '₱'],
22115
    'PKR': [undefined, 'Rs', 0],
22116
    'PLN': [undefined, 'zł'],
22117
    'PYG': [undefined, '₲', 0],
22118
    'RON': [undefined, 'lei'],
22119
    'RSD': [undefined, undefined, 0],
22120
    'RUB': [undefined, '₽'],
22121
    'RUR': [undefined, 'р.'],
22122
    'RWF': [undefined, 'RF', 0],
22123
    'SBD': [undefined, '$'],
22124
    'SEK': [undefined, 'kr', 2],
22125
    'SGD': [undefined, '$'],
22126
    'SHP': [undefined, '£'],
22127
    'SLL': [undefined, undefined, 0],
22128
    'SOS': [undefined, undefined, 0],
22129
    'SRD': [undefined, '$'],
22130
    'SSP': [undefined, '£'],
22131
    'STD': [undefined, undefined, 0],
22132
    'STN': [undefined, 'Db'],
22133
    'SYP': [undefined, '£', 0],
22134
    'THB': [undefined, '฿'],
22135
    'TMM': [undefined, undefined, 0],
22136
    'TND': [undefined, undefined, 3],
22137
    'TOP': [undefined, 'T$'],
22138
    'TRL': [undefined, undefined, 0],
22139
    'TRY': [undefined, '₺'],
22140
    'TTD': [undefined, '$'],
22141
    'TWD': ['NT$', '$', 2],
22142
    'TZS': [undefined, undefined, 0],
22143
    'UAH': [undefined, '₴'],
22144
    'UGX': [undefined, undefined, 0],
22145
    'USD': ['$'],
22146
    'UYI': [undefined, undefined, 0],
22147
    'UYU': [undefined, '$'],
22148
    'UZS': [undefined, undefined, 0],
22149
    'VEF': [undefined, 'Bs'],
22150
    'VND': ['₫', undefined, 0],
22151
    'VUV': [undefined, undefined, 0],
22152
    'XAF': ['FCFA', undefined, 0],
22153
    'XCD': ['EC$', '$'],
22154
    'XOF': ['CFA', undefined, 0],
22155
    'XPF': ['CFPF', undefined, 0],
22156
    'YER': [undefined, undefined, 0],
22157
    'ZAR': [undefined, 'R'],
22158
    'ZMK': [undefined, undefined, 0],
22159
    'ZMW': [undefined, 'ZK'],
22160
    'ZWD': [undefined, undefined, 0]
22161
};
22162
 
22163
/**
22164
 * @license
22165
 * Copyright Google Inc. All Rights Reserved.
22166
 *
22167
 * Use of this source code is governed by an MIT-style license that can be
22168
 * found in the LICENSE file at https://angular.io/license
22169
 */
22170
/**
22171
 * The different format styles that can be used to represent numbers.
22172
 * Used by the function {@link getLocaleNumberFormat}.
22173
 *
22174
 * @experimental i18n support is experimental.
22175
 */
22176
/**
22177
 * The different format styles that can be used to represent numbers.
22178
 * Used by the function {@link getLocaleNumberFormat}.
22179
 *
22180
 * @experimental i18n support is experimental.
22181
 */
22182
var NumberFormatStyle;
22183
/**
22184
 * The different format styles that can be used to represent numbers.
22185
 * Used by the function {@link getLocaleNumberFormat}.
22186
 *
22187
 * @experimental i18n support is experimental.
22188
 */
22189
(function (NumberFormatStyle) {
22190
    NumberFormatStyle[NumberFormatStyle["Decimal"] = 0] = "Decimal";
22191
    NumberFormatStyle[NumberFormatStyle["Percent"] = 1] = "Percent";
22192
    NumberFormatStyle[NumberFormatStyle["Currency"] = 2] = "Currency";
22193
    NumberFormatStyle[NumberFormatStyle["Scientific"] = 3] = "Scientific";
22194
})(NumberFormatStyle || (NumberFormatStyle = {}));
22195
/** @experimental */
22196
/** @experimental */
22197
var Plural;
22198
/** @experimental */
22199
(function (Plural) {
22200
    Plural[Plural["Zero"] = 0] = "Zero";
22201
    Plural[Plural["One"] = 1] = "One";
22202
    Plural[Plural["Two"] = 2] = "Two";
22203
    Plural[Plural["Few"] = 3] = "Few";
22204
    Plural[Plural["Many"] = 4] = "Many";
22205
    Plural[Plural["Other"] = 5] = "Other";
22206
})(Plural || (Plural = {}));
22207
/**
22208
 * Some languages use two different forms of strings (standalone and format) depending on the
22209
 * context.
22210
 * Typically the standalone version is the nominative form of the word, and the format version is in
22211
 * the genitive.
22212
 * See [the CLDR website](http://cldr.unicode.org/translation/date-time) for more information.
22213
 *
22214
 * @experimental i18n support is experimental.
22215
 */
22216
/**
22217
 * Some languages use two different forms of strings (standalone and format) depending on the
22218
 * context.
22219
 * Typically the standalone version is the nominative form of the word, and the format version is in
22220
 * the genitive.
22221
 * See [the CLDR website](http://cldr.unicode.org/translation/date-time) for more information.
22222
 *
22223
 * @experimental i18n support is experimental.
22224
 */
22225
var FormStyle;
22226
/**
22227
 * Some languages use two different forms of strings (standalone and format) depending on the
22228
 * context.
22229
 * Typically the standalone version is the nominative form of the word, and the format version is in
22230
 * the genitive.
22231
 * See [the CLDR website](http://cldr.unicode.org/translation/date-time) for more information.
22232
 *
22233
 * @experimental i18n support is experimental.
22234
 */
22235
(function (FormStyle) {
22236
    FormStyle[FormStyle["Format"] = 0] = "Format";
22237
    FormStyle[FormStyle["Standalone"] = 1] = "Standalone";
22238
})(FormStyle || (FormStyle = {}));
22239
/**
22240
 * Multiple widths are available for translations: narrow (1 character), abbreviated (3 characters),
22241
 * wide (full length), and short (2 characters, only for days).
22242
 *
22243
 * For example the day `Sunday` will be:
22244
 * - Narrow: `S`
22245
 * - Short: `Su`
22246
 * - Abbreviated: `Sun`
22247
 * - Wide: `Sunday`
22248
 *
22249
 * @experimental i18n support is experimental.
22250
 */
22251
/**
22252
 * Multiple widths are available for translations: narrow (1 character), abbreviated (3 characters),
22253
 * wide (full length), and short (2 characters, only for days).
22254
 *
22255
 * For example the day `Sunday` will be:
22256
 * - Narrow: `S`
22257
 * - Short: `Su`
22258
 * - Abbreviated: `Sun`
22259
 * - Wide: `Sunday`
22260
 *
22261
 * @experimental i18n support is experimental.
22262
 */
22263
var TranslationWidth;
22264
/**
22265
 * Multiple widths are available for translations: narrow (1 character), abbreviated (3 characters),
22266
 * wide (full length), and short (2 characters, only for days).
22267
 *
22268
 * For example the day `Sunday` will be:
22269
 * - Narrow: `S`
22270
 * - Short: `Su`
22271
 * - Abbreviated: `Sun`
22272
 * - Wide: `Sunday`
22273
 *
22274
 * @experimental i18n support is experimental.
22275
 */
22276
(function (TranslationWidth) {
22277
    TranslationWidth[TranslationWidth["Narrow"] = 0] = "Narrow";
22278
    TranslationWidth[TranslationWidth["Abbreviated"] = 1] = "Abbreviated";
22279
    TranslationWidth[TranslationWidth["Wide"] = 2] = "Wide";
22280
    TranslationWidth[TranslationWidth["Short"] = 3] = "Short";
22281
})(TranslationWidth || (TranslationWidth = {}));
22282
/**
22283
 * Multiple widths are available for formats: short (minimal amount of data), medium (small amount
22284
 * of data), long (complete amount of data), full (complete amount of data and extra information).
22285
 *
22286
 * For example the date-time formats for the english locale will be:
22287
 *  - `'short'`: `'M/d/yy, h:mm a'` (e.g. `6/15/15, 9:03 AM`)
22288
 *  - `'medium'`: `'MMM d, y, h:mm:ss a'` (e.g. `Jun 15, 2015, 9:03:01 AM`)
22289
 *  - `'long'`: `'MMMM d, y, h:mm:ss a z'` (e.g. `June 15, 2015 at 9:03:01 AM GMT+1`)
22290
 *  - `'full'`: `'EEEE, MMMM d, y, h:mm:ss a zzzz'` (e.g. `Monday, June 15, 2015 at
22291
 * 9:03:01 AM GMT+01:00`)
22292
 *
22293
 * @experimental i18n support is experimental.
22294
 */
22295
/**
22296
 * Multiple widths are available for formats: short (minimal amount of data), medium (small amount
22297
 * of data), long (complete amount of data), full (complete amount of data and extra information).
22298
 *
22299
 * For example the date-time formats for the english locale will be:
22300
 *  - `'short'`: `'M/d/yy, h:mm a'` (e.g. `6/15/15, 9:03 AM`)
22301
 *  - `'medium'`: `'MMM d, y, h:mm:ss a'` (e.g. `Jun 15, 2015, 9:03:01 AM`)
22302
 *  - `'long'`: `'MMMM d, y, h:mm:ss a z'` (e.g. `June 15, 2015 at 9:03:01 AM GMT+1`)
22303
 *  - `'full'`: `'EEEE, MMMM d, y, h:mm:ss a zzzz'` (e.g. `Monday, June 15, 2015 at
22304
 * 9:03:01 AM GMT+01:00`)
22305
 *
22306
 * @experimental i18n support is experimental.
22307
 */
22308
var FormatWidth;
22309
/**
22310
 * Multiple widths are available for formats: short (minimal amount of data), medium (small amount
22311
 * of data), long (complete amount of data), full (complete amount of data and extra information).
22312
 *
22313
 * For example the date-time formats for the english locale will be:
22314
 *  - `'short'`: `'M/d/yy, h:mm a'` (e.g. `6/15/15, 9:03 AM`)
22315
 *  - `'medium'`: `'MMM d, y, h:mm:ss a'` (e.g. `Jun 15, 2015, 9:03:01 AM`)
22316
 *  - `'long'`: `'MMMM d, y, h:mm:ss a z'` (e.g. `June 15, 2015 at 9:03:01 AM GMT+1`)
22317
 *  - `'full'`: `'EEEE, MMMM d, y, h:mm:ss a zzzz'` (e.g. `Monday, June 15, 2015 at
22318
 * 9:03:01 AM GMT+01:00`)
22319
 *
22320
 * @experimental i18n support is experimental.
22321
 */
22322
(function (FormatWidth) {
22323
    FormatWidth[FormatWidth["Short"] = 0] = "Short";
22324
    FormatWidth[FormatWidth["Medium"] = 1] = "Medium";
22325
    FormatWidth[FormatWidth["Long"] = 2] = "Long";
22326
    FormatWidth[FormatWidth["Full"] = 3] = "Full";
22327
})(FormatWidth || (FormatWidth = {}));
22328
/**
22329
 * Number symbol that can be used to replace placeholders in number patterns.
22330
 * The placeholders are based on english values:
22331
 *
22332
 * | Name                   | Example for en-US | Meaning                                     |
22333
 * |------------------------|-------------------|---------------------------------------------|
22334
 * | decimal                | 2,345`.`67        | decimal separator                           |
22335
 * | group                  | 2`,`345.67        | grouping separator, typically for thousands |
22336
 * | plusSign               | `+`23             | the plus sign used with numbers             |
22337
 * | minusSign              | `-`23             | the minus sign used with numbers            |
22338
 * | percentSign            | 23.4`%`           | the percent sign (out of 100)               |
22339
 * | perMille               | 234`‰`            | the permille sign (out of 1000)             |
22340
 * | exponential            | 1.2`E`3           | used in computers for 1.2×10³.              |
22341
 * | superscriptingExponent | 1.2`×`103         | human-readable format of exponential        |
22342
 * | infinity               | `∞`               | used in +∞ and -∞.                          |
22343
 * | nan                    | `NaN`             | "not a number".                             |
22344
 * | timeSeparator          | 10`:`52           | symbol used between time units              |
22345
 * | currencyDecimal        | $2,345`.`67       | decimal separator, fallback to "decimal"    |
22346
 * | currencyGroup          | $2`,`345.67       | grouping separator, fallback to "group"     |
22347
 *
22348
 * @experimental i18n support is experimental.
22349
 */
22350
/**
22351
 * Number symbol that can be used to replace placeholders in number patterns.
22352
 * The placeholders are based on english values:
22353
 *
22354
 * | Name                   | Example for en-US | Meaning                                     |
22355
 * |------------------------|-------------------|---------------------------------------------|
22356
 * | decimal                | 2,345`.`67        | decimal separator                           |
22357
 * | group                  | 2`,`345.67        | grouping separator, typically for thousands |
22358
 * | plusSign               | `+`23             | the plus sign used with numbers             |
22359
 * | minusSign              | `-`23             | the minus sign used with numbers            |
22360
 * | percentSign            | 23.4`%`           | the percent sign (out of 100)               |
22361
 * | perMille               | 234`‰`            | the permille sign (out of 1000)             |
22362
 * | exponential            | 1.2`E`3           | used in computers for 1.2×10³.              |
22363
 * | superscriptingExponent | 1.2`×`103         | human-readable format of exponential        |
22364
 * | infinity               | `∞`               | used in +∞ and -∞.                          |
22365
 * | nan                    | `NaN`             | "not a number".                             |
22366
 * | timeSeparator          | 10`:`52           | symbol used between time units              |
22367
 * | currencyDecimal        | $2,345`.`67       | decimal separator, fallback to "decimal"    |
22368
 * | currencyGroup          | $2`,`345.67       | grouping separator, fallback to "group"     |
22369
 *
22370
 * @experimental i18n support is experimental.
22371
 */
22372
var NumberSymbol;
22373
/**
22374
 * Number symbol that can be used to replace placeholders in number patterns.
22375
 * The placeholders are based on english values:
22376
 *
22377
 * | Name                   | Example for en-US | Meaning                                     |
22378
 * |------------------------|-------------------|---------------------------------------------|
22379
 * | decimal                | 2,345`.`67        | decimal separator                           |
22380
 * | group                  | 2`,`345.67        | grouping separator, typically for thousands |
22381
 * | plusSign               | `+`23             | the plus sign used with numbers             |
22382
 * | minusSign              | `-`23             | the minus sign used with numbers            |
22383
 * | percentSign            | 23.4`%`           | the percent sign (out of 100)               |
22384
 * | perMille               | 234`‰`            | the permille sign (out of 1000)             |
22385
 * | exponential            | 1.2`E`3           | used in computers for 1.2×10³.              |
22386
 * | superscriptingExponent | 1.2`×`103         | human-readable format of exponential        |
22387
 * | infinity               | `∞`               | used in +∞ and -∞.                          |
22388
 * | nan                    | `NaN`             | "not a number".                             |
22389
 * | timeSeparator          | 10`:`52           | symbol used between time units              |
22390
 * | currencyDecimal        | $2,345`.`67       | decimal separator, fallback to "decimal"    |
22391
 * | currencyGroup          | $2`,`345.67       | grouping separator, fallback to "group"     |
22392
 *
22393
 * @experimental i18n support is experimental.
22394
 */
22395
(function (NumberSymbol) {
22396
    NumberSymbol[NumberSymbol["Decimal"] = 0] = "Decimal";
22397
    NumberSymbol[NumberSymbol["Group"] = 1] = "Group";
22398
    NumberSymbol[NumberSymbol["List"] = 2] = "List";
22399
    NumberSymbol[NumberSymbol["PercentSign"] = 3] = "PercentSign";
22400
    NumberSymbol[NumberSymbol["PlusSign"] = 4] = "PlusSign";
22401
    NumberSymbol[NumberSymbol["MinusSign"] = 5] = "MinusSign";
22402
    NumberSymbol[NumberSymbol["Exponential"] = 6] = "Exponential";
22403
    NumberSymbol[NumberSymbol["SuperscriptingExponent"] = 7] = "SuperscriptingExponent";
22404
    NumberSymbol[NumberSymbol["PerMille"] = 8] = "PerMille";
22405
    NumberSymbol[NumberSymbol["Infinity"] = 9] = "Infinity";
22406
    NumberSymbol[NumberSymbol["NaN"] = 10] = "NaN";
22407
    NumberSymbol[NumberSymbol["TimeSeparator"] = 11] = "TimeSeparator";
22408
    NumberSymbol[NumberSymbol["CurrencyDecimal"] = 12] = "CurrencyDecimal";
22409
    NumberSymbol[NumberSymbol["CurrencyGroup"] = 13] = "CurrencyGroup";
22410
})(NumberSymbol || (NumberSymbol = {}));
22411
/**
22412
 * The value for each day of the week, based on the en-US locale
22413
 *
22414
 * @experimental
22415
 */
22416
/**
22417
 * The value for each day of the week, based on the en-US locale
22418
 *
22419
 * @experimental
22420
 */
22421
var WeekDay;
22422
/**
22423
 * The value for each day of the week, based on the en-US locale
22424
 *
22425
 * @experimental
22426
 */
22427
(function (WeekDay) {
22428
    WeekDay[WeekDay["Sunday"] = 0] = "Sunday";
22429
    WeekDay[WeekDay["Monday"] = 1] = "Monday";
22430
    WeekDay[WeekDay["Tuesday"] = 2] = "Tuesday";
22431
    WeekDay[WeekDay["Wednesday"] = 3] = "Wednesday";
22432
    WeekDay[WeekDay["Thursday"] = 4] = "Thursday";
22433
    WeekDay[WeekDay["Friday"] = 5] = "Friday";
22434
    WeekDay[WeekDay["Saturday"] = 6] = "Saturday";
22435
})(WeekDay || (WeekDay = {}));
22436
/**
22437
 * The locale id for the chosen locale (e.g `en-GB`).
22438
 *
22439
 * @experimental i18n support is experimental.
22440
 */
22441
function getLocaleId(locale) {
22442
    return findLocaleData(locale)[0 /* LocaleId */];
22443
}
22444
/**
22445
 * Periods of the day (e.g. `[AM, PM]` for en-US).
22446
 *
22447
 * @experimental i18n support is experimental.
22448
 */
22449
function getLocaleDayPeriods(locale, formStyle, width) {
22450
    var data = findLocaleData(locale);
22451
    var amPmData = [data[1 /* DayPeriodsFormat */], data[2 /* DayPeriodsStandalone */]];
22452
    var amPm = getLastDefinedValue(amPmData, formStyle);
22453
    return getLastDefinedValue(amPm, width);
22454
}
22455
/**
22456
 * Days of the week for the Gregorian calendar (e.g. `[Sunday, Monday, ... Saturday]` for en-US).
22457
 *
22458
 * @experimental i18n support is experimental.
22459
 */
22460
function getLocaleDayNames(locale, formStyle, width) {
22461
    var data = findLocaleData(locale);
22462
    var daysData = [data[3 /* DaysFormat */], data[4 /* DaysStandalone */]];
22463
    var days = getLastDefinedValue(daysData, formStyle);
22464
    return getLastDefinedValue(days, width);
22465
}
22466
/**
22467
 * Months of the year for the Gregorian calendar (e.g. `[January, February, ...]` for en-US).
22468
 *
22469
 * @experimental i18n support is experimental.
22470
 */
22471
function getLocaleMonthNames(locale, formStyle, width) {
22472
    var data = findLocaleData(locale);
22473
    var monthsData = [data[5 /* MonthsFormat */], data[6 /* MonthsStandalone */]];
22474
    var months = getLastDefinedValue(monthsData, formStyle);
22475
    return getLastDefinedValue(months, width);
22476
}
22477
/**
22478
 * Eras for the Gregorian calendar (e.g. AD/BC).
22479
 *
22480
 * @experimental i18n support is experimental.
22481
 */
22482
function getLocaleEraNames(locale, width) {
22483
    var data = findLocaleData(locale);
22484
    var erasData = data[7 /* Eras */];
22485
    return getLastDefinedValue(erasData, width);
22486
}
22487
/**
22488
 * First day of the week for this locale, based on english days (Sunday = 0, Monday = 1, ...).
22489
 * For example in french the value would be 1 because the first day of the week is Monday.
22490
 *
22491
 * @experimental i18n support is experimental.
22492
 */
22493
function getLocaleFirstDayOfWeek(locale) {
22494
    var data = findLocaleData(locale);
22495
    return data[8 /* FirstDayOfWeek */];
22496
}
22497
/**
22498
 * Range of days in the week that represent the week-end for this locale, based on english days
22499
 * (Sunday = 0, Monday = 1, ...).
22500
 * For example in english the value would be [6,0] for Saturday to Sunday.
22501
 *
22502
 * @experimental i18n support is experimental.
22503
 */
22504
function getLocaleWeekEndRange(locale) {
22505
    var data = findLocaleData(locale);
22506
    return data[9 /* WeekendRange */];
22507
}
22508
/**
22509
 * Date format that depends on the locale.
22510
 *
22511
 * There are four basic date formats:
22512
 * - `full` should contain long-weekday (EEEE), year (y), long-month (MMMM), day (d).
22513
 *
22514
 *  For example, English uses `EEEE, MMMM d, y`, corresponding to a date like
22515
 *  "Tuesday, September 14, 1999".
22516
 *
22517
 * - `long` should contain year, long-month, day.
22518
 *
22519
 *  For example, `MMMM d, y`, corresponding to a date like "September 14, 1999".
22520
 *
22521
 * - `medium` should contain year, abbreviated-month (MMM), day.
22522
 *
22523
 *  For example, `MMM d, y`, corresponding to a date like "Sep 14, 1999".
22524
 *  For languages that do not use abbreviated months, use the numeric month (MM/M). For example,
22525
 *  `y/MM/dd`, corresponding to a date like "1999/09/14".
22526
 *
22527
 * - `short` should contain year, numeric-month (MM/M), and day.
22528
 *
22529
 *  For example, `M/d/yy`, corresponding to a date like "9/14/99".
22530
 *
22531
 * @experimental i18n support is experimental.
22532
 */
22533
function getLocaleDateFormat(locale, width) {
22534
    var data = findLocaleData(locale);
22535
    return getLastDefinedValue(data[10 /* DateFormat */], width);
22536
}
22537
/**
22538
 * Time format that depends on the locale.
22539
 *
22540
 * The standard formats include four basic time formats:
22541
 * - `full` should contain hour (h/H), minute (mm), second (ss), and zone (zzzz).
22542
 * - `long` should contain hour, minute, second, and zone (z)
22543
 * - `medium` should contain hour, minute, second.
22544
 * - `short` should contain hour, minute.
22545
 *
22546
 * Note: The patterns depend on whether the main country using your language uses 12-hour time or
22547
 * not:
22548
 * - For 12-hour time, use a pattern like `hh:mm a` using h to mean a 12-hour clock cycle running
22549
 * 1 through 12 (midnight plus 1 minute is 12:01), or using K to mean a 12-hour clock cycle
22550
 * running 0 through 11 (midnight plus 1 minute is 0:01).
22551
 * - For 24-hour time, use a pattern like `HH:mm` using H to mean a 24-hour clock cycle running 0
22552
 * through 23 (midnight plus 1 minute is 0:01), or using k to mean a 24-hour clock cycle running
22553
 * 1 through 24 (midnight plus 1 minute is 24:01).
22554
 *
22555
 * @experimental i18n support is experimental.
22556
 */
22557
function getLocaleTimeFormat(locale, width) {
22558
    var data = findLocaleData(locale);
22559
    return getLastDefinedValue(data[11 /* TimeFormat */], width);
22560
}
22561
/**
22562
 * Date-time format that depends on the locale.
22563
 *
22564
 * The date-time pattern shows how to combine separate patterns for date (represented by {1})
22565
 * and time (represented by {0}) into a single pattern. It usually doesn't need to be changed.
22566
 * What you want to pay attention to are:
22567
 * - possibly removing a space for languages that don't use it, such as many East Asian languages
22568
 * - possibly adding a comma, other punctuation, or a combining word
22569
 *
22570
 * For example:
22571
 * - English uses `{1} 'at' {0}` or `{1}, {0}` (depending on date style), while Japanese uses
22572
 *  `{1}{0}`.
22573
 * - An English formatted date-time using the combining pattern `{1}, {0}` could be
22574
 *  `Dec 10, 2010, 3:59:49 PM`. Notice the comma and space between the date portion and the time
22575
 *  portion.
22576
 *
22577
 * There are four formats (`full`, `long`, `medium`, `short`); the determination of which to use
22578
 * is normally based on the date style. For example, if the date has a full month and weekday
22579
 * name, the full combining pattern will be used to combine that with a time. If the date has
22580
 * numeric month, the short version of the combining pattern will be used to combine that with a
22581
 * time. English uses `{1} 'at' {0}` for full and long styles, and `{1}, {0}` for medium and short
22582
 * styles.
22583
 *
22584
 * @experimental i18n support is experimental.
22585
 */
22586
function getLocaleDateTimeFormat(locale, width) {
22587
    var data = findLocaleData(locale);
22588
    var dateTimeFormatData = data[12 /* DateTimeFormat */];
22589
    return getLastDefinedValue(dateTimeFormatData, width);
22590
}
22591
/**
22592
 * Number symbol that can be used to replace placeholders in number formats.
22593
 * See {@link NumberSymbol} for more information.
22594
 *
22595
 * @experimental i18n support is experimental.
22596
 */
22597
function getLocaleNumberSymbol(locale, symbol) {
22598
    var data = findLocaleData(locale);
22599
    var res = data[13 /* NumberSymbols */][symbol];
22600
    if (typeof res === 'undefined') {
22601
        if (symbol === NumberSymbol.CurrencyDecimal) {
22602
            return data[13 /* NumberSymbols */][NumberSymbol.Decimal];
22603
        }
22604
        else if (symbol === NumberSymbol.CurrencyGroup) {
22605
            return data[13 /* NumberSymbols */][NumberSymbol.Group];
22606
        }
22607
    }
22608
    return res;
22609
}
22610
/**
22611
 * Number format that depends on the locale.
22612
 *
22613
 * Numbers are formatted using patterns, like `#,###.00`. For example, the pattern `#,###.00`
22614
 * when used to format the number 12345.678 could result in "12'345,67". That would happen if the
22615
 * grouping separator for your language is an apostrophe, and the decimal separator is a comma.
22616
 *
22617
 * <b>Important:</b> The characters `.` `,` `0` `#` (and others below) are special placeholders;
22618
 * they stand for the decimal separator, and so on, and are NOT real characters.
22619
 * You must NOT "translate" the placeholders; for example, don't change `.` to `,` even though in
22620
 * your language the decimal point is written with a comma. The symbols should be replaced by the
22621
 * local equivalents, using the Number Symbols for your language.
22622
 *
22623
 * Here are the special characters used in number patterns:
22624
 *
22625
 * | Symbol | Meaning |
22626
 * |--------|---------|
22627
 * | . | Replaced automatically by the character used for the decimal point. |
22628
 * | , | Replaced by the "grouping" (thousands) separator. |
22629
 * | 0 | Replaced by a digit (or zero if there aren't enough digits). |
22630
 * | # | Replaced by a digit (or nothing if there aren't enough). |
22631
 * | ¤ | This will be replaced by a currency symbol, such as $ or USD. |
22632
 * | % | This marks a percent format. The % symbol may change position, but must be retained. |
22633
 * | E | This marks a scientific format. The E symbol may change position, but must be retained. |
22634
 * | ' | Special characters used as literal characters are quoted with ASCII single quotes. |
22635
 *
22636
 * You can find more information
22637
 * [on the CLDR website](http://cldr.unicode.org/translation/number-patterns)
22638
 *
22639
 * @experimental i18n support is experimental.
22640
 */
22641
function getLocaleNumberFormat(locale, type) {
22642
    var data = findLocaleData(locale);
22643
    return data[14 /* NumberFormats */][type];
22644
}
22645
/**
22646
 * The symbol used to represent the currency for the main country using this locale (e.g. $ for
22647
 * the locale en-US).
22648
 * The symbol will be `null` if the main country cannot be determined.
22649
 *
22650
 * @experimental i18n support is experimental.
22651
 */
22652
function getLocaleCurrencySymbol(locale) {
22653
    var data = findLocaleData(locale);
22654
    return data[15 /* CurrencySymbol */] || null;
22655
}
22656
/**
22657
 * The name of the currency for the main country using this locale (e.g. USD for the locale
22658
 * en-US).
22659
 * The name will be `null` if the main country cannot be determined.
22660
 *
22661
 * @experimental i18n support is experimental.
22662
 */
22663
function getLocaleCurrencyName(locale) {
22664
    var data = findLocaleData(locale);
22665
    return data[16 /* CurrencyName */] || null;
22666
}
22667
/**
22668
 * Returns the currency values for the locale
22669
 */
22670
function getLocaleCurrencies(locale) {
22671
    var data = findLocaleData(locale);
22672
    return data[17 /* Currencies */];
22673
}
22674
/**
22675
 * The locale plural function used by ICU expressions to determine the plural case to use.
22676
 * See {@link NgPlural} for more information.
22677
 *
22678
 * @experimental i18n support is experimental.
22679
 */
22680
function getLocalePluralCase(locale) {
22681
    var data = findLocaleData(locale);
22682
    return data[18 /* PluralCase */];
22683
}
22684
function checkFullData(data) {
22685
    if (!data[19 /* ExtraData */]) {
22686
        throw new Error("Missing extra locale data for the locale \"" + data[0 /* LocaleId */] + "\". Use \"registerLocaleData\" to load new data. See the \"I18n guide\" on angular.io to know more.");
22687
    }
22688
}
22689
/**
22690
 * Rules used to determine which day period to use (See `dayPeriods` below).
22691
 * The rules can either be an array or a single value. If it's an array, consider it as "from"
22692
 * and "to". If it's a single value then it means that the period is only valid at this exact
22693
 * value.
22694
 * There is always the same number of rules as the number of day periods, which means that the
22695
 * first rule is applied to the first day period and so on.
22696
 * You should fallback to AM/PM when there are no rules available.
22697
 *
22698
 * Note: this is only available if you load the full locale data.
22699
 * See the {@linkDocs guide/i18n#i18n-pipes "I18n guide"} to know how to import additional locale
22700
 * data.
22701
 *
22702
 * @experimental i18n support is experimental.
22703
 */
22704
function getLocaleExtraDayPeriodRules(locale) {
22705
    var data = findLocaleData(locale);
22706
    checkFullData(data);
22707
    var rules = data[19 /* ExtraData */][2 /* ExtraDayPeriodsRules */] || [];
22708
    return rules.map(function (rule) {
22709
        if (typeof rule === 'string') {
22710
            return extractTime(rule);
22711
        }
22712
        return [extractTime(rule[0]), extractTime(rule[1])];
22713
    });
22714
}
22715
/**
22716
 * Day Periods indicate roughly how the day is broken up in different languages (e.g. morning,
22717
 * noon, afternoon, midnight, ...).
22718
 * You should use the function {@link getLocaleExtraDayPeriodRules} to determine which period to
22719
 * use.
22720
 * You should fallback to AM/PM when there are no day periods available.
22721
 *
22722
 * Note: this is only available if you load the full locale data.
22723
 * See the {@linkDocs guide/i18n#i18n-pipes "I18n guide"} to know how to import additional locale
22724
 * data.
22725
 *
22726
 * @experimental i18n support is experimental.
22727
 */
22728
function getLocaleExtraDayPeriods(locale, formStyle, width) {
22729
    var data = findLocaleData(locale);
22730
    checkFullData(data);
22731
    var dayPeriodsData = [
22732
        data[19 /* ExtraData */][0 /* ExtraDayPeriodFormats */],
22733
        data[19 /* ExtraData */][1 /* ExtraDayPeriodStandalone */]
22734
    ];
22735
    var dayPeriods = getLastDefinedValue(dayPeriodsData, formStyle) || [];
22736
    return getLastDefinedValue(dayPeriods, width) || [];
22737
}
22738
/**
22739
 * Returns the first value that is defined in an array, going backwards.
22740
 *
22741
 * To avoid repeating the same data (e.g. when "format" and "standalone" are the same) we only
22742
 * add the first one to the locale data arrays, the other ones are only defined when different.
22743
 * We use this function to retrieve the first defined value.
22744
 *
22745
 * @experimental i18n support is experimental.
22746
 */
22747
function getLastDefinedValue(data, index) {
22748
    for (var i = index; i > -1; i--) {
22749
        if (typeof data[i] !== 'undefined') {
22750
            return data[i];
22751
        }
22752
    }
22753
    throw new Error('Locale data API: locale data undefined');
22754
}
22755
/**
22756
 * Extract the hours and minutes from a string like "15:45"
22757
 */
22758
function extractTime(time) {
22759
    var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__read"])(time.split(':'), 2), h = _a[0], m = _a[1];
22760
    return { hours: +h, minutes: +m };
22761
}
22762
/**
22763
 * Finds the locale data for a locale id
22764
 *
22765
 * @experimental i18n support is experimental.
22766
 */
22767
function findLocaleData(locale) {
22768
    var normalizedLocale = locale.toLowerCase().replace(/_/g, '-');
22769
    var match = LOCALE_DATA[normalizedLocale];
22770
    if (match) {
22771
        return match;
22772
    }
22773
    // let's try to find a parent locale
22774
    var parentLocale = normalizedLocale.split('-')[0];
22775
    match = LOCALE_DATA[parentLocale];
22776
    if (match) {
22777
        return match;
22778
    }
22779
    if (parentLocale === 'en') {
22780
        return localeEn;
22781
    }
22782
    throw new Error("Missing locale data for the locale \"" + locale + "\".");
22783
}
22784
/**
22785
 * Returns the currency symbol for a given currency code, or the code if no symbol available
22786
 * (e.g.: format narrow = $, format wide = US$, code = USD)
22787
 * If no locale is provided, it uses the locale "en" by default
22788
 *
22789
 * @experimental i18n support is experimental.
22790
 */
22791
function getCurrencySymbol(code, format, locale) {
22792
    if (locale === void 0) { locale = 'en'; }
22793
    var currency = getLocaleCurrencies(locale)[code] || CURRENCIES_EN[code] || [];
22794
    var symbolNarrow = currency[1 /* SymbolNarrow */];
22795
    if (format === 'narrow' && typeof symbolNarrow === 'string') {
22796
        return symbolNarrow;
22797
    }
22798
    return currency[0 /* Symbol */] || code;
22799
}
22800
// Most currencies have cents, that's why the default is 2
22801
var DEFAULT_NB_OF_CURRENCY_DIGITS = 2;
22802
/**
22803
 * Returns the number of decimal digits for the given currency.
22804
 * Its value depends upon the presence of cents in that particular currency.
22805
 *
22806
 * @experimental i18n support is experimental.
22807
 */
22808
function getNumberOfCurrencyDigits(code) {
22809
    var digits;
22810
    var currency = CURRENCIES_EN[code];
22811
    if (currency) {
22812
        digits = currency[2 /* NbOfDigits */];
22813
    }
22814
    return typeof digits === 'number' ? digits : DEFAULT_NB_OF_CURRENCY_DIGITS;
22815
}
22816
 
22817
/**
22818
 * @license
22819
 * Copyright Google Inc. All Rights Reserved.
22820
 *
22821
 * Use of this source code is governed by an MIT-style license that can be
22822
 * found in the LICENSE file at https://angular.io/license
22823
 */
22824
var ISO8601_DATE_REGEX = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;
22825
//    1        2       3         4          5          6          7          8  9     10      11
22826
var NAMED_FORMATS = {};
22827
var DATE_FORMATS_SPLIT = /((?:[^GyMLwWdEabBhHmsSzZO']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;
22828
var ZoneWidth;
22829
(function (ZoneWidth) {
22830
    ZoneWidth[ZoneWidth["Short"] = 0] = "Short";
22831
    ZoneWidth[ZoneWidth["ShortGMT"] = 1] = "ShortGMT";
22832
    ZoneWidth[ZoneWidth["Long"] = 2] = "Long";
22833
    ZoneWidth[ZoneWidth["Extended"] = 3] = "Extended";
22834
})(ZoneWidth || (ZoneWidth = {}));
22835
var DateType;
22836
(function (DateType) {
22837
    DateType[DateType["FullYear"] = 0] = "FullYear";
22838
    DateType[DateType["Month"] = 1] = "Month";
22839
    DateType[DateType["Date"] = 2] = "Date";
22840
    DateType[DateType["Hours"] = 3] = "Hours";
22841
    DateType[DateType["Minutes"] = 4] = "Minutes";
22842
    DateType[DateType["Seconds"] = 5] = "Seconds";
22843
    DateType[DateType["Milliseconds"] = 6] = "Milliseconds";
22844
    DateType[DateType["Day"] = 7] = "Day";
22845
})(DateType || (DateType = {}));
22846
var TranslationType;
22847
(function (TranslationType) {
22848
    TranslationType[TranslationType["DayPeriods"] = 0] = "DayPeriods";
22849
    TranslationType[TranslationType["Days"] = 1] = "Days";
22850
    TranslationType[TranslationType["Months"] = 2] = "Months";
22851
    TranslationType[TranslationType["Eras"] = 3] = "Eras";
22852
})(TranslationType || (TranslationType = {}));
22853
/**
22854
 * @ngModule CommonModule
22855
 * @description
22856
 *
22857
 * Formats a date according to locale rules.
22858
 *
22859
 * Where:
22860
 * - `value` is a Date, a number (milliseconds since UTC epoch) or an ISO string
22861
 *   (https://www.w3.org/TR/NOTE-datetime).
22862
 * - `format` indicates which date/time components to include. See {@link DatePipe} for more
22863
 *   details.
22864
 * - `locale` is a `string` defining the locale to use.
22865
 * - `timezone` to be used for formatting. It understands UTC/GMT and the continental US time zone
22866
 *   abbreviations, but for general use, use a time zone offset (e.g. `'+0430'`).
22867
 *   If not specified, host system settings are used.
22868
 *
22869
 * See {@link DatePipe} for more details.
22870
 *
22871
 *
22872
 */
22873
function formatDate(value, format, locale, timezone) {
22874
    var date = toDate(value);
22875
    var namedFormat = getNamedFormat(locale, format);
22876
    format = namedFormat || format;
22877
    var parts = [];
22878
    var match;
22879
    while (format) {
22880
        match = DATE_FORMATS_SPLIT.exec(format);
22881
        if (match) {
22882
            parts = parts.concat(match.slice(1));
22883
            var part = parts.pop();
22884
            if (!part) {
22885
                break;
22886
            }
22887
            format = part;
22888
        }
22889
        else {
22890
            parts.push(format);
22891
            break;
22892
        }
22893
    }
22894
    var dateTimezoneOffset = date.getTimezoneOffset();
22895
    if (timezone) {
22896
        dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);
22897
        date = convertTimezoneToLocal(date, timezone, true);
22898
    }
22899
    var text = '';
22900
    parts.forEach(function (value) {
22901
        var dateFormatter = getDateFormatter(value);
22902
        text += dateFormatter ?
22903
            dateFormatter(date, locale, dateTimezoneOffset) :
22904
            value === '\'\'' ? '\'' : value.replace(/(^'|'$)/g, '').replace(/''/g, '\'');
22905
    });
22906
    return text;
22907
}
22908
function getNamedFormat(locale, format) {
22909
    var localeId = getLocaleId(locale);
22910
    NAMED_FORMATS[localeId] = NAMED_FORMATS[localeId] || {};
22911
    if (NAMED_FORMATS[localeId][format]) {
22912
        return NAMED_FORMATS[localeId][format];
22913
    }
22914
    var formatValue = '';
22915
    switch (format) {
22916
        case 'shortDate':
22917
            formatValue = getLocaleDateFormat(locale, FormatWidth.Short);
22918
            break;
22919
        case 'mediumDate':
22920
            formatValue = getLocaleDateFormat(locale, FormatWidth.Medium);
22921
            break;
22922
        case 'longDate':
22923
            formatValue = getLocaleDateFormat(locale, FormatWidth.Long);
22924
            break;
22925
        case 'fullDate':
22926
            formatValue = getLocaleDateFormat(locale, FormatWidth.Full);
22927
            break;
22928
        case 'shortTime':
22929
            formatValue = getLocaleTimeFormat(locale, FormatWidth.Short);
22930
            break;
22931
        case 'mediumTime':
22932
            formatValue = getLocaleTimeFormat(locale, FormatWidth.Medium);
22933
            break;
22934
        case 'longTime':
22935
            formatValue = getLocaleTimeFormat(locale, FormatWidth.Long);
22936
            break;
22937
        case 'fullTime':
22938
            formatValue = getLocaleTimeFormat(locale, FormatWidth.Full);
22939
            break;
22940
        case 'short':
22941
            var shortTime = getNamedFormat(locale, 'shortTime');
22942
            var shortDate = getNamedFormat(locale, 'shortDate');
22943
            formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Short), [shortTime, shortDate]);
22944
            break;
22945
        case 'medium':
22946
            var mediumTime = getNamedFormat(locale, 'mediumTime');
22947
            var mediumDate = getNamedFormat(locale, 'mediumDate');
22948
            formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Medium), [mediumTime, mediumDate]);
22949
            break;
22950
        case 'long':
22951
            var longTime = getNamedFormat(locale, 'longTime');
22952
            var longDate = getNamedFormat(locale, 'longDate');
22953
            formatValue =
22954
                formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Long), [longTime, longDate]);
22955
            break;
22956
        case 'full':
22957
            var fullTime = getNamedFormat(locale, 'fullTime');
22958
            var fullDate = getNamedFormat(locale, 'fullDate');
22959
            formatValue =
22960
                formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Full), [fullTime, fullDate]);
22961
            break;
22962
    }
22963
    if (formatValue) {
22964
        NAMED_FORMATS[localeId][format] = formatValue;
22965
    }
22966
    return formatValue;
22967
}
22968
function formatDateTime(str, opt_values) {
22969
    if (opt_values) {
22970
        str = str.replace(/\{([^}]+)}/g, function (match, key) {
22971
            return (opt_values != null && key in opt_values) ? opt_values[key] : match;
22972
        });
22973
    }
22974
    return str;
22975
}
22976
function padNumber(num, digits, minusSign, trim, negWrap) {
22977
    if (minusSign === void 0) { minusSign = '-'; }
22978
    var neg = '';
22979
    if (num < 0 || (negWrap && num <= 0)) {
22980
        if (negWrap) {
22981
            num = -num + 1;
22982
        }
22983
        else {
22984
            num = -num;
22985
            neg = minusSign;
22986
        }
22987
    }
22988
    var strNum = String(num);
22989
    while (strNum.length < digits) {
22990
        strNum = '0' + strNum;
22991
    }
22992
    if (trim) {
22993
        strNum = strNum.substr(strNum.length - digits);
22994
    }
22995
    return neg + strNum;
22996
}
22997
/**
22998
 * Returns a date formatter that transforms a date into its locale digit representation
22999
 */
23000
function dateGetter(name, size, offset, trim, negWrap) {
23001
    if (offset === void 0) { offset = 0; }
23002
    if (trim === void 0) { trim = false; }
23003
    if (negWrap === void 0) { negWrap = false; }
23004
    return function (date, locale) {
23005
        var part = getDatePart(name, date, size);
23006
        if (offset > 0 || part > -offset) {
23007
            part += offset;
23008
        }
23009
        if (name === DateType.Hours && part === 0 && offset === -12) {
23010
            part = 12;
23011
        }
23012
        return padNumber(part, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign), trim, negWrap);
23013
    };
23014
}
23015
function getDatePart(name, date, size) {
23016
    switch (name) {
23017
        case DateType.FullYear:
23018
            return date.getFullYear();
23019
        case DateType.Month:
23020
            return date.getMonth();
23021
        case DateType.Date:
23022
            return date.getDate();
23023
        case DateType.Hours:
23024
            return date.getHours();
23025
        case DateType.Minutes:
23026
            return date.getMinutes();
23027
        case DateType.Seconds:
23028
            return date.getSeconds();
23029
        case DateType.Milliseconds:
23030
            var div = size === 1 ? 100 : (size === 2 ? 10 : 1);
23031
            return Math.round(date.getMilliseconds() / div);
23032
        case DateType.Day:
23033
            return date.getDay();
23034
        default:
23035
            throw new Error("Unknown DateType value \"" + name + "\".");
23036
    }
23037
}
23038
/**
23039
 * Returns a date formatter that transforms a date into its locale string representation
23040
 */
23041
function dateStrGetter(name, width, form, extended) {
23042
    if (form === void 0) { form = FormStyle.Format; }
23043
    if (extended === void 0) { extended = false; }
23044
    return function (date, locale) {
23045
        return getDateTranslation(date, locale, name, width, form, extended);
23046
    };
23047
}
23048
/**
23049
 * Returns the locale translation of a date for a given form, type and width
23050
 */
23051
function getDateTranslation(date, locale, name, width, form, extended) {
23052
    switch (name) {
23053
        case TranslationType.Months:
23054
            return getLocaleMonthNames(locale, form, width)[date.getMonth()];
23055
        case TranslationType.Days:
23056
            return getLocaleDayNames(locale, form, width)[date.getDay()];
23057
        case TranslationType.DayPeriods:
23058
            var currentHours_1 = date.getHours();
23059
            var currentMinutes_1 = date.getMinutes();
23060
            if (extended) {
23061
                var rules = getLocaleExtraDayPeriodRules(locale);
23062
                var dayPeriods_1 = getLocaleExtraDayPeriods(locale, form, width);
23063
                var result_1;
23064
                rules.forEach(function (rule, index) {
23065
                    if (Array.isArray(rule)) {
23066
                        // morning, afternoon, evening, night
23067
                        var _a = rule[0], hoursFrom = _a.hours, minutesFrom = _a.minutes;
23068
                        var _b = rule[1], hoursTo = _b.hours, minutesTo = _b.minutes;
23069
                        if (currentHours_1 >= hoursFrom && currentMinutes_1 >= minutesFrom &&
23070
                            (currentHours_1 < hoursTo ||
23071
                                (currentHours_1 === hoursTo && currentMinutes_1 < minutesTo))) {
23072
                            result_1 = dayPeriods_1[index];
23073
                        }
23074
                    }
23075
                    else {
23076
                        // noon or midnight
23077
                        var hours = rule.hours, minutes = rule.minutes;
23078
                        if (hours === currentHours_1 && minutes === currentMinutes_1) {
23079
                            result_1 = dayPeriods_1[index];
23080
                        }
23081
                    }
23082
                });
23083
                if (result_1) {
23084
                    return result_1;
23085
                }
23086
            }
23087
            // if no rules for the day periods, we use am/pm by default
23088
            return getLocaleDayPeriods(locale, form, width)[currentHours_1 < 12 ? 0 : 1];
23089
        case TranslationType.Eras:
23090
            return getLocaleEraNames(locale, width)[date.getFullYear() <= 0 ? 0 : 1];
23091
        default:
23092
            // This default case is not needed by TypeScript compiler, as the switch is exhaustive.
23093
            // However Closure Compiler does not understand that and reports an error in typed mode.
23094
            // The `throw new Error` below works around the problem, and the unexpected: never variable
23095
            // makes sure tsc still checks this code is unreachable.
23096
            var unexpected = name;
23097
            throw new Error("unexpected translation type " + unexpected);
23098
    }
23099
}
23100
/**
23101
 * Returns a date formatter that transforms a date and an offset into a timezone with ISO8601 or
23102
 * GMT format depending on the width (eg: short = +0430, short:GMT = GMT+4, long = GMT+04:30,
23103
 * extended = +04:30)
23104
 */
23105
function timeZoneGetter(width) {
23106
    return function (date, locale, offset) {
23107
        var zone = -1 * offset;
23108
        var minusSign = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);
23109
        var hours = zone > 0 ? Math.floor(zone / 60) : Math.ceil(zone / 60);
23110
        switch (width) {
23111
            case ZoneWidth.Short:
23112
                return ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) +
23113
                    padNumber(Math.abs(zone % 60), 2, minusSign);
23114
            case ZoneWidth.ShortGMT:
23115
                return 'GMT' + ((zone >= 0) ? '+' : '') + padNumber(hours, 1, minusSign);
23116
            case ZoneWidth.Long:
23117
                return 'GMT' + ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) + ':' +
23118
                    padNumber(Math.abs(zone % 60), 2, minusSign);
23119
            case ZoneWidth.Extended:
23120
                if (offset === 0) {
23121
                    return 'Z';
23122
                }
23123
                else {
23124
                    return ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) + ':' +
23125
                        padNumber(Math.abs(zone % 60), 2, minusSign);
23126
                }
23127
            default:
23128
                throw new Error("Unknown zone width \"" + width + "\"");
23129
        }
23130
    };
23131
}
23132
var JANUARY = 0;
23133
var THURSDAY = 4;
23134
function getFirstThursdayOfYear(year) {
23135
    var firstDayOfYear = (new Date(year, JANUARY, 1)).getDay();
23136
    return new Date(year, 0, 1 + ((firstDayOfYear <= THURSDAY) ? THURSDAY : THURSDAY + 7) - firstDayOfYear);
23137
}
23138
function getThursdayThisWeek(datetime) {
23139
    return new Date(datetime.getFullYear(), datetime.getMonth(), datetime.getDate() + (THURSDAY - datetime.getDay()));
23140
}
23141
function weekGetter(size, monthBased) {
23142
    if (monthBased === void 0) { monthBased = false; }
23143
    return function (date, locale) {
23144
        var result;
23145
        if (monthBased) {
23146
            var nbDaysBefore1stDayOfMonth = new Date(date.getFullYear(), date.getMonth(), 1).getDay() - 1;
23147
            var today = date.getDate();
23148
            result = 1 + Math.floor((today + nbDaysBefore1stDayOfMonth) / 7);
23149
        }
23150
        else {
23151
            var firstThurs = getFirstThursdayOfYear(date.getFullYear());
23152
            var thisThurs = getThursdayThisWeek(date);
23153
            var diff = thisThurs.getTime() - firstThurs.getTime();
23154
            result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week
23155
        }
23156
        return padNumber(result, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));
23157
    };
23158
}
23159
var DATE_FORMATS = {};
23160
// Based on CLDR formats:
23161
// See complete list: http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
23162
// See also explanations: http://cldr.unicode.org/translation/date-time
23163
// TODO(ocombe): support all missing cldr formats: Y, U, Q, D, F, e, c, j, J, C, A, v, V, X, x
23164
function getDateFormatter(format) {
23165
    if (DATE_FORMATS[format]) {
23166
        return DATE_FORMATS[format];
23167
    }
23168
    var formatter;
23169
    switch (format) {
23170
        // Era name (AD/BC)
23171
        case 'G':
23172
        case 'GG':
23173
        case 'GGG':
23174
            formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Abbreviated);
23175
            break;
23176
        case 'GGGG':
23177
            formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Wide);
23178
            break;
23179
        case 'GGGGG':
23180
            formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Narrow);
23181
            break;
23182
        // 1 digit representation of the year, e.g. (AD 1 => 1, AD 199 => 199)
23183
        case 'y':
23184
            formatter = dateGetter(DateType.FullYear, 1, 0, false, true);
23185
            break;
23186
        // 2 digit representation of the year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)
23187
        case 'yy':
23188
            formatter = dateGetter(DateType.FullYear, 2, 0, true, true);
23189
            break;
23190
        // 3 digit representation of the year, padded (000-999). (e.g. AD 2001 => 01, AD 2010 => 10)
23191
        case 'yyy':
23192
            formatter = dateGetter(DateType.FullYear, 3, 0, false, true);
23193
            break;
23194
        // 4 digit representation of the year (e.g. AD 1 => 0001, AD 2010 => 2010)
23195
        case 'yyyy':
23196
            formatter = dateGetter(DateType.FullYear, 4, 0, false, true);
23197
            break;
23198
        // Month of the year (1-12), numeric
23199
        case 'M':
23200
        case 'L':
23201
            formatter = dateGetter(DateType.Month, 1, 1);
23202
            break;
23203
        case 'MM':
23204
        case 'LL':
23205
            formatter = dateGetter(DateType.Month, 2, 1);
23206
            break;
23207
        // Month of the year (January, ...), string, format
23208
        case 'MMM':
23209
            formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated);
23210
            break;
23211
        case 'MMMM':
23212
            formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Wide);
23213
            break;
23214
        case 'MMMMM':
23215
            formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Narrow);
23216
            break;
23217
        // Month of the year (January, ...), string, standalone
23218
        case 'LLL':
23219
            formatter =
23220
                dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated, FormStyle.Standalone);
23221
            break;
23222
        case 'LLLL':
23223
            formatter =
23224
                dateStrGetter(TranslationType.Months, TranslationWidth.Wide, FormStyle.Standalone);
23225
            break;
23226
        case 'LLLLL':
23227
            formatter =
23228
                dateStrGetter(TranslationType.Months, TranslationWidth.Narrow, FormStyle.Standalone);
23229
            break;
23230
        // Week of the year (1, ... 52)
23231
        case 'w':
23232
            formatter = weekGetter(1);
23233
            break;
23234
        case 'ww':
23235
            formatter = weekGetter(2);
23236
            break;
23237
        // Week of the month (1, ...)
23238
        case 'W':
23239
            formatter = weekGetter(1, true);
23240
            break;
23241
        // Day of the month (1-31)
23242
        case 'd':
23243
            formatter = dateGetter(DateType.Date, 1);
23244
            break;
23245
        case 'dd':
23246
            formatter = dateGetter(DateType.Date, 2);
23247
            break;
23248
        // Day of the Week
23249
        case 'E':
23250
        case 'EE':
23251
        case 'EEE':
23252
            formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated);
23253
            break;
23254
        case 'EEEE':
23255
            formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Wide);
23256
            break;
23257
        case 'EEEEE':
23258
            formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Narrow);
23259
            break;
23260
        case 'EEEEEE':
23261
            formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Short);
23262
            break;
23263
        // Generic period of the day (am-pm)
23264
        case 'a':
23265
        case 'aa':
23266
        case 'aaa':
23267
            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated);
23268
            break;
23269
        case 'aaaa':
23270
            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide);
23271
            break;
23272
        case 'aaaaa':
23273
            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow);
23274
            break;
23275
        // Extended period of the day (midnight, at night, ...), standalone
23276
        case 'b':
23277
        case 'bb':
23278
        case 'bbb':
23279
            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Standalone, true);
23280
            break;
23281
        case 'bbbb':
23282
            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Standalone, true);
23283
            break;
23284
        case 'bbbbb':
23285
            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Standalone, true);
23286
            break;
23287
        // Extended period of the day (midnight, night, ...), standalone
23288
        case 'B':
23289
        case 'BB':
23290
        case 'BBB':
23291
            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Format, true);
23292
            break;
23293
        case 'BBBB':
23294
            formatter =
23295
                dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Format, true);
23296
            break;
23297
        case 'BBBBB':
23298
            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Format, true);
23299
            break;
23300
        // Hour in AM/PM, (1-12)
23301
        case 'h':
23302
            formatter = dateGetter(DateType.Hours, 1, -12);
23303
            break;
23304
        case 'hh':
23305
            formatter = dateGetter(DateType.Hours, 2, -12);
23306
            break;
23307
        // Hour of the day (0-23)
23308
        case 'H':
23309
            formatter = dateGetter(DateType.Hours, 1);
23310
            break;
23311
        // Hour in day, padded (00-23)
23312
        case 'HH':
23313
            formatter = dateGetter(DateType.Hours, 2);
23314
            break;
23315
        // Minute of the hour (0-59)
23316
        case 'm':
23317
            formatter = dateGetter(DateType.Minutes, 1);
23318
            break;
23319
        case 'mm':
23320
            formatter = dateGetter(DateType.Minutes, 2);
23321
            break;
23322
        // Second of the minute (0-59)
23323
        case 's':
23324
            formatter = dateGetter(DateType.Seconds, 1);
23325
            break;
23326
        case 'ss':
23327
            formatter = dateGetter(DateType.Seconds, 2);
23328
            break;
23329
        // Fractional second padded (0-9)
23330
        case 'S':
23331
            formatter = dateGetter(DateType.Milliseconds, 1);
23332
            break;
23333
        case 'SS':
23334
            formatter = dateGetter(DateType.Milliseconds, 2);
23335
            break;
23336
        // = millisecond
23337
        case 'SSS':
23338
            formatter = dateGetter(DateType.Milliseconds, 3);
23339
            break;
23340
        // Timezone ISO8601 short format (-0430)
23341
        case 'Z':
23342
        case 'ZZ':
23343
        case 'ZZZ':
23344
            formatter = timeZoneGetter(ZoneWidth.Short);
23345
            break;
23346
        // Timezone ISO8601 extended format (-04:30)
23347
        case 'ZZZZZ':
23348
            formatter = timeZoneGetter(ZoneWidth.Extended);
23349
            break;
23350
        // Timezone GMT short format (GMT+4)
23351
        case 'O':
23352
        case 'OO':
23353
        case 'OOO':
23354
        // Should be location, but fallback to format O instead because we don't have the data yet
23355
        case 'z':
23356
        case 'zz':
23357
        case 'zzz':
23358
            formatter = timeZoneGetter(ZoneWidth.ShortGMT);
23359
            break;
23360
        // Timezone GMT long format (GMT+0430)
23361
        case 'OOOO':
23362
        case 'ZZZZ':
23363
        // Should be location, but fallback to format O instead because we don't have the data yet
23364
        case 'zzzz':
23365
            formatter = timeZoneGetter(ZoneWidth.Long);
23366
            break;
23367
        default:
23368
            return null;
23369
    }
23370
    DATE_FORMATS[format] = formatter;
23371
    return formatter;
23372
}
23373
function timezoneToOffset(timezone, fallback) {
23374
    // Support: IE 9-11 only, Edge 13-15+
23375
    // IE/Edge do not "understand" colon (`:`) in timezone
23376
    timezone = timezone.replace(/:/g, '');
23377
    var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;
23378
    return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;
23379
}
23380
function addDateMinutes(date, minutes) {
23381
    date = new Date(date.getTime());
23382
    date.setMinutes(date.getMinutes() + minutes);
23383
    return date;
23384
}
23385
function convertTimezoneToLocal(date, timezone, reverse) {
23386
    var reverseValue = reverse ? -1 : 1;
23387
    var dateTimezoneOffset = date.getTimezoneOffset();
23388
    var timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);
23389
    return addDateMinutes(date, reverseValue * (timezoneOffset - dateTimezoneOffset));
23390
}
23391
/**
23392
 * Converts a value to date.
23393
 *
23394
 * Supported input formats:
23395
 * - `Date`
23396
 * - number: timestamp
23397
 * - string: numeric (e.g. "1234"), ISO and date strings in a format supported by
23398
 *   [Date.parse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).
23399
 *   Note: ISO strings without time return a date without timeoffset.
23400
 *
23401
 * Throws if unable to convert to a date.
23402
 */
23403
function toDate(value) {
23404
    if (isDate(value)) {
23405
        return value;
23406
    }
23407
    if (typeof value === 'number' && !isNaN(value)) {
23408
        return new Date(value);
23409
    }
23410
    if (typeof value === 'string') {
23411
        value = value.trim();
23412
        var parsedNb = parseFloat(value);
23413
        // any string that only contains numbers, like "1234" but not like "1234hello"
23414
        if (!isNaN(value - parsedNb)) {
23415
            return new Date(parsedNb);
23416
        }
23417
        if (/^(\d{4}-\d{1,2}-\d{1,2})$/.test(value)) {
23418
            /* For ISO Strings without time the day, month and year must be extracted from the ISO String
23419
                  before Date creation to avoid time offset and errors in the new Date.
23420
                  If we only replace '-' with ',' in the ISO String ("2015,01,01"), and try to create a new
23421
                  date, some browsers (e.g. IE 9) will throw an invalid Date error.
23422
                  If we leave the '-' ("2015-01-01") and try to create a new Date("2015-01-01") the timeoffset
23423
                  is applied.
23424
                  Note: ISO months are 0 for January, 1 for February, ... */
23425
            var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__read"])(value.split('-').map(function (val) { return +val; }), 3), y = _a[0], m = _a[1], d = _a[2];
23426
            return new Date(y, m - 1, d);
23427
        }
23428
        var match = void 0;
23429
        if (match = value.match(ISO8601_DATE_REGEX)) {
23430
            return isoStringToDate(match);
23431
        }
23432
    }
23433
    var date = new Date(value);
23434
    if (!isDate(date)) {
23435
        throw new Error("Unable to convert \"" + value + "\" into a date");
23436
    }
23437
    return date;
23438
}
23439
/**
23440
 * Converts a date in ISO8601 to a Date.
23441
 * Used instead of `Date.parse` because of browser discrepancies.
23442
 */
23443
function isoStringToDate(match) {
23444
    var date = new Date(0);
23445
    var tzHour = 0;
23446
    var tzMin = 0;
23447
    // match[8] means that the string contains "Z" (UTC) or a timezone like "+01:00" or "+0100"
23448
    var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;
23449
    var timeSetter = match[8] ? date.setUTCHours : date.setHours;
23450
    // if there is a timezone defined like "+01:00" or "+0100"
23451
    if (match[9]) {
23452
        tzHour = Number(match[9] + match[10]);
23453
        tzMin = Number(match[9] + match[11]);
23454
    }
23455
    dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));
23456
    var h = Number(match[4] || 0) - tzHour;
23457
    var m = Number(match[5] || 0) - tzMin;
23458
    var s = Number(match[6] || 0);
23459
    var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);
23460
    timeSetter.call(date, h, m, s, ms);
23461
    return date;
23462
}
23463
function isDate(value) {
23464
    return value instanceof Date && !isNaN(value.valueOf());
23465
}
23466
 
23467
/**
23468
 * @license
23469
 * Copyright Google Inc. All Rights Reserved.
23470
 *
23471
 * Use of this source code is governed by an MIT-style license that can be
23472
 * found in the LICENSE file at https://angular.io/license
23473
 */
23474
var NUMBER_FORMAT_REGEXP = /^(\d+)?\.((\d+)(-(\d+))?)?$/;
23475
var MAX_DIGITS = 22;
23476
var DECIMAL_SEP = '.';
23477
var ZERO_CHAR = '0';
23478
var PATTERN_SEP = ';';
23479
var GROUP_SEP = ',';
23480
var DIGIT_CHAR = '#';
23481
var CURRENCY_CHAR = '¤';
23482
var PERCENT_CHAR = '%';
23483
/**
23484
 * Transforms a number to a locale string based on a style and a format
23485
 */
23486
function formatNumberToLocaleString(value, pattern, locale, groupSymbol, decimalSymbol, digitsInfo, isPercent) {
23487
    if (isPercent === void 0) { isPercent = false; }
23488
    var formattedText = '';
23489
    var isZero = false;
23490
    if (!isFinite(value)) {
23491
        formattedText = getLocaleNumberSymbol(locale, NumberSymbol.Infinity);
23492
    }
23493
    else {
23494
        var parsedNumber = parseNumber(value);
23495
        if (isPercent) {
23496
            parsedNumber = toPercent(parsedNumber);
23497
        }
23498
        var minInt = pattern.minInt;
23499
        var minFraction = pattern.minFrac;
23500
        var maxFraction = pattern.maxFrac;
23501
        if (digitsInfo) {
23502
            var parts = digitsInfo.match(NUMBER_FORMAT_REGEXP);
23503
            if (parts === null) {
23504
                throw new Error(digitsInfo + " is not a valid digit info");
23505
            }
23506
            var minIntPart = parts[1];
23507
            var minFractionPart = parts[3];
23508
            var maxFractionPart = parts[5];
23509
            if (minIntPart != null) {
23510
                minInt = parseIntAutoRadix(minIntPart);
23511
            }
23512
            if (minFractionPart != null) {
23513
                minFraction = parseIntAutoRadix(minFractionPart);
23514
            }
23515
            if (maxFractionPart != null) {
23516
                maxFraction = parseIntAutoRadix(maxFractionPart);
23517
            }
23518
            else if (minFractionPart != null && minFraction > maxFraction) {
23519
                maxFraction = minFraction;
23520
            }
23521
        }
23522
        roundNumber(parsedNumber, minFraction, maxFraction);
23523
        var digits = parsedNumber.digits;
23524
        var integerLen = parsedNumber.integerLen;
23525
        var exponent = parsedNumber.exponent;
23526
        var decimals = [];
23527
        isZero = digits.every(function (d) { return !d; });
23528
        // pad zeros for small numbers
23529
        for (; integerLen < minInt; integerLen++) {
23530
            digits.unshift(0);
23531
        }
23532
        // pad zeros for small numbers
23533
        for (; integerLen < 0; integerLen++) {
23534
            digits.unshift(0);
23535
        }
23536
        // extract decimals digits
23537
        if (integerLen > 0) {
23538
            decimals = digits.splice(integerLen, digits.length);
23539
        }
23540
        else {
23541
            decimals = digits;
23542
            digits = [0];
23543
        }
23544
        // format the integer digits with grouping separators
23545
        var groups = [];
23546
        if (digits.length >= pattern.lgSize) {
23547
            groups.unshift(digits.splice(-pattern.lgSize, digits.length).join(''));
23548
        }
23549
        while (digits.length > pattern.gSize) {
23550
            groups.unshift(digits.splice(-pattern.gSize, digits.length).join(''));
23551
        }
23552
        if (digits.length) {
23553
            groups.unshift(digits.join(''));
23554
        }
23555
        formattedText = groups.join(getLocaleNumberSymbol(locale, groupSymbol));
23556
        // append the decimal digits
23557
        if (decimals.length) {
23558
            formattedText += getLocaleNumberSymbol(locale, decimalSymbol) + decimals.join('');
23559
        }
23560
        if (exponent) {
23561
            formattedText += getLocaleNumberSymbol(locale, NumberSymbol.Exponential) + '+' + exponent;
23562
        }
23563
    }
23564
    if (value < 0 && !isZero) {
23565
        formattedText = pattern.negPre + formattedText + pattern.negSuf;
23566
    }
23567
    else {
23568
        formattedText = pattern.posPre + formattedText + pattern.posSuf;
23569
    }
23570
    return formattedText;
23571
}
23572
/**
23573
 * @ngModule CommonModule
23574
 * @description
23575
 *
23576
 * Formats a number as currency using locale rules.
23577
 *
23578
 * Use `currency` to format a number as currency.
23579
 *
23580
 * Where:
23581
 * - `value` is a number.
23582
 * - `locale` is a `string` defining the locale to use.
23583
 * - `currency` is the string that represents the currency, it can be its symbol or its name.
23584
 * - `currencyCode` is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, such
23585
 *    as `USD` for the US dollar and `EUR` for the euro.
23586
 * - `digitInfo` See {@link DecimalPipe} for more details.
23587
 *
23588
 *
23589
 */
23590
function formatCurrency(value, locale, currency, currencyCode, digitsInfo) {
23591
    var format = getLocaleNumberFormat(locale, NumberFormatStyle.Currency);
23592
    var pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));
23593
    pattern.minFrac = getNumberOfCurrencyDigits((currencyCode));
23594
    pattern.maxFrac = pattern.minFrac;
23595
    var res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.CurrencyGroup, NumberSymbol.CurrencyDecimal, digitsInfo);
23596
    return res
23597
        .replace(CURRENCY_CHAR, currency)
23598
        .replace(CURRENCY_CHAR, '');
23599
}
23600
/**
23601
 * @ngModule CommonModule
23602
 * @description
23603
 *
23604
 * Formats a number as a percentage according to locale rules.
23605
 *
23606
 * Where:
23607
 * - `value` is a number.
23608
 * - `locale` is a `string` defining the locale to use.
23609
 * - `digitInfo` See {@link DecimalPipe} for more details.
23610
 *
23611
 *
23612
 */
23613
function formatPercent(value, locale, digitsInfo) {
23614
    var format = getLocaleNumberFormat(locale, NumberFormatStyle.Percent);
23615
    var pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));
23616
    var res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo, true);
23617
    return res.replace(new RegExp(PERCENT_CHAR, 'g'), getLocaleNumberSymbol(locale, NumberSymbol.PercentSign));
23618
}
23619
/**
23620
 * @ngModule CommonModule
23621
 * @description
23622
 *
23623
 * Formats a number as text. Group sizing and separator and other locale-specific
23624
 * configurations are based on the locale.
23625
 *
23626
 * Where:
23627
 * - `value` is a number.
23628
 * - `locale` is a `string` defining the locale to use.
23629
 * - `digitInfo` See {@link DecimalPipe} for more details.
23630
 *
23631
 *
23632
 */
23633
function formatNumber(value, locale, digitsInfo) {
23634
    var format = getLocaleNumberFormat(locale, NumberFormatStyle.Decimal);
23635
    var pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));
23636
    return formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo);
23637
}
23638
function parseNumberFormat(format, minusSign) {
23639
    if (minusSign === void 0) { minusSign = '-'; }
23640
    var p = {
23641
        minInt: 1,
23642
        minFrac: 0,
23643
        maxFrac: 0,
23644
        posPre: '',
23645
        posSuf: '',
23646
        negPre: '',
23647
        negSuf: '',
23648
        gSize: 0,
23649
        lgSize: 0
23650
    };
23651
    var patternParts = format.split(PATTERN_SEP);
23652
    var positive = patternParts[0];
23653
    var negative = patternParts[1];
23654
    var positiveParts = positive.indexOf(DECIMAL_SEP) !== -1 ?
23655
        positive.split(DECIMAL_SEP) :
23656
        [
23657
            positive.substring(0, positive.lastIndexOf(ZERO_CHAR) + 1),
23658
            positive.substring(positive.lastIndexOf(ZERO_CHAR) + 1)
23659
        ], integer = positiveParts[0], fraction = positiveParts[1] || '';
23660
    p.posPre = integer.substr(0, integer.indexOf(DIGIT_CHAR));
23661
    for (var i = 0; i < fraction.length; i++) {
23662
        var ch = fraction.charAt(i);
23663
        if (ch === ZERO_CHAR) {
23664
            p.minFrac = p.maxFrac = i + 1;
23665
        }
23666
        else if (ch === DIGIT_CHAR) {
23667
            p.maxFrac = i + 1;
23668
        }
23669
        else {
23670
            p.posSuf += ch;
23671
        }
23672
    }
23673
    var groups = integer.split(GROUP_SEP);
23674
    p.gSize = groups[1] ? groups[1].length : 0;
23675
    p.lgSize = (groups[2] || groups[1]) ? (groups[2] || groups[1]).length : 0;
23676
    if (negative) {
23677
        var trunkLen = positive.length - p.posPre.length - p.posSuf.length, pos = negative.indexOf(DIGIT_CHAR);
23678
        p.negPre = negative.substr(0, pos).replace(/'/g, '');
23679
        p.negSuf = negative.substr(pos + trunkLen).replace(/'/g, '');
23680
    }
23681
    else {
23682
        p.negPre = minusSign + p.posPre;
23683
        p.negSuf = p.posSuf;
23684
    }
23685
    return p;
23686
}
23687
// Transforms a parsed number into a percentage by multiplying it by 100
23688
function toPercent(parsedNumber) {
23689
    // if the number is 0, don't do anything
23690
    if (parsedNumber.digits[0] === 0) {
23691
        return parsedNumber;
23692
    }
23693
    // Getting the current number of decimals
23694
    var fractionLen = parsedNumber.digits.length - parsedNumber.integerLen;
23695
    if (parsedNumber.exponent) {
23696
        parsedNumber.exponent += 2;
23697
    }
23698
    else {
23699
        if (fractionLen === 0) {
23700
            parsedNumber.digits.push(0, 0);
23701
        }
23702
        else if (fractionLen === 1) {
23703
            parsedNumber.digits.push(0);
23704
        }
23705
        parsedNumber.integerLen += 2;
23706
    }
23707
    return parsedNumber;
23708
}
23709
/**
23710
 * Parses a number.
23711
 * Significant bits of this parse algorithm came from https://github.com/MikeMcl/big.js/
23712
 */
23713
function parseNumber(num) {
23714
    var numStr = Math.abs(num) + '';
23715
    var exponent = 0, digits, integerLen;
23716
    var i, j, zeros;
23717
    // Decimal point?
23718
    if ((integerLen = numStr.indexOf(DECIMAL_SEP)) > -1) {
23719
        numStr = numStr.replace(DECIMAL_SEP, '');
23720
    }
23721
    // Exponential form?
23722
    if ((i = numStr.search(/e/i)) > 0) {
23723
        // Work out the exponent.
23724
        if (integerLen < 0)
23725
            integerLen = i;
23726
        integerLen += +numStr.slice(i + 1);
23727
        numStr = numStr.substring(0, i);
23728
    }
23729
    else if (integerLen < 0) {
23730
        // There was no decimal point or exponent so it is an integer.
23731
        integerLen = numStr.length;
23732
    }
23733
    // Count the number of leading zeros.
23734
    for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) {
23735
        /* empty */
23736
    }
23737
    if (i === (zeros = numStr.length)) {
23738
        // The digits are all zero.
23739
        digits = [0];
23740
        integerLen = 1;
23741
    }
23742
    else {
23743
        // Count the number of trailing zeros
23744
        zeros--;
23745
        while (numStr.charAt(zeros) === ZERO_CHAR)
23746
            zeros--;
23747
        // Trailing zeros are insignificant so ignore them
23748
        integerLen -= i;
23749
        digits = [];
23750
        // Convert string to array of digits without leading/trailing zeros.
23751
        for (j = 0; i <= zeros; i++, j++) {
23752
            digits[j] = Number(numStr.charAt(i));
23753
        }
23754
    }
23755
    // If the number overflows the maximum allowed digits then use an exponent.
23756
    if (integerLen > MAX_DIGITS) {
23757
        digits = digits.splice(0, MAX_DIGITS - 1);
23758
        exponent = integerLen - 1;
23759
        integerLen = 1;
23760
    }
23761
    return { digits: digits, exponent: exponent, integerLen: integerLen };
23762
}
23763
/**
23764
 * Round the parsed number to the specified number of decimal places
23765
 * This function changes the parsedNumber in-place
23766
 */
23767
function roundNumber(parsedNumber, minFrac, maxFrac) {
23768
    if (minFrac > maxFrac) {
23769
        throw new Error("The minimum number of digits after fraction (" + minFrac + ") is higher than the maximum (" + maxFrac + ").");
23770
    }
23771
    var digits = parsedNumber.digits;
23772
    var fractionLen = digits.length - parsedNumber.integerLen;
23773
    var fractionSize = Math.min(Math.max(minFrac, fractionLen), maxFrac);
23774
    // The index of the digit to where rounding is to occur
23775
    var roundAt = fractionSize + parsedNumber.integerLen;
23776
    var digit = digits[roundAt];
23777
    if (roundAt > 0) {
23778
        // Drop fractional digits beyond `roundAt`
23779
        digits.splice(Math.max(parsedNumber.integerLen, roundAt));
23780
        // Set non-fractional digits beyond `roundAt` to 0
23781
        for (var j = roundAt; j < digits.length; j++) {
23782
            digits[j] = 0;
23783
        }
23784
    }
23785
    else {
23786
        // We rounded to zero so reset the parsedNumber
23787
        fractionLen = Math.max(0, fractionLen);
23788
        parsedNumber.integerLen = 1;
23789
        digits.length = Math.max(1, roundAt = fractionSize + 1);
23790
        digits[0] = 0;
23791
        for (var i = 1; i < roundAt; i++)
23792
            digits[i] = 0;
23793
    }
23794
    if (digit >= 5) {
23795
        if (roundAt - 1 < 0) {
23796
            for (var k = 0; k > roundAt; k--) {
23797
                digits.unshift(0);
23798
                parsedNumber.integerLen++;
23799
            }
23800
            digits.unshift(1);
23801
            parsedNumber.integerLen++;
23802
        }
23803
        else {
23804
            digits[roundAt - 1]++;
23805
        }
23806
    }
23807
    // Pad out with zeros to get the required fraction length
23808
    for (; fractionLen < Math.max(0, fractionSize); fractionLen++)
23809
        digits.push(0);
23810
    var dropTrailingZeros = fractionSize !== 0;
23811
    // Minimal length = nb of decimals required + current nb of integers
23812
    // Any number besides that is optional and can be removed if it's a trailing 0
23813
    var minLen = minFrac + parsedNumber.integerLen;
23814
    // Do any carrying, e.g. a digit was rounded up to 10
23815
    var carry = digits.reduceRight(function (carry, d, i, digits) {
23816
        d = d + carry;
23817
        digits[i] = d < 10 ? d : d - 10; // d % 10
23818
        if (dropTrailingZeros) {
23819
            // Do not keep meaningless fractional trailing zeros (e.g. 15.52000 --> 15.52)
23820
            if (digits[i] === 0 && i >= minLen) {
23821
                digits.pop();
23822
            }
23823
            else {
23824
                dropTrailingZeros = false;
23825
            }
23826
        }
23827
        return d >= 10 ? 1 : 0; // Math.floor(d / 10);
23828
    }, 0);
23829
    if (carry) {
23830
        digits.unshift(carry);
23831
        parsedNumber.integerLen++;
23832
    }
23833
}
23834
function parseIntAutoRadix(text) {
23835
    var result = parseInt(text);
23836
    if (isNaN(result)) {
23837
        throw new Error('Invalid integer literal when parsing ' + text);
23838
    }
23839
    return result;
23840
}
23841
 
23842
/**
23843
 * @license
23844
 * Copyright Google Inc. All Rights Reserved.
23845
 *
23846
 * Use of this source code is governed by an MIT-style license that can be
23847
 * found in the LICENSE file at https://angular.io/license
23848
 */
23849
/**
23850
 * @deprecated from v5
23851
 */
23852
var DEPRECATED_PLURAL_FN = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('UseV4Plurals');
23853
/**
23854
 * @experimental
23855
 */
23856
var NgLocalization = /** @class */ (function () {
23857
    function NgLocalization() {
23858
    }
23859
    return NgLocalization;
23860
}());
23861
/**
23862
 * Returns the plural category for a given value.
23863
 * - "=value" when the case exists,
23864
 * - the plural category otherwise
23865
 */
23866
function getPluralCategory(value, cases, ngLocalization, locale) {
23867
    var key = "=" + value;
23868
    if (cases.indexOf(key) > -1) {
23869
        return key;
23870
    }
23871
    key = ngLocalization.getPluralCategory(value, locale);
23872
    if (cases.indexOf(key) > -1) {
23873
        return key;
23874
    }
23875
    if (cases.indexOf('other') > -1) {
23876
        return 'other';
23877
    }
23878
    throw new Error("No plural message found for value \"" + value + "\"");
23879
}
23880
/**
23881
 * Returns the plural case based on the locale
23882
 *
23883
 * @experimental
23884
 */
23885
var NgLocaleLocalization = /** @class */ (function (_super) {
23886
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(NgLocaleLocalization, _super);
23887
    function NgLocaleLocalization(locale, /** @deprecated from v5 */
23888
    deprecatedPluralFn) {
23889
        var _this = _super.call(this) || this;
23890
        _this.locale = locale;
23891
        _this.deprecatedPluralFn = deprecatedPluralFn;
23892
        return _this;
23893
    }
23894
    NgLocaleLocalization.prototype.getPluralCategory = function (value, locale) {
23895
        var plural = this.deprecatedPluralFn ? this.deprecatedPluralFn(locale || this.locale, value) :
23896
            getLocalePluralCase(locale || this.locale)(value);
23897
        switch (plural) {
23898
            case Plural.Zero:
23899
                return 'zero';
23900
            case Plural.One:
23901
                return 'one';
23902
            case Plural.Two:
23903
                return 'two';
23904
            case Plural.Few:
23905
                return 'few';
23906
            case Plural.Many:
23907
                return 'many';
23908
            default:
23909
                return 'other';
23910
        }
23911
    };
23912
    NgLocaleLocalization.decorators = [
23913
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }
23914
    ];
23915
    /** @nocollapse */
23916
    NgLocaleLocalization.ctorParameters = function () { return [
23917
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"],] },] },
23918
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [DEPRECATED_PLURAL_FN,] },] },
23919
    ]; };
23920
    return NgLocaleLocalization;
23921
}(NgLocalization));
23922
/**
23923
 * Returns the plural case based on the locale
23924
 *
23925
 * @deprecated from v5 the plural case function is in locale data files common/locales/*.ts
23926
 * @experimental
23927
 */
23928
function getPluralCase(locale, nLike) {
23929
    // TODO(vicb): lazy compute
23930
    if (typeof nLike === 'string') {
23931
        nLike = parseInt(nLike, 10);
23932
    }
23933
    var n = nLike;
23934
    var nDecimal = n.toString().replace(/^[^.]*\.?/, '');
23935
    var i = Math.floor(Math.abs(n));
23936
    var v = nDecimal.length;
23937
    var f = parseInt(nDecimal, 10);
23938
    var t = parseInt(n.toString().replace(/^[^.]*\.?|0+$/g, ''), 10) || 0;
23939
    var lang = locale.split('-')[0].toLowerCase();
23940
    switch (lang) {
23941
        case 'af':
23942
        case 'asa':
23943
        case 'az':
23944
        case 'bem':
23945
        case 'bez':
23946
        case 'bg':
23947
        case 'brx':
23948
        case 'ce':
23949
        case 'cgg':
23950
        case 'chr':
23951
        case 'ckb':
23952
        case 'ee':
23953
        case 'el':
23954
        case 'eo':
23955
        case 'es':
23956
        case 'eu':
23957
        case 'fo':
23958
        case 'fur':
23959
        case 'gsw':
23960
        case 'ha':
23961
        case 'haw':
23962
        case 'hu':
23963
        case 'jgo':
23964
        case 'jmc':
23965
        case 'ka':
23966
        case 'kk':
23967
        case 'kkj':
23968
        case 'kl':
23969
        case 'ks':
23970
        case 'ksb':
23971
        case 'ky':
23972
        case 'lb':
23973
        case 'lg':
23974
        case 'mas':
23975
        case 'mgo':
23976
        case 'ml':
23977
        case 'mn':
23978
        case 'nb':
23979
        case 'nd':
23980
        case 'ne':
23981
        case 'nn':
23982
        case 'nnh':
23983
        case 'nyn':
23984
        case 'om':
23985
        case 'or':
23986
        case 'os':
23987
        case 'ps':
23988
        case 'rm':
23989
        case 'rof':
23990
        case 'rwk':
23991
        case 'saq':
23992
        case 'seh':
23993
        case 'sn':
23994
        case 'so':
23995
        case 'sq':
23996
        case 'ta':
23997
        case 'te':
23998
        case 'teo':
23999
        case 'tk':
24000
        case 'tr':
24001
        case 'ug':
24002
        case 'uz':
24003
        case 'vo':
24004
        case 'vun':
24005
        case 'wae':
24006
        case 'xog':
24007
            if (n === 1)
24008
                return Plural.One;
24009
            return Plural.Other;
24010
        case 'ak':
24011
        case 'ln':
24012
        case 'mg':
24013
        case 'pa':
24014
        case 'ti':
24015
            if (n === Math.floor(n) && n >= 0 && n <= 1)
24016
                return Plural.One;
24017
            return Plural.Other;
24018
        case 'am':
24019
        case 'as':
24020
        case 'bn':
24021
        case 'fa':
24022
        case 'gu':
24023
        case 'hi':
24024
        case 'kn':
24025
        case 'mr':
24026
        case 'zu':
24027
            if (i === 0 || n === 1)
24028
                return Plural.One;
24029
            return Plural.Other;
24030
        case 'ar':
24031
            if (n === 0)
24032
                return Plural.Zero;
24033
            if (n === 1)
24034
                return Plural.One;
24035
            if (n === 2)
24036
                return Plural.Two;
24037
            if (n % 100 === Math.floor(n % 100) && n % 100 >= 3 && n % 100 <= 10)
24038
                return Plural.Few;
24039
            if (n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 99)
24040
                return Plural.Many;
24041
            return Plural.Other;
24042
        case 'ast':
24043
        case 'ca':
24044
        case 'de':
24045
        case 'en':
24046
        case 'et':
24047
        case 'fi':
24048
        case 'fy':
24049
        case 'gl':
24050
        case 'it':
24051
        case 'nl':
24052
        case 'sv':
24053
        case 'sw':
24054
        case 'ur':
24055
        case 'yi':
24056
            if (i === 1 && v === 0)
24057
                return Plural.One;
24058
            return Plural.Other;
24059
        case 'be':
24060
            if (n % 10 === 1 && !(n % 100 === 11))
24061
                return Plural.One;
24062
            if (n % 10 === Math.floor(n % 10) && n % 10 >= 2 && n % 10 <= 4 &&
24063
                !(n % 100 >= 12 && n % 100 <= 14))
24064
                return Plural.Few;
24065
            if (n % 10 === 0 || n % 10 === Math.floor(n % 10) && n % 10 >= 5 && n % 10 <= 9 ||
24066
                n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 14)
24067
                return Plural.Many;
24068
            return Plural.Other;
24069
        case 'br':
24070
            if (n % 10 === 1 && !(n % 100 === 11 || n % 100 === 71 || n % 100 === 91))
24071
                return Plural.One;
24072
            if (n % 10 === 2 && !(n % 100 === 12 || n % 100 === 72 || n % 100 === 92))
24073
                return Plural.Two;
24074
            if (n % 10 === Math.floor(n % 10) && (n % 10 >= 3 && n % 10 <= 4 || n % 10 === 9) &&
24075
                !(n % 100 >= 10 && n % 100 <= 19 || n % 100 >= 70 && n % 100 <= 79 ||
24076
                    n % 100 >= 90 && n % 100 <= 99))
24077
                return Plural.Few;
24078
            if (!(n === 0) && n % 1e6 === 0)
24079
                return Plural.Many;
24080
            return Plural.Other;
24081
        case 'bs':
24082
        case 'hr':
24083
        case 'sr':
24084
            if (v === 0 && i % 10 === 1 && !(i % 100 === 11) || f % 10 === 1 && !(f % 100 === 11))
24085
                return Plural.One;
24086
            if (v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 2 && i % 10 <= 4 &&
24087
                !(i % 100 >= 12 && i % 100 <= 14) ||
24088
                f % 10 === Math.floor(f % 10) && f % 10 >= 2 && f % 10 <= 4 &&
24089
                    !(f % 100 >= 12 && f % 100 <= 14))
24090
                return Plural.Few;
24091
            return Plural.Other;
24092
        case 'cs':
24093
        case 'sk':
24094
            if (i === 1 && v === 0)
24095
                return Plural.One;
24096
            if (i === Math.floor(i) && i >= 2 && i <= 4 && v === 0)
24097
                return Plural.Few;
24098
            if (!(v === 0))
24099
                return Plural.Many;
24100
            return Plural.Other;
24101
        case 'cy':
24102
            if (n === 0)
24103
                return Plural.Zero;
24104
            if (n === 1)
24105
                return Plural.One;
24106
            if (n === 2)
24107
                return Plural.Two;
24108
            if (n === 3)
24109
                return Plural.Few;
24110
            if (n === 6)
24111
                return Plural.Many;
24112
            return Plural.Other;
24113
        case 'da':
24114
            if (n === 1 || !(t === 0) && (i === 0 || i === 1))
24115
                return Plural.One;
24116
            return Plural.Other;
24117
        case 'dsb':
24118
        case 'hsb':
24119
            if (v === 0 && i % 100 === 1 || f % 100 === 1)
24120
                return Plural.One;
24121
            if (v === 0 && i % 100 === 2 || f % 100 === 2)
24122
                return Plural.Two;
24123
            if (v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 3 && i % 100 <= 4 ||
24124
                f % 100 === Math.floor(f % 100) && f % 100 >= 3 && f % 100 <= 4)
24125
                return Plural.Few;
24126
            return Plural.Other;
24127
        case 'ff':
24128
        case 'fr':
24129
        case 'hy':
24130
        case 'kab':
24131
            if (i === 0 || i === 1)
24132
                return Plural.One;
24133
            return Plural.Other;
24134
        case 'fil':
24135
            if (v === 0 && (i === 1 || i === 2 || i === 3) ||
24136
                v === 0 && !(i % 10 === 4 || i % 10 === 6 || i % 10 === 9) ||
24137
                !(v === 0) && !(f % 10 === 4 || f % 10 === 6 || f % 10 === 9))
24138
                return Plural.One;
24139
            return Plural.Other;
24140
        case 'ga':
24141
            if (n === 1)
24142
                return Plural.One;
24143
            if (n === 2)
24144
                return Plural.Two;
24145
            if (n === Math.floor(n) && n >= 3 && n <= 6)
24146
                return Plural.Few;
24147
            if (n === Math.floor(n) && n >= 7 && n <= 10)
24148
                return Plural.Many;
24149
            return Plural.Other;
24150
        case 'gd':
24151
            if (n === 1 || n === 11)
24152
                return Plural.One;
24153
            if (n === 2 || n === 12)
24154
                return Plural.Two;
24155
            if (n === Math.floor(n) && (n >= 3 && n <= 10 || n >= 13 && n <= 19))
24156
                return Plural.Few;
24157
            return Plural.Other;
24158
        case 'gv':
24159
            if (v === 0 && i % 10 === 1)
24160
                return Plural.One;
24161
            if (v === 0 && i % 10 === 2)
24162
                return Plural.Two;
24163
            if (v === 0 &&
24164
                (i % 100 === 0 || i % 100 === 20 || i % 100 === 40 || i % 100 === 60 || i % 100 === 80))
24165
                return Plural.Few;
24166
            if (!(v === 0))
24167
                return Plural.Many;
24168
            return Plural.Other;
24169
        case 'he':
24170
            if (i === 1 && v === 0)
24171
                return Plural.One;
24172
            if (i === 2 && v === 0)
24173
                return Plural.Two;
24174
            if (v === 0 && !(n >= 0 && n <= 10) && n % 10 === 0)
24175
                return Plural.Many;
24176
            return Plural.Other;
24177
        case 'is':
24178
            if (t === 0 && i % 10 === 1 && !(i % 100 === 11) || !(t === 0))
24179
                return Plural.One;
24180
            return Plural.Other;
24181
        case 'ksh':
24182
            if (n === 0)
24183
                return Plural.Zero;
24184
            if (n === 1)
24185
                return Plural.One;
24186
            return Plural.Other;
24187
        case 'kw':
24188
        case 'naq':
24189
        case 'se':
24190
        case 'smn':
24191
            if (n === 1)
24192
                return Plural.One;
24193
            if (n === 2)
24194
                return Plural.Two;
24195
            return Plural.Other;
24196
        case 'lag':
24197
            if (n === 0)
24198
                return Plural.Zero;
24199
            if ((i === 0 || i === 1) && !(n === 0))
24200
                return Plural.One;
24201
            return Plural.Other;
24202
        case 'lt':
24203
            if (n % 10 === 1 && !(n % 100 >= 11 && n % 100 <= 19))
24204
                return Plural.One;
24205
            if (n % 10 === Math.floor(n % 10) && n % 10 >= 2 && n % 10 <= 9 &&
24206
                !(n % 100 >= 11 && n % 100 <= 19))
24207
                return Plural.Few;
24208
            if (!(f === 0))
24209
                return Plural.Many;
24210
            return Plural.Other;
24211
        case 'lv':
24212
        case 'prg':
24213
            if (n % 10 === 0 || n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 19 ||
24214
                v === 2 && f % 100 === Math.floor(f % 100) && f % 100 >= 11 && f % 100 <= 19)
24215
                return Plural.Zero;
24216
            if (n % 10 === 1 && !(n % 100 === 11) || v === 2 && f % 10 === 1 && !(f % 100 === 11) ||
24217
                !(v === 2) && f % 10 === 1)
24218
                return Plural.One;
24219
            return Plural.Other;
24220
        case 'mk':
24221
            if (v === 0 && i % 10 === 1 || f % 10 === 1)
24222
                return Plural.One;
24223
            return Plural.Other;
24224
        case 'mt':
24225
            if (n === 1)
24226
                return Plural.One;
24227
            if (n === 0 || n % 100 === Math.floor(n % 100) && n % 100 >= 2 && n % 100 <= 10)
24228
                return Plural.Few;
24229
            if (n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 19)
24230
                return Plural.Many;
24231
            return Plural.Other;
24232
        case 'pl':
24233
            if (i === 1 && v === 0)
24234
                return Plural.One;
24235
            if (v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 2 && i % 10 <= 4 &&
24236
                !(i % 100 >= 12 && i % 100 <= 14))
24237
                return Plural.Few;
24238
            if (v === 0 && !(i === 1) && i % 10 === Math.floor(i % 10) && i % 10 >= 0 && i % 10 <= 1 ||
24239
                v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 5 && i % 10 <= 9 ||
24240
                v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 12 && i % 100 <= 14)
24241
                return Plural.Many;
24242
            return Plural.Other;
24243
        case 'pt':
24244
            if (n === Math.floor(n) && n >= 0 && n <= 2 && !(n === 2))
24245
                return Plural.One;
24246
            return Plural.Other;
24247
        case 'ro':
24248
            if (i === 1 && v === 0)
24249
                return Plural.One;
24250
            if (!(v === 0) || n === 0 ||
24251
                !(n === 1) && n % 100 === Math.floor(n % 100) && n % 100 >= 1 && n % 100 <= 19)
24252
                return Plural.Few;
24253
            return Plural.Other;
24254
        case 'ru':
24255
        case 'uk':
24256
            if (v === 0 && i % 10 === 1 && !(i % 100 === 11))
24257
                return Plural.One;
24258
            if (v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 2 && i % 10 <= 4 &&
24259
                !(i % 100 >= 12 && i % 100 <= 14))
24260
                return Plural.Few;
24261
            if (v === 0 && i % 10 === 0 ||
24262
                v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 5 && i % 10 <= 9 ||
24263
                v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 11 && i % 100 <= 14)
24264
                return Plural.Many;
24265
            return Plural.Other;
24266
        case 'shi':
24267
            if (i === 0 || n === 1)
24268
                return Plural.One;
24269
            if (n === Math.floor(n) && n >= 2 && n <= 10)
24270
                return Plural.Few;
24271
            return Plural.Other;
24272
        case 'si':
24273
            if (n === 0 || n === 1 || i === 0 && f === 1)
24274
                return Plural.One;
24275
            return Plural.Other;
24276
        case 'sl':
24277
            if (v === 0 && i % 100 === 1)
24278
                return Plural.One;
24279
            if (v === 0 && i % 100 === 2)
24280
                return Plural.Two;
24281
            if (v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 3 && i % 100 <= 4 || !(v === 0))
24282
                return Plural.Few;
24283
            return Plural.Other;
24284
        case 'tzm':
24285
            if (n === Math.floor(n) && n >= 0 && n <= 1 || n === Math.floor(n) && n >= 11 && n <= 99)
24286
                return Plural.One;
24287
            return Plural.Other;
24288
        // When there is no specification, the default is always "other"
24289
        // Spec: http://cldr.unicode.org/index/cldr-spec/plural-rules
24290
        // > other (required—general plural form — also used if the language only has a single form)
24291
        default:
24292
            return Plural.Other;
24293
    }
24294
}
24295
 
24296
/**
24297
 * @license
24298
 * Copyright Google Inc. All Rights Reserved.
24299
 *
24300
 * Use of this source code is governed by an MIT-style license that can be
24301
 * found in the LICENSE file at https://angular.io/license
24302
 */
24303
function parseCookieValue(cookieStr, name) {
24304
    name = encodeURIComponent(name);
24305
    try {
24306
        for (var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__values"])(cookieStr.split(';')), _b = _a.next(); !_b.done; _b = _a.next()) {
24307
            var cookie = _b.value;
24308
            var eqIndex = cookie.indexOf('=');
24309
            var _c = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__read"])(eqIndex == -1 ? [cookie, ''] : [cookie.slice(0, eqIndex), cookie.slice(eqIndex + 1)], 2), cookieName = _c[0], cookieValue = _c[1];
24310
            if (cookieName.trim() === name) {
24311
                return decodeURIComponent(cookieValue);
24312
            }
24313
        }
24314
    }
24315
    catch (e_1_1) { e_1 = { error: e_1_1 }; }
24316
    finally {
24317
        try {
24318
            if (_b && !_b.done && (_d = _a.return)) _d.call(_a);
24319
        }
24320
        finally { if (e_1) throw e_1.error; }
24321
    }
24322
    return null;
24323
    var e_1, _d;
24324
}
24325
 
24326
/**
24327
 * @license
24328
 * Copyright Google Inc. All Rights Reserved.
24329
 *
24330
 * Use of this source code is governed by an MIT-style license that can be
24331
 * found in the LICENSE file at https://angular.io/license
24332
 */
24333
/**
24334
 * @ngModule CommonModule
24335
 *
24336
 * @usageNotes
24337
 * ```
24338
 *     <some-element [ngClass]="'first second'">...</some-element>
24339
 *
24340
 *     <some-element [ngClass]="['first', 'second']">...</some-element>
24341
 *
24342
 *     <some-element [ngClass]="{'first': true, 'second': true, 'third': false}">...</some-element>
24343
 *
24344
 *     <some-element [ngClass]="stringExp|arrayExp|objExp">...</some-element>
24345
 *
24346
 *     <some-element [ngClass]="{'class1 class2 class3' : true}">...</some-element>
24347
 * ```
24348
 *
24349
 * @description
24350
 *
24351
 * Adds and removes CSS classes on an HTML element.
24352
 *
24353
 * The CSS classes are updated as follows, depending on the type of the expression evaluation:
24354
 * - `string` - the CSS classes listed in the string (space delimited) are added,
24355
 * - `Array` - the CSS classes declared as Array elements are added,
24356
 * - `Object` - keys are CSS classes that get added when the expression given in the value
24357
 *              evaluates to a truthy value, otherwise they are removed.
24358
 *
24359
 *
24360
 */
24361
var NgClass = /** @class */ (function () {
24362
    function NgClass(_iterableDiffers, _keyValueDiffers, _ngEl, _renderer) {
24363
        this._iterableDiffers = _iterableDiffers;
24364
        this._keyValueDiffers = _keyValueDiffers;
24365
        this._ngEl = _ngEl;
24366
        this._renderer = _renderer;
24367
        this._initialClasses = [];
24368
    }
24369
    Object.defineProperty(NgClass.prototype, "klass", {
24370
        set: function (v) {
24371
            this._removeClasses(this._initialClasses);
24372
            this._initialClasses = typeof v === 'string' ? v.split(/\s+/) : [];
24373
            this._applyClasses(this._initialClasses);
24374
            this._applyClasses(this._rawClass);
24375
        },
24376
        enumerable: true,
24377
        configurable: true
24378
    });
24379
    Object.defineProperty(NgClass.prototype, "ngClass", {
24380
        set: function (v) {
24381
            this._removeClasses(this._rawClass);
24382
            this._applyClasses(this._initialClasses);
24383
            this._iterableDiffer = null;
24384
            this._keyValueDiffer = null;
24385
            this._rawClass = typeof v === 'string' ? v.split(/\s+/) : v;
24386
            if (this._rawClass) {
24387
                if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵisListLikeIterable"])(this._rawClass)) {
24388
                    this._iterableDiffer = this._iterableDiffers.find(this._rawClass).create();
24389
                }
24390
                else {
24391
                    this._keyValueDiffer = this._keyValueDiffers.find(this._rawClass).create();
24392
                }
24393
            }
24394
        },
24395
        enumerable: true,
24396
        configurable: true
24397
    });
24398
    NgClass.prototype.ngDoCheck = function () {
24399
        if (this._iterableDiffer) {
24400
            var iterableChanges = this._iterableDiffer.diff(this._rawClass);
24401
            if (iterableChanges) {
24402
                this._applyIterableChanges(iterableChanges);
24403
            }
24404
        }
24405
        else if (this._keyValueDiffer) {
24406
            var keyValueChanges = this._keyValueDiffer.diff(this._rawClass);
24407
            if (keyValueChanges) {
24408
                this._applyKeyValueChanges(keyValueChanges);
24409
            }
24410
        }
24411
    };
24412
    NgClass.prototype._applyKeyValueChanges = function (changes) {
24413
        var _this = this;
24414
        changes.forEachAddedItem(function (record) { return _this._toggleClass(record.key, record.currentValue); });
24415
        changes.forEachChangedItem(function (record) { return _this._toggleClass(record.key, record.currentValue); });
24416
        changes.forEachRemovedItem(function (record) {
24417
            if (record.previousValue) {
24418
                _this._toggleClass(record.key, false);
24419
            }
24420
        });
24421
    };
24422
    NgClass.prototype._applyIterableChanges = function (changes) {
24423
        var _this = this;
24424
        changes.forEachAddedItem(function (record) {
24425
            if (typeof record.item === 'string') {
24426
                _this._toggleClass(record.item, true);
24427
            }
24428
            else {
24429
                throw new Error("NgClass can only toggle CSS classes expressed as strings, got " + Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵstringify"])(record.item));
24430
            }
24431
        });
24432
        changes.forEachRemovedItem(function (record) { return _this._toggleClass(record.item, false); });
24433
    };
24434
    /**
24435
     * Applies a collection of CSS classes to the DOM element.
24436
     *
24437
     * For argument of type Set and Array CSS class names contained in those collections are always
24438
     * added.
24439
     * For argument of type Map CSS class name in the map's key is toggled based on the value (added
24440
     * for truthy and removed for falsy).
24441
     */
24442
    /**
24443
       * Applies a collection of CSS classes to the DOM element.
24444
       *
24445
       * For argument of type Set and Array CSS class names contained in those collections are always
24446
       * added.
24447
       * For argument of type Map CSS class name in the map's key is toggled based on the value (added
24448
       * for truthy and removed for falsy).
24449
       */
24450
    NgClass.prototype._applyClasses = /**
24451
       * Applies a collection of CSS classes to the DOM element.
24452
       *
24453
       * For argument of type Set and Array CSS class names contained in those collections are always
24454
       * added.
24455
       * For argument of type Map CSS class name in the map's key is toggled based on the value (added
24456
       * for truthy and removed for falsy).
24457
       */
24458
    function (rawClassVal) {
24459
        var _this = this;
24460
        if (rawClassVal) {
24461
            if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {
24462
                rawClassVal.forEach(function (klass) { return _this._toggleClass(klass, true); });
24463
            }
24464
            else {
24465
                Object.keys(rawClassVal).forEach(function (klass) { return _this._toggleClass(klass, !!rawClassVal[klass]); });
24466
            }
24467
        }
24468
    };
24469
    /**
24470
     * Removes a collection of CSS classes from the DOM element. This is mostly useful for cleanup
24471
     * purposes.
24472
     */
24473
    /**
24474
       * Removes a collection of CSS classes from the DOM element. This is mostly useful for cleanup
24475
       * purposes.
24476
       */
24477
    NgClass.prototype._removeClasses = /**
24478
       * Removes a collection of CSS classes from the DOM element. This is mostly useful for cleanup
24479
       * purposes.
24480
       */
24481
    function (rawClassVal) {
24482
        var _this = this;
24483
        if (rawClassVal) {
24484
            if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {
24485
                rawClassVal.forEach(function (klass) { return _this._toggleClass(klass, false); });
24486
            }
24487
            else {
24488
                Object.keys(rawClassVal).forEach(function (klass) { return _this._toggleClass(klass, false); });
24489
            }
24490
        }
24491
    };
24492
    NgClass.prototype._toggleClass = function (klass, enabled) {
24493
        var _this = this;
24494
        klass = klass.trim();
24495
        if (klass) {
24496
            klass.split(/\s+/g).forEach(function (klass) {
24497
                if (enabled) {
24498
                    _this._renderer.addClass(_this._ngEl.nativeElement, klass);
24499
                }
24500
                else {
24501
                    _this._renderer.removeClass(_this._ngEl.nativeElement, klass);
24502
                }
24503
            });
24504
        }
24505
    };
24506
    NgClass.decorators = [
24507
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngClass]' },] }
24508
    ];
24509
    /** @nocollapse */
24510
    NgClass.ctorParameters = function () { return [
24511
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"], },
24512
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"], },
24513
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
24514
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"], },
24515
    ]; };
24516
    NgClass.propDecorators = {
24517
        "klass": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['class',] },],
24518
        "ngClass": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
24519
    };
24520
    return NgClass;
24521
}());
24522
 
24523
/**
24524
 * @license
24525
 * Copyright Google Inc. All Rights Reserved.
24526
 *
24527
 * Use of this source code is governed by an MIT-style license that can be
24528
 * found in the LICENSE file at https://angular.io/license
24529
 */
24530
/**
24531
 * Instantiates a single {@link Component} type and inserts its Host View into current View.
24532
 * `NgComponentOutlet` provides a declarative approach for dynamic component creation.
24533
 *
24534
 * `NgComponentOutlet` requires a component type, if a falsy value is set the view will clear and
24535
 * any existing component will get destroyed.
24536
 *
24537
 * ### Fine tune control
24538
 *
24539
 * You can control the component creation process by using the following optional attributes:
24540
 *
24541
 * * `ngComponentOutletInjector`: Optional custom {@link Injector} that will be used as parent for
24542
 * the Component. Defaults to the injector of the current view container.
24543
 *
24544
 * * `ngComponentOutletContent`: Optional list of projectable nodes to insert into the content
24545
 * section of the component, if exists.
24546
 *
24547
 * * `ngComponentOutletNgModuleFactory`: Optional module factory to allow dynamically loading other
24548
 * module, then load a component from that module.
24549
 *
24550
 * ### Syntax
24551
 *
24552
 * Simple
24553
 * ```
24554
 * <ng-container *ngComponentOutlet="componentTypeExpression"></ng-container>
24555
 * ```
24556
 *
24557
 * Customized injector/content
24558
 * ```
24559
 * <ng-container *ngComponentOutlet="componentTypeExpression;
24560
 *                                   injector: injectorExpression;
24561
 *                                   content: contentNodesExpression;">
24562
 * </ng-container>
24563
 * ```
24564
 *
24565
 * Customized ngModuleFactory
24566
 * ```
24567
 * <ng-container *ngComponentOutlet="componentTypeExpression;
24568
 *                                   ngModuleFactory: moduleFactory;">
24569
 * </ng-container>
24570
 * ```
24571
 * ## Example
24572
 *
24573
 * {@example common/ngComponentOutlet/ts/module.ts region='SimpleExample'}
24574
 *
24575
 * A more complete example with additional options:
24576
 *
24577
 * {@example common/ngComponentOutlet/ts/module.ts region='CompleteExample'}
24578
 
24579
 * A more complete example with ngModuleFactory:
24580
 *
24581
 * {@example common/ngComponentOutlet/ts/module.ts region='NgModuleFactoryExample'}
24582
 *
24583
 * @experimental
24584
 */
24585
var NgComponentOutlet = /** @class */ (function () {
24586
    function NgComponentOutlet(_viewContainerRef) {
24587
        this._viewContainerRef = _viewContainerRef;
24588
        this._componentRef = null;
24589
        this._moduleRef = null;
24590
    }
24591
    NgComponentOutlet.prototype.ngOnChanges = function (changes) {
24592
        this._viewContainerRef.clear();
24593
        this._componentRef = null;
24594
        if (this.ngComponentOutlet) {
24595
            var elInjector = this.ngComponentOutletInjector || this._viewContainerRef.parentInjector;
24596
            if (changes['ngComponentOutletNgModuleFactory']) {
24597
                if (this._moduleRef)
24598
                    this._moduleRef.destroy();
24599
                if (this.ngComponentOutletNgModuleFactory) {
24600
                    var parentModule = elInjector.get(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModuleRef"]);
24601
                    this._moduleRef = this.ngComponentOutletNgModuleFactory.create(parentModule.injector);
24602
                }
24603
                else {
24604
                    this._moduleRef = null;
24605
                }
24606
            }
24607
            var componentFactoryResolver = this._moduleRef ? this._moduleRef.componentFactoryResolver :
24608
                elInjector.get(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ComponentFactoryResolver"]);
24609
            var componentFactory = componentFactoryResolver.resolveComponentFactory(this.ngComponentOutlet);
24610
            this._componentRef = this._viewContainerRef.createComponent(componentFactory, this._viewContainerRef.length, elInjector, this.ngComponentOutletContent);
24611
        }
24612
    };
24613
    NgComponentOutlet.prototype.ngOnDestroy = function () {
24614
        if (this._moduleRef)
24615
            this._moduleRef.destroy();
24616
    };
24617
    NgComponentOutlet.decorators = [
24618
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngComponentOutlet]' },] }
24619
    ];
24620
    /** @nocollapse */
24621
    NgComponentOutlet.ctorParameters = function () { return [
24622
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
24623
    ]; };
24624
    NgComponentOutlet.propDecorators = {
24625
        "ngComponentOutlet": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
24626
        "ngComponentOutletInjector": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
24627
        "ngComponentOutletContent": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
24628
        "ngComponentOutletNgModuleFactory": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
24629
    };
24630
    return NgComponentOutlet;
24631
}());
24632
 
24633
/**
24634
 * @license
24635
 * Copyright Google Inc. All Rights Reserved.
24636
 *
24637
 * Use of this source code is governed by an MIT-style license that can be
24638
 * found in the LICENSE file at https://angular.io/license
24639
 */
24640
var NgForOfContext = /** @class */ (function () {
24641
    function NgForOfContext($implicit, ngForOf, index, count) {
24642
        this.$implicit = $implicit;
24643
        this.ngForOf = ngForOf;
24644
        this.index = index;
24645
        this.count = count;
24646
    }
24647
    Object.defineProperty(NgForOfContext.prototype, "first", {
24648
        get: function () { return this.index === 0; },
24649
        enumerable: true,
24650
        configurable: true
24651
    });
24652
    Object.defineProperty(NgForOfContext.prototype, "last", {
24653
        get: function () { return this.index === this.count - 1; },
24654
        enumerable: true,
24655
        configurable: true
24656
    });
24657
    Object.defineProperty(NgForOfContext.prototype, "even", {
24658
        get: function () { return this.index % 2 === 0; },
24659
        enumerable: true,
24660
        configurable: true
24661
    });
24662
    Object.defineProperty(NgForOfContext.prototype, "odd", {
24663
        get: function () { return !this.even; },
24664
        enumerable: true,
24665
        configurable: true
24666
    });
24667
    return NgForOfContext;
24668
}());
24669
/**
24670
 * The `NgForOf` directive instantiates a template once per item from an iterable. The context
24671
 * for each instantiated template inherits from the outer context with the given loop variable
24672
 * set to the current item from the iterable.
24673
 *
24674
 * ### Local Variables
24675
 *
24676
 * `NgForOf` provides several exported values that can be aliased to local variables:
24677
 *
24678
 * - `$implicit: T`: The value of the individual items in the iterable (`ngForOf`).
24679
 * - `ngForOf: NgIterable<T>`: The value of the iterable expression. Useful when the expression is
24680
 * more complex then a property access, for example when using the async pipe (`userStreams |
24681
 * async`).
24682
 * - `index: number`: The index of the current item in the iterable.
24683
 * - `first: boolean`: True when the item is the first item in the iterable.
24684
 * - `last: boolean`: True when the item is the last item in the iterable.
24685
 * - `even: boolean`: True when the item has an even index in the iterable.
24686
 * - `odd: boolean`: True when the item has an odd index in the iterable.
24687
 *
24688
 * ```
24689
 * <li *ngFor="let user of userObservable | async as users; index as i; first as isFirst">
24690
 *    {{i}}/{{users.length}}. {{user}} <span *ngIf="isFirst">default</span>
24691
 * </li>
24692
 * ```
24693
 *
24694
 * ### Change Propagation
24695
 *
24696
 * When the contents of the iterator changes, `NgForOf` makes the corresponding changes to the DOM:
24697
 *
24698
 * * When an item is added, a new instance of the template is added to the DOM.
24699
 * * When an item is removed, its template instance is removed from the DOM.
24700
 * * When items are reordered, their respective templates are reordered in the DOM.
24701
 * * Otherwise, the DOM element for that item will remain the same.
24702
 *
24703
 * Angular uses object identity to track insertions and deletions within the iterator and reproduce
24704
 * those changes in the DOM. This has important implications for animations and any stateful
24705
 * controls (such as `<input>` elements which accept user input) that are present. Inserted rows can
24706
 * be animated in, deleted rows can be animated out, and unchanged rows retain any unsaved state
24707
 * such as user input.
24708
 *
24709
 * It is possible for the identities of elements in the iterator to change while the data does not.
24710
 * This can happen, for example, if the iterator produced from an RPC to the server, and that
24711
 * RPC is re-run. Even if the data hasn't changed, the second response will produce objects with
24712
 * different identities, and Angular will tear down the entire DOM and rebuild it (as if all old
24713
 * elements were deleted and all new elements inserted). This is an expensive operation and should
24714
 * be avoided if possible.
24715
 *
24716
 * To customize the default tracking algorithm, `NgForOf` supports `trackBy` option.
24717
 * `trackBy` takes a function which has two arguments: `index` and `item`.
24718
 * If `trackBy` is given, Angular tracks changes by the return value of the function.
24719
 *
24720
 * ### Syntax
24721
 *
24722
 * - `<li *ngFor="let item of items; index as i; trackBy: trackByFn">...</li>`
24723
 *
24724
 * With `<ng-template>` element:
24725
 *
24726
 * ```
24727
 * <ng-template ngFor let-item [ngForOf]="items" let-i="index" [ngForTrackBy]="trackByFn">
24728
 *   <li>...</li>
24729
 * </ng-template>
24730
 * ```
24731
 *
24732
 * ### Example
24733
 *
24734
 * See a [live demo](http://plnkr.co/edit/KVuXxDp0qinGDyo307QW?p=preview) for a more detailed
24735
 * example.
24736
 *
24737
 *
24738
 */
24739
var NgForOf = /** @class */ (function () {
24740
    function NgForOf(_viewContainer, _template, _differs) {
24741
        this._viewContainer = _viewContainer;
24742
        this._template = _template;
24743
        this._differs = _differs;
24744
        this._differ = null;
24745
    }
24746
    Object.defineProperty(NgForOf.prototype, "ngForTrackBy", {
24747
        get: function () { return this._trackByFn; },
24748
        set: function (fn) {
24749
            if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["isDevMode"])() && fn != null && typeof fn !== 'function') {
24750
                // TODO(vicb): use a log service once there is a public one available
24751
                if (console && console.warn) {
24752
                    console.warn("trackBy must be a function, but received " + JSON.stringify(fn) + ". " +
24753
                        "See https://angular.io/docs/ts/latest/api/common/index/NgFor-directive.html#!#change-propagation for more information.");
24754
                }
24755
            }
24756
            this._trackByFn = fn;
24757
        },
24758
        enumerable: true,
24759
        configurable: true
24760
    });
24761
    Object.defineProperty(NgForOf.prototype, "ngForTemplate", {
24762
        set: function (value) {
24763
            // TODO(TS2.1): make TemplateRef<Partial<NgForRowOf<T>>> once we move to TS v2.1
24764
            // The current type is too restrictive; a template that just uses index, for example,
24765
            // should be acceptable.
24766
            if (value) {
24767
                this._template = value;
24768
            }
24769
        },
24770
        enumerable: true,
24771
        configurable: true
24772
    });
24773
    NgForOf.prototype.ngOnChanges = function (changes) {
24774
        if ('ngForOf' in changes) {
24775
            // React on ngForOf changes only once all inputs have been initialized
24776
            var value = changes['ngForOf'].currentValue;
24777
            if (!this._differ && value) {
24778
                try {
24779
                    this._differ = this._differs.find(value).create(this.ngForTrackBy);
24780
                }
24781
                catch (e) {
24782
                    throw new Error("Cannot find a differ supporting object '" + value + "' of type '" + getTypeNameForDebugging(value) + "'. NgFor only supports binding to Iterables such as Arrays.");
24783
                }
24784
            }
24785
        }
24786
    };
24787
    NgForOf.prototype.ngDoCheck = function () {
24788
        if (this._differ) {
24789
            var changes = this._differ.diff(this.ngForOf);
24790
            if (changes)
24791
                this._applyChanges(changes);
24792
        }
24793
    };
24794
    NgForOf.prototype._applyChanges = function (changes) {
24795
        var _this = this;
24796
        var insertTuples = [];
24797
        changes.forEachOperation(function (item, adjustedPreviousIndex, currentIndex) {
24798
            if (item.previousIndex == null) {
24799
                var view = _this._viewContainer.createEmbeddedView(_this._template, new NgForOfContext((null), _this.ngForOf, -1, -1), currentIndex);
24800
                var tuple = new RecordViewTuple(item, view);
24801
                insertTuples.push(tuple);
24802
            }
24803
            else if (currentIndex == null) {
24804
                _this._viewContainer.remove(adjustedPreviousIndex);
24805
            }
24806
            else {
24807
                var view = (_this._viewContainer.get(adjustedPreviousIndex));
24808
                _this._viewContainer.move(view, currentIndex);
24809
                var tuple = new RecordViewTuple(item, view);
24810
                insertTuples.push(tuple);
24811
            }
24812
        });
24813
        for (var i = 0; i < insertTuples.length; i++) {
24814
            this._perViewChange(insertTuples[i].view, insertTuples[i].record);
24815
        }
24816
        for (var i = 0, ilen = this._viewContainer.length; i < ilen; i++) {
24817
            var viewRef = this._viewContainer.get(i);
24818
            viewRef.context.index = i;
24819
            viewRef.context.count = ilen;
24820
        }
24821
        changes.forEachIdentityChange(function (record) {
24822
            var viewRef = _this._viewContainer.get(record.currentIndex);
24823
            viewRef.context.$implicit = record.item;
24824
        });
24825
    };
24826
    NgForOf.prototype._perViewChange = function (view, record) {
24827
        view.context.$implicit = record.item;
24828
    };
24829
    NgForOf.decorators = [
24830
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngFor][ngForOf]' },] }
24831
    ];
24832
    /** @nocollapse */
24833
    NgForOf.ctorParameters = function () { return [
24834
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
24835
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"], },
24836
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"], },
24837
    ]; };
24838
    NgForOf.propDecorators = {
24839
        "ngForOf": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
24840
        "ngForTrackBy": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
24841
        "ngForTemplate": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
24842
    };
24843
    return NgForOf;
24844
}());
24845
var RecordViewTuple = /** @class */ (function () {
24846
    function RecordViewTuple(record, view) {
24847
        this.record = record;
24848
        this.view = view;
24849
    }
24850
    return RecordViewTuple;
24851
}());
24852
function getTypeNameForDebugging(type) {
24853
    return type['name'] || typeof type;
24854
}
24855
 
24856
/**
24857
 * @license
24858
 * Copyright Google Inc. All Rights Reserved.
24859
 *
24860
 * Use of this source code is governed by an MIT-style license that can be
24861
 * found in the LICENSE file at https://angular.io/license
24862
 */
24863
/**
24864
 * Conditionally includes a template based on the value of an `expression`.
24865
 *
24866
 * `ngIf` evaluates the `expression` and then renders the `then` or `else` template in its place
24867
 * when expression is truthy or falsy respectively. Typically the:
24868
 *  - `then` template is the inline template of `ngIf` unless bound to a different value.
24869
 *  - `else` template is blank unless it is bound.
24870
 *
24871
 * ## Most common usage
24872
 *
24873
 * The most common usage of the `ngIf` directive is to conditionally show the inline template as
24874
 * seen in this example:
24875
 * {@example common/ngIf/ts/module.ts region='NgIfSimple'}
24876
 *
24877
 * ## Showing an alternative template using `else`
24878
 *
24879
 * If it is necessary to display a template when the `expression` is falsy use the `else` template
24880
 * binding as shown. Note that the `else` binding points to a `<ng-template>` labeled `#elseBlock`.
24881
 * The template can be defined anywhere in the component view but is typically placed right after
24882
 * `ngIf` for readability.
24883
 *
24884
 * {@example common/ngIf/ts/module.ts region='NgIfElse'}
24885
 *
24886
 * ## Using non-inlined `then` template
24887
 *
24888
 * Usually the `then` template is the inlined template of the `ngIf`, but it can be changed using
24889
 * a binding (just like `else`). Because `then` and `else` are bindings, the template references can
24890
 * change at runtime as shown in this example.
24891
 *
24892
 * {@example common/ngIf/ts/module.ts region='NgIfThenElse'}
24893
 *
24894
 * ## Storing conditional result in a variable
24895
 *
24896
 * A common pattern is that we need to show a set of properties from the same object. If the
24897
 * object is undefined, then we have to use the safe-traversal-operator `?.` to guard against
24898
 * dereferencing a `null` value. This is especially the case when waiting on async data such as
24899
 * when using the `async` pipe as shown in following example:
24900
 *
24901
 * ```
24902
 * Hello {{ (userStream|async)?.last }}, {{ (userStream|async)?.first }}!
24903
 * ```
24904
 *
24905
 * There are several inefficiencies in the above example:
24906
 *  - We create multiple subscriptions on `userStream`. One for each `async` pipe, or two in the
24907
 *    example above.
24908
 *  - We cannot display an alternative screen while waiting for the data to arrive asynchronously.
24909
 *  - We have to use the safe-traversal-operator `?.` to access properties, which is cumbersome.
24910
 *  - We have to place the `async` pipe in parenthesis.
24911
 *
24912
 * A better way to do this is to use `ngIf` and store the result of the condition in a local
24913
 * variable as shown in the the example below:
24914
 *
24915
 * {@example common/ngIf/ts/module.ts region='NgIfAs'}
24916
 *
24917
 * Notice that:
24918
 *  - We use only one `async` pipe and hence only one subscription gets created.
24919
 *  - `ngIf` stores the result of the `userStream|async` in the local variable `user`.
24920
 *  - The local `user` can then be bound repeatedly in a more efficient way.
24921
 *  - No need to use the safe-traversal-operator `?.` to access properties as `ngIf` will only
24922
 *    display the data if `userStream` returns a value.
24923
 *  - We can display an alternative template while waiting for the data.
24924
 *
24925
 * ### Syntax
24926
 *
24927
 * Simple form:
24928
 * - `<div *ngIf="condition">...</div>`
24929
 * - `<ng-template [ngIf]="condition"><div>...</div></ng-template>`
24930
 *
24931
 * Form with an else block:
24932
 * ```
24933
 * <div *ngIf="condition; else elseBlock">...</div>
24934
 * <ng-template #elseBlock>...</ng-template>
24935
 * ```
24936
 *
24937
 * Form with a `then` and `else` block:
24938
 * ```
24939
 * <div *ngIf="condition; then thenBlock else elseBlock"></div>
24940
 * <ng-template #thenBlock>...</ng-template>
24941
 * <ng-template #elseBlock>...</ng-template>
24942
 * ```
24943
 *
24944
 * Form with storing the value locally:
24945
 * ```
24946
 * <div *ngIf="condition as value; else elseBlock">{{value}}</div>
24947
 * <ng-template #elseBlock>...</ng-template>
24948
 * ```
24949
 *
24950
 *
24951
 */
24952
var NgIf = /** @class */ (function () {
24953
    function NgIf(_viewContainer, templateRef) {
24954
        this._viewContainer = _viewContainer;
24955
        this._context = new NgIfContext();
24956
        this._thenTemplateRef = null;
24957
        this._elseTemplateRef = null;
24958
        this._thenViewRef = null;
24959
        this._elseViewRef = null;
24960
        this._thenTemplateRef = templateRef;
24961
    }
24962
    Object.defineProperty(NgIf.prototype, "ngIf", {
24963
        set: function (condition) {
24964
            this._context.$implicit = this._context.ngIf = condition;
24965
            this._updateView();
24966
        },
24967
        enumerable: true,
24968
        configurable: true
24969
    });
24970
    Object.defineProperty(NgIf.prototype, "ngIfThen", {
24971
        set: function (templateRef) {
24972
            assertTemplate('ngIfThen', templateRef);
24973
            this._thenTemplateRef = templateRef;
24974
            this._thenViewRef = null; // clear previous view if any.
24975
            this._updateView();
24976
        },
24977
        enumerable: true,
24978
        configurable: true
24979
    });
24980
    Object.defineProperty(NgIf.prototype, "ngIfElse", {
24981
        set: function (templateRef) {
24982
            assertTemplate('ngIfElse', templateRef);
24983
            this._elseTemplateRef = templateRef;
24984
            this._elseViewRef = null; // clear previous view if any.
24985
            this._updateView();
24986
        },
24987
        enumerable: true,
24988
        configurable: true
24989
    });
24990
    NgIf.prototype._updateView = function () {
24991
        if (this._context.$implicit) {
24992
            if (!this._thenViewRef) {
24993
                this._viewContainer.clear();
24994
                this._elseViewRef = null;
24995
                if (this._thenTemplateRef) {
24996
                    this._thenViewRef =
24997
                        this._viewContainer.createEmbeddedView(this._thenTemplateRef, this._context);
24998
                }
24999
            }
25000
        }
25001
        else {
25002
            if (!this._elseViewRef) {
25003
                this._viewContainer.clear();
25004
                this._thenViewRef = null;
25005
                if (this._elseTemplateRef) {
25006
                    this._elseViewRef =
25007
                        this._viewContainer.createEmbeddedView(this._elseTemplateRef, this._context);
25008
                }
25009
            }
25010
        }
25011
    };
25012
    NgIf.decorators = [
25013
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngIf]' },] }
25014
    ];
25015
    /** @nocollapse */
25016
    NgIf.ctorParameters = function () { return [
25017
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
25018
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"], },
25019
    ]; };
25020
    NgIf.propDecorators = {
25021
        "ngIf": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
25022
        "ngIfThen": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
25023
        "ngIfElse": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
25024
    };
25025
    return NgIf;
25026
}());
25027
var NgIfContext = /** @class */ (function () {
25028
    function NgIfContext() {
25029
        this.$implicit = null;
25030
        this.ngIf = null;
25031
    }
25032
    return NgIfContext;
25033
}());
25034
function assertTemplate(property, templateRef) {
25035
    var isTemplateRefOrNull = !!(!templateRef || templateRef.createEmbeddedView);
25036
    if (!isTemplateRefOrNull) {
25037
        throw new Error(property + " must be a TemplateRef, but received '" + Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵstringify"])(templateRef) + "'.");
25038
    }
25039
}
25040
 
25041
/**
25042
 * @license
25043
 * Copyright Google Inc. All Rights Reserved.
25044
 *
25045
 * Use of this source code is governed by an MIT-style license that can be
25046
 * found in the LICENSE file at https://angular.io/license
25047
 */
25048
var SwitchView = /** @class */ (function () {
25049
    function SwitchView(_viewContainerRef, _templateRef) {
25050
        this._viewContainerRef = _viewContainerRef;
25051
        this._templateRef = _templateRef;
25052
        this._created = false;
25053
    }
25054
    SwitchView.prototype.create = function () {
25055
        this._created = true;
25056
        this._viewContainerRef.createEmbeddedView(this._templateRef);
25057
    };
25058
    SwitchView.prototype.destroy = function () {
25059
        this._created = false;
25060
        this._viewContainerRef.clear();
25061
    };
25062
    SwitchView.prototype.enforceState = function (created) {
25063
        if (created && !this._created) {
25064
            this.create();
25065
        }
25066
        else if (!created && this._created) {
25067
            this.destroy();
25068
        }
25069
    };
25070
    return SwitchView;
25071
}());
25072
/**
25073
 * @ngModule CommonModule
25074
 *
25075
 * @usageNotes
25076
 * ```
25077
 *     <container-element [ngSwitch]="switch_expression">
25078
 *       <some-element *ngSwitchCase="match_expression_1">...</some-element>
25079
 *       <some-element *ngSwitchCase="match_expression_2">...</some-element>
25080
 *       <some-other-element *ngSwitchCase="match_expression_3">...</some-other-element>
25081
 *       <ng-container *ngSwitchCase="match_expression_3">
25082
 *         <!-- use a ng-container to group multiple root nodes -->
25083
 *         <inner-element></inner-element>
25084
 *         <inner-other-element></inner-other-element>
25085
 *       </ng-container>
25086
 *       <some-element *ngSwitchDefault>...</some-element>
25087
 *     </container-element>
25088
 * ```
25089
 * @description
25090
 *
25091
 * Adds / removes DOM sub-trees when the nest match expressions matches the switch expression.
25092
 *
25093
 * `NgSwitch` stamps out nested views when their match expression value matches the value of the
25094
 * switch expression.
25095
 *
25096
 * In other words:
25097
 * - you define a container element (where you place the directive with a switch expression on the
25098
 * `[ngSwitch]="..."` attribute)
25099
 * - you define inner views inside the `NgSwitch` and place a `*ngSwitchCase` attribute on the view
25100
 * root elements.
25101
 *
25102
 * Elements within `NgSwitch` but outside of a `NgSwitchCase` or `NgSwitchDefault` directives will
25103
 * be preserved at the location.
25104
 *
25105
 * The `ngSwitchCase` directive informs the parent `NgSwitch` of which view to display when the
25106
 * expression is evaluated.
25107
 * When no matching expression is found on a `ngSwitchCase` view, the `ngSwitchDefault` view is
25108
 * stamped out.
25109
 *
25110
 *
25111
 */
25112
var NgSwitch = /** @class */ (function () {
25113
    function NgSwitch() {
25114
        this._defaultUsed = false;
25115
        this._caseCount = 0;
25116
        this._lastCaseCheckIndex = 0;
25117
        this._lastCasesMatched = false;
25118
    }
25119
    Object.defineProperty(NgSwitch.prototype, "ngSwitch", {
25120
        set: function (newValue) {
25121
            this._ngSwitch = newValue;
25122
            if (this._caseCount === 0) {
25123
                this._updateDefaultCases(true);
25124
            }
25125
        },
25126
        enumerable: true,
25127
        configurable: true
25128
    });
25129
    /** @internal */
25130
    /** @internal */
25131
    NgSwitch.prototype._addCase = /** @internal */
25132
    function () { return this._caseCount++; };
25133
    /** @internal */
25134
    /** @internal */
25135
    NgSwitch.prototype._addDefault = /** @internal */
25136
    function (view) {
25137
        if (!this._defaultViews) {
25138
            this._defaultViews = [];
25139
        }
25140
        this._defaultViews.push(view);
25141
    };
25142
    /** @internal */
25143
    /** @internal */
25144
    NgSwitch.prototype._matchCase = /** @internal */
25145
    function (value) {
25146
        var matched = value == this._ngSwitch;
25147
        this._lastCasesMatched = this._lastCasesMatched || matched;
25148
        this._lastCaseCheckIndex++;
25149
        if (this._lastCaseCheckIndex === this._caseCount) {
25150
            this._updateDefaultCases(!this._lastCasesMatched);
25151
            this._lastCaseCheckIndex = 0;
25152
            this._lastCasesMatched = false;
25153
        }
25154
        return matched;
25155
    };
25156
    NgSwitch.prototype._updateDefaultCases = function (useDefault) {
25157
        if (this._defaultViews && useDefault !== this._defaultUsed) {
25158
            this._defaultUsed = useDefault;
25159
            for (var i = 0; i < this._defaultViews.length; i++) {
25160
                var defaultView = this._defaultViews[i];
25161
                defaultView.enforceState(useDefault);
25162
            }
25163
        }
25164
    };
25165
    NgSwitch.decorators = [
25166
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngSwitch]' },] }
25167
    ];
25168
    /** @nocollapse */
25169
    NgSwitch.ctorParameters = function () { return []; };
25170
    NgSwitch.propDecorators = {
25171
        "ngSwitch": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
25172
    };
25173
    return NgSwitch;
25174
}());
25175
/**
25176
 * @ngModule CommonModule
25177
 *
25178
 * @usageNotes
25179
 * ```
25180
 * <container-element [ngSwitch]="switch_expression">
25181
 *   <some-element *ngSwitchCase="match_expression_1">...</some-element>
25182
 * </container-element>
25183
 *```
25184
 * @description
25185
 *
25186
 * Creates a view that will be added/removed from the parent {@link NgSwitch} when the
25187
 * given expression evaluate to respectively the same/different value as the switch
25188
 * expression.
25189
 *
25190
 * Insert the sub-tree when the expression evaluates to the same value as the enclosing switch
25191
 * expression.
25192
 *
25193
 * If multiple match expressions match the switch expression value, all of them are displayed.
25194
 *
25195
 * See {@link NgSwitch} for more details and example.
25196
 *
25197
 *
25198
 */
25199
var NgSwitchCase = /** @class */ (function () {
25200
    function NgSwitchCase(viewContainer, templateRef, ngSwitch) {
25201
        this.ngSwitch = ngSwitch;
25202
        ngSwitch._addCase();
25203
        this._view = new SwitchView(viewContainer, templateRef);
25204
    }
25205
    NgSwitchCase.prototype.ngDoCheck = function () { this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase)); };
25206
    NgSwitchCase.decorators = [
25207
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngSwitchCase]' },] }
25208
    ];
25209
    /** @nocollapse */
25210
    NgSwitchCase.ctorParameters = function () { return [
25211
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
25212
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"], },
25213
        { type: NgSwitch, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"] },] },
25214
    ]; };
25215
    NgSwitchCase.propDecorators = {
25216
        "ngSwitchCase": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
25217
    };
25218
    return NgSwitchCase;
25219
}());
25220
/**
25221
 * @ngModule CommonModule
25222
 * @usageNotes
25223
 * ```
25224
 * <container-element [ngSwitch]="switch_expression">
25225
 *   <some-element *ngSwitchCase="match_expression_1">...</some-element>
25226
 *   <some-other-element *ngSwitchDefault>...</some-other-element>
25227
 * </container-element>
25228
 * ```
25229
 *
25230
 * @description
25231
 *
25232
 * Creates a view that is added to the parent {@link NgSwitch} when no case expressions
25233
 * match the switch expression.
25234
 *
25235
 * Insert the sub-tree when no case expressions evaluate to the same value as the enclosing switch
25236
 * expression.
25237
 *
25238
 * See {@link NgSwitch} for more details and example.
25239
 *
25240
 *
25241
 */
25242
var NgSwitchDefault = /** @class */ (function () {
25243
    function NgSwitchDefault(viewContainer, templateRef, ngSwitch) {
25244
        ngSwitch._addDefault(new SwitchView(viewContainer, templateRef));
25245
    }
25246
    NgSwitchDefault.decorators = [
25247
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngSwitchDefault]' },] }
25248
    ];
25249
    /** @nocollapse */
25250
    NgSwitchDefault.ctorParameters = function () { return [
25251
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
25252
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"], },
25253
        { type: NgSwitch, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"] },] },
25254
    ]; };
25255
    return NgSwitchDefault;
25256
}());
25257
 
25258
/**
25259
 * @license
25260
 * Copyright Google Inc. All Rights Reserved.
25261
 *
25262
 * Use of this source code is governed by an MIT-style license that can be
25263
 * found in the LICENSE file at https://angular.io/license
25264
 */
25265
/**
25266
 * @ngModule CommonModule
25267
 *
25268
 * @usageNotes
25269
 * ```
25270
 * <some-element [ngPlural]="value">
25271
 *   <ng-template ngPluralCase="=0">there is nothing</ng-template>
25272
 *   <ng-template ngPluralCase="=1">there is one</ng-template>
25273
 *   <ng-template ngPluralCase="few">there are a few</ng-template>
25274
 * </some-element>
25275
 * ```
25276
 *
25277
 * @description
25278
 *
25279
 * Adds / removes DOM sub-trees based on a numeric value. Tailored for pluralization.
25280
 *
25281
 * Displays DOM sub-trees that match the switch expression value, or failing that, DOM sub-trees
25282
 * that match the switch expression's pluralization category.
25283
 *
25284
 * To use this directive you must provide a container element that sets the `[ngPlural]` attribute
25285
 * to a switch expression. Inner elements with a `[ngPluralCase]` will display based on their
25286
 * expression:
25287
 * - if `[ngPluralCase]` is set to a value starting with `=`, it will only display if the value
25288
 *   matches the switch expression exactly,
25289
 * - otherwise, the view will be treated as a "category match", and will only display if exact
25290
 *   value matches aren't found and the value maps to its category for the defined locale.
25291
 *
25292
 * See http://cldr.unicode.org/index/cldr-spec/plural-rules
25293
 *
25294
 * @experimental
25295
 */
25296
var NgPlural = /** @class */ (function () {
25297
    function NgPlural(_localization) {
25298
        this._localization = _localization;
25299
        this._caseViews = {};
25300
    }
25301
    Object.defineProperty(NgPlural.prototype, "ngPlural", {
25302
        set: function (value) {
25303
            this._switchValue = value;
25304
            this._updateView();
25305
        },
25306
        enumerable: true,
25307
        configurable: true
25308
    });
25309
    NgPlural.prototype.addCase = function (value, switchView) { this._caseViews[value] = switchView; };
25310
    NgPlural.prototype._updateView = function () {
25311
        this._clearViews();
25312
        var cases = Object.keys(this._caseViews);
25313
        var key = getPluralCategory(this._switchValue, cases, this._localization);
25314
        this._activateView(this._caseViews[key]);
25315
    };
25316
    NgPlural.prototype._clearViews = function () {
25317
        if (this._activeView)
25318
            this._activeView.destroy();
25319
    };
25320
    NgPlural.prototype._activateView = function (view) {
25321
        if (view) {
25322
            this._activeView = view;
25323
            this._activeView.create();
25324
        }
25325
    };
25326
    NgPlural.decorators = [
25327
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngPlural]' },] }
25328
    ];
25329
    /** @nocollapse */
25330
    NgPlural.ctorParameters = function () { return [
25331
        { type: NgLocalization, },
25332
    ]; };
25333
    NgPlural.propDecorators = {
25334
        "ngPlural": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
25335
    };
25336
    return NgPlural;
25337
}());
25338
/**
25339
 * @ngModule CommonModule
25340
 *
25341
 * @description
25342
 *
25343
 * Creates a view that will be added/removed from the parent {@link NgPlural} when the
25344
 * given expression matches the plural expression according to CLDR rules.
25345
 *
25346
 * @usageNotes
25347
 * ```
25348
 * <some-element [ngPlural]="value">
25349
 *   <ng-template ngPluralCase="=0">...</ng-template>
25350
 *   <ng-template ngPluralCase="other">...</ng-template>
25351
 * </some-element>
25352
 *```
25353
 *
25354
 * See {@link NgPlural} for more details and example.
25355
 *
25356
 * @experimental
25357
 */
25358
var NgPluralCase = /** @class */ (function () {
25359
    function NgPluralCase(value, template, viewContainer, ngPlural) {
25360
        this.value = value;
25361
        var isANumber = !isNaN(Number(value));
25362
        ngPlural.addCase(isANumber ? "=" + value : value, new SwitchView(viewContainer, template));
25363
    }
25364
    NgPluralCase.decorators = [
25365
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngPluralCase]' },] }
25366
    ];
25367
    /** @nocollapse */
25368
    NgPluralCase.ctorParameters = function () { return [
25369
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Attribute"], args: ['ngPluralCase',] },] },
25370
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"], },
25371
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
25372
        { type: NgPlural, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"] },] },
25373
    ]; };
25374
    return NgPluralCase;
25375
}());
25376
 
25377
/**
25378
 * @license
25379
 * Copyright Google Inc. All Rights Reserved.
25380
 *
25381
 * Use of this source code is governed by an MIT-style license that can be
25382
 * found in the LICENSE file at https://angular.io/license
25383
 */
25384
/**
25385
 * @ngModule CommonModule
25386
 *
25387
 * @usageNotes
25388
 * ```
25389
 * <some-element [ngStyle]="{'font-style': styleExp}">...</some-element>
25390
 *
25391
 * <some-element [ngStyle]="{'max-width.px': widthExp}">...</some-element>
25392
 *
25393
 * <some-element [ngStyle]="objExp">...</some-element>
25394
 * ```
25395
 *
25396
 * @description
25397
 *
25398
 * Update an HTML element styles.
25399
 *
25400
 * The styles are updated according to the value of the expression evaluation:
25401
 * - keys are style names with an optional `.<unit>` suffix (ie 'top.px', 'font-style.em'),
25402
 * - values are the values assigned to those properties (expressed in the given unit).
25403
 *
25404
 *
25405
 */
25406
var NgStyle = /** @class */ (function () {
25407
    function NgStyle(_differs, _ngEl, _renderer) {
25408
        this._differs = _differs;
25409
        this._ngEl = _ngEl;
25410
        this._renderer = _renderer;
25411
    }
25412
    Object.defineProperty(NgStyle.prototype, "ngStyle", {
25413
        set: function (v) {
25414
            this._ngStyle = v;
25415
            if (!this._differ && v) {
25416
                this._differ = this._differs.find(v).create();
25417
            }
25418
        },
25419
        enumerable: true,
25420
        configurable: true
25421
    });
25422
    NgStyle.prototype.ngDoCheck = function () {
25423
        if (this._differ) {
25424
            var changes = this._differ.diff(this._ngStyle);
25425
            if (changes) {
25426
                this._applyChanges(changes);
25427
            }
25428
        }
25429
    };
25430
    NgStyle.prototype._applyChanges = function (changes) {
25431
        var _this = this;
25432
        changes.forEachRemovedItem(function (record) { return _this._setStyle(record.key, null); });
25433
        changes.forEachAddedItem(function (record) { return _this._setStyle(record.key, record.currentValue); });
25434
        changes.forEachChangedItem(function (record) { return _this._setStyle(record.key, record.currentValue); });
25435
    };
25436
    NgStyle.prototype._setStyle = function (nameAndUnit, value) {
25437
        var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__read"])(nameAndUnit.split('.'), 2), name = _a[0], unit = _a[1];
25438
        value = value != null && unit ? "" + value + unit : value;
25439
        if (value != null) {
25440
            this._renderer.setStyle(this._ngEl.nativeElement, name, value);
25441
        }
25442
        else {
25443
            this._renderer.removeStyle(this._ngEl.nativeElement, name);
25444
        }
25445
    };
25446
    NgStyle.decorators = [
25447
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngStyle]' },] }
25448
    ];
25449
    /** @nocollapse */
25450
    NgStyle.ctorParameters = function () { return [
25451
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"], },
25452
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
25453
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"], },
25454
    ]; };
25455
    NgStyle.propDecorators = {
25456
        "ngStyle": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
25457
    };
25458
    return NgStyle;
25459
}());
25460
 
25461
/**
25462
 * @license
25463
 * Copyright Google Inc. All Rights Reserved.
25464
 *
25465
 * Use of this source code is governed by an MIT-style license that can be
25466
 * found in the LICENSE file at https://angular.io/license
25467
 */
25468
/**
25469
 * @ngModule CommonModule
25470
 *
25471
 * @usageNotes
25472
 * ```
25473
 * <ng-container *ngTemplateOutlet="templateRefExp; context: contextExp"></ng-container>
25474
 * ```
25475
 *
25476
 * @description
25477
 *
25478
 * Inserts an embedded view from a prepared `TemplateRef`.
25479
 *
25480
 * You can attach a context object to the `EmbeddedViewRef` by setting `[ngTemplateOutletContext]`.
25481
 * `[ngTemplateOutletContext]` should be an object, the object's keys will be available for binding
25482
 * by the local template `let` declarations.
25483
 *
25484
 * Note: using the key `$implicit` in the context object will set its value as default.
25485
 *
25486
 * ## Example
25487
 *
25488
 * {@example common/ngTemplateOutlet/ts/module.ts region='NgTemplateOutlet'}
25489
 *
25490
 *
25491
 */
25492
var NgTemplateOutlet = /** @class */ (function () {
25493
    function NgTemplateOutlet(_viewContainerRef) {
25494
        this._viewContainerRef = _viewContainerRef;
25495
    }
25496
    NgTemplateOutlet.prototype.ngOnChanges = function (changes) {
25497
        var recreateView = this._shouldRecreateView(changes);
25498
        if (recreateView) {
25499
            if (this._viewRef) {
25500
                this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._viewRef));
25501
            }
25502
            if (this.ngTemplateOutlet) {
25503
                this._viewRef = this._viewContainerRef.createEmbeddedView(this.ngTemplateOutlet, this.ngTemplateOutletContext);
25504
            }
25505
        }
25506
        else {
25507
            if (this._viewRef && this.ngTemplateOutletContext) {
25508
                this._updateExistingContext(this.ngTemplateOutletContext);
25509
            }
25510
        }
25511
    };
25512
    /**
25513
     * We need to re-create existing embedded view if:
25514
     * - templateRef has changed
25515
     * - context has changes
25516
     *
25517
     * We mark context object as changed when the corresponding object
25518
     * shape changes (new properties are added or existing properties are removed).
25519
     * In other words we consider context with the same properties as "the same" even
25520
     * if object reference changes (see https://github.com/angular/angular/issues/13407).
25521
     */
25522
    /**
25523
       * We need to re-create existing embedded view if:
25524
       * - templateRef has changed
25525
       * - context has changes
25526
       *
25527
       * We mark context object as changed when the corresponding object
25528
       * shape changes (new properties are added or existing properties are removed).
25529
       * In other words we consider context with the same properties as "the same" even
25530
       * if object reference changes (see https://github.com/angular/angular/issues/13407).
25531
       */
25532
    NgTemplateOutlet.prototype._shouldRecreateView = /**
25533
       * We need to re-create existing embedded view if:
25534
       * - templateRef has changed
25535
       * - context has changes
25536
       *
25537
       * We mark context object as changed when the corresponding object
25538
       * shape changes (new properties are added or existing properties are removed).
25539
       * In other words we consider context with the same properties as "the same" even
25540
       * if object reference changes (see https://github.com/angular/angular/issues/13407).
25541
       */
25542
    function (changes) {
25543
        var ctxChange = changes['ngTemplateOutletContext'];
25544
        return !!changes['ngTemplateOutlet'] || (ctxChange && this._hasContextShapeChanged(ctxChange));
25545
    };
25546
    NgTemplateOutlet.prototype._hasContextShapeChanged = function (ctxChange) {
25547
        var prevCtxKeys = Object.keys(ctxChange.previousValue || {});
25548
        var currCtxKeys = Object.keys(ctxChange.currentValue || {});
25549
        if (prevCtxKeys.length === currCtxKeys.length) {
25550
            try {
25551
                for (var currCtxKeys_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__values"])(currCtxKeys), currCtxKeys_1_1 = currCtxKeys_1.next(); !currCtxKeys_1_1.done; currCtxKeys_1_1 = currCtxKeys_1.next()) {
25552
                    var propName = currCtxKeys_1_1.value;
25553
                    if (prevCtxKeys.indexOf(propName) === -1) {
25554
                        return true;
25555
                    }
25556
                }
25557
            }
25558
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
25559
            finally {
25560
                try {
25561
                    if (currCtxKeys_1_1 && !currCtxKeys_1_1.done && (_a = currCtxKeys_1.return)) _a.call(currCtxKeys_1);
25562
                }
25563
                finally { if (e_1) throw e_1.error; }
25564
            }
25565
            return false;
25566
        }
25567
        else {
25568
            return true;
25569
        }
25570
        var e_1, _a;
25571
    };
25572
    NgTemplateOutlet.prototype._updateExistingContext = function (ctx) {
25573
        try {
25574
            for (var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__values"])(Object.keys(ctx)), _b = _a.next(); !_b.done; _b = _a.next()) {
25575
                var propName = _b.value;
25576
                this._viewRef.context[propName] = this.ngTemplateOutletContext[propName];
25577
            }
25578
        }
25579
        catch (e_2_1) { e_2 = { error: e_2_1 }; }
25580
        finally {
25581
            try {
25582
                if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
25583
            }
25584
            finally { if (e_2) throw e_2.error; }
25585
        }
25586
        var e_2, _c;
25587
    };
25588
    NgTemplateOutlet.decorators = [
25589
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngTemplateOutlet]' },] }
25590
    ];
25591
    /** @nocollapse */
25592
    NgTemplateOutlet.ctorParameters = function () { return [
25593
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
25594
    ]; };
25595
    NgTemplateOutlet.propDecorators = {
25596
        "ngTemplateOutletContext": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
25597
        "ngTemplateOutlet": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
25598
    };
25599
    return NgTemplateOutlet;
25600
}());
25601
 
25602
/**
25603
 * @license
25604
 * Copyright Google Inc. All Rights Reserved.
25605
 *
25606
 * Use of this source code is governed by an MIT-style license that can be
25607
 * found in the LICENSE file at https://angular.io/license
25608
 */
25609
/**
25610
 * A collection of Angular directives that are likely to be used in each and every Angular
25611
 * application.
25612
 */
25613
var COMMON_DIRECTIVES = [
25614
    NgClass,
25615
    NgComponentOutlet,
25616
    NgForOf,
25617
    NgIf,
25618
    NgTemplateOutlet,
25619
    NgStyle,
25620
    NgSwitch,
25621
    NgSwitchCase,
25622
    NgSwitchDefault,
25623
    NgPlural,
25624
    NgPluralCase,
25625
];
25626
 
25627
/**
25628
 * @license
25629
 * Copyright Google Inc. All Rights Reserved.
25630
 *
25631
 * Use of this source code is governed by an MIT-style license that can be
25632
 * found in the LICENSE file at https://angular.io/license
25633
 */
25634
function invalidPipeArgumentError(type, value) {
25635
    return Error("InvalidPipeArgument: '" + value + "' for pipe '" + Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵstringify"])(type) + "'");
25636
}
25637
 
25638
var NumberFormatter = /** @class */ (function () {
25639
    function NumberFormatter() {
25640
    }
25641
    NumberFormatter.format = function (num, locale, style, opts) {
25642
        if (opts === void 0) { opts = {}; }
25643
        var minimumIntegerDigits = opts.minimumIntegerDigits, minimumFractionDigits = opts.minimumFractionDigits, maximumFractionDigits = opts.maximumFractionDigits, currency = opts.currency, _a = opts.currencyAsSymbol, currencyAsSymbol = _a === void 0 ? false : _a;
25644
        var options = {
25645
            minimumIntegerDigits: minimumIntegerDigits,
25646
            minimumFractionDigits: minimumFractionDigits,
25647
            maximumFractionDigits: maximumFractionDigits,
25648
            style: NumberFormatStyle[style].toLowerCase()
25649
        };
25650
        if (style == NumberFormatStyle.Currency) {
25651
            options.currency = typeof currency == 'string' ? currency : undefined;
25652
            options.currencyDisplay = currencyAsSymbol ? 'symbol' : 'code';
25653
        }
25654
        return new Intl.NumberFormat(locale, options).format(num);
25655
    };
25656
    return NumberFormatter;
25657
}());
25658
var DATE_FORMATS_SPLIT$1 = /((?:[^yMLdHhmsazZEwGjJ']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|J+|j+|m+|s+|a|z|Z|G+|w+))(.*)/;
25659
var PATTERN_ALIASES = {
25660
    // Keys are quoted so they do not get renamed during closure compilation.
25661
    'yMMMdjms': datePartGetterFactory(combine([
25662
        digitCondition('year', 1),
25663
        nameCondition('month', 3),
25664
        digitCondition('day', 1),
25665
        digitCondition('hour', 1),
25666
        digitCondition('minute', 1),
25667
        digitCondition('second', 1),
25668
    ])),
25669
    'yMdjm': datePartGetterFactory(combine([
25670
        digitCondition('year', 1), digitCondition('month', 1), digitCondition('day', 1),
25671
        digitCondition('hour', 1), digitCondition('minute', 1)
25672
    ])),
25673
    'yMMMMEEEEd': datePartGetterFactory(combine([
25674
        digitCondition('year', 1), nameCondition('month', 4), nameCondition('weekday', 4),
25675
        digitCondition('day', 1)
25676
    ])),
25677
    'yMMMMd': datePartGetterFactory(combine([digitCondition('year', 1), nameCondition('month', 4), digitCondition('day', 1)])),
25678
    'yMMMd': datePartGetterFactory(combine([digitCondition('year', 1), nameCondition('month', 3), digitCondition('day', 1)])),
25679
    'yMd': datePartGetterFactory(combine([digitCondition('year', 1), digitCondition('month', 1), digitCondition('day', 1)])),
25680
    'jms': datePartGetterFactory(combine([digitCondition('hour', 1), digitCondition('second', 1), digitCondition('minute', 1)])),
25681
    'jm': datePartGetterFactory(combine([digitCondition('hour', 1), digitCondition('minute', 1)]))
25682
};
25683
var DATE_FORMATS$1 = {
25684
    // Keys are quoted so they do not get renamed.
25685
    'yyyy': datePartGetterFactory(digitCondition('year', 4)),
25686
    'yy': datePartGetterFactory(digitCondition('year', 2)),
25687
    'y': datePartGetterFactory(digitCondition('year', 1)),
25688
    'MMMM': datePartGetterFactory(nameCondition('month', 4)),
25689
    'MMM': datePartGetterFactory(nameCondition('month', 3)),
25690
    'MM': datePartGetterFactory(digitCondition('month', 2)),
25691
    'M': datePartGetterFactory(digitCondition('month', 1)),
25692
    'LLLL': datePartGetterFactory(nameCondition('month', 4)),
25693
    'L': datePartGetterFactory(nameCondition('month', 1)),
25694
    'dd': datePartGetterFactory(digitCondition('day', 2)),
25695
    'd': datePartGetterFactory(digitCondition('day', 1)),
25696
    'HH': digitModifier(hourExtractor(datePartGetterFactory(hour12Modify(digitCondition('hour', 2), false)))),
25697
    'H': hourExtractor(datePartGetterFactory(hour12Modify(digitCondition('hour', 1), false))),
25698
    'hh': digitModifier(hourExtractor(datePartGetterFactory(hour12Modify(digitCondition('hour', 2), true)))),
25699
    'h': hourExtractor(datePartGetterFactory(hour12Modify(digitCondition('hour', 1), true))),
25700
    'jj': datePartGetterFactory(digitCondition('hour', 2)),
25701
    'j': datePartGetterFactory(digitCondition('hour', 1)),
25702
    'mm': digitModifier(datePartGetterFactory(digitCondition('minute', 2))),
25703
    'm': datePartGetterFactory(digitCondition('minute', 1)),
25704
    'ss': digitModifier(datePartGetterFactory(digitCondition('second', 2))),
25705
    's': datePartGetterFactory(digitCondition('second', 1)),
25706
    // while ISO 8601 requires fractions to be prefixed with `.` or `,`
25707
    // we can be just safely rely on using `sss` since we currently don't support single or two digit
25708
    // fractions
25709
    'sss': datePartGetterFactory(digitCondition('second', 3)),
25710
    'EEEE': datePartGetterFactory(nameCondition('weekday', 4)),
25711
    'EEE': datePartGetterFactory(nameCondition('weekday', 3)),
25712
    'EE': datePartGetterFactory(nameCondition('weekday', 2)),
25713
    'E': datePartGetterFactory(nameCondition('weekday', 1)),
25714
    'a': hourClockExtractor(datePartGetterFactory(hour12Modify(digitCondition('hour', 1), true))),
25715
    'Z': timeZoneGetter$1('short'),
25716
    'z': timeZoneGetter$1('long'),
25717
    'ww': datePartGetterFactory({}),
25718
    // Week of year, padded (00-53). Week 01 is the week with the
25719
    // first Thursday of the year. not support ?
25720
    'w': datePartGetterFactory({}),
25721
    // Week of year (0-53). Week 1 is the week with the first Thursday
25722
    // of the year not support ?
25723
    'G': datePartGetterFactory(nameCondition('era', 1)),
25724
    'GG': datePartGetterFactory(nameCondition('era', 2)),
25725
    'GGG': datePartGetterFactory(nameCondition('era', 3)),
25726
    'GGGG': datePartGetterFactory(nameCondition('era', 4))
25727
};
25728
function digitModifier(inner) {
25729
    return function (date, locale) {
25730
        var result = inner(date, locale);
25731
        return result.length == 1 ? '0' + result : result;
25732
    };
25733
}
25734
function hourClockExtractor(inner) {
25735
    return function (date, locale) { return inner(date, locale).split(' ')[1]; };
25736
}
25737
function hourExtractor(inner) {
25738
    return function (date, locale) { return inner(date, locale).split(' ')[0]; };
25739
}
25740
function intlDateFormat(date, locale, options) {
25741
    return new Intl.DateTimeFormat(locale, options).format(date).replace(/[\u200e\u200f]/g, '');
25742
}
25743
function timeZoneGetter$1(timezone) {
25744
    // To workaround `Intl` API restriction for single timezone let format with 24 hours
25745
    var options = { hour: '2-digit', hour12: false, timeZoneName: timezone };
25746
    return function (date, locale) {
25747
        var result = intlDateFormat(date, locale, options);
25748
        // Then extract first 3 letters that related to hours
25749
        return result ? result.substring(3) : '';
25750
    };
25751
}
25752
function hour12Modify(options, value) {
25753
    options.hour12 = value;
25754
    return options;
25755
}
25756
function digitCondition(prop, len) {
25757
    var result = {};
25758
    result[prop] = len === 2 ? '2-digit' : 'numeric';
25759
    return result;
25760
}
25761
function nameCondition(prop, len) {
25762
    var result = {};
25763
    if (len < 4) {
25764
        result[prop] = len > 1 ? 'short' : 'narrow';
25765
    }
25766
    else {
25767
        result[prop] = 'long';
25768
    }
25769
    return result;
25770
}
25771
function combine(options) {
25772
    return options.reduce(function (merged, opt) { return (Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__assign"])({}, merged, opt)); }, {});
25773
}
25774
function datePartGetterFactory(ret) {
25775
    return function (date, locale) { return intlDateFormat(date, locale, ret); };
25776
}
25777
var DATE_FORMATTER_CACHE = new Map();
25778
function dateFormatter(format, date, locale) {
25779
    var fn = PATTERN_ALIASES[format];
25780
    if (fn)
25781
        return fn(date, locale);
25782
    var cacheKey = format;
25783
    var parts = DATE_FORMATTER_CACHE.get(cacheKey);
25784
    if (!parts) {
25785
        parts = [];
25786
        var match = void 0;
25787
        DATE_FORMATS_SPLIT$1.exec(format);
25788
        var _format = format;
25789
        while (_format) {
25790
            match = DATE_FORMATS_SPLIT$1.exec(_format);
25791
            if (match) {
25792
                parts = parts.concat(match.slice(1));
25793
                _format = (parts.pop());
25794
            }
25795
            else {
25796
                parts.push(_format);
25797
                _format = null;
25798
            }
25799
        }
25800
        DATE_FORMATTER_CACHE.set(cacheKey, parts);
25801
    }
25802
    return parts.reduce(function (text, part) {
25803
        var fn = DATE_FORMATS$1[part];
25804
        return text + (fn ? fn(date, locale) : partToTime(part));
25805
    }, '');
25806
}
25807
function partToTime(part) {
25808
    return part === '\'\'' ? '\'' : part.replace(/(^'|'$)/g, '').replace(/''/g, '\'');
25809
}
25810
var DateFormatter = /** @class */ (function () {
25811
    function DateFormatter() {
25812
    }
25813
    DateFormatter.format = function (date, locale, pattern) {
25814
        return dateFormatter(pattern, date, locale);
25815
    };
25816
    return DateFormatter;
25817
}());
25818
 
25819
/**
25820
* @license
25821
* Copyright Google Inc. All Rights Reserved.
25822
*
25823
* Use of this source code is governed by an MIT-style license that can be
25824
* found in the LICENSE file at https://angular.io/license
25825
  */
25826
/**
25827
 * @ngModule CommonModule
25828
 * @description
25829
 *
25830
 * Formats a date according to locale rules.
25831
 *
25832
 * Where:
25833
 * - `expression` is a date object or a number (milliseconds since UTC epoch) or an ISO string
25834
 * (https://www.w3.org/TR/NOTE-datetime).
25835
 * - `format` indicates which date/time components to include. The format can be predefined as
25836
 *   shown below or custom as shown in the table.
25837
 *   - `'medium'`: equivalent to `'yMMMdjms'` (e.g. `Sep 3, 2010, 12:05:08 PM` for `en-US`)
25838
 *   - `'short'`: equivalent to `'yMdjm'` (e.g. `9/3/2010, 12:05 PM` for `en-US`)
25839
 *   - `'fullDate'`: equivalent to `'yMMMMEEEEd'` (e.g. `Friday, September 3, 2010` for `en-US`)
25840
 *   - `'longDate'`: equivalent to `'yMMMMd'` (e.g. `September 3, 2010` for `en-US`)
25841
 *   - `'mediumDate'`: equivalent to `'yMMMd'` (e.g. `Sep 3, 2010` for `en-US`)
25842
 *   - `'shortDate'`: equivalent to `'yMd'` (e.g. `9/3/2010` for `en-US`)
25843
 *   - `'mediumTime'`: equivalent to `'jms'` (e.g. `12:05:08 PM` for `en-US`)
25844
 *   - `'shortTime'`: equivalent to `'jm'` (e.g. `12:05 PM` for `en-US`)
25845
 *
25846
 *
25847
 *  | Component | Symbol | Narrow | Short Form   | Long Form         | Numeric   | 2-digit   |
25848
 *  |-----------|:------:|--------|--------------|-------------------|-----------|-----------|
25849
 *  | era       |   G    | G (A)  | GGG (AD)     | GGGG (Anno Domini)| -         | -         |
25850
 *  | year      |   y    | -      | -            | -                 | y (2015)  | yy (15)   |
25851
 *  | month     |   M    | L (S)  | MMM (Sep)    | MMMM (September)  | M (9)     | MM (09)   |
25852
 *  | day       |   d    | -      | -            | -                 | d (3)     | dd (03)   |
25853
 *  | weekday   |   E    | E (S)  | EEE (Sun)    | EEEE (Sunday)     | -         | -         |
25854
 *  | hour      |   j    | -      | -            | -                 | j (13)    | jj (13)   |
25855
 *  | hour12    |   h    | -      | -            | -                 | h (1 PM)  | hh (01 PM)|
25856
 *  | hour24    |   H    | -      | -            | -                 | H (13)    | HH (13)   |
25857
 *  | minute    |   m    | -      | -            | -                 | m (5)     | mm (05)   |
25858
 *  | second    |   s    | -      | -            | -                 | s (9)     | ss (09)   |
25859
 *  | timezone  |   z    | -      | -            | z (Pacific Standard Time)| -  | -         |
25860
 *  | timezone  |   Z    | -      | Z (GMT-8:00) | -                 | -         | -         |
25861
 *  | timezone  |   a    | -      | a (PM)       | -                 | -         | -         |
25862
 *
25863
 * In javascript, only the components specified will be respected (not the ordering,
25864
 * punctuations, ...) and details of the formatting will be dependent on the locale.
25865
 *
25866
 * Timezone of the formatted text will be the local system timezone of the end-user's machine.
25867
 *
25868
 * When the expression is a ISO string without time (e.g. 2016-09-19) the time zone offset is not
25869
 * applied and the formatted text will have the same day, month and year of the expression.
25870
 *
25871
 * WARNINGS:
25872
 * - this pipe is marked as pure hence it will not be re-evaluated when the input is mutated.
25873
 *   Instead users should treat the date as an immutable object and change the reference when the
25874
 *   pipe needs to re-run (this is to avoid reformatting the date on every change detection run
25875
 *   which would be an expensive operation).
25876
 * - this pipe uses the Internationalization API. Therefore it is only reliable in Chrome and Opera
25877
 *   browsers.
25878
 *
25879
 * ### Examples
25880
 *
25881
 * Assuming `dateObj` is (year: 2010, month: 9, day: 3, hour: 12 PM, minute: 05, second: 08)
25882
 * in the _local_ time and locale is 'en-US':
25883
 *
25884
 * {@example common/pipes/ts/date_pipe.ts region='DeprecatedDatePipe'}
25885
 *
25886
 *
25887
 */
25888
var DeprecatedDatePipe = /** @class */ (function () {
25889
    function DeprecatedDatePipe(_locale) {
25890
        this._locale = _locale;
25891
    }
25892
    DeprecatedDatePipe.prototype.transform = function (value, pattern) {
25893
        if (pattern === void 0) { pattern = 'mediumDate'; }
25894
        if (value == null || value === '' || value !== value)
25895
            return null;
25896
        var date;
25897
        if (typeof value === 'string') {
25898
            value = value.trim();
25899
        }
25900
        if (isDate$1(value)) {
25901
            date = value;
25902
        }
25903
        else if (!isNaN(value - parseFloat(value))) {
25904
            date = new Date(parseFloat(value));
25905
        }
25906
        else if (typeof value === 'string' && /^(\d{4}-\d{1,2}-\d{1,2})$/.test(value)) {
25907
            /**
25908
                   * For ISO Strings without time the day, month and year must be extracted from the ISO String
25909
                   * before Date creation to avoid time offset and errors in the new Date.
25910
                   * If we only replace '-' with ',' in the ISO String ("2015,01,01"), and try to create a new
25911
                   * date, some browsers (e.g. IE 9) will throw an invalid Date error
25912
                   * If we leave the '-' ("2015-01-01") and try to create a new Date("2015-01-01") the
25913
                   * timeoffset
25914
                   * is applied
25915
                   * Note: ISO months are 0 for January, 1 for February, ...
25916
                   */
25917
            var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__read"])(value.split('-').map(function (val) { return parseInt(val, 10); }), 3), y = _a[0], m = _a[1], d = _a[2];
25918
            date = new Date(y, m - 1, d);
25919
        }
25920
        else {
25921
            date = new Date(value);
25922
        }
25923
        if (!isDate$1(date)) {
25924
            var match = void 0;
25925
            if ((typeof value === 'string') && (match = value.match(ISO8601_DATE_REGEX))) {
25926
                date = isoStringToDate(match);
25927
            }
25928
            else {
25929
                throw invalidPipeArgumentError(DeprecatedDatePipe, value);
25930
            }
25931
        }
25932
        return DateFormatter.format(date, this._locale, DeprecatedDatePipe._ALIASES[pattern] || pattern);
25933
    };
25934
    /** @internal */
25935
    DeprecatedDatePipe._ALIASES = {
25936
        'medium': 'yMMMdjms',
25937
        'short': 'yMdjm',
25938
        'fullDate': 'yMMMMEEEEd',
25939
        'longDate': 'yMMMMd',
25940
        'mediumDate': 'yMMMd',
25941
        'shortDate': 'yMd',
25942
        'mediumTime': 'jms',
25943
        'shortTime': 'jm'
25944
    };
25945
    DeprecatedDatePipe.decorators = [
25946
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'date', pure: true },] }
25947
    ];
25948
    /** @nocollapse */
25949
    DeprecatedDatePipe.ctorParameters = function () { return [
25950
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"],] },] },
25951
    ]; };
25952
    return DeprecatedDatePipe;
25953
}());
25954
function isDate$1(value) {
25955
    return value instanceof Date && !isNaN(value.valueOf());
25956
}
25957
 
25958
/**
25959
 * @license
25960
 * Copyright Google Inc. All Rights Reserved.
25961
 *
25962
 * Use of this source code is governed by an MIT-style license that can be
25963
 * found in the LICENSE file at https://angular.io/license
25964
 */
25965
function formatNumber$1(pipe, locale, value, style, digits, currency, currencyAsSymbol) {
25966
    if (currency === void 0) { currency = null; }
25967
    if (currencyAsSymbol === void 0) { currencyAsSymbol = false; }
25968
    if (value == null)
25969
        return null;
25970
    // Convert strings to numbers
25971
    value = typeof value === 'string' && !isNaN(+value - parseFloat(value)) ? +value : value;
25972
    if (typeof value !== 'number') {
25973
        throw invalidPipeArgumentError(pipe, value);
25974
    }
25975
    var minInt;
25976
    var minFraction;
25977
    var maxFraction;
25978
    if (style !== NumberFormatStyle.Currency) {
25979
        // rely on Intl default for currency
25980
        minInt = 1;
25981
        minFraction = 0;
25982
        maxFraction = 3;
25983
    }
25984
    if (digits) {
25985
        var parts = digits.match(NUMBER_FORMAT_REGEXP);
25986
        if (parts === null) {
25987
            throw new Error(digits + " is not a valid digit info for number pipes");
25988
        }
25989
        if (parts[1] != null) {
25990
            // min integer digits
25991
            minInt = parseIntAutoRadix(parts[1]);
25992
        }
25993
        if (parts[3] != null) {
25994
            // min fraction digits
25995
            minFraction = parseIntAutoRadix(parts[3]);
25996
        }
25997
        if (parts[5] != null) {
25998
            // max fraction digits
25999
            maxFraction = parseIntAutoRadix(parts[5]);
26000
        }
26001
    }
26002
    return NumberFormatter.format(value, locale, style, {
26003
        minimumIntegerDigits: minInt,
26004
        minimumFractionDigits: minFraction,
26005
        maximumFractionDigits: maxFraction,
26006
        currency: currency,
26007
        currencyAsSymbol: currencyAsSymbol,
26008
    });
26009
}
26010
/**
26011
 * @ngModule CommonModule
26012
 *
26013
 * Formats a number as text. Group sizing and separator and other locale-specific
26014
 * configurations are based on the active locale.
26015
 *
26016
 * where `expression` is a number:
26017
 *  - `digitInfo` is a `string` which has a following format: <br>
26018
 *     <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>
26019
 *   - `minIntegerDigits` is the minimum number of integer digits to use. Defaults to `1`.
26020
 *   - `minFractionDigits` is the minimum number of digits after fraction. Defaults to `0`.
26021
 *   - `maxFractionDigits` is the maximum number of digits after fraction. Defaults to `3`.
26022
 *
26023
 * For more information on the acceptable range for each of these numbers and other
26024
 * details see your native internationalization library.
26025
 *
26026
 * WARNING: this pipe uses the Internationalization API which is not yet available in all browsers
26027
 * and may require a polyfill. See [Browser Support](guide/browser-support) for details.
26028
 *
26029
 * ### Example
26030
 *
26031
 * {@example common/pipes/ts/number_pipe.ts region='DeprecatedNumberPipe'}
26032
 *
26033
 *
26034
 */
26035
var DeprecatedDecimalPipe = /** @class */ (function () {
26036
    function DeprecatedDecimalPipe(_locale) {
26037
        this._locale = _locale;
26038
    }
26039
    DeprecatedDecimalPipe.prototype.transform = function (value, digits) {
26040
        return formatNumber$1(DeprecatedDecimalPipe, this._locale, value, NumberFormatStyle.Decimal, digits);
26041
    };
26042
    DeprecatedDecimalPipe.decorators = [
26043
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'number' },] }
26044
    ];
26045
    /** @nocollapse */
26046
    DeprecatedDecimalPipe.ctorParameters = function () { return [
26047
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"],] },] },
26048
    ]; };
26049
    return DeprecatedDecimalPipe;
26050
}());
26051
/**
26052
 * @ngModule CommonModule
26053
 *
26054
 * @description
26055
 *
26056
 * Formats a number as percentage according to locale rules.
26057
 *
26058
 * - `digitInfo` See {@link DecimalPipe} for detailed description.
26059
 *
26060
 * WARNING: this pipe uses the Internationalization API which is not yet available in all browsers
26061
 * and may require a polyfill. See [Browser Support](guide/browser-support) for details.
26062
 *
26063
 * ### Example
26064
 *
26065
 * {@example common/pipes/ts/percent_pipe.ts region='DeprecatedPercentPipe'}
26066
 *
26067
 *
26068
 */
26069
var DeprecatedPercentPipe = /** @class */ (function () {
26070
    function DeprecatedPercentPipe(_locale) {
26071
        this._locale = _locale;
26072
    }
26073
    DeprecatedPercentPipe.prototype.transform = function (value, digits) {
26074
        return formatNumber$1(DeprecatedPercentPipe, this._locale, value, NumberFormatStyle.Percent, digits);
26075
    };
26076
    DeprecatedPercentPipe.decorators = [
26077
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'percent' },] }
26078
    ];
26079
    /** @nocollapse */
26080
    DeprecatedPercentPipe.ctorParameters = function () { return [
26081
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"],] },] },
26082
    ]; };
26083
    return DeprecatedPercentPipe;
26084
}());
26085
/**
26086
 * @ngModule CommonModule
26087
 * @description
26088
 *
26089
 * Formats a number as currency using locale rules.
26090
 *
26091
 * Use `currency` to format a number as currency.
26092
 *
26093
 * - `currencyCode` is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, such
26094
 *    as `USD` for the US dollar and `EUR` for the euro.
26095
 * - `symbolDisplay` is a boolean indicating whether to use the currency symbol or code.
26096
 *   - `true`: use symbol (e.g. `$`).
26097
 *   - `false`(default): use code (e.g. `USD`).
26098
 * - `digitInfo` See {@link DecimalPipe} for detailed description.
26099
 *
26100
 * WARNING: this pipe uses the Internationalization API which is not yet available in all browsers
26101
 * and may require a polyfill. See [Browser Support](guide/browser-support) for details.
26102
 *
26103
 * ### Example
26104
 *
26105
 * {@example common/pipes/ts/currency_pipe.ts region='DeprecatedCurrencyPipe'}
26106
 *
26107
 *
26108
 */
26109
var DeprecatedCurrencyPipe = /** @class */ (function () {
26110
    function DeprecatedCurrencyPipe(_locale) {
26111
        this._locale = _locale;
26112
    }
26113
    DeprecatedCurrencyPipe.prototype.transform = function (value, currencyCode, symbolDisplay, digits) {
26114
        if (currencyCode === void 0) { currencyCode = 'USD'; }
26115
        if (symbolDisplay === void 0) { symbolDisplay = false; }
26116
        return formatNumber$1(DeprecatedCurrencyPipe, this._locale, value, NumberFormatStyle.Currency, digits, currencyCode, symbolDisplay);
26117
    };
26118
    DeprecatedCurrencyPipe.decorators = [
26119
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'currency' },] }
26120
    ];
26121
    /** @nocollapse */
26122
    DeprecatedCurrencyPipe.ctorParameters = function () { return [
26123
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"],] },] },
26124
    ]; };
26125
    return DeprecatedCurrencyPipe;
26126
}());
26127
 
26128
/**
26129
 * @license
26130
 * Copyright Google Inc. All Rights Reserved.
26131
 *
26132
 * Use of this source code is governed by an MIT-style license that can be
26133
 * found in the LICENSE file at https://angular.io/license
26134
 */
26135
/**
26136
 * A collection of deprecated i18n pipes that require intl api
26137
 *
26138
 * @deprecated from v5
26139
 */
26140
var COMMON_DEPRECATED_I18N_PIPES = [DeprecatedDecimalPipe, DeprecatedPercentPipe, DeprecatedCurrencyPipe, DeprecatedDatePipe];
26141
 
26142
/**
26143
 * @license
26144
 * Copyright Google Inc. All Rights Reserved.
26145
 *
26146
 * Use of this source code is governed by an MIT-style license that can be
26147
 * found in the LICENSE file at https://angular.io/license
26148
 */
26149
var ObservableStrategy = /** @class */ (function () {
26150
    function ObservableStrategy() {
26151
    }
26152
    ObservableStrategy.prototype.createSubscription = function (async, updateLatestValue) {
26153
        return async.subscribe({ next: updateLatestValue, error: function (e) { throw e; } });
26154
    };
26155
    ObservableStrategy.prototype.dispose = function (subscription) { subscription.unsubscribe(); };
26156
    ObservableStrategy.prototype.onDestroy = function (subscription) { subscription.unsubscribe(); };
26157
    return ObservableStrategy;
26158
}());
26159
var PromiseStrategy = /** @class */ (function () {
26160
    function PromiseStrategy() {
26161
    }
26162
    PromiseStrategy.prototype.createSubscription = function (async, updateLatestValue) {
26163
        return async.then(updateLatestValue, function (e) { throw e; });
26164
    };
26165
    PromiseStrategy.prototype.dispose = function (subscription) { };
26166
    PromiseStrategy.prototype.onDestroy = function (subscription) { };
26167
    return PromiseStrategy;
26168
}());
26169
var _promiseStrategy = new PromiseStrategy();
26170
var _observableStrategy = new ObservableStrategy();
26171
/**
26172
 * @ngModule CommonModule
26173
 * @description
26174
 *
26175
 * Unwraps a value from an asynchronous primitive.
26176
 *
26177
 * The `async` pipe subscribes to an `Observable` or `Promise` and returns the latest value it has
26178
 * emitted. When a new value is emitted, the `async` pipe marks the component to be checked for
26179
 * changes. When the component gets destroyed, the `async` pipe unsubscribes automatically to avoid
26180
 * potential memory leaks.
26181
 *
26182
 *
26183
 * ## Examples
26184
 *
26185
 * This example binds a `Promise` to the view. Clicking the `Resolve` button resolves the
26186
 * promise.
26187
 *
26188
 * {@example common/pipes/ts/async_pipe.ts region='AsyncPipePromise'}
26189
 *
26190
 * It's also possible to use `async` with Observables. The example below binds the `time` Observable
26191
 * to the view. The Observable continuously updates the view with the current time.
26192
 *
26193
 * {@example common/pipes/ts/async_pipe.ts region='AsyncPipeObservable'}
26194
 *
26195
 *
26196
 */
26197
var AsyncPipe = /** @class */ (function () {
26198
    function AsyncPipe(_ref) {
26199
        this._ref = _ref;
26200
        this._latestValue = null;
26201
        this._latestReturnedValue = null;
26202
        this._subscription = null;
26203
        this._obj = null;
26204
        this._strategy = null;
26205
    }
26206
    AsyncPipe.prototype.ngOnDestroy = function () {
26207
        if (this._subscription) {
26208
            this._dispose();
26209
        }
26210
    };
26211
    AsyncPipe.prototype.transform = function (obj) {
26212
        if (!this._obj) {
26213
            if (obj) {
26214
                this._subscribe(obj);
26215
            }
26216
            this._latestReturnedValue = this._latestValue;
26217
            return this._latestValue;
26218
        }
26219
        if (obj !== this._obj) {
26220
            this._dispose();
26221
            return this.transform(obj);
26222
        }
26223
        if (this._latestValue === this._latestReturnedValue) {
26224
            return this._latestReturnedValue;
26225
        }
26226
        this._latestReturnedValue = this._latestValue;
26227
        return _angular_core__WEBPACK_IMPORTED_MODULE_0__["WrappedValue"].wrap(this._latestValue);
26228
    };
26229
    AsyncPipe.prototype._subscribe = function (obj) {
26230
        var _this = this;
26231
        this._obj = obj;
26232
        this._strategy = this._selectStrategy(obj);
26233
        this._subscription = this._strategy.createSubscription(obj, function (value) { return _this._updateLatestValue(obj, value); });
26234
    };
26235
    AsyncPipe.prototype._selectStrategy = function (obj) {
26236
        if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵisPromise"])(obj)) {
26237
            return _promiseStrategy;
26238
        }
26239
        if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵisObservable"])(obj)) {
26240
            return _observableStrategy;
26241
        }
26242
        throw invalidPipeArgumentError(AsyncPipe, obj);
26243
    };
26244
    AsyncPipe.prototype._dispose = function () {
26245
        this._strategy.dispose((this._subscription));
26246
        this._latestValue = null;
26247
        this._latestReturnedValue = null;
26248
        this._subscription = null;
26249
        this._obj = null;
26250
    };
26251
    AsyncPipe.prototype._updateLatestValue = function (async, value) {
26252
        if (async === this._obj) {
26253
            this._latestValue = value;
26254
            this._ref.markForCheck();
26255
        }
26256
    };
26257
    AsyncPipe.decorators = [
26258
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'async', pure: false },] }
26259
    ];
26260
    /** @nocollapse */
26261
    AsyncPipe.ctorParameters = function () { return [
26262
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"], },
26263
    ]; };
26264
    return AsyncPipe;
26265
}());
26266
 
26267
/**
26268
 * @license
26269
 * Copyright Google Inc. All Rights Reserved.
26270
 *
26271
 * Use of this source code is governed by an MIT-style license that can be
26272
 * found in the LICENSE file at https://angular.io/license
26273
 */
26274
/**
26275
 * Transforms text to lowercase.
26276
 *
26277
 * {@example  common/pipes/ts/lowerupper_pipe.ts region='LowerUpperPipe' }
26278
 *
26279
 *
26280
 */
26281
var LowerCasePipe = /** @class */ (function () {
26282
    function LowerCasePipe() {
26283
    }
26284
    LowerCasePipe.prototype.transform = function (value) {
26285
        if (!value)
26286
            return value;
26287
        if (typeof value !== 'string') {
26288
            throw invalidPipeArgumentError(LowerCasePipe, value);
26289
        }
26290
        return value.toLowerCase();
26291
    };
26292
    LowerCasePipe.decorators = [
26293
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'lowercase' },] }
26294
    ];
26295
    /** @nocollapse */
26296
    LowerCasePipe.ctorParameters = function () { return []; };
26297
    return LowerCasePipe;
26298
}());
26299
//
26300
// Regex below matches any Unicode word and compatible with ES5. In ES2018 the same result
26301
// can be achieved by using /\p{L}\S*/gu and also known as Unicode Property Escapes
26302
// (http://2ality.com/2017/07/regexp-unicode-property-escapes.html). Since there is no
26303
// transpilation of this functionality down to ES5 without external tool, the only solution is
26304
// to use already transpiled form. Example can be found here -
26305
// https://mothereff.in/regexpu#input=var+regex+%3D+/%5Cp%7BL%7D/u%3B&unicodePropertyEscape=1
26306
//
26307
var unicodeWordMatch = /(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D])\S*/g;
26308
/**
26309
 * Transforms text to titlecase.
26310
 *
26311
 * The pipe splits up a text into words, capitalizes the first letter of each word and transforms
26312
 * the rest of the word into lowercase. In this case, whitespace characters (such as "space", "\t",
26313
 * "\n", etc) are used as word separators.
26314
 *
26315
 * ## Example
26316
 * {@example common/pipes/ts/titlecase_pipe.ts region='TitleCasePipe'}
26317
 *
26318
 *
26319
 */
26320
var TitleCasePipe = /** @class */ (function () {
26321
    function TitleCasePipe() {
26322
    }
26323
    TitleCasePipe.prototype.transform = function (value) {
26324
        if (!value)
26325
            return value;
26326
        if (typeof value !== 'string') {
26327
            throw invalidPipeArgumentError(TitleCasePipe, value);
26328
        }
26329
        return value.replace(unicodeWordMatch, (function (txt) { return txt[0].toUpperCase() + txt.substr(1).toLowerCase(); }));
26330
    };
26331
    TitleCasePipe.decorators = [
26332
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'titlecase' },] }
26333
    ];
26334
    /** @nocollapse */
26335
    TitleCasePipe.ctorParameters = function () { return []; };
26336
    return TitleCasePipe;
26337
}());
26338
/**
26339
 * Transforms text to uppercase.
26340
 *
26341
 *
26342
 */
26343
var UpperCasePipe = /** @class */ (function () {
26344
    function UpperCasePipe() {
26345
    }
26346
    UpperCasePipe.prototype.transform = function (value) {
26347
        if (!value)
26348
            return value;
26349
        if (typeof value !== 'string') {
26350
            throw invalidPipeArgumentError(UpperCasePipe, value);
26351
        }
26352
        return value.toUpperCase();
26353
    };
26354
    UpperCasePipe.decorators = [
26355
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'uppercase' },] }
26356
    ];
26357
    /** @nocollapse */
26358
    UpperCasePipe.ctorParameters = function () { return []; };
26359
    return UpperCasePipe;
26360
}());
26361
 
26362
/**
26363
 * @license
26364
 * Copyright Google Inc. All Rights Reserved.
26365
 *
26366
 * Use of this source code is governed by an MIT-style license that can be
26367
 * found in the LICENSE file at https://angular.io/license
26368
 */
26369
// clang-format off
26370
/**
26371
 * @ngModule CommonModule
26372
 * @description
26373
 *
26374
 * Uses the function {@link formatDate} to format a date according to locale rules.
26375
 *
26376
 * The following tabled describes the formatting options.
26377
 *
26378
 *  | Field Type         | Format      | Description                                                   | Example Value                                              |
26379
 *  |--------------------|-------------|---------------------------------------------------------------|------------------------------------------------------------|
26380
 *  | Era                | G, GG & GGG | Abbreviated                                                   | AD                                                         |
26381
 *  |                    | GGGG        | Wide                                                          | Anno Domini                                                |
26382
 *  |                    | GGGGG       | Narrow                                                        | A                                                          |
26383
 *  | Year               | y           | Numeric: minimum digits                                       | 2, 20, 201, 2017, 20173                                    |
26384
 *  |                    | yy          | Numeric: 2 digits + zero padded                               | 02, 20, 01, 17, 73                                         |
26385
 *  |                    | yyy         | Numeric: 3 digits + zero padded                               | 002, 020, 201, 2017, 20173                                 |
26386
 *  |                    | yyyy        | Numeric: 4 digits or more + zero padded                       | 0002, 0020, 0201, 2017, 20173                              |
26387
 *  | Month              | M           | Numeric: 1 digit                                              | 9, 12                                                      |
26388
 *  |                    | MM          | Numeric: 2 digits + zero padded                               | 09, 12                                                     |
26389
 *  |                    | MMM         | Abbreviated                                                   | Sep                                                        |
26390
 *  |                    | MMMM        | Wide                                                          | September                                                  |
26391
 *  |                    | MMMMM       | Narrow                                                        | S                                                          |
26392
 *  | Month standalone   | L           | Numeric: 1 digit                                              | 9, 12                                                      |
26393
 *  |                    | LL          | Numeric: 2 digits + zero padded                               | 09, 12                                                     |
26394
 *  |                    | LLL         | Abbreviated                                                   | Sep                                                        |
26395
 *  |                    | LLLL        | Wide                                                          | September                                                  |
26396
 *  |                    | LLLLL       | Narrow                                                        | S                                                          |
26397
 *  | Week of year       | w           | Numeric: minimum digits                                       | 1... 53                                                    |
26398
 *  |                    | ww          | Numeric: 2 digits + zero padded                               | 01... 53                                                   |
26399
 *  | Week of month      | W           | Numeric: 1 digit                                              | 1... 5                                                     |
26400
 *  | Day of month       | d           | Numeric: minimum digits                                       | 1                                                          |
26401
 *  |                    | dd          | Numeric: 2 digits + zero padded                               | 01                                                          |
26402
 *  | Week day           | E, EE & EEE | Abbreviated                                                   | Tue                                                        |
26403
 *  |                    | EEEE        | Wide                                                          | Tuesday                                                    |
26404
 *  |                    | EEEEE       | Narrow                                                        | T                                                          |
26405
 *  |                    | EEEEEE      | Short                                                         | Tu                                                         |
26406
 *  | Period             | a, aa & aaa | Abbreviated                                                   | am/pm or AM/PM                                             |
26407
 *  |                    | aaaa        | Wide (fallback to `a` when missing)                           | ante meridiem/post meridiem                                |
26408
 *  |                    | aaaaa       | Narrow                                                        | a/p                                                        |
26409
 *  | Period*            | B, BB & BBB | Abbreviated                                                   | mid.                                                       |
26410
 *  |                    | BBBB        | Wide                                                          | am, pm, midnight, noon, morning, afternoon, evening, night |
26411
 *  |                    | BBBBB       | Narrow                                                        | md                                                         |
26412
 *  | Period standalone* | b, bb & bbb | Abbreviated                                                   | mid.                                                       |
26413
 *  |                    | bbbb        | Wide                                                          | am, pm, midnight, noon, morning, afternoon, evening, night |
26414
 *  |                    | bbbbb       | Narrow                                                        | md                                                         |
26415
 *  | Hour 1-12          | h           | Numeric: minimum digits                                       | 1, 12                                                      |
26416
 *  |                    | hh          | Numeric: 2 digits + zero padded                               | 01, 12                                                     |
26417
 *  | Hour 0-23          | H           | Numeric: minimum digits                                       | 0, 23                                                      |
26418
 *  |                    | HH          | Numeric: 2 digits + zero padded                               | 00, 23                                                     |
26419
 *  | Minute             | m           | Numeric: minimum digits                                       | 8, 59                                                      |
26420
 *  |                    | mm          | Numeric: 2 digits + zero padded                               | 08, 59                                                     |
26421
 *  | Second             | s           | Numeric: minimum digits                                       | 0... 59                                                    |
26422
 *  |                    | ss          | Numeric: 2 digits + zero padded                               | 00... 59                                                   |
26423
 *  | Fractional seconds | S           | Numeric: 1 digit                                              | 0... 9                                                     |
26424
 *  |                    | SS          | Numeric: 2 digits + zero padded                               | 00... 99                                                   |
26425
 *  |                    | SSS         | Numeric: 3 digits + zero padded (= milliseconds)              | 000... 999                                                 |
26426
 *  | Zone               | z, zz & zzz | Short specific non location format (fallback to O)            | GMT-8                                                      |
26427
 *  |                    | zzzz        | Long specific non location format (fallback to OOOO)          | GMT-08:00                                                  |
26428
 *  |                    | Z, ZZ & ZZZ | ISO8601 basic format                                          | -0800                                                      |
26429
 *  |                    | ZZZZ        | Long localized GMT format                                     | GMT-8:00                                                   |
26430
 *  |                    | ZZZZZ       | ISO8601 extended format + Z indicator for offset 0 (= XXXXX)  | -08:00                                                     |
26431
 *  |                    | O, OO & OOO | Short localized GMT format                                    | GMT-8                                                      |
26432
 *  |                    | OOOO        | Long localized GMT format                                     | GMT-08:00                                                  |
26433
 *
26434
 *
26435
 * When the expression is a ISO string without time (e.g. 2016-09-19) the time zone offset is not
26436
 * applied and the formatted text will have the same day, month and year of the expression.
26437
 *
26438
 * WARNINGS:
26439
 * - this pipe has only access to en-US locale data by default. If you want to localize the dates
26440
 *   in another language, you will have to import data for other locales.
26441
 *   See the {@linkDocs guide/i18n#i18n-pipes "I18n guide"} to know how to import additional locale
26442
 *   data.
26443
 * - Fields suffixed with * are only available in the extra dataset.
26444
 *   See the {@linkDocs guide/i18n#i18n-pipes "I18n guide"} to know how to import extra locale
26445
 *   data.
26446
 * - this pipe is marked as pure hence it will not be re-evaluated when the input is mutated.
26447
 *   Instead users should treat the date as an immutable object and change the reference when the
26448
 *   pipe needs to re-run (this is to avoid reformatting the date on every change detection run
26449
 *   which would be an expensive operation).
26450
 *
26451
 * ### Examples
26452
 *
26453
 * Assuming `dateObj` is (year: 2015, month: 6, day: 15, hour: 21, minute: 43, second: 11)
26454
 * in the _local_ time and locale is 'en-US':
26455
 *
26456
 * {@example common/pipes/ts/date_pipe.ts region='DatePipe'}
26457
 *
26458
 *
26459
 */
26460
// clang-format on
26461
var DatePipe = /** @class */ (function () {
26462
    function DatePipe(locale) {
26463
        this.locale = locale;
26464
    }
26465
    /**
26466
     * @param value a date object or a number (milliseconds since UTC epoch) or an ISO string
26467
     * (https://www.w3.org/TR/NOTE-datetime).
26468
     * @param format indicates which date/time components to include. The format can be predefined as
26469
     *   shown below (all examples are given for `en-US`) or custom as shown in the table.
26470
     *   - `'short'`: equivalent to `'M/d/yy, h:mm a'` (e.g. `6/15/15, 9:03 AM`).
26471
     *   - `'medium'`: equivalent to `'MMM d, y, h:mm:ss a'` (e.g. `Jun 15, 2015, 9:03:01 AM`).
26472
     *   - `'long'`: equivalent to `'MMMM d, y, h:mm:ss a z'` (e.g. `June 15, 2015 at 9:03:01 AM
26473
     * GMT+1`).
26474
     *   - `'full'`: equivalent to `'EEEE, MMMM d, y, h:mm:ss a zzzz'` (e.g. `Monday, June 15, 2015 at
26475
     * 9:03:01 AM GMT+01:00`).
26476
     *   - `'shortDate'`: equivalent to `'M/d/yy'` (e.g. `6/15/15`).
26477
     *   - `'mediumDate'`: equivalent to `'MMM d, y'` (e.g. `Jun 15, 2015`).
26478
     *   - `'longDate'`: equivalent to `'MMMM d, y'` (e.g. `June 15, 2015`).
26479
     *   - `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` (e.g. `Monday, June 15, 2015`).
26480
     *   - `'shortTime'`: equivalent to `'h:mm a'` (e.g. `9:03 AM`).
26481
     *   - `'mediumTime'`: equivalent to `'h:mm:ss a'` (e.g. `9:03:01 AM`).
26482
     *   - `'longTime'`: equivalent to `'h:mm:ss a z'` (e.g. `9:03:01 AM GMT+1`).
26483
     *   - `'fullTime'`: equivalent to `'h:mm:ss a zzzz'` (e.g. `9:03:01 AM GMT+01:00`).
26484
     * @param timezone to be used for formatting the time. It understands UTC/GMT and the continental
26485
     * US time zone
26486
     *  abbreviations, but for general use, use a time zone offset (e.g. `'+0430'`).
26487
     * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by
26488
     * default).
26489
     */
26490
    /**
26491
       * @param value a date object or a number (milliseconds since UTC epoch) or an ISO string
26492
       * (https://www.w3.org/TR/NOTE-datetime).
26493
       * @param format indicates which date/time components to include. The format can be predefined as
26494
       *   shown below (all examples are given for `en-US`) or custom as shown in the table.
26495
       *   - `'short'`: equivalent to `'M/d/yy, h:mm a'` (e.g. `6/15/15, 9:03 AM`).
26496
       *   - `'medium'`: equivalent to `'MMM d, y, h:mm:ss a'` (e.g. `Jun 15, 2015, 9:03:01 AM`).
26497
       *   - `'long'`: equivalent to `'MMMM d, y, h:mm:ss a z'` (e.g. `June 15, 2015 at 9:03:01 AM
26498
       * GMT+1`).
26499
       *   - `'full'`: equivalent to `'EEEE, MMMM d, y, h:mm:ss a zzzz'` (e.g. `Monday, June 15, 2015 at
26500
       * 9:03:01 AM GMT+01:00`).
26501
       *   - `'shortDate'`: equivalent to `'M/d/yy'` (e.g. `6/15/15`).
26502
       *   - `'mediumDate'`: equivalent to `'MMM d, y'` (e.g. `Jun 15, 2015`).
26503
       *   - `'longDate'`: equivalent to `'MMMM d, y'` (e.g. `June 15, 2015`).
26504
       *   - `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` (e.g. `Monday, June 15, 2015`).
26505
       *   - `'shortTime'`: equivalent to `'h:mm a'` (e.g. `9:03 AM`).
26506
       *   - `'mediumTime'`: equivalent to `'h:mm:ss a'` (e.g. `9:03:01 AM`).
26507
       *   - `'longTime'`: equivalent to `'h:mm:ss a z'` (e.g. `9:03:01 AM GMT+1`).
26508
       *   - `'fullTime'`: equivalent to `'h:mm:ss a zzzz'` (e.g. `9:03:01 AM GMT+01:00`).
26509
       * @param timezone to be used for formatting the time. It understands UTC/GMT and the continental
26510
       * US time zone
26511
       *  abbreviations, but for general use, use a time zone offset (e.g. `'+0430'`).
26512
       * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by
26513
       * default).
26514
       */
26515
    DatePipe.prototype.transform = /**
26516
       * @param value a date object or a number (milliseconds since UTC epoch) or an ISO string
26517
       * (https://www.w3.org/TR/NOTE-datetime).
26518
       * @param format indicates which date/time components to include. The format can be predefined as
26519
       *   shown below (all examples are given for `en-US`) or custom as shown in the table.
26520
       *   - `'short'`: equivalent to `'M/d/yy, h:mm a'` (e.g. `6/15/15, 9:03 AM`).
26521
       *   - `'medium'`: equivalent to `'MMM d, y, h:mm:ss a'` (e.g. `Jun 15, 2015, 9:03:01 AM`).
26522
       *   - `'long'`: equivalent to `'MMMM d, y, h:mm:ss a z'` (e.g. `June 15, 2015 at 9:03:01 AM
26523
       * GMT+1`).
26524
       *   - `'full'`: equivalent to `'EEEE, MMMM d, y, h:mm:ss a zzzz'` (e.g. `Monday, June 15, 2015 at
26525
       * 9:03:01 AM GMT+01:00`).
26526
       *   - `'shortDate'`: equivalent to `'M/d/yy'` (e.g. `6/15/15`).
26527
       *   - `'mediumDate'`: equivalent to `'MMM d, y'` (e.g. `Jun 15, 2015`).
26528
       *   - `'longDate'`: equivalent to `'MMMM d, y'` (e.g. `June 15, 2015`).
26529
       *   - `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` (e.g. `Monday, June 15, 2015`).
26530
       *   - `'shortTime'`: equivalent to `'h:mm a'` (e.g. `9:03 AM`).
26531
       *   - `'mediumTime'`: equivalent to `'h:mm:ss a'` (e.g. `9:03:01 AM`).
26532
       *   - `'longTime'`: equivalent to `'h:mm:ss a z'` (e.g. `9:03:01 AM GMT+1`).
26533
       *   - `'fullTime'`: equivalent to `'h:mm:ss a zzzz'` (e.g. `9:03:01 AM GMT+01:00`).
26534
       * @param timezone to be used for formatting the time. It understands UTC/GMT and the continental
26535
       * US time zone
26536
       *  abbreviations, but for general use, use a time zone offset (e.g. `'+0430'`).
26537
       * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by
26538
       * default).
26539
       */
26540
    function (value, format, timezone, locale) {
26541
        if (format === void 0) { format = 'mediumDate'; }
26542
        if (value == null || value === '' || value !== value)
26543
            return null;
26544
        try {
26545
            return formatDate(value, format, locale || this.locale, timezone);
26546
        }
26547
        catch (error) {
26548
            throw invalidPipeArgumentError(DatePipe, error.message);
26549
        }
26550
    };
26551
    DatePipe.decorators = [
26552
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'date', pure: true },] }
26553
    ];
26554
    /** @nocollapse */
26555
    DatePipe.ctorParameters = function () { return [
26556
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"],] },] },
26557
    ]; };
26558
    return DatePipe;
26559
}());
26560
 
26561
/**
26562
 * @license
26563
 * Copyright Google Inc. All Rights Reserved.
26564
 *
26565
 * Use of this source code is governed by an MIT-style license that can be
26566
 * found in the LICENSE file at https://angular.io/license
26567
 */
26568
var _INTERPOLATION_REGEXP = /#/g;
26569
/**
26570
 * @ngModule CommonModule
26571
 * @description
26572
 *
26573
 * Maps a value to a string that pluralizes the value according to locale rules.
26574
 *
26575
 *  ## Example
26576
 *
26577
 * {@example common/pipes/ts/i18n_pipe.ts region='I18nPluralPipeComponent'}
26578
 *
26579
 * @experimental
26580
 */
26581
var I18nPluralPipe = /** @class */ (function () {
26582
    function I18nPluralPipe(_localization) {
26583
        this._localization = _localization;
26584
    }
26585
    /**
26586
     * @param value the number to be formatted
26587
     * @param pluralMap an object that mimics the ICU format, see
26588
     * http://userguide.icu-project.org/formatparse/messages.
26589
     * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by
26590
     * default).
26591
     */
26592
    /**
26593
       * @param value the number to be formatted
26594
       * @param pluralMap an object that mimics the ICU format, see
26595
       * http://userguide.icu-project.org/formatparse/messages.
26596
       * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by
26597
       * default).
26598
       */
26599
    I18nPluralPipe.prototype.transform = /**
26600
       * @param value the number to be formatted
26601
       * @param pluralMap an object that mimics the ICU format, see
26602
       * http://userguide.icu-project.org/formatparse/messages.
26603
       * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by
26604
       * default).
26605
       */
26606
    function (value, pluralMap, locale) {
26607
        if (value == null)
26608
            return '';
26609
        if (typeof pluralMap !== 'object' || pluralMap === null) {
26610
            throw invalidPipeArgumentError(I18nPluralPipe, pluralMap);
26611
        }
26612
        var key = getPluralCategory(value, Object.keys(pluralMap), this._localization, locale);
26613
        return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());
26614
    };
26615
    I18nPluralPipe.decorators = [
26616
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'i18nPlural', pure: true },] }
26617
    ];
26618
    /** @nocollapse */
26619
    I18nPluralPipe.ctorParameters = function () { return [
26620
        { type: NgLocalization, },
26621
    ]; };
26622
    return I18nPluralPipe;
26623
}());
26624
 
26625
/**
26626
 * @license
26627
 * Copyright Google Inc. All Rights Reserved.
26628
 *
26629
 * Use of this source code is governed by an MIT-style license that can be
26630
 * found in the LICENSE file at https://angular.io/license
26631
 */
26632
/**
26633
 * @ngModule CommonModule
26634
 * @description
26635
 *
26636
 * Generic selector that displays the string that matches the current value.
26637
 *
26638
 * If none of the keys of the `mapping` match the `value`, then the content
26639
 * of the `other` key is returned when present, otherwise an empty string is returned.
26640
 *
26641
 * ## Example
26642
 *
26643
 * {@example common/pipes/ts/i18n_pipe.ts region='I18nSelectPipeComponent'}
26644
 *
26645
 * @experimental
26646
 */
26647
var I18nSelectPipe = /** @class */ (function () {
26648
    function I18nSelectPipe() {
26649
    }
26650
    /**
26651
     * @param value a string to be internationalized.
26652
     * @param mapping an object that indicates the text that should be displayed
26653
     * for different values of the provided `value`.
26654
     */
26655
    /**
26656
       * @param value a string to be internationalized.
26657
       * @param mapping an object that indicates the text that should be displayed
26658
       * for different values of the provided `value`.
26659
       */
26660
    I18nSelectPipe.prototype.transform = /**
26661
       * @param value a string to be internationalized.
26662
       * @param mapping an object that indicates the text that should be displayed
26663
       * for different values of the provided `value`.
26664
       */
26665
    function (value, mapping) {
26666
        if (value == null)
26667
            return '';
26668
        if (typeof mapping !== 'object' || typeof value !== 'string') {
26669
            throw invalidPipeArgumentError(I18nSelectPipe, mapping);
26670
        }
26671
        if (mapping.hasOwnProperty(value)) {
26672
            return mapping[value];
26673
        }
26674
        if (mapping.hasOwnProperty('other')) {
26675
            return mapping['other'];
26676
        }
26677
        return '';
26678
    };
26679
    I18nSelectPipe.decorators = [
26680
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'i18nSelect', pure: true },] }
26681
    ];
26682
    /** @nocollapse */
26683
    I18nSelectPipe.ctorParameters = function () { return []; };
26684
    return I18nSelectPipe;
26685
}());
26686
 
26687
/**
26688
 * @license
26689
 * Copyright Google Inc. All Rights Reserved.
26690
 *
26691
 * Use of this source code is governed by an MIT-style license that can be
26692
 * found in the LICENSE file at https://angular.io/license
26693
 */
26694
/**
26695
 * @ngModule CommonModule
26696
 * @description
26697
 *
26698
 * Converts value into string using `JSON.stringify`. Useful for debugging.
26699
 *
26700
 * ### Example
26701
 * {@example common/pipes/ts/json_pipe.ts region='JsonPipe'}
26702
 *
26703
 *
26704
 */
26705
var JsonPipe = /** @class */ (function () {
26706
    function JsonPipe() {
26707
    }
26708
    JsonPipe.prototype.transform = function (value) { return JSON.stringify(value, null, 2); };
26709
    JsonPipe.decorators = [
26710
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'json', pure: false },] }
26711
    ];
26712
    /** @nocollapse */
26713
    JsonPipe.ctorParameters = function () { return []; };
26714
    return JsonPipe;
26715
}());
26716
 
26717
/**
26718
 * @license
26719
 * Copyright Google Inc. All Rights Reserved.
26720
 *
26721
 * Use of this source code is governed by an MIT-style license that can be
26722
 * found in the LICENSE file at https://angular.io/license
26723
 */
26724
/**
26725
 * @ngModule CommonModule
26726
 * @description
26727
 *
26728
 * Uses the function {@link formatNumber} to format a number according to locale rules.
26729
 *
26730
 * Formats a number as text. Group sizing and separator and other locale-specific
26731
 * configurations are based on the locale.
26732
 *
26733
 * ### Example
26734
 *
26735
 * {@example common/pipes/ts/number_pipe.ts region='NumberPipe'}
26736
 *
26737
 *
26738
 */
26739
var DecimalPipe = /** @class */ (function () {
26740
    function DecimalPipe(_locale) {
26741
        this._locale = _locale;
26742
    }
26743
    /**
26744
     * @param value a number to be formatted.
26745
     * @param digitsInfo a `string` which has a following format: <br>
26746
     * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.
26747
     *   - `minIntegerDigits` is the minimum number of integer digits to use. Defaults to `1`.
26748
     *   - `minFractionDigits` is the minimum number of digits after the decimal point. Defaults to
26749
     * `0`.
26750
     *   - `maxFractionDigits` is the maximum number of digits after the decimal point. Defaults to
26751
     * `3`.
26752
     * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by
26753
     * default).
26754
     */
26755
    /**
26756
       * @param value a number to be formatted.
26757
       * @param digitsInfo a `string` which has a following format: <br>
26758
       * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.
26759
       *   - `minIntegerDigits` is the minimum number of integer digits to use. Defaults to `1`.
26760
       *   - `minFractionDigits` is the minimum number of digits after the decimal point. Defaults to
26761
       * `0`.
26762
       *   - `maxFractionDigits` is the maximum number of digits after the decimal point. Defaults to
26763
       * `3`.
26764
       * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by
26765
       * default).
26766
       */
26767
    DecimalPipe.prototype.transform = /**
26768
       * @param value a number to be formatted.
26769
       * @param digitsInfo a `string` which has a following format: <br>
26770
       * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.
26771
       *   - `minIntegerDigits` is the minimum number of integer digits to use. Defaults to `1`.
26772
       *   - `minFractionDigits` is the minimum number of digits after the decimal point. Defaults to
26773
       * `0`.
26774
       *   - `maxFractionDigits` is the maximum number of digits after the decimal point. Defaults to
26775
       * `3`.
26776
       * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by
26777
       * default).
26778
       */
26779
    function (value, digitsInfo, locale) {
26780
        if (isEmpty(value))
26781
            return null;
26782
        locale = locale || this._locale;
26783
        try {
26784
            var num = strToNumber(value);
26785
            return formatNumber(num, locale, digitsInfo);
26786
        }
26787
        catch (error) {
26788
            throw invalidPipeArgumentError(DecimalPipe, error.message);
26789
        }
26790
    };
26791
    DecimalPipe.decorators = [
26792
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'number' },] }
26793
    ];
26794
    /** @nocollapse */
26795
    DecimalPipe.ctorParameters = function () { return [
26796
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"],] },] },
26797
    ]; };
26798
    return DecimalPipe;
26799
}());
26800
/**
26801
 * @ngModule CommonModule
26802
 * @description
26803
 *
26804
 * Uses the function {@link formatPercent} to format a number as a percentage according
26805
 * to locale rules.
26806
 *
26807
 * ### Example
26808
 *
26809
 * {@example common/pipes/ts/percent_pipe.ts region='PercentPipe'}
26810
 *
26811
 *
26812
 */
26813
var PercentPipe = /** @class */ (function () {
26814
    function PercentPipe(_locale) {
26815
        this._locale = _locale;
26816
    }
26817
    /**
26818
     *
26819
     * @param value a number to be formatted as a percentage.
26820
     * @param digitsInfo see {@link DecimalPipe} for more details.
26821
     * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by
26822
   * default).
26823
     */
26824
    /**
26825
       *
26826
       * @param value a number to be formatted as a percentage.
26827
       * @param digitsInfo see {@link DecimalPipe} for more details.
26828
       * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by
26829
     * default).
26830
       */
26831
    PercentPipe.prototype.transform = /**
26832
       *
26833
       * @param value a number to be formatted as a percentage.
26834
       * @param digitsInfo see {@link DecimalPipe} for more details.
26835
       * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by
26836
     * default).
26837
       */
26838
    function (value, digitsInfo, locale) {
26839
        if (isEmpty(value))
26840
            return null;
26841
        locale = locale || this._locale;
26842
        try {
26843
            var num = strToNumber(value);
26844
            return formatPercent(num, locale, digitsInfo);
26845
        }
26846
        catch (error) {
26847
            throw invalidPipeArgumentError(PercentPipe, error.message);
26848
        }
26849
    };
26850
    PercentPipe.decorators = [
26851
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'percent' },] }
26852
    ];
26853
    /** @nocollapse */
26854
    PercentPipe.ctorParameters = function () { return [
26855
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"],] },] },
26856
    ]; };
26857
    return PercentPipe;
26858
}());
26859
/**
26860
 * @ngModule CommonModule
26861
 * @description
26862
 *
26863
 * Uses the functions {@link getCurrencySymbol} and {@link formatCurrency} to format a
26864
 * number as currency using locale rules.
26865
 *
26866
 * ### Example
26867
 *
26868
 * {@example common/pipes/ts/currency_pipe.ts region='CurrencyPipe'}
26869
 *
26870
 *
26871
 */
26872
var CurrencyPipe = /** @class */ (function () {
26873
    function CurrencyPipe(_locale) {
26874
        this._locale = _locale;
26875
    }
26876
    /**
26877
     *
26878
     * @param value a number to be formatted as currency.
26879
     * @param currencyCodeis the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code,
26880
     * such as `USD` for the US dollar and `EUR` for the euro.
26881
     * @param display indicates whether to show the currency symbol, the code or a custom value:
26882
     *   - `code`: use code (e.g. `USD`).
26883
     *   - `symbol`(default): use symbol (e.g. `$`).
26884
     *   - `symbol-narrow`: some countries have two symbols for their currency, one regular and one
26885
     *     narrow (e.g. the canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`).
26886
     *   - `string`: use this value instead of a code or a symbol.
26887
     *   - boolean (deprecated from v5): `true` for symbol and false for `code`.
26888
     *   If there is no narrow symbol for the chosen currency, the regular symbol will be used.
26889
     * @param digitsInfo see {@link DecimalPipe} for more details.
26890
     * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by
26891
     * default).
26892
     */
26893
    /**
26894
       *
26895
       * @param value a number to be formatted as currency.
26896
       * @param currencyCodeis the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code,
26897
       * such as `USD` for the US dollar and `EUR` for the euro.
26898
       * @param display indicates whether to show the currency symbol, the code or a custom value:
26899
       *   - `code`: use code (e.g. `USD`).
26900
       *   - `symbol`(default): use symbol (e.g. `$`).
26901
       *   - `symbol-narrow`: some countries have two symbols for their currency, one regular and one
26902
       *     narrow (e.g. the canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`).
26903
       *   - `string`: use this value instead of a code or a symbol.
26904
       *   - boolean (deprecated from v5): `true` for symbol and false for `code`.
26905
       *   If there is no narrow symbol for the chosen currency, the regular symbol will be used.
26906
       * @param digitsInfo see {@link DecimalPipe} for more details.
26907
       * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by
26908
       * default).
26909
       */
26910
    CurrencyPipe.prototype.transform = /**
26911
       *
26912
       * @param value a number to be formatted as currency.
26913
       * @param currencyCodeis the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code,
26914
       * such as `USD` for the US dollar and `EUR` for the euro.
26915
       * @param display indicates whether to show the currency symbol, the code or a custom value:
26916
       *   - `code`: use code (e.g. `USD`).
26917
       *   - `symbol`(default): use symbol (e.g. `$`).
26918
       *   - `symbol-narrow`: some countries have two symbols for their currency, one regular and one
26919
       *     narrow (e.g. the canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`).
26920
       *   - `string`: use this value instead of a code or a symbol.
26921
       *   - boolean (deprecated from v5): `true` for symbol and false for `code`.
26922
       *   If there is no narrow symbol for the chosen currency, the regular symbol will be used.
26923
       * @param digitsInfo see {@link DecimalPipe} for more details.
26924
       * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by
26925
       * default).
26926
       */
26927
    function (value, currencyCode, display, digitsInfo, locale) {
26928
        if (display === void 0) { display = 'symbol'; }
26929
        if (isEmpty(value))
26930
            return null;
26931
        locale = locale || this._locale;
26932
        if (typeof display === 'boolean') {
26933
            if (console && console.warn) {
26934
                console.warn("Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are \"code\", \"symbol\" or \"symbol-narrow\".");
26935
            }
26936
            display = display ? 'symbol' : 'code';
26937
        }
26938
        var currency = currencyCode || 'USD';
26939
        if (display !== 'code') {
26940
            if (display === 'symbol' || display === 'symbol-narrow') {
26941
                currency = getCurrencySymbol(currency, display === 'symbol' ? 'wide' : 'narrow', locale);
26942
            }
26943
            else {
26944
                currency = display;
26945
            }
26946
        }
26947
        try {
26948
            var num = strToNumber(value);
26949
            return formatCurrency(num, locale, currency, currencyCode, digitsInfo);
26950
        }
26951
        catch (error) {
26952
            throw invalidPipeArgumentError(CurrencyPipe, error.message);
26953
        }
26954
    };
26955
    CurrencyPipe.decorators = [
26956
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'currency' },] }
26957
    ];
26958
    /** @nocollapse */
26959
    CurrencyPipe.ctorParameters = function () { return [
26960
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"],] },] },
26961
    ]; };
26962
    return CurrencyPipe;
26963
}());
26964
function isEmpty(value) {
26965
    return value == null || value === '' || value !== value;
26966
}
26967
/**
26968
 * Transforms a string into a number (if needed)
26969
 */
26970
function strToNumber(value) {
26971
    // Convert strings to numbers
26972
    if (typeof value === 'string' && !isNaN(Number(value) - parseFloat(value))) {
26973
        return Number(value);
26974
    }
26975
    if (typeof value !== 'number') {
26976
        throw new Error(value + " is not a number");
26977
    }
26978
    return value;
26979
}
26980
 
26981
/**
26982
 * @license
26983
 * Copyright Google Inc. All Rights Reserved.
26984
 *
26985
 * Use of this source code is governed by an MIT-style license that can be
26986
 * found in the LICENSE file at https://angular.io/license
26987
 */
26988
/**
26989
 * @ngModule CommonModule
26990
 * @description
26991
 *
26992
 * Creates a new `Array` or `String` containing a subset (slice) of the elements.
26993
 *
26994
 * All behavior is based on the expected behavior of the JavaScript API `Array.prototype.slice()`
26995
 * and `String.prototype.slice()`.
26996
 *
26997
 * When operating on an `Array`, the returned `Array` is always a copy even when all
26998
 * the elements are being returned.
26999
 *
27000
 * When operating on a blank value, the pipe returns the blank value.
27001
 *
27002
 * ### List Example
27003
 *
27004
 * This `ngFor` example:
27005
 *
27006
 * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_list'}
27007
 *
27008
 * produces the following:
27009
 *
27010
 *     <li>b</li>
27011
 *     <li>c</li>
27012
 *
27013
 * ## String Examples
27014
 *
27015
 * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_string'}
27016
 *
27017
 *
27018
 */
27019
var SlicePipe = /** @class */ (function () {
27020
    function SlicePipe() {
27021
    }
27022
    /**
27023
     * @param value a list or a string to be sliced.
27024
     * @param start the starting index of the subset to return:
27025
     *   - **a positive integer**: return the item at `start` index and all items after
27026
     *     in the list or string expression.
27027
     *   - **a negative integer**: return the item at `start` index from the end and all items after
27028
     *     in the list or string expression.
27029
     *   - **if positive and greater than the size of the expression**: return an empty list or
27030
     * string.
27031
     *   - **if negative and greater than the size of the expression**: return entire list or string.
27032
     * @param end the ending index of the subset to return:
27033
     *   - **omitted**: return all items until the end.
27034
     *   - **if positive**: return all items before `end` index of the list or string.
27035
     *   - **if negative**: return all items before `end` index from the end of the list or string.
27036
     */
27037
    /**
27038
       * @param value a list or a string to be sliced.
27039
       * @param start the starting index of the subset to return:
27040
       *   - **a positive integer**: return the item at `start` index and all items after
27041
       *     in the list or string expression.
27042
       *   - **a negative integer**: return the item at `start` index from the end and all items after
27043
       *     in the list or string expression.
27044
       *   - **if positive and greater than the size of the expression**: return an empty list or
27045
       * string.
27046
       *   - **if negative and greater than the size of the expression**: return entire list or string.
27047
       * @param end the ending index of the subset to return:
27048
       *   - **omitted**: return all items until the end.
27049
       *   - **if positive**: return all items before `end` index of the list or string.
27050
       *   - **if negative**: return all items before `end` index from the end of the list or string.
27051
       */
27052
    SlicePipe.prototype.transform = /**
27053
       * @param value a list or a string to be sliced.
27054
       * @param start the starting index of the subset to return:
27055
       *   - **a positive integer**: return the item at `start` index and all items after
27056
       *     in the list or string expression.
27057
       *   - **a negative integer**: return the item at `start` index from the end and all items after
27058
       *     in the list or string expression.
27059
       *   - **if positive and greater than the size of the expression**: return an empty list or
27060
       * string.
27061
       *   - **if negative and greater than the size of the expression**: return entire list or string.
27062
       * @param end the ending index of the subset to return:
27063
       *   - **omitted**: return all items until the end.
27064
       *   - **if positive**: return all items before `end` index of the list or string.
27065
       *   - **if negative**: return all items before `end` index from the end of the list or string.
27066
       */
27067
    function (value, start, end) {
27068
        if (value == null)
27069
            return value;
27070
        if (!this.supports(value)) {
27071
            throw invalidPipeArgumentError(SlicePipe, value);
27072
        }
27073
        return value.slice(start, end);
27074
    };
27075
    SlicePipe.prototype.supports = function (obj) { return typeof obj === 'string' || Array.isArray(obj); };
27076
    SlicePipe.decorators = [
27077
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'slice', pure: false },] }
27078
    ];
27079
    /** @nocollapse */
27080
    SlicePipe.ctorParameters = function () { return []; };
27081
    return SlicePipe;
27082
}());
27083
 
27084
/**
27085
 * @license
27086
 * Copyright Google Inc. All Rights Reserved.
27087
 *
27088
 * Use of this source code is governed by an MIT-style license that can be
27089
 * found in the LICENSE file at https://angular.io/license
27090
 */
27091
/**
27092
 * A collection of Angular pipes that are likely to be used in each and every application.
27093
 */
27094
var COMMON_PIPES = [
27095
    AsyncPipe,
27096
    UpperCasePipe,
27097
    LowerCasePipe,
27098
    JsonPipe,
27099
    SlicePipe,
27100
    DecimalPipe,
27101
    PercentPipe,
27102
    TitleCasePipe,
27103
    CurrencyPipe,
27104
    DatePipe,
27105
    I18nPluralPipe,
27106
    I18nSelectPipe,
27107
];
27108
 
27109
/**
27110
 * @license
27111
 * Copyright Google Inc. All Rights Reserved.
27112
 *
27113
 * Use of this source code is governed by an MIT-style license that can be
27114
 * found in the LICENSE file at https://angular.io/license
27115
 */
27116
// Note: This does not contain the location providers,
27117
// as they need some platform specific implementations to work.
27118
/**
27119
 * The module that includes all the basic Angular directives like {@link NgIf}, {@link NgForOf}, ...
27120
 *
27121
 *
27122
 */
27123
var CommonModule = /** @class */ (function () {
27124
    function CommonModule() {
27125
    }
27126
    CommonModule.decorators = [
27127
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
27128
                    declarations: [COMMON_DIRECTIVES, COMMON_PIPES],
27129
                    exports: [COMMON_DIRECTIVES, COMMON_PIPES],
27130
                    providers: [
27131
                        { provide: NgLocalization, useClass: NgLocaleLocalization },
27132
                    ],
27133
                },] }
27134
    ];
27135
    /** @nocollapse */
27136
    CommonModule.ctorParameters = function () { return []; };
27137
    return CommonModule;
27138
}());
27139
var ɵ0 = getPluralCase;
27140
/**
27141
 * A module that contains the deprecated i18n pipes.
27142
 *
27143
 * @deprecated from v5
27144
 */
27145
var DeprecatedI18NPipesModule = /** @class */ (function () {
27146
    function DeprecatedI18NPipesModule() {
27147
    }
27148
    DeprecatedI18NPipesModule.decorators = [
27149
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
27150
                    declarations: [COMMON_DEPRECATED_I18N_PIPES],
27151
                    exports: [COMMON_DEPRECATED_I18N_PIPES],
27152
                    providers: [{ provide: DEPRECATED_PLURAL_FN, useValue: ɵ0 }],
27153
                },] }
27154
    ];
27155
    /** @nocollapse */
27156
    DeprecatedI18NPipesModule.ctorParameters = function () { return []; };
27157
    return DeprecatedI18NPipesModule;
27158
}());
27159
 
27160
/**
27161
 * @license
27162
 * Copyright Google Inc. All Rights Reserved.
27163
 *
27164
 * Use of this source code is governed by an MIT-style license that can be
27165
 * found in the LICENSE file at https://angular.io/license
27166
 */
27167
/**
27168
 * A DI Token representing the main rendering context. In a browser this is the DOM Document.
27169
 *
27170
 * Note: Document might not be available in the Application Context when Application and Rendering
27171
 * Contexts are not the same (e.g. when running the application into a Web Worker).
27172
 *
27173
 *
27174
 */
27175
var DOCUMENT = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('DocumentToken');
27176
 
27177
/**
27178
 * @license
27179
 * Copyright Google Inc. All Rights Reserved.
27180
 *
27181
 * Use of this source code is governed by an MIT-style license that can be
27182
 * found in the LICENSE file at https://angular.io/license
27183
 */
27184
var PLATFORM_BROWSER_ID = 'browser';
27185
var PLATFORM_SERVER_ID = 'server';
27186
var PLATFORM_WORKER_APP_ID = 'browserWorkerApp';
27187
var PLATFORM_WORKER_UI_ID = 'browserWorkerUi';
27188
/**
27189
 * Returns whether a platform id represents a browser platform.
27190
 * @experimental
27191
 */
27192
function isPlatformBrowser(platformId) {
27193
    return platformId === PLATFORM_BROWSER_ID;
27194
}
27195
/**
27196
 * Returns whether a platform id represents a server platform.
27197
 * @experimental
27198
 */
27199
function isPlatformServer(platformId) {
27200
    return platformId === PLATFORM_SERVER_ID;
27201
}
27202
/**
27203
 * Returns whether a platform id represents a web worker app platform.
27204
 * @experimental
27205
 */
27206
function isPlatformWorkerApp(platformId) {
27207
    return platformId === PLATFORM_WORKER_APP_ID;
27208
}
27209
/**
27210
 * Returns whether a platform id represents a web worker UI platform.
27211
 * @experimental
27212
 */
27213
function isPlatformWorkerUi(platformId) {
27214
    return platformId === PLATFORM_WORKER_UI_ID;
27215
}
27216
 
27217
/**
27218
 * @license
27219
 * Copyright Google Inc. All Rights Reserved.
27220
 *
27221
 * Use of this source code is governed by an MIT-style license that can be
27222
 * found in the LICENSE file at https://angular.io/license
27223
 */
27224
var VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["Version"]('6.0.3');
27225
 
27226
/**
27227
 * @license
27228
 * Copyright Google Inc. All Rights Reserved.
27229
 *
27230
 * Use of this source code is governed by an MIT-style license that can be
27231
 * found in the LICENSE file at https://angular.io/license
27232
 */
27233
 
27234
/**
27235
 * @license
27236
 * Copyright Google Inc. All Rights Reserved.
27237
 *
27238
 * Use of this source code is governed by an MIT-style license that can be
27239
 * found in the LICENSE file at https://angular.io/license
27240
 */
27241
 
27242
// This file only reexports content of the `src` folder. Keep it that way.
27243
 
27244
/**
27245
 * @license
27246
 * Copyright Google Inc. All Rights Reserved.
27247
 *
27248
 * Use of this source code is governed by an MIT-style license that can be
27249
 * found in the LICENSE file at https://angular.io/license
27250
 */
27251
 
27252
/**
27253
 * Generated bundle index. Do not edit.
27254
 */
27255
 
27256
 
27257
//# sourceMappingURL=common.js.map
27258
 
27259
 
27260
/***/ }),
27261
 
27262
/***/ "./node_modules/@angular/common/fesm5/http.js":
27263
/*!****************************************************!*\
27264
  !*** ./node_modules/@angular/common/fesm5/http.js ***!
27265
  \****************************************************/
27266
/*! exports provided: ɵangular_packages_common_http_http_a, ɵangular_packages_common_http_http_b, ɵangular_packages_common_http_http_c, ɵangular_packages_common_http_http_d, ɵangular_packages_common_http_http_e, ɵangular_packages_common_http_http_h, ɵangular_packages_common_http_http_i, ɵangular_packages_common_http_http_f, ɵangular_packages_common_http_http_g, HttpBackend, HttpHandler, HttpClient, HttpHeaders, HTTP_INTERCEPTORS, JsonpClientBackend, JsonpInterceptor, HttpClientJsonpModule, HttpClientModule, HttpClientXsrfModule, ɵinterceptingHandler, HttpParams, HttpUrlEncodingCodec, HttpRequest, HttpErrorResponse, HttpEventType, HttpHeaderResponse, HttpResponse, HttpResponseBase, HttpXhrBackend, XhrFactory, HttpXsrfTokenExtractor */
27267
/***/ (function(module, __webpack_exports__, __webpack_require__) {
27268
 
27269
"use strict";
27270
__webpack_require__.r(__webpack_exports__);
27271
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_a", function() { return NoopInterceptor; });
27272
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_b", function() { return JsonpCallbackContext; });
27273
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_c", function() { return HttpInterceptingHandler; });
27274
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_d", function() { return jsonpCallbackContext; });
27275
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_e", function() { return BrowserXhr; });
27276
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_h", function() { return HttpXsrfCookieExtractor; });
27277
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_i", function() { return HttpXsrfInterceptor; });
27278
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_f", function() { return XSRF_COOKIE_NAME; });
27279
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_g", function() { return XSRF_HEADER_NAME; });
27280
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpBackend", function() { return HttpBackend; });
27281
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpHandler", function() { return HttpHandler; });
27282
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpClient", function() { return HttpClient; });
27283
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpHeaders", function() { return HttpHeaders; });
27284
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HTTP_INTERCEPTORS", function() { return HTTP_INTERCEPTORS; });
27285
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonpClientBackend", function() { return JsonpClientBackend; });
27286
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonpInterceptor", function() { return JsonpInterceptor; });
27287
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpClientJsonpModule", function() { return HttpClientJsonpModule; });
27288
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpClientModule", function() { return HttpClientModule; });
27289
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpClientXsrfModule", function() { return HttpClientXsrfModule; });
27290
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinterceptingHandler", function() { return interceptingHandler; });
27291
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpParams", function() { return HttpParams; });
27292
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpUrlEncodingCodec", function() { return HttpUrlEncodingCodec; });
27293
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpRequest", function() { return HttpRequest; });
27294
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpErrorResponse", function() { return HttpErrorResponse; });
27295
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpEventType", function() { return HttpEventType; });
27296
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpHeaderResponse", function() { return HttpHeaderResponse; });
27297
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpResponse", function() { return HttpResponse; });
27298
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpResponseBase", function() { return HttpResponseBase; });
27299
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpXhrBackend", function() { return HttpXhrBackend; });
27300
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "XhrFactory", function() { return XhrFactory; });
27301
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpXsrfTokenExtractor", function() { return HttpXsrfTokenExtractor; });
27302
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
27303
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
27304
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
27305
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
27306
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
27307
/**
27308
 * @license Angular v6.0.3
27309
 * (c) 2010-2018 Google, Inc. https://angular.io/
27310
 * License: MIT
27311
 */
27312
 
27313
 
27314
 
27315
 
27316
 
27317
 
27318
 
27319
/**
27320
 * @license
27321
 * Copyright Google Inc. All Rights Reserved.
27322
 *
27323
 * Use of this source code is governed by an MIT-style license that can be
27324
 * found in the LICENSE file at https://angular.io/license
27325
 */
27326
/**
27327
 * Transforms an `HttpRequest` into a stream of `HttpEvent`s, one of which will likely be a
27328
 * `HttpResponse`.
27329
 *
27330
 * `HttpHandler` is injectable. When injected, the handler instance dispatches requests to the
27331
 * first interceptor in the chain, which dispatches to the second, etc, eventually reaching the
27332
 * `HttpBackend`.
27333
 *
27334
 * In an `HttpInterceptor`, the `HttpHandler` parameter is the next interceptor in the chain.
27335
 *
27336
 *
27337
 */
27338
var HttpHandler = /** @class */ (function () {
27339
    function HttpHandler() {
27340
    }
27341
    return HttpHandler;
27342
}());
27343
/**
27344
 * A final `HttpHandler` which will dispatch the request via browser HTTP APIs to a backend.
27345
 *
27346
 * Interceptors sit between the `HttpClient` interface and the `HttpBackend`.
27347
 *
27348
 * When injected, `HttpBackend` dispatches requests directly to the backend, without going
27349
 * through the interceptor chain.
27350
 *
27351
 *
27352
 */
27353
var HttpBackend = /** @class */ (function () {
27354
    function HttpBackend() {
27355
    }
27356
    return HttpBackend;
27357
}());
27358
 
27359
/**
27360
 * @license
27361
 * Copyright Google Inc. All Rights Reserved.
27362
 *
27363
 * Use of this source code is governed by an MIT-style license that can be
27364
 * found in the LICENSE file at https://angular.io/license
27365
 */
27366
/**
27367
 * Immutable set of Http headers, with lazy parsing.
27368
 *
27369
 */
27370
var HttpHeaders = /** @class */ (function () {
27371
    function HttpHeaders(headers) {
27372
        var _this = this;
27373
        /**
27374
           * Internal map of lowercased header names to the normalized
27375
           * form of the name (the form seen first).
27376
           */
27377
        this.normalizedNames = new Map();
27378
        /**
27379
           * Queued updates to be materialized the next initialization.
27380
           */
27381
        this.lazyUpdate = null;
27382
        if (!headers) {
27383
            this.headers = new Map();
27384
        }
27385
        else if (typeof headers === 'string') {
27386
            this.lazyInit = function () {
27387
                _this.headers = new Map();
27388
                headers.split('\n').forEach(function (line) {
27389
                    var index = line.indexOf(':');
27390
                    if (index > 0) {
27391
                        var name_1 = line.slice(0, index);
27392
                        var key = name_1.toLowerCase();
27393
                        var value = line.slice(index + 1).trim();
27394
                        _this.maybeSetNormalizedName(name_1, key);
27395
                        if (_this.headers.has(key)) {
27396
                            _this.headers.get(key).push(value);
27397
                        }
27398
                        else {
27399
                            _this.headers.set(key, [value]);
27400
                        }
27401
                    }
27402
                });
27403
            };
27404
        }
27405
        else {
27406
            this.lazyInit = function () {
27407
                _this.headers = new Map();
27408
                Object.keys(headers).forEach(function (name) {
27409
                    var values = headers[name];
27410
                    var key = name.toLowerCase();
27411
                    if (typeof values === 'string') {
27412
                        values = [values];
27413
                    }
27414
                    if (values.length > 0) {
27415
                        _this.headers.set(key, values);
27416
                        _this.maybeSetNormalizedName(name, key);
27417
                    }
27418
                });
27419
            };
27420
        }
27421
    }
27422
    /**
27423
     * Checks for existence of header by given name.
27424
     */
27425
    /**
27426
       * Checks for existence of header by given name.
27427
       */
27428
    HttpHeaders.prototype.has = /**
27429
       * Checks for existence of header by given name.
27430
       */
27431
    function (name) {
27432
        this.init();
27433
        return this.headers.has(name.toLowerCase());
27434
    };
27435
    /**
27436
     * Returns first header that matches given name.
27437
     */
27438
    /**
27439
       * Returns first header that matches given name.
27440
       */
27441
    HttpHeaders.prototype.get = /**
27442
       * Returns first header that matches given name.
27443
       */
27444
    function (name) {
27445
        this.init();
27446
        var values = this.headers.get(name.toLowerCase());
27447
        return values && values.length > 0 ? values[0] : null;
27448
    };
27449
    /**
27450
     * Returns the names of the headers
27451
     */
27452
    /**
27453
       * Returns the names of the headers
27454
       */
27455
    HttpHeaders.prototype.keys = /**
27456
       * Returns the names of the headers
27457
       */
27458
    function () {
27459
        this.init();
27460
        return Array.from(this.normalizedNames.values());
27461
    };
27462
    /**
27463
     * Returns list of header values for a given name.
27464
     */
27465
    /**
27466
       * Returns list of header values for a given name.
27467
       */
27468
    HttpHeaders.prototype.getAll = /**
27469
       * Returns list of header values for a given name.
27470
       */
27471
    function (name) {
27472
        this.init();
27473
        return this.headers.get(name.toLowerCase()) || null;
27474
    };
27475
    HttpHeaders.prototype.append = function (name, value) {
27476
        return this.clone({ name: name, value: value, op: 'a' });
27477
    };
27478
    HttpHeaders.prototype.set = function (name, value) {
27479
        return this.clone({ name: name, value: value, op: 's' });
27480
    };
27481
    HttpHeaders.prototype.delete = function (name, value) {
27482
        return this.clone({ name: name, value: value, op: 'd' });
27483
    };
27484
    HttpHeaders.prototype.maybeSetNormalizedName = function (name, lcName) {
27485
        if (!this.normalizedNames.has(lcName)) {
27486
            this.normalizedNames.set(lcName, name);
27487
        }
27488
    };
27489
    HttpHeaders.prototype.init = function () {
27490
        var _this = this;
27491
        if (!!this.lazyInit) {
27492
            if (this.lazyInit instanceof HttpHeaders) {
27493
                this.copyFrom(this.lazyInit);
27494
            }
27495
            else {
27496
                this.lazyInit();
27497
            }
27498
            this.lazyInit = null;
27499
            if (!!this.lazyUpdate) {
27500
                this.lazyUpdate.forEach(function (update) { return _this.applyUpdate(update); });
27501
                this.lazyUpdate = null;
27502
            }
27503
        }
27504
    };
27505
    HttpHeaders.prototype.copyFrom = function (other) {
27506
        var _this = this;
27507
        other.init();
27508
        Array.from(other.headers.keys()).forEach(function (key) {
27509
            _this.headers.set(key, (other.headers.get(key)));
27510
            _this.normalizedNames.set(key, (other.normalizedNames.get(key)));
27511
        });
27512
    };
27513
    HttpHeaders.prototype.clone = function (update) {
27514
        var clone = new HttpHeaders();
27515
        clone.lazyInit =
27516
            (!!this.lazyInit && this.lazyInit instanceof HttpHeaders) ? this.lazyInit : this;
27517
        clone.lazyUpdate = (this.lazyUpdate || []).concat([update]);
27518
        return clone;
27519
    };
27520
    HttpHeaders.prototype.applyUpdate = function (update) {
27521
        var key = update.name.toLowerCase();
27522
        switch (update.op) {
27523
            case 'a':
27524
            case 's':
27525
                var value = (update.value);
27526
                if (typeof value === 'string') {
27527
                    value = [value];
27528
                }
27529
                if (value.length === 0) {
27530
                    return;
27531
                }
27532
                this.maybeSetNormalizedName(update.name, key);
27533
                var base = (update.op === 'a' ? this.headers.get(key) : undefined) || [];
27534
                base.push.apply(base, Object(tslib__WEBPACK_IMPORTED_MODULE_3__["__spread"])(value));
27535
                this.headers.set(key, base);
27536
                break;
27537
            case 'd':
27538
                var toDelete_1 = update.value;
27539
                if (!toDelete_1) {
27540
                    this.headers.delete(key);
27541
                    this.normalizedNames.delete(key);
27542
                }
27543
                else {
27544
                    var existing = this.headers.get(key);
27545
                    if (!existing) {
27546
                        return;
27547
                    }
27548
                    existing = existing.filter(function (value) { return toDelete_1.indexOf(value) === -1; });
27549
                    if (existing.length === 0) {
27550
                        this.headers.delete(key);
27551
                        this.normalizedNames.delete(key);
27552
                    }
27553
                    else {
27554
                        this.headers.set(key, existing);
27555
                    }
27556
                }
27557
                break;
27558
        }
27559
    };
27560
    /**
27561
     * @internal
27562
     */
27563
    /**
27564
       * @internal
27565
       */
27566
    HttpHeaders.prototype.forEach = /**
27567
       * @internal
27568
       */
27569
    function (fn) {
27570
        var _this = this;
27571
        this.init();
27572
        Array.from(this.normalizedNames.keys())
27573
            .forEach(function (key) { return fn((_this.normalizedNames.get(key)), (_this.headers.get(key))); });
27574
    };
27575
    return HttpHeaders;
27576
}());
27577
 
27578
/**
27579
 * @license
27580
 * Copyright Google Inc. All Rights Reserved.
27581
 *
27582
 * Use of this source code is governed by an MIT-style license that can be
27583
 * found in the LICENSE file at https://angular.io/license
27584
 */
27585
/**
27586
 * A `HttpParameterCodec` that uses `encodeURIComponent` and `decodeURIComponent` to
27587
 * serialize and parse URL parameter keys and values.
27588
 *
27589
 *
27590
 */
27591
var HttpUrlEncodingCodec = /** @class */ (function () {
27592
    function HttpUrlEncodingCodec() {
27593
    }
27594
    HttpUrlEncodingCodec.prototype.encodeKey = function (k) { return standardEncoding(k); };
27595
    HttpUrlEncodingCodec.prototype.encodeValue = function (v) { return standardEncoding(v); };
27596
    HttpUrlEncodingCodec.prototype.decodeKey = function (k) { return decodeURIComponent(k); };
27597
    HttpUrlEncodingCodec.prototype.decodeValue = function (v) { return decodeURIComponent(v); };
27598
    return HttpUrlEncodingCodec;
27599
}());
27600
function paramParser(rawParams, codec) {
27601
    var map$$1 = new Map();
27602
    if (rawParams.length > 0) {
27603
        var params = rawParams.split('&');
27604
        params.forEach(function (param) {
27605
            var eqIdx = param.indexOf('=');
27606
            var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_3__["__read"])(eqIdx == -1 ?
27607
                [codec.decodeKey(param), ''] :
27608
                [codec.decodeKey(param.slice(0, eqIdx)), codec.decodeValue(param.slice(eqIdx + 1))], 2), key = _a[0], val = _a[1];
27609
            var list = map$$1.get(key) || [];
27610
            list.push(val);
27611
            map$$1.set(key, list);
27612
        });
27613
    }
27614
    return map$$1;
27615
}
27616
function standardEncoding(v) {
27617
    return encodeURIComponent(v)
27618
        .replace(/%40/gi, '@')
27619
        .replace(/%3A/gi, ':')
27620
        .replace(/%24/gi, '$')
27621
        .replace(/%2C/gi, ',')
27622
        .replace(/%3B/gi, ';')
27623
        .replace(/%2B/gi, '+')
27624
        .replace(/%3D/gi, '=')
27625
        .replace(/%3F/gi, '?')
27626
        .replace(/%2F/gi, '/');
27627
}
27628
/**
27629
 * An HTTP request/response body that represents serialized parameters,
27630
 * per the MIME type `application/x-www-form-urlencoded`.
27631
 *
27632
 * This class is immutable - all mutation operations return a new instance.
27633
 *
27634
 *
27635
 */
27636
var HttpParams = /** @class */ (function () {
27637
    function HttpParams(options) {
27638
        if (options === void 0) { options = {}; }
27639
        var _this = this;
27640
        this.updates = null;
27641
        this.cloneFrom = null;
27642
        this.encoder = options.encoder || new HttpUrlEncodingCodec();
27643
        if (!!options.fromString) {
27644
            if (!!options.fromObject) {
27645
                throw new Error("Cannot specify both fromString and fromObject.");
27646
            }
27647
            this.map = paramParser(options.fromString, this.encoder);
27648
        }
27649
        else if (!!options.fromObject) {
27650
            this.map = new Map();
27651
            Object.keys(options.fromObject).forEach(function (key) {
27652
                var value = options.fromObject[key];
27653
                _this.map.set(key, Array.isArray(value) ? value : [value]);
27654
            });
27655
        }
27656
        else {
27657
            this.map = null;
27658
        }
27659
    }
27660
    /**
27661
     * Check whether the body has one or more values for the given parameter name.
27662
     */
27663
    /**
27664
       * Check whether the body has one or more values for the given parameter name.
27665
       */
27666
    HttpParams.prototype.has = /**
27667
       * Check whether the body has one or more values for the given parameter name.
27668
       */
27669
    function (param) {
27670
        this.init();
27671
        return this.map.has(param);
27672
    };
27673
    /**
27674
     * Get the first value for the given parameter name, or `null` if it's not present.
27675
     */
27676
    /**
27677
       * Get the first value for the given parameter name, or `null` if it's not present.
27678
       */
27679
    HttpParams.prototype.get = /**
27680
       * Get the first value for the given parameter name, or `null` if it's not present.
27681
       */
27682
    function (param) {
27683
        this.init();
27684
        var res = this.map.get(param);
27685
        return !!res ? res[0] : null;
27686
    };
27687
    /**
27688
     * Get all values for the given parameter name, or `null` if it's not present.
27689
     */
27690
    /**
27691
       * Get all values for the given parameter name, or `null` if it's not present.
27692
       */
27693
    HttpParams.prototype.getAll = /**
27694
       * Get all values for the given parameter name, or `null` if it's not present.
27695
       */
27696
    function (param) {
27697
        this.init();
27698
        return this.map.get(param) || null;
27699
    };
27700
    /**
27701
     * Get all the parameter names for this body.
27702
     */
27703
    /**
27704
       * Get all the parameter names for this body.
27705
       */
27706
    HttpParams.prototype.keys = /**
27707
       * Get all the parameter names for this body.
27708
       */
27709
    function () {
27710
        this.init();
27711
        return Array.from(this.map.keys());
27712
    };
27713
    /**
27714
     * Construct a new body with an appended value for the given parameter name.
27715
     */
27716
    /**
27717
       * Construct a new body with an appended value for the given parameter name.
27718
       */
27719
    HttpParams.prototype.append = /**
27720
       * Construct a new body with an appended value for the given parameter name.
27721
       */
27722
    function (param, value) { return this.clone({ param: param, value: value, op: 'a' }); };
27723
    /**
27724
     * Construct a new body with a new value for the given parameter name.
27725
     */
27726
    /**
27727
       * Construct a new body with a new value for the given parameter name.
27728
       */
27729
    HttpParams.prototype.set = /**
27730
       * Construct a new body with a new value for the given parameter name.
27731
       */
27732
    function (param, value) { return this.clone({ param: param, value: value, op: 's' }); };
27733
    /**
27734
     * Construct a new body with either the given value for the given parameter
27735
     * removed, if a value is given, or all values for the given parameter removed
27736
     * if not.
27737
     */
27738
    /**
27739
       * Construct a new body with either the given value for the given parameter
27740
       * removed, if a value is given, or all values for the given parameter removed
27741
       * if not.
27742
       */
27743
    HttpParams.prototype.delete = /**
27744
       * Construct a new body with either the given value for the given parameter
27745
       * removed, if a value is given, or all values for the given parameter removed
27746
       * if not.
27747
       */
27748
    function (param, value) { return this.clone({ param: param, value: value, op: 'd' }); };
27749
    /**
27750
     * Serialize the body to an encoded string, where key-value pairs (separated by `=`) are
27751
     * separated by `&`s.
27752
     */
27753
    /**
27754
       * Serialize the body to an encoded string, where key-value pairs (separated by `=`) are
27755
       * separated by `&`s.
27756
       */
27757
    HttpParams.prototype.toString = /**
27758
       * Serialize the body to an encoded string, where key-value pairs (separated by `=`) are
27759
       * separated by `&`s.
27760
       */
27761
    function () {
27762
        var _this = this;
27763
        this.init();
27764
        return this.keys()
27765
            .map(function (key) {
27766
            var eKey = _this.encoder.encodeKey(key);
27767
            return _this.map.get(key).map(function (value) { return eKey + '=' + _this.encoder.encodeValue(value); })
27768
                .join('&');
27769
        })
27770
            .join('&');
27771
    };
27772
    HttpParams.prototype.clone = function (update) {
27773
        var clone = new HttpParams({ encoder: this.encoder });
27774
        clone.cloneFrom = this.cloneFrom || this;
27775
        clone.updates = (this.updates || []).concat([update]);
27776
        return clone;
27777
    };
27778
    HttpParams.prototype.init = function () {
27779
        var _this = this;
27780
        if (this.map === null) {
27781
            this.map = new Map();
27782
        }
27783
        if (this.cloneFrom !== null) {
27784
            this.cloneFrom.init();
27785
            this.cloneFrom.keys().forEach(function (key) { return _this.map.set(key, (_this.cloneFrom.map.get(key))); });
27786
            this.updates.forEach(function (update) {
27787
                switch (update.op) {
27788
                    case 'a':
27789
                    case 's':
27790
                        var base = (update.op === 'a' ? _this.map.get(update.param) : undefined) || [];
27791
                        base.push((update.value));
27792
                        _this.map.set(update.param, base);
27793
                        break;
27794
                    case 'd':
27795
                        if (update.value !== undefined) {
27796
                            var base_1 = _this.map.get(update.param) || [];
27797
                            var idx = base_1.indexOf(update.value);
27798
                            if (idx !== -1) {
27799
                                base_1.splice(idx, 1);
27800
                            }
27801
                            if (base_1.length > 0) {
27802
                                _this.map.set(update.param, base_1);
27803
                            }
27804
                            else {
27805
                                _this.map.delete(update.param);
27806
                            }
27807
                        }
27808
                        else {
27809
                            _this.map.delete(update.param);
27810
                            break;
27811
                        }
27812
                }
27813
            });
27814
            this.cloneFrom = null;
27815
        }
27816
    };
27817
    return HttpParams;
27818
}());
27819
 
27820
/**
27821
 * @license
27822
 * Copyright Google Inc. All Rights Reserved.
27823
 *
27824
 * Use of this source code is governed by an MIT-style license that can be
27825
 * found in the LICENSE file at https://angular.io/license
27826
 */
27827
/**
27828
 * Determine whether the given HTTP method may include a body.
27829
 */
27830
function mightHaveBody(method) {
27831
    switch (method) {
27832
        case 'DELETE':
27833
        case 'GET':
27834
        case 'HEAD':
27835
        case 'OPTIONS':
27836
        case 'JSONP':
27837
            return false;
27838
        default:
27839
            return true;
27840
    }
27841
}
27842
/**
27843
 * Safely assert whether the given value is an ArrayBuffer.
27844
 *
27845
 * In some execution environments ArrayBuffer is not defined.
27846
 */
27847
function isArrayBuffer(value) {
27848
    return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;
27849
}
27850
/**
27851
 * Safely assert whether the given value is a Blob.
27852
 *
27853
 * In some execution environments Blob is not defined.
27854
 */
27855
function isBlob(value) {
27856
    return typeof Blob !== 'undefined' && value instanceof Blob;
27857
}
27858
/**
27859
 * Safely assert whether the given value is a FormData instance.
27860
 *
27861
 * In some execution environments FormData is not defined.
27862
 */
27863
function isFormData(value) {
27864
    return typeof FormData !== 'undefined' && value instanceof FormData;
27865
}
27866
/**
27867
 * An outgoing HTTP request with an optional typed body.
27868
 *
27869
 * `HttpRequest` represents an outgoing request, including URL, method,
27870
 * headers, body, and other request configuration options. Instances should be
27871
 * assumed to be immutable. To modify a `HttpRequest`, the `clone`
27872
 * method should be used.
27873
 *
27874
 *
27875
 */
27876
var HttpRequest = /** @class */ (function () {
27877
    function HttpRequest(method, url, third, fourth) {
27878
        this.url = url;
27879
        /**
27880
           * The request body, or `null` if one isn't set.
27881
           *
27882
           * Bodies are not enforced to be immutable, as they can include a reference to any
27883
           * user-defined data type. However, interceptors should take care to preserve
27884
           * idempotence by treating them as such.
27885
           */
27886
        this.body = null;
27887
        /**
27888
           * Whether this request should be made in a way that exposes progress events.
27889
           *
27890
           * Progress events are expensive (change detection runs on each event) and so
27891
           * they should only be requested if the consumer intends to monitor them.
27892
           */
27893
        this.reportProgress = false;
27894
        /**
27895
           * Whether this request should be sent with outgoing credentials (cookies).
27896
           */
27897
        this.withCredentials = false;
27898
        /**
27899
           * The expected response type of the server.
27900
           *
27901
           * This is used to parse the response appropriately before returning it to
27902
           * the requestee.
27903
           */
27904
        this.responseType = 'json';
27905
        this.method = method.toUpperCase();
27906
        // Next, need to figure out which argument holds the HttpRequestInit
27907
        // options, if any.
27908
        var options;
27909
        // Check whether a body argument is expected. The only valid way to omit
27910
        // the body argument is to use a known no-body method like GET.
27911
        if (mightHaveBody(this.method) || !!fourth) {
27912
            // Body is the third argument, options are the fourth.
27913
            this.body = (third !== undefined) ? third : null;
27914
            options = fourth;
27915
        }
27916
        else {
27917
            // No body required, options are the third argument. The body stays null.
27918
            options = third;
27919
        }
27920
        // If options have been passed, interpret them.
27921
        if (options) {
27922
            // Normalize reportProgress and withCredentials.
27923
            this.reportProgress = !!options.reportProgress;
27924
            this.withCredentials = !!options.withCredentials;
27925
            // Override default response type of 'json' if one is provided.
27926
            if (!!options.responseType) {
27927
                this.responseType = options.responseType;
27928
            }
27929
            // Override headers if they're provided.
27930
            if (!!options.headers) {
27931
                this.headers = options.headers;
27932
            }
27933
            if (!!options.params) {
27934
                this.params = options.params;
27935
            }
27936
        }
27937
        // If no headers have been passed in, construct a new HttpHeaders instance.
27938
        if (!this.headers) {
27939
            this.headers = new HttpHeaders();
27940
        }
27941
        // If no parameters have been passed in, construct a new HttpUrlEncodedParams instance.
27942
        if (!this.params) {
27943
            this.params = new HttpParams();
27944
            this.urlWithParams = url;
27945
        }
27946
        else {
27947
            // Encode the parameters to a string in preparation for inclusion in the URL.
27948
            var params = this.params.toString();
27949
            if (params.length === 0) {
27950
                // No parameters, the visible URL is just the URL given at creation time.
27951
                this.urlWithParams = url;
27952
            }
27953
            else {
27954
                // Does the URL already have query parameters? Look for '?'.
27955
                var qIdx = url.indexOf('?');
27956
                // There are 3 cases to handle:
27957
                // 1) No existing parameters -> append '?' followed by params.
27958
                // 2) '?' exists and is followed by existing query string ->
27959
                //    append '&' followed by params.
27960
                // 3) '?' exists at the end of the url -> append params directly.
27961
                // This basically amounts to determining the character, if any, with
27962
                // which to join the URL and parameters.
27963
                var sep = qIdx === -1 ? '?' : (qIdx < url.length - 1 ? '&' : '');
27964
                this.urlWithParams = url + sep + params;
27965
            }
27966
        }
27967
    }
27968
    /**
27969
     * Transform the free-form body into a serialized format suitable for
27970
     * transmission to the server.
27971
     */
27972
    /**
27973
       * Transform the free-form body into a serialized format suitable for
27974
       * transmission to the server.
27975
       */
27976
    HttpRequest.prototype.serializeBody = /**
27977
       * Transform the free-form body into a serialized format suitable for
27978
       * transmission to the server.
27979
       */
27980
    function () {
27981
        // If no body is present, no need to serialize it.
27982
        if (this.body === null) {
27983
            return null;
27984
        }
27985
        // Check whether the body is already in a serialized form. If so,
27986
        // it can just be returned directly.
27987
        if (isArrayBuffer(this.body) || isBlob(this.body) || isFormData(this.body) ||
27988
            typeof this.body === 'string') {
27989
            return this.body;
27990
        }
27991
        // Check whether the body is an instance of HttpUrlEncodedParams.
27992
        if (this.body instanceof HttpParams) {
27993
            return this.body.toString();
27994
        }
27995
        // Check whether the body is an object or array, and serialize with JSON if so.
27996
        if (typeof this.body === 'object' || typeof this.body === 'boolean' ||
27997
            Array.isArray(this.body)) {
27998
            return JSON.stringify(this.body);
27999
        }
28000
        // Fall back on toString() for everything else.
28001
        return this.body.toString();
28002
    };
28003
    /**
28004
     * Examine the body and attempt to infer an appropriate MIME type
28005
     * for it.
28006
     *
28007
     * If no such type can be inferred, this method will return `null`.
28008
     */
28009
    /**
28010
       * Examine the body and attempt to infer an appropriate MIME type
28011
       * for it.
28012
       *
28013
       * If no such type can be inferred, this method will return `null`.
28014
       */
28015
    HttpRequest.prototype.detectContentTypeHeader = /**
28016
       * Examine the body and attempt to infer an appropriate MIME type
28017
       * for it.
28018
       *
28019
       * If no such type can be inferred, this method will return `null`.
28020
       */
28021
    function () {
28022
        // An empty body has no content type.
28023
        if (this.body === null) {
28024
            return null;
28025
        }
28026
        // FormData bodies rely on the browser's content type assignment.
28027
        if (isFormData(this.body)) {
28028
            return null;
28029
        }
28030
        // Blobs usually have their own content type. If it doesn't, then
28031
        // no type can be inferred.
28032
        if (isBlob(this.body)) {
28033
            return this.body.type || null;
28034
        }
28035
        // Array buffers have unknown contents and thus no type can be inferred.
28036
        if (isArrayBuffer(this.body)) {
28037
            return null;
28038
        }
28039
        // Technically, strings could be a form of JSON data, but it's safe enough
28040
        // to assume they're plain strings.
28041
        if (typeof this.body === 'string') {
28042
            return 'text/plain';
28043
        }
28044
        // `HttpUrlEncodedParams` has its own content-type.
28045
        if (this.body instanceof HttpParams) {
28046
            return 'application/x-www-form-urlencoded;charset=UTF-8';
28047
        }
28048
        // Arrays, objects, and numbers will be encoded as JSON.
28049
        if (typeof this.body === 'object' || typeof this.body === 'number' ||
28050
            Array.isArray(this.body)) {
28051
            return 'application/json';
28052
        }
28053
        // No type could be inferred.
28054
        return null;
28055
    };
28056
    HttpRequest.prototype.clone = function (update) {
28057
        if (update === void 0) { update = {}; }
28058
        // For method, url, and responseType, take the current value unless
28059
        // it is overridden in the update hash.
28060
        var method = update.method || this.method;
28061
        var url = update.url || this.url;
28062
        var responseType = update.responseType || this.responseType;
28063
        // The body is somewhat special - a `null` value in update.body means
28064
        // whatever current body is present is being overridden with an empty
28065
        // body, whereas an `undefined` value in update.body implies no
28066
        // override.
28067
        var body = (update.body !== undefined) ? update.body : this.body;
28068
        // Carefully handle the boolean options to differentiate between
28069
        // `false` and `undefined` in the update args.
28070
        var withCredentials = (update.withCredentials !== undefined) ? update.withCredentials : this.withCredentials;
28071
        var reportProgress = (update.reportProgress !== undefined) ? update.reportProgress : this.reportProgress;
28072
        // Headers and params may be appended to if `setHeaders` or
28073
        // `setParams` are used.
28074
        var headers = update.headers || this.headers;
28075
        var params = update.params || this.params;
28076
        // Check whether the caller has asked to add headers.
28077
        if (update.setHeaders !== undefined) {
28078
            // Set every requested header.
28079
            headers =
28080
                Object.keys(update.setHeaders)
28081
                    .reduce(function (headers, name) { return headers.set(name, update.setHeaders[name]); }, headers);
28082
        }
28083
        // Check whether the caller has asked to set params.
28084
        if (update.setParams) {
28085
            // Set every requested param.
28086
            params = Object.keys(update.setParams)
28087
                .reduce(function (params, param) { return params.set(param, update.setParams[param]); }, params);
28088
        }
28089
        // Finally, construct the new HttpRequest using the pieces from above.
28090
        return new HttpRequest(method, url, body, {
28091
            params: params, headers: headers, reportProgress: reportProgress, responseType: responseType, withCredentials: withCredentials,
28092
        });
28093
    };
28094
    return HttpRequest;
28095
}());
28096
 
28097
/**
28098
 * @license
28099
 * Copyright Google Inc. All Rights Reserved.
28100
 *
28101
 * Use of this source code is governed by an MIT-style license that can be
28102
 * found in the LICENSE file at https://angular.io/license
28103
 */
28104
/**
28105
 * Type enumeration for the different kinds of `HttpEvent`.
28106
 *
28107
 *
28108
 */
28109
/**
28110
 * Type enumeration for the different kinds of `HttpEvent`.
28111
 *
28112
 *
28113
 */
28114
var HttpEventType;
28115
/**
28116
 * Type enumeration for the different kinds of `HttpEvent`.
28117
 *
28118
 *
28119
 */
28120
(function (HttpEventType) {
28121
    /**
28122
     * The request was sent out over the wire.
28123
     */
28124
    HttpEventType[HttpEventType["Sent"] = 0] = "Sent";
28125
    /**
28126
     * An upload progress event was received.
28127
     */
28128
    HttpEventType[HttpEventType["UploadProgress"] = 1] = "UploadProgress";
28129
    /**
28130
     * The response status code and headers were received.
28131
     */
28132
    HttpEventType[HttpEventType["ResponseHeader"] = 2] = "ResponseHeader";
28133
    /**
28134
     * A download progress event was received.
28135
     */
28136
    HttpEventType[HttpEventType["DownloadProgress"] = 3] = "DownloadProgress";
28137
    /**
28138
     * The full response including the body was received.
28139
     */
28140
    HttpEventType[HttpEventType["Response"] = 4] = "Response";
28141
    /**
28142
     * A custom event from an interceptor or a backend.
28143
     */
28144
    HttpEventType[HttpEventType["User"] = 5] = "User";
28145
})(HttpEventType || (HttpEventType = {}));
28146
/**
28147
 * Base class for both `HttpResponse` and `HttpHeaderResponse`.
28148
 *
28149
 *
28150
 */
28151
var HttpResponseBase = /** @class */ (function () {
28152
    /**
28153
     * Super-constructor for all responses.
28154
     *
28155
     * The single parameter accepted is an initialization hash. Any properties
28156
     * of the response passed there will override the default values.
28157
     */
28158
    function HttpResponseBase(init, defaultStatus, defaultStatusText) {
28159
        if (defaultStatus === void 0) { defaultStatus = 200; }
28160
        if (defaultStatusText === void 0) { defaultStatusText = 'OK'; }
28161
        // If the hash has values passed, use them to initialize the response.
28162
        // Otherwise use the default values.
28163
        this.headers = init.headers || new HttpHeaders();
28164
        this.status = init.status !== undefined ? init.status : defaultStatus;
28165
        this.statusText = init.statusText || defaultStatusText;
28166
        this.url = init.url || null;
28167
        // Cache the ok value to avoid defining a getter.
28168
        this.ok = this.status >= 200 && this.status < 300;
28169
    }
28170
    return HttpResponseBase;
28171
}());
28172
/**
28173
 * A partial HTTP response which only includes the status and header data,
28174
 * but no response body.
28175
 *
28176
 * `HttpHeaderResponse` is a `HttpEvent` available on the response
28177
 * event stream, only when progress events are requested.
28178
 *
28179
 *
28180
 */
28181
var HttpHeaderResponse = /** @class */ (function (_super) {
28182
    Object(tslib__WEBPACK_IMPORTED_MODULE_3__["__extends"])(HttpHeaderResponse, _super);
28183
    /**
28184
     * Create a new `HttpHeaderResponse` with the given parameters.
28185
     */
28186
    function HttpHeaderResponse(init) {
28187
        if (init === void 0) { init = {}; }
28188
        var _this = _super.call(this, init) || this;
28189
        _this.type = HttpEventType.ResponseHeader;
28190
        return _this;
28191
    }
28192
    /**
28193
     * Copy this `HttpHeaderResponse`, overriding its contents with the
28194
     * given parameter hash.
28195
     */
28196
    /**
28197
       * Copy this `HttpHeaderResponse`, overriding its contents with the
28198
       * given parameter hash.
28199
       */
28200
    HttpHeaderResponse.prototype.clone = /**
28201
       * Copy this `HttpHeaderResponse`, overriding its contents with the
28202
       * given parameter hash.
28203
       */
28204
    function (update) {
28205
        if (update === void 0) { update = {}; }
28206
        // Perform a straightforward initialization of the new HttpHeaderResponse,
28207
        // overriding the current parameters with new ones if given.
28208
        return new HttpHeaderResponse({
28209
            headers: update.headers || this.headers,
28210
            status: update.status !== undefined ? update.status : this.status,
28211
            statusText: update.statusText || this.statusText,
28212
            url: update.url || this.url || undefined,
28213
        });
28214
    };
28215
    return HttpHeaderResponse;
28216
}(HttpResponseBase));
28217
/**
28218
 * A full HTTP response, including a typed response body (which may be `null`
28219
 * if one was not returned).
28220
 *
28221
 * `HttpResponse` is a `HttpEvent` available on the response event
28222
 * stream.
28223
 *
28224
 *
28225
 */
28226
var HttpResponse = /** @class */ (function (_super) {
28227
    Object(tslib__WEBPACK_IMPORTED_MODULE_3__["__extends"])(HttpResponse, _super);
28228
    /**
28229
     * Construct a new `HttpResponse`.
28230
     */
28231
    function HttpResponse(init) {
28232
        if (init === void 0) { init = {}; }
28233
        var _this = _super.call(this, init) || this;
28234
        _this.type = HttpEventType.Response;
28235
        _this.body = init.body !== undefined ? init.body : null;
28236
        return _this;
28237
    }
28238
    HttpResponse.prototype.clone = function (update) {
28239
        if (update === void 0) { update = {}; }
28240
        return new HttpResponse({
28241
            body: (update.body !== undefined) ? update.body : this.body,
28242
            headers: update.headers || this.headers,
28243
            status: (update.status !== undefined) ? update.status : this.status,
28244
            statusText: update.statusText || this.statusText,
28245
            url: update.url || this.url || undefined,
28246
        });
28247
    };
28248
    return HttpResponse;
28249
}(HttpResponseBase));
28250
/**
28251
 * A response that represents an error or failure, either from a
28252
 * non-successful HTTP status, an error while executing the request,
28253
 * or some other failure which occurred during the parsing of the response.
28254
 *
28255
 * Any error returned on the `Observable` response stream will be
28256
 * wrapped in an `HttpErrorResponse` to provide additional context about
28257
 * the state of the HTTP layer when the error occurred. The error property
28258
 * will contain either a wrapped Error object or the error response returned
28259
 * from the server.
28260
 *
28261
 *
28262
 */
28263
var HttpErrorResponse = /** @class */ (function (_super) {
28264
    Object(tslib__WEBPACK_IMPORTED_MODULE_3__["__extends"])(HttpErrorResponse, _super);
28265
    function HttpErrorResponse(init) {
28266
        var _this =
28267
        // Initialize with a default status of 0 / Unknown Error.
28268
        _super.call(this, init, 0, 'Unknown Error') || this;
28269
        _this.name = 'HttpErrorResponse';
28270
        /**
28271
           * Errors are never okay, even when the status code is in the 2xx success range.
28272
           */
28273
        _this.ok = false;
28274
        // If the response was successful, then this was a parse error. Otherwise, it was
28275
        // a protocol-level failure of some sort. Either the request failed in transit
28276
        // or the server returned an unsuccessful status code.
28277
        if (_this.status >= 200 && _this.status < 300) {
28278
            _this.message = "Http failure during parsing for " + (init.url || '(unknown url)');
28279
        }
28280
        else {
28281
            _this.message =
28282
                "Http failure response for " + (init.url || '(unknown url)') + ": " + init.status + " " + init.statusText;
28283
        }
28284
        _this.error = init.error || null;
28285
        return _this;
28286
    }
28287
    return HttpErrorResponse;
28288
}(HttpResponseBase));
28289
 
28290
/**
28291
 * @license
28292
 * Copyright Google Inc. All Rights Reserved.
28293
 *
28294
 * Use of this source code is governed by an MIT-style license that can be
28295
 * found in the LICENSE file at https://angular.io/license
28296
 */
28297
/**
28298
 * Construct an instance of `HttpRequestOptions<T>` from a source `HttpMethodOptions` and
28299
 * the given `body`. Basically, this clones the object and adds the body.
28300
 */
28301
function addBody(options, body) {
28302
    return {
28303
        body: body,
28304
        headers: options.headers,
28305
        observe: options.observe,
28306
        params: options.params,
28307
        reportProgress: options.reportProgress,
28308
        responseType: options.responseType,
28309
        withCredentials: options.withCredentials,
28310
    };
28311
}
28312
/**
28313
 * Perform HTTP requests.
28314
 *
28315
 * `HttpClient` is available as an injectable class, with methods to perform HTTP requests.
28316
 * Each request method has multiple signatures, and the return type varies according to which
28317
 * signature is called (mainly the values of `observe` and `responseType`).
28318
 *
28319
 *
28320
 */
28321
var HttpClient = /** @class */ (function () {
28322
    function HttpClient(handler) {
28323
        this.handler = handler;
28324
    }
28325
    /**
28326
     * Constructs an `Observable` for a particular HTTP request that, when subscribed,
28327
     * fires the request through the chain of registered interceptors and on to the
28328
     * server.
28329
     *
28330
     * This method can be called in one of two ways. Either an `HttpRequest`
28331
     * instance can be passed directly as the only parameter, or a method can be
28332
     * passed as the first parameter, a string URL as the second, and an
28333
     * options hash as the third.
28334
     *
28335
     * If a `HttpRequest` object is passed directly, an `Observable` of the
28336
     * raw `HttpEvent` stream will be returned.
28337
     *
28338
     * If a request is instead built by providing a URL, the options object
28339
     * determines the return type of `request()`. In addition to configuring
28340
     * request parameters such as the outgoing headers and/or the body, the options
28341
     * hash specifies two key pieces of information about the request: the
28342
     * `responseType` and what to `observe`.
28343
     *
28344
     * The `responseType` value determines how a successful response body will be
28345
     * parsed. If `responseType` is the default `json`, a type interface for the
28346
     * resulting object may be passed as a type parameter to `request()`.
28347
     *
28348
     * The `observe` value determines the return type of `request()`, based on what
28349
     * the consumer is interested in observing. A value of `events` will return an
28350
     * `Observable<HttpEvent>` representing the raw `HttpEvent` stream,
28351
     * including progress events by default. A value of `response` will return an
28352
     * `Observable<HttpResponse<T>>` where the `T` parameter of `HttpResponse`
28353
     * depends on the `responseType` and any optionally provided type parameter.
28354
     * A value of `body` will return an `Observable<T>` with the same `T` body type.
28355
     */
28356
    /**
28357
       * Constructs an `Observable` for a particular HTTP request that, when subscribed,
28358
       * fires the request through the chain of registered interceptors and on to the
28359
       * server.
28360
       *
28361
       * This method can be called in one of two ways. Either an `HttpRequest`
28362
       * instance can be passed directly as the only parameter, or a method can be
28363
       * passed as the first parameter, a string URL as the second, and an
28364
       * options hash as the third.
28365
       *
28366
       * If a `HttpRequest` object is passed directly, an `Observable` of the
28367
       * raw `HttpEvent` stream will be returned.
28368
       *
28369
       * If a request is instead built by providing a URL, the options object
28370
       * determines the return type of `request()`. In addition to configuring
28371
       * request parameters such as the outgoing headers and/or the body, the options
28372
       * hash specifies two key pieces of information about the request: the
28373
       * `responseType` and what to `observe`.
28374
       *
28375
       * The `responseType` value determines how a successful response body will be
28376
       * parsed. If `responseType` is the default `json`, a type interface for the
28377
       * resulting object may be passed as a type parameter to `request()`.
28378
       *
28379
       * The `observe` value determines the return type of `request()`, based on what
28380
       * the consumer is interested in observing. A value of `events` will return an
28381
       * `Observable<HttpEvent>` representing the raw `HttpEvent` stream,
28382
       * including progress events by default. A value of `response` will return an
28383
       * `Observable<HttpResponse<T>>` where the `T` parameter of `HttpResponse`
28384
       * depends on the `responseType` and any optionally provided type parameter.
28385
       * A value of `body` will return an `Observable<T>` with the same `T` body type.
28386
       */
28387
    HttpClient.prototype.request = /**
28388
       * Constructs an `Observable` for a particular HTTP request that, when subscribed,
28389
       * fires the request through the chain of registered interceptors and on to the
28390
       * server.
28391
       *
28392
       * This method can be called in one of two ways. Either an `HttpRequest`
28393
       * instance can be passed directly as the only parameter, or a method can be
28394
       * passed as the first parameter, a string URL as the second, and an
28395
       * options hash as the third.
28396
       *
28397
       * If a `HttpRequest` object is passed directly, an `Observable` of the
28398
       * raw `HttpEvent` stream will be returned.
28399
       *
28400
       * If a request is instead built by providing a URL, the options object
28401
       * determines the return type of `request()`. In addition to configuring
28402
       * request parameters such as the outgoing headers and/or the body, the options
28403
       * hash specifies two key pieces of information about the request: the
28404
       * `responseType` and what to `observe`.
28405
       *
28406
       * The `responseType` value determines how a successful response body will be
28407
       * parsed. If `responseType` is the default `json`, a type interface for the
28408
       * resulting object may be passed as a type parameter to `request()`.
28409
       *
28410
       * The `observe` value determines the return type of `request()`, based on what
28411
       * the consumer is interested in observing. A value of `events` will return an
28412
       * `Observable<HttpEvent>` representing the raw `HttpEvent` stream,
28413
       * including progress events by default. A value of `response` will return an
28414
       * `Observable<HttpResponse<T>>` where the `T` parameter of `HttpResponse`
28415
       * depends on the `responseType` and any optionally provided type parameter.
28416
       * A value of `body` will return an `Observable<T>` with the same `T` body type.
28417
       */
28418
    function (first, url, options) {
28419
        var _this = this;
28420
        if (options === void 0) { options = {}; }
28421
        var req;
28422
        // Firstly, check whether the primary argument is an instance of `HttpRequest`.
28423
        if (first instanceof HttpRequest) {
28424
            // It is. The other arguments must be undefined (per the signatures) and can be
28425
            // ignored.
28426
            req = first;
28427
        }
28428
        else {
28429
            // It's a string, so it represents a URL. Construct a request based on it,
28430
            // and incorporate the remaining arguments (assuming GET unless a method is
28431
            // provided.
28432
            // Figure out the headers.
28433
            var headers = undefined;
28434
            if (options.headers instanceof HttpHeaders) {
28435
                headers = options.headers;
28436
            }
28437
            else {
28438
                headers = new HttpHeaders(options.headers);
28439
            }
28440
            // Sort out parameters.
28441
            var params = undefined;
28442
            if (!!options.params) {
28443
                if (options.params instanceof HttpParams) {
28444
                    params = options.params;
28445
                }
28446
                else {
28447
                    params = new HttpParams({ fromObject: options.params });
28448
                }
28449
            }
28450
            // Construct the request.
28451
            req = new HttpRequest(first, (url), (options.body !== undefined ? options.body : null), {
28452
                headers: headers,
28453
                params: params,
28454
                reportProgress: options.reportProgress,
28455
                // By default, JSON is assumed to be returned for all calls.
28456
                responseType: options.responseType || 'json',
28457
                withCredentials: options.withCredentials,
28458
            });
28459
        }
28460
        // Start with an Observable.of() the initial request, and run the handler (which
28461
        // includes all interceptors) inside a concatMap(). This way, the handler runs
28462
        // inside an Observable chain, which causes interceptors to be re-run on every
28463
        // subscription (this also makes retries re-run the handler, including interceptors).
28464
        var events$ = Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["of"])(req).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["concatMap"])(function (req) { return _this.handler.handle(req); }));
28465
        // If coming via the API signature which accepts a previously constructed HttpRequest,
28466
        // the only option is to get the event stream. Otherwise, return the event stream if
28467
        // that is what was requested.
28468
        if (first instanceof HttpRequest || options.observe === 'events') {
28469
            return events$;
28470
        }
28471
        // The requested stream contains either the full response or the body. In either
28472
        // case, the first step is to filter the event stream to extract a stream of
28473
        // responses(s).
28474
        var res$ = events$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["filter"])(function (event) { return event instanceof HttpResponse; }));
28475
        // Decide which stream to return.
28476
        switch (options.observe || 'body') {
28477
            case 'body':
28478
                // The requested stream is the body. Map the response stream to the response
28479
                // body. This could be done more simply, but a misbehaving interceptor might
28480
                // transform the response body into a different format and ignore the requested
28481
                // responseType. Guard against this by validating that the response is of the
28482
                // requested type.
28483
                switch (req.responseType) {
28484
                    case 'arraybuffer':
28485
                        return res$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])(function (res) {
28486
                            // Validate that the body is an ArrayBuffer.
28487
                            if (res.body !== null && !(res.body instanceof ArrayBuffer)) {
28488
                                throw new Error('Response is not an ArrayBuffer.');
28489
                            }
28490
                            return res.body;
28491
                        }));
28492
                    case 'blob':
28493
                        return res$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])(function (res) {
28494
                            // Validate that the body is a Blob.
28495
                            if (res.body !== null && !(res.body instanceof Blob)) {
28496
                                throw new Error('Response is not a Blob.');
28497
                            }
28498
                            return res.body;
28499
                        }));
28500
                    case 'text':
28501
                        return res$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])(function (res) {
28502
                            // Validate that the body is a string.
28503
                            if (res.body !== null && typeof res.body !== 'string') {
28504
                                throw new Error('Response is not a string.');
28505
                            }
28506
                            return res.body;
28507
                        }));
28508
                    case 'json':
28509
                    default:
28510
                        // No validation needed for JSON responses, as they can be of any type.
28511
                        return res$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])(function (res) { return res.body; }));
28512
                }
28513
            case 'response':
28514
                // The response stream was requested directly, so return it.
28515
                return res$;
28516
            default:
28517
                // Guard against new future observe types being added.
28518
                throw new Error("Unreachable: unhandled observe type " + options.observe + "}");
28519
        }
28520
    };
28521
    /**
28522
     * Constructs an `Observable` which, when subscribed, will cause the configured
28523
     * DELETE request to be executed on the server. See the individual overloads for
28524
     * details of `delete()`'s return type based on the provided options.
28525
     */
28526
    /**
28527
       * Constructs an `Observable` which, when subscribed, will cause the configured
28528
       * DELETE request to be executed on the server. See the individual overloads for
28529
       * details of `delete()`'s return type based on the provided options.
28530
       */
28531
    HttpClient.prototype.delete = /**
28532
       * Constructs an `Observable` which, when subscribed, will cause the configured
28533
       * DELETE request to be executed on the server. See the individual overloads for
28534
       * details of `delete()`'s return type based on the provided options.
28535
       */
28536
    function (url, options) {
28537
        if (options === void 0) { options = {}; }
28538
        return this.request('DELETE', url, options);
28539
    };
28540
    /**
28541
     * Constructs an `Observable` which, when subscribed, will cause the configured
28542
     * GET request to be executed on the server. See the individual overloads for
28543
     * details of `get()`'s return type based on the provided options.
28544
     */
28545
    /**
28546
       * Constructs an `Observable` which, when subscribed, will cause the configured
28547
       * GET request to be executed on the server. See the individual overloads for
28548
       * details of `get()`'s return type based on the provided options.
28549
       */
28550
    HttpClient.prototype.get = /**
28551
       * Constructs an `Observable` which, when subscribed, will cause the configured
28552
       * GET request to be executed on the server. See the individual overloads for
28553
       * details of `get()`'s return type based on the provided options.
28554
       */
28555
    function (url, options) {
28556
        if (options === void 0) { options = {}; }
28557
        return this.request('GET', url, options);
28558
    };
28559
    /**
28560
     * Constructs an `Observable` which, when subscribed, will cause the configured
28561
     * HEAD request to be executed on the server. See the individual overloads for
28562
     * details of `head()`'s return type based on the provided options.
28563
     */
28564
    /**
28565
       * Constructs an `Observable` which, when subscribed, will cause the configured
28566
       * HEAD request to be executed on the server. See the individual overloads for
28567
       * details of `head()`'s return type based on the provided options.
28568
       */
28569
    HttpClient.prototype.head = /**
28570
       * Constructs an `Observable` which, when subscribed, will cause the configured
28571
       * HEAD request to be executed on the server. See the individual overloads for
28572
       * details of `head()`'s return type based on the provided options.
28573
       */
28574
    function (url, options) {
28575
        if (options === void 0) { options = {}; }
28576
        return this.request('HEAD', url, options);
28577
    };
28578
    /**
28579
     * Constructs an `Observable` which, when subscribed, will cause a request
28580
     * with the special method `JSONP` to be dispatched via the interceptor pipeline.
28581
     *
28582
     * A suitable interceptor must be installed (e.g. via the `HttpClientJsonpModule`).
28583
     * If no such interceptor is reached, then the `JSONP` request will likely be
28584
     * rejected by the configured backend.
28585
     */
28586
    /**
28587
       * Constructs an `Observable` which, when subscribed, will cause a request
28588
       * with the special method `JSONP` to be dispatched via the interceptor pipeline.
28589
       *
28590
       * A suitable interceptor must be installed (e.g. via the `HttpClientJsonpModule`).
28591
       * If no such interceptor is reached, then the `JSONP` request will likely be
28592
       * rejected by the configured backend.
28593
       */
28594
    HttpClient.prototype.jsonp = /**
28595
       * Constructs an `Observable` which, when subscribed, will cause a request
28596
       * with the special method `JSONP` to be dispatched via the interceptor pipeline.
28597
       *
28598
       * A suitable interceptor must be installed (e.g. via the `HttpClientJsonpModule`).
28599
       * If no such interceptor is reached, then the `JSONP` request will likely be
28600
       * rejected by the configured backend.
28601
       */
28602
    function (url, callbackParam) {
28603
        return this.request('JSONP', url, {
28604
            params: new HttpParams().append(callbackParam, 'JSONP_CALLBACK'),
28605
            observe: 'body',
28606
            responseType: 'json',
28607
        });
28608
    };
28609
    /**
28610
     * Constructs an `Observable` which, when subscribed, will cause the configured
28611
     * OPTIONS request to be executed on the server. See the individual overloads for
28612
     * details of `options()`'s return type based on the provided options.
28613
     */
28614
    /**
28615
       * Constructs an `Observable` which, when subscribed, will cause the configured
28616
       * OPTIONS request to be executed on the server. See the individual overloads for
28617
       * details of `options()`'s return type based on the provided options.
28618
       */
28619
    HttpClient.prototype.options = /**
28620
       * Constructs an `Observable` which, when subscribed, will cause the configured
28621
       * OPTIONS request to be executed on the server. See the individual overloads for
28622
       * details of `options()`'s return type based on the provided options.
28623
       */
28624
    function (url, options) {
28625
        if (options === void 0) { options = {}; }
28626
        return this.request('OPTIONS', url, options);
28627
    };
28628
    /**
28629
     * Constructs an `Observable` which, when subscribed, will cause the configured
28630
     * PATCH request to be executed on the server. See the individual overloads for
28631
     * details of `patch()`'s return type based on the provided options.
28632
     */
28633
    /**
28634
       * Constructs an `Observable` which, when subscribed, will cause the configured
28635
       * PATCH request to be executed on the server. See the individual overloads for
28636
       * details of `patch()`'s return type based on the provided options.
28637
       */
28638
    HttpClient.prototype.patch = /**
28639
       * Constructs an `Observable` which, when subscribed, will cause the configured
28640
       * PATCH request to be executed on the server. See the individual overloads for
28641
       * details of `patch()`'s return type based on the provided options.
28642
       */
28643
    function (url, body, options) {
28644
        if (options === void 0) { options = {}; }
28645
        return this.request('PATCH', url, addBody(options, body));
28646
    };
28647
    /**
28648
     * Constructs an `Observable` which, when subscribed, will cause the configured
28649
     * POST request to be executed on the server. See the individual overloads for
28650
     * details of `post()`'s return type based on the provided options.
28651
     */
28652
    /**
28653
       * Constructs an `Observable` which, when subscribed, will cause the configured
28654
       * POST request to be executed on the server. See the individual overloads for
28655
       * details of `post()`'s return type based on the provided options.
28656
       */
28657
    HttpClient.prototype.post = /**
28658
       * Constructs an `Observable` which, when subscribed, will cause the configured
28659
       * POST request to be executed on the server. See the individual overloads for
28660
       * details of `post()`'s return type based on the provided options.
28661
       */
28662
    function (url, body, options) {
28663
        if (options === void 0) { options = {}; }
28664
        return this.request('POST', url, addBody(options, body));
28665
    };
28666
    /**
28667
     * Constructs an `Observable` which, when subscribed, will cause the configured
28668
     * POST request to be executed on the server. See the individual overloads for
28669
     * details of `post()`'s return type based on the provided options.
28670
     */
28671
    /**
28672
       * Constructs an `Observable` which, when subscribed, will cause the configured
28673
       * POST request to be executed on the server. See the individual overloads for
28674
       * details of `post()`'s return type based on the provided options.
28675
       */
28676
    HttpClient.prototype.put = /**
28677
       * Constructs an `Observable` which, when subscribed, will cause the configured
28678
       * POST request to be executed on the server. See the individual overloads for
28679
       * details of `post()`'s return type based on the provided options.
28680
       */
28681
    function (url, body, options) {
28682
        if (options === void 0) { options = {}; }
28683
        return this.request('PUT', url, addBody(options, body));
28684
    };
28685
    HttpClient.decorators = [
28686
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }
28687
    ];
28688
    /** @nocollapse */
28689
    HttpClient.ctorParameters = function () { return [
28690
        { type: HttpHandler, },
28691
    ]; };
28692
    return HttpClient;
28693
}());
28694
 
28695
/**
28696
 * @license
28697
 * Copyright Google Inc. All Rights Reserved.
28698
 *
28699
 * Use of this source code is governed by an MIT-style license that can be
28700
 * found in the LICENSE file at https://angular.io/license
28701
 */
28702
/**
28703
 * `HttpHandler` which applies an `HttpInterceptor` to an `HttpRequest`.
28704
 *
28705
 *
28706
 */
28707
var HttpInterceptorHandler = /** @class */ (function () {
28708
    function HttpInterceptorHandler(next, interceptor) {
28709
        this.next = next;
28710
        this.interceptor = interceptor;
28711
    }
28712
    HttpInterceptorHandler.prototype.handle = function (req) {
28713
        return this.interceptor.intercept(req, this.next);
28714
    };
28715
    return HttpInterceptorHandler;
28716
}());
28717
/**
28718
 * A multi-provider token which represents the array of `HttpInterceptor`s that
28719
 * are registered.
28720
 *
28721
 *
28722
 */
28723
var HTTP_INTERCEPTORS = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('HTTP_INTERCEPTORS');
28724
var NoopInterceptor = /** @class */ (function () {
28725
    function NoopInterceptor() {
28726
    }
28727
    NoopInterceptor.prototype.intercept = function (req, next) {
28728
        return next.handle(req);
28729
    };
28730
    NoopInterceptor.decorators = [
28731
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }
28732
    ];
28733
    /** @nocollapse */
28734
    NoopInterceptor.ctorParameters = function () { return []; };
28735
    return NoopInterceptor;
28736
}());
28737
 
28738
/**
28739
 * @license
28740
 * Copyright Google Inc. All Rights Reserved.
28741
 *
28742
 * Use of this source code is governed by an MIT-style license that can be
28743
 * found in the LICENSE file at https://angular.io/license
28744
 */
28745
// Every request made through JSONP needs a callback name that's unique across the
28746
// whole page. Each request is assigned an id and the callback name is constructed
28747
// from that. The next id to be assigned is tracked in a global variable here that
28748
// is shared among all applications on the page.
28749
var nextRequestId = 0;
28750
// Error text given when a JSONP script is injected, but doesn't invoke the callback
28751
// passed in its URL.
28752
var JSONP_ERR_NO_CALLBACK = 'JSONP injected script did not invoke callback.';
28753
// Error text given when a request is passed to the JsonpClientBackend that doesn't
28754
// have a request method JSONP.
28755
var JSONP_ERR_WRONG_METHOD = 'JSONP requests must use JSONP request method.';
28756
var JSONP_ERR_WRONG_RESPONSE_TYPE = 'JSONP requests must use Json response type.';
28757
/**
28758
 * DI token/abstract type representing a map of JSONP callbacks.
28759
 *
28760
 * In the browser, this should always be the `window` object.
28761
 *
28762
 *
28763
 */
28764
var JsonpCallbackContext = /** @class */ (function () {
28765
    function JsonpCallbackContext() {
28766
    }
28767
    return JsonpCallbackContext;
28768
}());
28769
/**
28770
 * `HttpBackend` that only processes `HttpRequest` with the JSONP method,
28771
 * by performing JSONP style requests.
28772
 *
28773
 *
28774
 */
28775
var JsonpClientBackend = /** @class */ (function () {
28776
    function JsonpClientBackend(callbackMap, document) {
28777
        this.callbackMap = callbackMap;
28778
        this.document = document;
28779
    }
28780
    /**
28781
     * Get the name of the next callback method, by incrementing the global `nextRequestId`.
28782
     */
28783
    /**
28784
       * Get the name of the next callback method, by incrementing the global `nextRequestId`.
28785
       */
28786
    JsonpClientBackend.prototype.nextCallback = /**
28787
       * Get the name of the next callback method, by incrementing the global `nextRequestId`.
28788
       */
28789
    function () { return "ng_jsonp_callback_" + nextRequestId++; };
28790
    /**
28791
     * Process a JSONP request and return an event stream of the results.
28792
     */
28793
    /**
28794
       * Process a JSONP request and return an event stream of the results.
28795
       */
28796
    JsonpClientBackend.prototype.handle = /**
28797
       * Process a JSONP request and return an event stream of the results.
28798
       */
28799
    function (req) {
28800
        var _this = this;
28801
        // Firstly, check both the method and response type. If either doesn't match
28802
        // then the request was improperly routed here and cannot be handled.
28803
        if (req.method !== 'JSONP') {
28804
            throw new Error(JSONP_ERR_WRONG_METHOD);
28805
        }
28806
        else if (req.responseType !== 'json') {
28807
            throw new Error(JSONP_ERR_WRONG_RESPONSE_TYPE);
28808
        }
28809
        // Everything else happens inside the Observable boundary.
28810
        return new rxjs__WEBPACK_IMPORTED_MODULE_1__["Observable"](function (observer) {
28811
            // The first step to make a request is to generate the callback name, and replace the
28812
            // callback placeholder in the URL with the name. Care has to be taken here to ensure
28813
            // a trailing &, if matched, gets inserted back into the URL in the correct place.
28814
            var callback = _this.nextCallback();
28815
            var url = req.urlWithParams.replace(/=JSONP_CALLBACK(&|$)/, "=" + callback + "$1");
28816
            // Construct the <script> tag and point it at the URL.
28817
            var node = _this.document.createElement('script');
28818
            node.src = url;
28819
            // A JSONP request requires waiting for multiple callbacks. These variables
28820
            // are closed over and track state across those callbacks.
28821
            // The response object, if one has been received, or null otherwise.
28822
            var body = null;
28823
            // Whether the response callback has been called.
28824
            var finished = false;
28825
            // Whether the request has been cancelled (and thus any other callbacks)
28826
            // should be ignored.
28827
            var cancelled = false;
28828
            // Set the response callback in this.callbackMap (which will be the window
28829
            // object in the browser. The script being loaded via the <script> tag will
28830
            // eventually call this callback.
28831
            // Set the response callback in this.callbackMap (which will be the window
28832
            // object in the browser. The script being loaded via the <script> tag will
28833
            // eventually call this callback.
28834
            _this.callbackMap[callback] = function (data) {
28835
                // Data has been received from the JSONP script. Firstly, delete this callback.
28836
                delete _this.callbackMap[callback];
28837
                // Next, make sure the request wasn't cancelled in the meantime.
28838
                if (cancelled) {
28839
                    return;
28840
                }
28841
                // Set state to indicate data was received.
28842
                body = data;
28843
                finished = true;
28844
            };
28845
            // cleanup() is a utility closure that removes the <script> from the page and
28846
            // the response callback from the window. This logic is used in both the
28847
            // success, error, and cancellation paths, so it's extracted out for convenience.
28848
            var cleanup = function () {
28849
                // Remove the <script> tag if it's still on the page.
28850
                if (node.parentNode) {
28851
                    node.parentNode.removeChild(node);
28852
                }
28853
                // Remove the response callback from the callbackMap (window object in the
28854
                // browser).
28855
                delete _this.callbackMap[callback];
28856
            };
28857
            // onLoad() is the success callback which runs after the response callback
28858
            // if the JSONP script loads successfully. The event itself is unimportant.
28859
            // If something went wrong, onLoad() may run without the response callback
28860
            // having been invoked.
28861
            var onLoad = function (event) {
28862
                // Do nothing if the request has been cancelled.
28863
                if (cancelled) {
28864
                    return;
28865
                }
28866
                // Cleanup the page.
28867
                cleanup();
28868
                // Check whether the response callback has run.
28869
                if (!finished) {
28870
                    // It hasn't, something went wrong with the request. Return an error via
28871
                    // the Observable error path. All JSONP errors have status 0.
28872
                    observer.error(new HttpErrorResponse({
28873
                        url: url,
28874
                        status: 0,
28875
                        statusText: 'JSONP Error',
28876
                        error: new Error(JSONP_ERR_NO_CALLBACK),
28877
                    }));
28878
                    return;
28879
                }
28880
                // Success. body either contains the response body or null if none was
28881
                // returned.
28882
                observer.next(new HttpResponse({
28883
                    body: body,
28884
                    status: 200,
28885
                    statusText: 'OK', url: url,
28886
                }));
28887
                // Complete the stream, the response is over.
28888
                observer.complete();
28889
            };
28890
            // onError() is the error callback, which runs if the script returned generates
28891
            // a Javascript error. It emits the error via the Observable error channel as
28892
            // a HttpErrorResponse.
28893
            var onError = function (error) {
28894
                // If the request was already cancelled, no need to emit anything.
28895
                if (cancelled) {
28896
                    return;
28897
                }
28898
                cleanup();
28899
                // Wrap the error in a HttpErrorResponse.
28900
                observer.error(new HttpErrorResponse({
28901
                    error: error,
28902
                    status: 0,
28903
                    statusText: 'JSONP Error', url: url,
28904
                }));
28905
            };
28906
            // Subscribe to both the success (load) and error events on the <script> tag,
28907
            // and add it to the page.
28908
            node.addEventListener('load', onLoad);
28909
            node.addEventListener('error', onError);
28910
            _this.document.body.appendChild(node);
28911
            // The request has now been successfully sent.
28912
            observer.next({ type: HttpEventType.Sent });
28913
            // Cancellation handler.
28914
            return function () {
28915
                // Track the cancellation so event listeners won't do anything even if already scheduled.
28916
                cancelled = true;
28917
                // Remove the event listeners so they won't run if the events later fire.
28918
                node.removeEventListener('load', onLoad);
28919
                node.removeEventListener('error', onError);
28920
                // And finally, clean up the page.
28921
                cleanup();
28922
            };
28923
        });
28924
    };
28925
    JsonpClientBackend.decorators = [
28926
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }
28927
    ];
28928
    /** @nocollapse */
28929
    JsonpClientBackend.ctorParameters = function () { return [
28930
        { type: JsonpCallbackContext, },
28931
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_4__["DOCUMENT"],] },] },
28932
    ]; };
28933
    return JsonpClientBackend;
28934
}());
28935
/**
28936
 * An `HttpInterceptor` which identifies requests with the method JSONP and
28937
 * shifts them to the `JsonpClientBackend`.
28938
 *
28939
 *
28940
 */
28941
var JsonpInterceptor = /** @class */ (function () {
28942
    function JsonpInterceptor(jsonp) {
28943
        this.jsonp = jsonp;
28944
    }
28945
    JsonpInterceptor.prototype.intercept = function (req, next) {
28946
        if (req.method === 'JSONP') {
28947
            return this.jsonp.handle(req);
28948
        }
28949
        // Fall through for normal HTTP requests.
28950
        return next.handle(req);
28951
    };
28952
    JsonpInterceptor.decorators = [
28953
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }
28954
    ];
28955
    /** @nocollapse */
28956
    JsonpInterceptor.ctorParameters = function () { return [
28957
        { type: JsonpClientBackend, },
28958
    ]; };
28959
    return JsonpInterceptor;
28960
}());
28961
 
28962
/**
28963
 * @license
28964
 * Copyright Google Inc. All Rights Reserved.
28965
 *
28966
 * Use of this source code is governed by an MIT-style license that can be
28967
 * found in the LICENSE file at https://angular.io/license
28968
 */
28969
var XSSI_PREFIX = /^\)\]\}',?\n/;
28970
/**
28971
 * Determine an appropriate URL for the response, by checking either
28972
 * XMLHttpRequest.responseURL or the X-Request-URL header.
28973
 */
28974
function getResponseUrl(xhr) {
28975
    if ('responseURL' in xhr && xhr.responseURL) {
28976
        return xhr.responseURL;
28977
    }
28978
    if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {
28979
        return xhr.getResponseHeader('X-Request-URL');
28980
    }
28981
    return null;
28982
}
28983
/**
28984
 * A wrapper around the `XMLHttpRequest` constructor.
28985
 *
28986
 *
28987
 */
28988
var XhrFactory = /** @class */ (function () {
28989
    function XhrFactory() {
28990
    }
28991
    return XhrFactory;
28992
}());
28993
/**
28994
 * A factory for @{link HttpXhrBackend} that uses the `XMLHttpRequest` browser API.
28995
 *
28996
 *
28997
 */
28998
var BrowserXhr = /** @class */ (function () {
28999
    function BrowserXhr() {
29000
    }
29001
    BrowserXhr.prototype.build = function () { return (new XMLHttpRequest()); };
29002
    BrowserXhr.decorators = [
29003
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }
29004
    ];
29005
    /** @nocollapse */
29006
    BrowserXhr.ctorParameters = function () { return []; };
29007
    return BrowserXhr;
29008
}());
29009
/**
29010
 * An `HttpBackend` which uses the XMLHttpRequest API to send
29011
 * requests to a backend server.
29012
 *
29013
 *
29014
 */
29015
var HttpXhrBackend = /** @class */ (function () {
29016
    function HttpXhrBackend(xhrFactory) {
29017
        this.xhrFactory = xhrFactory;
29018
    }
29019
    /**
29020
     * Process a request and return a stream of response events.
29021
     */
29022
    /**
29023
       * Process a request and return a stream of response events.
29024
       */
29025
    HttpXhrBackend.prototype.handle = /**
29026
       * Process a request and return a stream of response events.
29027
       */
29028
    function (req) {
29029
        var _this = this;
29030
        // Quick check to give a better error message when a user attempts to use
29031
        // HttpClient.jsonp() without installing the JsonpClientModule
29032
        if (req.method === 'JSONP') {
29033
            throw new Error("Attempted to construct Jsonp request without JsonpClientModule installed.");
29034
        }
29035
        // Everything happens on Observable subscription.
29036
        return new rxjs__WEBPACK_IMPORTED_MODULE_1__["Observable"](function (observer) {
29037
            // Start by setting up the XHR object with request method, URL, and withCredentials flag.
29038
            var xhr = _this.xhrFactory.build();
29039
            xhr.open(req.method, req.urlWithParams);
29040
            if (!!req.withCredentials) {
29041
                xhr.withCredentials = true;
29042
            }
29043
            // Add all the requested headers.
29044
            req.headers.forEach(function (name, values) { return xhr.setRequestHeader(name, values.join(',')); });
29045
            // Add an Accept header if one isn't present already.
29046
            if (!req.headers.has('Accept')) {
29047
                xhr.setRequestHeader('Accept', 'application/json, text/plain, */*');
29048
            }
29049
            // Auto-detect the Content-Type header if one isn't present already.
29050
            if (!req.headers.has('Content-Type')) {
29051
                var detectedType = req.detectContentTypeHeader();
29052
                // Sometimes Content-Type detection fails.
29053
                if (detectedType !== null) {
29054
                    xhr.setRequestHeader('Content-Type', detectedType);
29055
                }
29056
            }
29057
            // Set the responseType if one was requested.
29058
            if (req.responseType) {
29059
                var responseType = req.responseType.toLowerCase();
29060
                // JSON responses need to be processed as text. This is because if the server
29061
                // returns an XSSI-prefixed JSON response, the browser will fail to parse it,
29062
                // xhr.response will be null, and xhr.responseText cannot be accessed to
29063
                // retrieve the prefixed JSON data in order to strip the prefix. Thus, all JSON
29064
                // is parsed by first requesting text and then applying JSON.parse.
29065
                xhr.responseType = ((responseType !== 'json') ? responseType : 'text');
29066
            }
29067
            // Serialize the request body if one is present. If not, this will be set to null.
29068
            var reqBody = req.serializeBody();
29069
            // If progress events are enabled, response headers will be delivered
29070
            // in two events - the HttpHeaderResponse event and the full HttpResponse
29071
            // event. However, since response headers don't change in between these
29072
            // two events, it doesn't make sense to parse them twice. So headerResponse
29073
            // caches the data extracted from the response whenever it's first parsed,
29074
            // to ensure parsing isn't duplicated.
29075
            var headerResponse = null;
29076
            // partialFromXhr extracts the HttpHeaderResponse from the current XMLHttpRequest
29077
            // state, and memoizes it into headerResponse.
29078
            var partialFromXhr = function () {
29079
                if (headerResponse !== null) {
29080
                    return headerResponse;
29081
                }
29082
                // Read status and normalize an IE9 bug (http://bugs.jquery.com/ticket/1450).
29083
                var status = xhr.status === 1223 ? 204 : xhr.status;
29084
                var statusText = xhr.statusText || 'OK';
29085
                // Parse headers from XMLHttpRequest - this step is lazy.
29086
                var headers = new HttpHeaders(xhr.getAllResponseHeaders());
29087
                // Read the response URL from the XMLHttpResponse instance and fall back on the
29088
                // request URL.
29089
                var url = getResponseUrl(xhr) || req.url;
29090
                // Construct the HttpHeaderResponse and memoize it.
29091
                headerResponse = new HttpHeaderResponse({ headers: headers, status: status, statusText: statusText, url: url });
29092
                return headerResponse;
29093
            };
29094
            // Next, a few closures are defined for the various events which XMLHttpRequest can
29095
            // emit. This allows them to be unregistered as event listeners later.
29096
            // First up is the load event, which represents a response being fully available.
29097
            var onLoad = function () {
29098
                // Read response state from the memoized partial data.
29099
                var _a = partialFromXhr(), headers = _a.headers, status = _a.status, statusText = _a.statusText, url = _a.url;
29100
                // The body will be read out if present.
29101
                var body = null;
29102
                if (status !== 204) {
29103
                    // Use XMLHttpRequest.response if set, responseText otherwise.
29104
                    body = (typeof xhr.response === 'undefined') ? xhr.responseText : xhr.response;
29105
                }
29106
                // Normalize another potential bug (this one comes from CORS).
29107
                if (status === 0) {
29108
                    status = !!body ? 200 : 0;
29109
                }
29110
                // ok determines whether the response will be transmitted on the event or
29111
                // error channel. Unsuccessful status codes (not 2xx) will always be errors,
29112
                // but a successful status code can still result in an error if the user
29113
                // asked for JSON data and the body cannot be parsed as such.
29114
                var ok = status >= 200 && status < 300;
29115
                // Check whether the body needs to be parsed as JSON (in many cases the browser
29116
                // will have done that already).
29117
                if (req.responseType === 'json' && typeof body === 'string') {
29118
                    // Save the original body, before attempting XSSI prefix stripping.
29119
                    var originalBody = body;
29120
                    body = body.replace(XSSI_PREFIX, '');
29121
                    try {
29122
                        // Attempt the parse. If it fails, a parse error should be delivered to the user.
29123
                        body = body !== '' ? JSON.parse(body) : null;
29124
                    }
29125
                    catch (error) {
29126
                        // Since the JSON.parse failed, it's reasonable to assume this might not have been a
29127
                        // JSON response. Restore the original body (including any XSSI prefix) to deliver
29128
                        // a better error response.
29129
                        body = originalBody;
29130
                        // If this was an error request to begin with, leave it as a string, it probably
29131
                        // just isn't JSON. Otherwise, deliver the parsing error to the user.
29132
                        if (ok) {
29133
                            // Even though the response status was 2xx, this is still an error.
29134
                            ok = false;
29135
                            // The parse error contains the text of the body that failed to parse.
29136
                            body = { error: error, text: body };
29137
                        }
29138
                    }
29139
                }
29140
                if (ok) {
29141
                    // A successful response is delivered on the event stream.
29142
                    observer.next(new HttpResponse({
29143
                        body: body,
29144
                        headers: headers,
29145
                        status: status,
29146
                        statusText: statusText,
29147
                        url: url || undefined,
29148
                    }));
29149
                    // The full body has been received and delivered, no further events
29150
                    // are possible. This request is complete.
29151
                    observer.complete();
29152
                }
29153
                else {
29154
                    // An unsuccessful request is delivered on the error channel.
29155
                    observer.error(new HttpErrorResponse({
29156
                        // The error in this case is the response body (error from the server).
29157
                        error: body,
29158
                        headers: headers,
29159
                        status: status,
29160
                        statusText: statusText,
29161
                        url: url || undefined,
29162
                    }));
29163
                }
29164
            };
29165
            // The onError callback is called when something goes wrong at the network level.
29166
            // Connection timeout, DNS error, offline, etc. These are actual errors, and are
29167
            // transmitted on the error channel.
29168
            var onError = function (error) {
29169
                var res = new HttpErrorResponse({
29170
                    error: error,
29171
                    status: xhr.status || 0,
29172
                    statusText: xhr.statusText || 'Unknown Error',
29173
                });
29174
                observer.error(res);
29175
            };
29176
            // The sentHeaders flag tracks whether the HttpResponseHeaders event
29177
            // has been sent on the stream. This is necessary to track if progress
29178
            // is enabled since the event will be sent on only the first download
29179
            // progerss event.
29180
            var sentHeaders = false;
29181
            // The download progress event handler, which is only registered if
29182
            // progress events are enabled.
29183
            var onDownProgress = function (event) {
29184
                // Send the HttpResponseHeaders event if it hasn't been sent already.
29185
                if (!sentHeaders) {
29186
                    observer.next(partialFromXhr());
29187
                    sentHeaders = true;
29188
                }
29189
                // Start building the download progress event to deliver on the response
29190
                // event stream.
29191
                var progressEvent = {
29192
                    type: HttpEventType.DownloadProgress,
29193
                    loaded: event.loaded,
29194
                };
29195
                // Set the total number of bytes in the event if it's available.
29196
                if (event.lengthComputable) {
29197
                    progressEvent.total = event.total;
29198
                }
29199
                // If the request was for text content and a partial response is
29200
                // available on XMLHttpRequest, include it in the progress event
29201
                // to allow for streaming reads.
29202
                if (req.responseType === 'text' && !!xhr.responseText) {
29203
                    progressEvent.partialText = xhr.responseText;
29204
                }
29205
                // Finally, fire the event.
29206
                observer.next(progressEvent);
29207
            };
29208
            // The upload progress event handler, which is only registered if
29209
            // progress events are enabled.
29210
            var onUpProgress = function (event) {
29211
                // Upload progress events are simpler. Begin building the progress
29212
                // event.
29213
                var progress = {
29214
                    type: HttpEventType.UploadProgress,
29215
                    loaded: event.loaded,
29216
                };
29217
                // If the total number of bytes being uploaded is available, include
29218
                // it.
29219
                if (event.lengthComputable) {
29220
                    progress.total = event.total;
29221
                }
29222
                // Send the event.
29223
                observer.next(progress);
29224
            };
29225
            // By default, register for load and error events.
29226
            xhr.addEventListener('load', onLoad);
29227
            xhr.addEventListener('error', onError);
29228
            // Progress events are only enabled if requested.
29229
            if (req.reportProgress) {
29230
                // Download progress is always enabled if requested.
29231
                xhr.addEventListener('progress', onDownProgress);
29232
                // Upload progress depends on whether there is a body to upload.
29233
                if (reqBody !== null && xhr.upload) {
29234
                    xhr.upload.addEventListener('progress', onUpProgress);
29235
                }
29236
            }
29237
            // Fire the request, and notify the event stream that it was fired.
29238
            xhr.send(reqBody);
29239
            observer.next({ type: HttpEventType.Sent });
29240
            // This is the return from the Observable function, which is the
29241
            // request cancellation handler.
29242
            return function () {
29243
                // On a cancellation, remove all registered event listeners.
29244
                xhr.removeEventListener('error', onError);
29245
                xhr.removeEventListener('load', onLoad);
29246
                if (req.reportProgress) {
29247
                    xhr.removeEventListener('progress', onDownProgress);
29248
                    if (reqBody !== null && xhr.upload) {
29249
                        xhr.upload.removeEventListener('progress', onUpProgress);
29250
                    }
29251
                }
29252
                // Finally, abort the in-flight request.
29253
                xhr.abort();
29254
            };
29255
        });
29256
    };
29257
    HttpXhrBackend.decorators = [
29258
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }
29259
    ];
29260
    /** @nocollapse */
29261
    HttpXhrBackend.ctorParameters = function () { return [
29262
        { type: XhrFactory, },
29263
    ]; };
29264
    return HttpXhrBackend;
29265
}());
29266
 
29267
/**
29268
 * @license
29269
 * Copyright Google Inc. All Rights Reserved.
29270
 *
29271
 * Use of this source code is governed by an MIT-style license that can be
29272
 * found in the LICENSE file at https://angular.io/license
29273
 */
29274
var XSRF_COOKIE_NAME = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('XSRF_COOKIE_NAME');
29275
var XSRF_HEADER_NAME = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('XSRF_HEADER_NAME');
29276
/**
29277
 * Retrieves the current XSRF token to use with the next outgoing request.
29278
 *
29279
 *
29280
 */
29281
var HttpXsrfTokenExtractor = /** @class */ (function () {
29282
    function HttpXsrfTokenExtractor() {
29283
    }
29284
    return HttpXsrfTokenExtractor;
29285
}());
29286
/**
29287
 * `HttpXsrfTokenExtractor` which retrieves the token from a cookie.
29288
 */
29289
var HttpXsrfCookieExtractor = /** @class */ (function () {
29290
    function HttpXsrfCookieExtractor(doc, platform, cookieName) {
29291
        this.doc = doc;
29292
        this.platform = platform;
29293
        this.cookieName = cookieName;
29294
        this.lastCookieString = '';
29295
        this.lastToken = null;
29296
        /**
29297
           * @internal for testing
29298
           */
29299
        this.parseCount = 0;
29300
    }
29301
    HttpXsrfCookieExtractor.prototype.getToken = function () {
29302
        if (this.platform === 'server') {
29303
            return null;
29304
        }
29305
        var cookieString = this.doc.cookie || '';
29306
        if (cookieString !== this.lastCookieString) {
29307
            this.parseCount++;
29308
            this.lastToken = Object(_angular_common__WEBPACK_IMPORTED_MODULE_4__["ɵparseCookieValue"])(cookieString, this.cookieName);
29309
            this.lastCookieString = cookieString;
29310
        }
29311
        return this.lastToken;
29312
    };
29313
    HttpXsrfCookieExtractor.decorators = [
29314
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }
29315
    ];
29316
    /** @nocollapse */
29317
    HttpXsrfCookieExtractor.ctorParameters = function () { return [
29318
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_4__["DOCUMENT"],] },] },
29319
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"],] },] },
29320
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [XSRF_COOKIE_NAME,] },] },
29321
    ]; };
29322
    return HttpXsrfCookieExtractor;
29323
}());
29324
/**
29325
 * `HttpInterceptor` which adds an XSRF token to eligible outgoing requests.
29326
 */
29327
var HttpXsrfInterceptor = /** @class */ (function () {
29328
    function HttpXsrfInterceptor(tokenService, headerName) {
29329
        this.tokenService = tokenService;
29330
        this.headerName = headerName;
29331
    }
29332
    HttpXsrfInterceptor.prototype.intercept = function (req, next) {
29333
        var lcUrl = req.url.toLowerCase();
29334
        // Skip both non-mutating requests and absolute URLs.
29335
        // Non-mutating requests don't require a token, and absolute URLs require special handling
29336
        // anyway as the cookie set
29337
        // on our origin is not the same as the token expected by another origin.
29338
        if (req.method === 'GET' || req.method === 'HEAD' || lcUrl.startsWith('http://') ||
29339
            lcUrl.startsWith('https://')) {
29340
            return next.handle(req);
29341
        }
29342
        var token = this.tokenService.getToken();
29343
        // Be careful not to overwrite an existing header of the same name.
29344
        if (token !== null && !req.headers.has(this.headerName)) {
29345
            req = req.clone({ headers: req.headers.set(this.headerName, token) });
29346
        }
29347
        return next.handle(req);
29348
    };
29349
    HttpXsrfInterceptor.decorators = [
29350
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }
29351
    ];
29352
    /** @nocollapse */
29353
    HttpXsrfInterceptor.ctorParameters = function () { return [
29354
        { type: HttpXsrfTokenExtractor, },
29355
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [XSRF_HEADER_NAME,] },] },
29356
    ]; };
29357
    return HttpXsrfInterceptor;
29358
}());
29359
 
29360
/**
29361
 * @license
29362
 * Copyright Google Inc. All Rights Reserved.
29363
 *
29364
 * Use of this source code is governed by an MIT-style license that can be
29365
 * found in the LICENSE file at https://angular.io/license
29366
 */
29367
/**
29368
 * An `HttpHandler` that applies a bunch of `HttpInterceptor`s
29369
 * to a request before passing it to the given `HttpBackend`.
29370
 *
29371
 * The interceptors are loaded lazily from the injector, to allow
29372
 * interceptors to themselves inject classes depending indirectly
29373
 * on `HttpInterceptingHandler` itself.
29374
 */
29375
var HttpInterceptingHandler = /** @class */ (function () {
29376
    function HttpInterceptingHandler(backend, injector) {
29377
        this.backend = backend;
29378
        this.injector = injector;
29379
        this.chain = null;
29380
    }
29381
    HttpInterceptingHandler.prototype.handle = function (req) {
29382
        if (this.chain === null) {
29383
            var interceptors = this.injector.get(HTTP_INTERCEPTORS, []);
29384
            this.chain = interceptors.reduceRight(function (next, interceptor) { return new HttpInterceptorHandler(next, interceptor); }, this.backend);
29385
        }
29386
        return this.chain.handle(req);
29387
    };
29388
    HttpInterceptingHandler.decorators = [
29389
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }
29390
    ];
29391
    /** @nocollapse */
29392
    HttpInterceptingHandler.ctorParameters = function () { return [
29393
        { type: HttpBackend, },
29394
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"], },
29395
    ]; };
29396
    return HttpInterceptingHandler;
29397
}());
29398
/**
29399
 * Constructs an `HttpHandler` that applies a bunch of `HttpInterceptor`s
29400
 * to a request before passing it to the given `HttpBackend`.
29401
 *
29402
 * Meant to be used as a factory function within `HttpClientModule`.
29403
 *
29404
 *
29405
 */
29406
function interceptingHandler(backend, interceptors) {
29407
    if (interceptors === void 0) { interceptors = []; }
29408
    if (!interceptors) {
29409
        return backend;
29410
    }
29411
    return interceptors.reduceRight(function (next, interceptor) { return new HttpInterceptorHandler(next, interceptor); }, backend);
29412
}
29413
/**
29414
 * Factory function that determines where to store JSONP callbacks.
29415
 *
29416
 * Ordinarily JSONP callbacks are stored on the `window` object, but this may not exist
29417
 * in test environments. In that case, callbacks are stored on an anonymous object instead.
29418
 *
29419
 *
29420
 */
29421
function jsonpCallbackContext() {
29422
    if (typeof window === 'object') {
29423
        return window;
29424
    }
29425
    return {};
29426
}
29427
/**
29428
 * `NgModule` which adds XSRF protection support to outgoing requests.
29429
 *
29430
 * Provided the server supports a cookie-based XSRF protection system, this
29431
 * module can be used directly to configure XSRF protection with the correct
29432
 * cookie and header names.
29433
 *
29434
 * If no such names are provided, the default is to use `X-XSRF-TOKEN` for
29435
 * the header name and `XSRF-TOKEN` for the cookie name.
29436
 *
29437
 *
29438
 */
29439
var HttpClientXsrfModule = /** @class */ (function () {
29440
    function HttpClientXsrfModule() {
29441
    }
29442
    /**
29443
     * Disable the default XSRF protection.
29444
     */
29445
    /**
29446
       * Disable the default XSRF protection.
29447
       */
29448
    HttpClientXsrfModule.disable = /**
29449
       * Disable the default XSRF protection.
29450
       */
29451
    function () {
29452
        return {
29453
            ngModule: HttpClientXsrfModule,
29454
            providers: [
29455
                { provide: HttpXsrfInterceptor, useClass: NoopInterceptor },
29456
            ],
29457
        };
29458
    };
29459
    /**
29460
     * Configure XSRF protection to use the given cookie name or header name,
29461
     * or the default names (as described above) if not provided.
29462
     */
29463
    /**
29464
       * Configure XSRF protection to use the given cookie name or header name,
29465
       * or the default names (as described above) if not provided.
29466
       */
29467
    HttpClientXsrfModule.withOptions = /**
29468
       * Configure XSRF protection to use the given cookie name or header name,
29469
       * or the default names (as described above) if not provided.
29470
       */
29471
    function (options) {
29472
        if (options === void 0) { options = {}; }
29473
        return {
29474
            ngModule: HttpClientXsrfModule,
29475
            providers: [
29476
                options.cookieName ? { provide: XSRF_COOKIE_NAME, useValue: options.cookieName } : [],
29477
                options.headerName ? { provide: XSRF_HEADER_NAME, useValue: options.headerName } : [],
29478
            ],
29479
        };
29480
    };
29481
    HttpClientXsrfModule.decorators = [
29482
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
29483
                    providers: [
29484
                        HttpXsrfInterceptor,
29485
                        { provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true },
29486
                        { provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor },
29487
                        { provide: XSRF_COOKIE_NAME, useValue: 'XSRF-TOKEN' },
29488
                        { provide: XSRF_HEADER_NAME, useValue: 'X-XSRF-TOKEN' },
29489
                    ],
29490
                },] }
29491
    ];
29492
    /** @nocollapse */
29493
    HttpClientXsrfModule.ctorParameters = function () { return []; };
29494
    return HttpClientXsrfModule;
29495
}());
29496
/**
29497
 * `NgModule` which provides the `HttpClient` and associated services.
29498
 *
29499
 * Interceptors can be added to the chain behind `HttpClient` by binding them
29500
 * to the multiprovider for `HTTP_INTERCEPTORS`.
29501
 *
29502
 *
29503
 */
29504
var HttpClientModule = /** @class */ (function () {
29505
    function HttpClientModule() {
29506
    }
29507
    HttpClientModule.decorators = [
29508
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
29509
                    imports: [
29510
                        HttpClientXsrfModule.withOptions({
29511
                            cookieName: 'XSRF-TOKEN',
29512
                            headerName: 'X-XSRF-TOKEN',
29513
                        }),
29514
                    ],
29515
                    providers: [
29516
                        HttpClient,
29517
                        { provide: HttpHandler, useClass: HttpInterceptingHandler },
29518
                        HttpXhrBackend,
29519
                        { provide: HttpBackend, useExisting: HttpXhrBackend },
29520
                        BrowserXhr,
29521
                        { provide: XhrFactory, useExisting: BrowserXhr },
29522
                    ],
29523
                },] }
29524
    ];
29525
    /** @nocollapse */
29526
    HttpClientModule.ctorParameters = function () { return []; };
29527
    return HttpClientModule;
29528
}());
29529
/**
29530
 * `NgModule` which enables JSONP support in `HttpClient`.
29531
 *
29532
 * Without this module, Jsonp requests will reach the backend
29533
 * with method JSONP, where they'll be rejected.
29534
 *
29535
 *
29536
 */
29537
var HttpClientJsonpModule = /** @class */ (function () {
29538
    function HttpClientJsonpModule() {
29539
    }
29540
    HttpClientJsonpModule.decorators = [
29541
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
29542
                    providers: [
29543
                        JsonpClientBackend,
29544
                        { provide: JsonpCallbackContext, useFactory: jsonpCallbackContext },
29545
                        { provide: HTTP_INTERCEPTORS, useClass: JsonpInterceptor, multi: true },
29546
                    ],
29547
                },] }
29548
    ];
29549
    /** @nocollapse */
29550
    HttpClientJsonpModule.ctorParameters = function () { return []; };
29551
    return HttpClientJsonpModule;
29552
}());
29553
 
29554
/**
29555
 * @license
29556
 * Copyright Google Inc. All Rights Reserved.
29557
 *
29558
 * Use of this source code is governed by an MIT-style license that can be
29559
 * found in the LICENSE file at https://angular.io/license
29560
 */
29561
 
29562
/**
29563
 * @license
29564
 * Copyright Google Inc. All Rights Reserved.
29565
 *
29566
 * Use of this source code is governed by an MIT-style license that can be
29567
 * found in the LICENSE file at https://angular.io/license
29568
 */
29569
 
29570
/**
29571
 * Generated bundle index. Do not edit.
29572
 */
29573
 
29574
 
29575
//# sourceMappingURL=http.js.map
29576
 
29577
 
29578
/***/ }),
29579
 
29580
/***/ "./node_modules/@angular/compiler/fesm5/compiler.js":
29581
/*!**********************************************************!*\
29582
  !*** ./node_modules/@angular/compiler/fesm5/compiler.js ***!
29583
  \**********************************************************/
29584
/*! exports provided: core, CompilerConfig, preserveWhitespacesDefault, isLoweredSymbol, createLoweredSymbol, Identifiers, JitCompiler, DirectiveResolver, PipeResolver, NgModuleResolver, DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig, NgModuleCompiler, AssertNotNull, BinaryOperator, BinaryOperatorExpr, BuiltinMethod, BuiltinVar, CastExpr, ClassField, ClassMethod, ClassStmt, CommaExpr, CommentStmt, ConditionalExpr, DeclareFunctionStmt, DeclareVarStmt, ExpressionStatement, ExternalExpr, ExternalReference, FunctionExpr, IfStmt, InstantiateExpr, InvokeFunctionExpr, InvokeMethodExpr, JSDocCommentStmt, LiteralArrayExpr, LiteralExpr, LiteralMapExpr, NotExpr, ReadKeyExpr, ReadPropExpr, ReadVarExpr, ReturnStatement, ThrowStmt, TryCatchStmt, WriteKeyExpr, WritePropExpr, WriteVarExpr, StmtModifier, Statement, collectExternalReferences, EmitterVisitorContext, ViewCompiler, getParseErrors, isSyntaxError, syntaxError, Version, VERSION, TextAst, BoundTextAst, AttrAst, BoundElementPropertyAst, BoundEventAst, ReferenceAst, VariableAst, ElementAst, EmbeddedTemplateAst, BoundDirectivePropertyAst, DirectiveAst, ProviderAst, ProviderAstType, NgContentAst, PropertyBindingType, NullTemplateVisitor, RecursiveTemplateAstVisitor, templateVisitAll, sanitizeIdentifier, identifierName, identifierModuleUrl, viewClassName, rendererTypeName, hostViewClassName, componentFactoryName, CompileSummaryKind, tokenName, tokenReference, CompileStylesheetMetadata, CompileTemplateMetadata, CompileDirectiveMetadata, CompilePipeMetadata, CompileShallowModuleMetadata, CompileNgModuleMetadata, TransitiveCompileNgModuleMetadata, ProviderMeta, flatten, templateSourceUrl, sharedStylesheetJitUrl, ngModuleJitUrl, templateJitUrl, createAotUrlResolver, createAotCompiler, AotCompiler, analyzeNgModules, analyzeAndValidateNgModules, analyzeFile, analyzeFileForInjectables, mergeAnalyzedFiles, GeneratedFile, toTypeScript, formattedError, isFormattedError, StaticReflector, StaticSymbol, StaticSymbolCache, ResolvedStaticSymbol, StaticSymbolResolver, unescapeIdentifier, unwrapResolvedMetadata, AotSummaryResolver, AstPath, SummaryResolver, JitSummaryResolver, CompileReflector, createUrlResolverWithoutPackagePrefix, createOfflineCompileUrlResolver, UrlResolver, getUrlScheme, ResourceLoader, ElementSchemaRegistry, Extractor, I18NHtmlParser, MessageBundle, Serializer, Xliff, Xliff2, Xmb, Xtb, DirectiveNormalizer, ParserError, ParseSpan, AST, Quote, EmptyExpr, ImplicitReceiver, Chain, Conditional, PropertyRead, PropertyWrite, SafePropertyRead, KeyedRead, KeyedWrite, BindingPipe, LiteralPrimitive, LiteralArray, LiteralMap, Interpolation, Binary, PrefixNot, NonNullAssert, MethodCall, SafeMethodCall, FunctionCall, ASTWithSource, TemplateBinding, NullAstVisitor, RecursiveAstVisitor, AstTransformer, AstMemoryEfficientTransformer, visitAstChildren, TokenType, Lexer, Token, EOF, isIdentifier, isQuote, SplitInterpolation, TemplateBindingParseResult, Parser, _ParseAST, ERROR_COMPONENT_TYPE, CompileMetadataResolver, Text, Expansion, ExpansionCase, Attribute, Element, Comment, visitAll, RecursiveVisitor, findNode, HtmlParser, ParseTreeResult, TreeError, HtmlTagDefinition, getHtmlTagDefinition, TagContentType, splitNsName, isNgContainer, isNgContent, isNgTemplate, getNsPrefix, mergeNsAndName, NAMED_ENTITIES, NGSP_UNICODE, debugOutputAstAsTypeScript, TypeScriptEmitter, ParseLocation, ParseSourceFile, ParseSourceSpan, ParseErrorLevel, ParseError, typeSourceSpan, DomElementSchemaRegistry, CssSelector, SelectorMatcher, SelectorListContext, SelectorContext, StylesCompileDependency, CompiledStylesheet, StyleCompiler, TemplateParseError, TemplateParseResult, TemplateParser, splitClasses, createElementCssSelector, removeSummaryDuplicates */
29585
/***/ (function(module, __webpack_exports__, __webpack_require__) {
29586
 
29587
"use strict";
29588
__webpack_require__.r(__webpack_exports__);
29589
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "core", function() { return core; });
29590
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompilerConfig", function() { return CompilerConfig; });
29591
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "preserveWhitespacesDefault", function() { return preserveWhitespacesDefault; });
29592
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isLoweredSymbol", function() { return isLoweredSymbol; });
29593
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createLoweredSymbol", function() { return createLoweredSymbol; });
29594
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Identifiers", function() { return Identifiers; });
29595
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JitCompiler", function() { return JitCompiler; });
29596
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DirectiveResolver", function() { return DirectiveResolver; });
29597
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PipeResolver", function() { return PipeResolver; });
29598
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgModuleResolver", function() { return NgModuleResolver; });
29599
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_INTERPOLATION_CONFIG", function() { return DEFAULT_INTERPOLATION_CONFIG; });
29600
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InterpolationConfig", function() { return InterpolationConfig; });
29601
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgModuleCompiler", function() { return NgModuleCompiler; });
29602
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AssertNotNull", function() { return AssertNotNull; });
29603
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BinaryOperator", function() { return BinaryOperator; });
29604
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BinaryOperatorExpr", function() { return BinaryOperatorExpr; });
29605
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BuiltinMethod", function() { return BuiltinMethod; });
29606
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BuiltinVar", function() { return BuiltinVar; });
29607
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CastExpr", function() { return CastExpr; });
29608
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClassField", function() { return ClassField; });
29609
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClassMethod", function() { return ClassMethod; });
29610
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClassStmt", function() { return ClassStmt; });
29611
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CommaExpr", function() { return CommaExpr; });
29612
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CommentStmt", function() { return CommentStmt; });
29613
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConditionalExpr", function() { return ConditionalExpr; });
29614
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeclareFunctionStmt", function() { return DeclareFunctionStmt; });
29615
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeclareVarStmt", function() { return DeclareVarStmt; });
29616
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpressionStatement", function() { return ExpressionStatement; });
29617
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExternalExpr", function() { return ExternalExpr; });
29618
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExternalReference", function() { return ExternalReference; });
29619
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FunctionExpr", function() { return FunctionExpr; });
29620
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IfStmt", function() { return IfStmt; });
29621
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InstantiateExpr", function() { return InstantiateExpr; });
29622
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InvokeFunctionExpr", function() { return InvokeFunctionExpr; });
29623
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InvokeMethodExpr", function() { return InvokeMethodExpr; });
29624
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JSDocCommentStmt", function() { return JSDocCommentStmt; });
29625
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LiteralArrayExpr", function() { return LiteralArrayExpr; });
29626
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LiteralExpr", function() { return LiteralExpr; });
29627
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LiteralMapExpr", function() { return LiteralMapExpr; });
29628
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NotExpr", function() { return NotExpr; });
29629
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReadKeyExpr", function() { return ReadKeyExpr; });
29630
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReadPropExpr", function() { return ReadPropExpr; });
29631
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReadVarExpr", function() { return ReadVarExpr; });
29632
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReturnStatement", function() { return ReturnStatement; });
29633
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ThrowStmt", function() { return ThrowStmt; });
29634
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TryCatchStmt", function() { return TryCatchStmt; });
29635
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WriteKeyExpr", function() { return WriteKeyExpr; });
29636
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WritePropExpr", function() { return WritePropExpr; });
29637
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WriteVarExpr", function() { return WriteVarExpr; });
29638
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StmtModifier", function() { return StmtModifier; });
29639
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Statement", function() { return Statement; });
29640
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "collectExternalReferences", function() { return collectExternalReferences; });
29641
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmitterVisitorContext", function() { return EmitterVisitorContext; });
29642
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewCompiler", function() { return ViewCompiler; });
29643
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getParseErrors", function() { return getParseErrors; });
29644
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSyntaxError", function() { return isSyntaxError; });
29645
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "syntaxError", function() { return syntaxError; });
29646
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Version", function() { return Version; });
29647
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; });
29648
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextAst", function() { return TextAst; });
29649
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BoundTextAst", function() { return BoundTextAst; });
29650
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AttrAst", function() { return AttrAst; });
29651
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BoundElementPropertyAst", function() { return BoundElementPropertyAst; });
29652
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BoundEventAst", function() { return BoundEventAst; });
29653
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReferenceAst", function() { return ReferenceAst; });
29654
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VariableAst", function() { return VariableAst; });
29655
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ElementAst", function() { return ElementAst; });
29656
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmbeddedTemplateAst", function() { return EmbeddedTemplateAst; });
29657
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BoundDirectivePropertyAst", function() { return BoundDirectivePropertyAst; });
29658
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DirectiveAst", function() { return DirectiveAst; });
29659
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProviderAst", function() { return ProviderAst; });
29660
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProviderAstType", function() { return ProviderAstType; });
29661
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgContentAst", function() { return NgContentAst; });
29662
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PropertyBindingType", function() { return PropertyBindingType; });
29663
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NullTemplateVisitor", function() { return NullTemplateVisitor; });
29664
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RecursiveTemplateAstVisitor", function() { return RecursiveTemplateAstVisitor; });
29665
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateVisitAll", function() { return templateVisitAll; });
29666
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sanitizeIdentifier", function() { return sanitizeIdentifier; });
29667
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identifierName", function() { return identifierName; });
29668
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identifierModuleUrl", function() { return identifierModuleUrl; });
29669
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "viewClassName", function() { return viewClassName; });
29670
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rendererTypeName", function() { return rendererTypeName; });
29671
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hostViewClassName", function() { return hostViewClassName; });
29672
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "componentFactoryName", function() { return componentFactoryName; });
29673
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompileSummaryKind", function() { return CompileSummaryKind; });
29674
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tokenName", function() { return tokenName; });
29675
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tokenReference", function() { return tokenReference; });
29676
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompileStylesheetMetadata", function() { return CompileStylesheetMetadata; });
29677
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompileTemplateMetadata", function() { return CompileTemplateMetadata; });
29678
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompileDirectiveMetadata", function() { return CompileDirectiveMetadata; });
29679
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompilePipeMetadata", function() { return CompilePipeMetadata; });
29680
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompileShallowModuleMetadata", function() { return CompileShallowModuleMetadata; });
29681
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompileNgModuleMetadata", function() { return CompileNgModuleMetadata; });
29682
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TransitiveCompileNgModuleMetadata", function() { return TransitiveCompileNgModuleMetadata; });
29683
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProviderMeta", function() { return ProviderMeta; });
29684
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "flatten", function() { return flatten; });
29685
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateSourceUrl", function() { return templateSourceUrl; });
29686
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sharedStylesheetJitUrl", function() { return sharedStylesheetJitUrl; });
29687
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ngModuleJitUrl", function() { return ngModuleJitUrl; });
29688
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateJitUrl", function() { return templateJitUrl; });
29689
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createAotUrlResolver", function() { return createAotUrlResolver; });
29690
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createAotCompiler", function() { return createAotCompiler; });
29691
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AotCompiler", function() { return AotCompiler; });
29692
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "analyzeNgModules", function() { return analyzeNgModules; });
29693
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "analyzeAndValidateNgModules", function() { return analyzeAndValidateNgModules; });
29694
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "analyzeFile", function() { return analyzeFile; });
29695
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "analyzeFileForInjectables", function() { return analyzeFileForInjectables; });
29696
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeAnalyzedFiles", function() { return mergeAnalyzedFiles; });
29697
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GeneratedFile", function() { return GeneratedFile; });
29698
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toTypeScript", function() { return toTypeScript; });
29699
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formattedError", function() { return formattedError; });
29700
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFormattedError", function() { return isFormattedError; });
29701
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StaticReflector", function() { return StaticReflector; });
29702
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StaticSymbol", function() { return StaticSymbol; });
29703
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StaticSymbolCache", function() { return StaticSymbolCache; });
29704
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResolvedStaticSymbol", function() { return ResolvedStaticSymbol; });
29705
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StaticSymbolResolver", function() { return StaticSymbolResolver; });
29706
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unescapeIdentifier", function() { return unescapeIdentifier; });
29707
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unwrapResolvedMetadata", function() { return unwrapResolvedMetadata; });
29708
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AotSummaryResolver", function() { return AotSummaryResolver; });
29709
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AstPath", function() { return AstPath; });
29710
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SummaryResolver", function() { return SummaryResolver; });
29711
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JitSummaryResolver", function() { return JitSummaryResolver; });
29712
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompileReflector", function() { return CompileReflector; });
29713
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createUrlResolverWithoutPackagePrefix", function() { return createUrlResolverWithoutPackagePrefix; });
29714
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createOfflineCompileUrlResolver", function() { return createOfflineCompileUrlResolver; });
29715
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UrlResolver", function() { return UrlResolver; });
29716
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getUrlScheme", function() { return getUrlScheme; });
29717
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResourceLoader", function() { return ResourceLoader; });
29718
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ElementSchemaRegistry", function() { return ElementSchemaRegistry; });
29719
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Extractor", function() { return Extractor; });
29720
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I18NHtmlParser", function() { return I18NHtmlParser; });
29721
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MessageBundle", function() { return MessageBundle; });
29722
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Serializer", function() { return Serializer; });
29723
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Xliff", function() { return Xliff; });
29724
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Xliff2", function() { return Xliff2; });
29725
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Xmb", function() { return Xmb; });
29726
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Xtb", function() { return Xtb; });
29727
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DirectiveNormalizer", function() { return DirectiveNormalizer; });
29728
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParserError", function() { return ParserError; });
29729
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParseSpan", function() { return ParseSpan; });
29730
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AST", function() { return AST; });
29731
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Quote", function() { return Quote; });
29732
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmptyExpr", function() { return EmptyExpr; });
29733
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ImplicitReceiver", function() { return ImplicitReceiver; });
29734
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Chain", function() { return Chain; });
29735
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Conditional", function() { return Conditional; });
29736
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PropertyRead", function() { return PropertyRead; });
29737
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PropertyWrite", function() { return PropertyWrite; });
29738
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SafePropertyRead", function() { return SafePropertyRead; });
29739
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeyedRead", function() { return KeyedRead; });
29740
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeyedWrite", function() { return KeyedWrite; });
29741
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BindingPipe", function() { return BindingPipe; });
29742
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LiteralPrimitive", function() { return LiteralPrimitive; });
29743
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LiteralArray", function() { return LiteralArray; });
29744
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LiteralMap", function() { return LiteralMap; });
29745
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Interpolation", function() { return Interpolation; });
29746
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Binary", function() { return Binary; });
29747
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PrefixNot", function() { return PrefixNot; });
29748
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NonNullAssert", function() { return NonNullAssert; });
29749
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MethodCall", function() { return MethodCall; });
29750
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SafeMethodCall", function() { return SafeMethodCall; });
29751
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FunctionCall", function() { return FunctionCall; });
29752
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ASTWithSource", function() { return ASTWithSource; });
29753
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TemplateBinding", function() { return TemplateBinding; });
29754
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NullAstVisitor", function() { return NullAstVisitor; });
29755
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RecursiveAstVisitor", function() { return RecursiveAstVisitor; });
29756
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AstTransformer", function() { return AstTransformer; });
29757
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AstMemoryEfficientTransformer", function() { return AstMemoryEfficientTransformer; });
29758
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "visitAstChildren", function() { return visitAstChildren; });
29759
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TokenType", function() { return TokenType; });
29760
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Lexer", function() { return Lexer; });
29761
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Token", function() { return Token; });
29762
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EOF", function() { return EOF; });
29763
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isIdentifier", function() { return isIdentifier; });
29764
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isQuote", function() { return isQuote; });
29765
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SplitInterpolation", function() { return SplitInterpolation; });
29766
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TemplateBindingParseResult", function() { return TemplateBindingParseResult; });
29767
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Parser", function() { return Parser; });
29768
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_ParseAST", function() { return _ParseAST; });
29769
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ERROR_COMPONENT_TYPE", function() { return ERROR_COMPONENT_TYPE; });
29770
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompileMetadataResolver", function() { return CompileMetadataResolver; });
29771
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Text", function() { return Text; });
29772
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Expansion", function() { return Expansion; });
29773
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpansionCase", function() { return ExpansionCase; });
29774
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Attribute", function() { return Attribute; });
29775
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Element", function() { return Element; });
29776
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Comment", function() { return Comment; });
29777
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "visitAll", function() { return visitAll; });
29778
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RecursiveVisitor", function() { return RecursiveVisitor; });
29779
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findNode", function() { return findNode; });
29780
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HtmlParser", function() { return HtmlParser; });
29781
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParseTreeResult", function() { return ParseTreeResult; });
29782
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TreeError", function() { return TreeError; });
29783
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HtmlTagDefinition", function() { return HtmlTagDefinition; });
29784
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getHtmlTagDefinition", function() { return getHtmlTagDefinition; });
29785
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TagContentType", function() { return TagContentType; });
29786
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "splitNsName", function() { return splitNsName; });
29787
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNgContainer", function() { return isNgContainer; });
29788
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNgContent", function() { return isNgContent; });
29789
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNgTemplate", function() { return isNgTemplate; });
29790
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNsPrefix", function() { return getNsPrefix; });
29791
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeNsAndName", function() { return mergeNsAndName; });
29792
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NAMED_ENTITIES", function() { return NAMED_ENTITIES; });
29793
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NGSP_UNICODE", function() { return NGSP_UNICODE; });
29794
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debugOutputAstAsTypeScript", function() { return debugOutputAstAsTypeScript; });
29795
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TypeScriptEmitter", function() { return TypeScriptEmitter; });
29796
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParseLocation", function() { return ParseLocation; });
29797
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParseSourceFile", function() { return ParseSourceFile; });
29798
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParseSourceSpan", function() { return ParseSourceSpan; });
29799
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParseErrorLevel", function() { return ParseErrorLevel; });
29800
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParseError", function() { return ParseError; });
29801
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "typeSourceSpan", function() { return typeSourceSpan; });
29802
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DomElementSchemaRegistry", function() { return DomElementSchemaRegistry; });
29803
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CssSelector", function() { return CssSelector; });
29804
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectorMatcher", function() { return SelectorMatcher; });
29805
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectorListContext", function() { return SelectorListContext; });
29806
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectorContext", function() { return SelectorContext; });
29807
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StylesCompileDependency", function() { return StylesCompileDependency; });
29808
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompiledStylesheet", function() { return CompiledStylesheet; });
29809
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StyleCompiler", function() { return StyleCompiler; });
29810
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TemplateParseError", function() { return TemplateParseError; });
29811
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TemplateParseResult", function() { return TemplateParseResult; });
29812
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TemplateParser", function() { return TemplateParser; });
29813
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "splitClasses", function() { return splitClasses; });
29814
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createElementCssSelector", function() { return createElementCssSelector; });
29815
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeSummaryDuplicates", function() { return removeSummaryDuplicates; });
29816
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
29817
/**
29818
 * @license Angular v6.0.3
29819
 * (c) 2010-2018 Google, Inc. https://angular.io/
29820
 * License: MIT
29821
 */
29822
 
29823
 
29824
 
29825
/**
29826
 * @license
29827
 * Copyright Google Inc. All Rights Reserved.
29828
 *
29829
 * Use of this source code is governed by an MIT-style license that can be
29830
 * found in the LICENSE file at https://angular.io/license
29831
 */
29832
var createInject = makeMetadataFactory('Inject', function (token) { return ({ token: token }); });
29833
var createInjectionToken = makeMetadataFactory('InjectionToken', function (desc) { return ({ _desc: desc, ngInjectableDef: undefined }); });
29834
var createAttribute = makeMetadataFactory('Attribute', function (attributeName) { return ({ attributeName: attributeName }); });
29835
var createContentChildren = makeMetadataFactory('ContentChildren', function (selector, data) {
29836
    if (data === void 0) { data = {}; }
29837
    return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ selector: selector, first: false, isViewQuery: false, descendants: false }, data));
29838
});
29839
var createContentChild = makeMetadataFactory('ContentChild', function (selector, data) {
29840
    if (data === void 0) { data = {}; }
29841
    return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ selector: selector, first: true, isViewQuery: false, descendants: true }, data));
29842
});
29843
var createViewChildren = makeMetadataFactory('ViewChildren', function (selector, data) {
29844
    if (data === void 0) { data = {}; }
29845
    return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ selector: selector, first: false, isViewQuery: true, descendants: true }, data));
29846
});
29847
var createViewChild = makeMetadataFactory('ViewChild', function (selector, data) {
29848
    return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ selector: selector, first: true, isViewQuery: true, descendants: true }, data));
29849
});
29850
var createDirective = makeMetadataFactory('Directive', function (dir) {
29851
    if (dir === void 0) { dir = {}; }
29852
    return dir;
29853
});
29854
var ViewEncapsulation;
29855
(function (ViewEncapsulation) {
29856
    ViewEncapsulation[ViewEncapsulation["Emulated"] = 0] = "Emulated";
29857
    ViewEncapsulation[ViewEncapsulation["Native"] = 1] = "Native";
29858
    ViewEncapsulation[ViewEncapsulation["None"] = 2] = "None";
29859
})(ViewEncapsulation || (ViewEncapsulation = {}));
29860
var ChangeDetectionStrategy;
29861
(function (ChangeDetectionStrategy) {
29862
    ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"] = 0] = "OnPush";
29863
    ChangeDetectionStrategy[ChangeDetectionStrategy["Default"] = 1] = "Default";
29864
})(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));
29865
var createComponent = makeMetadataFactory('Component', function (c) {
29866
    if (c === void 0) { c = {}; }
29867
    return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ changeDetection: ChangeDetectionStrategy.Default }, c));
29868
});
29869
var createPipe = makeMetadataFactory('Pipe', function (p) { return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ pure: true }, p)); });
29870
var createInput = makeMetadataFactory('Input', function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); });
29871
var createOutput = makeMetadataFactory('Output', function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); });
29872
var createHostBinding = makeMetadataFactory('HostBinding', function (hostPropertyName) { return ({ hostPropertyName: hostPropertyName }); });
29873
var createHostListener = makeMetadataFactory('HostListener', function (eventName, args) { return ({ eventName: eventName, args: args }); });
29874
var createNgModule = makeMetadataFactory('NgModule', function (ngModule) { return ngModule; });
29875
var createInjectable = makeMetadataFactory('Injectable', function (injectable) {
29876
    if (injectable === void 0) { injectable = {}; }
29877
    return injectable;
29878
});
29879
var CUSTOM_ELEMENTS_SCHEMA = {
29880
    name: 'custom-elements'
29881
};
29882
var NO_ERRORS_SCHEMA = {
29883
    name: 'no-errors-schema'
29884
};
29885
var createOptional = makeMetadataFactory('Optional');
29886
var createSelf = makeMetadataFactory('Self');
29887
var createSkipSelf = makeMetadataFactory('SkipSelf');
29888
var createHost = makeMetadataFactory('Host');
29889
var Type = Function;
29890
var SecurityContext;
29891
(function (SecurityContext) {
29892
    SecurityContext[SecurityContext["NONE"] = 0] = "NONE";
29893
    SecurityContext[SecurityContext["HTML"] = 1] = "HTML";
29894
    SecurityContext[SecurityContext["STYLE"] = 2] = "STYLE";
29895
    SecurityContext[SecurityContext["SCRIPT"] = 3] = "SCRIPT";
29896
    SecurityContext[SecurityContext["URL"] = 4] = "URL";
29897
    SecurityContext[SecurityContext["RESOURCE_URL"] = 5] = "RESOURCE_URL";
29898
})(SecurityContext || (SecurityContext = {}));
29899
var MissingTranslationStrategy;
29900
(function (MissingTranslationStrategy) {
29901
    MissingTranslationStrategy[MissingTranslationStrategy["Error"] = 0] = "Error";
29902
    MissingTranslationStrategy[MissingTranslationStrategy["Warning"] = 1] = "Warning";
29903
    MissingTranslationStrategy[MissingTranslationStrategy["Ignore"] = 2] = "Ignore";
29904
})(MissingTranslationStrategy || (MissingTranslationStrategy = {}));
29905
function makeMetadataFactory(name, props) {
29906
    var factory = function () {
29907
        var args = [];
29908
        for (var _i = 0; _i < arguments.length; _i++) {
29909
            args[_i] = arguments[_i];
29910
        }
29911
        var values = props ? props.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(args)) : {};
29912
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ ngMetadataName: name }, values);
29913
    };
29914
    factory.isTypeOf = function (obj) { return obj && obj.ngMetadataName === name; };
29915
    factory.ngMetadataName = name;
29916
    return factory;
29917
}
29918
 
29919
 
29920
var core = Object.freeze({
29921
	createInject: createInject,
29922
	createInjectionToken: createInjectionToken,
29923
	createAttribute: createAttribute,
29924
	createContentChildren: createContentChildren,
29925
	createContentChild: createContentChild,
29926
	createViewChildren: createViewChildren,
29927
	createViewChild: createViewChild,
29928
	createDirective: createDirective,
29929
	get ViewEncapsulation () { return ViewEncapsulation; },
29930
	get ChangeDetectionStrategy () { return ChangeDetectionStrategy; },
29931
	createComponent: createComponent,
29932
	createPipe: createPipe,
29933
	createInput: createInput,
29934
	createOutput: createOutput,
29935
	createHostBinding: createHostBinding,
29936
	createHostListener: createHostListener,
29937
	createNgModule: createNgModule,
29938
	createInjectable: createInjectable,
29939
	CUSTOM_ELEMENTS_SCHEMA: CUSTOM_ELEMENTS_SCHEMA,
29940
	NO_ERRORS_SCHEMA: NO_ERRORS_SCHEMA,
29941
	createOptional: createOptional,
29942
	createSelf: createSelf,
29943
	createSkipSelf: createSkipSelf,
29944
	createHost: createHost,
29945
	Type: Type,
29946
	get SecurityContext () { return SecurityContext; },
29947
	get MissingTranslationStrategy () { return MissingTranslationStrategy; }
29948
});
29949
 
29950
/**
29951
 * @license
29952
 * Copyright Google Inc. All Rights Reserved.
29953
 *
29954
 * Use of this source code is governed by an MIT-style license that can be
29955
 * found in the LICENSE file at https://angular.io/license
29956
 */
29957
var DASH_CASE_REGEXP = /-+([a-z0-9])/g;
29958
function dashCaseToCamelCase(input) {
29959
    return input.replace(DASH_CASE_REGEXP, function () {
29960
        var m = [];
29961
        for (var _i = 0; _i < arguments.length; _i++) {
29962
            m[_i] = arguments[_i];
29963
        }
29964
        return m[1].toUpperCase();
29965
    });
29966
}
29967
function splitAtColon(input, defaultValues) {
29968
    return _splitAt(input, ':', defaultValues);
29969
}
29970
function splitAtPeriod(input, defaultValues) {
29971
    return _splitAt(input, '.', defaultValues);
29972
}
29973
function _splitAt(input, character, defaultValues) {
29974
    var characterIndex = input.indexOf(character);
29975
    if (characterIndex == -1)
29976
        return defaultValues;
29977
    return [input.slice(0, characterIndex).trim(), input.slice(characterIndex + 1).trim()];
29978
}
29979
function visitValue(value, visitor, context) {
29980
    if (Array.isArray(value)) {
29981
        return visitor.visitArray(value, context);
29982
    }
29983
    if (isStrictStringMap(value)) {
29984
        return visitor.visitStringMap(value, context);
29985
    }
29986
    if (value == null || typeof value == 'string' || typeof value == 'number' ||
29987
        typeof value == 'boolean') {
29988
        return visitor.visitPrimitive(value, context);
29989
    }
29990
    return visitor.visitOther(value, context);
29991
}
29992
function isDefined(val) {
29993
    return val !== null && val !== undefined;
29994
}
29995
function noUndefined(val) {
29996
    return val === undefined ? null : val;
29997
}
29998
var ValueTransformer = /** @class */ (function () {
29999
    function ValueTransformer() {
30000
    }
30001
    ValueTransformer.prototype.visitArray = function (arr, context) {
30002
        var _this = this;
30003
        return arr.map(function (value) { return visitValue(value, _this, context); });
30004
    };
30005
    ValueTransformer.prototype.visitStringMap = function (map, context) {
30006
        var _this = this;
30007
        var result = {};
30008
        Object.keys(map).forEach(function (key) { result[key] = visitValue(map[key], _this, context); });
30009
        return result;
30010
    };
30011
    ValueTransformer.prototype.visitPrimitive = function (value, context) { return value; };
30012
    ValueTransformer.prototype.visitOther = function (value, context) { return value; };
30013
    return ValueTransformer;
30014
}());
30015
var SyncAsync = {
30016
    assertSync: function (value) {
30017
        if (isPromise(value)) {
30018
            throw new Error("Illegal state: value cannot be a promise");
30019
        }
30020
        return value;
30021
    },
30022
    then: function (value, cb) { return isPromise(value) ? value.then(cb) : cb(value); },
30023
    all: function (syncAsyncValues) {
30024
        return syncAsyncValues.some(isPromise) ? Promise.all(syncAsyncValues) : syncAsyncValues;
30025
    }
30026
};
30027
function error(msg) {
30028
    throw new Error("Internal Error: " + msg);
30029
}
30030
function syntaxError(msg, parseErrors) {
30031
    var error = Error(msg);
30032
    error[ERROR_SYNTAX_ERROR] = true;
30033
    if (parseErrors)
30034
        error[ERROR_PARSE_ERRORS] = parseErrors;
30035
    return error;
30036
}
30037
var ERROR_SYNTAX_ERROR = 'ngSyntaxError';
30038
var ERROR_PARSE_ERRORS = 'ngParseErrors';
30039
function isSyntaxError(error) {
30040
    return error[ERROR_SYNTAX_ERROR];
30041
}
30042
function getParseErrors(error) {
30043
    return error[ERROR_PARSE_ERRORS] || [];
30044
}
30045
// Escape characters that have a special meaning in Regular Expressions
30046
function escapeRegExp(s) {
30047
    return s.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
30048
}
30049
var STRING_MAP_PROTO = Object.getPrototypeOf({});
30050
function isStrictStringMap(obj) {
30051
    return typeof obj === 'object' && obj !== null && Object.getPrototypeOf(obj) === STRING_MAP_PROTO;
30052
}
30053
function utf8Encode(str) {
30054
    var encoded = '';
30055
    for (var index = 0; index < str.length; index++) {
30056
        var codePoint = str.charCodeAt(index);
30057
        // decode surrogate
30058
        // see https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
30059
        if (codePoint >= 0xd800 && codePoint <= 0xdbff && str.length > (index + 1)) {
30060
            var low = str.charCodeAt(index + 1);
30061
            if (low >= 0xdc00 && low <= 0xdfff) {
30062
                index++;
30063
                codePoint = ((codePoint - 0xd800) << 10) + low - 0xdc00 + 0x10000;
30064
            }
30065
        }
30066
        if (codePoint <= 0x7f) {
30067
            encoded += String.fromCharCode(codePoint);
30068
        }
30069
        else if (codePoint <= 0x7ff) {
30070
            encoded += String.fromCharCode(((codePoint >> 6) & 0x1F) | 0xc0, (codePoint & 0x3f) | 0x80);
30071
        }
30072
        else if (codePoint <= 0xffff) {
30073
            encoded += String.fromCharCode((codePoint >> 12) | 0xe0, ((codePoint >> 6) & 0x3f) | 0x80, (codePoint & 0x3f) | 0x80);
30074
        }
30075
        else if (codePoint <= 0x1fffff) {
30076
            encoded += String.fromCharCode(((codePoint >> 18) & 0x07) | 0xf0, ((codePoint >> 12) & 0x3f) | 0x80, ((codePoint >> 6) & 0x3f) | 0x80, (codePoint & 0x3f) | 0x80);
30077
        }
30078
    }
30079
    return encoded;
30080
}
30081
function stringify(token) {
30082
    if (typeof token === 'string') {
30083
        return token;
30084
    }
30085
    if (token instanceof Array) {
30086
        return '[' + token.map(stringify).join(', ') + ']';
30087
    }
30088
    if (token == null) {
30089
        return '' + token;
30090
    }
30091
    if (token.overriddenName) {
30092
        return "" + token.overriddenName;
30093
    }
30094
    if (token.name) {
30095
        return "" + token.name;
30096
    }
30097
    // WARNING: do not try to `JSON.stringify(token)` here
30098
    // see https://github.com/angular/angular/issues/23440
30099
    var res = token.toString();
30100
    if (res == null) {
30101
        return '' + res;
30102
    }
30103
    var newLineIndex = res.indexOf('\n');
30104
    return newLineIndex === -1 ? res : res.substring(0, newLineIndex);
30105
}
30106
/**
30107
 * Lazily retrieves the reference value from a forwardRef.
30108
 */
30109
function resolveForwardRef(type) {
30110
    if (typeof type === 'function' && type.hasOwnProperty('__forward_ref__')) {
30111
        return type();
30112
    }
30113
    else {
30114
        return type;
30115
    }
30116
}
30117
/**
30118
 * Determine if the argument is shaped like a Promise
30119
 */
30120
function isPromise(obj) {
30121
    // allow any Promise/A+ compliant thenable.
30122
    // It's up to the caller to ensure that obj.then conforms to the spec
30123
    return !!obj && typeof obj.then === 'function';
30124
}
30125
var Version = /** @class */ (function () {
30126
    function Version(full) {
30127
        this.full = full;
30128
        var splits = full.split('.');
30129
        this.major = splits[0];
30130
        this.minor = splits[1];
30131
        this.patch = splits.slice(2).join('.');
30132
    }
30133
    return Version;
30134
}());
30135
 
30136
/**
30137
 * @license
30138
 * Copyright Google Inc. All Rights Reserved.
30139
 *
30140
 * Use of this source code is governed by an MIT-style license that can be
30141
 * found in the LICENSE file at https://angular.io/license
30142
 */
30143
/**
30144
 * @module
30145
 * @description
30146
 * Entry point for all public APIs of the common package.
30147
 */
30148
var VERSION = new Version('6.0.3');
30149
 
30150
/**
30151
 * @license
30152
 * Copyright Google Inc. All Rights Reserved.
30153
 *
30154
 * Use of this source code is governed by an MIT-style license that can be
30155
 * found in the LICENSE file at https://angular.io/license
30156
 */
30157
/**
30158
 * A segment of text within the template.
30159
 */
30160
var TextAst = /** @class */ (function () {
30161
    function TextAst(value, ngContentIndex, sourceSpan) {
30162
        this.value = value;
30163
        this.ngContentIndex = ngContentIndex;
30164
        this.sourceSpan = sourceSpan;
30165
    }
30166
    TextAst.prototype.visit = function (visitor, context) { return visitor.visitText(this, context); };
30167
    return TextAst;
30168
}());
30169
/**
30170
 * A bound expression within the text of a template.
30171
 */
30172
var BoundTextAst = /** @class */ (function () {
30173
    function BoundTextAst(value, ngContentIndex, sourceSpan) {
30174
        this.value = value;
30175
        this.ngContentIndex = ngContentIndex;
30176
        this.sourceSpan = sourceSpan;
30177
    }
30178
    BoundTextAst.prototype.visit = function (visitor, context) {
30179
        return visitor.visitBoundText(this, context);
30180
    };
30181
    return BoundTextAst;
30182
}());
30183
/**
30184
 * A plain attribute on an element.
30185
 */
30186
var AttrAst = /** @class */ (function () {
30187
    function AttrAst(name, value, sourceSpan) {
30188
        this.name = name;
30189
        this.value = value;
30190
        this.sourceSpan = sourceSpan;
30191
    }
30192
    AttrAst.prototype.visit = function (visitor, context) { return visitor.visitAttr(this, context); };
30193
    return AttrAst;
30194
}());
30195
/**
30196
 * A binding for an element property (e.g. `[property]="expression"`) or an animation trigger (e.g.
30197
 * `[@trigger]="stateExp"`)
30198
 */
30199
var BoundElementPropertyAst = /** @class */ (function () {
30200
    function BoundElementPropertyAst(name, type, securityContext, value, unit, sourceSpan) {
30201
        this.name = name;
30202
        this.type = type;
30203
        this.securityContext = securityContext;
30204
        this.value = value;
30205
        this.unit = unit;
30206
        this.sourceSpan = sourceSpan;
30207
        this.isAnimation = this.type === PropertyBindingType.Animation;
30208
    }
30209
    BoundElementPropertyAst.prototype.visit = function (visitor, context) {
30210
        return visitor.visitElementProperty(this, context);
30211
    };
30212
    return BoundElementPropertyAst;
30213
}());
30214
/**
30215
 * A binding for an element event (e.g. `(event)="handler()"`) or an animation trigger event (e.g.
30216
 * `(@trigger.phase)="callback($event)"`).
30217
 */
30218
var BoundEventAst = /** @class */ (function () {
30219
    function BoundEventAst(name, target, phase, handler, sourceSpan) {
30220
        this.name = name;
30221
        this.target = target;
30222
        this.phase = phase;
30223
        this.handler = handler;
30224
        this.sourceSpan = sourceSpan;
30225
        this.fullName = BoundEventAst.calcFullName(this.name, this.target, this.phase);
30226
        this.isAnimation = !!this.phase;
30227
    }
30228
    BoundEventAst.calcFullName = function (name, target, phase) {
30229
        if (target) {
30230
            return target + ":" + name;
30231
        }
30232
        else if (phase) {
30233
            return "@" + name + "." + phase;
30234
        }
30235
        else {
30236
            return name;
30237
        }
30238
    };
30239
    BoundEventAst.prototype.visit = function (visitor, context) {
30240
        return visitor.visitEvent(this, context);
30241
    };
30242
    return BoundEventAst;
30243
}());
30244
/**
30245
 * A reference declaration on an element (e.g. `let someName="expression"`).
30246
 */
30247
var ReferenceAst = /** @class */ (function () {
30248
    function ReferenceAst(name, value, originalValue, sourceSpan) {
30249
        this.name = name;
30250
        this.value = value;
30251
        this.originalValue = originalValue;
30252
        this.sourceSpan = sourceSpan;
30253
    }
30254
    ReferenceAst.prototype.visit = function (visitor, context) {
30255
        return visitor.visitReference(this, context);
30256
    };
30257
    return ReferenceAst;
30258
}());
30259
/**
30260
 * A variable declaration on a <ng-template> (e.g. `var-someName="someLocalName"`).
30261
 */
30262
var VariableAst = /** @class */ (function () {
30263
    function VariableAst(name, value, sourceSpan) {
30264
        this.name = name;
30265
        this.value = value;
30266
        this.sourceSpan = sourceSpan;
30267
    }
30268
    VariableAst.prototype.visit = function (visitor, context) {
30269
        return visitor.visitVariable(this, context);
30270
    };
30271
    return VariableAst;
30272
}());
30273
/**
30274
 * An element declaration in a template.
30275
 */
30276
var ElementAst = /** @class */ (function () {
30277
    function ElementAst(name, attrs, inputs, outputs, references, directives, providers, hasViewContainer, queryMatches, children, ngContentIndex, sourceSpan, endSourceSpan) {
30278
        this.name = name;
30279
        this.attrs = attrs;
30280
        this.inputs = inputs;
30281
        this.outputs = outputs;
30282
        this.references = references;
30283
        this.directives = directives;
30284
        this.providers = providers;
30285
        this.hasViewContainer = hasViewContainer;
30286
        this.queryMatches = queryMatches;
30287
        this.children = children;
30288
        this.ngContentIndex = ngContentIndex;
30289
        this.sourceSpan = sourceSpan;
30290
        this.endSourceSpan = endSourceSpan;
30291
    }
30292
    ElementAst.prototype.visit = function (visitor, context) {
30293
        return visitor.visitElement(this, context);
30294
    };
30295
    return ElementAst;
30296
}());
30297
/**
30298
 * A `<ng-template>` element included in an Angular template.
30299
 */
30300
var EmbeddedTemplateAst = /** @class */ (function () {
30301
    function EmbeddedTemplateAst(attrs, outputs, references, variables, directives, providers, hasViewContainer, queryMatches, children, ngContentIndex, sourceSpan) {
30302
        this.attrs = attrs;
30303
        this.outputs = outputs;
30304
        this.references = references;
30305
        this.variables = variables;
30306
        this.directives = directives;
30307
        this.providers = providers;
30308
        this.hasViewContainer = hasViewContainer;
30309
        this.queryMatches = queryMatches;
30310
        this.children = children;
30311
        this.ngContentIndex = ngContentIndex;
30312
        this.sourceSpan = sourceSpan;
30313
    }
30314
    EmbeddedTemplateAst.prototype.visit = function (visitor, context) {
30315
        return visitor.visitEmbeddedTemplate(this, context);
30316
    };
30317
    return EmbeddedTemplateAst;
30318
}());
30319
/**
30320
 * A directive property with a bound value (e.g. `*ngIf="condition").
30321
 */
30322
var BoundDirectivePropertyAst = /** @class */ (function () {
30323
    function BoundDirectivePropertyAst(directiveName, templateName, value, sourceSpan) {
30324
        this.directiveName = directiveName;
30325
        this.templateName = templateName;
30326
        this.value = value;
30327
        this.sourceSpan = sourceSpan;
30328
    }
30329
    BoundDirectivePropertyAst.prototype.visit = function (visitor, context) {
30330
        return visitor.visitDirectiveProperty(this, context);
30331
    };
30332
    return BoundDirectivePropertyAst;
30333
}());
30334
/**
30335
 * A directive declared on an element.
30336
 */
30337
var DirectiveAst = /** @class */ (function () {
30338
    function DirectiveAst(directive, inputs, hostProperties, hostEvents, contentQueryStartId, sourceSpan) {
30339
        this.directive = directive;
30340
        this.inputs = inputs;
30341
        this.hostProperties = hostProperties;
30342
        this.hostEvents = hostEvents;
30343
        this.contentQueryStartId = contentQueryStartId;
30344
        this.sourceSpan = sourceSpan;
30345
    }
30346
    DirectiveAst.prototype.visit = function (visitor, context) {
30347
        return visitor.visitDirective(this, context);
30348
    };
30349
    return DirectiveAst;
30350
}());
30351
/**
30352
 * A provider declared on an element
30353
 */
30354
var ProviderAst = /** @class */ (function () {
30355
    function ProviderAst(token, multiProvider, eager, providers, providerType, lifecycleHooks, sourceSpan, isModule) {
30356
        this.token = token;
30357
        this.multiProvider = multiProvider;
30358
        this.eager = eager;
30359
        this.providers = providers;
30360
        this.providerType = providerType;
30361
        this.lifecycleHooks = lifecycleHooks;
30362
        this.sourceSpan = sourceSpan;
30363
        this.isModule = isModule;
30364
    }
30365
    ProviderAst.prototype.visit = function (visitor, context) {
30366
        // No visit method in the visitor for now...
30367
        return null;
30368
    };
30369
    return ProviderAst;
30370
}());
30371
var ProviderAstType;
30372
(function (ProviderAstType) {
30373
    ProviderAstType[ProviderAstType["PublicService"] = 0] = "PublicService";
30374
    ProviderAstType[ProviderAstType["PrivateService"] = 1] = "PrivateService";
30375
    ProviderAstType[ProviderAstType["Component"] = 2] = "Component";
30376
    ProviderAstType[ProviderAstType["Directive"] = 3] = "Directive";
30377
    ProviderAstType[ProviderAstType["Builtin"] = 4] = "Builtin";
30378
})(ProviderAstType || (ProviderAstType = {}));
30379
/**
30380
 * Position where content is to be projected (instance of `<ng-content>` in a template).
30381
 */
30382
var NgContentAst = /** @class */ (function () {
30383
    function NgContentAst(index, ngContentIndex, sourceSpan) {
30384
        this.index = index;
30385
        this.ngContentIndex = ngContentIndex;
30386
        this.sourceSpan = sourceSpan;
30387
    }
30388
    NgContentAst.prototype.visit = function (visitor, context) {
30389
        return visitor.visitNgContent(this, context);
30390
    };
30391
    return NgContentAst;
30392
}());
30393
/**
30394
 * Enumeration of types of property bindings.
30395
 */
30396
var PropertyBindingType;
30397
(function (PropertyBindingType) {
30398
    /**
30399
     * A normal binding to a property (e.g. `[property]="expression"`).
30400
     */
30401
    PropertyBindingType[PropertyBindingType["Property"] = 0] = "Property";
30402
    /**
30403
     * A binding to an element attribute (e.g. `[attr.name]="expression"`).
30404
     */
30405
    PropertyBindingType[PropertyBindingType["Attribute"] = 1] = "Attribute";
30406
    /**
30407
     * A binding to a CSS class (e.g. `[class.name]="condition"`).
30408
     */
30409
    PropertyBindingType[PropertyBindingType["Class"] = 2] = "Class";
30410
    /**
30411
     * A binding to a style rule (e.g. `[style.rule]="expression"`).
30412
     */
30413
    PropertyBindingType[PropertyBindingType["Style"] = 3] = "Style";
30414
    /**
30415
     * A binding to an animation reference (e.g. `[animate.key]="expression"`).
30416
     */
30417
    PropertyBindingType[PropertyBindingType["Animation"] = 4] = "Animation";
30418
})(PropertyBindingType || (PropertyBindingType = {}));
30419
/**
30420
 * A visitor that accepts each node but doesn't do anything. It is intended to be used
30421
 * as the base class for a visitor that is only interested in a subset of the node types.
30422
 */
30423
var NullTemplateVisitor = /** @class */ (function () {
30424
    function NullTemplateVisitor() {
30425
    }
30426
    NullTemplateVisitor.prototype.visitNgContent = function (ast, context) { };
30427
    NullTemplateVisitor.prototype.visitEmbeddedTemplate = function (ast, context) { };
30428
    NullTemplateVisitor.prototype.visitElement = function (ast, context) { };
30429
    NullTemplateVisitor.prototype.visitReference = function (ast, context) { };
30430
    NullTemplateVisitor.prototype.visitVariable = function (ast, context) { };
30431
    NullTemplateVisitor.prototype.visitEvent = function (ast, context) { };
30432
    NullTemplateVisitor.prototype.visitElementProperty = function (ast, context) { };
30433
    NullTemplateVisitor.prototype.visitAttr = function (ast, context) { };
30434
    NullTemplateVisitor.prototype.visitBoundText = function (ast, context) { };
30435
    NullTemplateVisitor.prototype.visitText = function (ast, context) { };
30436
    NullTemplateVisitor.prototype.visitDirective = function (ast, context) { };
30437
    NullTemplateVisitor.prototype.visitDirectiveProperty = function (ast, context) { };
30438
    return NullTemplateVisitor;
30439
}());
30440
/**
30441
 * Base class that can be used to build a visitor that visits each node
30442
 * in an template ast recursively.
30443
 */
30444
var RecursiveTemplateAstVisitor = /** @class */ (function (_super) {
30445
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(RecursiveTemplateAstVisitor, _super);
30446
    function RecursiveTemplateAstVisitor() {
30447
        return _super.call(this) || this;
30448
    }
30449
    // Nodes with children
30450
    RecursiveTemplateAstVisitor.prototype.visitEmbeddedTemplate = function (ast, context) {
30451
        return this.visitChildren(context, function (visit) {
30452
            visit(ast.attrs);
30453
            visit(ast.references);
30454
            visit(ast.variables);
30455
            visit(ast.directives);
30456
            visit(ast.providers);
30457
            visit(ast.children);
30458
        });
30459
    };
30460
    RecursiveTemplateAstVisitor.prototype.visitElement = function (ast, context) {
30461
        return this.visitChildren(context, function (visit) {
30462
            visit(ast.attrs);
30463
            visit(ast.inputs);
30464
            visit(ast.outputs);
30465
            visit(ast.references);
30466
            visit(ast.directives);
30467
            visit(ast.providers);
30468
            visit(ast.children);
30469
        });
30470
    };
30471
    RecursiveTemplateAstVisitor.prototype.visitDirective = function (ast, context) {
30472
        return this.visitChildren(context, function (visit) {
30473
            visit(ast.inputs);
30474
            visit(ast.hostProperties);
30475
            visit(ast.hostEvents);
30476
        });
30477
    };
30478
    RecursiveTemplateAstVisitor.prototype.visitChildren = function (context, cb) {
30479
        var results = [];
30480
        var t = this;
30481
        function visit(children) {
30482
            if (children && children.length)
30483
                results.push(templateVisitAll(t, children, context));
30484
        }
30485
        cb(visit);
30486
        return [].concat.apply([], results);
30487
    };
30488
    return RecursiveTemplateAstVisitor;
30489
}(NullTemplateVisitor));
30490
/**
30491
 * Visit every node in a list of {@link TemplateAst}s with the given {@link TemplateAstVisitor}.
30492
 */
30493
function templateVisitAll(visitor, asts, context) {
30494
    if (context === void 0) { context = null; }
30495
    var result = [];
30496
    var visit = visitor.visit ?
30497
        function (ast) { return visitor.visit(ast, context) || ast.visit(visitor, context); } :
30498
        function (ast) { return ast.visit(visitor, context); };
30499
    asts.forEach(function (ast) {
30500
        var astResult = visit(ast);
30501
        if (astResult) {
30502
            result.push(astResult);
30503
        }
30504
    });
30505
    return result;
30506
}
30507
 
30508
/**
30509
 * @license
30510
 * Copyright Google Inc. All Rights Reserved.
30511
 *
30512
 * Use of this source code is governed by an MIT-style license that can be
30513
 * found in the LICENSE file at https://angular.io/license
30514
 */
30515
var CompilerConfig = /** @class */ (function () {
30516
    function CompilerConfig(_a) {
30517
        var _b = _a === void 0 ? {} : _a, _c = _b.defaultEncapsulation, defaultEncapsulation = _c === void 0 ? ViewEncapsulation.Emulated : _c, _d = _b.useJit, useJit = _d === void 0 ? true : _d, _e = _b.jitDevMode, jitDevMode = _e === void 0 ? false : _e, _f = _b.missingTranslation, missingTranslation = _f === void 0 ? null : _f, preserveWhitespaces = _b.preserveWhitespaces, strictInjectionParameters = _b.strictInjectionParameters;
30518
        this.defaultEncapsulation = defaultEncapsulation;
30519
        this.useJit = !!useJit;
30520
        this.jitDevMode = !!jitDevMode;
30521
        this.missingTranslation = missingTranslation;
30522
        this.preserveWhitespaces = preserveWhitespacesDefault(noUndefined(preserveWhitespaces));
30523
        this.strictInjectionParameters = strictInjectionParameters === true;
30524
    }
30525
    return CompilerConfig;
30526
}());
30527
function preserveWhitespacesDefault(preserveWhitespacesOption, defaultSetting) {
30528
    if (defaultSetting === void 0) { defaultSetting = false; }
30529
    return preserveWhitespacesOption === null ? defaultSetting : preserveWhitespacesOption;
30530
}
30531
 
30532
/**
30533
 * @license
30534
 * Copyright Google Inc. All Rights Reserved.
30535
 *
30536
 * Use of this source code is governed by an MIT-style license that can be
30537
 * found in the LICENSE file at https://angular.io/license
30538
 */
30539
/**
30540
 * A token representing the a reference to a static type.
30541
 *
30542
 * This token is unique for a filePath and name and can be used as a hash table key.
30543
 */
30544
var StaticSymbol = /** @class */ (function () {
30545
    function StaticSymbol(filePath, name, members) {
30546
        this.filePath = filePath;
30547
        this.name = name;
30548
        this.members = members;
30549
    }
30550
    StaticSymbol.prototype.assertNoMembers = function () {
30551
        if (this.members.length) {
30552
            throw new Error("Illegal state: symbol without members expected, but got " + JSON.stringify(this) + ".");
30553
        }
30554
    };
30555
    return StaticSymbol;
30556
}());
30557
/**
30558
 * A cache of static symbol used by the StaticReflector to return the same symbol for the
30559
 * same symbol values.
30560
 */
30561
var StaticSymbolCache = /** @class */ (function () {
30562
    function StaticSymbolCache() {
30563
        this.cache = new Map();
30564
    }
30565
    StaticSymbolCache.prototype.get = function (declarationFile, name, members) {
30566
        members = members || [];
30567
        var memberSuffix = members.length ? "." + members.join('.') : '';
30568
        var key = "\"" + declarationFile + "\"." + name + memberSuffix;
30569
        var result = this.cache.get(key);
30570
        if (!result) {
30571
            result = new StaticSymbol(declarationFile, name, members);
30572
            this.cache.set(key, result);
30573
        }
30574
        return result;
30575
    };
30576
    return StaticSymbolCache;
30577
}());
30578
 
30579
/**
30580
 * @license
30581
 * Copyright Google Inc. All Rights Reserved.
30582
 *
30583
 * Use of this source code is governed by an MIT-style license that can be
30584
 * found in the LICENSE file at https://angular.io/license
30585
 */
30586
// group 0: "[prop] or (event) or @trigger"
30587
// group 1: "prop" from "[prop]"
30588
// group 2: "event" from "(event)"
30589
// group 3: "@trigger" from "@trigger"
30590
var HOST_REG_EXP = /^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/;
30591
function sanitizeIdentifier(name) {
30592
    return name.replace(/\W/g, '_');
30593
}
30594
var _anonymousTypeIndex = 0;
30595
function identifierName(compileIdentifier) {
30596
    if (!compileIdentifier || !compileIdentifier.reference) {
30597
        return null;
30598
    }
30599
    var ref = compileIdentifier.reference;
30600
    if (ref instanceof StaticSymbol) {
30601
        return ref.name;
30602
    }
30603
    if (ref['__anonymousType']) {
30604
        return ref['__anonymousType'];
30605
    }
30606
    var identifier = stringify(ref);
30607
    if (identifier.indexOf('(') >= 0) {
30608
        // case: anonymous functions!
30609
        identifier = "anonymous_" + _anonymousTypeIndex++;
30610
        ref['__anonymousType'] = identifier;
30611
    }
30612
    else {
30613
        identifier = sanitizeIdentifier(identifier);
30614
    }
30615
    return identifier;
30616
}
30617
function identifierModuleUrl(compileIdentifier) {
30618
    var ref = compileIdentifier.reference;
30619
    if (ref instanceof StaticSymbol) {
30620
        return ref.filePath;
30621
    }
30622
    // Runtime type
30623
    return "./" + stringify(ref);
30624
}
30625
function viewClassName(compType, embeddedTemplateIndex) {
30626
    return "View_" + identifierName({ reference: compType }) + "_" + embeddedTemplateIndex;
30627
}
30628
function rendererTypeName(compType) {
30629
    return "RenderType_" + identifierName({ reference: compType });
30630
}
30631
function hostViewClassName(compType) {
30632
    return "HostView_" + identifierName({ reference: compType });
30633
}
30634
function componentFactoryName(compType) {
30635
    return identifierName({ reference: compType }) + "NgFactory";
30636
}
30637
var CompileSummaryKind;
30638
(function (CompileSummaryKind) {
30639
    CompileSummaryKind[CompileSummaryKind["Pipe"] = 0] = "Pipe";
30640
    CompileSummaryKind[CompileSummaryKind["Directive"] = 1] = "Directive";
30641
    CompileSummaryKind[CompileSummaryKind["NgModule"] = 2] = "NgModule";
30642
    CompileSummaryKind[CompileSummaryKind["Injectable"] = 3] = "Injectable";
30643
})(CompileSummaryKind || (CompileSummaryKind = {}));
30644
function tokenName(token) {
30645
    return token.value != null ? sanitizeIdentifier(token.value) : identifierName(token.identifier);
30646
}
30647
function tokenReference(token) {
30648
    if (token.identifier != null) {
30649
        return token.identifier.reference;
30650
    }
30651
    else {
30652
        return token.value;
30653
    }
30654
}
30655
/**
30656
 * Metadata about a stylesheet
30657
 */
30658
var CompileStylesheetMetadata = /** @class */ (function () {
30659
    function CompileStylesheetMetadata(_a) {
30660
        var _b = _a === void 0 ? {} : _a, moduleUrl = _b.moduleUrl, styles = _b.styles, styleUrls = _b.styleUrls;
30661
        this.moduleUrl = moduleUrl || null;
30662
        this.styles = _normalizeArray(styles);
30663
        this.styleUrls = _normalizeArray(styleUrls);
30664
    }
30665
    return CompileStylesheetMetadata;
30666
}());
30667
/**
30668
 * Metadata regarding compilation of a template.
30669
 */
30670
var CompileTemplateMetadata = /** @class */ (function () {
30671
    function CompileTemplateMetadata(_a) {
30672
        var encapsulation = _a.encapsulation, template = _a.template, templateUrl = _a.templateUrl, htmlAst = _a.htmlAst, styles = _a.styles, styleUrls = _a.styleUrls, externalStylesheets = _a.externalStylesheets, animations = _a.animations, ngContentSelectors = _a.ngContentSelectors, interpolation = _a.interpolation, isInline = _a.isInline, preserveWhitespaces = _a.preserveWhitespaces;
30673
        this.encapsulation = encapsulation;
30674
        this.template = template;
30675
        this.templateUrl = templateUrl;
30676
        this.htmlAst = htmlAst;
30677
        this.styles = _normalizeArray(styles);
30678
        this.styleUrls = _normalizeArray(styleUrls);
30679
        this.externalStylesheets = _normalizeArray(externalStylesheets);
30680
        this.animations = animations ? flatten(animations) : [];
30681
        this.ngContentSelectors = ngContentSelectors || [];
30682
        if (interpolation && interpolation.length != 2) {
30683
            throw new Error("'interpolation' should have a start and an end symbol.");
30684
        }
30685
        this.interpolation = interpolation;
30686
        this.isInline = isInline;
30687
        this.preserveWhitespaces = preserveWhitespaces;
30688
    }
30689
    CompileTemplateMetadata.prototype.toSummary = function () {
30690
        return {
30691
            ngContentSelectors: this.ngContentSelectors,
30692
            encapsulation: this.encapsulation,
30693
        };
30694
    };
30695
    return CompileTemplateMetadata;
30696
}());
30697
/**
30698
 * Metadata regarding compilation of a directive.
30699
 */
30700
var CompileDirectiveMetadata = /** @class */ (function () {
30701
    function CompileDirectiveMetadata(_a) {
30702
        var isHost = _a.isHost, type = _a.type, isComponent = _a.isComponent, selector = _a.selector, exportAs = _a.exportAs, changeDetection = _a.changeDetection, inputs = _a.inputs, outputs = _a.outputs, hostListeners = _a.hostListeners, hostProperties = _a.hostProperties, hostAttributes = _a.hostAttributes, providers = _a.providers, viewProviders = _a.viewProviders, queries = _a.queries, guards = _a.guards, viewQueries = _a.viewQueries, entryComponents = _a.entryComponents, template = _a.template, componentViewType = _a.componentViewType, rendererType = _a.rendererType, componentFactory = _a.componentFactory;
30703
        this.isHost = !!isHost;
30704
        this.type = type;
30705
        this.isComponent = isComponent;
30706
        this.selector = selector;
30707
        this.exportAs = exportAs;
30708
        this.changeDetection = changeDetection;
30709
        this.inputs = inputs;
30710
        this.outputs = outputs;
30711
        this.hostListeners = hostListeners;
30712
        this.hostProperties = hostProperties;
30713
        this.hostAttributes = hostAttributes;
30714
        this.providers = _normalizeArray(providers);
30715
        this.viewProviders = _normalizeArray(viewProviders);
30716
        this.queries = _normalizeArray(queries);
30717
        this.guards = guards;
30718
        this.viewQueries = _normalizeArray(viewQueries);
30719
        this.entryComponents = _normalizeArray(entryComponents);
30720
        this.template = template;
30721
        this.componentViewType = componentViewType;
30722
        this.rendererType = rendererType;
30723
        this.componentFactory = componentFactory;
30724
    }
30725
    CompileDirectiveMetadata.create = function (_a) {
30726
        var isHost = _a.isHost, type = _a.type, isComponent = _a.isComponent, selector = _a.selector, exportAs = _a.exportAs, changeDetection = _a.changeDetection, inputs = _a.inputs, outputs = _a.outputs, host = _a.host, providers = _a.providers, viewProviders = _a.viewProviders, queries = _a.queries, guards = _a.guards, viewQueries = _a.viewQueries, entryComponents = _a.entryComponents, template = _a.template, componentViewType = _a.componentViewType, rendererType = _a.rendererType, componentFactory = _a.componentFactory;
30727
        var hostListeners = {};
30728
        var hostProperties = {};
30729
        var hostAttributes = {};
30730
        if (host != null) {
30731
            Object.keys(host).forEach(function (key) {
30732
                var value = host[key];
30733
                var matches = key.match(HOST_REG_EXP);
30734
                if (matches === null) {
30735
                    hostAttributes[key] = value;
30736
                }
30737
                else if (matches[1] != null) {
30738
                    hostProperties[matches[1]] = value;
30739
                }
30740
                else if (matches[2] != null) {
30741
                    hostListeners[matches[2]] = value;
30742
                }
30743
            });
30744
        }
30745
        var inputsMap = {};
30746
        if (inputs != null) {
30747
            inputs.forEach(function (bindConfig) {
30748
                // canonical syntax: `dirProp: elProp`
30749
                // if there is no `:`, use dirProp = elProp
30750
                var parts = splitAtColon(bindConfig, [bindConfig, bindConfig]);
30751
                inputsMap[parts[0]] = parts[1];
30752
            });
30753
        }
30754
        var outputsMap = {};
30755
        if (outputs != null) {
30756
            outputs.forEach(function (bindConfig) {
30757
                // canonical syntax: `dirProp: elProp`
30758
                // if there is no `:`, use dirProp = elProp
30759
                var parts = splitAtColon(bindConfig, [bindConfig, bindConfig]);
30760
                outputsMap[parts[0]] = parts[1];
30761
            });
30762
        }
30763
        return new CompileDirectiveMetadata({
30764
            isHost: isHost,
30765
            type: type,
30766
            isComponent: !!isComponent, selector: selector, exportAs: exportAs, changeDetection: changeDetection,
30767
            inputs: inputsMap,
30768
            outputs: outputsMap,
30769
            hostListeners: hostListeners,
30770
            hostProperties: hostProperties,
30771
            hostAttributes: hostAttributes,
30772
            providers: providers,
30773
            viewProviders: viewProviders,
30774
            queries: queries,
30775
            guards: guards,
30776
            viewQueries: viewQueries,
30777
            entryComponents: entryComponents,
30778
            template: template,
30779
            componentViewType: componentViewType,
30780
            rendererType: rendererType,
30781
            componentFactory: componentFactory,
30782
        });
30783
    };
30784
    CompileDirectiveMetadata.prototype.toSummary = function () {
30785
        return {
30786
            summaryKind: CompileSummaryKind.Directive,
30787
            type: this.type,
30788
            isComponent: this.isComponent,
30789
            selector: this.selector,
30790
            exportAs: this.exportAs,
30791
            inputs: this.inputs,
30792
            outputs: this.outputs,
30793
            hostListeners: this.hostListeners,
30794
            hostProperties: this.hostProperties,
30795
            hostAttributes: this.hostAttributes,
30796
            providers: this.providers,
30797
            viewProviders: this.viewProviders,
30798
            queries: this.queries,
30799
            guards: this.guards,
30800
            viewQueries: this.viewQueries,
30801
            entryComponents: this.entryComponents,
30802
            changeDetection: this.changeDetection,
30803
            template: this.template && this.template.toSummary(),
30804
            componentViewType: this.componentViewType,
30805
            rendererType: this.rendererType,
30806
            componentFactory: this.componentFactory
30807
        };
30808
    };
30809
    return CompileDirectiveMetadata;
30810
}());
30811
var CompilePipeMetadata = /** @class */ (function () {
30812
    function CompilePipeMetadata(_a) {
30813
        var type = _a.type, name = _a.name, pure = _a.pure;
30814
        this.type = type;
30815
        this.name = name;
30816
        this.pure = !!pure;
30817
    }
30818
    CompilePipeMetadata.prototype.toSummary = function () {
30819
        return {
30820
            summaryKind: CompileSummaryKind.Pipe,
30821
            type: this.type,
30822
            name: this.name,
30823
            pure: this.pure
30824
        };
30825
    };
30826
    return CompilePipeMetadata;
30827
}());
30828
var CompileShallowModuleMetadata = /** @class */ (function () {
30829
    function CompileShallowModuleMetadata() {
30830
    }
30831
    return CompileShallowModuleMetadata;
30832
}());
30833
/**
30834
 * Metadata regarding compilation of a module.
30835
 */
30836
var CompileNgModuleMetadata = /** @class */ (function () {
30837
    function CompileNgModuleMetadata(_a) {
30838
        var type = _a.type, providers = _a.providers, declaredDirectives = _a.declaredDirectives, exportedDirectives = _a.exportedDirectives, declaredPipes = _a.declaredPipes, exportedPipes = _a.exportedPipes, entryComponents = _a.entryComponents, bootstrapComponents = _a.bootstrapComponents, importedModules = _a.importedModules, exportedModules = _a.exportedModules, schemas = _a.schemas, transitiveModule = _a.transitiveModule, id = _a.id;
30839
        this.type = type || null;
30840
        this.declaredDirectives = _normalizeArray(declaredDirectives);
30841
        this.exportedDirectives = _normalizeArray(exportedDirectives);
30842
        this.declaredPipes = _normalizeArray(declaredPipes);
30843
        this.exportedPipes = _normalizeArray(exportedPipes);
30844
        this.providers = _normalizeArray(providers);
30845
        this.entryComponents = _normalizeArray(entryComponents);
30846
        this.bootstrapComponents = _normalizeArray(bootstrapComponents);
30847
        this.importedModules = _normalizeArray(importedModules);
30848
        this.exportedModules = _normalizeArray(exportedModules);
30849
        this.schemas = _normalizeArray(schemas);
30850
        this.id = id || null;
30851
        this.transitiveModule = transitiveModule || null;
30852
    }
30853
    CompileNgModuleMetadata.prototype.toSummary = function () {
30854
        var module = this.transitiveModule;
30855
        return {
30856
            summaryKind: CompileSummaryKind.NgModule,
30857
            type: this.type,
30858
            entryComponents: module.entryComponents,
30859
            providers: module.providers,
30860
            modules: module.modules,
30861
            exportedDirectives: module.exportedDirectives,
30862
            exportedPipes: module.exportedPipes
30863
        };
30864
    };
30865
    return CompileNgModuleMetadata;
30866
}());
30867
var TransitiveCompileNgModuleMetadata = /** @class */ (function () {
30868
    function TransitiveCompileNgModuleMetadata() {
30869
        this.directivesSet = new Set();
30870
        this.directives = [];
30871
        this.exportedDirectivesSet = new Set();
30872
        this.exportedDirectives = [];
30873
        this.pipesSet = new Set();
30874
        this.pipes = [];
30875
        this.exportedPipesSet = new Set();
30876
        this.exportedPipes = [];
30877
        this.modulesSet = new Set();
30878
        this.modules = [];
30879
        this.entryComponentsSet = new Set();
30880
        this.entryComponents = [];
30881
        this.providers = [];
30882
    }
30883
    TransitiveCompileNgModuleMetadata.prototype.addProvider = function (provider, module) {
30884
        this.providers.push({ provider: provider, module: module });
30885
    };
30886
    TransitiveCompileNgModuleMetadata.prototype.addDirective = function (id) {
30887
        if (!this.directivesSet.has(id.reference)) {
30888
            this.directivesSet.add(id.reference);
30889
            this.directives.push(id);
30890
        }
30891
    };
30892
    TransitiveCompileNgModuleMetadata.prototype.addExportedDirective = function (id) {
30893
        if (!this.exportedDirectivesSet.has(id.reference)) {
30894
            this.exportedDirectivesSet.add(id.reference);
30895
            this.exportedDirectives.push(id);
30896
        }
30897
    };
30898
    TransitiveCompileNgModuleMetadata.prototype.addPipe = function (id) {
30899
        if (!this.pipesSet.has(id.reference)) {
30900
            this.pipesSet.add(id.reference);
30901
            this.pipes.push(id);
30902
        }
30903
    };
30904
    TransitiveCompileNgModuleMetadata.prototype.addExportedPipe = function (id) {
30905
        if (!this.exportedPipesSet.has(id.reference)) {
30906
            this.exportedPipesSet.add(id.reference);
30907
            this.exportedPipes.push(id);
30908
        }
30909
    };
30910
    TransitiveCompileNgModuleMetadata.prototype.addModule = function (id) {
30911
        if (!this.modulesSet.has(id.reference)) {
30912
            this.modulesSet.add(id.reference);
30913
            this.modules.push(id);
30914
        }
30915
    };
30916
    TransitiveCompileNgModuleMetadata.prototype.addEntryComponent = function (ec) {
30917
        if (!this.entryComponentsSet.has(ec.componentType)) {
30918
            this.entryComponentsSet.add(ec.componentType);
30919
            this.entryComponents.push(ec);
30920
        }
30921
    };
30922
    return TransitiveCompileNgModuleMetadata;
30923
}());
30924
function _normalizeArray(obj) {
30925
    return obj || [];
30926
}
30927
var ProviderMeta = /** @class */ (function () {
30928
    function ProviderMeta(token, _a) {
30929
        var useClass = _a.useClass, useValue = _a.useValue, useExisting = _a.useExisting, useFactory = _a.useFactory, deps = _a.deps, multi = _a.multi;
30930
        this.token = token;
30931
        this.useClass = useClass || null;
30932
        this.useValue = useValue;
30933
        this.useExisting = useExisting;
30934
        this.useFactory = useFactory || null;
30935
        this.dependencies = deps || null;
30936
        this.multi = !!multi;
30937
    }
30938
    return ProviderMeta;
30939
}());
30940
function flatten(list) {
30941
    return list.reduce(function (flat, item) {
30942
        var flatItem = Array.isArray(item) ? flatten(item) : item;
30943
        return flat.concat(flatItem);
30944
    }, []);
30945
}
30946
function jitSourceUrl(url) {
30947
    // Note: We need 3 "/" so that ng shows up as a separate domain
30948
    // in the chrome dev tools.
30949
    return url.replace(/(\w+:\/\/[\w:-]+)?(\/+)?/, 'ng:///');
30950
}
30951
function templateSourceUrl(ngModuleType, compMeta, templateMeta) {
30952
    var url;
30953
    if (templateMeta.isInline) {
30954
        if (compMeta.type.reference instanceof StaticSymbol) {
30955
            // Note: a .ts file might contain multiple components with inline templates,
30956
            // so we need to give them unique urls, as these will be used for sourcemaps.
30957
            url = compMeta.type.reference.filePath + "." + compMeta.type.reference.name + ".html";
30958
        }
30959
        else {
30960
            url = identifierName(ngModuleType) + "/" + identifierName(compMeta.type) + ".html";
30961
        }
30962
    }
30963
    else {
30964
        url = templateMeta.templateUrl;
30965
    }
30966
    return compMeta.type.reference instanceof StaticSymbol ? url : jitSourceUrl(url);
30967
}
30968
function sharedStylesheetJitUrl(meta, id) {
30969
    var pathParts = meta.moduleUrl.split(/\/\\/g);
30970
    var baseName = pathParts[pathParts.length - 1];
30971
    return jitSourceUrl("css/" + id + baseName + ".ngstyle.js");
30972
}
30973
function ngModuleJitUrl(moduleMeta) {
30974
    return jitSourceUrl(identifierName(moduleMeta.type) + "/module.ngfactory.js");
30975
}
30976
function templateJitUrl(ngModuleType, compMeta) {
30977
    return jitSourceUrl(identifierName(ngModuleType) + "/" + identifierName(compMeta.type) + ".ngfactory.js");
30978
}
30979
 
30980
/**
30981
 * @license
30982
 * Copyright Google Inc. All Rights Reserved.
30983
 *
30984
 * Use of this source code is governed by an MIT-style license that can be
30985
 * found in the LICENSE file at https://angular.io/license
30986
 */
30987
/**
30988
 * A path is an ordered set of elements. Typically a path is to  a
30989
 * particular offset in a source file. The head of the list is the top
30990
 * most node. The tail is the node that contains the offset directly.
30991
 *
30992
 * For example, the expression `a + b + c` might have an ast that looks
30993
 * like:
30994
 *     +
30995
 *    / \
30996
 *   a   +
30997
 *      / \
30998
 *     b   c
30999
 *
31000
 * The path to the node at offset 9 would be `['+' at 1-10, '+' at 7-10,
31001
 * 'c' at 9-10]` and the path the node at offset 1 would be
31002
 * `['+' at 1-10, 'a' at 1-2]`.
31003
 */
31004
var AstPath = /** @class */ (function () {
31005
    function AstPath(path, position) {
31006
        if (position === void 0) { position = -1; }
31007
        this.path = path;
31008
        this.position = position;
31009
    }
31010
    Object.defineProperty(AstPath.prototype, "empty", {
31011
        get: function () { return !this.path || !this.path.length; },
31012
        enumerable: true,
31013
        configurable: true
31014
    });
31015
    Object.defineProperty(AstPath.prototype, "head", {
31016
        get: function () { return this.path[0]; },
31017
        enumerable: true,
31018
        configurable: true
31019
    });
31020
    Object.defineProperty(AstPath.prototype, "tail", {
31021
        get: function () { return this.path[this.path.length - 1]; },
31022
        enumerable: true,
31023
        configurable: true
31024
    });
31025
    AstPath.prototype.parentOf = function (node) {
31026
        return node && this.path[this.path.indexOf(node) - 1];
31027
    };
31028
    AstPath.prototype.childOf = function (node) { return this.path[this.path.indexOf(node) + 1]; };
31029
    AstPath.prototype.first = function (ctor) {
31030
        for (var i = this.path.length - 1; i >= 0; i--) {
31031
            var item = this.path[i];
31032
            if (item instanceof ctor)
31033
                return item;
31034
        }
31035
    };
31036
    AstPath.prototype.push = function (node) { this.path.push(node); };
31037
    AstPath.prototype.pop = function () { return this.path.pop(); };
31038
    return AstPath;
31039
}());
31040
 
31041
/**
31042
 * @license
31043
 * Copyright Google Inc. All Rights Reserved.
31044
 *
31045
 * Use of this source code is governed by an MIT-style license that can be
31046
 * found in the LICENSE file at https://angular.io/license
31047
 */
31048
var Text = /** @class */ (function () {
31049
    function Text(value, sourceSpan) {
31050
        this.value = value;
31051
        this.sourceSpan = sourceSpan;
31052
    }
31053
    Text.prototype.visit = function (visitor, context) { return visitor.visitText(this, context); };
31054
    return Text;
31055
}());
31056
var Expansion = /** @class */ (function () {
31057
    function Expansion(switchValue, type, cases, sourceSpan, switchValueSourceSpan) {
31058
        this.switchValue = switchValue;
31059
        this.type = type;
31060
        this.cases = cases;
31061
        this.sourceSpan = sourceSpan;
31062
        this.switchValueSourceSpan = switchValueSourceSpan;
31063
    }
31064
    Expansion.prototype.visit = function (visitor, context) { return visitor.visitExpansion(this, context); };
31065
    return Expansion;
31066
}());
31067
var ExpansionCase = /** @class */ (function () {
31068
    function ExpansionCase(value, expression, sourceSpan, valueSourceSpan, expSourceSpan) {
31069
        this.value = value;
31070
        this.expression = expression;
31071
        this.sourceSpan = sourceSpan;
31072
        this.valueSourceSpan = valueSourceSpan;
31073
        this.expSourceSpan = expSourceSpan;
31074
    }
31075
    ExpansionCase.prototype.visit = function (visitor, context) { return visitor.visitExpansionCase(this, context); };
31076
    return ExpansionCase;
31077
}());
31078
var Attribute = /** @class */ (function () {
31079
    function Attribute(name, value, sourceSpan, valueSpan) {
31080
        this.name = name;
31081
        this.value = value;
31082
        this.sourceSpan = sourceSpan;
31083
        this.valueSpan = valueSpan;
31084
    }
31085
    Attribute.prototype.visit = function (visitor, context) { return visitor.visitAttribute(this, context); };
31086
    return Attribute;
31087
}());
31088
var Element = /** @class */ (function () {
31089
    function Element(name, attrs, children, sourceSpan, startSourceSpan, endSourceSpan) {
31090
        if (startSourceSpan === void 0) { startSourceSpan = null; }
31091
        if (endSourceSpan === void 0) { endSourceSpan = null; }
31092
        this.name = name;
31093
        this.attrs = attrs;
31094
        this.children = children;
31095
        this.sourceSpan = sourceSpan;
31096
        this.startSourceSpan = startSourceSpan;
31097
        this.endSourceSpan = endSourceSpan;
31098
    }
31099
    Element.prototype.visit = function (visitor, context) { return visitor.visitElement(this, context); };
31100
    return Element;
31101
}());
31102
var Comment = /** @class */ (function () {
31103
    function Comment(value, sourceSpan) {
31104
        this.value = value;
31105
        this.sourceSpan = sourceSpan;
31106
    }
31107
    Comment.prototype.visit = function (visitor, context) { return visitor.visitComment(this, context); };
31108
    return Comment;
31109
}());
31110
function visitAll(visitor, nodes, context) {
31111
    if (context === void 0) { context = null; }
31112
    var result = [];
31113
    var visit = visitor.visit ?
31114
        function (ast) { return visitor.visit(ast, context) || ast.visit(visitor, context); } :
31115
        function (ast) { return ast.visit(visitor, context); };
31116
    nodes.forEach(function (ast) {
31117
        var astResult = visit(ast);
31118
        if (astResult) {
31119
            result.push(astResult);
31120
        }
31121
    });
31122
    return result;
31123
}
31124
var RecursiveVisitor = /** @class */ (function () {
31125
    function RecursiveVisitor() {
31126
    }
31127
    RecursiveVisitor.prototype.visitElement = function (ast, context) {
31128
        this.visitChildren(context, function (visit) {
31129
            visit(ast.attrs);
31130
            visit(ast.children);
31131
        });
31132
    };
31133
    RecursiveVisitor.prototype.visitAttribute = function (ast, context) { };
31134
    RecursiveVisitor.prototype.visitText = function (ast, context) { };
31135
    RecursiveVisitor.prototype.visitComment = function (ast, context) { };
31136
    RecursiveVisitor.prototype.visitExpansion = function (ast, context) {
31137
        return this.visitChildren(context, function (visit) { visit(ast.cases); });
31138
    };
31139
    RecursiveVisitor.prototype.visitExpansionCase = function (ast, context) { };
31140
    RecursiveVisitor.prototype.visitChildren = function (context, cb) {
31141
        var results = [];
31142
        var t = this;
31143
        function visit(children) {
31144
            if (children)
31145
                results.push(visitAll(t, children, context));
31146
        }
31147
        cb(visit);
31148
        return [].concat.apply([], results);
31149
    };
31150
    return RecursiveVisitor;
31151
}());
31152
function spanOf(ast) {
31153
    var start = ast.sourceSpan.start.offset;
31154
    var end = ast.sourceSpan.end.offset;
31155
    if (ast instanceof Element) {
31156
        if (ast.endSourceSpan) {
31157
            end = ast.endSourceSpan.end.offset;
31158
        }
31159
        else if (ast.children && ast.children.length) {
31160
            end = spanOf(ast.children[ast.children.length - 1]).end;
31161
        }
31162
    }
31163
    return { start: start, end: end };
31164
}
31165
function findNode(nodes, position) {
31166
    var path = [];
31167
    var visitor = new /** @class */ (function (_super) {
31168
        Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(class_1, _super);
31169
        function class_1() {
31170
            return _super !== null && _super.apply(this, arguments) || this;
31171
        }
31172
        class_1.prototype.visit = function (ast, context) {
31173
            var span = spanOf(ast);
31174
            if (span.start <= position && position < span.end) {
31175
                path.push(ast);
31176
            }
31177
            else {
31178
                // Returning a value here will result in the children being skipped.
31179
                return true;
31180
            }
31181
        };
31182
        return class_1;
31183
    }(RecursiveVisitor));
31184
    visitAll(visitor, nodes);
31185
    return new AstPath(path, position);
31186
}
31187
 
31188
/**
31189
 * @license
31190
 * Copyright Google Inc. All Rights Reserved.
31191
 *
31192
 * Use of this source code is governed by an MIT-style license that can be
31193
 * found in the LICENSE file at https://angular.io/license
31194
 */
31195
function assertArrayOfStrings(identifier, value) {
31196
    if (value == null) {
31197
        return;
31198
    }
31199
    if (!Array.isArray(value)) {
31200
        throw new Error("Expected '" + identifier + "' to be an array of strings.");
31201
    }
31202
    for (var i = 0; i < value.length; i += 1) {
31203
        if (typeof value[i] !== 'string') {
31204
            throw new Error("Expected '" + identifier + "' to be an array of strings.");
31205
        }
31206
    }
31207
}
31208
var INTERPOLATION_BLACKLIST_REGEXPS = [
31209
    /^\s*$/,
31210
    /[<>]/,
31211
    /^[{}]$/,
31212
    /&(#|[a-z])/i,
31213
    /^\/\//,
31214
];
31215
function assertInterpolationSymbols(identifier, value) {
31216
    if (value != null && !(Array.isArray(value) && value.length == 2)) {
31217
        throw new Error("Expected '" + identifier + "' to be an array, [start, end].");
31218
    }
31219
    else if (value != null) {
31220
        var start_1 = value[0];
31221
        var end_1 = value[1];
31222
        // black list checking
31223
        INTERPOLATION_BLACKLIST_REGEXPS.forEach(function (regexp) {
31224
            if (regexp.test(start_1) || regexp.test(end_1)) {
31225
                throw new Error("['" + start_1 + "', '" + end_1 + "'] contains unusable interpolation symbol.");
31226
            }
31227
        });
31228
    }
31229
}
31230
 
31231
/**
31232
 * @license
31233
 * Copyright Google Inc. All Rights Reserved.
31234
 *
31235
 * Use of this source code is governed by an MIT-style license that can be
31236
 * found in the LICENSE file at https://angular.io/license
31237
 */
31238
var InterpolationConfig = /** @class */ (function () {
31239
    function InterpolationConfig(start, end) {
31240
        this.start = start;
31241
        this.end = end;
31242
    }
31243
    InterpolationConfig.fromArray = function (markers) {
31244
        if (!markers) {
31245
            return DEFAULT_INTERPOLATION_CONFIG;
31246
        }
31247
        assertInterpolationSymbols('interpolation', markers);
31248
        return new InterpolationConfig(markers[0], markers[1]);
31249
    };
31250
    return InterpolationConfig;
31251
}());
31252
var DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig('{{', '}}');
31253
 
31254
/**
31255
 * @license
31256
 * Copyright Google Inc. All Rights Reserved.
31257
 *
31258
 * Use of this source code is governed by an MIT-style license that can be
31259
 * found in the LICENSE file at https://angular.io/license
31260
 */
31261
var StyleWithImports = /** @class */ (function () {
31262
    function StyleWithImports(style, styleUrls) {
31263
        this.style = style;
31264
        this.styleUrls = styleUrls;
31265
    }
31266
    return StyleWithImports;
31267
}());
31268
function isStyleUrlResolvable(url) {
31269
    if (url == null || url.length === 0 || url[0] == '/')
31270
        return false;
31271
    var schemeMatch = url.match(URL_WITH_SCHEMA_REGEXP);
31272
    return schemeMatch === null || schemeMatch[1] == 'package' || schemeMatch[1] == 'asset';
31273
}
31274
/**
31275
 * Rewrites stylesheets by resolving and removing the @import urls that
31276
 * are either relative or don't have a `package:` scheme
31277
 */
31278
function extractStyleUrls(resolver, baseUrl, cssText) {
31279
    var foundUrls = [];
31280
    var modifiedCssText = cssText.replace(CSS_STRIPPABLE_COMMENT_REGEXP, '')
31281
        .replace(CSS_IMPORT_REGEXP, function () {
31282
        var m = [];
31283
        for (var _i = 0; _i < arguments.length; _i++) {
31284
            m[_i] = arguments[_i];
31285
        }
31286
        var url = m[1] || m[2];
31287
        if (!isStyleUrlResolvable(url)) {
31288
            // Do not attempt to resolve non-package absolute URLs with URI
31289
            // scheme
31290
            return m[0];
31291
        }
31292
        foundUrls.push(resolver.resolve(baseUrl, url));
31293
        return '';
31294
    });
31295
    return new StyleWithImports(modifiedCssText, foundUrls);
31296
}
31297
var CSS_IMPORT_REGEXP = /@import\s+(?:url\()?\s*(?:(?:['"]([^'"]*))|([^;\)\s]*))[^;]*;?/g;
31298
var CSS_STRIPPABLE_COMMENT_REGEXP = /\/\*(?!#\s*(?:sourceURL|sourceMappingURL)=)[\s\S]+?\*\//g;
31299
var URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;
31300
 
31301
/**
31302
 * @license
31303
 * Copyright Google Inc. All Rights Reserved.
31304
 *
31305
 * Use of this source code is governed by an MIT-style license that can be
31306
 * found in the LICENSE file at https://angular.io/license
31307
 */
31308
var TagContentType;
31309
(function (TagContentType) {
31310
    TagContentType[TagContentType["RAW_TEXT"] = 0] = "RAW_TEXT";
31311
    TagContentType[TagContentType["ESCAPABLE_RAW_TEXT"] = 1] = "ESCAPABLE_RAW_TEXT";
31312
    TagContentType[TagContentType["PARSABLE_DATA"] = 2] = "PARSABLE_DATA";
31313
})(TagContentType || (TagContentType = {}));
31314
function splitNsName(elementName) {
31315
    if (elementName[0] != ':') {
31316
        return [null, elementName];
31317
    }
31318
    var colonIndex = elementName.indexOf(':', 1);
31319
    if (colonIndex == -1) {
31320
        throw new Error("Unsupported format \"" + elementName + "\" expecting \":namespace:name\"");
31321
    }
31322
    return [elementName.slice(1, colonIndex), elementName.slice(colonIndex + 1)];
31323
}
31324
// `<ng-container>` tags work the same regardless the namespace
31325
function isNgContainer(tagName) {
31326
    return splitNsName(tagName)[1] === 'ng-container';
31327
}
31328
// `<ng-content>` tags work the same regardless the namespace
31329
function isNgContent(tagName) {
31330
    return splitNsName(tagName)[1] === 'ng-content';
31331
}
31332
// `<ng-template>` tags work the same regardless the namespace
31333
function isNgTemplate(tagName) {
31334
    return splitNsName(tagName)[1] === 'ng-template';
31335
}
31336
function getNsPrefix(fullName) {
31337
    return fullName === null ? null : splitNsName(fullName)[0];
31338
}
31339
function mergeNsAndName(prefix, localName) {
31340
    return prefix ? ":" + prefix + ":" + localName : localName;
31341
}
31342
// see http://www.w3.org/TR/html51/syntax.html#named-character-references
31343
// see https://html.spec.whatwg.org/multipage/entities.json
31344
// This list is not exhaustive to keep the compiler footprint low.
31345
// The `&#123;` / `&#x1ab;` syntax should be used when the named character reference does not
31346
// exist.
31347
var NAMED_ENTITIES = {
31348
    'Aacute': '\u00C1',
31349
    'aacute': '\u00E1',
31350
    'Acirc': '\u00C2',
31351
    'acirc': '\u00E2',
31352
    'acute': '\u00B4',
31353
    'AElig': '\u00C6',
31354
    'aelig': '\u00E6',
31355
    'Agrave': '\u00C0',
31356
    'agrave': '\u00E0',
31357
    'alefsym': '\u2135',
31358
    'Alpha': '\u0391',
31359
    'alpha': '\u03B1',
31360
    'amp': '&',
31361
    'and': '\u2227',
31362
    'ang': '\u2220',
31363
    'apos': '\u0027',
31364
    'Aring': '\u00C5',
31365
    'aring': '\u00E5',
31366
    'asymp': '\u2248',
31367
    'Atilde': '\u00C3',
31368
    'atilde': '\u00E3',
31369
    'Auml': '\u00C4',
31370
    'auml': '\u00E4',
31371
    'bdquo': '\u201E',
31372
    'Beta': '\u0392',
31373
    'beta': '\u03B2',
31374
    'brvbar': '\u00A6',
31375
    'bull': '\u2022',
31376
    'cap': '\u2229',
31377
    'Ccedil': '\u00C7',
31378
    'ccedil': '\u00E7',
31379
    'cedil': '\u00B8',
31380
    'cent': '\u00A2',
31381
    'Chi': '\u03A7',
31382
    'chi': '\u03C7',
31383
    'circ': '\u02C6',
31384
    'clubs': '\u2663',
31385
    'cong': '\u2245',
31386
    'copy': '\u00A9',
31387
    'crarr': '\u21B5',
31388
    'cup': '\u222A',
31389
    'curren': '\u00A4',
31390
    'dagger': '\u2020',
31391
    'Dagger': '\u2021',
31392
    'darr': '\u2193',
31393
    'dArr': '\u21D3',
31394
    'deg': '\u00B0',
31395
    'Delta': '\u0394',
31396
    'delta': '\u03B4',
31397
    'diams': '\u2666',
31398
    'divide': '\u00F7',
31399
    'Eacute': '\u00C9',
31400
    'eacute': '\u00E9',
31401
    'Ecirc': '\u00CA',
31402
    'ecirc': '\u00EA',
31403
    'Egrave': '\u00C8',
31404
    'egrave': '\u00E8',
31405
    'empty': '\u2205',
31406
    'emsp': '\u2003',
31407
    'ensp': '\u2002',
31408
    'Epsilon': '\u0395',
31409
    'epsilon': '\u03B5',
31410
    'equiv': '\u2261',
31411
    'Eta': '\u0397',
31412
    'eta': '\u03B7',
31413
    'ETH': '\u00D0',
31414
    'eth': '\u00F0',
31415
    'Euml': '\u00CB',
31416
    'euml': '\u00EB',
31417
    'euro': '\u20AC',
31418
    'exist': '\u2203',
31419
    'fnof': '\u0192',
31420
    'forall': '\u2200',
31421
    'frac12': '\u00BD',
31422
    'frac14': '\u00BC',
31423
    'frac34': '\u00BE',
31424
    'frasl': '\u2044',
31425
    'Gamma': '\u0393',
31426
    'gamma': '\u03B3',
31427
    'ge': '\u2265',
31428
    'gt': '>',
31429
    'harr': '\u2194',
31430
    'hArr': '\u21D4',
31431
    'hearts': '\u2665',
31432
    'hellip': '\u2026',
31433
    'Iacute': '\u00CD',
31434
    'iacute': '\u00ED',
31435
    'Icirc': '\u00CE',
31436
    'icirc': '\u00EE',
31437
    'iexcl': '\u00A1',
31438
    'Igrave': '\u00CC',
31439
    'igrave': '\u00EC',
31440
    'image': '\u2111',
31441
    'infin': '\u221E',
31442
    'int': '\u222B',
31443
    'Iota': '\u0399',
31444
    'iota': '\u03B9',
31445
    'iquest': '\u00BF',
31446
    'isin': '\u2208',
31447
    'Iuml': '\u00CF',
31448
    'iuml': '\u00EF',
31449
    'Kappa': '\u039A',
31450
    'kappa': '\u03BA',
31451
    'Lambda': '\u039B',
31452
    'lambda': '\u03BB',
31453
    'lang': '\u27E8',
31454
    'laquo': '\u00AB',
31455
    'larr': '\u2190',
31456
    'lArr': '\u21D0',
31457
    'lceil': '\u2308',
31458
    'ldquo': '\u201C',
31459
    'le': '\u2264',
31460
    'lfloor': '\u230A',
31461
    'lowast': '\u2217',
31462
    'loz': '\u25CA',
31463
    'lrm': '\u200E',
31464
    'lsaquo': '\u2039',
31465
    'lsquo': '\u2018',
31466
    'lt': '<',
31467
    'macr': '\u00AF',
31468
    'mdash': '\u2014',
31469
    'micro': '\u00B5',
31470
    'middot': '\u00B7',
31471
    'minus': '\u2212',
31472
    'Mu': '\u039C',
31473
    'mu': '\u03BC',
31474
    'nabla': '\u2207',
31475
    'nbsp': '\u00A0',
31476
    'ndash': '\u2013',
31477
    'ne': '\u2260',
31478
    'ni': '\u220B',
31479
    'not': '\u00AC',
31480
    'notin': '\u2209',
31481
    'nsub': '\u2284',
31482
    'Ntilde': '\u00D1',
31483
    'ntilde': '\u00F1',
31484
    'Nu': '\u039D',
31485
    'nu': '\u03BD',
31486
    'Oacute': '\u00D3',
31487
    'oacute': '\u00F3',
31488
    'Ocirc': '\u00D4',
31489
    'ocirc': '\u00F4',
31490
    'OElig': '\u0152',
31491
    'oelig': '\u0153',
31492
    'Ograve': '\u00D2',
31493
    'ograve': '\u00F2',
31494
    'oline': '\u203E',
31495
    'Omega': '\u03A9',
31496
    'omega': '\u03C9',
31497
    'Omicron': '\u039F',
31498
    'omicron': '\u03BF',
31499
    'oplus': '\u2295',
31500
    'or': '\u2228',
31501
    'ordf': '\u00AA',
31502
    'ordm': '\u00BA',
31503
    'Oslash': '\u00D8',
31504
    'oslash': '\u00F8',
31505
    'Otilde': '\u00D5',
31506
    'otilde': '\u00F5',
31507
    'otimes': '\u2297',
31508
    'Ouml': '\u00D6',
31509
    'ouml': '\u00F6',
31510
    'para': '\u00B6',
31511
    'permil': '\u2030',
31512
    'perp': '\u22A5',
31513
    'Phi': '\u03A6',
31514
    'phi': '\u03C6',
31515
    'Pi': '\u03A0',
31516
    'pi': '\u03C0',
31517
    'piv': '\u03D6',
31518
    'plusmn': '\u00B1',
31519
    'pound': '\u00A3',
31520
    'prime': '\u2032',
31521
    'Prime': '\u2033',
31522
    'prod': '\u220F',
31523
    'prop': '\u221D',
31524
    'Psi': '\u03A8',
31525
    'psi': '\u03C8',
31526
    'quot': '\u0022',
31527
    'radic': '\u221A',
31528
    'rang': '\u27E9',
31529
    'raquo': '\u00BB',
31530
    'rarr': '\u2192',
31531
    'rArr': '\u21D2',
31532
    'rceil': '\u2309',
31533
    'rdquo': '\u201D',
31534
    'real': '\u211C',
31535
    'reg': '\u00AE',
31536
    'rfloor': '\u230B',
31537
    'Rho': '\u03A1',
31538
    'rho': '\u03C1',
31539
    'rlm': '\u200F',
31540
    'rsaquo': '\u203A',
31541
    'rsquo': '\u2019',
31542
    'sbquo': '\u201A',
31543
    'Scaron': '\u0160',
31544
    'scaron': '\u0161',
31545
    'sdot': '\u22C5',
31546
    'sect': '\u00A7',
31547
    'shy': '\u00AD',
31548
    'Sigma': '\u03A3',
31549
    'sigma': '\u03C3',
31550
    'sigmaf': '\u03C2',
31551
    'sim': '\u223C',
31552
    'spades': '\u2660',
31553
    'sub': '\u2282',
31554
    'sube': '\u2286',
31555
    'sum': '\u2211',
31556
    'sup': '\u2283',
31557
    'sup1': '\u00B9',
31558
    'sup2': '\u00B2',
31559
    'sup3': '\u00B3',
31560
    'supe': '\u2287',
31561
    'szlig': '\u00DF',
31562
    'Tau': '\u03A4',
31563
    'tau': '\u03C4',
31564
    'there4': '\u2234',
31565
    'Theta': '\u0398',
31566
    'theta': '\u03B8',
31567
    'thetasym': '\u03D1',
31568
    'thinsp': '\u2009',
31569
    'THORN': '\u00DE',
31570
    'thorn': '\u00FE',
31571
    'tilde': '\u02DC',
31572
    'times': '\u00D7',
31573
    'trade': '\u2122',
31574
    'Uacute': '\u00DA',
31575
    'uacute': '\u00FA',
31576
    'uarr': '\u2191',
31577
    'uArr': '\u21D1',
31578
    'Ucirc': '\u00DB',
31579
    'ucirc': '\u00FB',
31580
    'Ugrave': '\u00D9',
31581
    'ugrave': '\u00F9',
31582
    'uml': '\u00A8',
31583
    'upsih': '\u03D2',
31584
    'Upsilon': '\u03A5',
31585
    'upsilon': '\u03C5',
31586
    'Uuml': '\u00DC',
31587
    'uuml': '\u00FC',
31588
    'weierp': '\u2118',
31589
    'Xi': '\u039E',
31590
    'xi': '\u03BE',
31591
    'Yacute': '\u00DD',
31592
    'yacute': '\u00FD',
31593
    'yen': '\u00A5',
31594
    'yuml': '\u00FF',
31595
    'Yuml': '\u0178',
31596
    'Zeta': '\u0396',
31597
    'zeta': '\u03B6',
31598
    'zwj': '\u200D',
31599
    'zwnj': '\u200C',
31600
};
31601
// The &ngsp; pseudo-entity is denoting a space. see:
31602
// https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart
31603
var NGSP_UNICODE = '\uE500';
31604
NAMED_ENTITIES['ngsp'] = NGSP_UNICODE;
31605
 
31606
/**
31607
 * @license
31608
 * Copyright Google Inc. All Rights Reserved.
31609
 *
31610
 * Use of this source code is governed by an MIT-style license that can be
31611
 * found in the LICENSE file at https://angular.io/license
31612
 */
31613
var NG_CONTENT_SELECT_ATTR = 'select';
31614
var LINK_ELEMENT = 'link';
31615
var LINK_STYLE_REL_ATTR = 'rel';
31616
var LINK_STYLE_HREF_ATTR = 'href';
31617
var LINK_STYLE_REL_VALUE = 'stylesheet';
31618
var STYLE_ELEMENT = 'style';
31619
var SCRIPT_ELEMENT = 'script';
31620
var NG_NON_BINDABLE_ATTR = 'ngNonBindable';
31621
var NG_PROJECT_AS = 'ngProjectAs';
31622
function preparseElement(ast) {
31623
    var selectAttr = null;
31624
    var hrefAttr = null;
31625
    var relAttr = null;
31626
    var nonBindable = false;
31627
    var projectAs = null;
31628
    ast.attrs.forEach(function (attr) {
31629
        var lcAttrName = attr.name.toLowerCase();
31630
        if (lcAttrName == NG_CONTENT_SELECT_ATTR) {
31631
            selectAttr = attr.value;
31632
        }
31633
        else if (lcAttrName == LINK_STYLE_HREF_ATTR) {
31634
            hrefAttr = attr.value;
31635
        }
31636
        else if (lcAttrName == LINK_STYLE_REL_ATTR) {
31637
            relAttr = attr.value;
31638
        }
31639
        else if (attr.name == NG_NON_BINDABLE_ATTR) {
31640
            nonBindable = true;
31641
        }
31642
        else if (attr.name == NG_PROJECT_AS) {
31643
            if (attr.value.length > 0) {
31644
                projectAs = attr.value;
31645
            }
31646
        }
31647
    });
31648
    selectAttr = normalizeNgContentSelect(selectAttr);
31649
    var nodeName = ast.name.toLowerCase();
31650
    var type = PreparsedElementType.OTHER;
31651
    if (isNgContent(nodeName)) {
31652
        type = PreparsedElementType.NG_CONTENT;
31653
    }
31654
    else if (nodeName == STYLE_ELEMENT) {
31655
        type = PreparsedElementType.STYLE;
31656
    }
31657
    else if (nodeName == SCRIPT_ELEMENT) {
31658
        type = PreparsedElementType.SCRIPT;
31659
    }
31660
    else if (nodeName == LINK_ELEMENT && relAttr == LINK_STYLE_REL_VALUE) {
31661
        type = PreparsedElementType.STYLESHEET;
31662
    }
31663
    return new PreparsedElement(type, selectAttr, hrefAttr, nonBindable, projectAs);
31664
}
31665
var PreparsedElementType;
31666
(function (PreparsedElementType) {
31667
    PreparsedElementType[PreparsedElementType["NG_CONTENT"] = 0] = "NG_CONTENT";
31668
    PreparsedElementType[PreparsedElementType["STYLE"] = 1] = "STYLE";
31669
    PreparsedElementType[PreparsedElementType["STYLESHEET"] = 2] = "STYLESHEET";
31670
    PreparsedElementType[PreparsedElementType["SCRIPT"] = 3] = "SCRIPT";
31671
    PreparsedElementType[PreparsedElementType["OTHER"] = 4] = "OTHER";
31672
})(PreparsedElementType || (PreparsedElementType = {}));
31673
var PreparsedElement = /** @class */ (function () {
31674
    function PreparsedElement(type, selectAttr, hrefAttr, nonBindable, projectAs) {
31675
        this.type = type;
31676
        this.selectAttr = selectAttr;
31677
        this.hrefAttr = hrefAttr;
31678
        this.nonBindable = nonBindable;
31679
        this.projectAs = projectAs;
31680
    }
31681
    return PreparsedElement;
31682
}());
31683
function normalizeNgContentSelect(selectAttr) {
31684
    if (selectAttr === null || selectAttr.length === 0) {
31685
        return '*';
31686
    }
31687
    return selectAttr;
31688
}
31689
 
31690
/**
31691
 * @license
31692
 * Copyright Google Inc. All Rights Reserved.
31693
 *
31694
 * Use of this source code is governed by an MIT-style license that can be
31695
 * found in the LICENSE file at https://angular.io/license
31696
 */
31697
var DirectiveNormalizer = /** @class */ (function () {
31698
    function DirectiveNormalizer(_resourceLoader, _urlResolver, _htmlParser, _config) {
31699
        this._resourceLoader = _resourceLoader;
31700
        this._urlResolver = _urlResolver;
31701
        this._htmlParser = _htmlParser;
31702
        this._config = _config;
31703
        this._resourceLoaderCache = new Map();
31704
    }
31705
    DirectiveNormalizer.prototype.clearCache = function () { this._resourceLoaderCache.clear(); };
31706
    DirectiveNormalizer.prototype.clearCacheFor = function (normalizedDirective) {
31707
        var _this = this;
31708
        if (!normalizedDirective.isComponent) {
31709
            return;
31710
        }
31711
        var template = normalizedDirective.template;
31712
        this._resourceLoaderCache.delete(template.templateUrl);
31713
        template.externalStylesheets.forEach(function (stylesheet) { _this._resourceLoaderCache.delete(stylesheet.moduleUrl); });
31714
    };
31715
    DirectiveNormalizer.prototype._fetch = function (url) {
31716
        var result = this._resourceLoaderCache.get(url);
31717
        if (!result) {
31718
            result = this._resourceLoader.get(url);
31719
            this._resourceLoaderCache.set(url, result);
31720
        }
31721
        return result;
31722
    };
31723
    DirectiveNormalizer.prototype.normalizeTemplate = function (prenormData) {
31724
        var _this = this;
31725
        if (isDefined(prenormData.template)) {
31726
            if (isDefined(prenormData.templateUrl)) {
31727
                throw syntaxError("'" + stringify(prenormData.componentType) + "' component cannot define both template and templateUrl");
31728
            }
31729
            if (typeof prenormData.template !== 'string') {
31730
                throw syntaxError("The template specified for component " + stringify(prenormData.componentType) + " is not a string");
31731
            }
31732
        }
31733
        else if (isDefined(prenormData.templateUrl)) {
31734
            if (typeof prenormData.templateUrl !== 'string') {
31735
                throw syntaxError("The templateUrl specified for component " + stringify(prenormData.componentType) + " is not a string");
31736
            }
31737
        }
31738
        else {
31739
            throw syntaxError("No template specified for component " + stringify(prenormData.componentType));
31740
        }
31741
        if (isDefined(prenormData.preserveWhitespaces) &&
31742
            typeof prenormData.preserveWhitespaces !== 'boolean') {
31743
            throw syntaxError("The preserveWhitespaces option for component " + stringify(prenormData.componentType) + " must be a boolean");
31744
        }
31745
        return SyncAsync.then(this._preParseTemplate(prenormData), function (preparsedTemplate) { return _this._normalizeTemplateMetadata(prenormData, preparsedTemplate); });
31746
    };
31747
    DirectiveNormalizer.prototype._preParseTemplate = function (prenomData) {
31748
        var _this = this;
31749
        var template;
31750
        var templateUrl;
31751
        if (prenomData.template != null) {
31752
            template = prenomData.template;
31753
            templateUrl = prenomData.moduleUrl;
31754
        }
31755
        else {
31756
            templateUrl = this._urlResolver.resolve(prenomData.moduleUrl, prenomData.templateUrl);
31757
            template = this._fetch(templateUrl);
31758
        }
31759
        return SyncAsync.then(template, function (template) { return _this._preparseLoadedTemplate(prenomData, template, templateUrl); });
31760
    };
31761
    DirectiveNormalizer.prototype._preparseLoadedTemplate = function (prenormData, template, templateAbsUrl) {
31762
        var isInline = !!prenormData.template;
31763
        var interpolationConfig = InterpolationConfig.fromArray(prenormData.interpolation);
31764
        var rootNodesAndErrors = this._htmlParser.parse(template, templateSourceUrl({ reference: prenormData.ngModuleType }, { type: { reference: prenormData.componentType } }, { isInline: isInline, templateUrl: templateAbsUrl }), true, interpolationConfig);
31765
        if (rootNodesAndErrors.errors.length > 0) {
31766
            var errorString = rootNodesAndErrors.errors.join('\n');
31767
            throw syntaxError("Template parse errors:\n" + errorString);
31768
        }
31769
        var templateMetadataStyles = this._normalizeStylesheet(new CompileStylesheetMetadata({ styles: prenormData.styles, moduleUrl: prenormData.moduleUrl }));
31770
        var visitor = new TemplatePreparseVisitor();
31771
        visitAll(visitor, rootNodesAndErrors.rootNodes);
31772
        var templateStyles = this._normalizeStylesheet(new CompileStylesheetMetadata({ styles: visitor.styles, styleUrls: visitor.styleUrls, moduleUrl: templateAbsUrl }));
31773
        var styles = templateMetadataStyles.styles.concat(templateStyles.styles);
31774
        var inlineStyleUrls = templateMetadataStyles.styleUrls.concat(templateStyles.styleUrls);
31775
        var styleUrls = this
31776
            ._normalizeStylesheet(new CompileStylesheetMetadata({ styleUrls: prenormData.styleUrls, moduleUrl: prenormData.moduleUrl }))
31777
            .styleUrls;
31778
        return {
31779
            template: template,
31780
            templateUrl: templateAbsUrl, isInline: isInline,
31781
            htmlAst: rootNodesAndErrors, styles: styles, inlineStyleUrls: inlineStyleUrls, styleUrls: styleUrls,
31782
            ngContentSelectors: visitor.ngContentSelectors,
31783
        };
31784
    };
31785
    DirectiveNormalizer.prototype._normalizeTemplateMetadata = function (prenormData, preparsedTemplate) {
31786
        var _this = this;
31787
        return SyncAsync.then(this._loadMissingExternalStylesheets(preparsedTemplate.styleUrls.concat(preparsedTemplate.inlineStyleUrls)), function (externalStylesheets) { return _this._normalizeLoadedTemplateMetadata(prenormData, preparsedTemplate, externalStylesheets); });
31788
    };
31789
    DirectiveNormalizer.prototype._normalizeLoadedTemplateMetadata = function (prenormData, preparsedTemplate, stylesheets) {
31790
        // Algorithm:
31791
        // - produce exactly 1 entry per original styleUrl in
31792
        // CompileTemplateMetadata.externalStylesheets with all styles inlined
31793
        // - inline all styles that are referenced by the template into CompileTemplateMetadata.styles.
31794
        // Reason: be able to determine how many stylesheets there are even without loading
31795
        // the template nor the stylesheets, so we can create a stub for TypeScript always synchronously
31796
        // (as resource loading may be async)
31797
        var _this = this;
31798
        var styles = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(preparsedTemplate.styles);
31799
        this._inlineStyles(preparsedTemplate.inlineStyleUrls, stylesheets, styles);
31800
        var styleUrls = preparsedTemplate.styleUrls;
31801
        var externalStylesheets = styleUrls.map(function (styleUrl) {
31802
            var stylesheet = stylesheets.get(styleUrl);
31803
            var styles = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(stylesheet.styles);
31804
            _this._inlineStyles(stylesheet.styleUrls, stylesheets, styles);
31805
            return new CompileStylesheetMetadata({ moduleUrl: styleUrl, styles: styles });
31806
        });
31807
        var encapsulation = prenormData.encapsulation;
31808
        if (encapsulation == null) {
31809
            encapsulation = this._config.defaultEncapsulation;
31810
        }
31811
        if (encapsulation === ViewEncapsulation.Emulated && styles.length === 0 &&
31812
            styleUrls.length === 0) {
31813
            encapsulation = ViewEncapsulation.None;
31814
        }
31815
        return new CompileTemplateMetadata({
31816
            encapsulation: encapsulation,
31817
            template: preparsedTemplate.template,
31818
            templateUrl: preparsedTemplate.templateUrl,
31819
            htmlAst: preparsedTemplate.htmlAst, styles: styles, styleUrls: styleUrls,
31820
            ngContentSelectors: preparsedTemplate.ngContentSelectors,
31821
            animations: prenormData.animations,
31822
            interpolation: prenormData.interpolation,
31823
            isInline: preparsedTemplate.isInline, externalStylesheets: externalStylesheets,
31824
            preserveWhitespaces: preserveWhitespacesDefault(prenormData.preserveWhitespaces, this._config.preserveWhitespaces),
31825
        });
31826
    };
31827
    DirectiveNormalizer.prototype._inlineStyles = function (styleUrls, stylesheets, targetStyles) {
31828
        var _this = this;
31829
        styleUrls.forEach(function (styleUrl) {
31830
            var stylesheet = stylesheets.get(styleUrl);
31831
            stylesheet.styles.forEach(function (style) { return targetStyles.push(style); });
31832
            _this._inlineStyles(stylesheet.styleUrls, stylesheets, targetStyles);
31833
        });
31834
    };
31835
    DirectiveNormalizer.prototype._loadMissingExternalStylesheets = function (styleUrls, loadedStylesheets) {
31836
        var _this = this;
31837
        if (loadedStylesheets === void 0) { loadedStylesheets = new Map(); }
31838
        return SyncAsync.then(SyncAsync.all(styleUrls.filter(function (styleUrl) { return !loadedStylesheets.has(styleUrl); })
31839
            .map(function (styleUrl) { return SyncAsync.then(_this._fetch(styleUrl), function (loadedStyle) {
31840
            var stylesheet = _this._normalizeStylesheet(new CompileStylesheetMetadata({ styles: [loadedStyle], moduleUrl: styleUrl }));
31841
            loadedStylesheets.set(styleUrl, stylesheet);
31842
            return _this._loadMissingExternalStylesheets(stylesheet.styleUrls, loadedStylesheets);
31843
        }); })), function (_) { return loadedStylesheets; });
31844
    };
31845
    DirectiveNormalizer.prototype._normalizeStylesheet = function (stylesheet) {
31846
        var _this = this;
31847
        var moduleUrl = stylesheet.moduleUrl;
31848
        var allStyleUrls = stylesheet.styleUrls.filter(isStyleUrlResolvable)
31849
            .map(function (url) { return _this._urlResolver.resolve(moduleUrl, url); });
31850
        var allStyles = stylesheet.styles.map(function (style) {
31851
            var styleWithImports = extractStyleUrls(_this._urlResolver, moduleUrl, style);
31852
            allStyleUrls.push.apply(allStyleUrls, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(styleWithImports.styleUrls));
31853
            return styleWithImports.style;
31854
        });
31855
        return new CompileStylesheetMetadata({ styles: allStyles, styleUrls: allStyleUrls, moduleUrl: moduleUrl });
31856
    };
31857
    return DirectiveNormalizer;
31858
}());
31859
var TemplatePreparseVisitor = /** @class */ (function () {
31860
    function TemplatePreparseVisitor() {
31861
        this.ngContentSelectors = [];
31862
        this.styles = [];
31863
        this.styleUrls = [];
31864
        this.ngNonBindableStackCount = 0;
31865
    }
31866
    TemplatePreparseVisitor.prototype.visitElement = function (ast, context) {
31867
        var preparsedElement = preparseElement(ast);
31868
        switch (preparsedElement.type) {
31869
            case PreparsedElementType.NG_CONTENT:
31870
                if (this.ngNonBindableStackCount === 0) {
31871
                    this.ngContentSelectors.push(preparsedElement.selectAttr);
31872
                }
31873
                break;
31874
            case PreparsedElementType.STYLE:
31875
                var textContent_1 = '';
31876
                ast.children.forEach(function (child) {
31877
                    if (child instanceof Text) {
31878
                        textContent_1 += child.value;
31879
                    }
31880
                });
31881
                this.styles.push(textContent_1);
31882
                break;
31883
            case PreparsedElementType.STYLESHEET:
31884
                this.styleUrls.push(preparsedElement.hrefAttr);
31885
                break;
31886
            default:
31887
                break;
31888
        }
31889
        if (preparsedElement.nonBindable) {
31890
            this.ngNonBindableStackCount++;
31891
        }
31892
        visitAll(this, ast.children);
31893
        if (preparsedElement.nonBindable) {
31894
            this.ngNonBindableStackCount--;
31895
        }
31896
        return null;
31897
    };
31898
    TemplatePreparseVisitor.prototype.visitExpansion = function (ast, context) { visitAll(this, ast.cases); };
31899
    TemplatePreparseVisitor.prototype.visitExpansionCase = function (ast, context) {
31900
        visitAll(this, ast.expression);
31901
    };
31902
    TemplatePreparseVisitor.prototype.visitComment = function (ast, context) { return null; };
31903
    TemplatePreparseVisitor.prototype.visitAttribute = function (ast, context) { return null; };
31904
    TemplatePreparseVisitor.prototype.visitText = function (ast, context) { return null; };
31905
    return TemplatePreparseVisitor;
31906
}());
31907
 
31908
/**
31909
 * @license
31910
 * Copyright Google Inc. All Rights Reserved.
31911
 *
31912
 * Use of this source code is governed by an MIT-style license that can be
31913
 * found in the LICENSE file at https://angular.io/license
31914
 */
31915
var QUERY_METADATA_IDENTIFIERS = [
31916
    createViewChild,
31917
    createViewChildren,
31918
    createContentChild,
31919
    createContentChildren,
31920
];
31921
/*
31922
 * Resolve a `Type` for {@link Directive}.
31923
 *
31924
 * This interface can be overridden by the application developer to create custom behavior.
31925
 *
31926
 * See {@link Compiler}
31927
 */
31928
var DirectiveResolver = /** @class */ (function () {
31929
    function DirectiveResolver(_reflector) {
31930
        this._reflector = _reflector;
31931
    }
31932
    DirectiveResolver.prototype.isDirective = function (type) {
31933
        var typeMetadata = this._reflector.annotations(resolveForwardRef(type));
31934
        return typeMetadata && typeMetadata.some(isDirectiveMetadata);
31935
    };
31936
    DirectiveResolver.prototype.resolve = function (type, throwIfNotFound) {
31937
        if (throwIfNotFound === void 0) { throwIfNotFound = true; }
31938
        var typeMetadata = this._reflector.annotations(resolveForwardRef(type));
31939
        if (typeMetadata) {
31940
            var metadata = findLast(typeMetadata, isDirectiveMetadata);
31941
            if (metadata) {
31942
                var propertyMetadata = this._reflector.propMetadata(type);
31943
                var guards = this._reflector.guards(type);
31944
                return this._mergeWithPropertyMetadata(metadata, propertyMetadata, guards, type);
31945
            }
31946
        }
31947
        if (throwIfNotFound) {
31948
            throw new Error("No Directive annotation found on " + stringify(type));
31949
        }
31950
        return null;
31951
    };
31952
    DirectiveResolver.prototype._mergeWithPropertyMetadata = function (dm, propertyMetadata, guards, directiveType) {
31953
        var inputs = [];
31954
        var outputs = [];
31955
        var host = {};
31956
        var queries = {};
31957
        Object.keys(propertyMetadata).forEach(function (propName) {
31958
            var input = findLast(propertyMetadata[propName], function (a) { return createInput.isTypeOf(a); });
31959
            if (input) {
31960
                if (input.bindingPropertyName) {
31961
                    inputs.push(propName + ": " + input.bindingPropertyName);
31962
                }
31963
                else {
31964
                    inputs.push(propName);
31965
                }
31966
            }
31967
            var output = findLast(propertyMetadata[propName], function (a) { return createOutput.isTypeOf(a); });
31968
            if (output) {
31969
                if (output.bindingPropertyName) {
31970
                    outputs.push(propName + ": " + output.bindingPropertyName);
31971
                }
31972
                else {
31973
                    outputs.push(propName);
31974
                }
31975
            }
31976
            var hostBindings = propertyMetadata[propName].filter(function (a) { return createHostBinding.isTypeOf(a); });
31977
            hostBindings.forEach(function (hostBinding) {
31978
                if (hostBinding.hostPropertyName) {
31979
                    var startWith = hostBinding.hostPropertyName[0];
31980
                    if (startWith === '(') {
31981
                        throw new Error("@HostBinding can not bind to events. Use @HostListener instead.");
31982
                    }
31983
                    else if (startWith === '[') {
31984
                        throw new Error("@HostBinding parameter should be a property name, 'class.<name>', or 'attr.<name>'.");
31985
                    }
31986
                    host["[" + hostBinding.hostPropertyName + "]"] = propName;
31987
                }
31988
                else {
31989
                    host["[" + propName + "]"] = propName;
31990
                }
31991
            });
31992
            var hostListeners = propertyMetadata[propName].filter(function (a) { return createHostListener.isTypeOf(a); });
31993
            hostListeners.forEach(function (hostListener) {
31994
                var args = hostListener.args || [];
31995
                host["(" + hostListener.eventName + ")"] = propName + "(" + args.join(',') + ")";
31996
            });
31997
            var query = findLast(propertyMetadata[propName], function (a) { return QUERY_METADATA_IDENTIFIERS.some(function (i) { return i.isTypeOf(a); }); });
31998
            if (query) {
31999
                queries[propName] = query;
32000
            }
32001
        });
32002
        return this._merge(dm, inputs, outputs, host, queries, guards, directiveType);
32003
    };
32004
    DirectiveResolver.prototype._extractPublicName = function (def) { return splitAtColon(def, [null, def])[1].trim(); };
32005
    DirectiveResolver.prototype._dedupeBindings = function (bindings) {
32006
        var names = new Set();
32007
        var publicNames = new Set();
32008
        var reversedResult = [];
32009
        // go last to first to allow later entries to overwrite previous entries
32010
        for (var i = bindings.length - 1; i >= 0; i--) {
32011
            var binding = bindings[i];
32012
            var name_1 = this._extractPublicName(binding);
32013
            publicNames.add(name_1);
32014
            if (!names.has(name_1)) {
32015
                names.add(name_1);
32016
                reversedResult.push(binding);
32017
            }
32018
        }
32019
        return reversedResult.reverse();
32020
    };
32021
    DirectiveResolver.prototype._merge = function (directive, inputs, outputs, host, queries, guards, directiveType) {
32022
        var mergedInputs = this._dedupeBindings(directive.inputs ? directive.inputs.concat(inputs) : inputs);
32023
        var mergedOutputs = this._dedupeBindings(directive.outputs ? directive.outputs.concat(outputs) : outputs);
32024
        var mergedHost = directive.host ? Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, directive.host, host) : host;
32025
        var mergedQueries = directive.queries ? Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, directive.queries, queries) : queries;
32026
        if (createComponent.isTypeOf(directive)) {
32027
            var comp = directive;
32028
            return createComponent({
32029
                selector: comp.selector,
32030
                inputs: mergedInputs,
32031
                outputs: mergedOutputs,
32032
                host: mergedHost,
32033
                exportAs: comp.exportAs,
32034
                moduleId: comp.moduleId,
32035
                queries: mergedQueries,
32036
                changeDetection: comp.changeDetection,
32037
                providers: comp.providers,
32038
                viewProviders: comp.viewProviders,
32039
                entryComponents: comp.entryComponents,
32040
                template: comp.template,
32041
                templateUrl: comp.templateUrl,
32042
                styles: comp.styles,
32043
                styleUrls: comp.styleUrls,
32044
                encapsulation: comp.encapsulation,
32045
                animations: comp.animations,
32046
                interpolation: comp.interpolation,
32047
                preserveWhitespaces: directive.preserveWhitespaces,
32048
            });
32049
        }
32050
        else {
32051
            return createDirective({
32052
                selector: directive.selector,
32053
                inputs: mergedInputs,
32054
                outputs: mergedOutputs,
32055
                host: mergedHost,
32056
                exportAs: directive.exportAs,
32057
                queries: mergedQueries,
32058
                providers: directive.providers, guards: guards
32059
            });
32060
        }
32061
    };
32062
    return DirectiveResolver;
32063
}());
32064
function isDirectiveMetadata(type) {
32065
    return createDirective.isTypeOf(type) || createComponent.isTypeOf(type);
32066
}
32067
function findLast(arr, condition) {
32068
    for (var i = arr.length - 1; i >= 0; i--) {
32069
        if (condition(arr[i])) {
32070
            return arr[i];
32071
        }
32072
    }
32073
    return null;
32074
}
32075
 
32076
/**
32077
 * @license
32078
 * Copyright Google Inc. All Rights Reserved.
32079
 *
32080
 * Use of this source code is governed by an MIT-style license that can be
32081
 * found in the LICENSE file at https://angular.io/license
32082
 */
32083
var $EOF = 0;
32084
var $TAB = 9;
32085
var $LF = 10;
32086
var $VTAB = 11;
32087
var $FF = 12;
32088
var $CR = 13;
32089
var $SPACE = 32;
32090
var $BANG = 33;
32091
var $DQ = 34;
32092
var $HASH = 35;
32093
var $$ = 36;
32094
var $PERCENT = 37;
32095
var $AMPERSAND = 38;
32096
var $SQ = 39;
32097
var $LPAREN = 40;
32098
var $RPAREN = 41;
32099
var $STAR = 42;
32100
var $PLUS = 43;
32101
var $COMMA = 44;
32102
var $MINUS = 45;
32103
var $PERIOD = 46;
32104
var $SLASH = 47;
32105
var $COLON = 58;
32106
var $SEMICOLON = 59;
32107
var $LT = 60;
32108
var $EQ = 61;
32109
var $GT = 62;
32110
var $QUESTION = 63;
32111
var $0 = 48;
32112
var $9 = 57;
32113
var $A = 65;
32114
var $E = 69;
32115
var $F = 70;
32116
var $X = 88;
32117
var $Z = 90;
32118
var $LBRACKET = 91;
32119
var $BACKSLASH = 92;
32120
var $RBRACKET = 93;
32121
var $CARET = 94;
32122
var $_ = 95;
32123
var $a = 97;
32124
var $e = 101;
32125
var $f = 102;
32126
var $n = 110;
32127
var $r = 114;
32128
var $t = 116;
32129
var $u = 117;
32130
var $v = 118;
32131
var $x = 120;
32132
var $z = 122;
32133
var $LBRACE = 123;
32134
var $BAR = 124;
32135
var $RBRACE = 125;
32136
var $NBSP = 160;
32137
 
32138
 
32139
 
32140
var $BT = 96;
32141
function isWhitespace(code) {
32142
    return (code >= $TAB && code <= $SPACE) || (code == $NBSP);
32143
}
32144
function isDigit(code) {
32145
    return $0 <= code && code <= $9;
32146
}
32147
function isAsciiLetter(code) {
32148
    return code >= $a && code <= $z || code >= $A && code <= $Z;
32149
}
32150
function isAsciiHexDigit(code) {
32151
    return code >= $a && code <= $f || code >= $A && code <= $F || isDigit(code);
32152
}
32153
 
32154
/**
32155
 * @license
32156
 * Copyright Google Inc. All Rights Reserved.
32157
 *
32158
 * Use of this source code is governed by an MIT-style license that can be
32159
 * found in the LICENSE file at https://angular.io/license
32160
 */
32161
var TokenType;
32162
(function (TokenType) {
32163
    TokenType[TokenType["Character"] = 0] = "Character";
32164
    TokenType[TokenType["Identifier"] = 1] = "Identifier";
32165
    TokenType[TokenType["Keyword"] = 2] = "Keyword";
32166
    TokenType[TokenType["String"] = 3] = "String";
32167
    TokenType[TokenType["Operator"] = 4] = "Operator";
32168
    TokenType[TokenType["Number"] = 5] = "Number";
32169
    TokenType[TokenType["Error"] = 6] = "Error";
32170
})(TokenType || (TokenType = {}));
32171
var KEYWORDS = ['var', 'let', 'as', 'null', 'undefined', 'true', 'false', 'if', 'else', 'this'];
32172
var Lexer = /** @class */ (function () {
32173
    function Lexer() {
32174
    }
32175
    Lexer.prototype.tokenize = function (text) {
32176
        var scanner = new _Scanner(text);
32177
        var tokens = [];
32178
        var token = scanner.scanToken();
32179
        while (token != null) {
32180
            tokens.push(token);
32181
            token = scanner.scanToken();
32182
        }
32183
        return tokens;
32184
    };
32185
    return Lexer;
32186
}());
32187
var Token = /** @class */ (function () {
32188
    function Token(index, type, numValue, strValue) {
32189
        this.index = index;
32190
        this.type = type;
32191
        this.numValue = numValue;
32192
        this.strValue = strValue;
32193
    }
32194
    Token.prototype.isCharacter = function (code) {
32195
        return this.type == TokenType.Character && this.numValue == code;
32196
    };
32197
    Token.prototype.isNumber = function () { return this.type == TokenType.Number; };
32198
    Token.prototype.isString = function () { return this.type == TokenType.String; };
32199
    Token.prototype.isOperator = function (operater) {
32200
        return this.type == TokenType.Operator && this.strValue == operater;
32201
    };
32202
    Token.prototype.isIdentifier = function () { return this.type == TokenType.Identifier; };
32203
    Token.prototype.isKeyword = function () { return this.type == TokenType.Keyword; };
32204
    Token.prototype.isKeywordLet = function () { return this.type == TokenType.Keyword && this.strValue == 'let'; };
32205
    Token.prototype.isKeywordAs = function () { return this.type == TokenType.Keyword && this.strValue == 'as'; };
32206
    Token.prototype.isKeywordNull = function () { return this.type == TokenType.Keyword && this.strValue == 'null'; };
32207
    Token.prototype.isKeywordUndefined = function () {
32208
        return this.type == TokenType.Keyword && this.strValue == 'undefined';
32209
    };
32210
    Token.prototype.isKeywordTrue = function () { return this.type == TokenType.Keyword && this.strValue == 'true'; };
32211
    Token.prototype.isKeywordFalse = function () { return this.type == TokenType.Keyword && this.strValue == 'false'; };
32212
    Token.prototype.isKeywordThis = function () { return this.type == TokenType.Keyword && this.strValue == 'this'; };
32213
    Token.prototype.isError = function () { return this.type == TokenType.Error; };
32214
    Token.prototype.toNumber = function () { return this.type == TokenType.Number ? this.numValue : -1; };
32215
    Token.prototype.toString = function () {
32216
        switch (this.type) {
32217
            case TokenType.Character:
32218
            case TokenType.Identifier:
32219
            case TokenType.Keyword:
32220
            case TokenType.Operator:
32221
            case TokenType.String:
32222
            case TokenType.Error:
32223
                return this.strValue;
32224
            case TokenType.Number:
32225
                return this.numValue.toString();
32226
            default:
32227
                return null;
32228
        }
32229
    };
32230
    return Token;
32231
}());
32232
function newCharacterToken(index, code) {
32233
    return new Token(index, TokenType.Character, code, String.fromCharCode(code));
32234
}
32235
function newIdentifierToken(index, text) {
32236
    return new Token(index, TokenType.Identifier, 0, text);
32237
}
32238
function newKeywordToken(index, text) {
32239
    return new Token(index, TokenType.Keyword, 0, text);
32240
}
32241
function newOperatorToken(index, text) {
32242
    return new Token(index, TokenType.Operator, 0, text);
32243
}
32244
function newStringToken(index, text) {
32245
    return new Token(index, TokenType.String, 0, text);
32246
}
32247
function newNumberToken(index, n) {
32248
    return new Token(index, TokenType.Number, n, '');
32249
}
32250
function newErrorToken(index, message) {
32251
    return new Token(index, TokenType.Error, 0, message);
32252
}
32253
var EOF = new Token(-1, TokenType.Character, 0, '');
32254
var _Scanner = /** @class */ (function () {
32255
    function _Scanner(input) {
32256
        this.input = input;
32257
        this.peek = 0;
32258
        this.index = -1;
32259
        this.length = input.length;
32260
        this.advance();
32261
    }
32262
    _Scanner.prototype.advance = function () {
32263
        this.peek = ++this.index >= this.length ? $EOF : this.input.charCodeAt(this.index);
32264
    };
32265
    _Scanner.prototype.scanToken = function () {
32266
        var input = this.input, length = this.length;
32267
        var peek = this.peek, index = this.index;
32268
        // Skip whitespace.
32269
        while (peek <= $SPACE) {
32270
            if (++index >= length) {
32271
                peek = $EOF;
32272
                break;
32273
            }
32274
            else {
32275
                peek = input.charCodeAt(index);
32276
            }
32277
        }
32278
        this.peek = peek;
32279
        this.index = index;
32280
        if (index >= length) {
32281
            return null;
32282
        }
32283
        // Handle identifiers and numbers.
32284
        if (isIdentifierStart(peek))
32285
            return this.scanIdentifier();
32286
        if (isDigit(peek))
32287
            return this.scanNumber(index);
32288
        var start = index;
32289
        switch (peek) {
32290
            case $PERIOD:
32291
                this.advance();
32292
                return isDigit(this.peek) ? this.scanNumber(start) :
32293
                    newCharacterToken(start, $PERIOD);
32294
            case $LPAREN:
32295
            case $RPAREN:
32296
            case $LBRACE:
32297
            case $RBRACE:
32298
            case $LBRACKET:
32299
            case $RBRACKET:
32300
            case $COMMA:
32301
            case $COLON:
32302
            case $SEMICOLON:
32303
                return this.scanCharacter(start, peek);
32304
            case $SQ:
32305
            case $DQ:
32306
                return this.scanString();
32307
            case $HASH:
32308
            case $PLUS:
32309
            case $MINUS:
32310
            case $STAR:
32311
            case $SLASH:
32312
            case $PERCENT:
32313
            case $CARET:
32314
                return this.scanOperator(start, String.fromCharCode(peek));
32315
            case $QUESTION:
32316
                return this.scanComplexOperator(start, '?', $PERIOD, '.');
32317
            case $LT:
32318
            case $GT:
32319
                return this.scanComplexOperator(start, String.fromCharCode(peek), $EQ, '=');
32320
            case $BANG:
32321
            case $EQ:
32322
                return this.scanComplexOperator(start, String.fromCharCode(peek), $EQ, '=', $EQ, '=');
32323
            case $AMPERSAND:
32324
                return this.scanComplexOperator(start, '&', $AMPERSAND, '&');
32325
            case $BAR:
32326
                return this.scanComplexOperator(start, '|', $BAR, '|');
32327
            case $NBSP:
32328
                while (isWhitespace(this.peek))
32329
                    this.advance();
32330
                return this.scanToken();
32331
        }
32332
        this.advance();
32333
        return this.error("Unexpected character [" + String.fromCharCode(peek) + "]", 0);
32334
    };
32335
    _Scanner.prototype.scanCharacter = function (start, code) {
32336
        this.advance();
32337
        return newCharacterToken(start, code);
32338
    };
32339
    _Scanner.prototype.scanOperator = function (start, str) {
32340
        this.advance();
32341
        return newOperatorToken(start, str);
32342
    };
32343
    /**
32344
     * Tokenize a 2/3 char long operator
32345
     *
32346
     * @param start start index in the expression
32347
     * @param one first symbol (always part of the operator)
32348
     * @param twoCode code point for the second symbol
32349
     * @param two second symbol (part of the operator when the second code point matches)
32350
     * @param threeCode code point for the third symbol
32351
     * @param three third symbol (part of the operator when provided and matches source expression)
32352
     */
32353
    _Scanner.prototype.scanComplexOperator = function (start, one, twoCode, two, threeCode, three) {
32354
        this.advance();
32355
        var str = one;
32356
        if (this.peek == twoCode) {
32357
            this.advance();
32358
            str += two;
32359
        }
32360
        if (threeCode != null && this.peek == threeCode) {
32361
            this.advance();
32362
            str += three;
32363
        }
32364
        return newOperatorToken(start, str);
32365
    };
32366
    _Scanner.prototype.scanIdentifier = function () {
32367
        var start = this.index;
32368
        this.advance();
32369
        while (isIdentifierPart(this.peek))
32370
            this.advance();
32371
        var str = this.input.substring(start, this.index);
32372
        return KEYWORDS.indexOf(str) > -1 ? newKeywordToken(start, str) :
32373
            newIdentifierToken(start, str);
32374
    };
32375
    _Scanner.prototype.scanNumber = function (start) {
32376
        var simple = (this.index === start);
32377
        this.advance(); // Skip initial digit.
32378
        while (true) {
32379
            if (isDigit(this.peek)) {
32380
                // Do nothing.
32381
            }
32382
            else if (this.peek == $PERIOD) {
32383
                simple = false;
32384
            }
32385
            else if (isExponentStart(this.peek)) {
32386
                this.advance();
32387
                if (isExponentSign(this.peek))
32388
                    this.advance();
32389
                if (!isDigit(this.peek))
32390
                    return this.error('Invalid exponent', -1);
32391
                simple = false;
32392
            }
32393
            else {
32394
                break;
32395
            }
32396
            this.advance();
32397
        }
32398
        var str = this.input.substring(start, this.index);
32399
        var value = simple ? parseIntAutoRadix(str) : parseFloat(str);
32400
        return newNumberToken(start, value);
32401
    };
32402
    _Scanner.prototype.scanString = function () {
32403
        var start = this.index;
32404
        var quote = this.peek;
32405
        this.advance(); // Skip initial quote.
32406
        var buffer = '';
32407
        var marker = this.index;
32408
        var input = this.input;
32409
        while (this.peek != quote) {
32410
            if (this.peek == $BACKSLASH) {
32411
                buffer += input.substring(marker, this.index);
32412
                this.advance();
32413
                var unescapedCode = void 0;
32414
                // Workaround for TS2.1-introduced type strictness
32415
                this.peek = this.peek;
32416
                if (this.peek == $u) {
32417
                    // 4 character hex code for unicode character.
32418
                    var hex = input.substring(this.index + 1, this.index + 5);
32419
                    if (/^[0-9a-f]+$/i.test(hex)) {
32420
                        unescapedCode = parseInt(hex, 16);
32421
                    }
32422
                    else {
32423
                        return this.error("Invalid unicode escape [\\u" + hex + "]", 0);
32424
                    }
32425
                    for (var i = 0; i < 5; i++) {
32426
                        this.advance();
32427
                    }
32428
                }
32429
                else {
32430
                    unescapedCode = unescape(this.peek);
32431
                    this.advance();
32432
                }
32433
                buffer += String.fromCharCode(unescapedCode);
32434
                marker = this.index;
32435
            }
32436
            else if (this.peek == $EOF) {
32437
                return this.error('Unterminated quote', 0);
32438
            }
32439
            else {
32440
                this.advance();
32441
            }
32442
        }
32443
        var last = input.substring(marker, this.index);
32444
        this.advance(); // Skip terminating quote.
32445
        return newStringToken(start, buffer + last);
32446
    };
32447
    _Scanner.prototype.error = function (message, offset) {
32448
        var position = this.index + offset;
32449
        return newErrorToken(position, "Lexer Error: " + message + " at column " + position + " in expression [" + this.input + "]");
32450
    };
32451
    return _Scanner;
32452
}());
32453
function isIdentifierStart(code) {
32454
    return ($a <= code && code <= $z) || ($A <= code && code <= $Z) ||
32455
        (code == $_) || (code == $$);
32456
}
32457
function isIdentifier(input) {
32458
    if (input.length == 0)
32459
        return false;
32460
    var scanner = new _Scanner(input);
32461
    if (!isIdentifierStart(scanner.peek))
32462
        return false;
32463
    scanner.advance();
32464
    while (scanner.peek !== $EOF) {
32465
        if (!isIdentifierPart(scanner.peek))
32466
            return false;
32467
        scanner.advance();
32468
    }
32469
    return true;
32470
}
32471
function isIdentifierPart(code) {
32472
    return isAsciiLetter(code) || isDigit(code) || (code == $_) ||
32473
        (code == $$);
32474
}
32475
function isExponentStart(code) {
32476
    return code == $e || code == $E;
32477
}
32478
function isExponentSign(code) {
32479
    return code == $MINUS || code == $PLUS;
32480
}
32481
function isQuote(code) {
32482
    return code === $SQ || code === $DQ || code === $BT;
32483
}
32484
function unescape(code) {
32485
    switch (code) {
32486
        case $n:
32487
            return $LF;
32488
        case $f:
32489
            return $FF;
32490
        case $r:
32491
            return $CR;
32492
        case $t:
32493
            return $TAB;
32494
        case $v:
32495
            return $VTAB;
32496
        default:
32497
            return code;
32498
    }
32499
}
32500
function parseIntAutoRadix(text) {
32501
    var result = parseInt(text);
32502
    if (isNaN(result)) {
32503
        throw new Error('Invalid integer literal when parsing ' + text);
32504
    }
32505
    return result;
32506
}
32507
 
32508
/**
32509
 * @license
32510
 * Copyright Google Inc. All Rights Reserved.
32511
 *
32512
 * Use of this source code is governed by an MIT-style license that can be
32513
 * found in the LICENSE file at https://angular.io/license
32514
 */
32515
var ParserError = /** @class */ (function () {
32516
    function ParserError(message, input, errLocation, ctxLocation) {
32517
        this.input = input;
32518
        this.errLocation = errLocation;
32519
        this.ctxLocation = ctxLocation;
32520
        this.message = "Parser Error: " + message + " " + errLocation + " [" + input + "] in " + ctxLocation;
32521
    }
32522
    return ParserError;
32523
}());
32524
var ParseSpan = /** @class */ (function () {
32525
    function ParseSpan(start, end) {
32526
        this.start = start;
32527
        this.end = end;
32528
    }
32529
    return ParseSpan;
32530
}());
32531
var AST = /** @class */ (function () {
32532
    function AST(span) {
32533
        this.span = span;
32534
    }
32535
    AST.prototype.visit = function (visitor, context) {
32536
        if (context === void 0) { context = null; }
32537
        return null;
32538
    };
32539
    AST.prototype.toString = function () { return 'AST'; };
32540
    return AST;
32541
}());
32542
/**
32543
 * Represents a quoted expression of the form:
32544
 *
32545
 * quote = prefix `:` uninterpretedExpression
32546
 * prefix = identifier
32547
 * uninterpretedExpression = arbitrary string
32548
 *
32549
 * A quoted expression is meant to be pre-processed by an AST transformer that
32550
 * converts it into another AST that no longer contains quoted expressions.
32551
 * It is meant to allow third-party developers to extend Angular template
32552
 * expression language. The `uninterpretedExpression` part of the quote is
32553
 * therefore not interpreted by the Angular's own expression parser.
32554
 */
32555
var Quote = /** @class */ (function (_super) {
32556
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Quote, _super);
32557
    function Quote(span, prefix, uninterpretedExpression, location) {
32558
        var _this = _super.call(this, span) || this;
32559
        _this.prefix = prefix;
32560
        _this.uninterpretedExpression = uninterpretedExpression;
32561
        _this.location = location;
32562
        return _this;
32563
    }
32564
    Quote.prototype.visit = function (visitor, context) {
32565
        if (context === void 0) { context = null; }
32566
        return visitor.visitQuote(this, context);
32567
    };
32568
    Quote.prototype.toString = function () { return 'Quote'; };
32569
    return Quote;
32570
}(AST));
32571
var EmptyExpr = /** @class */ (function (_super) {
32572
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(EmptyExpr, _super);
32573
    function EmptyExpr() {
32574
        return _super !== null && _super.apply(this, arguments) || this;
32575
    }
32576
    EmptyExpr.prototype.visit = function (visitor, context) {
32577
        if (context === void 0) { context = null; }
32578
        // do nothing
32579
    };
32580
    return EmptyExpr;
32581
}(AST));
32582
var ImplicitReceiver = /** @class */ (function (_super) {
32583
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ImplicitReceiver, _super);
32584
    function ImplicitReceiver() {
32585
        return _super !== null && _super.apply(this, arguments) || this;
32586
    }
32587
    ImplicitReceiver.prototype.visit = function (visitor, context) {
32588
        if (context === void 0) { context = null; }
32589
        return visitor.visitImplicitReceiver(this, context);
32590
    };
32591
    return ImplicitReceiver;
32592
}(AST));
32593
/**
32594
 * Multiple expressions separated by a semicolon.
32595
 */
32596
var Chain = /** @class */ (function (_super) {
32597
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Chain, _super);
32598
    function Chain(span, expressions) {
32599
        var _this = _super.call(this, span) || this;
32600
        _this.expressions = expressions;
32601
        return _this;
32602
    }
32603
    Chain.prototype.visit = function (visitor, context) {
32604
        if (context === void 0) { context = null; }
32605
        return visitor.visitChain(this, context);
32606
    };
32607
    return Chain;
32608
}(AST));
32609
var Conditional = /** @class */ (function (_super) {
32610
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Conditional, _super);
32611
    function Conditional(span, condition, trueExp, falseExp) {
32612
        var _this = _super.call(this, span) || this;
32613
        _this.condition = condition;
32614
        _this.trueExp = trueExp;
32615
        _this.falseExp = falseExp;
32616
        return _this;
32617
    }
32618
    Conditional.prototype.visit = function (visitor, context) {
32619
        if (context === void 0) { context = null; }
32620
        return visitor.visitConditional(this, context);
32621
    };
32622
    return Conditional;
32623
}(AST));
32624
var PropertyRead = /** @class */ (function (_super) {
32625
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PropertyRead, _super);
32626
    function PropertyRead(span, receiver, name) {
32627
        var _this = _super.call(this, span) || this;
32628
        _this.receiver = receiver;
32629
        _this.name = name;
32630
        return _this;
32631
    }
32632
    PropertyRead.prototype.visit = function (visitor, context) {
32633
        if (context === void 0) { context = null; }
32634
        return visitor.visitPropertyRead(this, context);
32635
    };
32636
    return PropertyRead;
32637
}(AST));
32638
var PropertyWrite = /** @class */ (function (_super) {
32639
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PropertyWrite, _super);
32640
    function PropertyWrite(span, receiver, name, value) {
32641
        var _this = _super.call(this, span) || this;
32642
        _this.receiver = receiver;
32643
        _this.name = name;
32644
        _this.value = value;
32645
        return _this;
32646
    }
32647
    PropertyWrite.prototype.visit = function (visitor, context) {
32648
        if (context === void 0) { context = null; }
32649
        return visitor.visitPropertyWrite(this, context);
32650
    };
32651
    return PropertyWrite;
32652
}(AST));
32653
var SafePropertyRead = /** @class */ (function (_super) {
32654
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(SafePropertyRead, _super);
32655
    function SafePropertyRead(span, receiver, name) {
32656
        var _this = _super.call(this, span) || this;
32657
        _this.receiver = receiver;
32658
        _this.name = name;
32659
        return _this;
32660
    }
32661
    SafePropertyRead.prototype.visit = function (visitor, context) {
32662
        if (context === void 0) { context = null; }
32663
        return visitor.visitSafePropertyRead(this, context);
32664
    };
32665
    return SafePropertyRead;
32666
}(AST));
32667
var KeyedRead = /** @class */ (function (_super) {
32668
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(KeyedRead, _super);
32669
    function KeyedRead(span, obj, key) {
32670
        var _this = _super.call(this, span) || this;
32671
        _this.obj = obj;
32672
        _this.key = key;
32673
        return _this;
32674
    }
32675
    KeyedRead.prototype.visit = function (visitor, context) {
32676
        if (context === void 0) { context = null; }
32677
        return visitor.visitKeyedRead(this, context);
32678
    };
32679
    return KeyedRead;
32680
}(AST));
32681
var KeyedWrite = /** @class */ (function (_super) {
32682
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(KeyedWrite, _super);
32683
    function KeyedWrite(span, obj, key, value) {
32684
        var _this = _super.call(this, span) || this;
32685
        _this.obj = obj;
32686
        _this.key = key;
32687
        _this.value = value;
32688
        return _this;
32689
    }
32690
    KeyedWrite.prototype.visit = function (visitor, context) {
32691
        if (context === void 0) { context = null; }
32692
        return visitor.visitKeyedWrite(this, context);
32693
    };
32694
    return KeyedWrite;
32695
}(AST));
32696
var BindingPipe = /** @class */ (function (_super) {
32697
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(BindingPipe, _super);
32698
    function BindingPipe(span, exp, name, args) {
32699
        var _this = _super.call(this, span) || this;
32700
        _this.exp = exp;
32701
        _this.name = name;
32702
        _this.args = args;
32703
        return _this;
32704
    }
32705
    BindingPipe.prototype.visit = function (visitor, context) {
32706
        if (context === void 0) { context = null; }
32707
        return visitor.visitPipe(this, context);
32708
    };
32709
    return BindingPipe;
32710
}(AST));
32711
var LiteralPrimitive = /** @class */ (function (_super) {
32712
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(LiteralPrimitive, _super);
32713
    function LiteralPrimitive(span, value) {
32714
        var _this = _super.call(this, span) || this;
32715
        _this.value = value;
32716
        return _this;
32717
    }
32718
    LiteralPrimitive.prototype.visit = function (visitor, context) {
32719
        if (context === void 0) { context = null; }
32720
        return visitor.visitLiteralPrimitive(this, context);
32721
    };
32722
    return LiteralPrimitive;
32723
}(AST));
32724
var LiteralArray = /** @class */ (function (_super) {
32725
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(LiteralArray, _super);
32726
    function LiteralArray(span, expressions) {
32727
        var _this = _super.call(this, span) || this;
32728
        _this.expressions = expressions;
32729
        return _this;
32730
    }
32731
    LiteralArray.prototype.visit = function (visitor, context) {
32732
        if (context === void 0) { context = null; }
32733
        return visitor.visitLiteralArray(this, context);
32734
    };
32735
    return LiteralArray;
32736
}(AST));
32737
var LiteralMap = /** @class */ (function (_super) {
32738
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(LiteralMap, _super);
32739
    function LiteralMap(span, keys, values) {
32740
        var _this = _super.call(this, span) || this;
32741
        _this.keys = keys;
32742
        _this.values = values;
32743
        return _this;
32744
    }
32745
    LiteralMap.prototype.visit = function (visitor, context) {
32746
        if (context === void 0) { context = null; }
32747
        return visitor.visitLiteralMap(this, context);
32748
    };
32749
    return LiteralMap;
32750
}(AST));
32751
var Interpolation = /** @class */ (function (_super) {
32752
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Interpolation, _super);
32753
    function Interpolation(span, strings, expressions) {
32754
        var _this = _super.call(this, span) || this;
32755
        _this.strings = strings;
32756
        _this.expressions = expressions;
32757
        return _this;
32758
    }
32759
    Interpolation.prototype.visit = function (visitor, context) {
32760
        if (context === void 0) { context = null; }
32761
        return visitor.visitInterpolation(this, context);
32762
    };
32763
    return Interpolation;
32764
}(AST));
32765
var Binary = /** @class */ (function (_super) {
32766
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Binary, _super);
32767
    function Binary(span, operation, left, right) {
32768
        var _this = _super.call(this, span) || this;
32769
        _this.operation = operation;
32770
        _this.left = left;
32771
        _this.right = right;
32772
        return _this;
32773
    }
32774
    Binary.prototype.visit = function (visitor, context) {
32775
        if (context === void 0) { context = null; }
32776
        return visitor.visitBinary(this, context);
32777
    };
32778
    return Binary;
32779
}(AST));
32780
var PrefixNot = /** @class */ (function (_super) {
32781
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PrefixNot, _super);
32782
    function PrefixNot(span, expression) {
32783
        var _this = _super.call(this, span) || this;
32784
        _this.expression = expression;
32785
        return _this;
32786
    }
32787
    PrefixNot.prototype.visit = function (visitor, context) {
32788
        if (context === void 0) { context = null; }
32789
        return visitor.visitPrefixNot(this, context);
32790
    };
32791
    return PrefixNot;
32792
}(AST));
32793
var NonNullAssert = /** @class */ (function (_super) {
32794
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(NonNullAssert, _super);
32795
    function NonNullAssert(span, expression) {
32796
        var _this = _super.call(this, span) || this;
32797
        _this.expression = expression;
32798
        return _this;
32799
    }
32800
    NonNullAssert.prototype.visit = function (visitor, context) {
32801
        if (context === void 0) { context = null; }
32802
        return visitor.visitNonNullAssert(this, context);
32803
    };
32804
    return NonNullAssert;
32805
}(AST));
32806
var MethodCall = /** @class */ (function (_super) {
32807
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MethodCall, _super);
32808
    function MethodCall(span, receiver, name, args) {
32809
        var _this = _super.call(this, span) || this;
32810
        _this.receiver = receiver;
32811
        _this.name = name;
32812
        _this.args = args;
32813
        return _this;
32814
    }
32815
    MethodCall.prototype.visit = function (visitor, context) {
32816
        if (context === void 0) { context = null; }
32817
        return visitor.visitMethodCall(this, context);
32818
    };
32819
    return MethodCall;
32820
}(AST));
32821
var SafeMethodCall = /** @class */ (function (_super) {
32822
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(SafeMethodCall, _super);
32823
    function SafeMethodCall(span, receiver, name, args) {
32824
        var _this = _super.call(this, span) || this;
32825
        _this.receiver = receiver;
32826
        _this.name = name;
32827
        _this.args = args;
32828
        return _this;
32829
    }
32830
    SafeMethodCall.prototype.visit = function (visitor, context) {
32831
        if (context === void 0) { context = null; }
32832
        return visitor.visitSafeMethodCall(this, context);
32833
    };
32834
    return SafeMethodCall;
32835
}(AST));
32836
var FunctionCall = /** @class */ (function (_super) {
32837
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FunctionCall, _super);
32838
    function FunctionCall(span, target, args) {
32839
        var _this = _super.call(this, span) || this;
32840
        _this.target = target;
32841
        _this.args = args;
32842
        return _this;
32843
    }
32844
    FunctionCall.prototype.visit = function (visitor, context) {
32845
        if (context === void 0) { context = null; }
32846
        return visitor.visitFunctionCall(this, context);
32847
    };
32848
    return FunctionCall;
32849
}(AST));
32850
var ASTWithSource = /** @class */ (function (_super) {
32851
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ASTWithSource, _super);
32852
    function ASTWithSource(ast, source, location, errors) {
32853
        var _this = _super.call(this, new ParseSpan(0, source == null ? 0 : source.length)) || this;
32854
        _this.ast = ast;
32855
        _this.source = source;
32856
        _this.location = location;
32857
        _this.errors = errors;
32858
        return _this;
32859
    }
32860
    ASTWithSource.prototype.visit = function (visitor, context) {
32861
        if (context === void 0) { context = null; }
32862
        return this.ast.visit(visitor, context);
32863
    };
32864
    ASTWithSource.prototype.toString = function () { return this.source + " in " + this.location; };
32865
    return ASTWithSource;
32866
}(AST));
32867
var TemplateBinding = /** @class */ (function () {
32868
    function TemplateBinding(span, key, keyIsVar, name, expression) {
32869
        this.span = span;
32870
        this.key = key;
32871
        this.keyIsVar = keyIsVar;
32872
        this.name = name;
32873
        this.expression = expression;
32874
    }
32875
    return TemplateBinding;
32876
}());
32877
var NullAstVisitor = /** @class */ (function () {
32878
    function NullAstVisitor() {
32879
    }
32880
    NullAstVisitor.prototype.visitBinary = function (ast, context) { };
32881
    NullAstVisitor.prototype.visitChain = function (ast, context) { };
32882
    NullAstVisitor.prototype.visitConditional = function (ast, context) { };
32883
    NullAstVisitor.prototype.visitFunctionCall = function (ast, context) { };
32884
    NullAstVisitor.prototype.visitImplicitReceiver = function (ast, context) { };
32885
    NullAstVisitor.prototype.visitInterpolation = function (ast, context) { };
32886
    NullAstVisitor.prototype.visitKeyedRead = function (ast, context) { };
32887
    NullAstVisitor.prototype.visitKeyedWrite = function (ast, context) { };
32888
    NullAstVisitor.prototype.visitLiteralArray = function (ast, context) { };
32889
    NullAstVisitor.prototype.visitLiteralMap = function (ast, context) { };
32890
    NullAstVisitor.prototype.visitLiteralPrimitive = function (ast, context) { };
32891
    NullAstVisitor.prototype.visitMethodCall = function (ast, context) { };
32892
    NullAstVisitor.prototype.visitPipe = function (ast, context) { };
32893
    NullAstVisitor.prototype.visitPrefixNot = function (ast, context) { };
32894
    NullAstVisitor.prototype.visitNonNullAssert = function (ast, context) { };
32895
    NullAstVisitor.prototype.visitPropertyRead = function (ast, context) { };
32896
    NullAstVisitor.prototype.visitPropertyWrite = function (ast, context) { };
32897
    NullAstVisitor.prototype.visitQuote = function (ast, context) { };
32898
    NullAstVisitor.prototype.visitSafeMethodCall = function (ast, context) { };
32899
    NullAstVisitor.prototype.visitSafePropertyRead = function (ast, context) { };
32900
    return NullAstVisitor;
32901
}());
32902
var RecursiveAstVisitor = /** @class */ (function () {
32903
    function RecursiveAstVisitor() {
32904
    }
32905
    RecursiveAstVisitor.prototype.visitBinary = function (ast, context) {
32906
        ast.left.visit(this);
32907
        ast.right.visit(this);
32908
        return null;
32909
    };
32910
    RecursiveAstVisitor.prototype.visitChain = function (ast, context) { return this.visitAll(ast.expressions, context); };
32911
    RecursiveAstVisitor.prototype.visitConditional = function (ast, context) {
32912
        ast.condition.visit(this);
32913
        ast.trueExp.visit(this);
32914
        ast.falseExp.visit(this);
32915
        return null;
32916
    };
32917
    RecursiveAstVisitor.prototype.visitPipe = function (ast, context) {
32918
        ast.exp.visit(this);
32919
        this.visitAll(ast.args, context);
32920
        return null;
32921
    };
32922
    RecursiveAstVisitor.prototype.visitFunctionCall = function (ast, context) {
32923
        ast.target.visit(this);
32924
        this.visitAll(ast.args, context);
32925
        return null;
32926
    };
32927
    RecursiveAstVisitor.prototype.visitImplicitReceiver = function (ast, context) { return null; };
32928
    RecursiveAstVisitor.prototype.visitInterpolation = function (ast, context) {
32929
        return this.visitAll(ast.expressions, context);
32930
    };
32931
    RecursiveAstVisitor.prototype.visitKeyedRead = function (ast, context) {
32932
        ast.obj.visit(this);
32933
        ast.key.visit(this);
32934
        return null;
32935
    };
32936
    RecursiveAstVisitor.prototype.visitKeyedWrite = function (ast, context) {
32937
        ast.obj.visit(this);
32938
        ast.key.visit(this);
32939
        ast.value.visit(this);
32940
        return null;
32941
    };
32942
    RecursiveAstVisitor.prototype.visitLiteralArray = function (ast, context) {
32943
        return this.visitAll(ast.expressions, context);
32944
    };
32945
    RecursiveAstVisitor.prototype.visitLiteralMap = function (ast, context) { return this.visitAll(ast.values, context); };
32946
    RecursiveAstVisitor.prototype.visitLiteralPrimitive = function (ast, context) { return null; };
32947
    RecursiveAstVisitor.prototype.visitMethodCall = function (ast, context) {
32948
        ast.receiver.visit(this);
32949
        return this.visitAll(ast.args, context);
32950
    };
32951
    RecursiveAstVisitor.prototype.visitPrefixNot = function (ast, context) {
32952
        ast.expression.visit(this);
32953
        return null;
32954
    };
32955
    RecursiveAstVisitor.prototype.visitNonNullAssert = function (ast, context) {
32956
        ast.expression.visit(this);
32957
        return null;
32958
    };
32959
    RecursiveAstVisitor.prototype.visitPropertyRead = function (ast, context) {
32960
        ast.receiver.visit(this);
32961
        return null;
32962
    };
32963
    RecursiveAstVisitor.prototype.visitPropertyWrite = function (ast, context) {
32964
        ast.receiver.visit(this);
32965
        ast.value.visit(this);
32966
        return null;
32967
    };
32968
    RecursiveAstVisitor.prototype.visitSafePropertyRead = function (ast, context) {
32969
        ast.receiver.visit(this);
32970
        return null;
32971
    };
32972
    RecursiveAstVisitor.prototype.visitSafeMethodCall = function (ast, context) {
32973
        ast.receiver.visit(this);
32974
        return this.visitAll(ast.args, context);
32975
    };
32976
    RecursiveAstVisitor.prototype.visitAll = function (asts, context) {
32977
        var _this = this;
32978
        asts.forEach(function (ast) { return ast.visit(_this, context); });
32979
        return null;
32980
    };
32981
    RecursiveAstVisitor.prototype.visitQuote = function (ast, context) { return null; };
32982
    return RecursiveAstVisitor;
32983
}());
32984
var AstTransformer = /** @class */ (function () {
32985
    function AstTransformer() {
32986
    }
32987
    AstTransformer.prototype.visitImplicitReceiver = function (ast, context) { return ast; };
32988
    AstTransformer.prototype.visitInterpolation = function (ast, context) {
32989
        return new Interpolation(ast.span, ast.strings, this.visitAll(ast.expressions));
32990
    };
32991
    AstTransformer.prototype.visitLiteralPrimitive = function (ast, context) {
32992
        return new LiteralPrimitive(ast.span, ast.value);
32993
    };
32994
    AstTransformer.prototype.visitPropertyRead = function (ast, context) {
32995
        return new PropertyRead(ast.span, ast.receiver.visit(this), ast.name);
32996
    };
32997
    AstTransformer.prototype.visitPropertyWrite = function (ast, context) {
32998
        return new PropertyWrite(ast.span, ast.receiver.visit(this), ast.name, ast.value.visit(this));
32999
    };
33000
    AstTransformer.prototype.visitSafePropertyRead = function (ast, context) {
33001
        return new SafePropertyRead(ast.span, ast.receiver.visit(this), ast.name);
33002
    };
33003
    AstTransformer.prototype.visitMethodCall = function (ast, context) {
33004
        return new MethodCall(ast.span, ast.receiver.visit(this), ast.name, this.visitAll(ast.args));
33005
    };
33006
    AstTransformer.prototype.visitSafeMethodCall = function (ast, context) {
33007
        return new SafeMethodCall(ast.span, ast.receiver.visit(this), ast.name, this.visitAll(ast.args));
33008
    };
33009
    AstTransformer.prototype.visitFunctionCall = function (ast, context) {
33010
        return new FunctionCall(ast.span, ast.target.visit(this), this.visitAll(ast.args));
33011
    };
33012
    AstTransformer.prototype.visitLiteralArray = function (ast, context) {
33013
        return new LiteralArray(ast.span, this.visitAll(ast.expressions));
33014
    };
33015
    AstTransformer.prototype.visitLiteralMap = function (ast, context) {
33016
        return new LiteralMap(ast.span, ast.keys, this.visitAll(ast.values));
33017
    };
33018
    AstTransformer.prototype.visitBinary = function (ast, context) {
33019
        return new Binary(ast.span, ast.operation, ast.left.visit(this), ast.right.visit(this));
33020
    };
33021
    AstTransformer.prototype.visitPrefixNot = function (ast, context) {
33022
        return new PrefixNot(ast.span, ast.expression.visit(this));
33023
    };
33024
    AstTransformer.prototype.visitNonNullAssert = function (ast, context) {
33025
        return new NonNullAssert(ast.span, ast.expression.visit(this));
33026
    };
33027
    AstTransformer.prototype.visitConditional = function (ast, context) {
33028
        return new Conditional(ast.span, ast.condition.visit(this), ast.trueExp.visit(this), ast.falseExp.visit(this));
33029
    };
33030
    AstTransformer.prototype.visitPipe = function (ast, context) {
33031
        return new BindingPipe(ast.span, ast.exp.visit(this), ast.name, this.visitAll(ast.args));
33032
    };
33033
    AstTransformer.prototype.visitKeyedRead = function (ast, context) {
33034
        return new KeyedRead(ast.span, ast.obj.visit(this), ast.key.visit(this));
33035
    };
33036
    AstTransformer.prototype.visitKeyedWrite = function (ast, context) {
33037
        return new KeyedWrite(ast.span, ast.obj.visit(this), ast.key.visit(this), ast.value.visit(this));
33038
    };
33039
    AstTransformer.prototype.visitAll = function (asts) {
33040
        var res = new Array(asts.length);
33041
        for (var i = 0; i < asts.length; ++i) {
33042
            res[i] = asts[i].visit(this);
33043
        }
33044
        return res;
33045
    };
33046
    AstTransformer.prototype.visitChain = function (ast, context) {
33047
        return new Chain(ast.span, this.visitAll(ast.expressions));
33048
    };
33049
    AstTransformer.prototype.visitQuote = function (ast, context) {
33050
        return new Quote(ast.span, ast.prefix, ast.uninterpretedExpression, ast.location);
33051
    };
33052
    return AstTransformer;
33053
}());
33054
// A transformer that only creates new nodes if the transformer makes a change or
33055
// a change is made a child node.
33056
var AstMemoryEfficientTransformer = /** @class */ (function () {
33057
    function AstMemoryEfficientTransformer() {
33058
    }
33059
    AstMemoryEfficientTransformer.prototype.visitImplicitReceiver = function (ast, context) { return ast; };
33060
    AstMemoryEfficientTransformer.prototype.visitInterpolation = function (ast, context) {
33061
        var expressions = this.visitAll(ast.expressions);
33062
        if (expressions !== ast.expressions)
33063
            return new Interpolation(ast.span, ast.strings, expressions);
33064
        return ast;
33065
    };
33066
    AstMemoryEfficientTransformer.prototype.visitLiteralPrimitive = function (ast, context) { return ast; };
33067
    AstMemoryEfficientTransformer.prototype.visitPropertyRead = function (ast, context) {
33068
        var receiver = ast.receiver.visit(this);
33069
        if (receiver !== ast.receiver) {
33070
            return new PropertyRead(ast.span, receiver, ast.name);
33071
        }
33072
        return ast;
33073
    };
33074
    AstMemoryEfficientTransformer.prototype.visitPropertyWrite = function (ast, context) {
33075
        var receiver = ast.receiver.visit(this);
33076
        var value = ast.value.visit(this);
33077
        if (receiver !== ast.receiver || value !== ast.value) {
33078
            return new PropertyWrite(ast.span, receiver, ast.name, value);
33079
        }
33080
        return ast;
33081
    };
33082
    AstMemoryEfficientTransformer.prototype.visitSafePropertyRead = function (ast, context) {
33083
        var receiver = ast.receiver.visit(this);
33084
        if (receiver !== ast.receiver) {
33085
            return new SafePropertyRead(ast.span, receiver, ast.name);
33086
        }
33087
        return ast;
33088
    };
33089
    AstMemoryEfficientTransformer.prototype.visitMethodCall = function (ast, context) {
33090
        var receiver = ast.receiver.visit(this);
33091
        if (receiver !== ast.receiver) {
33092
            return new MethodCall(ast.span, receiver, ast.name, this.visitAll(ast.args));
33093
        }
33094
        return ast;
33095
    };
33096
    AstMemoryEfficientTransformer.prototype.visitSafeMethodCall = function (ast, context) {
33097
        var receiver = ast.receiver.visit(this);
33098
        var args = this.visitAll(ast.args);
33099
        if (receiver !== ast.receiver || args !== ast.args) {
33100
            return new SafeMethodCall(ast.span, receiver, ast.name, args);
33101
        }
33102
        return ast;
33103
    };
33104
    AstMemoryEfficientTransformer.prototype.visitFunctionCall = function (ast, context) {
33105
        var target = ast.target && ast.target.visit(this);
33106
        var args = this.visitAll(ast.args);
33107
        if (target !== ast.target || args !== ast.args) {
33108
            return new FunctionCall(ast.span, target, args);
33109
        }
33110
        return ast;
33111
    };
33112
    AstMemoryEfficientTransformer.prototype.visitLiteralArray = function (ast, context) {
33113
        var expressions = this.visitAll(ast.expressions);
33114
        if (expressions !== ast.expressions) {
33115
            return new LiteralArray(ast.span, expressions);
33116
        }
33117
        return ast;
33118
    };
33119
    AstMemoryEfficientTransformer.prototype.visitLiteralMap = function (ast, context) {
33120
        var values = this.visitAll(ast.values);
33121
        if (values !== ast.values) {
33122
            return new LiteralMap(ast.span, ast.keys, values);
33123
        }
33124
        return ast;
33125
    };
33126
    AstMemoryEfficientTransformer.prototype.visitBinary = function (ast, context) {
33127
        var left = ast.left.visit(this);
33128
        var right = ast.right.visit(this);
33129
        if (left !== ast.left || right !== ast.right) {
33130
            return new Binary(ast.span, ast.operation, left, right);
33131
        }
33132
        return ast;
33133
    };
33134
    AstMemoryEfficientTransformer.prototype.visitPrefixNot = function (ast, context) {
33135
        var expression = ast.expression.visit(this);
33136
        if (expression !== ast.expression) {
33137
            return new PrefixNot(ast.span, expression);
33138
        }
33139
        return ast;
33140
    };
33141
    AstMemoryEfficientTransformer.prototype.visitNonNullAssert = function (ast, context) {
33142
        var expression = ast.expression.visit(this);
33143
        if (expression !== ast.expression) {
33144
            return new NonNullAssert(ast.span, expression);
33145
        }
33146
        return ast;
33147
    };
33148
    AstMemoryEfficientTransformer.prototype.visitConditional = function (ast, context) {
33149
        var condition = ast.condition.visit(this);
33150
        var trueExp = ast.trueExp.visit(this);
33151
        var falseExp = ast.falseExp.visit(this);
33152
        if (condition !== ast.condition || trueExp !== ast.trueExp || falseExp !== falseExp) {
33153
            return new Conditional(ast.span, condition, trueExp, falseExp);
33154
        }
33155
        return ast;
33156
    };
33157
    AstMemoryEfficientTransformer.prototype.visitPipe = function (ast, context) {
33158
        var exp = ast.exp.visit(this);
33159
        var args = this.visitAll(ast.args);
33160
        if (exp !== ast.exp || args !== ast.args) {
33161
            return new BindingPipe(ast.span, exp, ast.name, args);
33162
        }
33163
        return ast;
33164
    };
33165
    AstMemoryEfficientTransformer.prototype.visitKeyedRead = function (ast, context) {
33166
        var obj = ast.obj.visit(this);
33167
        var key = ast.key.visit(this);
33168
        if (obj !== ast.obj || key !== ast.key) {
33169
            return new KeyedRead(ast.span, obj, key);
33170
        }
33171
        return ast;
33172
    };
33173
    AstMemoryEfficientTransformer.prototype.visitKeyedWrite = function (ast, context) {
33174
        var obj = ast.obj.visit(this);
33175
        var key = ast.key.visit(this);
33176
        var value = ast.value.visit(this);
33177
        if (obj !== ast.obj || key !== ast.key || value !== ast.value) {
33178
            return new KeyedWrite(ast.span, obj, key, value);
33179
        }
33180
        return ast;
33181
    };
33182
    AstMemoryEfficientTransformer.prototype.visitAll = function (asts) {
33183
        var res = new Array(asts.length);
33184
        var modified = false;
33185
        for (var i = 0; i < asts.length; ++i) {
33186
            var original = asts[i];
33187
            var value = original.visit(this);
33188
            res[i] = value;
33189
            modified = modified || value !== original;
33190
        }
33191
        return modified ? res : asts;
33192
    };
33193
    AstMemoryEfficientTransformer.prototype.visitChain = function (ast, context) {
33194
        var expressions = this.visitAll(ast.expressions);
33195
        if (expressions !== ast.expressions) {
33196
            return new Chain(ast.span, expressions);
33197
        }
33198
        return ast;
33199
    };
33200
    AstMemoryEfficientTransformer.prototype.visitQuote = function (ast, context) { return ast; };
33201
    return AstMemoryEfficientTransformer;
33202
}());
33203
function visitAstChildren(ast, visitor, context) {
33204
    function visit(ast) {
33205
        visitor.visit && visitor.visit(ast, context) || ast.visit(visitor, context);
33206
    }
33207
    function visitAll(asts) { asts.forEach(visit); }
33208
    ast.visit({
33209
        visitBinary: function (ast) {
33210
            visit(ast.left);
33211
            visit(ast.right);
33212
        },
33213
        visitChain: function (ast) { visitAll(ast.expressions); },
33214
        visitConditional: function (ast) {
33215
            visit(ast.condition);
33216
            visit(ast.trueExp);
33217
            visit(ast.falseExp);
33218
        },
33219
        visitFunctionCall: function (ast) {
33220
            if (ast.target) {
33221
                visit(ast.target);
33222
            }
33223
            visitAll(ast.args);
33224
        },
33225
        visitImplicitReceiver: function (ast) { },
33226
        visitInterpolation: function (ast) { visitAll(ast.expressions); },
33227
        visitKeyedRead: function (ast) {
33228
            visit(ast.obj);
33229
            visit(ast.key);
33230
        },
33231
        visitKeyedWrite: function (ast) {
33232
            visit(ast.obj);
33233
            visit(ast.key);
33234
            visit(ast.obj);
33235
        },
33236
        visitLiteralArray: function (ast) { visitAll(ast.expressions); },
33237
        visitLiteralMap: function (ast) { },
33238
        visitLiteralPrimitive: function (ast) { },
33239
        visitMethodCall: function (ast) {
33240
            visit(ast.receiver);
33241
            visitAll(ast.args);
33242
        },
33243
        visitPipe: function (ast) {
33244
            visit(ast.exp);
33245
            visitAll(ast.args);
33246
        },
33247
        visitPrefixNot: function (ast) { visit(ast.expression); },
33248
        visitNonNullAssert: function (ast) { visit(ast.expression); },
33249
        visitPropertyRead: function (ast) { visit(ast.receiver); },
33250
        visitPropertyWrite: function (ast) {
33251
            visit(ast.receiver);
33252
            visit(ast.value);
33253
        },
33254
        visitQuote: function (ast) { },
33255
        visitSafeMethodCall: function (ast) {
33256
            visit(ast.receiver);
33257
            visitAll(ast.args);
33258
        },
33259
        visitSafePropertyRead: function (ast) { visit(ast.receiver); },
33260
    });
33261
}
33262
 
33263
/**
33264
 * @license
33265
 * Copyright Google Inc. All Rights Reserved.
33266
 *
33267
 * Use of this source code is governed by an MIT-style license that can be
33268
 * found in the LICENSE file at https://angular.io/license
33269
 */
33270
var SplitInterpolation = /** @class */ (function () {
33271
    function SplitInterpolation(strings, expressions, offsets) {
33272
        this.strings = strings;
33273
        this.expressions = expressions;
33274
        this.offsets = offsets;
33275
    }
33276
    return SplitInterpolation;
33277
}());
33278
var TemplateBindingParseResult = /** @class */ (function () {
33279
    function TemplateBindingParseResult(templateBindings, warnings, errors) {
33280
        this.templateBindings = templateBindings;
33281
        this.warnings = warnings;
33282
        this.errors = errors;
33283
    }
33284
    return TemplateBindingParseResult;
33285
}());
33286
function _createInterpolateRegExp(config) {
33287
    var pattern = escapeRegExp(config.start) + '([\\s\\S]*?)' + escapeRegExp(config.end);
33288
    return new RegExp(pattern, 'g');
33289
}
33290
var Parser = /** @class */ (function () {
33291
    function Parser(_lexer) {
33292
        this._lexer = _lexer;
33293
        this.errors = [];
33294
    }
33295
    Parser.prototype.parseAction = function (input, location, interpolationConfig) {
33296
        if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }
33297
        this._checkNoInterpolation(input, location, interpolationConfig);
33298
        var sourceToLex = this._stripComments(input);
33299
        var tokens = this._lexer.tokenize(this._stripComments(input));
33300
        var ast = new _ParseAST(input, location, tokens, sourceToLex.length, true, this.errors, input.length - sourceToLex.length)
33301
            .parseChain();
33302
        return new ASTWithSource(ast, input, location, this.errors);
33303
    };
33304
    Parser.prototype.parseBinding = function (input, location, interpolationConfig) {
33305
        if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }
33306
        var ast = this._parseBindingAst(input, location, interpolationConfig);
33307
        return new ASTWithSource(ast, input, location, this.errors);
33308
    };
33309
    Parser.prototype.parseSimpleBinding = function (input, location, interpolationConfig) {
33310
        if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }
33311
        var ast = this._parseBindingAst(input, location, interpolationConfig);
33312
        var errors = SimpleExpressionChecker.check(ast);
33313
        if (errors.length > 0) {
33314
            this._reportError("Host binding expression cannot contain " + errors.join(' '), input, location);
33315
        }
33316
        return new ASTWithSource(ast, input, location, this.errors);
33317
    };
33318
    Parser.prototype._reportError = function (message, input, errLocation, ctxLocation) {
33319
        this.errors.push(new ParserError(message, input, errLocation, ctxLocation));
33320
    };
33321
    Parser.prototype._parseBindingAst = function (input, location, interpolationConfig) {
33322
        // Quotes expressions use 3rd-party expression language. We don't want to use
33323
        // our lexer or parser for that, so we check for that ahead of time.
33324
        var quote = this._parseQuote(input, location);
33325
        if (quote != null) {
33326
            return quote;
33327
        }
33328
        this._checkNoInterpolation(input, location, interpolationConfig);
33329
        var sourceToLex = this._stripComments(input);
33330
        var tokens = this._lexer.tokenize(sourceToLex);
33331
        return new _ParseAST(input, location, tokens, sourceToLex.length, false, this.errors, input.length - sourceToLex.length)
33332
            .parseChain();
33333
    };
33334
    Parser.prototype._parseQuote = function (input, location) {
33335
        if (input == null)
33336
            return null;
33337
        var prefixSeparatorIndex = input.indexOf(':');
33338
        if (prefixSeparatorIndex == -1)
33339
            return null;
33340
        var prefix = input.substring(0, prefixSeparatorIndex).trim();
33341
        if (!isIdentifier(prefix))
33342
            return null;
33343
        var uninterpretedExpression = input.substring(prefixSeparatorIndex + 1);
33344
        return new Quote(new ParseSpan(0, input.length), prefix, uninterpretedExpression, location);
33345
    };
33346
    Parser.prototype.parseTemplateBindings = function (prefixToken, input, location) {
33347
        var tokens = this._lexer.tokenize(input);
33348
        if (prefixToken) {
33349
            // Prefix the tokens with the tokens from prefixToken but have them take no space (0 index).
33350
            var prefixTokens = this._lexer.tokenize(prefixToken).map(function (t) {
33351
                t.index = 0;
33352
                return t;
33353
            });
33354
            tokens.unshift.apply(tokens, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(prefixTokens));
33355
        }
33356
        return new _ParseAST(input, location, tokens, input.length, false, this.errors, 0)
33357
            .parseTemplateBindings();
33358
    };
33359
    Parser.prototype.parseInterpolation = function (input, location, interpolationConfig) {
33360
        if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }
33361
        var split = this.splitInterpolation(input, location, interpolationConfig);
33362
        if (split == null)
33363
            return null;
33364
        var expressions = [];
33365
        for (var i = 0; i < split.expressions.length; ++i) {
33366
            var expressionText = split.expressions[i];
33367
            var sourceToLex = this._stripComments(expressionText);
33368
            var tokens = this._lexer.tokenize(sourceToLex);
33369
            var ast = new _ParseAST(input, location, tokens, sourceToLex.length, false, this.errors, split.offsets[i] + (expressionText.length - sourceToLex.length))
33370
                .parseChain();
33371
            expressions.push(ast);
33372
        }
33373
        return new ASTWithSource(new Interpolation(new ParseSpan(0, input == null ? 0 : input.length), split.strings, expressions), input, location, this.errors);
33374
    };
33375
    Parser.prototype.splitInterpolation = function (input, location, interpolationConfig) {
33376
        if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }
33377
        var regexp = _createInterpolateRegExp(interpolationConfig);
33378
        var parts = input.split(regexp);
33379
        if (parts.length <= 1) {
33380
            return null;
33381
        }
33382
        var strings = [];
33383
        var expressions = [];
33384
        var offsets = [];
33385
        var offset = 0;
33386
        for (var i = 0; i < parts.length; i++) {
33387
            var part = parts[i];
33388
            if (i % 2 === 0) {
33389
                // fixed string
33390
                strings.push(part);
33391
                offset += part.length;
33392
            }
33393
            else if (part.trim().length > 0) {
33394
                offset += interpolationConfig.start.length;
33395
                expressions.push(part);
33396
                offsets.push(offset);
33397
                offset += part.length + interpolationConfig.end.length;
33398
            }
33399
            else {
33400
                this._reportError('Blank expressions are not allowed in interpolated strings', input, "at column " + this._findInterpolationErrorColumn(parts, i, interpolationConfig) + " in", location);
33401
                expressions.push('$implict');
33402
                offsets.push(offset);
33403
            }
33404
        }
33405
        return new SplitInterpolation(strings, expressions, offsets);
33406
    };
33407
    Parser.prototype.wrapLiteralPrimitive = function (input, location) {
33408
        return new ASTWithSource(new LiteralPrimitive(new ParseSpan(0, input == null ? 0 : input.length), input), input, location, this.errors);
33409
    };
33410
    Parser.prototype._stripComments = function (input) {
33411
        var i = this._commentStart(input);
33412
        return i != null ? input.substring(0, i).trim() : input;
33413
    };
33414
    Parser.prototype._commentStart = function (input) {
33415
        var outerQuote = null;
33416
        for (var i = 0; i < input.length - 1; i++) {
33417
            var char = input.charCodeAt(i);
33418
            var nextChar = input.charCodeAt(i + 1);
33419
            if (char === $SLASH && nextChar == $SLASH && outerQuote == null)
33420
                return i;
33421
            if (outerQuote === char) {
33422
                outerQuote = null;
33423
            }
33424
            else if (outerQuote == null && isQuote(char)) {
33425
                outerQuote = char;
33426
            }
33427
        }
33428
        return null;
33429
    };
33430
    Parser.prototype._checkNoInterpolation = function (input, location, interpolationConfig) {
33431
        var regexp = _createInterpolateRegExp(interpolationConfig);
33432
        var parts = input.split(regexp);
33433
        if (parts.length > 1) {
33434
            this._reportError("Got interpolation (" + interpolationConfig.start + interpolationConfig.end + ") where expression was expected", input, "at column " + this._findInterpolationErrorColumn(parts, 1, interpolationConfig) + " in", location);
33435
        }
33436
    };
33437
    Parser.prototype._findInterpolationErrorColumn = function (parts, partInErrIdx, interpolationConfig) {
33438
        var errLocation = '';
33439
        for (var j = 0; j < partInErrIdx; j++) {
33440
            errLocation += j % 2 === 0 ?
33441
                parts[j] :
33442
                "" + interpolationConfig.start + parts[j] + interpolationConfig.end;
33443
        }
33444
        return errLocation.length;
33445
    };
33446
    return Parser;
33447
}());
33448
var _ParseAST = /** @class */ (function () {
33449
    function _ParseAST(input, location, tokens, inputLength, parseAction, errors, offset) {
33450
        this.input = input;
33451
        this.location = location;
33452
        this.tokens = tokens;
33453
        this.inputLength = inputLength;
33454
        this.parseAction = parseAction;
33455
        this.errors = errors;
33456
        this.offset = offset;
33457
        this.rparensExpected = 0;
33458
        this.rbracketsExpected = 0;
33459
        this.rbracesExpected = 0;
33460
        this.index = 0;
33461
    }
33462
    _ParseAST.prototype.peek = function (offset) {
33463
        var i = this.index + offset;
33464
        return i < this.tokens.length ? this.tokens[i] : EOF;
33465
    };
33466
    Object.defineProperty(_ParseAST.prototype, "next", {
33467
        get: function () { return this.peek(0); },
33468
        enumerable: true,
33469
        configurable: true
33470
    });
33471
    Object.defineProperty(_ParseAST.prototype, "inputIndex", {
33472
        get: function () {
33473
            return (this.index < this.tokens.length) ? this.next.index + this.offset :
33474
                this.inputLength + this.offset;
33475
        },
33476
        enumerable: true,
33477
        configurable: true
33478
    });
33479
    _ParseAST.prototype.span = function (start) { return new ParseSpan(start, this.inputIndex); };
33480
    _ParseAST.prototype.advance = function () { this.index++; };
33481
    _ParseAST.prototype.optionalCharacter = function (code) {
33482
        if (this.next.isCharacter(code)) {
33483
            this.advance();
33484
            return true;
33485
        }
33486
        else {
33487
            return false;
33488
        }
33489
    };
33490
    _ParseAST.prototype.peekKeywordLet = function () { return this.next.isKeywordLet(); };
33491
    _ParseAST.prototype.peekKeywordAs = function () { return this.next.isKeywordAs(); };
33492
    _ParseAST.prototype.expectCharacter = function (code) {
33493
        if (this.optionalCharacter(code))
33494
            return;
33495
        this.error("Missing expected " + String.fromCharCode(code));
33496
    };
33497
    _ParseAST.prototype.optionalOperator = function (op) {
33498
        if (this.next.isOperator(op)) {
33499
            this.advance();
33500
            return true;
33501
        }
33502
        else {
33503
            return false;
33504
        }
33505
    };
33506
    _ParseAST.prototype.expectOperator = function (operator) {
33507
        if (this.optionalOperator(operator))
33508
            return;
33509
        this.error("Missing expected operator " + operator);
33510
    };
33511
    _ParseAST.prototype.expectIdentifierOrKeyword = function () {
33512
        var n = this.next;
33513
        if (!n.isIdentifier() && !n.isKeyword()) {
33514
            this.error("Unexpected token " + n + ", expected identifier or keyword");
33515
            return '';
33516
        }
33517
        this.advance();
33518
        return n.toString();
33519
    };
33520
    _ParseAST.prototype.expectIdentifierOrKeywordOrString = function () {
33521
        var n = this.next;
33522
        if (!n.isIdentifier() && !n.isKeyword() && !n.isString()) {
33523
            this.error("Unexpected token " + n + ", expected identifier, keyword, or string");
33524
            return '';
33525
        }
33526
        this.advance();
33527
        return n.toString();
33528
    };
33529
    _ParseAST.prototype.parseChain = function () {
33530
        var exprs = [];
33531
        var start = this.inputIndex;
33532
        while (this.index < this.tokens.length) {
33533
            var expr = this.parsePipe();
33534
            exprs.push(expr);
33535
            if (this.optionalCharacter($SEMICOLON)) {
33536
                if (!this.parseAction) {
33537
                    this.error('Binding expression cannot contain chained expression');
33538
                }
33539
                while (this.optionalCharacter($SEMICOLON)) {
33540
                } // read all semicolons
33541
            }
33542
            else if (this.index < this.tokens.length) {
33543
                this.error("Unexpected token '" + this.next + "'");
33544
            }
33545
        }
33546
        if (exprs.length == 0)
33547
            return new EmptyExpr(this.span(start));
33548
        if (exprs.length == 1)
33549
            return exprs[0];
33550
        return new Chain(this.span(start), exprs);
33551
    };
33552
    _ParseAST.prototype.parsePipe = function () {
33553
        var result = this.parseExpression();
33554
        if (this.optionalOperator('|')) {
33555
            if (this.parseAction) {
33556
                this.error('Cannot have a pipe in an action expression');
33557
            }
33558
            do {
33559
                var name_1 = this.expectIdentifierOrKeyword();
33560
                var args = [];
33561
                while (this.optionalCharacter($COLON)) {
33562
                    args.push(this.parseExpression());
33563
                }
33564
                result = new BindingPipe(this.span(result.span.start), result, name_1, args);
33565
            } while (this.optionalOperator('|'));
33566
        }
33567
        return result;
33568
    };
33569
    _ParseAST.prototype.parseExpression = function () { return this.parseConditional(); };
33570
    _ParseAST.prototype.parseConditional = function () {
33571
        var start = this.inputIndex;
33572
        var result = this.parseLogicalOr();
33573
        if (this.optionalOperator('?')) {
33574
            var yes = this.parsePipe();
33575
            var no = void 0;
33576
            if (!this.optionalCharacter($COLON)) {
33577
                var end = this.inputIndex;
33578
                var expression = this.input.substring(start, end);
33579
                this.error("Conditional expression " + expression + " requires all 3 expressions");
33580
                no = new EmptyExpr(this.span(start));
33581
            }
33582
            else {
33583
                no = this.parsePipe();
33584
            }
33585
            return new Conditional(this.span(start), result, yes, no);
33586
        }
33587
        else {
33588
            return result;
33589
        }
33590
    };
33591
    _ParseAST.prototype.parseLogicalOr = function () {
33592
        // '||'
33593
        var result = this.parseLogicalAnd();
33594
        while (this.optionalOperator('||')) {
33595
            var right = this.parseLogicalAnd();
33596
            result = new Binary(this.span(result.span.start), '||', result, right);
33597
        }
33598
        return result;
33599
    };
33600
    _ParseAST.prototype.parseLogicalAnd = function () {
33601
        // '&&'
33602
        var result = this.parseEquality();
33603
        while (this.optionalOperator('&&')) {
33604
            var right = this.parseEquality();
33605
            result = new Binary(this.span(result.span.start), '&&', result, right);
33606
        }
33607
        return result;
33608
    };
33609
    _ParseAST.prototype.parseEquality = function () {
33610
        // '==','!=','===','!=='
33611
        var result = this.parseRelational();
33612
        while (this.next.type == TokenType.Operator) {
33613
            var operator = this.next.strValue;
33614
            switch (operator) {
33615
                case '==':
33616
                case '===':
33617
                case '!=':
33618
                case '!==':
33619
                    this.advance();
33620
                    var right = this.parseRelational();
33621
                    result = new Binary(this.span(result.span.start), operator, result, right);
33622
                    continue;
33623
            }
33624
            break;
33625
        }
33626
        return result;
33627
    };
33628
    _ParseAST.prototype.parseRelational = function () {
33629
        // '<', '>', '<=', '>='
33630
        var result = this.parseAdditive();
33631
        while (this.next.type == TokenType.Operator) {
33632
            var operator = this.next.strValue;
33633
            switch (operator) {
33634
                case '<':
33635
                case '>':
33636
                case '<=':
33637
                case '>=':
33638
                    this.advance();
33639
                    var right = this.parseAdditive();
33640
                    result = new Binary(this.span(result.span.start), operator, result, right);
33641
                    continue;
33642
            }
33643
            break;
33644
        }
33645
        return result;
33646
    };
33647
    _ParseAST.prototype.parseAdditive = function () {
33648
        // '+', '-'
33649
        var result = this.parseMultiplicative();
33650
        while (this.next.type == TokenType.Operator) {
33651
            var operator = this.next.strValue;
33652
            switch (operator) {
33653
                case '+':
33654
                case '-':
33655
                    this.advance();
33656
                    var right = this.parseMultiplicative();
33657
                    result = new Binary(this.span(result.span.start), operator, result, right);
33658
                    continue;
33659
            }
33660
            break;
33661
        }
33662
        return result;
33663
    };
33664
    _ParseAST.prototype.parseMultiplicative = function () {
33665
        // '*', '%', '/'
33666
        var result = this.parsePrefix();
33667
        while (this.next.type == TokenType.Operator) {
33668
            var operator = this.next.strValue;
33669
            switch (operator) {
33670
                case '*':
33671
                case '%':
33672
                case '/':
33673
                    this.advance();
33674
                    var right = this.parsePrefix();
33675
                    result = new Binary(this.span(result.span.start), operator, result, right);
33676
                    continue;
33677
            }
33678
            break;
33679
        }
33680
        return result;
33681
    };
33682
    _ParseAST.prototype.parsePrefix = function () {
33683
        if (this.next.type == TokenType.Operator) {
33684
            var start = this.inputIndex;
33685
            var operator = this.next.strValue;
33686
            var result = void 0;
33687
            switch (operator) {
33688
                case '+':
33689
                    this.advance();
33690
                    result = this.parsePrefix();
33691
                    return new Binary(this.span(start), '-', result, new LiteralPrimitive(new ParseSpan(start, start), 0));
33692
                case '-':
33693
                    this.advance();
33694
                    result = this.parsePrefix();
33695
                    return new Binary(this.span(start), operator, new LiteralPrimitive(new ParseSpan(start, start), 0), result);
33696
                case '!':
33697
                    this.advance();
33698
                    result = this.parsePrefix();
33699
                    return new PrefixNot(this.span(start), result);
33700
            }
33701
        }
33702
        return this.parseCallChain();
33703
    };
33704
    _ParseAST.prototype.parseCallChain = function () {
33705
        var result = this.parsePrimary();
33706
        while (true) {
33707
            if (this.optionalCharacter($PERIOD)) {
33708
                result = this.parseAccessMemberOrMethodCall(result, false);
33709
            }
33710
            else if (this.optionalOperator('?.')) {
33711
                result = this.parseAccessMemberOrMethodCall(result, true);
33712
            }
33713
            else if (this.optionalCharacter($LBRACKET)) {
33714
                this.rbracketsExpected++;
33715
                var key = this.parsePipe();
33716
                this.rbracketsExpected--;
33717
                this.expectCharacter($RBRACKET);
33718
                if (this.optionalOperator('=')) {
33719
                    var value = this.parseConditional();
33720
                    result = new KeyedWrite(this.span(result.span.start), result, key, value);
33721
                }
33722
                else {
33723
                    result = new KeyedRead(this.span(result.span.start), result, key);
33724
                }
33725
            }
33726
            else if (this.optionalCharacter($LPAREN)) {
33727
                this.rparensExpected++;
33728
                var args = this.parseCallArguments();
33729
                this.rparensExpected--;
33730
                this.expectCharacter($RPAREN);
33731
                result = new FunctionCall(this.span(result.span.start), result, args);
33732
            }
33733
            else if (this.optionalOperator('!')) {
33734
                result = new NonNullAssert(this.span(result.span.start), result);
33735
            }
33736
            else {
33737
                return result;
33738
            }
33739
        }
33740
    };
33741
    _ParseAST.prototype.parsePrimary = function () {
33742
        var start = this.inputIndex;
33743
        if (this.optionalCharacter($LPAREN)) {
33744
            this.rparensExpected++;
33745
            var result = this.parsePipe();
33746
            this.rparensExpected--;
33747
            this.expectCharacter($RPAREN);
33748
            return result;
33749
        }
33750
        else if (this.next.isKeywordNull()) {
33751
            this.advance();
33752
            return new LiteralPrimitive(this.span(start), null);
33753
        }
33754
        else if (this.next.isKeywordUndefined()) {
33755
            this.advance();
33756
            return new LiteralPrimitive(this.span(start), void 0);
33757
        }
33758
        else if (this.next.isKeywordTrue()) {
33759
            this.advance();
33760
            return new LiteralPrimitive(this.span(start), true);
33761
        }
33762
        else if (this.next.isKeywordFalse()) {
33763
            this.advance();
33764
            return new LiteralPrimitive(this.span(start), false);
33765
        }
33766
        else if (this.next.isKeywordThis()) {
33767
            this.advance();
33768
            return new ImplicitReceiver(this.span(start));
33769
        }
33770
        else if (this.optionalCharacter($LBRACKET)) {
33771
            this.rbracketsExpected++;
33772
            var elements = this.parseExpressionList($RBRACKET);
33773
            this.rbracketsExpected--;
33774
            this.expectCharacter($RBRACKET);
33775
            return new LiteralArray(this.span(start), elements);
33776
        }
33777
        else if (this.next.isCharacter($LBRACE)) {
33778
            return this.parseLiteralMap();
33779
        }
33780
        else if (this.next.isIdentifier()) {
33781
            return this.parseAccessMemberOrMethodCall(new ImplicitReceiver(this.span(start)), false);
33782
        }
33783
        else if (this.next.isNumber()) {
33784
            var value = this.next.toNumber();
33785
            this.advance();
33786
            return new LiteralPrimitive(this.span(start), value);
33787
        }
33788
        else if (this.next.isString()) {
33789
            var literalValue = this.next.toString();
33790
            this.advance();
33791
            return new LiteralPrimitive(this.span(start), literalValue);
33792
        }
33793
        else if (this.index >= this.tokens.length) {
33794
            this.error("Unexpected end of expression: " + this.input);
33795
            return new EmptyExpr(this.span(start));
33796
        }
33797
        else {
33798
            this.error("Unexpected token " + this.next);
33799
            return new EmptyExpr(this.span(start));
33800
        }
33801
    };
33802
    _ParseAST.prototype.parseExpressionList = function (terminator) {
33803
        var result = [];
33804
        if (!this.next.isCharacter(terminator)) {
33805
            do {
33806
                result.push(this.parsePipe());
33807
            } while (this.optionalCharacter($COMMA));
33808
        }
33809
        return result;
33810
    };
33811
    _ParseAST.prototype.parseLiteralMap = function () {
33812
        var keys = [];
33813
        var values = [];
33814
        var start = this.inputIndex;
33815
        this.expectCharacter($LBRACE);
33816
        if (!this.optionalCharacter($RBRACE)) {
33817
            this.rbracesExpected++;
33818
            do {
33819
                var quoted = this.next.isString();
33820
                var key = this.expectIdentifierOrKeywordOrString();
33821
                keys.push({ key: key, quoted: quoted });
33822
                this.expectCharacter($COLON);
33823
                values.push(this.parsePipe());
33824
            } while (this.optionalCharacter($COMMA));
33825
            this.rbracesExpected--;
33826
            this.expectCharacter($RBRACE);
33827
        }
33828
        return new LiteralMap(this.span(start), keys, values);
33829
    };
33830
    _ParseAST.prototype.parseAccessMemberOrMethodCall = function (receiver, isSafe) {
33831
        if (isSafe === void 0) { isSafe = false; }
33832
        var start = receiver.span.start;
33833
        var id = this.expectIdentifierOrKeyword();
33834
        if (this.optionalCharacter($LPAREN)) {
33835
            this.rparensExpected++;
33836
            var args = this.parseCallArguments();
33837
            this.expectCharacter($RPAREN);
33838
            this.rparensExpected--;
33839
            var span = this.span(start);
33840
            return isSafe ? new SafeMethodCall(span, receiver, id, args) :
33841
                new MethodCall(span, receiver, id, args);
33842
        }
33843
        else {
33844
            if (isSafe) {
33845
                if (this.optionalOperator('=')) {
33846
                    this.error('The \'?.\' operator cannot be used in the assignment');
33847
                    return new EmptyExpr(this.span(start));
33848
                }
33849
                else {
33850
                    return new SafePropertyRead(this.span(start), receiver, id);
33851
                }
33852
            }
33853
            else {
33854
                if (this.optionalOperator('=')) {
33855
                    if (!this.parseAction) {
33856
                        this.error('Bindings cannot contain assignments');
33857
                        return new EmptyExpr(this.span(start));
33858
                    }
33859
                    var value = this.parseConditional();
33860
                    return new PropertyWrite(this.span(start), receiver, id, value);
33861
                }
33862
                else {
33863
                    return new PropertyRead(this.span(start), receiver, id);
33864
                }
33865
            }
33866
        }
33867
    };
33868
    _ParseAST.prototype.parseCallArguments = function () {
33869
        if (this.next.isCharacter($RPAREN))
33870
            return [];
33871
        var positionals = [];
33872
        do {
33873
            positionals.push(this.parsePipe());
33874
        } while (this.optionalCharacter($COMMA));
33875
        return positionals;
33876
    };
33877
    /**
33878
     * An identifier, a keyword, a string with an optional `-` in between.
33879
     */
33880
    _ParseAST.prototype.expectTemplateBindingKey = function () {
33881
        var result = '';
33882
        var operatorFound = false;
33883
        do {
33884
            result += this.expectIdentifierOrKeywordOrString();
33885
            operatorFound = this.optionalOperator('-');
33886
            if (operatorFound) {
33887
                result += '-';
33888
            }
33889
        } while (operatorFound);
33890
        return result.toString();
33891
    };
33892
    _ParseAST.prototype.parseTemplateBindings = function () {
33893
        var bindings = [];
33894
        var prefix = null;
33895
        var warnings = [];
33896
        while (this.index < this.tokens.length) {
33897
            var start = this.inputIndex;
33898
            var keyIsVar = this.peekKeywordLet();
33899
            if (keyIsVar) {
33900
                this.advance();
33901
            }
33902
            var rawKey = this.expectTemplateBindingKey();
33903
            var key = rawKey;
33904
            if (!keyIsVar) {
33905
                if (prefix == null) {
33906
                    prefix = key;
33907
                }
33908
                else {
33909
                    key = prefix + key[0].toUpperCase() + key.substring(1);
33910
                }
33911
            }
33912
            this.optionalCharacter($COLON);
33913
            var name_2 = null;
33914
            var expression = null;
33915
            if (keyIsVar) {
33916
                if (this.optionalOperator('=')) {
33917
                    name_2 = this.expectTemplateBindingKey();
33918
                }
33919
                else {
33920
                    name_2 = '\$implicit';
33921
                }
33922
            }
33923
            else if (this.peekKeywordAs()) {
33924
                var letStart = this.inputIndex;
33925
                this.advance(); // consume `as`
33926
                name_2 = rawKey;
33927
                key = this.expectTemplateBindingKey(); // read local var name
33928
                keyIsVar = true;
33929
            }
33930
            else if (this.next !== EOF && !this.peekKeywordLet()) {
33931
                var start_1 = this.inputIndex;
33932
                var ast = this.parsePipe();
33933
                var source = this.input.substring(start_1 - this.offset, this.inputIndex - this.offset);
33934
                expression = new ASTWithSource(ast, source, this.location, this.errors);
33935
            }
33936
            bindings.push(new TemplateBinding(this.span(start), key, keyIsVar, name_2, expression));
33937
            if (this.peekKeywordAs() && !keyIsVar) {
33938
                var letStart = this.inputIndex;
33939
                this.advance(); // consume `as`
33940
                var letName = this.expectTemplateBindingKey(); // read local var name
33941
                bindings.push(new TemplateBinding(this.span(letStart), letName, true, key, null));
33942
            }
33943
            if (!this.optionalCharacter($SEMICOLON)) {
33944
                this.optionalCharacter($COMMA);
33945
            }
33946
        }
33947
        return new TemplateBindingParseResult(bindings, warnings, this.errors);
33948
    };
33949
    _ParseAST.prototype.error = function (message, index) {
33950
        if (index === void 0) { index = null; }
33951
        this.errors.push(new ParserError(message, this.input, this.locationText(index), this.location));
33952
        this.skip();
33953
    };
33954
    _ParseAST.prototype.locationText = function (index) {
33955
        if (index === void 0) { index = null; }
33956
        if (index == null)
33957
            index = this.index;
33958
        return (index < this.tokens.length) ? "at column " + (this.tokens[index].index + 1) + " in" :
33959
            "at the end of the expression";
33960
    };
33961
    // Error recovery should skip tokens until it encounters a recovery point. skip() treats
33962
    // the end of input and a ';' as unconditionally a recovery point. It also treats ')',
33963
    // '}' and ']' as conditional recovery points if one of calling productions is expecting
33964
    // one of these symbols. This allows skip() to recover from errors such as '(a.) + 1' allowing
33965
    // more of the AST to be retained (it doesn't skip any tokens as the ')' is retained because
33966
    // of the '(' begins an '(' <expr> ')' production). The recovery points of grouping symbols
33967
    // must be conditional as they must be skipped if none of the calling productions are not
33968
    // expecting the closing token else we will never make progress in the case of an
33969
    // extraneous group closing symbol (such as a stray ')'). This is not the case for ';' because
33970
    // parseChain() is always the root production and it expects a ';'.
33971
    // If a production expects one of these token it increments the corresponding nesting count,
33972
    // and then decrements it just prior to checking if the token is in the input.
33973
    _ParseAST.prototype.skip = function () {
33974
        var n = this.next;
33975
        while (this.index < this.tokens.length && !n.isCharacter($SEMICOLON) &&
33976
            (this.rparensExpected <= 0 || !n.isCharacter($RPAREN)) &&
33977
            (this.rbracesExpected <= 0 || !n.isCharacter($RBRACE)) &&
33978
            (this.rbracketsExpected <= 0 || !n.isCharacter($RBRACKET))) {
33979
            if (this.next.isError()) {
33980
                this.errors.push(new ParserError(this.next.toString(), this.input, this.locationText(), this.location));
33981
            }
33982
            this.advance();
33983
            n = this.next;
33984
        }
33985
    };
33986
    return _ParseAST;
33987
}());
33988
var SimpleExpressionChecker = /** @class */ (function () {
33989
    function SimpleExpressionChecker() {
33990
        this.errors = [];
33991
    }
33992
    SimpleExpressionChecker.check = function (ast) {
33993
        var s = new SimpleExpressionChecker();
33994
        ast.visit(s);
33995
        return s.errors;
33996
    };
33997
    SimpleExpressionChecker.prototype.visitImplicitReceiver = function (ast, context) { };
33998
    SimpleExpressionChecker.prototype.visitInterpolation = function (ast, context) { };
33999
    SimpleExpressionChecker.prototype.visitLiteralPrimitive = function (ast, context) { };
34000
    SimpleExpressionChecker.prototype.visitPropertyRead = function (ast, context) { };
34001
    SimpleExpressionChecker.prototype.visitPropertyWrite = function (ast, context) { };
34002
    SimpleExpressionChecker.prototype.visitSafePropertyRead = function (ast, context) { };
34003
    SimpleExpressionChecker.prototype.visitMethodCall = function (ast, context) { };
34004
    SimpleExpressionChecker.prototype.visitSafeMethodCall = function (ast, context) { };
34005
    SimpleExpressionChecker.prototype.visitFunctionCall = function (ast, context) { };
34006
    SimpleExpressionChecker.prototype.visitLiteralArray = function (ast, context) { this.visitAll(ast.expressions); };
34007
    SimpleExpressionChecker.prototype.visitLiteralMap = function (ast, context) { this.visitAll(ast.values); };
34008
    SimpleExpressionChecker.prototype.visitBinary = function (ast, context) { };
34009
    SimpleExpressionChecker.prototype.visitPrefixNot = function (ast, context) { };
34010
    SimpleExpressionChecker.prototype.visitNonNullAssert = function (ast, context) { };
34011
    SimpleExpressionChecker.prototype.visitConditional = function (ast, context) { };
34012
    SimpleExpressionChecker.prototype.visitPipe = function (ast, context) { this.errors.push('pipes'); };
34013
    SimpleExpressionChecker.prototype.visitKeyedRead = function (ast, context) { };
34014
    SimpleExpressionChecker.prototype.visitKeyedWrite = function (ast, context) { };
34015
    SimpleExpressionChecker.prototype.visitAll = function (asts) {
34016
        var _this = this;
34017
        return asts.map(function (node) { return node.visit(_this); });
34018
    };
34019
    SimpleExpressionChecker.prototype.visitChain = function (ast, context) { };
34020
    SimpleExpressionChecker.prototype.visitQuote = function (ast, context) { };
34021
    return SimpleExpressionChecker;
34022
}());
34023
 
34024
/**
34025
 * @license
34026
 * Copyright Google Inc. All Rights Reserved.
34027
 *
34028
 * Use of this source code is governed by an MIT-style license that can be
34029
 * found in the LICENSE file at https://angular.io/license
34030
 */
34031
var ParseLocation = /** @class */ (function () {
34032
    function ParseLocation(file, offset, line, col) {
34033
        this.file = file;
34034
        this.offset = offset;
34035
        this.line = line;
34036
        this.col = col;
34037
    }
34038
    ParseLocation.prototype.toString = function () {
34039
        return this.offset != null ? this.file.url + "@" + this.line + ":" + this.col : this.file.url;
34040
    };
34041
    ParseLocation.prototype.moveBy = function (delta) {
34042
        var source = this.file.content;
34043
        var len = source.length;
34044
        var offset = this.offset;
34045
        var line = this.line;
34046
        var col = this.col;
34047
        while (offset > 0 && delta < 0) {
34048
            offset--;
34049
            delta++;
34050
            var ch = source.charCodeAt(offset);
34051
            if (ch == $LF) {
34052
                line--;
34053
                var priorLine = source.substr(0, offset - 1).lastIndexOf(String.fromCharCode($LF));
34054
                col = priorLine > 0 ? offset - priorLine : offset;
34055
            }
34056
            else {
34057
                col--;
34058
            }
34059
        }
34060
        while (offset < len && delta > 0) {
34061
            var ch = source.charCodeAt(offset);
34062
            offset++;
34063
            delta--;
34064
            if (ch == $LF) {
34065
                line++;
34066
                col = 0;
34067
            }
34068
            else {
34069
                col++;
34070
            }
34071
        }
34072
        return new ParseLocation(this.file, offset, line, col);
34073
    };
34074
    // Return the source around the location
34075
    // Up to `maxChars` or `maxLines` on each side of the location
34076
    ParseLocation.prototype.getContext = function (maxChars, maxLines) {
34077
        var content = this.file.content;
34078
        var startOffset = this.offset;
34079
        if (startOffset != null) {
34080
            if (startOffset > content.length - 1) {
34081
                startOffset = content.length - 1;
34082
            }
34083
            var endOffset = startOffset;
34084
            var ctxChars = 0;
34085
            var ctxLines = 0;
34086
            while (ctxChars < maxChars && startOffset > 0) {
34087
                startOffset--;
34088
                ctxChars++;
34089
                if (content[startOffset] == '\n') {
34090
                    if (++ctxLines == maxLines) {
34091
                        break;
34092
                    }
34093
                }
34094
            }
34095
            ctxChars = 0;
34096
            ctxLines = 0;
34097
            while (ctxChars < maxChars && endOffset < content.length - 1) {
34098
                endOffset++;
34099
                ctxChars++;
34100
                if (content[endOffset] == '\n') {
34101
                    if (++ctxLines == maxLines) {
34102
                        break;
34103
                    }
34104
                }
34105
            }
34106
            return {
34107
                before: content.substring(startOffset, this.offset),
34108
                after: content.substring(this.offset, endOffset + 1),
34109
            };
34110
        }
34111
        return null;
34112
    };
34113
    return ParseLocation;
34114
}());
34115
var ParseSourceFile = /** @class */ (function () {
34116
    function ParseSourceFile(content, url) {
34117
        this.content = content;
34118
        this.url = url;
34119
    }
34120
    return ParseSourceFile;
34121
}());
34122
var ParseSourceSpan = /** @class */ (function () {
34123
    function ParseSourceSpan(start, end, details) {
34124
        if (details === void 0) { details = null; }
34125
        this.start = start;
34126
        this.end = end;
34127
        this.details = details;
34128
    }
34129
    ParseSourceSpan.prototype.toString = function () {
34130
        return this.start.file.content.substring(this.start.offset, this.end.offset);
34131
    };
34132
    return ParseSourceSpan;
34133
}());
34134
var ParseErrorLevel;
34135
(function (ParseErrorLevel) {
34136
    ParseErrorLevel[ParseErrorLevel["WARNING"] = 0] = "WARNING";
34137
    ParseErrorLevel[ParseErrorLevel["ERROR"] = 1] = "ERROR";
34138
})(ParseErrorLevel || (ParseErrorLevel = {}));
34139
var ParseError = /** @class */ (function () {
34140
    function ParseError(span, msg, level) {
34141
        if (level === void 0) { level = ParseErrorLevel.ERROR; }
34142
        this.span = span;
34143
        this.msg = msg;
34144
        this.level = level;
34145
    }
34146
    ParseError.prototype.contextualMessage = function () {
34147
        var ctx = this.span.start.getContext(100, 3);
34148
        return ctx ? this.msg + " (\"" + ctx.before + "[" + ParseErrorLevel[this.level] + " ->]" + ctx.after + "\")" :
34149
            this.msg;
34150
    };
34151
    ParseError.prototype.toString = function () {
34152
        var details = this.span.details ? ", " + this.span.details : '';
34153
        return this.contextualMessage() + ": " + this.span.start + details;
34154
    };
34155
    return ParseError;
34156
}());
34157
function typeSourceSpan(kind, type) {
34158
    var moduleUrl = identifierModuleUrl(type);
34159
    var sourceFileName = moduleUrl != null ? "in " + kind + " " + identifierName(type) + " in " + moduleUrl :
34160
        "in " + kind + " " + identifierName(type);
34161
    var sourceFile = new ParseSourceFile('', sourceFileName);
34162
    return new ParseSourceSpan(new ParseLocation(sourceFile, -1, -1, -1), new ParseLocation(sourceFile, -1, -1, -1));
34163
}
34164
 
34165
/**
34166
 * @license
34167
 * Copyright Google Inc. All Rights Reserved.
34168
 *
34169
 * Use of this source code is governed by an MIT-style license that can be
34170
 * found in the LICENSE file at https://angular.io/license
34171
 */
34172
var TokenType$1;
34173
(function (TokenType) {
34174
    TokenType[TokenType["TAG_OPEN_START"] = 0] = "TAG_OPEN_START";
34175
    TokenType[TokenType["TAG_OPEN_END"] = 1] = "TAG_OPEN_END";
34176
    TokenType[TokenType["TAG_OPEN_END_VOID"] = 2] = "TAG_OPEN_END_VOID";
34177
    TokenType[TokenType["TAG_CLOSE"] = 3] = "TAG_CLOSE";
34178
    TokenType[TokenType["TEXT"] = 4] = "TEXT";
34179
    TokenType[TokenType["ESCAPABLE_RAW_TEXT"] = 5] = "ESCAPABLE_RAW_TEXT";
34180
    TokenType[TokenType["RAW_TEXT"] = 6] = "RAW_TEXT";
34181
    TokenType[TokenType["COMMENT_START"] = 7] = "COMMENT_START";
34182
    TokenType[TokenType["COMMENT_END"] = 8] = "COMMENT_END";
34183
    TokenType[TokenType["CDATA_START"] = 9] = "CDATA_START";
34184
    TokenType[TokenType["CDATA_END"] = 10] = "CDATA_END";
34185
    TokenType[TokenType["ATTR_NAME"] = 11] = "ATTR_NAME";
34186
    TokenType[TokenType["ATTR_VALUE"] = 12] = "ATTR_VALUE";
34187
    TokenType[TokenType["DOC_TYPE"] = 13] = "DOC_TYPE";
34188
    TokenType[TokenType["EXPANSION_FORM_START"] = 14] = "EXPANSION_FORM_START";
34189
    TokenType[TokenType["EXPANSION_CASE_VALUE"] = 15] = "EXPANSION_CASE_VALUE";
34190
    TokenType[TokenType["EXPANSION_CASE_EXP_START"] = 16] = "EXPANSION_CASE_EXP_START";
34191
    TokenType[TokenType["EXPANSION_CASE_EXP_END"] = 17] = "EXPANSION_CASE_EXP_END";
34192
    TokenType[TokenType["EXPANSION_FORM_END"] = 18] = "EXPANSION_FORM_END";
34193
    TokenType[TokenType["EOF"] = 19] = "EOF";
34194
})(TokenType$1 || (TokenType$1 = {}));
34195
var Token$1 = /** @class */ (function () {
34196
    function Token(type, parts, sourceSpan) {
34197
        this.type = type;
34198
        this.parts = parts;
34199
        this.sourceSpan = sourceSpan;
34200
    }
34201
    return Token;
34202
}());
34203
var TokenError = /** @class */ (function (_super) {
34204
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TokenError, _super);
34205
    function TokenError(errorMsg, tokenType, span) {
34206
        var _this = _super.call(this, span, errorMsg) || this;
34207
        _this.tokenType = tokenType;
34208
        return _this;
34209
    }
34210
    return TokenError;
34211
}(ParseError));
34212
var TokenizeResult = /** @class */ (function () {
34213
    function TokenizeResult(tokens, errors) {
34214
        this.tokens = tokens;
34215
        this.errors = errors;
34216
    }
34217
    return TokenizeResult;
34218
}());
34219
function tokenize(source, url, getTagDefinition, tokenizeExpansionForms, interpolationConfig) {
34220
    if (tokenizeExpansionForms === void 0) { tokenizeExpansionForms = false; }
34221
    if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }
34222
    return new _Tokenizer(new ParseSourceFile(source, url), getTagDefinition, tokenizeExpansionForms, interpolationConfig)
34223
        .tokenize();
34224
}
34225
var _CR_OR_CRLF_REGEXP = /\r\n?/g;
34226
function _unexpectedCharacterErrorMsg(charCode) {
34227
    var char = charCode === $EOF ? 'EOF' : String.fromCharCode(charCode);
34228
    return "Unexpected character \"" + char + "\"";
34229
}
34230
function _unknownEntityErrorMsg(entitySrc) {
34231
    return "Unknown entity \"" + entitySrc + "\" - use the \"&#<decimal>;\" or  \"&#x<hex>;\" syntax";
34232
}
34233
var _ControlFlowError = /** @class */ (function () {
34234
    function _ControlFlowError(error) {
34235
        this.error = error;
34236
    }
34237
    return _ControlFlowError;
34238
}());
34239
// See http://www.w3.org/TR/html51/syntax.html#writing
34240
var _Tokenizer = /** @class */ (function () {
34241
    /**
34242
     * @param _file The html source
34243
     * @param _getTagDefinition
34244
     * @param _tokenizeIcu Whether to tokenize ICU messages (considered as text nodes when false)
34245
     * @param _interpolationConfig
34246
     */
34247
    function _Tokenizer(_file, _getTagDefinition, _tokenizeIcu, _interpolationConfig) {
34248
        if (_interpolationConfig === void 0) { _interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }
34249
        this._file = _file;
34250
        this._getTagDefinition = _getTagDefinition;
34251
        this._tokenizeIcu = _tokenizeIcu;
34252
        this._interpolationConfig = _interpolationConfig;
34253
        // Note: this is always lowercase!
34254
        this._peek = -1;
34255
        this._nextPeek = -1;
34256
        this._index = -1;
34257
        this._line = 0;
34258
        this._column = -1;
34259
        this._expansionCaseStack = [];
34260
        this._inInterpolation = false;
34261
        this.tokens = [];
34262
        this.errors = [];
34263
        this._input = _file.content;
34264
        this._length = _file.content.length;
34265
        this._advance();
34266
    }
34267
    _Tokenizer.prototype._processCarriageReturns = function (content) {
34268
        // http://www.w3.org/TR/html5/syntax.html#preprocessing-the-input-stream
34269
        // In order to keep the original position in the source, we can not
34270
        // pre-process it.
34271
        // Instead CRs are processed right before instantiating the tokens.
34272
        return content.replace(_CR_OR_CRLF_REGEXP, '\n');
34273
    };
34274
    _Tokenizer.prototype.tokenize = function () {
34275
        while (this._peek !== $EOF) {
34276
            var start = this._getLocation();
34277
            try {
34278
                if (this._attemptCharCode($LT)) {
34279
                    if (this._attemptCharCode($BANG)) {
34280
                        if (this._attemptCharCode($LBRACKET)) {
34281
                            this._consumeCdata(start);
34282
                        }
34283
                        else if (this._attemptCharCode($MINUS)) {
34284
                            this._consumeComment(start);
34285
                        }
34286
                        else {
34287
                            this._consumeDocType(start);
34288
                        }
34289
                    }
34290
                    else if (this._attemptCharCode($SLASH)) {
34291
                        this._consumeTagClose(start);
34292
                    }
34293
                    else {
34294
                        this._consumeTagOpen(start);
34295
                    }
34296
                }
34297
                else if (!(this._tokenizeIcu && this._tokenizeExpansionForm())) {
34298
                    this._consumeText();
34299
                }
34300
            }
34301
            catch (e) {
34302
                if (e instanceof _ControlFlowError) {
34303
                    this.errors.push(e.error);
34304
                }
34305
                else {
34306
                    throw e;
34307
                }
34308
            }
34309
        }
34310
        this._beginToken(TokenType$1.EOF);
34311
        this._endToken([]);
34312
        return new TokenizeResult(mergeTextTokens(this.tokens), this.errors);
34313
    };
34314
    /**
34315
     * @returns whether an ICU token has been created
34316
     * @internal
34317
     */
34318
    _Tokenizer.prototype._tokenizeExpansionForm = function () {
34319
        if (isExpansionFormStart(this._input, this._index, this._interpolationConfig)) {
34320
            this._consumeExpansionFormStart();
34321
            return true;
34322
        }
34323
        if (isExpansionCaseStart(this._peek) && this._isInExpansionForm()) {
34324
            this._consumeExpansionCaseStart();
34325
            return true;
34326
        }
34327
        if (this._peek === $RBRACE) {
34328
            if (this._isInExpansionCase()) {
34329
                this._consumeExpansionCaseEnd();
34330
                return true;
34331
            }
34332
            if (this._isInExpansionForm()) {
34333
                this._consumeExpansionFormEnd();
34334
                return true;
34335
            }
34336
        }
34337
        return false;
34338
    };
34339
    _Tokenizer.prototype._getLocation = function () {
34340
        return new ParseLocation(this._file, this._index, this._line, this._column);
34341
    };
34342
    _Tokenizer.prototype._getSpan = function (start, end) {
34343
        if (start === void 0) { start = this._getLocation(); }
34344
        if (end === void 0) { end = this._getLocation(); }
34345
        return new ParseSourceSpan(start, end);
34346
    };
34347
    _Tokenizer.prototype._beginToken = function (type, start) {
34348
        if (start === void 0) { start = this._getLocation(); }
34349
        this._currentTokenStart = start;
34350
        this._currentTokenType = type;
34351
    };
34352
    _Tokenizer.prototype._endToken = function (parts, end) {
34353
        if (end === void 0) { end = this._getLocation(); }
34354
        var token = new Token$1(this._currentTokenType, parts, new ParseSourceSpan(this._currentTokenStart, end));
34355
        this.tokens.push(token);
34356
        this._currentTokenStart = null;
34357
        this._currentTokenType = null;
34358
        return token;
34359
    };
34360
    _Tokenizer.prototype._createError = function (msg, span) {
34361
        if (this._isInExpansionForm()) {
34362
            msg += " (Do you have an unescaped \"{\" in your template? Use \"{{ '{' }}\") to escape it.)";
34363
        }
34364
        var error = new TokenError(msg, this._currentTokenType, span);
34365
        this._currentTokenStart = null;
34366
        this._currentTokenType = null;
34367
        return new _ControlFlowError(error);
34368
    };
34369
    _Tokenizer.prototype._advance = function () {
34370
        if (this._index >= this._length) {
34371
            throw this._createError(_unexpectedCharacterErrorMsg($EOF), this._getSpan());
34372
        }
34373
        if (this._peek === $LF) {
34374
            this._line++;
34375
            this._column = 0;
34376
        }
34377
        else if (this._peek !== $LF && this._peek !== $CR) {
34378
            this._column++;
34379
        }
34380
        this._index++;
34381
        this._peek = this._index >= this._length ? $EOF : this._input.charCodeAt(this._index);
34382
        this._nextPeek =
34383
            this._index + 1 >= this._length ? $EOF : this._input.charCodeAt(this._index + 1);
34384
    };
34385
    _Tokenizer.prototype._attemptCharCode = function (charCode) {
34386
        if (this._peek === charCode) {
34387
            this._advance();
34388
            return true;
34389
        }
34390
        return false;
34391
    };
34392
    _Tokenizer.prototype._attemptCharCodeCaseInsensitive = function (charCode) {
34393
        if (compareCharCodeCaseInsensitive(this._peek, charCode)) {
34394
            this._advance();
34395
            return true;
34396
        }
34397
        return false;
34398
    };
34399
    _Tokenizer.prototype._requireCharCode = function (charCode) {
34400
        var location = this._getLocation();
34401
        if (!this._attemptCharCode(charCode)) {
34402
            throw this._createError(_unexpectedCharacterErrorMsg(this._peek), this._getSpan(location, location));
34403
        }
34404
    };
34405
    _Tokenizer.prototype._attemptStr = function (chars) {
34406
        var len = chars.length;
34407
        if (this._index + len > this._length) {
34408
            return false;
34409
        }
34410
        var initialPosition = this._savePosition();
34411
        for (var i = 0; i < len; i++) {
34412
            if (!this._attemptCharCode(chars.charCodeAt(i))) {
34413
                // If attempting to parse the string fails, we want to reset the parser
34414
                // to where it was before the attempt
34415
                this._restorePosition(initialPosition);
34416
                return false;
34417
            }
34418
        }
34419
        return true;
34420
    };
34421
    _Tokenizer.prototype._attemptStrCaseInsensitive = function (chars) {
34422
        for (var i = 0; i < chars.length; i++) {
34423
            if (!this._attemptCharCodeCaseInsensitive(chars.charCodeAt(i))) {
34424
                return false;
34425
            }
34426
        }
34427
        return true;
34428
    };
34429
    _Tokenizer.prototype._requireStr = function (chars) {
34430
        var location = this._getLocation();
34431
        if (!this._attemptStr(chars)) {
34432
            throw this._createError(_unexpectedCharacterErrorMsg(this._peek), this._getSpan(location));
34433
        }
34434
    };
34435
    _Tokenizer.prototype._attemptCharCodeUntilFn = function (predicate) {
34436
        while (!predicate(this._peek)) {
34437
            this._advance();
34438
        }
34439
    };
34440
    _Tokenizer.prototype._requireCharCodeUntilFn = function (predicate, len) {
34441
        var start = this._getLocation();
34442
        this._attemptCharCodeUntilFn(predicate);
34443
        if (this._index - start.offset < len) {
34444
            throw this._createError(_unexpectedCharacterErrorMsg(this._peek), this._getSpan(start, start));
34445
        }
34446
    };
34447
    _Tokenizer.prototype._attemptUntilChar = function (char) {
34448
        while (this._peek !== char) {
34449
            this._advance();
34450
        }
34451
    };
34452
    _Tokenizer.prototype._readChar = function (decodeEntities) {
34453
        if (decodeEntities && this._peek === $AMPERSAND) {
34454
            return this._decodeEntity();
34455
        }
34456
        else {
34457
            var index = this._index;
34458
            this._advance();
34459
            return this._input[index];
34460
        }
34461
    };
34462
    _Tokenizer.prototype._decodeEntity = function () {
34463
        var start = this._getLocation();
34464
        this._advance();
34465
        if (this._attemptCharCode($HASH)) {
34466
            var isHex = this._attemptCharCode($x) || this._attemptCharCode($X);
34467
            var numberStart = this._getLocation().offset;
34468
            this._attemptCharCodeUntilFn(isDigitEntityEnd);
34469
            if (this._peek != $SEMICOLON) {
34470
                throw this._createError(_unexpectedCharacterErrorMsg(this._peek), this._getSpan());
34471
            }
34472
            this._advance();
34473
            var strNum = this._input.substring(numberStart, this._index - 1);
34474
            try {
34475
                var charCode = parseInt(strNum, isHex ? 16 : 10);
34476
                return String.fromCharCode(charCode);
34477
            }
34478
            catch (e) {
34479
                var entity = this._input.substring(start.offset + 1, this._index - 1);
34480
                throw this._createError(_unknownEntityErrorMsg(entity), this._getSpan(start));
34481
            }
34482
        }
34483
        else {
34484
            var startPosition = this._savePosition();
34485
            this._attemptCharCodeUntilFn(isNamedEntityEnd);
34486
            if (this._peek != $SEMICOLON) {
34487
                this._restorePosition(startPosition);
34488
                return '&';
34489
            }
34490
            this._advance();
34491
            var name_1 = this._input.substring(start.offset + 1, this._index - 1);
34492
            var char = NAMED_ENTITIES[name_1];
34493
            if (!char) {
34494
                throw this._createError(_unknownEntityErrorMsg(name_1), this._getSpan(start));
34495
            }
34496
            return char;
34497
        }
34498
    };
34499
    _Tokenizer.prototype._consumeRawText = function (decodeEntities, firstCharOfEnd, attemptEndRest) {
34500
        var tagCloseStart;
34501
        var textStart = this._getLocation();
34502
        this._beginToken(decodeEntities ? TokenType$1.ESCAPABLE_RAW_TEXT : TokenType$1.RAW_TEXT, textStart);
34503
        var parts = [];
34504
        while (true) {
34505
            tagCloseStart = this._getLocation();
34506
            if (this._attemptCharCode(firstCharOfEnd) && attemptEndRest()) {
34507
                break;
34508
            }
34509
            if (this._index > tagCloseStart.offset) {
34510
                // add the characters consumed by the previous if statement to the output
34511
                parts.push(this._input.substring(tagCloseStart.offset, this._index));
34512
            }
34513
            while (this._peek !== firstCharOfEnd) {
34514
                parts.push(this._readChar(decodeEntities));
34515
            }
34516
        }
34517
        return this._endToken([this._processCarriageReturns(parts.join(''))], tagCloseStart);
34518
    };
34519
    _Tokenizer.prototype._consumeComment = function (start) {
34520
        var _this = this;
34521
        this._beginToken(TokenType$1.COMMENT_START, start);
34522
        this._requireCharCode($MINUS);
34523
        this._endToken([]);
34524
        var textToken = this._consumeRawText(false, $MINUS, function () { return _this._attemptStr('->'); });
34525
        this._beginToken(TokenType$1.COMMENT_END, textToken.sourceSpan.end);
34526
        this._endToken([]);
34527
    };
34528
    _Tokenizer.prototype._consumeCdata = function (start) {
34529
        var _this = this;
34530
        this._beginToken(TokenType$1.CDATA_START, start);
34531
        this._requireStr('CDATA[');
34532
        this._endToken([]);
34533
        var textToken = this._consumeRawText(false, $RBRACKET, function () { return _this._attemptStr(']>'); });
34534
        this._beginToken(TokenType$1.CDATA_END, textToken.sourceSpan.end);
34535
        this._endToken([]);
34536
    };
34537
    _Tokenizer.prototype._consumeDocType = function (start) {
34538
        this._beginToken(TokenType$1.DOC_TYPE, start);
34539
        this._attemptUntilChar($GT);
34540
        this._advance();
34541
        this._endToken([this._input.substring(start.offset + 2, this._index - 1)]);
34542
    };
34543
    _Tokenizer.prototype._consumePrefixAndName = function () {
34544
        var nameOrPrefixStart = this._index;
34545
        var prefix = null;
34546
        while (this._peek !== $COLON && !isPrefixEnd(this._peek)) {
34547
            this._advance();
34548
        }
34549
        var nameStart;
34550
        if (this._peek === $COLON) {
34551
            this._advance();
34552
            prefix = this._input.substring(nameOrPrefixStart, this._index - 1);
34553
            nameStart = this._index;
34554
        }
34555
        else {
34556
            nameStart = nameOrPrefixStart;
34557
        }
34558
        this._requireCharCodeUntilFn(isNameEnd, this._index === nameStart ? 1 : 0);
34559
        var name = this._input.substring(nameStart, this._index);
34560
        return [prefix, name];
34561
    };
34562
    _Tokenizer.prototype._consumeTagOpen = function (start) {
34563
        var savedPos = this._savePosition();
34564
        var tagName;
34565
        var lowercaseTagName;
34566
        try {
34567
            if (!isAsciiLetter(this._peek)) {
34568
                throw this._createError(_unexpectedCharacterErrorMsg(this._peek), this._getSpan());
34569
            }
34570
            var nameStart = this._index;
34571
            this._consumeTagOpenStart(start);
34572
            tagName = this._input.substring(nameStart, this._index);
34573
            lowercaseTagName = tagName.toLowerCase();
34574
            this._attemptCharCodeUntilFn(isNotWhitespace);
34575
            while (this._peek !== $SLASH && this._peek !== $GT) {
34576
                this._consumeAttributeName();
34577
                this._attemptCharCodeUntilFn(isNotWhitespace);
34578
                if (this._attemptCharCode($EQ)) {
34579
                    this._attemptCharCodeUntilFn(isNotWhitespace);
34580
                    this._consumeAttributeValue();
34581
                }
34582
                this._attemptCharCodeUntilFn(isNotWhitespace);
34583
            }
34584
            this._consumeTagOpenEnd();
34585
        }
34586
        catch (e) {
34587
            if (e instanceof _ControlFlowError) {
34588
                // When the start tag is invalid, assume we want a "<"
34589
                this._restorePosition(savedPos);
34590
                // Back to back text tokens are merged at the end
34591
                this._beginToken(TokenType$1.TEXT, start);
34592
                this._endToken(['<']);
34593
                return;
34594
            }
34595
            throw e;
34596
        }
34597
        var contentTokenType = this._getTagDefinition(tagName).contentType;
34598
        if (contentTokenType === TagContentType.RAW_TEXT) {
34599
            this._consumeRawTextWithTagClose(lowercaseTagName, false);
34600
        }
34601
        else if (contentTokenType === TagContentType.ESCAPABLE_RAW_TEXT) {
34602
            this._consumeRawTextWithTagClose(lowercaseTagName, true);
34603
        }
34604
    };
34605
    _Tokenizer.prototype._consumeRawTextWithTagClose = function (lowercaseTagName, decodeEntities) {
34606
        var _this = this;
34607
        var textToken = this._consumeRawText(decodeEntities, $LT, function () {
34608
            if (!_this._attemptCharCode($SLASH))
34609
                return false;
34610
            _this._attemptCharCodeUntilFn(isNotWhitespace);
34611
            if (!_this._attemptStrCaseInsensitive(lowercaseTagName))
34612
                return false;
34613
            _this._attemptCharCodeUntilFn(isNotWhitespace);
34614
            return _this._attemptCharCode($GT);
34615
        });
34616
        this._beginToken(TokenType$1.TAG_CLOSE, textToken.sourceSpan.end);
34617
        this._endToken([null, lowercaseTagName]);
34618
    };
34619
    _Tokenizer.prototype._consumeTagOpenStart = function (start) {
34620
        this._beginToken(TokenType$1.TAG_OPEN_START, start);
34621
        var parts = this._consumePrefixAndName();
34622
        this._endToken(parts);
34623
    };
34624
    _Tokenizer.prototype._consumeAttributeName = function () {
34625
        this._beginToken(TokenType$1.ATTR_NAME);
34626
        var prefixAndName = this._consumePrefixAndName();
34627
        this._endToken(prefixAndName);
34628
    };
34629
    _Tokenizer.prototype._consumeAttributeValue = function () {
34630
        this._beginToken(TokenType$1.ATTR_VALUE);
34631
        var value;
34632
        if (this._peek === $SQ || this._peek === $DQ) {
34633
            var quoteChar = this._peek;
34634
            this._advance();
34635
            var parts = [];
34636
            while (this._peek !== quoteChar) {
34637
                parts.push(this._readChar(true));
34638
            }
34639
            value = parts.join('');
34640
            this._advance();
34641
        }
34642
        else {
34643
            var valueStart = this._index;
34644
            this._requireCharCodeUntilFn(isNameEnd, 1);
34645
            value = this._input.substring(valueStart, this._index);
34646
        }
34647
        this._endToken([this._processCarriageReturns(value)]);
34648
    };
34649
    _Tokenizer.prototype._consumeTagOpenEnd = function () {
34650
        var tokenType = this._attemptCharCode($SLASH) ? TokenType$1.TAG_OPEN_END_VOID : TokenType$1.TAG_OPEN_END;
34651
        this._beginToken(tokenType);
34652
        this._requireCharCode($GT);
34653
        this._endToken([]);
34654
    };
34655
    _Tokenizer.prototype._consumeTagClose = function (start) {
34656
        this._beginToken(TokenType$1.TAG_CLOSE, start);
34657
        this._attemptCharCodeUntilFn(isNotWhitespace);
34658
        var prefixAndName = this._consumePrefixAndName();
34659
        this._attemptCharCodeUntilFn(isNotWhitespace);
34660
        this._requireCharCode($GT);
34661
        this._endToken(prefixAndName);
34662
    };
34663
    _Tokenizer.prototype._consumeExpansionFormStart = function () {
34664
        this._beginToken(TokenType$1.EXPANSION_FORM_START, this._getLocation());
34665
        this._requireCharCode($LBRACE);
34666
        this._endToken([]);
34667
        this._expansionCaseStack.push(TokenType$1.EXPANSION_FORM_START);
34668
        this._beginToken(TokenType$1.RAW_TEXT, this._getLocation());
34669
        var condition = this._readUntil($COMMA);
34670
        this._endToken([condition], this._getLocation());
34671
        this._requireCharCode($COMMA);
34672
        this._attemptCharCodeUntilFn(isNotWhitespace);
34673
        this._beginToken(TokenType$1.RAW_TEXT, this._getLocation());
34674
        var type = this._readUntil($COMMA);
34675
        this._endToken([type], this._getLocation());
34676
        this._requireCharCode($COMMA);
34677
        this._attemptCharCodeUntilFn(isNotWhitespace);
34678
    };
34679
    _Tokenizer.prototype._consumeExpansionCaseStart = function () {
34680
        this._beginToken(TokenType$1.EXPANSION_CASE_VALUE, this._getLocation());
34681
        var value = this._readUntil($LBRACE).trim();
34682
        this._endToken([value], this._getLocation());
34683
        this._attemptCharCodeUntilFn(isNotWhitespace);
34684
        this._beginToken(TokenType$1.EXPANSION_CASE_EXP_START, this._getLocation());
34685
        this._requireCharCode($LBRACE);
34686
        this._endToken([], this._getLocation());
34687
        this._attemptCharCodeUntilFn(isNotWhitespace);
34688
        this._expansionCaseStack.push(TokenType$1.EXPANSION_CASE_EXP_START);
34689
    };
34690
    _Tokenizer.prototype._consumeExpansionCaseEnd = function () {
34691
        this._beginToken(TokenType$1.EXPANSION_CASE_EXP_END, this._getLocation());
34692
        this._requireCharCode($RBRACE);
34693
        this._endToken([], this._getLocation());
34694
        this._attemptCharCodeUntilFn(isNotWhitespace);
34695
        this._expansionCaseStack.pop();
34696
    };
34697
    _Tokenizer.prototype._consumeExpansionFormEnd = function () {
34698
        this._beginToken(TokenType$1.EXPANSION_FORM_END, this._getLocation());
34699
        this._requireCharCode($RBRACE);
34700
        this._endToken([]);
34701
        this._expansionCaseStack.pop();
34702
    };
34703
    _Tokenizer.prototype._consumeText = function () {
34704
        var start = this._getLocation();
34705
        this._beginToken(TokenType$1.TEXT, start);
34706
        var parts = [];
34707
        do {
34708
            if (this._interpolationConfig && this._attemptStr(this._interpolationConfig.start)) {
34709
                parts.push(this._interpolationConfig.start);
34710
                this._inInterpolation = true;
34711
            }
34712
            else if (this._interpolationConfig && this._inInterpolation &&
34713
                this._attemptStr(this._interpolationConfig.end)) {
34714
                parts.push(this._interpolationConfig.end);
34715
                this._inInterpolation = false;
34716
            }
34717
            else {
34718
                parts.push(this._readChar(true));
34719
            }
34720
        } while (!this._isTextEnd());
34721
        this._endToken([this._processCarriageReturns(parts.join(''))]);
34722
    };
34723
    _Tokenizer.prototype._isTextEnd = function () {
34724
        if (this._peek === $LT || this._peek === $EOF) {
34725
            return true;
34726
        }
34727
        if (this._tokenizeIcu && !this._inInterpolation) {
34728
            if (isExpansionFormStart(this._input, this._index, this._interpolationConfig)) {
34729
                // start of an expansion form
34730
                return true;
34731
            }
34732
            if (this._peek === $RBRACE && this._isInExpansionCase()) {
34733
                // end of and expansion case
34734
                return true;
34735
            }
34736
        }
34737
        return false;
34738
    };
34739
    _Tokenizer.prototype._savePosition = function () {
34740
        return [this._peek, this._index, this._column, this._line, this.tokens.length];
34741
    };
34742
    _Tokenizer.prototype._readUntil = function (char) {
34743
        var start = this._index;
34744
        this._attemptUntilChar(char);
34745
        return this._input.substring(start, this._index);
34746
    };
34747
    _Tokenizer.prototype._restorePosition = function (position) {
34748
        this._peek = position[0];
34749
        this._index = position[1];
34750
        this._column = position[2];
34751
        this._line = position[3];
34752
        var nbTokens = position[4];
34753
        if (nbTokens < this.tokens.length) {
34754
            // remove any extra tokens
34755
            this.tokens = this.tokens.slice(0, nbTokens);
34756
        }
34757
    };
34758
    _Tokenizer.prototype._isInExpansionCase = function () {
34759
        return this._expansionCaseStack.length > 0 &&
34760
            this._expansionCaseStack[this._expansionCaseStack.length - 1] ===
34761
                TokenType$1.EXPANSION_CASE_EXP_START;
34762
    };
34763
    _Tokenizer.prototype._isInExpansionForm = function () {
34764
        return this._expansionCaseStack.length > 0 &&
34765
            this._expansionCaseStack[this._expansionCaseStack.length - 1] ===
34766
                TokenType$1.EXPANSION_FORM_START;
34767
    };
34768
    return _Tokenizer;
34769
}());
34770
function isNotWhitespace(code) {
34771
    return !isWhitespace(code) || code === $EOF;
34772
}
34773
function isNameEnd(code) {
34774
    return isWhitespace(code) || code === $GT || code === $SLASH ||
34775
        code === $SQ || code === $DQ || code === $EQ;
34776
}
34777
function isPrefixEnd(code) {
34778
    return (code < $a || $z < code) && (code < $A || $Z < code) &&
34779
        (code < $0 || code > $9);
34780
}
34781
function isDigitEntityEnd(code) {
34782
    return code == $SEMICOLON || code == $EOF || !isAsciiHexDigit(code);
34783
}
34784
function isNamedEntityEnd(code) {
34785
    return code == $SEMICOLON || code == $EOF || !isAsciiLetter(code);
34786
}
34787
function isExpansionFormStart(input, offset, interpolationConfig) {
34788
    var isInterpolationStart = interpolationConfig ? input.indexOf(interpolationConfig.start, offset) == offset : false;
34789
    return input.charCodeAt(offset) == $LBRACE && !isInterpolationStart;
34790
}
34791
function isExpansionCaseStart(peek) {
34792
    return peek === $EQ || isAsciiLetter(peek) || isDigit(peek);
34793
}
34794
function compareCharCodeCaseInsensitive(code1, code2) {
34795
    return toUpperCaseCharCode(code1) == toUpperCaseCharCode(code2);
34796
}
34797
function toUpperCaseCharCode(code) {
34798
    return code >= $a && code <= $z ? code - $a + $A : code;
34799
}
34800
function mergeTextTokens(srcTokens) {
34801
    var dstTokens = [];
34802
    var lastDstToken = undefined;
34803
    for (var i = 0; i < srcTokens.length; i++) {
34804
        var token = srcTokens[i];
34805
        if (lastDstToken && lastDstToken.type == TokenType$1.TEXT && token.type == TokenType$1.TEXT) {
34806
            lastDstToken.parts[0] += token.parts[0];
34807
            lastDstToken.sourceSpan.end = token.sourceSpan.end;
34808
        }
34809
        else {
34810
            lastDstToken = token;
34811
            dstTokens.push(lastDstToken);
34812
        }
34813
    }
34814
    return dstTokens;
34815
}
34816
 
34817
/**
34818
 * @license
34819
 * Copyright Google Inc. All Rights Reserved.
34820
 *
34821
 * Use of this source code is governed by an MIT-style license that can be
34822
 * found in the LICENSE file at https://angular.io/license
34823
 */
34824
var TreeError = /** @class */ (function (_super) {
34825
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TreeError, _super);
34826
    function TreeError(elementName, span, msg) {
34827
        var _this = _super.call(this, span, msg) || this;
34828
        _this.elementName = elementName;
34829
        return _this;
34830
    }
34831
    TreeError.create = function (elementName, span, msg) {
34832
        return new TreeError(elementName, span, msg);
34833
    };
34834
    return TreeError;
34835
}(ParseError));
34836
var ParseTreeResult = /** @class */ (function () {
34837
    function ParseTreeResult(rootNodes, errors) {
34838
        this.rootNodes = rootNodes;
34839
        this.errors = errors;
34840
    }
34841
    return ParseTreeResult;
34842
}());
34843
var Parser$1 = /** @class */ (function () {
34844
    function Parser(getTagDefinition) {
34845
        this.getTagDefinition = getTagDefinition;
34846
    }
34847
    Parser.prototype.parse = function (source, url, parseExpansionForms, interpolationConfig) {
34848
        if (parseExpansionForms === void 0) { parseExpansionForms = false; }
34849
        if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }
34850
        var tokensAndErrors = tokenize(source, url, this.getTagDefinition, parseExpansionForms, interpolationConfig);
34851
        var treeAndErrors = new _TreeBuilder(tokensAndErrors.tokens, this.getTagDefinition).build();
34852
        return new ParseTreeResult(treeAndErrors.rootNodes, tokensAndErrors.errors.concat(treeAndErrors.errors));
34853
    };
34854
    return Parser;
34855
}());
34856
var _TreeBuilder = /** @class */ (function () {
34857
    function _TreeBuilder(tokens, getTagDefinition) {
34858
        this.tokens = tokens;
34859
        this.getTagDefinition = getTagDefinition;
34860
        this._index = -1;
34861
        this._rootNodes = [];
34862
        this._errors = [];
34863
        this._elementStack = [];
34864
        this._advance();
34865
    }
34866
    _TreeBuilder.prototype.build = function () {
34867
        while (this._peek.type !== TokenType$1.EOF) {
34868
            if (this._peek.type === TokenType$1.TAG_OPEN_START) {
34869
                this._consumeStartTag(this._advance());
34870
            }
34871
            else if (this._peek.type === TokenType$1.TAG_CLOSE) {
34872
                this._consumeEndTag(this._advance());
34873
            }
34874
            else if (this._peek.type === TokenType$1.CDATA_START) {
34875
                this._closeVoidElement();
34876
                this._consumeCdata(this._advance());
34877
            }
34878
            else if (this._peek.type === TokenType$1.COMMENT_START) {
34879
                this._closeVoidElement();
34880
                this._consumeComment(this._advance());
34881
            }
34882
            else if (this._peek.type === TokenType$1.TEXT || this._peek.type === TokenType$1.RAW_TEXT ||
34883
                this._peek.type === TokenType$1.ESCAPABLE_RAW_TEXT) {
34884
                this._closeVoidElement();
34885
                this._consumeText(this._advance());
34886
            }
34887
            else if (this._peek.type === TokenType$1.EXPANSION_FORM_START) {
34888
                this._consumeExpansion(this._advance());
34889
            }
34890
            else {
34891
                // Skip all other tokens...
34892
                this._advance();
34893
            }
34894
        }
34895
        return new ParseTreeResult(this._rootNodes, this._errors);
34896
    };
34897
    _TreeBuilder.prototype._advance = function () {
34898
        var prev = this._peek;
34899
        if (this._index < this.tokens.length - 1) {
34900
            // Note: there is always an EOF token at the end
34901
            this._index++;
34902
        }
34903
        this._peek = this.tokens[this._index];
34904
        return prev;
34905
    };
34906
    _TreeBuilder.prototype._advanceIf = function (type) {
34907
        if (this._peek.type === type) {
34908
            return this._advance();
34909
        }
34910
        return null;
34911
    };
34912
    _TreeBuilder.prototype._consumeCdata = function (startToken) {
34913
        this._consumeText(this._advance());
34914
        this._advanceIf(TokenType$1.CDATA_END);
34915
    };
34916
    _TreeBuilder.prototype._consumeComment = function (token) {
34917
        var text = this._advanceIf(TokenType$1.RAW_TEXT);
34918
        this._advanceIf(TokenType$1.COMMENT_END);
34919
        var value = text != null ? text.parts[0].trim() : null;
34920
        this._addToParent(new Comment(value, token.sourceSpan));
34921
    };
34922
    _TreeBuilder.prototype._consumeExpansion = function (token) {
34923
        var switchValue = this._advance();
34924
        var type = this._advance();
34925
        var cases = [];
34926
        // read =
34927
        while (this._peek.type === TokenType$1.EXPANSION_CASE_VALUE) {
34928
            var expCase = this._parseExpansionCase();
34929
            if (!expCase)
34930
                return; // error
34931
            cases.push(expCase);
34932
        }
34933
        // read the final }
34934
        if (this._peek.type !== TokenType$1.EXPANSION_FORM_END) {
34935
            this._errors.push(TreeError.create(null, this._peek.sourceSpan, "Invalid ICU message. Missing '}'."));
34936
            return;
34937
        }
34938
        var sourceSpan = new ParseSourceSpan(token.sourceSpan.start, this._peek.sourceSpan.end);
34939
        this._addToParent(new Expansion(switchValue.parts[0], type.parts[0], cases, sourceSpan, switchValue.sourceSpan));
34940
        this._advance();
34941
    };
34942
    _TreeBuilder.prototype._parseExpansionCase = function () {
34943
        var value = this._advance();
34944
        // read {
34945
        if (this._peek.type !== TokenType$1.EXPANSION_CASE_EXP_START) {
34946
            this._errors.push(TreeError.create(null, this._peek.sourceSpan, "Invalid ICU message. Missing '{'."));
34947
            return null;
34948
        }
34949
        // read until }
34950
        var start = this._advance();
34951
        var exp = this._collectExpansionExpTokens(start);
34952
        if (!exp)
34953
            return null;
34954
        var end = this._advance();
34955
        exp.push(new Token$1(TokenType$1.EOF, [], end.sourceSpan));
34956
        // parse everything in between { and }
34957
        var parsedExp = new _TreeBuilder(exp, this.getTagDefinition).build();
34958
        if (parsedExp.errors.length > 0) {
34959
            this._errors = this._errors.concat(parsedExp.errors);
34960
            return null;
34961
        }
34962
        var sourceSpan = new ParseSourceSpan(value.sourceSpan.start, end.sourceSpan.end);
34963
        var expSourceSpan = new ParseSourceSpan(start.sourceSpan.start, end.sourceSpan.end);
34964
        return new ExpansionCase(value.parts[0], parsedExp.rootNodes, sourceSpan, value.sourceSpan, expSourceSpan);
34965
    };
34966
    _TreeBuilder.prototype._collectExpansionExpTokens = function (start) {
34967
        var exp = [];
34968
        var expansionFormStack = [TokenType$1.EXPANSION_CASE_EXP_START];
34969
        while (true) {
34970
            if (this._peek.type === TokenType$1.EXPANSION_FORM_START ||
34971
                this._peek.type === TokenType$1.EXPANSION_CASE_EXP_START) {
34972
                expansionFormStack.push(this._peek.type);
34973
            }
34974
            if (this._peek.type === TokenType$1.EXPANSION_CASE_EXP_END) {
34975
                if (lastOnStack(expansionFormStack, TokenType$1.EXPANSION_CASE_EXP_START)) {
34976
                    expansionFormStack.pop();
34977
                    if (expansionFormStack.length == 0)
34978
                        return exp;
34979
                }
34980
                else {
34981
                    this._errors.push(TreeError.create(null, start.sourceSpan, "Invalid ICU message. Missing '}'."));
34982
                    return null;
34983
                }
34984
            }
34985
            if (this._peek.type === TokenType$1.EXPANSION_FORM_END) {
34986
                if (lastOnStack(expansionFormStack, TokenType$1.EXPANSION_FORM_START)) {
34987
                    expansionFormStack.pop();
34988
                }
34989
                else {
34990
                    this._errors.push(TreeError.create(null, start.sourceSpan, "Invalid ICU message. Missing '}'."));
34991
                    return null;
34992
                }
34993
            }
34994
            if (this._peek.type === TokenType$1.EOF) {
34995
                this._errors.push(TreeError.create(null, start.sourceSpan, "Invalid ICU message. Missing '}'."));
34996
                return null;
34997
            }
34998
            exp.push(this._advance());
34999
        }
35000
    };
35001
    _TreeBuilder.prototype._consumeText = function (token) {
35002
        var text = token.parts[0];
35003
        if (text.length > 0 && text[0] == '\n') {
35004
            var parent_1 = this._getParentElement();
35005
            if (parent_1 != null && parent_1.children.length == 0 &&
35006
                this.getTagDefinition(parent_1.name).ignoreFirstLf) {
35007
                text = text.substring(1);
35008
            }
35009
        }
35010
        if (text.length > 0) {
35011
            this._addToParent(new Text(text, token.sourceSpan));
35012
        }
35013
    };
35014
    _TreeBuilder.prototype._closeVoidElement = function () {
35015
        var el = this._getParentElement();
35016
        if (el && this.getTagDefinition(el.name).isVoid) {
35017
            this._elementStack.pop();
35018
        }
35019
    };
35020
    _TreeBuilder.prototype._consumeStartTag = function (startTagToken) {
35021
        var prefix = startTagToken.parts[0];
35022
        var name = startTagToken.parts[1];
35023
        var attrs = [];
35024
        while (this._peek.type === TokenType$1.ATTR_NAME) {
35025
            attrs.push(this._consumeAttr(this._advance()));
35026
        }
35027
        var fullName = this._getElementFullName(prefix, name, this._getParentElement());
35028
        var selfClosing = false;
35029
        // Note: There could have been a tokenizer error
35030
        // so that we don't get a token for the end tag...
35031
        if (this._peek.type === TokenType$1.TAG_OPEN_END_VOID) {
35032
            this._advance();
35033
            selfClosing = true;
35034
            var tagDef = this.getTagDefinition(fullName);
35035
            if (!(tagDef.canSelfClose || getNsPrefix(fullName) !== null || tagDef.isVoid)) {
35036
                this._errors.push(TreeError.create(fullName, startTagToken.sourceSpan, "Only void and foreign elements can be self closed \"" + startTagToken.parts[1] + "\""));
35037
            }
35038
        }
35039
        else if (this._peek.type === TokenType$1.TAG_OPEN_END) {
35040
            this._advance();
35041
            selfClosing = false;
35042
        }
35043
        var end = this._peek.sourceSpan.start;
35044
        var span = new ParseSourceSpan(startTagToken.sourceSpan.start, end);
35045
        var el = new Element(fullName, attrs, [], span, span, undefined);
35046
        this._pushElement(el);
35047
        if (selfClosing) {
35048
            this._popElement(fullName);
35049
            el.endSourceSpan = span;
35050
        }
35051
    };
35052
    _TreeBuilder.prototype._pushElement = function (el) {
35053
        var parentEl = this._getParentElement();
35054
        if (parentEl && this.getTagDefinition(parentEl.name).isClosedByChild(el.name)) {
35055
            this._elementStack.pop();
35056
        }
35057
        var tagDef = this.getTagDefinition(el.name);
35058
        var _a = this._getParentElementSkippingContainers(), parent = _a.parent, container = _a.container;
35059
        if (parent && tagDef.requireExtraParent(parent.name)) {
35060
            var newParent = new Element(tagDef.parentToAdd, [], [], el.sourceSpan, el.startSourceSpan, el.endSourceSpan);
35061
            this._insertBeforeContainer(parent, container, newParent);
35062
        }
35063
        this._addToParent(el);
35064
        this._elementStack.push(el);
35065
    };
35066
    _TreeBuilder.prototype._consumeEndTag = function (endTagToken) {
35067
        var fullName = this._getElementFullName(endTagToken.parts[0], endTagToken.parts[1], this._getParentElement());
35068
        if (this._getParentElement()) {
35069
            this._getParentElement().endSourceSpan = endTagToken.sourceSpan;
35070
        }
35071
        if (this.getTagDefinition(fullName).isVoid) {
35072
            this._errors.push(TreeError.create(fullName, endTagToken.sourceSpan, "Void elements do not have end tags \"" + endTagToken.parts[1] + "\""));
35073
        }
35074
        else if (!this._popElement(fullName)) {
35075
            var errMsg = "Unexpected closing tag \"" + fullName + "\". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags";
35076
            this._errors.push(TreeError.create(fullName, endTagToken.sourceSpan, errMsg));
35077
        }
35078
    };
35079
    _TreeBuilder.prototype._popElement = function (fullName) {
35080
        for (var stackIndex = this._elementStack.length - 1; stackIndex >= 0; stackIndex--) {
35081
            var el = this._elementStack[stackIndex];
35082
            if (el.name == fullName) {
35083
                this._elementStack.splice(stackIndex, this._elementStack.length - stackIndex);
35084
                return true;
35085
            }
35086
            if (!this.getTagDefinition(el.name).closedByParent) {
35087
                return false;
35088
            }
35089
        }
35090
        return false;
35091
    };
35092
    _TreeBuilder.prototype._consumeAttr = function (attrName) {
35093
        var fullName = mergeNsAndName(attrName.parts[0], attrName.parts[1]);
35094
        var end = attrName.sourceSpan.end;
35095
        var value = '';
35096
        var valueSpan = undefined;
35097
        if (this._peek.type === TokenType$1.ATTR_VALUE) {
35098
            var valueToken = this._advance();
35099
            value = valueToken.parts[0];
35100
            end = valueToken.sourceSpan.end;
35101
            valueSpan = valueToken.sourceSpan;
35102
        }
35103
        return new Attribute(fullName, value, new ParseSourceSpan(attrName.sourceSpan.start, end), valueSpan);
35104
    };
35105
    _TreeBuilder.prototype._getParentElement = function () {
35106
        return this._elementStack.length > 0 ? this._elementStack[this._elementStack.length - 1] : null;
35107
    };
35108
    /**
35109
     * Returns the parent in the DOM and the container.
35110
     *
35111
     * `<ng-container>` elements are skipped as they are not rendered as DOM element.
35112
     */
35113
    _TreeBuilder.prototype._getParentElementSkippingContainers = function () {
35114
        var container = null;
35115
        for (var i = this._elementStack.length - 1; i >= 0; i--) {
35116
            if (!isNgContainer(this._elementStack[i].name)) {
35117
                return { parent: this._elementStack[i], container: container };
35118
            }
35119
            container = this._elementStack[i];
35120
        }
35121
        return { parent: null, container: container };
35122
    };
35123
    _TreeBuilder.prototype._addToParent = function (node) {
35124
        var parent = this._getParentElement();
35125
        if (parent != null) {
35126
            parent.children.push(node);
35127
        }
35128
        else {
35129
            this._rootNodes.push(node);
35130
        }
35131
    };
35132
    /**
35133
     * Insert a node between the parent and the container.
35134
     * When no container is given, the node is appended as a child of the parent.
35135
     * Also updates the element stack accordingly.
35136
     *
35137
     * @internal
35138
     */
35139
    _TreeBuilder.prototype._insertBeforeContainer = function (parent, container, node) {
35140
        if (!container) {
35141
            this._addToParent(node);
35142
            this._elementStack.push(node);
35143
        }
35144
        else {
35145
            if (parent) {
35146
                // replace the container with the new node in the children
35147
                var index = parent.children.indexOf(container);
35148
                parent.children[index] = node;
35149
            }
35150
            else {
35151
                this._rootNodes.push(node);
35152
            }
35153
            node.children.push(container);
35154
            this._elementStack.splice(this._elementStack.indexOf(container), 0, node);
35155
        }
35156
    };
35157
    _TreeBuilder.prototype._getElementFullName = function (prefix, localName, parentElement) {
35158
        if (prefix == null) {
35159
            prefix = this.getTagDefinition(localName).implicitNamespacePrefix;
35160
            if (prefix == null && parentElement != null) {
35161
                prefix = getNsPrefix(parentElement.name);
35162
            }
35163
        }
35164
        return mergeNsAndName(prefix, localName);
35165
    };
35166
    return _TreeBuilder;
35167
}());
35168
function lastOnStack(stack, element) {
35169
    return stack.length > 0 && stack[stack.length - 1] === element;
35170
}
35171
 
35172
/**
35173
 * @license
35174
 * Copyright Google Inc. All Rights Reserved.
35175
 *
35176
 * Use of this source code is governed by an MIT-style license that can be
35177
 * found in the LICENSE file at https://angular.io/license
35178
 */
35179
function digest(message) {
35180
    return message.id || sha1(serializeNodes(message.nodes).join('') + ("[" + message.meaning + "]"));
35181
}
35182
function decimalDigest(message) {
35183
    if (message.id) {
35184
        return message.id;
35185
    }
35186
    var visitor = new _SerializerIgnoreIcuExpVisitor();
35187
    var parts = message.nodes.map(function (a) { return a.visit(visitor, null); });
35188
    return computeMsgId(parts.join(''), message.meaning);
35189
}
35190
/**
35191
 * Serialize the i18n ast to something xml-like in order to generate an UID.
35192
 *
35193
 * The visitor is also used in the i18n parser tests
35194
 *
35195
 * @internal
35196
 */
35197
var _SerializerVisitor = /** @class */ (function () {
35198
    function _SerializerVisitor() {
35199
    }
35200
    _SerializerVisitor.prototype.visitText = function (text, context) { return text.value; };
35201
    _SerializerVisitor.prototype.visitContainer = function (container, context) {
35202
        var _this = this;
35203
        return "[" + container.children.map(function (child) { return child.visit(_this); }).join(', ') + "]";
35204
    };
35205
    _SerializerVisitor.prototype.visitIcu = function (icu, context) {
35206
        var _this = this;
35207
        var strCases = Object.keys(icu.cases).map(function (k) { return k + " {" + icu.cases[k].visit(_this) + "}"; });
35208
        return "{" + icu.expression + ", " + icu.type + ", " + strCases.join(', ') + "}";
35209
    };
35210
    _SerializerVisitor.prototype.visitTagPlaceholder = function (ph, context) {
35211
        var _this = this;
35212
        return ph.isVoid ?
35213
            "<ph tag name=\"" + ph.startName + "\"/>" :
35214
            "<ph tag name=\"" + ph.startName + "\">" + ph.children.map(function (child) { return child.visit(_this); }).join(', ') + "</ph name=\"" + ph.closeName + "\">";
35215
    };
35216
    _SerializerVisitor.prototype.visitPlaceholder = function (ph, context) {
35217
        return ph.value ? "<ph name=\"" + ph.name + "\">" + ph.value + "</ph>" : "<ph name=\"" + ph.name + "\"/>";
35218
    };
35219
    _SerializerVisitor.prototype.visitIcuPlaceholder = function (ph, context) {
35220
        return "<ph icu name=\"" + ph.name + "\">" + ph.value.visit(this) + "</ph>";
35221
    };
35222
    return _SerializerVisitor;
35223
}());
35224
var serializerVisitor = new _SerializerVisitor();
35225
function serializeNodes(nodes) {
35226
    return nodes.map(function (a) { return a.visit(serializerVisitor, null); });
35227
}
35228
/**
35229
 * Serialize the i18n ast to something xml-like in order to generate an UID.
35230
 *
35231
 * Ignore the ICU expressions so that message IDs stays identical if only the expression changes.
35232
 *
35233
 * @internal
35234
 */
35235
var _SerializerIgnoreIcuExpVisitor = /** @class */ (function (_super) {
35236
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(_SerializerIgnoreIcuExpVisitor, _super);
35237
    function _SerializerIgnoreIcuExpVisitor() {
35238
        return _super !== null && _super.apply(this, arguments) || this;
35239
    }
35240
    _SerializerIgnoreIcuExpVisitor.prototype.visitIcu = function (icu, context) {
35241
        var _this = this;
35242
        var strCases = Object.keys(icu.cases).map(function (k) { return k + " {" + icu.cases[k].visit(_this) + "}"; });
35243
        // Do not take the expression into account
35244
        return "{" + icu.type + ", " + strCases.join(', ') + "}";
35245
    };
35246
    return _SerializerIgnoreIcuExpVisitor;
35247
}(_SerializerVisitor));
35248
/**
35249
 * Compute the SHA1 of the given string
35250
 *
35251
 * see http://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf
35252
 *
35253
 * WARNING: this function has not been designed not tested with security in mind.
35254
 *          DO NOT USE IT IN A SECURITY SENSITIVE CONTEXT.
35255
 */
35256
function sha1(str) {
35257
    var utf8 = utf8Encode(str);
35258
    var words32 = stringToWords32(utf8, Endian.Big);
35259
    var len = utf8.length * 8;
35260
    var w = new Array(80);
35261
    var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])([0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0], 5), a = _a[0], b = _a[1], c = _a[2], d = _a[3], e = _a[4];
35262
    words32[len >> 5] |= 0x80 << (24 - len % 32);
35263
    words32[((len + 64 >> 9) << 4) + 15] = len;
35264
    for (var i = 0; i < words32.length; i += 16) {
35265
        var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])([a, b, c, d, e], 5), h0 = _b[0], h1 = _b[1], h2 = _b[2], h3 = _b[3], h4 = _b[4];
35266
        for (var j = 0; j < 80; j++) {
35267
            if (j < 16) {
35268
                w[j] = words32[i + j];
35269
            }
35270
            else {
35271
                w[j] = rol32(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1);
35272
            }
35273
            var _c = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(fk(j, b, c, d), 2), f = _c[0], k = _c[1];
35274
            var temp = [rol32(a, 5), f, e, k, w[j]].reduce(add32);
35275
            _d = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])([d, c, rol32(b, 30), a, temp], 5), e = _d[0], d = _d[1], c = _d[2], b = _d[3], a = _d[4];
35276
        }
35277
        _e = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])([add32(a, h0), add32(b, h1), add32(c, h2), add32(d, h3), add32(e, h4)], 5), a = _e[0], b = _e[1], c = _e[2], d = _e[3], e = _e[4];
35278
    }
35279
    return byteStringToHexString(words32ToByteString([a, b, c, d, e]));
35280
    var _d, _e;
35281
}
35282
function fk(index, b, c, d) {
35283
    if (index < 20) {
35284
        return [(b & c) | (~b & d), 0x5a827999];
35285
    }
35286
    if (index < 40) {
35287
        return [b ^ c ^ d, 0x6ed9eba1];
35288
    }
35289
    if (index < 60) {
35290
        return [(b & c) | (b & d) | (c & d), 0x8f1bbcdc];
35291
    }
35292
    return [b ^ c ^ d, 0xca62c1d6];
35293
}
35294
/**
35295
 * Compute the fingerprint of the given string
35296
 *
35297
 * The output is 64 bit number encoded as a decimal string
35298
 *
35299
 * based on:
35300
 * https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/GoogleJsMessageIdGenerator.java
35301
 */
35302
function fingerprint(str) {
35303
    var utf8 = utf8Encode(str);
35304
    var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])([hash32(utf8, 0), hash32(utf8, 102072)], 2), hi = _a[0], lo = _a[1];
35305
    if (hi == 0 && (lo == 0 || lo == 1)) {
35306
        hi = hi ^ 0x130f9bef;
35307
        lo = lo ^ -0x6b5f56d8;
35308
    }
35309
    return [hi, lo];
35310
}
35311
function computeMsgId(msg, meaning) {
35312
    var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(fingerprint(msg), 2), hi = _a[0], lo = _a[1];
35313
    if (meaning) {
35314
        var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(fingerprint(meaning), 2), him = _b[0], lom = _b[1];
35315
        _c = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(add64(rol64([hi, lo], 1), [him, lom]), 2), hi = _c[0], lo = _c[1];
35316
    }
35317
    return byteStringToDecString(words32ToByteString([hi & 0x7fffffff, lo]));
35318
    var _c;
35319
}
35320
function hash32(str, c) {
35321
    var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])([0x9e3779b9, 0x9e3779b9], 2), a = _a[0], b = _a[1];
35322
    var i;
35323
    var len = str.length;
35324
    for (i = 0; i + 12 <= len; i += 12) {
35325
        a = add32(a, wordAt(str, i, Endian.Little));
35326
        b = add32(b, wordAt(str, i + 4, Endian.Little));
35327
        c = add32(c, wordAt(str, i + 8, Endian.Little));
35328
        _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(mix([a, b, c]), 3), a = _b[0], b = _b[1], c = _b[2];
35329
    }
35330
    a = add32(a, wordAt(str, i, Endian.Little));
35331
    b = add32(b, wordAt(str, i + 4, Endian.Little));
35332
    // the first byte of c is reserved for the length
35333
    c = add32(c, len);
35334
    c = add32(c, wordAt(str, i + 8, Endian.Little) << 8);
35335
    return mix([a, b, c])[2];
35336
    var _b;
35337
}
35338
// clang-format off
35339
function mix(_a) {
35340
    var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(_a, 3), a = _b[0], b = _b[1], c = _b[2];
35341
    a = sub32(a, b);
35342
    a = sub32(a, c);
35343
    a ^= c >>> 13;
35344
    b = sub32(b, c);
35345
    b = sub32(b, a);
35346
    b ^= a << 8;
35347
    c = sub32(c, a);
35348
    c = sub32(c, b);
35349
    c ^= b >>> 13;
35350
    a = sub32(a, b);
35351
    a = sub32(a, c);
35352
    a ^= c >>> 12;
35353
    b = sub32(b, c);
35354
    b = sub32(b, a);
35355
    b ^= a << 16;
35356
    c = sub32(c, a);
35357
    c = sub32(c, b);
35358
    c ^= b >>> 5;
35359
    a = sub32(a, b);
35360
    a = sub32(a, c);
35361
    a ^= c >>> 3;
35362
    b = sub32(b, c);
35363
    b = sub32(b, a);
35364
    b ^= a << 10;
35365
    c = sub32(c, a);
35366
    c = sub32(c, b);
35367
    c ^= b >>> 15;
35368
    return [a, b, c];
35369
}
35370
// clang-format on
35371
// Utils
35372
var Endian;
35373
(function (Endian) {
35374
    Endian[Endian["Little"] = 0] = "Little";
35375
    Endian[Endian["Big"] = 1] = "Big";
35376
})(Endian || (Endian = {}));
35377
function add32(a, b) {
35378
    return add32to64(a, b)[1];
35379
}
35380
function add32to64(a, b) {
35381
    var low = (a & 0xffff) + (b & 0xffff);
35382
    var high = (a >>> 16) + (b >>> 16) + (low >>> 16);
35383
    return [high >>> 16, (high << 16) | (low & 0xffff)];
35384
}
35385
function add64(_a, _b) {
35386
    var _c = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(_a, 2), ah = _c[0], al = _c[1];
35387
    var _d = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(_b, 2), bh = _d[0], bl = _d[1];
35388
    var _e = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(add32to64(al, bl), 2), carry = _e[0], l = _e[1];
35389
    var h = add32(add32(ah, bh), carry);
35390
    return [h, l];
35391
}
35392
function sub32(a, b) {
35393
    var low = (a & 0xffff) - (b & 0xffff);
35394
    var high = (a >> 16) - (b >> 16) + (low >> 16);
35395
    return (high << 16) | (low & 0xffff);
35396
}
35397
// Rotate a 32b number left `count` position
35398
function rol32(a, count) {
35399
    return (a << count) | (a >>> (32 - count));
35400
}
35401
// Rotate a 64b number left `count` position
35402
function rol64(_a, count) {
35403
    var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(_a, 2), hi = _b[0], lo = _b[1];
35404
    var h = (hi << count) | (lo >>> (32 - count));
35405
    var l = (lo << count) | (hi >>> (32 - count));
35406
    return [h, l];
35407
}
35408
function stringToWords32(str, endian) {
35409
    var words32 = Array((str.length + 3) >>> 2);
35410
    for (var i = 0; i < words32.length; i++) {
35411
        words32[i] = wordAt(str, i * 4, endian);
35412
    }
35413
    return words32;
35414
}
35415
function byteAt(str, index) {
35416
    return index >= str.length ? 0 : str.charCodeAt(index) & 0xff;
35417
}
35418
function wordAt(str, index, endian) {
35419
    var word = 0;
35420
    if (endian === Endian.Big) {
35421
        for (var i = 0; i < 4; i++) {
35422
            word += byteAt(str, index + i) << (24 - 8 * i);
35423
        }
35424
    }
35425
    else {
35426
        for (var i = 0; i < 4; i++) {
35427
            word += byteAt(str, index + i) << 8 * i;
35428
        }
35429
    }
35430
    return word;
35431
}
35432
function words32ToByteString(words32) {
35433
    return words32.reduce(function (str, word) { return str + word32ToByteString(word); }, '');
35434
}
35435
function word32ToByteString(word) {
35436
    var str = '';
35437
    for (var i = 0; i < 4; i++) {
35438
        str += String.fromCharCode((word >>> 8 * (3 - i)) & 0xff);
35439
    }
35440
    return str;
35441
}
35442
function byteStringToHexString(str) {
35443
    var hex = '';
35444
    for (var i = 0; i < str.length; i++) {
35445
        var b = byteAt(str, i);
35446
        hex += (b >>> 4).toString(16) + (b & 0x0f).toString(16);
35447
    }
35448
    return hex.toLowerCase();
35449
}
35450
// based on http://www.danvk.org/hex2dec.html (JS can not handle more than 56b)
35451
function byteStringToDecString(str) {
35452
    var decimal = '';
35453
    var toThePower = '1';
35454
    for (var i = str.length - 1; i >= 0; i--) {
35455
        decimal = addBigInt(decimal, numberTimesBigInt(byteAt(str, i), toThePower));
35456
        toThePower = numberTimesBigInt(256, toThePower);
35457
    }
35458
    return decimal.split('').reverse().join('');
35459
}
35460
// x and y decimal, lowest significant digit first
35461
function addBigInt(x, y) {
35462
    var sum = '';
35463
    var len = Math.max(x.length, y.length);
35464
    for (var i = 0, carry = 0; i < len || carry; i++) {
35465
        var tmpSum = carry + +(x[i] || 0) + +(y[i] || 0);
35466
        if (tmpSum >= 10) {
35467
            carry = 1;
35468
            sum += tmpSum - 10;
35469
        }
35470
        else {
35471
            carry = 0;
35472
            sum += tmpSum;
35473
        }
35474
    }
35475
    return sum;
35476
}
35477
function numberTimesBigInt(num, b) {
35478
    var product = '';
35479
    var bToThePower = b;
35480
    for (; num !== 0; num = num >>> 1) {
35481
        if (num & 1)
35482
            product = addBigInt(product, bToThePower);
35483
        bToThePower = addBigInt(bToThePower, bToThePower);
35484
    }
35485
    return product;
35486
}
35487
 
35488
/**
35489
 * @license
35490
 * Copyright Google Inc. All Rights Reserved.
35491
 *
35492
 * Use of this source code is governed by an MIT-style license that can be
35493
 * found in the LICENSE file at https://angular.io/license
35494
 */
35495
var Message = /** @class */ (function () {
35496
    /**
35497
     * @param nodes message AST
35498
     * @param placeholders maps placeholder names to static content
35499
     * @param placeholderToMessage maps placeholder names to messages (used for nested ICU messages)
35500
     * @param meaning
35501
     * @param description
35502
     * @param id
35503
     */
35504
    function Message(nodes, placeholders, placeholderToMessage, meaning, description, id) {
35505
        this.nodes = nodes;
35506
        this.placeholders = placeholders;
35507
        this.placeholderToMessage = placeholderToMessage;
35508
        this.meaning = meaning;
35509
        this.description = description;
35510
        this.id = id;
35511
        if (nodes.length) {
35512
            this.sources = [{
35513
                    filePath: nodes[0].sourceSpan.start.file.url,
35514
                    startLine: nodes[0].sourceSpan.start.line + 1,
35515
                    startCol: nodes[0].sourceSpan.start.col + 1,
35516
                    endLine: nodes[nodes.length - 1].sourceSpan.end.line + 1,
35517
                    endCol: nodes[0].sourceSpan.start.col + 1
35518
                }];
35519
        }
35520
        else {
35521
            this.sources = [];
35522
        }
35523
    }
35524
    return Message;
35525
}());
35526
var Text$1 = /** @class */ (function () {
35527
    function Text(value, sourceSpan) {
35528
        this.value = value;
35529
        this.sourceSpan = sourceSpan;
35530
    }
35531
    Text.prototype.visit = function (visitor, context) { return visitor.visitText(this, context); };
35532
    return Text;
35533
}());
35534
// TODO(vicb): do we really need this node (vs an array) ?
35535
var Container = /** @class */ (function () {
35536
    function Container(children, sourceSpan) {
35537
        this.children = children;
35538
        this.sourceSpan = sourceSpan;
35539
    }
35540
    Container.prototype.visit = function (visitor, context) { return visitor.visitContainer(this, context); };
35541
    return Container;
35542
}());
35543
var Icu = /** @class */ (function () {
35544
    function Icu(expression, type, cases, sourceSpan) {
35545
        this.expression = expression;
35546
        this.type = type;
35547
        this.cases = cases;
35548
        this.sourceSpan = sourceSpan;
35549
    }
35550
    Icu.prototype.visit = function (visitor, context) { return visitor.visitIcu(this, context); };
35551
    return Icu;
35552
}());
35553
var TagPlaceholder = /** @class */ (function () {
35554
    function TagPlaceholder(tag, attrs, startName, closeName, children, isVoid, sourceSpan) {
35555
        this.tag = tag;
35556
        this.attrs = attrs;
35557
        this.startName = startName;
35558
        this.closeName = closeName;
35559
        this.children = children;
35560
        this.isVoid = isVoid;
35561
        this.sourceSpan = sourceSpan;
35562
    }
35563
    TagPlaceholder.prototype.visit = function (visitor, context) { return visitor.visitTagPlaceholder(this, context); };
35564
    return TagPlaceholder;
35565
}());
35566
var Placeholder = /** @class */ (function () {
35567
    function Placeholder(value, name, sourceSpan) {
35568
        this.value = value;
35569
        this.name = name;
35570
        this.sourceSpan = sourceSpan;
35571
    }
35572
    Placeholder.prototype.visit = function (visitor, context) { return visitor.visitPlaceholder(this, context); };
35573
    return Placeholder;
35574
}());
35575
var IcuPlaceholder = /** @class */ (function () {
35576
    function IcuPlaceholder(value, name, sourceSpan) {
35577
        this.value = value;
35578
        this.name = name;
35579
        this.sourceSpan = sourceSpan;
35580
    }
35581
    IcuPlaceholder.prototype.visit = function (visitor, context) { return visitor.visitIcuPlaceholder(this, context); };
35582
    return IcuPlaceholder;
35583
}());
35584
// Clone the AST
35585
var CloneVisitor = /** @class */ (function () {
35586
    function CloneVisitor() {
35587
    }
35588
    CloneVisitor.prototype.visitText = function (text, context) { return new Text$1(text.value, text.sourceSpan); };
35589
    CloneVisitor.prototype.visitContainer = function (container, context) {
35590
        var _this = this;
35591
        var children = container.children.map(function (n) { return n.visit(_this, context); });
35592
        return new Container(children, container.sourceSpan);
35593
    };
35594
    CloneVisitor.prototype.visitIcu = function (icu, context) {
35595
        var _this = this;
35596
        var cases = {};
35597
        Object.keys(icu.cases).forEach(function (key) { return cases[key] = icu.cases[key].visit(_this, context); });
35598
        var msg = new Icu(icu.expression, icu.type, cases, icu.sourceSpan);
35599
        msg.expressionPlaceholder = icu.expressionPlaceholder;
35600
        return msg;
35601
    };
35602
    CloneVisitor.prototype.visitTagPlaceholder = function (ph, context) {
35603
        var _this = this;
35604
        var children = ph.children.map(function (n) { return n.visit(_this, context); });
35605
        return new TagPlaceholder(ph.tag, ph.attrs, ph.startName, ph.closeName, children, ph.isVoid, ph.sourceSpan);
35606
    };
35607
    CloneVisitor.prototype.visitPlaceholder = function (ph, context) {
35608
        return new Placeholder(ph.value, ph.name, ph.sourceSpan);
35609
    };
35610
    CloneVisitor.prototype.visitIcuPlaceholder = function (ph, context) {
35611
        return new IcuPlaceholder(ph.value, ph.name, ph.sourceSpan);
35612
    };
35613
    return CloneVisitor;
35614
}());
35615
// Visit all the nodes recursively
35616
var RecurseVisitor = /** @class */ (function () {
35617
    function RecurseVisitor() {
35618
    }
35619
    RecurseVisitor.prototype.visitText = function (text, context) { };
35620
    RecurseVisitor.prototype.visitContainer = function (container, context) {
35621
        var _this = this;
35622
        container.children.forEach(function (child) { return child.visit(_this); });
35623
    };
35624
    RecurseVisitor.prototype.visitIcu = function (icu, context) {
35625
        var _this = this;
35626
        Object.keys(icu.cases).forEach(function (k) { icu.cases[k].visit(_this); });
35627
    };
35628
    RecurseVisitor.prototype.visitTagPlaceholder = function (ph, context) {
35629
        var _this = this;
35630
        ph.children.forEach(function (child) { return child.visit(_this); });
35631
    };
35632
    RecurseVisitor.prototype.visitPlaceholder = function (ph, context) { };
35633
    RecurseVisitor.prototype.visitIcuPlaceholder = function (ph, context) { };
35634
    return RecurseVisitor;
35635
}());
35636
 
35637
/**
35638
 * @license
35639
 * Copyright Google Inc. All Rights Reserved.
35640
 *
35641
 * Use of this source code is governed by an MIT-style license that can be
35642
 * found in the LICENSE file at https://angular.io/license
35643
 */
35644
var HtmlTagDefinition = /** @class */ (function () {
35645
    function HtmlTagDefinition(_a) {
35646
        var _b = _a === void 0 ? {} : _a, closedByChildren = _b.closedByChildren, requiredParents = _b.requiredParents, implicitNamespacePrefix = _b.implicitNamespacePrefix, _c = _b.contentType, contentType = _c === void 0 ? TagContentType.PARSABLE_DATA : _c, _d = _b.closedByParent, closedByParent = _d === void 0 ? false : _d, _e = _b.isVoid, isVoid = _e === void 0 ? false : _e, _f = _b.ignoreFirstLf, ignoreFirstLf = _f === void 0 ? false : _f;
35647
        var _this = this;
35648
        this.closedByChildren = {};
35649
        this.closedByParent = false;
35650
        this.canSelfClose = false;
35651
        if (closedByChildren && closedByChildren.length > 0) {
35652
            closedByChildren.forEach(function (tagName) { return _this.closedByChildren[tagName] = true; });
35653
        }
35654
        this.isVoid = isVoid;
35655
        this.closedByParent = closedByParent || isVoid;
35656
        if (requiredParents && requiredParents.length > 0) {
35657
            this.requiredParents = {};
35658
            // The first parent is the list is automatically when none of the listed parents are present
35659
            this.parentToAdd = requiredParents[0];
35660
            requiredParents.forEach(function (tagName) { return _this.requiredParents[tagName] = true; });
35661
        }
35662
        this.implicitNamespacePrefix = implicitNamespacePrefix || null;
35663
        this.contentType = contentType;
35664
        this.ignoreFirstLf = ignoreFirstLf;
35665
    }
35666
    HtmlTagDefinition.prototype.requireExtraParent = function (currentParent) {
35667
        if (!this.requiredParents) {
35668
            return false;
35669
        }
35670
        if (!currentParent) {
35671
            return true;
35672
        }
35673
        var lcParent = currentParent.toLowerCase();
35674
        var isParentTemplate = lcParent === 'template' || currentParent === 'ng-template';
35675
        return !isParentTemplate && this.requiredParents[lcParent] != true;
35676
    };
35677
    HtmlTagDefinition.prototype.isClosedByChild = function (name) {
35678
        return this.isVoid || name.toLowerCase() in this.closedByChildren;
35679
    };
35680
    return HtmlTagDefinition;
35681
}());
35682
// see http://www.w3.org/TR/html51/syntax.html#optional-tags
35683
// This implementation does not fully conform to the HTML5 spec.
35684
var TAG_DEFINITIONS = {
35685
    'base': new HtmlTagDefinition({ isVoid: true }),
35686
    'meta': new HtmlTagDefinition({ isVoid: true }),
35687
    'area': new HtmlTagDefinition({ isVoid: true }),
35688
    'embed': new HtmlTagDefinition({ isVoid: true }),
35689
    'link': new HtmlTagDefinition({ isVoid: true }),
35690
    'img': new HtmlTagDefinition({ isVoid: true }),
35691
    'input': new HtmlTagDefinition({ isVoid: true }),
35692
    'param': new HtmlTagDefinition({ isVoid: true }),
35693
    'hr': new HtmlTagDefinition({ isVoid: true }),
35694
    'br': new HtmlTagDefinition({ isVoid: true }),
35695
    'source': new HtmlTagDefinition({ isVoid: true }),
35696
    'track': new HtmlTagDefinition({ isVoid: true }),
35697
    'wbr': new HtmlTagDefinition({ isVoid: true }),
35698
    'p': new HtmlTagDefinition({
35699
        closedByChildren: [
35700
            'address', 'article', 'aside', 'blockquote', 'div', 'dl', 'fieldset', 'footer', 'form',
35701
            'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', 'hr',
35702
            'main', 'nav', 'ol', 'p', 'pre', 'section', 'table', 'ul'
35703
        ],
35704
        closedByParent: true
35705
    }),
35706
    'thead': new HtmlTagDefinition({ closedByChildren: ['tbody', 'tfoot'] }),
35707
    'tbody': new HtmlTagDefinition({ closedByChildren: ['tbody', 'tfoot'], closedByParent: true }),
35708
    'tfoot': new HtmlTagDefinition({ closedByChildren: ['tbody'], closedByParent: true }),
35709
    'tr': new HtmlTagDefinition({
35710
        closedByChildren: ['tr'],
35711
        requiredParents: ['tbody', 'tfoot', 'thead'],
35712
        closedByParent: true
35713
    }),
35714
    'td': new HtmlTagDefinition({ closedByChildren: ['td', 'th'], closedByParent: true }),
35715
    'th': new HtmlTagDefinition({ closedByChildren: ['td', 'th'], closedByParent: true }),
35716
    'col': new HtmlTagDefinition({ requiredParents: ['colgroup'], isVoid: true }),
35717
    'svg': new HtmlTagDefinition({ implicitNamespacePrefix: 'svg' }),
35718
    'math': new HtmlTagDefinition({ implicitNamespacePrefix: 'math' }),
35719
    'li': new HtmlTagDefinition({ closedByChildren: ['li'], closedByParent: true }),
35720
    'dt': new HtmlTagDefinition({ closedByChildren: ['dt', 'dd'] }),
35721
    'dd': new HtmlTagDefinition({ closedByChildren: ['dt', 'dd'], closedByParent: true }),
35722
    'rb': new HtmlTagDefinition({ closedByChildren: ['rb', 'rt', 'rtc', 'rp'], closedByParent: true }),
35723
    'rt': new HtmlTagDefinition({ closedByChildren: ['rb', 'rt', 'rtc', 'rp'], closedByParent: true }),
35724
    'rtc': new HtmlTagDefinition({ closedByChildren: ['rb', 'rtc', 'rp'], closedByParent: true }),
35725
    'rp': new HtmlTagDefinition({ closedByChildren: ['rb', 'rt', 'rtc', 'rp'], closedByParent: true }),
35726
    'optgroup': new HtmlTagDefinition({ closedByChildren: ['optgroup'], closedByParent: true }),
35727
    'option': new HtmlTagDefinition({ closedByChildren: ['option', 'optgroup'], closedByParent: true }),
35728
    'pre': new HtmlTagDefinition({ ignoreFirstLf: true }),
35729
    'listing': new HtmlTagDefinition({ ignoreFirstLf: true }),
35730
    'style': new HtmlTagDefinition({ contentType: TagContentType.RAW_TEXT }),
35731
    'script': new HtmlTagDefinition({ contentType: TagContentType.RAW_TEXT }),
35732
    'title': new HtmlTagDefinition({ contentType: TagContentType.ESCAPABLE_RAW_TEXT }),
35733
    'textarea': new HtmlTagDefinition({ contentType: TagContentType.ESCAPABLE_RAW_TEXT, ignoreFirstLf: true }),
35734
};
35735
var _DEFAULT_TAG_DEFINITION = new HtmlTagDefinition();
35736
function getHtmlTagDefinition(tagName) {
35737
    return TAG_DEFINITIONS[tagName.toLowerCase()] || _DEFAULT_TAG_DEFINITION;
35738
}
35739
 
35740
/**
35741
 * @license
35742
 * Copyright Google Inc. All Rights Reserved.
35743
 *
35744
 * Use of this source code is governed by an MIT-style license that can be
35745
 * found in the LICENSE file at https://angular.io/license
35746
 */
35747
var TAG_TO_PLACEHOLDER_NAMES = {
35748
    'A': 'LINK',
35749
    'B': 'BOLD_TEXT',
35750
    'BR': 'LINE_BREAK',
35751
    'EM': 'EMPHASISED_TEXT',
35752
    'H1': 'HEADING_LEVEL1',
35753
    'H2': 'HEADING_LEVEL2',
35754
    'H3': 'HEADING_LEVEL3',
35755
    'H4': 'HEADING_LEVEL4',
35756
    'H5': 'HEADING_LEVEL5',
35757
    'H6': 'HEADING_LEVEL6',
35758
    'HR': 'HORIZONTAL_RULE',
35759
    'I': 'ITALIC_TEXT',
35760
    'LI': 'LIST_ITEM',
35761
    'LINK': 'MEDIA_LINK',
35762
    'OL': 'ORDERED_LIST',
35763
    'P': 'PARAGRAPH',
35764
    'Q': 'QUOTATION',
35765
    'S': 'STRIKETHROUGH_TEXT',
35766
    'SMALL': 'SMALL_TEXT',
35767
    'SUB': 'SUBSTRIPT',
35768
    'SUP': 'SUPERSCRIPT',
35769
    'TBODY': 'TABLE_BODY',
35770
    'TD': 'TABLE_CELL',
35771
    'TFOOT': 'TABLE_FOOTER',
35772
    'TH': 'TABLE_HEADER_CELL',
35773
    'THEAD': 'TABLE_HEADER',
35774
    'TR': 'TABLE_ROW',
35775
    'TT': 'MONOSPACED_TEXT',
35776
    'U': 'UNDERLINED_TEXT',
35777
    'UL': 'UNORDERED_LIST',
35778
};
35779
/**
35780
 * Creates unique names for placeholder with different content.
35781
 *
35782
 * Returns the same placeholder name when the content is identical.
35783
 */
35784
var PlaceholderRegistry = /** @class */ (function () {
35785
    function PlaceholderRegistry() {
35786
        // Count the occurrence of the base name top generate a unique name
35787
        this._placeHolderNameCounts = {};
35788
        // Maps signature to placeholder names
35789
        this._signatureToName = {};
35790
    }
35791
    PlaceholderRegistry.prototype.getStartTagPlaceholderName = function (tag, attrs, isVoid) {
35792
        var signature = this._hashTag(tag, attrs, isVoid);
35793
        if (this._signatureToName[signature]) {
35794
            return this._signatureToName[signature];
35795
        }
35796
        var upperTag = tag.toUpperCase();
35797
        var baseName = TAG_TO_PLACEHOLDER_NAMES[upperTag] || "TAG_" + upperTag;
35798
        var name = this._generateUniqueName(isVoid ? baseName : "START_" + baseName);
35799
        this._signatureToName[signature] = name;
35800
        return name;
35801
    };
35802
    PlaceholderRegistry.prototype.getCloseTagPlaceholderName = function (tag) {
35803
        var signature = this._hashClosingTag(tag);
35804
        if (this._signatureToName[signature]) {
35805
            return this._signatureToName[signature];
35806
        }
35807
        var upperTag = tag.toUpperCase();
35808
        var baseName = TAG_TO_PLACEHOLDER_NAMES[upperTag] || "TAG_" + upperTag;
35809
        var name = this._generateUniqueName("CLOSE_" + baseName);
35810
        this._signatureToName[signature] = name;
35811
        return name;
35812
    };
35813
    PlaceholderRegistry.prototype.getPlaceholderName = function (name, content) {
35814
        var upperName = name.toUpperCase();
35815
        var signature = "PH: " + upperName + "=" + content;
35816
        if (this._signatureToName[signature]) {
35817
            return this._signatureToName[signature];
35818
        }
35819
        var uniqueName = this._generateUniqueName(upperName);
35820
        this._signatureToName[signature] = uniqueName;
35821
        return uniqueName;
35822
    };
35823
    PlaceholderRegistry.prototype.getUniquePlaceholder = function (name) {
35824
        return this._generateUniqueName(name.toUpperCase());
35825
    };
35826
    // Generate a hash for a tag - does not take attribute order into account
35827
    PlaceholderRegistry.prototype._hashTag = function (tag, attrs, isVoid) {
35828
        var start = "<" + tag;
35829
        var strAttrs = Object.keys(attrs).sort().map(function (name) { return " " + name + "=" + attrs[name]; }).join('');
35830
        var end = isVoid ? '/>' : "></" + tag + ">";
35831
        return start + strAttrs + end;
35832
    };
35833
    PlaceholderRegistry.prototype._hashClosingTag = function (tag) { return this._hashTag("/" + tag, {}, false); };
35834
    PlaceholderRegistry.prototype._generateUniqueName = function (base) {
35835
        var seen = this._placeHolderNameCounts.hasOwnProperty(base);
35836
        if (!seen) {
35837
            this._placeHolderNameCounts[base] = 1;
35838
            return base;
35839
        }
35840
        var id = this._placeHolderNameCounts[base];
35841
        this._placeHolderNameCounts[base] = id + 1;
35842
        return base + "_" + id;
35843
    };
35844
    return PlaceholderRegistry;
35845
}());
35846
 
35847
/**
35848
 * @license
35849
 * Copyright Google Inc. All Rights Reserved.
35850
 *
35851
 * Use of this source code is governed by an MIT-style license that can be
35852
 * found in the LICENSE file at https://angular.io/license
35853
 */
35854
var _expParser = new Parser(new Lexer());
35855
/**
35856
 * Returns a function converting html nodes to an i18n Message given an interpolationConfig
35857
 */
35858
function createI18nMessageFactory(interpolationConfig) {
35859
    var visitor = new _I18nVisitor(_expParser, interpolationConfig);
35860
    return function (nodes, meaning, description, id) {
35861
        return visitor.toI18nMessage(nodes, meaning, description, id);
35862
    };
35863
}
35864
var _I18nVisitor = /** @class */ (function () {
35865
    function _I18nVisitor(_expressionParser, _interpolationConfig) {
35866
        this._expressionParser = _expressionParser;
35867
        this._interpolationConfig = _interpolationConfig;
35868
    }
35869
    _I18nVisitor.prototype.toI18nMessage = function (nodes, meaning, description, id) {
35870
        this._isIcu = nodes.length == 1 && nodes[0] instanceof Expansion;
35871
        this._icuDepth = 0;
35872
        this._placeholderRegistry = new PlaceholderRegistry();
35873
        this._placeholderToContent = {};
35874
        this._placeholderToMessage = {};
35875
        var i18nodes = visitAll(this, nodes, {});
35876
        return new Message(i18nodes, this._placeholderToContent, this._placeholderToMessage, meaning, description, id);
35877
    };
35878
    _I18nVisitor.prototype.visitElement = function (el, context) {
35879
        var children = visitAll(this, el.children);
35880
        var attrs = {};
35881
        el.attrs.forEach(function (attr) {
35882
            // Do not visit the attributes, translatable ones are top-level ASTs
35883
            attrs[attr.name] = attr.value;
35884
        });
35885
        var isVoid = getHtmlTagDefinition(el.name).isVoid;
35886
        var startPhName = this._placeholderRegistry.getStartTagPlaceholderName(el.name, attrs, isVoid);
35887
        this._placeholderToContent[startPhName] = el.sourceSpan.toString();
35888
        var closePhName = '';
35889
        if (!isVoid) {
35890
            closePhName = this._placeholderRegistry.getCloseTagPlaceholderName(el.name);
35891
            this._placeholderToContent[closePhName] = "</" + el.name + ">";
35892
        }
35893
        return new TagPlaceholder(el.name, attrs, startPhName, closePhName, children, isVoid, el.sourceSpan);
35894
    };
35895
    _I18nVisitor.prototype.visitAttribute = function (attribute, context) {
35896
        return this._visitTextWithInterpolation(attribute.value, attribute.sourceSpan);
35897
    };
35898
    _I18nVisitor.prototype.visitText = function (text, context) {
35899
        return this._visitTextWithInterpolation(text.value, text.sourceSpan);
35900
    };
35901
    _I18nVisitor.prototype.visitComment = function (comment, context) { return null; };
35902
    _I18nVisitor.prototype.visitExpansion = function (icu, context) {
35903
        var _this = this;
35904
        this._icuDepth++;
35905
        var i18nIcuCases = {};
35906
        var i18nIcu = new Icu(icu.switchValue, icu.type, i18nIcuCases, icu.sourceSpan);
35907
        icu.cases.forEach(function (caze) {
35908
            i18nIcuCases[caze.value] = new Container(caze.expression.map(function (node) { return node.visit(_this, {}); }), caze.expSourceSpan);
35909
        });
35910
        this._icuDepth--;
35911
        if (this._isIcu || this._icuDepth > 0) {
35912
            // Returns an ICU node when:
35913
            // - the message (vs a part of the message) is an ICU message, or
35914
            // - the ICU message is nested.
35915
            var expPh = this._placeholderRegistry.getUniquePlaceholder("VAR_" + icu.type);
35916
            i18nIcu.expressionPlaceholder = expPh;
35917
            this._placeholderToContent[expPh] = icu.switchValue;
35918
            return i18nIcu;
35919
        }
35920
        // Else returns a placeholder
35921
        // ICU placeholders should not be replaced with their original content but with the their
35922
        // translations. We need to create a new visitor (they are not re-entrant) to compute the
35923
        // message id.
35924
        // TODO(vicb): add a html.Node -> i18n.Message cache to avoid having to re-create the msg
35925
        var phName = this._placeholderRegistry.getPlaceholderName('ICU', icu.sourceSpan.toString());
35926
        var visitor = new _I18nVisitor(this._expressionParser, this._interpolationConfig);
35927
        this._placeholderToMessage[phName] = visitor.toI18nMessage([icu], '', '', '');
35928
        return new IcuPlaceholder(i18nIcu, phName, icu.sourceSpan);
35929
    };
35930
    _I18nVisitor.prototype.visitExpansionCase = function (icuCase, context) {
35931
        throw new Error('Unreachable code');
35932
    };
35933
    _I18nVisitor.prototype._visitTextWithInterpolation = function (text, sourceSpan) {
35934
        var splitInterpolation = this._expressionParser.splitInterpolation(text, sourceSpan.start.toString(), this._interpolationConfig);
35935
        if (!splitInterpolation) {
35936
            // No expression, return a single text
35937
            return new Text$1(text, sourceSpan);
35938
        }
35939
        // Return a group of text + expressions
35940
        var nodes = [];
35941
        var container = new Container(nodes, sourceSpan);
35942
        var _a = this._interpolationConfig, sDelimiter = _a.start, eDelimiter = _a.end;
35943
        for (var i = 0; i < splitInterpolation.strings.length - 1; i++) {
35944
            var expression = splitInterpolation.expressions[i];
35945
            var baseName = _extractPlaceholderName(expression) || 'INTERPOLATION';
35946
            var phName = this._placeholderRegistry.getPlaceholderName(baseName, expression);
35947
            if (splitInterpolation.strings[i].length) {
35948
                // No need to add empty strings
35949
                nodes.push(new Text$1(splitInterpolation.strings[i], sourceSpan));
35950
            }
35951
            nodes.push(new Placeholder(expression, phName, sourceSpan));
35952
            this._placeholderToContent[phName] = sDelimiter + expression + eDelimiter;
35953
        }
35954
        // The last index contains no expression
35955
        var lastStringIdx = splitInterpolation.strings.length - 1;
35956
        if (splitInterpolation.strings[lastStringIdx].length) {
35957
            nodes.push(new Text$1(splitInterpolation.strings[lastStringIdx], sourceSpan));
35958
        }
35959
        return container;
35960
    };
35961
    return _I18nVisitor;
35962
}());
35963
var _CUSTOM_PH_EXP = /\/\/[\s\S]*i18n[\s\S]*\([\s\S]*ph[\s\S]*=[\s\S]*("|')([\s\S]*?)\1[\s\S]*\)/g;
35964
function _extractPlaceholderName(input) {
35965
    return input.split(_CUSTOM_PH_EXP)[2];
35966
}
35967
 
35968
/**
35969
 * @license
35970
 * Copyright Google Inc. All Rights Reserved.
35971
 *
35972
 * Use of this source code is governed by an MIT-style license that can be
35973
 * found in the LICENSE file at https://angular.io/license
35974
 */
35975
/**
35976
 * An i18n error.
35977
 */
35978
var I18nError = /** @class */ (function (_super) {
35979
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(I18nError, _super);
35980
    function I18nError(span, msg) {
35981
        return _super.call(this, span, msg) || this;
35982
    }
35983
    return I18nError;
35984
}(ParseError));
35985
 
35986
/**
35987
 * @license
35988
 * Copyright Google Inc. All Rights Reserved.
35989
 *
35990
 * Use of this source code is governed by an MIT-style license that can be
35991
 * found in the LICENSE file at https://angular.io/license
35992
 */
35993
var _I18N_ATTR = 'i18n';
35994
var _I18N_ATTR_PREFIX = 'i18n-';
35995
var _I18N_COMMENT_PREFIX_REGEXP = /^i18n:?/;
35996
var MEANING_SEPARATOR = '|';
35997
var ID_SEPARATOR = '@@';
35998
var i18nCommentsWarned = false;
35999
/**
36000
 * Extract translatable messages from an html AST
36001
 */
36002
function extractMessages(nodes, interpolationConfig, implicitTags, implicitAttrs) {
36003
    var visitor = new _Visitor(implicitTags, implicitAttrs);
36004
    return visitor.extract(nodes, interpolationConfig);
36005
}
36006
function mergeTranslations(nodes, translations, interpolationConfig, implicitTags, implicitAttrs) {
36007
    var visitor = new _Visitor(implicitTags, implicitAttrs);
36008
    return visitor.merge(nodes, translations, interpolationConfig);
36009
}
36010
var ExtractionResult = /** @class */ (function () {
36011
    function ExtractionResult(messages, errors) {
36012
        this.messages = messages;
36013
        this.errors = errors;
36014
    }
36015
    return ExtractionResult;
36016
}());
36017
var _VisitorMode;
36018
(function (_VisitorMode) {
36019
    _VisitorMode[_VisitorMode["Extract"] = 0] = "Extract";
36020
    _VisitorMode[_VisitorMode["Merge"] = 1] = "Merge";
36021
})(_VisitorMode || (_VisitorMode = {}));
36022
/**
36023
 * This Visitor is used:
36024
 * 1. to extract all the translatable strings from an html AST (see `extract()`),
36025
 * 2. to replace the translatable strings with the actual translations (see `merge()`)
36026
 *
36027
 * @internal
36028
 */
36029
var _Visitor = /** @class */ (function () {
36030
    function _Visitor(_implicitTags, _implicitAttrs) {
36031
        this._implicitTags = _implicitTags;
36032
        this._implicitAttrs = _implicitAttrs;
36033
    }
36034
    /**
36035
     * Extracts the messages from the tree
36036
     */
36037
    _Visitor.prototype.extract = function (nodes, interpolationConfig) {
36038
        var _this = this;
36039
        this._init(_VisitorMode.Extract, interpolationConfig);
36040
        nodes.forEach(function (node) { return node.visit(_this, null); });
36041
        if (this._inI18nBlock) {
36042
            this._reportError(nodes[nodes.length - 1], 'Unclosed block');
36043
        }
36044
        return new ExtractionResult(this._messages, this._errors);
36045
    };
36046
    /**
36047
     * Returns a tree where all translatable nodes are translated
36048
     */
36049
    _Visitor.prototype.merge = function (nodes, translations, interpolationConfig) {
36050
        this._init(_VisitorMode.Merge, interpolationConfig);
36051
        this._translations = translations;
36052
        // Construct a single fake root element
36053
        var wrapper = new Element('wrapper', [], nodes, undefined, undefined, undefined);
36054
        var translatedNode = wrapper.visit(this, null);
36055
        if (this._inI18nBlock) {
36056
            this._reportError(nodes[nodes.length - 1], 'Unclosed block');
36057
        }
36058
        return new ParseTreeResult(translatedNode.children, this._errors);
36059
    };
36060
    _Visitor.prototype.visitExpansionCase = function (icuCase, context) {
36061
        // Parse cases for translatable html attributes
36062
        var expression = visitAll(this, icuCase.expression, context);
36063
        if (this._mode === _VisitorMode.Merge) {
36064
            return new ExpansionCase(icuCase.value, expression, icuCase.sourceSpan, icuCase.valueSourceSpan, icuCase.expSourceSpan);
36065
        }
36066
    };
36067
    _Visitor.prototype.visitExpansion = function (icu, context) {
36068
        this._mayBeAddBlockChildren(icu);
36069
        var wasInIcu = this._inIcu;
36070
        if (!this._inIcu) {
36071
            // nested ICU messages should not be extracted but top-level translated as a whole
36072
            if (this._isInTranslatableSection) {
36073
                this._addMessage([icu]);
36074
            }
36075
            this._inIcu = true;
36076
        }
36077
        var cases = visitAll(this, icu.cases, context);
36078
        if (this._mode === _VisitorMode.Merge) {
36079
            icu = new Expansion(icu.switchValue, icu.type, cases, icu.sourceSpan, icu.switchValueSourceSpan);
36080
        }
36081
        this._inIcu = wasInIcu;
36082
        return icu;
36083
    };
36084
    _Visitor.prototype.visitComment = function (comment, context) {
36085
        var isOpening = _isOpeningComment(comment);
36086
        if (isOpening && this._isInTranslatableSection) {
36087
            this._reportError(comment, 'Could not start a block inside a translatable section');
36088
            return;
36089
        }
36090
        var isClosing = _isClosingComment(comment);
36091
        if (isClosing && !this._inI18nBlock) {
36092
            this._reportError(comment, 'Trying to close an unopened block');
36093
            return;
36094
        }
36095
        if (!this._inI18nNode && !this._inIcu) {
36096
            if (!this._inI18nBlock) {
36097
                if (isOpening) {
36098
                    // deprecated from v5 you should use <ng-container i18n> instead of i18n comments
36099
                    if (!i18nCommentsWarned && console && console.warn) {
36100
                        i18nCommentsWarned = true;
36101
                        var details = comment.sourceSpan.details ? ", " + comment.sourceSpan.details : '';
36102
                        // TODO(ocombe): use a log service once there is a public one available
36103
                        console.warn("I18n comments are deprecated, use an <ng-container> element instead (" + comment.sourceSpan.start + details + ")");
36104
                    }
36105
                    this._inI18nBlock = true;
36106
                    this._blockStartDepth = this._depth;
36107
                    this._blockChildren = [];
36108
                    this._blockMeaningAndDesc =
36109
                        comment.value.replace(_I18N_COMMENT_PREFIX_REGEXP, '').trim();
36110
                    this._openTranslatableSection(comment);
36111
                }
36112
            }
36113
            else {
36114
                if (isClosing) {
36115
                    if (this._depth == this._blockStartDepth) {
36116
                        this._closeTranslatableSection(comment, this._blockChildren);
36117
                        this._inI18nBlock = false;
36118
                        var message = this._addMessage(this._blockChildren, this._blockMeaningAndDesc);
36119
                        // merge attributes in sections
36120
                        var nodes = this._translateMessage(comment, message);
36121
                        return visitAll(this, nodes);
36122
                    }
36123
                    else {
36124
                        this._reportError(comment, 'I18N blocks should not cross element boundaries');
36125
                        return;
36126
                    }
36127
                }
36128
            }
36129
        }
36130
    };
36131
    _Visitor.prototype.visitText = function (text, context) {
36132
        if (this._isInTranslatableSection) {
36133
            this._mayBeAddBlockChildren(text);
36134
        }
36135
        return text;
36136
    };
36137
    _Visitor.prototype.visitElement = function (el, context) {
36138
        var _this = this;
36139
        this._mayBeAddBlockChildren(el);
36140
        this._depth++;
36141
        var wasInI18nNode = this._inI18nNode;
36142
        var wasInImplicitNode = this._inImplicitNode;
36143
        var childNodes = [];
36144
        var translatedChildNodes = undefined;
36145
        // Extract:
36146
        // - top level nodes with the (implicit) "i18n" attribute if not already in a section
36147
        // - ICU messages
36148
        var i18nAttr = _getI18nAttr(el);
36149
        var i18nMeta = i18nAttr ? i18nAttr.value : '';
36150
        var isImplicit = this._implicitTags.some(function (tag) { return el.name === tag; }) && !this._inIcu &&
36151
            !this._isInTranslatableSection;
36152
        var isTopLevelImplicit = !wasInImplicitNode && isImplicit;
36153
        this._inImplicitNode = wasInImplicitNode || isImplicit;
36154
        if (!this._isInTranslatableSection && !this._inIcu) {
36155
            if (i18nAttr || isTopLevelImplicit) {
36156
                this._inI18nNode = true;
36157
                var message = this._addMessage(el.children, i18nMeta);
36158
                translatedChildNodes = this._translateMessage(el, message);
36159
            }
36160
            if (this._mode == _VisitorMode.Extract) {
36161
                var isTranslatable = i18nAttr || isTopLevelImplicit;
36162
                if (isTranslatable)
36163
                    this._openTranslatableSection(el);
36164
                visitAll(this, el.children);
36165
                if (isTranslatable)
36166
                    this._closeTranslatableSection(el, el.children);
36167
            }
36168
        }
36169
        else {
36170
            if (i18nAttr || isTopLevelImplicit) {
36171
                this._reportError(el, 'Could not mark an element as translatable inside a translatable section');
36172
            }
36173
            if (this._mode == _VisitorMode.Extract) {
36174
                // Descend into child nodes for extraction
36175
                visitAll(this, el.children);
36176
            }
36177
        }
36178
        if (this._mode === _VisitorMode.Merge) {
36179
            var visitNodes = translatedChildNodes || el.children;
36180
            visitNodes.forEach(function (child) {
36181
                var visited = child.visit(_this, context);
36182
                if (visited && !_this._isInTranslatableSection) {
36183
                    // Do not add the children from translatable sections (= i18n blocks here)
36184
                    // They will be added later in this loop when the block closes (i.e. on `<!-- /i18n -->`)
36185
                    childNodes = childNodes.concat(visited);
36186
                }
36187
            });
36188
        }
36189
        this._visitAttributesOf(el);
36190
        this._depth--;
36191
        this._inI18nNode = wasInI18nNode;
36192
        this._inImplicitNode = wasInImplicitNode;
36193
        if (this._mode === _VisitorMode.Merge) {
36194
            var translatedAttrs = this._translateAttributes(el);
36195
            return new Element(el.name, translatedAttrs, childNodes, el.sourceSpan, el.startSourceSpan, el.endSourceSpan);
36196
        }
36197
        return null;
36198
    };
36199
    _Visitor.prototype.visitAttribute = function (attribute, context) {
36200
        throw new Error('unreachable code');
36201
    };
36202
    _Visitor.prototype._init = function (mode, interpolationConfig) {
36203
        this._mode = mode;
36204
        this._inI18nBlock = false;
36205
        this._inI18nNode = false;
36206
        this._depth = 0;
36207
        this._inIcu = false;
36208
        this._msgCountAtSectionStart = undefined;
36209
        this._errors = [];
36210
        this._messages = [];
36211
        this._inImplicitNode = false;
36212
        this._createI18nMessage = createI18nMessageFactory(interpolationConfig);
36213
    };
36214
    // looks for translatable attributes
36215
    _Visitor.prototype._visitAttributesOf = function (el) {
36216
        var _this = this;
36217
        var explicitAttrNameToValue = {};
36218
        var implicitAttrNames = this._implicitAttrs[el.name] || [];
36219
        el.attrs.filter(function (attr) { return attr.name.startsWith(_I18N_ATTR_PREFIX); })
36220
            .forEach(function (attr) { return explicitAttrNameToValue[attr.name.slice(_I18N_ATTR_PREFIX.length)] =
36221
            attr.value; });
36222
        el.attrs.forEach(function (attr) {
36223
            if (attr.name in explicitAttrNameToValue) {
36224
                _this._addMessage([attr], explicitAttrNameToValue[attr.name]);
36225
            }
36226
            else if (implicitAttrNames.some(function (name) { return attr.name === name; })) {
36227
                _this._addMessage([attr]);
36228
            }
36229
        });
36230
    };
36231
    // add a translatable message
36232
    _Visitor.prototype._addMessage = function (ast, msgMeta) {
36233
        if (ast.length == 0 ||
36234
            ast.length == 1 && ast[0] instanceof Attribute && !ast[0].value) {
36235
            // Do not create empty messages
36236
            return null;
36237
        }
36238
        var _a = _parseMessageMeta(msgMeta), meaning = _a.meaning, description = _a.description, id = _a.id;
36239
        var message = this._createI18nMessage(ast, meaning, description, id);
36240
        this._messages.push(message);
36241
        return message;
36242
    };
36243
    // Translates the given message given the `TranslationBundle`
36244
    // This is used for translating elements / blocks - see `_translateAttributes` for attributes
36245
    // no-op when called in extraction mode (returns [])
36246
    _Visitor.prototype._translateMessage = function (el, message) {
36247
        if (message && this._mode === _VisitorMode.Merge) {
36248
            var nodes = this._translations.get(message);
36249
            if (nodes) {
36250
                return nodes;
36251
            }
36252
            this._reportError(el, "Translation unavailable for message id=\"" + this._translations.digest(message) + "\"");
36253
        }
36254
        return [];
36255
    };
36256
    // translate the attributes of an element and remove i18n specific attributes
36257
    _Visitor.prototype._translateAttributes = function (el) {
36258
        var _this = this;
36259
        var attributes = el.attrs;
36260
        var i18nParsedMessageMeta = {};
36261
        attributes.forEach(function (attr) {
36262
            if (attr.name.startsWith(_I18N_ATTR_PREFIX)) {
36263
                i18nParsedMessageMeta[attr.name.slice(_I18N_ATTR_PREFIX.length)] =
36264
                    _parseMessageMeta(attr.value);
36265
            }
36266
        });
36267
        var translatedAttributes = [];
36268
        attributes.forEach(function (attr) {
36269
            if (attr.name === _I18N_ATTR || attr.name.startsWith(_I18N_ATTR_PREFIX)) {
36270
                // strip i18n specific attributes
36271
                return;
36272
            }
36273
            if (attr.value && attr.value != '' && i18nParsedMessageMeta.hasOwnProperty(attr.name)) {
36274
                var _a = i18nParsedMessageMeta[attr.name], meaning = _a.meaning, description = _a.description, id = _a.id;
36275
                var message = _this._createI18nMessage([attr], meaning, description, id);
36276
                var nodes = _this._translations.get(message);
36277
                if (nodes) {
36278
                    if (nodes.length == 0) {
36279
                        translatedAttributes.push(new Attribute(attr.name, '', attr.sourceSpan));
36280
                    }
36281
                    else if (nodes[0] instanceof Text) {
36282
                        var value = nodes[0].value;
36283
                        translatedAttributes.push(new Attribute(attr.name, value, attr.sourceSpan));
36284
                    }
36285
                    else {
36286
                        _this._reportError(el, "Unexpected translation for attribute \"" + attr.name + "\" (id=\"" + (id || _this._translations.digest(message)) + "\")");
36287
                    }
36288
                }
36289
                else {
36290
                    _this._reportError(el, "Translation unavailable for attribute \"" + attr.name + "\" (id=\"" + (id || _this._translations.digest(message)) + "\")");
36291
                }
36292
            }
36293
            else {
36294
                translatedAttributes.push(attr);
36295
            }
36296
        });
36297
        return translatedAttributes;
36298
    };
36299
    /**
36300
     * Add the node as a child of the block when:
36301
     * - we are in a block,
36302
     * - we are not inside a ICU message (those are handled separately),
36303
     * - the node is a "direct child" of the block
36304
     */
36305
    _Visitor.prototype._mayBeAddBlockChildren = function (node) {
36306
        if (this._inI18nBlock && !this._inIcu && this._depth == this._blockStartDepth) {
36307
            this._blockChildren.push(node);
36308
        }
36309
    };
36310
    /**
36311
     * Marks the start of a section, see `_closeTranslatableSection`
36312
     */
36313
    _Visitor.prototype._openTranslatableSection = function (node) {
36314
        if (this._isInTranslatableSection) {
36315
            this._reportError(node, 'Unexpected section start');
36316
        }
36317
        else {
36318
            this._msgCountAtSectionStart = this._messages.length;
36319
        }
36320
    };
36321
    Object.defineProperty(_Visitor.prototype, "_isInTranslatableSection", {
36322
        /**
36323
         * A translatable section could be:
36324
         * - the content of translatable element,
36325
         * - nodes between `<!-- i18n -->` and `<!-- /i18n -->` comments
36326
         */
36327
        get: function () {
36328
            return this._msgCountAtSectionStart !== void 0;
36329
        },
36330
        enumerable: true,
36331
        configurable: true
36332
    });
36333
    /**
36334
     * Terminates a section.
36335
     *
36336
     * If a section has only one significant children (comments not significant) then we should not
36337
     * keep the message from this children:
36338
     *
36339
     * `<p i18n="meaning|description">{ICU message}</p>` would produce two messages:
36340
     * - one for the <p> content with meaning and description,
36341
     * - another one for the ICU message.
36342
     *
36343
     * In this case the last message is discarded as it contains less information (the AST is
36344
     * otherwise identical).
36345
     *
36346
     * Note that we should still keep messages extracted from attributes inside the section (ie in the
36347
     * ICU message here)
36348
     */
36349
    _Visitor.prototype._closeTranslatableSection = function (node, directChildren) {
36350
        if (!this._isInTranslatableSection) {
36351
            this._reportError(node, 'Unexpected section end');
36352
            return;
36353
        }
36354
        var startIndex = this._msgCountAtSectionStart;
36355
        var significantChildren = directChildren.reduce(function (count, node) { return count + (node instanceof Comment ? 0 : 1); }, 0);
36356
        if (significantChildren == 1) {
36357
            for (var i = this._messages.length - 1; i >= startIndex; i--) {
36358
                var ast = this._messages[i].nodes;
36359
                if (!(ast.length == 1 && ast[0] instanceof Text$1)) {
36360
                    this._messages.splice(i, 1);
36361
                    break;
36362
                }
36363
            }
36364
        }
36365
        this._msgCountAtSectionStart = undefined;
36366
    };
36367
    _Visitor.prototype._reportError = function (node, msg) {
36368
        this._errors.push(new I18nError(node.sourceSpan, msg));
36369
    };
36370
    return _Visitor;
36371
}());
36372
function _isOpeningComment(n) {
36373
    return !!(n instanceof Comment && n.value && n.value.startsWith('i18n'));
36374
}
36375
function _isClosingComment(n) {
36376
    return !!(n instanceof Comment && n.value && n.value === '/i18n');
36377
}
36378
function _getI18nAttr(p) {
36379
    return p.attrs.find(function (attr) { return attr.name === _I18N_ATTR; }) || null;
36380
}
36381
function _parseMessageMeta(i18n) {
36382
    if (!i18n)
36383
        return { meaning: '', description: '', id: '' };
36384
    var idIndex = i18n.indexOf(ID_SEPARATOR);
36385
    var descIndex = i18n.indexOf(MEANING_SEPARATOR);
36386
    var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])((idIndex > -1) ? [i18n.slice(0, idIndex), i18n.slice(idIndex + 2)] : [i18n, ''], 2), meaningAndDesc = _a[0], id = _a[1];
36387
    var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])((descIndex > -1) ?
36388
        [meaningAndDesc.slice(0, descIndex), meaningAndDesc.slice(descIndex + 1)] :
36389
        ['', meaningAndDesc], 2), meaning = _b[0], description = _b[1];
36390
    return { meaning: meaning, description: description, id: id };
36391
}
36392
 
36393
/**
36394
 * @license
36395
 * Copyright Google Inc. All Rights Reserved.
36396
 *
36397
 * Use of this source code is governed by an MIT-style license that can be
36398
 * found in the LICENSE file at https://angular.io/license
36399
 */
36400
var XmlTagDefinition = /** @class */ (function () {
36401
    function XmlTagDefinition() {
36402
        this.closedByParent = false;
36403
        this.contentType = TagContentType.PARSABLE_DATA;
36404
        this.isVoid = false;
36405
        this.ignoreFirstLf = false;
36406
        this.canSelfClose = true;
36407
    }
36408
    XmlTagDefinition.prototype.requireExtraParent = function (currentParent) { return false; };
36409
    XmlTagDefinition.prototype.isClosedByChild = function (name) { return false; };
36410
    return XmlTagDefinition;
36411
}());
36412
var _TAG_DEFINITION = new XmlTagDefinition();
36413
function getXmlTagDefinition(tagName) {
36414
    return _TAG_DEFINITION;
36415
}
36416
 
36417
/**
36418
 * @license
36419
 * Copyright Google Inc. All Rights Reserved.
36420
 *
36421
 * Use of this source code is governed by an MIT-style license that can be
36422
 * found in the LICENSE file at https://angular.io/license
36423
 */
36424
var XmlParser = /** @class */ (function (_super) {
36425
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(XmlParser, _super);
36426
    function XmlParser() {
36427
        return _super.call(this, getXmlTagDefinition) || this;
36428
    }
36429
    XmlParser.prototype.parse = function (source, url, parseExpansionForms) {
36430
        if (parseExpansionForms === void 0) { parseExpansionForms = false; }
36431
        return _super.prototype.parse.call(this, source, url, parseExpansionForms);
36432
    };
36433
    return XmlParser;
36434
}(Parser$1));
36435
 
36436
/**
36437
 * @license
36438
 * Copyright Google Inc. All Rights Reserved.
36439
 *
36440
 * Use of this source code is governed by an MIT-style license that can be
36441
 * found in the LICENSE file at https://angular.io/license
36442
 */
36443
var Serializer = /** @class */ (function () {
36444
    function Serializer() {
36445
    }
36446
    // Creates a name mapper, see `PlaceholderMapper`
36447
    // Returning `null` means that no name mapping is used.
36448
    Serializer.prototype.createNameMapper = function (message) { return null; };
36449
    return Serializer;
36450
}());
36451
/**
36452
 * A simple mapper that take a function to transform an internal name to a public name
36453
 */
36454
var SimplePlaceholderMapper = /** @class */ (function (_super) {
36455
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(SimplePlaceholderMapper, _super);
36456
    // create a mapping from the message
36457
    function SimplePlaceholderMapper(message, mapName) {
36458
        var _this = _super.call(this) || this;
36459
        _this.mapName = mapName;
36460
        _this.internalToPublic = {};
36461
        _this.publicToNextId = {};
36462
        _this.publicToInternal = {};
36463
        message.nodes.forEach(function (node) { return node.visit(_this); });
36464
        return _this;
36465
    }
36466
    SimplePlaceholderMapper.prototype.toPublicName = function (internalName) {
36467
        return this.internalToPublic.hasOwnProperty(internalName) ?
36468
            this.internalToPublic[internalName] :
36469
            null;
36470
    };
36471
    SimplePlaceholderMapper.prototype.toInternalName = function (publicName) {
36472
        return this.publicToInternal.hasOwnProperty(publicName) ? this.publicToInternal[publicName] :
36473
            null;
36474
    };
36475
    SimplePlaceholderMapper.prototype.visitText = function (text, context) { return null; };
36476
    SimplePlaceholderMapper.prototype.visitTagPlaceholder = function (ph, context) {
36477
        this.visitPlaceholderName(ph.startName);
36478
        _super.prototype.visitTagPlaceholder.call(this, ph, context);
36479
        this.visitPlaceholderName(ph.closeName);
36480
    };
36481
    SimplePlaceholderMapper.prototype.visitPlaceholder = function (ph, context) { this.visitPlaceholderName(ph.name); };
36482
    SimplePlaceholderMapper.prototype.visitIcuPlaceholder = function (ph, context) {
36483
        this.visitPlaceholderName(ph.name);
36484
    };
36485
    // XMB placeholders could only contains A-Z, 0-9 and _
36486
    SimplePlaceholderMapper.prototype.visitPlaceholderName = function (internalName) {
36487
        if (!internalName || this.internalToPublic.hasOwnProperty(internalName)) {
36488
            return;
36489
        }
36490
        var publicName = this.mapName(internalName);
36491
        if (this.publicToInternal.hasOwnProperty(publicName)) {
36492
            // Create a new XMB when it has already been used
36493
            var nextId = this.publicToNextId[publicName];
36494
            this.publicToNextId[publicName] = nextId + 1;
36495
            publicName = publicName + "_" + nextId;
36496
        }
36497
        else {
36498
            this.publicToNextId[publicName] = 1;
36499
        }
36500
        this.internalToPublic[internalName] = publicName;
36501
        this.publicToInternal[publicName] = internalName;
36502
    };
36503
    return SimplePlaceholderMapper;
36504
}(RecurseVisitor));
36505
 
36506
/**
36507
 * @license
36508
 * Copyright Google Inc. All Rights Reserved.
36509
 *
36510
 * Use of this source code is governed by an MIT-style license that can be
36511
 * found in the LICENSE file at https://angular.io/license
36512
 */
36513
var _Visitor$1 = /** @class */ (function () {
36514
    function _Visitor() {
36515
    }
36516
    _Visitor.prototype.visitTag = function (tag) {
36517
        var _this = this;
36518
        var strAttrs = this._serializeAttributes(tag.attrs);
36519
        if (tag.children.length == 0) {
36520
            return "<" + tag.name + strAttrs + "/>";
36521
        }
36522
        var strChildren = tag.children.map(function (node) { return node.visit(_this); });
36523
        return "<" + tag.name + strAttrs + ">" + strChildren.join('') + "</" + tag.name + ">";
36524
    };
36525
    _Visitor.prototype.visitText = function (text) { return text.value; };
36526
    _Visitor.prototype.visitDeclaration = function (decl) {
36527
        return "<?xml" + this._serializeAttributes(decl.attrs) + " ?>";
36528
    };
36529
    _Visitor.prototype._serializeAttributes = function (attrs) {
36530
        var strAttrs = Object.keys(attrs).map(function (name) { return name + "=\"" + attrs[name] + "\""; }).join(' ');
36531
        return strAttrs.length > 0 ? ' ' + strAttrs : '';
36532
    };
36533
    _Visitor.prototype.visitDoctype = function (doctype) {
36534
        return "<!DOCTYPE " + doctype.rootTag + " [\n" + doctype.dtd + "\n]>";
36535
    };
36536
    return _Visitor;
36537
}());
36538
var _visitor = new _Visitor$1();
36539
function serialize(nodes) {
36540
    return nodes.map(function (node) { return node.visit(_visitor); }).join('');
36541
}
36542
var Declaration = /** @class */ (function () {
36543
    function Declaration(unescapedAttrs) {
36544
        var _this = this;
36545
        this.attrs = {};
36546
        Object.keys(unescapedAttrs).forEach(function (k) {
36547
            _this.attrs[k] = escapeXml(unescapedAttrs[k]);
36548
        });
36549
    }
36550
    Declaration.prototype.visit = function (visitor) { return visitor.visitDeclaration(this); };
36551
    return Declaration;
36552
}());
36553
var Doctype = /** @class */ (function () {
36554
    function Doctype(rootTag, dtd) {
36555
        this.rootTag = rootTag;
36556
        this.dtd = dtd;
36557
    }
36558
    Doctype.prototype.visit = function (visitor) { return visitor.visitDoctype(this); };
36559
    return Doctype;
36560
}());
36561
var Tag = /** @class */ (function () {
36562
    function Tag(name, unescapedAttrs, children) {
36563
        if (unescapedAttrs === void 0) { unescapedAttrs = {}; }
36564
        if (children === void 0) { children = []; }
36565
        var _this = this;
36566
        this.name = name;
36567
        this.children = children;
36568
        this.attrs = {};
36569
        Object.keys(unescapedAttrs).forEach(function (k) {
36570
            _this.attrs[k] = escapeXml(unescapedAttrs[k]);
36571
        });
36572
    }
36573
    Tag.prototype.visit = function (visitor) { return visitor.visitTag(this); };
36574
    return Tag;
36575
}());
36576
var Text$2 = /** @class */ (function () {
36577
    function Text(unescapedValue) {
36578
        this.value = escapeXml(unescapedValue);
36579
    }
36580
    Text.prototype.visit = function (visitor) { return visitor.visitText(this); };
36581
    return Text;
36582
}());
36583
var CR = /** @class */ (function (_super) {
36584
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CR, _super);
36585
    function CR(ws) {
36586
        if (ws === void 0) { ws = 0; }
36587
        return _super.call(this, "\n" + new Array(ws + 1).join(' ')) || this;
36588
    }
36589
    return CR;
36590
}(Text$2));
36591
var _ESCAPED_CHARS = [
36592
    [/&/g, '&amp;'],
36593
    [/"/g, '&quot;'],
36594
    [/'/g, '&apos;'],
36595
    [/</g, '&lt;'],
36596
    [/>/g, '&gt;'],
36597
];
36598
// Escape `_ESCAPED_CHARS` characters in the given text with encoded entities
36599
function escapeXml(text) {
36600
    return _ESCAPED_CHARS.reduce(function (text, entry) { return text.replace(entry[0], entry[1]); }, text);
36601
}
36602
 
36603
/**
36604
 * @license
36605
 * Copyright Google Inc. All Rights Reserved.
36606
 *
36607
 * Use of this source code is governed by an MIT-style license that can be
36608
 * found in the LICENSE file at https://angular.io/license
36609
 */
36610
var _VERSION = '1.2';
36611
var _XMLNS = 'urn:oasis:names:tc:xliff:document:1.2';
36612
// TODO(vicb): make this a param (s/_/-/)
36613
var _DEFAULT_SOURCE_LANG = 'en';
36614
var _PLACEHOLDER_TAG = 'x';
36615
var _MARKER_TAG = 'mrk';
36616
var _FILE_TAG = 'file';
36617
var _SOURCE_TAG = 'source';
36618
var _SEGMENT_SOURCE_TAG = 'seg-source';
36619
var _TARGET_TAG = 'target';
36620
var _UNIT_TAG = 'trans-unit';
36621
var _CONTEXT_GROUP_TAG = 'context-group';
36622
var _CONTEXT_TAG = 'context';
36623
// http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html
36624
// http://docs.oasis-open.org/xliff/v1.2/xliff-profile-html/xliff-profile-html-1.2.html
36625
var Xliff = /** @class */ (function (_super) {
36626
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Xliff, _super);
36627
    function Xliff() {
36628
        return _super !== null && _super.apply(this, arguments) || this;
36629
    }
36630
    Xliff.prototype.write = function (messages, locale) {
36631
        var visitor = new _WriteVisitor();
36632
        var transUnits = [];
36633
        messages.forEach(function (message) {
36634
            var contextTags = [];
36635
            message.sources.forEach(function (source) {
36636
                var contextGroupTag = new Tag(_CONTEXT_GROUP_TAG, { purpose: 'location' });
36637
                contextGroupTag.children.push(new CR(10), new Tag(_CONTEXT_TAG, { 'context-type': 'sourcefile' }, [new Text$2(source.filePath)]), new CR(10), new Tag(_CONTEXT_TAG, { 'context-type': 'linenumber' }, [new Text$2("" + source.startLine)]), new CR(8));
36638
                contextTags.push(new CR(8), contextGroupTag);
36639
            });
36640
            var transUnit = new Tag(_UNIT_TAG, { id: message.id, datatype: 'html' });
36641
            (_a = transUnit.children).push.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([new CR(8), new Tag(_SOURCE_TAG, {}, visitor.serialize(message.nodes))], contextTags));
36642
            if (message.description) {
36643
                transUnit.children.push(new CR(8), new Tag('note', { priority: '1', from: 'description' }, [new Text$2(message.description)]));
36644
            }
36645
            if (message.meaning) {
36646
                transUnit.children.push(new CR(8), new Tag('note', { priority: '1', from: 'meaning' }, [new Text$2(message.meaning)]));
36647
            }
36648
            transUnit.children.push(new CR(6));
36649
            transUnits.push(new CR(6), transUnit);
36650
            var _a;
36651
        });
36652
        var body = new Tag('body', {}, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(transUnits, [new CR(4)]));
36653
        var file = new Tag('file', {
36654
            'source-language': locale || _DEFAULT_SOURCE_LANG,
36655
            datatype: 'plaintext',
36656
            original: 'ng2.template',
36657
        }, [new CR(4), body, new CR(2)]);
36658
        var xliff = new Tag('xliff', { version: _VERSION, xmlns: _XMLNS }, [new CR(2), file, new CR()]);
36659
        return serialize([
36660
            new Declaration({ version: '1.0', encoding: 'UTF-8' }), new CR(), xliff, new CR()
36661
        ]);
36662
    };
36663
    Xliff.prototype.load = function (content, url) {
36664
        // xliff to xml nodes
36665
        var xliffParser = new XliffParser();
36666
        var _a = xliffParser.parse(content, url), locale = _a.locale, msgIdToHtml = _a.msgIdToHtml, errors = _a.errors;
36667
        // xml nodes to i18n nodes
36668
        var i18nNodesByMsgId = {};
36669
        var converter = new XmlToI18n();
36670
        Object.keys(msgIdToHtml).forEach(function (msgId) {
36671
            var _a = converter.convert(msgIdToHtml[msgId], url), i18nNodes = _a.i18nNodes, e = _a.errors;
36672
            errors.push.apply(errors, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(e));
36673
            i18nNodesByMsgId[msgId] = i18nNodes;
36674
        });
36675
        if (errors.length) {
36676
            throw new Error("xliff parse errors:\n" + errors.join('\n'));
36677
        }
36678
        return { locale: locale, i18nNodesByMsgId: i18nNodesByMsgId };
36679
    };
36680
    Xliff.prototype.digest = function (message) { return digest(message); };
36681
    return Xliff;
36682
}(Serializer));
36683
var _WriteVisitor = /** @class */ (function () {
36684
    function _WriteVisitor() {
36685
    }
36686
    _WriteVisitor.prototype.visitText = function (text, context) { return [new Text$2(text.value)]; };
36687
    _WriteVisitor.prototype.visitContainer = function (container, context) {
36688
        var _this = this;
36689
        var nodes = [];
36690
        container.children.forEach(function (node) { return nodes.push.apply(nodes, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(node.visit(_this))); });
36691
        return nodes;
36692
    };
36693
    _WriteVisitor.prototype.visitIcu = function (icu, context) {
36694
        var _this = this;
36695
        var nodes = [new Text$2("{" + icu.expressionPlaceholder + ", " + icu.type + ", ")];
36696
        Object.keys(icu.cases).forEach(function (c) {
36697
            nodes.push.apply(nodes, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([new Text$2(c + " {")], icu.cases[c].visit(_this), [new Text$2("} ")]));
36698
        });
36699
        nodes.push(new Text$2("}"));
36700
        return nodes;
36701
    };
36702
    _WriteVisitor.prototype.visitTagPlaceholder = function (ph, context) {
36703
        var ctype = getCtypeForTag(ph.tag);
36704
        if (ph.isVoid) {
36705
            // void tags have no children nor closing tags
36706
            return [new Tag(_PLACEHOLDER_TAG, { id: ph.startName, ctype: ctype, 'equiv-text': "<" + ph.tag + "/>" })];
36707
        }
36708
        var startTagPh = new Tag(_PLACEHOLDER_TAG, { id: ph.startName, ctype: ctype, 'equiv-text': "<" + ph.tag + ">" });
36709
        var closeTagPh = new Tag(_PLACEHOLDER_TAG, { id: ph.closeName, ctype: ctype, 'equiv-text': "</" + ph.tag + ">" });
36710
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([startTagPh], this.serialize(ph.children), [closeTagPh]);
36711
    };
36712
    _WriteVisitor.prototype.visitPlaceholder = function (ph, context) {
36713
        return [new Tag(_PLACEHOLDER_TAG, { id: ph.name, 'equiv-text': "{{" + ph.value + "}}" })];
36714
    };
36715
    _WriteVisitor.prototype.visitIcuPlaceholder = function (ph, context) {
36716
        var equivText = "{" + ph.value.expression + ", " + ph.value.type + ", " + Object.keys(ph.value.cases).map(function (value) { return value + ' {...}'; }).join(' ') + "}";
36717
        return [new Tag(_PLACEHOLDER_TAG, { id: ph.name, 'equiv-text': equivText })];
36718
    };
36719
    _WriteVisitor.prototype.serialize = function (nodes) {
36720
        var _this = this;
36721
        return [].concat.apply([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(nodes.map(function (node) { return node.visit(_this); })));
36722
    };
36723
    return _WriteVisitor;
36724
}());
36725
// TODO(vicb): add error management (structure)
36726
// Extract messages as xml nodes from the xliff file
36727
var XliffParser = /** @class */ (function () {
36728
    function XliffParser() {
36729
        this._locale = null;
36730
    }
36731
    XliffParser.prototype.parse = function (xliff, url) {
36732
        this._unitMlString = null;
36733
        this._msgIdToHtml = {};
36734
        var xml = new XmlParser().parse(xliff, url, false);
36735
        this._errors = xml.errors;
36736
        visitAll(this, xml.rootNodes, null);
36737
        return {
36738
            msgIdToHtml: this._msgIdToHtml,
36739
            errors: this._errors,
36740
            locale: this._locale,
36741
        };
36742
    };
36743
    XliffParser.prototype.visitElement = function (element, context) {
36744
        switch (element.name) {
36745
            case _UNIT_TAG:
36746
                this._unitMlString = null;
36747
                var idAttr = element.attrs.find(function (attr) { return attr.name === 'id'; });
36748
                if (!idAttr) {
36749
                    this._addError(element, "<" + _UNIT_TAG + "> misses the \"id\" attribute");
36750
                }
36751
                else {
36752
                    var id = idAttr.value;
36753
                    if (this._msgIdToHtml.hasOwnProperty(id)) {
36754
                        this._addError(element, "Duplicated translations for msg " + id);
36755
                    }
36756
                    else {
36757
                        visitAll(this, element.children, null);
36758
                        if (typeof this._unitMlString === 'string') {
36759
                            this._msgIdToHtml[id] = this._unitMlString;
36760
                        }
36761
                        else {
36762
                            this._addError(element, "Message " + id + " misses a translation");
36763
                        }
36764
                    }
36765
                }
36766
                break;
36767
            // ignore those tags
36768
            case _SOURCE_TAG:
36769
            case _SEGMENT_SOURCE_TAG:
36770
                break;
36771
            case _TARGET_TAG:
36772
                var innerTextStart = element.startSourceSpan.end.offset;
36773
                var innerTextEnd = element.endSourceSpan.start.offset;
36774
                var content = element.startSourceSpan.start.file.content;
36775
                var innerText = content.slice(innerTextStart, innerTextEnd);
36776
                this._unitMlString = innerText;
36777
                break;
36778
            case _FILE_TAG:
36779
                var localeAttr = element.attrs.find(function (attr) { return attr.name === 'target-language'; });
36780
                if (localeAttr) {
36781
                    this._locale = localeAttr.value;
36782
                }
36783
                visitAll(this, element.children, null);
36784
                break;
36785
            default:
36786
                // TODO(vicb): assert file structure, xliff version
36787
                // For now only recurse on unhandled nodes
36788
                visitAll(this, element.children, null);
36789
        }
36790
    };
36791
    XliffParser.prototype.visitAttribute = function (attribute, context) { };
36792
    XliffParser.prototype.visitText = function (text, context) { };
36793
    XliffParser.prototype.visitComment = function (comment, context) { };
36794
    XliffParser.prototype.visitExpansion = function (expansion, context) { };
36795
    XliffParser.prototype.visitExpansionCase = function (expansionCase, context) { };
36796
    XliffParser.prototype._addError = function (node, message) {
36797
        this._errors.push(new I18nError(node.sourceSpan, message));
36798
    };
36799
    return XliffParser;
36800
}());
36801
// Convert ml nodes (xliff syntax) to i18n nodes
36802
var XmlToI18n = /** @class */ (function () {
36803
    function XmlToI18n() {
36804
    }
36805
    XmlToI18n.prototype.convert = function (message, url) {
36806
        var xmlIcu = new XmlParser().parse(message, url, true);
36807
        this._errors = xmlIcu.errors;
36808
        var i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ?
36809
            [] : [].concat.apply([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(visitAll(this, xmlIcu.rootNodes)));
36810
        return {
36811
            i18nNodes: i18nNodes,
36812
            errors: this._errors,
36813
        };
36814
    };
36815
    XmlToI18n.prototype.visitText = function (text, context) { return new Text$1(text.value, text.sourceSpan); };
36816
    XmlToI18n.prototype.visitElement = function (el, context) {
36817
        if (el.name === _PLACEHOLDER_TAG) {
36818
            var nameAttr = el.attrs.find(function (attr) { return attr.name === 'id'; });
36819
            if (nameAttr) {
36820
                return new Placeholder('', nameAttr.value, el.sourceSpan);
36821
            }
36822
            this._addError(el, "<" + _PLACEHOLDER_TAG + "> misses the \"id\" attribute");
36823
            return null;
36824
        }
36825
        if (el.name === _MARKER_TAG) {
36826
            return [].concat.apply([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(visitAll(this, el.children)));
36827
        }
36828
        this._addError(el, "Unexpected tag");
36829
        return null;
36830
    };
36831
    XmlToI18n.prototype.visitExpansion = function (icu, context) {
36832
        var caseMap = {};
36833
        visitAll(this, icu.cases).forEach(function (c) {
36834
            caseMap[c.value] = new Container(c.nodes, icu.sourceSpan);
36835
        });
36836
        return new Icu(icu.switchValue, icu.type, caseMap, icu.sourceSpan);
36837
    };
36838
    XmlToI18n.prototype.visitExpansionCase = function (icuCase, context) {
36839
        return {
36840
            value: icuCase.value,
36841
            nodes: visitAll(this, icuCase.expression),
36842
        };
36843
    };
36844
    XmlToI18n.prototype.visitComment = function (comment, context) { };
36845
    XmlToI18n.prototype.visitAttribute = function (attribute, context) { };
36846
    XmlToI18n.prototype._addError = function (node, message) {
36847
        this._errors.push(new I18nError(node.sourceSpan, message));
36848
    };
36849
    return XmlToI18n;
36850
}());
36851
function getCtypeForTag(tag) {
36852
    switch (tag.toLowerCase()) {
36853
        case 'br':
36854
            return 'lb';
36855
        case 'img':
36856
            return 'image';
36857
        default:
36858
            return "x-" + tag;
36859
    }
36860
}
36861
 
36862
/**
36863
 * @license
36864
 * Copyright Google Inc. All Rights Reserved.
36865
 *
36866
 * Use of this source code is governed by an MIT-style license that can be
36867
 * found in the LICENSE file at https://angular.io/license
36868
 */
36869
var _VERSION$1 = '2.0';
36870
var _XMLNS$1 = 'urn:oasis:names:tc:xliff:document:2.0';
36871
// TODO(vicb): make this a param (s/_/-/)
36872
var _DEFAULT_SOURCE_LANG$1 = 'en';
36873
var _PLACEHOLDER_TAG$1 = 'ph';
36874
var _PLACEHOLDER_SPANNING_TAG = 'pc';
36875
var _MARKER_TAG$1 = 'mrk';
36876
var _XLIFF_TAG = 'xliff';
36877
var _SOURCE_TAG$1 = 'source';
36878
var _TARGET_TAG$1 = 'target';
36879
var _UNIT_TAG$1 = 'unit';
36880
// http://docs.oasis-open.org/xliff/xliff-core/v2.0/os/xliff-core-v2.0-os.html
36881
var Xliff2 = /** @class */ (function (_super) {
36882
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Xliff2, _super);
36883
    function Xliff2() {
36884
        return _super !== null && _super.apply(this, arguments) || this;
36885
    }
36886
    Xliff2.prototype.write = function (messages, locale) {
36887
        var visitor = new _WriteVisitor$1();
36888
        var units = [];
36889
        messages.forEach(function (message) {
36890
            var unit = new Tag(_UNIT_TAG$1, { id: message.id });
36891
            var notes = new Tag('notes');
36892
            if (message.description || message.meaning) {
36893
                if (message.description) {
36894
                    notes.children.push(new CR(8), new Tag('note', { category: 'description' }, [new Text$2(message.description)]));
36895
                }
36896
                if (message.meaning) {
36897
                    notes.children.push(new CR(8), new Tag('note', { category: 'meaning' }, [new Text$2(message.meaning)]));
36898
                }
36899
            }
36900
            message.sources.forEach(function (source) {
36901
                notes.children.push(new CR(8), new Tag('note', { category: 'location' }, [
36902
                    new Text$2(source.filePath + ":" + source.startLine + (source.endLine !== source.startLine ? ',' + source.endLine : ''))
36903
                ]));
36904
            });
36905
            notes.children.push(new CR(6));
36906
            unit.children.push(new CR(6), notes);
36907
            var segment = new Tag('segment');
36908
            segment.children.push(new CR(8), new Tag(_SOURCE_TAG$1, {}, visitor.serialize(message.nodes)), new CR(6));
36909
            unit.children.push(new CR(6), segment, new CR(4));
36910
            units.push(new CR(4), unit);
36911
        });
36912
        var file = new Tag('file', { 'original': 'ng.template', id: 'ngi18n' }, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(units, [new CR(2)]));
36913
        var xliff = new Tag(_XLIFF_TAG, { version: _VERSION$1, xmlns: _XMLNS$1, srcLang: locale || _DEFAULT_SOURCE_LANG$1 }, [new CR(2), file, new CR()]);
36914
        return serialize([
36915
            new Declaration({ version: '1.0', encoding: 'UTF-8' }), new CR(), xliff, new CR()
36916
        ]);
36917
    };
36918
    Xliff2.prototype.load = function (content, url) {
36919
        // xliff to xml nodes
36920
        var xliff2Parser = new Xliff2Parser();
36921
        var _a = xliff2Parser.parse(content, url), locale = _a.locale, msgIdToHtml = _a.msgIdToHtml, errors = _a.errors;
36922
        // xml nodes to i18n nodes
36923
        var i18nNodesByMsgId = {};
36924
        var converter = new XmlToI18n$1();
36925
        Object.keys(msgIdToHtml).forEach(function (msgId) {
36926
            var _a = converter.convert(msgIdToHtml[msgId], url), i18nNodes = _a.i18nNodes, e = _a.errors;
36927
            errors.push.apply(errors, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(e));
36928
            i18nNodesByMsgId[msgId] = i18nNodes;
36929
        });
36930
        if (errors.length) {
36931
            throw new Error("xliff2 parse errors:\n" + errors.join('\n'));
36932
        }
36933
        return { locale: locale, i18nNodesByMsgId: i18nNodesByMsgId };
36934
    };
36935
    Xliff2.prototype.digest = function (message) { return decimalDigest(message); };
36936
    return Xliff2;
36937
}(Serializer));
36938
var _WriteVisitor$1 = /** @class */ (function () {
36939
    function _WriteVisitor() {
36940
    }
36941
    _WriteVisitor.prototype.visitText = function (text, context) { return [new Text$2(text.value)]; };
36942
    _WriteVisitor.prototype.visitContainer = function (container, context) {
36943
        var _this = this;
36944
        var nodes = [];
36945
        container.children.forEach(function (node) { return nodes.push.apply(nodes, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(node.visit(_this))); });
36946
        return nodes;
36947
    };
36948
    _WriteVisitor.prototype.visitIcu = function (icu, context) {
36949
        var _this = this;
36950
        var nodes = [new Text$2("{" + icu.expressionPlaceholder + ", " + icu.type + ", ")];
36951
        Object.keys(icu.cases).forEach(function (c) {
36952
            nodes.push.apply(nodes, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([new Text$2(c + " {")], icu.cases[c].visit(_this), [new Text$2("} ")]));
36953
        });
36954
        nodes.push(new Text$2("}"));
36955
        return nodes;
36956
    };
36957
    _WriteVisitor.prototype.visitTagPlaceholder = function (ph, context) {
36958
        var _this = this;
36959
        var type = getTypeForTag(ph.tag);
36960
        if (ph.isVoid) {
36961
            var tagPh = new Tag(_PLACEHOLDER_TAG$1, {
36962
                id: (this._nextPlaceholderId++).toString(),
36963
                equiv: ph.startName,
36964
                type: type,
36965
                disp: "<" + ph.tag + "/>",
36966
            });
36967
            return [tagPh];
36968
        }
36969
        var tagPc = new Tag(_PLACEHOLDER_SPANNING_TAG, {
36970
            id: (this._nextPlaceholderId++).toString(),
36971
            equivStart: ph.startName,
36972
            equivEnd: ph.closeName,
36973
            type: type,
36974
            dispStart: "<" + ph.tag + ">",
36975
            dispEnd: "</" + ph.tag + ">",
36976
        });
36977
        var nodes = [].concat.apply([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(ph.children.map(function (node) { return node.visit(_this); })));
36978
        if (nodes.length) {
36979
            nodes.forEach(function (node) { return tagPc.children.push(node); });
36980
        }
36981
        else {
36982
            tagPc.children.push(new Text$2(''));
36983
        }
36984
        return [tagPc];
36985
    };
36986
    _WriteVisitor.prototype.visitPlaceholder = function (ph, context) {
36987
        var idStr = (this._nextPlaceholderId++).toString();
36988
        return [new Tag(_PLACEHOLDER_TAG$1, {
36989
                id: idStr,
36990
                equiv: ph.name,
36991
                disp: "{{" + ph.value + "}}",
36992
            })];
36993
    };
36994
    _WriteVisitor.prototype.visitIcuPlaceholder = function (ph, context) {
36995
        var cases = Object.keys(ph.value.cases).map(function (value) { return value + ' {...}'; }).join(' ');
36996
        var idStr = (this._nextPlaceholderId++).toString();
36997
        return [new Tag(_PLACEHOLDER_TAG$1, { id: idStr, equiv: ph.name, disp: "{" + ph.value.expression + ", " + ph.value.type + ", " + cases + "}" })];
36998
    };
36999
    _WriteVisitor.prototype.serialize = function (nodes) {
37000
        var _this = this;
37001
        this._nextPlaceholderId = 0;
37002
        return [].concat.apply([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(nodes.map(function (node) { return node.visit(_this); })));
37003
    };
37004
    return _WriteVisitor;
37005
}());
37006
// Extract messages as xml nodes from the xliff file
37007
var Xliff2Parser = /** @class */ (function () {
37008
    function Xliff2Parser() {
37009
        this._locale = null;
37010
    }
37011
    Xliff2Parser.prototype.parse = function (xliff, url) {
37012
        this._unitMlString = null;
37013
        this._msgIdToHtml = {};
37014
        var xml = new XmlParser().parse(xliff, url, false);
37015
        this._errors = xml.errors;
37016
        visitAll(this, xml.rootNodes, null);
37017
        return {
37018
            msgIdToHtml: this._msgIdToHtml,
37019
            errors: this._errors,
37020
            locale: this._locale,
37021
        };
37022
    };
37023
    Xliff2Parser.prototype.visitElement = function (element, context) {
37024
        switch (element.name) {
37025
            case _UNIT_TAG$1:
37026
                this._unitMlString = null;
37027
                var idAttr = element.attrs.find(function (attr) { return attr.name === 'id'; });
37028
                if (!idAttr) {
37029
                    this._addError(element, "<" + _UNIT_TAG$1 + "> misses the \"id\" attribute");
37030
                }
37031
                else {
37032
                    var id = idAttr.value;
37033
                    if (this._msgIdToHtml.hasOwnProperty(id)) {
37034
                        this._addError(element, "Duplicated translations for msg " + id);
37035
                    }
37036
                    else {
37037
                        visitAll(this, element.children, null);
37038
                        if (typeof this._unitMlString === 'string') {
37039
                            this._msgIdToHtml[id] = this._unitMlString;
37040
                        }
37041
                        else {
37042
                            this._addError(element, "Message " + id + " misses a translation");
37043
                        }
37044
                    }
37045
                }
37046
                break;
37047
            case _SOURCE_TAG$1:
37048
                // ignore source message
37049
                break;
37050
            case _TARGET_TAG$1:
37051
                var innerTextStart = element.startSourceSpan.end.offset;
37052
                var innerTextEnd = element.endSourceSpan.start.offset;
37053
                var content = element.startSourceSpan.start.file.content;
37054
                var innerText = content.slice(innerTextStart, innerTextEnd);
37055
                this._unitMlString = innerText;
37056
                break;
37057
            case _XLIFF_TAG:
37058
                var localeAttr = element.attrs.find(function (attr) { return attr.name === 'trgLang'; });
37059
                if (localeAttr) {
37060
                    this._locale = localeAttr.value;
37061
                }
37062
                var versionAttr = element.attrs.find(function (attr) { return attr.name === 'version'; });
37063
                if (versionAttr) {
37064
                    var version = versionAttr.value;
37065
                    if (version !== '2.0') {
37066
                        this._addError(element, "The XLIFF file version " + version + " is not compatible with XLIFF 2.0 serializer");
37067
                    }
37068
                    else {
37069
                        visitAll(this, element.children, null);
37070
                    }
37071
                }
37072
                break;
37073
            default:
37074
                visitAll(this, element.children, null);
37075
        }
37076
    };
37077
    Xliff2Parser.prototype.visitAttribute = function (attribute, context) { };
37078
    Xliff2Parser.prototype.visitText = function (text, context) { };
37079
    Xliff2Parser.prototype.visitComment = function (comment, context) { };
37080
    Xliff2Parser.prototype.visitExpansion = function (expansion, context) { };
37081
    Xliff2Parser.prototype.visitExpansionCase = function (expansionCase, context) { };
37082
    Xliff2Parser.prototype._addError = function (node, message) {
37083
        this._errors.push(new I18nError(node.sourceSpan, message));
37084
    };
37085
    return Xliff2Parser;
37086
}());
37087
// Convert ml nodes (xliff syntax) to i18n nodes
37088
var XmlToI18n$1 = /** @class */ (function () {
37089
    function XmlToI18n() {
37090
    }
37091
    XmlToI18n.prototype.convert = function (message, url) {
37092
        var xmlIcu = new XmlParser().parse(message, url, true);
37093
        this._errors = xmlIcu.errors;
37094
        var i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ?
37095
            [] : [].concat.apply([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(visitAll(this, xmlIcu.rootNodes)));
37096
        return {
37097
            i18nNodes: i18nNodes,
37098
            errors: this._errors,
37099
        };
37100
    };
37101
    XmlToI18n.prototype.visitText = function (text, context) { return new Text$1(text.value, text.sourceSpan); };
37102
    XmlToI18n.prototype.visitElement = function (el, context) {
37103
        var _this = this;
37104
        switch (el.name) {
37105
            case _PLACEHOLDER_TAG$1:
37106
                var nameAttr = el.attrs.find(function (attr) { return attr.name === 'equiv'; });
37107
                if (nameAttr) {
37108
                    return [new Placeholder('', nameAttr.value, el.sourceSpan)];
37109
                }
37110
                this._addError(el, "<" + _PLACEHOLDER_TAG$1 + "> misses the \"equiv\" attribute");
37111
                break;
37112
            case _PLACEHOLDER_SPANNING_TAG:
37113
                var startAttr = el.attrs.find(function (attr) { return attr.name === 'equivStart'; });
37114
                var endAttr = el.attrs.find(function (attr) { return attr.name === 'equivEnd'; });
37115
                if (!startAttr) {
37116
                    this._addError(el, "<" + _PLACEHOLDER_TAG$1 + "> misses the \"equivStart\" attribute");
37117
                }
37118
                else if (!endAttr) {
37119
                    this._addError(el, "<" + _PLACEHOLDER_TAG$1 + "> misses the \"equivEnd\" attribute");
37120
                }
37121
                else {
37122
                    var startId = startAttr.value;
37123
                    var endId = endAttr.value;
37124
                    var nodes = [];
37125
                    return nodes.concat.apply(nodes, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([new Placeholder('', startId, el.sourceSpan)], el.children.map(function (node) { return node.visit(_this, null); }), [new Placeholder('', endId, el.sourceSpan)]));
37126
                }
37127
                break;
37128
            case _MARKER_TAG$1:
37129
                return [].concat.apply([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(visitAll(this, el.children)));
37130
            default:
37131
                this._addError(el, "Unexpected tag");
37132
        }
37133
        return null;
37134
    };
37135
    XmlToI18n.prototype.visitExpansion = function (icu, context) {
37136
        var caseMap = {};
37137
        visitAll(this, icu.cases).forEach(function (c) {
37138
            caseMap[c.value] = new Container(c.nodes, icu.sourceSpan);
37139
        });
37140
        return new Icu(icu.switchValue, icu.type, caseMap, icu.sourceSpan);
37141
    };
37142
    XmlToI18n.prototype.visitExpansionCase = function (icuCase, context) {
37143
        return {
37144
            value: icuCase.value,
37145
            nodes: [].concat.apply([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(visitAll(this, icuCase.expression))),
37146
        };
37147
    };
37148
    XmlToI18n.prototype.visitComment = function (comment, context) { };
37149
    XmlToI18n.prototype.visitAttribute = function (attribute, context) { };
37150
    XmlToI18n.prototype._addError = function (node, message) {
37151
        this._errors.push(new I18nError(node.sourceSpan, message));
37152
    };
37153
    return XmlToI18n;
37154
}());
37155
function getTypeForTag(tag) {
37156
    switch (tag.toLowerCase()) {
37157
        case 'br':
37158
        case 'b':
37159
        case 'i':
37160
        case 'u':
37161
            return 'fmt';
37162
        case 'img':
37163
            return 'image';
37164
        case 'a':
37165
            return 'link';
37166
        default:
37167
            return 'other';
37168
    }
37169
}
37170
 
37171
/**
37172
 * @license
37173
 * Copyright Google Inc. All Rights Reserved.
37174
 *
37175
 * Use of this source code is governed by an MIT-style license that can be
37176
 * found in the LICENSE file at https://angular.io/license
37177
 */
37178
var _MESSAGES_TAG = 'messagebundle';
37179
var _MESSAGE_TAG = 'msg';
37180
var _PLACEHOLDER_TAG$2 = 'ph';
37181
var _EXEMPLE_TAG = 'ex';
37182
var _SOURCE_TAG$2 = 'source';
37183
var _DOCTYPE = "<!ELEMENT messagebundle (msg)*>\n<!ATTLIST messagebundle class CDATA #IMPLIED>\n\n<!ELEMENT msg (#PCDATA|ph|source)*>\n<!ATTLIST msg id CDATA #IMPLIED>\n<!ATTLIST msg seq CDATA #IMPLIED>\n<!ATTLIST msg name CDATA #IMPLIED>\n<!ATTLIST msg desc CDATA #IMPLIED>\n<!ATTLIST msg meaning CDATA #IMPLIED>\n<!ATTLIST msg obsolete (obsolete) #IMPLIED>\n<!ATTLIST msg xml:space (default|preserve) \"default\">\n<!ATTLIST msg is_hidden CDATA #IMPLIED>\n\n<!ELEMENT source (#PCDATA)>\n\n<!ELEMENT ph (#PCDATA|ex)*>\n<!ATTLIST ph name CDATA #REQUIRED>\n\n<!ELEMENT ex (#PCDATA)>";
37184
var Xmb = /** @class */ (function (_super) {
37185
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Xmb, _super);
37186
    function Xmb() {
37187
        return _super !== null && _super.apply(this, arguments) || this;
37188
    }
37189
    Xmb.prototype.write = function (messages, locale) {
37190
        var exampleVisitor = new ExampleVisitor();
37191
        var visitor = new _Visitor$2();
37192
        var rootNode = new Tag(_MESSAGES_TAG);
37193
        messages.forEach(function (message) {
37194
            var attrs = { id: message.id };
37195
            if (message.description) {
37196
                attrs['desc'] = message.description;
37197
            }
37198
            if (message.meaning) {
37199
                attrs['meaning'] = message.meaning;
37200
            }
37201
            var sourceTags = [];
37202
            message.sources.forEach(function (source) {
37203
                sourceTags.push(new Tag(_SOURCE_TAG$2, {}, [
37204
                    new Text$2(source.filePath + ":" + source.startLine + (source.endLine !== source.startLine ? ',' + source.endLine : ''))
37205
                ]));
37206
            });
37207
            rootNode.children.push(new CR(2), new Tag(_MESSAGE_TAG, attrs, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(sourceTags, visitor.serialize(message.nodes))));
37208
        });
37209
        rootNode.children.push(new CR());
37210
        return serialize([
37211
            new Declaration({ version: '1.0', encoding: 'UTF-8' }),
37212
            new CR(),
37213
            new Doctype(_MESSAGES_TAG, _DOCTYPE),
37214
            new CR(),
37215
            exampleVisitor.addDefaultExamples(rootNode),
37216
            new CR(),
37217
        ]);
37218
    };
37219
    Xmb.prototype.load = function (content, url) {
37220
        throw new Error('Unsupported');
37221
    };
37222
    Xmb.prototype.digest = function (message) { return digest$1(message); };
37223
    Xmb.prototype.createNameMapper = function (message) {
37224
        return new SimplePlaceholderMapper(message, toPublicName);
37225
    };
37226
    return Xmb;
37227
}(Serializer));
37228
var _Visitor$2 = /** @class */ (function () {
37229
    function _Visitor() {
37230
    }
37231
    _Visitor.prototype.visitText = function (text, context) { return [new Text$2(text.value)]; };
37232
    _Visitor.prototype.visitContainer = function (container, context) {
37233
        var _this = this;
37234
        var nodes = [];
37235
        container.children.forEach(function (node) { return nodes.push.apply(nodes, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(node.visit(_this))); });
37236
        return nodes;
37237
    };
37238
    _Visitor.prototype.visitIcu = function (icu, context) {
37239
        var _this = this;
37240
        var nodes = [new Text$2("{" + icu.expressionPlaceholder + ", " + icu.type + ", ")];
37241
        Object.keys(icu.cases).forEach(function (c) {
37242
            nodes.push.apply(nodes, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([new Text$2(c + " {")], icu.cases[c].visit(_this), [new Text$2("} ")]));
37243
        });
37244
        nodes.push(new Text$2("}"));
37245
        return nodes;
37246
    };
37247
    _Visitor.prototype.visitTagPlaceholder = function (ph, context) {
37248
        var startEx = new Tag(_EXEMPLE_TAG, {}, [new Text$2("<" + ph.tag + ">")]);
37249
        var startTagPh = new Tag(_PLACEHOLDER_TAG$2, { name: ph.startName }, [startEx]);
37250
        if (ph.isVoid) {
37251
            // void tags have no children nor closing tags
37252
            return [startTagPh];
37253
        }
37254
        var closeEx = new Tag(_EXEMPLE_TAG, {}, [new Text$2("</" + ph.tag + ">")]);
37255
        var closeTagPh = new Tag(_PLACEHOLDER_TAG$2, { name: ph.closeName }, [closeEx]);
37256
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([startTagPh], this.serialize(ph.children), [closeTagPh]);
37257
    };
37258
    _Visitor.prototype.visitPlaceholder = function (ph, context) {
37259
        var exTag = new Tag(_EXEMPLE_TAG, {}, [new Text$2("{{" + ph.value + "}}")]);
37260
        return [new Tag(_PLACEHOLDER_TAG$2, { name: ph.name }, [exTag])];
37261
    };
37262
    _Visitor.prototype.visitIcuPlaceholder = function (ph, context) {
37263
        var exTag = new Tag(_EXEMPLE_TAG, {}, [
37264
            new Text$2("{" + ph.value.expression + ", " + ph.value.type + ", " + Object.keys(ph.value.cases).map(function (value) { return value + ' {...}'; }).join(' ') + "}")
37265
        ]);
37266
        return [new Tag(_PLACEHOLDER_TAG$2, { name: ph.name }, [exTag])];
37267
    };
37268
    _Visitor.prototype.serialize = function (nodes) {
37269
        var _this = this;
37270
        return [].concat.apply([], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(nodes.map(function (node) { return node.visit(_this); })));
37271
    };
37272
    return _Visitor;
37273
}());
37274
function digest$1(message) {
37275
    return decimalDigest(message);
37276
}
37277
// TC requires at least one non-empty example on placeholders
37278
var ExampleVisitor = /** @class */ (function () {
37279
    function ExampleVisitor() {
37280
    }
37281
    ExampleVisitor.prototype.addDefaultExamples = function (node) {
37282
        node.visit(this);
37283
        return node;
37284
    };
37285
    ExampleVisitor.prototype.visitTag = function (tag) {
37286
        var _this = this;
37287
        if (tag.name === _PLACEHOLDER_TAG$2) {
37288
            if (!tag.children || tag.children.length == 0) {
37289
                var exText = new Text$2(tag.attrs['name'] || '...');
37290
                tag.children = [new Tag(_EXEMPLE_TAG, {}, [exText])];
37291
            }
37292
        }
37293
        else if (tag.children) {
37294
            tag.children.forEach(function (node) { return node.visit(_this); });
37295
        }
37296
    };
37297
    ExampleVisitor.prototype.visitText = function (text) { };
37298
    ExampleVisitor.prototype.visitDeclaration = function (decl) { };
37299
    ExampleVisitor.prototype.visitDoctype = function (doctype) { };
37300
    return ExampleVisitor;
37301
}());
37302
// XMB/XTB placeholders can only contain A-Z, 0-9 and _
37303
function toPublicName(internalName) {
37304
    return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, '_');
37305
}
37306
 
37307
/**
37308
 * @license
37309
 * Copyright Google Inc. All Rights Reserved.
37310
 *
37311
 * Use of this source code is governed by an MIT-style license that can be
37312
 * found in the LICENSE file at https://angular.io/license
37313
 */
37314
var _TRANSLATIONS_TAG = 'translationbundle';
37315
var _TRANSLATION_TAG = 'translation';
37316
var _PLACEHOLDER_TAG$3 = 'ph';
37317
var Xtb = /** @class */ (function (_super) {
37318
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Xtb, _super);
37319
    function Xtb() {
37320
        return _super !== null && _super.apply(this, arguments) || this;
37321
    }
37322
    Xtb.prototype.write = function (messages, locale) { throw new Error('Unsupported'); };
37323
    Xtb.prototype.load = function (content, url) {
37324
        // xtb to xml nodes
37325
        var xtbParser = new XtbParser();
37326
        var _a = xtbParser.parse(content, url), locale = _a.locale, msgIdToHtml = _a.msgIdToHtml, errors = _a.errors;
37327
        // xml nodes to i18n nodes
37328
        var i18nNodesByMsgId = {};
37329
        var converter = new XmlToI18n$2();
37330
        // Because we should be able to load xtb files that rely on features not supported by angular,
37331
        // we need to delay the conversion of html to i18n nodes so that non angular messages are not
37332
        // converted
37333
        Object.keys(msgIdToHtml).forEach(function (msgId) {
37334
            var valueFn = function () {
37335
                var _a = converter.convert(msgIdToHtml[msgId], url), i18nNodes = _a.i18nNodes, errors = _a.errors;
37336
                if (errors.length) {
37337
                    throw new Error("xtb parse errors:\n" + errors.join('\n'));
37338
                }
37339
                return i18nNodes;
37340
            };
37341
            createLazyProperty(i18nNodesByMsgId, msgId, valueFn);
37342
        });
37343
        if (errors.length) {
37344
            throw new Error("xtb parse errors:\n" + errors.join('\n'));
37345
        }
37346
        return { locale: locale, i18nNodesByMsgId: i18nNodesByMsgId };
37347
    };
37348
    Xtb.prototype.digest = function (message) { return digest$1(message); };
37349
    Xtb.prototype.createNameMapper = function (message) {
37350
        return new SimplePlaceholderMapper(message, toPublicName);
37351
    };
37352
    return Xtb;
37353
}(Serializer));
37354
function createLazyProperty(messages, id, valueFn) {
37355
    Object.defineProperty(messages, id, {
37356
        configurable: true,
37357
        enumerable: true,
37358
        get: function () {
37359
            var value = valueFn();
37360
            Object.defineProperty(messages, id, { enumerable: true, value: value });
37361
            return value;
37362
        },
37363
        set: function (_) { throw new Error('Could not overwrite an XTB translation'); },
37364
    });
37365
}
37366
// Extract messages as xml nodes from the xtb file
37367
var XtbParser = /** @class */ (function () {
37368
    function XtbParser() {
37369
        this._locale = null;
37370
    }
37371
    XtbParser.prototype.parse = function (xtb, url) {
37372
        this._bundleDepth = 0;
37373
        this._msgIdToHtml = {};
37374
        // We can not parse the ICU messages at this point as some messages might not originate
37375
        // from Angular that could not be lex'd.
37376
        var xml = new XmlParser().parse(xtb, url, false);
37377
        this._errors = xml.errors;
37378
        visitAll(this, xml.rootNodes);
37379
        return {
37380
            msgIdToHtml: this._msgIdToHtml,
37381
            errors: this._errors,
37382
            locale: this._locale,
37383
        };
37384
    };
37385
    XtbParser.prototype.visitElement = function (element, context) {
37386
        switch (element.name) {
37387
            case _TRANSLATIONS_TAG:
37388
                this._bundleDepth++;
37389
                if (this._bundleDepth > 1) {
37390
                    this._addError(element, "<" + _TRANSLATIONS_TAG + "> elements can not be nested");
37391
                }
37392
                var langAttr = element.attrs.find(function (attr) { return attr.name === 'lang'; });
37393
                if (langAttr) {
37394
                    this._locale = langAttr.value;
37395
                }
37396
                visitAll(this, element.children, null);
37397
                this._bundleDepth--;
37398
                break;
37399
            case _TRANSLATION_TAG:
37400
                var idAttr = element.attrs.find(function (attr) { return attr.name === 'id'; });
37401
                if (!idAttr) {
37402
                    this._addError(element, "<" + _TRANSLATION_TAG + "> misses the \"id\" attribute");
37403
                }
37404
                else {
37405
                    var id = idAttr.value;
37406
                    if (this._msgIdToHtml.hasOwnProperty(id)) {
37407
                        this._addError(element, "Duplicated translations for msg " + id);
37408
                    }
37409
                    else {
37410
                        var innerTextStart = element.startSourceSpan.end.offset;
37411
                        var innerTextEnd = element.endSourceSpan.start.offset;
37412
                        var content = element.startSourceSpan.start.file.content;
37413
                        var innerText = content.slice(innerTextStart, innerTextEnd);
37414
                        this._msgIdToHtml[id] = innerText;
37415
                    }
37416
                }
37417
                break;
37418
            default:
37419
                this._addError(element, 'Unexpected tag');
37420
        }
37421
    };
37422
    XtbParser.prototype.visitAttribute = function (attribute, context) { };
37423
    XtbParser.prototype.visitText = function (text, context) { };
37424
    XtbParser.prototype.visitComment = function (comment, context) { };
37425
    XtbParser.prototype.visitExpansion = function (expansion, context) { };
37426
    XtbParser.prototype.visitExpansionCase = function (expansionCase, context) { };
37427
    XtbParser.prototype._addError = function (node, message) {
37428
        this._errors.push(new I18nError(node.sourceSpan, message));
37429
    };
37430
    return XtbParser;
37431
}());
37432
// Convert ml nodes (xtb syntax) to i18n nodes
37433
var XmlToI18n$2 = /** @class */ (function () {
37434
    function XmlToI18n() {
37435
    }
37436
    XmlToI18n.prototype.convert = function (message, url) {
37437
        var xmlIcu = new XmlParser().parse(message, url, true);
37438
        this._errors = xmlIcu.errors;
37439
        var i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ?
37440
            [] :
37441
            visitAll(this, xmlIcu.rootNodes);
37442
        return {
37443
            i18nNodes: i18nNodes,
37444
            errors: this._errors,
37445
        };
37446
    };
37447
    XmlToI18n.prototype.visitText = function (text, context) { return new Text$1(text.value, text.sourceSpan); };
37448
    XmlToI18n.prototype.visitExpansion = function (icu, context) {
37449
        var caseMap = {};
37450
        visitAll(this, icu.cases).forEach(function (c) {
37451
            caseMap[c.value] = new Container(c.nodes, icu.sourceSpan);
37452
        });
37453
        return new Icu(icu.switchValue, icu.type, caseMap, icu.sourceSpan);
37454
    };
37455
    XmlToI18n.prototype.visitExpansionCase = function (icuCase, context) {
37456
        return {
37457
            value: icuCase.value,
37458
            nodes: visitAll(this, icuCase.expression),
37459
        };
37460
    };
37461
    XmlToI18n.prototype.visitElement = function (el, context) {
37462
        if (el.name === _PLACEHOLDER_TAG$3) {
37463
            var nameAttr = el.attrs.find(function (attr) { return attr.name === 'name'; });
37464
            if (nameAttr) {
37465
                return new Placeholder('', nameAttr.value, el.sourceSpan);
37466
            }
37467
            this._addError(el, "<" + _PLACEHOLDER_TAG$3 + "> misses the \"name\" attribute");
37468
        }
37469
        else {
37470
            this._addError(el, "Unexpected tag");
37471
        }
37472
        return null;
37473
    };
37474
    XmlToI18n.prototype.visitComment = function (comment, context) { };
37475
    XmlToI18n.prototype.visitAttribute = function (attribute, context) { };
37476
    XmlToI18n.prototype._addError = function (node, message) {
37477
        this._errors.push(new I18nError(node.sourceSpan, message));
37478
    };
37479
    return XmlToI18n;
37480
}());
37481
 
37482
/**
37483
 * @license
37484
 * Copyright Google Inc. All Rights Reserved.
37485
 *
37486
 * Use of this source code is governed by an MIT-style license that can be
37487
 * found in the LICENSE file at https://angular.io/license
37488
 */
37489
var HtmlParser = /** @class */ (function (_super) {
37490
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(HtmlParser, _super);
37491
    function HtmlParser() {
37492
        return _super.call(this, getHtmlTagDefinition) || this;
37493
    }
37494
    HtmlParser.prototype.parse = function (source, url, parseExpansionForms, interpolationConfig) {
37495
        if (parseExpansionForms === void 0) { parseExpansionForms = false; }
37496
        if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }
37497
        return _super.prototype.parse.call(this, source, url, parseExpansionForms, interpolationConfig);
37498
    };
37499
    return HtmlParser;
37500
}(Parser$1));
37501
 
37502
/**
37503
 * @license
37504
 * Copyright Google Inc. All Rights Reserved.
37505
 *
37506
 * Use of this source code is governed by an MIT-style license that can be
37507
 * found in the LICENSE file at https://angular.io/license
37508
 */
37509
/**
37510
 * A container for translated messages
37511
 */
37512
var TranslationBundle = /** @class */ (function () {
37513
    function TranslationBundle(_i18nNodesByMsgId, locale, digest, mapperFactory, missingTranslationStrategy, console) {
37514
        if (_i18nNodesByMsgId === void 0) { _i18nNodesByMsgId = {}; }
37515
        if (missingTranslationStrategy === void 0) { missingTranslationStrategy = MissingTranslationStrategy.Warning; }
37516
        this._i18nNodesByMsgId = _i18nNodesByMsgId;
37517
        this.digest = digest;
37518
        this.mapperFactory = mapperFactory;
37519
        this._i18nToHtml = new I18nToHtmlVisitor(_i18nNodesByMsgId, locale, digest, mapperFactory, missingTranslationStrategy, console);
37520
    }
37521
    // Creates a `TranslationBundle` by parsing the given `content` with the `serializer`.
37522
    TranslationBundle.load = function (content, url, serializer, missingTranslationStrategy, console) {
37523
        var _a = serializer.load(content, url), locale = _a.locale, i18nNodesByMsgId = _a.i18nNodesByMsgId;
37524
        var digestFn = function (m) { return serializer.digest(m); };
37525
        var mapperFactory = function (m) { return serializer.createNameMapper(m); };
37526
        return new TranslationBundle(i18nNodesByMsgId, locale, digestFn, mapperFactory, missingTranslationStrategy, console);
37527
    };
37528
    // Returns the translation as HTML nodes from the given source message.
37529
    TranslationBundle.prototype.get = function (srcMsg) {
37530
        var html = this._i18nToHtml.convert(srcMsg);
37531
        if (html.errors.length) {
37532
            throw new Error(html.errors.join('\n'));
37533
        }
37534
        return html.nodes;
37535
    };
37536
    TranslationBundle.prototype.has = function (srcMsg) { return this.digest(srcMsg) in this._i18nNodesByMsgId; };
37537
    return TranslationBundle;
37538
}());
37539
var I18nToHtmlVisitor = /** @class */ (function () {
37540
    function I18nToHtmlVisitor(_i18nNodesByMsgId, _locale, _digest, _mapperFactory, _missingTranslationStrategy, _console) {
37541
        if (_i18nNodesByMsgId === void 0) { _i18nNodesByMsgId = {}; }
37542
        this._i18nNodesByMsgId = _i18nNodesByMsgId;
37543
        this._locale = _locale;
37544
        this._digest = _digest;
37545
        this._mapperFactory = _mapperFactory;
37546
        this._missingTranslationStrategy = _missingTranslationStrategy;
37547
        this._console = _console;
37548
        this._contextStack = [];
37549
        this._errors = [];
37550
    }
37551
    I18nToHtmlVisitor.prototype.convert = function (srcMsg) {
37552
        this._contextStack.length = 0;
37553
        this._errors.length = 0;
37554
        // i18n to text
37555
        var text = this._convertToText(srcMsg);
37556
        // text to html
37557
        var url = srcMsg.nodes[0].sourceSpan.start.file.url;
37558
        var html = new HtmlParser().parse(text, url, true);
37559
        return {
37560
            nodes: html.rootNodes,
37561
            errors: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(this._errors, html.errors),
37562
        };
37563
    };
37564
    I18nToHtmlVisitor.prototype.visitText = function (text, context) {
37565
        // `convert()` uses an `HtmlParser` to return `html.Node`s
37566
        // we should then make sure that any special characters are escaped
37567
        return escapeXml(text.value);
37568
    };
37569
    I18nToHtmlVisitor.prototype.visitContainer = function (container, context) {
37570
        var _this = this;
37571
        return container.children.map(function (n) { return n.visit(_this); }).join('');
37572
    };
37573
    I18nToHtmlVisitor.prototype.visitIcu = function (icu, context) {
37574
        var _this = this;
37575
        var cases = Object.keys(icu.cases).map(function (k) { return k + " {" + icu.cases[k].visit(_this) + "}"; });
37576
        // TODO(vicb): Once all format switch to using expression placeholders
37577
        // we should throw when the placeholder is not in the source message
37578
        var exp = this._srcMsg.placeholders.hasOwnProperty(icu.expression) ?
37579
            this._srcMsg.placeholders[icu.expression] :
37580
            icu.expression;
37581
        return "{" + exp + ", " + icu.type + ", " + cases.join(' ') + "}";
37582
    };
37583
    I18nToHtmlVisitor.prototype.visitPlaceholder = function (ph, context) {
37584
        var phName = this._mapper(ph.name);
37585
        if (this._srcMsg.placeholders.hasOwnProperty(phName)) {
37586
            return this._srcMsg.placeholders[phName];
37587
        }
37588
        if (this._srcMsg.placeholderToMessage.hasOwnProperty(phName)) {
37589
            return this._convertToText(this._srcMsg.placeholderToMessage[phName]);
37590
        }
37591
        this._addError(ph, "Unknown placeholder \"" + ph.name + "\"");
37592
        return '';
37593
    };
37594
    // Loaded message contains only placeholders (vs tag and icu placeholders).
37595
    // However when a translation can not be found, we need to serialize the source message
37596
    // which can contain tag placeholders
37597
    I18nToHtmlVisitor.prototype.visitTagPlaceholder = function (ph, context) {
37598
        var _this = this;
37599
        var tag = "" + ph.tag;
37600
        var attrs = Object.keys(ph.attrs).map(function (name) { return name + "=\"" + ph.attrs[name] + "\""; }).join(' ');
37601
        if (ph.isVoid) {
37602
            return "<" + tag + " " + attrs + "/>";
37603
        }
37604
        var children = ph.children.map(function (c) { return c.visit(_this); }).join('');
37605
        return "<" + tag + " " + attrs + ">" + children + "</" + tag + ">";
37606
    };
37607
    // Loaded message contains only placeholders (vs tag and icu placeholders).
37608
    // However when a translation can not be found, we need to serialize the source message
37609
    // which can contain tag placeholders
37610
    I18nToHtmlVisitor.prototype.visitIcuPlaceholder = function (ph, context) {
37611
        // An ICU placeholder references the source message to be serialized
37612
        return this._convertToText(this._srcMsg.placeholderToMessage[ph.name]);
37613
    };
37614
    /**
37615
     * Convert a source message to a translated text string:
37616
     * - text nodes are replaced with their translation,
37617
     * - placeholders are replaced with their content,
37618
     * - ICU nodes are converted to ICU expressions.
37619
     */
37620
    I18nToHtmlVisitor.prototype._convertToText = function (srcMsg) {
37621
        var _this = this;
37622
        var id = this._digest(srcMsg);
37623
        var mapper = this._mapperFactory ? this._mapperFactory(srcMsg) : null;
37624
        var nodes;
37625
        this._contextStack.push({ msg: this._srcMsg, mapper: this._mapper });
37626
        this._srcMsg = srcMsg;
37627
        if (this._i18nNodesByMsgId.hasOwnProperty(id)) {
37628
            // When there is a translation use its nodes as the source
37629
            // And create a mapper to convert serialized placeholder names to internal names
37630
            nodes = this._i18nNodesByMsgId[id];
37631
            this._mapper = function (name) { return mapper ? mapper.toInternalName(name) : name; };
37632
        }
37633
        else {
37634
            // When no translation has been found
37635
            // - report an error / a warning / nothing,
37636
            // - use the nodes from the original message
37637
            // - placeholders are already internal and need no mapper
37638
            if (this._missingTranslationStrategy === MissingTranslationStrategy.Error) {
37639
                var ctx = this._locale ? " for locale \"" + this._locale + "\"" : '';
37640
                this._addError(srcMsg.nodes[0], "Missing translation for message \"" + id + "\"" + ctx);
37641
            }
37642
            else if (this._console &&
37643
                this._missingTranslationStrategy === MissingTranslationStrategy.Warning) {
37644
                var ctx = this._locale ? " for locale \"" + this._locale + "\"" : '';
37645
                this._console.warn("Missing translation for message \"" + id + "\"" + ctx);
37646
            }
37647
            nodes = srcMsg.nodes;
37648
            this._mapper = function (name) { return name; };
37649
        }
37650
        var text = nodes.map(function (node) { return node.visit(_this); }).join('');
37651
        var context = this._contextStack.pop();
37652
        this._srcMsg = context.msg;
37653
        this._mapper = context.mapper;
37654
        return text;
37655
    };
37656
    I18nToHtmlVisitor.prototype._addError = function (el, msg) {
37657
        this._errors.push(new I18nError(el.sourceSpan, msg));
37658
    };
37659
    return I18nToHtmlVisitor;
37660
}());
37661
 
37662
/**
37663
 * @license
37664
 * Copyright Google Inc. All Rights Reserved.
37665
 *
37666
 * Use of this source code is governed by an MIT-style license that can be
37667
 * found in the LICENSE file at https://angular.io/license
37668
 */
37669
var I18NHtmlParser = /** @class */ (function () {
37670
    function I18NHtmlParser(_htmlParser, translations, translationsFormat, missingTranslation, console) {
37671
        if (missingTranslation === void 0) { missingTranslation = MissingTranslationStrategy.Warning; }
37672
        this._htmlParser = _htmlParser;
37673
        if (translations) {
37674
            var serializer = createSerializer(translationsFormat);
37675
            this._translationBundle =
37676
                TranslationBundle.load(translations, 'i18n', serializer, missingTranslation, console);
37677
        }
37678
        else {
37679
            this._translationBundle =
37680
                new TranslationBundle({}, null, digest, undefined, missingTranslation, console);
37681
        }
37682
    }
37683
    I18NHtmlParser.prototype.parse = function (source, url, parseExpansionForms, interpolationConfig) {
37684
        if (parseExpansionForms === void 0) { parseExpansionForms = false; }
37685
        if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }
37686
        var parseResult = this._htmlParser.parse(source, url, parseExpansionForms, interpolationConfig);
37687
        if (parseResult.errors.length) {
37688
            return new ParseTreeResult(parseResult.rootNodes, parseResult.errors);
37689
        }
37690
        return mergeTranslations(parseResult.rootNodes, this._translationBundle, interpolationConfig, [], {});
37691
    };
37692
    return I18NHtmlParser;
37693
}());
37694
function createSerializer(format) {
37695
    format = (format || 'xlf').toLowerCase();
37696
    switch (format) {
37697
        case 'xmb':
37698
            return new Xmb();
37699
        case 'xtb':
37700
            return new Xtb();
37701
        case 'xliff2':
37702
        case 'xlf2':
37703
            return new Xliff2();
37704
        case 'xliff':
37705
        case 'xlf':
37706
        default:
37707
            return new Xliff();
37708
    }
37709
}
37710
 
37711
/**
37712
 * @license
37713
 * Copyright Google Inc. All Rights Reserved.
37714
 *
37715
 * Use of this source code is governed by an MIT-style license that can be
37716
 * found in the LICENSE file at https://angular.io/license
37717
 */
37718
var CORE = '@angular/core';
37719
var Identifiers = /** @class */ (function () {
37720
    function Identifiers() {
37721
    }
37722
    Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS = {
37723
        name: 'ANALYZE_FOR_ENTRY_COMPONENTS',
37724
        moduleName: CORE,
37725
    };
37726
    Identifiers.ElementRef = { name: 'ElementRef', moduleName: CORE };
37727
    Identifiers.NgModuleRef = { name: 'NgModuleRef', moduleName: CORE };
37728
    Identifiers.ViewContainerRef = { name: 'ViewContainerRef', moduleName: CORE };
37729
    Identifiers.ChangeDetectorRef = {
37730
        name: 'ChangeDetectorRef',
37731
        moduleName: CORE,
37732
    };
37733
    Identifiers.QueryList = { name: 'QueryList', moduleName: CORE };
37734
    Identifiers.TemplateRef = { name: 'TemplateRef', moduleName: CORE };
37735
    Identifiers.CodegenComponentFactoryResolver = {
37736
        name: 'ɵCodegenComponentFactoryResolver',
37737
        moduleName: CORE,
37738
    };
37739
    Identifiers.ComponentFactoryResolver = {
37740
        name: 'ComponentFactoryResolver',
37741
        moduleName: CORE,
37742
    };
37743
    Identifiers.ComponentFactory = { name: 'ComponentFactory', moduleName: CORE };
37744
    Identifiers.ComponentRef = { name: 'ComponentRef', moduleName: CORE };
37745
    Identifiers.NgModuleFactory = { name: 'NgModuleFactory', moduleName: CORE };
37746
    Identifiers.createModuleFactory = {
37747
        name: 'ɵcmf',
37748
        moduleName: CORE,
37749
    };
37750
    Identifiers.moduleDef = {
37751
        name: 'ɵmod',
37752
        moduleName: CORE,
37753
    };
37754
    Identifiers.moduleProviderDef = {
37755
        name: 'ɵmpd',
37756
        moduleName: CORE,
37757
    };
37758
    Identifiers.RegisterModuleFactoryFn = {
37759
        name: 'ɵregisterModuleFactory',
37760
        moduleName: CORE,
37761
    };
37762
    Identifiers.inject = { name: 'inject', moduleName: CORE };
37763
    Identifiers.INJECTOR = { name: 'INJECTOR', moduleName: CORE };
37764
    Identifiers.Injector = { name: 'Injector', moduleName: CORE };
37765
    Identifiers.defineInjectable = { name: 'defineInjectable', moduleName: CORE };
37766
    Identifiers.ViewEncapsulation = {
37767
        name: 'ViewEncapsulation',
37768
        moduleName: CORE,
37769
    };
37770
    Identifiers.ChangeDetectionStrategy = {
37771
        name: 'ChangeDetectionStrategy',
37772
        moduleName: CORE,
37773
    };
37774
    Identifiers.SecurityContext = {
37775
        name: 'SecurityContext',
37776
        moduleName: CORE,
37777
    };
37778
    Identifiers.LOCALE_ID = { name: 'LOCALE_ID', moduleName: CORE };
37779
    Identifiers.TRANSLATIONS_FORMAT = {
37780
        name: 'TRANSLATIONS_FORMAT',
37781
        moduleName: CORE,
37782
    };
37783
    Identifiers.inlineInterpolate = {
37784
        name: 'ɵinlineInterpolate',
37785
        moduleName: CORE,
37786
    };
37787
    Identifiers.interpolate = { name: 'ɵinterpolate', moduleName: CORE };
37788
    Identifiers.EMPTY_ARRAY = { name: 'ɵEMPTY_ARRAY', moduleName: CORE };
37789
    Identifiers.EMPTY_MAP = { name: 'ɵEMPTY_MAP', moduleName: CORE };
37790
    Identifiers.Renderer = { name: 'Renderer', moduleName: CORE };
37791
    Identifiers.viewDef = { name: 'ɵvid', moduleName: CORE };
37792
    Identifiers.elementDef = { name: 'ɵeld', moduleName: CORE };
37793
    Identifiers.anchorDef = { name: 'ɵand', moduleName: CORE };
37794
    Identifiers.textDef = { name: 'ɵted', moduleName: CORE };
37795
    Identifiers.directiveDef = { name: 'ɵdid', moduleName: CORE };
37796
    Identifiers.providerDef = { name: 'ɵprd', moduleName: CORE };
37797
    Identifiers.queryDef = { name: 'ɵqud', moduleName: CORE };
37798
    Identifiers.pureArrayDef = { name: 'ɵpad', moduleName: CORE };
37799
    Identifiers.pureObjectDef = { name: 'ɵpod', moduleName: CORE };
37800
    Identifiers.purePipeDef = { name: 'ɵppd', moduleName: CORE };
37801
    Identifiers.pipeDef = { name: 'ɵpid', moduleName: CORE };
37802
    Identifiers.nodeValue = { name: 'ɵnov', moduleName: CORE };
37803
    Identifiers.ngContentDef = { name: 'ɵncd', moduleName: CORE };
37804
    Identifiers.unwrapValue = { name: 'ɵunv', moduleName: CORE };
37805
    Identifiers.createRendererType2 = { name: 'ɵcrt', moduleName: CORE };
37806
    // type only
37807
    Identifiers.RendererType2 = {
37808
        name: 'RendererType2',
37809
        moduleName: CORE,
37810
    };
37811
    // type only
37812
    Identifiers.ViewDefinition = {
37813
        name: 'ɵViewDefinition',
37814
        moduleName: CORE,
37815
    };
37816
    Identifiers.createComponentFactory = { name: 'ɵccf', moduleName: CORE };
37817
    return Identifiers;
37818
}());
37819
function createTokenForReference(reference) {
37820
    return { identifier: { reference: reference } };
37821
}
37822
function createTokenForExternalReference(reflector, reference) {
37823
    return createTokenForReference(reflector.resolveExternalReference(reference));
37824
}
37825
 
37826
/**
37827
 * @license
37828
 * Copyright Google Inc. All Rights Reserved.
37829
 *
37830
 * Use of this source code is governed by an MIT-style license that can be
37831
 * found in the LICENSE file at https://angular.io/license
37832
 */
37833
//// Types
37834
var TypeModifier;
37835
(function (TypeModifier) {
37836
    TypeModifier[TypeModifier["Const"] = 0] = "Const";
37837
})(TypeModifier || (TypeModifier = {}));
37838
var Type$1 = /** @class */ (function () {
37839
    function Type(modifiers) {
37840
        if (modifiers === void 0) { modifiers = null; }
37841
        this.modifiers = modifiers;
37842
        if (!modifiers) {
37843
            this.modifiers = [];
37844
        }
37845
    }
37846
    Type.prototype.hasModifier = function (modifier) { return this.modifiers.indexOf(modifier) !== -1; };
37847
    return Type;
37848
}());
37849
var BuiltinTypeName;
37850
(function (BuiltinTypeName) {
37851
    BuiltinTypeName[BuiltinTypeName["Dynamic"] = 0] = "Dynamic";
37852
    BuiltinTypeName[BuiltinTypeName["Bool"] = 1] = "Bool";
37853
    BuiltinTypeName[BuiltinTypeName["String"] = 2] = "String";
37854
    BuiltinTypeName[BuiltinTypeName["Int"] = 3] = "Int";
37855
    BuiltinTypeName[BuiltinTypeName["Number"] = 4] = "Number";
37856
    BuiltinTypeName[BuiltinTypeName["Function"] = 5] = "Function";
37857
    BuiltinTypeName[BuiltinTypeName["Inferred"] = 6] = "Inferred";
37858
})(BuiltinTypeName || (BuiltinTypeName = {}));
37859
var BuiltinType = /** @class */ (function (_super) {
37860
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(BuiltinType, _super);
37861
    function BuiltinType(name, modifiers) {
37862
        if (modifiers === void 0) { modifiers = null; }
37863
        var _this = _super.call(this, modifiers) || this;
37864
        _this.name = name;
37865
        return _this;
37866
    }
37867
    BuiltinType.prototype.visitType = function (visitor, context) {
37868
        return visitor.visitBuiltinType(this, context);
37869
    };
37870
    return BuiltinType;
37871
}(Type$1));
37872
var ExpressionType = /** @class */ (function (_super) {
37873
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ExpressionType, _super);
37874
    function ExpressionType(value, modifiers) {
37875
        if (modifiers === void 0) { modifiers = null; }
37876
        var _this = _super.call(this, modifiers) || this;
37877
        _this.value = value;
37878
        return _this;
37879
    }
37880
    ExpressionType.prototype.visitType = function (visitor, context) {
37881
        return visitor.visitExpressionType(this, context);
37882
    };
37883
    return ExpressionType;
37884
}(Type$1));
37885
var ArrayType = /** @class */ (function (_super) {
37886
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ArrayType, _super);
37887
    function ArrayType(of, modifiers) {
37888
        if (modifiers === void 0) { modifiers = null; }
37889
        var _this = _super.call(this, modifiers) || this;
37890
        _this.of = of;
37891
        return _this;
37892
    }
37893
    ArrayType.prototype.visitType = function (visitor, context) {
37894
        return visitor.visitArrayType(this, context);
37895
    };
37896
    return ArrayType;
37897
}(Type$1));
37898
var MapType = /** @class */ (function (_super) {
37899
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MapType, _super);
37900
    function MapType(valueType, modifiers) {
37901
        if (modifiers === void 0) { modifiers = null; }
37902
        var _this = _super.call(this, modifiers) || this;
37903
        _this.valueType = valueType || null;
37904
        return _this;
37905
    }
37906
    MapType.prototype.visitType = function (visitor, context) { return visitor.visitMapType(this, context); };
37907
    return MapType;
37908
}(Type$1));
37909
var DYNAMIC_TYPE = new BuiltinType(BuiltinTypeName.Dynamic);
37910
var INFERRED_TYPE = new BuiltinType(BuiltinTypeName.Inferred);
37911
var BOOL_TYPE = new BuiltinType(BuiltinTypeName.Bool);
37912
var INT_TYPE = new BuiltinType(BuiltinTypeName.Int);
37913
var NUMBER_TYPE = new BuiltinType(BuiltinTypeName.Number);
37914
var STRING_TYPE = new BuiltinType(BuiltinTypeName.String);
37915
var FUNCTION_TYPE = new BuiltinType(BuiltinTypeName.Function);
37916
///// Expressions
37917
var BinaryOperator;
37918
(function (BinaryOperator) {
37919
    BinaryOperator[BinaryOperator["Equals"] = 0] = "Equals";
37920
    BinaryOperator[BinaryOperator["NotEquals"] = 1] = "NotEquals";
37921
    BinaryOperator[BinaryOperator["Identical"] = 2] = "Identical";
37922
    BinaryOperator[BinaryOperator["NotIdentical"] = 3] = "NotIdentical";
37923
    BinaryOperator[BinaryOperator["Minus"] = 4] = "Minus";
37924
    BinaryOperator[BinaryOperator["Plus"] = 5] = "Plus";
37925
    BinaryOperator[BinaryOperator["Divide"] = 6] = "Divide";
37926
    BinaryOperator[BinaryOperator["Multiply"] = 7] = "Multiply";
37927
    BinaryOperator[BinaryOperator["Modulo"] = 8] = "Modulo";
37928
    BinaryOperator[BinaryOperator["And"] = 9] = "And";
37929
    BinaryOperator[BinaryOperator["Or"] = 10] = "Or";
37930
    BinaryOperator[BinaryOperator["BitwiseAnd"] = 11] = "BitwiseAnd";
37931
    BinaryOperator[BinaryOperator["Lower"] = 12] = "Lower";
37932
    BinaryOperator[BinaryOperator["LowerEquals"] = 13] = "LowerEquals";
37933
    BinaryOperator[BinaryOperator["Bigger"] = 14] = "Bigger";
37934
    BinaryOperator[BinaryOperator["BiggerEquals"] = 15] = "BiggerEquals";
37935
})(BinaryOperator || (BinaryOperator = {}));
37936
function nullSafeIsEquivalent(base, other) {
37937
    if (base == null || other == null) {
37938
        return base == other;
37939
    }
37940
    return base.isEquivalent(other);
37941
}
37942
function areAllEquivalent(base, other) {
37943
    var len = base.length;
37944
    if (len !== other.length) {
37945
        return false;
37946
    }
37947
    for (var i = 0; i < len; i++) {
37948
        if (!base[i].isEquivalent(other[i])) {
37949
            return false;
37950
        }
37951
    }
37952
    return true;
37953
}
37954
var Expression = /** @class */ (function () {
37955
    function Expression(type, sourceSpan) {
37956
        this.type = type || null;
37957
        this.sourceSpan = sourceSpan || null;
37958
    }
37959
    Expression.prototype.prop = function (name, sourceSpan) {
37960
        return new ReadPropExpr(this, name, null, sourceSpan);
37961
    };
37962
    Expression.prototype.key = function (index, type, sourceSpan) {
37963
        return new ReadKeyExpr(this, index, type, sourceSpan);
37964
    };
37965
    Expression.prototype.callMethod = function (name, params, sourceSpan) {
37966
        return new InvokeMethodExpr(this, name, params, null, sourceSpan);
37967
    };
37968
    Expression.prototype.callFn = function (params, sourceSpan) {
37969
        return new InvokeFunctionExpr(this, params, null, sourceSpan);
37970
    };
37971
    Expression.prototype.instantiate = function (params, type, sourceSpan) {
37972
        return new InstantiateExpr(this, params, type, sourceSpan);
37973
    };
37974
    Expression.prototype.conditional = function (trueCase, falseCase, sourceSpan) {
37975
        if (falseCase === void 0) { falseCase = null; }
37976
        return new ConditionalExpr(this, trueCase, falseCase, null, sourceSpan);
37977
    };
37978
    Expression.prototype.equals = function (rhs, sourceSpan) {
37979
        return new BinaryOperatorExpr(BinaryOperator.Equals, this, rhs, null, sourceSpan);
37980
    };
37981
    Expression.prototype.notEquals = function (rhs, sourceSpan) {
37982
        return new BinaryOperatorExpr(BinaryOperator.NotEquals, this, rhs, null, sourceSpan);
37983
    };
37984
    Expression.prototype.identical = function (rhs, sourceSpan) {
37985
        return new BinaryOperatorExpr(BinaryOperator.Identical, this, rhs, null, sourceSpan);
37986
    };
37987
    Expression.prototype.notIdentical = function (rhs, sourceSpan) {
37988
        return new BinaryOperatorExpr(BinaryOperator.NotIdentical, this, rhs, null, sourceSpan);
37989
    };
37990
    Expression.prototype.minus = function (rhs, sourceSpan) {
37991
        return new BinaryOperatorExpr(BinaryOperator.Minus, this, rhs, null, sourceSpan);
37992
    };
37993
    Expression.prototype.plus = function (rhs, sourceSpan) {
37994
        return new BinaryOperatorExpr(BinaryOperator.Plus, this, rhs, null, sourceSpan);
37995
    };
37996
    Expression.prototype.divide = function (rhs, sourceSpan) {
37997
        return new BinaryOperatorExpr(BinaryOperator.Divide, this, rhs, null, sourceSpan);
37998
    };
37999
    Expression.prototype.multiply = function (rhs, sourceSpan) {
38000
        return new BinaryOperatorExpr(BinaryOperator.Multiply, this, rhs, null, sourceSpan);
38001
    };
38002
    Expression.prototype.modulo = function (rhs, sourceSpan) {
38003
        return new BinaryOperatorExpr(BinaryOperator.Modulo, this, rhs, null, sourceSpan);
38004
    };
38005
    Expression.prototype.and = function (rhs, sourceSpan) {
38006
        return new BinaryOperatorExpr(BinaryOperator.And, this, rhs, null, sourceSpan);
38007
    };
38008
    Expression.prototype.bitwiseAnd = function (rhs, sourceSpan, parens) {
38009
        if (parens === void 0) { parens = true; }
38010
        return new BinaryOperatorExpr(BinaryOperator.BitwiseAnd, this, rhs, null, sourceSpan, parens);
38011
    };
38012
    Expression.prototype.or = function (rhs, sourceSpan) {
38013
        return new BinaryOperatorExpr(BinaryOperator.Or, this, rhs, null, sourceSpan);
38014
    };
38015
    Expression.prototype.lower = function (rhs, sourceSpan) {
38016
        return new BinaryOperatorExpr(BinaryOperator.Lower, this, rhs, null, sourceSpan);
38017
    };
38018
    Expression.prototype.lowerEquals = function (rhs, sourceSpan) {
38019
        return new BinaryOperatorExpr(BinaryOperator.LowerEquals, this, rhs, null, sourceSpan);
38020
    };
38021
    Expression.prototype.bigger = function (rhs, sourceSpan) {
38022
        return new BinaryOperatorExpr(BinaryOperator.Bigger, this, rhs, null, sourceSpan);
38023
    };
38024
    Expression.prototype.biggerEquals = function (rhs, sourceSpan) {
38025
        return new BinaryOperatorExpr(BinaryOperator.BiggerEquals, this, rhs, null, sourceSpan);
38026
    };
38027
    Expression.prototype.isBlank = function (sourceSpan) {
38028
        // Note: We use equals by purpose here to compare to null and undefined in JS.
38029
        // We use the typed null to allow strictNullChecks to narrow types.
38030
        return this.equals(TYPED_NULL_EXPR, sourceSpan);
38031
    };
38032
    Expression.prototype.cast = function (type, sourceSpan) {
38033
        return new CastExpr(this, type, sourceSpan);
38034
    };
38035
    Expression.prototype.toStmt = function () { return new ExpressionStatement(this, null); };
38036
    return Expression;
38037
}());
38038
var BuiltinVar;
38039
(function (BuiltinVar) {
38040
    BuiltinVar[BuiltinVar["This"] = 0] = "This";
38041
    BuiltinVar[BuiltinVar["Super"] = 1] = "Super";
38042
    BuiltinVar[BuiltinVar["CatchError"] = 2] = "CatchError";
38043
    BuiltinVar[BuiltinVar["CatchStack"] = 3] = "CatchStack";
38044
})(BuiltinVar || (BuiltinVar = {}));
38045
var ReadVarExpr = /** @class */ (function (_super) {
38046
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ReadVarExpr, _super);
38047
    function ReadVarExpr(name, type, sourceSpan) {
38048
        var _this = _super.call(this, type, sourceSpan) || this;
38049
        if (typeof name === 'string') {
38050
            _this.name = name;
38051
            _this.builtin = null;
38052
        }
38053
        else {
38054
            _this.name = null;
38055
            _this.builtin = name;
38056
        }
38057
        return _this;
38058
    }
38059
    ReadVarExpr.prototype.isEquivalent = function (e) {
38060
        return e instanceof ReadVarExpr && this.name === e.name && this.builtin === e.builtin;
38061
    };
38062
    ReadVarExpr.prototype.isConstant = function () { return false; };
38063
    ReadVarExpr.prototype.visitExpression = function (visitor, context) {
38064
        return visitor.visitReadVarExpr(this, context);
38065
    };
38066
    ReadVarExpr.prototype.set = function (value) {
38067
        if (!this.name) {
38068
            throw new Error("Built in variable " + this.builtin + " can not be assigned to.");
38069
        }
38070
        return new WriteVarExpr(this.name, value, null, this.sourceSpan);
38071
    };
38072
    return ReadVarExpr;
38073
}(Expression));
38074
var WriteVarExpr = /** @class */ (function (_super) {
38075
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(WriteVarExpr, _super);
38076
    function WriteVarExpr(name, value, type, sourceSpan) {
38077
        var _this = _super.call(this, type || value.type, sourceSpan) || this;
38078
        _this.name = name;
38079
        _this.value = value;
38080
        return _this;
38081
    }
38082
    WriteVarExpr.prototype.isEquivalent = function (e) {
38083
        return e instanceof WriteVarExpr && this.name === e.name && this.value.isEquivalent(e.value);
38084
    };
38085
    WriteVarExpr.prototype.isConstant = function () { return false; };
38086
    WriteVarExpr.prototype.visitExpression = function (visitor, context) {
38087
        return visitor.visitWriteVarExpr(this, context);
38088
    };
38089
    WriteVarExpr.prototype.toDeclStmt = function (type, modifiers) {
38090
        return new DeclareVarStmt(this.name, this.value, type, modifiers, this.sourceSpan);
38091
    };
38092
    return WriteVarExpr;
38093
}(Expression));
38094
var WriteKeyExpr = /** @class */ (function (_super) {
38095
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(WriteKeyExpr, _super);
38096
    function WriteKeyExpr(receiver, index, value, type, sourceSpan) {
38097
        var _this = _super.call(this, type || value.type, sourceSpan) || this;
38098
        _this.receiver = receiver;
38099
        _this.index = index;
38100
        _this.value = value;
38101
        return _this;
38102
    }
38103
    WriteKeyExpr.prototype.isEquivalent = function (e) {
38104
        return e instanceof WriteKeyExpr && this.receiver.isEquivalent(e.receiver) &&
38105
            this.index.isEquivalent(e.index) && this.value.isEquivalent(e.value);
38106
    };
38107
    WriteKeyExpr.prototype.isConstant = function () { return false; };
38108
    WriteKeyExpr.prototype.visitExpression = function (visitor, context) {
38109
        return visitor.visitWriteKeyExpr(this, context);
38110
    };
38111
    return WriteKeyExpr;
38112
}(Expression));
38113
var WritePropExpr = /** @class */ (function (_super) {
38114
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(WritePropExpr, _super);
38115
    function WritePropExpr(receiver, name, value, type, sourceSpan) {
38116
        var _this = _super.call(this, type || value.type, sourceSpan) || this;
38117
        _this.receiver = receiver;
38118
        _this.name = name;
38119
        _this.value = value;
38120
        return _this;
38121
    }
38122
    WritePropExpr.prototype.isEquivalent = function (e) {
38123
        return e instanceof WritePropExpr && this.receiver.isEquivalent(e.receiver) &&
38124
            this.name === e.name && this.value.isEquivalent(e.value);
38125
    };
38126
    WritePropExpr.prototype.isConstant = function () { return false; };
38127
    WritePropExpr.prototype.visitExpression = function (visitor, context) {
38128
        return visitor.visitWritePropExpr(this, context);
38129
    };
38130
    return WritePropExpr;
38131
}(Expression));
38132
var BuiltinMethod;
38133
(function (BuiltinMethod) {
38134
    BuiltinMethod[BuiltinMethod["ConcatArray"] = 0] = "ConcatArray";
38135
    BuiltinMethod[BuiltinMethod["SubscribeObservable"] = 1] = "SubscribeObservable";
38136
    BuiltinMethod[BuiltinMethod["Bind"] = 2] = "Bind";
38137
})(BuiltinMethod || (BuiltinMethod = {}));
38138
var InvokeMethodExpr = /** @class */ (function (_super) {
38139
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(InvokeMethodExpr, _super);
38140
    function InvokeMethodExpr(receiver, method, args, type, sourceSpan) {
38141
        var _this = _super.call(this, type, sourceSpan) || this;
38142
        _this.receiver = receiver;
38143
        _this.args = args;
38144
        if (typeof method === 'string') {
38145
            _this.name = method;
38146
            _this.builtin = null;
38147
        }
38148
        else {
38149
            _this.name = null;
38150
            _this.builtin = method;
38151
        }
38152
        return _this;
38153
    }
38154
    InvokeMethodExpr.prototype.isEquivalent = function (e) {
38155
        return e instanceof InvokeMethodExpr && this.receiver.isEquivalent(e.receiver) &&
38156
            this.name === e.name && this.builtin === e.builtin && areAllEquivalent(this.args, e.args);
38157
    };
38158
    InvokeMethodExpr.prototype.isConstant = function () { return false; };
38159
    InvokeMethodExpr.prototype.visitExpression = function (visitor, context) {
38160
        return visitor.visitInvokeMethodExpr(this, context);
38161
    };
38162
    return InvokeMethodExpr;
38163
}(Expression));
38164
var InvokeFunctionExpr = /** @class */ (function (_super) {
38165
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(InvokeFunctionExpr, _super);
38166
    function InvokeFunctionExpr(fn, args, type, sourceSpan) {
38167
        var _this = _super.call(this, type, sourceSpan) || this;
38168
        _this.fn = fn;
38169
        _this.args = args;
38170
        return _this;
38171
    }
38172
    InvokeFunctionExpr.prototype.isEquivalent = function (e) {
38173
        return e instanceof InvokeFunctionExpr && this.fn.isEquivalent(e.fn) &&
38174
            areAllEquivalent(this.args, e.args);
38175
    };
38176
    InvokeFunctionExpr.prototype.isConstant = function () { return false; };
38177
    InvokeFunctionExpr.prototype.visitExpression = function (visitor, context) {
38178
        return visitor.visitInvokeFunctionExpr(this, context);
38179
    };
38180
    return InvokeFunctionExpr;
38181
}(Expression));
38182
var InstantiateExpr = /** @class */ (function (_super) {
38183
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(InstantiateExpr, _super);
38184
    function InstantiateExpr(classExpr, args, type, sourceSpan) {
38185
        var _this = _super.call(this, type, sourceSpan) || this;
38186
        _this.classExpr = classExpr;
38187
        _this.args = args;
38188
        return _this;
38189
    }
38190
    InstantiateExpr.prototype.isEquivalent = function (e) {
38191
        return e instanceof InstantiateExpr && this.classExpr.isEquivalent(e.classExpr) &&
38192
            areAllEquivalent(this.args, e.args);
38193
    };
38194
    InstantiateExpr.prototype.isConstant = function () { return false; };
38195
    InstantiateExpr.prototype.visitExpression = function (visitor, context) {
38196
        return visitor.visitInstantiateExpr(this, context);
38197
    };
38198
    return InstantiateExpr;
38199
}(Expression));
38200
var LiteralExpr = /** @class */ (function (_super) {
38201
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(LiteralExpr, _super);
38202
    function LiteralExpr(value, type, sourceSpan) {
38203
        var _this = _super.call(this, type, sourceSpan) || this;
38204
        _this.value = value;
38205
        return _this;
38206
    }
38207
    LiteralExpr.prototype.isEquivalent = function (e) {
38208
        return e instanceof LiteralExpr && this.value === e.value;
38209
    };
38210
    LiteralExpr.prototype.isConstant = function () { return true; };
38211
    LiteralExpr.prototype.visitExpression = function (visitor, context) {
38212
        return visitor.visitLiteralExpr(this, context);
38213
    };
38214
    return LiteralExpr;
38215
}(Expression));
38216
var ExternalExpr = /** @class */ (function (_super) {
38217
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ExternalExpr, _super);
38218
    function ExternalExpr(value, type, typeParams, sourceSpan) {
38219
        if (typeParams === void 0) { typeParams = null; }
38220
        var _this = _super.call(this, type, sourceSpan) || this;
38221
        _this.value = value;
38222
        _this.typeParams = typeParams;
38223
        return _this;
38224
    }
38225
    ExternalExpr.prototype.isEquivalent = function (e) {
38226
        return e instanceof ExternalExpr && this.value.name === e.value.name &&
38227
            this.value.moduleName === e.value.moduleName && this.value.runtime === e.value.runtime;
38228
    };
38229
    ExternalExpr.prototype.isConstant = function () { return false; };
38230
    ExternalExpr.prototype.visitExpression = function (visitor, context) {
38231
        return visitor.visitExternalExpr(this, context);
38232
    };
38233
    return ExternalExpr;
38234
}(Expression));
38235
var ExternalReference = /** @class */ (function () {
38236
    function ExternalReference(moduleName, name, runtime) {
38237
        this.moduleName = moduleName;
38238
        this.name = name;
38239
        this.runtime = runtime;
38240
    }
38241
    return ExternalReference;
38242
}());
38243
var ConditionalExpr = /** @class */ (function (_super) {
38244
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ConditionalExpr, _super);
38245
    function ConditionalExpr(condition, trueCase, falseCase, type, sourceSpan) {
38246
        if (falseCase === void 0) { falseCase = null; }
38247
        var _this = _super.call(this, type || trueCase.type, sourceSpan) || this;
38248
        _this.condition = condition;
38249
        _this.falseCase = falseCase;
38250
        _this.trueCase = trueCase;
38251
        return _this;
38252
    }
38253
    ConditionalExpr.prototype.isEquivalent = function (e) {
38254
        return e instanceof ConditionalExpr && this.condition.isEquivalent(e.condition) &&
38255
            this.trueCase.isEquivalent(e.trueCase) && nullSafeIsEquivalent(this.falseCase, e.falseCase);
38256
    };
38257
    ConditionalExpr.prototype.isConstant = function () { return false; };
38258
    ConditionalExpr.prototype.visitExpression = function (visitor, context) {
38259
        return visitor.visitConditionalExpr(this, context);
38260
    };
38261
    return ConditionalExpr;
38262
}(Expression));
38263
var NotExpr = /** @class */ (function (_super) {
38264
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(NotExpr, _super);
38265
    function NotExpr(condition, sourceSpan) {
38266
        var _this = _super.call(this, BOOL_TYPE, sourceSpan) || this;
38267
        _this.condition = condition;
38268
        return _this;
38269
    }
38270
    NotExpr.prototype.isEquivalent = function (e) {
38271
        return e instanceof NotExpr && this.condition.isEquivalent(e.condition);
38272
    };
38273
    NotExpr.prototype.isConstant = function () { return false; };
38274
    NotExpr.prototype.visitExpression = function (visitor, context) {
38275
        return visitor.visitNotExpr(this, context);
38276
    };
38277
    return NotExpr;
38278
}(Expression));
38279
var AssertNotNull = /** @class */ (function (_super) {
38280
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(AssertNotNull, _super);
38281
    function AssertNotNull(condition, sourceSpan) {
38282
        var _this = _super.call(this, condition.type, sourceSpan) || this;
38283
        _this.condition = condition;
38284
        return _this;
38285
    }
38286
    AssertNotNull.prototype.isEquivalent = function (e) {
38287
        return e instanceof AssertNotNull && this.condition.isEquivalent(e.condition);
38288
    };
38289
    AssertNotNull.prototype.isConstant = function () { return false; };
38290
    AssertNotNull.prototype.visitExpression = function (visitor, context) {
38291
        return visitor.visitAssertNotNullExpr(this, context);
38292
    };
38293
    return AssertNotNull;
38294
}(Expression));
38295
var CastExpr = /** @class */ (function (_super) {
38296
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CastExpr, _super);
38297
    function CastExpr(value, type, sourceSpan) {
38298
        var _this = _super.call(this, type, sourceSpan) || this;
38299
        _this.value = value;
38300
        return _this;
38301
    }
38302
    CastExpr.prototype.isEquivalent = function (e) {
38303
        return e instanceof CastExpr && this.value.isEquivalent(e.value);
38304
    };
38305
    CastExpr.prototype.isConstant = function () { return false; };
38306
    CastExpr.prototype.visitExpression = function (visitor, context) {
38307
        return visitor.visitCastExpr(this, context);
38308
    };
38309
    return CastExpr;
38310
}(Expression));
38311
var FnParam = /** @class */ (function () {
38312
    function FnParam(name, type) {
38313
        if (type === void 0) { type = null; }
38314
        this.name = name;
38315
        this.type = type;
38316
    }
38317
    FnParam.prototype.isEquivalent = function (param) { return this.name === param.name; };
38318
    return FnParam;
38319
}());
38320
var FunctionExpr = /** @class */ (function (_super) {
38321
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FunctionExpr, _super);
38322
    function FunctionExpr(params, statements, type, sourceSpan, name) {
38323
        var _this = _super.call(this, type, sourceSpan) || this;
38324
        _this.params = params;
38325
        _this.statements = statements;
38326
        _this.name = name;
38327
        return _this;
38328
    }
38329
    FunctionExpr.prototype.isEquivalent = function (e) {
38330
        return e instanceof FunctionExpr && areAllEquivalent(this.params, e.params) &&
38331
            areAllEquivalent(this.statements, e.statements);
38332
    };
38333
    FunctionExpr.prototype.isConstant = function () { return false; };
38334
    FunctionExpr.prototype.visitExpression = function (visitor, context) {
38335
        return visitor.visitFunctionExpr(this, context);
38336
    };
38337
    FunctionExpr.prototype.toDeclStmt = function (name, modifiers) {
38338
        if (modifiers === void 0) { modifiers = null; }
38339
        return new DeclareFunctionStmt(name, this.params, this.statements, this.type, modifiers, this.sourceSpan);
38340
    };
38341
    return FunctionExpr;
38342
}(Expression));
38343
var BinaryOperatorExpr = /** @class */ (function (_super) {
38344
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(BinaryOperatorExpr, _super);
38345
    function BinaryOperatorExpr(operator, lhs, rhs, type, sourceSpan, parens) {
38346
        if (parens === void 0) { parens = true; }
38347
        var _this = _super.call(this, type || lhs.type, sourceSpan) || this;
38348
        _this.operator = operator;
38349
        _this.rhs = rhs;
38350
        _this.parens = parens;
38351
        _this.lhs = lhs;
38352
        return _this;
38353
    }
38354
    BinaryOperatorExpr.prototype.isEquivalent = function (e) {
38355
        return e instanceof BinaryOperatorExpr && this.operator === e.operator &&
38356
            this.lhs.isEquivalent(e.lhs) && this.rhs.isEquivalent(e.rhs);
38357
    };
38358
    BinaryOperatorExpr.prototype.isConstant = function () { return false; };
38359
    BinaryOperatorExpr.prototype.visitExpression = function (visitor, context) {
38360
        return visitor.visitBinaryOperatorExpr(this, context);
38361
    };
38362
    return BinaryOperatorExpr;
38363
}(Expression));
38364
var ReadPropExpr = /** @class */ (function (_super) {
38365
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ReadPropExpr, _super);
38366
    function ReadPropExpr(receiver, name, type, sourceSpan) {
38367
        var _this = _super.call(this, type, sourceSpan) || this;
38368
        _this.receiver = receiver;
38369
        _this.name = name;
38370
        return _this;
38371
    }
38372
    ReadPropExpr.prototype.isEquivalent = function (e) {
38373
        return e instanceof ReadPropExpr && this.receiver.isEquivalent(e.receiver) &&
38374
            this.name === e.name;
38375
    };
38376
    ReadPropExpr.prototype.isConstant = function () { return false; };
38377
    ReadPropExpr.prototype.visitExpression = function (visitor, context) {
38378
        return visitor.visitReadPropExpr(this, context);
38379
    };
38380
    ReadPropExpr.prototype.set = function (value) {
38381
        return new WritePropExpr(this.receiver, this.name, value, null, this.sourceSpan);
38382
    };
38383
    return ReadPropExpr;
38384
}(Expression));
38385
var ReadKeyExpr = /** @class */ (function (_super) {
38386
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ReadKeyExpr, _super);
38387
    function ReadKeyExpr(receiver, index, type, sourceSpan) {
38388
        var _this = _super.call(this, type, sourceSpan) || this;
38389
        _this.receiver = receiver;
38390
        _this.index = index;
38391
        return _this;
38392
    }
38393
    ReadKeyExpr.prototype.isEquivalent = function (e) {
38394
        return e instanceof ReadKeyExpr && this.receiver.isEquivalent(e.receiver) &&
38395
            this.index.isEquivalent(e.index);
38396
    };
38397
    ReadKeyExpr.prototype.isConstant = function () { return false; };
38398
    ReadKeyExpr.prototype.visitExpression = function (visitor, context) {
38399
        return visitor.visitReadKeyExpr(this, context);
38400
    };
38401
    ReadKeyExpr.prototype.set = function (value) {
38402
        return new WriteKeyExpr(this.receiver, this.index, value, null, this.sourceSpan);
38403
    };
38404
    return ReadKeyExpr;
38405
}(Expression));
38406
var LiteralArrayExpr = /** @class */ (function (_super) {
38407
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(LiteralArrayExpr, _super);
38408
    function LiteralArrayExpr(entries, type, sourceSpan) {
38409
        var _this = _super.call(this, type, sourceSpan) || this;
38410
        _this.entries = entries;
38411
        return _this;
38412
    }
38413
    LiteralArrayExpr.prototype.isConstant = function () { return this.entries.every(function (e) { return e.isConstant(); }); };
38414
    LiteralArrayExpr.prototype.isEquivalent = function (e) {
38415
        return e instanceof LiteralArrayExpr && areAllEquivalent(this.entries, e.entries);
38416
    };
38417
    LiteralArrayExpr.prototype.visitExpression = function (visitor, context) {
38418
        return visitor.visitLiteralArrayExpr(this, context);
38419
    };
38420
    return LiteralArrayExpr;
38421
}(Expression));
38422
var LiteralMapEntry = /** @class */ (function () {
38423
    function LiteralMapEntry(key, value, quoted) {
38424
        this.key = key;
38425
        this.value = value;
38426
        this.quoted = quoted;
38427
    }
38428
    LiteralMapEntry.prototype.isEquivalent = function (e) {
38429
        return this.key === e.key && this.value.isEquivalent(e.value);
38430
    };
38431
    return LiteralMapEntry;
38432
}());
38433
var LiteralMapExpr = /** @class */ (function (_super) {
38434
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(LiteralMapExpr, _super);
38435
    function LiteralMapExpr(entries, type, sourceSpan) {
38436
        var _this = _super.call(this, type, sourceSpan) || this;
38437
        _this.entries = entries;
38438
        _this.valueType = null;
38439
        if (type) {
38440
            _this.valueType = type.valueType;
38441
        }
38442
        return _this;
38443
    }
38444
    LiteralMapExpr.prototype.isEquivalent = function (e) {
38445
        return e instanceof LiteralMapExpr && areAllEquivalent(this.entries, e.entries);
38446
    };
38447
    LiteralMapExpr.prototype.isConstant = function () { return this.entries.every(function (e) { return e.value.isConstant(); }); };
38448
    LiteralMapExpr.prototype.visitExpression = function (visitor, context) {
38449
        return visitor.visitLiteralMapExpr(this, context);
38450
    };
38451
    return LiteralMapExpr;
38452
}(Expression));
38453
var CommaExpr = /** @class */ (function (_super) {
38454
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CommaExpr, _super);
38455
    function CommaExpr(parts, sourceSpan) {
38456
        var _this = _super.call(this, parts[parts.length - 1].type, sourceSpan) || this;
38457
        _this.parts = parts;
38458
        return _this;
38459
    }
38460
    CommaExpr.prototype.isEquivalent = function (e) {
38461
        return e instanceof CommaExpr && areAllEquivalent(this.parts, e.parts);
38462
    };
38463
    CommaExpr.prototype.isConstant = function () { return false; };
38464
    CommaExpr.prototype.visitExpression = function (visitor, context) {
38465
        return visitor.visitCommaExpr(this, context);
38466
    };
38467
    return CommaExpr;
38468
}(Expression));
38469
var THIS_EXPR = new ReadVarExpr(BuiltinVar.This, null, null);
38470
var SUPER_EXPR = new ReadVarExpr(BuiltinVar.Super, null, null);
38471
var CATCH_ERROR_VAR = new ReadVarExpr(BuiltinVar.CatchError, null, null);
38472
var CATCH_STACK_VAR = new ReadVarExpr(BuiltinVar.CatchStack, null, null);
38473
var NULL_EXPR = new LiteralExpr(null, null, null);
38474
var TYPED_NULL_EXPR = new LiteralExpr(null, INFERRED_TYPE, null);
38475
//// Statements
38476
var StmtModifier;
38477
(function (StmtModifier) {
38478
    StmtModifier[StmtModifier["Final"] = 0] = "Final";
38479
    StmtModifier[StmtModifier["Private"] = 1] = "Private";
38480
    StmtModifier[StmtModifier["Exported"] = 2] = "Exported";
38481
    StmtModifier[StmtModifier["Static"] = 3] = "Static";
38482
})(StmtModifier || (StmtModifier = {}));
38483
var Statement = /** @class */ (function () {
38484
    function Statement(modifiers, sourceSpan) {
38485
        this.modifiers = modifiers || [];
38486
        this.sourceSpan = sourceSpan || null;
38487
    }
38488
    Statement.prototype.hasModifier = function (modifier) { return this.modifiers.indexOf(modifier) !== -1; };
38489
    return Statement;
38490
}());
38491
var DeclareVarStmt = /** @class */ (function (_super) {
38492
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(DeclareVarStmt, _super);
38493
    function DeclareVarStmt(name, value, type, modifiers, sourceSpan) {
38494
        if (modifiers === void 0) { modifiers = null; }
38495
        var _this = _super.call(this, modifiers, sourceSpan) || this;
38496
        _this.name = name;
38497
        _this.value = value;
38498
        _this.type = type || (value && value.type) || null;
38499
        return _this;
38500
    }
38501
    DeclareVarStmt.prototype.isEquivalent = function (stmt) {
38502
        return stmt instanceof DeclareVarStmt && this.name === stmt.name &&
38503
            (this.value ? !!stmt.value && this.value.isEquivalent(stmt.value) : !stmt.value);
38504
    };
38505
    DeclareVarStmt.prototype.visitStatement = function (visitor, context) {
38506
        return visitor.visitDeclareVarStmt(this, context);
38507
    };
38508
    return DeclareVarStmt;
38509
}(Statement));
38510
var DeclareFunctionStmt = /** @class */ (function (_super) {
38511
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(DeclareFunctionStmt, _super);
38512
    function DeclareFunctionStmt(name, params, statements, type, modifiers, sourceSpan) {
38513
        if (modifiers === void 0) { modifiers = null; }
38514
        var _this = _super.call(this, modifiers, sourceSpan) || this;
38515
        _this.name = name;
38516
        _this.params = params;
38517
        _this.statements = statements;
38518
        _this.type = type || null;
38519
        return _this;
38520
    }
38521
    DeclareFunctionStmt.prototype.isEquivalent = function (stmt) {
38522
        return stmt instanceof DeclareFunctionStmt && areAllEquivalent(this.params, stmt.params) &&
38523
            areAllEquivalent(this.statements, stmt.statements);
38524
    };
38525
    DeclareFunctionStmt.prototype.visitStatement = function (visitor, context) {
38526
        return visitor.visitDeclareFunctionStmt(this, context);
38527
    };
38528
    return DeclareFunctionStmt;
38529
}(Statement));
38530
var ExpressionStatement = /** @class */ (function (_super) {
38531
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ExpressionStatement, _super);
38532
    function ExpressionStatement(expr, sourceSpan) {
38533
        var _this = _super.call(this, null, sourceSpan) || this;
38534
        _this.expr = expr;
38535
        return _this;
38536
    }
38537
    ExpressionStatement.prototype.isEquivalent = function (stmt) {
38538
        return stmt instanceof ExpressionStatement && this.expr.isEquivalent(stmt.expr);
38539
    };
38540
    ExpressionStatement.prototype.visitStatement = function (visitor, context) {
38541
        return visitor.visitExpressionStmt(this, context);
38542
    };
38543
    return ExpressionStatement;
38544
}(Statement));
38545
var ReturnStatement = /** @class */ (function (_super) {
38546
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ReturnStatement, _super);
38547
    function ReturnStatement(value, sourceSpan) {
38548
        var _this = _super.call(this, null, sourceSpan) || this;
38549
        _this.value = value;
38550
        return _this;
38551
    }
38552
    ReturnStatement.prototype.isEquivalent = function (stmt) {
38553
        return stmt instanceof ReturnStatement && this.value.isEquivalent(stmt.value);
38554
    };
38555
    ReturnStatement.prototype.visitStatement = function (visitor, context) {
38556
        return visitor.visitReturnStmt(this, context);
38557
    };
38558
    return ReturnStatement;
38559
}(Statement));
38560
var AbstractClassPart = /** @class */ (function () {
38561
    function AbstractClassPart(type, modifiers) {
38562
        this.modifiers = modifiers;
38563
        if (!modifiers) {
38564
            this.modifiers = [];
38565
        }
38566
        this.type = type || null;
38567
    }
38568
    AbstractClassPart.prototype.hasModifier = function (modifier) { return this.modifiers.indexOf(modifier) !== -1; };
38569
    return AbstractClassPart;
38570
}());
38571
var ClassField = /** @class */ (function (_super) {
38572
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ClassField, _super);
38573
    function ClassField(name, type, modifiers, initializer) {
38574
        if (modifiers === void 0) { modifiers = null; }
38575
        var _this = _super.call(this, type, modifiers) || this;
38576
        _this.name = name;
38577
        _this.initializer = initializer;
38578
        return _this;
38579
    }
38580
    ClassField.prototype.isEquivalent = function (f) { return this.name === f.name; };
38581
    return ClassField;
38582
}(AbstractClassPart));
38583
var ClassMethod = /** @class */ (function (_super) {
38584
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ClassMethod, _super);
38585
    function ClassMethod(name, params, body, type, modifiers) {
38586
        if (modifiers === void 0) { modifiers = null; }
38587
        var _this = _super.call(this, type, modifiers) || this;
38588
        _this.name = name;
38589
        _this.params = params;
38590
        _this.body = body;
38591
        return _this;
38592
    }
38593
    ClassMethod.prototype.isEquivalent = function (m) {
38594
        return this.name === m.name && areAllEquivalent(this.body, m.body);
38595
    };
38596
    return ClassMethod;
38597
}(AbstractClassPart));
38598
var ClassGetter = /** @class */ (function (_super) {
38599
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ClassGetter, _super);
38600
    function ClassGetter(name, body, type, modifiers) {
38601
        if (modifiers === void 0) { modifiers = null; }
38602
        var _this = _super.call(this, type, modifiers) || this;
38603
        _this.name = name;
38604
        _this.body = body;
38605
        return _this;
38606
    }
38607
    ClassGetter.prototype.isEquivalent = function (m) {
38608
        return this.name === m.name && areAllEquivalent(this.body, m.body);
38609
    };
38610
    return ClassGetter;
38611
}(AbstractClassPart));
38612
var ClassStmt = /** @class */ (function (_super) {
38613
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ClassStmt, _super);
38614
    function ClassStmt(name, parent, fields, getters, constructorMethod, methods, modifiers, sourceSpan) {
38615
        if (modifiers === void 0) { modifiers = null; }
38616
        var _this = _super.call(this, modifiers, sourceSpan) || this;
38617
        _this.name = name;
38618
        _this.parent = parent;
38619
        _this.fields = fields;
38620
        _this.getters = getters;
38621
        _this.constructorMethod = constructorMethod;
38622
        _this.methods = methods;
38623
        return _this;
38624
    }
38625
    ClassStmt.prototype.isEquivalent = function (stmt) {
38626
        return stmt instanceof ClassStmt && this.name === stmt.name &&
38627
            nullSafeIsEquivalent(this.parent, stmt.parent) &&
38628
            areAllEquivalent(this.fields, stmt.fields) &&
38629
            areAllEquivalent(this.getters, stmt.getters) &&
38630
            this.constructorMethod.isEquivalent(stmt.constructorMethod) &&
38631
            areAllEquivalent(this.methods, stmt.methods);
38632
    };
38633
    ClassStmt.prototype.visitStatement = function (visitor, context) {
38634
        return visitor.visitDeclareClassStmt(this, context);
38635
    };
38636
    return ClassStmt;
38637
}(Statement));
38638
var IfStmt = /** @class */ (function (_super) {
38639
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(IfStmt, _super);
38640
    function IfStmt(condition, trueCase, falseCase, sourceSpan) {
38641
        if (falseCase === void 0) { falseCase = []; }
38642
        var _this = _super.call(this, null, sourceSpan) || this;
38643
        _this.condition = condition;
38644
        _this.trueCase = trueCase;
38645
        _this.falseCase = falseCase;
38646
        return _this;
38647
    }
38648
    IfStmt.prototype.isEquivalent = function (stmt) {
38649
        return stmt instanceof IfStmt && this.condition.isEquivalent(stmt.condition) &&
38650
            areAllEquivalent(this.trueCase, stmt.trueCase) &&
38651
            areAllEquivalent(this.falseCase, stmt.falseCase);
38652
    };
38653
    IfStmt.prototype.visitStatement = function (visitor, context) {
38654
        return visitor.visitIfStmt(this, context);
38655
    };
38656
    return IfStmt;
38657
}(Statement));
38658
var CommentStmt = /** @class */ (function (_super) {
38659
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CommentStmt, _super);
38660
    function CommentStmt(comment, multiline, sourceSpan) {
38661
        if (multiline === void 0) { multiline = false; }
38662
        var _this = _super.call(this, null, sourceSpan) || this;
38663
        _this.comment = comment;
38664
        _this.multiline = multiline;
38665
        return _this;
38666
    }
38667
    CommentStmt.prototype.isEquivalent = function (stmt) { return stmt instanceof CommentStmt; };
38668
    CommentStmt.prototype.visitStatement = function (visitor, context) {
38669
        return visitor.visitCommentStmt(this, context);
38670
    };
38671
    return CommentStmt;
38672
}(Statement));
38673
var JSDocCommentStmt = /** @class */ (function (_super) {
38674
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(JSDocCommentStmt, _super);
38675
    function JSDocCommentStmt(tags, sourceSpan) {
38676
        if (tags === void 0) { tags = []; }
38677
        var _this = _super.call(this, null, sourceSpan) || this;
38678
        _this.tags = tags;
38679
        return _this;
38680
    }
38681
    JSDocCommentStmt.prototype.isEquivalent = function (stmt) {
38682
        return stmt instanceof JSDocCommentStmt && this.toString() === stmt.toString();
38683
    };
38684
    JSDocCommentStmt.prototype.visitStatement = function (visitor, context) {
38685
        return visitor.visitJSDocCommentStmt(this, context);
38686
    };
38687
    JSDocCommentStmt.prototype.toString = function () { return serializeTags(this.tags); };
38688
    return JSDocCommentStmt;
38689
}(Statement));
38690
var TryCatchStmt = /** @class */ (function (_super) {
38691
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TryCatchStmt, _super);
38692
    function TryCatchStmt(bodyStmts, catchStmts, sourceSpan) {
38693
        var _this = _super.call(this, null, sourceSpan) || this;
38694
        _this.bodyStmts = bodyStmts;
38695
        _this.catchStmts = catchStmts;
38696
        return _this;
38697
    }
38698
    TryCatchStmt.prototype.isEquivalent = function (stmt) {
38699
        return stmt instanceof TryCatchStmt && areAllEquivalent(this.bodyStmts, stmt.bodyStmts) &&
38700
            areAllEquivalent(this.catchStmts, stmt.catchStmts);
38701
    };
38702
    TryCatchStmt.prototype.visitStatement = function (visitor, context) {
38703
        return visitor.visitTryCatchStmt(this, context);
38704
    };
38705
    return TryCatchStmt;
38706
}(Statement));
38707
var ThrowStmt = /** @class */ (function (_super) {
38708
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ThrowStmt, _super);
38709
    function ThrowStmt(error, sourceSpan) {
38710
        var _this = _super.call(this, null, sourceSpan) || this;
38711
        _this.error = error;
38712
        return _this;
38713
    }
38714
    ThrowStmt.prototype.isEquivalent = function (stmt) {
38715
        return stmt instanceof TryCatchStmt && this.error.isEquivalent(stmt.error);
38716
    };
38717
    ThrowStmt.prototype.visitStatement = function (visitor, context) {
38718
        return visitor.visitThrowStmt(this, context);
38719
    };
38720
    return ThrowStmt;
38721
}(Statement));
38722
var AstTransformer$1 = /** @class */ (function () {
38723
    function AstTransformer() {
38724
    }
38725
    AstTransformer.prototype.transformExpr = function (expr, context) { return expr; };
38726
    AstTransformer.prototype.transformStmt = function (stmt, context) { return stmt; };
38727
    AstTransformer.prototype.visitReadVarExpr = function (ast, context) { return this.transformExpr(ast, context); };
38728
    AstTransformer.prototype.visitWriteVarExpr = function (expr, context) {
38729
        return this.transformExpr(new WriteVarExpr(expr.name, expr.value.visitExpression(this, context), expr.type, expr.sourceSpan), context);
38730
    };
38731
    AstTransformer.prototype.visitWriteKeyExpr = function (expr, context) {
38732
        return this.transformExpr(new WriteKeyExpr(expr.receiver.visitExpression(this, context), expr.index.visitExpression(this, context), expr.value.visitExpression(this, context), expr.type, expr.sourceSpan), context);
38733
    };
38734
    AstTransformer.prototype.visitWritePropExpr = function (expr, context) {
38735
        return this.transformExpr(new WritePropExpr(expr.receiver.visitExpression(this, context), expr.name, expr.value.visitExpression(this, context), expr.type, expr.sourceSpan), context);
38736
    };
38737
    AstTransformer.prototype.visitInvokeMethodExpr = function (ast, context) {
38738
        var method = ast.builtin || ast.name;
38739
        return this.transformExpr(new InvokeMethodExpr(ast.receiver.visitExpression(this, context), method, this.visitAllExpressions(ast.args, context), ast.type, ast.sourceSpan), context);
38740
    };
38741
    AstTransformer.prototype.visitInvokeFunctionExpr = function (ast, context) {
38742
        return this.transformExpr(new InvokeFunctionExpr(ast.fn.visitExpression(this, context), this.visitAllExpressions(ast.args, context), ast.type, ast.sourceSpan), context);
38743
    };
38744
    AstTransformer.prototype.visitInstantiateExpr = function (ast, context) {
38745
        return this.transformExpr(new InstantiateExpr(ast.classExpr.visitExpression(this, context), this.visitAllExpressions(ast.args, context), ast.type, ast.sourceSpan), context);
38746
    };
38747
    AstTransformer.prototype.visitLiteralExpr = function (ast, context) { return this.transformExpr(ast, context); };
38748
    AstTransformer.prototype.visitExternalExpr = function (ast, context) {
38749
        return this.transformExpr(ast, context);
38750
    };
38751
    AstTransformer.prototype.visitConditionalExpr = function (ast, context) {
38752
        return this.transformExpr(new ConditionalExpr(ast.condition.visitExpression(this, context), ast.trueCase.visitExpression(this, context), ast.falseCase.visitExpression(this, context), ast.type, ast.sourceSpan), context);
38753
    };
38754
    AstTransformer.prototype.visitNotExpr = function (ast, context) {
38755
        return this.transformExpr(new NotExpr(ast.condition.visitExpression(this, context), ast.sourceSpan), context);
38756
    };
38757
    AstTransformer.prototype.visitAssertNotNullExpr = function (ast, context) {
38758
        return this.transformExpr(new AssertNotNull(ast.condition.visitExpression(this, context), ast.sourceSpan), context);
38759
    };
38760
    AstTransformer.prototype.visitCastExpr = function (ast, context) {
38761
        return this.transformExpr(new CastExpr(ast.value.visitExpression(this, context), ast.type, ast.sourceSpan), context);
38762
    };
38763
    AstTransformer.prototype.visitFunctionExpr = function (ast, context) {
38764
        return this.transformExpr(new FunctionExpr(ast.params, this.visitAllStatements(ast.statements, context), ast.type, ast.sourceSpan), context);
38765
    };
38766
    AstTransformer.prototype.visitBinaryOperatorExpr = function (ast, context) {
38767
        return this.transformExpr(new BinaryOperatorExpr(ast.operator, ast.lhs.visitExpression(this, context), ast.rhs.visitExpression(this, context), ast.type, ast.sourceSpan), context);
38768
    };
38769
    AstTransformer.prototype.visitReadPropExpr = function (ast, context) {
38770
        return this.transformExpr(new ReadPropExpr(ast.receiver.visitExpression(this, context), ast.name, ast.type, ast.sourceSpan), context);
38771
    };
38772
    AstTransformer.prototype.visitReadKeyExpr = function (ast, context) {
38773
        return this.transformExpr(new ReadKeyExpr(ast.receiver.visitExpression(this, context), ast.index.visitExpression(this, context), ast.type, ast.sourceSpan), context);
38774
    };
38775
    AstTransformer.prototype.visitLiteralArrayExpr = function (ast, context) {
38776
        return this.transformExpr(new LiteralArrayExpr(this.visitAllExpressions(ast.entries, context), ast.type, ast.sourceSpan), context);
38777
    };
38778
    AstTransformer.prototype.visitLiteralMapExpr = function (ast, context) {
38779
        var _this = this;
38780
        var entries = ast.entries.map(function (entry) { return new LiteralMapEntry(entry.key, entry.value.visitExpression(_this, context), entry.quoted); });
38781
        var mapType = new MapType(ast.valueType, null);
38782
        return this.transformExpr(new LiteralMapExpr(entries, mapType, ast.sourceSpan), context);
38783
    };
38784
    AstTransformer.prototype.visitCommaExpr = function (ast, context) {
38785
        return this.transformExpr(new CommaExpr(this.visitAllExpressions(ast.parts, context), ast.sourceSpan), context);
38786
    };
38787
    AstTransformer.prototype.visitAllExpressions = function (exprs, context) {
38788
        var _this = this;
38789
        return exprs.map(function (expr) { return expr.visitExpression(_this, context); });
38790
    };
38791
    AstTransformer.prototype.visitDeclareVarStmt = function (stmt, context) {
38792
        var value = stmt.value && stmt.value.visitExpression(this, context);
38793
        return this.transformStmt(new DeclareVarStmt(stmt.name, value, stmt.type, stmt.modifiers, stmt.sourceSpan), context);
38794
    };
38795
    AstTransformer.prototype.visitDeclareFunctionStmt = function (stmt, context) {
38796
        return this.transformStmt(new DeclareFunctionStmt(stmt.name, stmt.params, this.visitAllStatements(stmt.statements, context), stmt.type, stmt.modifiers, stmt.sourceSpan), context);
38797
    };
38798
    AstTransformer.prototype.visitExpressionStmt = function (stmt, context) {
38799
        return this.transformStmt(new ExpressionStatement(stmt.expr.visitExpression(this, context), stmt.sourceSpan), context);
38800
    };
38801
    AstTransformer.prototype.visitReturnStmt = function (stmt, context) {
38802
        return this.transformStmt(new ReturnStatement(stmt.value.visitExpression(this, context), stmt.sourceSpan), context);
38803
    };
38804
    AstTransformer.prototype.visitDeclareClassStmt = function (stmt, context) {
38805
        var _this = this;
38806
        var parent = stmt.parent.visitExpression(this, context);
38807
        var getters = stmt.getters.map(function (getter) { return new ClassGetter(getter.name, _this.visitAllStatements(getter.body, context), getter.type, getter.modifiers); });
38808
        var ctorMethod = stmt.constructorMethod &&
38809
            new ClassMethod(stmt.constructorMethod.name, stmt.constructorMethod.params, this.visitAllStatements(stmt.constructorMethod.body, context), stmt.constructorMethod.type, stmt.constructorMethod.modifiers);
38810
        var methods = stmt.methods.map(function (method) { return new ClassMethod(method.name, method.params, _this.visitAllStatements(method.body, context), method.type, method.modifiers); });
38811
        return this.transformStmt(new ClassStmt(stmt.name, parent, stmt.fields, getters, ctorMethod, methods, stmt.modifiers, stmt.sourceSpan), context);
38812
    };
38813
    AstTransformer.prototype.visitIfStmt = function (stmt, context) {
38814
        return this.transformStmt(new IfStmt(stmt.condition.visitExpression(this, context), this.visitAllStatements(stmt.trueCase, context), this.visitAllStatements(stmt.falseCase, context), stmt.sourceSpan), context);
38815
    };
38816
    AstTransformer.prototype.visitTryCatchStmt = function (stmt, context) {
38817
        return this.transformStmt(new TryCatchStmt(this.visitAllStatements(stmt.bodyStmts, context), this.visitAllStatements(stmt.catchStmts, context), stmt.sourceSpan), context);
38818
    };
38819
    AstTransformer.prototype.visitThrowStmt = function (stmt, context) {
38820
        return this.transformStmt(new ThrowStmt(stmt.error.visitExpression(this, context), stmt.sourceSpan), context);
38821
    };
38822
    AstTransformer.prototype.visitCommentStmt = function (stmt, context) {
38823
        return this.transformStmt(stmt, context);
38824
    };
38825
    AstTransformer.prototype.visitJSDocCommentStmt = function (stmt, context) {
38826
        return this.transformStmt(stmt, context);
38827
    };
38828
    AstTransformer.prototype.visitAllStatements = function (stmts, context) {
38829
        var _this = this;
38830
        return stmts.map(function (stmt) { return stmt.visitStatement(_this, context); });
38831
    };
38832
    return AstTransformer;
38833
}());
38834
var RecursiveAstVisitor$1 = /** @class */ (function () {
38835
    function RecursiveAstVisitor() {
38836
    }
38837
    RecursiveAstVisitor.prototype.visitType = function (ast, context) { return ast; };
38838
    RecursiveAstVisitor.prototype.visitExpression = function (ast, context) {
38839
        if (ast.type) {
38840
            ast.type.visitType(this, context);
38841
        }
38842
        return ast;
38843
    };
38844
    RecursiveAstVisitor.prototype.visitBuiltinType = function (type, context) { return this.visitType(type, context); };
38845
    RecursiveAstVisitor.prototype.visitExpressionType = function (type, context) {
38846
        type.value.visitExpression(this, context);
38847
        return this.visitType(type, context);
38848
    };
38849
    RecursiveAstVisitor.prototype.visitArrayType = function (type, context) { return this.visitType(type, context); };
38850
    RecursiveAstVisitor.prototype.visitMapType = function (type, context) { return this.visitType(type, context); };
38851
    RecursiveAstVisitor.prototype.visitReadVarExpr = function (ast, context) {
38852
        return this.visitExpression(ast, context);
38853
    };
38854
    RecursiveAstVisitor.prototype.visitWriteVarExpr = function (ast, context) {
38855
        ast.value.visitExpression(this, context);
38856
        return this.visitExpression(ast, context);
38857
    };
38858
    RecursiveAstVisitor.prototype.visitWriteKeyExpr = function (ast, context) {
38859
        ast.receiver.visitExpression(this, context);
38860
        ast.index.visitExpression(this, context);
38861
        ast.value.visitExpression(this, context);
38862
        return this.visitExpression(ast, context);
38863
    };
38864
    RecursiveAstVisitor.prototype.visitWritePropExpr = function (ast, context) {
38865
        ast.receiver.visitExpression(this, context);
38866
        ast.value.visitExpression(this, context);
38867
        return this.visitExpression(ast, context);
38868
    };
38869
    RecursiveAstVisitor.prototype.visitInvokeMethodExpr = function (ast, context) {
38870
        ast.receiver.visitExpression(this, context);
38871
        this.visitAllExpressions(ast.args, context);
38872
        return this.visitExpression(ast, context);
38873
    };
38874
    RecursiveAstVisitor.prototype.visitInvokeFunctionExpr = function (ast, context) {
38875
        ast.fn.visitExpression(this, context);
38876
        this.visitAllExpressions(ast.args, context);
38877
        return this.visitExpression(ast, context);
38878
    };
38879
    RecursiveAstVisitor.prototype.visitInstantiateExpr = function (ast, context) {
38880
        ast.classExpr.visitExpression(this, context);
38881
        this.visitAllExpressions(ast.args, context);
38882
        return this.visitExpression(ast, context);
38883
    };
38884
    RecursiveAstVisitor.prototype.visitLiteralExpr = function (ast, context) {
38885
        return this.visitExpression(ast, context);
38886
    };
38887
    RecursiveAstVisitor.prototype.visitExternalExpr = function (ast, context) {
38888
        var _this = this;
38889
        if (ast.typeParams) {
38890
            ast.typeParams.forEach(function (type) { return type.visitType(_this, context); });
38891
        }
38892
        return this.visitExpression(ast, context);
38893
    };
38894
    RecursiveAstVisitor.prototype.visitConditionalExpr = function (ast, context) {
38895
        ast.condition.visitExpression(this, context);
38896
        ast.trueCase.visitExpression(this, context);
38897
        ast.falseCase.visitExpression(this, context);
38898
        return this.visitExpression(ast, context);
38899
    };
38900
    RecursiveAstVisitor.prototype.visitNotExpr = function (ast, context) {
38901
        ast.condition.visitExpression(this, context);
38902
        return this.visitExpression(ast, context);
38903
    };
38904
    RecursiveAstVisitor.prototype.visitAssertNotNullExpr = function (ast, context) {
38905
        ast.condition.visitExpression(this, context);
38906
        return this.visitExpression(ast, context);
38907
    };
38908
    RecursiveAstVisitor.prototype.visitCastExpr = function (ast, context) {
38909
        ast.value.visitExpression(this, context);
38910
        return this.visitExpression(ast, context);
38911
    };
38912
    RecursiveAstVisitor.prototype.visitFunctionExpr = function (ast, context) {
38913
        this.visitAllStatements(ast.statements, context);
38914
        return this.visitExpression(ast, context);
38915
    };
38916
    RecursiveAstVisitor.prototype.visitBinaryOperatorExpr = function (ast, context) {
38917
        ast.lhs.visitExpression(this, context);
38918
        ast.rhs.visitExpression(this, context);
38919
        return this.visitExpression(ast, context);
38920
    };
38921
    RecursiveAstVisitor.prototype.visitReadPropExpr = function (ast, context) {
38922
        ast.receiver.visitExpression(this, context);
38923
        return this.visitExpression(ast, context);
38924
    };
38925
    RecursiveAstVisitor.prototype.visitReadKeyExpr = function (ast, context) {
38926
        ast.receiver.visitExpression(this, context);
38927
        ast.index.visitExpression(this, context);
38928
        return this.visitExpression(ast, context);
38929
    };
38930
    RecursiveAstVisitor.prototype.visitLiteralArrayExpr = function (ast, context) {
38931
        this.visitAllExpressions(ast.entries, context);
38932
        return this.visitExpression(ast, context);
38933
    };
38934
    RecursiveAstVisitor.prototype.visitLiteralMapExpr = function (ast, context) {
38935
        var _this = this;
38936
        ast.entries.forEach(function (entry) { return entry.value.visitExpression(_this, context); });
38937
        return this.visitExpression(ast, context);
38938
    };
38939
    RecursiveAstVisitor.prototype.visitCommaExpr = function (ast, context) {
38940
        this.visitAllExpressions(ast.parts, context);
38941
        return this.visitExpression(ast, context);
38942
    };
38943
    RecursiveAstVisitor.prototype.visitAllExpressions = function (exprs, context) {
38944
        var _this = this;
38945
        exprs.forEach(function (expr) { return expr.visitExpression(_this, context); });
38946
    };
38947
    RecursiveAstVisitor.prototype.visitDeclareVarStmt = function (stmt, context) {
38948
        if (stmt.value) {
38949
            stmt.value.visitExpression(this, context);
38950
        }
38951
        if (stmt.type) {
38952
            stmt.type.visitType(this, context);
38953
        }
38954
        return stmt;
38955
    };
38956
    RecursiveAstVisitor.prototype.visitDeclareFunctionStmt = function (stmt, context) {
38957
        this.visitAllStatements(stmt.statements, context);
38958
        if (stmt.type) {
38959
            stmt.type.visitType(this, context);
38960
        }
38961
        return stmt;
38962
    };
38963
    RecursiveAstVisitor.prototype.visitExpressionStmt = function (stmt, context) {
38964
        stmt.expr.visitExpression(this, context);
38965
        return stmt;
38966
    };
38967
    RecursiveAstVisitor.prototype.visitReturnStmt = function (stmt, context) {
38968
        stmt.value.visitExpression(this, context);
38969
        return stmt;
38970
    };
38971
    RecursiveAstVisitor.prototype.visitDeclareClassStmt = function (stmt, context) {
38972
        var _this = this;
38973
        stmt.parent.visitExpression(this, context);
38974
        stmt.getters.forEach(function (getter) { return _this.visitAllStatements(getter.body, context); });
38975
        if (stmt.constructorMethod) {
38976
            this.visitAllStatements(stmt.constructorMethod.body, context);
38977
        }
38978
        stmt.methods.forEach(function (method) { return _this.visitAllStatements(method.body, context); });
38979
        return stmt;
38980
    };
38981
    RecursiveAstVisitor.prototype.visitIfStmt = function (stmt, context) {
38982
        stmt.condition.visitExpression(this, context);
38983
        this.visitAllStatements(stmt.trueCase, context);
38984
        this.visitAllStatements(stmt.falseCase, context);
38985
        return stmt;
38986
    };
38987
    RecursiveAstVisitor.prototype.visitTryCatchStmt = function (stmt, context) {
38988
        this.visitAllStatements(stmt.bodyStmts, context);
38989
        this.visitAllStatements(stmt.catchStmts, context);
38990
        return stmt;
38991
    };
38992
    RecursiveAstVisitor.prototype.visitThrowStmt = function (stmt, context) {
38993
        stmt.error.visitExpression(this, context);
38994
        return stmt;
38995
    };
38996
    RecursiveAstVisitor.prototype.visitCommentStmt = function (stmt, context) { return stmt; };
38997
    RecursiveAstVisitor.prototype.visitJSDocCommentStmt = function (stmt, context) { return stmt; };
38998
    RecursiveAstVisitor.prototype.visitAllStatements = function (stmts, context) {
38999
        var _this = this;
39000
        stmts.forEach(function (stmt) { return stmt.visitStatement(_this, context); });
39001
    };
39002
    return RecursiveAstVisitor;
39003
}());
39004
function findReadVarNames(stmts) {
39005
    var visitor = new _ReadVarVisitor();
39006
    visitor.visitAllStatements(stmts, null);
39007
    return visitor.varNames;
39008
}
39009
var _ReadVarVisitor = /** @class */ (function (_super) {
39010
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(_ReadVarVisitor, _super);
39011
    function _ReadVarVisitor() {
39012
        var _this = _super !== null && _super.apply(this, arguments) || this;
39013
        _this.varNames = new Set();
39014
        return _this;
39015
    }
39016
    _ReadVarVisitor.prototype.visitDeclareFunctionStmt = function (stmt, context) {
39017
        // Don't descend into nested functions
39018
        return stmt;
39019
    };
39020
    _ReadVarVisitor.prototype.visitDeclareClassStmt = function (stmt, context) {
39021
        // Don't descend into nested classes
39022
        return stmt;
39023
    };
39024
    _ReadVarVisitor.prototype.visitReadVarExpr = function (ast, context) {
39025
        if (ast.name) {
39026
            this.varNames.add(ast.name);
39027
        }
39028
        return null;
39029
    };
39030
    return _ReadVarVisitor;
39031
}(RecursiveAstVisitor$1));
39032
function collectExternalReferences(stmts) {
39033
    var visitor = new _FindExternalReferencesVisitor();
39034
    visitor.visitAllStatements(stmts, null);
39035
    return visitor.externalReferences;
39036
}
39037
var _FindExternalReferencesVisitor = /** @class */ (function (_super) {
39038
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(_FindExternalReferencesVisitor, _super);
39039
    function _FindExternalReferencesVisitor() {
39040
        var _this = _super !== null && _super.apply(this, arguments) || this;
39041
        _this.externalReferences = [];
39042
        return _this;
39043
    }
39044
    _FindExternalReferencesVisitor.prototype.visitExternalExpr = function (e, context) {
39045
        this.externalReferences.push(e.value);
39046
        return _super.prototype.visitExternalExpr.call(this, e, context);
39047
    };
39048
    return _FindExternalReferencesVisitor;
39049
}(RecursiveAstVisitor$1));
39050
function applySourceSpanToStatementIfNeeded(stmt, sourceSpan) {
39051
    if (!sourceSpan) {
39052
        return stmt;
39053
    }
39054
    var transformer = new _ApplySourceSpanTransformer(sourceSpan);
39055
    return stmt.visitStatement(transformer, null);
39056
}
39057
function applySourceSpanToExpressionIfNeeded(expr, sourceSpan) {
39058
    if (!sourceSpan) {
39059
        return expr;
39060
    }
39061
    var transformer = new _ApplySourceSpanTransformer(sourceSpan);
39062
    return expr.visitExpression(transformer, null);
39063
}
39064
var _ApplySourceSpanTransformer = /** @class */ (function (_super) {
39065
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(_ApplySourceSpanTransformer, _super);
39066
    function _ApplySourceSpanTransformer(sourceSpan) {
39067
        var _this = _super.call(this) || this;
39068
        _this.sourceSpan = sourceSpan;
39069
        return _this;
39070
    }
39071
    _ApplySourceSpanTransformer.prototype._clone = function (obj) {
39072
        var clone = Object.create(obj.constructor.prototype);
39073
        for (var prop in obj) {
39074
            clone[prop] = obj[prop];
39075
        }
39076
        return clone;
39077
    };
39078
    _ApplySourceSpanTransformer.prototype.transformExpr = function (expr, context) {
39079
        if (!expr.sourceSpan) {
39080
            expr = this._clone(expr);
39081
            expr.sourceSpan = this.sourceSpan;
39082
        }
39083
        return expr;
39084
    };
39085
    _ApplySourceSpanTransformer.prototype.transformStmt = function (stmt, context) {
39086
        if (!stmt.sourceSpan) {
39087
            stmt = this._clone(stmt);
39088
            stmt.sourceSpan = this.sourceSpan;
39089
        }
39090
        return stmt;
39091
    };
39092
    return _ApplySourceSpanTransformer;
39093
}(AstTransformer$1));
39094
function variable(name, type, sourceSpan) {
39095
    return new ReadVarExpr(name, type, sourceSpan);
39096
}
39097
function importExpr(id, typeParams, sourceSpan) {
39098
    if (typeParams === void 0) { typeParams = null; }
39099
    return new ExternalExpr(id, null, typeParams, sourceSpan);
39100
}
39101
function importType(id, typeParams, typeModifiers) {
39102
    if (typeParams === void 0) { typeParams = null; }
39103
    if (typeModifiers === void 0) { typeModifiers = null; }
39104
    return id != null ? expressionType(importExpr(id, typeParams, null), typeModifiers) : null;
39105
}
39106
function expressionType(expr, typeModifiers) {
39107
    if (typeModifiers === void 0) { typeModifiers = null; }
39108
    return new ExpressionType(expr, typeModifiers);
39109
}
39110
function literalArr(values, type, sourceSpan) {
39111
    return new LiteralArrayExpr(values, type, sourceSpan);
39112
}
39113
function literalMap(values, type) {
39114
    if (type === void 0) { type = null; }
39115
    return new LiteralMapExpr(values.map(function (e) { return new LiteralMapEntry(e.key, e.value, e.quoted); }), type, null);
39116
}
39117
function not(expr, sourceSpan) {
39118
    return new NotExpr(expr, sourceSpan);
39119
}
39120
function assertNotNull(expr, sourceSpan) {
39121
    return new AssertNotNull(expr, sourceSpan);
39122
}
39123
function fn(params, body, type, sourceSpan, name) {
39124
    return new FunctionExpr(params, body, type, sourceSpan, name);
39125
}
39126
function ifStmt(condition, thenClause, elseClause) {
39127
    return new IfStmt(condition, thenClause, elseClause);
39128
}
39129
function literal(value, type, sourceSpan) {
39130
    return new LiteralExpr(value, type, sourceSpan);
39131
}
39132
function isNull(exp) {
39133
    return exp instanceof LiteralExpr && exp.value === null;
39134
}
39135
/*
39136
 * Serializes a `Tag` into a string.
39137
 * Returns a string like " @foo {bar} baz" (note the leading whitespace before `@foo`).
39138
 */
39139
function tagToString(tag) {
39140
    var out = '';
39141
    if (tag.tagName) {
39142
        out += " @" + tag.tagName;
39143
    }
39144
    if (tag.text) {
39145
        if (tag.text.match(/\/\*|\*\//)) {
39146
            throw new Error('JSDoc text cannot contain "/*" and "*/"');
39147
        }
39148
        out += ' ' + tag.text.replace(/@/g, '\\@');
39149
    }
39150
    return out;
39151
}
39152
function serializeTags(tags) {
39153
    if (tags.length === 0)
39154
        return '';
39155
    var out = '*\n';
39156
    try {
39157
        for (var tags_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(tags), tags_1_1 = tags_1.next(); !tags_1_1.done; tags_1_1 = tags_1.next()) {
39158
            var tag = tags_1_1.value;
39159
            out += ' *';
39160
            // If the tagToString is multi-line, insert " * " prefixes on subsequent lines.
39161
            out += tagToString(tag).replace(/\n/g, '\n * ');
39162
            out += '\n';
39163
        }
39164
    }
39165
    catch (e_1_1) { e_1 = { error: e_1_1 }; }
39166
    finally {
39167
        try {
39168
            if (tags_1_1 && !tags_1_1.done && (_a = tags_1.return)) _a.call(tags_1);
39169
        }
39170
        finally { if (e_1) throw e_1.error; }
39171
    }
39172
    out += ' ';
39173
    return out;
39174
    var e_1, _a;
39175
}
39176
 
39177
/**
39178
 * @license
39179
 * Copyright Google Inc. All Rights Reserved.
39180
 *
39181
 * Use of this source code is governed by an MIT-style license that can be
39182
 * found in the LICENSE file at https://angular.io/license
39183
 */
39184
var QUOTED_KEYS = '$quoted$';
39185
function convertValueToOutputAst(ctx, value, type) {
39186
    if (type === void 0) { type = null; }
39187
    return visitValue(value, new _ValueOutputAstTransformer(ctx), type);
39188
}
39189
var _ValueOutputAstTransformer = /** @class */ (function () {
39190
    function _ValueOutputAstTransformer(ctx) {
39191
        this.ctx = ctx;
39192
    }
39193
    _ValueOutputAstTransformer.prototype.visitArray = function (arr, type) {
39194
        var _this = this;
39195
        return literalArr(arr.map(function (value) { return visitValue(value, _this, null); }), type);
39196
    };
39197
    _ValueOutputAstTransformer.prototype.visitStringMap = function (map, type) {
39198
        var _this = this;
39199
        var entries = [];
39200
        var quotedSet = new Set(map && map[QUOTED_KEYS]);
39201
        Object.keys(map).forEach(function (key) {
39202
            entries.push(new LiteralMapEntry(key, visitValue(map[key], _this, null), quotedSet.has(key)));
39203
        });
39204
        return new LiteralMapExpr(entries, type);
39205
    };
39206
    _ValueOutputAstTransformer.prototype.visitPrimitive = function (value, type) { return literal(value, type); };
39207
    _ValueOutputAstTransformer.prototype.visitOther = function (value, type) {
39208
        if (value instanceof Expression) {
39209
            return value;
39210
        }
39211
        else {
39212
            return this.ctx.importExpr(value);
39213
        }
39214
    };
39215
    return _ValueOutputAstTransformer;
39216
}());
39217
 
39218
/**
39219
 * @license
39220
 * Copyright Google Inc. All Rights Reserved.
39221
 *
39222
 * Use of this source code is governed by an MIT-style license that can be
39223
 * found in the LICENSE file at https://angular.io/license
39224
 */
39225
function mapEntry(key, value) {
39226
    return { key: key, value: value, quoted: false };
39227
}
39228
var InjectableCompiler = /** @class */ (function () {
39229
    function InjectableCompiler(reflector, alwaysGenerateDef) {
39230
        this.reflector = reflector;
39231
        this.alwaysGenerateDef = alwaysGenerateDef;
39232
        this.tokenInjector = reflector.resolveExternalReference(Identifiers.Injector);
39233
    }
39234
    InjectableCompiler.prototype.depsArray = function (deps, ctx) {
39235
        var _this = this;
39236
        return deps.map(function (dep) {
39237
            var token = dep;
39238
            var args = [token];
39239
            var flags = 0;
39240
            if (Array.isArray(dep)) {
39241
                for (var i = 0; i < dep.length; i++) {
39242
                    var v = dep[i];
39243
                    if (v) {
39244
                        if (v.ngMetadataName === 'Optional') {
39245
                            flags |= 8 /* Optional */;
39246
                        }
39247
                        else if (v.ngMetadataName === 'SkipSelf') {
39248
                            flags |= 4 /* SkipSelf */;
39249
                        }
39250
                        else if (v.ngMetadataName === 'Self') {
39251
                            flags |= 2 /* Self */;
39252
                        }
39253
                        else if (v.ngMetadataName === 'Inject') {
39254
                            token = v.token;
39255
                        }
39256
                        else {
39257
                            token = v;
39258
                        }
39259
                    }
39260
                }
39261
            }
39262
            var tokenExpr;
39263
            if (typeof token === 'string') {
39264
                tokenExpr = literal(token);
39265
            }
39266
            else if (token === _this.tokenInjector) {
39267
                tokenExpr = importExpr(Identifiers.INJECTOR);
39268
            }
39269
            else {
39270
                tokenExpr = ctx.importExpr(token);
39271
            }
39272
            if (flags !== 0 /* Default */) {
39273
                args = [tokenExpr, literal(flags)];
39274
            }
39275
            else {
39276
                args = [tokenExpr];
39277
            }
39278
            return importExpr(Identifiers.inject).callFn(args);
39279
        });
39280
    };
39281
    InjectableCompiler.prototype.factoryFor = function (injectable, ctx) {
39282
        var retValue;
39283
        if (injectable.useExisting) {
39284
            retValue = importExpr(Identifiers.inject).callFn([ctx.importExpr(injectable.useExisting)]);
39285
        }
39286
        else if (injectable.useFactory) {
39287
            var deps = injectable.deps || [];
39288
            if (deps.length > 0) {
39289
                retValue = ctx.importExpr(injectable.useFactory).callFn(this.depsArray(deps, ctx));
39290
            }
39291
            else {
39292
                return ctx.importExpr(injectable.useFactory);
39293
            }
39294
        }
39295
        else if (injectable.useValue) {
39296
            retValue = convertValueToOutputAst(ctx, injectable.useValue);
39297
        }
39298
        else {
39299
            var clazz = injectable.useClass || injectable.symbol;
39300
            var depArgs = this.depsArray(this.reflector.parameters(clazz), ctx);
39301
            retValue = new InstantiateExpr(ctx.importExpr(clazz), depArgs);
39302
        }
39303
        return fn([], [new ReturnStatement(retValue)], undefined, undefined, injectable.symbol.name + '_Factory');
39304
    };
39305
    InjectableCompiler.prototype.injectableDef = function (injectable, ctx) {
39306
        var providedIn = NULL_EXPR;
39307
        if (injectable.providedIn !== undefined) {
39308
            if (injectable.providedIn === null) {
39309
                providedIn = NULL_EXPR;
39310
            }
39311
            else if (typeof injectable.providedIn === 'string') {
39312
                providedIn = literal(injectable.providedIn);
39313
            }
39314
            else {
39315
                providedIn = ctx.importExpr(injectable.providedIn);
39316
            }
39317
        }
39318
        var def = [
39319
            mapEntry('factory', this.factoryFor(injectable, ctx)),
39320
            mapEntry('token', ctx.importExpr(injectable.type.reference)),
39321
            mapEntry('providedIn', providedIn),
39322
        ];
39323
        return importExpr(Identifiers.defineInjectable).callFn([literalMap(def)]);
39324
    };
39325
    InjectableCompiler.prototype.compile = function (injectable, ctx) {
39326
        if (this.alwaysGenerateDef || injectable.providedIn !== undefined) {
39327
            var className = identifierName(injectable.type);
39328
            var clazz = new ClassStmt(className, null, [
39329
                new ClassField('ngInjectableDef', INFERRED_TYPE, [StmtModifier.Static], this.injectableDef(injectable, ctx)),
39330
            ], [], new ClassMethod(null, [], []), []);
39331
            ctx.statements.push(clazz);
39332
        }
39333
    };
39334
    return InjectableCompiler;
39335
}());
39336
 
39337
/**
39338
 * @license
39339
 * Copyright Google Inc. All Rights Reserved.
39340
 *
39341
 * Use of this source code is governed by an MIT-style license that can be
39342
 * found in the LICENSE file at https://angular.io/license
39343
 */
39344
var STRIP_SRC_FILE_SUFFIXES = /(\.ts|\.d\.ts|\.js|\.jsx|\.tsx)$/;
39345
var GENERATED_FILE = /\.ngfactory\.|\.ngsummary\./;
39346
var JIT_SUMMARY_FILE = /\.ngsummary\./;
39347
var JIT_SUMMARY_NAME = /NgSummary$/;
39348
function ngfactoryFilePath(filePath, forceSourceFile) {
39349
    if (forceSourceFile === void 0) { forceSourceFile = false; }
39350
    var urlWithSuffix = splitTypescriptSuffix(filePath, forceSourceFile);
39351
    return urlWithSuffix[0] + ".ngfactory" + normalizeGenFileSuffix(urlWithSuffix[1]);
39352
}
39353
function stripGeneratedFileSuffix(filePath) {
39354
    return filePath.replace(GENERATED_FILE, '.');
39355
}
39356
function isGeneratedFile(filePath) {
39357
    return GENERATED_FILE.test(filePath);
39358
}
39359
function splitTypescriptSuffix(path, forceSourceFile) {
39360
    if (forceSourceFile === void 0) { forceSourceFile = false; }
39361
    if (path.endsWith('.d.ts')) {
39362
        return [path.slice(0, -5), forceSourceFile ? '.ts' : '.d.ts'];
39363
    }
39364
    var lastDot = path.lastIndexOf('.');
39365
    if (lastDot !== -1) {
39366
        return [path.substring(0, lastDot), path.substring(lastDot)];
39367
    }
39368
    return [path, ''];
39369
}
39370
function normalizeGenFileSuffix(srcFileSuffix) {
39371
    return srcFileSuffix === '.tsx' ? '.ts' : srcFileSuffix;
39372
}
39373
function summaryFileName(fileName) {
39374
    var fileNameWithoutSuffix = fileName.replace(STRIP_SRC_FILE_SUFFIXES, '');
39375
    return fileNameWithoutSuffix + ".ngsummary.json";
39376
}
39377
function summaryForJitFileName(fileName, forceSourceFile) {
39378
    if (forceSourceFile === void 0) { forceSourceFile = false; }
39379
    var urlWithSuffix = splitTypescriptSuffix(stripGeneratedFileSuffix(fileName), forceSourceFile);
39380
    return urlWithSuffix[0] + ".ngsummary" + urlWithSuffix[1];
39381
}
39382
function stripSummaryForJitFileSuffix(filePath) {
39383
    return filePath.replace(JIT_SUMMARY_FILE, '.');
39384
}
39385
function summaryForJitName(symbolName) {
39386
    return symbolName + "NgSummary";
39387
}
39388
function stripSummaryForJitNameSuffix(symbolName) {
39389
    return symbolName.replace(JIT_SUMMARY_NAME, '');
39390
}
39391
var LOWERED_SYMBOL = /\u0275\d+/;
39392
function isLoweredSymbol(name) {
39393
    return LOWERED_SYMBOL.test(name);
39394
}
39395
function createLoweredSymbol(id) {
39396
    return "\u0275" + id;
39397
}
39398
 
39399
/**
39400
 * @license
39401
 * Copyright Google Inc. All Rights Reserved.
39402
 *
39403
 * Use of this source code is governed by an MIT-style license that can be
39404
 * found in the LICENSE file at https://angular.io/license
39405
 */
39406
var LifecycleHooks;
39407
(function (LifecycleHooks) {
39408
    LifecycleHooks[LifecycleHooks["OnInit"] = 0] = "OnInit";
39409
    LifecycleHooks[LifecycleHooks["OnDestroy"] = 1] = "OnDestroy";
39410
    LifecycleHooks[LifecycleHooks["DoCheck"] = 2] = "DoCheck";
39411
    LifecycleHooks[LifecycleHooks["OnChanges"] = 3] = "OnChanges";
39412
    LifecycleHooks[LifecycleHooks["AfterContentInit"] = 4] = "AfterContentInit";
39413
    LifecycleHooks[LifecycleHooks["AfterContentChecked"] = 5] = "AfterContentChecked";
39414
    LifecycleHooks[LifecycleHooks["AfterViewInit"] = 6] = "AfterViewInit";
39415
    LifecycleHooks[LifecycleHooks["AfterViewChecked"] = 7] = "AfterViewChecked";
39416
})(LifecycleHooks || (LifecycleHooks = {}));
39417
var LIFECYCLE_HOOKS_VALUES = [
39418
    LifecycleHooks.OnInit, LifecycleHooks.OnDestroy, LifecycleHooks.DoCheck, LifecycleHooks.OnChanges,
39419
    LifecycleHooks.AfterContentInit, LifecycleHooks.AfterContentChecked, LifecycleHooks.AfterViewInit,
39420
    LifecycleHooks.AfterViewChecked
39421
];
39422
function hasLifecycleHook(reflector, hook, token) {
39423
    return reflector.hasLifecycleHook(token, getHookName(hook));
39424
}
39425
function getAllLifecycleHooks(reflector, token) {
39426
    return LIFECYCLE_HOOKS_VALUES.filter(function (hook) { return hasLifecycleHook(reflector, hook, token); });
39427
}
39428
function getHookName(hook) {
39429
    switch (hook) {
39430
        case LifecycleHooks.OnInit:
39431
            return 'ngOnInit';
39432
        case LifecycleHooks.OnDestroy:
39433
            return 'ngOnDestroy';
39434
        case LifecycleHooks.DoCheck:
39435
            return 'ngDoCheck';
39436
        case LifecycleHooks.OnChanges:
39437
            return 'ngOnChanges';
39438
        case LifecycleHooks.AfterContentInit:
39439
            return 'ngAfterContentInit';
39440
        case LifecycleHooks.AfterContentChecked:
39441
            return 'ngAfterContentChecked';
39442
        case LifecycleHooks.AfterViewInit:
39443
            return 'ngAfterViewInit';
39444
        case LifecycleHooks.AfterViewChecked:
39445
            return 'ngAfterViewChecked';
39446
    }
39447
}
39448
 
39449
/**
39450
 * @license
39451
 * Copyright Google Inc. All Rights Reserved.
39452
 *
39453
 * Use of this source code is governed by an MIT-style license that can be
39454
 * found in the LICENSE file at https://angular.io/license
39455
 */
39456
var _SELECTOR_REGEXP = new RegExp('(\\:not\\()|' + //":not("
39457
    '([-\\w]+)|' + // "tag"
39458
    '(?:\\.([-\\w]+))|' + // ".class"
39459
    // "-" should appear first in the regexp below as FF31 parses "[.-\w]" as a range
39460
    '(?:\\[([-.\\w*]+)(?:=([\"\']?)([^\\]\"\']*)\\5)?\\])|' + // "[name]", "[name=value]",
39461
    // "[name="value"]",
39462
    // "[name='value']"
39463
    '(\\))|' + // ")"
39464
    '(\\s*,\\s*)', // ","
39465
'g');
39466
/**
39467
 * A css selector contains an element name,
39468
 * css classes and attribute/value pairs with the purpose
39469
 * of selecting subsets out of them.
39470
 */
39471
var CssSelector = /** @class */ (function () {
39472
    function CssSelector() {
39473
        this.element = null;
39474
        this.classNames = [];
39475
        /**
39476
         * The selectors are encoded in pairs where:
39477
         * - even locations are attribute names
39478
         * - odd locations are attribute values.
39479
         *
39480
         * Example:
39481
         * Selector: `[key1=value1][key2]` would parse to:
39482
         * ```
39483
         * ['key1', 'value1', 'key2', '']
39484
         * ```
39485
         */
39486
        this.attrs = [];
39487
        this.notSelectors = [];
39488
    }
39489
    CssSelector.parse = function (selector) {
39490
        var results = [];
39491
        var _addResult = function (res, cssSel) {
39492
            if (cssSel.notSelectors.length > 0 && !cssSel.element && cssSel.classNames.length == 0 &&
39493
                cssSel.attrs.length == 0) {
39494
                cssSel.element = '*';
39495
            }
39496
            res.push(cssSel);
39497
        };
39498
        var cssSelector = new CssSelector();
39499
        var match;
39500
        var current = cssSelector;
39501
        var inNot = false;
39502
        _SELECTOR_REGEXP.lastIndex = 0;
39503
        while (match = _SELECTOR_REGEXP.exec(selector)) {
39504
            if (match[1]) {
39505
                if (inNot) {
39506
                    throw new Error('Nesting :not is not allowed in a selector');
39507
                }
39508
                inNot = true;
39509
                current = new CssSelector();
39510
                cssSelector.notSelectors.push(current);
39511
            }
39512
            if (match[2]) {
39513
                current.setElement(match[2]);
39514
            }
39515
            if (match[3]) {
39516
                current.addClassName(match[3]);
39517
            }
39518
            if (match[4]) {
39519
                current.addAttribute(match[4], match[6]);
39520
            }
39521
            if (match[7]) {
39522
                inNot = false;
39523
                current = cssSelector;
39524
            }
39525
            if (match[8]) {
39526
                if (inNot) {
39527
                    throw new Error('Multiple selectors in :not are not supported');
39528
                }
39529
                _addResult(results, cssSelector);
39530
                cssSelector = current = new CssSelector();
39531
            }
39532
        }
39533
        _addResult(results, cssSelector);
39534
        return results;
39535
    };
39536
    CssSelector.prototype.isElementSelector = function () {
39537
        return this.hasElementSelector() && this.classNames.length == 0 && this.attrs.length == 0 &&
39538
            this.notSelectors.length === 0;
39539
    };
39540
    CssSelector.prototype.hasElementSelector = function () { return !!this.element; };
39541
    CssSelector.prototype.setElement = function (element) {
39542
        if (element === void 0) { element = null; }
39543
        this.element = element;
39544
    };
39545
    /** Gets a template string for an element that matches the selector. */
39546
    CssSelector.prototype.getMatchingElementTemplate = function () {
39547
        var tagName = this.element || 'div';
39548
        var classAttr = this.classNames.length > 0 ? " class=\"" + this.classNames.join(' ') + "\"" : '';
39549
        var attrs = '';
39550
        for (var i = 0; i < this.attrs.length; i += 2) {
39551
            var attrName = this.attrs[i];
39552
            var attrValue = this.attrs[i + 1] !== '' ? "=\"" + this.attrs[i + 1] + "\"" : '';
39553
            attrs += " " + attrName + attrValue;
39554
        }
39555
        return getHtmlTagDefinition(tagName).isVoid ? "<" + tagName + classAttr + attrs + "/>" :
39556
            "<" + tagName + classAttr + attrs + "></" + tagName + ">";
39557
    };
39558
    CssSelector.prototype.getAttrs = function () {
39559
        var result = [];
39560
        if (this.classNames.length > 0) {
39561
            result.push('class', this.classNames.join(' '));
39562
        }
39563
        return result.concat(this.attrs);
39564
    };
39565
    CssSelector.prototype.addAttribute = function (name, value) {
39566
        if (value === void 0) { value = ''; }
39567
        this.attrs.push(name, value && value.toLowerCase() || '');
39568
    };
39569
    CssSelector.prototype.addClassName = function (name) { this.classNames.push(name.toLowerCase()); };
39570
    CssSelector.prototype.toString = function () {
39571
        var res = this.element || '';
39572
        if (this.classNames) {
39573
            this.classNames.forEach(function (klass) { return res += "." + klass; });
39574
        }
39575
        if (this.attrs) {
39576
            for (var i = 0; i < this.attrs.length; i += 2) {
39577
                var name_1 = this.attrs[i];
39578
                var value = this.attrs[i + 1];
39579
                res += "[" + name_1 + (value ? '=' + value : '') + "]";
39580
            }
39581
        }
39582
        this.notSelectors.forEach(function (notSelector) { return res += ":not(" + notSelector + ")"; });
39583
        return res;
39584
    };
39585
    return CssSelector;
39586
}());
39587
/**
39588
 * Reads a list of CssSelectors and allows to calculate which ones
39589
 * are contained in a given CssSelector.
39590
 */
39591
var SelectorMatcher = /** @class */ (function () {
39592
    function SelectorMatcher() {
39593
        this._elementMap = new Map();
39594
        this._elementPartialMap = new Map();
39595
        this._classMap = new Map();
39596
        this._classPartialMap = new Map();
39597
        this._attrValueMap = new Map();
39598
        this._attrValuePartialMap = new Map();
39599
        this._listContexts = [];
39600
    }
39601
    SelectorMatcher.createNotMatcher = function (notSelectors) {
39602
        var notMatcher = new SelectorMatcher();
39603
        notMatcher.addSelectables(notSelectors, null);
39604
        return notMatcher;
39605
    };
39606
    SelectorMatcher.prototype.addSelectables = function (cssSelectors, callbackCtxt) {
39607
        var listContext = null;
39608
        if (cssSelectors.length > 1) {
39609
            listContext = new SelectorListContext(cssSelectors);
39610
            this._listContexts.push(listContext);
39611
        }
39612
        for (var i = 0; i < cssSelectors.length; i++) {
39613
            this._addSelectable(cssSelectors[i], callbackCtxt, listContext);
39614
        }
39615
    };
39616
    /**
39617
     * Add an object that can be found later on by calling `match`.
39618
     * @param cssSelector A css selector
39619
     * @param callbackCtxt An opaque object that will be given to the callback of the `match` function
39620
     */
39621
    SelectorMatcher.prototype._addSelectable = function (cssSelector, callbackCtxt, listContext) {
39622
        var matcher = this;
39623
        var element = cssSelector.element;
39624
        var classNames = cssSelector.classNames;
39625
        var attrs = cssSelector.attrs;
39626
        var selectable = new SelectorContext(cssSelector, callbackCtxt, listContext);
39627
        if (element) {
39628
            var isTerminal = attrs.length === 0 && classNames.length === 0;
39629
            if (isTerminal) {
39630
                this._addTerminal(matcher._elementMap, element, selectable);
39631
            }
39632
            else {
39633
                matcher = this._addPartial(matcher._elementPartialMap, element);
39634
            }
39635
        }
39636
        if (classNames) {
39637
            for (var i = 0; i < classNames.length; i++) {
39638
                var isTerminal = attrs.length === 0 && i === classNames.length - 1;
39639
                var className = classNames[i];
39640
                if (isTerminal) {
39641
                    this._addTerminal(matcher._classMap, className, selectable);
39642
                }
39643
                else {
39644
                    matcher = this._addPartial(matcher._classPartialMap, className);
39645
                }
39646
            }
39647
        }
39648
        if (attrs) {
39649
            for (var i = 0; i < attrs.length; i += 2) {
39650
                var isTerminal = i === attrs.length - 2;
39651
                var name_2 = attrs[i];
39652
                var value = attrs[i + 1];
39653
                if (isTerminal) {
39654
                    var terminalMap = matcher._attrValueMap;
39655
                    var terminalValuesMap = terminalMap.get(name_2);
39656
                    if (!terminalValuesMap) {
39657
                        terminalValuesMap = new Map();
39658
                        terminalMap.set(name_2, terminalValuesMap);
39659
                    }
39660
                    this._addTerminal(terminalValuesMap, value, selectable);
39661
                }
39662
                else {
39663
                    var partialMap = matcher._attrValuePartialMap;
39664
                    var partialValuesMap = partialMap.get(name_2);
39665
                    if (!partialValuesMap) {
39666
                        partialValuesMap = new Map();
39667
                        partialMap.set(name_2, partialValuesMap);
39668
                    }
39669
                    matcher = this._addPartial(partialValuesMap, value);
39670
                }
39671
            }
39672
        }
39673
    };
39674
    SelectorMatcher.prototype._addTerminal = function (map, name, selectable) {
39675
        var terminalList = map.get(name);
39676
        if (!terminalList) {
39677
            terminalList = [];
39678
            map.set(name, terminalList);
39679
        }
39680
        terminalList.push(selectable);
39681
    };
39682
    SelectorMatcher.prototype._addPartial = function (map, name) {
39683
        var matcher = map.get(name);
39684
        if (!matcher) {
39685
            matcher = new SelectorMatcher();
39686
            map.set(name, matcher);
39687
        }
39688
        return matcher;
39689
    };
39690
    /**
39691
     * Find the objects that have been added via `addSelectable`
39692
     * whose css selector is contained in the given css selector.
39693
     * @param cssSelector A css selector
39694
     * @param matchedCallback This callback will be called with the object handed into `addSelectable`
39695
     * @return boolean true if a match was found
39696
    */
39697
    SelectorMatcher.prototype.match = function (cssSelector, matchedCallback) {
39698
        var result = false;
39699
        var element = cssSelector.element;
39700
        var classNames = cssSelector.classNames;
39701
        var attrs = cssSelector.attrs;
39702
        for (var i = 0; i < this._listContexts.length; i++) {
39703
            this._listContexts[i].alreadyMatched = false;
39704
        }
39705
        result = this._matchTerminal(this._elementMap, element, cssSelector, matchedCallback) || result;
39706
        result = this._matchPartial(this._elementPartialMap, element, cssSelector, matchedCallback) ||
39707
            result;
39708
        if (classNames) {
39709
            for (var i = 0; i < classNames.length; i++) {
39710
                var className = classNames[i];
39711
                result =
39712
                    this._matchTerminal(this._classMap, className, cssSelector, matchedCallback) || result;
39713
                result =
39714
                    this._matchPartial(this._classPartialMap, className, cssSelector, matchedCallback) ||
39715
                        result;
39716
            }
39717
        }
39718
        if (attrs) {
39719
            for (var i = 0; i < attrs.length; i += 2) {
39720
                var name_3 = attrs[i];
39721
                var value = attrs[i + 1];
39722
                var terminalValuesMap = this._attrValueMap.get(name_3);
39723
                if (value) {
39724
                    result =
39725
                        this._matchTerminal(terminalValuesMap, '', cssSelector, matchedCallback) || result;
39726
                }
39727
                result =
39728
                    this._matchTerminal(terminalValuesMap, value, cssSelector, matchedCallback) || result;
39729
                var partialValuesMap = this._attrValuePartialMap.get(name_3);
39730
                if (value) {
39731
                    result = this._matchPartial(partialValuesMap, '', cssSelector, matchedCallback) || result;
39732
                }
39733
                result =
39734
                    this._matchPartial(partialValuesMap, value, cssSelector, matchedCallback) || result;
39735
            }
39736
        }
39737
        return result;
39738
    };
39739
    /** @internal */
39740
    SelectorMatcher.prototype._matchTerminal = function (map, name, cssSelector, matchedCallback) {
39741
        if (!map || typeof name !== 'string') {
39742
            return false;
39743
        }
39744
        var selectables = map.get(name) || [];
39745
        var starSelectables = map.get('*');
39746
        if (starSelectables) {
39747
            selectables = selectables.concat(starSelectables);
39748
        }
39749
        if (selectables.length === 0) {
39750
            return false;
39751
        }
39752
        var selectable;
39753
        var result = false;
39754
        for (var i = 0; i < selectables.length; i++) {
39755
            selectable = selectables[i];
39756
            result = selectable.finalize(cssSelector, matchedCallback) || result;
39757
        }
39758
        return result;
39759
    };
39760
    /** @internal */
39761
    SelectorMatcher.prototype._matchPartial = function (map, name, cssSelector, matchedCallback) {
39762
        if (!map || typeof name !== 'string') {
39763
            return false;
39764
        }
39765
        var nestedSelector = map.get(name);
39766
        if (!nestedSelector) {
39767
            return false;
39768
        }
39769
        // TODO(perf): get rid of recursion and measure again
39770
        // TODO(perf): don't pass the whole selector into the recursion,
39771
        // but only the not processed parts
39772
        return nestedSelector.match(cssSelector, matchedCallback);
39773
    };
39774
    return SelectorMatcher;
39775
}());
39776
var SelectorListContext = /** @class */ (function () {
39777
    function SelectorListContext(selectors) {
39778
        this.selectors = selectors;
39779
        this.alreadyMatched = false;
39780
    }
39781
    return SelectorListContext;
39782
}());
39783
// Store context to pass back selector and context when a selector is matched
39784
var SelectorContext = /** @class */ (function () {
39785
    function SelectorContext(selector, cbContext, listContext) {
39786
        this.selector = selector;
39787
        this.cbContext = cbContext;
39788
        this.listContext = listContext;
39789
        this.notSelectors = selector.notSelectors;
39790
    }
39791
    SelectorContext.prototype.finalize = function (cssSelector, callback) {
39792
        var result = true;
39793
        if (this.notSelectors.length > 0 && (!this.listContext || !this.listContext.alreadyMatched)) {
39794
            var notMatcher = SelectorMatcher.createNotMatcher(this.notSelectors);
39795
            result = !notMatcher.match(cssSelector, null);
39796
        }
39797
        if (result && callback && (!this.listContext || !this.listContext.alreadyMatched)) {
39798
            if (this.listContext) {
39799
                this.listContext.alreadyMatched = true;
39800
            }
39801
            callback(this.selector, this.cbContext);
39802
        }
39803
        return result;
39804
    };
39805
    return SelectorContext;
39806
}());
39807
 
39808
/**
39809
 * @license
39810
 * Copyright Google Inc. All Rights Reserved.
39811
 *
39812
 * Use of this source code is governed by an MIT-style license that can be
39813
 * found in the LICENSE file at https://angular.io/license
39814
 */
39815
var ERROR_COMPONENT_TYPE = 'ngComponentType';
39816
// Design notes:
39817
// - don't lazily create metadata:
39818
//   For some metadata, we need to do async work sometimes,
39819
//   so the user has to kick off this loading.
39820
//   But we want to report errors even when the async work is
39821
//   not required to check that the user would have been able
39822
//   to wait correctly.
39823
var CompileMetadataResolver = /** @class */ (function () {
39824
    function CompileMetadataResolver(_config, _htmlParser, _ngModuleResolver, _directiveResolver, _pipeResolver, _summaryResolver, _schemaRegistry, _directiveNormalizer, _console, _staticSymbolCache, _reflector, _errorCollector) {
39825
        this._config = _config;
39826
        this._htmlParser = _htmlParser;
39827
        this._ngModuleResolver = _ngModuleResolver;
39828
        this._directiveResolver = _directiveResolver;
39829
        this._pipeResolver = _pipeResolver;
39830
        this._summaryResolver = _summaryResolver;
39831
        this._schemaRegistry = _schemaRegistry;
39832
        this._directiveNormalizer = _directiveNormalizer;
39833
        this._console = _console;
39834
        this._staticSymbolCache = _staticSymbolCache;
39835
        this._reflector = _reflector;
39836
        this._errorCollector = _errorCollector;
39837
        this._nonNormalizedDirectiveCache = new Map();
39838
        this._directiveCache = new Map();
39839
        this._summaryCache = new Map();
39840
        this._pipeCache = new Map();
39841
        this._ngModuleCache = new Map();
39842
        this._ngModuleOfTypes = new Map();
39843
        this._shallowModuleCache = new Map();
39844
    }
39845
    CompileMetadataResolver.prototype.getReflector = function () { return this._reflector; };
39846
    CompileMetadataResolver.prototype.clearCacheFor = function (type) {
39847
        var dirMeta = this._directiveCache.get(type);
39848
        this._directiveCache.delete(type);
39849
        this._nonNormalizedDirectiveCache.delete(type);
39850
        this._summaryCache.delete(type);
39851
        this._pipeCache.delete(type);
39852
        this._ngModuleOfTypes.delete(type);
39853
        // Clear all of the NgModule as they contain transitive information!
39854
        this._ngModuleCache.clear();
39855
        if (dirMeta) {
39856
            this._directiveNormalizer.clearCacheFor(dirMeta);
39857
        }
39858
    };
39859
    CompileMetadataResolver.prototype.clearCache = function () {
39860
        this._directiveCache.clear();
39861
        this._nonNormalizedDirectiveCache.clear();
39862
        this._summaryCache.clear();
39863
        this._pipeCache.clear();
39864
        this._ngModuleCache.clear();
39865
        this._ngModuleOfTypes.clear();
39866
        this._directiveNormalizer.clearCache();
39867
    };
39868
    CompileMetadataResolver.prototype._createProxyClass = function (baseType, name) {
39869
        var delegate = null;
39870
        var proxyClass = function () {
39871
            if (!delegate) {
39872
                throw new Error("Illegal state: Class " + name + " for type " + stringify(baseType) + " is not compiled yet!");
39873
            }
39874
            return delegate.apply(this, arguments);
39875
        };
39876
        proxyClass.setDelegate = function (d) {
39877
            delegate = d;
39878
            proxyClass.prototype = d.prototype;
39879
        };
39880
        // Make stringify work correctly
39881
        proxyClass.overriddenName = name;
39882
        return proxyClass;
39883
    };
39884
    CompileMetadataResolver.prototype.getGeneratedClass = function (dirType, name) {
39885
        if (dirType instanceof StaticSymbol) {
39886
            return this._staticSymbolCache.get(ngfactoryFilePath(dirType.filePath), name);
39887
        }
39888
        else {
39889
            return this._createProxyClass(dirType, name);
39890
        }
39891
    };
39892
    CompileMetadataResolver.prototype.getComponentViewClass = function (dirType) {
39893
        return this.getGeneratedClass(dirType, viewClassName(dirType, 0));
39894
    };
39895
    CompileMetadataResolver.prototype.getHostComponentViewClass = function (dirType) {
39896
        return this.getGeneratedClass(dirType, hostViewClassName(dirType));
39897
    };
39898
    CompileMetadataResolver.prototype.getHostComponentType = function (dirType) {
39899
        var name = identifierName({ reference: dirType }) + "_Host";
39900
        if (dirType instanceof StaticSymbol) {
39901
            return this._staticSymbolCache.get(dirType.filePath, name);
39902
        }
39903
        else {
39904
            var HostClass = function HostClass() { };
39905
            HostClass.overriddenName = name;
39906
            return HostClass;
39907
        }
39908
    };
39909
    CompileMetadataResolver.prototype.getRendererType = function (dirType) {
39910
        if (dirType instanceof StaticSymbol) {
39911
            return this._staticSymbolCache.get(ngfactoryFilePath(dirType.filePath), rendererTypeName(dirType));
39912
        }
39913
        else {
39914
            // returning an object as proxy,
39915
            // that we fill later during runtime compilation.
39916
            return {};
39917
        }
39918
    };
39919
    CompileMetadataResolver.prototype.getComponentFactory = function (selector, dirType, inputs, outputs) {
39920
        if (dirType instanceof StaticSymbol) {
39921
            return this._staticSymbolCache.get(ngfactoryFilePath(dirType.filePath), componentFactoryName(dirType));
39922
        }
39923
        else {
39924
            var hostView = this.getHostComponentViewClass(dirType);
39925
            // Note: ngContentSelectors will be filled later once the template is
39926
            // loaded.
39927
            var createComponentFactory = this._reflector.resolveExternalReference(Identifiers.createComponentFactory);
39928
            return createComponentFactory(selector, dirType, hostView, inputs, outputs, []);
39929
        }
39930
    };
39931
    CompileMetadataResolver.prototype.initComponentFactory = function (factory, ngContentSelectors) {
39932
        if (!(factory instanceof StaticSymbol)) {
39933
            (_a = factory.ngContentSelectors).push.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(ngContentSelectors));
39934
        }
39935
        var _a;
39936
    };
39937
    CompileMetadataResolver.prototype._loadSummary = function (type, kind) {
39938
        var typeSummary = this._summaryCache.get(type);
39939
        if (!typeSummary) {
39940
            var summary = this._summaryResolver.resolveSummary(type);
39941
            typeSummary = summary ? summary.type : null;
39942
            this._summaryCache.set(type, typeSummary || null);
39943
        }
39944
        return typeSummary && typeSummary.summaryKind === kind ? typeSummary : null;
39945
    };
39946
    CompileMetadataResolver.prototype.getHostComponentMetadata = function (compMeta, hostViewType) {
39947
        var hostType = this.getHostComponentType(compMeta.type.reference);
39948
        if (!hostViewType) {
39949
            hostViewType = this.getHostComponentViewClass(hostType);
39950
        }
39951
        // Note: ! is ok here as this method should only be called with normalized directive
39952
        // metadata, which always fills in the selector.
39953
        var template = CssSelector.parse(compMeta.selector)[0].getMatchingElementTemplate();
39954
        var templateUrl = '';
39955
        var htmlAst = this._htmlParser.parse(template, templateUrl);
39956
        return CompileDirectiveMetadata.create({
39957
            isHost: true,
39958
            type: { reference: hostType, diDeps: [], lifecycleHooks: [] },
39959
            template: new CompileTemplateMetadata({
39960
                encapsulation: ViewEncapsulation.None,
39961
                template: template,
39962
                templateUrl: templateUrl,
39963
                htmlAst: htmlAst,
39964
                styles: [],
39965
                styleUrls: [],
39966
                ngContentSelectors: [],
39967
                animations: [],
39968
                isInline: true,
39969
                externalStylesheets: [],
39970
                interpolation: null,
39971
                preserveWhitespaces: false,
39972
            }),
39973
            exportAs: null,
39974
            changeDetection: ChangeDetectionStrategy.Default,
39975
            inputs: [],
39976
            outputs: [],
39977
            host: {},
39978
            isComponent: true,
39979
            selector: '*',
39980
            providers: [],
39981
            viewProviders: [],
39982
            queries: [],
39983
            guards: {},
39984
            viewQueries: [],
39985
            componentViewType: hostViewType,
39986
            rendererType: { id: '__Host__', encapsulation: ViewEncapsulation.None, styles: [], data: {} },
39987
            entryComponents: [],
39988
            componentFactory: null
39989
        });
39990
    };
39991
    CompileMetadataResolver.prototype.loadDirectiveMetadata = function (ngModuleType, directiveType, isSync) {
39992
        var _this = this;
39993
        if (this._directiveCache.has(directiveType)) {
39994
            return null;
39995
        }
39996
        directiveType = resolveForwardRef(directiveType);
39997
        var _a = this.getNonNormalizedDirectiveMetadata(directiveType), annotation = _a.annotation, metadata = _a.metadata;
39998
        var createDirectiveMetadata = function (templateMetadata) {
39999
            var normalizedDirMeta = new CompileDirectiveMetadata({
40000
                isHost: false,
40001
                type: metadata.type,
40002
                isComponent: metadata.isComponent,
40003
                selector: metadata.selector,
40004
                exportAs: metadata.exportAs,
40005
                changeDetection: metadata.changeDetection,
40006
                inputs: metadata.inputs,
40007
                outputs: metadata.outputs,
40008
                hostListeners: metadata.hostListeners,
40009
                hostProperties: metadata.hostProperties,
40010
                hostAttributes: metadata.hostAttributes,
40011
                providers: metadata.providers,
40012
                viewProviders: metadata.viewProviders,
40013
                queries: metadata.queries,
40014
                guards: metadata.guards,
40015
                viewQueries: metadata.viewQueries,
40016
                entryComponents: metadata.entryComponents,
40017
                componentViewType: metadata.componentViewType,
40018
                rendererType: metadata.rendererType,
40019
                componentFactory: metadata.componentFactory,
40020
                template: templateMetadata
40021
            });
40022
            if (templateMetadata) {
40023
                _this.initComponentFactory(metadata.componentFactory, templateMetadata.ngContentSelectors);
40024
            }
40025
            _this._directiveCache.set(directiveType, normalizedDirMeta);
40026
            _this._summaryCache.set(directiveType, normalizedDirMeta.toSummary());
40027
            return null;
40028
        };
40029
        if (metadata.isComponent) {
40030
            var template = metadata.template;
40031
            var templateMeta = this._directiveNormalizer.normalizeTemplate({
40032
                ngModuleType: ngModuleType,
40033
                componentType: directiveType,
40034
                moduleUrl: this._reflector.componentModuleUrl(directiveType, annotation),
40035
                encapsulation: template.encapsulation,
40036
                template: template.template,
40037
                templateUrl: template.templateUrl,
40038
                styles: template.styles,
40039
                styleUrls: template.styleUrls,
40040
                animations: template.animations,
40041
                interpolation: template.interpolation,
40042
                preserveWhitespaces: template.preserveWhitespaces
40043
            });
40044
            if (isPromise(templateMeta) && isSync) {
40045
                this._reportError(componentStillLoadingError(directiveType), directiveType);
40046
                return null;
40047
            }
40048
            return SyncAsync.then(templateMeta, createDirectiveMetadata);
40049
        }
40050
        else {
40051
            // directive
40052
            createDirectiveMetadata(null);
40053
            return null;
40054
        }
40055
    };
40056
    CompileMetadataResolver.prototype.getNonNormalizedDirectiveMetadata = function (directiveType) {
40057
        var _this = this;
40058
        directiveType = resolveForwardRef(directiveType);
40059
        if (!directiveType) {
40060
            return null;
40061
        }
40062
        var cacheEntry = this._nonNormalizedDirectiveCache.get(directiveType);
40063
        if (cacheEntry) {
40064
            return cacheEntry;
40065
        }
40066
        var dirMeta = this._directiveResolver.resolve(directiveType, false);
40067
        if (!dirMeta) {
40068
            return null;
40069
        }
40070
        var nonNormalizedTemplateMetadata = undefined;
40071
        if (createComponent.isTypeOf(dirMeta)) {
40072
            // component
40073
            var compMeta = dirMeta;
40074
            assertArrayOfStrings('styles', compMeta.styles);
40075
            assertArrayOfStrings('styleUrls', compMeta.styleUrls);
40076
            assertInterpolationSymbols('interpolation', compMeta.interpolation);
40077
            var animations = compMeta.animations;
40078
            nonNormalizedTemplateMetadata = new CompileTemplateMetadata({
40079
                encapsulation: noUndefined(compMeta.encapsulation),
40080
                template: noUndefined(compMeta.template),
40081
                templateUrl: noUndefined(compMeta.templateUrl),
40082
                htmlAst: null,
40083
                styles: compMeta.styles || [],
40084
                styleUrls: compMeta.styleUrls || [],
40085
                animations: animations || [],
40086
                interpolation: noUndefined(compMeta.interpolation),
40087
                isInline: !!compMeta.template,
40088
                externalStylesheets: [],
40089
                ngContentSelectors: [],
40090
                preserveWhitespaces: noUndefined(dirMeta.preserveWhitespaces),
40091
            });
40092
        }
40093
        var changeDetectionStrategy = null;
40094
        var viewProviders = [];
40095
        var entryComponentMetadata = [];
40096
        var selector = dirMeta.selector;
40097
        if (createComponent.isTypeOf(dirMeta)) {
40098
            // Component
40099
            var compMeta = dirMeta;
40100
            changeDetectionStrategy = compMeta.changeDetection;
40101
            if (compMeta.viewProviders) {
40102
                viewProviders = this._getProvidersMetadata(compMeta.viewProviders, entryComponentMetadata, "viewProviders for \"" + stringifyType(directiveType) + "\"", [], directiveType);
40103
            }
40104
            if (compMeta.entryComponents) {
40105
                entryComponentMetadata = flattenAndDedupeArray(compMeta.entryComponents)
40106
                    .map(function (type) { return _this._getEntryComponentMetadata(type); })
40107
                    .concat(entryComponentMetadata);
40108
            }
40109
            if (!selector) {
40110
                selector = this._schemaRegistry.getDefaultComponentElementName();
40111
            }
40112
        }
40113
        else {
40114
            // Directive
40115
            if (!selector) {
40116
                this._reportError(syntaxError("Directive " + stringifyType(directiveType) + " has no selector, please add it!"), directiveType);
40117
                selector = 'error';
40118
            }
40119
        }
40120
        var providers = [];
40121
        if (dirMeta.providers != null) {
40122
            providers = this._getProvidersMetadata(dirMeta.providers, entryComponentMetadata, "providers for \"" + stringifyType(directiveType) + "\"", [], directiveType);
40123
        }
40124
        var queries = [];
40125
        var viewQueries = [];
40126
        if (dirMeta.queries != null) {
40127
            queries = this._getQueriesMetadata(dirMeta.queries, false, directiveType);
40128
            viewQueries = this._getQueriesMetadata(dirMeta.queries, true, directiveType);
40129
        }
40130
        var metadata = CompileDirectiveMetadata.create({
40131
            isHost: false,
40132
            selector: selector,
40133
            exportAs: noUndefined(dirMeta.exportAs),
40134
            isComponent: !!nonNormalizedTemplateMetadata,
40135
            type: this._getTypeMetadata(directiveType),
40136
            template: nonNormalizedTemplateMetadata,
40137
            changeDetection: changeDetectionStrategy,
40138
            inputs: dirMeta.inputs || [],
40139
            outputs: dirMeta.outputs || [],
40140
            host: dirMeta.host || {},
40141
            providers: providers || [],
40142
            viewProviders: viewProviders || [],
40143
            queries: queries || [],
40144
            guards: dirMeta.guards || {},
40145
            viewQueries: viewQueries || [],
40146
            entryComponents: entryComponentMetadata,
40147
            componentViewType: nonNormalizedTemplateMetadata ? this.getComponentViewClass(directiveType) :
40148
                null,
40149
            rendererType: nonNormalizedTemplateMetadata ? this.getRendererType(directiveType) : null,
40150
            componentFactory: null
40151
        });
40152
        if (nonNormalizedTemplateMetadata) {
40153
            metadata.componentFactory =
40154
                this.getComponentFactory(selector, directiveType, metadata.inputs, metadata.outputs);
40155
        }
40156
        cacheEntry = { metadata: metadata, annotation: dirMeta };
40157
        this._nonNormalizedDirectiveCache.set(directiveType, cacheEntry);
40158
        return cacheEntry;
40159
    };
40160
    /**
40161
     * Gets the metadata for the given directive.
40162
     * This assumes `loadNgModuleDirectiveAndPipeMetadata` has been called first.
40163
     */
40164
    CompileMetadataResolver.prototype.getDirectiveMetadata = function (directiveType) {
40165
        var dirMeta = this._directiveCache.get(directiveType);
40166
        if (!dirMeta) {
40167
            this._reportError(syntaxError("Illegal state: getDirectiveMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Directive " + stringifyType(directiveType) + "."), directiveType);
40168
        }
40169
        return dirMeta;
40170
    };
40171
    CompileMetadataResolver.prototype.getDirectiveSummary = function (dirType) {
40172
        var dirSummary = this._loadSummary(dirType, CompileSummaryKind.Directive);
40173
        if (!dirSummary) {
40174
            this._reportError(syntaxError("Illegal state: Could not load the summary for directive " + stringifyType(dirType) + "."), dirType);
40175
        }
40176
        return dirSummary;
40177
    };
40178
    CompileMetadataResolver.prototype.isDirective = function (type) {
40179
        return !!this._loadSummary(type, CompileSummaryKind.Directive) ||
40180
            this._directiveResolver.isDirective(type);
40181
    };
40182
    CompileMetadataResolver.prototype.isPipe = function (type) {
40183
        return !!this._loadSummary(type, CompileSummaryKind.Pipe) ||
40184
            this._pipeResolver.isPipe(type);
40185
    };
40186
    CompileMetadataResolver.prototype.isNgModule = function (type) {
40187
        return !!this._loadSummary(type, CompileSummaryKind.NgModule) ||
40188
            this._ngModuleResolver.isNgModule(type);
40189
    };
40190
    CompileMetadataResolver.prototype.getNgModuleSummary = function (moduleType, alreadyCollecting) {
40191
        if (alreadyCollecting === void 0) { alreadyCollecting = null; }
40192
        var moduleSummary = this._loadSummary(moduleType, CompileSummaryKind.NgModule);
40193
        if (!moduleSummary) {
40194
            var moduleMeta = this.getNgModuleMetadata(moduleType, false, alreadyCollecting);
40195
            moduleSummary = moduleMeta ? moduleMeta.toSummary() : null;
40196
            if (moduleSummary) {
40197
                this._summaryCache.set(moduleType, moduleSummary);
40198
            }
40199
        }
40200
        return moduleSummary;
40201
    };
40202
    /**
40203
     * Loads the declared directives and pipes of an NgModule.
40204
     */
40205
    CompileMetadataResolver.prototype.loadNgModuleDirectiveAndPipeMetadata = function (moduleType, isSync, throwIfNotFound) {
40206
        var _this = this;
40207
        if (throwIfNotFound === void 0) { throwIfNotFound = true; }
40208
        var ngModule = this.getNgModuleMetadata(moduleType, throwIfNotFound);
40209
        var loading = [];
40210
        if (ngModule) {
40211
            ngModule.declaredDirectives.forEach(function (id) {
40212
                var promise = _this.loadDirectiveMetadata(moduleType, id.reference, isSync);
40213
                if (promise) {
40214
                    loading.push(promise);
40215
                }
40216
            });
40217
            ngModule.declaredPipes.forEach(function (id) { return _this._loadPipeMetadata(id.reference); });
40218
        }
40219
        return Promise.all(loading);
40220
    };
40221
    CompileMetadataResolver.prototype.getShallowModuleMetadata = function (moduleType) {
40222
        var compileMeta = this._shallowModuleCache.get(moduleType);
40223
        if (compileMeta) {
40224
            return compileMeta;
40225
        }
40226
        var ngModuleMeta = findLast(this._reflector.shallowAnnotations(moduleType), createNgModule.isTypeOf);
40227
        compileMeta = {
40228
            type: this._getTypeMetadata(moduleType),
40229
            rawExports: ngModuleMeta.exports,
40230
            rawImports: ngModuleMeta.imports,
40231
            rawProviders: ngModuleMeta.providers,
40232
        };
40233
        this._shallowModuleCache.set(moduleType, compileMeta);
40234
        return compileMeta;
40235
    };
40236
    CompileMetadataResolver.prototype.getNgModuleMetadata = function (moduleType, throwIfNotFound, alreadyCollecting) {
40237
        var _this = this;
40238
        if (throwIfNotFound === void 0) { throwIfNotFound = true; }
40239
        if (alreadyCollecting === void 0) { alreadyCollecting = null; }
40240
        moduleType = resolveForwardRef(moduleType);
40241
        var compileMeta = this._ngModuleCache.get(moduleType);
40242
        if (compileMeta) {
40243
            return compileMeta;
40244
        }
40245
        var meta = this._ngModuleResolver.resolve(moduleType, throwIfNotFound);
40246
        if (!meta) {
40247
            return null;
40248
        }
40249
        var declaredDirectives = [];
40250
        var exportedNonModuleIdentifiers = [];
40251
        var declaredPipes = [];
40252
        var importedModules = [];
40253
        var exportedModules = [];
40254
        var providers = [];
40255
        var entryComponents = [];
40256
        var bootstrapComponents = [];
40257
        var schemas = [];
40258
        if (meta.imports) {
40259
            flattenAndDedupeArray(meta.imports).forEach(function (importedType) {
40260
                var importedModuleType = undefined;
40261
                if (isValidType(importedType)) {
40262
                    importedModuleType = importedType;
40263
                }
40264
                else if (importedType && importedType.ngModule) {
40265
                    var moduleWithProviders = importedType;
40266
                    importedModuleType = moduleWithProviders.ngModule;
40267
                    if (moduleWithProviders.providers) {
40268
                        providers.push.apply(providers, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(_this._getProvidersMetadata(moduleWithProviders.providers, entryComponents, "provider for the NgModule '" + stringifyType(importedModuleType) + "'", [], importedType)));
40269
                    }
40270
                }
40271
                if (importedModuleType) {
40272
                    if (_this._checkSelfImport(moduleType, importedModuleType))
40273
                        return;
40274
                    if (!alreadyCollecting)
40275
                        alreadyCollecting = new Set();
40276
                    if (alreadyCollecting.has(importedModuleType)) {
40277
                        _this._reportError(syntaxError(_this._getTypeDescriptor(importedModuleType) + " '" + stringifyType(importedType) + "' is imported recursively by the module '" + stringifyType(moduleType) + "'."), moduleType);
40278
                        return;
40279
                    }
40280
                    alreadyCollecting.add(importedModuleType);
40281
                    var importedModuleSummary = _this.getNgModuleSummary(importedModuleType, alreadyCollecting);
40282
                    alreadyCollecting.delete(importedModuleType);
40283
                    if (!importedModuleSummary) {
40284
                        _this._reportError(syntaxError("Unexpected " + _this._getTypeDescriptor(importedType) + " '" + stringifyType(importedType) + "' imported by the module '" + stringifyType(moduleType) + "'. Please add a @NgModule annotation."), moduleType);
40285
                        return;
40286
                    }
40287
                    importedModules.push(importedModuleSummary);
40288
                }
40289
                else {
40290
                    _this._reportError(syntaxError("Unexpected value '" + stringifyType(importedType) + "' imported by the module '" + stringifyType(moduleType) + "'"), moduleType);
40291
                    return;
40292
                }
40293
            });
40294
        }
40295
        if (meta.exports) {
40296
            flattenAndDedupeArray(meta.exports).forEach(function (exportedType) {
40297
                if (!isValidType(exportedType)) {
40298
                    _this._reportError(syntaxError("Unexpected value '" + stringifyType(exportedType) + "' exported by the module '" + stringifyType(moduleType) + "'"), moduleType);
40299
                    return;
40300
                }
40301
                if (!alreadyCollecting)
40302
                    alreadyCollecting = new Set();
40303
                if (alreadyCollecting.has(exportedType)) {
40304
                    _this._reportError(syntaxError(_this._getTypeDescriptor(exportedType) + " '" + stringify(exportedType) + "' is exported recursively by the module '" + stringifyType(moduleType) + "'"), moduleType);
40305
                    return;
40306
                }
40307
                alreadyCollecting.add(exportedType);
40308
                var exportedModuleSummary = _this.getNgModuleSummary(exportedType, alreadyCollecting);
40309
                alreadyCollecting.delete(exportedType);
40310
                if (exportedModuleSummary) {
40311
                    exportedModules.push(exportedModuleSummary);
40312
                }
40313
                else {
40314
                    exportedNonModuleIdentifiers.push(_this._getIdentifierMetadata(exportedType));
40315
                }
40316
            });
40317
        }
40318
        // Note: This will be modified later, so we rely on
40319
        // getting a new instance every time!
40320
        var transitiveModule = this._getTransitiveNgModuleMetadata(importedModules, exportedModules);
40321
        if (meta.declarations) {
40322
            flattenAndDedupeArray(meta.declarations).forEach(function (declaredType) {
40323
                if (!isValidType(declaredType)) {
40324
                    _this._reportError(syntaxError("Unexpected value '" + stringifyType(declaredType) + "' declared by the module '" + stringifyType(moduleType) + "'"), moduleType);
40325
                    return;
40326
                }
40327
                var declaredIdentifier = _this._getIdentifierMetadata(declaredType);
40328
                if (_this.isDirective(declaredType)) {
40329
                    transitiveModule.addDirective(declaredIdentifier);
40330
                    declaredDirectives.push(declaredIdentifier);
40331
                    _this._addTypeToModule(declaredType, moduleType);
40332
                }
40333
                else if (_this.isPipe(declaredType)) {
40334
                    transitiveModule.addPipe(declaredIdentifier);
40335
                    transitiveModule.pipes.push(declaredIdentifier);
40336
                    declaredPipes.push(declaredIdentifier);
40337
                    _this._addTypeToModule(declaredType, moduleType);
40338
                }
40339
                else {
40340
                    _this._reportError(syntaxError("Unexpected " + _this._getTypeDescriptor(declaredType) + " '" + stringifyType(declaredType) + "' declared by the module '" + stringifyType(moduleType) + "'. Please add a @Pipe/@Directive/@Component annotation."), moduleType);
40341
                    return;
40342
                }
40343
            });
40344
        }
40345
        var exportedDirectives = [];
40346
        var exportedPipes = [];
40347
        exportedNonModuleIdentifiers.forEach(function (exportedId) {
40348
            if (transitiveModule.directivesSet.has(exportedId.reference)) {
40349
                exportedDirectives.push(exportedId);
40350
                transitiveModule.addExportedDirective(exportedId);
40351
            }
40352
            else if (transitiveModule.pipesSet.has(exportedId.reference)) {
40353
                exportedPipes.push(exportedId);
40354
                transitiveModule.addExportedPipe(exportedId);
40355
            }
40356
            else {
40357
                _this._reportError(syntaxError("Can't export " + _this._getTypeDescriptor(exportedId.reference) + " " + stringifyType(exportedId.reference) + " from " + stringifyType(moduleType) + " as it was neither declared nor imported!"), moduleType);
40358
                return;
40359
            }
40360
        });
40361
        // The providers of the module have to go last
40362
        // so that they overwrite any other provider we already added.
40363
        if (meta.providers) {
40364
            providers.push.apply(providers, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(this._getProvidersMetadata(meta.providers, entryComponents, "provider for the NgModule '" + stringifyType(moduleType) + "'", [], moduleType)));
40365
        }
40366
        if (meta.entryComponents) {
40367
            entryComponents.push.apply(entryComponents, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(flattenAndDedupeArray(meta.entryComponents)
40368
                .map(function (type) { return _this._getEntryComponentMetadata(type); })));
40369
        }
40370
        if (meta.bootstrap) {
40371
            flattenAndDedupeArray(meta.bootstrap).forEach(function (type) {
40372
                if (!isValidType(type)) {
40373
                    _this._reportError(syntaxError("Unexpected value '" + stringifyType(type) + "' used in the bootstrap property of module '" + stringifyType(moduleType) + "'"), moduleType);
40374
                    return;
40375
                }
40376
                bootstrapComponents.push(_this._getIdentifierMetadata(type));
40377
            });
40378
        }
40379
        entryComponents.push.apply(entryComponents, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(bootstrapComponents.map(function (type) { return _this._getEntryComponentMetadata(type.reference); })));
40380
        if (meta.schemas) {
40381
            schemas.push.apply(schemas, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(flattenAndDedupeArray(meta.schemas)));
40382
        }
40383
        compileMeta = new CompileNgModuleMetadata({
40384
            type: this._getTypeMetadata(moduleType),
40385
            providers: providers,
40386
            entryComponents: entryComponents,
40387
            bootstrapComponents: bootstrapComponents,
40388
            schemas: schemas,
40389
            declaredDirectives: declaredDirectives,
40390
            exportedDirectives: exportedDirectives,
40391
            declaredPipes: declaredPipes,
40392
            exportedPipes: exportedPipes,
40393
            importedModules: importedModules,
40394
            exportedModules: exportedModules,
40395
            transitiveModule: transitiveModule,
40396
            id: meta.id || null,
40397
        });
40398
        entryComponents.forEach(function (id) { return transitiveModule.addEntryComponent(id); });
40399
        providers.forEach(function (provider) { return transitiveModule.addProvider(provider, compileMeta.type); });
40400
        transitiveModule.addModule(compileMeta.type);
40401
        this._ngModuleCache.set(moduleType, compileMeta);
40402
        return compileMeta;
40403
    };
40404
    CompileMetadataResolver.prototype._checkSelfImport = function (moduleType, importedModuleType) {
40405
        if (moduleType === importedModuleType) {
40406
            this._reportError(syntaxError("'" + stringifyType(moduleType) + "' module can't import itself"), moduleType);
40407
            return true;
40408
        }
40409
        return false;
40410
    };
40411
    CompileMetadataResolver.prototype._getTypeDescriptor = function (type) {
40412
        if (isValidType(type)) {
40413
            if (this.isDirective(type)) {
40414
                return 'directive';
40415
            }
40416
            if (this.isPipe(type)) {
40417
                return 'pipe';
40418
            }
40419
            if (this.isNgModule(type)) {
40420
                return 'module';
40421
            }
40422
        }
40423
        if (type.provide) {
40424
            return 'provider';
40425
        }
40426
        return 'value';
40427
    };
40428
    CompileMetadataResolver.prototype._addTypeToModule = function (type, moduleType) {
40429
        var oldModule = this._ngModuleOfTypes.get(type);
40430
        if (oldModule && oldModule !== moduleType) {
40431
            this._reportError(syntaxError("Type " + stringifyType(type) + " is part of the declarations of 2 modules: " + stringifyType(oldModule) + " and " + stringifyType(moduleType) + "! " +
40432
                ("Please consider moving " + stringifyType(type) + " to a higher module that imports " + stringifyType(oldModule) + " and " + stringifyType(moduleType) + ". ") +
40433
                ("You can also create a new NgModule that exports and includes " + stringifyType(type) + " then import that NgModule in " + stringifyType(oldModule) + " and " + stringifyType(moduleType) + ".")), moduleType);
40434
            return;
40435
        }
40436
        this._ngModuleOfTypes.set(type, moduleType);
40437
    };
40438
    CompileMetadataResolver.prototype._getTransitiveNgModuleMetadata = function (importedModules, exportedModules) {
40439
        // collect `providers` / `entryComponents` from all imported and all exported modules
40440
        var result = new TransitiveCompileNgModuleMetadata();
40441
        var modulesByToken = new Map();
40442
        importedModules.concat(exportedModules).forEach(function (modSummary) {
40443
            modSummary.modules.forEach(function (mod) { return result.addModule(mod); });
40444
            modSummary.entryComponents.forEach(function (comp) { return result.addEntryComponent(comp); });
40445
            var addedTokens = new Set();
40446
            modSummary.providers.forEach(function (entry) {
40447
                var tokenRef = tokenReference(entry.provider.token);
40448
                var prevModules = modulesByToken.get(tokenRef);
40449
                if (!prevModules) {
40450
                    prevModules = new Set();
40451
                    modulesByToken.set(tokenRef, prevModules);
40452
                }
40453
                var moduleRef = entry.module.reference;
40454
                // Note: the providers of one module may still contain multiple providers
40455
                // per token (e.g. for multi providers), and we need to preserve these.
40456
                if (addedTokens.has(tokenRef) || !prevModules.has(moduleRef)) {
40457
                    prevModules.add(moduleRef);
40458
                    addedTokens.add(tokenRef);
40459
                    result.addProvider(entry.provider, entry.module);
40460
                }
40461
            });
40462
        });
40463
        exportedModules.forEach(function (modSummary) {
40464
            modSummary.exportedDirectives.forEach(function (id) { return result.addExportedDirective(id); });
40465
            modSummary.exportedPipes.forEach(function (id) { return result.addExportedPipe(id); });
40466
        });
40467
        importedModules.forEach(function (modSummary) {
40468
            modSummary.exportedDirectives.forEach(function (id) { return result.addDirective(id); });
40469
            modSummary.exportedPipes.forEach(function (id) { return result.addPipe(id); });
40470
        });
40471
        return result;
40472
    };
40473
    CompileMetadataResolver.prototype._getIdentifierMetadata = function (type) {
40474
        type = resolveForwardRef(type);
40475
        return { reference: type };
40476
    };
40477
    CompileMetadataResolver.prototype.isInjectable = function (type) {
40478
        var annotations = this._reflector.tryAnnotations(type);
40479
        return annotations.some(function (ann) { return createInjectable.isTypeOf(ann); });
40480
    };
40481
    CompileMetadataResolver.prototype.getInjectableSummary = function (type) {
40482
        return {
40483
            summaryKind: CompileSummaryKind.Injectable,
40484
            type: this._getTypeMetadata(type, null, false)
40485
        };
40486
    };
40487
    CompileMetadataResolver.prototype.getInjectableMetadata = function (type, dependencies, throwOnUnknownDeps) {
40488
        if (dependencies === void 0) { dependencies = null; }
40489
        if (throwOnUnknownDeps === void 0) { throwOnUnknownDeps = true; }
40490
        var typeSummary = this._loadSummary(type, CompileSummaryKind.Injectable);
40491
        var typeMetadata = typeSummary ?
40492
            typeSummary.type :
40493
            this._getTypeMetadata(type, dependencies, throwOnUnknownDeps);
40494
        var annotations = this._reflector.annotations(type).filter(function (ann) { return createInjectable.isTypeOf(ann); });
40495
        if (annotations.length === 0) {
40496
            return null;
40497
        }
40498
        var meta = annotations[annotations.length - 1];
40499
        return {
40500
            symbol: type,
40501
            type: typeMetadata,
40502
            providedIn: meta.providedIn,
40503
            useValue: meta.useValue,
40504
            useClass: meta.useClass,
40505
            useExisting: meta.useExisting,
40506
            useFactory: meta.useFactory,
40507
            deps: meta.deps,
40508
        };
40509
    };
40510
    CompileMetadataResolver.prototype._getTypeMetadata = function (type, dependencies, throwOnUnknownDeps) {
40511
        if (dependencies === void 0) { dependencies = null; }
40512
        if (throwOnUnknownDeps === void 0) { throwOnUnknownDeps = true; }
40513
        var identifier = this._getIdentifierMetadata(type);
40514
        return {
40515
            reference: identifier.reference,
40516
            diDeps: this._getDependenciesMetadata(identifier.reference, dependencies, throwOnUnknownDeps),
40517
            lifecycleHooks: getAllLifecycleHooks(this._reflector, identifier.reference),
40518
        };
40519
    };
40520
    CompileMetadataResolver.prototype._getFactoryMetadata = function (factory, dependencies) {
40521
        if (dependencies === void 0) { dependencies = null; }
40522
        factory = resolveForwardRef(factory);
40523
        return { reference: factory, diDeps: this._getDependenciesMetadata(factory, dependencies) };
40524
    };
40525
    /**
40526
     * Gets the metadata for the given pipe.
40527
     * This assumes `loadNgModuleDirectiveAndPipeMetadata` has been called first.
40528
     */
40529
    CompileMetadataResolver.prototype.getPipeMetadata = function (pipeType) {
40530
        var pipeMeta = this._pipeCache.get(pipeType);
40531
        if (!pipeMeta) {
40532
            this._reportError(syntaxError("Illegal state: getPipeMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Pipe " + stringifyType(pipeType) + "."), pipeType);
40533
        }
40534
        return pipeMeta || null;
40535
    };
40536
    CompileMetadataResolver.prototype.getPipeSummary = function (pipeType) {
40537
        var pipeSummary = this._loadSummary(pipeType, CompileSummaryKind.Pipe);
40538
        if (!pipeSummary) {
40539
            this._reportError(syntaxError("Illegal state: Could not load the summary for pipe " + stringifyType(pipeType) + "."), pipeType);
40540
        }
40541
        return pipeSummary;
40542
    };
40543
    CompileMetadataResolver.prototype.getOrLoadPipeMetadata = function (pipeType) {
40544
        var pipeMeta = this._pipeCache.get(pipeType);
40545
        if (!pipeMeta) {
40546
            pipeMeta = this._loadPipeMetadata(pipeType);
40547
        }
40548
        return pipeMeta;
40549
    };
40550
    CompileMetadataResolver.prototype._loadPipeMetadata = function (pipeType) {
40551
        pipeType = resolveForwardRef(pipeType);
40552
        var pipeAnnotation = this._pipeResolver.resolve(pipeType);
40553
        var pipeMeta = new CompilePipeMetadata({
40554
            type: this._getTypeMetadata(pipeType),
40555
            name: pipeAnnotation.name,
40556
            pure: !!pipeAnnotation.pure
40557
        });
40558
        this._pipeCache.set(pipeType, pipeMeta);
40559
        this._summaryCache.set(pipeType, pipeMeta.toSummary());
40560
        return pipeMeta;
40561
    };
40562
    CompileMetadataResolver.prototype._getDependenciesMetadata = function (typeOrFunc, dependencies, throwOnUnknownDeps) {
40563
        var _this = this;
40564
        if (throwOnUnknownDeps === void 0) { throwOnUnknownDeps = true; }
40565
        var hasUnknownDeps = false;
40566
        var params = dependencies || this._reflector.parameters(typeOrFunc) || [];
40567
        var dependenciesMetadata = params.map(function (param) {
40568
            var isAttribute = false;
40569
            var isHost = false;
40570
            var isSelf = false;
40571
            var isSkipSelf = false;
40572
            var isOptional = false;
40573
            var token = null;
40574
            if (Array.isArray(param)) {
40575
                param.forEach(function (paramEntry) {
40576
                    if (createHost.isTypeOf(paramEntry)) {
40577
                        isHost = true;
40578
                    }
40579
                    else if (createSelf.isTypeOf(paramEntry)) {
40580
                        isSelf = true;
40581
                    }
40582
                    else if (createSkipSelf.isTypeOf(paramEntry)) {
40583
                        isSkipSelf = true;
40584
                    }
40585
                    else if (createOptional.isTypeOf(paramEntry)) {
40586
                        isOptional = true;
40587
                    }
40588
                    else if (createAttribute.isTypeOf(paramEntry)) {
40589
                        isAttribute = true;
40590
                        token = paramEntry.attributeName;
40591
                    }
40592
                    else if (createInject.isTypeOf(paramEntry)) {
40593
                        token = paramEntry.token;
40594
                    }
40595
                    else if (createInjectionToken.isTypeOf(paramEntry) || paramEntry instanceof StaticSymbol) {
40596
                        token = paramEntry;
40597
                    }
40598
                    else if (isValidType(paramEntry) && token == null) {
40599
                        token = paramEntry;
40600
                    }
40601
                });
40602
            }
40603
            else {
40604
                token = param;
40605
            }
40606
            if (token == null) {
40607
                hasUnknownDeps = true;
40608
                return null;
40609
            }
40610
            return {
40611
                isAttribute: isAttribute,
40612
                isHost: isHost,
40613
                isSelf: isSelf,
40614
                isSkipSelf: isSkipSelf,
40615
                isOptional: isOptional,
40616
                token: _this._getTokenMetadata(token)
40617
            };
40618
        });
40619
        if (hasUnknownDeps) {
40620
            var depsTokens = dependenciesMetadata.map(function (dep) { return dep ? stringifyType(dep.token) : '?'; }).join(', ');
40621
            var message = "Can't resolve all parameters for " + stringifyType(typeOrFunc) + ": (" + depsTokens + ").";
40622
            if (throwOnUnknownDeps || this._config.strictInjectionParameters) {
40623
                this._reportError(syntaxError(message), typeOrFunc);
40624
            }
40625
            else {
40626
                this._console.warn("Warning: " + message + " This will become an error in Angular v6.x");
40627
            }
40628
        }
40629
        return dependenciesMetadata;
40630
    };
40631
    CompileMetadataResolver.prototype._getTokenMetadata = function (token) {
40632
        token = resolveForwardRef(token);
40633
        var compileToken;
40634
        if (typeof token === 'string') {
40635
            compileToken = { value: token };
40636
        }
40637
        else {
40638
            compileToken = { identifier: { reference: token } };
40639
        }
40640
        return compileToken;
40641
    };
40642
    CompileMetadataResolver.prototype._getProvidersMetadata = function (providers, targetEntryComponents, debugInfo, compileProviders, type) {
40643
        var _this = this;
40644
        if (compileProviders === void 0) { compileProviders = []; }
40645
        providers.forEach(function (provider, providerIdx) {
40646
            if (Array.isArray(provider)) {
40647
                _this._getProvidersMetadata(provider, targetEntryComponents, debugInfo, compileProviders);
40648
            }
40649
            else {
40650
                provider = resolveForwardRef(provider);
40651
                var providerMeta = undefined;
40652
                if (provider && typeof provider === 'object' && provider.hasOwnProperty('provide')) {
40653
                    _this._validateProvider(provider);
40654
                    providerMeta = new ProviderMeta(provider.provide, provider);
40655
                }
40656
                else if (isValidType(provider)) {
40657
                    providerMeta = new ProviderMeta(provider, { useClass: provider });
40658
                }
40659
                else if (provider === void 0) {
40660
                    _this._reportError(syntaxError("Encountered undefined provider! Usually this means you have a circular dependencies (might be caused by using 'barrel' index.ts files."));
40661
                    return;
40662
                }
40663
                else {
40664
                    var providersInfo = providers.reduce(function (soFar, seenProvider, seenProviderIdx) {
40665
                        if (seenProviderIdx < providerIdx) {
40666
                            soFar.push("" + stringifyType(seenProvider));
40667
                        }
40668
                        else if (seenProviderIdx == providerIdx) {
40669
                            soFar.push("?" + stringifyType(seenProvider) + "?");
40670
                        }
40671
                        else if (seenProviderIdx == providerIdx + 1) {
40672
                            soFar.push('...');
40673
                        }
40674
                        return soFar;
40675
                    }, [])
40676
                        .join(', ');
40677
                    _this._reportError(syntaxError("Invalid " + (debugInfo ? debugInfo : 'provider') + " - only instances of Provider and Type are allowed, got: [" + providersInfo + "]"), type);
40678
                    return;
40679
                }
40680
                if (providerMeta.token ===
40681
                    _this._reflector.resolveExternalReference(Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS)) {
40682
                    targetEntryComponents.push.apply(targetEntryComponents, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(_this._getEntryComponentsFromProvider(providerMeta, type)));
40683
                }
40684
                else {
40685
                    compileProviders.push(_this.getProviderMetadata(providerMeta));
40686
                }
40687
            }
40688
        });
40689
        return compileProviders;
40690
    };
40691
    CompileMetadataResolver.prototype._validateProvider = function (provider) {
40692
        if (provider.hasOwnProperty('useClass') && provider.useClass == null) {
40693
            this._reportError(syntaxError("Invalid provider for " + stringifyType(provider.provide) + ". useClass cannot be " + provider.useClass + ".\n           Usually it happens when:\n           1. There's a circular dependency (might be caused by using index.ts (barrel) files).\n           2. Class was used before it was declared. Use forwardRef in this case."));
40694
        }
40695
    };
40696
    CompileMetadataResolver.prototype._getEntryComponentsFromProvider = function (provider, type) {
40697
        var _this = this;
40698
        var components = [];
40699
        var collectedIdentifiers = [];
40700
        if (provider.useFactory || provider.useExisting || provider.useClass) {
40701
            this._reportError(syntaxError("The ANALYZE_FOR_ENTRY_COMPONENTS token only supports useValue!"), type);
40702
            return [];
40703
        }
40704
        if (!provider.multi) {
40705
            this._reportError(syntaxError("The ANALYZE_FOR_ENTRY_COMPONENTS token only supports 'multi = true'!"), type);
40706
            return [];
40707
        }
40708
        extractIdentifiers(provider.useValue, collectedIdentifiers);
40709
        collectedIdentifiers.forEach(function (identifier) {
40710
            var entry = _this._getEntryComponentMetadata(identifier.reference, false);
40711
            if (entry) {
40712
                components.push(entry);
40713
            }
40714
        });
40715
        return components;
40716
    };
40717
    CompileMetadataResolver.prototype._getEntryComponentMetadata = function (dirType, throwIfNotFound) {
40718
        if (throwIfNotFound === void 0) { throwIfNotFound = true; }
40719
        var dirMeta = this.getNonNormalizedDirectiveMetadata(dirType);
40720
        if (dirMeta && dirMeta.metadata.isComponent) {
40721
            return { componentType: dirType, componentFactory: dirMeta.metadata.componentFactory };
40722
        }
40723
        var dirSummary = this._loadSummary(dirType, CompileSummaryKind.Directive);
40724
        if (dirSummary && dirSummary.isComponent) {
40725
            return { componentType: dirType, componentFactory: dirSummary.componentFactory };
40726
        }
40727
        if (throwIfNotFound) {
40728
            throw syntaxError(dirType.name + " cannot be used as an entry component.");
40729
        }
40730
        return null;
40731
    };
40732
    CompileMetadataResolver.prototype._getInjectableTypeMetadata = function (type, dependencies) {
40733
        if (dependencies === void 0) { dependencies = null; }
40734
        var typeSummary = this._loadSummary(type, CompileSummaryKind.Injectable);
40735
        if (typeSummary) {
40736
            return typeSummary.type;
40737
        }
40738
        return this._getTypeMetadata(type, dependencies);
40739
    };
40740
    CompileMetadataResolver.prototype.getProviderMetadata = function (provider) {
40741
        var compileDeps = undefined;
40742
        var compileTypeMetadata = null;
40743
        var compileFactoryMetadata = null;
40744
        var token = this._getTokenMetadata(provider.token);
40745
        if (provider.useClass) {
40746
            compileTypeMetadata =
40747
                this._getInjectableTypeMetadata(provider.useClass, provider.dependencies);
40748
            compileDeps = compileTypeMetadata.diDeps;
40749
            if (provider.token === provider.useClass) {
40750
                // use the compileTypeMetadata as it contains information about lifecycleHooks...
40751
                token = { identifier: compileTypeMetadata };
40752
            }
40753
        }
40754
        else if (provider.useFactory) {
40755
            compileFactoryMetadata = this._getFactoryMetadata(provider.useFactory, provider.dependencies);
40756
            compileDeps = compileFactoryMetadata.diDeps;
40757
        }
40758
        return {
40759
            token: token,
40760
            useClass: compileTypeMetadata,
40761
            useValue: provider.useValue,
40762
            useFactory: compileFactoryMetadata,
40763
            useExisting: provider.useExisting ? this._getTokenMetadata(provider.useExisting) : undefined,
40764
            deps: compileDeps,
40765
            multi: provider.multi
40766
        };
40767
    };
40768
    CompileMetadataResolver.prototype._getQueriesMetadata = function (queries, isViewQuery, directiveType) {
40769
        var _this = this;
40770
        var res = [];
40771
        Object.keys(queries).forEach(function (propertyName) {
40772
            var query = queries[propertyName];
40773
            if (query.isViewQuery === isViewQuery) {
40774
                res.push(_this._getQueryMetadata(query, propertyName, directiveType));
40775
            }
40776
        });
40777
        return res;
40778
    };
40779
    CompileMetadataResolver.prototype._queryVarBindings = function (selector) { return selector.split(/\s*,\s*/); };
40780
    CompileMetadataResolver.prototype._getQueryMetadata = function (q, propertyName, typeOrFunc) {
40781
        var _this = this;
40782
        var selectors;
40783
        if (typeof q.selector === 'string') {
40784
            selectors =
40785
                this._queryVarBindings(q.selector).map(function (varName) { return _this._getTokenMetadata(varName); });
40786
        }
40787
        else {
40788
            if (!q.selector) {
40789
                this._reportError(syntaxError("Can't construct a query for the property \"" + propertyName + "\" of \"" + stringifyType(typeOrFunc) + "\" since the query selector wasn't defined."), typeOrFunc);
40790
                selectors = [];
40791
            }
40792
            else {
40793
                selectors = [this._getTokenMetadata(q.selector)];
40794
            }
40795
        }
40796
        return {
40797
            selectors: selectors,
40798
            first: q.first,
40799
            descendants: q.descendants, propertyName: propertyName,
40800
            read: q.read ? this._getTokenMetadata(q.read) : null
40801
        };
40802
    };
40803
    CompileMetadataResolver.prototype._reportError = function (error$$1, type, otherType) {
40804
        if (this._errorCollector) {
40805
            this._errorCollector(error$$1, type);
40806
            if (otherType) {
40807
                this._errorCollector(error$$1, otherType);
40808
            }
40809
        }
40810
        else {
40811
            throw error$$1;
40812
        }
40813
    };
40814
    return CompileMetadataResolver;
40815
}());
40816
function flattenArray(tree, out) {
40817
    if (out === void 0) { out = []; }
40818
    if (tree) {
40819
        for (var i = 0; i < tree.length; i++) {
40820
            var item = resolveForwardRef(tree[i]);
40821
            if (Array.isArray(item)) {
40822
                flattenArray(item, out);
40823
            }
40824
            else {
40825
                out.push(item);
40826
            }
40827
        }
40828
    }
40829
    return out;
40830
}
40831
function dedupeArray(array) {
40832
    if (array) {
40833
        return Array.from(new Set(array));
40834
    }
40835
    return [];
40836
}
40837
function flattenAndDedupeArray(tree) {
40838
    return dedupeArray(flattenArray(tree));
40839
}
40840
function isValidType(value) {
40841
    return (value instanceof StaticSymbol) || (value instanceof Type);
40842
}
40843
function extractIdentifiers(value, targetIdentifiers) {
40844
    visitValue(value, new _CompileValueConverter(), targetIdentifiers);
40845
}
40846
var _CompileValueConverter = /** @class */ (function (_super) {
40847
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(_CompileValueConverter, _super);
40848
    function _CompileValueConverter() {
40849
        return _super !== null && _super.apply(this, arguments) || this;
40850
    }
40851
    _CompileValueConverter.prototype.visitOther = function (value, targetIdentifiers) {
40852
        targetIdentifiers.push({ reference: value });
40853
    };
40854
    return _CompileValueConverter;
40855
}(ValueTransformer));
40856
function stringifyType(type) {
40857
    if (type instanceof StaticSymbol) {
40858
        return type.name + " in " + type.filePath;
40859
    }
40860
    else {
40861
        return stringify(type);
40862
    }
40863
}
40864
/**
40865
 * Indicates that a component is still being loaded in a synchronous compile.
40866
 */
40867
function componentStillLoadingError(compType) {
40868
    var error$$1 = Error("Can't compile synchronously as " + stringify(compType) + " is still being loaded!");
40869
    error$$1[ERROR_COMPONENT_TYPE] = compType;
40870
    return error$$1;
40871
}
40872
 
40873
/**
40874
 * @license
40875
 * Copyright Google Inc. All Rights Reserved.
40876
 *
40877
 * Use of this source code is governed by an MIT-style license that can be
40878
 * found in the LICENSE file at https://angular.io/license
40879
 */
40880
var ProviderError = /** @class */ (function (_super) {
40881
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ProviderError, _super);
40882
    function ProviderError(message, span) {
40883
        return _super.call(this, span, message) || this;
40884
    }
40885
    return ProviderError;
40886
}(ParseError));
40887
var ProviderViewContext = /** @class */ (function () {
40888
    function ProviderViewContext(reflector, component) {
40889
        var _this = this;
40890
        this.reflector = reflector;
40891
        this.component = component;
40892
        this.errors = [];
40893
        this.viewQueries = _getViewQueries(component);
40894
        this.viewProviders = new Map();
40895
        component.viewProviders.forEach(function (provider) {
40896
            if (_this.viewProviders.get(tokenReference(provider.token)) == null) {
40897
                _this.viewProviders.set(tokenReference(provider.token), true);
40898
            }
40899
        });
40900
    }
40901
    return ProviderViewContext;
40902
}());
40903
var ProviderElementContext = /** @class */ (function () {
40904
    function ProviderElementContext(viewContext, _parent, _isViewRoot, _directiveAsts, attrs, refs, isTemplate, contentQueryStartId, _sourceSpan) {
40905
        var _this = this;
40906
        this.viewContext = viewContext;
40907
        this._parent = _parent;
40908
        this._isViewRoot = _isViewRoot;
40909
        this._directiveAsts = _directiveAsts;
40910
        this._sourceSpan = _sourceSpan;
40911
        this._transformedProviders = new Map();
40912
        this._seenProviders = new Map();
40913
        this._queriedTokens = new Map();
40914
        this.transformedHasViewContainer = false;
40915
        this._attrs = {};
40916
        attrs.forEach(function (attrAst) { return _this._attrs[attrAst.name] = attrAst.value; });
40917
        var directivesMeta = _directiveAsts.map(function (directiveAst) { return directiveAst.directive; });
40918
        this._allProviders =
40919
            _resolveProvidersFromDirectives(directivesMeta, _sourceSpan, viewContext.errors);
40920
        this._contentQueries = _getContentQueries(contentQueryStartId, directivesMeta);
40921
        Array.from(this._allProviders.values()).forEach(function (provider) {
40922
            _this._addQueryReadsTo(provider.token, provider.token, _this._queriedTokens);
40923
        });
40924
        if (isTemplate) {
40925
            var templateRefId = createTokenForExternalReference(this.viewContext.reflector, Identifiers.TemplateRef);
40926
            this._addQueryReadsTo(templateRefId, templateRefId, this._queriedTokens);
40927
        }
40928
        refs.forEach(function (refAst) {
40929
            var defaultQueryValue = refAst.value ||
40930
                createTokenForExternalReference(_this.viewContext.reflector, Identifiers.ElementRef);
40931
            _this._addQueryReadsTo({ value: refAst.name }, defaultQueryValue, _this._queriedTokens);
40932
        });
40933
        if (this._queriedTokens.get(this.viewContext.reflector.resolveExternalReference(Identifiers.ViewContainerRef))) {
40934
            this.transformedHasViewContainer = true;
40935
        }
40936
        // create the providers that we know are eager first
40937
        Array.from(this._allProviders.values()).forEach(function (provider) {
40938
            var eager = provider.eager || _this._queriedTokens.get(tokenReference(provider.token));
40939
            if (eager) {
40940
                _this._getOrCreateLocalProvider(provider.providerType, provider.token, true);
40941
            }
40942
        });
40943
    }
40944
    ProviderElementContext.prototype.afterElement = function () {
40945
        var _this = this;
40946
        // collect lazy providers
40947
        Array.from(this._allProviders.values()).forEach(function (provider) {
40948
            _this._getOrCreateLocalProvider(provider.providerType, provider.token, false);
40949
        });
40950
    };
40951
    Object.defineProperty(ProviderElementContext.prototype, "transformProviders", {
40952
        get: function () {
40953
            // Note: Maps keep their insertion order.
40954
            var lazyProviders = [];
40955
            var eagerProviders = [];
40956
            this._transformedProviders.forEach(function (provider) {
40957
                if (provider.eager) {
40958
                    eagerProviders.push(provider);
40959
                }
40960
                else {
40961
                    lazyProviders.push(provider);
40962
                }
40963
            });
40964
            return lazyProviders.concat(eagerProviders);
40965
        },
40966
        enumerable: true,
40967
        configurable: true
40968
    });
40969
    Object.defineProperty(ProviderElementContext.prototype, "transformedDirectiveAsts", {
40970
        get: function () {
40971
            var sortedProviderTypes = this.transformProviders.map(function (provider) { return provider.token.identifier; });
40972
            var sortedDirectives = this._directiveAsts.slice();
40973
            sortedDirectives.sort(function (dir1, dir2) { return sortedProviderTypes.indexOf(dir1.directive.type) -
40974
                sortedProviderTypes.indexOf(dir2.directive.type); });
40975
            return sortedDirectives;
40976
        },
40977
        enumerable: true,
40978
        configurable: true
40979
    });
40980
    Object.defineProperty(ProviderElementContext.prototype, "queryMatches", {
40981
        get: function () {
40982
            var allMatches = [];
40983
            this._queriedTokens.forEach(function (matches) { allMatches.push.apply(allMatches, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(matches)); });
40984
            return allMatches;
40985
        },
40986
        enumerable: true,
40987
        configurable: true
40988
    });
40989
    ProviderElementContext.prototype._addQueryReadsTo = function (token, defaultValue, queryReadTokens) {
40990
        this._getQueriesFor(token).forEach(function (query) {
40991
            var queryValue = query.meta.read || defaultValue;
40992
            var tokenRef = tokenReference(queryValue);
40993
            var queryMatches = queryReadTokens.get(tokenRef);
40994
            if (!queryMatches) {
40995
                queryMatches = [];
40996
                queryReadTokens.set(tokenRef, queryMatches);
40997
            }
40998
            queryMatches.push({ queryId: query.queryId, value: queryValue });
40999
        });
41000
    };
41001
    ProviderElementContext.prototype._getQueriesFor = function (token) {
41002
        var result = [];
41003
        var currentEl = this;
41004
        var distance = 0;
41005
        var queries;
41006
        while (currentEl !== null) {
41007
            queries = currentEl._contentQueries.get(tokenReference(token));
41008
            if (queries) {
41009
                result.push.apply(result, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(queries.filter(function (query) { return query.meta.descendants || distance <= 1; })));
41010
            }
41011
            if (currentEl._directiveAsts.length > 0) {
41012
                distance++;
41013
            }
41014
            currentEl = currentEl._parent;
41015
        }
41016
        queries = this.viewContext.viewQueries.get(tokenReference(token));
41017
        if (queries) {
41018
            result.push.apply(result, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(queries));
41019
        }
41020
        return result;
41021
    };
41022
    ProviderElementContext.prototype._getOrCreateLocalProvider = function (requestingProviderType, token, eager) {
41023
        var _this = this;
41024
        var resolvedProvider = this._allProviders.get(tokenReference(token));
41025
        if (!resolvedProvider || ((requestingProviderType === ProviderAstType.Directive ||
41026
            requestingProviderType === ProviderAstType.PublicService) &&
41027
            resolvedProvider.providerType === ProviderAstType.PrivateService) ||
41028
            ((requestingProviderType === ProviderAstType.PrivateService ||
41029
                requestingProviderType === ProviderAstType.PublicService) &&
41030
                resolvedProvider.providerType === ProviderAstType.Builtin)) {
41031
            return null;
41032
        }
41033
        var transformedProviderAst = this._transformedProviders.get(tokenReference(token));
41034
        if (transformedProviderAst) {
41035
            return transformedProviderAst;
41036
        }
41037
        if (this._seenProviders.get(tokenReference(token)) != null) {
41038
            this.viewContext.errors.push(new ProviderError("Cannot instantiate cyclic dependency! " + tokenName(token), this._sourceSpan));
41039
            return null;
41040
        }
41041
        this._seenProviders.set(tokenReference(token), true);
41042
        var transformedProviders = resolvedProvider.providers.map(function (provider) {
41043
            var transformedUseValue = provider.useValue;
41044
            var transformedUseExisting = provider.useExisting;
41045
            var transformedDeps = undefined;
41046
            if (provider.useExisting != null) {
41047
                var existingDiDep = _this._getDependency(resolvedProvider.providerType, { token: provider.useExisting }, eager);
41048
                if (existingDiDep.token != null) {
41049
                    transformedUseExisting = existingDiDep.token;
41050
                }
41051
                else {
41052
                    transformedUseExisting = null;
41053
                    transformedUseValue = existingDiDep.value;
41054
                }
41055
            }
41056
            else if (provider.useFactory) {
41057
                var deps = provider.deps || provider.useFactory.diDeps;
41058
                transformedDeps =
41059
                    deps.map(function (dep) { return _this._getDependency(resolvedProvider.providerType, dep, eager); });
41060
            }
41061
            else if (provider.useClass) {
41062
                var deps = provider.deps || provider.useClass.diDeps;
41063
                transformedDeps =
41064
                    deps.map(function (dep) { return _this._getDependency(resolvedProvider.providerType, dep, eager); });
41065
            }
41066
            return _transformProvider(provider, {
41067
                useExisting: transformedUseExisting,
41068
                useValue: transformedUseValue,
41069
                deps: transformedDeps
41070
            });
41071
        });
41072
        transformedProviderAst =
41073
            _transformProviderAst(resolvedProvider, { eager: eager, providers: transformedProviders });
41074
        this._transformedProviders.set(tokenReference(token), transformedProviderAst);
41075
        return transformedProviderAst;
41076
    };
41077
    ProviderElementContext.prototype._getLocalDependency = function (requestingProviderType, dep, eager) {
41078
        if (eager === void 0) { eager = false; }
41079
        if (dep.isAttribute) {
41080
            var attrValue = this._attrs[dep.token.value];
41081
            return { isValue: true, value: attrValue == null ? null : attrValue };
41082
        }
41083
        if (dep.token != null) {
41084
            // access builtints
41085
            if ((requestingProviderType === ProviderAstType.Directive ||
41086
                requestingProviderType === ProviderAstType.Component)) {
41087
                if (tokenReference(dep.token) ===
41088
                    this.viewContext.reflector.resolveExternalReference(Identifiers.Renderer) ||
41089
                    tokenReference(dep.token) ===
41090
                        this.viewContext.reflector.resolveExternalReference(Identifiers.ElementRef) ||
41091
                    tokenReference(dep.token) ===
41092
                        this.viewContext.reflector.resolveExternalReference(Identifiers.ChangeDetectorRef) ||
41093
                    tokenReference(dep.token) ===
41094
                        this.viewContext.reflector.resolveExternalReference(Identifiers.TemplateRef)) {
41095
                    return dep;
41096
                }
41097
                if (tokenReference(dep.token) ===
41098
                    this.viewContext.reflector.resolveExternalReference(Identifiers.ViewContainerRef)) {
41099
                    this.transformedHasViewContainer = true;
41100
                }
41101
            }
41102
            // access the injector
41103
            if (tokenReference(dep.token) ===
41104
                this.viewContext.reflector.resolveExternalReference(Identifiers.Injector)) {
41105
                return dep;
41106
            }
41107
            // access providers
41108
            if (this._getOrCreateLocalProvider(requestingProviderType, dep.token, eager) != null) {
41109
                return dep;
41110
            }
41111
        }
41112
        return null;
41113
    };
41114
    ProviderElementContext.prototype._getDependency = function (requestingProviderType, dep, eager) {
41115
        if (eager === void 0) { eager = false; }
41116
        var currElement = this;
41117
        var currEager = eager;
41118
        var result = null;
41119
        if (!dep.isSkipSelf) {
41120
            result = this._getLocalDependency(requestingProviderType, dep, eager);
41121
        }
41122
        if (dep.isSelf) {
41123
            if (!result && dep.isOptional) {
41124
                result = { isValue: true, value: null };
41125
            }
41126
        }
41127
        else {
41128
            // check parent elements
41129
            while (!result && currElement._parent) {
41130
                var prevElement = currElement;
41131
                currElement = currElement._parent;
41132
                if (prevElement._isViewRoot) {
41133
                    currEager = false;
41134
                }
41135
                result = currElement._getLocalDependency(ProviderAstType.PublicService, dep, currEager);
41136
            }
41137
            // check @Host restriction
41138
            if (!result) {
41139
                if (!dep.isHost || this.viewContext.component.isHost ||
41140
                    this.viewContext.component.type.reference === tokenReference(dep.token) ||
41141
                    this.viewContext.viewProviders.get(tokenReference(dep.token)) != null) {
41142
                    result = dep;
41143
                }
41144
                else {
41145
                    result = dep.isOptional ? { isValue: true, value: null } : null;
41146
                }
41147
            }
41148
        }
41149
        if (!result) {
41150
            this.viewContext.errors.push(new ProviderError("No provider for " + tokenName(dep.token), this._sourceSpan));
41151
        }
41152
        return result;
41153
    };
41154
    return ProviderElementContext;
41155
}());
41156
var NgModuleProviderAnalyzer = /** @class */ (function () {
41157
    function NgModuleProviderAnalyzer(reflector, ngModule, extraProviders, sourceSpan) {
41158
        var _this = this;
41159
        this.reflector = reflector;
41160
        this._transformedProviders = new Map();
41161
        this._seenProviders = new Map();
41162
        this._errors = [];
41163
        this._allProviders = new Map();
41164
        ngModule.transitiveModule.modules.forEach(function (ngModuleType) {
41165
            var ngModuleProvider = { token: { identifier: ngModuleType }, useClass: ngModuleType };
41166
            _resolveProviders([ngModuleProvider], ProviderAstType.PublicService, true, sourceSpan, _this._errors, _this._allProviders, /* isModule */ true);
41167
        });
41168
        _resolveProviders(ngModule.transitiveModule.providers.map(function (entry) { return entry.provider; }).concat(extraProviders), ProviderAstType.PublicService, false, sourceSpan, this._errors, this._allProviders,
41169
        /* isModule */ false);
41170
    }
41171
    NgModuleProviderAnalyzer.prototype.parse = function () {
41172
        var _this = this;
41173
        Array.from(this._allProviders.values()).forEach(function (provider) {
41174
            _this._getOrCreateLocalProvider(provider.token, provider.eager);
41175
        });
41176
        if (this._errors.length > 0) {
41177
            var errorString = this._errors.join('\n');
41178
            throw new Error("Provider parse errors:\n" + errorString);
41179
        }
41180
        // Note: Maps keep their insertion order.
41181
        var lazyProviders = [];
41182
        var eagerProviders = [];
41183
        this._transformedProviders.forEach(function (provider) {
41184
            if (provider.eager) {
41185
                eagerProviders.push(provider);
41186
            }
41187
            else {
41188
                lazyProviders.push(provider);
41189
            }
41190
        });
41191
        return lazyProviders.concat(eagerProviders);
41192
    };
41193
    NgModuleProviderAnalyzer.prototype._getOrCreateLocalProvider = function (token, eager) {
41194
        var _this = this;
41195
        var resolvedProvider = this._allProviders.get(tokenReference(token));
41196
        if (!resolvedProvider) {
41197
            return null;
41198
        }
41199
        var transformedProviderAst = this._transformedProviders.get(tokenReference(token));
41200
        if (transformedProviderAst) {
41201
            return transformedProviderAst;
41202
        }
41203
        if (this._seenProviders.get(tokenReference(token)) != null) {
41204
            this._errors.push(new ProviderError("Cannot instantiate cyclic dependency! " + tokenName(token), resolvedProvider.sourceSpan));
41205
            return null;
41206
        }
41207
        this._seenProviders.set(tokenReference(token), true);
41208
        var transformedProviders = resolvedProvider.providers.map(function (provider) {
41209
            var transformedUseValue = provider.useValue;
41210
            var transformedUseExisting = provider.useExisting;
41211
            var transformedDeps = undefined;
41212
            if (provider.useExisting != null) {
41213
                var existingDiDep = _this._getDependency({ token: provider.useExisting }, eager, resolvedProvider.sourceSpan);
41214
                if (existingDiDep.token != null) {
41215
                    transformedUseExisting = existingDiDep.token;
41216
                }
41217
                else {
41218
                    transformedUseExisting = null;
41219
                    transformedUseValue = existingDiDep.value;
41220
                }
41221
            }
41222
            else if (provider.useFactory) {
41223
                var deps = provider.deps || provider.useFactory.diDeps;
41224
                transformedDeps =
41225
                    deps.map(function (dep) { return _this._getDependency(dep, eager, resolvedProvider.sourceSpan); });
41226
            }
41227
            else if (provider.useClass) {
41228
                var deps = provider.deps || provider.useClass.diDeps;
41229
                transformedDeps =
41230
                    deps.map(function (dep) { return _this._getDependency(dep, eager, resolvedProvider.sourceSpan); });
41231
            }
41232
            return _transformProvider(provider, {
41233
                useExisting: transformedUseExisting,
41234
                useValue: transformedUseValue,
41235
                deps: transformedDeps
41236
            });
41237
        });
41238
        transformedProviderAst =
41239
            _transformProviderAst(resolvedProvider, { eager: eager, providers: transformedProviders });
41240
        this._transformedProviders.set(tokenReference(token), transformedProviderAst);
41241
        return transformedProviderAst;
41242
    };
41243
    NgModuleProviderAnalyzer.prototype._getDependency = function (dep, eager, requestorSourceSpan) {
41244
        if (eager === void 0) { eager = false; }
41245
        if (!dep.isSkipSelf && dep.token != null) {
41246
            // access the injector
41247
            if (tokenReference(dep.token) ===
41248
                this.reflector.resolveExternalReference(Identifiers.Injector) ||
41249
                tokenReference(dep.token) ===
41250
                    this.reflector.resolveExternalReference(Identifiers.ComponentFactoryResolver)) {
41251
 
41252
                // access providers
41253
            }
41254
            else if (this._getOrCreateLocalProvider(dep.token, eager) != null) {
41255
 
41256
            }
41257
        }
41258
        return dep;
41259
    };
41260
    return NgModuleProviderAnalyzer;
41261
}());
41262
function _transformProvider(provider, _a) {
41263
    var useExisting = _a.useExisting, useValue = _a.useValue, deps = _a.deps;
41264
    return {
41265
        token: provider.token,
41266
        useClass: provider.useClass,
41267
        useExisting: useExisting,
41268
        useFactory: provider.useFactory,
41269
        useValue: useValue,
41270
        deps: deps,
41271
        multi: provider.multi
41272
    };
41273
}
41274
function _transformProviderAst(provider, _a) {
41275
    var eager = _a.eager, providers = _a.providers;
41276
    return new ProviderAst(provider.token, provider.multiProvider, provider.eager || eager, providers, provider.providerType, provider.lifecycleHooks, provider.sourceSpan, provider.isModule);
41277
}
41278
function _resolveProvidersFromDirectives(directives, sourceSpan, targetErrors) {
41279
    var providersByToken = new Map();
41280
    directives.forEach(function (directive) {
41281
        var dirProvider = { token: { identifier: directive.type }, useClass: directive.type };
41282
        _resolveProviders([dirProvider], directive.isComponent ? ProviderAstType.Component : ProviderAstType.Directive, true, sourceSpan, targetErrors, providersByToken, /* isModule */ false);
41283
    });
41284
    // Note: directives need to be able to overwrite providers of a component!
41285
    var directivesWithComponentFirst = directives.filter(function (dir) { return dir.isComponent; }).concat(directives.filter(function (dir) { return !dir.isComponent; }));
41286
    directivesWithComponentFirst.forEach(function (directive) {
41287
        _resolveProviders(directive.providers, ProviderAstType.PublicService, false, sourceSpan, targetErrors, providersByToken, /* isModule */ false);
41288
        _resolveProviders(directive.viewProviders, ProviderAstType.PrivateService, false, sourceSpan, targetErrors, providersByToken, /* isModule */ false);
41289
    });
41290
    return providersByToken;
41291
}
41292
function _resolveProviders(providers, providerType, eager, sourceSpan, targetErrors, targetProvidersByToken, isModule) {
41293
    providers.forEach(function (provider) {
41294
        var resolvedProvider = targetProvidersByToken.get(tokenReference(provider.token));
41295
        if (resolvedProvider != null && !!resolvedProvider.multiProvider !== !!provider.multi) {
41296
            targetErrors.push(new ProviderError("Mixing multi and non multi provider is not possible for token " + tokenName(resolvedProvider.token), sourceSpan));
41297
        }
41298
        if (!resolvedProvider) {
41299
            var lifecycleHooks = provider.token.identifier &&
41300
                provider.token.identifier.lifecycleHooks ?
41301
                provider.token.identifier.lifecycleHooks :
41302
                [];
41303
            var isUseValue = !(provider.useClass || provider.useExisting || provider.useFactory);
41304
            resolvedProvider = new ProviderAst(provider.token, !!provider.multi, eager || isUseValue, [provider], providerType, lifecycleHooks, sourceSpan, isModule);
41305
            targetProvidersByToken.set(tokenReference(provider.token), resolvedProvider);
41306
        }
41307
        else {
41308
            if (!provider.multi) {
41309
                resolvedProvider.providers.length = 0;
41310
            }
41311
            resolvedProvider.providers.push(provider);
41312
        }
41313
    });
41314
}
41315
function _getViewQueries(component) {
41316
    // Note: queries start with id 1 so we can use the number in a Bloom filter!
41317
    var viewQueryId = 1;
41318
    var viewQueries = new Map();
41319
    if (component.viewQueries) {
41320
        component.viewQueries.forEach(function (query) { return _addQueryToTokenMap(viewQueries, { meta: query, queryId: viewQueryId++ }); });
41321
    }
41322
    return viewQueries;
41323
}
41324
function _getContentQueries(contentQueryStartId, directives) {
41325
    var contentQueryId = contentQueryStartId;
41326
    var contentQueries = new Map();
41327
    directives.forEach(function (directive, directiveIndex) {
41328
        if (directive.queries) {
41329
            directive.queries.forEach(function (query) { return _addQueryToTokenMap(contentQueries, { meta: query, queryId: contentQueryId++ }); });
41330
        }
41331
    });
41332
    return contentQueries;
41333
}
41334
function _addQueryToTokenMap(map, query) {
41335
    query.meta.selectors.forEach(function (token) {
41336
        var entry = map.get(tokenReference(token));
41337
        if (!entry) {
41338
            entry = [];
41339
            map.set(tokenReference(token), entry);
41340
        }
41341
        entry.push(query);
41342
    });
41343
}
41344
 
41345
/**
41346
 * @license
41347
 * Copyright Google Inc. All Rights Reserved.
41348
 *
41349
 * Use of this source code is governed by an MIT-style license that can be
41350
 * found in the LICENSE file at https://angular.io/license
41351
 */
41352
function providerDef(ctx, providerAst) {
41353
    var flags = 0;
41354
    if (!providerAst.eager) {
41355
        flags |= 4096 /* LazyProvider */;
41356
    }
41357
    if (providerAst.providerType === ProviderAstType.PrivateService) {
41358
        flags |= 8192 /* PrivateProvider */;
41359
    }
41360
    if (providerAst.isModule) {
41361
        flags |= 1073741824 /* TypeModuleProvider */;
41362
    }
41363
    providerAst.lifecycleHooks.forEach(function (lifecycleHook) {
41364
        // for regular providers, we only support ngOnDestroy
41365
        if (lifecycleHook === LifecycleHooks.OnDestroy ||
41366
            providerAst.providerType === ProviderAstType.Directive ||
41367
            providerAst.providerType === ProviderAstType.Component) {
41368
            flags |= lifecycleHookToNodeFlag(lifecycleHook);
41369
        }
41370
    });
41371
    var _a = providerAst.multiProvider ?
41372
        multiProviderDef(ctx, flags, providerAst.providers) :
41373
        singleProviderDef(ctx, flags, providerAst.providerType, providerAst.providers[0]), providerExpr = _a.providerExpr, providerFlags = _a.flags, depsExpr = _a.depsExpr;
41374
    return {
41375
        providerExpr: providerExpr,
41376
        flags: providerFlags, depsExpr: depsExpr,
41377
        tokenExpr: tokenExpr(ctx, providerAst.token),
41378
    };
41379
}
41380
function multiProviderDef(ctx, flags, providers) {
41381
    var allDepDefs = [];
41382
    var allParams = [];
41383
    var exprs = providers.map(function (provider, providerIndex) {
41384
        var expr;
41385
        if (provider.useClass) {
41386
            var depExprs = convertDeps(providerIndex, provider.deps || provider.useClass.diDeps);
41387
            expr = ctx.importExpr(provider.useClass.reference).instantiate(depExprs);
41388
        }
41389
        else if (provider.useFactory) {
41390
            var depExprs = convertDeps(providerIndex, provider.deps || provider.useFactory.diDeps);
41391
            expr = ctx.importExpr(provider.useFactory.reference).callFn(depExprs);
41392
        }
41393
        else if (provider.useExisting) {
41394
            var depExprs = convertDeps(providerIndex, [{ token: provider.useExisting }]);
41395
            expr = depExprs[0];
41396
        }
41397
        else {
41398
            expr = convertValueToOutputAst(ctx, provider.useValue);
41399
        }
41400
        return expr;
41401
    });
41402
    var providerExpr = fn(allParams, [new ReturnStatement(literalArr(exprs))], INFERRED_TYPE);
41403
    return {
41404
        providerExpr: providerExpr,
41405
        flags: flags | 1024 /* TypeFactoryProvider */,
41406
        depsExpr: literalArr(allDepDefs)
41407
    };
41408
    function convertDeps(providerIndex, deps) {
41409
        return deps.map(function (dep, depIndex) {
41410
            var paramName = "p" + providerIndex + "_" + depIndex;
41411
            allParams.push(new FnParam(paramName, DYNAMIC_TYPE));
41412
            allDepDefs.push(depDef(ctx, dep));
41413
            return variable(paramName);
41414
        });
41415
    }
41416
}
41417
function singleProviderDef(ctx, flags, providerType, providerMeta) {
41418
    var providerExpr;
41419
    var deps;
41420
    if (providerType === ProviderAstType.Directive || providerType === ProviderAstType.Component) {
41421
        providerExpr = ctx.importExpr(providerMeta.useClass.reference);
41422
        flags |= 16384 /* TypeDirective */;
41423
        deps = providerMeta.deps || providerMeta.useClass.diDeps;
41424
    }
41425
    else {
41426
        if (providerMeta.useClass) {
41427
            providerExpr = ctx.importExpr(providerMeta.useClass.reference);
41428
            flags |= 512 /* TypeClassProvider */;
41429
            deps = providerMeta.deps || providerMeta.useClass.diDeps;
41430
        }
41431
        else if (providerMeta.useFactory) {
41432
            providerExpr = ctx.importExpr(providerMeta.useFactory.reference);
41433
            flags |= 1024 /* TypeFactoryProvider */;
41434
            deps = providerMeta.deps || providerMeta.useFactory.diDeps;
41435
        }
41436
        else if (providerMeta.useExisting) {
41437
            providerExpr = NULL_EXPR;
41438
            flags |= 2048 /* TypeUseExistingProvider */;
41439
            deps = [{ token: providerMeta.useExisting }];
41440
        }
41441
        else {
41442
            providerExpr = convertValueToOutputAst(ctx, providerMeta.useValue);
41443
            flags |= 256 /* TypeValueProvider */;
41444
            deps = [];
41445
        }
41446
    }
41447
    var depsExpr = literalArr(deps.map(function (dep) { return depDef(ctx, dep); }));
41448
    return { providerExpr: providerExpr, flags: flags, depsExpr: depsExpr };
41449
}
41450
function tokenExpr(ctx, tokenMeta) {
41451
    return tokenMeta.identifier ? ctx.importExpr(tokenMeta.identifier.reference) :
41452
        literal(tokenMeta.value);
41453
}
41454
function depDef(ctx, dep) {
41455
    // Note: the following fields have already been normalized out by provider_analyzer:
41456
    // - isAttribute, isHost
41457
    var expr = dep.isValue ? convertValueToOutputAst(ctx, dep.value) : tokenExpr(ctx, dep.token);
41458
    var flags = 0;
41459
    if (dep.isSkipSelf) {
41460
        flags |= 1 /* SkipSelf */;
41461
    }
41462
    if (dep.isOptional) {
41463
        flags |= 2 /* Optional */;
41464
    }
41465
    if (dep.isSelf) {
41466
        flags |= 4 /* Self */;
41467
    }
41468
    if (dep.isValue) {
41469
        flags |= 8 /* Value */;
41470
    }
41471
    return flags === 0 /* None */ ? expr : literalArr([literal(flags), expr]);
41472
}
41473
function lifecycleHookToNodeFlag(lifecycleHook) {
41474
    var nodeFlag = 0;
41475
    switch (lifecycleHook) {
41476
        case LifecycleHooks.AfterContentChecked:
41477
            nodeFlag = 2097152 /* AfterContentChecked */;
41478
            break;
41479
        case LifecycleHooks.AfterContentInit:
41480
            nodeFlag = 1048576 /* AfterContentInit */;
41481
            break;
41482
        case LifecycleHooks.AfterViewChecked:
41483
            nodeFlag = 8388608 /* AfterViewChecked */;
41484
            break;
41485
        case LifecycleHooks.AfterViewInit:
41486
            nodeFlag = 4194304 /* AfterViewInit */;
41487
            break;
41488
        case LifecycleHooks.DoCheck:
41489
            nodeFlag = 262144 /* DoCheck */;
41490
            break;
41491
        case LifecycleHooks.OnChanges:
41492
            nodeFlag = 524288 /* OnChanges */;
41493
            break;
41494
        case LifecycleHooks.OnDestroy:
41495
            nodeFlag = 131072 /* OnDestroy */;
41496
            break;
41497
        case LifecycleHooks.OnInit:
41498
            nodeFlag = 65536 /* OnInit */;
41499
            break;
41500
    }
41501
    return nodeFlag;
41502
}
41503
function componentFactoryResolverProviderDef(reflector, ctx, flags, entryComponents) {
41504
    var entryComponentFactories = entryComponents.map(function (entryComponent) { return ctx.importExpr(entryComponent.componentFactory); });
41505
    var token = createTokenForExternalReference(reflector, Identifiers.ComponentFactoryResolver);
41506
    var classMeta = {
41507
        diDeps: [
41508
            { isValue: true, value: literalArr(entryComponentFactories) },
41509
            { token: token, isSkipSelf: true, isOptional: true },
41510
            { token: createTokenForExternalReference(reflector, Identifiers.NgModuleRef) },
41511
        ],
41512
        lifecycleHooks: [],
41513
        reference: reflector.resolveExternalReference(Identifiers.CodegenComponentFactoryResolver)
41514
    };
41515
    var _a = singleProviderDef(ctx, flags, ProviderAstType.PrivateService, {
41516
        token: token,
41517
        multi: false,
41518
        useClass: classMeta,
41519
    }), providerExpr = _a.providerExpr, providerFlags = _a.flags, depsExpr = _a.depsExpr;
41520
    return { providerExpr: providerExpr, flags: providerFlags, depsExpr: depsExpr, tokenExpr: tokenExpr(ctx, token) };
41521
}
41522
 
41523
/**
41524
 * @license
41525
 * Copyright Google Inc. All Rights Reserved.
41526
 *
41527
 * Use of this source code is governed by an MIT-style license that can be
41528
 * found in the LICENSE file at https://angular.io/license
41529
 */
41530
var NgModuleCompileResult = /** @class */ (function () {
41531
    function NgModuleCompileResult(ngModuleFactoryVar) {
41532
        this.ngModuleFactoryVar = ngModuleFactoryVar;
41533
    }
41534
    return NgModuleCompileResult;
41535
}());
41536
var LOG_VAR = variable('_l');
41537
var NgModuleCompiler = /** @class */ (function () {
41538
    function NgModuleCompiler(reflector) {
41539
        this.reflector = reflector;
41540
    }
41541
    NgModuleCompiler.prototype.compile = function (ctx, ngModuleMeta, extraProviders) {
41542
        var sourceSpan = typeSourceSpan('NgModule', ngModuleMeta.type);
41543
        var entryComponentFactories = ngModuleMeta.transitiveModule.entryComponents;
41544
        var bootstrapComponents = ngModuleMeta.bootstrapComponents;
41545
        var providerParser = new NgModuleProviderAnalyzer(this.reflector, ngModuleMeta, extraProviders, sourceSpan);
41546
        var providerDefs = [componentFactoryResolverProviderDef(this.reflector, ctx, 0 /* None */, entryComponentFactories)]
41547
            .concat(providerParser.parse().map(function (provider) { return providerDef(ctx, provider); }))
41548
            .map(function (_a) {
41549
            var providerExpr = _a.providerExpr, depsExpr = _a.depsExpr, flags = _a.flags, tokenExpr = _a.tokenExpr;
41550
            return importExpr(Identifiers.moduleProviderDef).callFn([
41551
                literal(flags), tokenExpr, providerExpr, depsExpr
41552
            ]);
41553
        });
41554
        var ngModuleDef = importExpr(Identifiers.moduleDef).callFn([literalArr(providerDefs)]);
41555
        var ngModuleDefFactory = fn([new FnParam(LOG_VAR.name)], [new ReturnStatement(ngModuleDef)], INFERRED_TYPE);
41556
        var ngModuleFactoryVar = identifierName(ngModuleMeta.type) + "NgFactory";
41557
        this._createNgModuleFactory(ctx, ngModuleMeta.type.reference, importExpr(Identifiers.createModuleFactory).callFn([
41558
            ctx.importExpr(ngModuleMeta.type.reference),
41559
            literalArr(bootstrapComponents.map(function (id) { return ctx.importExpr(id.reference); })),
41560
            ngModuleDefFactory
41561
        ]));
41562
        if (ngModuleMeta.id) {
41563
            var id = typeof ngModuleMeta.id === 'string' ? literal(ngModuleMeta.id) :
41564
                ctx.importExpr(ngModuleMeta.id);
41565
            var registerFactoryStmt = importExpr(Identifiers.RegisterModuleFactoryFn)
41566
                .callFn([id, variable(ngModuleFactoryVar)])
41567
                .toStmt();
41568
            ctx.statements.push(registerFactoryStmt);
41569
        }
41570
        return new NgModuleCompileResult(ngModuleFactoryVar);
41571
    };
41572
    NgModuleCompiler.prototype.createStub = function (ctx, ngModuleReference) {
41573
        this._createNgModuleFactory(ctx, ngModuleReference, NULL_EXPR);
41574
    };
41575
    NgModuleCompiler.prototype._createNgModuleFactory = function (ctx, reference, value) {
41576
        var ngModuleFactoryVar = identifierName({ reference: reference }) + "NgFactory";
41577
        var ngModuleFactoryStmt = variable(ngModuleFactoryVar)
41578
            .set(value)
41579
            .toDeclStmt(importType(Identifiers.NgModuleFactory, [expressionType(ctx.importExpr(reference))], [TypeModifier.Const]), [StmtModifier.Final, StmtModifier.Exported]);
41580
        ctx.statements.push(ngModuleFactoryStmt);
41581
    };
41582
    return NgModuleCompiler;
41583
}());
41584
 
41585
/**
41586
 * @license
41587
 * Copyright Google Inc. All Rights Reserved.
41588
 *
41589
 * Use of this source code is governed by an MIT-style license that can be
41590
 * found in the LICENSE file at https://angular.io/license
41591
 */
41592
/**
41593
 * Resolves types to {@link NgModule}.
41594
 */
41595
var NgModuleResolver = /** @class */ (function () {
41596
    function NgModuleResolver(_reflector) {
41597
        this._reflector = _reflector;
41598
    }
41599
    NgModuleResolver.prototype.isNgModule = function (type) { return this._reflector.annotations(type).some(createNgModule.isTypeOf); };
41600
    NgModuleResolver.prototype.resolve = function (type, throwIfNotFound) {
41601
        if (throwIfNotFound === void 0) { throwIfNotFound = true; }
41602
        var ngModuleMeta = findLast(this._reflector.annotations(type), createNgModule.isTypeOf);
41603
        if (ngModuleMeta) {
41604
            return ngModuleMeta;
41605
        }
41606
        else {
41607
            if (throwIfNotFound) {
41608
                throw new Error("No NgModule metadata found for '" + stringify(type) + "'.");
41609
            }
41610
            return null;
41611
        }
41612
    };
41613
    return NgModuleResolver;
41614
}());
41615
 
41616
/**
41617
 * @license
41618
 * Copyright Google Inc. All Rights Reserved.
41619
 *
41620
 * Use of this source code is governed by an MIT-style license that can be
41621
 * found in the LICENSE file at https://angular.io/license
41622
 */
41623
// https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit
41624
var VERSION$1 = 3;
41625
var JS_B64_PREFIX = '# sourceMappingURL=data:application/json;base64,';
41626
var SourceMapGenerator = /** @class */ (function () {
41627
    function SourceMapGenerator(file) {
41628
        if (file === void 0) { file = null; }
41629
        this.file = file;
41630
        this.sourcesContent = new Map();
41631
        this.lines = [];
41632
        this.lastCol0 = 0;
41633
        this.hasMappings = false;
41634
    }
41635
    // The content is `null` when the content is expected to be loaded using the URL
41636
    SourceMapGenerator.prototype.addSource = function (url, content) {
41637
        if (content === void 0) { content = null; }
41638
        if (!this.sourcesContent.has(url)) {
41639
            this.sourcesContent.set(url, content);
41640
        }
41641
        return this;
41642
    };
41643
    SourceMapGenerator.prototype.addLine = function () {
41644
        this.lines.push([]);
41645
        this.lastCol0 = 0;
41646
        return this;
41647
    };
41648
    SourceMapGenerator.prototype.addMapping = function (col0, sourceUrl, sourceLine0, sourceCol0) {
41649
        if (!this.currentLine) {
41650
            throw new Error("A line must be added before mappings can be added");
41651
        }
41652
        if (sourceUrl != null && !this.sourcesContent.has(sourceUrl)) {
41653
            throw new Error("Unknown source file \"" + sourceUrl + "\"");
41654
        }
41655
        if (col0 == null) {
41656
            throw new Error("The column in the generated code must be provided");
41657
        }
41658
        if (col0 < this.lastCol0) {
41659
            throw new Error("Mapping should be added in output order");
41660
        }
41661
        if (sourceUrl && (sourceLine0 == null || sourceCol0 == null)) {
41662
            throw new Error("The source location must be provided when a source url is provided");
41663
        }
41664
        this.hasMappings = true;
41665
        this.lastCol0 = col0;
41666
        this.currentLine.push({ col0: col0, sourceUrl: sourceUrl, sourceLine0: sourceLine0, sourceCol0: sourceCol0 });
41667
        return this;
41668
    };
41669
    Object.defineProperty(SourceMapGenerator.prototype, "currentLine", {
41670
        get: function () { return this.lines.slice(-1)[0]; },
41671
        enumerable: true,
41672
        configurable: true
41673
    });
41674
    SourceMapGenerator.prototype.toJSON = function () {
41675
        var _this = this;
41676
        if (!this.hasMappings) {
41677
            return null;
41678
        }
41679
        var sourcesIndex = new Map();
41680
        var sources = [];
41681
        var sourcesContent = [];
41682
        Array.from(this.sourcesContent.keys()).forEach(function (url, i) {
41683
            sourcesIndex.set(url, i);
41684
            sources.push(url);
41685
            sourcesContent.push(_this.sourcesContent.get(url) || null);
41686
        });
41687
        var mappings = '';
41688
        var lastCol0 = 0;
41689
        var lastSourceIndex = 0;
41690
        var lastSourceLine0 = 0;
41691
        var lastSourceCol0 = 0;
41692
        this.lines.forEach(function (segments) {
41693
            lastCol0 = 0;
41694
            mappings += segments
41695
                .map(function (segment) {
41696
                // zero-based starting column of the line in the generated code
41697
                var segAsStr = toBase64VLQ(segment.col0 - lastCol0);
41698
                lastCol0 = segment.col0;
41699
                if (segment.sourceUrl != null) {
41700
                    // zero-based index into the “sources” list
41701
                    segAsStr +=
41702
                        toBase64VLQ(sourcesIndex.get(segment.sourceUrl) - lastSourceIndex);
41703
                    lastSourceIndex = sourcesIndex.get(segment.sourceUrl);
41704
                    // the zero-based starting line in the original source
41705
                    segAsStr += toBase64VLQ(segment.sourceLine0 - lastSourceLine0);
41706
                    lastSourceLine0 = segment.sourceLine0;
41707
                    // the zero-based starting column in the original source
41708
                    segAsStr += toBase64VLQ(segment.sourceCol0 - lastSourceCol0);
41709
                    lastSourceCol0 = segment.sourceCol0;
41710
                }
41711
                return segAsStr;
41712
            })
41713
                .join(',');
41714
            mappings += ';';
41715
        });
41716
        mappings = mappings.slice(0, -1);
41717
        return {
41718
            'file': this.file || '',
41719
            'version': VERSION$1,
41720
            'sourceRoot': '',
41721
            'sources': sources,
41722
            'sourcesContent': sourcesContent,
41723
            'mappings': mappings,
41724
        };
41725
    };
41726
    SourceMapGenerator.prototype.toJsComment = function () {
41727
        return this.hasMappings ? '//' + JS_B64_PREFIX + toBase64String(JSON.stringify(this, null, 0)) :
41728
            '';
41729
    };
41730
    return SourceMapGenerator;
41731
}());
41732
function toBase64String(value) {
41733
    var b64 = '';
41734
    value = utf8Encode(value);
41735
    for (var i = 0; i < value.length;) {
41736
        var i1 = value.charCodeAt(i++);
41737
        var i2 = value.charCodeAt(i++);
41738
        var i3 = value.charCodeAt(i++);
41739
        b64 += toBase64Digit(i1 >> 2);
41740
        b64 += toBase64Digit(((i1 & 3) << 4) | (isNaN(i2) ? 0 : i2 >> 4));
41741
        b64 += isNaN(i2) ? '=' : toBase64Digit(((i2 & 15) << 2) | (i3 >> 6));
41742
        b64 += isNaN(i2) || isNaN(i3) ? '=' : toBase64Digit(i3 & 63);
41743
    }
41744
    return b64;
41745
}
41746
function toBase64VLQ(value) {
41747
    value = value < 0 ? ((-value) << 1) + 1 : value << 1;
41748
    var out = '';
41749
    do {
41750
        var digit = value & 31;
41751
        value = value >> 5;
41752
        if (value > 0) {
41753
            digit = digit | 32;
41754
        }
41755
        out += toBase64Digit(digit);
41756
    } while (value > 0);
41757
    return out;
41758
}
41759
var B64_DIGITS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
41760
function toBase64Digit(value) {
41761
    if (value < 0 || value >= 64) {
41762
        throw new Error("Can only encode value in the range [0, 63]");
41763
    }
41764
    return B64_DIGITS[value];
41765
}
41766
 
41767
/**
41768
 * @license
41769
 * Copyright Google Inc. All Rights Reserved.
41770
 *
41771
 * Use of this source code is governed by an MIT-style license that can be
41772
 * found in the LICENSE file at https://angular.io/license
41773
 */
41774
var _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\|\n|\r|\$/g;
41775
var _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;
41776
var _INDENT_WITH = '  ';
41777
var CATCH_ERROR_VAR$1 = variable('error', null, null);
41778
var CATCH_STACK_VAR$1 = variable('stack', null, null);
41779
var _EmittedLine = /** @class */ (function () {
41780
    function _EmittedLine(indent) {
41781
        this.indent = indent;
41782
        this.partsLength = 0;
41783
        this.parts = [];
41784
        this.srcSpans = [];
41785
    }
41786
    return _EmittedLine;
41787
}());
41788
var EmitterVisitorContext = /** @class */ (function () {
41789
    function EmitterVisitorContext(_indent) {
41790
        this._indent = _indent;
41791
        this._classes = [];
41792
        this._preambleLineCount = 0;
41793
        this._lines = [new _EmittedLine(_indent)];
41794
    }
41795
    EmitterVisitorContext.createRoot = function () { return new EmitterVisitorContext(0); };
41796
    Object.defineProperty(EmitterVisitorContext.prototype, "_currentLine", {
41797
        get: function () { return this._lines[this._lines.length - 1]; },
41798
        enumerable: true,
41799
        configurable: true
41800
    });
41801
    EmitterVisitorContext.prototype.println = function (from, lastPart) {
41802
        if (lastPart === void 0) { lastPart = ''; }
41803
        this.print(from || null, lastPart, true);
41804
    };
41805
    EmitterVisitorContext.prototype.lineIsEmpty = function () { return this._currentLine.parts.length === 0; };
41806
    EmitterVisitorContext.prototype.lineLength = function () {
41807
        return this._currentLine.indent * _INDENT_WITH.length + this._currentLine.partsLength;
41808
    };
41809
    EmitterVisitorContext.prototype.print = function (from, part, newLine) {
41810
        if (newLine === void 0) { newLine = false; }
41811
        if (part.length > 0) {
41812
            this._currentLine.parts.push(part);
41813
            this._currentLine.partsLength += part.length;
41814
            this._currentLine.srcSpans.push(from && from.sourceSpan || null);
41815
        }
41816
        if (newLine) {
41817
            this._lines.push(new _EmittedLine(this._indent));
41818
        }
41819
    };
41820
    EmitterVisitorContext.prototype.removeEmptyLastLine = function () {
41821
        if (this.lineIsEmpty()) {
41822
            this._lines.pop();
41823
        }
41824
    };
41825
    EmitterVisitorContext.prototype.incIndent = function () {
41826
        this._indent++;
41827
        if (this.lineIsEmpty()) {
41828
            this._currentLine.indent = this._indent;
41829
        }
41830
    };
41831
    EmitterVisitorContext.prototype.decIndent = function () {
41832
        this._indent--;
41833
        if (this.lineIsEmpty()) {
41834
            this._currentLine.indent = this._indent;
41835
        }
41836
    };
41837
    EmitterVisitorContext.prototype.pushClass = function (clazz) { this._classes.push(clazz); };
41838
    EmitterVisitorContext.prototype.popClass = function () { return this._classes.pop(); };
41839
    Object.defineProperty(EmitterVisitorContext.prototype, "currentClass", {
41840
        get: function () {
41841
            return this._classes.length > 0 ? this._classes[this._classes.length - 1] : null;
41842
        },
41843
        enumerable: true,
41844
        configurable: true
41845
    });
41846
    EmitterVisitorContext.prototype.toSource = function () {
41847
        return this.sourceLines
41848
            .map(function (l) { return l.parts.length > 0 ? _createIndent(l.indent) + l.parts.join('') : ''; })
41849
            .join('\n');
41850
    };
41851
    EmitterVisitorContext.prototype.toSourceMapGenerator = function (genFilePath, startsAtLine) {
41852
        if (startsAtLine === void 0) { startsAtLine = 0; }
41853
        var map = new SourceMapGenerator(genFilePath);
41854
        var firstOffsetMapped = false;
41855
        var mapFirstOffsetIfNeeded = function () {
41856
            if (!firstOffsetMapped) {
41857
                // Add a single space so that tools won't try to load the file from disk.
41858
                // Note: We are using virtual urls like `ng:///`, so we have to
41859
                // provide a content here.
41860
                map.addSource(genFilePath, ' ').addMapping(0, genFilePath, 0, 0);
41861
                firstOffsetMapped = true;
41862
            }
41863
        };
41864
        for (var i = 0; i < startsAtLine; i++) {
41865
            map.addLine();
41866
            mapFirstOffsetIfNeeded();
41867
        }
41868
        this.sourceLines.forEach(function (line, lineIdx) {
41869
            map.addLine();
41870
            var spans = line.srcSpans;
41871
            var parts = line.parts;
41872
            var col0 = line.indent * _INDENT_WITH.length;
41873
            var spanIdx = 0;
41874
            // skip leading parts without source spans
41875
            while (spanIdx < spans.length && !spans[spanIdx]) {
41876
                col0 += parts[spanIdx].length;
41877
                spanIdx++;
41878
            }
41879
            if (spanIdx < spans.length && lineIdx === 0 && col0 === 0) {
41880
                firstOffsetMapped = true;
41881
            }
41882
            else {
41883
                mapFirstOffsetIfNeeded();
41884
            }
41885
            while (spanIdx < spans.length) {
41886
                var span = spans[spanIdx];
41887
                var source = span.start.file;
41888
                var sourceLine = span.start.line;
41889
                var sourceCol = span.start.col;
41890
                map.addSource(source.url, source.content)
41891
                    .addMapping(col0, source.url, sourceLine, sourceCol);
41892
                col0 += parts[spanIdx].length;
41893
                spanIdx++;
41894
                // assign parts without span or the same span to the previous segment
41895
                while (spanIdx < spans.length && (span === spans[spanIdx] || !spans[spanIdx])) {
41896
                    col0 += parts[spanIdx].length;
41897
                    spanIdx++;
41898
                }
41899
            }
41900
        });
41901
        return map;
41902
    };
41903
    EmitterVisitorContext.prototype.setPreambleLineCount = function (count) { return this._preambleLineCount = count; };
41904
    EmitterVisitorContext.prototype.spanOf = function (line, column) {
41905
        var emittedLine = this._lines[line - this._preambleLineCount];
41906
        if (emittedLine) {
41907
            var columnsLeft = column - _createIndent(emittedLine.indent).length;
41908
            for (var partIndex = 0; partIndex < emittedLine.parts.length; partIndex++) {
41909
                var part = emittedLine.parts[partIndex];
41910
                if (part.length > columnsLeft) {
41911
                    return emittedLine.srcSpans[partIndex];
41912
                }
41913
                columnsLeft -= part.length;
41914
            }
41915
        }
41916
        return null;
41917
    };
41918
    Object.defineProperty(EmitterVisitorContext.prototype, "sourceLines", {
41919
        get: function () {
41920
            if (this._lines.length && this._lines[this._lines.length - 1].parts.length === 0) {
41921
                return this._lines.slice(0, -1);
41922
            }
41923
            return this._lines;
41924
        },
41925
        enumerable: true,
41926
        configurable: true
41927
    });
41928
    return EmitterVisitorContext;
41929
}());
41930
var AbstractEmitterVisitor = /** @class */ (function () {
41931
    function AbstractEmitterVisitor(_escapeDollarInStrings) {
41932
        this._escapeDollarInStrings = _escapeDollarInStrings;
41933
    }
41934
    AbstractEmitterVisitor.prototype.visitExpressionStmt = function (stmt, ctx) {
41935
        stmt.expr.visitExpression(this, ctx);
41936
        ctx.println(stmt, ';');
41937
        return null;
41938
    };
41939
    AbstractEmitterVisitor.prototype.visitReturnStmt = function (stmt, ctx) {
41940
        ctx.print(stmt, "return ");
41941
        stmt.value.visitExpression(this, ctx);
41942
        ctx.println(stmt, ';');
41943
        return null;
41944
    };
41945
    AbstractEmitterVisitor.prototype.visitIfStmt = function (stmt, ctx) {
41946
        ctx.print(stmt, "if (");
41947
        stmt.condition.visitExpression(this, ctx);
41948
        ctx.print(stmt, ") {");
41949
        var hasElseCase = stmt.falseCase != null && stmt.falseCase.length > 0;
41950
        if (stmt.trueCase.length <= 1 && !hasElseCase) {
41951
            ctx.print(stmt, " ");
41952
            this.visitAllStatements(stmt.trueCase, ctx);
41953
            ctx.removeEmptyLastLine();
41954
            ctx.print(stmt, " ");
41955
        }
41956
        else {
41957
            ctx.println();
41958
            ctx.incIndent();
41959
            this.visitAllStatements(stmt.trueCase, ctx);
41960
            ctx.decIndent();
41961
            if (hasElseCase) {
41962
                ctx.println(stmt, "} else {");
41963
                ctx.incIndent();
41964
                this.visitAllStatements(stmt.falseCase, ctx);
41965
                ctx.decIndent();
41966
            }
41967
        }
41968
        ctx.println(stmt, "}");
41969
        return null;
41970
    };
41971
    AbstractEmitterVisitor.prototype.visitThrowStmt = function (stmt, ctx) {
41972
        ctx.print(stmt, "throw ");
41973
        stmt.error.visitExpression(this, ctx);
41974
        ctx.println(stmt, ";");
41975
        return null;
41976
    };
41977
    AbstractEmitterVisitor.prototype.visitCommentStmt = function (stmt, ctx) {
41978
        if (stmt.multiline) {
41979
            ctx.println(stmt, "/* " + stmt.comment + " */");
41980
        }
41981
        else {
41982
            stmt.comment.split('\n').forEach(function (line) { ctx.println(stmt, "// " + line); });
41983
        }
41984
        return null;
41985
    };
41986
    AbstractEmitterVisitor.prototype.visitJSDocCommentStmt = function (stmt, ctx) {
41987
        ctx.println(stmt, "/*" + stmt.toString() + "*/");
41988
        return null;
41989
    };
41990
    AbstractEmitterVisitor.prototype.visitWriteVarExpr = function (expr, ctx) {
41991
        var lineWasEmpty = ctx.lineIsEmpty();
41992
        if (!lineWasEmpty) {
41993
            ctx.print(expr, '(');
41994
        }
41995
        ctx.print(expr, expr.name + " = ");
41996
        expr.value.visitExpression(this, ctx);
41997
        if (!lineWasEmpty) {
41998
            ctx.print(expr, ')');
41999
        }
42000
        return null;
42001
    };
42002
    AbstractEmitterVisitor.prototype.visitWriteKeyExpr = function (expr, ctx) {
42003
        var lineWasEmpty = ctx.lineIsEmpty();
42004
        if (!lineWasEmpty) {
42005
            ctx.print(expr, '(');
42006
        }
42007
        expr.receiver.visitExpression(this, ctx);
42008
        ctx.print(expr, "[");
42009
        expr.index.visitExpression(this, ctx);
42010
        ctx.print(expr, "] = ");
42011
        expr.value.visitExpression(this, ctx);
42012
        if (!lineWasEmpty) {
42013
            ctx.print(expr, ')');
42014
        }
42015
        return null;
42016
    };
42017
    AbstractEmitterVisitor.prototype.visitWritePropExpr = function (expr, ctx) {
42018
        var lineWasEmpty = ctx.lineIsEmpty();
42019
        if (!lineWasEmpty) {
42020
            ctx.print(expr, '(');
42021
        }
42022
        expr.receiver.visitExpression(this, ctx);
42023
        ctx.print(expr, "." + expr.name + " = ");
42024
        expr.value.visitExpression(this, ctx);
42025
        if (!lineWasEmpty) {
42026
            ctx.print(expr, ')');
42027
        }
42028
        return null;
42029
    };
42030
    AbstractEmitterVisitor.prototype.visitInvokeMethodExpr = function (expr, ctx) {
42031
        expr.receiver.visitExpression(this, ctx);
42032
        var name = expr.name;
42033
        if (expr.builtin != null) {
42034
            name = this.getBuiltinMethodName(expr.builtin);
42035
            if (name == null) {
42036
                // some builtins just mean to skip the call.
42037
                return null;
42038
            }
42039
        }
42040
        ctx.print(expr, "." + name + "(");
42041
        this.visitAllExpressions(expr.args, ctx, ",");
42042
        ctx.print(expr, ")");
42043
        return null;
42044
    };
42045
    AbstractEmitterVisitor.prototype.visitInvokeFunctionExpr = function (expr, ctx) {
42046
        expr.fn.visitExpression(this, ctx);
42047
        ctx.print(expr, "(");
42048
        this.visitAllExpressions(expr.args, ctx, ',');
42049
        ctx.print(expr, ")");
42050
        return null;
42051
    };
42052
    AbstractEmitterVisitor.prototype.visitReadVarExpr = function (ast, ctx) {
42053
        var varName = ast.name;
42054
        if (ast.builtin != null) {
42055
            switch (ast.builtin) {
42056
                case BuiltinVar.Super:
42057
                    varName = 'super';
42058
                    break;
42059
                case BuiltinVar.This:
42060
                    varName = 'this';
42061
                    break;
42062
                case BuiltinVar.CatchError:
42063
                    varName = CATCH_ERROR_VAR$1.name;
42064
                    break;
42065
                case BuiltinVar.CatchStack:
42066
                    varName = CATCH_STACK_VAR$1.name;
42067
                    break;
42068
                default:
42069
                    throw new Error("Unknown builtin variable " + ast.builtin);
42070
            }
42071
        }
42072
        ctx.print(ast, varName);
42073
        return null;
42074
    };
42075
    AbstractEmitterVisitor.prototype.visitInstantiateExpr = function (ast, ctx) {
42076
        ctx.print(ast, "new ");
42077
        ast.classExpr.visitExpression(this, ctx);
42078
        ctx.print(ast, "(");
42079
        this.visitAllExpressions(ast.args, ctx, ',');
42080
        ctx.print(ast, ")");
42081
        return null;
42082
    };
42083
    AbstractEmitterVisitor.prototype.visitLiteralExpr = function (ast, ctx) {
42084
        var value = ast.value;
42085
        if (typeof value === 'string') {
42086
            ctx.print(ast, escapeIdentifier(value, this._escapeDollarInStrings));
42087
        }
42088
        else {
42089
            ctx.print(ast, "" + value);
42090
        }
42091
        return null;
42092
    };
42093
    AbstractEmitterVisitor.prototype.visitConditionalExpr = function (ast, ctx) {
42094
        ctx.print(ast, "(");
42095
        ast.condition.visitExpression(this, ctx);
42096
        ctx.print(ast, '? ');
42097
        ast.trueCase.visitExpression(this, ctx);
42098
        ctx.print(ast, ': ');
42099
        ast.falseCase.visitExpression(this, ctx);
42100
        ctx.print(ast, ")");
42101
        return null;
42102
    };
42103
    AbstractEmitterVisitor.prototype.visitNotExpr = function (ast, ctx) {
42104
        ctx.print(ast, '!');
42105
        ast.condition.visitExpression(this, ctx);
42106
        return null;
42107
    };
42108
    AbstractEmitterVisitor.prototype.visitAssertNotNullExpr = function (ast, ctx) {
42109
        ast.condition.visitExpression(this, ctx);
42110
        return null;
42111
    };
42112
    AbstractEmitterVisitor.prototype.visitBinaryOperatorExpr = function (ast, ctx) {
42113
        var opStr;
42114
        switch (ast.operator) {
42115
            case BinaryOperator.Equals:
42116
                opStr = '==';
42117
                break;
42118
            case BinaryOperator.Identical:
42119
                opStr = '===';
42120
                break;
42121
            case BinaryOperator.NotEquals:
42122
                opStr = '!=';
42123
                break;
42124
            case BinaryOperator.NotIdentical:
42125
                opStr = '!==';
42126
                break;
42127
            case BinaryOperator.And:
42128
                opStr = '&&';
42129
                break;
42130
            case BinaryOperator.BitwiseAnd:
42131
                opStr = '&';
42132
                break;
42133
            case BinaryOperator.Or:
42134
                opStr = '||';
42135
                break;
42136
            case BinaryOperator.Plus:
42137
                opStr = '+';
42138
                break;
42139
            case BinaryOperator.Minus:
42140
                opStr = '-';
42141
                break;
42142
            case BinaryOperator.Divide:
42143
                opStr = '/';
42144
                break;
42145
            case BinaryOperator.Multiply:
42146
                opStr = '*';
42147
                break;
42148
            case BinaryOperator.Modulo:
42149
                opStr = '%';
42150
                break;
42151
            case BinaryOperator.Lower:
42152
                opStr = '<';
42153
                break;
42154
            case BinaryOperator.LowerEquals:
42155
                opStr = '<=';
42156
                break;
42157
            case BinaryOperator.Bigger:
42158
                opStr = '>';
42159
                break;
42160
            case BinaryOperator.BiggerEquals:
42161
                opStr = '>=';
42162
                break;
42163
            default:
42164
                throw new Error("Unknown operator " + ast.operator);
42165
        }
42166
        if (ast.parens)
42167
            ctx.print(ast, "(");
42168
        ast.lhs.visitExpression(this, ctx);
42169
        ctx.print(ast, " " + opStr + " ");
42170
        ast.rhs.visitExpression(this, ctx);
42171
        if (ast.parens)
42172
            ctx.print(ast, ")");
42173
        return null;
42174
    };
42175
    AbstractEmitterVisitor.prototype.visitReadPropExpr = function (ast, ctx) {
42176
        ast.receiver.visitExpression(this, ctx);
42177
        ctx.print(ast, ".");
42178
        ctx.print(ast, ast.name);
42179
        return null;
42180
    };
42181
    AbstractEmitterVisitor.prototype.visitReadKeyExpr = function (ast, ctx) {
42182
        ast.receiver.visitExpression(this, ctx);
42183
        ctx.print(ast, "[");
42184
        ast.index.visitExpression(this, ctx);
42185
        ctx.print(ast, "]");
42186
        return null;
42187
    };
42188
    AbstractEmitterVisitor.prototype.visitLiteralArrayExpr = function (ast, ctx) {
42189
        ctx.print(ast, "[");
42190
        this.visitAllExpressions(ast.entries, ctx, ',');
42191
        ctx.print(ast, "]");
42192
        return null;
42193
    };
42194
    AbstractEmitterVisitor.prototype.visitLiteralMapExpr = function (ast, ctx) {
42195
        var _this = this;
42196
        ctx.print(ast, "{");
42197
        this.visitAllObjects(function (entry) {
42198
            ctx.print(ast, escapeIdentifier(entry.key, _this._escapeDollarInStrings, entry.quoted) + ":");
42199
            entry.value.visitExpression(_this, ctx);
42200
        }, ast.entries, ctx, ',');
42201
        ctx.print(ast, "}");
42202
        return null;
42203
    };
42204
    AbstractEmitterVisitor.prototype.visitCommaExpr = function (ast, ctx) {
42205
        ctx.print(ast, '(');
42206
        this.visitAllExpressions(ast.parts, ctx, ',');
42207
        ctx.print(ast, ')');
42208
        return null;
42209
    };
42210
    AbstractEmitterVisitor.prototype.visitAllExpressions = function (expressions, ctx, separator) {
42211
        var _this = this;
42212
        this.visitAllObjects(function (expr) { return expr.visitExpression(_this, ctx); }, expressions, ctx, separator);
42213
    };
42214
    AbstractEmitterVisitor.prototype.visitAllObjects = function (handler, expressions, ctx, separator) {
42215
        var incrementedIndent = false;
42216
        for (var i = 0; i < expressions.length; i++) {
42217
            if (i > 0) {
42218
                if (ctx.lineLength() > 80) {
42219
                    ctx.print(null, separator, true);
42220
                    if (!incrementedIndent) {
42221
                        // continuation are marked with double indent.
42222
                        ctx.incIndent();
42223
                        ctx.incIndent();
42224
                        incrementedIndent = true;
42225
                    }
42226
                }
42227
                else {
42228
                    ctx.print(null, separator, false);
42229
                }
42230
            }
42231
            handler(expressions[i]);
42232
        }
42233
        if (incrementedIndent) {
42234
            // continuation are marked with double indent.
42235
            ctx.decIndent();
42236
            ctx.decIndent();
42237
        }
42238
    };
42239
    AbstractEmitterVisitor.prototype.visitAllStatements = function (statements, ctx) {
42240
        var _this = this;
42241
        statements.forEach(function (stmt) { return stmt.visitStatement(_this, ctx); });
42242
    };
42243
    return AbstractEmitterVisitor;
42244
}());
42245
function escapeIdentifier(input, escapeDollar, alwaysQuote) {
42246
    if (alwaysQuote === void 0) { alwaysQuote = true; }
42247
    if (input == null) {
42248
        return null;
42249
    }
42250
    var body = input.replace(_SINGLE_QUOTE_ESCAPE_STRING_RE, function () {
42251
        var match = [];
42252
        for (var _i = 0; _i < arguments.length; _i++) {
42253
            match[_i] = arguments[_i];
42254
        }
42255
        if (match[0] == '$') {
42256
            return escapeDollar ? '\\$' : '$';
42257
        }
42258
        else if (match[0] == '\n') {
42259
            return '\\n';
42260
        }
42261
        else if (match[0] == '\r') {
42262
            return '\\r';
42263
        }
42264
        else {
42265
            return "\\" + match[0];
42266
        }
42267
    });
42268
    var requiresQuotes = alwaysQuote || !_LEGAL_IDENTIFIER_RE.test(body);
42269
    return requiresQuotes ? "'" + body + "'" : body;
42270
}
42271
function _createIndent(count) {
42272
    var res = '';
42273
    for (var i = 0; i < count; i++) {
42274
        res += _INDENT_WITH;
42275
    }
42276
    return res;
42277
}
42278
 
42279
/**
42280
 * @license
42281
 * Copyright Google Inc. All Rights Reserved.
42282
 *
42283
 * Use of this source code is governed by an MIT-style license that can be
42284
 * found in the LICENSE file at https://angular.io/license
42285
 */
42286
function debugOutputAstAsTypeScript(ast) {
42287
    var converter = new _TsEmitterVisitor();
42288
    var ctx = EmitterVisitorContext.createRoot();
42289
    var asts = Array.isArray(ast) ? ast : [ast];
42290
    asts.forEach(function (ast) {
42291
        if (ast instanceof Statement) {
42292
            ast.visitStatement(converter, ctx);
42293
        }
42294
        else if (ast instanceof Expression) {
42295
            ast.visitExpression(converter, ctx);
42296
        }
42297
        else if (ast instanceof Type$1) {
42298
            ast.visitType(converter, ctx);
42299
        }
42300
        else {
42301
            throw new Error("Don't know how to print debug info for " + ast);
42302
        }
42303
    });
42304
    return ctx.toSource();
42305
}
42306
var TypeScriptEmitter = /** @class */ (function () {
42307
    function TypeScriptEmitter() {
42308
    }
42309
    TypeScriptEmitter.prototype.emitStatementsAndContext = function (genFilePath, stmts, preamble, emitSourceMaps, referenceFilter, importFilter) {
42310
        if (preamble === void 0) { preamble = ''; }
42311
        if (emitSourceMaps === void 0) { emitSourceMaps = true; }
42312
        var converter = new _TsEmitterVisitor(referenceFilter, importFilter);
42313
        var ctx = EmitterVisitorContext.createRoot();
42314
        converter.visitAllStatements(stmts, ctx);
42315
        var preambleLines = preamble ? preamble.split('\n') : [];
42316
        converter.reexports.forEach(function (reexports, exportedModuleName) {
42317
            var reexportsCode = reexports.map(function (reexport) { return reexport.name + " as " + reexport.as; }).join(',');
42318
            preambleLines.push("export {" + reexportsCode + "} from '" + exportedModuleName + "';");
42319
        });
42320
        converter.importsWithPrefixes.forEach(function (prefix, importedModuleName) {
42321
            // Note: can't write the real word for import as it screws up system.js auto detection...
42322
            preambleLines.push("imp" +
42323
                ("ort * as " + prefix + " from '" + importedModuleName + "';"));
42324
        });
42325
        var sm = emitSourceMaps ?
42326
            ctx.toSourceMapGenerator(genFilePath, preambleLines.length).toJsComment() :
42327
            '';
42328
        var lines = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(preambleLines, [ctx.toSource(), sm]);
42329
        if (sm) {
42330
            // always add a newline at the end, as some tools have bugs without it.
42331
            lines.push('');
42332
        }
42333
        ctx.setPreambleLineCount(preambleLines.length);
42334
        return { sourceText: lines.join('\n'), context: ctx };
42335
    };
42336
    TypeScriptEmitter.prototype.emitStatements = function (genFilePath, stmts, preamble) {
42337
        if (preamble === void 0) { preamble = ''; }
42338
        return this.emitStatementsAndContext(genFilePath, stmts, preamble).sourceText;
42339
    };
42340
    return TypeScriptEmitter;
42341
}());
42342
var _TsEmitterVisitor = /** @class */ (function (_super) {
42343
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(_TsEmitterVisitor, _super);
42344
    function _TsEmitterVisitor(referenceFilter, importFilter) {
42345
        var _this = _super.call(this, false) || this;
42346
        _this.referenceFilter = referenceFilter;
42347
        _this.importFilter = importFilter;
42348
        _this.typeExpression = 0;
42349
        _this.importsWithPrefixes = new Map();
42350
        _this.reexports = new Map();
42351
        return _this;
42352
    }
42353
    _TsEmitterVisitor.prototype.visitType = function (t, ctx, defaultType) {
42354
        if (defaultType === void 0) { defaultType = 'any'; }
42355
        if (t) {
42356
            this.typeExpression++;
42357
            t.visitType(this, ctx);
42358
            this.typeExpression--;
42359
        }
42360
        else {
42361
            ctx.print(null, defaultType);
42362
        }
42363
    };
42364
    _TsEmitterVisitor.prototype.visitLiteralExpr = function (ast, ctx) {
42365
        var value = ast.value;
42366
        if (value == null && ast.type != INFERRED_TYPE) {
42367
            ctx.print(ast, "(" + value + " as any)");
42368
            return null;
42369
        }
42370
        return _super.prototype.visitLiteralExpr.call(this, ast, ctx);
42371
    };
42372
    // Temporary workaround to support strictNullCheck enabled consumers of ngc emit.
42373
    // In SNC mode, [] have the type never[], so we cast here to any[].
42374
    // TODO: narrow the cast to a more explicit type, or use a pattern that does not
42375
    // start with [].concat. see https://github.com/angular/angular/pull/11846
42376
    _TsEmitterVisitor.prototype.visitLiteralArrayExpr = function (ast, ctx) {
42377
        if (ast.entries.length === 0) {
42378
            ctx.print(ast, '(');
42379
        }
42380
        var result = _super.prototype.visitLiteralArrayExpr.call(this, ast, ctx);
42381
        if (ast.entries.length === 0) {
42382
            ctx.print(ast, ' as any[])');
42383
        }
42384
        return result;
42385
    };
42386
    _TsEmitterVisitor.prototype.visitExternalExpr = function (ast, ctx) {
42387
        this._visitIdentifier(ast.value, ast.typeParams, ctx);
42388
        return null;
42389
    };
42390
    _TsEmitterVisitor.prototype.visitAssertNotNullExpr = function (ast, ctx) {
42391
        var result = _super.prototype.visitAssertNotNullExpr.call(this, ast, ctx);
42392
        ctx.print(ast, '!');
42393
        return result;
42394
    };
42395
    _TsEmitterVisitor.prototype.visitDeclareVarStmt = function (stmt, ctx) {
42396
        if (stmt.hasModifier(StmtModifier.Exported) && stmt.value instanceof ExternalExpr &&
42397
            !stmt.type) {
42398
            // check for a reexport
42399
            var _a = stmt.value.value, name_1 = _a.name, moduleName = _a.moduleName;
42400
            if (moduleName) {
42401
                var reexports = this.reexports.get(moduleName);
42402
                if (!reexports) {
42403
                    reexports = [];
42404
                    this.reexports.set(moduleName, reexports);
42405
                }
42406
                reexports.push({ name: name_1, as: stmt.name });
42407
                return null;
42408
            }
42409
        }
42410
        if (stmt.hasModifier(StmtModifier.Exported)) {
42411
            ctx.print(stmt, "export ");
42412
        }
42413
        if (stmt.hasModifier(StmtModifier.Final)) {
42414
            ctx.print(stmt, "const");
42415
        }
42416
        else {
42417
            ctx.print(stmt, "var");
42418
        }
42419
        ctx.print(stmt, " " + stmt.name);
42420
        this._printColonType(stmt.type, ctx);
42421
        if (stmt.value) {
42422
            ctx.print(stmt, " = ");
42423
            stmt.value.visitExpression(this, ctx);
42424
        }
42425
        ctx.println(stmt, ";");
42426
        return null;
42427
    };
42428
    _TsEmitterVisitor.prototype.visitCastExpr = function (ast, ctx) {
42429
        ctx.print(ast, "(<");
42430
        ast.type.visitType(this, ctx);
42431
        ctx.print(ast, ">");
42432
        ast.value.visitExpression(this, ctx);
42433
        ctx.print(ast, ")");
42434
        return null;
42435
    };
42436
    _TsEmitterVisitor.prototype.visitInstantiateExpr = function (ast, ctx) {
42437
        ctx.print(ast, "new ");
42438
        this.typeExpression++;
42439
        ast.classExpr.visitExpression(this, ctx);
42440
        this.typeExpression--;
42441
        ctx.print(ast, "(");
42442
        this.visitAllExpressions(ast.args, ctx, ',');
42443
        ctx.print(ast, ")");
42444
        return null;
42445
    };
42446
    _TsEmitterVisitor.prototype.visitDeclareClassStmt = function (stmt, ctx) {
42447
        var _this = this;
42448
        ctx.pushClass(stmt);
42449
        if (stmt.hasModifier(StmtModifier.Exported)) {
42450
            ctx.print(stmt, "export ");
42451
        }
42452
        ctx.print(stmt, "class " + stmt.name);
42453
        if (stmt.parent != null) {
42454
            ctx.print(stmt, " extends ");
42455
            this.typeExpression++;
42456
            stmt.parent.visitExpression(this, ctx);
42457
            this.typeExpression--;
42458
        }
42459
        ctx.println(stmt, " {");
42460
        ctx.incIndent();
42461
        stmt.fields.forEach(function (field) { return _this._visitClassField(field, ctx); });
42462
        if (stmt.constructorMethod != null) {
42463
            this._visitClassConstructor(stmt, ctx);
42464
        }
42465
        stmt.getters.forEach(function (getter) { return _this._visitClassGetter(getter, ctx); });
42466
        stmt.methods.forEach(function (method) { return _this._visitClassMethod(method, ctx); });
42467
        ctx.decIndent();
42468
        ctx.println(stmt, "}");
42469
        ctx.popClass();
42470
        return null;
42471
    };
42472
    _TsEmitterVisitor.prototype._visitClassField = function (field, ctx) {
42473
        if (field.hasModifier(StmtModifier.Private)) {
42474
            // comment out as a workaround for #10967
42475
            ctx.print(null, "/*private*/ ");
42476
        }
42477
        if (field.hasModifier(StmtModifier.Static)) {
42478
            ctx.print(null, 'static ');
42479
        }
42480
        ctx.print(null, field.name);
42481
        this._printColonType(field.type, ctx);
42482
        if (field.initializer) {
42483
            ctx.print(null, ' = ');
42484
            field.initializer.visitExpression(this, ctx);
42485
        }
42486
        ctx.println(null, ";");
42487
    };
42488
    _TsEmitterVisitor.prototype._visitClassGetter = function (getter, ctx) {
42489
        if (getter.hasModifier(StmtModifier.Private)) {
42490
            ctx.print(null, "private ");
42491
        }
42492
        ctx.print(null, "get " + getter.name + "()");
42493
        this._printColonType(getter.type, ctx);
42494
        ctx.println(null, " {");
42495
        ctx.incIndent();
42496
        this.visitAllStatements(getter.body, ctx);
42497
        ctx.decIndent();
42498
        ctx.println(null, "}");
42499
    };
42500
    _TsEmitterVisitor.prototype._visitClassConstructor = function (stmt, ctx) {
42501
        ctx.print(stmt, "constructor(");
42502
        this._visitParams(stmt.constructorMethod.params, ctx);
42503
        ctx.println(stmt, ") {");
42504
        ctx.incIndent();
42505
        this.visitAllStatements(stmt.constructorMethod.body, ctx);
42506
        ctx.decIndent();
42507
        ctx.println(stmt, "}");
42508
    };
42509
    _TsEmitterVisitor.prototype._visitClassMethod = function (method, ctx) {
42510
        if (method.hasModifier(StmtModifier.Private)) {
42511
            ctx.print(null, "private ");
42512
        }
42513
        ctx.print(null, method.name + "(");
42514
        this._visitParams(method.params, ctx);
42515
        ctx.print(null, ")");
42516
        this._printColonType(method.type, ctx, 'void');
42517
        ctx.println(null, " {");
42518
        ctx.incIndent();
42519
        this.visitAllStatements(method.body, ctx);
42520
        ctx.decIndent();
42521
        ctx.println(null, "}");
42522
    };
42523
    _TsEmitterVisitor.prototype.visitFunctionExpr = function (ast, ctx) {
42524
        if (ast.name) {
42525
            ctx.print(ast, 'function ');
42526
            ctx.print(ast, ast.name);
42527
        }
42528
        ctx.print(ast, "(");
42529
        this._visitParams(ast.params, ctx);
42530
        ctx.print(ast, ")");
42531
        this._printColonType(ast.type, ctx, 'void');
42532
        if (!ast.name) {
42533
            ctx.print(ast, " => ");
42534
        }
42535
        ctx.println(ast, '{');
42536
        ctx.incIndent();
42537
        this.visitAllStatements(ast.statements, ctx);
42538
        ctx.decIndent();
42539
        ctx.print(ast, "}");
42540
        return null;
42541
    };
42542
    _TsEmitterVisitor.prototype.visitDeclareFunctionStmt = function (stmt, ctx) {
42543
        if (stmt.hasModifier(StmtModifier.Exported)) {
42544
            ctx.print(stmt, "export ");
42545
        }
42546
        ctx.print(stmt, "function " + stmt.name + "(");
42547
        this._visitParams(stmt.params, ctx);
42548
        ctx.print(stmt, ")");
42549
        this._printColonType(stmt.type, ctx, 'void');
42550
        ctx.println(stmt, " {");
42551
        ctx.incIndent();
42552
        this.visitAllStatements(stmt.statements, ctx);
42553
        ctx.decIndent();
42554
        ctx.println(stmt, "}");
42555
        return null;
42556
    };
42557
    _TsEmitterVisitor.prototype.visitTryCatchStmt = function (stmt, ctx) {
42558
        ctx.println(stmt, "try {");
42559
        ctx.incIndent();
42560
        this.visitAllStatements(stmt.bodyStmts, ctx);
42561
        ctx.decIndent();
42562
        ctx.println(stmt, "} catch (" + CATCH_ERROR_VAR$1.name + ") {");
42563
        ctx.incIndent();
42564
        var catchStmts = [CATCH_STACK_VAR$1.set(CATCH_ERROR_VAR$1.prop('stack', null)).toDeclStmt(null, [
42565
                StmtModifier.Final
42566
            ])].concat(stmt.catchStmts);
42567
        this.visitAllStatements(catchStmts, ctx);
42568
        ctx.decIndent();
42569
        ctx.println(stmt, "}");
42570
        return null;
42571
    };
42572
    _TsEmitterVisitor.prototype.visitBuiltinType = function (type, ctx) {
42573
        var typeStr;
42574
        switch (type.name) {
42575
            case BuiltinTypeName.Bool:
42576
                typeStr = 'boolean';
42577
                break;
42578
            case BuiltinTypeName.Dynamic:
42579
                typeStr = 'any';
42580
                break;
42581
            case BuiltinTypeName.Function:
42582
                typeStr = 'Function';
42583
                break;
42584
            case BuiltinTypeName.Number:
42585
                typeStr = 'number';
42586
                break;
42587
            case BuiltinTypeName.Int:
42588
                typeStr = 'number';
42589
                break;
42590
            case BuiltinTypeName.String:
42591
                typeStr = 'string';
42592
                break;
42593
            default:
42594
                throw new Error("Unsupported builtin type " + type.name);
42595
        }
42596
        ctx.print(null, typeStr);
42597
        return null;
42598
    };
42599
    _TsEmitterVisitor.prototype.visitExpressionType = function (ast, ctx) {
42600
        ast.value.visitExpression(this, ctx);
42601
        return null;
42602
    };
42603
    _TsEmitterVisitor.prototype.visitArrayType = function (type, ctx) {
42604
        this.visitType(type.of, ctx);
42605
        ctx.print(null, "[]");
42606
        return null;
42607
    };
42608
    _TsEmitterVisitor.prototype.visitMapType = function (type, ctx) {
42609
        ctx.print(null, "{[key: string]:");
42610
        this.visitType(type.valueType, ctx);
42611
        ctx.print(null, "}");
42612
        return null;
42613
    };
42614
    _TsEmitterVisitor.prototype.getBuiltinMethodName = function (method) {
42615
        var name;
42616
        switch (method) {
42617
            case BuiltinMethod.ConcatArray:
42618
                name = 'concat';
42619
                break;
42620
            case BuiltinMethod.SubscribeObservable:
42621
                name = 'subscribe';
42622
                break;
42623
            case BuiltinMethod.Bind:
42624
                name = 'bind';
42625
                break;
42626
            default:
42627
                throw new Error("Unknown builtin method: " + method);
42628
        }
42629
        return name;
42630
    };
42631
    _TsEmitterVisitor.prototype._visitParams = function (params, ctx) {
42632
        var _this = this;
42633
        this.visitAllObjects(function (param) {
42634
            ctx.print(null, param.name);
42635
            _this._printColonType(param.type, ctx);
42636
        }, params, ctx, ',');
42637
    };
42638
    _TsEmitterVisitor.prototype._visitIdentifier = function (value, typeParams, ctx) {
42639
        var _this = this;
42640
        var name = value.name, moduleName = value.moduleName;
42641
        if (this.referenceFilter && this.referenceFilter(value)) {
42642
            ctx.print(null, '(null as any)');
42643
            return;
42644
        }
42645
        if (moduleName && (!this.importFilter || !this.importFilter(value))) {
42646
            var prefix = this.importsWithPrefixes.get(moduleName);
42647
            if (prefix == null) {
42648
                prefix = "i" + this.importsWithPrefixes.size;
42649
                this.importsWithPrefixes.set(moduleName, prefix);
42650
            }
42651
            ctx.print(null, prefix + ".");
42652
        }
42653
        ctx.print(null, name);
42654
        if (this.typeExpression > 0) {
42655
            // If we are in a type expression that refers to a generic type then supply
42656
            // the required type parameters. If there were not enough type parameters
42657
            // supplied, supply any as the type. Outside a type expression the reference
42658
            // should not supply type parameters and be treated as a simple value reference
42659
            // to the constructor function itself.
42660
            var suppliedParameters = typeParams || [];
42661
            if (suppliedParameters.length > 0) {
42662
                ctx.print(null, "<");
42663
                this.visitAllObjects(function (type) { return type.visitType(_this, ctx); }, typeParams, ctx, ',');
42664
                ctx.print(null, ">");
42665
            }
42666
        }
42667
    };
42668
    _TsEmitterVisitor.prototype._printColonType = function (type, ctx, defaultType) {
42669
        if (type !== INFERRED_TYPE) {
42670
            ctx.print(null, ':');
42671
            this.visitType(type, ctx, defaultType);
42672
        }
42673
    };
42674
    return _TsEmitterVisitor;
42675
}(AbstractEmitterVisitor));
42676
 
42677
/**
42678
 * @license
42679
 * Copyright Google Inc. All Rights Reserved.
42680
 *
42681
 * Use of this source code is governed by an MIT-style license that can be
42682
 * found in the LICENSE file at https://angular.io/license
42683
 */
42684
/**
42685
 * Resolve a `Type` for {@link Pipe}.
42686
 *
42687
 * This interface can be overridden by the application developer to create custom behavior.
42688
 *
42689
 * See {@link Compiler}
42690
 */
42691
var PipeResolver = /** @class */ (function () {
42692
    function PipeResolver(_reflector) {
42693
        this._reflector = _reflector;
42694
    }
42695
    PipeResolver.prototype.isPipe = function (type) {
42696
        var typeMetadata = this._reflector.annotations(resolveForwardRef(type));
42697
        return typeMetadata && typeMetadata.some(createPipe.isTypeOf);
42698
    };
42699
    /**
42700
     * Return {@link Pipe} for a given `Type`.
42701
     */
42702
    PipeResolver.prototype.resolve = function (type, throwIfNotFound) {
42703
        if (throwIfNotFound === void 0) { throwIfNotFound = true; }
42704
        var metas = this._reflector.annotations(resolveForwardRef(type));
42705
        if (metas) {
42706
            var annotation = findLast(metas, createPipe.isTypeOf);
42707
            if (annotation) {
42708
                return annotation;
42709
            }
42710
        }
42711
        if (throwIfNotFound) {
42712
            throw new Error("No Pipe decorator found on " + stringify(type));
42713
        }
42714
        return null;
42715
    };
42716
    return PipeResolver;
42717
}());
42718
 
42719
/**
42720
 * @license
42721
 * Copyright Google Inc. All Rights Reserved.
42722
 *
42723
 * Use of this source code is governed by an MIT-style license that can be
42724
 * found in the LICENSE file at https://angular.io/license
42725
 */
42726
// =================================================================================================
42727
// =================================================================================================
42728
// =========== S T O P   -  S T O P   -  S T O P   -  S T O P   -  S T O P   -  S T O P  ===========
42729
// =================================================================================================
42730
// =================================================================================================
42731
//
42732
//        DO NOT EDIT THIS LIST OF SECURITY SENSITIVE PROPERTIES WITHOUT A SECURITY REVIEW!
42733
//                               Reach out to mprobst for details.
42734
//
42735
// =================================================================================================
42736
/** Map from tagName|propertyName SecurityContext. Properties applying to all tags use '*'. */
42737
var SECURITY_SCHEMA = {};
42738
function registerContext(ctx, specs) {
42739
    try {
42740
        for (var specs_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(specs), specs_1_1 = specs_1.next(); !specs_1_1.done; specs_1_1 = specs_1.next()) {
42741
            var spec = specs_1_1.value;
42742
            SECURITY_SCHEMA[spec.toLowerCase()] = ctx;
42743
        }
42744
    }
42745
    catch (e_1_1) { e_1 = { error: e_1_1 }; }
42746
    finally {
42747
        try {
42748
            if (specs_1_1 && !specs_1_1.done && (_a = specs_1.return)) _a.call(specs_1);
42749
        }
42750
        finally { if (e_1) throw e_1.error; }
42751
    }
42752
    var e_1, _a;
42753
}
42754
// Case is insignificant below, all element and attribute names are lower-cased for lookup.
42755
registerContext(SecurityContext.HTML, [
42756
    'iframe|srcdoc',
42757
    '*|innerHTML',
42758
    '*|outerHTML',
42759
]);
42760
registerContext(SecurityContext.STYLE, ['*|style']);
42761
// NB: no SCRIPT contexts here, they are never allowed due to the parser stripping them.
42762
registerContext(SecurityContext.URL, [
42763
    '*|formAction', 'area|href', 'area|ping', 'audio|src', 'a|href',
42764
    'a|ping', 'blockquote|cite', 'body|background', 'del|cite', 'form|action',
42765
    'img|src', 'img|srcset', 'input|src', 'ins|cite', 'q|cite',
42766
    'source|src', 'source|srcset', 'track|src', 'video|poster', 'video|src',
42767
]);
42768
registerContext(SecurityContext.RESOURCE_URL, [
42769
    'applet|code',
42770
    'applet|codebase',
42771
    'base|href',
42772
    'embed|src',
42773
    'frame|src',
42774
    'head|profile',
42775
    'html|manifest',
42776
    'iframe|src',
42777
    'link|href',
42778
    'media|src',
42779
    'object|codebase',
42780
    'object|data',
42781
    'script|src',
42782
]);
42783
 
42784
/**
42785
 * @license
42786
 * Copyright Google Inc. All Rights Reserved.
42787
 *
42788
 * Use of this source code is governed by an MIT-style license that can be
42789
 * found in the LICENSE file at https://angular.io/license
42790
 */
42791
var ElementSchemaRegistry = /** @class */ (function () {
42792
    function ElementSchemaRegistry() {
42793
    }
42794
    return ElementSchemaRegistry;
42795
}());
42796
 
42797
/**
42798
 * @license
42799
 * Copyright Google Inc. All Rights Reserved.
42800
 *
42801
 * Use of this source code is governed by an MIT-style license that can be
42802
 * found in the LICENSE file at https://angular.io/license
42803
 */
42804
var BOOLEAN = 'boolean';
42805
var NUMBER = 'number';
42806
var STRING = 'string';
42807
var OBJECT = 'object';
42808
/**
42809
 * This array represents the DOM schema. It encodes inheritance, properties, and events.
42810
 *
42811
 * ## Overview
42812
 *
42813
 * Each line represents one kind of element. The `element_inheritance` and properties are joined
42814
 * using `element_inheritance|properties` syntax.
42815
 *
42816
 * ## Element Inheritance
42817
 *
42818
 * The `element_inheritance` can be further subdivided as `element1,element2,...^parentElement`.
42819
 * Here the individual elements are separated by `,` (commas). Every element in the list
42820
 * has identical properties.
42821
 *
42822
 * An `element` may inherit additional properties from `parentElement` If no `^parentElement` is
42823
 * specified then `""` (blank) element is assumed.
42824
 *
42825
 * NOTE: The blank element inherits from root `[Element]` element, the super element of all
42826
 * elements.
42827
 *
42828
 * NOTE an element prefix such as `:svg:` has no special meaning to the schema.
42829
 *
42830
 * ## Properties
42831
 *
42832
 * Each element has a set of properties separated by `,` (commas). Each property can be prefixed
42833
 * by a special character designating its type:
42834
 *
42835
 * - (no prefix): property is a string.
42836
 * - `*`: property represents an event.
42837
 * - `!`: property is a boolean.
42838
 * - `#`: property is a number.
42839
 * - `%`: property is an object.
42840
 *
42841
 * ## Query
42842
 *
42843
 * The class creates an internal squas representation which allows to easily answer the query of
42844
 * if a given property exist on a given element.
42845
 *
42846
 * NOTE: We don't yet support querying for types or events.
42847
 * NOTE: This schema is auto extracted from `schema_extractor.ts` located in the test folder,
42848
 *       see dom_element_schema_registry_spec.ts
42849
 */
42850
// =================================================================================================
42851
// =================================================================================================
42852
// =========== S T O P   -  S T O P   -  S T O P   -  S T O P   -  S T O P   -  S T O P  ===========
42853
// =================================================================================================
42854
// =================================================================================================
42855
//
42856
//                       DO NOT EDIT THIS DOM SCHEMA WITHOUT A SECURITY REVIEW!
42857
//
42858
// Newly added properties must be security reviewed and assigned an appropriate SecurityContext in
42859
// dom_security_schema.ts. Reach out to mprobst & rjamet for details.
42860
//
42861
// =================================================================================================
42862
var SCHEMA = [
42863
    '[Element]|textContent,%classList,className,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*copy,*cut,*paste,*search,*selectstart,*webkitfullscreenchange,*webkitfullscreenerror,*wheel,outerHTML,#scrollLeft,#scrollTop,slot' +
42864
        /* added manually to avoid breaking changes */
42865
        ',*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored',
42866
    '[HTMLElement]^[Element]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate',
42867
    'abbr,address,article,aside,b,bdi,bdo,cite,code,dd,dfn,dt,em,figcaption,figure,footer,header,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate',
42868
    'media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,src,%srcObject,#volume',
42869
    ':svg:^[HTMLElement]|*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,%style,#tabIndex',
42870
    ':svg:graphics^:svg:|',
42871
    ':svg:animation^:svg:|*begin,*end,*repeat',
42872
    ':svg:geometry^:svg:|',
42873
    ':svg:componentTransferFunction^:svg:|',
42874
    ':svg:gradient^:svg:|',
42875
    ':svg:textContent^:svg:graphics|',
42876
    ':svg:textPositioning^:svg:textContent|',
42877
    'a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,rev,search,shape,target,text,type,username',
42878
    'area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,search,shape,target,username',
42879
    'audio^media|',
42880
    'br^[HTMLElement]|clear',
42881
    'base^[HTMLElement]|href,target',
42882
    'body^[HTMLElement]|aLink,background,bgColor,link,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink',
42883
    'button^[HTMLElement]|!autofocus,!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value',
42884
    'canvas^[HTMLElement]|#height,#width',
42885
    'content^[HTMLElement]|select',
42886
    'dl^[HTMLElement]|!compact',
42887
    'datalist^[HTMLElement]|',
42888
    'details^[HTMLElement]|!open',
42889
    'dialog^[HTMLElement]|!open,returnValue',
42890
    'dir^[HTMLElement]|!compact',
42891
    'div^[HTMLElement]|align',
42892
    'embed^[HTMLElement]|align,height,name,src,type,width',
42893
    'fieldset^[HTMLElement]|!disabled,name',
42894
    'font^[HTMLElement]|color,face,size',
42895
    'form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target',
42896
    'frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src',
42897
    'frameset^[HTMLElement]|cols,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows',
42898
    'hr^[HTMLElement]|align,color,!noShade,size,width',
42899
    'head^[HTMLElement]|',
42900
    'h1,h2,h3,h4,h5,h6^[HTMLElement]|align',
42901
    'html^[HTMLElement]|version',
42902
    'iframe^[HTMLElement]|align,!allowFullscreen,frameBorder,height,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width',
42903
    'img^[HTMLElement]|align,alt,border,%crossOrigin,#height,#hspace,!isMap,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width',
42904
    'input^[HTMLElement]|accept,align,alt,autocapitalize,autocomplete,!autofocus,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width',
42905
    'li^[HTMLElement]|type,#value',
42906
    'label^[HTMLElement]|htmlFor',
42907
    'legend^[HTMLElement]|align',
42908
    'link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type',
42909
    'map^[HTMLElement]|name',
42910
    'marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width',
42911
    'menu^[HTMLElement]|!compact',
42912
    'meta^[HTMLElement]|content,httpEquiv,name,scheme',
42913
    'meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value',
42914
    'ins,del^[HTMLElement]|cite,dateTime',
42915
    'ol^[HTMLElement]|!compact,!reversed,#start,type',
42916
    'object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width',
42917
    'optgroup^[HTMLElement]|!disabled,label',
42918
    'option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value',
42919
    'output^[HTMLElement]|defaultValue,%htmlFor,name,value',
42920
    'p^[HTMLElement]|align',
42921
    'param^[HTMLElement]|name,type,value,valueType',
42922
    'picture^[HTMLElement]|',
42923
    'pre^[HTMLElement]|#width',
42924
    'progress^[HTMLElement]|#max,#value',
42925
    'q,blockquote,cite^[HTMLElement]|',
42926
    'script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,src,text,type',
42927
    'select^[HTMLElement]|!autofocus,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value',
42928
    'shadow^[HTMLElement]|',
42929
    'slot^[HTMLElement]|name',
42930
    'source^[HTMLElement]|media,sizes,src,srcset,type',
42931
    'span^[HTMLElement]|',
42932
    'style^[HTMLElement]|!disabled,media,type',
42933
    'caption^[HTMLElement]|align',
42934
    'th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width',
42935
    'col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width',
42936
    'table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width',
42937
    'tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign',
42938
    'tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign',
42939
    'template^[HTMLElement]|',
42940
    'textarea^[HTMLElement]|autocapitalize,!autofocus,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap',
42941
    'title^[HTMLElement]|text',
42942
    'track^[HTMLElement]|!default,kind,label,src,srclang',
42943
    'ul^[HTMLElement]|!compact,type',
42944
    'unknown^[HTMLElement]|',
42945
    'video^media|#height,poster,#width',
42946
    ':svg:a^:svg:graphics|',
42947
    ':svg:animate^:svg:animation|',
42948
    ':svg:animateMotion^:svg:animation|',
42949
    ':svg:animateTransform^:svg:animation|',
42950
    ':svg:circle^:svg:geometry|',
42951
    ':svg:clipPath^:svg:graphics|',
42952
    ':svg:defs^:svg:graphics|',
42953
    ':svg:desc^:svg:|',
42954
    ':svg:discard^:svg:|',
42955
    ':svg:ellipse^:svg:geometry|',
42956
    ':svg:feBlend^:svg:|',
42957
    ':svg:feColorMatrix^:svg:|',
42958
    ':svg:feComponentTransfer^:svg:|',
42959
    ':svg:feComposite^:svg:|',
42960
    ':svg:feConvolveMatrix^:svg:|',
42961
    ':svg:feDiffuseLighting^:svg:|',
42962
    ':svg:feDisplacementMap^:svg:|',
42963
    ':svg:feDistantLight^:svg:|',
42964
    ':svg:feDropShadow^:svg:|',
42965
    ':svg:feFlood^:svg:|',
42966
    ':svg:feFuncA^:svg:componentTransferFunction|',
42967
    ':svg:feFuncB^:svg:componentTransferFunction|',
42968
    ':svg:feFuncG^:svg:componentTransferFunction|',
42969
    ':svg:feFuncR^:svg:componentTransferFunction|',
42970
    ':svg:feGaussianBlur^:svg:|',
42971
    ':svg:feImage^:svg:|',
42972
    ':svg:feMerge^:svg:|',
42973
    ':svg:feMergeNode^:svg:|',
42974
    ':svg:feMorphology^:svg:|',
42975
    ':svg:feOffset^:svg:|',
42976
    ':svg:fePointLight^:svg:|',
42977
    ':svg:feSpecularLighting^:svg:|',
42978
    ':svg:feSpotLight^:svg:|',
42979
    ':svg:feTile^:svg:|',
42980
    ':svg:feTurbulence^:svg:|',
42981
    ':svg:filter^:svg:|',
42982
    ':svg:foreignObject^:svg:graphics|',
42983
    ':svg:g^:svg:graphics|',
42984
    ':svg:image^:svg:graphics|',
42985
    ':svg:line^:svg:geometry|',
42986
    ':svg:linearGradient^:svg:gradient|',
42987
    ':svg:mpath^:svg:|',
42988
    ':svg:marker^:svg:|',
42989
    ':svg:mask^:svg:|',
42990
    ':svg:metadata^:svg:|',
42991
    ':svg:path^:svg:geometry|',
42992
    ':svg:pattern^:svg:|',
42993
    ':svg:polygon^:svg:geometry|',
42994
    ':svg:polyline^:svg:geometry|',
42995
    ':svg:radialGradient^:svg:gradient|',
42996
    ':svg:rect^:svg:geometry|',
42997
    ':svg:svg^:svg:graphics|#currentScale,#zoomAndPan',
42998
    ':svg:script^:svg:|type',
42999
    ':svg:set^:svg:animation|',
43000
    ':svg:stop^:svg:|',
43001
    ':svg:style^:svg:|!disabled,media,title,type',
43002
    ':svg:switch^:svg:graphics|',
43003
    ':svg:symbol^:svg:|',
43004
    ':svg:tspan^:svg:textPositioning|',
43005
    ':svg:text^:svg:textPositioning|',
43006
    ':svg:textPath^:svg:textContent|',
43007
    ':svg:title^:svg:|',
43008
    ':svg:use^:svg:graphics|',
43009
    ':svg:view^:svg:|#zoomAndPan',
43010
    'data^[HTMLElement]|value',
43011
    'keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name',
43012
    'menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default',
43013
    'summary^[HTMLElement]|',
43014
    'time^[HTMLElement]|dateTime',
43015
    ':svg:cursor^:svg:|',
43016
];
43017
var _ATTR_TO_PROP = {
43018
    'class': 'className',
43019
    'for': 'htmlFor',
43020
    'formaction': 'formAction',
43021
    'innerHtml': 'innerHTML',
43022
    'readonly': 'readOnly',
43023
    'tabindex': 'tabIndex',
43024
};
43025
var DomElementSchemaRegistry = /** @class */ (function (_super) {
43026
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(DomElementSchemaRegistry, _super);
43027
    function DomElementSchemaRegistry() {
43028
        var _this = _super.call(this) || this;
43029
        _this._schema = {};
43030
        SCHEMA.forEach(function (encodedType) {
43031
            var type = {};
43032
            var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(encodedType.split('|'), 2), strType = _a[0], strProperties = _a[1];
43033
            var properties = strProperties.split(',');
43034
            var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(strType.split('^'), 2), typeNames = _b[0], superName = _b[1];
43035
            typeNames.split(',').forEach(function (tag) { return _this._schema[tag.toLowerCase()] = type; });
43036
            var superType = superName && _this._schema[superName.toLowerCase()];
43037
            if (superType) {
43038
                Object.keys(superType).forEach(function (prop) { type[prop] = superType[prop]; });
43039
            }
43040
            properties.forEach(function (property) {
43041
                if (property.length > 0) {
43042
                    switch (property[0]) {
43043
                        case '*':
43044
                            // We don't yet support events.
43045
                            // If ever allowing to bind to events, GO THROUGH A SECURITY REVIEW, allowing events
43046
                            // will
43047
                            // almost certainly introduce bad XSS vulnerabilities.
43048
                            // type[property.substring(1)] = EVENT;
43049
                            break;
43050
                        case '!':
43051
                            type[property.substring(1)] = BOOLEAN;
43052
                            break;
43053
                        case '#':
43054
                            type[property.substring(1)] = NUMBER;
43055
                            break;
43056
                        case '%':
43057
                            type[property.substring(1)] = OBJECT;
43058
                            break;
43059
                        default:
43060
                            type[property] = STRING;
43061
                    }
43062
                }
43063
            });
43064
        });
43065
        return _this;
43066
    }
43067
    DomElementSchemaRegistry.prototype.hasProperty = function (tagName, propName, schemaMetas) {
43068
        if (schemaMetas.some(function (schema) { return schema.name === NO_ERRORS_SCHEMA.name; })) {
43069
            return true;
43070
        }
43071
        if (tagName.indexOf('-') > -1) {
43072
            if (isNgContainer(tagName) || isNgContent(tagName)) {
43073
                return false;
43074
            }
43075
            if (schemaMetas.some(function (schema) { return schema.name === CUSTOM_ELEMENTS_SCHEMA.name; })) {
43076
                // Can't tell now as we don't know which properties a custom element will get
43077
                // once it is instantiated
43078
                return true;
43079
            }
43080
        }
43081
        var elementProperties = this._schema[tagName.toLowerCase()] || this._schema['unknown'];
43082
        return !!elementProperties[propName];
43083
    };
43084
    DomElementSchemaRegistry.prototype.hasElement = function (tagName, schemaMetas) {
43085
        if (schemaMetas.some(function (schema) { return schema.name === NO_ERRORS_SCHEMA.name; })) {
43086
            return true;
43087
        }
43088
        if (tagName.indexOf('-') > -1) {
43089
            if (isNgContainer(tagName) || isNgContent(tagName)) {
43090
                return true;
43091
            }
43092
            if (schemaMetas.some(function (schema) { return schema.name === CUSTOM_ELEMENTS_SCHEMA.name; })) {
43093
                // Allow any custom elements
43094
                return true;
43095
            }
43096
        }
43097
        return !!this._schema[tagName.toLowerCase()];
43098
    };
43099
    /**
43100
     * securityContext returns the security context for the given property on the given DOM tag.
43101
     *
43102
     * Tag and property name are statically known and cannot change at runtime, i.e. it is not
43103
     * possible to bind a value into a changing attribute or tag name.
43104
     *
43105
     * The filtering is white list based. All attributes in the schema above are assumed to have the
43106
     * 'NONE' security context, i.e. that they are safe inert string values. Only specific well known
43107
     * attack vectors are assigned their appropriate context.
43108
     */
43109
    DomElementSchemaRegistry.prototype.securityContext = function (tagName, propName, isAttribute) {
43110
        if (isAttribute) {
43111
            // NB: For security purposes, use the mapped property name, not the attribute name.
43112
            propName = this.getMappedPropName(propName);
43113
        }
43114
        // Make sure comparisons are case insensitive, so that case differences between attribute and
43115
        // property names do not have a security impact.
43116
        tagName = tagName.toLowerCase();
43117
        propName = propName.toLowerCase();
43118
        var ctx = SECURITY_SCHEMA[tagName + '|' + propName];
43119
        if (ctx) {
43120
            return ctx;
43121
        }
43122
        ctx = SECURITY_SCHEMA['*|' + propName];
43123
        return ctx ? ctx : SecurityContext.NONE;
43124
    };
43125
    DomElementSchemaRegistry.prototype.getMappedPropName = function (propName) { return _ATTR_TO_PROP[propName] || propName; };
43126
    DomElementSchemaRegistry.prototype.getDefaultComponentElementName = function () { return 'ng-component'; };
43127
    DomElementSchemaRegistry.prototype.validateProperty = function (name) {
43128
        if (name.toLowerCase().startsWith('on')) {
43129
            var msg = "Binding to event property '" + name + "' is disallowed for security reasons, " +
43130
                ("please use (" + name.slice(2) + ")=...") +
43131
                ("\nIf '" + name + "' is a directive input, make sure the directive is imported by the") +
43132
                " current module.";
43133
            return { error: true, msg: msg };
43134
        }
43135
        else {
43136
            return { error: false };
43137
        }
43138
    };
43139
    DomElementSchemaRegistry.prototype.validateAttribute = function (name) {
43140
        if (name.toLowerCase().startsWith('on')) {
43141
            var msg = "Binding to event attribute '" + name + "' is disallowed for security reasons, " +
43142
                ("please use (" + name.slice(2) + ")=...");
43143
            return { error: true, msg: msg };
43144
        }
43145
        else {
43146
            return { error: false };
43147
        }
43148
    };
43149
    DomElementSchemaRegistry.prototype.allKnownElementNames = function () { return Object.keys(this._schema); };
43150
    DomElementSchemaRegistry.prototype.normalizeAnimationStyleProperty = function (propName) {
43151
        return dashCaseToCamelCase(propName);
43152
    };
43153
    DomElementSchemaRegistry.prototype.normalizeAnimationStyleValue = function (camelCaseProp, userProvidedProp, val) {
43154
        var unit = '';
43155
        var strVal = val.toString().trim();
43156
        var errorMsg = null;
43157
        if (_isPixelDimensionStyle(camelCaseProp) && val !== 0 && val !== '0') {
43158
            if (typeof val === 'number') {
43159
                unit = 'px';
43160
            }
43161
            else {
43162
                var valAndSuffixMatch = val.match(/^[+-]?[\d\.]+([a-z]*)$/);
43163
                if (valAndSuffixMatch && valAndSuffixMatch[1].length == 0) {
43164
                    errorMsg = "Please provide a CSS unit value for " + userProvidedProp + ":" + val;
43165
                }
43166
            }
43167
        }
43168
        return { error: errorMsg, value: strVal + unit };
43169
    };
43170
    return DomElementSchemaRegistry;
43171
}(ElementSchemaRegistry));
43172
function _isPixelDimensionStyle(prop) {
43173
    switch (prop) {
43174
        case 'width':
43175
        case 'height':
43176
        case 'minWidth':
43177
        case 'minHeight':
43178
        case 'maxWidth':
43179
        case 'maxHeight':
43180
        case 'left':
43181
        case 'top':
43182
        case 'bottom':
43183
        case 'right':
43184
        case 'fontSize':
43185
        case 'outlineWidth':
43186
        case 'outlineOffset':
43187
        case 'paddingTop':
43188
        case 'paddingLeft':
43189
        case 'paddingBottom':
43190
        case 'paddingRight':
43191
        case 'marginTop':
43192
        case 'marginLeft':
43193
        case 'marginBottom':
43194
        case 'marginRight':
43195
        case 'borderRadius':
43196
        case 'borderWidth':
43197
        case 'borderTopWidth':
43198
        case 'borderLeftWidth':
43199
        case 'borderRightWidth':
43200
        case 'borderBottomWidth':
43201
        case 'textIndent':
43202
            return true;
43203
        default:
43204
            return false;
43205
    }
43206
}
43207
 
43208
/**
43209
 * @license
43210
 * Copyright Google Inc. All Rights Reserved.
43211
 *
43212
 * Use of this source code is governed by an MIT-style license that can be
43213
 * found in the LICENSE file at https://angular.io/license
43214
 */
43215
/**
43216
 * This file is a port of shadowCSS from webcomponents.js to TypeScript.
43217
 *
43218
 * Please make sure to keep to edits in sync with the source file.
43219
 *
43220
 * Source:
43221
 * https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js
43222
 *
43223
 * The original file level comment is reproduced below
43224
 */
43225
/*
43226
  This is a limited shim for ShadowDOM css styling.
43227
  https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#styles
43228
 
43229
  The intention here is to support only the styling features which can be
43230
  relatively simply implemented. The goal is to allow users to avoid the
43231
  most obvious pitfalls and do so without compromising performance significantly.
43232
  For ShadowDOM styling that's not covered here, a set of best practices
43233
  can be provided that should allow users to accomplish more complex styling.
43234
 
43235
  The following is a list of specific ShadowDOM styling features and a brief
43236
  discussion of the approach used to shim.
43237
 
43238
  Shimmed features:
43239
 
43240
  * :host, :host-context: ShadowDOM allows styling of the shadowRoot's host
43241
  element using the :host rule. To shim this feature, the :host styles are
43242
  reformatted and prefixed with a given scope name and promoted to a
43243
  document level stylesheet.
43244
  For example, given a scope name of .foo, a rule like this:
43245
 
43246
    :host {
43247
        background: red;
43248
      }
43249
    }
43250
 
43251
  becomes:
43252
 
43253
    .foo {
43254
      background: red;
43255
    }
43256
 
43257
  * encapsulation: Styles defined within ShadowDOM, apply only to
43258
  dom inside the ShadowDOM. Polymer uses one of two techniques to implement
43259
  this feature.
43260
 
43261
  By default, rules are prefixed with the host element tag name
43262
  as a descendant selector. This ensures styling does not leak out of the 'top'
43263
  of the element's ShadowDOM. For example,
43264
 
43265
  div {
43266
      font-weight: bold;
43267
    }
43268
 
43269
  becomes:
43270
 
43271
  x-foo div {
43272
      font-weight: bold;
43273
    }
43274
 
43275
  becomes:
43276
 
43277
 
43278
  Alternatively, if WebComponents.ShadowCSS.strictStyling is set to true then
43279
  selectors are scoped by adding an attribute selector suffix to each
43280
  simple selector that contains the host element tag name. Each element
43281
  in the element's ShadowDOM template is also given the scope attribute.
43282
  Thus, these rules match only elements that have the scope attribute.
43283
  For example, given a scope name of x-foo, a rule like this:
43284
 
43285
    div {
43286
      font-weight: bold;
43287
    }
43288
 
43289
  becomes:
43290
 
43291
    div[x-foo] {
43292
      font-weight: bold;
43293
    }
43294
 
43295
  Note that elements that are dynamically added to a scope must have the scope
43296
  selector added to them manually.
43297
 
43298
  * upper/lower bound encapsulation: Styles which are defined outside a
43299
  shadowRoot should not cross the ShadowDOM boundary and should not apply
43300
  inside a shadowRoot.
43301
 
43302
  This styling behavior is not emulated. Some possible ways to do this that
43303
  were rejected due to complexity and/or performance concerns include: (1) reset
43304
  every possible property for every possible selector for a given scope name;
43305
  (2) re-implement css in javascript.
43306
 
43307
  As an alternative, users should make sure to use selectors
43308
  specific to the scope in which they are working.
43309
 
43310
  * ::distributed: This behavior is not emulated. It's often not necessary
43311
  to style the contents of a specific insertion point and instead, descendants
43312
  of the host element can be styled selectively. Users can also create an
43313
  extra node around an insertion point and style that node's contents
43314
  via descendent selectors. For example, with a shadowRoot like this:
43315
 
43316
    <style>
43317
      ::content(div) {
43318
        background: red;
43319
      }
43320
    </style>
43321
    <content></content>
43322
 
43323
  could become:
43324
 
43325
    <style>
43326
      / *@polyfill .content-container div * /
43327
      ::content(div) {
43328
        background: red;
43329
      }
43330
    </style>
43331
    <div class="content-container">
43332
      <content></content>
43333
    </div>
43334
 
43335
  Note the use of @polyfill in the comment above a ShadowDOM specific style
43336
  declaration. This is a directive to the styling shim to use the selector
43337
  in comments in lieu of the next selector when running under polyfill.
43338
*/
43339
var ShadowCss = /** @class */ (function () {
43340
    function ShadowCss() {
43341
        this.strictStyling = true;
43342
    }
43343
    /*
43344
    * Shim some cssText with the given selector. Returns cssText that can
43345
    * be included in the document via WebComponents.ShadowCSS.addCssToDocument(css).
43346
    *
43347
    * When strictStyling is true:
43348
    * - selector is the attribute added to all elements inside the host,
43349
    * - hostSelector is the attribute added to the host itself.
43350
    */
43351
    ShadowCss.prototype.shimCssText = function (cssText, selector, hostSelector) {
43352
        if (hostSelector === void 0) { hostSelector = ''; }
43353
        var commentsWithHash = extractCommentsWithHash(cssText);
43354
        cssText = stripComments(cssText);
43355
        cssText = this._insertDirectives(cssText);
43356
        var scopedCssText = this._scopeCssText(cssText, selector, hostSelector);
43357
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([scopedCssText], commentsWithHash).join('\n');
43358
    };
43359
    ShadowCss.prototype._insertDirectives = function (cssText) {
43360
        cssText = this._insertPolyfillDirectivesInCssText(cssText);
43361
        return this._insertPolyfillRulesInCssText(cssText);
43362
    };
43363
    /*
43364
     * Process styles to convert native ShadowDOM rules that will trip
43365
     * up the css parser; we rely on decorating the stylesheet with inert rules.
43366
     *
43367
     * For example, we convert this rule:
43368
     *
43369
     * polyfill-next-selector { content: ':host menu-item'; }
43370
     * ::content menu-item {
43371
     *
43372
     * to this:
43373
     *
43374
     * scopeName menu-item {
43375
     *
43376
    **/
43377
    ShadowCss.prototype._insertPolyfillDirectivesInCssText = function (cssText) {
43378
        // Difference with webcomponents.js: does not handle comments
43379
        return cssText.replace(_cssContentNextSelectorRe, function () {
43380
            var m = [];
43381
            for (var _i = 0; _i < arguments.length; _i++) {
43382
                m[_i] = arguments[_i];
43383
            }
43384
            return m[2] + '{';
43385
        });
43386
    };
43387
    /*
43388
     * Process styles to add rules which will only apply under the polyfill
43389
     *
43390
     * For example, we convert this rule:
43391
     *
43392
     * polyfill-rule {
43393
     *   content: ':host menu-item';
43394
     * ...
43395
     * }
43396
     *
43397
     * to this:
43398
     *
43399
     * scopeName menu-item {...}
43400
     *
43401
    **/
43402
    ShadowCss.prototype._insertPolyfillRulesInCssText = function (cssText) {
43403
        // Difference with webcomponents.js: does not handle comments
43404
        return cssText.replace(_cssContentRuleRe, function () {
43405
            var m = [];
43406
            for (var _i = 0; _i < arguments.length; _i++) {
43407
                m[_i] = arguments[_i];
43408
            }
43409
            var rule = m[0].replace(m[1], '').replace(m[2], '');
43410
            return m[4] + rule;
43411
        });
43412
    };
43413
    /* Ensure styles are scoped. Pseudo-scoping takes a rule like:
43414
     *
43415
     *  .foo {... }
43416
     *
43417
     *  and converts this to
43418
     *
43419
     *  scopeName .foo { ... }
43420
    */
43421
    ShadowCss.prototype._scopeCssText = function (cssText, scopeSelector, hostSelector) {
43422
        var unscopedRules = this._extractUnscopedRulesFromCssText(cssText);
43423
        // replace :host and :host-context -shadowcsshost and -shadowcsshost respectively
43424
        cssText = this._insertPolyfillHostInCssText(cssText);
43425
        cssText = this._convertColonHost(cssText);
43426
        cssText = this._convertColonHostContext(cssText);
43427
        cssText = this._convertShadowDOMSelectors(cssText);
43428
        if (scopeSelector) {
43429
            cssText = this._scopeSelectors(cssText, scopeSelector, hostSelector);
43430
        }
43431
        cssText = cssText + '\n' + unscopedRules;
43432
        return cssText.trim();
43433
    };
43434
    /*
43435
     * Process styles to add rules which will only apply under the polyfill
43436
     * and do not process via CSSOM. (CSSOM is destructive to rules on rare
43437
     * occasions, e.g. -webkit-calc on Safari.)
43438
     * For example, we convert this rule:
43439
     *
43440
     * @polyfill-unscoped-rule {
43441
     *   content: 'menu-item';
43442
     * ... }
43443
     *
43444
     * to this:
43445
     *
43446
     * menu-item {...}
43447
     *
43448
    **/
43449
    ShadowCss.prototype._extractUnscopedRulesFromCssText = function (cssText) {
43450
        // Difference with webcomponents.js: does not handle comments
43451
        var r = '';
43452
        var m;
43453
        _cssContentUnscopedRuleRe.lastIndex = 0;
43454
        while ((m = _cssContentUnscopedRuleRe.exec(cssText)) !== null) {
43455
            var rule = m[0].replace(m[2], '').replace(m[1], m[4]);
43456
            r += rule + '\n\n';
43457
        }
43458
        return r;
43459
    };
43460
    /*
43461
     * convert a rule like :host(.foo) > .bar { }
43462
     *
43463
     * to
43464
     *
43465
     * .foo<scopeName> > .bar
43466
    */
43467
    ShadowCss.prototype._convertColonHost = function (cssText) {
43468
        return this._convertColonRule(cssText, _cssColonHostRe, this._colonHostPartReplacer);
43469
    };
43470
    /*
43471
     * convert a rule like :host-context(.foo) > .bar { }
43472
     *
43473
     * to
43474
     *
43475
     * .foo<scopeName> > .bar, .foo scopeName > .bar { }
43476
     *
43477
     * and
43478
     *
43479
     * :host-context(.foo:host) .bar { ... }
43480
     *
43481
     * to
43482
     *
43483
     * .foo<scopeName> .bar { ... }
43484
    */
43485
    ShadowCss.prototype._convertColonHostContext = function (cssText) {
43486
        return this._convertColonRule(cssText, _cssColonHostContextRe, this._colonHostContextPartReplacer);
43487
    };
43488
    ShadowCss.prototype._convertColonRule = function (cssText, regExp, partReplacer) {
43489
        // m[1] = :host(-context), m[2] = contents of (), m[3] rest of rule
43490
        return cssText.replace(regExp, function () {
43491
            var m = [];
43492
            for (var _i = 0; _i < arguments.length; _i++) {
43493
                m[_i] = arguments[_i];
43494
            }
43495
            if (m[2]) {
43496
                var parts = m[2].split(',');
43497
                var r = [];
43498
                for (var i = 0; i < parts.length; i++) {
43499
                    var p = parts[i].trim();
43500
                    if (!p)
43501
                        break;
43502
                    r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));
43503
                }
43504
                return r.join(',');
43505
            }
43506
            else {
43507
                return _polyfillHostNoCombinator + m[3];
43508
            }
43509
        });
43510
    };
43511
    ShadowCss.prototype._colonHostContextPartReplacer = function (host, part, suffix) {
43512
        if (part.indexOf(_polyfillHost) > -1) {
43513
            return this._colonHostPartReplacer(host, part, suffix);
43514
        }
43515
        else {
43516
            return host + part + suffix + ', ' + part + ' ' + host + suffix;
43517
        }
43518
    };
43519
    ShadowCss.prototype._colonHostPartReplacer = function (host, part, suffix) {
43520
        return host + part.replace(_polyfillHost, '') + suffix;
43521
    };
43522
    /*
43523
     * Convert combinators like ::shadow and pseudo-elements like ::content
43524
     * by replacing with space.
43525
    */
43526
    ShadowCss.prototype._convertShadowDOMSelectors = function (cssText) {
43527
        return _shadowDOMSelectorsRe.reduce(function (result, pattern) { return result.replace(pattern, ' '); }, cssText);
43528
    };
43529
    // change a selector like 'div' to 'name div'
43530
    ShadowCss.prototype._scopeSelectors = function (cssText, scopeSelector, hostSelector) {
43531
        var _this = this;
43532
        return processRules(cssText, function (rule) {
43533
            var selector = rule.selector;
43534
            var content = rule.content;
43535
            if (rule.selector[0] != '@') {
43536
                selector =
43537
                    _this._scopeSelector(rule.selector, scopeSelector, hostSelector, _this.strictStyling);
43538
            }
43539
            else if (rule.selector.startsWith('@media') || rule.selector.startsWith('@supports') ||
43540
                rule.selector.startsWith('@page') || rule.selector.startsWith('@document')) {
43541
                content = _this._scopeSelectors(rule.content, scopeSelector, hostSelector);
43542
            }
43543
            return new CssRule(selector, content);
43544
        });
43545
    };
43546
    ShadowCss.prototype._scopeSelector = function (selector, scopeSelector, hostSelector, strict) {
43547
        var _this = this;
43548
        return selector.split(',')
43549
            .map(function (part) { return part.trim().split(_shadowDeepSelectors); })
43550
            .map(function (deepParts) {
43551
            var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(deepParts), shallowPart = _a[0], otherParts = _a.slice(1);
43552
            var applyScope = function (shallowPart) {
43553
                if (_this._selectorNeedsScoping(shallowPart, scopeSelector)) {
43554
                    return strict ?
43555
                        _this._applyStrictSelectorScope(shallowPart, scopeSelector, hostSelector) :
43556
                        _this._applySelectorScope(shallowPart, scopeSelector, hostSelector);
43557
                }
43558
                else {
43559
                    return shallowPart;
43560
                }
43561
            };
43562
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([applyScope(shallowPart)], otherParts).join(' ');
43563
        })
43564
            .join(', ');
43565
    };
43566
    ShadowCss.prototype._selectorNeedsScoping = function (selector, scopeSelector) {
43567
        var re = this._makeScopeMatcher(scopeSelector);
43568
        return !re.test(selector);
43569
    };
43570
    ShadowCss.prototype._makeScopeMatcher = function (scopeSelector) {
43571
        var lre = /\[/g;
43572
        var rre = /\]/g;
43573
        scopeSelector = scopeSelector.replace(lre, '\\[').replace(rre, '\\]');
43574
        return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');
43575
    };
43576
    ShadowCss.prototype._applySelectorScope = function (selector, scopeSelector, hostSelector) {
43577
        // Difference from webcomponents.js: scopeSelector could not be an array
43578
        return this._applySimpleSelectorScope(selector, scopeSelector, hostSelector);
43579
    };
43580
    // scope via name and [is=name]
43581
    ShadowCss.prototype._applySimpleSelectorScope = function (selector, scopeSelector, hostSelector) {
43582
        // In Android browser, the lastIndex is not reset when the regex is used in String.replace()
43583
        _polyfillHostRe.lastIndex = 0;
43584
        if (_polyfillHostRe.test(selector)) {
43585
            var replaceBy_1 = this.strictStyling ? "[" + hostSelector + "]" : scopeSelector;
43586
            return selector
43587
                .replace(_polyfillHostNoCombinatorRe, function (hnc, selector) {
43588
                return selector.replace(/([^:]*)(:*)(.*)/, function (_, before, colon, after) {
43589
                    return before + replaceBy_1 + colon + after;
43590
                });
43591
            })
43592
                .replace(_polyfillHostRe, replaceBy_1 + ' ');
43593
        }
43594
        return scopeSelector + ' ' + selector;
43595
    };
43596
    // return a selector with [name] suffix on each simple selector
43597
    // e.g. .foo.bar > .zot becomes .foo[name].bar[name] > .zot[name]  /** @internal */
43598
    ShadowCss.prototype._applyStrictSelectorScope = function (selector, scopeSelector, hostSelector) {
43599
        var _this = this;
43600
        var isRe = /\[is=([^\]]*)\]/g;
43601
        scopeSelector = scopeSelector.replace(isRe, function (_) {
43602
            var parts = [];
43603
            for (var _i = 1; _i < arguments.length; _i++) {
43604
                parts[_i - 1] = arguments[_i];
43605
            }
43606
            return parts[0];
43607
        });
43608
        var attrName = '[' + scopeSelector + ']';
43609
        var _scopeSelectorPart = function (p) {
43610
            var scopedP = p.trim();
43611
            if (!scopedP) {
43612
                return '';
43613
            }
43614
            if (p.indexOf(_polyfillHostNoCombinator) > -1) {
43615
                scopedP = _this._applySimpleSelectorScope(p, scopeSelector, hostSelector);
43616
            }
43617
            else {
43618
                // remove :host since it should be unnecessary
43619
                var t = p.replace(_polyfillHostRe, '');
43620
                if (t.length > 0) {
43621
                    var matches = t.match(/([^:]*)(:*)(.*)/);
43622
                    if (matches) {
43623
                        scopedP = matches[1] + attrName + matches[2] + matches[3];
43624
                    }
43625
                }
43626
            }
43627
            return scopedP;
43628
        };
43629
        var safeContent = new SafeSelector(selector);
43630
        selector = safeContent.content();
43631
        var scopedSelector = '';
43632
        var startIndex = 0;
43633
        var res;
43634
        var sep = /( |>|\+|~(?!=))\s*/g;
43635
        // If a selector appears before :host it should not be shimmed as it
43636
        // matches on ancestor elements and not on elements in the host's shadow
43637
        // `:host-context(div)` is transformed to
43638
        // `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator`
43639
        // the `div` is not part of the component in the 2nd selectors and should not be scoped.
43640
        // Historically `component-tag:host` was matching the component so we also want to preserve
43641
        // this behavior to avoid breaking legacy apps (it should not match).
43642
        // The behavior should be:
43643
        // - `tag:host` -> `tag[h]` (this is to avoid breaking legacy apps, should not match anything)
43644
        // - `tag :host` -> `tag [h]` (`tag` is not scoped because it's considered part of a
43645
        //   `:host-context(tag)`)
43646
        var hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;
43647
        // Only scope parts after the first `-shadowcsshost-no-combinator` when it is present
43648
        var shouldScope = !hasHost;
43649
        while ((res = sep.exec(selector)) !== null) {
43650
            var separator = res[1];
43651
            var part_1 = selector.slice(startIndex, res.index).trim();
43652
            shouldScope = shouldScope || part_1.indexOf(_polyfillHostNoCombinator) > -1;
43653
            var scopedPart = shouldScope ? _scopeSelectorPart(part_1) : part_1;
43654
            scopedSelector += scopedPart + " " + separator + " ";
43655
            startIndex = sep.lastIndex;
43656
        }
43657
        var part = selector.substring(startIndex);
43658
        shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
43659
        scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;
43660
        // replace the placeholders with their original values
43661
        return safeContent.restore(scopedSelector);
43662
    };
43663
    ShadowCss.prototype._insertPolyfillHostInCssText = function (selector) {
43664
        return selector.replace(_colonHostContextRe, _polyfillHostContext)
43665
            .replace(_colonHostRe, _polyfillHost);
43666
    };
43667
    return ShadowCss;
43668
}());
43669
var SafeSelector = /** @class */ (function () {
43670
    function SafeSelector(selector) {
43671
        var _this = this;
43672
        this.placeholders = [];
43673
        this.index = 0;
43674
        // Replaces attribute selectors with placeholders.
43675
        // The WS in [attr="va lue"] would otherwise be interpreted as a selector separator.
43676
        selector = selector.replace(/(\[[^\]]*\])/g, function (_, keep) {
43677
            var replaceBy = "__ph-" + _this.index + "__";
43678
            _this.placeholders.push(keep);
43679
            _this.index++;
43680
            return replaceBy;
43681
        });
43682
        // Replaces the expression in `:nth-child(2n + 1)` with a placeholder.
43683
        // WS and "+" would otherwise be interpreted as selector separators.
43684
        this._content = selector.replace(/(:nth-[-\w]+)(\([^)]+\))/g, function (_, pseudo, exp) {
43685
            var replaceBy = "__ph-" + _this.index + "__";
43686
            _this.placeholders.push(exp);
43687
            _this.index++;
43688
            return pseudo + replaceBy;
43689
        });
43690
    }
43691
    SafeSelector.prototype.restore = function (content) {
43692
        var _this = this;
43693
        return content.replace(/__ph-(\d+)__/g, function (ph, index) { return _this.placeholders[+index]; });
43694
    };
43695
    SafeSelector.prototype.content = function () { return this._content; };
43696
    return SafeSelector;
43697
}());
43698
var _cssContentNextSelectorRe = /polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim;
43699
var _cssContentRuleRe = /(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim;
43700
var _cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim;
43701
var _polyfillHost = '-shadowcsshost';
43702
// note: :host-context pre-processed to -shadowcsshostcontext.
43703
var _polyfillHostContext = '-shadowcsscontext';
43704
var _parenSuffix = ')(?:\\((' +
43705
    '(?:\\([^)(]*\\)|[^)(]*)+?' +
43706
    ')\\))?([^,{]*)';
43707
var _cssColonHostRe = new RegExp('(' + _polyfillHost + _parenSuffix, 'gim');
43708
var _cssColonHostContextRe = new RegExp('(' + _polyfillHostContext + _parenSuffix, 'gim');
43709
var _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';
43710
var _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/;
43711
var _shadowDOMSelectorsRe = [
43712
    /::shadow/g,
43713
    /::content/g,
43714
    // Deprecated selectors
43715
    /\/shadow-deep\//g,
43716
    /\/shadow\//g,
43717
];
43718
// The deep combinator is deprecated in the CSS spec
43719
// Support for `>>>`, `deep`, `::ng-deep` is then also deprecated and will be removed in the future.
43720
// see https://github.com/angular/angular/pull/17677
43721
var _shadowDeepSelectors = /(?:>>>)|(?:\/deep\/)|(?:::ng-deep)/g;
43722
var _selectorReSuffix = '([>\\s~+\[.,{:][\\s\\S]*)?$';
43723
var _polyfillHostRe = /-shadowcsshost/gim;
43724
var _colonHostRe = /:host/gim;
43725
var _colonHostContextRe = /:host-context/gim;
43726
var _commentRe = /\/\*\s*[\s\S]*?\*\//g;
43727
function stripComments(input) {
43728
    return input.replace(_commentRe, '');
43729
}
43730
var _commentWithHashRe = /\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g;
43731
function extractCommentsWithHash(input) {
43732
    return input.match(_commentWithHashRe) || [];
43733
}
43734
var _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;
43735
var _curlyRe = /([{}])/g;
43736
var OPEN_CURLY = '{';
43737
var CLOSE_CURLY = '}';
43738
var BLOCK_PLACEHOLDER = '%BLOCK%';
43739
var CssRule = /** @class */ (function () {
43740
    function CssRule(selector, content) {
43741
        this.selector = selector;
43742
        this.content = content;
43743
    }
43744
    return CssRule;
43745
}());
43746
function processRules(input, ruleCallback) {
43747
    var inputWithEscapedBlocks = escapeBlocks(input);
43748
    var nextBlockIndex = 0;
43749
    return inputWithEscapedBlocks.escapedString.replace(_ruleRe, function () {
43750
        var m = [];
43751
        for (var _i = 0; _i < arguments.length; _i++) {
43752
            m[_i] = arguments[_i];
43753
        }
43754
        var selector = m[2];
43755
        var content = '';
43756
        var suffix = m[4];
43757
        var contentPrefix = '';
43758
        if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) {
43759
            content = inputWithEscapedBlocks.blocks[nextBlockIndex++];
43760
            suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);
43761
            contentPrefix = '{';
43762
        }
43763
        var rule = ruleCallback(new CssRule(selector, content));
43764
        return "" + m[1] + rule.selector + m[3] + contentPrefix + rule.content + suffix;
43765
    });
43766
}
43767
var StringWithEscapedBlocks = /** @class */ (function () {
43768
    function StringWithEscapedBlocks(escapedString, blocks) {
43769
        this.escapedString = escapedString;
43770
        this.blocks = blocks;
43771
    }
43772
    return StringWithEscapedBlocks;
43773
}());
43774
function escapeBlocks(input) {
43775
    var inputParts = input.split(_curlyRe);
43776
    var resultParts = [];
43777
    var escapedBlocks = [];
43778
    var bracketCount = 0;
43779
    var currentBlockParts = [];
43780
    for (var partIndex = 0; partIndex < inputParts.length; partIndex++) {
43781
        var part = inputParts[partIndex];
43782
        if (part == CLOSE_CURLY) {
43783
            bracketCount--;
43784
        }
43785
        if (bracketCount > 0) {
43786
            currentBlockParts.push(part);
43787
        }
43788
        else {
43789
            if (currentBlockParts.length > 0) {
43790
                escapedBlocks.push(currentBlockParts.join(''));
43791
                resultParts.push(BLOCK_PLACEHOLDER);
43792
                currentBlockParts = [];
43793
            }
43794
            resultParts.push(part);
43795
        }
43796
        if (part == OPEN_CURLY) {
43797
            bracketCount++;
43798
        }
43799
    }
43800
    if (currentBlockParts.length > 0) {
43801
        escapedBlocks.push(currentBlockParts.join(''));
43802
        resultParts.push(BLOCK_PLACEHOLDER);
43803
    }
43804
    return new StringWithEscapedBlocks(resultParts.join(''), escapedBlocks);
43805
}
43806
 
43807
/**
43808
 * @license
43809
 * Copyright Google Inc. All Rights Reserved.
43810
 *
43811
 * Use of this source code is governed by an MIT-style license that can be
43812
 * found in the LICENSE file at https://angular.io/license
43813
 */
43814
var COMPONENT_VARIABLE = '%COMP%';
43815
var HOST_ATTR = "_nghost-" + COMPONENT_VARIABLE;
43816
var CONTENT_ATTR = "_ngcontent-" + COMPONENT_VARIABLE;
43817
var StylesCompileDependency = /** @class */ (function () {
43818
    function StylesCompileDependency(name, moduleUrl, setValue) {
43819
        this.name = name;
43820
        this.moduleUrl = moduleUrl;
43821
        this.setValue = setValue;
43822
    }
43823
    return StylesCompileDependency;
43824
}());
43825
var CompiledStylesheet = /** @class */ (function () {
43826
    function CompiledStylesheet(outputCtx, stylesVar, dependencies, isShimmed, meta) {
43827
        this.outputCtx = outputCtx;
43828
        this.stylesVar = stylesVar;
43829
        this.dependencies = dependencies;
43830
        this.isShimmed = isShimmed;
43831
        this.meta = meta;
43832
    }
43833
    return CompiledStylesheet;
43834
}());
43835
var StyleCompiler = /** @class */ (function () {
43836
    function StyleCompiler(_urlResolver) {
43837
        this._urlResolver = _urlResolver;
43838
        this._shadowCss = new ShadowCss();
43839
    }
43840
    StyleCompiler.prototype.compileComponent = function (outputCtx, comp) {
43841
        var template = comp.template;
43842
        return this._compileStyles(outputCtx, comp, new CompileStylesheetMetadata({
43843
            styles: template.styles,
43844
            styleUrls: template.styleUrls,
43845
            moduleUrl: identifierModuleUrl(comp.type)
43846
        }), this.needsStyleShim(comp), true);
43847
    };
43848
    StyleCompiler.prototype.compileStyles = function (outputCtx, comp, stylesheet, shim) {
43849
        if (shim === void 0) { shim = this.needsStyleShim(comp); }
43850
        return this._compileStyles(outputCtx, comp, stylesheet, shim, false);
43851
    };
43852
    StyleCompiler.prototype.needsStyleShim = function (comp) {
43853
        return comp.template.encapsulation === ViewEncapsulation.Emulated;
43854
    };
43855
    StyleCompiler.prototype._compileStyles = function (outputCtx, comp, stylesheet, shim, isComponentStylesheet) {
43856
        var _this = this;
43857
        var styleExpressions = stylesheet.styles.map(function (plainStyle) { return literal(_this._shimIfNeeded(plainStyle, shim)); });
43858
        var dependencies = [];
43859
        stylesheet.styleUrls.forEach(function (styleUrl) {
43860
            var exprIndex = styleExpressions.length;
43861
            // Note: This placeholder will be filled later.
43862
            styleExpressions.push(null);
43863
            dependencies.push(new StylesCompileDependency(getStylesVarName(null), styleUrl, function (value) { return styleExpressions[exprIndex] = outputCtx.importExpr(value); }));
43864
        });
43865
        // styles variable contains plain strings and arrays of other styles arrays (recursive),
43866
        // so we set its type to dynamic.
43867
        var stylesVar = getStylesVarName(isComponentStylesheet ? comp : null);
43868
        var stmt = variable(stylesVar)
43869
            .set(literalArr(styleExpressions, new ArrayType(DYNAMIC_TYPE, [TypeModifier.Const])))
43870
            .toDeclStmt(null, isComponentStylesheet ? [StmtModifier.Final] : [
43871
            StmtModifier.Final, StmtModifier.Exported
43872
        ]);
43873
        outputCtx.statements.push(stmt);
43874
        return new CompiledStylesheet(outputCtx, stylesVar, dependencies, shim, stylesheet);
43875
    };
43876
    StyleCompiler.prototype._shimIfNeeded = function (style, shim) {
43877
        return shim ? this._shadowCss.shimCssText(style, CONTENT_ATTR, HOST_ATTR) : style;
43878
    };
43879
    return StyleCompiler;
43880
}());
43881
function getStylesVarName(component) {
43882
    var result = "styles";
43883
    if (component) {
43884
        result += "_" + identifierName(component.type);
43885
    }
43886
    return result;
43887
}
43888
 
43889
/**
43890
 * @license
43891
 * Copyright Google Inc. All Rights Reserved.
43892
 *
43893
 * Use of this source code is governed by an MIT-style license that can be
43894
 * found in the LICENSE file at https://angular.io/license
43895
 */
43896
var PRESERVE_WS_ATTR_NAME = 'ngPreserveWhitespaces';
43897
var SKIP_WS_TRIM_TAGS = new Set(['pre', 'template', 'textarea', 'script', 'style']);
43898
// Equivalent to \s with \u00a0 (non-breaking space) excluded.
43899
// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp
43900
var WS_CHARS = ' \f\n\r\t\v\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff';
43901
var NO_WS_REGEXP = new RegExp("[^" + WS_CHARS + "]");
43902
var WS_REPLACE_REGEXP = new RegExp("[" + WS_CHARS + "]{2,}", 'g');
43903
function hasPreserveWhitespacesAttr(attrs) {
43904
    return attrs.some(function (attr) { return attr.name === PRESERVE_WS_ATTR_NAME; });
43905
}
43906
/**
43907
 * Angular Dart introduced &ngsp; as a placeholder for non-removable space, see:
43908
 * https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart#L25-L32
43909
 * In Angular Dart &ngsp; is converted to the 0xE500 PUA (Private Use Areas) unicode character
43910
 * and later on replaced by a space. We are re-implementing the same idea here.
43911
 */
43912
function replaceNgsp(value) {
43913
    // lexer is replacing the &ngsp; pseudo-entity with NGSP_UNICODE
43914
    return value.replace(new RegExp(NGSP_UNICODE, 'g'), ' ');
43915
}
43916
/**
43917
 * This visitor can walk HTML parse tree and remove / trim text nodes using the following rules:
43918
 * - consider spaces, tabs and new lines as whitespace characters;
43919
 * - drop text nodes consisting of whitespace characters only;
43920
 * - for all other text nodes replace consecutive whitespace characters with one space;
43921
 * - convert &ngsp; pseudo-entity to a single space;
43922
 *
43923
 * Removal and trimming of whitespaces have positive performance impact (less code to generate
43924
 * while compiling templates, faster view creation). At the same time it can be "destructive"
43925
 * in some cases (whitespaces can influence layout). Because of the potential of breaking layout
43926
 * this visitor is not activated by default in Angular 5 and people need to explicitly opt-in for
43927
 * whitespace removal. The default option for whitespace removal will be revisited in Angular 6
43928
 * and might be changed to "on" by default.
43929
 */
43930
var WhitespaceVisitor = /** @class */ (function () {
43931
    function WhitespaceVisitor() {
43932
    }
43933
    WhitespaceVisitor.prototype.visitElement = function (element, context) {
43934
        if (SKIP_WS_TRIM_TAGS.has(element.name) || hasPreserveWhitespacesAttr(element.attrs)) {
43935
            // don't descent into elements where we need to preserve whitespaces
43936
            // but still visit all attributes to eliminate one used as a market to preserve WS
43937
            return new Element(element.name, visitAll(this, element.attrs), element.children, element.sourceSpan, element.startSourceSpan, element.endSourceSpan);
43938
        }
43939
        return new Element(element.name, element.attrs, visitAll(this, element.children), element.sourceSpan, element.startSourceSpan, element.endSourceSpan);
43940
    };
43941
    WhitespaceVisitor.prototype.visitAttribute = function (attribute, context) {
43942
        return attribute.name !== PRESERVE_WS_ATTR_NAME ? attribute : null;
43943
    };
43944
    WhitespaceVisitor.prototype.visitText = function (text, context) {
43945
        var isNotBlank = text.value.match(NO_WS_REGEXP);
43946
        if (isNotBlank) {
43947
            return new Text(replaceNgsp(text.value).replace(WS_REPLACE_REGEXP, ' '), text.sourceSpan);
43948
        }
43949
        return null;
43950
    };
43951
    WhitespaceVisitor.prototype.visitComment = function (comment, context) { return comment; };
43952
    WhitespaceVisitor.prototype.visitExpansion = function (expansion, context) { return expansion; };
43953
    WhitespaceVisitor.prototype.visitExpansionCase = function (expansionCase, context) { return expansionCase; };
43954
    return WhitespaceVisitor;
43955
}());
43956
function removeWhitespaces(htmlAstWithErrors) {
43957
    return new ParseTreeResult(visitAll(new WhitespaceVisitor(), htmlAstWithErrors.rootNodes), htmlAstWithErrors.errors);
43958
}
43959
 
43960
/**
43961
 * @license
43962
 * Copyright Google Inc. All Rights Reserved.
43963
 *
43964
 * Use of this source code is governed by an MIT-style license that can be
43965
 * found in the LICENSE file at https://angular.io/license
43966
 */
43967
// http://cldr.unicode.org/index/cldr-spec/plural-rules
43968
var PLURAL_CASES = ['zero', 'one', 'two', 'few', 'many', 'other'];
43969
/**
43970
 * Expands special forms into elements.
43971
 *
43972
 * For example,
43973
 *
43974
 * ```
43975
 * { messages.length, plural,
43976
 *   =0 {zero}
43977
 *   =1 {one}
43978
 *   other {more than one}
43979
 * }
43980
 * ```
43981
 *
43982
 * will be expanded into
43983
 *
43984
 * ```
43985
 * <ng-container [ngPlural]="messages.length">
43986
 *   <ng-template ngPluralCase="=0">zero</ng-template>
43987
 *   <ng-template ngPluralCase="=1">one</ng-template>
43988
 *   <ng-template ngPluralCase="other">more than one</ng-template>
43989
 * </ng-container>
43990
 * ```
43991
 */
43992
function expandNodes(nodes) {
43993
    var expander = new _Expander();
43994
    return new ExpansionResult(visitAll(expander, nodes), expander.isExpanded, expander.errors);
43995
}
43996
var ExpansionResult = /** @class */ (function () {
43997
    function ExpansionResult(nodes, expanded, errors) {
43998
        this.nodes = nodes;
43999
        this.expanded = expanded;
44000
        this.errors = errors;
44001
    }
44002
    return ExpansionResult;
44003
}());
44004
var ExpansionError = /** @class */ (function (_super) {
44005
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ExpansionError, _super);
44006
    function ExpansionError(span, errorMsg) {
44007
        return _super.call(this, span, errorMsg) || this;
44008
    }
44009
    return ExpansionError;
44010
}(ParseError));
44011
/**
44012
 * Expand expansion forms (plural, select) to directives
44013
 *
44014
 * @internal
44015
 */
44016
var _Expander = /** @class */ (function () {
44017
    function _Expander() {
44018
        this.isExpanded = false;
44019
        this.errors = [];
44020
    }
44021
    _Expander.prototype.visitElement = function (element, context) {
44022
        return new Element(element.name, element.attrs, visitAll(this, element.children), element.sourceSpan, element.startSourceSpan, element.endSourceSpan);
44023
    };
44024
    _Expander.prototype.visitAttribute = function (attribute, context) { return attribute; };
44025
    _Expander.prototype.visitText = function (text, context) { return text; };
44026
    _Expander.prototype.visitComment = function (comment, context) { return comment; };
44027
    _Expander.prototype.visitExpansion = function (icu, context) {
44028
        this.isExpanded = true;
44029
        return icu.type == 'plural' ? _expandPluralForm(icu, this.errors) :
44030
            _expandDefaultForm(icu, this.errors);
44031
    };
44032
    _Expander.prototype.visitExpansionCase = function (icuCase, context) {
44033
        throw new Error('Should not be reached');
44034
    };
44035
    return _Expander;
44036
}());
44037
// Plural forms are expanded to `NgPlural` and `NgPluralCase`s
44038
function _expandPluralForm(ast, errors) {
44039
    var children = ast.cases.map(function (c) {
44040
        if (PLURAL_CASES.indexOf(c.value) == -1 && !c.value.match(/^=\d+$/)) {
44041
            errors.push(new ExpansionError(c.valueSourceSpan, "Plural cases should be \"=<number>\" or one of " + PLURAL_CASES.join(", ")));
44042
        }
44043
        var expansionResult = expandNodes(c.expression);
44044
        errors.push.apply(errors, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(expansionResult.errors));
44045
        return new Element("ng-template", [new Attribute('ngPluralCase', "" + c.value, c.valueSourceSpan)], expansionResult.nodes, c.sourceSpan, c.sourceSpan, c.sourceSpan);
44046
    });
44047
    var switchAttr = new Attribute('[ngPlural]', ast.switchValue, ast.switchValueSourceSpan);
44048
    return new Element('ng-container', [switchAttr], children, ast.sourceSpan, ast.sourceSpan, ast.sourceSpan);
44049
}
44050
// ICU messages (excluding plural form) are expanded to `NgSwitch`  and `NgSwitchCase`s
44051
function _expandDefaultForm(ast, errors) {
44052
    var children = ast.cases.map(function (c) {
44053
        var expansionResult = expandNodes(c.expression);
44054
        errors.push.apply(errors, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(expansionResult.errors));
44055
        if (c.value === 'other') {
44056
            // other is the default case when no values match
44057
            return new Element("ng-template", [new Attribute('ngSwitchDefault', '', c.valueSourceSpan)], expansionResult.nodes, c.sourceSpan, c.sourceSpan, c.sourceSpan);
44058
        }
44059
        return new Element("ng-template", [new Attribute('ngSwitchCase', "" + c.value, c.valueSourceSpan)], expansionResult.nodes, c.sourceSpan, c.sourceSpan, c.sourceSpan);
44060
    });
44061
    var switchAttr = new Attribute('[ngSwitch]', ast.switchValue, ast.switchValueSourceSpan);
44062
    return new Element('ng-container', [switchAttr], children, ast.sourceSpan, ast.sourceSpan, ast.sourceSpan);
44063
}
44064
 
44065
/**
44066
 * @license
44067
 * Copyright Google Inc. All Rights Reserved.
44068
 *
44069
 * Use of this source code is governed by an MIT-style license that can be
44070
 * found in the LICENSE file at https://angular.io/license
44071
 */
44072
var PROPERTY_PARTS_SEPARATOR = '.';
44073
var ATTRIBUTE_PREFIX = 'attr';
44074
var CLASS_PREFIX = 'class';
44075
var STYLE_PREFIX = 'style';
44076
var ANIMATE_PROP_PREFIX = 'animate-';
44077
var BoundPropertyType;
44078
(function (BoundPropertyType) {
44079
    BoundPropertyType[BoundPropertyType["DEFAULT"] = 0] = "DEFAULT";
44080
    BoundPropertyType[BoundPropertyType["LITERAL_ATTR"] = 1] = "LITERAL_ATTR";
44081
    BoundPropertyType[BoundPropertyType["ANIMATION"] = 2] = "ANIMATION";
44082
})(BoundPropertyType || (BoundPropertyType = {}));
44083
/**
44084
 * Represents a parsed property.
44085
 */
44086
var BoundProperty = /** @class */ (function () {
44087
    function BoundProperty(name, expression, type, sourceSpan) {
44088
        this.name = name;
44089
        this.expression = expression;
44090
        this.type = type;
44091
        this.sourceSpan = sourceSpan;
44092
        this.isLiteral = this.type === BoundPropertyType.LITERAL_ATTR;
44093
        this.isAnimation = this.type === BoundPropertyType.ANIMATION;
44094
    }
44095
    return BoundProperty;
44096
}());
44097
/**
44098
 * Parses bindings in templates and in the directive host area.
44099
 */
44100
var BindingParser = /** @class */ (function () {
44101
    function BindingParser(_exprParser, _interpolationConfig, _schemaRegistry, pipes, _targetErrors) {
44102
        var _this = this;
44103
        this._exprParser = _exprParser;
44104
        this._interpolationConfig = _interpolationConfig;
44105
        this._schemaRegistry = _schemaRegistry;
44106
        this._targetErrors = _targetErrors;
44107
        this.pipesByName = new Map();
44108
        this._usedPipes = new Map();
44109
        pipes.forEach(function (pipe) { return _this.pipesByName.set(pipe.name, pipe); });
44110
    }
44111
    BindingParser.prototype.getUsedPipes = function () { return Array.from(this._usedPipes.values()); };
44112
    BindingParser.prototype.createBoundHostProperties = function (dirMeta, sourceSpan) {
44113
        var _this = this;
44114
        if (dirMeta.hostProperties) {
44115
            var boundProps_1 = [];
44116
            Object.keys(dirMeta.hostProperties).forEach(function (propName) {
44117
                var expression = dirMeta.hostProperties[propName];
44118
                if (typeof expression === 'string') {
44119
                    _this.parsePropertyBinding(propName, expression, true, sourceSpan, [], boundProps_1);
44120
                }
44121
                else {
44122
                    _this._reportError("Value of the host property binding \"" + propName + "\" needs to be a string representing an expression but got \"" + expression + "\" (" + typeof expression + ")", sourceSpan);
44123
                }
44124
            });
44125
            return boundProps_1;
44126
        }
44127
        return null;
44128
    };
44129
    BindingParser.prototype.createDirectiveHostPropertyAsts = function (dirMeta, elementSelector, sourceSpan) {
44130
        var _this = this;
44131
        var boundProps = this.createBoundHostProperties(dirMeta, sourceSpan);
44132
        return boundProps &&
44133
            boundProps.map(function (prop) { return _this.createElementPropertyAst(elementSelector, prop); });
44134
    };
44135
    BindingParser.prototype.createDirectiveHostEventAsts = function (dirMeta, sourceSpan) {
44136
        var _this = this;
44137
        if (dirMeta.hostListeners) {
44138
            var targetEventAsts_1 = [];
44139
            Object.keys(dirMeta.hostListeners).forEach(function (propName) {
44140
                var expression = dirMeta.hostListeners[propName];
44141
                if (typeof expression === 'string') {
44142
                    _this.parseEvent(propName, expression, sourceSpan, [], targetEventAsts_1);
44143
                }
44144
                else {
44145
                    _this._reportError("Value of the host listener \"" + propName + "\" needs to be a string representing an expression but got \"" + expression + "\" (" + typeof expression + ")", sourceSpan);
44146
                }
44147
            });
44148
            return targetEventAsts_1;
44149
        }
44150
        return null;
44151
    };
44152
    BindingParser.prototype.parseInterpolation = function (value, sourceSpan) {
44153
        var sourceInfo = sourceSpan.start.toString();
44154
        try {
44155
            var ast = this._exprParser.parseInterpolation(value, sourceInfo, this._interpolationConfig);
44156
            if (ast)
44157
                this._reportExpressionParserErrors(ast.errors, sourceSpan);
44158
            this._checkPipes(ast, sourceSpan);
44159
            return ast;
44160
        }
44161
        catch (e) {
44162
            this._reportError("" + e, sourceSpan);
44163
            return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo);
44164
        }
44165
    };
44166
    BindingParser.prototype.parseInlineTemplateBinding = function (prefixToken, value, sourceSpan, targetMatchableAttrs, targetProps, targetVars) {
44167
        var bindings = this._parseTemplateBindings(prefixToken, value, sourceSpan);
44168
        for (var i = 0; i < bindings.length; i++) {
44169
            var binding = bindings[i];
44170
            if (binding.keyIsVar) {
44171
                targetVars.push(new VariableAst(binding.key, binding.name, sourceSpan));
44172
            }
44173
            else if (binding.expression) {
44174
                this._parsePropertyAst(binding.key, binding.expression, sourceSpan, targetMatchableAttrs, targetProps);
44175
            }
44176
            else {
44177
                targetMatchableAttrs.push([binding.key, '']);
44178
                this.parseLiteralAttr(binding.key, null, sourceSpan, targetMatchableAttrs, targetProps);
44179
            }
44180
        }
44181
    };
44182
    BindingParser.prototype._parseTemplateBindings = function (prefixToken, value, sourceSpan) {
44183
        var _this = this;
44184
        var sourceInfo = sourceSpan.start.toString();
44185
        try {
44186
            var bindingsResult = this._exprParser.parseTemplateBindings(prefixToken, value, sourceInfo);
44187
            this._reportExpressionParserErrors(bindingsResult.errors, sourceSpan);
44188
            bindingsResult.templateBindings.forEach(function (binding) {
44189
                if (binding.expression) {
44190
                    _this._checkPipes(binding.expression, sourceSpan);
44191
                }
44192
            });
44193
            bindingsResult.warnings.forEach(function (warning) { _this._reportError(warning, sourceSpan, ParseErrorLevel.WARNING); });
44194
            return bindingsResult.templateBindings;
44195
        }
44196
        catch (e) {
44197
            this._reportError("" + e, sourceSpan);
44198
            return [];
44199
        }
44200
    };
44201
    BindingParser.prototype.parseLiteralAttr = function (name, value, sourceSpan, targetMatchableAttrs, targetProps) {
44202
        if (_isAnimationLabel(name)) {
44203
            name = name.substring(1);
44204
            if (value) {
44205
                this._reportError("Assigning animation triggers via @prop=\"exp\" attributes with an expression is invalid." +
44206
                    " Use property bindings (e.g. [@prop]=\"exp\") or use an attribute without a value (e.g. @prop) instead.", sourceSpan, ParseErrorLevel.ERROR);
44207
            }
44208
            this._parseAnimation(name, value, sourceSpan, targetMatchableAttrs, targetProps);
44209
        }
44210
        else {
44211
            targetProps.push(new BoundProperty(name, this._exprParser.wrapLiteralPrimitive(value, ''), BoundPropertyType.LITERAL_ATTR, sourceSpan));
44212
        }
44213
    };
44214
    BindingParser.prototype.parsePropertyBinding = function (name, expression, isHost, sourceSpan, targetMatchableAttrs, targetProps) {
44215
        var isAnimationProp = false;
44216
        if (name.startsWith(ANIMATE_PROP_PREFIX)) {
44217
            isAnimationProp = true;
44218
            name = name.substring(ANIMATE_PROP_PREFIX.length);
44219
        }
44220
        else if (_isAnimationLabel(name)) {
44221
            isAnimationProp = true;
44222
            name = name.substring(1);
44223
        }
44224
        if (isAnimationProp) {
44225
            this._parseAnimation(name, expression, sourceSpan, targetMatchableAttrs, targetProps);
44226
        }
44227
        else {
44228
            this._parsePropertyAst(name, this._parseBinding(expression, isHost, sourceSpan), sourceSpan, targetMatchableAttrs, targetProps);
44229
        }
44230
    };
44231
    BindingParser.prototype.parsePropertyInterpolation = function (name, value, sourceSpan, targetMatchableAttrs, targetProps) {
44232
        var expr = this.parseInterpolation(value, sourceSpan);
44233
        if (expr) {
44234
            this._parsePropertyAst(name, expr, sourceSpan, targetMatchableAttrs, targetProps);
44235
            return true;
44236
        }
44237
        return false;
44238
    };
44239
    BindingParser.prototype._parsePropertyAst = function (name, ast, sourceSpan, targetMatchableAttrs, targetProps) {
44240
        targetMatchableAttrs.push([name, ast.source]);
44241
        targetProps.push(new BoundProperty(name, ast, BoundPropertyType.DEFAULT, sourceSpan));
44242
    };
44243
    BindingParser.prototype._parseAnimation = function (name, expression, sourceSpan, targetMatchableAttrs, targetProps) {
44244
        // This will occur when a @trigger is not paired with an expression.
44245
        // For animations it is valid to not have an expression since */void
44246
        // states will be applied by angular when the element is attached/detached
44247
        var ast = this._parseBinding(expression || 'undefined', false, sourceSpan);
44248
        targetMatchableAttrs.push([name, ast.source]);
44249
        targetProps.push(new BoundProperty(name, ast, BoundPropertyType.ANIMATION, sourceSpan));
44250
    };
44251
    BindingParser.prototype._parseBinding = function (value, isHostBinding, sourceSpan) {
44252
        var sourceInfo = sourceSpan.start.toString();
44253
        try {
44254
            var ast = isHostBinding ?
44255
                this._exprParser.parseSimpleBinding(value, sourceInfo, this._interpolationConfig) :
44256
                this._exprParser.parseBinding(value, sourceInfo, this._interpolationConfig);
44257
            if (ast)
44258
                this._reportExpressionParserErrors(ast.errors, sourceSpan);
44259
            this._checkPipes(ast, sourceSpan);
44260
            return ast;
44261
        }
44262
        catch (e) {
44263
            this._reportError("" + e, sourceSpan);
44264
            return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo);
44265
        }
44266
    };
44267
    BindingParser.prototype.createElementPropertyAst = function (elementSelector, boundProp) {
44268
        if (boundProp.isAnimation) {
44269
            return new BoundElementPropertyAst(boundProp.name, PropertyBindingType.Animation, SecurityContext.NONE, boundProp.expression, null, boundProp.sourceSpan);
44270
        }
44271
        var unit = null;
44272
        var bindingType = undefined;
44273
        var boundPropertyName = null;
44274
        var parts = boundProp.name.split(PROPERTY_PARTS_SEPARATOR);
44275
        var securityContexts = undefined;
44276
        // Check check for special cases (prefix style, attr, class)
44277
        if (parts.length > 1) {
44278
            if (parts[0] == ATTRIBUTE_PREFIX) {
44279
                boundPropertyName = parts[1];
44280
                this._validatePropertyOrAttributeName(boundPropertyName, boundProp.sourceSpan, true);
44281
                securityContexts = calcPossibleSecurityContexts(this._schemaRegistry, elementSelector, boundPropertyName, true);
44282
                var nsSeparatorIdx = boundPropertyName.indexOf(':');
44283
                if (nsSeparatorIdx > -1) {
44284
                    var ns = boundPropertyName.substring(0, nsSeparatorIdx);
44285
                    var name_1 = boundPropertyName.substring(nsSeparatorIdx + 1);
44286
                    boundPropertyName = mergeNsAndName(ns, name_1);
44287
                }
44288
                bindingType = PropertyBindingType.Attribute;
44289
            }
44290
            else if (parts[0] == CLASS_PREFIX) {
44291
                boundPropertyName = parts[1];
44292
                bindingType = PropertyBindingType.Class;
44293
                securityContexts = [SecurityContext.NONE];
44294
            }
44295
            else if (parts[0] == STYLE_PREFIX) {
44296
                unit = parts.length > 2 ? parts[2] : null;
44297
                boundPropertyName = parts[1];
44298
                bindingType = PropertyBindingType.Style;
44299
                securityContexts = [SecurityContext.STYLE];
44300
            }
44301
        }
44302
        // If not a special case, use the full property name
44303
        if (boundPropertyName === null) {
44304
            boundPropertyName = this._schemaRegistry.getMappedPropName(boundProp.name);
44305
            securityContexts = calcPossibleSecurityContexts(this._schemaRegistry, elementSelector, boundPropertyName, false);
44306
            bindingType = PropertyBindingType.Property;
44307
            this._validatePropertyOrAttributeName(boundPropertyName, boundProp.sourceSpan, false);
44308
        }
44309
        return new BoundElementPropertyAst(boundPropertyName, bindingType, securityContexts[0], boundProp.expression, unit, boundProp.sourceSpan);
44310
    };
44311
    BindingParser.prototype.parseEvent = function (name, expression, sourceSpan, targetMatchableAttrs, targetEvents) {
44312
        if (_isAnimationLabel(name)) {
44313
            name = name.substr(1);
44314
            this._parseAnimationEvent(name, expression, sourceSpan, targetEvents);
44315
        }
44316
        else {
44317
            this._parseEvent(name, expression, sourceSpan, targetMatchableAttrs, targetEvents);
44318
        }
44319
    };
44320
    BindingParser.prototype._parseAnimationEvent = function (name, expression, sourceSpan, targetEvents) {
44321
        var matches = splitAtPeriod(name, [name, '']);
44322
        var eventName = matches[0];
44323
        var phase = matches[1].toLowerCase();
44324
        if (phase) {
44325
            switch (phase) {
44326
                case 'start':
44327
                case 'done':
44328
                    var ast = this._parseAction(expression, sourceSpan);
44329
                    targetEvents.push(new BoundEventAst(eventName, null, phase, ast, sourceSpan));
44330
                    break;
44331
                default:
44332
                    this._reportError("The provided animation output phase value \"" + phase + "\" for \"@" + eventName + "\" is not supported (use start or done)", sourceSpan);
44333
                    break;
44334
            }
44335
        }
44336
        else {
44337
            this._reportError("The animation trigger output event (@" + eventName + ") is missing its phase value name (start or done are currently supported)", sourceSpan);
44338
        }
44339
    };
44340
    BindingParser.prototype._parseEvent = function (name, expression, sourceSpan, targetMatchableAttrs, targetEvents) {
44341
        // long format: 'target: eventName'
44342
        var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(splitAtColon(name, [null, name]), 2), target = _a[0], eventName = _a[1];
44343
        var ast = this._parseAction(expression, sourceSpan);
44344
        targetMatchableAttrs.push([name, ast.source]);
44345
        targetEvents.push(new BoundEventAst(eventName, target, null, ast, sourceSpan));
44346
        // Don't detect directives for event names for now,
44347
        // so don't add the event name to the matchableAttrs
44348
    };
44349
    BindingParser.prototype._parseAction = function (value, sourceSpan) {
44350
        var sourceInfo = sourceSpan.start.toString();
44351
        try {
44352
            var ast = this._exprParser.parseAction(value, sourceInfo, this._interpolationConfig);
44353
            if (ast) {
44354
                this._reportExpressionParserErrors(ast.errors, sourceSpan);
44355
            }
44356
            if (!ast || ast.ast instanceof EmptyExpr) {
44357
                this._reportError("Empty expressions are not allowed", sourceSpan);
44358
                return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo);
44359
            }
44360
            this._checkPipes(ast, sourceSpan);
44361
            return ast;
44362
        }
44363
        catch (e) {
44364
            this._reportError("" + e, sourceSpan);
44365
            return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo);
44366
        }
44367
    };
44368
    BindingParser.prototype._reportError = function (message, sourceSpan, level) {
44369
        if (level === void 0) { level = ParseErrorLevel.ERROR; }
44370
        this._targetErrors.push(new ParseError(sourceSpan, message, level));
44371
    };
44372
    BindingParser.prototype._reportExpressionParserErrors = function (errors, sourceSpan) {
44373
        try {
44374
            for (var errors_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(errors), errors_1_1 = errors_1.next(); !errors_1_1.done; errors_1_1 = errors_1.next()) {
44375
                var error$$1 = errors_1_1.value;
44376
                this._reportError(error$$1.message, sourceSpan);
44377
            }
44378
        }
44379
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
44380
        finally {
44381
            try {
44382
                if (errors_1_1 && !errors_1_1.done && (_a = errors_1.return)) _a.call(errors_1);
44383
            }
44384
            finally { if (e_1) throw e_1.error; }
44385
        }
44386
        var e_1, _a;
44387
    };
44388
    BindingParser.prototype._checkPipes = function (ast, sourceSpan) {
44389
        var _this = this;
44390
        if (ast) {
44391
            var collector = new PipeCollector();
44392
            ast.visit(collector);
44393
            collector.pipes.forEach(function (ast, pipeName) {
44394
                var pipeMeta = _this.pipesByName.get(pipeName);
44395
                if (!pipeMeta) {
44396
                    _this._reportError("The pipe '" + pipeName + "' could not be found", new ParseSourceSpan(sourceSpan.start.moveBy(ast.span.start), sourceSpan.start.moveBy(ast.span.end)));
44397
                }
44398
                else {
44399
                    _this._usedPipes.set(pipeName, pipeMeta);
44400
                }
44401
            });
44402
        }
44403
    };
44404
    /**
44405
     * @param propName the name of the property / attribute
44406
     * @param sourceSpan
44407
     * @param isAttr true when binding to an attribute
44408
     */
44409
    BindingParser.prototype._validatePropertyOrAttributeName = function (propName, sourceSpan, isAttr) {
44410
        var report = isAttr ? this._schemaRegistry.validateAttribute(propName) :
44411
            this._schemaRegistry.validateProperty(propName);
44412
        if (report.error) {
44413
            this._reportError(report.msg, sourceSpan, ParseErrorLevel.ERROR);
44414
        }
44415
    };
44416
    return BindingParser;
44417
}());
44418
var PipeCollector = /** @class */ (function (_super) {
44419
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PipeCollector, _super);
44420
    function PipeCollector() {
44421
        var _this = _super !== null && _super.apply(this, arguments) || this;
44422
        _this.pipes = new Map();
44423
        return _this;
44424
    }
44425
    PipeCollector.prototype.visitPipe = function (ast, context) {
44426
        this.pipes.set(ast.name, ast);
44427
        ast.exp.visit(this);
44428
        this.visitAll(ast.args, context);
44429
        return null;
44430
    };
44431
    return PipeCollector;
44432
}(RecursiveAstVisitor));
44433
function _isAnimationLabel(name) {
44434
    return name[0] == '@';
44435
}
44436
function calcPossibleSecurityContexts(registry, selector, propName, isAttribute) {
44437
    var ctxs = [];
44438
    CssSelector.parse(selector).forEach(function (selector) {
44439
        var elementNames = selector.element ? [selector.element] : registry.allKnownElementNames();
44440
        var notElementNames = new Set(selector.notSelectors.filter(function (selector) { return selector.isElementSelector(); })
44441
            .map(function (selector) { return selector.element; }));
44442
        var possibleElementNames = elementNames.filter(function (elementName) { return !notElementNames.has(elementName); });
44443
        ctxs.push.apply(ctxs, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(possibleElementNames.map(function (elementName) { return registry.securityContext(elementName, propName, isAttribute); })));
44444
    });
44445
    return ctxs.length === 0 ? [SecurityContext.NONE] : Array.from(new Set(ctxs)).sort();
44446
}
44447
 
44448
/**
44449
 * @license
44450
 * Copyright Google Inc. All Rights Reserved.
44451
 *
44452
 * Use of this source code is governed by an MIT-style license that can be
44453
 * found in the LICENSE file at https://angular.io/license
44454
 */
44455
var BIND_NAME_REGEXP = /^(?:(?:(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.+))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/;
44456
// Group 1 = "bind-"
44457
var KW_BIND_IDX = 1;
44458
// Group 2 = "let-"
44459
var KW_LET_IDX = 2;
44460
// Group 3 = "ref-/#"
44461
var KW_REF_IDX = 3;
44462
// Group 4 = "on-"
44463
var KW_ON_IDX = 4;
44464
// Group 5 = "bindon-"
44465
var KW_BINDON_IDX = 5;
44466
// Group 6 = "@"
44467
var KW_AT_IDX = 6;
44468
// Group 7 = the identifier after "bind-", "let-", "ref-/#", "on-", "bindon-" or "@"
44469
var IDENT_KW_IDX = 7;
44470
// Group 8 = identifier inside [()]
44471
var IDENT_BANANA_BOX_IDX = 8;
44472
// Group 9 = identifier inside []
44473
var IDENT_PROPERTY_IDX = 9;
44474
// Group 10 = identifier inside ()
44475
var IDENT_EVENT_IDX = 10;
44476
var TEMPLATE_ATTR_PREFIX = '*';
44477
var CLASS_ATTR = 'class';
44478
var TEXT_CSS_SELECTOR = CssSelector.parse('*')[0];
44479
var TemplateParseError = /** @class */ (function (_super) {
44480
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TemplateParseError, _super);
44481
    function TemplateParseError(message, span, level) {
44482
        return _super.call(this, span, message, level) || this;
44483
    }
44484
    return TemplateParseError;
44485
}(ParseError));
44486
var TemplateParseResult = /** @class */ (function () {
44487
    function TemplateParseResult(templateAst, usedPipes, errors) {
44488
        this.templateAst = templateAst;
44489
        this.usedPipes = usedPipes;
44490
        this.errors = errors;
44491
    }
44492
    return TemplateParseResult;
44493
}());
44494
var TemplateParser = /** @class */ (function () {
44495
    function TemplateParser(_config, _reflector, _exprParser, _schemaRegistry, _htmlParser, _console, transforms) {
44496
        this._config = _config;
44497
        this._reflector = _reflector;
44498
        this._exprParser = _exprParser;
44499
        this._schemaRegistry = _schemaRegistry;
44500
        this._htmlParser = _htmlParser;
44501
        this._console = _console;
44502
        this.transforms = transforms;
44503
    }
44504
    Object.defineProperty(TemplateParser.prototype, "expressionParser", {
44505
        get: function () { return this._exprParser; },
44506
        enumerable: true,
44507
        configurable: true
44508
    });
44509
    TemplateParser.prototype.parse = function (component, template, directives, pipes, schemas, templateUrl, preserveWhitespaces) {
44510
        var result = this.tryParse(component, template, directives, pipes, schemas, templateUrl, preserveWhitespaces);
44511
        var warnings = result.errors.filter(function (error$$1) { return error$$1.level === ParseErrorLevel.WARNING; });
44512
        var errors = result.errors.filter(function (error$$1) { return error$$1.level === ParseErrorLevel.ERROR; });
44513
        if (warnings.length > 0) {
44514
            this._console.warn("Template parse warnings:\n" + warnings.join('\n'));
44515
        }
44516
        if (errors.length > 0) {
44517
            var errorString = errors.join('\n');
44518
            throw syntaxError("Template parse errors:\n" + errorString, errors);
44519
        }
44520
        return { template: result.templateAst, pipes: result.usedPipes };
44521
    };
44522
    TemplateParser.prototype.tryParse = function (component, template, directives, pipes, schemas, templateUrl, preserveWhitespaces) {
44523
        var htmlParseResult = typeof template === 'string' ?
44524
            this._htmlParser.parse(template, templateUrl, true, this.getInterpolationConfig(component)) :
44525
            template;
44526
        if (!preserveWhitespaces) {
44527
            htmlParseResult = removeWhitespaces(htmlParseResult);
44528
        }
44529
        return this.tryParseHtml(this.expandHtml(htmlParseResult), component, directives, pipes, schemas);
44530
    };
44531
    TemplateParser.prototype.tryParseHtml = function (htmlAstWithErrors, component, directives, pipes, schemas) {
44532
        var result;
44533
        var errors = htmlAstWithErrors.errors;
44534
        var usedPipes = [];
44535
        if (htmlAstWithErrors.rootNodes.length > 0) {
44536
            var uniqDirectives = removeSummaryDuplicates(directives);
44537
            var uniqPipes = removeSummaryDuplicates(pipes);
44538
            var providerViewContext = new ProviderViewContext(this._reflector, component);
44539
            var interpolationConfig = undefined;
44540
            if (component.template && component.template.interpolation) {
44541
                interpolationConfig = {
44542
                    start: component.template.interpolation[0],
44543
                    end: component.template.interpolation[1]
44544
                };
44545
            }
44546
            var bindingParser = new BindingParser(this._exprParser, interpolationConfig, this._schemaRegistry, uniqPipes, errors);
44547
            var parseVisitor = new TemplateParseVisitor(this._reflector, this._config, providerViewContext, uniqDirectives, bindingParser, this._schemaRegistry, schemas, errors);
44548
            result = visitAll(parseVisitor, htmlAstWithErrors.rootNodes, EMPTY_ELEMENT_CONTEXT);
44549
            errors.push.apply(errors, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(providerViewContext.errors));
44550
            usedPipes.push.apply(usedPipes, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(bindingParser.getUsedPipes()));
44551
        }
44552
        else {
44553
            result = [];
44554
        }
44555
        this._assertNoReferenceDuplicationOnTemplate(result, errors);
44556
        if (errors.length > 0) {
44557
            return new TemplateParseResult(result, usedPipes, errors);
44558
        }
44559
        if (this.transforms) {
44560
            this.transforms.forEach(function (transform) { result = templateVisitAll(transform, result); });
44561
        }
44562
        return new TemplateParseResult(result, usedPipes, errors);
44563
    };
44564
    TemplateParser.prototype.expandHtml = function (htmlAstWithErrors, forced) {
44565
        if (forced === void 0) { forced = false; }
44566
        var errors = htmlAstWithErrors.errors;
44567
        if (errors.length == 0 || forced) {
44568
            // Transform ICU messages to angular directives
44569
            var expandedHtmlAst = expandNodes(htmlAstWithErrors.rootNodes);
44570
            errors.push.apply(errors, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(expandedHtmlAst.errors));
44571
            htmlAstWithErrors = new ParseTreeResult(expandedHtmlAst.nodes, errors);
44572
        }
44573
        return htmlAstWithErrors;
44574
    };
44575
    TemplateParser.prototype.getInterpolationConfig = function (component) {
44576
        if (component.template) {
44577
            return InterpolationConfig.fromArray(component.template.interpolation);
44578
        }
44579
        return undefined;
44580
    };
44581
    /** @internal */
44582
    TemplateParser.prototype._assertNoReferenceDuplicationOnTemplate = function (result, errors) {
44583
        var existingReferences = [];
44584
        result.filter(function (element) { return !!element.references; })
44585
            .forEach(function (element) { return element.references.forEach(function (reference) {
44586
            var name = reference.name;
44587
            if (existingReferences.indexOf(name) < 0) {
44588
                existingReferences.push(name);
44589
            }
44590
            else {
44591
                var error$$1 = new TemplateParseError("Reference \"#" + name + "\" is defined several times", reference.sourceSpan, ParseErrorLevel.ERROR);
44592
                errors.push(error$$1);
44593
            }
44594
        }); });
44595
    };
44596
    return TemplateParser;
44597
}());
44598
var TemplateParseVisitor = /** @class */ (function () {
44599
    function TemplateParseVisitor(reflector, config, providerViewContext, directives, _bindingParser, _schemaRegistry, _schemas, _targetErrors) {
44600
        var _this = this;
44601
        this.reflector = reflector;
44602
        this.config = config;
44603
        this.providerViewContext = providerViewContext;
44604
        this._bindingParser = _bindingParser;
44605
        this._schemaRegistry = _schemaRegistry;
44606
        this._schemas = _schemas;
44607
        this._targetErrors = _targetErrors;
44608
        this.selectorMatcher = new SelectorMatcher();
44609
        this.directivesIndex = new Map();
44610
        this.ngContentCount = 0;
44611
        // Note: queries start with id 1 so we can use the number in a Bloom filter!
44612
        this.contentQueryStartId = providerViewContext.component.viewQueries.length + 1;
44613
        directives.forEach(function (directive, index) {
44614
            var selector = CssSelector.parse(directive.selector);
44615
            _this.selectorMatcher.addSelectables(selector, directive);
44616
            _this.directivesIndex.set(directive, index);
44617
        });
44618
    }
44619
    TemplateParseVisitor.prototype.visitExpansion = function (expansion, context) { return null; };
44620
    TemplateParseVisitor.prototype.visitExpansionCase = function (expansionCase, context) { return null; };
44621
    TemplateParseVisitor.prototype.visitText = function (text, parent) {
44622
        var ngContentIndex = parent.findNgContentIndex(TEXT_CSS_SELECTOR);
44623
        var valueNoNgsp = replaceNgsp(text.value);
44624
        var expr = this._bindingParser.parseInterpolation(valueNoNgsp, text.sourceSpan);
44625
        return expr ? new BoundTextAst(expr, ngContentIndex, text.sourceSpan) :
44626
            new TextAst(valueNoNgsp, ngContentIndex, text.sourceSpan);
44627
    };
44628
    TemplateParseVisitor.prototype.visitAttribute = function (attribute, context) {
44629
        return new AttrAst(attribute.name, attribute.value, attribute.sourceSpan);
44630
    };
44631
    TemplateParseVisitor.prototype.visitComment = function (comment, context) { return null; };
44632
    TemplateParseVisitor.prototype.visitElement = function (element, parent) {
44633
        var _this = this;
44634
        var queryStartIndex = this.contentQueryStartId;
44635
        var nodeName = element.name;
44636
        var preparsedElement = preparseElement(element);
44637
        if (preparsedElement.type === PreparsedElementType.SCRIPT ||
44638
            preparsedElement.type === PreparsedElementType.STYLE) {
44639
            // Skipping <script> for security reasons
44640
            // Skipping <style> as we already processed them
44641
            // in the StyleCompiler
44642
            return null;
44643
        }
44644
        if (preparsedElement.type === PreparsedElementType.STYLESHEET &&
44645
            isStyleUrlResolvable(preparsedElement.hrefAttr)) {
44646
            // Skipping stylesheets with either relative urls or package scheme as we already processed
44647
            // them in the StyleCompiler
44648
            return null;
44649
        }
44650
        var matchableAttrs = [];
44651
        var elementOrDirectiveProps = [];
44652
        var elementOrDirectiveRefs = [];
44653
        var elementVars = [];
44654
        var events = [];
44655
        var templateElementOrDirectiveProps = [];
44656
        var templateMatchableAttrs = [];
44657
        var templateElementVars = [];
44658
        var hasInlineTemplates = false;
44659
        var attrs = [];
44660
        var isTemplateElement = isNgTemplate(element.name);
44661
        element.attrs.forEach(function (attr) {
44662
            var hasBinding = _this._parseAttr(isTemplateElement, attr, matchableAttrs, elementOrDirectiveProps, events, elementOrDirectiveRefs, elementVars);
44663
            var templateBindingsSource;
44664
            var prefixToken;
44665
            var normalizedName = _this._normalizeAttributeName(attr.name);
44666
            if (normalizedName.startsWith(TEMPLATE_ATTR_PREFIX)) {
44667
                templateBindingsSource = attr.value;
44668
                prefixToken = normalizedName.substring(TEMPLATE_ATTR_PREFIX.length) + ':';
44669
            }
44670
            var hasTemplateBinding = templateBindingsSource != null;
44671
            if (hasTemplateBinding) {
44672
                if (hasInlineTemplates) {
44673
                    _this._reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *", attr.sourceSpan);
44674
                }
44675
                hasInlineTemplates = true;
44676
                _this._bindingParser.parseInlineTemplateBinding(prefixToken, templateBindingsSource, attr.sourceSpan, templateMatchableAttrs, templateElementOrDirectiveProps, templateElementVars);
44677
            }
44678
            if (!hasBinding && !hasTemplateBinding) {
44679
                // don't include the bindings as attributes as well in the AST
44680
                attrs.push(_this.visitAttribute(attr, null));
44681
                matchableAttrs.push([attr.name, attr.value]);
44682
            }
44683
        });
44684
        var elementCssSelector = createElementCssSelector(nodeName, matchableAttrs);
44685
        var _a = this._parseDirectives(this.selectorMatcher, elementCssSelector), directiveMetas = _a.directives, matchElement = _a.matchElement;
44686
        var references = [];
44687
        var boundDirectivePropNames = new Set();
44688
        var directiveAsts = this._createDirectiveAsts(isTemplateElement, element.name, directiveMetas, elementOrDirectiveProps, elementOrDirectiveRefs, element.sourceSpan, references, boundDirectivePropNames);
44689
        var elementProps = this._createElementPropertyAsts(element.name, elementOrDirectiveProps, boundDirectivePropNames);
44690
        var isViewRoot = parent.isTemplateElement || hasInlineTemplates;
44691
        var providerContext = new ProviderElementContext(this.providerViewContext, parent.providerContext, isViewRoot, directiveAsts, attrs, references, isTemplateElement, queryStartIndex, element.sourceSpan);
44692
        var children = visitAll(preparsedElement.nonBindable ? NON_BINDABLE_VISITOR : this, element.children, ElementContext.create(isTemplateElement, directiveAsts, isTemplateElement ? parent.providerContext : providerContext));
44693
        providerContext.afterElement();
44694
        // Override the actual selector when the `ngProjectAs` attribute is provided
44695
        var projectionSelector = preparsedElement.projectAs != null ?
44696
            CssSelector.parse(preparsedElement.projectAs)[0] :
44697
            elementCssSelector;
44698
        var ngContentIndex = parent.findNgContentIndex(projectionSelector);
44699
        var parsedElement;
44700
        if (preparsedElement.type === PreparsedElementType.NG_CONTENT) {
44701
            if (element.children && !element.children.every(_isEmptyTextNode)) {
44702
                this._reportError("<ng-content> element cannot have content.", element.sourceSpan);
44703
            }
44704
            parsedElement = new NgContentAst(this.ngContentCount++, hasInlineTemplates ? null : ngContentIndex, element.sourceSpan);
44705
        }
44706
        else if (isTemplateElement) {
44707
            this._assertAllEventsPublishedByDirectives(directiveAsts, events);
44708
            this._assertNoComponentsNorElementBindingsOnTemplate(directiveAsts, elementProps, element.sourceSpan);
44709
            parsedElement = new EmbeddedTemplateAst(attrs, events, references, elementVars, providerContext.transformedDirectiveAsts, providerContext.transformProviders, providerContext.transformedHasViewContainer, providerContext.queryMatches, children, hasInlineTemplates ? null : ngContentIndex, element.sourceSpan);
44710
        }
44711
        else {
44712
            this._assertElementExists(matchElement, element);
44713
            this._assertOnlyOneComponent(directiveAsts, element.sourceSpan);
44714
            var ngContentIndex_1 = hasInlineTemplates ? null : parent.findNgContentIndex(projectionSelector);
44715
            parsedElement = new ElementAst(nodeName, attrs, elementProps, events, references, providerContext.transformedDirectiveAsts, providerContext.transformProviders, providerContext.transformedHasViewContainer, providerContext.queryMatches, children, hasInlineTemplates ? null : ngContentIndex_1, element.sourceSpan, element.endSourceSpan || null);
44716
        }
44717
        if (hasInlineTemplates) {
44718
            var templateQueryStartIndex = this.contentQueryStartId;
44719
            var templateSelector = createElementCssSelector('ng-template', templateMatchableAttrs);
44720
            var templateDirectiveMetas = this._parseDirectives(this.selectorMatcher, templateSelector).directives;
44721
            var templateBoundDirectivePropNames = new Set();
44722
            var templateDirectiveAsts = this._createDirectiveAsts(true, element.name, templateDirectiveMetas, templateElementOrDirectiveProps, [], element.sourceSpan, [], templateBoundDirectivePropNames);
44723
            var templateElementProps = this._createElementPropertyAsts(element.name, templateElementOrDirectiveProps, templateBoundDirectivePropNames);
44724
            this._assertNoComponentsNorElementBindingsOnTemplate(templateDirectiveAsts, templateElementProps, element.sourceSpan);
44725
            var templateProviderContext = new ProviderElementContext(this.providerViewContext, parent.providerContext, parent.isTemplateElement, templateDirectiveAsts, [], [], true, templateQueryStartIndex, element.sourceSpan);
44726
            templateProviderContext.afterElement();
44727
            parsedElement = new EmbeddedTemplateAst([], [], [], templateElementVars, templateProviderContext.transformedDirectiveAsts, templateProviderContext.transformProviders, templateProviderContext.transformedHasViewContainer, templateProviderContext.queryMatches, [parsedElement], ngContentIndex, element.sourceSpan);
44728
        }
44729
        return parsedElement;
44730
    };
44731
    TemplateParseVisitor.prototype._parseAttr = function (isTemplateElement, attr, targetMatchableAttrs, targetProps, targetEvents, targetRefs, targetVars) {
44732
        var name = this._normalizeAttributeName(attr.name);
44733
        var value = attr.value;
44734
        var srcSpan = attr.sourceSpan;
44735
        var bindParts = name.match(BIND_NAME_REGEXP);
44736
        var hasBinding = false;
44737
        if (bindParts !== null) {
44738
            hasBinding = true;
44739
            if (bindParts[KW_BIND_IDX] != null) {
44740
                this._bindingParser.parsePropertyBinding(bindParts[IDENT_KW_IDX], value, false, srcSpan, targetMatchableAttrs, targetProps);
44741
            }
44742
            else if (bindParts[KW_LET_IDX]) {
44743
                if (isTemplateElement) {
44744
                    var identifier = bindParts[IDENT_KW_IDX];
44745
                    this._parseVariable(identifier, value, srcSpan, targetVars);
44746
                }
44747
                else {
44748
                    this._reportError("\"let-\" is only supported on ng-template elements.", srcSpan);
44749
                }
44750
            }
44751
            else if (bindParts[KW_REF_IDX]) {
44752
                var identifier = bindParts[IDENT_KW_IDX];
44753
                this._parseReference(identifier, value, srcSpan, targetRefs);
44754
            }
44755
            else if (bindParts[KW_ON_IDX]) {
44756
                this._bindingParser.parseEvent(bindParts[IDENT_KW_IDX], value, srcSpan, targetMatchableAttrs, targetEvents);
44757
            }
44758
            else if (bindParts[KW_BINDON_IDX]) {
44759
                this._bindingParser.parsePropertyBinding(bindParts[IDENT_KW_IDX], value, false, srcSpan, targetMatchableAttrs, targetProps);
44760
                this._parseAssignmentEvent(bindParts[IDENT_KW_IDX], value, srcSpan, targetMatchableAttrs, targetEvents);
44761
            }
44762
            else if (bindParts[KW_AT_IDX]) {
44763
                this._bindingParser.parseLiteralAttr(name, value, srcSpan, targetMatchableAttrs, targetProps);
44764
            }
44765
            else if (bindParts[IDENT_BANANA_BOX_IDX]) {
44766
                this._bindingParser.parsePropertyBinding(bindParts[IDENT_BANANA_BOX_IDX], value, false, srcSpan, targetMatchableAttrs, targetProps);
44767
                this._parseAssignmentEvent(bindParts[IDENT_BANANA_BOX_IDX], value, srcSpan, targetMatchableAttrs, targetEvents);
44768
            }
44769
            else if (bindParts[IDENT_PROPERTY_IDX]) {
44770
                this._bindingParser.parsePropertyBinding(bindParts[IDENT_PROPERTY_IDX], value, false, srcSpan, targetMatchableAttrs, targetProps);
44771
            }
44772
            else if (bindParts[IDENT_EVENT_IDX]) {
44773
                this._bindingParser.parseEvent(bindParts[IDENT_EVENT_IDX], value, srcSpan, targetMatchableAttrs, targetEvents);
44774
            }
44775
        }
44776
        else {
44777
            hasBinding = this._bindingParser.parsePropertyInterpolation(name, value, srcSpan, targetMatchableAttrs, targetProps);
44778
        }
44779
        if (!hasBinding) {
44780
            this._bindingParser.parseLiteralAttr(name, value, srcSpan, targetMatchableAttrs, targetProps);
44781
        }
44782
        return hasBinding;
44783
    };
44784
    TemplateParseVisitor.prototype._normalizeAttributeName = function (attrName) {
44785
        return /^data-/i.test(attrName) ? attrName.substring(5) : attrName;
44786
    };
44787
    TemplateParseVisitor.prototype._parseVariable = function (identifier, value, sourceSpan, targetVars) {
44788
        if (identifier.indexOf('-') > -1) {
44789
            this._reportError("\"-\" is not allowed in variable names", sourceSpan);
44790
        }
44791
        targetVars.push(new VariableAst(identifier, value, sourceSpan));
44792
    };
44793
    TemplateParseVisitor.prototype._parseReference = function (identifier, value, sourceSpan, targetRefs) {
44794
        if (identifier.indexOf('-') > -1) {
44795
            this._reportError("\"-\" is not allowed in reference names", sourceSpan);
44796
        }
44797
        targetRefs.push(new ElementOrDirectiveRef(identifier, value, sourceSpan));
44798
    };
44799
    TemplateParseVisitor.prototype._parseAssignmentEvent = function (name, expression, sourceSpan, targetMatchableAttrs, targetEvents) {
44800
        this._bindingParser.parseEvent(name + "Change", expression + "=$event", sourceSpan, targetMatchableAttrs, targetEvents);
44801
    };
44802
    TemplateParseVisitor.prototype._parseDirectives = function (selectorMatcher, elementCssSelector) {
44803
        var _this = this;
44804
        // Need to sort the directives so that we get consistent results throughout,
44805
        // as selectorMatcher uses Maps inside.
44806
        // Also deduplicate directives as they might match more than one time!
44807
        var directives = new Array(this.directivesIndex.size);
44808
        // Whether any directive selector matches on the element name
44809
        var matchElement = false;
44810
        selectorMatcher.match(elementCssSelector, function (selector, directive) {
44811
            directives[_this.directivesIndex.get(directive)] = directive;
44812
            matchElement = matchElement || selector.hasElementSelector();
44813
        });
44814
        return {
44815
            directives: directives.filter(function (dir) { return !!dir; }),
44816
            matchElement: matchElement,
44817
        };
44818
    };
44819
    TemplateParseVisitor.prototype._createDirectiveAsts = function (isTemplateElement, elementName, directives, props, elementOrDirectiveRefs, elementSourceSpan, targetReferences, targetBoundDirectivePropNames) {
44820
        var _this = this;
44821
        var matchedReferences = new Set();
44822
        var component = null;
44823
        var directiveAsts = directives.map(function (directive) {
44824
            var sourceSpan = new ParseSourceSpan(elementSourceSpan.start, elementSourceSpan.end, "Directive " + identifierName(directive.type));
44825
            if (directive.isComponent) {
44826
                component = directive;
44827
            }
44828
            var directiveProperties = [];
44829
            var hostProperties = _this._bindingParser.createDirectiveHostPropertyAsts(directive, elementName, sourceSpan);
44830
            // Note: We need to check the host properties here as well,
44831
            // as we don't know the element name in the DirectiveWrapperCompiler yet.
44832
            hostProperties = _this._checkPropertiesInSchema(elementName, hostProperties);
44833
            var hostEvents = _this._bindingParser.createDirectiveHostEventAsts(directive, sourceSpan);
44834
            _this._createDirectivePropertyAsts(directive.inputs, props, directiveProperties, targetBoundDirectivePropNames);
44835
            elementOrDirectiveRefs.forEach(function (elOrDirRef) {
44836
                if ((elOrDirRef.value.length === 0 && directive.isComponent) ||
44837
                    (elOrDirRef.isReferenceToDirective(directive))) {
44838
                    targetReferences.push(new ReferenceAst(elOrDirRef.name, createTokenForReference(directive.type.reference), elOrDirRef.value, elOrDirRef.sourceSpan));
44839
                    matchedReferences.add(elOrDirRef.name);
44840
                }
44841
            });
44842
            var contentQueryStartId = _this.contentQueryStartId;
44843
            _this.contentQueryStartId += directive.queries.length;
44844
            return new DirectiveAst(directive, directiveProperties, hostProperties, hostEvents, contentQueryStartId, sourceSpan);
44845
        });
44846
        elementOrDirectiveRefs.forEach(function (elOrDirRef) {
44847
            if (elOrDirRef.value.length > 0) {
44848
                if (!matchedReferences.has(elOrDirRef.name)) {
44849
                    _this._reportError("There is no directive with \"exportAs\" set to \"" + elOrDirRef.value + "\"", elOrDirRef.sourceSpan);
44850
                }
44851
            }
44852
            else if (!component) {
44853
                var refToken = null;
44854
                if (isTemplateElement) {
44855
                    refToken = createTokenForExternalReference(_this.reflector, Identifiers.TemplateRef);
44856
                }
44857
                targetReferences.push(new ReferenceAst(elOrDirRef.name, refToken, elOrDirRef.value, elOrDirRef.sourceSpan));
44858
            }
44859
        });
44860
        return directiveAsts;
44861
    };
44862
    TemplateParseVisitor.prototype._createDirectivePropertyAsts = function (directiveProperties, boundProps, targetBoundDirectiveProps, targetBoundDirectivePropNames) {
44863
        if (directiveProperties) {
44864
            var boundPropsByName_1 = new Map();
44865
            boundProps.forEach(function (boundProp) {
44866
                var prevValue = boundPropsByName_1.get(boundProp.name);
44867
                if (!prevValue || prevValue.isLiteral) {
44868
                    // give [a]="b" a higher precedence than a="b" on the same element
44869
                    boundPropsByName_1.set(boundProp.name, boundProp);
44870
                }
44871
            });
44872
            Object.keys(directiveProperties).forEach(function (dirProp) {
44873
                var elProp = directiveProperties[dirProp];
44874
                var boundProp = boundPropsByName_1.get(elProp);
44875
                // Bindings are optional, so this binding only needs to be set up if an expression is given.
44876
                if (boundProp) {
44877
                    targetBoundDirectivePropNames.add(boundProp.name);
44878
                    if (!isEmptyExpression(boundProp.expression)) {
44879
                        targetBoundDirectiveProps.push(new BoundDirectivePropertyAst(dirProp, boundProp.name, boundProp.expression, boundProp.sourceSpan));
44880
                    }
44881
                }
44882
            });
44883
        }
44884
    };
44885
    TemplateParseVisitor.prototype._createElementPropertyAsts = function (elementName, props, boundDirectivePropNames) {
44886
        var _this = this;
44887
        var boundElementProps = [];
44888
        props.forEach(function (prop) {
44889
            if (!prop.isLiteral && !boundDirectivePropNames.has(prop.name)) {
44890
                boundElementProps.push(_this._bindingParser.createElementPropertyAst(elementName, prop));
44891
            }
44892
        });
44893
        return this._checkPropertiesInSchema(elementName, boundElementProps);
44894
    };
44895
    TemplateParseVisitor.prototype._findComponentDirectives = function (directives) {
44896
        return directives.filter(function (directive) { return directive.directive.isComponent; });
44897
    };
44898
    TemplateParseVisitor.prototype._findComponentDirectiveNames = function (directives) {
44899
        return this._findComponentDirectives(directives)
44900
            .map(function (directive) { return identifierName(directive.directive.type); });
44901
    };
44902
    TemplateParseVisitor.prototype._assertOnlyOneComponent = function (directives, sourceSpan) {
44903
        var componentTypeNames = this._findComponentDirectiveNames(directives);
44904
        if (componentTypeNames.length > 1) {
44905
            this._reportError("More than one component matched on this element.\n" +
44906
                "Make sure that only one component's selector can match a given element.\n" +
44907
                ("Conflicting components: " + componentTypeNames.join(',')), sourceSpan);
44908
        }
44909
    };
44910
    /**
44911
     * Make sure that non-angular tags conform to the schemas.
44912
     *
44913
     * Note: An element is considered an angular tag when at least one directive selector matches the
44914
     * tag name.
44915
     *
44916
     * @param matchElement Whether any directive has matched on the tag name
44917
     * @param element the html element
44918
     */
44919
    TemplateParseVisitor.prototype._assertElementExists = function (matchElement, element) {
44920
        var elName = element.name.replace(/^:xhtml:/, '');
44921
        if (!matchElement && !this._schemaRegistry.hasElement(elName, this._schemas)) {
44922
            var errorMsg = "'" + elName + "' is not a known element:\n";
44923
            errorMsg +=
44924
                "1. If '" + elName + "' is an Angular component, then verify that it is part of this module.\n";
44925
            if (elName.indexOf('-') > -1) {
44926
                errorMsg +=
44927
                    "2. If '" + elName + "' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.";
44928
            }
44929
            else {
44930
                errorMsg +=
44931
                    "2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.";
44932
            }
44933
            this._reportError(errorMsg, element.sourceSpan);
44934
        }
44935
    };
44936
    TemplateParseVisitor.prototype._assertNoComponentsNorElementBindingsOnTemplate = function (directives, elementProps, sourceSpan) {
44937
        var _this = this;
44938
        var componentTypeNames = this._findComponentDirectiveNames(directives);
44939
        if (componentTypeNames.length > 0) {
44940
            this._reportError("Components on an embedded template: " + componentTypeNames.join(','), sourceSpan);
44941
        }
44942
        elementProps.forEach(function (prop) {
44943
            _this._reportError("Property binding " + prop.name + " not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the \"@NgModule.declarations\".", sourceSpan);
44944
        });
44945
    };
44946
    TemplateParseVisitor.prototype._assertAllEventsPublishedByDirectives = function (directives, events) {
44947
        var _this = this;
44948
        var allDirectiveEvents = new Set();
44949
        directives.forEach(function (directive) {
44950
            Object.keys(directive.directive.outputs).forEach(function (k) {
44951
                var eventName = directive.directive.outputs[k];
44952
                allDirectiveEvents.add(eventName);
44953
            });
44954
        });
44955
        events.forEach(function (event) {
44956
            if (event.target != null || !allDirectiveEvents.has(event.name)) {
44957
                _this._reportError("Event binding " + event.fullName + " not emitted by any directive on an embedded template. Make sure that the event name is spelled correctly and all directives are listed in the \"@NgModule.declarations\".", event.sourceSpan);
44958
            }
44959
        });
44960
    };
44961
    TemplateParseVisitor.prototype._checkPropertiesInSchema = function (elementName, boundProps) {
44962
        var _this = this;
44963
        // Note: We can't filter out empty expressions before this method,
44964
        // as we still want to validate them!
44965
        return boundProps.filter(function (boundProp) {
44966
            if (boundProp.type === PropertyBindingType.Property &&
44967
                !_this._schemaRegistry.hasProperty(elementName, boundProp.name, _this._schemas)) {
44968
                var errorMsg = "Can't bind to '" + boundProp.name + "' since it isn't a known property of '" + elementName + "'.";
44969
                if (elementName.startsWith('ng-')) {
44970
                    errorMsg +=
44971
                        "\n1. If '" + boundProp.name + "' is an Angular directive, then add 'CommonModule' to the '@NgModule.imports' of this component." +
44972
                            "\n2. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.";
44973
                }
44974
                else if (elementName.indexOf('-') > -1) {
44975
                    errorMsg +=
44976
                        "\n1. If '" + elementName + "' is an Angular component and it has '" + boundProp.name + "' input, then verify that it is part of this module." +
44977
                            ("\n2. If '" + elementName + "' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.") +
44978
                            "\n3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.";
44979
                }
44980
                _this._reportError(errorMsg, boundProp.sourceSpan);
44981
            }
44982
            return !isEmptyExpression(boundProp.value);
44983
        });
44984
    };
44985
    TemplateParseVisitor.prototype._reportError = function (message, sourceSpan, level) {
44986
        if (level === void 0) { level = ParseErrorLevel.ERROR; }
44987
        this._targetErrors.push(new ParseError(sourceSpan, message, level));
44988
    };
44989
    return TemplateParseVisitor;
44990
}());
44991
var NonBindableVisitor = /** @class */ (function () {
44992
    function NonBindableVisitor() {
44993
    }
44994
    NonBindableVisitor.prototype.visitElement = function (ast, parent) {
44995
        var preparsedElement = preparseElement(ast);
44996
        if (preparsedElement.type === PreparsedElementType.SCRIPT ||
44997
            preparsedElement.type === PreparsedElementType.STYLE ||
44998
            preparsedElement.type === PreparsedElementType.STYLESHEET) {
44999
            // Skipping <script> for security reasons
45000
            // Skipping <style> and stylesheets as we already processed them
45001
            // in the StyleCompiler
45002
            return null;
45003
        }
45004
        var attrNameAndValues = ast.attrs.map(function (attr) { return [attr.name, attr.value]; });
45005
        var selector = createElementCssSelector(ast.name, attrNameAndValues);
45006
        var ngContentIndex = parent.findNgContentIndex(selector);
45007
        var children = visitAll(this, ast.children, EMPTY_ELEMENT_CONTEXT);
45008
        return new ElementAst(ast.name, visitAll(this, ast.attrs), [], [], [], [], [], false, [], children, ngContentIndex, ast.sourceSpan, ast.endSourceSpan);
45009
    };
45010
    NonBindableVisitor.prototype.visitComment = function (comment, context) { return null; };
45011
    NonBindableVisitor.prototype.visitAttribute = function (attribute, context) {
45012
        return new AttrAst(attribute.name, attribute.value, attribute.sourceSpan);
45013
    };
45014
    NonBindableVisitor.prototype.visitText = function (text, parent) {
45015
        var ngContentIndex = parent.findNgContentIndex(TEXT_CSS_SELECTOR);
45016
        return new TextAst(text.value, ngContentIndex, text.sourceSpan);
45017
    };
45018
    NonBindableVisitor.prototype.visitExpansion = function (expansion, context) { return expansion; };
45019
    NonBindableVisitor.prototype.visitExpansionCase = function (expansionCase, context) { return expansionCase; };
45020
    return NonBindableVisitor;
45021
}());
45022
/**
45023
 * A reference to an element or directive in a template. E.g., the reference in this template:
45024
 *
45025
 * <div #myMenu="coolMenu">
45026
 *
45027
 * would be {name: 'myMenu', value: 'coolMenu', sourceSpan: ...}
45028
 */
45029
var ElementOrDirectiveRef = /** @class */ (function () {
45030
    function ElementOrDirectiveRef(name, value, sourceSpan) {
45031
        this.name = name;
45032
        this.value = value;
45033
        this.sourceSpan = sourceSpan;
45034
    }
45035
    /** Gets whether this is a reference to the given directive. */
45036
    ElementOrDirectiveRef.prototype.isReferenceToDirective = function (directive) {
45037
        return splitExportAs(directive.exportAs).indexOf(this.value) !== -1;
45038
    };
45039
    return ElementOrDirectiveRef;
45040
}());
45041
/** Splits a raw, potentially comma-delimited `exportAs` value into an array of names. */
45042
function splitExportAs(exportAs) {
45043
    return exportAs ? exportAs.split(',').map(function (e) { return e.trim(); }) : [];
45044
}
45045
function splitClasses(classAttrValue) {
45046
    return classAttrValue.trim().split(/\s+/g);
45047
}
45048
var ElementContext = /** @class */ (function () {
45049
    function ElementContext(isTemplateElement, _ngContentIndexMatcher, _wildcardNgContentIndex, providerContext) {
45050
        this.isTemplateElement = isTemplateElement;
45051
        this._ngContentIndexMatcher = _ngContentIndexMatcher;
45052
        this._wildcardNgContentIndex = _wildcardNgContentIndex;
45053
        this.providerContext = providerContext;
45054
    }
45055
    ElementContext.create = function (isTemplateElement, directives, providerContext) {
45056
        var matcher = new SelectorMatcher();
45057
        var wildcardNgContentIndex = null;
45058
        var component = directives.find(function (directive) { return directive.directive.isComponent; });
45059
        if (component) {
45060
            var ngContentSelectors = component.directive.template.ngContentSelectors;
45061
            for (var i = 0; i < ngContentSelectors.length; i++) {
45062
                var selector = ngContentSelectors[i];
45063
                if (selector === '*') {
45064
                    wildcardNgContentIndex = i;
45065
                }
45066
                else {
45067
                    matcher.addSelectables(CssSelector.parse(ngContentSelectors[i]), i);
45068
                }
45069
            }
45070
        }
45071
        return new ElementContext(isTemplateElement, matcher, wildcardNgContentIndex, providerContext);
45072
    };
45073
    ElementContext.prototype.findNgContentIndex = function (selector) {
45074
        var ngContentIndices = [];
45075
        this._ngContentIndexMatcher.match(selector, function (selector, ngContentIndex) { ngContentIndices.push(ngContentIndex); });
45076
        ngContentIndices.sort();
45077
        if (this._wildcardNgContentIndex != null) {
45078
            ngContentIndices.push(this._wildcardNgContentIndex);
45079
        }
45080
        return ngContentIndices.length > 0 ? ngContentIndices[0] : null;
45081
    };
45082
    return ElementContext;
45083
}());
45084
function createElementCssSelector(elementName, attributes) {
45085
    var cssSelector = new CssSelector();
45086
    var elNameNoNs = splitNsName(elementName)[1];
45087
    cssSelector.setElement(elNameNoNs);
45088
    for (var i = 0; i < attributes.length; i++) {
45089
        var attrName = attributes[i][0];
45090
        var attrNameNoNs = splitNsName(attrName)[1];
45091
        var attrValue = attributes[i][1];
45092
        cssSelector.addAttribute(attrNameNoNs, attrValue);
45093
        if (attrName.toLowerCase() == CLASS_ATTR) {
45094
            var classes = splitClasses(attrValue);
45095
            classes.forEach(function (className) { return cssSelector.addClassName(className); });
45096
        }
45097
    }
45098
    return cssSelector;
45099
}
45100
var EMPTY_ELEMENT_CONTEXT = new ElementContext(true, new SelectorMatcher(), null, null);
45101
var NON_BINDABLE_VISITOR = new NonBindableVisitor();
45102
function _isEmptyTextNode(node) {
45103
    return node instanceof Text && node.value.trim().length == 0;
45104
}
45105
function removeSummaryDuplicates(items) {
45106
    var map = new Map();
45107
    items.forEach(function (item) {
45108
        if (!map.get(item.type.reference)) {
45109
            map.set(item.type.reference, item);
45110
        }
45111
    });
45112
    return Array.from(map.values());
45113
}
45114
function isEmptyExpression(ast) {
45115
    if (ast instanceof ASTWithSource) {
45116
        ast = ast.ast;
45117
    }
45118
    return ast instanceof EmptyExpr;
45119
}
45120
 
45121
/**
45122
 * @license
45123
 * Copyright Google Inc. All Rights Reserved.
45124
 *
45125
 * Use of this source code is governed by an MIT-style license that can be
45126
 * found in the LICENSE file at https://angular.io/license
45127
 */
45128
var EventHandlerVars = /** @class */ (function () {
45129
    function EventHandlerVars() {
45130
    }
45131
    EventHandlerVars.event = variable('$event');
45132
    return EventHandlerVars;
45133
}());
45134
var ConvertActionBindingResult = /** @class */ (function () {
45135
    function ConvertActionBindingResult(
45136
    /**
45137
     * Render2 compatible statements,
45138
     */
45139
    stmts,
45140
    /**
45141
     * Variable name used with render2 compatible statements.
45142
     */
45143
    allowDefault) {
45144
        this.stmts = stmts;
45145
        this.allowDefault = allowDefault;
45146
        /**
45147
         * This is bit of a hack. It converts statements which render2 expects to statements which are
45148
         * expected by render3.
45149
         *
45150
         * Example: `<div click="doSomething($event)">` will generate:
45151
         *
45152
         * Render3:
45153
         * ```
45154
         * const pd_b:any = ((<any>ctx.doSomething($event)) !== false);
45155
         * return pd_b;
45156
         * ```
45157
         *
45158
         * but render2 expects:
45159
         * ```
45160
         * return ctx.doSomething($event);
45161
         * ```
45162
         */
45163
        // TODO(misko): remove this hack once we no longer support ViewEngine.
45164
        this.render3Stmts = stmts.map(function (statement) {
45165
            if (statement instanceof DeclareVarStmt && statement.name == allowDefault.name &&
45166
                statement.value instanceof BinaryOperatorExpr) {
45167
                var lhs = statement.value.lhs;
45168
                return new ReturnStatement(lhs.value);
45169
            }
45170
            return statement;
45171
        });
45172
    }
45173
    return ConvertActionBindingResult;
45174
}());
45175
/**
45176
 * Converts the given expression AST into an executable output AST, assuming the expression is
45177
 * used in an action binding (e.g. an event handler).
45178
 */
45179
function convertActionBinding(localResolver, implicitReceiver, action, bindingId, interpolationFunction) {
45180
    if (!localResolver) {
45181
        localResolver = new DefaultLocalResolver();
45182
    }
45183
    var actionWithoutBuiltins = convertPropertyBindingBuiltins({
45184
        createLiteralArrayConverter: function (argCount) {
45185
            // Note: no caching for literal arrays in actions.
45186
            return function (args) { return literalArr(args); };
45187
        },
45188
        createLiteralMapConverter: function (keys) {
45189
            // Note: no caching for literal maps in actions.
45190
            return function (values) {
45191
                var entries = keys.map(function (k, i) { return ({
45192
                    key: k.key,
45193
                    value: values[i],
45194
                    quoted: k.quoted,
45195
                }); });
45196
                return literalMap(entries);
45197
            };
45198
        },
45199
        createPipeConverter: function (name) {
45200
            throw new Error("Illegal State: Actions are not allowed to contain pipes. Pipe: " + name);
45201
        }
45202
    }, action);
45203
    var visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, interpolationFunction);
45204
    var actionStmts = [];
45205
    flattenStatements(actionWithoutBuiltins.visit(visitor, _Mode.Statement), actionStmts);
45206
    prependTemporaryDecls(visitor.temporaryCount, bindingId, actionStmts);
45207
    var lastIndex = actionStmts.length - 1;
45208
    var preventDefaultVar = null;
45209
    if (lastIndex >= 0) {
45210
        var lastStatement = actionStmts[lastIndex];
45211
        var returnExpr = convertStmtIntoExpression(lastStatement);
45212
        if (returnExpr) {
45213
            // Note: We need to cast the result of the method call to dynamic,
45214
            // as it might be a void method!
45215
            preventDefaultVar = createPreventDefaultVar(bindingId);
45216
            actionStmts[lastIndex] =
45217
                preventDefaultVar.set(returnExpr.cast(DYNAMIC_TYPE).notIdentical(literal(false)))
45218
                    .toDeclStmt(null, [StmtModifier.Final]);
45219
        }
45220
    }
45221
    return new ConvertActionBindingResult(actionStmts, preventDefaultVar);
45222
}
45223
function convertPropertyBindingBuiltins(converterFactory, ast) {
45224
    return convertBuiltins(converterFactory, ast);
45225
}
45226
var ConvertPropertyBindingResult = /** @class */ (function () {
45227
    function ConvertPropertyBindingResult(stmts, currValExpr) {
45228
        this.stmts = stmts;
45229
        this.currValExpr = currValExpr;
45230
    }
45231
    return ConvertPropertyBindingResult;
45232
}());
45233
var BindingForm;
45234
(function (BindingForm) {
45235
    // The general form of binding expression, supports all expressions.
45236
    BindingForm[BindingForm["General"] = 0] = "General";
45237
    // Try to generate a simple binding (no temporaries or statements)
45238
    // otherwise generate a general binding
45239
    BindingForm[BindingForm["TrySimple"] = 1] = "TrySimple";
45240
})(BindingForm || (BindingForm = {}));
45241
/**
45242
 * Converts the given expression AST into an executable output AST, assuming the expression
45243
 * is used in property binding. The expression has to be preprocessed via
45244
 * `convertPropertyBindingBuiltins`.
45245
 */
45246
function convertPropertyBinding(localResolver, implicitReceiver, expressionWithoutBuiltins, bindingId, form, interpolationFunction) {
45247
    if (!localResolver) {
45248
        localResolver = new DefaultLocalResolver();
45249
    }
45250
    var currValExpr = createCurrValueExpr(bindingId);
45251
    var stmts = [];
45252
    var visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, interpolationFunction);
45253
    var outputExpr = expressionWithoutBuiltins.visit(visitor, _Mode.Expression);
45254
    if (visitor.temporaryCount) {
45255
        for (var i = 0; i < visitor.temporaryCount; i++) {
45256
            stmts.push(temporaryDeclaration(bindingId, i));
45257
        }
45258
    }
45259
    else if (form == BindingForm.TrySimple) {
45260
        return new ConvertPropertyBindingResult([], outputExpr);
45261
    }
45262
    stmts.push(currValExpr.set(outputExpr).toDeclStmt(DYNAMIC_TYPE, [StmtModifier.Final]));
45263
    return new ConvertPropertyBindingResult(stmts, currValExpr);
45264
}
45265
function convertBuiltins(converterFactory, ast) {
45266
    var visitor = new _BuiltinAstConverter(converterFactory);
45267
    return ast.visit(visitor);
45268
}
45269
function temporaryName(bindingId, temporaryNumber) {
45270
    return "tmp_" + bindingId + "_" + temporaryNumber;
45271
}
45272
function temporaryDeclaration(bindingId, temporaryNumber) {
45273
    return new DeclareVarStmt(temporaryName(bindingId, temporaryNumber), NULL_EXPR);
45274
}
45275
function prependTemporaryDecls(temporaryCount, bindingId, statements) {
45276
    for (var i = temporaryCount - 1; i >= 0; i--) {
45277
        statements.unshift(temporaryDeclaration(bindingId, i));
45278
    }
45279
}
45280
var _Mode;
45281
(function (_Mode) {
45282
    _Mode[_Mode["Statement"] = 0] = "Statement";
45283
    _Mode[_Mode["Expression"] = 1] = "Expression";
45284
})(_Mode || (_Mode = {}));
45285
function ensureStatementMode(mode, ast) {
45286
    if (mode !== _Mode.Statement) {
45287
        throw new Error("Expected a statement, but saw " + ast);
45288
    }
45289
}
45290
function ensureExpressionMode(mode, ast) {
45291
    if (mode !== _Mode.Expression) {
45292
        throw new Error("Expected an expression, but saw " + ast);
45293
    }
45294
}
45295
function convertToStatementIfNeeded(mode, expr) {
45296
    if (mode === _Mode.Statement) {
45297
        return expr.toStmt();
45298
    }
45299
    else {
45300
        return expr;
45301
    }
45302
}
45303
var _BuiltinAstConverter = /** @class */ (function (_super) {
45304
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(_BuiltinAstConverter, _super);
45305
    function _BuiltinAstConverter(_converterFactory) {
45306
        var _this = _super.call(this) || this;
45307
        _this._converterFactory = _converterFactory;
45308
        return _this;
45309
    }
45310
    _BuiltinAstConverter.prototype.visitPipe = function (ast, context) {
45311
        var _this = this;
45312
        var args = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([ast.exp], ast.args).map(function (ast) { return ast.visit(_this, context); });
45313
        return new BuiltinFunctionCall(ast.span, args, this._converterFactory.createPipeConverter(ast.name, args.length));
45314
    };
45315
    _BuiltinAstConverter.prototype.visitLiteralArray = function (ast, context) {
45316
        var _this = this;
45317
        var args = ast.expressions.map(function (ast) { return ast.visit(_this, context); });
45318
        return new BuiltinFunctionCall(ast.span, args, this._converterFactory.createLiteralArrayConverter(ast.expressions.length));
45319
    };
45320
    _BuiltinAstConverter.prototype.visitLiteralMap = function (ast, context) {
45321
        var _this = this;
45322
        var args = ast.values.map(function (ast) { return ast.visit(_this, context); });
45323
        return new BuiltinFunctionCall(ast.span, args, this._converterFactory.createLiteralMapConverter(ast.keys));
45324
    };
45325
    return _BuiltinAstConverter;
45326
}(AstTransformer));
45327
var _AstToIrVisitor = /** @class */ (function () {
45328
    function _AstToIrVisitor(_localResolver, _implicitReceiver, bindingId, interpolationFunction) {
45329
        this._localResolver = _localResolver;
45330
        this._implicitReceiver = _implicitReceiver;
45331
        this.bindingId = bindingId;
45332
        this.interpolationFunction = interpolationFunction;
45333
        this._nodeMap = new Map();
45334
        this._resultMap = new Map();
45335
        this._currentTemporary = 0;
45336
        this.temporaryCount = 0;
45337
    }
45338
    _AstToIrVisitor.prototype.visitBinary = function (ast, mode) {
45339
        var op;
45340
        switch (ast.operation) {
45341
            case '+':
45342
                op = BinaryOperator.Plus;
45343
                break;
45344
            case '-':
45345
                op = BinaryOperator.Minus;
45346
                break;
45347
            case '*':
45348
                op = BinaryOperator.Multiply;
45349
                break;
45350
            case '/':
45351
                op = BinaryOperator.Divide;
45352
                break;
45353
            case '%':
45354
                op = BinaryOperator.Modulo;
45355
                break;
45356
            case '&&':
45357
                op = BinaryOperator.And;
45358
                break;
45359
            case '||':
45360
                op = BinaryOperator.Or;
45361
                break;
45362
            case '==':
45363
                op = BinaryOperator.Equals;
45364
                break;
45365
            case '!=':
45366
                op = BinaryOperator.NotEquals;
45367
                break;
45368
            case '===':
45369
                op = BinaryOperator.Identical;
45370
                break;
45371
            case '!==':
45372
                op = BinaryOperator.NotIdentical;
45373
                break;
45374
            case '<':
45375
                op = BinaryOperator.Lower;
45376
                break;
45377
            case '>':
45378
                op = BinaryOperator.Bigger;
45379
                break;
45380
            case '<=':
45381
                op = BinaryOperator.LowerEquals;
45382
                break;
45383
            case '>=':
45384
                op = BinaryOperator.BiggerEquals;
45385
                break;
45386
            default:
45387
                throw new Error("Unsupported operation " + ast.operation);
45388
        }
45389
        return convertToStatementIfNeeded(mode, new BinaryOperatorExpr(op, this._visit(ast.left, _Mode.Expression), this._visit(ast.right, _Mode.Expression)));
45390
    };
45391
    _AstToIrVisitor.prototype.visitChain = function (ast, mode) {
45392
        ensureStatementMode(mode, ast);
45393
        return this.visitAll(ast.expressions, mode);
45394
    };
45395
    _AstToIrVisitor.prototype.visitConditional = function (ast, mode) {
45396
        var value = this._visit(ast.condition, _Mode.Expression);
45397
        return convertToStatementIfNeeded(mode, value.conditional(this._visit(ast.trueExp, _Mode.Expression), this._visit(ast.falseExp, _Mode.Expression)));
45398
    };
45399
    _AstToIrVisitor.prototype.visitPipe = function (ast, mode) {
45400
        throw new Error("Illegal state: Pipes should have been converted into functions. Pipe: " + ast.name);
45401
    };
45402
    _AstToIrVisitor.prototype.visitFunctionCall = function (ast, mode) {
45403
        var convertedArgs = this.visitAll(ast.args, _Mode.Expression);
45404
        var fnResult;
45405
        if (ast instanceof BuiltinFunctionCall) {
45406
            fnResult = ast.converter(convertedArgs);
45407
        }
45408
        else {
45409
            fnResult = this._visit(ast.target, _Mode.Expression).callFn(convertedArgs);
45410
        }
45411
        return convertToStatementIfNeeded(mode, fnResult);
45412
    };
45413
    _AstToIrVisitor.prototype.visitImplicitReceiver = function (ast, mode) {
45414
        ensureExpressionMode(mode, ast);
45415
        return this._implicitReceiver;
45416
    };
45417
    _AstToIrVisitor.prototype.visitInterpolation = function (ast, mode) {
45418
        ensureExpressionMode(mode, ast);
45419
        var args = [literal(ast.expressions.length)];
45420
        for (var i = 0; i < ast.strings.length - 1; i++) {
45421
            args.push(literal(ast.strings[i]));
45422
            args.push(this._visit(ast.expressions[i], _Mode.Expression));
45423
        }
45424
        args.push(literal(ast.strings[ast.strings.length - 1]));
45425
        if (this.interpolationFunction) {
45426
            return this.interpolationFunction(args);
45427
        }
45428
        return ast.expressions.length <= 9 ?
45429
            importExpr(Identifiers.inlineInterpolate).callFn(args) :
45430
            importExpr(Identifiers.interpolate).callFn([args[0], literalArr(args.slice(1))]);
45431
    };
45432
    _AstToIrVisitor.prototype.visitKeyedRead = function (ast, mode) {
45433
        var leftMostSafe = this.leftMostSafeNode(ast);
45434
        if (leftMostSafe) {
45435
            return this.convertSafeAccess(ast, leftMostSafe, mode);
45436
        }
45437
        else {
45438
            return convertToStatementIfNeeded(mode, this._visit(ast.obj, _Mode.Expression).key(this._visit(ast.key, _Mode.Expression)));
45439
        }
45440
    };
45441
    _AstToIrVisitor.prototype.visitKeyedWrite = function (ast, mode) {
45442
        var obj = this._visit(ast.obj, _Mode.Expression);
45443
        var key = this._visit(ast.key, _Mode.Expression);
45444
        var value = this._visit(ast.value, _Mode.Expression);
45445
        return convertToStatementIfNeeded(mode, obj.key(key).set(value));
45446
    };
45447
    _AstToIrVisitor.prototype.visitLiteralArray = function (ast, mode) {
45448
        throw new Error("Illegal State: literal arrays should have been converted into functions");
45449
    };
45450
    _AstToIrVisitor.prototype.visitLiteralMap = function (ast, mode) {
45451
        throw new Error("Illegal State: literal maps should have been converted into functions");
45452
    };
45453
    _AstToIrVisitor.prototype.visitLiteralPrimitive = function (ast, mode) {
45454
        // For literal values of null, undefined, true, or false allow type interference
45455
        // to infer the type.
45456
        var type = ast.value === null || ast.value === undefined || ast.value === true || ast.value === true ?
45457
            INFERRED_TYPE :
45458
            undefined;
45459
        return convertToStatementIfNeeded(mode, literal(ast.value, type));
45460
    };
45461
    _AstToIrVisitor.prototype._getLocal = function (name) { return this._localResolver.getLocal(name); };
45462
    _AstToIrVisitor.prototype.visitMethodCall = function (ast, mode) {
45463
        if (ast.receiver instanceof ImplicitReceiver && ast.name == '$any') {
45464
            var args = this.visitAll(ast.args, _Mode.Expression);
45465
            if (args.length != 1) {
45466
                throw new Error("Invalid call to $any, expected 1 argument but received " + (args.length || 'none'));
45467
            }
45468
            return args[0].cast(DYNAMIC_TYPE);
45469
        }
45470
        var leftMostSafe = this.leftMostSafeNode(ast);
45471
        if (leftMostSafe) {
45472
            return this.convertSafeAccess(ast, leftMostSafe, mode);
45473
        }
45474
        else {
45475
            var args = this.visitAll(ast.args, _Mode.Expression);
45476
            var result = null;
45477
            var receiver = this._visit(ast.receiver, _Mode.Expression);
45478
            if (receiver === this._implicitReceiver) {
45479
                var varExpr = this._getLocal(ast.name);
45480
                if (varExpr) {
45481
                    result = varExpr.callFn(args);
45482
                }
45483
            }
45484
            if (result == null) {
45485
                result = receiver.callMethod(ast.name, args);
45486
            }
45487
            return convertToStatementIfNeeded(mode, result);
45488
        }
45489
    };
45490
    _AstToIrVisitor.prototype.visitPrefixNot = function (ast, mode) {
45491
        return convertToStatementIfNeeded(mode, not(this._visit(ast.expression, _Mode.Expression)));
45492
    };
45493
    _AstToIrVisitor.prototype.visitNonNullAssert = function (ast, mode) {
45494
        return convertToStatementIfNeeded(mode, assertNotNull(this._visit(ast.expression, _Mode.Expression)));
45495
    };
45496
    _AstToIrVisitor.prototype.visitPropertyRead = function (ast, mode) {
45497
        var leftMostSafe = this.leftMostSafeNode(ast);
45498
        if (leftMostSafe) {
45499
            return this.convertSafeAccess(ast, leftMostSafe, mode);
45500
        }
45501
        else {
45502
            var result = null;
45503
            var receiver = this._visit(ast.receiver, _Mode.Expression);
45504
            if (receiver === this._implicitReceiver) {
45505
                result = this._getLocal(ast.name);
45506
            }
45507
            if (result == null) {
45508
                result = receiver.prop(ast.name);
45509
            }
45510
            return convertToStatementIfNeeded(mode, result);
45511
        }
45512
    };
45513
    _AstToIrVisitor.prototype.visitPropertyWrite = function (ast, mode) {
45514
        var receiver = this._visit(ast.receiver, _Mode.Expression);
45515
        if (receiver === this._implicitReceiver) {
45516
            var varExpr = this._getLocal(ast.name);
45517
            if (varExpr) {
45518
                throw new Error('Cannot assign to a reference or variable!');
45519
            }
45520
        }
45521
        return convertToStatementIfNeeded(mode, receiver.prop(ast.name).set(this._visit(ast.value, _Mode.Expression)));
45522
    };
45523
    _AstToIrVisitor.prototype.visitSafePropertyRead = function (ast, mode) {
45524
        return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);
45525
    };
45526
    _AstToIrVisitor.prototype.visitSafeMethodCall = function (ast, mode) {
45527
        return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);
45528
    };
45529
    _AstToIrVisitor.prototype.visitAll = function (asts, mode) {
45530
        var _this = this;
45531
        return asts.map(function (ast) { return _this._visit(ast, mode); });
45532
    };
45533
    _AstToIrVisitor.prototype.visitQuote = function (ast, mode) {
45534
        throw new Error("Quotes are not supported for evaluation!\n        Statement: " + ast.uninterpretedExpression + " located at " + ast.location);
45535
    };
45536
    _AstToIrVisitor.prototype._visit = function (ast, mode) {
45537
        var result = this._resultMap.get(ast);
45538
        if (result)
45539
            return result;
45540
        return (this._nodeMap.get(ast) || ast).visit(this, mode);
45541
    };
45542
    _AstToIrVisitor.prototype.convertSafeAccess = function (ast, leftMostSafe, mode) {
45543
        // If the expression contains a safe access node on the left it needs to be converted to
45544
        // an expression that guards the access to the member by checking the receiver for blank. As
45545
        // execution proceeds from left to right, the left most part of the expression must be guarded
45546
        // first but, because member access is left associative, the right side of the expression is at
45547
        // the top of the AST. The desired result requires lifting a copy of the the left part of the
45548
        // expression up to test it for blank before generating the unguarded version.
45549
        // Consider, for example the following expression: a?.b.c?.d.e
45550
        // This results in the ast:
45551
        //         .
45552
        //        / \
45553
        //       ?.   e
45554
        //      /  \
45555
        //     .    d
45556
        //    / \
45557
        //   ?.  c
45558
        //  /  \
45559
        // a    b
45560
        // The following tree should be generated:
45561
        //
45562
        //        /---- ? ----\
45563
        //       /      |      \
45564
        //     a   /--- ? ---\  null
45565
        //        /     |     \
45566
        //       .      .     null
45567
        //      / \    / \
45568
        //     .  c   .   e
45569
        //    / \    / \
45570
        //   a   b  ,   d
45571
        //         / \
45572
        //        .   c
45573
        //       / \
45574
        //      a   b
45575
        //
45576
        // Notice that the first guard condition is the left hand of the left most safe access node
45577
        // which comes in as leftMostSafe to this routine.
45578
        var guardedExpression = this._visit(leftMostSafe.receiver, _Mode.Expression);
45579
        var temporary = undefined;
45580
        if (this.needsTemporary(leftMostSafe.receiver)) {
45581
            // If the expression has method calls or pipes then we need to save the result into a
45582
            // temporary variable to avoid calling stateful or impure code more than once.
45583
            temporary = this.allocateTemporary();
45584
            // Preserve the result in the temporary variable
45585
            guardedExpression = temporary.set(guardedExpression);
45586
            // Ensure all further references to the guarded expression refer to the temporary instead.
45587
            this._resultMap.set(leftMostSafe.receiver, temporary);
45588
        }
45589
        var condition = guardedExpression.isBlank();
45590
        // Convert the ast to an unguarded access to the receiver's member. The map will substitute
45591
        // leftMostNode with its unguarded version in the call to `this.visit()`.
45592
        if (leftMostSafe instanceof SafeMethodCall) {
45593
            this._nodeMap.set(leftMostSafe, new MethodCall(leftMostSafe.span, leftMostSafe.receiver, leftMostSafe.name, leftMostSafe.args));
45594
        }
45595
        else {
45596
            this._nodeMap.set(leftMostSafe, new PropertyRead(leftMostSafe.span, leftMostSafe.receiver, leftMostSafe.name));
45597
        }
45598
        // Recursively convert the node now without the guarded member access.
45599
        var access = this._visit(ast, _Mode.Expression);
45600
        // Remove the mapping. This is not strictly required as the converter only traverses each node
45601
        // once but is safer if the conversion is changed to traverse the nodes more than once.
45602
        this._nodeMap.delete(leftMostSafe);
45603
        // If we allocated a temporary, release it.
45604
        if (temporary) {
45605
            this.releaseTemporary(temporary);
45606
        }
45607
        // Produce the conditional
45608
        return convertToStatementIfNeeded(mode, condition.conditional(literal(null), access));
45609
    };
45610
    // Given a expression of the form a?.b.c?.d.e the the left most safe node is
45611
    // the (a?.b). The . and ?. are left associative thus can be rewritten as:
45612
    // ((((a?.c).b).c)?.d).e. This returns the most deeply nested safe read or
45613
    // safe method call as this needs be transform initially to:
45614
    //   a == null ? null : a.c.b.c?.d.e
45615
    // then to:
45616
    //   a == null ? null : a.b.c == null ? null : a.b.c.d.e
45617
    _AstToIrVisitor.prototype.leftMostSafeNode = function (ast) {
45618
        var _this = this;
45619
        var visit = function (visitor, ast) {
45620
            return (_this._nodeMap.get(ast) || ast).visit(visitor);
45621
        };
45622
        return ast.visit({
45623
            visitBinary: function (ast) { return null; },
45624
            visitChain: function (ast) { return null; },
45625
            visitConditional: function (ast) { return null; },
45626
            visitFunctionCall: function (ast) { return null; },
45627
            visitImplicitReceiver: function (ast) { return null; },
45628
            visitInterpolation: function (ast) { return null; },
45629
            visitKeyedRead: function (ast) { return visit(this, ast.obj); },
45630
            visitKeyedWrite: function (ast) { return null; },
45631
            visitLiteralArray: function (ast) { return null; },
45632
            visitLiteralMap: function (ast) { return null; },
45633
            visitLiteralPrimitive: function (ast) { return null; },
45634
            visitMethodCall: function (ast) { return visit(this, ast.receiver); },
45635
            visitPipe: function (ast) { return null; },
45636
            visitPrefixNot: function (ast) { return null; },
45637
            visitNonNullAssert: function (ast) { return null; },
45638
            visitPropertyRead: function (ast) { return visit(this, ast.receiver); },
45639
            visitPropertyWrite: function (ast) { return null; },
45640
            visitQuote: function (ast) { return null; },
45641
            visitSafeMethodCall: function (ast) { return visit(this, ast.receiver) || ast; },
45642
            visitSafePropertyRead: function (ast) {
45643
                return visit(this, ast.receiver) || ast;
45644
            }
45645
        });
45646
    };
45647
    // Returns true of the AST includes a method or a pipe indicating that, if the
45648
    // expression is used as the target of a safe property or method access then
45649
    // the expression should be stored into a temporary variable.
45650
    _AstToIrVisitor.prototype.needsTemporary = function (ast) {
45651
        var _this = this;
45652
        var visit = function (visitor, ast) {
45653
            return ast && (_this._nodeMap.get(ast) || ast).visit(visitor);
45654
        };
45655
        var visitSome = function (visitor, ast) {
45656
            return ast.some(function (ast) { return visit(visitor, ast); });
45657
        };
45658
        return ast.visit({
45659
            visitBinary: function (ast) { return visit(this, ast.left) || visit(this, ast.right); },
45660
            visitChain: function (ast) { return false; },
45661
            visitConditional: function (ast) {
45662
                return visit(this, ast.condition) || visit(this, ast.trueExp) ||
45663
                    visit(this, ast.falseExp);
45664
            },
45665
            visitFunctionCall: function (ast) { return true; },
45666
            visitImplicitReceiver: function (ast) { return false; },
45667
            visitInterpolation: function (ast) { return visitSome(this, ast.expressions); },
45668
            visitKeyedRead: function (ast) { return false; },
45669
            visitKeyedWrite: function (ast) { return false; },
45670
            visitLiteralArray: function (ast) { return true; },
45671
            visitLiteralMap: function (ast) { return true; },
45672
            visitLiteralPrimitive: function (ast) { return false; },
45673
            visitMethodCall: function (ast) { return true; },
45674
            visitPipe: function (ast) { return true; },
45675
            visitPrefixNot: function (ast) { return visit(this, ast.expression); },
45676
            visitNonNullAssert: function (ast) { return visit(this, ast.expression); },
45677
            visitPropertyRead: function (ast) { return false; },
45678
            visitPropertyWrite: function (ast) { return false; },
45679
            visitQuote: function (ast) { return false; },
45680
            visitSafeMethodCall: function (ast) { return true; },
45681
            visitSafePropertyRead: function (ast) { return false; }
45682
        });
45683
    };
45684
    _AstToIrVisitor.prototype.allocateTemporary = function () {
45685
        var tempNumber = this._currentTemporary++;
45686
        this.temporaryCount = Math.max(this._currentTemporary, this.temporaryCount);
45687
        return new ReadVarExpr(temporaryName(this.bindingId, tempNumber));
45688
    };
45689
    _AstToIrVisitor.prototype.releaseTemporary = function (temporary) {
45690
        this._currentTemporary--;
45691
        if (temporary.name != temporaryName(this.bindingId, this._currentTemporary)) {
45692
            throw new Error("Temporary " + temporary.name + " released out of order");
45693
        }
45694
    };
45695
    return _AstToIrVisitor;
45696
}());
45697
function flattenStatements(arg, output) {
45698
    if (Array.isArray(arg)) {
45699
        arg.forEach(function (entry) { return flattenStatements(entry, output); });
45700
    }
45701
    else {
45702
        output.push(arg);
45703
    }
45704
}
45705
var DefaultLocalResolver = /** @class */ (function () {
45706
    function DefaultLocalResolver() {
45707
    }
45708
    DefaultLocalResolver.prototype.getLocal = function (name) {
45709
        if (name === EventHandlerVars.event.name) {
45710
            return EventHandlerVars.event;
45711
        }
45712
        return null;
45713
    };
45714
    return DefaultLocalResolver;
45715
}());
45716
function createCurrValueExpr(bindingId) {
45717
    return variable("currVal_" + bindingId); // fix syntax highlighting: `
45718
}
45719
function createPreventDefaultVar(bindingId) {
45720
    return variable("pd_" + bindingId);
45721
}
45722
function convertStmtIntoExpression(stmt) {
45723
    if (stmt instanceof ExpressionStatement) {
45724
        return stmt.expr;
45725
    }
45726
    else if (stmt instanceof ReturnStatement) {
45727
        return stmt.value;
45728
    }
45729
    return null;
45730
}
45731
var BuiltinFunctionCall = /** @class */ (function (_super) {
45732
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(BuiltinFunctionCall, _super);
45733
    function BuiltinFunctionCall(span, args, converter) {
45734
        var _this = _super.call(this, span, null, args) || this;
45735
        _this.args = args;
45736
        _this.converter = converter;
45737
        return _this;
45738
    }
45739
    return BuiltinFunctionCall;
45740
}(FunctionCall));
45741
 
45742
/**
45743
 * @license
45744
 * Copyright Google Inc. All Rights Reserved.
45745
 *
45746
 * Use of this source code is governed by an MIT-style license that can be
45747
 * found in the LICENSE file at https://angular.io/license
45748
 */
45749
/**
45750
 * Generates code that is used to type check templates.
45751
 */
45752
var TypeCheckCompiler = /** @class */ (function () {
45753
    function TypeCheckCompiler(options, reflector) {
45754
        this.options = options;
45755
        this.reflector = reflector;
45756
    }
45757
    /**
45758
     * Important notes:
45759
     * - This must not produce new `import` statements, but only refer to types outside
45760
     *   of the file via the variables provided via externalReferenceVars.
45761
     *   This allows Typescript to reuse the old program's structure as no imports have changed.
45762
     * - This must not produce any exports, as this would pollute the .d.ts file
45763
     *   and also violate the point above.
45764
     */
45765
    TypeCheckCompiler.prototype.compileComponent = function (componentId, component, template, usedPipes, externalReferenceVars, ctx) {
45766
        var _this = this;
45767
        var pipes = new Map();
45768
        usedPipes.forEach(function (p) { return pipes.set(p.name, p.type.reference); });
45769
        var embeddedViewCount = 0;
45770
        var viewBuilderFactory = function (parent, guards) {
45771
            var embeddedViewIndex = embeddedViewCount++;
45772
            return new ViewBuilder(_this.options, _this.reflector, externalReferenceVars, parent, component.type.reference, component.isHost, embeddedViewIndex, pipes, guards, ctx, viewBuilderFactory);
45773
        };
45774
        var visitor = viewBuilderFactory(null, []);
45775
        visitor.visitAll([], template);
45776
        return visitor.build(componentId);
45777
    };
45778
    return TypeCheckCompiler;
45779
}());
45780
var DYNAMIC_VAR_NAME = '_any';
45781
var TypeCheckLocalResolver = /** @class */ (function () {
45782
    function TypeCheckLocalResolver() {
45783
    }
45784
    TypeCheckLocalResolver.prototype.getLocal = function (name) {
45785
        if (name === EventHandlerVars.event.name) {
45786
            // References to the event should not be type-checked.
45787
            // TODO(chuckj): determine a better type for the event.
45788
            return variable(DYNAMIC_VAR_NAME);
45789
        }
45790
        return null;
45791
    };
45792
    return TypeCheckLocalResolver;
45793
}());
45794
var defaultResolver = new TypeCheckLocalResolver();
45795
var ViewBuilder = /** @class */ (function () {
45796
    function ViewBuilder(options, reflector, externalReferenceVars, parent, component, isHostComponent, embeddedViewIndex, pipes, guards, ctx, viewBuilderFactory) {
45797
        this.options = options;
45798
        this.reflector = reflector;
45799
        this.externalReferenceVars = externalReferenceVars;
45800
        this.parent = parent;
45801
        this.component = component;
45802
        this.isHostComponent = isHostComponent;
45803
        this.embeddedViewIndex = embeddedViewIndex;
45804
        this.pipes = pipes;
45805
        this.guards = guards;
45806
        this.ctx = ctx;
45807
        this.viewBuilderFactory = viewBuilderFactory;
45808
        this.refOutputVars = new Map();
45809
        this.variables = [];
45810
        this.children = [];
45811
        this.updates = [];
45812
        this.actions = [];
45813
    }
45814
    ViewBuilder.prototype.getOutputVar = function (type) {
45815
        var varName;
45816
        if (type === this.component && this.isHostComponent) {
45817
            varName = DYNAMIC_VAR_NAME;
45818
        }
45819
        else if (type instanceof StaticSymbol) {
45820
            varName = this.externalReferenceVars.get(type);
45821
        }
45822
        else {
45823
            varName = DYNAMIC_VAR_NAME;
45824
        }
45825
        if (!varName) {
45826
            throw new Error("Illegal State: referring to a type without a variable " + JSON.stringify(type));
45827
        }
45828
        return varName;
45829
    };
45830
    ViewBuilder.prototype.getTypeGuardExpressions = function (ast) {
45831
        var result = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(this.guards);
45832
        try {
45833
            for (var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(ast.directives), _b = _a.next(); !_b.done; _b = _a.next()) {
45834
                var directive = _b.value;
45835
                try {
45836
                    for (var _c = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(directive.inputs), _d = _c.next(); !_d.done; _d = _c.next()) {
45837
                        var input = _d.value;
45838
                        var guard = directive.directive.guards[input.directiveName];
45839
                        if (guard) {
45840
                            var useIf = guard === 'UseIf';
45841
                            result.push({
45842
                                guard: guard,
45843
                                useIf: useIf,
45844
                                expression: { context: this.component, value: input.value }
45845
                            });
45846
                        }
45847
                    }
45848
                }
45849
                catch (e_1_1) { e_1 = { error: e_1_1 }; }
45850
                finally {
45851
                    try {
45852
                        if (_d && !_d.done && (_e = _c.return)) _e.call(_c);
45853
                    }
45854
                    finally { if (e_1) throw e_1.error; }
45855
                }
45856
            }
45857
        }
45858
        catch (e_2_1) { e_2 = { error: e_2_1 }; }
45859
        finally {
45860
            try {
45861
                if (_b && !_b.done && (_f = _a.return)) _f.call(_a);
45862
            }
45863
            finally { if (e_2) throw e_2.error; }
45864
        }
45865
        return result;
45866
        var e_2, _f, e_1, _e;
45867
    };
45868
    ViewBuilder.prototype.visitAll = function (variables, astNodes) {
45869
        this.variables = variables;
45870
        templateVisitAll(this, astNodes);
45871
    };
45872
    ViewBuilder.prototype.build = function (componentId, targetStatements) {
45873
        var _this = this;
45874
        if (targetStatements === void 0) { targetStatements = []; }
45875
        this.children.forEach(function (child) { return child.build(componentId, targetStatements); });
45876
        var viewStmts = [variable(DYNAMIC_VAR_NAME).set(NULL_EXPR).toDeclStmt(DYNAMIC_TYPE)];
45877
        var bindingCount = 0;
45878
        this.updates.forEach(function (expression) {
45879
            var _a = _this.preprocessUpdateExpression(expression), sourceSpan = _a.sourceSpan, context = _a.context, value = _a.value;
45880
            var bindingId = "" + bindingCount++;
45881
            var nameResolver = context === _this.component ? _this : defaultResolver;
45882
            var _b = convertPropertyBinding(nameResolver, variable(_this.getOutputVar(context)), value, bindingId, BindingForm.General), stmts = _b.stmts, currValExpr = _b.currValExpr;
45883
            stmts.push(new ExpressionStatement(currValExpr));
45884
            viewStmts.push.apply(viewStmts, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(stmts.map(function (stmt) { return applySourceSpanToStatementIfNeeded(stmt, sourceSpan); })));
45885
        });
45886
        this.actions.forEach(function (_a) {
45887
            var sourceSpan = _a.sourceSpan, context = _a.context, value = _a.value;
45888
            var bindingId = "" + bindingCount++;
45889
            var nameResolver = context === _this.component ? _this : defaultResolver;
45890
            var stmts = convertActionBinding(nameResolver, variable(_this.getOutputVar(context)), value, bindingId).stmts;
45891
            viewStmts.push.apply(viewStmts, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(stmts.map(function (stmt) { return applySourceSpanToStatementIfNeeded(stmt, sourceSpan); })));
45892
        });
45893
        if (this.guards.length) {
45894
            var guardExpression = undefined;
45895
            try {
45896
                for (var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(this.guards), _b = _a.next(); !_b.done; _b = _a.next()) {
45897
                    var guard = _b.value;
45898
                    var _c = this.preprocessUpdateExpression(guard.expression), context = _c.context, value = _c.value;
45899
                    var bindingId = "" + bindingCount++;
45900
                    var nameResolver = context === this.component ? this : defaultResolver;
45901
                    // We only support support simple expressions and ignore others as they
45902
                    // are unlikely to affect type narrowing.
45903
                    var _d = convertPropertyBinding(nameResolver, variable(this.getOutputVar(context)), value, bindingId, BindingForm.TrySimple), stmts = _d.stmts, currValExpr = _d.currValExpr;
45904
                    if (stmts.length == 0) {
45905
                        var guardClause = guard.useIf ? currValExpr : this.ctx.importExpr(guard.guard).callFn([currValExpr]);
45906
                        guardExpression = guardExpression ? guardExpression.and(guardClause) : guardClause;
45907
                    }
45908
                }
45909
            }
45910
            catch (e_3_1) { e_3 = { error: e_3_1 }; }
45911
            finally {
45912
                try {
45913
                    if (_b && !_b.done && (_e = _a.return)) _e.call(_a);
45914
                }
45915
                finally { if (e_3) throw e_3.error; }
45916
            }
45917
            if (guardExpression) {
45918
                viewStmts = [new IfStmt(guardExpression, viewStmts)];
45919
            }
45920
        }
45921
        var viewName = "_View_" + componentId + "_" + this.embeddedViewIndex;
45922
        var viewFactory = new DeclareFunctionStmt(viewName, [], viewStmts);
45923
        targetStatements.push(viewFactory);
45924
        return targetStatements;
45925
        var e_3, _e;
45926
    };
45927
    ViewBuilder.prototype.visitBoundText = function (ast, context) {
45928
        var _this = this;
45929
        var astWithSource = ast.value;
45930
        var inter = astWithSource.ast;
45931
        inter.expressions.forEach(function (expr) {
45932
            return _this.updates.push({ context: _this.component, value: expr, sourceSpan: ast.sourceSpan });
45933
        });
45934
    };
45935
    ViewBuilder.prototype.visitEmbeddedTemplate = function (ast, context) {
45936
        this.visitElementOrTemplate(ast);
45937
        // Note: The old view compiler used to use an `any` type
45938
        // for the context in any embedded view.
45939
        // We keep this behaivor behind a flag for now.
45940
        if (this.options.fullTemplateTypeCheck) {
45941
            // Find any applicable type guards. For example, NgIf has a type guard on ngIf
45942
            // (see NgIf.ngIfTypeGuard) that can be used to indicate that a template is only
45943
            // stamped out if ngIf is truthy so any bindings in the template can assume that,
45944
            // if a nullable type is used for ngIf, that expression is not null or undefined.
45945
            var guards = this.getTypeGuardExpressions(ast);
45946
            var childVisitor = this.viewBuilderFactory(this, guards);
45947
            this.children.push(childVisitor);
45948
            childVisitor.visitAll(ast.variables, ast.children);
45949
        }
45950
    };
45951
    ViewBuilder.prototype.visitElement = function (ast, context) {
45952
        var _this = this;
45953
        this.visitElementOrTemplate(ast);
45954
        ast.inputs.forEach(function (inputAst) {
45955
            _this.updates.push({ context: _this.component, value: inputAst.value, sourceSpan: inputAst.sourceSpan });
45956
        });
45957
        templateVisitAll(this, ast.children);
45958
    };
45959
    ViewBuilder.prototype.visitElementOrTemplate = function (ast) {
45960
        var _this = this;
45961
        ast.directives.forEach(function (dirAst) { _this.visitDirective(dirAst); });
45962
        ast.references.forEach(function (ref) {
45963
            var outputVarType = null;
45964
            // Note: The old view compiler used to use an `any` type
45965
            // for directives exposed via `exportAs`.
45966
            // We keep this behaivor behind a flag for now.
45967
            if (ref.value && ref.value.identifier && _this.options.fullTemplateTypeCheck) {
45968
                outputVarType = ref.value.identifier.reference;
45969
            }
45970
            else {
45971
                outputVarType = BuiltinTypeName.Dynamic;
45972
            }
45973
            _this.refOutputVars.set(ref.name, outputVarType);
45974
        });
45975
        ast.outputs.forEach(function (outputAst) {
45976
            _this.actions.push({ context: _this.component, value: outputAst.handler, sourceSpan: outputAst.sourceSpan });
45977
        });
45978
    };
45979
    ViewBuilder.prototype.visitDirective = function (dirAst) {
45980
        var _this = this;
45981
        var dirType = dirAst.directive.type.reference;
45982
        dirAst.inputs.forEach(function (input) { return _this.updates.push({ context: _this.component, value: input.value, sourceSpan: input.sourceSpan }); });
45983
        // Note: The old view compiler used to use an `any` type
45984
        // for expressions in host properties / events.
45985
        // We keep this behaivor behind a flag for now.
45986
        if (this.options.fullTemplateTypeCheck) {
45987
            dirAst.hostProperties.forEach(function (inputAst) { return _this.updates.push({ context: dirType, value: inputAst.value, sourceSpan: inputAst.sourceSpan }); });
45988
            dirAst.hostEvents.forEach(function (hostEventAst) { return _this.actions.push({
45989
                context: dirType,
45990
                value: hostEventAst.handler,
45991
                sourceSpan: hostEventAst.sourceSpan
45992
            }); });
45993
        }
45994
    };
45995
    ViewBuilder.prototype.getLocal = function (name) {
45996
        if (name == EventHandlerVars.event.name) {
45997
            return variable(this.getOutputVar(BuiltinTypeName.Dynamic));
45998
        }
45999
        for (var currBuilder = this; currBuilder; currBuilder = currBuilder.parent) {
46000
            var outputVarType = void 0;
46001
            // check references
46002
            outputVarType = currBuilder.refOutputVars.get(name);
46003
            if (outputVarType == null) {
46004
                // check variables
46005
                var varAst = currBuilder.variables.find(function (varAst) { return varAst.name === name; });
46006
                if (varAst) {
46007
                    outputVarType = BuiltinTypeName.Dynamic;
46008
                }
46009
            }
46010
            if (outputVarType != null) {
46011
                return variable(this.getOutputVar(outputVarType));
46012
            }
46013
        }
46014
        return null;
46015
    };
46016
    ViewBuilder.prototype.pipeOutputVar = function (name) {
46017
        var pipe = this.pipes.get(name);
46018
        if (!pipe) {
46019
            throw new Error("Illegal State: Could not find pipe " + name + " in template of " + this.component);
46020
        }
46021
        return this.getOutputVar(pipe);
46022
    };
46023
    ViewBuilder.prototype.preprocessUpdateExpression = function (expression) {
46024
        var _this = this;
46025
        return {
46026
            sourceSpan: expression.sourceSpan,
46027
            context: expression.context,
46028
            value: convertPropertyBindingBuiltins({
46029
                createLiteralArrayConverter: function (argCount) { return function (args) {
46030
                    var arr = literalArr(args);
46031
                    // Note: The old view compiler used to use an `any` type
46032
                    // for arrays.
46033
                    return _this.options.fullTemplateTypeCheck ? arr : arr.cast(DYNAMIC_TYPE);
46034
                }; },
46035
                createLiteralMapConverter: function (keys) { return function (values) {
46036
                    var entries = keys.map(function (k, i) { return ({
46037
                        key: k.key,
46038
                        value: values[i],
46039
                        quoted: k.quoted,
46040
                    }); });
46041
                    var map = literalMap(entries);
46042
                    // Note: The old view compiler used to use an `any` type
46043
                    // for maps.
46044
                    return _this.options.fullTemplateTypeCheck ? map : map.cast(DYNAMIC_TYPE);
46045
                }; },
46046
                createPipeConverter: function (name, argCount) { return function (args) {
46047
                    // Note: The old view compiler used to use an `any` type
46048
                    // for pipes.
46049
                    var pipeExpr = _this.options.fullTemplateTypeCheck ?
46050
                        variable(_this.pipeOutputVar(name)) :
46051
                        variable(_this.getOutputVar(BuiltinTypeName.Dynamic));
46052
                    return pipeExpr.callMethod('transform', args);
46053
                }; },
46054
            }, expression.value)
46055
        };
46056
    };
46057
    ViewBuilder.prototype.visitNgContent = function (ast, context) { };
46058
    ViewBuilder.prototype.visitText = function (ast, context) { };
46059
    ViewBuilder.prototype.visitDirectiveProperty = function (ast, context) { };
46060
    ViewBuilder.prototype.visitReference = function (ast, context) { };
46061
    ViewBuilder.prototype.visitVariable = function (ast, context) { };
46062
    ViewBuilder.prototype.visitEvent = function (ast, context) { };
46063
    ViewBuilder.prototype.visitElementProperty = function (ast, context) { };
46064
    ViewBuilder.prototype.visitAttr = function (ast, context) { };
46065
    return ViewBuilder;
46066
}());
46067
 
46068
/**
46069
 * @license
46070
 * Copyright Google Inc. All Rights Reserved.
46071
 *
46072
 * Use of this source code is governed by an MIT-style license that can be
46073
 * found in the LICENSE file at https://angular.io/license
46074
 */
46075
var CLASS_ATTR$1 = 'class';
46076
var STYLE_ATTR = 'style';
46077
var IMPLICIT_TEMPLATE_VAR = '\$implicit';
46078
var ViewCompileResult = /** @class */ (function () {
46079
    function ViewCompileResult(viewClassVar, rendererTypeVar) {
46080
        this.viewClassVar = viewClassVar;
46081
        this.rendererTypeVar = rendererTypeVar;
46082
    }
46083
    return ViewCompileResult;
46084
}());
46085
var ViewCompiler = /** @class */ (function () {
46086
    function ViewCompiler(_reflector) {
46087
        this._reflector = _reflector;
46088
    }
46089
    ViewCompiler.prototype.compileComponent = function (outputCtx, component, template, styles, usedPipes) {
46090
        var _this = this;
46091
        var embeddedViewCount = 0;
46092
        var staticQueryIds = findStaticQueryIds(template);
46093
        var renderComponentVarName = undefined;
46094
        if (!component.isHost) {
46095
            var template_1 = component.template;
46096
            var customRenderData = [];
46097
            if (template_1.animations && template_1.animations.length) {
46098
                customRenderData.push(new LiteralMapEntry('animation', convertValueToOutputAst(outputCtx, template_1.animations), true));
46099
            }
46100
            var renderComponentVar = variable(rendererTypeName(component.type.reference));
46101
            renderComponentVarName = renderComponentVar.name;
46102
            outputCtx.statements.push(renderComponentVar
46103
                .set(importExpr(Identifiers.createRendererType2).callFn([new LiteralMapExpr([
46104
                    new LiteralMapEntry('encapsulation', literal(template_1.encapsulation), false),
46105
                    new LiteralMapEntry('styles', styles, false),
46106
                    new LiteralMapEntry('data', new LiteralMapExpr(customRenderData), false)
46107
                ])]))
46108
                .toDeclStmt(importType(Identifiers.RendererType2), [StmtModifier.Final, StmtModifier.Exported]));
46109
        }
46110
        var viewBuilderFactory = function (parent) {
46111
            var embeddedViewIndex = embeddedViewCount++;
46112
            return new ViewBuilder$1(_this._reflector, outputCtx, parent, component, embeddedViewIndex, usedPipes, staticQueryIds, viewBuilderFactory);
46113
        };
46114
        var visitor = viewBuilderFactory(null);
46115
        visitor.visitAll([], template);
46116
        (_a = outputCtx.statements).push.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(visitor.build()));
46117
        return new ViewCompileResult(visitor.viewName, renderComponentVarName);
46118
        var _a;
46119
    };
46120
    return ViewCompiler;
46121
}());
46122
var LOG_VAR$1 = variable('_l');
46123
var VIEW_VAR = variable('_v');
46124
var CHECK_VAR = variable('_ck');
46125
var COMP_VAR = variable('_co');
46126
var EVENT_NAME_VAR = variable('en');
46127
var ALLOW_DEFAULT_VAR = variable("ad");
46128
var ViewBuilder$1 = /** @class */ (function () {
46129
    function ViewBuilder(reflector, outputCtx, parent, component, embeddedViewIndex, usedPipes, staticQueryIds, viewBuilderFactory) {
46130
        this.reflector = reflector;
46131
        this.outputCtx = outputCtx;
46132
        this.parent = parent;
46133
        this.component = component;
46134
        this.embeddedViewIndex = embeddedViewIndex;
46135
        this.usedPipes = usedPipes;
46136
        this.staticQueryIds = staticQueryIds;
46137
        this.viewBuilderFactory = viewBuilderFactory;
46138
        this.nodes = [];
46139
        this.purePipeNodeIndices = Object.create(null);
46140
        // Need Object.create so that we don't have builtin values...
46141
        this.refNodeIndices = Object.create(null);
46142
        this.variables = [];
46143
        this.children = [];
46144
        // TODO(tbosch): The old view compiler used to use an `any` type
46145
        // for the context in any embedded view. We keep this behaivor for now
46146
        // to be able to introduce the new view compiler without too many errors.
46147
        this.compType = this.embeddedViewIndex > 0 ?
46148
            DYNAMIC_TYPE :
46149
            expressionType(outputCtx.importExpr(this.component.type.reference));
46150
        this.viewName = viewClassName(this.component.type.reference, this.embeddedViewIndex);
46151
    }
46152
    ViewBuilder.prototype.visitAll = function (variables, astNodes) {
46153
        var _this = this;
46154
        this.variables = variables;
46155
        // create the pipes for the pure pipes immediately, so that we know their indices.
46156
        if (!this.parent) {
46157
            this.usedPipes.forEach(function (pipe) {
46158
                if (pipe.pure) {
46159
                    _this.purePipeNodeIndices[pipe.name] = _this._createPipe(null, pipe);
46160
                }
46161
            });
46162
        }
46163
        if (!this.parent) {
46164
            var queryIds_1 = staticViewQueryIds(this.staticQueryIds);
46165
            this.component.viewQueries.forEach(function (query, queryIndex) {
46166
                // Note: queries start with id 1 so we can use the number in a Bloom filter!
46167
                var queryId = queryIndex + 1;
46168
                var bindingType = query.first ? 0 /* First */ : 1;
46169
                var flags = 134217728 /* TypeViewQuery */ | calcStaticDynamicQueryFlags(queryIds_1, queryId, query.first);
46170
                _this.nodes.push(function () { return ({
46171
                    sourceSpan: null,
46172
                    nodeFlags: flags,
46173
                    nodeDef: importExpr(Identifiers.queryDef).callFn([
46174
                        literal(flags), literal(queryId),
46175
                        new LiteralMapExpr([new LiteralMapEntry(query.propertyName, literal(bindingType), false)])
46176
                    ])
46177
                }); });
46178
            });
46179
        }
46180
        templateVisitAll(this, astNodes);
46181
        if (this.parent && (astNodes.length === 0 || needsAdditionalRootNode(astNodes))) {
46182
            // if the view is an embedded view, then we need to add an additional root node in some cases
46183
            this.nodes.push(function () { return ({
46184
                sourceSpan: null,
46185
                nodeFlags: 1 /* TypeElement */,
46186
                nodeDef: importExpr(Identifiers.anchorDef).callFn([
46187
                    literal(0 /* None */), NULL_EXPR, NULL_EXPR, literal(0)
46188
                ])
46189
            }); });
46190
        }
46191
    };
46192
    ViewBuilder.prototype.build = function (targetStatements) {
46193
        if (targetStatements === void 0) { targetStatements = []; }
46194
        this.children.forEach(function (child) { return child.build(targetStatements); });
46195
        var _a = this._createNodeExpressions(), updateRendererStmts = _a.updateRendererStmts, updateDirectivesStmts = _a.updateDirectivesStmts, nodeDefExprs = _a.nodeDefExprs;
46196
        var updateRendererFn = this._createUpdateFn(updateRendererStmts);
46197
        var updateDirectivesFn = this._createUpdateFn(updateDirectivesStmts);
46198
        var viewFlags = 0;
46199
        if (!this.parent && this.component.changeDetection === ChangeDetectionStrategy.OnPush) {
46200
            viewFlags |= 2 /* OnPush */;
46201
        }
46202
        var viewFactory = new DeclareFunctionStmt(this.viewName, [new FnParam(LOG_VAR$1.name)], [new ReturnStatement(importExpr(Identifiers.viewDef).callFn([
46203
                literal(viewFlags),
46204
                literalArr(nodeDefExprs),
46205
                updateDirectivesFn,
46206
                updateRendererFn,
46207
            ]))], importType(Identifiers.ViewDefinition), this.embeddedViewIndex === 0 ? [StmtModifier.Exported] : []);
46208
        targetStatements.push(viewFactory);
46209
        return targetStatements;
46210
    };
46211
    ViewBuilder.prototype._createUpdateFn = function (updateStmts) {
46212
        var updateFn;
46213
        if (updateStmts.length > 0) {
46214
            var preStmts = [];
46215
            if (!this.component.isHost && findReadVarNames(updateStmts).has(COMP_VAR.name)) {
46216
                preStmts.push(COMP_VAR.set(VIEW_VAR.prop('component')).toDeclStmt(this.compType));
46217
            }
46218
            updateFn = fn([
46219
                new FnParam(CHECK_VAR.name, INFERRED_TYPE),
46220
                new FnParam(VIEW_VAR.name, INFERRED_TYPE)
46221
            ], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(preStmts, updateStmts), INFERRED_TYPE);
46222
        }
46223
        else {
46224
            updateFn = NULL_EXPR;
46225
        }
46226
        return updateFn;
46227
    };
46228
    ViewBuilder.prototype.visitNgContent = function (ast, context) {
46229
        // ngContentDef(ngContentIndex: number, index: number): NodeDef;
46230
        this.nodes.push(function () { return ({
46231
            sourceSpan: ast.sourceSpan,
46232
            nodeFlags: 8 /* TypeNgContent */,
46233
            nodeDef: importExpr(Identifiers.ngContentDef).callFn([
46234
                literal(ast.ngContentIndex), literal(ast.index)
46235
            ])
46236
        }); });
46237
    };
46238
    ViewBuilder.prototype.visitText = function (ast, context) {
46239
        // Static text nodes have no check function
46240
        var checkIndex = -1;
46241
        this.nodes.push(function () { return ({
46242
            sourceSpan: ast.sourceSpan,
46243
            nodeFlags: 2 /* TypeText */,
46244
            nodeDef: importExpr(Identifiers.textDef).callFn([
46245
                literal(checkIndex),
46246
                literal(ast.ngContentIndex),
46247
                literalArr([literal(ast.value)]),
46248
            ])
46249
        }); });
46250
    };
46251
    ViewBuilder.prototype.visitBoundText = function (ast, context) {
46252
        var _this = this;
46253
        var nodeIndex = this.nodes.length;
46254
        // reserve the space in the nodeDefs array
46255
        this.nodes.push(null);
46256
        var astWithSource = ast.value;
46257
        var inter = astWithSource.ast;
46258
        var updateRendererExpressions = inter.expressions.map(function (expr, bindingIndex) { return _this._preprocessUpdateExpression({ nodeIndex: nodeIndex, bindingIndex: bindingIndex, sourceSpan: ast.sourceSpan, context: COMP_VAR, value: expr }); });
46259
        // Check index is the same as the node index during compilation
46260
        // They might only differ at runtime
46261
        var checkIndex = nodeIndex;
46262
        this.nodes[nodeIndex] = function () { return ({
46263
            sourceSpan: ast.sourceSpan,
46264
            nodeFlags: 2 /* TypeText */,
46265
            nodeDef: importExpr(Identifiers.textDef).callFn([
46266
                literal(checkIndex),
46267
                literal(ast.ngContentIndex),
46268
                literalArr(inter.strings.map(function (s) { return literal(s); })),
46269
            ]),
46270
            updateRenderer: updateRendererExpressions
46271
        }); };
46272
    };
46273
    ViewBuilder.prototype.visitEmbeddedTemplate = function (ast, context) {
46274
        var _this = this;
46275
        var nodeIndex = this.nodes.length;
46276
        // reserve the space in the nodeDefs array
46277
        this.nodes.push(null);
46278
        var _a = this._visitElementOrTemplate(nodeIndex, ast), flags = _a.flags, queryMatchesExpr = _a.queryMatchesExpr, hostEvents = _a.hostEvents;
46279
        var childVisitor = this.viewBuilderFactory(this);
46280
        this.children.push(childVisitor);
46281
        childVisitor.visitAll(ast.variables, ast.children);
46282
        var childCount = this.nodes.length - nodeIndex - 1;
46283
        // anchorDef(
46284
        //   flags: NodeFlags, matchedQueries: [string, QueryValueType][], ngContentIndex: number,
46285
        //   childCount: number, handleEventFn?: ElementHandleEventFn, templateFactory?:
46286
        //   ViewDefinitionFactory): NodeDef;
46287
        this.nodes[nodeIndex] = function () { return ({
46288
            sourceSpan: ast.sourceSpan,
46289
            nodeFlags: 1 /* TypeElement */ | flags,
46290
            nodeDef: importExpr(Identifiers.anchorDef).callFn([
46291
                literal(flags),
46292
                queryMatchesExpr,
46293
                literal(ast.ngContentIndex),
46294
                literal(childCount),
46295
                _this._createElementHandleEventFn(nodeIndex, hostEvents),
46296
                variable(childVisitor.viewName),
46297
            ])
46298
        }); };
46299
    };
46300
    ViewBuilder.prototype.visitElement = function (ast, context) {
46301
        var _this = this;
46302
        var nodeIndex = this.nodes.length;
46303
        // reserve the space in the nodeDefs array so we can add children
46304
        this.nodes.push(null);
46305
        // Using a null element name creates an anchor.
46306
        var elName = isNgContainer(ast.name) ? null : ast.name;
46307
        var _a = this._visitElementOrTemplate(nodeIndex, ast), flags = _a.flags, usedEvents = _a.usedEvents, queryMatchesExpr = _a.queryMatchesExpr, dirHostBindings = _a.hostBindings, hostEvents = _a.hostEvents;
46308
        var inputDefs = [];
46309
        var updateRendererExpressions = [];
46310
        var outputDefs = [];
46311
        if (elName) {
46312
            var hostBindings = ast.inputs
46313
                .map(function (inputAst) { return ({
46314
                context: COMP_VAR,
46315
                inputAst: inputAst,
46316
                dirAst: null,
46317
            }); })
46318
                .concat(dirHostBindings);
46319
            if (hostBindings.length) {
46320
                updateRendererExpressions =
46321
                    hostBindings.map(function (hostBinding, bindingIndex) { return _this._preprocessUpdateExpression({
46322
                        context: hostBinding.context,
46323
                        nodeIndex: nodeIndex,
46324
                        bindingIndex: bindingIndex,
46325
                        sourceSpan: hostBinding.inputAst.sourceSpan,
46326
                        value: hostBinding.inputAst.value
46327
                    }); });
46328
                inputDefs = hostBindings.map(function (hostBinding) { return elementBindingDef(hostBinding.inputAst, hostBinding.dirAst); });
46329
            }
46330
            outputDefs = usedEvents.map(function (_a) {
46331
                var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(_a, 2), target = _b[0], eventName = _b[1];
46332
                return literalArr([literal(target), literal(eventName)]);
46333
            });
46334
        }
46335
        templateVisitAll(this, ast.children);
46336
        var childCount = this.nodes.length - nodeIndex - 1;
46337
        var compAst = ast.directives.find(function (dirAst) { return dirAst.directive.isComponent; });
46338
        var compRendererType = NULL_EXPR;
46339
        var compView = NULL_EXPR;
46340
        if (compAst) {
46341
            compView = this.outputCtx.importExpr(compAst.directive.componentViewType);
46342
            compRendererType = this.outputCtx.importExpr(compAst.directive.rendererType);
46343
        }
46344
        // Check index is the same as the node index during compilation
46345
        // They might only differ at runtime
46346
        var checkIndex = nodeIndex;
46347
        this.nodes[nodeIndex] = function () { return ({
46348
            sourceSpan: ast.sourceSpan,
46349
            nodeFlags: 1 /* TypeElement */ | flags,
46350
            nodeDef: importExpr(Identifiers.elementDef).callFn([
46351
                literal(checkIndex),
46352
                literal(flags),
46353
                queryMatchesExpr,
46354
                literal(ast.ngContentIndex),
46355
                literal(childCount),
46356
                literal(elName),
46357
                elName ? fixedAttrsDef(ast) : NULL_EXPR,
46358
                inputDefs.length ? literalArr(inputDefs) : NULL_EXPR,
46359
                outputDefs.length ? literalArr(outputDefs) : NULL_EXPR,
46360
                _this._createElementHandleEventFn(nodeIndex, hostEvents),
46361
                compView,
46362
                compRendererType,
46363
            ]),
46364
            updateRenderer: updateRendererExpressions
46365
        }); };
46366
    };
46367
    ViewBuilder.prototype._visitElementOrTemplate = function (nodeIndex, ast) {
46368
        var _this = this;
46369
        var flags = 0;
46370
        if (ast.hasViewContainer) {
46371
            flags |= 16777216 /* EmbeddedViews */;
46372
        }
46373
        var usedEvents = new Map();
46374
        ast.outputs.forEach(function (event) {
46375
            var _a = elementEventNameAndTarget(event, null), name = _a.name, target = _a.target;
46376
            usedEvents.set(elementEventFullName(target, name), [target, name]);
46377
        });
46378
        ast.directives.forEach(function (dirAst) {
46379
            dirAst.hostEvents.forEach(function (event) {
46380
                var _a = elementEventNameAndTarget(event, dirAst), name = _a.name, target = _a.target;
46381
                usedEvents.set(elementEventFullName(target, name), [target, name]);
46382
            });
46383
        });
46384
        var hostBindings = [];
46385
        var hostEvents = [];
46386
        this._visitComponentFactoryResolverProvider(ast.directives);
46387
        ast.providers.forEach(function (providerAst, providerIndex) {
46388
            var dirAst = undefined;
46389
            var dirIndex = undefined;
46390
            ast.directives.forEach(function (localDirAst, i) {
46391
                if (localDirAst.directive.type.reference === tokenReference(providerAst.token)) {
46392
                    dirAst = localDirAst;
46393
                    dirIndex = i;
46394
                }
46395
            });
46396
            if (dirAst) {
46397
                var _a = _this._visitDirective(providerAst, dirAst, dirIndex, nodeIndex, ast.references, ast.queryMatches, usedEvents, _this.staticQueryIds.get(ast)), dirHostBindings = _a.hostBindings, dirHostEvents = _a.hostEvents;
46398
                hostBindings.push.apply(hostBindings, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(dirHostBindings));
46399
                hostEvents.push.apply(hostEvents, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(dirHostEvents));
46400
            }
46401
            else {
46402
                _this._visitProvider(providerAst, ast.queryMatches);
46403
            }
46404
        });
46405
        var queryMatchExprs = [];
46406
        ast.queryMatches.forEach(function (match) {
46407
            var valueType = undefined;
46408
            if (tokenReference(match.value) ===
46409
                _this.reflector.resolveExternalReference(Identifiers.ElementRef)) {
46410
                valueType = 0 /* ElementRef */;
46411
            }
46412
            else if (tokenReference(match.value) ===
46413
                _this.reflector.resolveExternalReference(Identifiers.ViewContainerRef)) {
46414
                valueType = 3 /* ViewContainerRef */;
46415
            }
46416
            else if (tokenReference(match.value) ===
46417
                _this.reflector.resolveExternalReference(Identifiers.TemplateRef)) {
46418
                valueType = 2 /* TemplateRef */;
46419
            }
46420
            if (valueType != null) {
46421
                queryMatchExprs.push(literalArr([literal(match.queryId), literal(valueType)]));
46422
            }
46423
        });
46424
        ast.references.forEach(function (ref) {
46425
            var valueType = undefined;
46426
            if (!ref.value) {
46427
                valueType = 1 /* RenderElement */;
46428
            }
46429
            else if (tokenReference(ref.value) ===
46430
                _this.reflector.resolveExternalReference(Identifiers.TemplateRef)) {
46431
                valueType = 2 /* TemplateRef */;
46432
            }
46433
            if (valueType != null) {
46434
                _this.refNodeIndices[ref.name] = nodeIndex;
46435
                queryMatchExprs.push(literalArr([literal(ref.name), literal(valueType)]));
46436
            }
46437
        });
46438
        ast.outputs.forEach(function (outputAst) {
46439
            hostEvents.push({ context: COMP_VAR, eventAst: outputAst, dirAst: null });
46440
        });
46441
        return {
46442
            flags: flags,
46443
            usedEvents: Array.from(usedEvents.values()),
46444
            queryMatchesExpr: queryMatchExprs.length ? literalArr(queryMatchExprs) : NULL_EXPR,
46445
            hostBindings: hostBindings,
46446
            hostEvents: hostEvents
46447
        };
46448
    };
46449
    ViewBuilder.prototype._visitDirective = function (providerAst, dirAst, directiveIndex, elementNodeIndex, refs, queryMatches, usedEvents, queryIds) {
46450
        var _this = this;
46451
        var nodeIndex = this.nodes.length;
46452
        // reserve the space in the nodeDefs array so we can add children
46453
        this.nodes.push(null);
46454
        dirAst.directive.queries.forEach(function (query, queryIndex) {
46455
            var queryId = dirAst.contentQueryStartId + queryIndex;
46456
            var flags = 67108864 /* TypeContentQuery */ | calcStaticDynamicQueryFlags(queryIds, queryId, query.first);
46457
            var bindingType = query.first ? 0 /* First */ : 1;
46458
            _this.nodes.push(function () { return ({
46459
                sourceSpan: dirAst.sourceSpan,
46460
                nodeFlags: flags,
46461
                nodeDef: importExpr(Identifiers.queryDef).callFn([
46462
                    literal(flags), literal(queryId),
46463
                    new LiteralMapExpr([new LiteralMapEntry(query.propertyName, literal(bindingType), false)])
46464
                ]),
46465
            }); });
46466
        });
46467
        // Note: the operation below might also create new nodeDefs,
46468
        // but we don't want them to be a child of a directive,
46469
        // as they might be a provider/pipe on their own.
46470
        // I.e. we only allow queries as children of directives nodes.
46471
        var childCount = this.nodes.length - nodeIndex - 1;
46472
        var _a = this._visitProviderOrDirective(providerAst, queryMatches), flags = _a.flags, queryMatchExprs = _a.queryMatchExprs, providerExpr = _a.providerExpr, depsExpr = _a.depsExpr;
46473
        refs.forEach(function (ref) {
46474
            if (ref.value && tokenReference(ref.value) === tokenReference(providerAst.token)) {
46475
                _this.refNodeIndices[ref.name] = nodeIndex;
46476
                queryMatchExprs.push(literalArr([literal(ref.name), literal(4 /* Provider */)]));
46477
            }
46478
        });
46479
        if (dirAst.directive.isComponent) {
46480
            flags |= 32768 /* Component */;
46481
        }
46482
        var inputDefs = dirAst.inputs.map(function (inputAst, inputIndex) {
46483
            var mapValue = literalArr([literal(inputIndex), literal(inputAst.directiveName)]);
46484
            // Note: it's important to not quote the key so that we can capture renames by minifiers!
46485
            return new LiteralMapEntry(inputAst.directiveName, mapValue, false);
46486
        });
46487
        var outputDefs = [];
46488
        var dirMeta = dirAst.directive;
46489
        Object.keys(dirMeta.outputs).forEach(function (propName) {
46490
            var eventName = dirMeta.outputs[propName];
46491
            if (usedEvents.has(eventName)) {
46492
                // Note: it's important to not quote the key so that we can capture renames by minifiers!
46493
                outputDefs.push(new LiteralMapEntry(propName, literal(eventName), false));
46494
            }
46495
        });
46496
        var updateDirectiveExpressions = [];
46497
        if (dirAst.inputs.length || (flags & (262144 /* DoCheck */ | 65536 /* OnInit */)) > 0) {
46498
            updateDirectiveExpressions =
46499
                dirAst.inputs.map(function (input, bindingIndex) { return _this._preprocessUpdateExpression({
46500
                    nodeIndex: nodeIndex,
46501
                    bindingIndex: bindingIndex,
46502
                    sourceSpan: input.sourceSpan,
46503
                    context: COMP_VAR,
46504
                    value: input.value
46505
                }); });
46506
        }
46507
        var dirContextExpr = importExpr(Identifiers.nodeValue).callFn([VIEW_VAR, literal(nodeIndex)]);
46508
        var hostBindings = dirAst.hostProperties.map(function (inputAst) { return ({
46509
            context: dirContextExpr,
46510
            dirAst: dirAst,
46511
            inputAst: inputAst,
46512
        }); });
46513
        var hostEvents = dirAst.hostEvents.map(function (hostEventAst) { return ({
46514
            context: dirContextExpr,
46515
            eventAst: hostEventAst, dirAst: dirAst,
46516
        }); });
46517
        // Check index is the same as the node index during compilation
46518
        // They might only differ at runtime
46519
        var checkIndex = nodeIndex;
46520
        this.nodes[nodeIndex] = function () { return ({
46521
            sourceSpan: dirAst.sourceSpan,
46522
            nodeFlags: 16384 /* TypeDirective */ | flags,
46523
            nodeDef: importExpr(Identifiers.directiveDef).callFn([
46524
                literal(checkIndex),
46525
                literal(flags),
46526
                queryMatchExprs.length ? literalArr(queryMatchExprs) : NULL_EXPR,
46527
                literal(childCount),
46528
                providerExpr,
46529
                depsExpr,
46530
                inputDefs.length ? new LiteralMapExpr(inputDefs) : NULL_EXPR,
46531
                outputDefs.length ? new LiteralMapExpr(outputDefs) : NULL_EXPR,
46532
            ]),
46533
            updateDirectives: updateDirectiveExpressions,
46534
            directive: dirAst.directive.type,
46535
        }); };
46536
        return { hostBindings: hostBindings, hostEvents: hostEvents };
46537
    };
46538
    ViewBuilder.prototype._visitProvider = function (providerAst, queryMatches) {
46539
        this._addProviderNode(this._visitProviderOrDirective(providerAst, queryMatches));
46540
    };
46541
    ViewBuilder.prototype._visitComponentFactoryResolverProvider = function (directives) {
46542
        var componentDirMeta = directives.find(function (dirAst) { return dirAst.directive.isComponent; });
46543
        if (componentDirMeta && componentDirMeta.directive.entryComponents.length) {
46544
            var _a = componentFactoryResolverProviderDef(this.reflector, this.outputCtx, 8192 /* PrivateProvider */, componentDirMeta.directive.entryComponents), providerExpr = _a.providerExpr, depsExpr = _a.depsExpr, flags = _a.flags, tokenExpr = _a.tokenExpr;
46545
            this._addProviderNode({
46546
                providerExpr: providerExpr,
46547
                depsExpr: depsExpr,
46548
                flags: flags,
46549
                tokenExpr: tokenExpr,
46550
                queryMatchExprs: [],
46551
                sourceSpan: componentDirMeta.sourceSpan
46552
            });
46553
        }
46554
    };
46555
    ViewBuilder.prototype._addProviderNode = function (data) {
46556
        var nodeIndex = this.nodes.length;
46557
        // providerDef(
46558
        //   flags: NodeFlags, matchedQueries: [string, QueryValueType][], token:any,
46559
        //   value: any, deps: ([DepFlags, any] | any)[]): NodeDef;
46560
        this.nodes.push(function () { return ({
46561
            sourceSpan: data.sourceSpan,
46562
            nodeFlags: data.flags,
46563
            nodeDef: importExpr(Identifiers.providerDef).callFn([
46564
                literal(data.flags),
46565
                data.queryMatchExprs.length ? literalArr(data.queryMatchExprs) : NULL_EXPR,
46566
                data.tokenExpr, data.providerExpr, data.depsExpr
46567
            ])
46568
        }); });
46569
    };
46570
    ViewBuilder.prototype._visitProviderOrDirective = function (providerAst, queryMatches) {
46571
        var flags = 0;
46572
        var queryMatchExprs = [];
46573
        queryMatches.forEach(function (match) {
46574
            if (tokenReference(match.value) === tokenReference(providerAst.token)) {
46575
                queryMatchExprs.push(literalArr([literal(match.queryId), literal(4 /* Provider */)]));
46576
            }
46577
        });
46578
        var _a = providerDef(this.outputCtx, providerAst), providerExpr = _a.providerExpr, depsExpr = _a.depsExpr, providerFlags = _a.flags, tokenExpr = _a.tokenExpr;
46579
        return {
46580
            flags: flags | providerFlags,
46581
            queryMatchExprs: queryMatchExprs,
46582
            providerExpr: providerExpr,
46583
            depsExpr: depsExpr,
46584
            tokenExpr: tokenExpr,
46585
            sourceSpan: providerAst.sourceSpan
46586
        };
46587
    };
46588
    ViewBuilder.prototype.getLocal = function (name) {
46589
        if (name == EventHandlerVars.event.name) {
46590
            return EventHandlerVars.event;
46591
        }
46592
        var currViewExpr = VIEW_VAR;
46593
        for (var currBuilder = this; currBuilder; currBuilder = currBuilder.parent, currViewExpr = currViewExpr.prop('parent').cast(DYNAMIC_TYPE)) {
46594
            // check references
46595
            var refNodeIndex = currBuilder.refNodeIndices[name];
46596
            if (refNodeIndex != null) {
46597
                return importExpr(Identifiers.nodeValue).callFn([currViewExpr, literal(refNodeIndex)]);
46598
            }
46599
            // check variables
46600
            var varAst = currBuilder.variables.find(function (varAst) { return varAst.name === name; });
46601
            if (varAst) {
46602
                var varValue = varAst.value || IMPLICIT_TEMPLATE_VAR;
46603
                return currViewExpr.prop('context').prop(varValue);
46604
            }
46605
        }
46606
        return null;
46607
    };
46608
    ViewBuilder.prototype._createLiteralArrayConverter = function (sourceSpan, argCount) {
46609
        if (argCount === 0) {
46610
            var valueExpr_1 = importExpr(Identifiers.EMPTY_ARRAY);
46611
            return function () { return valueExpr_1; };
46612
        }
46613
        var checkIndex = this.nodes.length;
46614
        this.nodes.push(function () { return ({
46615
            sourceSpan: sourceSpan,
46616
            nodeFlags: 32 /* TypePureArray */,
46617
            nodeDef: importExpr(Identifiers.pureArrayDef).callFn([
46618
                literal(checkIndex),
46619
                literal(argCount),
46620
            ])
46621
        }); });
46622
        return function (args) { return callCheckStmt(checkIndex, args); };
46623
    };
46624
    ViewBuilder.prototype._createLiteralMapConverter = function (sourceSpan, keys) {
46625
        if (keys.length === 0) {
46626
            var valueExpr_2 = importExpr(Identifiers.EMPTY_MAP);
46627
            return function () { return valueExpr_2; };
46628
        }
46629
        var map = literalMap(keys.map(function (e, i) { return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, e, { value: literal(i) })); }));
46630
        var checkIndex = this.nodes.length;
46631
        this.nodes.push(function () { return ({
46632
            sourceSpan: sourceSpan,
46633
            nodeFlags: 64 /* TypePureObject */,
46634
            nodeDef: importExpr(Identifiers.pureObjectDef).callFn([
46635
                literal(checkIndex),
46636
                map,
46637
            ])
46638
        }); });
46639
        return function (args) { return callCheckStmt(checkIndex, args); };
46640
    };
46641
    ViewBuilder.prototype._createPipeConverter = function (expression, name, argCount) {
46642
        var pipe = this.usedPipes.find(function (pipeSummary) { return pipeSummary.name === name; });
46643
        if (pipe.pure) {
46644
            var checkIndex_1 = this.nodes.length;
46645
            this.nodes.push(function () { return ({
46646
                sourceSpan: expression.sourceSpan,
46647
                nodeFlags: 128 /* TypePurePipe */,
46648
                nodeDef: importExpr(Identifiers.purePipeDef).callFn([
46649
                    literal(checkIndex_1),
46650
                    literal(argCount),
46651
                ])
46652
            }); });
46653
            // find underlying pipe in the component view
46654
            var compViewExpr = VIEW_VAR;
46655
            var compBuilder = this;
46656
            while (compBuilder.parent) {
46657
                compBuilder = compBuilder.parent;
46658
                compViewExpr = compViewExpr.prop('parent').cast(DYNAMIC_TYPE);
46659
            }
46660
            var pipeNodeIndex = compBuilder.purePipeNodeIndices[name];
46661
            var pipeValueExpr_1 = importExpr(Identifiers.nodeValue).callFn([compViewExpr, literal(pipeNodeIndex)]);
46662
            return function (args) { return callUnwrapValue(expression.nodeIndex, expression.bindingIndex, callCheckStmt(checkIndex_1, [pipeValueExpr_1].concat(args))); };
46663
        }
46664
        else {
46665
            var nodeIndex = this._createPipe(expression.sourceSpan, pipe);
46666
            var nodeValueExpr_1 = importExpr(Identifiers.nodeValue).callFn([VIEW_VAR, literal(nodeIndex)]);
46667
            return function (args) { return callUnwrapValue(expression.nodeIndex, expression.bindingIndex, nodeValueExpr_1.callMethod('transform', args)); };
46668
        }
46669
    };
46670
    ViewBuilder.prototype._createPipe = function (sourceSpan, pipe) {
46671
        var _this = this;
46672
        var nodeIndex = this.nodes.length;
46673
        var flags = 0;
46674
        pipe.type.lifecycleHooks.forEach(function (lifecycleHook) {
46675
            // for pipes, we only support ngOnDestroy
46676
            if (lifecycleHook === LifecycleHooks.OnDestroy) {
46677
                flags |= lifecycleHookToNodeFlag(lifecycleHook);
46678
            }
46679
        });
46680
        var depExprs = pipe.type.diDeps.map(function (diDep) { return depDef(_this.outputCtx, diDep); });
46681
        // function pipeDef(
46682
        //   flags: NodeFlags, ctor: any, deps: ([DepFlags, any] | any)[]): NodeDef
46683
        this.nodes.push(function () { return ({
46684
            sourceSpan: sourceSpan,
46685
            nodeFlags: 16 /* TypePipe */,
46686
            nodeDef: importExpr(Identifiers.pipeDef).callFn([
46687
                literal(flags), _this.outputCtx.importExpr(pipe.type.reference), literalArr(depExprs)
46688
            ])
46689
        }); });
46690
        return nodeIndex;
46691
    };
46692
    /**
46693
     * For the AST in `UpdateExpression.value`:
46694
     * - create nodes for pipes, literal arrays and, literal maps,
46695
     * - update the AST to replace pipes, literal arrays and, literal maps with calls to check fn.
46696
     *
46697
     * WARNING: This might create new nodeDefs (for pipes and literal arrays and literal maps)!
46698
     */
46699
    ViewBuilder.prototype._preprocessUpdateExpression = function (expression) {
46700
        var _this = this;
46701
        return {
46702
            nodeIndex: expression.nodeIndex,
46703
            bindingIndex: expression.bindingIndex,
46704
            sourceSpan: expression.sourceSpan,
46705
            context: expression.context,
46706
            value: convertPropertyBindingBuiltins({
46707
                createLiteralArrayConverter: function (argCount) { return _this._createLiteralArrayConverter(expression.sourceSpan, argCount); },
46708
                createLiteralMapConverter: function (keys) {
46709
                    return _this._createLiteralMapConverter(expression.sourceSpan, keys);
46710
                },
46711
                createPipeConverter: function (name, argCount) {
46712
                    return _this._createPipeConverter(expression, name, argCount);
46713
                }
46714
            }, expression.value)
46715
        };
46716
    };
46717
    ViewBuilder.prototype._createNodeExpressions = function () {
46718
        var self = this;
46719
        var updateBindingCount = 0;
46720
        var updateRendererStmts = [];
46721
        var updateDirectivesStmts = [];
46722
        var nodeDefExprs = this.nodes.map(function (factory, nodeIndex) {
46723
            var _a = factory(), nodeDef = _a.nodeDef, nodeFlags = _a.nodeFlags, updateDirectives = _a.updateDirectives, updateRenderer = _a.updateRenderer, sourceSpan = _a.sourceSpan;
46724
            if (updateRenderer) {
46725
                updateRendererStmts.push.apply(updateRendererStmts, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(createUpdateStatements(nodeIndex, sourceSpan, updateRenderer, false)));
46726
            }
46727
            if (updateDirectives) {
46728
                updateDirectivesStmts.push.apply(updateDirectivesStmts, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(createUpdateStatements(nodeIndex, sourceSpan, updateDirectives, (nodeFlags & (262144 /* DoCheck */ | 65536 /* OnInit */)) > 0)));
46729
            }
46730
            // We use a comma expression to call the log function before
46731
            // the nodeDef function, but still use the result of the nodeDef function
46732
            // as the value.
46733
            // Note: We only add the logger to elements / text nodes,
46734
            // so we don't generate too much code.
46735
            var logWithNodeDef = nodeFlags & 3 /* CatRenderNode */ ?
46736
                new CommaExpr([LOG_VAR$1.callFn([]).callFn([]), nodeDef]) :
46737
                nodeDef;
46738
            return applySourceSpanToExpressionIfNeeded(logWithNodeDef, sourceSpan);
46739
        });
46740
        return { updateRendererStmts: updateRendererStmts, updateDirectivesStmts: updateDirectivesStmts, nodeDefExprs: nodeDefExprs };
46741
        function createUpdateStatements(nodeIndex, sourceSpan, expressions, allowEmptyExprs) {
46742
            var updateStmts = [];
46743
            var exprs = expressions.map(function (_a) {
46744
                var sourceSpan = _a.sourceSpan, context = _a.context, value = _a.value;
46745
                var bindingId = "" + updateBindingCount++;
46746
                var nameResolver = context === COMP_VAR ? self : null;
46747
                var _b = convertPropertyBinding(nameResolver, context, value, bindingId, BindingForm.General), stmts = _b.stmts, currValExpr = _b.currValExpr;
46748
                updateStmts.push.apply(updateStmts, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(stmts.map(function (stmt) { return applySourceSpanToStatementIfNeeded(stmt, sourceSpan); })));
46749
                return applySourceSpanToExpressionIfNeeded(currValExpr, sourceSpan);
46750
            });
46751
            if (expressions.length || allowEmptyExprs) {
46752
                updateStmts.push(applySourceSpanToStatementIfNeeded(callCheckStmt(nodeIndex, exprs).toStmt(), sourceSpan));
46753
            }
46754
            return updateStmts;
46755
        }
46756
    };
46757
    ViewBuilder.prototype._createElementHandleEventFn = function (nodeIndex, handlers) {
46758
        var _this = this;
46759
        var handleEventStmts = [];
46760
        var handleEventBindingCount = 0;
46761
        handlers.forEach(function (_a) {
46762
            var context = _a.context, eventAst = _a.eventAst, dirAst = _a.dirAst;
46763
            var bindingId = "" + handleEventBindingCount++;
46764
            var nameResolver = context === COMP_VAR ? _this : null;
46765
            var _b = convertActionBinding(nameResolver, context, eventAst.handler, bindingId), stmts = _b.stmts, allowDefault = _b.allowDefault;
46766
            var trueStmts = stmts;
46767
            if (allowDefault) {
46768
                trueStmts.push(ALLOW_DEFAULT_VAR.set(allowDefault.and(ALLOW_DEFAULT_VAR)).toStmt());
46769
            }
46770
            var _c = elementEventNameAndTarget(eventAst, dirAst), eventTarget = _c.target, eventName = _c.name;
46771
            var fullEventName = elementEventFullName(eventTarget, eventName);
46772
            handleEventStmts.push(applySourceSpanToStatementIfNeeded(new IfStmt(literal(fullEventName).identical(EVENT_NAME_VAR), trueStmts), eventAst.sourceSpan));
46773
        });
46774
        var handleEventFn;
46775
        if (handleEventStmts.length > 0) {
46776
            var preStmts = [ALLOW_DEFAULT_VAR.set(literal(true)).toDeclStmt(BOOL_TYPE)];
46777
            if (!this.component.isHost && findReadVarNames(handleEventStmts).has(COMP_VAR.name)) {
46778
                preStmts.push(COMP_VAR.set(VIEW_VAR.prop('component')).toDeclStmt(this.compType));
46779
            }
46780
            handleEventFn = fn([
46781
                new FnParam(VIEW_VAR.name, INFERRED_TYPE),
46782
                new FnParam(EVENT_NAME_VAR.name, INFERRED_TYPE),
46783
                new FnParam(EventHandlerVars.event.name, INFERRED_TYPE)
46784
            ], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(preStmts, handleEventStmts, [new ReturnStatement(ALLOW_DEFAULT_VAR)]), INFERRED_TYPE);
46785
        }
46786
        else {
46787
            handleEventFn = NULL_EXPR;
46788
        }
46789
        return handleEventFn;
46790
    };
46791
    ViewBuilder.prototype.visitDirective = function (ast, context) { };
46792
    ViewBuilder.prototype.visitDirectiveProperty = function (ast, context) { };
46793
    ViewBuilder.prototype.visitReference = function (ast, context) { };
46794
    ViewBuilder.prototype.visitVariable = function (ast, context) { };
46795
    ViewBuilder.prototype.visitEvent = function (ast, context) { };
46796
    ViewBuilder.prototype.visitElementProperty = function (ast, context) { };
46797
    ViewBuilder.prototype.visitAttr = function (ast, context) { };
46798
    return ViewBuilder;
46799
}());
46800
function needsAdditionalRootNode(astNodes) {
46801
    var lastAstNode = astNodes[astNodes.length - 1];
46802
    if (lastAstNode instanceof EmbeddedTemplateAst) {
46803
        return lastAstNode.hasViewContainer;
46804
    }
46805
    if (lastAstNode instanceof ElementAst) {
46806
        if (isNgContainer(lastAstNode.name) && lastAstNode.children.length) {
46807
            return needsAdditionalRootNode(lastAstNode.children);
46808
        }
46809
        return lastAstNode.hasViewContainer;
46810
    }
46811
    return lastAstNode instanceof NgContentAst;
46812
}
46813
function elementBindingDef(inputAst, dirAst) {
46814
    switch (inputAst.type) {
46815
        case PropertyBindingType.Attribute:
46816
            return literalArr([
46817
                literal(1 /* TypeElementAttribute */), literal(inputAst.name),
46818
                literal(inputAst.securityContext)
46819
            ]);
46820
        case PropertyBindingType.Property:
46821
            return literalArr([
46822
                literal(8 /* TypeProperty */), literal(inputAst.name),
46823
                literal(inputAst.securityContext)
46824
            ]);
46825
        case PropertyBindingType.Animation:
46826
            var bindingType = 8 /* TypeProperty */ |
46827
                (dirAst && dirAst.directive.isComponent ? 32 /* SyntheticHostProperty */ :
46828
                    16 /* SyntheticProperty */);
46829
            return literalArr([
46830
                literal(bindingType), literal('@' + inputAst.name), literal(inputAst.securityContext)
46831
            ]);
46832
        case PropertyBindingType.Class:
46833
            return literalArr([literal(2 /* TypeElementClass */), literal(inputAst.name), NULL_EXPR]);
46834
        case PropertyBindingType.Style:
46835
            return literalArr([
46836
                literal(4 /* TypeElementStyle */), literal(inputAst.name), literal(inputAst.unit)
46837
            ]);
46838
    }
46839
}
46840
function fixedAttrsDef(elementAst) {
46841
    var mapResult = Object.create(null);
46842
    elementAst.attrs.forEach(function (attrAst) { mapResult[attrAst.name] = attrAst.value; });
46843
    elementAst.directives.forEach(function (dirAst) {
46844
        Object.keys(dirAst.directive.hostAttributes).forEach(function (name) {
46845
            var value = dirAst.directive.hostAttributes[name];
46846
            var prevValue = mapResult[name];
46847
            mapResult[name] = prevValue != null ? mergeAttributeValue(name, prevValue, value) : value;
46848
        });
46849
    });
46850
    // Note: We need to sort to get a defined output order
46851
    // for tests and for caching generated artifacts...
46852
    return literalArr(Object.keys(mapResult).sort().map(function (attrName) { return literalArr([literal(attrName), literal(mapResult[attrName])]); }));
46853
}
46854
function mergeAttributeValue(attrName, attrValue1, attrValue2) {
46855
    if (attrName == CLASS_ATTR$1 || attrName == STYLE_ATTR) {
46856
        return attrValue1 + " " + attrValue2;
46857
    }
46858
    else {
46859
        return attrValue2;
46860
    }
46861
}
46862
function callCheckStmt(nodeIndex, exprs) {
46863
    if (exprs.length > 10) {
46864
        return CHECK_VAR.callFn([VIEW_VAR, literal(nodeIndex), literal(1 /* Dynamic */), literalArr(exprs)]);
46865
    }
46866
    else {
46867
        return CHECK_VAR.callFn(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([VIEW_VAR, literal(nodeIndex), literal(0 /* Inline */)], exprs));
46868
    }
46869
}
46870
function callUnwrapValue(nodeIndex, bindingIdx, expr) {
46871
    return importExpr(Identifiers.unwrapValue).callFn([
46872
        VIEW_VAR, literal(nodeIndex), literal(bindingIdx), expr
46873
    ]);
46874
}
46875
function findStaticQueryIds(nodes, result) {
46876
    if (result === void 0) { result = new Map(); }
46877
    nodes.forEach(function (node) {
46878
        var staticQueryIds = new Set();
46879
        var dynamicQueryIds = new Set();
46880
        var queryMatches = undefined;
46881
        if (node instanceof ElementAst) {
46882
            findStaticQueryIds(node.children, result);
46883
            node.children.forEach(function (child) {
46884
                var childData = result.get(child);
46885
                childData.staticQueryIds.forEach(function (queryId) { return staticQueryIds.add(queryId); });
46886
                childData.dynamicQueryIds.forEach(function (queryId) { return dynamicQueryIds.add(queryId); });
46887
            });
46888
            queryMatches = node.queryMatches;
46889
        }
46890
        else if (node instanceof EmbeddedTemplateAst) {
46891
            findStaticQueryIds(node.children, result);
46892
            node.children.forEach(function (child) {
46893
                var childData = result.get(child);
46894
                childData.staticQueryIds.forEach(function (queryId) { return dynamicQueryIds.add(queryId); });
46895
                childData.dynamicQueryIds.forEach(function (queryId) { return dynamicQueryIds.add(queryId); });
46896
            });
46897
            queryMatches = node.queryMatches;
46898
        }
46899
        if (queryMatches) {
46900
            queryMatches.forEach(function (match) { return staticQueryIds.add(match.queryId); });
46901
        }
46902
        dynamicQueryIds.forEach(function (queryId) { return staticQueryIds.delete(queryId); });
46903
        result.set(node, { staticQueryIds: staticQueryIds, dynamicQueryIds: dynamicQueryIds });
46904
    });
46905
    return result;
46906
}
46907
function staticViewQueryIds(nodeStaticQueryIds) {
46908
    var staticQueryIds = new Set();
46909
    var dynamicQueryIds = new Set();
46910
    Array.from(nodeStaticQueryIds.values()).forEach(function (entry) {
46911
        entry.staticQueryIds.forEach(function (queryId) { return staticQueryIds.add(queryId); });
46912
        entry.dynamicQueryIds.forEach(function (queryId) { return dynamicQueryIds.add(queryId); });
46913
    });
46914
    dynamicQueryIds.forEach(function (queryId) { return staticQueryIds.delete(queryId); });
46915
    return { staticQueryIds: staticQueryIds, dynamicQueryIds: dynamicQueryIds };
46916
}
46917
function elementEventNameAndTarget(eventAst, dirAst) {
46918
    if (eventAst.isAnimation) {
46919
        return {
46920
            name: "@" + eventAst.name + "." + eventAst.phase,
46921
            target: dirAst && dirAst.directive.isComponent ? 'component' : null
46922
        };
46923
    }
46924
    else {
46925
        return eventAst;
46926
    }
46927
}
46928
function calcStaticDynamicQueryFlags(queryIds, queryId, isFirst) {
46929
    var flags = 0;
46930
    // Note: We only make queries static that query for a single item.
46931
    // This is because of backwards compatibility with the old view compiler...
46932
    if (isFirst && (queryIds.staticQueryIds.has(queryId) || !queryIds.dynamicQueryIds.has(queryId))) {
46933
        flags |= 268435456 /* StaticQuery */;
46934
    }
46935
    else {
46936
        flags |= 536870912 /* DynamicQuery */;
46937
    }
46938
    return flags;
46939
}
46940
function elementEventFullName(target, name) {
46941
    return target ? target + ":" + name : name;
46942
}
46943
 
46944
/**
46945
 * @license
46946
 * Copyright Google Inc. All Rights Reserved.
46947
 *
46948
 * Use of this source code is governed by an MIT-style license that can be
46949
 * found in the LICENSE file at https://angular.io/license
46950
 */
46951
var CONSTANT_PREFIX = '_c';
46952
// Closure variables holding messages must be named `MSG_[A-Z0-9]+`
46953
var TRANSLATION_PREFIX = 'MSG_';
46954
/**
46955
 * Closure uses `goog.getMsg(message)` to lookup translations
46956
 */
46957
var GOOG_GET_MSG = 'goog.getMsg';
46958
/**
46959
 * Context to use when producing a key.
46960
 *
46961
 * This ensures we see the constant not the reference variable when producing
46962
 * a key.
46963
 */
46964
var KEY_CONTEXT = {};
46965
/**
46966
 * A node that is a place-holder that allows the node to be replaced when the actual
46967
 * node is known.
46968
 *
46969
 * This allows the constant pool to change an expression from a direct reference to
46970
 * a constant to a shared constant. It returns a fix-up node that is later allowed to
46971
 * change the referenced expression.
46972
 */
46973
var FixupExpression = /** @class */ (function (_super) {
46974
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FixupExpression, _super);
46975
    function FixupExpression(resolved) {
46976
        var _this = _super.call(this, resolved.type) || this;
46977
        _this.resolved = resolved;
46978
        _this.original = resolved;
46979
        return _this;
46980
    }
46981
    FixupExpression.prototype.visitExpression = function (visitor, context) {
46982
        if (context === KEY_CONTEXT) {
46983
            // When producing a key we want to traverse the constant not the
46984
            // variable used to refer to it.
46985
            return this.original.visitExpression(visitor, context);
46986
        }
46987
        else {
46988
            return this.resolved.visitExpression(visitor, context);
46989
        }
46990
    };
46991
    FixupExpression.prototype.isEquivalent = function (e) {
46992
        return e instanceof FixupExpression && this.resolved.isEquivalent(e.resolved);
46993
    };
46994
    FixupExpression.prototype.isConstant = function () { return true; };
46995
    FixupExpression.prototype.fixup = function (expression) {
46996
        this.resolved = expression;
46997
        this.shared = true;
46998
    };
46999
    return FixupExpression;
47000
}(Expression));
47001
/**
47002
 * A constant pool allows a code emitter to share constant in an output context.
47003
 *
47004
 * The constant pool also supports sharing access to ivy definitions references.
47005
 */
47006
var ConstantPool = /** @class */ (function () {
47007
    function ConstantPool() {
47008
        this.statements = [];
47009
        this.translations = new Map();
47010
        this.literals = new Map();
47011
        this.literalFactories = new Map();
47012
        this.injectorDefinitions = new Map();
47013
        this.directiveDefinitions = new Map();
47014
        this.componentDefinitions = new Map();
47015
        this.pipeDefinitions = new Map();
47016
        this.nextNameIndex = 0;
47017
    }
47018
    ConstantPool.prototype.getConstLiteral = function (literal$$1, forceShared) {
47019
        if (literal$$1 instanceof LiteralExpr || literal$$1 instanceof FixupExpression) {
47020
            // Do no put simple literals into the constant pool or try to produce a constant for a
47021
            // reference to a constant.
47022
            return literal$$1;
47023
        }
47024
        var key = this.keyOf(literal$$1);
47025
        var fixup = this.literals.get(key);
47026
        var newValue = false;
47027
        if (!fixup) {
47028
            fixup = new FixupExpression(literal$$1);
47029
            this.literals.set(key, fixup);
47030
            newValue = true;
47031
        }
47032
        if ((!newValue && !fixup.shared) || (newValue && forceShared)) {
47033
            // Replace the expression with a variable
47034
            var name_1 = this.freshName();
47035
            this.statements.push(variable(name_1).set(literal$$1).toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]));
47036
            fixup.fixup(variable(name_1));
47037
        }
47038
        return fixup;
47039
    };
47040
    // Generates closure specific code for translation.
47041
    //
47042
    // ```
47043
    // /**
47044
    //  * @desc description?
47045
    //  * @meaning meaning?
47046
    //  */
47047
    // const MSG_XYZ = goog.getMsg('message');
47048
    // ```
47049
    ConstantPool.prototype.getTranslation = function (message, meta) {
47050
        // The identity of an i18n message depends on the message and its meaning
47051
        var key = meta.meaning ? message + "\0\0" + meta.meaning : message;
47052
        var exp = this.translations.get(key);
47053
        if (exp) {
47054
            return exp;
47055
        }
47056
        var docStmt = i18nMetaToDocStmt(meta);
47057
        if (docStmt) {
47058
            this.statements.push(docStmt);
47059
        }
47060
        // Call closure to get the translation
47061
        var variable$$1 = variable(this.freshTranslationName());
47062
        var fnCall = variable(GOOG_GET_MSG).callFn([literal(message)]);
47063
        var msgStmt = variable$$1.set(fnCall).toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]);
47064
        this.statements.push(msgStmt);
47065
        this.translations.set(key, variable$$1);
47066
        return variable$$1;
47067
    };
47068
    ConstantPool.prototype.getDefinition = function (type, kind, ctx, forceShared) {
47069
        if (forceShared === void 0) { forceShared = false; }
47070
        var definitions = this.definitionsOf(kind);
47071
        var fixup = definitions.get(type);
47072
        var newValue = false;
47073
        if (!fixup) {
47074
            var property = this.propertyNameOf(kind);
47075
            fixup = new FixupExpression(ctx.importExpr(type).prop(property));
47076
            definitions.set(type, fixup);
47077
            newValue = true;
47078
        }
47079
        if ((!newValue && !fixup.shared) || (newValue && forceShared)) {
47080
            var name_2 = this.freshName();
47081
            this.statements.push(variable(name_2).set(fixup.resolved).toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]));
47082
            fixup.fixup(variable(name_2));
47083
        }
47084
        return fixup;
47085
    };
47086
    ConstantPool.prototype.getLiteralFactory = function (literal$$1) {
47087
        // Create a pure function that builds an array of a mix of constant  and variable expressions
47088
        if (literal$$1 instanceof LiteralArrayExpr) {
47089
            var argumentsForKey = literal$$1.entries.map(function (e) { return e.isConstant() ? e : literal(null); });
47090
            var key = this.keyOf(literalArr(argumentsForKey));
47091
            return this._getLiteralFactory(key, literal$$1.entries, function (entries) { return literalArr(entries); });
47092
        }
47093
        else {
47094
            var expressionForKey = literalMap(literal$$1.entries.map(function (e) { return ({
47095
                key: e.key,
47096
                value: e.value.isConstant() ? e.value : literal(null),
47097
                quoted: e.quoted
47098
            }); }));
47099
            var key = this.keyOf(expressionForKey);
47100
            return this._getLiteralFactory(key, literal$$1.entries.map(function (e) { return e.value; }), function (entries) { return literalMap(entries.map(function (value, index) { return ({
47101
                key: literal$$1.entries[index].key,
47102
                value: value,
47103
                quoted: literal$$1.entries[index].quoted
47104
            }); })); });
47105
        }
47106
    };
47107
    ConstantPool.prototype._getLiteralFactory = function (key, values, resultMap) {
47108
        var _this = this;
47109
        var literalFactory = this.literalFactories.get(key);
47110
        var literalFactoryArguments = values.filter((function (e) { return !e.isConstant(); }));
47111
        if (!literalFactory) {
47112
            var resultExpressions = values.map(function (e, index) { return e.isConstant() ? _this.getConstLiteral(e, true) : variable("a" + index); });
47113
            var parameters = resultExpressions.filter(isVariable).map(function (e) { return new FnParam(e.name, DYNAMIC_TYPE); });
47114
            var pureFunctionDeclaration = fn(parameters, [new ReturnStatement(resultMap(resultExpressions))], INFERRED_TYPE);
47115
            var name_3 = this.freshName();
47116
            this.statements.push(variable(name_3).set(pureFunctionDeclaration).toDeclStmt(INFERRED_TYPE, [
47117
                StmtModifier.Final
47118
            ]));
47119
            literalFactory = variable(name_3);
47120
            this.literalFactories.set(key, literalFactory);
47121
        }
47122
        return { literalFactory: literalFactory, literalFactoryArguments: literalFactoryArguments };
47123
    };
47124
    /**
47125
     * Produce a unique name.
47126
     *
47127
     * The name might be unique among different prefixes if any of the prefixes end in
47128
     * a digit so the prefix should be a constant string (not based on user input) and
47129
     * must not end in a digit.
47130
     */
47131
    ConstantPool.prototype.uniqueName = function (prefix) { return "" + prefix + this.nextNameIndex++; };
47132
    ConstantPool.prototype.definitionsOf = function (kind) {
47133
        switch (kind) {
47134
            case 2 /* Component */:
47135
                return this.componentDefinitions;
47136
            case 1 /* Directive */:
47137
                return this.directiveDefinitions;
47138
            case 0 /* Injector */:
47139
                return this.injectorDefinitions;
47140
            case 3 /* Pipe */:
47141
                return this.pipeDefinitions;
47142
        }
47143
        error("Unknown definition kind " + kind);
47144
        return this.componentDefinitions;
47145
    };
47146
    ConstantPool.prototype.propertyNameOf = function (kind) {
47147
        switch (kind) {
47148
            case 2 /* Component */:
47149
                return 'ngComponentDef';
47150
            case 1 /* Directive */:
47151
                return 'ngDirectiveDef';
47152
            case 0 /* Injector */:
47153
                return 'ngInjectorDef';
47154
            case 3 /* Pipe */:
47155
                return 'ngPipeDef';
47156
        }
47157
        error("Unknown definition kind " + kind);
47158
        return '<unknown>';
47159
    };
47160
    ConstantPool.prototype.freshName = function () { return this.uniqueName(CONSTANT_PREFIX); };
47161
    ConstantPool.prototype.freshTranslationName = function () {
47162
        return this.uniqueName(TRANSLATION_PREFIX).toUpperCase();
47163
    };
47164
    ConstantPool.prototype.keyOf = function (expression) {
47165
        return expression.visitExpression(new KeyVisitor(), KEY_CONTEXT);
47166
    };
47167
    return ConstantPool;
47168
}());
47169
/**
47170
 * Visitor used to determine if 2 expressions are equivalent and can be shared in the
47171
 * `ConstantPool`.
47172
 *
47173
 * When the id (string) generated by the visitor is equal, expressions are considered equivalent.
47174
 */
47175
var KeyVisitor = /** @class */ (function () {
47176
    function KeyVisitor() {
47177
        this.visitReadVarExpr = invalid;
47178
        this.visitWriteVarExpr = invalid;
47179
        this.visitWriteKeyExpr = invalid;
47180
        this.visitWritePropExpr = invalid;
47181
        this.visitInvokeMethodExpr = invalid;
47182
        this.visitInvokeFunctionExpr = invalid;
47183
        this.visitInstantiateExpr = invalid;
47184
        this.visitConditionalExpr = invalid;
47185
        this.visitNotExpr = invalid;
47186
        this.visitAssertNotNullExpr = invalid;
47187
        this.visitCastExpr = invalid;
47188
        this.visitFunctionExpr = invalid;
47189
        this.visitBinaryOperatorExpr = invalid;
47190
        this.visitReadPropExpr = invalid;
47191
        this.visitReadKeyExpr = invalid;
47192
        this.visitCommaExpr = invalid;
47193
    }
47194
    KeyVisitor.prototype.visitLiteralExpr = function (ast) {
47195
        return "" + (typeof ast.value === 'string' ? '"' + ast.value + '"' : ast.value);
47196
    };
47197
    KeyVisitor.prototype.visitLiteralArrayExpr = function (ast, context) {
47198
        var _this = this;
47199
        return "[" + ast.entries.map(function (entry) { return entry.visitExpression(_this, context); }).join(',') + "]";
47200
    };
47201
    KeyVisitor.prototype.visitLiteralMapExpr = function (ast, context) {
47202
        var _this = this;
47203
        var mapKey = function (entry) {
47204
            var quote = entry.quoted ? '"' : '';
47205
            return "" + quote + entry.key + quote;
47206
        };
47207
        var mapEntry = function (entry) {
47208
            return mapKey(entry) + ":" + entry.value.visitExpression(_this, context);
47209
        };
47210
        return "{" + ast.entries.map(mapEntry).join(',');
47211
    };
47212
    KeyVisitor.prototype.visitExternalExpr = function (ast) {
47213
        return ast.value.moduleName ? "EX:" + ast.value.moduleName + ":" + ast.value.name :
47214
            "EX:" + ast.value.runtime.name;
47215
    };
47216
    return KeyVisitor;
47217
}());
47218
function invalid(arg) {
47219
    throw new Error("Invalid state: Visitor " + this.constructor.name + " doesn't handle " + arg.constructor.name);
47220
}
47221
function isVariable(e) {
47222
    return e instanceof ReadVarExpr;
47223
}
47224
// Converts i18n meta informations for a message (description, meaning) to a JsDoc statement
47225
// formatted as expected by the Closure compiler.
47226
function i18nMetaToDocStmt(meta) {
47227
    var tags = [];
47228
    if (meta.description) {
47229
        tags.push({ tagName: "desc" /* Desc */, text: meta.description });
47230
    }
47231
    if (meta.meaning) {
47232
        tags.push({ tagName: "meaning" /* Meaning */, text: meta.meaning });
47233
    }
47234
    return tags.length == 0 ? null : new JSDocCommentStmt(tags);
47235
}
47236
 
47237
/**
47238
 * @license
47239
 * Copyright Google Inc. All Rights Reserved.
47240
 *
47241
 * Use of this source code is governed by an MIT-style license that can be
47242
 * found in the LICENSE file at https://angular.io/license
47243
 */
47244
/**
47245
 * A container for message extracted from the templates.
47246
 */
47247
var MessageBundle = /** @class */ (function () {
47248
    function MessageBundle(_htmlParser, _implicitTags, _implicitAttrs, _locale) {
47249
        if (_locale === void 0) { _locale = null; }
47250
        this._htmlParser = _htmlParser;
47251
        this._implicitTags = _implicitTags;
47252
        this._implicitAttrs = _implicitAttrs;
47253
        this._locale = _locale;
47254
        this._messages = [];
47255
    }
47256
    MessageBundle.prototype.updateFromTemplate = function (html, url, interpolationConfig) {
47257
        var htmlParserResult = this._htmlParser.parse(html, url, true, interpolationConfig);
47258
        if (htmlParserResult.errors.length) {
47259
            return htmlParserResult.errors;
47260
        }
47261
        var i18nParserResult = extractMessages(htmlParserResult.rootNodes, interpolationConfig, this._implicitTags, this._implicitAttrs);
47262
        if (i18nParserResult.errors.length) {
47263
            return i18nParserResult.errors;
47264
        }
47265
        (_a = this._messages).push.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(i18nParserResult.messages));
47266
        return [];
47267
        var _a;
47268
    };
47269
    // Return the message in the internal format
47270
    // The public (serialized) format might be different, see the `write` method.
47271
    MessageBundle.prototype.getMessages = function () { return this._messages; };
47272
    MessageBundle.prototype.write = function (serializer, filterSources) {
47273
        var messages = {};
47274
        var mapperVisitor = new MapPlaceholderNames();
47275
        // Deduplicate messages based on their ID
47276
        this._messages.forEach(function (message) {
47277
            var id = serializer.digest(message);
47278
            if (!messages.hasOwnProperty(id)) {
47279
                messages[id] = message;
47280
            }
47281
            else {
47282
                (_a = messages[id].sources).push.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(message.sources));
47283
            }
47284
            var _a;
47285
        });
47286
        // Transform placeholder names using the serializer mapping
47287
        var msgList = Object.keys(messages).map(function (id) {
47288
            var mapper = serializer.createNameMapper(messages[id]);
47289
            var src = messages[id];
47290
            var nodes = mapper ? mapperVisitor.convert(src.nodes, mapper) : src.nodes;
47291
            var transformedMessage = new Message(nodes, {}, {}, src.meaning, src.description, id);
47292
            transformedMessage.sources = src.sources;
47293
            if (filterSources) {
47294
                transformedMessage.sources.forEach(function (source) { return source.filePath = filterSources(source.filePath); });
47295
            }
47296
            return transformedMessage;
47297
        });
47298
        return serializer.write(msgList, this._locale);
47299
    };
47300
    return MessageBundle;
47301
}());
47302
// Transform an i18n AST by renaming the placeholder nodes with the given mapper
47303
var MapPlaceholderNames = /** @class */ (function (_super) {
47304
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MapPlaceholderNames, _super);
47305
    function MapPlaceholderNames() {
47306
        return _super !== null && _super.apply(this, arguments) || this;
47307
    }
47308
    MapPlaceholderNames.prototype.convert = function (nodes, mapper) {
47309
        var _this = this;
47310
        return mapper ? nodes.map(function (n) { return n.visit(_this, mapper); }) : nodes;
47311
    };
47312
    MapPlaceholderNames.prototype.visitTagPlaceholder = function (ph, mapper) {
47313
        var _this = this;
47314
        var startName = mapper.toPublicName(ph.startName);
47315
        var closeName = ph.closeName ? mapper.toPublicName(ph.closeName) : ph.closeName;
47316
        var children = ph.children.map(function (n) { return n.visit(_this, mapper); });
47317
        return new TagPlaceholder(ph.tag, ph.attrs, startName, closeName, children, ph.isVoid, ph.sourceSpan);
47318
    };
47319
    MapPlaceholderNames.prototype.visitPlaceholder = function (ph, mapper) {
47320
        return new Placeholder(ph.value, mapper.toPublicName(ph.name), ph.sourceSpan);
47321
    };
47322
    MapPlaceholderNames.prototype.visitIcuPlaceholder = function (ph, mapper) {
47323
        return new IcuPlaceholder(ph.value, mapper.toPublicName(ph.name), ph.sourceSpan);
47324
    };
47325
    return MapPlaceholderNames;
47326
}(CloneVisitor));
47327
 
47328
/**
47329
 * @license
47330
 * Copyright Google Inc. All Rights Reserved.
47331
 *
47332
 * Use of this source code is governed by an MIT-style license that can be
47333
 * found in the LICENSE file at https://angular.io/license
47334
 */
47335
 
47336
function mapLiteral(obj) {
47337
    return literalMap(Object.keys(obj).map(function (key) { return ({
47338
        key: key,
47339
        quoted: false,
47340
        value: obj[key],
47341
    }); }));
47342
}
47343
 
47344
/**
47345
 * @license
47346
 * Copyright Google Inc. All Rights Reserved.
47347
 *
47348
 * Use of this source code is governed by an MIT-style license that can be
47349
 * found in the LICENSE file at https://angular.io/license
47350
 */
47351
var CORE$1 = '@angular/core';
47352
var Identifiers$1 = /** @class */ (function () {
47353
    function Identifiers() {
47354
    }
47355
    /* Methods */
47356
    Identifiers.NEW_METHOD = 'factory';
47357
    Identifiers.TRANSFORM_METHOD = 'transform';
47358
    Identifiers.PATCH_DEPS = 'patchedDeps';
47359
    /* Instructions */
47360
    Identifiers.createElement = { name: 'ɵE', moduleName: CORE$1 };
47361
    Identifiers.elementEnd = { name: 'ɵe', moduleName: CORE$1 };
47362
    Identifiers.elementProperty = { name: 'ɵp', moduleName: CORE$1 };
47363
    Identifiers.elementAttribute = { name: 'ɵa', moduleName: CORE$1 };
47364
    Identifiers.elementClassNamed = { name: 'ɵkn', moduleName: CORE$1 };
47365
    Identifiers.elementStyleNamed = { name: 'ɵsn', moduleName: CORE$1 };
47366
    Identifiers.containerCreate = { name: 'ɵC', moduleName: CORE$1 };
47367
    Identifiers.containerEnd = { name: 'ɵc', moduleName: CORE$1 };
47368
    Identifiers.directiveCreate = { name: 'ɵD', moduleName: CORE$1 };
47369
    Identifiers.text = { name: 'ɵT', moduleName: CORE$1 };
47370
    Identifiers.directiveInput = { name: 'ɵi', moduleName: CORE$1 };
47371
    Identifiers.textCreateBound = { name: 'ɵt', moduleName: CORE$1 };
47372
    Identifiers.bind = { name: 'ɵb', moduleName: CORE$1 };
47373
    Identifiers.interpolation1 = { name: 'ɵi1', moduleName: CORE$1 };
47374
    Identifiers.interpolation2 = { name: 'ɵi2', moduleName: CORE$1 };
47375
    Identifiers.interpolation3 = { name: 'ɵi3', moduleName: CORE$1 };
47376
    Identifiers.interpolation4 = { name: 'ɵi4', moduleName: CORE$1 };
47377
    Identifiers.interpolation5 = { name: 'ɵi5', moduleName: CORE$1 };
47378
    Identifiers.interpolation6 = { name: 'ɵi6', moduleName: CORE$1 };
47379
    Identifiers.interpolation7 = { name: 'ɵi7', moduleName: CORE$1 };
47380
    Identifiers.interpolation8 = { name: 'ɵi8', moduleName: CORE$1 };
47381
    Identifiers.interpolationV = { name: 'ɵiV', moduleName: CORE$1 };
47382
    Identifiers.pureFunction0 = { name: 'ɵf0', moduleName: CORE$1 };
47383
    Identifiers.pureFunction1 = { name: 'ɵf1', moduleName: CORE$1 };
47384
    Identifiers.pureFunction2 = { name: 'ɵf2', moduleName: CORE$1 };
47385
    Identifiers.pureFunction3 = { name: 'ɵf3', moduleName: CORE$1 };
47386
    Identifiers.pureFunction4 = { name: 'ɵf4', moduleName: CORE$1 };
47387
    Identifiers.pureFunction5 = { name: 'ɵf5', moduleName: CORE$1 };
47388
    Identifiers.pureFunction6 = { name: 'ɵf6', moduleName: CORE$1 };
47389
    Identifiers.pureFunction7 = { name: 'ɵf7', moduleName: CORE$1 };
47390
    Identifiers.pureFunction8 = { name: 'ɵf8', moduleName: CORE$1 };
47391
    Identifiers.pureFunctionV = { name: 'ɵfV', moduleName: CORE$1 };
47392
    Identifiers.pipeBind1 = { name: 'ɵpb1', moduleName: CORE$1 };
47393
    Identifiers.pipeBind2 = { name: 'ɵpb2', moduleName: CORE$1 };
47394
    Identifiers.pipeBind3 = { name: 'ɵpb3', moduleName: CORE$1 };
47395
    Identifiers.pipeBind4 = { name: 'ɵpb4', moduleName: CORE$1 };
47396
    Identifiers.pipeBindV = { name: 'ɵpbV', moduleName: CORE$1 };
47397
    Identifiers.load = { name: 'ɵld', moduleName: CORE$1 };
47398
    Identifiers.pipe = { name: 'ɵPp', moduleName: CORE$1 };
47399
    Identifiers.projection = { name: 'ɵP', moduleName: CORE$1 };
47400
    Identifiers.projectionDef = { name: 'ɵpD', moduleName: CORE$1 };
47401
    Identifiers.refreshComponent = { name: 'ɵr', moduleName: CORE$1 };
47402
    Identifiers.directiveLifeCycle = { name: 'ɵl', moduleName: CORE$1 };
47403
    Identifiers.injectAttribute = { name: 'ɵinjectAttribute', moduleName: CORE$1 };
47404
    Identifiers.injectElementRef = { name: 'ɵinjectElementRef', moduleName: CORE$1 };
47405
    Identifiers.injectTemplateRef = { name: 'ɵinjectTemplateRef', moduleName: CORE$1 };
47406
    Identifiers.injectViewContainerRef = { name: 'ɵinjectViewContainerRef', moduleName: CORE$1 };
47407
    Identifiers.directiveInject = { name: 'ɵdirectiveInject', moduleName: CORE$1 };
47408
    Identifiers.defineComponent = { name: 'ɵdefineComponent', moduleName: CORE$1 };
47409
    Identifiers.defineDirective = {
47410
        name: 'ɵdefineDirective',
47411
        moduleName: CORE$1,
47412
    };
47413
    Identifiers.defineInjector = {
47414
        name: 'defineInjector',
47415
        moduleName: CORE$1,
47416
    };
47417
    Identifiers.definePipe = { name: 'ɵdefinePipe', moduleName: CORE$1 };
47418
    Identifiers.query = { name: 'ɵQ', moduleName: CORE$1 };
47419
    Identifiers.queryRefresh = { name: 'ɵqR', moduleName: CORE$1 };
47420
    Identifiers.NgOnChangesFeature = { name: 'ɵNgOnChangesFeature', moduleName: CORE$1 };
47421
    Identifiers.listener = { name: 'ɵL', moduleName: CORE$1 };
47422
    return Identifiers;
47423
}());
47424
 
47425
/**
47426
 * @license
47427
 * Copyright Google Inc. All Rights Reserved.
47428
 *
47429
 * Use of this source code is governed by an MIT-style license that can be
47430
 * found in the LICENSE file at https://angular.io/license
47431
 */
47432
var EMPTY_ARRAY = literalArr([]);
47433
function convertMetaToOutput(meta, ctx) {
47434
    if (Array.isArray(meta)) {
47435
        return literalArr(meta.map(function (entry) { return convertMetaToOutput(entry, ctx); }));
47436
    }
47437
    else if (meta instanceof StaticSymbol) {
47438
        return ctx.importExpr(meta);
47439
    }
47440
    else if (meta == null) {
47441
        return literal(meta);
47442
    }
47443
    else {
47444
        throw new Error("Internal error: Unsupported or unknown metadata: " + meta);
47445
    }
47446
}
47447
function compileNgModule(ctx, ngModule, injectableCompiler) {
47448
    var className = identifierName(ngModule.type);
47449
    var rawImports = ngModule.rawImports ? [ngModule.rawImports] : [];
47450
    var rawExports = ngModule.rawExports ? [ngModule.rawExports] : [];
47451
    var injectorDefArg = mapLiteral({
47452
        'factory': injectableCompiler.factoryFor({ type: ngModule.type, symbol: ngModule.type.reference }, ctx),
47453
        'providers': convertMetaToOutput(ngModule.rawProviders, ctx),
47454
        'imports': convertMetaToOutput(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(rawImports, rawExports), ctx),
47455
    });
47456
    var injectorDef = importExpr(Identifiers$1.defineInjector).callFn([injectorDefArg]);
47457
    ctx.statements.push(new ClassStmt(
47458
    /* name */ className,
47459
    /* parent */ null,
47460
    /* fields */ [new ClassField(
47461
        /* name */ 'ngInjectorDef',
47462
        /* type */ INFERRED_TYPE,
47463
        /* modifiers */ [StmtModifier.Static],
47464
        /* initializer */ injectorDef)],
47465
    /* getters */ [],
47466
    /* constructorMethod */ new ClassMethod(null, [], []),
47467
    /* methods */ []));
47468
}
47469
 
47470
/**
47471
 * @license
47472
 * Copyright Google Inc. All Rights Reserved.
47473
 *
47474
 * Use of this source code is governed by an MIT-style license that can be
47475
 * found in the LICENSE file at https://angular.io/license
47476
 */
47477
/**
47478
 * Comment to insert above back-patch
47479
 */
47480
var BUILD_OPTIMIZER_COLOCATE = '@__BUILD_OPTIMIZER_COLOCATE__';
47481
/**
47482
 * Comment to mark removable expressions
47483
 */
47484
 
47485
/**
47486
 * @license
47487
 * Copyright Google Inc. All Rights Reserved.
47488
 *
47489
 * Use of this source code is governed by an MIT-style license that can be
47490
 * found in the LICENSE file at https://angular.io/license
47491
 */
47492
/** Name of the context parameter passed into a template function */
47493
var CONTEXT_NAME = 'ctx';
47494
/** Name of the RenderFlag passed into a template function */
47495
var RENDER_FLAGS = 'rf';
47496
/** Name of the temporary to use during data binding */
47497
var TEMPORARY_NAME = '_t';
47498
/** The prefix reference variables */
47499
var REFERENCE_PREFIX = '_r';
47500
/** The name of the implicit context reference */
47501
var IMPLICIT_REFERENCE = '$implicit';
47502
/** Name of the i18n attributes **/
47503
var I18N_ATTR = 'i18n';
47504
var I18N_ATTR_PREFIX = 'i18n-';
47505
/** I18n separators for metadata **/
47506
var MEANING_SEPARATOR$1 = '|';
47507
var ID_SEPARATOR$1 = '@@';
47508
function compileDirective(outputCtx, directive, reflector, bindingParser, mode) {
47509
    var definitionMapValues = [];
47510
    var field = function (key, value) {
47511
        if (value) {
47512
            definitionMapValues.push({ key: key, value: value, quoted: false });
47513
        }
47514
    };
47515
    // e.g. 'type: MyDirective`
47516
    field('type', outputCtx.importExpr(directive.type.reference));
47517
    // e.g. `selectors: [['', 'someDir', '']]`
47518
    field('selectors', createDirectiveSelector(directive.selector));
47519
    // e.g. `factory: () => new MyApp(injectElementRef())`
47520
    field('factory', createFactory(directive.type, outputCtx, reflector, directive.queries));
47521
    // e.g. `hostBindings: (dirIndex, elIndex) => { ... }
47522
    field('hostBindings', createHostBindingsFunction(directive, outputCtx, bindingParser));
47523
    // e.g. `attributes: ['role', 'listbox']`
47524
    field('attributes', createHostAttributesArray(directive, outputCtx));
47525
    // e.g 'inputs: {a: 'a'}`
47526
    field('inputs', conditionallyCreateMapObjectLiteral(directive.inputs, outputCtx));
47527
    // e.g 'outputs: {a: 'a'}`
47528
    field('outputs', conditionallyCreateMapObjectLiteral(directive.outputs, outputCtx));
47529
    var className = identifierName(directive.type);
47530
    className || error("Cannot resolver the name of " + directive.type);
47531
    var definitionField = outputCtx.constantPool.propertyNameOf(1 /* Directive */);
47532
    var definitionFunction = importExpr(Identifiers$1.defineDirective).callFn([literalMap(definitionMapValues)]);
47533
    if (mode === 0 /* PartialClass */) {
47534
        // Create the partial class to be merged with the actual class.
47535
        outputCtx.statements.push(new ClassStmt(
47536
        /* name */ className,
47537
        /* parent */ null,
47538
        /* fields */ [new ClassField(
47539
            /* name */ definitionField,
47540
            /* type */ INFERRED_TYPE,
47541
            /* modifiers */ [StmtModifier.Static],
47542
            /* initializer */ definitionFunction)],
47543
        /* getters */ [],
47544
        /* constructorMethod */ new ClassMethod(null, [], []),
47545
        /* methods */ []));
47546
    }
47547
    else {
47548
        // Create back-patch definition.
47549
        var classReference = outputCtx.importExpr(directive.type.reference);
47550
        // Create the back-patch statement
47551
        outputCtx.statements.push(new CommentStmt(BUILD_OPTIMIZER_COLOCATE));
47552
        outputCtx.statements.push(classReference.prop(definitionField).set(definitionFunction).toStmt());
47553
    }
47554
}
47555
function compileComponent(outputCtx, component, pipeSummaries, template, reflector, bindingParser, mode) {
47556
    var definitionMapValues = [];
47557
    // Pipes and Directives found in the template
47558
    var pipes = new Set();
47559
    var directives = new Set();
47560
    var field = function (key, value) {
47561
        if (value) {
47562
            definitionMapValues.push({ key: key, value: value, quoted: false });
47563
        }
47564
    };
47565
    // e.g. `type: MyApp`
47566
    field('type', outputCtx.importExpr(component.type.reference));
47567
    // e.g. `selectors: [['my-app']]`
47568
    field('selectors', createDirectiveSelector(component.selector));
47569
    var selector = component.selector && CssSelector.parse(component.selector);
47570
    var firstSelector = selector && selector[0];
47571
    // e.g. `attr: ["class", ".my.app"]
47572
    // This is optional an only included if the first selector of a component specifies attributes.
47573
    if (firstSelector) {
47574
        var selectorAttributes = firstSelector.getAttrs();
47575
        if (selectorAttributes.length) {
47576
            field('attrs', outputCtx.constantPool.getConstLiteral(literalArr(selectorAttributes.map(function (value) { return value != null ? literal(value) : literal(undefined); })),
47577
            /* forceShared */ true));
47578
        }
47579
    }
47580
    // e.g. `factory: function MyApp_Factory() { return new MyApp(injectElementRef()); }`
47581
    field('factory', createFactory(component.type, outputCtx, reflector, component.queries));
47582
    // e.g `hostBindings: function MyApp_HostBindings { ... }
47583
    field('hostBindings', createHostBindingsFunction(component, outputCtx, bindingParser));
47584
    // e.g. `template: function MyComponent_Template(_ctx, _cm) {...}`
47585
    var templateTypeName = component.type.reference.name;
47586
    var templateName = templateTypeName ? templateTypeName + "_Template" : null;
47587
    var pipeMap = new Map(pipeSummaries.map(function (pipe) { return [pipe.name, pipe]; }));
47588
    var templateFunctionExpression = new TemplateDefinitionBuilder(outputCtx, outputCtx.constantPool, reflector, CONTEXT_NAME, BindingScope.ROOT_SCOPE, 0, component.template.ngContentSelectors, templateTypeName, templateName, pipeMap, component.viewQueries, directives, pipes)
47589
        .buildTemplateFunction(template, []);
47590
    field('template', templateFunctionExpression);
47591
    // e.g. `directives: [MyDirective]`
47592
    if (directives.size) {
47593
        var expressions = Array.from(directives).map(function (d) { return outputCtx.importExpr(d); });
47594
        field('directives', literalArr(expressions));
47595
    }
47596
    // e.g. `pipes: [MyPipe]`
47597
    if (pipes.size) {
47598
        var expressions = Array.from(pipes).map(function (p) { return outputCtx.importExpr(p); });
47599
        field('pipes', literalArr(expressions));
47600
    }
47601
    // e.g `inputs: {a: 'a'}`
47602
    field('inputs', conditionallyCreateMapObjectLiteral(component.inputs, outputCtx));
47603
    // e.g 'outputs: {a: 'a'}`
47604
    field('outputs', conditionallyCreateMapObjectLiteral(component.outputs, outputCtx));
47605
    // e.g. `features: [NgOnChangesFeature(MyComponent)]`
47606
    var features = [];
47607
    if (component.type.lifecycleHooks.some(function (lifecycle) { return lifecycle == LifecycleHooks.OnChanges; })) {
47608
        features.push(importExpr(Identifiers$1.NgOnChangesFeature, null, null).callFn([outputCtx.importExpr(component.type.reference)]));
47609
    }
47610
    if (features.length) {
47611
        field('features', literalArr(features));
47612
    }
47613
    var definitionField = outputCtx.constantPool.propertyNameOf(2 /* Component */);
47614
    var definitionFunction = importExpr(Identifiers$1.defineComponent).callFn([literalMap(definitionMapValues)]);
47615
    if (mode === 0 /* PartialClass */) {
47616
        var className = identifierName(component.type);
47617
        className || error("Cannot resolver the name of " + component.type);
47618
        // Create the partial class to be merged with the actual class.
47619
        outputCtx.statements.push(new ClassStmt(
47620
        /* name */ className,
47621
        /* parent */ null,
47622
        /* fields */ [new ClassField(
47623
            /* name */ definitionField,
47624
            /* type */ INFERRED_TYPE,
47625
            /* modifiers */ [StmtModifier.Static],
47626
            /* initializer */ definitionFunction)],
47627
        /* getters */ [],
47628
        /* constructorMethod */ new ClassMethod(null, [], []),
47629
        /* methods */ []));
47630
    }
47631
    else {
47632
        var classReference = outputCtx.importExpr(component.type.reference);
47633
        // Create the back-patch statement
47634
        outputCtx.statements.push(new CommentStmt(BUILD_OPTIMIZER_COLOCATE), classReference.prop(definitionField).set(definitionFunction).toStmt());
47635
    }
47636
}
47637
function unsupported(feature) {
47638
    if (this) {
47639
        throw new Error("Builder " + this.constructor.name + " doesn't support " + feature + " yet");
47640
    }
47641
    throw new Error("Feature " + feature + " is not supported yet");
47642
}
47643
var BINDING_INSTRUCTION_MAP = (_a = {}, _a[PropertyBindingType.Property] = Identifiers$1.elementProperty, _a[PropertyBindingType.Attribute] = Identifiers$1.elementAttribute, _a[PropertyBindingType.Class] = Identifiers$1.elementClassNamed, _a[PropertyBindingType.Style] = Identifiers$1.elementStyleNamed, _a);
47644
function interpolate(args) {
47645
    args = args.slice(1); // Ignore the length prefix added for render2
47646
    switch (args.length) {
47647
        case 3:
47648
            return importExpr(Identifiers$1.interpolation1).callFn(args);
47649
        case 5:
47650
            return importExpr(Identifiers$1.interpolation2).callFn(args);
47651
        case 7:
47652
            return importExpr(Identifiers$1.interpolation3).callFn(args);
47653
        case 9:
47654
            return importExpr(Identifiers$1.interpolation4).callFn(args);
47655
        case 11:
47656
            return importExpr(Identifiers$1.interpolation5).callFn(args);
47657
        case 13:
47658
            return importExpr(Identifiers$1.interpolation6).callFn(args);
47659
        case 15:
47660
            return importExpr(Identifiers$1.interpolation7).callFn(args);
47661
        case 17:
47662
            return importExpr(Identifiers$1.interpolation8).callFn(args);
47663
    }
47664
    (args.length >= 19 && args.length % 2 == 1) ||
47665
        error("Invalid interpolation argument length " + args.length);
47666
    return importExpr(Identifiers$1.interpolationV).callFn([literalArr(args)]);
47667
}
47668
function pipeBinding(args) {
47669
    switch (args.length) {
47670
        case 0:
47671
            // The first parameter to pipeBind is always the value to be transformed followed
47672
            // by arg.length arguments so the total number of arguments to pipeBind are
47673
            // arg.length + 1.
47674
            return Identifiers$1.pipeBind1;
47675
        case 1:
47676
            return Identifiers$1.pipeBind2;
47677
        case 2:
47678
            return Identifiers$1.pipeBind3;
47679
        default:
47680
            return Identifiers$1.pipeBindV;
47681
    }
47682
}
47683
var pureFunctionIdentifiers = [
47684
    Identifiers$1.pureFunction0, Identifiers$1.pureFunction1, Identifiers$1.pureFunction2, Identifiers$1.pureFunction3, Identifiers$1.pureFunction4,
47685
    Identifiers$1.pureFunction5, Identifiers$1.pureFunction6, Identifiers$1.pureFunction7, Identifiers$1.pureFunction8
47686
];
47687
function getLiteralFactory(outputContext, literal$$1) {
47688
    var _a = outputContext.constantPool.getLiteralFactory(literal$$1), literalFactory = _a.literalFactory, literalFactoryArguments = _a.literalFactoryArguments;
47689
    literalFactoryArguments.length > 0 || error("Expected arguments to a literal factory function");
47690
    var pureFunctionIdent = pureFunctionIdentifiers[literalFactoryArguments.length] || Identifiers$1.pureFunctionV;
47691
    // Literal factories are pure functions that only need to be re-invoked when the parameters
47692
    // change.
47693
    return importExpr(pureFunctionIdent).callFn(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([literalFactory], literalFactoryArguments));
47694
}
47695
function noop() { }
47696
var BindingScope = /** @class */ (function () {
47697
    function BindingScope(parent, declareLocalVarCallback) {
47698
        if (parent === void 0) { parent = null; }
47699
        if (declareLocalVarCallback === void 0) { declareLocalVarCallback = noop; }
47700
        this.parent = parent;
47701
        this.declareLocalVarCallback = declareLocalVarCallback;
47702
        /**
47703
         * Keeps a map from local variables to their expressions.
47704
         *
47705
         * This is used when one refers to variable such as: 'let abc = a.b.c`.
47706
         * - key to the map is the string literal `"abc"`.
47707
         * - value `lhs` is the left hand side which is an AST representing `abc`.
47708
         * - value `rhs` is the right hand side which is an AST representing `a.b.c`.
47709
         * - value `declared` is true if the `declareLocalVarCallback` has been called for this scope
47710
         * already.
47711
         */
47712
        this.map = new Map();
47713
        this.referenceNameIndex = 0;
47714
    }
47715
    BindingScope.prototype.get = function (name) {
47716
        var current = this;
47717
        while (current) {
47718
            var value = current.map.get(name);
47719
            if (value != null) {
47720
                if (current !== this) {
47721
                    // make a local copy and reset the `declared` state.
47722
                    value = { lhs: value.lhs, rhs: value.rhs, declared: false };
47723
                    // Cache the value locally.
47724
                    this.map.set(name, value);
47725
                }
47726
                if (value.rhs && !value.declared) {
47727
                    // if it is first time we are referencing the variable in the scope
47728
                    // than invoke the callback to insert variable declaration.
47729
                    this.declareLocalVarCallback(value.lhs, value.rhs);
47730
                    value.declared = true;
47731
                }
47732
                return value.lhs;
47733
            }
47734
            current = current.parent;
47735
        }
47736
        return null;
47737
    };
47738
    /**
47739
     * Create a local variable for later reference.
47740
     *
47741
     * @param name Name of the variable.
47742
     * @param lhs AST representing the left hand side of the `let lhs = rhs;`.
47743
     * @param rhs AST representing the right hand side of the `let lhs = rhs;`. The `rhs` can be
47744
     * `undefined` for variable that are ambient such as `$event` and which don't have `rhs`
47745
     * declaration.
47746
     */
47747
    BindingScope.prototype.set = function (name, lhs, rhs) {
47748
        !this.map.has(name) ||
47749
            error("The name " + name + " is already defined in scope to be " + this.map.get(name));
47750
        this.map.set(name, { lhs: lhs, rhs: rhs, declared: false });
47751
        return this;
47752
    };
47753
    BindingScope.prototype.getLocal = function (name) { return this.get(name); };
47754
    BindingScope.prototype.nestedScope = function (declareCallback) {
47755
        return new BindingScope(this, declareCallback);
47756
    };
47757
    BindingScope.prototype.freshReferenceName = function () {
47758
        var current = this;
47759
        // Find the top scope as it maintains the global reference count
47760
        while (current.parent)
47761
            current = current.parent;
47762
        var ref = "" + REFERENCE_PREFIX + current.referenceNameIndex++;
47763
        return ref;
47764
    };
47765
    BindingScope.ROOT_SCOPE = new BindingScope().set('$event', variable('$event'));
47766
    return BindingScope;
47767
}());
47768
var TemplateDefinitionBuilder = /** @class */ (function () {
47769
    function TemplateDefinitionBuilder(outputCtx, constantPool, reflector, contextParameter, parentBindingScope, level, ngContentSelectors, contextName, templateName, pipeMap, viewQueries, directives, pipes) {
47770
        if (level === void 0) { level = 0; }
47771
        var _this = this;
47772
        this.outputCtx = outputCtx;
47773
        this.constantPool = constantPool;
47774
        this.reflector = reflector;
47775
        this.contextParameter = contextParameter;
47776
        this.level = level;
47777
        this.ngContentSelectors = ngContentSelectors;
47778
        this.contextName = contextName;
47779
        this.templateName = templateName;
47780
        this.pipeMap = pipeMap;
47781
        this.viewQueries = viewQueries;
47782
        this.directives = directives;
47783
        this.pipes = pipes;
47784
        this._dataIndex = 0;
47785
        this._bindingContext = 0;
47786
        this._temporaryAllocated = false;
47787
        this._prefix = [];
47788
        this._creationMode = [];
47789
        this._variableMode = [];
47790
        this._bindingMode = [];
47791
        this._postfix = [];
47792
        this._projectionDefinitionIndex = 0;
47793
        this.unsupported = unsupported;
47794
        this.invalid = invalid$1;
47795
        // Whether we are inside a translatable element (`<p i18n>... somewhere here ... </p>)
47796
        this._inI18nSection = false;
47797
        this._i18nSectionIndex = -1;
47798
        // Maps of placeholder to node indexes for each of the i18n section
47799
        this._phToNodeIdxes = [{}];
47800
        // These should be handled in the template or element directly.
47801
        this.visitReference = invalid$1;
47802
        this.visitVariable = invalid$1;
47803
        this.visitEvent = invalid$1;
47804
        this.visitElementProperty = invalid$1;
47805
        this.visitAttr = invalid$1;
47806
        // These should be handled in the template or element directly
47807
        this.visitDirective = invalid$1;
47808
        this.visitDirectiveProperty = invalid$1;
47809
        this.bindingScope =
47810
            parentBindingScope.nestedScope(function (lhsVar, expression) {
47811
                _this._bindingMode.push(lhsVar.set(expression).toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]));
47812
            });
47813
        this._valueConverter = new ValueConverter(outputCtx, function () { return _this.allocateDataSlot(); }, function (name, localName, slot, value) {
47814
            _this.bindingScope.set(localName, value);
47815
            var pipe = pipeMap.get(name);
47816
            pipe || error("Could not find pipe " + name);
47817
            _this.pipes.add(pipe.type.reference);
47818
            _this._creationMode.push(importExpr(Identifiers$1.pipe).callFn([literal(slot), literal(name)]).toStmt());
47819
        });
47820
    }
47821
    TemplateDefinitionBuilder.prototype.buildTemplateFunction = function (nodes, variables) {
47822
        try {
47823
            // Create variable bindings
47824
            for (var variables_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(variables), variables_1_1 = variables_1.next(); !variables_1_1.done; variables_1_1 = variables_1.next()) {
47825
                var variable$$1 = variables_1_1.value;
47826
                var variableName = variable$$1.name;
47827
                var expression = variable(this.contextParameter).prop(variable$$1.value || IMPLICIT_REFERENCE);
47828
                var scopedName = this.bindingScope.freshReferenceName();
47829
                // Add the reference to the local scope.
47830
                this.bindingScope.set(variableName, variable(variableName + scopedName), expression);
47831
            }
47832
        }
47833
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
47834
        finally {
47835
            try {
47836
                if (variables_1_1 && !variables_1_1.done && (_a = variables_1.return)) _a.call(variables_1);
47837
            }
47838
            finally { if (e_1) throw e_1.error; }
47839
        }
47840
        // Collect content projections
47841
        if (this.ngContentSelectors && this.ngContentSelectors.length > 0) {
47842
            var contentProjections = getContentProjection(nodes, this.ngContentSelectors);
47843
            this._contentProjections = contentProjections;
47844
            if (contentProjections.size > 0) {
47845
                var selectors_1 = [];
47846
                Array.from(contentProjections.values()).forEach(function (info) {
47847
                    if (info.selector) {
47848
                        selectors_1[info.index - 1] = info.selector;
47849
                    }
47850
                });
47851
                var projectionIndex = this._projectionDefinitionIndex = this.allocateDataSlot();
47852
                var parameters = [literal(projectionIndex)];
47853
                if (selectors_1.some(function (value) { return !value; })) {
47854
                    error("content project information skipped an index");
47855
                }
47856
                if (selectors_1.length > 1) {
47857
                    var r3Selectors = selectors_1.map(function (s) { return parseSelectorToR3Selector(s); });
47858
                    // `projectionDef` needs both the parsed and raw value of the selectors
47859
                    var parsed = this.outputCtx.constantPool.getConstLiteral(asLiteral(r3Selectors), true);
47860
                    var unParsed = this.outputCtx.constantPool.getConstLiteral(asLiteral(selectors_1), true);
47861
                    parameters.push(parsed, unParsed);
47862
                }
47863
                this.instruction.apply(this, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([this._creationMode, null, Identifiers$1.projectionDef], parameters));
47864
            }
47865
        }
47866
        try {
47867
            // Define and update any view queries
47868
            for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(this.viewQueries), _c = _b.next(); !_c.done; _c = _b.next()) {
47869
                var query = _c.value;
47870
                // e.g. r3.Q(0, somePredicate, true);
47871
                var querySlot = this.allocateDataSlot();
47872
                var predicate = getQueryPredicate(query, this.outputCtx);
47873
                var args = [
47874
                    /* memoryIndex */ literal(querySlot, INFERRED_TYPE),
47875
                    /* predicate */ predicate,
47876
                    /* descend */ literal(query.descendants, INFERRED_TYPE)
47877
                ];
47878
                if (query.read) {
47879
                    args.push(this.outputCtx.importExpr(query.read.identifier.reference));
47880
                }
47881
                this.instruction.apply(this, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([this._creationMode, null, Identifiers$1.query], args));
47882
                // (r3.qR(tmp = r3.ɵld(0)) && (ctx.someDir = tmp));
47883
                var temporary = this.temp();
47884
                var getQueryList = importExpr(Identifiers$1.load).callFn([literal(querySlot)]);
47885
                var refresh = importExpr(Identifiers$1.queryRefresh).callFn([temporary.set(getQueryList)]);
47886
                var updateDirective = variable(CONTEXT_NAME)
47887
                    .prop(query.propertyName)
47888
                    .set(query.first ? temporary.prop('first') : temporary);
47889
                this._bindingMode.push(refresh.and(updateDirective).toStmt());
47890
            }
47891
        }
47892
        catch (e_2_1) { e_2 = { error: e_2_1 }; }
47893
        finally {
47894
            try {
47895
                if (_c && !_c.done && (_d = _b.return)) _d.call(_b);
47896
            }
47897
            finally { if (e_2) throw e_2.error; }
47898
        }
47899
        templateVisitAll(this, nodes);
47900
        var creationMode = this._creationMode.length > 0 ?
47901
            [ifStmt(variable(RENDER_FLAGS).bitwiseAnd(literal(1 /* Create */), null, false), this._creationMode)] :
47902
            [];
47903
        var updateMode = this._bindingMode.length > 0 ?
47904
            [ifStmt(variable(RENDER_FLAGS).bitwiseAnd(literal(2 /* Update */), null, false), this._bindingMode)] :
47905
            [];
47906
        try {
47907
            // Generate maps of placeholder name to node indexes
47908
            // TODO(vicb): This is a WIP, not fully supported yet
47909
            for (var _e = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(this._phToNodeIdxes), _f = _e.next(); !_f.done; _f = _e.next()) {
47910
                var phToNodeIdx = _f.value;
47911
                if (Object.keys(phToNodeIdx).length > 0) {
47912
                    var scopedName = this.bindingScope.freshReferenceName();
47913
                    var phMap = variable(scopedName)
47914
                        .set(mapToExpression(phToNodeIdx, true))
47915
                        .toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]);
47916
                    this._prefix.push(phMap);
47917
                }
47918
            }
47919
        }
47920
        catch (e_3_1) { e_3 = { error: e_3_1 }; }
47921
        finally {
47922
            try {
47923
                if (_f && !_f.done && (_g = _e.return)) _g.call(_e);
47924
            }
47925
            finally { if (e_3) throw e_3.error; }
47926
        }
47927
        return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(this.contextParameter, null)], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(this._prefix, creationMode, this._variableMode, updateMode, this._postfix), INFERRED_TYPE, null, this.templateName);
47928
        var e_1, _a, e_2, _d, e_3, _g;
47929
    };
47930
    // LocalResolver
47931
    TemplateDefinitionBuilder.prototype.getLocal = function (name) { return this.bindingScope.get(name); };
47932
    // TemplateAstVisitor
47933
    TemplateDefinitionBuilder.prototype.visitNgContent = function (ngContent) {
47934
        var info = this._contentProjections.get(ngContent);
47935
        info ||
47936
            error("Expected " + ngContent.sourceSpan + " to be included in content projection collection");
47937
        var slot = this.allocateDataSlot();
47938
        var parameters = [literal(slot), literal(this._projectionDefinitionIndex)];
47939
        if (info.index !== 0) {
47940
            parameters.push(literal(info.index));
47941
        }
47942
        this.instruction.apply(this, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([this._creationMode, ngContent.sourceSpan, Identifiers$1.projection], parameters));
47943
    };
47944
    // TemplateAstVisitor
47945
    TemplateDefinitionBuilder.prototype.visitElement = function (element) {
47946
        var _this = this;
47947
        var elementIndex = this.allocateDataSlot();
47948
        var referenceDataSlots = new Map();
47949
        var wasInI18nSection = this._inI18nSection;
47950
        var outputAttrs = {};
47951
        var attrI18nMetas = {};
47952
        var i18nMeta = '';
47953
        // Elements inside i18n sections are replaced with placeholders
47954
        // TODO(vicb): nested elements are a WIP in this phase
47955
        if (this._inI18nSection) {
47956
            var phName = element.name.toLowerCase();
47957
            if (!this._phToNodeIdxes[this._i18nSectionIndex][phName]) {
47958
                this._phToNodeIdxes[this._i18nSectionIndex][phName] = [];
47959
            }
47960
            this._phToNodeIdxes[this._i18nSectionIndex][phName].push(elementIndex);
47961
        }
47962
        try {
47963
            // Handle i18n attributes
47964
            for (var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(element.attrs), _b = _a.next(); !_b.done; _b = _a.next()) {
47965
                var attr = _b.value;
47966
                var name_1 = attr.name;
47967
                var value = attr.value;
47968
                if (name_1 === I18N_ATTR) {
47969
                    if (this._inI18nSection) {
47970
                        throw new Error("Could not mark an element as translatable inside of a translatable section");
47971
                    }
47972
                    this._inI18nSection = true;
47973
                    this._i18nSectionIndex++;
47974
                    this._phToNodeIdxes[this._i18nSectionIndex] = {};
47975
                    i18nMeta = value;
47976
                }
47977
                else if (name_1.startsWith(I18N_ATTR_PREFIX)) {
47978
                    attrI18nMetas[name_1.slice(I18N_ATTR_PREFIX.length)] = value;
47979
                }
47980
                else {
47981
                    outputAttrs[name_1] = value;
47982
                }
47983
            }
47984
        }
47985
        catch (e_4_1) { e_4 = { error: e_4_1 }; }
47986
        finally {
47987
            try {
47988
                if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
47989
            }
47990
            finally { if (e_4) throw e_4.error; }
47991
        }
47992
        // Element creation mode
47993
        var parameters = [
47994
            literal(elementIndex),
47995
            literal(element.name),
47996
        ];
47997
        element.directives.forEach(function (directive) { return _this.directives.add(directive.directive.type.reference); });
47998
        // Add the attributes
47999
        var i18nMessages = [];
48000
        var attributes = [];
48001
        var hasI18nAttr = false;
48002
        Object.getOwnPropertyNames(outputAttrs).forEach(function (name) {
48003
            var value = outputAttrs[name];
48004
            attributes.push(literal(name));
48005
            if (attrI18nMetas.hasOwnProperty(name)) {
48006
                hasI18nAttr = true;
48007
                var meta = parseI18nMeta(attrI18nMetas[name]);
48008
                var variable$$1 = _this.constantPool.getTranslation(value, meta);
48009
                attributes.push(variable$$1);
48010
            }
48011
            else {
48012
                attributes.push(literal(value));
48013
            }
48014
        });
48015
        var attrArg = TYPED_NULL_EXPR;
48016
        if (attributes.length > 0) {
48017
            attrArg = hasI18nAttr ? getLiteralFactory(this.outputCtx, literalArr(attributes)) :
48018
                this.constantPool.getConstLiteral(literalArr(attributes), true);
48019
        }
48020
        parameters.push(attrArg);
48021
        if (element.references && element.references.length > 0) {
48022
            var references = flatten(element.references.map(function (reference) {
48023
                var slot = _this.allocateDataSlot();
48024
                referenceDataSlots.set(reference.name, slot);
48025
                // Generate the update temporary.
48026
                var variableName = _this.bindingScope.freshReferenceName();
48027
                _this._variableMode.push(variable(variableName, INFERRED_TYPE)
48028
                    .set(importExpr(Identifiers$1.load).callFn([literal(slot)]))
48029
                    .toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]));
48030
                _this.bindingScope.set(reference.name, variable(variableName));
48031
                return [reference.name, reference.originalValue];
48032
            })).map(function (value) { return literal(value); });
48033
            parameters.push(this.constantPool.getConstLiteral(literalArr(references), /* forceShared */ true));
48034
        }
48035
        else {
48036
            parameters.push(TYPED_NULL_EXPR);
48037
        }
48038
        // Generate the instruction create element instruction
48039
        if (i18nMessages.length > 0) {
48040
            (_d = this._creationMode).push.apply(_d, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(i18nMessages));
48041
        }
48042
        this.instruction.apply(this, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([this._creationMode, element.sourceSpan, Identifiers$1.createElement], trimTrailingNulls(parameters)));
48043
        var implicit = variable(CONTEXT_NAME);
48044
        // Generate Listeners (outputs)
48045
        element.outputs.forEach(function (outputAst) {
48046
            var functionName = _this.templateName + "_" + element.name + "_" + outputAst.name + "_listener";
48047
            var localVars = [];
48048
            var bindingScope = _this.bindingScope.nestedScope(function (lhsVar, rhsExpression) {
48049
                localVars.push(lhsVar.set(rhsExpression).toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]));
48050
            });
48051
            var bindingExpr = convertActionBinding(bindingScope, variable(CONTEXT_NAME), outputAst.handler, 'b', function () { return error('Unexpected interpolation'); });
48052
            var handler = fn([new FnParam('$event', DYNAMIC_TYPE)], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(localVars, bindingExpr.render3Stmts), INFERRED_TYPE, null, functionName);
48053
            _this.instruction(_this._creationMode, outputAst.sourceSpan, Identifiers$1.listener, literal(outputAst.name), handler);
48054
        });
48055
        try {
48056
            // Generate element input bindings
48057
            for (var _e = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(element.inputs), _f = _e.next(); !_f.done; _f = _e.next()) {
48058
                var input = _f.value;
48059
                if (input.isAnimation) {
48060
                    this.unsupported('animations');
48061
                }
48062
                var convertedBinding = this.convertPropertyBinding(implicit, input.value);
48063
                var instruction = BINDING_INSTRUCTION_MAP[input.type];
48064
                if (instruction) {
48065
                    // TODO(chuckj): runtime: security context?
48066
                    this.instruction(this._bindingMode, input.sourceSpan, instruction, literal(elementIndex), literal(input.name), convertedBinding);
48067
                }
48068
                else {
48069
                    this.unsupported("binding " + PropertyBindingType[input.type]);
48070
                }
48071
            }
48072
        }
48073
        catch (e_5_1) { e_5 = { error: e_5_1 }; }
48074
        finally {
48075
            try {
48076
                if (_f && !_f.done && (_g = _e.return)) _g.call(_e);
48077
            }
48078
            finally { if (e_5) throw e_5.error; }
48079
        }
48080
        // Generate directives input bindings
48081
        this._visitDirectives(element.directives, implicit, elementIndex);
48082
        // Traverse element child nodes
48083
        if (this._inI18nSection && element.children.length == 1 &&
48084
            element.children[0] instanceof TextAst) {
48085
            var text = element.children[0];
48086
            this.visitSingleI18nTextChild(text, i18nMeta);
48087
        }
48088
        else {
48089
            templateVisitAll(this, element.children);
48090
        }
48091
        // Finish element construction mode.
48092
        this.instruction(this._creationMode, element.endSourceSpan || element.sourceSpan, Identifiers$1.elementEnd);
48093
        // Restore the state before exiting this node
48094
        this._inI18nSection = wasInI18nSection;
48095
        var e_4, _c, _d, e_5, _g;
48096
    };
48097
    TemplateDefinitionBuilder.prototype._visitDirectives = function (directives, implicit, nodeIndex) {
48098
        try {
48099
            for (var directives_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(directives), directives_1_1 = directives_1.next(); !directives_1_1.done; directives_1_1 = directives_1.next()) {
48100
                var directive = directives_1_1.value;
48101
                // Creation mode
48102
                // e.g. D(0, TodoComponentDef.n(), TodoComponentDef);
48103
                var directiveType = directive.directive.type.reference;
48104
                var kind = directive.directive.isComponent ? 2 /* Component */ : 1;
48105
                try {
48106
                    // Note: *do not cache* calls to this.directiveOf() as the constant pool needs to know if the
48107
                    // node is referenced multiple times to know that it must generate the reference into a
48108
                    // temporary.
48109
                    // Bindings
48110
                    for (var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(directive.inputs), _b = _a.next(); !_b.done; _b = _a.next()) {
48111
                        var input = _b.value;
48112
                        var convertedBinding = this.convertPropertyBinding(implicit, input.value);
48113
                        this.instruction(this._bindingMode, directive.sourceSpan, Identifiers$1.elementProperty, literal(nodeIndex), literal(input.templateName), importExpr(Identifiers$1.bind).callFn([convertedBinding]));
48114
                    }
48115
                }
48116
                catch (e_6_1) { e_6 = { error: e_6_1 }; }
48117
                finally {
48118
                    try {
48119
                        if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
48120
                    }
48121
                    finally { if (e_6) throw e_6.error; }
48122
                }
48123
            }
48124
        }
48125
        catch (e_7_1) { e_7 = { error: e_7_1 }; }
48126
        finally {
48127
            try {
48128
                if (directives_1_1 && !directives_1_1.done && (_d = directives_1.return)) _d.call(directives_1);
48129
            }
48130
            finally { if (e_7) throw e_7.error; }
48131
        }
48132
        var e_7, _d, e_6, _c;
48133
    };
48134
    // TemplateAstVisitor
48135
    TemplateDefinitionBuilder.prototype.visitEmbeddedTemplate = function (template) {
48136
        var _this = this;
48137
        var templateIndex = this.allocateDataSlot();
48138
        var templateRef = this.reflector.resolveExternalReference(Identifiers.TemplateRef);
48139
        var templateDirective = template.directives.find(function (directive) { return directive.directive.type.diDeps.some(function (dependency) {
48140
            return dependency.token != null && (tokenReference(dependency.token) == templateRef);
48141
        }); });
48142
        var contextName = this.contextName && templateDirective && templateDirective.directive.type.reference.name ?
48143
            this.contextName + "_" + templateDirective.directive.type.reference.name :
48144
            null;
48145
        var templateName = contextName ? contextName + "_Template_" + templateIndex : "Template_" + templateIndex;
48146
        var templateContext = "ctx" + this.level;
48147
        var parameters = [variable(templateName), literal(null, INFERRED_TYPE)];
48148
        var attributeNames = [];
48149
        template.directives.forEach(function (directiveAst) {
48150
            _this.directives.add(directiveAst.directive.type.reference);
48151
            CssSelector.parse(directiveAst.directive.selector).forEach(function (selector) {
48152
                selector.attrs.forEach(function (value) {
48153
                    // Convert '' (falsy) strings into `null`. This is needed because we want
48154
                    // to communicate to runtime that these attributes are present for
48155
                    // selector matching, but should not actually be added to the DOM.
48156
                    // attributeNames.push(o.literal(value ? value : null));
48157
                    // TODO(misko): make the above comment true, for now just write to DOM because
48158
                    // the runtime selectors have not been updated.
48159
                    attributeNames.push(literal(value));
48160
                });
48161
            });
48162
        });
48163
        if (attributeNames.length) {
48164
            parameters.push(this.constantPool.getConstLiteral(literalArr(attributeNames), /* forcedShared */ true));
48165
        }
48166
        // e.g. C(1, C1Template)
48167
        this.instruction.apply(this, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([this._creationMode, template.sourceSpan, Identifiers$1.containerCreate, literal(templateIndex)], trimTrailingNulls(parameters)));
48168
        // Generate directives
48169
        this._visitDirectives(template.directives, variable(CONTEXT_NAME), templateIndex);
48170
        // Create the template function
48171
        var templateVisitor = new TemplateDefinitionBuilder(this.outputCtx, this.constantPool, this.reflector, templateContext, this.bindingScope, this.level + 1, this.ngContentSelectors, contextName, templateName, this.pipeMap, [], this.directives, this.pipes);
48172
        var templateFunctionExpr = templateVisitor.buildTemplateFunction(template.children, template.variables);
48173
        this._postfix.push(templateFunctionExpr.toDeclStmt(templateName, null));
48174
    };
48175
    // TemplateAstVisitor
48176
    TemplateDefinitionBuilder.prototype.visitBoundText = function (text) {
48177
        var nodeIndex = this.allocateDataSlot();
48178
        // Creation mode
48179
        this.instruction(this._creationMode, text.sourceSpan, Identifiers$1.text, literal(nodeIndex));
48180
        this.instruction(this._bindingMode, text.sourceSpan, Identifiers$1.textCreateBound, literal(nodeIndex), this.convertPropertyBinding(variable(CONTEXT_NAME), text.value));
48181
    };
48182
    // TemplateAstVisitor
48183
    TemplateDefinitionBuilder.prototype.visitText = function (text) {
48184
        // Text is defined in creation mode only.
48185
        this.instruction(this._creationMode, text.sourceSpan, Identifiers$1.text, literal(this.allocateDataSlot()), literal(text.value));
48186
    };
48187
    // When the content of the element is a single text node the translation can be inlined:
48188
    //
48189
    // `<p i18n="desc|mean">some content</p>`
48190
    // compiles to
48191
    // ```
48192
    // /**
48193
    // * @desc desc
48194
    // * @meaning mean
48195
    // */
48196
    // const MSG_XYZ = goog.getMsg('some content');
48197
    // i0.ɵT(1, MSG_XYZ);
48198
    // ```
48199
    TemplateDefinitionBuilder.prototype.visitSingleI18nTextChild = function (text, i18nMeta) {
48200
        var meta = parseI18nMeta(i18nMeta);
48201
        var variable$$1 = this.constantPool.getTranslation(text.value, meta);
48202
        this.instruction(this._creationMode, text.sourceSpan, Identifiers$1.text, literal(this.allocateDataSlot()), variable$$1);
48203
    };
48204
    TemplateDefinitionBuilder.prototype.allocateDataSlot = function () { return this._dataIndex++; };
48205
    TemplateDefinitionBuilder.prototype.bindingContext = function () { return "" + this._bindingContext++; };
48206
    TemplateDefinitionBuilder.prototype.instruction = function (statements, span, reference) {
48207
        var params = [];
48208
        for (var _i = 3; _i < arguments.length; _i++) {
48209
            params[_i - 3] = arguments[_i];
48210
        }
48211
        statements.push(importExpr(reference, null, span).callFn(params, span).toStmt());
48212
    };
48213
    TemplateDefinitionBuilder.prototype.definitionOf = function (type, kind) {
48214
        return this.constantPool.getDefinition(type, kind, this.outputCtx);
48215
    };
48216
    TemplateDefinitionBuilder.prototype.temp = function () {
48217
        if (!this._temporaryAllocated) {
48218
            this._prefix.push(new DeclareVarStmt(TEMPORARY_NAME, undefined, DYNAMIC_TYPE));
48219
            this._temporaryAllocated = true;
48220
        }
48221
        return variable(TEMPORARY_NAME);
48222
    };
48223
    TemplateDefinitionBuilder.prototype.convertPropertyBinding = function (implicit, value) {
48224
        var pipesConvertedValue = value.visit(this._valueConverter);
48225
        var convertedPropertyBinding = convertPropertyBinding(this, implicit, pipesConvertedValue, this.bindingContext(), BindingForm.TrySimple, interpolate);
48226
        (_a = this._bindingMode).push.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(convertedPropertyBinding.stmts));
48227
        return convertedPropertyBinding.currValExpr;
48228
        var _a;
48229
    };
48230
    return TemplateDefinitionBuilder;
48231
}());
48232
function getQueryPredicate(query, outputCtx) {
48233
    if (query.selectors.length > 1 || (query.selectors.length == 1 && query.selectors[0].value)) {
48234
        var selectors = query.selectors.map(function (value) { return value.value; });
48235
        selectors.some(function (value) { return !value; }) && error('Found a type among the string selectors expected');
48236
        return outputCtx.constantPool.getConstLiteral(literalArr(selectors.map(function (value) { return literal(value); })));
48237
    }
48238
    if (query.selectors.length == 1) {
48239
        var first = query.selectors[0];
48240
        if (first.identifier) {
48241
            return outputCtx.importExpr(first.identifier.reference);
48242
        }
48243
    }
48244
    error('Unexpected query form');
48245
    return NULL_EXPR;
48246
}
48247
function createFactory(type, outputCtx, reflector, queries) {
48248
    var args = [];
48249
    var elementRef = reflector.resolveExternalReference(Identifiers.ElementRef);
48250
    var templateRef = reflector.resolveExternalReference(Identifiers.TemplateRef);
48251
    var viewContainerRef = reflector.resolveExternalReference(Identifiers.ViewContainerRef);
48252
    try {
48253
        for (var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(type.diDeps), _b = _a.next(); !_b.done; _b = _a.next()) {
48254
            var dependency = _b.value;
48255
            var token = dependency.token;
48256
            if (token) {
48257
                var tokenRef = tokenReference(token);
48258
                if (tokenRef === elementRef) {
48259
                    args.push(importExpr(Identifiers$1.injectElementRef).callFn([]));
48260
                }
48261
                else if (tokenRef === templateRef) {
48262
                    args.push(importExpr(Identifiers$1.injectTemplateRef).callFn([]));
48263
                }
48264
                else if (tokenRef === viewContainerRef) {
48265
                    args.push(importExpr(Identifiers$1.injectViewContainerRef).callFn([]));
48266
                }
48267
                else if (dependency.isAttribute) {
48268
                    args.push(importExpr(Identifiers$1.injectAttribute).callFn([literal(dependency.token.value)]));
48269
                }
48270
                else {
48271
                    var tokenValue = token.identifier != null ? outputCtx.importExpr(tokenRef) : literal(tokenRef);
48272
                    var directiveInjectArgs = [tokenValue];
48273
                    var flags = extractFlags(dependency);
48274
                    if (flags != 0 /* Default */) {
48275
                        // Append flag information if other than default.
48276
                        directiveInjectArgs.push(literal(flags));
48277
                    }
48278
                    args.push(importExpr(Identifiers$1.directiveInject).callFn(directiveInjectArgs));
48279
                }
48280
            }
48281
            else {
48282
                unsupported('dependency without a token');
48283
            }
48284
        }
48285
    }
48286
    catch (e_8_1) { e_8 = { error: e_8_1 }; }
48287
    finally {
48288
        try {
48289
            if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
48290
        }
48291
        finally { if (e_8) throw e_8.error; }
48292
    }
48293
    var queryDefinitions = [];
48294
    try {
48295
        for (var queries_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(queries), queries_1_1 = queries_1.next(); !queries_1_1.done; queries_1_1 = queries_1.next()) {
48296
            var query = queries_1_1.value;
48297
            var predicate = getQueryPredicate(query, outputCtx);
48298
            // e.g. r3.Q(null, somePredicate, false) or r3.Q(null, ['div'], false)
48299
            var parameters = [
48300
                /* memoryIndex */ literal(null, INFERRED_TYPE),
48301
                /* predicate */ predicate,
48302
                /* descend */ literal(query.descendants)
48303
            ];
48304
            if (query.read) {
48305
                parameters.push(outputCtx.importExpr(query.read.identifier.reference));
48306
            }
48307
            queryDefinitions.push(importExpr(Identifiers$1.query).callFn(parameters));
48308
        }
48309
    }
48310
    catch (e_9_1) { e_9 = { error: e_9_1 }; }
48311
    finally {
48312
        try {
48313
            if (queries_1_1 && !queries_1_1.done && (_d = queries_1.return)) _d.call(queries_1);
48314
        }
48315
        finally { if (e_9) throw e_9.error; }
48316
    }
48317
    var createInstance = new InstantiateExpr(outputCtx.importExpr(type.reference), args);
48318
    var result = queryDefinitions.length > 0 ? literalArr(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([createInstance], queryDefinitions)) :
48319
        createInstance;
48320
    return fn([], [new ReturnStatement(result)], INFERRED_TYPE, null, type.reference.name ? type.reference.name + "_Factory" : null);
48321
    var e_8, _c, e_9, _d;
48322
}
48323
function extractFlags(dependency) {
48324
    var flags = 0;
48325
    if (dependency.isHost) {
48326
        flags |= 1 /* Host */;
48327
    }
48328
    if (dependency.isOptional) {
48329
        flags |= 8 /* Optional */;
48330
    }
48331
    if (dependency.isSelf) {
48332
        flags |= 2 /* Self */;
48333
    }
48334
    if (dependency.isSkipSelf) {
48335
        flags |= 4 /* SkipSelf */;
48336
    }
48337
    if (dependency.isValue) {
48338
        unsupported('value dependencies');
48339
    }
48340
    return flags;
48341
}
48342
/**
48343
 *  Remove trailing null nodes as they are implied.
48344
 */
48345
function trimTrailingNulls(parameters) {
48346
    while (isNull(parameters[parameters.length - 1])) {
48347
        parameters.pop();
48348
    }
48349
    return parameters;
48350
}
48351
// Turn a directive selector into an R3-compatible selector for directive def
48352
function createDirectiveSelector(selector) {
48353
    return asLiteral(parseSelectorToR3Selector(selector));
48354
}
48355
function createHostAttributesArray(directiveMetadata, outputCtx) {
48356
    var values = [];
48357
    var attributes = directiveMetadata.hostAttributes;
48358
    try {
48359
        for (var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(Object.getOwnPropertyNames(attributes)), _b = _a.next(); !_b.done; _b = _a.next()) {
48360
            var key = _b.value;
48361
            var value = attributes[key];
48362
            values.push(literal(key), literal(value));
48363
        }
48364
    }
48365
    catch (e_10_1) { e_10 = { error: e_10_1 }; }
48366
    finally {
48367
        try {
48368
            if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
48369
        }
48370
        finally { if (e_10) throw e_10.error; }
48371
    }
48372
    if (values.length > 0) {
48373
        return outputCtx.constantPool.getConstLiteral(literalArr(values));
48374
    }
48375
    return null;
48376
    var e_10, _c;
48377
}
48378
// Return a host binding function or null if one is not necessary.
48379
function createHostBindingsFunction(directiveMetadata, outputCtx, bindingParser) {
48380
    var statements = [];
48381
    var temporary = function () {
48382
        var declared = false;
48383
        return function () {
48384
            if (!declared) {
48385
                statements.push(new DeclareVarStmt(TEMPORARY_NAME, undefined, DYNAMIC_TYPE));
48386
                declared = true;
48387
            }
48388
            return variable(TEMPORARY_NAME);
48389
        };
48390
    }();
48391
    var hostBindingSourceSpan = typeSourceSpan(directiveMetadata.isComponent ? 'Component' : 'Directive', directiveMetadata.type);
48392
    // Calculate the queries
48393
    for (var index = 0; index < directiveMetadata.queries.length; index++) {
48394
        var query = directiveMetadata.queries[index];
48395
        // e.g. r3.qR(tmp = r3.ld(dirIndex)[1]) && (r3.ld(dirIndex)[0].someDir = tmp);
48396
        var getDirectiveMemory = importExpr(Identifiers$1.load).callFn([variable('dirIndex')]);
48397
        // The query list is at the query index + 1 because the directive itself is in slot 0.
48398
        var getQueryList = getDirectiveMemory.key(literal(index + 1));
48399
        var assignToTemporary = temporary().set(getQueryList);
48400
        var callQueryRefresh = importExpr(Identifiers$1.queryRefresh).callFn([assignToTemporary]);
48401
        var updateDirective = getDirectiveMemory.key(literal(0, INFERRED_TYPE))
48402
            .prop(query.propertyName)
48403
            .set(query.first ? temporary().prop('first') : temporary());
48404
        var andExpression = callQueryRefresh.and(updateDirective);
48405
        statements.push(andExpression.toStmt());
48406
    }
48407
    var directiveSummary = directiveMetadata.toSummary();
48408
    // Calculate the host property bindings
48409
    var bindings = bindingParser.createBoundHostProperties(directiveSummary, hostBindingSourceSpan);
48410
    var bindingContext = importExpr(Identifiers$1.load).callFn([variable('dirIndex')]);
48411
    if (bindings) {
48412
        try {
48413
            for (var bindings_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(bindings), bindings_1_1 = bindings_1.next(); !bindings_1_1.done; bindings_1_1 = bindings_1.next()) {
48414
                var binding = bindings_1_1.value;
48415
                var bindingExpr = convertPropertyBinding(null, bindingContext, binding.expression, 'b', BindingForm.TrySimple, function () { return error('Unexpected interpolation'); });
48416
                statements.push.apply(statements, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(bindingExpr.stmts));
48417
                statements.push(importExpr(Identifiers$1.elementProperty)
48418
                    .callFn([
48419
                    variable('elIndex'), literal(binding.name),
48420
                    importExpr(Identifiers$1.bind).callFn([bindingExpr.currValExpr])
48421
                ])
48422
                    .toStmt());
48423
            }
48424
        }
48425
        catch (e_11_1) { e_11 = { error: e_11_1 }; }
48426
        finally {
48427
            try {
48428
                if (bindings_1_1 && !bindings_1_1.done && (_a = bindings_1.return)) _a.call(bindings_1);
48429
            }
48430
            finally { if (e_11) throw e_11.error; }
48431
        }
48432
    }
48433
    // Calculate host event bindings
48434
    var eventBindings = bindingParser.createDirectiveHostEventAsts(directiveSummary, hostBindingSourceSpan);
48435
    if (eventBindings) {
48436
        try {
48437
            for (var eventBindings_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(eventBindings), eventBindings_1_1 = eventBindings_1.next(); !eventBindings_1_1.done; eventBindings_1_1 = eventBindings_1.next()) {
48438
                var binding = eventBindings_1_1.value;
48439
                var bindingExpr = convertActionBinding(null, bindingContext, binding.handler, 'b', function () { return error('Unexpected interpolation'); });
48440
                var bindingName = binding.name && sanitizeIdentifier(binding.name);
48441
                var typeName = identifierName(directiveMetadata.type);
48442
                var functionName = typeName && bindingName ? typeName + "_" + bindingName + "_HostBindingHandler" : null;
48443
                var handler = fn([new FnParam('$event', DYNAMIC_TYPE)], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(bindingExpr.stmts, [new ReturnStatement(bindingExpr.allowDefault)]), INFERRED_TYPE, null, functionName);
48444
                statements.push(importExpr(Identifiers$1.listener).callFn([literal(binding.name), handler]).toStmt());
48445
            }
48446
        }
48447
        catch (e_12_1) { e_12 = { error: e_12_1 }; }
48448
        finally {
48449
            try {
48450
                if (eventBindings_1_1 && !eventBindings_1_1.done && (_b = eventBindings_1.return)) _b.call(eventBindings_1);
48451
            }
48452
            finally { if (e_12) throw e_12.error; }
48453
        }
48454
    }
48455
    if (statements.length > 0) {
48456
        var typeName = directiveMetadata.type.reference.name;
48457
        return fn([new FnParam('dirIndex', NUMBER_TYPE), new FnParam('elIndex', NUMBER_TYPE)], statements, INFERRED_TYPE, null, typeName ? typeName + "_HostBindings" : null);
48458
    }
48459
    return null;
48460
    var e_11, _a, e_12, _b;
48461
}
48462
function conditionallyCreateMapObjectLiteral(keys, outputCtx) {
48463
    if (Object.getOwnPropertyNames(keys).length > 0) {
48464
        return mapToExpression(keys);
48465
    }
48466
    return null;
48467
}
48468
var ValueConverter = /** @class */ (function (_super) {
48469
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ValueConverter, _super);
48470
    function ValueConverter(outputCtx, allocateSlot, definePipe) {
48471
        var _this = _super.call(this) || this;
48472
        _this.outputCtx = outputCtx;
48473
        _this.allocateSlot = allocateSlot;
48474
        _this.definePipe = definePipe;
48475
        _this.pipeSlots = new Map();
48476
        return _this;
48477
    }
48478
    // AstMemoryEfficientTransformer
48479
    ValueConverter.prototype.visitPipe = function (pipe, context) {
48480
        // Allocate a slot to create the pipe
48481
        var slot = this.allocateSlot();
48482
        var slotPseudoLocal = "PIPE:" + slot;
48483
        var target = new PropertyRead(pipe.span, new ImplicitReceiver(pipe.span), slotPseudoLocal);
48484
        var bindingId = pipeBinding(pipe.args);
48485
        this.definePipe(pipe.name, slotPseudoLocal, slot, importExpr(bindingId));
48486
        var value = pipe.exp.visit(this);
48487
        var args = this.visitAll(pipe.args);
48488
        return new FunctionCall(pipe.span, target, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([new LiteralPrimitive(pipe.span, slot), value], args));
48489
    };
48490
    ValueConverter.prototype.visitLiteralArray = function (array, context) {
48491
        var _this = this;
48492
        return new BuiltinFunctionCall(array.span, this.visitAll(array.expressions), function (values) {
48493
            // If the literal has calculated (non-literal) elements transform it into
48494
            // calls to literal factories that compose the literal and will cache intermediate
48495
            // values. Otherwise, just return an literal array that contains the values.
48496
            var literal$$1 = literalArr(values);
48497
            return values.every(function (a) { return a.isConstant(); }) ?
48498
                _this.outputCtx.constantPool.getConstLiteral(literal$$1, true) :
48499
                getLiteralFactory(_this.outputCtx, literal$$1);
48500
        });
48501
    };
48502
    ValueConverter.prototype.visitLiteralMap = function (map, context) {
48503
        var _this = this;
48504
        return new BuiltinFunctionCall(map.span, this.visitAll(map.values), function (values) {
48505
            // If the literal has calculated (non-literal) elements  transform it into
48506
            // calls to literal factories that compose the literal and will cache intermediate
48507
            // values. Otherwise, just return an literal array that contains the values.
48508
            var literal$$1 = literalMap(values.map(function (value, index) { return ({ key: map.keys[index].key, value: value, quoted: map.keys[index].quoted }); }));
48509
            return values.every(function (a) { return a.isConstant(); }) ?
48510
                _this.outputCtx.constantPool.getConstLiteral(literal$$1, true) :
48511
                getLiteralFactory(_this.outputCtx, literal$$1);
48512
        });
48513
    };
48514
    return ValueConverter;
48515
}(AstMemoryEfficientTransformer));
48516
function invalid$1(arg) {
48517
    throw new Error("Invalid state: Visitor " + this.constructor.name + " doesn't handle " + undefined);
48518
}
48519
var ContentProjectionVisitor = /** @class */ (function (_super) {
48520
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ContentProjectionVisitor, _super);
48521
    function ContentProjectionVisitor(projectionMap, ngContentSelectors) {
48522
        var _this = _super.call(this) || this;
48523
        _this.projectionMap = projectionMap;
48524
        _this.ngContentSelectors = ngContentSelectors;
48525
        _this.index = 1;
48526
        return _this;
48527
    }
48528
    ContentProjectionVisitor.prototype.visitNgContent = function (ngContent) {
48529
        var selector = this.ngContentSelectors[ngContent.index];
48530
        if (selector == null) {
48531
            error("could not find selector for index " + ngContent.index + " in " + ngContent);
48532
        }
48533
        if (!selector || selector === '*') {
48534
            this.projectionMap.set(ngContent, { index: 0 });
48535
        }
48536
        else {
48537
            this.projectionMap.set(ngContent, { index: this.index++, selector: selector });
48538
        }
48539
    };
48540
    return ContentProjectionVisitor;
48541
}(RecursiveTemplateAstVisitor));
48542
function getContentProjection(nodes, ngContentSelectors) {
48543
    var projectIndexMap = new Map();
48544
    var visitor = new ContentProjectionVisitor(projectIndexMap, ngContentSelectors);
48545
    templateVisitAll(visitor, nodes);
48546
    return projectIndexMap;
48547
}
48548
function parserSelectorToSimpleSelector(selector) {
48549
    var classes = selector.classNames && selector.classNames.length ? Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([8 /* CLASS */], selector.classNames) :
48550
        [];
48551
    var elementName = selector.element && selector.element !== '*' ? selector.element : '';
48552
    return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([elementName], selector.attrs, classes);
48553
}
48554
function parserSelectorToNegativeSelector(selector) {
48555
    var classes = selector.classNames && selector.classNames.length ? Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([8 /* CLASS */], selector.classNames) :
48556
        [];
48557
    if (selector.element) {
48558
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([
48559
            1 /* NOT */ | 4 /* ELEMENT */, selector.element
48560
        ], selector.attrs, classes);
48561
    }
48562
    else if (selector.attrs.length) {
48563
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([1 /* NOT */ | 2 /* ATTRIBUTE */], selector.attrs, classes);
48564
    }
48565
    else {
48566
        return selector.classNames && selector.classNames.length ? Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([1 /* NOT */ | 8 /* CLASS */], selector.classNames) :
48567
            [];
48568
    }
48569
}
48570
function parserSelectorToR3Selector(selector) {
48571
    var positive = parserSelectorToSimpleSelector(selector);
48572
    var negative = selector.notSelectors && selector.notSelectors.length ?
48573
        selector.notSelectors.map(function (notSelector) { return parserSelectorToNegativeSelector(notSelector); }) :
48574
        [];
48575
    return positive.concat.apply(positive, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(negative));
48576
}
48577
function parseSelectorToR3Selector(selector) {
48578
    var selectors = CssSelector.parse(selector);
48579
    return selectors.map(parserSelectorToR3Selector);
48580
}
48581
function asLiteral(value) {
48582
    if (Array.isArray(value)) {
48583
        return literalArr(value.map(asLiteral));
48584
    }
48585
    return literal(value, INFERRED_TYPE);
48586
}
48587
function mapToExpression(map, quoted) {
48588
    if (quoted === void 0) { quoted = false; }
48589
    return literalMap(Object.getOwnPropertyNames(map).map(function (key) { return ({ key: key, quoted: quoted, value: asLiteral(map[key]) }); }));
48590
}
48591
// Parse i18n metas like:
48592
// - "@@id",
48593
// - "description[@@id]",
48594
// - "meaning|description[@@id]"
48595
function parseI18nMeta(i18n) {
48596
    var meaning;
48597
    var description;
48598
    var id;
48599
    if (i18n) {
48600
        // TODO(vicb): figure out how to force a message ID with closure ?
48601
        var idIndex = i18n.indexOf(ID_SEPARATOR$1);
48602
        var descIndex = i18n.indexOf(MEANING_SEPARATOR$1);
48603
        var meaningAndDesc = void 0;
48604
        _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])((idIndex > -1) ? [i18n.slice(0, idIndex), i18n.slice(idIndex + 2)] : [i18n, ''], 2), meaningAndDesc = _a[0], id = _a[1];
48605
        _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])((descIndex > -1) ?
48606
            [meaningAndDesc.slice(0, descIndex), meaningAndDesc.slice(descIndex + 1)] :
48607
            ['', meaningAndDesc], 2), meaning = _b[0], description = _b[1];
48608
    }
48609
    return { description: description, id: id, meaning: meaning };
48610
    var _a, _b;
48611
}
48612
var _a;
48613
 
48614
/**
48615
 * @license
48616
 * Copyright Google Inc. All Rights Reserved.
48617
 *
48618
 * Use of this source code is governed by an MIT-style license that can be
48619
 * found in the LICENSE file at https://angular.io/license
48620
 */
48621
/**
48622
 * Write a pipe definition to the output context.
48623
 */
48624
function compilePipe(outputCtx, pipe, reflector, mode) {
48625
    var definitionMapValues = [];
48626
    // e.g. `name: 'myPipe'`
48627
    definitionMapValues.push({ key: 'name', value: literal(pipe.name), quoted: false });
48628
    // e.g. `type: MyPipe`
48629
    definitionMapValues.push({ key: 'type', value: outputCtx.importExpr(pipe.type.reference), quoted: false });
48630
    // e.g. factory: function MyPipe_Factory() { return new MyPipe(); },
48631
    var templateFactory = createFactory(pipe.type, outputCtx, reflector, []);
48632
    definitionMapValues.push({ key: 'factory', value: templateFactory, quoted: false });
48633
    // e.g. pure: true
48634
    if (pipe.pure) {
48635
        definitionMapValues.push({ key: 'pure', value: literal(true), quoted: false });
48636
    }
48637
    var className = identifierName(pipe.type);
48638
    className || error("Cannot resolve the name of " + pipe.type);
48639
    var definitionField = outputCtx.constantPool.propertyNameOf(3 /* Pipe */);
48640
    var definitionFunction = importExpr(Identifiers$1.definePipe).callFn([literalMap(definitionMapValues)]);
48641
    if (mode === 0 /* PartialClass */) {
48642
        outputCtx.statements.push(new ClassStmt(
48643
        /* name */ className,
48644
        /* parent */ null,
48645
        /* fields */ [new ClassField(
48646
            /* name */ definitionField,
48647
            /* type */ INFERRED_TYPE,
48648
            /* modifiers */ [StmtModifier.Static],
48649
            /* initializer */ definitionFunction)],
48650
        /* getters */ [],
48651
        /* constructorMethod */ new ClassMethod(null, [], []),
48652
        /* methods */ []));
48653
    }
48654
    else {
48655
        // Create back-patch definition.
48656
        var classReference = outputCtx.importExpr(pipe.type.reference);
48657
        // Create the back-patch statement
48658
        outputCtx.statements.push(new CommentStmt(BUILD_OPTIMIZER_COLOCATE), classReference.prop(definitionField).set(definitionFunction).toStmt());
48659
    }
48660
}
48661
 
48662
/**
48663
 * @license
48664
 * Copyright Google Inc. All Rights Reserved.
48665
 *
48666
 * Use of this source code is governed by an MIT-style license that can be
48667
 * found in the LICENSE file at https://angular.io/license
48668
 */
48669
var GeneratedFile = /** @class */ (function () {
48670
    function GeneratedFile(srcFileUrl, genFileUrl, sourceOrStmts) {
48671
        this.srcFileUrl = srcFileUrl;
48672
        this.genFileUrl = genFileUrl;
48673
        if (typeof sourceOrStmts === 'string') {
48674
            this.source = sourceOrStmts;
48675
            this.stmts = null;
48676
        }
48677
        else {
48678
            this.source = null;
48679
            this.stmts = sourceOrStmts;
48680
        }
48681
    }
48682
    GeneratedFile.prototype.isEquivalent = function (other) {
48683
        if (this.genFileUrl !== other.genFileUrl) {
48684
            return false;
48685
        }
48686
        if (this.source) {
48687
            return this.source === other.source;
48688
        }
48689
        if (other.stmts == null) {
48690
            return false;
48691
        }
48692
        // Note: the constructor guarantees that if this.source is not filled,
48693
        // then this.stmts is.
48694
        return areAllEquivalent(this.stmts, other.stmts);
48695
    };
48696
    return GeneratedFile;
48697
}());
48698
function toTypeScript(file, preamble) {
48699
    if (preamble === void 0) { preamble = ''; }
48700
    if (!file.stmts) {
48701
        throw new Error("Illegal state: No stmts present on GeneratedFile " + file.genFileUrl);
48702
    }
48703
    return new TypeScriptEmitter().emitStatements(file.genFileUrl, file.stmts, preamble);
48704
}
48705
 
48706
/**
48707
 * @license
48708
 * Copyright Google Inc. All Rights Reserved.
48709
 *
48710
 * Use of this source code is governed by an MIT-style license that can be
48711
 * found in the LICENSE file at https://angular.io/license
48712
 */
48713
function listLazyRoutes(moduleMeta, reflector) {
48714
    var allLazyRoutes = [];
48715
    try {
48716
        for (var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(moduleMeta.transitiveModule.providers), _b = _a.next(); !_b.done; _b = _a.next()) {
48717
            var _c = _b.value, provider = _c.provider, module = _c.module;
48718
            if (tokenReference(provider.token) === reflector.ROUTES) {
48719
                var loadChildren = _collectLoadChildren(provider.useValue);
48720
                try {
48721
                    for (var loadChildren_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(loadChildren), loadChildren_1_1 = loadChildren_1.next(); !loadChildren_1_1.done; loadChildren_1_1 = loadChildren_1.next()) {
48722
                        var route = loadChildren_1_1.value;
48723
                        allLazyRoutes.push(parseLazyRoute(route, reflector, module.reference));
48724
                    }
48725
                }
48726
                catch (e_1_1) { e_1 = { error: e_1_1 }; }
48727
                finally {
48728
                    try {
48729
                        if (loadChildren_1_1 && !loadChildren_1_1.done && (_d = loadChildren_1.return)) _d.call(loadChildren_1);
48730
                    }
48731
                    finally { if (e_1) throw e_1.error; }
48732
                }
48733
            }
48734
        }
48735
    }
48736
    catch (e_2_1) { e_2 = { error: e_2_1 }; }
48737
    finally {
48738
        try {
48739
            if (_b && !_b.done && (_e = _a.return)) _e.call(_a);
48740
        }
48741
        finally { if (e_2) throw e_2.error; }
48742
    }
48743
    return allLazyRoutes;
48744
    var e_2, _e, e_1, _d;
48745
}
48746
function _collectLoadChildren(routes, target) {
48747
    if (target === void 0) { target = []; }
48748
    if (typeof routes === 'string') {
48749
        target.push(routes);
48750
    }
48751
    else if (Array.isArray(routes)) {
48752
        try {
48753
            for (var routes_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(routes), routes_1_1 = routes_1.next(); !routes_1_1.done; routes_1_1 = routes_1.next()) {
48754
                var route = routes_1_1.value;
48755
                _collectLoadChildren(route, target);
48756
            }
48757
        }
48758
        catch (e_3_1) { e_3 = { error: e_3_1 }; }
48759
        finally {
48760
            try {
48761
                if (routes_1_1 && !routes_1_1.done && (_a = routes_1.return)) _a.call(routes_1);
48762
            }
48763
            finally { if (e_3) throw e_3.error; }
48764
        }
48765
    }
48766
    else if (routes.loadChildren) {
48767
        _collectLoadChildren(routes.loadChildren, target);
48768
    }
48769
    else if (routes.children) {
48770
        _collectLoadChildren(routes.children, target);
48771
    }
48772
    return target;
48773
    var e_3, _a;
48774
}
48775
function parseLazyRoute(route, reflector, module) {
48776
    var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(route.split('#'), 2), routePath = _a[0], routeName = _a[1];
48777
    var referencedModule = reflector.resolveExternalReference({
48778
        moduleName: routePath,
48779
        name: routeName,
48780
    }, module ? module.filePath : undefined);
48781
    return { route: route, module: module || referencedModule, referencedModule: referencedModule };
48782
}
48783
 
48784
/**
48785
 * @license
48786
 * Copyright Google Inc. All Rights Reserved.
48787
 *
48788
 * Use of this source code is governed by an MIT-style license that can be
48789
 * found in the LICENSE file at https://angular.io/license
48790
 */
48791
var TS = /^(?!.*\.d\.ts$).*\.ts$/;
48792
var ResolvedStaticSymbol = /** @class */ (function () {
48793
    function ResolvedStaticSymbol(symbol, metadata) {
48794
        this.symbol = symbol;
48795
        this.metadata = metadata;
48796
    }
48797
    return ResolvedStaticSymbol;
48798
}());
48799
var SUPPORTED_SCHEMA_VERSION = 4;
48800
/**
48801
 * This class is responsible for loading metadata per symbol,
48802
 * and normalizing references between symbols.
48803
 *
48804
 * Internally, it only uses symbols without members,
48805
 * and deduces the values for symbols with members based
48806
 * on these symbols.
48807
 */
48808
var StaticSymbolResolver = /** @class */ (function () {
48809
    function StaticSymbolResolver(host, staticSymbolCache, summaryResolver, errorRecorder) {
48810
        this.host = host;
48811
        this.staticSymbolCache = staticSymbolCache;
48812
        this.summaryResolver = summaryResolver;
48813
        this.errorRecorder = errorRecorder;
48814
        this.metadataCache = new Map();
48815
        // Note: this will only contain StaticSymbols without members!
48816
        this.resolvedSymbols = new Map();
48817
        this.resolvedFilePaths = new Set();
48818
        // Note: this will only contain StaticSymbols without members!
48819
        this.importAs = new Map();
48820
        this.symbolResourcePaths = new Map();
48821
        this.symbolFromFile = new Map();
48822
        this.knownFileNameToModuleNames = new Map();
48823
    }
48824
    StaticSymbolResolver.prototype.resolveSymbol = function (staticSymbol) {
48825
        if (staticSymbol.members.length > 0) {
48826
            return this._resolveSymbolMembers(staticSymbol);
48827
        }
48828
        // Note: always ask for a summary first,
48829
        // as we might have read shallow metadata via a .d.ts file
48830
        // for the symbol.
48831
        var resultFromSummary = this._resolveSymbolFromSummary(staticSymbol);
48832
        if (resultFromSummary) {
48833
            return resultFromSummary;
48834
        }
48835
        var resultFromCache = this.resolvedSymbols.get(staticSymbol);
48836
        if (resultFromCache) {
48837
            return resultFromCache;
48838
        }
48839
        // Note: Some users use libraries that were not compiled with ngc, i.e. they don't
48840
        // have summaries, only .d.ts files. So we always need to check both, the summary
48841
        // and metadata.
48842
        this._createSymbolsOf(staticSymbol.filePath);
48843
        return this.resolvedSymbols.get(staticSymbol);
48844
    };
48845
    /**
48846
     * getImportAs produces a symbol that can be used to import the given symbol.
48847
     * The import might be different than the symbol if the symbol is exported from
48848
     * a library with a summary; in which case we want to import the symbol from the
48849
     * ngfactory re-export instead of directly to avoid introducing a direct dependency
48850
     * on an otherwise indirect dependency.
48851
     *
48852
     * @param staticSymbol the symbol for which to generate a import symbol
48853
     */
48854
    StaticSymbolResolver.prototype.getImportAs = function (staticSymbol, useSummaries) {
48855
        if (useSummaries === void 0) { useSummaries = true; }
48856
        if (staticSymbol.members.length) {
48857
            var baseSymbol = this.getStaticSymbol(staticSymbol.filePath, staticSymbol.name);
48858
            var baseImportAs = this.getImportAs(baseSymbol, useSummaries);
48859
            return baseImportAs ?
48860
                this.getStaticSymbol(baseImportAs.filePath, baseImportAs.name, staticSymbol.members) :
48861
                null;
48862
        }
48863
        var summarizedFileName = stripSummaryForJitFileSuffix(staticSymbol.filePath);
48864
        if (summarizedFileName !== staticSymbol.filePath) {
48865
            var summarizedName = stripSummaryForJitNameSuffix(staticSymbol.name);
48866
            var baseSymbol = this.getStaticSymbol(summarizedFileName, summarizedName, staticSymbol.members);
48867
            var baseImportAs = this.getImportAs(baseSymbol, useSummaries);
48868
            return baseImportAs ?
48869
                this.getStaticSymbol(summaryForJitFileName(baseImportAs.filePath), summaryForJitName(baseImportAs.name), baseSymbol.members) :
48870
                null;
48871
        }
48872
        var result = (useSummaries && this.summaryResolver.getImportAs(staticSymbol)) || null;
48873
        if (!result) {
48874
            result = this.importAs.get(staticSymbol);
48875
        }
48876
        return result;
48877
    };
48878
    /**
48879
     * getResourcePath produces the path to the original location of the symbol and should
48880
     * be used to determine the relative location of resource references recorded in
48881
     * symbol metadata.
48882
     */
48883
    StaticSymbolResolver.prototype.getResourcePath = function (staticSymbol) {
48884
        return this.symbolResourcePaths.get(staticSymbol) || staticSymbol.filePath;
48885
    };
48886
    /**
48887
     * getTypeArity returns the number of generic type parameters the given symbol
48888
     * has. If the symbol is not a type the result is null.
48889
     */
48890
    StaticSymbolResolver.prototype.getTypeArity = function (staticSymbol) {
48891
        // If the file is a factory/ngsummary file, don't resolve the symbol as doing so would
48892
        // cause the metadata for an factory/ngsummary file to be loaded which doesn't exist.
48893
        // All references to generated classes must include the correct arity whenever
48894
        // generating code.
48895
        if (isGeneratedFile(staticSymbol.filePath)) {
48896
            return null;
48897
        }
48898
        var resolvedSymbol = unwrapResolvedMetadata(this.resolveSymbol(staticSymbol));
48899
        while (resolvedSymbol && resolvedSymbol.metadata instanceof StaticSymbol) {
48900
            resolvedSymbol = unwrapResolvedMetadata(this.resolveSymbol(resolvedSymbol.metadata));
48901
        }
48902
        return (resolvedSymbol && resolvedSymbol.metadata && resolvedSymbol.metadata.arity) || null;
48903
    };
48904
    StaticSymbolResolver.prototype.getKnownModuleName = function (filePath) {
48905
        return this.knownFileNameToModuleNames.get(filePath) || null;
48906
    };
48907
    StaticSymbolResolver.prototype.recordImportAs = function (sourceSymbol, targetSymbol) {
48908
        sourceSymbol.assertNoMembers();
48909
        targetSymbol.assertNoMembers();
48910
        this.importAs.set(sourceSymbol, targetSymbol);
48911
    };
48912
    StaticSymbolResolver.prototype.recordModuleNameForFileName = function (fileName, moduleName) {
48913
        this.knownFileNameToModuleNames.set(fileName, moduleName);
48914
    };
48915
    /**
48916
     * Invalidate all information derived from the given file.
48917
     *
48918
     * @param fileName the file to invalidate
48919
     */
48920
    StaticSymbolResolver.prototype.invalidateFile = function (fileName) {
48921
        this.metadataCache.delete(fileName);
48922
        this.resolvedFilePaths.delete(fileName);
48923
        var symbols = this.symbolFromFile.get(fileName);
48924
        if (symbols) {
48925
            this.symbolFromFile.delete(fileName);
48926
            try {
48927
                for (var symbols_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(symbols), symbols_1_1 = symbols_1.next(); !symbols_1_1.done; symbols_1_1 = symbols_1.next()) {
48928
                    var symbol = symbols_1_1.value;
48929
                    this.resolvedSymbols.delete(symbol);
48930
                    this.importAs.delete(symbol);
48931
                    this.symbolResourcePaths.delete(symbol);
48932
                }
48933
            }
48934
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
48935
            finally {
48936
                try {
48937
                    if (symbols_1_1 && !symbols_1_1.done && (_a = symbols_1.return)) _a.call(symbols_1);
48938
                }
48939
                finally { if (e_1) throw e_1.error; }
48940
            }
48941
        }
48942
        var e_1, _a;
48943
    };
48944
    /* @internal */
48945
    StaticSymbolResolver.prototype.ignoreErrorsFor = function (cb) {
48946
        var recorder = this.errorRecorder;
48947
        this.errorRecorder = function () { };
48948
        try {
48949
            return cb();
48950
        }
48951
        finally {
48952
            this.errorRecorder = recorder;
48953
        }
48954
    };
48955
    StaticSymbolResolver.prototype._resolveSymbolMembers = function (staticSymbol) {
48956
        var members = staticSymbol.members;
48957
        var baseResolvedSymbol = this.resolveSymbol(this.getStaticSymbol(staticSymbol.filePath, staticSymbol.name));
48958
        if (!baseResolvedSymbol) {
48959
            return null;
48960
        }
48961
        var baseMetadata = unwrapResolvedMetadata(baseResolvedSymbol.metadata);
48962
        if (baseMetadata instanceof StaticSymbol) {
48963
            return new ResolvedStaticSymbol(staticSymbol, this.getStaticSymbol(baseMetadata.filePath, baseMetadata.name, members));
48964
        }
48965
        else if (baseMetadata && baseMetadata.__symbolic === 'class') {
48966
            if (baseMetadata.statics && members.length === 1) {
48967
                return new ResolvedStaticSymbol(staticSymbol, baseMetadata.statics[members[0]]);
48968
            }
48969
        }
48970
        else {
48971
            var value = baseMetadata;
48972
            for (var i = 0; i < members.length && value; i++) {
48973
                value = value[members[i]];
48974
            }
48975
            return new ResolvedStaticSymbol(staticSymbol, value);
48976
        }
48977
        return null;
48978
    };
48979
    StaticSymbolResolver.prototype._resolveSymbolFromSummary = function (staticSymbol) {
48980
        var summary = this.summaryResolver.resolveSummary(staticSymbol);
48981
        return summary ? new ResolvedStaticSymbol(staticSymbol, summary.metadata) : null;
48982
    };
48983
    /**
48984
     * getStaticSymbol produces a Type whose metadata is known but whose implementation is not loaded.
48985
     * All types passed to the StaticResolver should be pseudo-types returned by this method.
48986
     *
48987
     * @param declarationFile the absolute path of the file where the symbol is declared
48988
     * @param name the name of the type.
48989
     * @param members a symbol for a static member of the named type
48990
     */
48991
    StaticSymbolResolver.prototype.getStaticSymbol = function (declarationFile, name, members) {
48992
        return this.staticSymbolCache.get(declarationFile, name, members);
48993
    };
48994
    /**
48995
     * hasDecorators checks a file's metadata for the presence of decorators without evaluating the
48996
     * metadata.
48997
     *
48998
     * @param filePath the absolute path to examine for decorators.
48999
     * @returns true if any class in the file has a decorator.
49000
     */
49001
    StaticSymbolResolver.prototype.hasDecorators = function (filePath) {
49002
        var metadata = this.getModuleMetadata(filePath);
49003
        if (metadata['metadata']) {
49004
            return Object.keys(metadata['metadata']).some(function (metadataKey) {
49005
                var entry = metadata['metadata'][metadataKey];
49006
                return entry && entry.__symbolic === 'class' && entry.decorators;
49007
            });
49008
        }
49009
        return false;
49010
    };
49011
    StaticSymbolResolver.prototype.getSymbolsOf = function (filePath) {
49012
        var summarySymbols = this.summaryResolver.getSymbolsOf(filePath);
49013
        if (summarySymbols) {
49014
            return summarySymbols;
49015
        }
49016
        // Note: Some users use libraries that were not compiled with ngc, i.e. they don't
49017
        // have summaries, only .d.ts files, but `summaryResolver.isLibraryFile` returns true.
49018
        this._createSymbolsOf(filePath);
49019
        var metadataSymbols = [];
49020
        this.resolvedSymbols.forEach(function (resolvedSymbol) {
49021
            if (resolvedSymbol.symbol.filePath === filePath) {
49022
                metadataSymbols.push(resolvedSymbol.symbol);
49023
            }
49024
        });
49025
        return metadataSymbols;
49026
    };
49027
    StaticSymbolResolver.prototype._createSymbolsOf = function (filePath) {
49028
        var _this = this;
49029
        if (this.resolvedFilePaths.has(filePath)) {
49030
            return;
49031
        }
49032
        this.resolvedFilePaths.add(filePath);
49033
        var resolvedSymbols = [];
49034
        var metadata = this.getModuleMetadata(filePath);
49035
        if (metadata['importAs']) {
49036
            // Index bundle indices should use the importAs module name defined
49037
            // in the bundle.
49038
            this.knownFileNameToModuleNames.set(filePath, metadata['importAs']);
49039
        }
49040
        // handle the symbols in one of the re-export location
49041
        if (metadata['exports']) {
49042
            var _loop_1 = function (moduleExport) {
49043
                // handle the symbols in the list of explicitly re-exported symbols.
49044
                if (moduleExport.export) {
49045
                    moduleExport.export.forEach(function (exportSymbol) {
49046
                        var symbolName;
49047
                        if (typeof exportSymbol === 'string') {
49048
                            symbolName = exportSymbol;
49049
                        }
49050
                        else {
49051
                            symbolName = exportSymbol.as;
49052
                        }
49053
                        symbolName = unescapeIdentifier(symbolName);
49054
                        var symName = symbolName;
49055
                        if (typeof exportSymbol !== 'string') {
49056
                            symName = unescapeIdentifier(exportSymbol.name);
49057
                        }
49058
                        var resolvedModule = _this.resolveModule(moduleExport.from, filePath);
49059
                        if (resolvedModule) {
49060
                            var targetSymbol = _this.getStaticSymbol(resolvedModule, symName);
49061
                            var sourceSymbol = _this.getStaticSymbol(filePath, symbolName);
49062
                            resolvedSymbols.push(_this.createExport(sourceSymbol, targetSymbol));
49063
                        }
49064
                    });
49065
                }
49066
                else {
49067
                    // handle the symbols via export * directives.
49068
                    var resolvedModule = this_1.resolveModule(moduleExport.from, filePath);
49069
                    if (resolvedModule) {
49070
                        var nestedExports = this_1.getSymbolsOf(resolvedModule);
49071
                        nestedExports.forEach(function (targetSymbol) {
49072
                            var sourceSymbol = _this.getStaticSymbol(filePath, targetSymbol.name);
49073
                            resolvedSymbols.push(_this.createExport(sourceSymbol, targetSymbol));
49074
                        });
49075
                    }
49076
                }
49077
            };
49078
            var this_1 = this;
49079
            try {
49080
                for (var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(metadata['exports']), _b = _a.next(); !_b.done; _b = _a.next()) {
49081
                    var moduleExport = _b.value;
49082
                    _loop_1(moduleExport);
49083
                }
49084
            }
49085
            catch (e_2_1) { e_2 = { error: e_2_1 }; }
49086
            finally {
49087
                try {
49088
                    if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
49089
                }
49090
                finally { if (e_2) throw e_2.error; }
49091
            }
49092
        }
49093
        // handle the actual metadata. Has to be after the exports
49094
        // as there migth be collisions in the names, and we want the symbols
49095
        // of the current module to win ofter reexports.
49096
        if (metadata['metadata']) {
49097
            // handle direct declarations of the symbol
49098
            var topLevelSymbolNames_1 = new Set(Object.keys(metadata['metadata']).map(unescapeIdentifier));
49099
            var origins_1 = metadata['origins'] || {};
49100
            Object.keys(metadata['metadata']).forEach(function (metadataKey) {
49101
                var symbolMeta = metadata['metadata'][metadataKey];
49102
                var name = unescapeIdentifier(metadataKey);
49103
                var symbol = _this.getStaticSymbol(filePath, name);
49104
                var origin = origins_1.hasOwnProperty(metadataKey) && origins_1[metadataKey];
49105
                if (origin) {
49106
                    // If the symbol is from a bundled index, use the declaration location of the
49107
                    // symbol so relative references (such as './my.html') will be calculated
49108
                    // correctly.
49109
                    var originFilePath = _this.resolveModule(origin, filePath);
49110
                    if (!originFilePath) {
49111
                        _this.reportError(new Error("Couldn't resolve original symbol for " + origin + " from " + filePath));
49112
                    }
49113
                    else {
49114
                        _this.symbolResourcePaths.set(symbol, originFilePath);
49115
                    }
49116
                }
49117
                resolvedSymbols.push(_this.createResolvedSymbol(symbol, filePath, topLevelSymbolNames_1, symbolMeta));
49118
            });
49119
        }
49120
        resolvedSymbols.forEach(function (resolvedSymbol) { return _this.resolvedSymbols.set(resolvedSymbol.symbol, resolvedSymbol); });
49121
        this.symbolFromFile.set(filePath, resolvedSymbols.map(function (resolvedSymbol) { return resolvedSymbol.symbol; }));
49122
        var e_2, _c;
49123
    };
49124
    StaticSymbolResolver.prototype.createResolvedSymbol = function (sourceSymbol, topLevelPath, topLevelSymbolNames, metadata) {
49125
        var _this = this;
49126
        // For classes that don't have Angular summaries / metadata,
49127
        // we only keep their arity, but nothing else
49128
        // (e.g. their constructor parameters).
49129
        // We do this to prevent introducing deep imports
49130
        // as we didn't generate .ngfactory.ts files with proper reexports.
49131
        var isTsFile = TS.test(sourceSymbol.filePath);
49132
        if (this.summaryResolver.isLibraryFile(sourceSymbol.filePath) && !isTsFile && metadata &&
49133
            metadata['__symbolic'] === 'class') {
49134
            var transformedMeta_1 = { __symbolic: 'class', arity: metadata.arity };
49135
            return new ResolvedStaticSymbol(sourceSymbol, transformedMeta_1);
49136
        }
49137
        var _originalFileMemo;
49138
        var getOriginalName = function () {
49139
            if (!_originalFileMemo) {
49140
                // Guess what hte original file name is from the reference. If it has a `.d.ts` extension
49141
                // replace it with `.ts`. If it already has `.ts` just leave it in place. If it doesn't have
49142
                // .ts or .d.ts, append `.ts'. Also, if it is in `node_modules`, trim the `node_module`
49143
                // location as it is not important to finding the file.
49144
                _originalFileMemo =
49145
                    _this.host.getOutputName(topLevelPath.replace(/((\.ts)|(\.d\.ts)|)$/, '.ts')
49146
                        .replace(/^.*node_modules[/\\]/, ''));
49147
            }
49148
            return _originalFileMemo;
49149
        };
49150
        var self = this;
49151
        var ReferenceTransformer = /** @class */ (function (_super) {
49152
            Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ReferenceTransformer, _super);
49153
            function ReferenceTransformer() {
49154
                return _super !== null && _super.apply(this, arguments) || this;
49155
            }
49156
            ReferenceTransformer.prototype.visitStringMap = function (map, functionParams) {
49157
                var symbolic = map['__symbolic'];
49158
                if (symbolic === 'function') {
49159
                    var oldLen = functionParams.length;
49160
                    functionParams.push.apply(functionParams, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])((map['parameters'] || [])));
49161
                    var result = _super.prototype.visitStringMap.call(this, map, functionParams);
49162
                    functionParams.length = oldLen;
49163
                    return result;
49164
                }
49165
                else if (symbolic === 'reference') {
49166
                    var module = map['module'];
49167
                    var name_1 = map['name'] ? unescapeIdentifier(map['name']) : map['name'];
49168
                    if (!name_1) {
49169
                        return null;
49170
                    }
49171
                    var filePath = void 0;
49172
                    if (module) {
49173
                        filePath = self.resolveModule(module, sourceSymbol.filePath);
49174
                        if (!filePath) {
49175
                            return {
49176
                                __symbolic: 'error',
49177
                                message: "Could not resolve " + module + " relative to " + sourceSymbol.filePath + ".",
49178
                                line: map.line,
49179
                                character: map.character,
49180
                                fileName: getOriginalName()
49181
                            };
49182
                        }
49183
                        return {
49184
                            __symbolic: 'resolved',
49185
                            symbol: self.getStaticSymbol(filePath, name_1),
49186
                            line: map.line,
49187
                            character: map.character,
49188
                            fileName: getOriginalName()
49189
                        };
49190
                    }
49191
                    else if (functionParams.indexOf(name_1) >= 0) {
49192
                        // reference to a function parameter
49193
                        return { __symbolic: 'reference', name: name_1 };
49194
                    }
49195
                    else {
49196
                        if (topLevelSymbolNames.has(name_1)) {
49197
                            return self.getStaticSymbol(topLevelPath, name_1);
49198
                        }
49199
                        // ambient value
49200
 
49201
                    }
49202
                }
49203
                else if (symbolic === 'error') {
49204
                    return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, map, { fileName: getOriginalName() });
49205
                }
49206
                else {
49207
                    return _super.prototype.visitStringMap.call(this, map, functionParams);
49208
                }
49209
            };
49210
            return ReferenceTransformer;
49211
        }(ValueTransformer));
49212
        var transformedMeta = visitValue(metadata, new ReferenceTransformer(), []);
49213
        var unwrappedTransformedMeta = unwrapResolvedMetadata(transformedMeta);
49214
        if (unwrappedTransformedMeta instanceof StaticSymbol) {
49215
            return this.createExport(sourceSymbol, unwrappedTransformedMeta);
49216
        }
49217
        return new ResolvedStaticSymbol(sourceSymbol, transformedMeta);
49218
    };
49219
    StaticSymbolResolver.prototype.createExport = function (sourceSymbol, targetSymbol) {
49220
        sourceSymbol.assertNoMembers();
49221
        targetSymbol.assertNoMembers();
49222
        if (this.summaryResolver.isLibraryFile(sourceSymbol.filePath) &&
49223
            this.summaryResolver.isLibraryFile(targetSymbol.filePath)) {
49224
            // This case is for an ng library importing symbols from a plain ts library
49225
            // transitively.
49226
            // Note: We rely on the fact that we discover symbols in the direction
49227
            // from source files to library files
49228
            this.importAs.set(targetSymbol, this.getImportAs(sourceSymbol) || sourceSymbol);
49229
        }
49230
        return new ResolvedStaticSymbol(sourceSymbol, targetSymbol);
49231
    };
49232
    StaticSymbolResolver.prototype.reportError = function (error$$1, context, path) {
49233
        if (this.errorRecorder) {
49234
            this.errorRecorder(error$$1, (context && context.filePath) || path);
49235
        }
49236
        else {
49237
            throw error$$1;
49238
        }
49239
    };
49240
    /**
49241
     * @param module an absolute path to a module file.
49242
     */
49243
    StaticSymbolResolver.prototype.getModuleMetadata = function (module) {
49244
        var moduleMetadata = this.metadataCache.get(module);
49245
        if (!moduleMetadata) {
49246
            var moduleMetadatas = this.host.getMetadataFor(module);
49247
            if (moduleMetadatas) {
49248
                var maxVersion_1 = -1;
49249
                moduleMetadatas.forEach(function (md) {
49250
                    if (md && md['version'] > maxVersion_1) {
49251
                        maxVersion_1 = md['version'];
49252
                        moduleMetadata = md;
49253
                    }
49254
                });
49255
            }
49256
            if (!moduleMetadata) {
49257
                moduleMetadata =
49258
                    { __symbolic: 'module', version: SUPPORTED_SCHEMA_VERSION, module: module, metadata: {} };
49259
            }
49260
            if (moduleMetadata['version'] != SUPPORTED_SCHEMA_VERSION) {
49261
                var errorMessage = moduleMetadata['version'] == 2 ?
49262
                    "Unsupported metadata version " + moduleMetadata['version'] + " for module " + module + ". This module should be compiled with a newer version of ngc" :
49263
                    "Metadata version mismatch for module " + module + ", found version " + moduleMetadata['version'] + ", expected " + SUPPORTED_SCHEMA_VERSION;
49264
                this.reportError(new Error(errorMessage));
49265
            }
49266
            this.metadataCache.set(module, moduleMetadata);
49267
        }
49268
        return moduleMetadata;
49269
    };
49270
    StaticSymbolResolver.prototype.getSymbolByModule = function (module, symbolName, containingFile) {
49271
        var filePath = this.resolveModule(module, containingFile);
49272
        if (!filePath) {
49273
            this.reportError(new Error("Could not resolve module " + module + (containingFile ? ' relative to ' +
49274
                containingFile : '')));
49275
            return this.getStaticSymbol("ERROR:" + module, symbolName);
49276
        }
49277
        return this.getStaticSymbol(filePath, symbolName);
49278
    };
49279
    StaticSymbolResolver.prototype.resolveModule = function (module, containingFile) {
49280
        try {
49281
            return this.host.moduleNameToFileName(module, containingFile);
49282
        }
49283
        catch (e) {
49284
            console.error("Could not resolve module '" + module + "' relative to file " + containingFile);
49285
            this.reportError(e, undefined, containingFile);
49286
        }
49287
        return null;
49288
    };
49289
    return StaticSymbolResolver;
49290
}());
49291
// Remove extra underscore from escaped identifier.
49292
// See https://github.com/Microsoft/TypeScript/blob/master/src/compiler/utilities.ts
49293
function unescapeIdentifier(identifier) {
49294
    return identifier.startsWith('___') ? identifier.substr(1) : identifier;
49295
}
49296
function unwrapResolvedMetadata(metadata) {
49297
    if (metadata && metadata.__symbolic === 'resolved') {
49298
        return metadata.symbol;
49299
    }
49300
    return metadata;
49301
}
49302
 
49303
/**
49304
 * @license
49305
 * Copyright Google Inc. All Rights Reserved.
49306
 *
49307
 * Use of this source code is governed by an MIT-style license that can be
49308
 * found in the LICENSE file at https://angular.io/license
49309
 */
49310
function serializeSummaries(srcFileName, forJitCtx, summaryResolver, symbolResolver, symbols, types) {
49311
    var toJsonSerializer = new ToJsonSerializer(symbolResolver, summaryResolver, srcFileName);
49312
    // for symbols, we use everything except for the class metadata itself
49313
    // (we keep the statics though), as the class metadata is contained in the
49314
    // CompileTypeSummary.
49315
    symbols.forEach(function (resolvedSymbol) { return toJsonSerializer.addSummary({ symbol: resolvedSymbol.symbol, metadata: resolvedSymbol.metadata }); });
49316
    // Add type summaries.
49317
    types.forEach(function (_a) {
49318
        var summary = _a.summary, metadata = _a.metadata;
49319
        toJsonSerializer.addSummary({ symbol: summary.type.reference, metadata: undefined, type: summary });
49320
    });
49321
    var _a = toJsonSerializer.serialize(), json = _a.json, exportAs = _a.exportAs;
49322
    if (forJitCtx) {
49323
        var forJitSerializer_1 = new ForJitSerializer(forJitCtx, symbolResolver, summaryResolver);
49324
        types.forEach(function (_a) {
49325
            var summary = _a.summary, metadata = _a.metadata;
49326
            forJitSerializer_1.addSourceType(summary, metadata);
49327
        });
49328
        toJsonSerializer.unprocessedSymbolSummariesBySymbol.forEach(function (summary) {
49329
            if (summaryResolver.isLibraryFile(summary.symbol.filePath) && summary.type) {
49330
                forJitSerializer_1.addLibType(summary.type);
49331
            }
49332
        });
49333
        forJitSerializer_1.serialize(exportAs);
49334
    }
49335
    return { json: json, exportAs: exportAs };
49336
}
49337
function deserializeSummaries(symbolCache, summaryResolver, libraryFileName, json) {
49338
    var deserializer = new FromJsonDeserializer(symbolCache, summaryResolver);
49339
    return deserializer.deserialize(libraryFileName, json);
49340
}
49341
function createForJitStub(outputCtx, reference) {
49342
    return createSummaryForJitFunction(outputCtx, reference, NULL_EXPR);
49343
}
49344
function createSummaryForJitFunction(outputCtx, reference, value) {
49345
    var fnName = summaryForJitName(reference.name);
49346
    outputCtx.statements.push(fn([], [new ReturnStatement(value)], new ArrayType(DYNAMIC_TYPE)).toDeclStmt(fnName, [
49347
        StmtModifier.Final, StmtModifier.Exported
49348
    ]));
49349
}
49350
var ToJsonSerializer = /** @class */ (function (_super) {
49351
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ToJsonSerializer, _super);
49352
    function ToJsonSerializer(symbolResolver, summaryResolver, srcFileName) {
49353
        var _this = _super.call(this) || this;
49354
        _this.symbolResolver = symbolResolver;
49355
        _this.summaryResolver = summaryResolver;
49356
        _this.srcFileName = srcFileName;
49357
        // Note: This only contains symbols without members.
49358
        _this.symbols = [];
49359
        _this.indexBySymbol = new Map();
49360
        _this.reexportedBy = new Map();
49361
        // This now contains a `__symbol: number` in the place of
49362
        // StaticSymbols, but otherwise has the same shape as the original objects.
49363
        _this.processedSummaryBySymbol = new Map();
49364
        _this.processedSummaries = [];
49365
        _this.unprocessedSymbolSummariesBySymbol = new Map();
49366
        _this.moduleName = symbolResolver.getKnownModuleName(srcFileName);
49367
        return _this;
49368
    }
49369
    ToJsonSerializer.prototype.addSummary = function (summary) {
49370
        var _this = this;
49371
        var unprocessedSummary = this.unprocessedSymbolSummariesBySymbol.get(summary.symbol);
49372
        var processedSummary = this.processedSummaryBySymbol.get(summary.symbol);
49373
        if (!unprocessedSummary) {
49374
            unprocessedSummary = { symbol: summary.symbol, metadata: undefined };
49375
            this.unprocessedSymbolSummariesBySymbol.set(summary.symbol, unprocessedSummary);
49376
            processedSummary = { symbol: this.processValue(summary.symbol, 0 /* None */) };
49377
            this.processedSummaries.push(processedSummary);
49378
            this.processedSummaryBySymbol.set(summary.symbol, processedSummary);
49379
        }
49380
        if (!unprocessedSummary.metadata && summary.metadata) {
49381
            var metadata_1 = summary.metadata || {};
49382
            if (metadata_1.__symbolic === 'class') {
49383
                // For classes, we keep everything except their class decorators.
49384
                // We need to keep e.g. the ctor args, method names, method decorators
49385
                // so that the class can be extended in another compilation unit.
49386
                // We don't keep the class decorators as
49387
                // 1) they refer to data
49388
                //   that should not cause a rebuild of downstream compilation units
49389
                //   (e.g. inline templates of @Component, or @NgModule.declarations)
49390
                // 2) their data is already captured in TypeSummaries, e.g. DirectiveSummary.
49391
                var clone_1 = {};
49392
                Object.keys(metadata_1).forEach(function (propName) {
49393
                    if (propName !== 'decorators') {
49394
                        clone_1[propName] = metadata_1[propName];
49395
                    }
49396
                });
49397
                metadata_1 = clone_1;
49398
            }
49399
            else if (isCall(metadata_1)) {
49400
                if (!isFunctionCall(metadata_1) && !isMethodCallOnVariable(metadata_1)) {
49401
                    // Don't store complex calls as we won't be able to simplify them anyways later on.
49402
                    metadata_1 = {
49403
                        __symbolic: 'error',
49404
                        message: 'Complex function calls are not supported.',
49405
                    };
49406
                }
49407
            }
49408
            // Note: We need to keep storing ctor calls for e.g.
49409
            // `export const x = new InjectionToken(...)`
49410
            unprocessedSummary.metadata = metadata_1;
49411
            processedSummary.metadata = this.processValue(metadata_1, 1 /* ResolveValue */);
49412
            if (metadata_1 instanceof StaticSymbol &&
49413
                this.summaryResolver.isLibraryFile(metadata_1.filePath)) {
49414
                var declarationSymbol = this.symbols[this.indexBySymbol.get(metadata_1)];
49415
                if (!isLoweredSymbol(declarationSymbol.name)) {
49416
                    // Note: symbols that were introduced during codegen in the user file can have a reexport
49417
                    // if a user used `export *`. However, we can't rely on this as tsickle will change
49418
                    // `export *` into named exports, using only the information from the typechecker.
49419
                    // As we introduce the new symbols after typecheck, Tsickle does not know about them,
49420
                    // and omits them when expanding `export *`.
49421
                    // So we have to keep reexporting these symbols manually via .ngfactory files.
49422
                    this.reexportedBy.set(declarationSymbol, summary.symbol);
49423
                }
49424
            }
49425
        }
49426
        if (!unprocessedSummary.type && summary.type) {
49427
            unprocessedSummary.type = summary.type;
49428
            // Note: We don't add the summaries of all referenced symbols as for the ResolvedSymbols,
49429
            // as the type summaries already contain the transitive data that they require
49430
            // (in a minimal way).
49431
            processedSummary.type = this.processValue(summary.type, 0 /* None */);
49432
            // except for reexported directives / pipes, so we need to store
49433
            // their summaries explicitly.
49434
            if (summary.type.summaryKind === CompileSummaryKind.NgModule) {
49435
                var ngModuleSummary = summary.type;
49436
                ngModuleSummary.exportedDirectives.concat(ngModuleSummary.exportedPipes).forEach(function (id) {
49437
                    var symbol = id.reference;
49438
                    if (_this.summaryResolver.isLibraryFile(symbol.filePath) &&
49439
                        !_this.unprocessedSymbolSummariesBySymbol.has(symbol)) {
49440
                        var summary_1 = _this.summaryResolver.resolveSummary(symbol);
49441
                        if (summary_1) {
49442
                            _this.addSummary(summary_1);
49443
                        }
49444
                    }
49445
                });
49446
            }
49447
        }
49448
    };
49449
    ToJsonSerializer.prototype.serialize = function () {
49450
        var _this = this;
49451
        var exportAs = [];
49452
        var json = JSON.stringify({
49453
            moduleName: this.moduleName,
49454
            summaries: this.processedSummaries,
49455
            symbols: this.symbols.map(function (symbol, index) {
49456
                symbol.assertNoMembers();
49457
                var importAs = undefined;
49458
                if (_this.summaryResolver.isLibraryFile(symbol.filePath)) {
49459
                    var reexportSymbol = _this.reexportedBy.get(symbol);
49460
                    if (reexportSymbol) {
49461
                        importAs = _this.indexBySymbol.get(reexportSymbol);
49462
                    }
49463
                    else {
49464
                        var summary = _this.unprocessedSymbolSummariesBySymbol.get(symbol);
49465
                        if (!summary || !summary.metadata || summary.metadata.__symbolic !== 'interface') {
49466
                            importAs = symbol.name + "_" + index;
49467
                            exportAs.push({ symbol: symbol, exportAs: importAs });
49468
                        }
49469
                    }
49470
                }
49471
                return {
49472
                    __symbol: index,
49473
                    name: symbol.name,
49474
                    filePath: _this.summaryResolver.toSummaryFileName(symbol.filePath, _this.srcFileName),
49475
                    importAs: importAs
49476
                };
49477
            })
49478
        });
49479
        return { json: json, exportAs: exportAs };
49480
    };
49481
    ToJsonSerializer.prototype.processValue = function (value, flags) {
49482
        return visitValue(value, this, flags);
49483
    };
49484
    ToJsonSerializer.prototype.visitOther = function (value, context) {
49485
        if (value instanceof StaticSymbol) {
49486
            var baseSymbol = this.symbolResolver.getStaticSymbol(value.filePath, value.name);
49487
            var index = this.visitStaticSymbol(baseSymbol, context);
49488
            return { __symbol: index, members: value.members };
49489
        }
49490
    };
49491
    /**
49492
     * Strip line and character numbers from ngsummaries.
49493
     * Emitting them causes white spaces changes to retrigger upstream
49494
     * recompilations in bazel.
49495
     * TODO: find out a way to have line and character numbers in errors without
49496
     * excessive recompilation in bazel.
49497
     */
49498
    ToJsonSerializer.prototype.visitStringMap = function (map, context) {
49499
        if (map['__symbolic'] === 'resolved') {
49500
            return visitValue(map.symbol, this, context);
49501
        }
49502
        if (map['__symbolic'] === 'error') {
49503
            delete map['line'];
49504
            delete map['character'];
49505
        }
49506
        return _super.prototype.visitStringMap.call(this, map, context);
49507
    };
49508
    /**
49509
     * Returns null if the options.resolveValue is true, and the summary for the symbol
49510
     * resolved to a type or could not be resolved.
49511
     */
49512
    ToJsonSerializer.prototype.visitStaticSymbol = function (baseSymbol, flags) {
49513
        var index = this.indexBySymbol.get(baseSymbol);
49514
        var summary = null;
49515
        if (flags & 1 /* ResolveValue */ &&
49516
            this.summaryResolver.isLibraryFile(baseSymbol.filePath)) {
49517
            if (this.unprocessedSymbolSummariesBySymbol.has(baseSymbol)) {
49518
                // the summary for this symbol was already added
49519
                // -> nothing to do.
49520
                return index;
49521
            }
49522
            summary = this.loadSummary(baseSymbol);
49523
            if (summary && summary.metadata instanceof StaticSymbol) {
49524
                // The summary is a reexport
49525
                index = this.visitStaticSymbol(summary.metadata, flags);
49526
                // reset the summary as it is just a reexport, so we don't want to store it.
49527
                summary = null;
49528
            }
49529
        }
49530
        else if (index != null) {
49531
            // Note: == on purpose to compare with undefined!
49532
            // No summary and the symbol is already added -> nothing to do.
49533
            return index;
49534
        }
49535
        // Note: == on purpose to compare with undefined!
49536
        if (index == null) {
49537
            index = this.symbols.length;
49538
            this.symbols.push(baseSymbol);
49539
        }
49540
        this.indexBySymbol.set(baseSymbol, index);
49541
        if (summary) {
49542
            this.addSummary(summary);
49543
        }
49544
        return index;
49545
    };
49546
    ToJsonSerializer.prototype.loadSummary = function (symbol) {
49547
        var summary = this.summaryResolver.resolveSummary(symbol);
49548
        if (!summary) {
49549
            // some symbols might originate from a plain typescript library
49550
            // that just exported .d.ts and .metadata.json files, i.e. where no summary
49551
            // files were created.
49552
            var resolvedSymbol = this.symbolResolver.resolveSymbol(symbol);
49553
            if (resolvedSymbol) {
49554
                summary = { symbol: resolvedSymbol.symbol, metadata: resolvedSymbol.metadata };
49555
            }
49556
        }
49557
        return summary;
49558
    };
49559
    return ToJsonSerializer;
49560
}(ValueTransformer));
49561
var ForJitSerializer = /** @class */ (function () {
49562
    function ForJitSerializer(outputCtx, symbolResolver, summaryResolver) {
49563
        this.outputCtx = outputCtx;
49564
        this.symbolResolver = symbolResolver;
49565
        this.summaryResolver = summaryResolver;
49566
        this.data = [];
49567
    }
49568
    ForJitSerializer.prototype.addSourceType = function (summary, metadata) {
49569
        this.data.push({ summary: summary, metadata: metadata, isLibrary: false });
49570
    };
49571
    ForJitSerializer.prototype.addLibType = function (summary) {
49572
        this.data.push({ summary: summary, metadata: null, isLibrary: true });
49573
    };
49574
    ForJitSerializer.prototype.serialize = function (exportAsArr) {
49575
        var _this = this;
49576
        var exportAsBySymbol = new Map();
49577
        try {
49578
            for (var exportAsArr_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(exportAsArr), exportAsArr_1_1 = exportAsArr_1.next(); !exportAsArr_1_1.done; exportAsArr_1_1 = exportAsArr_1.next()) {
49579
                var _a = exportAsArr_1_1.value, symbol = _a.symbol, exportAs = _a.exportAs;
49580
                exportAsBySymbol.set(symbol, exportAs);
49581
            }
49582
        }
49583
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
49584
        finally {
49585
            try {
49586
                if (exportAsArr_1_1 && !exportAsArr_1_1.done && (_b = exportAsArr_1.return)) _b.call(exportAsArr_1);
49587
            }
49588
            finally { if (e_1) throw e_1.error; }
49589
        }
49590
        var ngModuleSymbols = new Set();
49591
        try {
49592
            for (var _c = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(this.data), _d = _c.next(); !_d.done; _d = _c.next()) {
49593
                var _e = _d.value, summary = _e.summary, metadata = _e.metadata, isLibrary = _e.isLibrary;
49594
                if (summary.summaryKind === CompileSummaryKind.NgModule) {
49595
                    // collect the symbols that refer to NgModule classes.
49596
                    // Note: we can't just rely on `summary.type.summaryKind` to determine this as
49597
                    // we don't add the summaries of all referenced symbols when we serialize type summaries.
49598
                    // See serializeSummaries for details.
49599
                    ngModuleSymbols.add(summary.type.reference);
49600
                    var modSummary = summary;
49601
                    try {
49602
                        for (var _f = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(modSummary.modules), _g = _f.next(); !_g.done; _g = _f.next()) {
49603
                            var mod = _g.value;
49604
                            ngModuleSymbols.add(mod.reference);
49605
                        }
49606
                    }
49607
                    catch (e_2_1) { e_2 = { error: e_2_1 }; }
49608
                    finally {
49609
                        try {
49610
                            if (_g && !_g.done && (_h = _f.return)) _h.call(_f);
49611
                        }
49612
                        finally { if (e_2) throw e_2.error; }
49613
                    }
49614
                }
49615
                if (!isLibrary) {
49616
                    var fnName = summaryForJitName(summary.type.reference.name);
49617
                    createSummaryForJitFunction(this.outputCtx, summary.type.reference, this.serializeSummaryWithDeps(summary, metadata));
49618
                }
49619
            }
49620
        }
49621
        catch (e_3_1) { e_3 = { error: e_3_1 }; }
49622
        finally {
49623
            try {
49624
                if (_d && !_d.done && (_j = _c.return)) _j.call(_c);
49625
            }
49626
            finally { if (e_3) throw e_3.error; }
49627
        }
49628
        ngModuleSymbols.forEach(function (ngModuleSymbol) {
49629
            if (_this.summaryResolver.isLibraryFile(ngModuleSymbol.filePath)) {
49630
                var exportAs = exportAsBySymbol.get(ngModuleSymbol) || ngModuleSymbol.name;
49631
                var jitExportAsName = summaryForJitName(exportAs);
49632
                _this.outputCtx.statements.push(variable(jitExportAsName)
49633
                    .set(_this.serializeSummaryRef(ngModuleSymbol))
49634
                    .toDeclStmt(null, [StmtModifier.Exported]));
49635
            }
49636
        });
49637
        var e_1, _b, e_3, _j, e_2, _h;
49638
    };
49639
    ForJitSerializer.prototype.serializeSummaryWithDeps = function (summary, metadata) {
49640
        var _this = this;
49641
        var expressions = [this.serializeSummary(summary)];
49642
        var providers = [];
49643
        if (metadata instanceof CompileNgModuleMetadata) {
49644
            expressions.push.apply(expressions, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(
49645
            // For directives / pipes, we only add the declared ones,
49646
            // and rely on transitively importing NgModules to get the transitive
49647
            // summaries.
49648
            metadata.declaredDirectives.concat(metadata.declaredPipes)
49649
                .map(function (type) { return type.reference; })
49650
                .concat(metadata.transitiveModule.modules.map(function (type) { return type.reference; })
49651
                .filter(function (ref) { return ref !== metadata.type.reference; }))
49652
                .map(function (ref) { return _this.serializeSummaryRef(ref); })));
49653
            // Note: We don't use `NgModuleSummary.providers`, as that one is transitive,
49654
            // and we already have transitive modules.
49655
            providers = metadata.providers;
49656
        }
49657
        else if (summary.summaryKind === CompileSummaryKind.Directive) {
49658
            var dirSummary = summary;
49659
            providers = dirSummary.providers.concat(dirSummary.viewProviders);
49660
        }
49661
        // Note: We can't just refer to the `ngsummary.ts` files for `useClass` providers (as we do for
49662
        // declaredDirectives / declaredPipes), as we allow
49663
        // providers without ctor arguments to skip the `@Injectable` decorator,
49664
        // i.e. we didn't generate .ngsummary.ts files for these.
49665
        expressions.push.apply(expressions, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(providers.filter(function (provider) { return !!provider.useClass; }).map(function (provider) { return _this.serializeSummary({
49666
            summaryKind: CompileSummaryKind.Injectable, type: provider.useClass
49667
        }); })));
49668
        return literalArr(expressions);
49669
    };
49670
    ForJitSerializer.prototype.serializeSummaryRef = function (typeSymbol) {
49671
        var jitImportedSymbol = this.symbolResolver.getStaticSymbol(summaryForJitFileName(typeSymbol.filePath), summaryForJitName(typeSymbol.name));
49672
        return this.outputCtx.importExpr(jitImportedSymbol);
49673
    };
49674
    ForJitSerializer.prototype.serializeSummary = function (data) {
49675
        var outputCtx = this.outputCtx;
49676
        var Transformer = /** @class */ (function () {
49677
            function Transformer() {
49678
            }
49679
            Transformer.prototype.visitArray = function (arr, context) {
49680
                var _this = this;
49681
                return literalArr(arr.map(function (entry) { return visitValue(entry, _this, context); }));
49682
            };
49683
            Transformer.prototype.visitStringMap = function (map, context) {
49684
                var _this = this;
49685
                return new LiteralMapExpr(Object.keys(map).map(function (key) { return new LiteralMapEntry(key, visitValue(map[key], _this, context), false); }));
49686
            };
49687
            Transformer.prototype.visitPrimitive = function (value, context) { return literal(value); };
49688
            Transformer.prototype.visitOther = function (value, context) {
49689
                if (value instanceof StaticSymbol) {
49690
                    return outputCtx.importExpr(value);
49691
                }
49692
                else {
49693
                    throw new Error("Illegal State: Encountered value " + value);
49694
                }
49695
            };
49696
            return Transformer;
49697
        }());
49698
        return visitValue(data, new Transformer(), null);
49699
    };
49700
    return ForJitSerializer;
49701
}());
49702
var FromJsonDeserializer = /** @class */ (function (_super) {
49703
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FromJsonDeserializer, _super);
49704
    function FromJsonDeserializer(symbolCache, summaryResolver) {
49705
        var _this = _super.call(this) || this;
49706
        _this.symbolCache = symbolCache;
49707
        _this.summaryResolver = summaryResolver;
49708
        return _this;
49709
    }
49710
    FromJsonDeserializer.prototype.deserialize = function (libraryFileName, json) {
49711
        var _this = this;
49712
        var data = JSON.parse(json);
49713
        var allImportAs = [];
49714
        this.symbols = data.symbols.map(function (serializedSymbol) { return _this.symbolCache.get(_this.summaryResolver.fromSummaryFileName(serializedSymbol.filePath, libraryFileName), serializedSymbol.name); });
49715
        data.symbols.forEach(function (serializedSymbol, index) {
49716
            var symbol = _this.symbols[index];
49717
            var importAs = serializedSymbol.importAs;
49718
            if (typeof importAs === 'number') {
49719
                allImportAs.push({ symbol: symbol, importAs: _this.symbols[importAs] });
49720
            }
49721
            else if (typeof importAs === 'string') {
49722
                allImportAs.push({ symbol: symbol, importAs: _this.symbolCache.get(ngfactoryFilePath(libraryFileName), importAs) });
49723
            }
49724
        });
49725
        var summaries = visitValue(data.summaries, this, null);
49726
        return { moduleName: data.moduleName, summaries: summaries, importAs: allImportAs };
49727
    };
49728
    FromJsonDeserializer.prototype.visitStringMap = function (map, context) {
49729
        if ('__symbol' in map) {
49730
            var baseSymbol = this.symbols[map['__symbol']];
49731
            var members = map['members'];
49732
            return members.length ? this.symbolCache.get(baseSymbol.filePath, baseSymbol.name, members) :
49733
                baseSymbol;
49734
        }
49735
        else {
49736
            return _super.prototype.visitStringMap.call(this, map, context);
49737
        }
49738
    };
49739
    return FromJsonDeserializer;
49740
}(ValueTransformer));
49741
function isCall(metadata) {
49742
    return metadata && metadata.__symbolic === 'call';
49743
}
49744
function isFunctionCall(metadata) {
49745
    return isCall(metadata) && unwrapResolvedMetadata(metadata.expression) instanceof StaticSymbol;
49746
}
49747
function isMethodCallOnVariable(metadata) {
49748
    return isCall(metadata) && metadata.expression && metadata.expression.__symbolic === 'select' &&
49749
        unwrapResolvedMetadata(metadata.expression.expression) instanceof StaticSymbol;
49750
}
49751
 
49752
/**
49753
 * @license
49754
 * Copyright Google Inc. All Rights Reserved.
49755
 *
49756
 * Use of this source code is governed by an MIT-style license that can be
49757
 * found in the LICENSE file at https://angular.io/license
49758
 */
49759
var StubEmitFlags;
49760
(function (StubEmitFlags) {
49761
    StubEmitFlags[StubEmitFlags["Basic"] = 1] = "Basic";
49762
    StubEmitFlags[StubEmitFlags["TypeCheck"] = 2] = "TypeCheck";
49763
    StubEmitFlags[StubEmitFlags["All"] = 3] = "All";
49764
})(StubEmitFlags || (StubEmitFlags = {}));
49765
var AotCompiler = /** @class */ (function () {
49766
    function AotCompiler(_config, _options, _host, reflector, _metadataResolver, _templateParser, _styleCompiler, _viewCompiler, _typeCheckCompiler, _ngModuleCompiler, _injectableCompiler, _outputEmitter, _summaryResolver, _symbolResolver) {
49767
        this._config = _config;
49768
        this._options = _options;
49769
        this._host = _host;
49770
        this.reflector = reflector;
49771
        this._metadataResolver = _metadataResolver;
49772
        this._templateParser = _templateParser;
49773
        this._styleCompiler = _styleCompiler;
49774
        this._viewCompiler = _viewCompiler;
49775
        this._typeCheckCompiler = _typeCheckCompiler;
49776
        this._ngModuleCompiler = _ngModuleCompiler;
49777
        this._injectableCompiler = _injectableCompiler;
49778
        this._outputEmitter = _outputEmitter;
49779
        this._summaryResolver = _summaryResolver;
49780
        this._symbolResolver = _symbolResolver;
49781
        this._templateAstCache = new Map();
49782
        this._analyzedFiles = new Map();
49783
        this._analyzedFilesForInjectables = new Map();
49784
    }
49785
    AotCompiler.prototype.clearCache = function () { this._metadataResolver.clearCache(); };
49786
    AotCompiler.prototype.analyzeModulesSync = function (rootFiles) {
49787
        var _this = this;
49788
        var analyzeResult = analyzeAndValidateNgModules(rootFiles, this._host, this._symbolResolver, this._metadataResolver);
49789
        analyzeResult.ngModules.forEach(function (ngModule) { return _this._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, true); });
49790
        return analyzeResult;
49791
    };
49792
    AotCompiler.prototype.analyzeModulesAsync = function (rootFiles) {
49793
        var _this = this;
49794
        var analyzeResult = analyzeAndValidateNgModules(rootFiles, this._host, this._symbolResolver, this._metadataResolver);
49795
        return Promise
49796
            .all(analyzeResult.ngModules.map(function (ngModule) { return _this._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, false); }))
49797
            .then(function () { return analyzeResult; });
49798
    };
49799
    AotCompiler.prototype._analyzeFile = function (fileName) {
49800
        var analyzedFile = this._analyzedFiles.get(fileName);
49801
        if (!analyzedFile) {
49802
            analyzedFile =
49803
                analyzeFile(this._host, this._symbolResolver, this._metadataResolver, fileName);
49804
            this._analyzedFiles.set(fileName, analyzedFile);
49805
        }
49806
        return analyzedFile;
49807
    };
49808
    AotCompiler.prototype._analyzeFileForInjectables = function (fileName) {
49809
        var analyzedFile = this._analyzedFilesForInjectables.get(fileName);
49810
        if (!analyzedFile) {
49811
            analyzedFile = analyzeFileForInjectables(this._host, this._symbolResolver, this._metadataResolver, fileName);
49812
            this._analyzedFilesForInjectables.set(fileName, analyzedFile);
49813
        }
49814
        return analyzedFile;
49815
    };
49816
    AotCompiler.prototype.findGeneratedFileNames = function (fileName) {
49817
        var _this = this;
49818
        var genFileNames = [];
49819
        var file = this._analyzeFile(fileName);
49820
        // Make sure we create a .ngfactory if we have a injectable/directive/pipe/NgModule
49821
        // or a reference to a non source file.
49822
        // Note: This is overestimating the required .ngfactory files as the real calculation is harder.
49823
        // Only do this for StubEmitFlags.Basic, as adding a type check block
49824
        // does not change this file (as we generate type check blocks based on NgModules).
49825
        if (this._options.allowEmptyCodegenFiles || file.directives.length || file.pipes.length ||
49826
            file.injectables.length || file.ngModules.length || file.exportsNonSourceFiles) {
49827
            genFileNames.push(ngfactoryFilePath(file.fileName, true));
49828
            if (this._options.enableSummariesForJit) {
49829
                genFileNames.push(summaryForJitFileName(file.fileName, true));
49830
            }
49831
        }
49832
        var fileSuffix = normalizeGenFileSuffix(splitTypescriptSuffix(file.fileName, true)[1]);
49833
        file.directives.forEach(function (dirSymbol) {
49834
            var compMeta = _this._metadataResolver.getNonNormalizedDirectiveMetadata(dirSymbol).metadata;
49835
            if (!compMeta.isComponent) {
49836
                return;
49837
            }
49838
            // Note: compMeta is a component and therefore template is non null.
49839
            compMeta.template.styleUrls.forEach(function (styleUrl) {
49840
                var normalizedUrl = _this._host.resourceNameToFileName(styleUrl, file.fileName);
49841
                if (!normalizedUrl) {
49842
                    throw syntaxError("Couldn't resolve resource " + styleUrl + " relative to " + file.fileName);
49843
                }
49844
                var needsShim = (compMeta.template.encapsulation ||
49845
                    _this._config.defaultEncapsulation) === ViewEncapsulation.Emulated;
49846
                genFileNames.push(_stylesModuleUrl(normalizedUrl, needsShim, fileSuffix));
49847
                if (_this._options.allowEmptyCodegenFiles) {
49848
                    genFileNames.push(_stylesModuleUrl(normalizedUrl, !needsShim, fileSuffix));
49849
                }
49850
            });
49851
        });
49852
        return genFileNames;
49853
    };
49854
    AotCompiler.prototype.emitBasicStub = function (genFileName, originalFileName) {
49855
        var outputCtx = this._createOutputContext(genFileName);
49856
        if (genFileName.endsWith('.ngfactory.ts')) {
49857
            if (!originalFileName) {
49858
                throw new Error("Assertion error: require the original file for .ngfactory.ts stubs. File: " + genFileName);
49859
            }
49860
            var originalFile = this._analyzeFile(originalFileName);
49861
            this._createNgFactoryStub(outputCtx, originalFile, StubEmitFlags.Basic);
49862
        }
49863
        else if (genFileName.endsWith('.ngsummary.ts')) {
49864
            if (this._options.enableSummariesForJit) {
49865
                if (!originalFileName) {
49866
                    throw new Error("Assertion error: require the original file for .ngsummary.ts stubs. File: " + genFileName);
49867
                }
49868
                var originalFile = this._analyzeFile(originalFileName);
49869
                _createEmptyStub(outputCtx);
49870
                originalFile.ngModules.forEach(function (ngModule) {
49871
                    // create exports that user code can reference
49872
                    createForJitStub(outputCtx, ngModule.type.reference);
49873
                });
49874
            }
49875
        }
49876
        else if (genFileName.endsWith('.ngstyle.ts')) {
49877
            _createEmptyStub(outputCtx);
49878
        }
49879
        // Note: for the stubs, we don't need a property srcFileUrl,
49880
        // as later on in emitAllImpls we will create the proper GeneratedFiles with the
49881
        // correct srcFileUrl.
49882
        // This is good as e.g. for .ngstyle.ts files we can't derive
49883
        // the url of components based on the genFileUrl.
49884
        return this._codegenSourceModule('unknown', outputCtx);
49885
    };
49886
    AotCompiler.prototype.emitTypeCheckStub = function (genFileName, originalFileName) {
49887
        var originalFile = this._analyzeFile(originalFileName);
49888
        var outputCtx = this._createOutputContext(genFileName);
49889
        if (genFileName.endsWith('.ngfactory.ts')) {
49890
            this._createNgFactoryStub(outputCtx, originalFile, StubEmitFlags.TypeCheck);
49891
        }
49892
        return outputCtx.statements.length > 0 ?
49893
            this._codegenSourceModule(originalFile.fileName, outputCtx) :
49894
            null;
49895
    };
49896
    AotCompiler.prototype.loadFilesAsync = function (fileNames, tsFiles) {
49897
        var _this = this;
49898
        var files = fileNames.map(function (fileName) { return _this._analyzeFile(fileName); });
49899
        var loadingPromises = [];
49900
        files.forEach(function (file) { return file.ngModules.forEach(function (ngModule) {
49901
            return loadingPromises.push(_this._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, false));
49902
        }); });
49903
        var analyzedInjectables = tsFiles.map(function (tsFile) { return _this._analyzeFileForInjectables(tsFile); });
49904
        return Promise.all(loadingPromises).then(function (_) { return ({
49905
            analyzedModules: mergeAndValidateNgFiles(files),
49906
            analyzedInjectables: analyzedInjectables,
49907
        }); });
49908
    };
49909
    AotCompiler.prototype.loadFilesSync = function (fileNames, tsFiles) {
49910
        var _this = this;
49911
        var files = fileNames.map(function (fileName) { return _this._analyzeFile(fileName); });
49912
        files.forEach(function (file) { return file.ngModules.forEach(function (ngModule) { return _this._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, true); }); });
49913
        var analyzedInjectables = tsFiles.map(function (tsFile) { return _this._analyzeFileForInjectables(tsFile); });
49914
        return {
49915
            analyzedModules: mergeAndValidateNgFiles(files),
49916
            analyzedInjectables: analyzedInjectables,
49917
        };
49918
    };
49919
    AotCompiler.prototype._createNgFactoryStub = function (outputCtx, file, emitFlags) {
49920
        var _this = this;
49921
        var componentId = 0;
49922
        file.ngModules.forEach(function (ngModuleMeta, ngModuleIndex) {
49923
            // Note: the code below needs to executed for StubEmitFlags.Basic and StubEmitFlags.TypeCheck,
49924
            // so we don't change the .ngfactory file too much when adding the type-check block.
49925
            // create exports that user code can reference
49926
            _this._ngModuleCompiler.createStub(outputCtx, ngModuleMeta.type.reference);
49927
            // add references to the symbols from the metadata.
49928
            // These can be used by the type check block for components,
49929
            // and they also cause TypeScript to include these files into the program too,
49930
            // which will make them part of the analyzedFiles.
49931
            var externalReferences = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(ngModuleMeta.transitiveModule.directives.map(function (d) { return d.reference; }), ngModuleMeta.transitiveModule.pipes.map(function (d) { return d.reference; }), ngModuleMeta.importedModules.map(function (m) { return m.type.reference; }), ngModuleMeta.exportedModules.map(function (m) { return m.type.reference; }), _this._externalIdentifierReferences([Identifiers.TemplateRef, Identifiers.ElementRef]));
49932
            var externalReferenceVars = new Map();
49933
            externalReferences.forEach(function (ref, typeIndex) {
49934
                externalReferenceVars.set(ref, "_decl" + ngModuleIndex + "_" + typeIndex);
49935
            });
49936
            externalReferenceVars.forEach(function (varName, reference) {
49937
                outputCtx.statements.push(variable(varName)
49938
                    .set(NULL_EXPR.cast(DYNAMIC_TYPE))
49939
                    .toDeclStmt(expressionType(outputCtx.importExpr(reference, /* typeParams */ null, /* useSummaries */ false))));
49940
            });
49941
            if (emitFlags & StubEmitFlags.TypeCheck) {
49942
                // add the type-check block for all components of the NgModule
49943
                ngModuleMeta.declaredDirectives.forEach(function (dirId) {
49944
                    var compMeta = _this._metadataResolver.getDirectiveMetadata(dirId.reference);
49945
                    if (!compMeta.isComponent) {
49946
                        return;
49947
                    }
49948
                    componentId++;
49949
                    _this._createTypeCheckBlock(outputCtx, compMeta.type.reference.name + "_Host_" + componentId, ngModuleMeta, _this._metadataResolver.getHostComponentMetadata(compMeta), [compMeta.type], externalReferenceVars);
49950
                    _this._createTypeCheckBlock(outputCtx, compMeta.type.reference.name + "_" + componentId, ngModuleMeta, compMeta, ngModuleMeta.transitiveModule.directives, externalReferenceVars);
49951
                });
49952
            }
49953
        });
49954
        if (outputCtx.statements.length === 0) {
49955
            _createEmptyStub(outputCtx);
49956
        }
49957
    };
49958
    AotCompiler.prototype._externalIdentifierReferences = function (references) {
49959
        var result = [];
49960
        try {
49961
            for (var references_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(references), references_1_1 = references_1.next(); !references_1_1.done; references_1_1 = references_1.next()) {
49962
                var reference = references_1_1.value;
49963
                var token = createTokenForExternalReference(this.reflector, reference);
49964
                if (token.identifier) {
49965
                    result.push(token.identifier.reference);
49966
                }
49967
            }
49968
        }
49969
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
49970
        finally {
49971
            try {
49972
                if (references_1_1 && !references_1_1.done && (_a = references_1.return)) _a.call(references_1);
49973
            }
49974
            finally { if (e_1) throw e_1.error; }
49975
        }
49976
        return result;
49977
        var e_1, _a;
49978
    };
49979
    AotCompiler.prototype._createTypeCheckBlock = function (ctx, componentId, moduleMeta, compMeta, directives, externalReferenceVars) {
49980
        var _a = this._parseTemplate(compMeta, moduleMeta, directives), parsedTemplate = _a.template, usedPipes = _a.pipes;
49981
        (_b = ctx.statements).push.apply(_b, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(this._typeCheckCompiler.compileComponent(componentId, compMeta, parsedTemplate, usedPipes, externalReferenceVars, ctx)));
49982
        var _b;
49983
    };
49984
    AotCompiler.prototype.emitMessageBundle = function (analyzeResult, locale) {
49985
        var _this = this;
49986
        var errors = [];
49987
        var htmlParser = new HtmlParser();
49988
        // TODO(vicb): implicit tags & attributes
49989
        var messageBundle = new MessageBundle(htmlParser, [], {}, locale);
49990
        analyzeResult.files.forEach(function (file) {
49991
            var compMetas = [];
49992
            file.directives.forEach(function (directiveType) {
49993
                var dirMeta = _this._metadataResolver.getDirectiveMetadata(directiveType);
49994
                if (dirMeta && dirMeta.isComponent) {
49995
                    compMetas.push(dirMeta);
49996
                }
49997
            });
49998
            compMetas.forEach(function (compMeta) {
49999
                var html = compMeta.template.template;
50000
                var interpolationConfig = InterpolationConfig.fromArray(compMeta.template.interpolation);
50001
                errors.push.apply(errors, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(messageBundle.updateFromTemplate(html, file.fileName, interpolationConfig)));
50002
            });
50003
        });
50004
        if (errors.length) {
50005
            throw new Error(errors.map(function (e) { return e.toString(); }).join('\n'));
50006
        }
50007
        return messageBundle;
50008
    };
50009
    AotCompiler.prototype.emitAllPartialModules = function (_a, r3Files) {
50010
        var _this = this;
50011
        var ngModuleByPipeOrDirective = _a.ngModuleByPipeOrDirective, files = _a.files;
50012
        var contextMap = new Map();
50013
        var getContext = function (fileName) {
50014
            if (!contextMap.has(fileName)) {
50015
                contextMap.set(fileName, _this._createOutputContext(fileName));
50016
            }
50017
            return contextMap.get(fileName);
50018
        };
50019
        files.forEach(function (file) { return _this._compilePartialModule(file.fileName, ngModuleByPipeOrDirective, file.directives, file.pipes, file.ngModules, file.injectables, getContext(file.fileName)); });
50020
        r3Files.forEach(function (file) { return _this._compileShallowModules(file.fileName, file.shallowModules, getContext(file.fileName)); });
50021
        return Array.from(contextMap.values())
50022
            .map(function (context) { return ({
50023
            fileName: context.genFilePath,
50024
            statements: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(context.constantPool.statements, context.statements),
50025
        }); });
50026
    };
50027
    AotCompiler.prototype._compileShallowModules = function (fileName, shallowModules, context) {
50028
        var _this = this;
50029
        shallowModules.forEach(function (module) { return compileNgModule(context, module, _this._injectableCompiler); });
50030
    };
50031
    AotCompiler.prototype._compilePartialModule = function (fileName, ngModuleByPipeOrDirective, directives, pipes, ngModules, injectables, context) {
50032
        var _this = this;
50033
        var errors = [];
50034
        var hostBindingParser = new BindingParser(this._templateParser.expressionParser, DEFAULT_INTERPOLATION_CONFIG, null, [], errors);
50035
        // Process all components and directives
50036
        directives.forEach(function (directiveType) {
50037
            var directiveMetadata = _this._metadataResolver.getDirectiveMetadata(directiveType);
50038
            if (directiveMetadata.isComponent) {
50039
                var module = ngModuleByPipeOrDirective.get(directiveType);
50040
                module ||
50041
                    error("Cannot determine the module for component '" + identifierName(directiveMetadata.type) + "'");
50042
                var _a = _this._parseTemplate(directiveMetadata, module, module.transitiveModule.directives), parsedTemplate = _a.template, parsedPipes = _a.pipes;
50043
                compileComponent(context, directiveMetadata, parsedPipes, parsedTemplate, _this.reflector, hostBindingParser, 0 /* PartialClass */);
50044
            }
50045
            else {
50046
                compileDirective(context, directiveMetadata, _this.reflector, hostBindingParser, 0 /* PartialClass */);
50047
            }
50048
        });
50049
        pipes.forEach(function (pipeType) {
50050
            var pipeMetadata = _this._metadataResolver.getPipeMetadata(pipeType);
50051
            if (pipeMetadata) {
50052
                compilePipe(context, pipeMetadata, _this.reflector, 0 /* PartialClass */);
50053
            }
50054
        });
50055
        injectables.forEach(function (injectable) { return _this._injectableCompiler.compile(injectable, context); });
50056
    };
50057
    AotCompiler.prototype.emitAllPartialModules2 = function (files) {
50058
        var _this = this;
50059
        // Using reduce like this is a select many pattern (where map is a select pattern)
50060
        return files.reduce(function (r, file) {
50061
            r.push.apply(r, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(_this._emitPartialModule2(file.fileName, file.injectables)));
50062
            return r;
50063
        }, []);
50064
    };
50065
    AotCompiler.prototype._emitPartialModule2 = function (fileName, injectables) {
50066
        var _this = this;
50067
        var context = this._createOutputContext(fileName);
50068
        injectables.forEach(function (injectable) { return _this._injectableCompiler.compile(injectable, context); });
50069
        if (context.statements && context.statements.length > 0) {
50070
            return [{ fileName: fileName, statements: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(context.constantPool.statements, context.statements) }];
50071
        }
50072
        return [];
50073
    };
50074
    AotCompiler.prototype.emitAllImpls = function (analyzeResult) {
50075
        var _this = this;
50076
        var ngModuleByPipeOrDirective = analyzeResult.ngModuleByPipeOrDirective, files = analyzeResult.files;
50077
        var sourceModules = files.map(function (file) { return _this._compileImplFile(file.fileName, ngModuleByPipeOrDirective, file.directives, file.pipes, file.ngModules, file.injectables); });
50078
        return flatten(sourceModules);
50079
    };
50080
    AotCompiler.prototype._compileImplFile = function (srcFileUrl, ngModuleByPipeOrDirective, directives, pipes, ngModules, injectables) {
50081
        var _this = this;
50082
        var fileSuffix = normalizeGenFileSuffix(splitTypescriptSuffix(srcFileUrl, true)[1]);
50083
        var generatedFiles = [];
50084
        var outputCtx = this._createOutputContext(ngfactoryFilePath(srcFileUrl, true));
50085
        generatedFiles.push.apply(generatedFiles, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(this._createSummary(srcFileUrl, directives, pipes, ngModules, injectables, outputCtx)));
50086
        // compile all ng modules
50087
        ngModules.forEach(function (ngModuleMeta) { return _this._compileModule(outputCtx, ngModuleMeta); });
50088
        // compile components
50089
        directives.forEach(function (dirType) {
50090
            var compMeta = _this._metadataResolver.getDirectiveMetadata(dirType);
50091
            if (!compMeta.isComponent) {
50092
                return;
50093
            }
50094
            var ngModule = ngModuleByPipeOrDirective.get(dirType);
50095
            if (!ngModule) {
50096
                throw new Error("Internal Error: cannot determine the module for component " + identifierName(compMeta.type) + "!");
50097
            }
50098
            // compile styles
50099
            var componentStylesheet = _this._styleCompiler.compileComponent(outputCtx, compMeta);
50100
            // Note: compMeta is a component and therefore template is non null.
50101
            compMeta.template.externalStylesheets.forEach(function (stylesheetMeta) {
50102
                // Note: fill non shim and shim style files as they might
50103
                // be shared by component with and without ViewEncapsulation.
50104
                var shim = _this._styleCompiler.needsStyleShim(compMeta);
50105
                generatedFiles.push(_this._codegenStyles(srcFileUrl, compMeta, stylesheetMeta, shim, fileSuffix));
50106
                if (_this._options.allowEmptyCodegenFiles) {
50107
                    generatedFiles.push(_this._codegenStyles(srcFileUrl, compMeta, stylesheetMeta, !shim, fileSuffix));
50108
                }
50109
            });
50110
            // compile components
50111
            var compViewVars = _this._compileComponent(outputCtx, compMeta, ngModule, ngModule.transitiveModule.directives, componentStylesheet, fileSuffix);
50112
            _this._compileComponentFactory(outputCtx, compMeta, ngModule, fileSuffix);
50113
        });
50114
        if (outputCtx.statements.length > 0 || this._options.allowEmptyCodegenFiles) {
50115
            var srcModule = this._codegenSourceModule(srcFileUrl, outputCtx);
50116
            generatedFiles.unshift(srcModule);
50117
        }
50118
        return generatedFiles;
50119
    };
50120
    AotCompiler.prototype._createSummary = function (srcFileName, directives, pipes, ngModules, injectables, ngFactoryCtx) {
50121
        var _this = this;
50122
        var symbolSummaries = this._symbolResolver.getSymbolsOf(srcFileName)
50123
            .map(function (symbol) { return _this._symbolResolver.resolveSymbol(symbol); });
50124
        var typeData = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(ngModules.map(function (meta) { return ({
50125
            summary: _this._metadataResolver.getNgModuleSummary(meta.type.reference),
50126
            metadata: _this._metadataResolver.getNgModuleMetadata(meta.type.reference)
50127
        }); }), directives.map(function (ref) { return ({
50128
            summary: _this._metadataResolver.getDirectiveSummary(ref),
50129
            metadata: _this._metadataResolver.getDirectiveMetadata(ref)
50130
        }); }), pipes.map(function (ref) { return ({
50131
            summary: _this._metadataResolver.getPipeSummary(ref),
50132
            metadata: _this._metadataResolver.getPipeMetadata(ref)
50133
        }); }), injectables.map(function (ref) { return ({
50134
            summary: _this._metadataResolver.getInjectableSummary(ref.symbol),
50135
            metadata: _this._metadataResolver.getInjectableSummary(ref.symbol).type
50136
        }); }));
50137
        var forJitOutputCtx = this._options.enableSummariesForJit ?
50138
            this._createOutputContext(summaryForJitFileName(srcFileName, true)) :
50139
            null;
50140
        var _a = serializeSummaries(srcFileName, forJitOutputCtx, this._summaryResolver, this._symbolResolver, symbolSummaries, typeData), json = _a.json, exportAs = _a.exportAs;
50141
        exportAs.forEach(function (entry) {
50142
            ngFactoryCtx.statements.push(variable(entry.exportAs).set(ngFactoryCtx.importExpr(entry.symbol)).toDeclStmt(null, [
50143
                StmtModifier.Exported
50144
            ]));
50145
        });
50146
        var summaryJson = new GeneratedFile(srcFileName, summaryFileName(srcFileName), json);
50147
        var result = [summaryJson];
50148
        if (forJitOutputCtx) {
50149
            result.push(this._codegenSourceModule(srcFileName, forJitOutputCtx));
50150
        }
50151
        return result;
50152
    };
50153
    AotCompiler.prototype._compileModule = function (outputCtx, ngModule) {
50154
        var providers = [];
50155
        if (this._options.locale) {
50156
            var normalizedLocale = this._options.locale.replace(/_/g, '-');
50157
            providers.push({
50158
                token: createTokenForExternalReference(this.reflector, Identifiers.LOCALE_ID),
50159
                useValue: normalizedLocale,
50160
            });
50161
        }
50162
        if (this._options.i18nFormat) {
50163
            providers.push({
50164
                token: createTokenForExternalReference(this.reflector, Identifiers.TRANSLATIONS_FORMAT),
50165
                useValue: this._options.i18nFormat
50166
            });
50167
        }
50168
        this._ngModuleCompiler.compile(outputCtx, ngModule, providers);
50169
    };
50170
    AotCompiler.prototype._compileComponentFactory = function (outputCtx, compMeta, ngModule, fileSuffix) {
50171
        var hostMeta = this._metadataResolver.getHostComponentMetadata(compMeta);
50172
        var hostViewFactoryVar = this._compileComponent(outputCtx, hostMeta, ngModule, [compMeta.type], null, fileSuffix)
50173
            .viewClassVar;
50174
        var compFactoryVar = componentFactoryName(compMeta.type.reference);
50175
        var inputsExprs = [];
50176
        for (var propName in compMeta.inputs) {
50177
            var templateName = compMeta.inputs[propName];
50178
            // Don't quote so that the key gets minified...
50179
            inputsExprs.push(new LiteralMapEntry(propName, literal(templateName), false));
50180
        }
50181
        var outputsExprs = [];
50182
        for (var propName in compMeta.outputs) {
50183
            var templateName = compMeta.outputs[propName];
50184
            // Don't quote so that the key gets minified...
50185
            outputsExprs.push(new LiteralMapEntry(propName, literal(templateName), false));
50186
        }
50187
        outputCtx.statements.push(variable(compFactoryVar)
50188
            .set(importExpr(Identifiers.createComponentFactory).callFn([
50189
            literal(compMeta.selector), outputCtx.importExpr(compMeta.type.reference),
50190
            variable(hostViewFactoryVar), new LiteralMapExpr(inputsExprs),
50191
            new LiteralMapExpr(outputsExprs),
50192
            literalArr(compMeta.template.ngContentSelectors.map(function (selector) { return literal(selector); }))
50193
        ]))
50194
            .toDeclStmt(importType(Identifiers.ComponentFactory, [expressionType(outputCtx.importExpr(compMeta.type.reference))], [TypeModifier.Const]), [StmtModifier.Final, StmtModifier.Exported]));
50195
    };
50196
    AotCompiler.prototype._compileComponent = function (outputCtx, compMeta, ngModule, directiveIdentifiers, componentStyles, fileSuffix) {
50197
        var _a = this._parseTemplate(compMeta, ngModule, directiveIdentifiers), parsedTemplate = _a.template, usedPipes = _a.pipes;
50198
        var stylesExpr = componentStyles ? variable(componentStyles.stylesVar) : literalArr([]);
50199
        var viewResult = this._viewCompiler.compileComponent(outputCtx, compMeta, parsedTemplate, stylesExpr, usedPipes);
50200
        if (componentStyles) {
50201
            _resolveStyleStatements(this._symbolResolver, componentStyles, this._styleCompiler.needsStyleShim(compMeta), fileSuffix);
50202
        }
50203
        return viewResult;
50204
    };
50205
    AotCompiler.prototype._parseTemplate = function (compMeta, ngModule, directiveIdentifiers) {
50206
        var _this = this;
50207
        if (this._templateAstCache.has(compMeta.type.reference)) {
50208
            return this._templateAstCache.get(compMeta.type.reference);
50209
        }
50210
        var preserveWhitespaces = compMeta.template.preserveWhitespaces;
50211
        var directives = directiveIdentifiers.map(function (dir) { return _this._metadataResolver.getDirectiveSummary(dir.reference); });
50212
        var pipes = ngModule.transitiveModule.pipes.map(function (pipe) { return _this._metadataResolver.getPipeSummary(pipe.reference); });
50213
        var result = this._templateParser.parse(compMeta, compMeta.template.htmlAst, directives, pipes, ngModule.schemas, templateSourceUrl(ngModule.type, compMeta, compMeta.template), preserveWhitespaces);
50214
        this._templateAstCache.set(compMeta.type.reference, result);
50215
        return result;
50216
    };
50217
    AotCompiler.prototype._createOutputContext = function (genFilePath) {
50218
        var _this = this;
50219
        var importExpr$$1 = function (symbol, typeParams, useSummaries) {
50220
            if (typeParams === void 0) { typeParams = null; }
50221
            if (useSummaries === void 0) { useSummaries = true; }
50222
            if (!(symbol instanceof StaticSymbol)) {
50223
                throw new Error("Internal error: unknown identifier " + JSON.stringify(symbol));
50224
            }
50225
            var arity = _this._symbolResolver.getTypeArity(symbol) || 0;
50226
            var _a = _this._symbolResolver.getImportAs(symbol, useSummaries) || symbol, filePath = _a.filePath, name = _a.name, members = _a.members;
50227
            var importModule = _this._fileNameToModuleName(filePath, genFilePath);
50228
            // It should be good enough to compare filePath to genFilePath and if they are equal
50229
            // there is a self reference. However, ngfactory files generate to .ts but their
50230
            // symbols have .d.ts so a simple compare is insufficient. They should be canonical
50231
            // and is tracked by #17705.
50232
            var selfReference = _this._fileNameToModuleName(genFilePath, genFilePath);
50233
            var moduleName = importModule === selfReference ? null : importModule;
50234
            // If we are in a type expression that refers to a generic type then supply
50235
            // the required type parameters. If there were not enough type parameters
50236
            // supplied, supply any as the type. Outside a type expression the reference
50237
            // should not supply type parameters and be treated as a simple value reference
50238
            // to the constructor function itself.
50239
            var suppliedTypeParams = typeParams || [];
50240
            var missingTypeParamsCount = arity - suppliedTypeParams.length;
50241
            var allTypeParams = suppliedTypeParams.concat(new Array(missingTypeParamsCount).fill(DYNAMIC_TYPE));
50242
            return members.reduce(function (expr, memberName) { return expr.prop(memberName); }, importExpr(new ExternalReference(moduleName, name, null), allTypeParams));
50243
        };
50244
        return { statements: [], genFilePath: genFilePath, importExpr: importExpr$$1, constantPool: new ConstantPool() };
50245
    };
50246
    AotCompiler.prototype._fileNameToModuleName = function (importedFilePath, containingFilePath) {
50247
        return this._summaryResolver.getKnownModuleName(importedFilePath) ||
50248
            this._symbolResolver.getKnownModuleName(importedFilePath) ||
50249
            this._host.fileNameToModuleName(importedFilePath, containingFilePath);
50250
    };
50251
    AotCompiler.prototype._codegenStyles = function (srcFileUrl, compMeta, stylesheetMetadata, isShimmed, fileSuffix) {
50252
        var outputCtx = this._createOutputContext(_stylesModuleUrl(stylesheetMetadata.moduleUrl, isShimmed, fileSuffix));
50253
        var compiledStylesheet = this._styleCompiler.compileStyles(outputCtx, compMeta, stylesheetMetadata, isShimmed);
50254
        _resolveStyleStatements(this._symbolResolver, compiledStylesheet, isShimmed, fileSuffix);
50255
        return this._codegenSourceModule(srcFileUrl, outputCtx);
50256
    };
50257
    AotCompiler.prototype._codegenSourceModule = function (srcFileUrl, ctx) {
50258
        return new GeneratedFile(srcFileUrl, ctx.genFilePath, ctx.statements);
50259
    };
50260
    AotCompiler.prototype.listLazyRoutes = function (entryRoute, analyzedModules) {
50261
        var self = this;
50262
        if (entryRoute) {
50263
            var symbol = parseLazyRoute(entryRoute, this.reflector).referencedModule;
50264
            return visitLazyRoute(symbol);
50265
        }
50266
        else if (analyzedModules) {
50267
            var allLazyRoutes = [];
50268
            try {
50269
                for (var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(analyzedModules.ngModules), _b = _a.next(); !_b.done; _b = _a.next()) {
50270
                    var ngModule = _b.value;
50271
                    var lazyRoutes = listLazyRoutes(ngModule, this.reflector);
50272
                    try {
50273
                        for (var lazyRoutes_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(lazyRoutes), lazyRoutes_1_1 = lazyRoutes_1.next(); !lazyRoutes_1_1.done; lazyRoutes_1_1 = lazyRoutes_1.next()) {
50274
                            var lazyRoute = lazyRoutes_1_1.value;
50275
                            allLazyRoutes.push(lazyRoute);
50276
                        }
50277
                    }
50278
                    catch (e_2_1) { e_2 = { error: e_2_1 }; }
50279
                    finally {
50280
                        try {
50281
                            if (lazyRoutes_1_1 && !lazyRoutes_1_1.done && (_c = lazyRoutes_1.return)) _c.call(lazyRoutes_1);
50282
                        }
50283
                        finally { if (e_2) throw e_2.error; }
50284
                    }
50285
                }
50286
            }
50287
            catch (e_3_1) { e_3 = { error: e_3_1 }; }
50288
            finally {
50289
                try {
50290
                    if (_b && !_b.done && (_d = _a.return)) _d.call(_a);
50291
                }
50292
                finally { if (e_3) throw e_3.error; }
50293
            }
50294
            return allLazyRoutes;
50295
        }
50296
        else {
50297
            throw new Error("Either route or analyzedModules has to be specified!");
50298
        }
50299
        function visitLazyRoute(symbol, seenRoutes, allLazyRoutes) {
50300
            if (seenRoutes === void 0) { seenRoutes = new Set(); }
50301
            if (allLazyRoutes === void 0) { allLazyRoutes = []; }
50302
            // Support pointing to default exports, but stop recursing there,
50303
            // as the StaticReflector does not yet support default exports.
50304
            if (seenRoutes.has(symbol) || !symbol.name) {
50305
                return allLazyRoutes;
50306
            }
50307
            seenRoutes.add(symbol);
50308
            var lazyRoutes = listLazyRoutes(self._metadataResolver.getNgModuleMetadata(symbol, true), self.reflector);
50309
            try {
50310
                for (var lazyRoutes_2 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(lazyRoutes), lazyRoutes_2_1 = lazyRoutes_2.next(); !lazyRoutes_2_1.done; lazyRoutes_2_1 = lazyRoutes_2.next()) {
50311
                    var lazyRoute = lazyRoutes_2_1.value;
50312
                    allLazyRoutes.push(lazyRoute);
50313
                    visitLazyRoute(lazyRoute.referencedModule, seenRoutes, allLazyRoutes);
50314
                }
50315
            }
50316
            catch (e_4_1) { e_4 = { error: e_4_1 }; }
50317
            finally {
50318
                try {
50319
                    if (lazyRoutes_2_1 && !lazyRoutes_2_1.done && (_a = lazyRoutes_2.return)) _a.call(lazyRoutes_2);
50320
                }
50321
                finally { if (e_4) throw e_4.error; }
50322
            }
50323
            return allLazyRoutes;
50324
            var e_4, _a;
50325
        }
50326
        var e_3, _d, e_2, _c;
50327
    };
50328
    return AotCompiler;
50329
}());
50330
function _createEmptyStub(outputCtx) {
50331
    // Note: We need to produce at least one import statement so that
50332
    // TypeScript knows that the file is an es6 module. Otherwise our generated
50333
    // exports / imports won't be emitted properly by TypeScript.
50334
    outputCtx.statements.push(importExpr(Identifiers.ComponentFactory).toStmt());
50335
}
50336
function _resolveStyleStatements(symbolResolver, compileResult, needsShim, fileSuffix) {
50337
    compileResult.dependencies.forEach(function (dep) {
50338
        dep.setValue(symbolResolver.getStaticSymbol(_stylesModuleUrl(dep.moduleUrl, needsShim, fileSuffix), dep.name));
50339
    });
50340
}
50341
function _stylesModuleUrl(stylesheetUrl, shim, suffix) {
50342
    return "" + stylesheetUrl + (shim ? '.shim' : '') + ".ngstyle" + suffix;
50343
}
50344
function analyzeNgModules(fileNames, host, staticSymbolResolver, metadataResolver) {
50345
    var files = _analyzeFilesIncludingNonProgramFiles(fileNames, host, staticSymbolResolver, metadataResolver);
50346
    return mergeAnalyzedFiles(files);
50347
}
50348
function analyzeAndValidateNgModules(fileNames, host, staticSymbolResolver, metadataResolver) {
50349
    return validateAnalyzedModules(analyzeNgModules(fileNames, host, staticSymbolResolver, metadataResolver));
50350
}
50351
function validateAnalyzedModules(analyzedModules) {
50352
    if (analyzedModules.symbolsMissingModule && analyzedModules.symbolsMissingModule.length) {
50353
        var messages = analyzedModules.symbolsMissingModule.map(function (s) {
50354
            return "Cannot determine the module for class " + s.name + " in " + s.filePath + "! Add " + s.name + " to the NgModule to fix it.";
50355
        });
50356
        throw syntaxError(messages.join('\n'));
50357
    }
50358
    return analyzedModules;
50359
}
50360
// Analyzes all of the program files,
50361
// including files that are not part of the program
50362
// but are referenced by an NgModule.
50363
function _analyzeFilesIncludingNonProgramFiles(fileNames, host, staticSymbolResolver, metadataResolver) {
50364
    var seenFiles = new Set();
50365
    var files = [];
50366
    var visitFile = function (fileName) {
50367
        if (seenFiles.has(fileName) || !host.isSourceFile(fileName)) {
50368
            return false;
50369
        }
50370
        seenFiles.add(fileName);
50371
        var analyzedFile = analyzeFile(host, staticSymbolResolver, metadataResolver, fileName);
50372
        files.push(analyzedFile);
50373
        analyzedFile.ngModules.forEach(function (ngModule) {
50374
            ngModule.transitiveModule.modules.forEach(function (modMeta) { return visitFile(modMeta.reference.filePath); });
50375
        });
50376
    };
50377
    fileNames.forEach(function (fileName) { return visitFile(fileName); });
50378
    return files;
50379
}
50380
function analyzeFile(host, staticSymbolResolver, metadataResolver, fileName) {
50381
    var directives = [];
50382
    var pipes = [];
50383
    var injectables = [];
50384
    var ngModules = [];
50385
    var hasDecorators = staticSymbolResolver.hasDecorators(fileName);
50386
    var exportsNonSourceFiles = false;
50387
    // Don't analyze .d.ts files that have no decorators as a shortcut
50388
    // to speed up the analysis. This prevents us from
50389
    // resolving the references in these files.
50390
    // Note: exportsNonSourceFiles is only needed when compiling with summaries,
50391
    // which is not the case when .d.ts files are treated as input files.
50392
    if (!fileName.endsWith('.d.ts') || hasDecorators) {
50393
        staticSymbolResolver.getSymbolsOf(fileName).forEach(function (symbol) {
50394
            var resolvedSymbol = staticSymbolResolver.resolveSymbol(symbol);
50395
            var symbolMeta = resolvedSymbol.metadata;
50396
            if (!symbolMeta || symbolMeta.__symbolic === 'error') {
50397
                return;
50398
            }
50399
            var isNgSymbol = false;
50400
            if (symbolMeta.__symbolic === 'class') {
50401
                if (metadataResolver.isDirective(symbol)) {
50402
                    isNgSymbol = true;
50403
                    directives.push(symbol);
50404
                }
50405
                else if (metadataResolver.isPipe(symbol)) {
50406
                    isNgSymbol = true;
50407
                    pipes.push(symbol);
50408
                }
50409
                else if (metadataResolver.isNgModule(symbol)) {
50410
                    var ngModule = metadataResolver.getNgModuleMetadata(symbol, false);
50411
                    if (ngModule) {
50412
                        isNgSymbol = true;
50413
                        ngModules.push(ngModule);
50414
                    }
50415
                }
50416
                else if (metadataResolver.isInjectable(symbol)) {
50417
                    isNgSymbol = true;
50418
                    var injectable = metadataResolver.getInjectableMetadata(symbol, null, false);
50419
                    if (injectable) {
50420
                        injectables.push(injectable);
50421
                    }
50422
                }
50423
            }
50424
            if (!isNgSymbol) {
50425
                exportsNonSourceFiles =
50426
                    exportsNonSourceFiles || isValueExportingNonSourceFile(host, symbolMeta);
50427
            }
50428
        });
50429
    }
50430
    return {
50431
        fileName: fileName, directives: directives, pipes: pipes, ngModules: ngModules, injectables: injectables, exportsNonSourceFiles: exportsNonSourceFiles,
50432
    };
50433
}
50434
function analyzeFileForInjectables(host, staticSymbolResolver, metadataResolver, fileName) {
50435
    var injectables = [];
50436
    var shallowModules = [];
50437
    if (staticSymbolResolver.hasDecorators(fileName)) {
50438
        staticSymbolResolver.getSymbolsOf(fileName).forEach(function (symbol) {
50439
            var resolvedSymbol = staticSymbolResolver.resolveSymbol(symbol);
50440
            var symbolMeta = resolvedSymbol.metadata;
50441
            if (!symbolMeta || symbolMeta.__symbolic === 'error') {
50442
                return;
50443
            }
50444
            if (symbolMeta.__symbolic === 'class') {
50445
                if (metadataResolver.isInjectable(symbol)) {
50446
                    var injectable = metadataResolver.getInjectableMetadata(symbol, null, false);
50447
                    if (injectable) {
50448
                        injectables.push(injectable);
50449
                    }
50450
                }
50451
                else if (metadataResolver.isNgModule(symbol)) {
50452
                    var module = metadataResolver.getShallowModuleMetadata(symbol);
50453
                    if (module) {
50454
                        shallowModules.push(module);
50455
                    }
50456
                }
50457
            }
50458
        });
50459
    }
50460
    return { fileName: fileName, injectables: injectables, shallowModules: shallowModules };
50461
}
50462
function isValueExportingNonSourceFile(host, metadata) {
50463
    var exportsNonSourceFiles = false;
50464
    var Visitor = /** @class */ (function () {
50465
        function Visitor() {
50466
        }
50467
        Visitor.prototype.visitArray = function (arr, context) {
50468
            var _this = this;
50469
            arr.forEach(function (v) { return visitValue(v, _this, context); });
50470
        };
50471
        Visitor.prototype.visitStringMap = function (map, context) {
50472
            var _this = this;
50473
            Object.keys(map).forEach(function (key) { return visitValue(map[key], _this, context); });
50474
        };
50475
        Visitor.prototype.visitPrimitive = function (value, context) { };
50476
        Visitor.prototype.visitOther = function (value, context) {
50477
            if (value instanceof StaticSymbol && !host.isSourceFile(value.filePath)) {
50478
                exportsNonSourceFiles = true;
50479
            }
50480
        };
50481
        return Visitor;
50482
    }());
50483
    visitValue(metadata, new Visitor(), null);
50484
    return exportsNonSourceFiles;
50485
}
50486
function mergeAnalyzedFiles(analyzedFiles) {
50487
    var allNgModules = [];
50488
    var ngModuleByPipeOrDirective = new Map();
50489
    var allPipesAndDirectives = new Set();
50490
    analyzedFiles.forEach(function (af) {
50491
        af.ngModules.forEach(function (ngModule) {
50492
            allNgModules.push(ngModule);
50493
            ngModule.declaredDirectives.forEach(function (d) { return ngModuleByPipeOrDirective.set(d.reference, ngModule); });
50494
            ngModule.declaredPipes.forEach(function (p) { return ngModuleByPipeOrDirective.set(p.reference, ngModule); });
50495
        });
50496
        af.directives.forEach(function (d) { return allPipesAndDirectives.add(d); });
50497
        af.pipes.forEach(function (p) { return allPipesAndDirectives.add(p); });
50498
    });
50499
    var symbolsMissingModule = [];
50500
    allPipesAndDirectives.forEach(function (ref) {
50501
        if (!ngModuleByPipeOrDirective.has(ref)) {
50502
            symbolsMissingModule.push(ref);
50503
        }
50504
    });
50505
    return {
50506
        ngModules: allNgModules,
50507
        ngModuleByPipeOrDirective: ngModuleByPipeOrDirective,
50508
        symbolsMissingModule: symbolsMissingModule,
50509
        files: analyzedFiles
50510
    };
50511
}
50512
function mergeAndValidateNgFiles(files) {
50513
    return validateAnalyzedModules(mergeAnalyzedFiles(files));
50514
}
50515
 
50516
/**
50517
 * @license
50518
 * Copyright Google Inc. All Rights Reserved.
50519
 *
50520
 * Use of this source code is governed by an MIT-style license that can be
50521
 * found in the LICENSE file at https://angular.io/license
50522
 */
50523
var FORMATTED_MESSAGE = 'ngFormattedMessage';
50524
function indentStr(level) {
50525
    if (level <= 0)
50526
        return '';
50527
    if (level < 6)
50528
        return ['', ' ', '  ', '   ', '    ', '     '][level];
50529
    var half = indentStr(Math.floor(level / 2));
50530
    return half + half + (level % 2 === 1 ? ' ' : '');
50531
}
50532
function formatChain(chain, indent) {
50533
    if (indent === void 0) { indent = 0; }
50534
    if (!chain)
50535
        return '';
50536
    var position = chain.position ?
50537
        chain.position.fileName + "(" + (chain.position.line + 1) + "," + (chain.position.column + 1) + ")" :
50538
        '';
50539
    var prefix = position && indent === 0 ? position + ": " : '';
50540
    var postfix = position && indent !== 0 ? " at " + position : '';
50541
    var message = "" + prefix + chain.message + postfix;
50542
    return "" + indentStr(indent) + message + ((chain.next && ('\n' + formatChain(chain.next, indent + 2))) || '');
50543
}
50544
function formattedError(chain) {
50545
    var message = formatChain(chain) + '.';
50546
    var error$$1 = syntaxError(message);
50547
    error$$1[FORMATTED_MESSAGE] = true;
50548
    error$$1.chain = chain;
50549
    error$$1.position = chain.position;
50550
    return error$$1;
50551
}
50552
function isFormattedError(error$$1) {
50553
    return !!error$$1[FORMATTED_MESSAGE];
50554
}
50555
 
50556
/**
50557
 * @license
50558
 * Copyright Google Inc. All Rights Reserved.
50559
 *
50560
 * Use of this source code is governed by an MIT-style license that can be
50561
 * found in the LICENSE file at https://angular.io/license
50562
 */
50563
var ANGULAR_CORE = '@angular/core';
50564
var ANGULAR_ROUTER = '@angular/router';
50565
var HIDDEN_KEY = /^\$.*\$$/;
50566
var IGNORE = {
50567
    __symbolic: 'ignore'
50568
};
50569
var USE_VALUE = 'useValue';
50570
var PROVIDE = 'provide';
50571
var REFERENCE_SET = new Set([USE_VALUE, 'useFactory', 'data', 'id', 'loadChildren']);
50572
var TYPEGUARD_POSTFIX = 'TypeGuard';
50573
var USE_IF = 'UseIf';
50574
function shouldIgnore(value) {
50575
    return value && value.__symbolic == 'ignore';
50576
}
50577
/**
50578
 * A static reflector implements enough of the Reflector API that is necessary to compile
50579
 * templates statically.
50580
 */
50581
var StaticReflector = /** @class */ (function () {
50582
    function StaticReflector(summaryResolver, symbolResolver, knownMetadataClasses, knownMetadataFunctions, errorRecorder) {
50583
        if (knownMetadataClasses === void 0) { knownMetadataClasses = []; }
50584
        if (knownMetadataFunctions === void 0) { knownMetadataFunctions = []; }
50585
        var _this = this;
50586
        this.summaryResolver = summaryResolver;
50587
        this.symbolResolver = symbolResolver;
50588
        this.errorRecorder = errorRecorder;
50589
        this.annotationCache = new Map();
50590
        this.shallowAnnotationCache = new Map();
50591
        this.propertyCache = new Map();
50592
        this.parameterCache = new Map();
50593
        this.methodCache = new Map();
50594
        this.staticCache = new Map();
50595
        this.conversionMap = new Map();
50596
        this.resolvedExternalReferences = new Map();
50597
        this.annotationForParentClassWithSummaryKind = new Map();
50598
        this.initializeConversionMap();
50599
        knownMetadataClasses.forEach(function (kc) { return _this._registerDecoratorOrConstructor(_this.getStaticSymbol(kc.filePath, kc.name), kc.ctor); });
50600
        knownMetadataFunctions.forEach(function (kf) { return _this._registerFunction(_this.getStaticSymbol(kf.filePath, kf.name), kf.fn); });
50601
        this.annotationForParentClassWithSummaryKind.set(CompileSummaryKind.Directive, [createDirective, createComponent]);
50602
        this.annotationForParentClassWithSummaryKind.set(CompileSummaryKind.Pipe, [createPipe]);
50603
        this.annotationForParentClassWithSummaryKind.set(CompileSummaryKind.NgModule, [createNgModule]);
50604
        this.annotationForParentClassWithSummaryKind.set(CompileSummaryKind.Injectable, [createInjectable, createPipe, createDirective, createComponent, createNgModule]);
50605
    }
50606
    StaticReflector.prototype.componentModuleUrl = function (typeOrFunc) {
50607
        var staticSymbol = this.findSymbolDeclaration(typeOrFunc);
50608
        return this.symbolResolver.getResourcePath(staticSymbol);
50609
    };
50610
    StaticReflector.prototype.resolveExternalReference = function (ref, containingFile) {
50611
        var key = undefined;
50612
        if (!containingFile) {
50613
            key = ref.moduleName + ":" + ref.name;
50614
            var declarationSymbol_1 = this.resolvedExternalReferences.get(key);
50615
            if (declarationSymbol_1)
50616
                return declarationSymbol_1;
50617
        }
50618
        var refSymbol = this.symbolResolver.getSymbolByModule(ref.moduleName, ref.name, containingFile);
50619
        var declarationSymbol = this.findSymbolDeclaration(refSymbol);
50620
        if (!containingFile) {
50621
            this.symbolResolver.recordModuleNameForFileName(refSymbol.filePath, ref.moduleName);
50622
            this.symbolResolver.recordImportAs(declarationSymbol, refSymbol);
50623
        }
50624
        if (key) {
50625
            this.resolvedExternalReferences.set(key, declarationSymbol);
50626
        }
50627
        return declarationSymbol;
50628
    };
50629
    StaticReflector.prototype.findDeclaration = function (moduleUrl, name, containingFile) {
50630
        return this.findSymbolDeclaration(this.symbolResolver.getSymbolByModule(moduleUrl, name, containingFile));
50631
    };
50632
    StaticReflector.prototype.tryFindDeclaration = function (moduleUrl, name, containingFile) {
50633
        var _this = this;
50634
        return this.symbolResolver.ignoreErrorsFor(function () { return _this.findDeclaration(moduleUrl, name, containingFile); });
50635
    };
50636
    StaticReflector.prototype.findSymbolDeclaration = function (symbol) {
50637
        var resolvedSymbol = this.symbolResolver.resolveSymbol(symbol);
50638
        if (resolvedSymbol) {
50639
            var resolvedMetadata = resolvedSymbol.metadata;
50640
            if (resolvedMetadata && resolvedMetadata.__symbolic === 'resolved') {
50641
                resolvedMetadata = resolvedMetadata.symbol;
50642
            }
50643
            if (resolvedMetadata instanceof StaticSymbol) {
50644
                return this.findSymbolDeclaration(resolvedSymbol.metadata);
50645
            }
50646
        }
50647
        return symbol;
50648
    };
50649
    StaticReflector.prototype.tryAnnotations = function (type) {
50650
        var originalRecorder = this.errorRecorder;
50651
        this.errorRecorder = function (error$$1, fileName) { };
50652
        try {
50653
            return this.annotations(type);
50654
        }
50655
        finally {
50656
            this.errorRecorder = originalRecorder;
50657
        }
50658
    };
50659
    StaticReflector.prototype.annotations = function (type) {
50660
        var _this = this;
50661
        return this._annotations(type, function (type, decorators) { return _this.simplify(type, decorators); }, this.annotationCache);
50662
    };
50663
    StaticReflector.prototype.shallowAnnotations = function (type) {
50664
        var _this = this;
50665
        return this._annotations(type, function (type, decorators) { return _this.simplify(type, decorators, true); }, this.shallowAnnotationCache);
50666
    };
50667
    StaticReflector.prototype._annotations = function (type, simplify, annotationCache) {
50668
        var annotations = annotationCache.get(type);
50669
        if (!annotations) {
50670
            annotations = [];
50671
            var classMetadata = this.getTypeMetadata(type);
50672
            var parentType = this.findParentType(type, classMetadata);
50673
            if (parentType) {
50674
                var parentAnnotations = this.annotations(parentType);
50675
                annotations.push.apply(annotations, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(parentAnnotations));
50676
            }
50677
            var ownAnnotations_1 = [];
50678
            if (classMetadata['decorators']) {
50679
                ownAnnotations_1 = simplify(type, classMetadata['decorators']);
50680
                if (ownAnnotations_1) {
50681
                    annotations.push.apply(annotations, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(ownAnnotations_1));
50682
                }
50683
            }
50684
            if (parentType && !this.summaryResolver.isLibraryFile(type.filePath) &&
50685
                this.summaryResolver.isLibraryFile(parentType.filePath)) {
50686
                var summary = this.summaryResolver.resolveSummary(parentType);
50687
                if (summary && summary.type) {
50688
                    var requiredAnnotationTypes = this.annotationForParentClassWithSummaryKind.get(summary.type.summaryKind);
50689
                    var typeHasRequiredAnnotation = requiredAnnotationTypes.some(function (requiredType) { return ownAnnotations_1.some(function (ann) { return requiredType.isTypeOf(ann); }); });
50690
                    if (!typeHasRequiredAnnotation) {
50691
                        this.reportError(formatMetadataError(metadataError("Class " + type.name + " in " + type.filePath + " extends from a " + CompileSummaryKind[summary.type.summaryKind] + " in another compilation unit without duplicating the decorator",
50692
                        /* summary */ undefined, "Please add a " + requiredAnnotationTypes.map(function (type) { return type.ngMetadataName; }).join(' or ') + " decorator to the class"), type), type);
50693
                    }
50694
                }
50695
            }
50696
            annotationCache.set(type, annotations.filter(function (ann) { return !!ann; }));
50697
        }
50698
        return annotations;
50699
    };
50700
    StaticReflector.prototype.propMetadata = function (type) {
50701
        var _this = this;
50702
        var propMetadata = this.propertyCache.get(type);
50703
        if (!propMetadata) {
50704
            var classMetadata = this.getTypeMetadata(type);
50705
            propMetadata = {};
50706
            var parentType = this.findParentType(type, classMetadata);
50707
            if (parentType) {
50708
                var parentPropMetadata_1 = this.propMetadata(parentType);
50709
                Object.keys(parentPropMetadata_1).forEach(function (parentProp) {
50710
                    propMetadata[parentProp] = parentPropMetadata_1[parentProp];
50711
                });
50712
            }
50713
            var members_1 = classMetadata['members'] || {};
50714
            Object.keys(members_1).forEach(function (propName) {
50715
                var propData = members_1[propName];
50716
                var prop = propData
50717
                    .find(function (a) { return a['__symbolic'] == 'property' || a['__symbolic'] == 'method'; });
50718
                var decorators = [];
50719
                if (propMetadata[propName]) {
50720
                    decorators.push.apply(decorators, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(propMetadata[propName]));
50721
                }
50722
                propMetadata[propName] = decorators;
50723
                if (prop && prop['decorators']) {
50724
                    decorators.push.apply(decorators, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(_this.simplify(type, prop['decorators'])));
50725
                }
50726
            });
50727
            this.propertyCache.set(type, propMetadata);
50728
        }
50729
        return propMetadata;
50730
    };
50731
    StaticReflector.prototype.parameters = function (type) {
50732
        var _this = this;
50733
        if (!(type instanceof StaticSymbol)) {
50734
            this.reportError(new Error("parameters received " + JSON.stringify(type) + " which is not a StaticSymbol"), type);
50735
            return [];
50736
        }
50737
        try {
50738
            var parameters_1 = this.parameterCache.get(type);
50739
            if (!parameters_1) {
50740
                var classMetadata = this.getTypeMetadata(type);
50741
                var parentType = this.findParentType(type, classMetadata);
50742
                var members = classMetadata ? classMetadata['members'] : null;
50743
                var ctorData = members ? members['__ctor__'] : null;
50744
                if (ctorData) {
50745
                    var ctor = ctorData.find(function (a) { return a['__symbolic'] == 'constructor'; });
50746
                    var rawParameterTypes = ctor['parameters'] || [];
50747
                    var parameterDecorators_1 = this.simplify(type, ctor['parameterDecorators'] || []);
50748
                    parameters_1 = [];
50749
                    rawParameterTypes.forEach(function (rawParamType, index) {
50750
                        var nestedResult = [];
50751
                        var paramType = _this.trySimplify(type, rawParamType);
50752
                        if (paramType)
50753
                            nestedResult.push(paramType);
50754
                        var decorators = parameterDecorators_1 ? parameterDecorators_1[index] : null;
50755
                        if (decorators) {
50756
                            nestedResult.push.apply(nestedResult, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(decorators));
50757
                        }
50758
                        parameters_1.push(nestedResult);
50759
                    });
50760
                }
50761
                else if (parentType) {
50762
                    parameters_1 = this.parameters(parentType);
50763
                }
50764
                if (!parameters_1) {
50765
                    parameters_1 = [];
50766
                }
50767
                this.parameterCache.set(type, parameters_1);
50768
            }
50769
            return parameters_1;
50770
        }
50771
        catch (e) {
50772
            console.error("Failed on type " + JSON.stringify(type) + " with error " + e);
50773
            throw e;
50774
        }
50775
    };
50776
    StaticReflector.prototype._methodNames = function (type) {
50777
        var methodNames = this.methodCache.get(type);
50778
        if (!methodNames) {
50779
            var classMetadata = this.getTypeMetadata(type);
50780
            methodNames = {};
50781
            var parentType = this.findParentType(type, classMetadata);
50782
            if (parentType) {
50783
                var parentMethodNames_1 = this._methodNames(parentType);
50784
                Object.keys(parentMethodNames_1).forEach(function (parentProp) {
50785
                    methodNames[parentProp] = parentMethodNames_1[parentProp];
50786
                });
50787
            }
50788
            var members_2 = classMetadata['members'] || {};
50789
            Object.keys(members_2).forEach(function (propName) {
50790
                var propData = members_2[propName];
50791
                var isMethod = propData.some(function (a) { return a['__symbolic'] == 'method'; });
50792
                methodNames[propName] = methodNames[propName] || isMethod;
50793
            });
50794
            this.methodCache.set(type, methodNames);
50795
        }
50796
        return methodNames;
50797
    };
50798
    StaticReflector.prototype._staticMembers = function (type) {
50799
        var staticMembers = this.staticCache.get(type);
50800
        if (!staticMembers) {
50801
            var classMetadata = this.getTypeMetadata(type);
50802
            var staticMemberData = classMetadata['statics'] || {};
50803
            staticMembers = Object.keys(staticMemberData);
50804
            this.staticCache.set(type, staticMembers);
50805
        }
50806
        return staticMembers;
50807
    };
50808
    StaticReflector.prototype.findParentType = function (type, classMetadata) {
50809
        var parentType = this.trySimplify(type, classMetadata['extends']);
50810
        if (parentType instanceof StaticSymbol) {
50811
            return parentType;
50812
        }
50813
    };
50814
    StaticReflector.prototype.hasLifecycleHook = function (type, lcProperty) {
50815
        if (!(type instanceof StaticSymbol)) {
50816
            this.reportError(new Error("hasLifecycleHook received " + JSON.stringify(type) + " which is not a StaticSymbol"), type);
50817
        }
50818
        try {
50819
            return !!this._methodNames(type)[lcProperty];
50820
        }
50821
        catch (e) {
50822
            console.error("Failed on type " + JSON.stringify(type) + " with error " + e);
50823
            throw e;
50824
        }
50825
    };
50826
    StaticReflector.prototype.guards = function (type) {
50827
        if (!(type instanceof StaticSymbol)) {
50828
            this.reportError(new Error("guards received " + JSON.stringify(type) + " which is not a StaticSymbol"), type);
50829
            return {};
50830
        }
50831
        var staticMembers = this._staticMembers(type);
50832
        var result = {};
50833
        try {
50834
            for (var staticMembers_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(staticMembers), staticMembers_1_1 = staticMembers_1.next(); !staticMembers_1_1.done; staticMembers_1_1 = staticMembers_1.next()) {
50835
                var name_1 = staticMembers_1_1.value;
50836
                if (name_1.endsWith(TYPEGUARD_POSTFIX)) {
50837
                    var property = name_1.substr(0, name_1.length - TYPEGUARD_POSTFIX.length);
50838
                    var value = void 0;
50839
                    if (property.endsWith(USE_IF)) {
50840
                        property = name_1.substr(0, property.length - USE_IF.length);
50841
                        value = USE_IF;
50842
                    }
50843
                    else {
50844
                        value = this.getStaticSymbol(type.filePath, type.name, [name_1]);
50845
                    }
50846
                    result[property] = value;
50847
                }
50848
            }
50849
        }
50850
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
50851
        finally {
50852
            try {
50853
                if (staticMembers_1_1 && !staticMembers_1_1.done && (_a = staticMembers_1.return)) _a.call(staticMembers_1);
50854
            }
50855
            finally { if (e_1) throw e_1.error; }
50856
        }
50857
        return result;
50858
        var e_1, _a;
50859
    };
50860
    StaticReflector.prototype._registerDecoratorOrConstructor = function (type, ctor) {
50861
        this.conversionMap.set(type, function (context, args) { return new (ctor.bind.apply(ctor, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], args)))(); });
50862
    };
50863
    StaticReflector.prototype._registerFunction = function (type, fn) {
50864
        this.conversionMap.set(type, function (context, args) { return fn.apply(undefined, args); });
50865
    };
50866
    StaticReflector.prototype.initializeConversionMap = function () {
50867
        this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Injectable'), createInjectable);
50868
        this.injectionToken = this.findDeclaration(ANGULAR_CORE, 'InjectionToken');
50869
        this.opaqueToken = this.findDeclaration(ANGULAR_CORE, 'OpaqueToken');
50870
        this.ROUTES = this.tryFindDeclaration(ANGULAR_ROUTER, 'ROUTES');
50871
        this.ANALYZE_FOR_ENTRY_COMPONENTS =
50872
            this.findDeclaration(ANGULAR_CORE, 'ANALYZE_FOR_ENTRY_COMPONENTS');
50873
        this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Host'), createHost);
50874
        this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Self'), createSelf);
50875
        this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'SkipSelf'), createSkipSelf);
50876
        this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Inject'), createInject);
50877
        this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Optional'), createOptional);
50878
        this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Attribute'), createAttribute);
50879
        this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'ContentChild'), createContentChild);
50880
        this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'ContentChildren'), createContentChildren);
50881
        this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'ViewChild'), createViewChild);
50882
        this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'ViewChildren'), createViewChildren);
50883
        this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Input'), createInput);
50884
        this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Output'), createOutput);
50885
        this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Pipe'), createPipe);
50886
        this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'HostBinding'), createHostBinding);
50887
        this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'HostListener'), createHostListener);
50888
        this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Directive'), createDirective);
50889
        this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Component'), createComponent);
50890
        this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'NgModule'), createNgModule);
50891
        // Note: Some metadata classes can be used directly with Provider.deps.
50892
        this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Host'), createHost);
50893
        this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Self'), createSelf);
50894
        this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'SkipSelf'), createSkipSelf);
50895
        this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Optional'), createOptional);
50896
    };
50897
    /**
50898
     * getStaticSymbol produces a Type whose metadata is known but whose implementation is not loaded.
50899
     * All types passed to the StaticResolver should be pseudo-types returned by this method.
50900
     *
50901
     * @param declarationFile the absolute path of the file where the symbol is declared
50902
     * @param name the name of the type.
50903
     */
50904
    StaticReflector.prototype.getStaticSymbol = function (declarationFile, name, members) {
50905
        return this.symbolResolver.getStaticSymbol(declarationFile, name, members);
50906
    };
50907
    /**
50908
     * Simplify but discard any errors
50909
     */
50910
    StaticReflector.prototype.trySimplify = function (context, value) {
50911
        var originalRecorder = this.errorRecorder;
50912
        this.errorRecorder = function (error$$1, fileName) { };
50913
        var result = this.simplify(context, value);
50914
        this.errorRecorder = originalRecorder;
50915
        return result;
50916
    };
50917
    /** @internal */
50918
    StaticReflector.prototype.simplify = function (context, value, lazy) {
50919
        if (lazy === void 0) { lazy = false; }
50920
        var self = this;
50921
        var scope = BindingScope$1.empty;
50922
        var calling = new Map();
50923
        function simplifyInContext(context, value, depth, references) {
50924
            function resolveReferenceValue(staticSymbol) {
50925
                var resolvedSymbol = self.symbolResolver.resolveSymbol(staticSymbol);
50926
                return resolvedSymbol ? resolvedSymbol.metadata : null;
50927
            }
50928
            function simplifyEagerly(value) {
50929
                return simplifyInContext(context, value, depth, 0);
50930
            }
50931
            function simplifyLazily(value) {
50932
                return simplifyInContext(context, value, depth, references + 1);
50933
            }
50934
            function simplifyNested(nestedContext, value) {
50935
                if (nestedContext === context) {
50936
                    // If the context hasn't changed let the exception propagate unmodified.
50937
                    return simplifyInContext(nestedContext, value, depth + 1, references);
50938
                }
50939
                try {
50940
                    return simplifyInContext(nestedContext, value, depth + 1, references);
50941
                }
50942
                catch (e) {
50943
                    if (isMetadataError(e)) {
50944
                        // Propagate the message text up but add a message to the chain that explains how we got
50945
                        // here.
50946
                        // e.chain implies e.symbol
50947
                        var summaryMsg = e.chain ? 'references \'' + e.symbol.name + '\'' : errorSummary(e);
50948
                        var summary = "'" + nestedContext.name + "' " + summaryMsg;
50949
                        var chain = { message: summary, position: e.position, next: e.chain };
50950
                        // TODO(chuckj): retrieve the position information indirectly from the collectors node
50951
                        // map if the metadata is from a .ts file.
50952
                        self.error({
50953
                            message: e.message,
50954
                            advise: e.advise,
50955
                            context: e.context, chain: chain,
50956
                            symbol: nestedContext
50957
                        }, context);
50958
                    }
50959
                    else {
50960
                        // It is probably an internal error.
50961
                        throw e;
50962
                    }
50963
                }
50964
            }
50965
            function simplifyCall(functionSymbol, targetFunction, args, targetExpression) {
50966
                if (targetFunction && targetFunction['__symbolic'] == 'function') {
50967
                    if (calling.get(functionSymbol)) {
50968
                        self.error({
50969
                            message: 'Recursion is not supported',
50970
                            summary: "called '" + functionSymbol.name + "' recursively",
50971
                            value: targetFunction
50972
                        }, functionSymbol);
50973
                    }
50974
                    try {
50975
                        var value_1 = targetFunction['value'];
50976
                        if (value_1 && (depth != 0 || value_1.__symbolic != 'error')) {
50977
                            var parameters = targetFunction['parameters'];
50978
                            var defaults = targetFunction.defaults;
50979
                            args = args.map(function (arg) { return simplifyNested(context, arg); })
50980
                                .map(function (arg) { return shouldIgnore(arg) ? undefined : arg; });
50981
                            if (defaults && defaults.length > args.length) {
50982
                                args.push.apply(args, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(defaults.slice(args.length).map(function (value) { return simplify(value); })));
50983
                            }
50984
                            calling.set(functionSymbol, true);
50985
                            var functionScope = BindingScope$1.build();
50986
                            for (var i = 0; i < parameters.length; i++) {
50987
                                functionScope.define(parameters[i], args[i]);
50988
                            }
50989
                            var oldScope = scope;
50990
                            var result_1;
50991
                            try {
50992
                                scope = functionScope.done();
50993
                                result_1 = simplifyNested(functionSymbol, value_1);
50994
                            }
50995
                            finally {
50996
                                scope = oldScope;
50997
                            }
50998
                            return result_1;
50999
                        }
51000
                    }
51001
                    finally {
51002
                        calling.delete(functionSymbol);
51003
                    }
51004
                }
51005
                if (depth === 0) {
51006
                    // If depth is 0 we are evaluating the top level expression that is describing element
51007
                    // decorator. In this case, it is a decorator we don't understand, such as a custom
51008
                    // non-angular decorator, and we should just ignore it.
51009
                    return IGNORE;
51010
                }
51011
                var position = undefined;
51012
                if (targetExpression && targetExpression.__symbolic == 'resolved') {
51013
                    var line = targetExpression.line;
51014
                    var character = targetExpression.character;
51015
                    var fileName = targetExpression.fileName;
51016
                    if (fileName != null && line != null && character != null) {
51017
                        position = { fileName: fileName, line: line, column: character };
51018
                    }
51019
                }
51020
                self.error({
51021
                    message: FUNCTION_CALL_NOT_SUPPORTED,
51022
                    context: functionSymbol,
51023
                    value: targetFunction, position: position
51024
                }, context);
51025
            }
51026
            function simplify(expression) {
51027
                if (isPrimitive(expression)) {
51028
                    return expression;
51029
                }
51030
                if (expression instanceof Array) {
51031
                    var result_2 = [];
51032
                    try {
51033
                        for (var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(expression), _b = _a.next(); !_b.done; _b = _a.next()) {
51034
                            var item = _b.value;
51035
                            // Check for a spread expression
51036
                            if (item && item.__symbolic === 'spread') {
51037
                                // We call with references as 0 because we require the actual value and cannot
51038
                                // tolerate a reference here.
51039
                                var spreadArray = simplifyEagerly(item.expression);
51040
                                if (Array.isArray(spreadArray)) {
51041
                                    try {
51042
                                        for (var spreadArray_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(spreadArray), spreadArray_1_1 = spreadArray_1.next(); !spreadArray_1_1.done; spreadArray_1_1 = spreadArray_1.next()) {
51043
                                            var spreadItem = spreadArray_1_1.value;
51044
                                            result_2.push(spreadItem);
51045
                                        }
51046
                                    }
51047
                                    catch (e_2_1) { e_2 = { error: e_2_1 }; }
51048
                                    finally {
51049
                                        try {
51050
                                            if (spreadArray_1_1 && !spreadArray_1_1.done && (_c = spreadArray_1.return)) _c.call(spreadArray_1);
51051
                                        }
51052
                                        finally { if (e_2) throw e_2.error; }
51053
                                    }
51054
                                    continue;
51055
                                }
51056
                            }
51057
                            var value_2 = simplify(item);
51058
                            if (shouldIgnore(value_2)) {
51059
                                continue;
51060
                            }
51061
                            result_2.push(value_2);
51062
                        }
51063
                    }
51064
                    catch (e_3_1) { e_3 = { error: e_3_1 }; }
51065
                    finally {
51066
                        try {
51067
                            if (_b && !_b.done && (_d = _a.return)) _d.call(_a);
51068
                        }
51069
                        finally { if (e_3) throw e_3.error; }
51070
                    }
51071
                    return result_2;
51072
                }
51073
                if (expression instanceof StaticSymbol) {
51074
                    // Stop simplification at builtin symbols or if we are in a reference context and
51075
                    // the symbol doesn't have members.
51076
                    if (expression === self.injectionToken || self.conversionMap.has(expression) ||
51077
                        (references > 0 && !expression.members.length)) {
51078
                        return expression;
51079
                    }
51080
                    else {
51081
                        var staticSymbol = expression;
51082
                        var declarationValue = resolveReferenceValue(staticSymbol);
51083
                        if (declarationValue != null) {
51084
                            return simplifyNested(staticSymbol, declarationValue);
51085
                        }
51086
                        else {
51087
                            return staticSymbol;
51088
                        }
51089
                    }
51090
                }
51091
                if (expression) {
51092
                    if (expression['__symbolic']) {
51093
                        var staticSymbol = void 0;
51094
                        switch (expression['__symbolic']) {
51095
                            case 'binop':
51096
                                var left = simplify(expression['left']);
51097
                                if (shouldIgnore(left))
51098
                                    return left;
51099
                                var right = simplify(expression['right']);
51100
                                if (shouldIgnore(right))
51101
                                    return right;
51102
                                switch (expression['operator']) {
51103
                                    case '&&':
51104
                                        return left && right;
51105
                                    case '||':
51106
                                        return left || right;
51107
                                    case '|':
51108
                                        return left | right;
51109
                                    case '^':
51110
                                        return left ^ right;
51111
                                    case '&':
51112
                                        return left & right;
51113
                                    case '==':
51114
                                        return left == right;
51115
                                    case '!=':
51116
                                        return left != right;
51117
                                    case '===':
51118
                                        return left === right;
51119
                                    case '!==':
51120
                                        return left !== right;
51121
                                    case '<':
51122
                                        return left < right;
51123
                                    case '>':
51124
                                        return left > right;
51125
                                    case '<=':
51126
                                        return left <= right;
51127
                                    case '>=':
51128
                                        return left >= right;
51129
                                    case '<<':
51130
                                        return left << right;
51131
                                    case '>>':
51132
                                        return left >> right;
51133
                                    case '+':
51134
                                        return left + right;
51135
                                    case '-':
51136
                                        return left - right;
51137
                                    case '*':
51138
                                        return left * right;
51139
                                    case '/':
51140
                                        return left / right;
51141
                                    case '%':
51142
                                        return left % right;
51143
                                }
51144
                                return null;
51145
                            case 'if':
51146
                                var condition = simplify(expression['condition']);
51147
                                return condition ? simplify(expression['thenExpression']) :
51148
                                    simplify(expression['elseExpression']);
51149
                            case 'pre':
51150
                                var operand = simplify(expression['operand']);
51151
                                if (shouldIgnore(operand))
51152
                                    return operand;
51153
                                switch (expression['operator']) {
51154
                                    case '+':
51155
                                        return operand;
51156
                                    case '-':
51157
                                        return -operand;
51158
                                    case '!':
51159
                                        return !operand;
51160
                                    case '~':
51161
                                        return ~operand;
51162
                                }
51163
                                return null;
51164
                            case 'index':
51165
                                var indexTarget = simplifyEagerly(expression['expression']);
51166
                                var index = simplifyEagerly(expression['index']);
51167
                                if (indexTarget && isPrimitive(index))
51168
                                    return indexTarget[index];
51169
                                return null;
51170
                            case 'select':
51171
                                var member = expression['member'];
51172
                                var selectContext = context;
51173
                                var selectTarget = simplify(expression['expression']);
51174
                                if (selectTarget instanceof StaticSymbol) {
51175
                                    var members = selectTarget.members.concat(member);
51176
                                    selectContext =
51177
                                        self.getStaticSymbol(selectTarget.filePath, selectTarget.name, members);
51178
                                    var declarationValue = resolveReferenceValue(selectContext);
51179
                                    if (declarationValue != null) {
51180
                                        return simplifyNested(selectContext, declarationValue);
51181
                                    }
51182
                                    else {
51183
                                        return selectContext;
51184
                                    }
51185
                                }
51186
                                if (selectTarget && isPrimitive(member))
51187
                                    return simplifyNested(selectContext, selectTarget[member]);
51188
                                return null;
51189
                            case 'reference':
51190
                                // Note: This only has to deal with variable references, as symbol references have
51191
                                // been converted into 'resolved'
51192
                                // in the StaticSymbolResolver.
51193
                                var name_2 = expression['name'];
51194
                                var localValue = scope.resolve(name_2);
51195
                                if (localValue != BindingScope$1.missing) {
51196
                                    return localValue;
51197
                                }
51198
                                break;
51199
                            case 'resolved':
51200
                                try {
51201
                                    return simplify(expression.symbol);
51202
                                }
51203
                                catch (e) {
51204
                                    // If an error is reported evaluating the symbol record the position of the
51205
                                    // reference in the error so it can
51206
                                    // be reported in the error message generated from the exception.
51207
                                    if (isMetadataError(e) && expression.fileName != null &&
51208
                                        expression.line != null && expression.character != null) {
51209
                                        e.position = {
51210
                                            fileName: expression.fileName,
51211
                                            line: expression.line,
51212
                                            column: expression.character
51213
                                        };
51214
                                    }
51215
                                    throw e;
51216
                                }
51217
                            case 'class':
51218
                                return context;
51219
                            case 'function':
51220
                                return context;
51221
                            case 'new':
51222
                            case 'call':
51223
                                // Determine if the function is a built-in conversion
51224
                                staticSymbol = simplifyInContext(context, expression['expression'], depth + 1, /* references */ 0);
51225
                                if (staticSymbol instanceof StaticSymbol) {
51226
                                    if (staticSymbol === self.injectionToken || staticSymbol === self.opaqueToken) {
51227
                                        // if somebody calls new InjectionToken, don't create an InjectionToken,
51228
                                        // but rather return the symbol to which the InjectionToken is assigned to.
51229
                                        // OpaqueToken is supported too as it is required by the language service to
51230
                                        // support v4 and prior versions of Angular.
51231
                                        return context;
51232
                                    }
51233
                                    var argExpressions = expression['arguments'] || [];
51234
                                    var converter = self.conversionMap.get(staticSymbol);
51235
                                    if (converter) {
51236
                                        var args = argExpressions.map(function (arg) { return simplifyNested(context, arg); })
51237
                                            .map(function (arg) { return shouldIgnore(arg) ? undefined : arg; });
51238
                                        return converter(context, args);
51239
                                    }
51240
                                    else {
51241
                                        // Determine if the function is one we can simplify.
51242
                                        var targetFunction = resolveReferenceValue(staticSymbol);
51243
                                        return simplifyCall(staticSymbol, targetFunction, argExpressions, expression['expression']);
51244
                                    }
51245
                                }
51246
                                return IGNORE;
51247
                            case 'error':
51248
                                var message = expression.message;
51249
                                if (expression['line'] != null) {
51250
                                    self.error({
51251
                                        message: message,
51252
                                        context: expression.context,
51253
                                        value: expression,
51254
                                        position: {
51255
                                            fileName: expression['fileName'],
51256
                                            line: expression['line'],
51257
                                            column: expression['character']
51258
                                        }
51259
                                    }, context);
51260
                                }
51261
                                else {
51262
                                    self.error({ message: message, context: expression.context }, context);
51263
                                }
51264
                                return IGNORE;
51265
                            case 'ignore':
51266
                                return expression;
51267
                        }
51268
                        return null;
51269
                    }
51270
                    return mapStringMap(expression, function (value, name) {
51271
                        if (REFERENCE_SET.has(name)) {
51272
                            if (name === USE_VALUE && PROVIDE in expression) {
51273
                                // If this is a provider expression, check for special tokens that need the value
51274
                                // during analysis.
51275
                                var provide = simplify(expression.provide);
51276
                                if (provide === self.ROUTES || provide == self.ANALYZE_FOR_ENTRY_COMPONENTS) {
51277
                                    return simplify(value);
51278
                                }
51279
                            }
51280
                            return simplifyLazily(value);
51281
                        }
51282
                        return simplify(value);
51283
                    });
51284
                }
51285
                return IGNORE;
51286
                var e_3, _d, e_2, _c;
51287
            }
51288
            return simplify(value);
51289
        }
51290
        var result;
51291
        try {
51292
            result = simplifyInContext(context, value, 0, lazy ? 1 : 0);
51293
        }
51294
        catch (e) {
51295
            if (this.errorRecorder) {
51296
                this.reportError(e, context);
51297
            }
51298
            else {
51299
                throw formatMetadataError(e, context);
51300
            }
51301
        }
51302
        if (shouldIgnore(result)) {
51303
            return undefined;
51304
        }
51305
        return result;
51306
    };
51307
    StaticReflector.prototype.getTypeMetadata = function (type) {
51308
        var resolvedSymbol = this.symbolResolver.resolveSymbol(type);
51309
        return resolvedSymbol && resolvedSymbol.metadata ? resolvedSymbol.metadata :
51310
            { __symbolic: 'class' };
51311
    };
51312
    StaticReflector.prototype.reportError = function (error$$1, context, path) {
51313
        if (this.errorRecorder) {
51314
            this.errorRecorder(formatMetadataError(error$$1, context), (context && context.filePath) || path);
51315
        }
51316
        else {
51317
            throw error$$1;
51318
        }
51319
    };
51320
    StaticReflector.prototype.error = function (_a, reportingContext) {
51321
        var message = _a.message, summary = _a.summary, advise = _a.advise, position = _a.position, context = _a.context, value = _a.value, symbol = _a.symbol, chain = _a.chain;
51322
        this.reportError(metadataError(message, summary, advise, position, symbol, context, chain), reportingContext);
51323
    };
51324
    return StaticReflector;
51325
}());
51326
var METADATA_ERROR = 'ngMetadataError';
51327
function metadataError(message, summary, advise, position, symbol, context, chain) {
51328
    var error$$1 = syntaxError(message);
51329
    error$$1[METADATA_ERROR] = true;
51330
    if (advise)
51331
        error$$1.advise = advise;
51332
    if (position)
51333
        error$$1.position = position;
51334
    if (summary)
51335
        error$$1.summary = summary;
51336
    if (context)
51337
        error$$1.context = context;
51338
    if (chain)
51339
        error$$1.chain = chain;
51340
    if (symbol)
51341
        error$$1.symbol = symbol;
51342
    return error$$1;
51343
}
51344
function isMetadataError(error$$1) {
51345
    return !!error$$1[METADATA_ERROR];
51346
}
51347
var REFERENCE_TO_NONEXPORTED_CLASS = 'Reference to non-exported class';
51348
var VARIABLE_NOT_INITIALIZED = 'Variable not initialized';
51349
var DESTRUCTURE_NOT_SUPPORTED = 'Destructuring not supported';
51350
var COULD_NOT_RESOLVE_TYPE = 'Could not resolve type';
51351
var FUNCTION_CALL_NOT_SUPPORTED = 'Function call not supported';
51352
var REFERENCE_TO_LOCAL_SYMBOL = 'Reference to a local symbol';
51353
var LAMBDA_NOT_SUPPORTED = 'Lambda not supported';
51354
function expandedMessage(message, context) {
51355
    switch (message) {
51356
        case REFERENCE_TO_NONEXPORTED_CLASS:
51357
            if (context && context.className) {
51358
                return "References to a non-exported class are not supported in decorators but " + context.className + " was referenced.";
51359
            }
51360
            break;
51361
        case VARIABLE_NOT_INITIALIZED:
51362
            return 'Only initialized variables and constants can be referenced in decorators because the value of this variable is needed by the template compiler';
51363
        case DESTRUCTURE_NOT_SUPPORTED:
51364
            return 'Referencing an exported destructured variable or constant is not supported in decorators and this value is needed by the template compiler';
51365
        case COULD_NOT_RESOLVE_TYPE:
51366
            if (context && context.typeName) {
51367
                return "Could not resolve type " + context.typeName;
51368
            }
51369
            break;
51370
        case FUNCTION_CALL_NOT_SUPPORTED:
51371
            if (context && context.name) {
51372
                return "Function calls are not supported in decorators but '" + context.name + "' was called";
51373
            }
51374
            return 'Function calls are not supported in decorators';
51375
        case REFERENCE_TO_LOCAL_SYMBOL:
51376
            if (context && context.name) {
51377
                return "Reference to a local (non-exported) symbols are not supported in decorators but '" + context.name + "' was referenced";
51378
            }
51379
            break;
51380
        case LAMBDA_NOT_SUPPORTED:
51381
            return "Function expressions are not supported in decorators";
51382
    }
51383
    return message;
51384
}
51385
function messageAdvise(message, context) {
51386
    switch (message) {
51387
        case REFERENCE_TO_NONEXPORTED_CLASS:
51388
            if (context && context.className) {
51389
                return "Consider exporting '" + context.className + "'";
51390
            }
51391
            break;
51392
        case DESTRUCTURE_NOT_SUPPORTED:
51393
            return 'Consider simplifying to avoid destructuring';
51394
        case REFERENCE_TO_LOCAL_SYMBOL:
51395
            if (context && context.name) {
51396
                return "Consider exporting '" + context.name + "'";
51397
            }
51398
            break;
51399
        case LAMBDA_NOT_SUPPORTED:
51400
            return "Consider changing the function expression into an exported function";
51401
    }
51402
    return undefined;
51403
}
51404
function errorSummary(error$$1) {
51405
    if (error$$1.summary) {
51406
        return error$$1.summary;
51407
    }
51408
    switch (error$$1.message) {
51409
        case REFERENCE_TO_NONEXPORTED_CLASS:
51410
            if (error$$1.context && error$$1.context.className) {
51411
                return "references non-exported class " + error$$1.context.className;
51412
            }
51413
            break;
51414
        case VARIABLE_NOT_INITIALIZED:
51415
            return 'is not initialized';
51416
        case DESTRUCTURE_NOT_SUPPORTED:
51417
            return 'is a destructured variable';
51418
        case COULD_NOT_RESOLVE_TYPE:
51419
            return 'could not be resolved';
51420
        case FUNCTION_CALL_NOT_SUPPORTED:
51421
            if (error$$1.context && error$$1.context.name) {
51422
                return "calls '" + error$$1.context.name + "'";
51423
            }
51424
            return "calls a function";
51425
        case REFERENCE_TO_LOCAL_SYMBOL:
51426
            if (error$$1.context && error$$1.context.name) {
51427
                return "references local variable " + error$$1.context.name;
51428
            }
51429
            return "references a local variable";
51430
    }
51431
    return 'contains the error';
51432
}
51433
function mapStringMap(input, transform) {
51434
    if (!input)
51435
        return {};
51436
    var result = {};
51437
    Object.keys(input).forEach(function (key) {
51438
        var value = transform(input[key], key);
51439
        if (!shouldIgnore(value)) {
51440
            if (HIDDEN_KEY.test(key)) {
51441
                Object.defineProperty(result, key, { enumerable: false, configurable: true, value: value });
51442
            }
51443
            else {
51444
                result[key] = value;
51445
            }
51446
        }
51447
    });
51448
    return result;
51449
}
51450
function isPrimitive(o) {
51451
    return o === null || (typeof o !== 'function' && typeof o !== 'object');
51452
}
51453
var BindingScope$1 = /** @class */ (function () {
51454
    function BindingScope() {
51455
    }
51456
    BindingScope.build = function () {
51457
        var current = new Map();
51458
        return {
51459
            define: function (name, value) {
51460
                current.set(name, value);
51461
                return this;
51462
            },
51463
            done: function () {
51464
                return current.size > 0 ? new PopulatedScope(current) : BindingScope.empty;
51465
            }
51466
        };
51467
    };
51468
    BindingScope.missing = {};
51469
    BindingScope.empty = { resolve: function (name) { return BindingScope.missing; } };
51470
    return BindingScope;
51471
}());
51472
var PopulatedScope = /** @class */ (function (_super) {
51473
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PopulatedScope, _super);
51474
    function PopulatedScope(bindings) {
51475
        var _this = _super.call(this) || this;
51476
        _this.bindings = bindings;
51477
        return _this;
51478
    }
51479
    PopulatedScope.prototype.resolve = function (name) {
51480
        return this.bindings.has(name) ? this.bindings.get(name) : BindingScope$1.missing;
51481
    };
51482
    return PopulatedScope;
51483
}(BindingScope$1));
51484
function formatMetadataMessageChain(chain, advise) {
51485
    var expanded = expandedMessage(chain.message, chain.context);
51486
    var nesting = chain.symbol ? " in '" + chain.symbol.name + "'" : '';
51487
    var message = "" + expanded + nesting;
51488
    var position = chain.position;
51489
    var next = chain.next ?
51490
        formatMetadataMessageChain(chain.next, advise) :
51491
        advise ? { message: advise } : undefined;
51492
    return { message: message, position: position, next: next };
51493
}
51494
function formatMetadataError(e, context) {
51495
    if (isMetadataError(e)) {
51496
        // Produce a formatted version of the and leaving enough information in the original error
51497
        // to recover the formatting information to eventually produce a diagnostic error message.
51498
        var position = e.position;
51499
        var chain = {
51500
            message: "Error during template compile of '" + context.name + "'",
51501
            position: position,
51502
            next: { message: e.message, next: e.chain, context: e.context, symbol: e.symbol }
51503
        };
51504
        var advise = e.advise || messageAdvise(e.message, e.context);
51505
        return formattedError(formatMetadataMessageChain(chain, advise));
51506
    }
51507
    return e;
51508
}
51509
 
51510
/**
51511
 * @license
51512
 * Copyright Google Inc. All Rights Reserved.
51513
 *
51514
 * Use of this source code is governed by an MIT-style license that can be
51515
 * found in the LICENSE file at https://angular.io/license
51516
 */
51517
var AotSummaryResolver = /** @class */ (function () {
51518
    function AotSummaryResolver(host, staticSymbolCache) {
51519
        this.host = host;
51520
        this.staticSymbolCache = staticSymbolCache;
51521
        // Note: this will only contain StaticSymbols without members!
51522
        this.summaryCache = new Map();
51523
        this.loadedFilePaths = new Map();
51524
        // Note: this will only contain StaticSymbols without members!
51525
        this.importAs = new Map();
51526
        this.knownFileNameToModuleNames = new Map();
51527
    }
51528
    AotSummaryResolver.prototype.isLibraryFile = function (filePath) {
51529
        // Note: We need to strip the .ngfactory. file path,
51530
        // so this method also works for generated files
51531
        // (for which host.isSourceFile will always return false).
51532
        return !this.host.isSourceFile(stripGeneratedFileSuffix(filePath));
51533
    };
51534
    AotSummaryResolver.prototype.toSummaryFileName = function (filePath, referringSrcFileName) {
51535
        return this.host.toSummaryFileName(filePath, referringSrcFileName);
51536
    };
51537
    AotSummaryResolver.prototype.fromSummaryFileName = function (fileName, referringLibFileName) {
51538
        return this.host.fromSummaryFileName(fileName, referringLibFileName);
51539
    };
51540
    AotSummaryResolver.prototype.resolveSummary = function (staticSymbol) {
51541
        var rootSymbol = staticSymbol.members.length ?
51542
            this.staticSymbolCache.get(staticSymbol.filePath, staticSymbol.name) :
51543
            staticSymbol;
51544
        var summary = this.summaryCache.get(rootSymbol);
51545
        if (!summary) {
51546
            this._loadSummaryFile(staticSymbol.filePath);
51547
            summary = this.summaryCache.get(staticSymbol);
51548
        }
51549
        return (rootSymbol === staticSymbol && summary) || null;
51550
    };
51551
    AotSummaryResolver.prototype.getSymbolsOf = function (filePath) {
51552
        if (this._loadSummaryFile(filePath)) {
51553
            return Array.from(this.summaryCache.keys()).filter(function (symbol) { return symbol.filePath === filePath; });
51554
        }
51555
        return null;
51556
    };
51557
    AotSummaryResolver.prototype.getImportAs = function (staticSymbol) {
51558
        staticSymbol.assertNoMembers();
51559
        return this.importAs.get(staticSymbol);
51560
    };
51561
    /**
51562
     * Converts a file path to a module name that can be used as an `import`.
51563
     */
51564
    AotSummaryResolver.prototype.getKnownModuleName = function (importedFilePath) {
51565
        return this.knownFileNameToModuleNames.get(importedFilePath) || null;
51566
    };
51567
    AotSummaryResolver.prototype.addSummary = function (summary) { this.summaryCache.set(summary.symbol, summary); };
51568
    AotSummaryResolver.prototype._loadSummaryFile = function (filePath) {
51569
        var _this = this;
51570
        var hasSummary = this.loadedFilePaths.get(filePath);
51571
        if (hasSummary != null) {
51572
            return hasSummary;
51573
        }
51574
        var json = null;
51575
        if (this.isLibraryFile(filePath)) {
51576
            var summaryFilePath = summaryFileName(filePath);
51577
            try {
51578
                json = this.host.loadSummary(summaryFilePath);
51579
            }
51580
            catch (e) {
51581
                console.error("Error loading summary file " + summaryFilePath);
51582
                throw e;
51583
            }
51584
        }
51585
        hasSummary = json != null;
51586
        this.loadedFilePaths.set(filePath, hasSummary);
51587
        if (json) {
51588
            var _a = deserializeSummaries(this.staticSymbolCache, this, filePath, json), moduleName = _a.moduleName, summaries = _a.summaries, importAs = _a.importAs;
51589
            summaries.forEach(function (summary) { return _this.summaryCache.set(summary.symbol, summary); });
51590
            if (moduleName) {
51591
                this.knownFileNameToModuleNames.set(filePath, moduleName);
51592
            }
51593
            importAs.forEach(function (importAs) { _this.importAs.set(importAs.symbol, importAs.importAs); });
51594
        }
51595
        return hasSummary;
51596
    };
51597
    return AotSummaryResolver;
51598
}());
51599
 
51600
/**
51601
 * @license
51602
 * Copyright Google Inc. All Rights Reserved.
51603
 *
51604
 * Use of this source code is governed by an MIT-style license that can be
51605
 * found in the LICENSE file at https://angular.io/license
51606
 */
51607
function createAotUrlResolver(host) {
51608
    return {
51609
        resolve: function (basePath, url) {
51610
            var filePath = host.resourceNameToFileName(url, basePath);
51611
            if (!filePath) {
51612
                throw syntaxError("Couldn't resolve resource " + url + " from " + basePath);
51613
            }
51614
            return filePath;
51615
        }
51616
    };
51617
}
51618
/**
51619
 * Creates a new AotCompiler based on options and a host.
51620
 */
51621
function createAotCompiler(compilerHost, options, errorCollector) {
51622
    var translations = options.translations || '';
51623
    var urlResolver = createAotUrlResolver(compilerHost);
51624
    var symbolCache = new StaticSymbolCache();
51625
    var summaryResolver = new AotSummaryResolver(compilerHost, symbolCache);
51626
    var symbolResolver = new StaticSymbolResolver(compilerHost, symbolCache, summaryResolver);
51627
    var staticReflector = new StaticReflector(summaryResolver, symbolResolver, [], [], errorCollector);
51628
    var htmlParser;
51629
    if (!!options.enableIvy) {
51630
        // Ivy handles i18n at the compiler level so we must use a regular parser
51631
        htmlParser = new HtmlParser();
51632
    }
51633
    else {
51634
        htmlParser = new I18NHtmlParser(new HtmlParser(), translations, options.i18nFormat, options.missingTranslation, console);
51635
    }
51636
    var config = new CompilerConfig({
51637
        defaultEncapsulation: ViewEncapsulation.Emulated,
51638
        useJit: false,
51639
        missingTranslation: options.missingTranslation,
51640
        preserveWhitespaces: options.preserveWhitespaces,
51641
        strictInjectionParameters: options.strictInjectionParameters,
51642
    });
51643
    var normalizer = new DirectiveNormalizer({ get: function (url) { return compilerHost.loadResource(url); } }, urlResolver, htmlParser, config);
51644
    var expressionParser = new Parser(new Lexer());
51645
    var elementSchemaRegistry = new DomElementSchemaRegistry();
51646
    var tmplParser = new TemplateParser(config, staticReflector, expressionParser, elementSchemaRegistry, htmlParser, console, []);
51647
    var resolver = new CompileMetadataResolver(config, htmlParser, new NgModuleResolver(staticReflector), new DirectiveResolver(staticReflector), new PipeResolver(staticReflector), summaryResolver, elementSchemaRegistry, normalizer, console, symbolCache, staticReflector, errorCollector);
51648
    // TODO(vicb): do not pass options.i18nFormat here
51649
    var viewCompiler = new ViewCompiler(staticReflector);
51650
    var typeCheckCompiler = new TypeCheckCompiler(options, staticReflector);
51651
    var compiler = new AotCompiler(config, options, compilerHost, staticReflector, resolver, tmplParser, new StyleCompiler(urlResolver), viewCompiler, typeCheckCompiler, new NgModuleCompiler(staticReflector), new InjectableCompiler(staticReflector, !!options.enableIvy), new TypeScriptEmitter(), summaryResolver, symbolResolver);
51652
    return { compiler: compiler, reflector: staticReflector };
51653
}
51654
 
51655
var SummaryResolver = /** @class */ (function () {
51656
    function SummaryResolver() {
51657
    }
51658
    return SummaryResolver;
51659
}());
51660
var JitSummaryResolver = /** @class */ (function () {
51661
    function JitSummaryResolver() {
51662
        this._summaries = new Map();
51663
    }
51664
    JitSummaryResolver.prototype.isLibraryFile = function () { return false; };
51665
    JitSummaryResolver.prototype.toSummaryFileName = function (fileName) { return fileName; };
51666
    JitSummaryResolver.prototype.fromSummaryFileName = function (fileName) { return fileName; };
51667
    JitSummaryResolver.prototype.resolveSummary = function (reference) {
51668
        return this._summaries.get(reference) || null;
51669
    };
51670
    JitSummaryResolver.prototype.getSymbolsOf = function () { return []; };
51671
    JitSummaryResolver.prototype.getImportAs = function (reference) { return reference; };
51672
    JitSummaryResolver.prototype.getKnownModuleName = function (fileName) { return null; };
51673
    JitSummaryResolver.prototype.addSummary = function (summary) { this._summaries.set(summary.symbol, summary); };
51674
    return JitSummaryResolver;
51675
}());
51676
 
51677
/**
51678
 * @license
51679
 * Copyright Google Inc. All Rights Reserved.
51680
 *
51681
 * Use of this source code is governed by an MIT-style license that can be
51682
 * found in the LICENSE file at https://angular.io/license
51683
 */
51684
function interpretStatements(statements, reflector) {
51685
    var ctx = new _ExecutionContext(null, null, null, new Map());
51686
    var visitor = new StatementInterpreter(reflector);
51687
    visitor.visitAllStatements(statements, ctx);
51688
    var result = {};
51689
    ctx.exports.forEach(function (exportName) { result[exportName] = ctx.vars.get(exportName); });
51690
    return result;
51691
}
51692
function _executeFunctionStatements(varNames, varValues, statements, ctx, visitor) {
51693
    var childCtx = ctx.createChildWihtLocalVars();
51694
    for (var i = 0; i < varNames.length; i++) {
51695
        childCtx.vars.set(varNames[i], varValues[i]);
51696
    }
51697
    var result = visitor.visitAllStatements(statements, childCtx);
51698
    return result ? result.value : null;
51699
}
51700
var _ExecutionContext = /** @class */ (function () {
51701
    function _ExecutionContext(parent, instance, className, vars) {
51702
        this.parent = parent;
51703
        this.instance = instance;
51704
        this.className = className;
51705
        this.vars = vars;
51706
        this.exports = [];
51707
    }
51708
    _ExecutionContext.prototype.createChildWihtLocalVars = function () {
51709
        return new _ExecutionContext(this, this.instance, this.className, new Map());
51710
    };
51711
    return _ExecutionContext;
51712
}());
51713
var ReturnValue = /** @class */ (function () {
51714
    function ReturnValue(value) {
51715
        this.value = value;
51716
    }
51717
    return ReturnValue;
51718
}());
51719
function createDynamicClass(_classStmt, _ctx, _visitor) {
51720
    var propertyDescriptors = {};
51721
    _classStmt.getters.forEach(function (getter) {
51722
        // Note: use `function` instead of arrow function to capture `this`
51723
        propertyDescriptors[getter.name] = {
51724
            configurable: false,
51725
            get: function () {
51726
                var instanceCtx = new _ExecutionContext(_ctx, this, _classStmt.name, _ctx.vars);
51727
                return _executeFunctionStatements([], [], getter.body, instanceCtx, _visitor);
51728
            }
51729
        };
51730
    });
51731
    _classStmt.methods.forEach(function (method) {
51732
        var paramNames = method.params.map(function (param) { return param.name; });
51733
        // Note: use `function` instead of arrow function to capture `this`
51734
        propertyDescriptors[method.name] = {
51735
            writable: false,
51736
            configurable: false,
51737
            value: function () {
51738
                var args = [];
51739
                for (var _i = 0; _i < arguments.length; _i++) {
51740
                    args[_i] = arguments[_i];
51741
                }
51742
                var instanceCtx = new _ExecutionContext(_ctx, this, _classStmt.name, _ctx.vars);
51743
                return _executeFunctionStatements(paramNames, args, method.body, instanceCtx, _visitor);
51744
            }
51745
        };
51746
    });
51747
    var ctorParamNames = _classStmt.constructorMethod.params.map(function (param) { return param.name; });
51748
    // Note: use `function` instead of arrow function to capture `this`
51749
    var ctor = function () {
51750
        var _this = this;
51751
        var args = [];
51752
        for (var _i = 0; _i < arguments.length; _i++) {
51753
            args[_i] = arguments[_i];
51754
        }
51755
        var instanceCtx = new _ExecutionContext(_ctx, this, _classStmt.name, _ctx.vars);
51756
        _classStmt.fields.forEach(function (field) { _this[field.name] = undefined; });
51757
        _executeFunctionStatements(ctorParamNames, args, _classStmt.constructorMethod.body, instanceCtx, _visitor);
51758
    };
51759
    var superClass = _classStmt.parent ? _classStmt.parent.visitExpression(_visitor, _ctx) : Object;
51760
    ctor.prototype = Object.create(superClass.prototype, propertyDescriptors);
51761
    return ctor;
51762
}
51763
var StatementInterpreter = /** @class */ (function () {
51764
    function StatementInterpreter(reflector) {
51765
        this.reflector = reflector;
51766
    }
51767
    StatementInterpreter.prototype.debugAst = function (ast) { return debugOutputAstAsTypeScript(ast); };
51768
    StatementInterpreter.prototype.visitDeclareVarStmt = function (stmt, ctx) {
51769
        var initialValue = stmt.value ? stmt.value.visitExpression(this, ctx) : undefined;
51770
        ctx.vars.set(stmt.name, initialValue);
51771
        if (stmt.hasModifier(StmtModifier.Exported)) {
51772
            ctx.exports.push(stmt.name);
51773
        }
51774
        return null;
51775
    };
51776
    StatementInterpreter.prototype.visitWriteVarExpr = function (expr, ctx) {
51777
        var value = expr.value.visitExpression(this, ctx);
51778
        var currCtx = ctx;
51779
        while (currCtx != null) {
51780
            if (currCtx.vars.has(expr.name)) {
51781
                currCtx.vars.set(expr.name, value);
51782
                return value;
51783
            }
51784
            currCtx = currCtx.parent;
51785
        }
51786
        throw new Error("Not declared variable " + expr.name);
51787
    };
51788
    StatementInterpreter.prototype.visitReadVarExpr = function (ast, ctx) {
51789
        var varName = ast.name;
51790
        if (ast.builtin != null) {
51791
            switch (ast.builtin) {
51792
                case BuiltinVar.Super:
51793
                    return ctx.instance.__proto__;
51794
                case BuiltinVar.This:
51795
                    return ctx.instance;
51796
                case BuiltinVar.CatchError:
51797
                    varName = CATCH_ERROR_VAR$2;
51798
                    break;
51799
                case BuiltinVar.CatchStack:
51800
                    varName = CATCH_STACK_VAR$2;
51801
                    break;
51802
                default:
51803
                    throw new Error("Unknown builtin variable " + ast.builtin);
51804
            }
51805
        }
51806
        var currCtx = ctx;
51807
        while (currCtx != null) {
51808
            if (currCtx.vars.has(varName)) {
51809
                return currCtx.vars.get(varName);
51810
            }
51811
            currCtx = currCtx.parent;
51812
        }
51813
        throw new Error("Not declared variable " + varName);
51814
    };
51815
    StatementInterpreter.prototype.visitWriteKeyExpr = function (expr, ctx) {
51816
        var receiver = expr.receiver.visitExpression(this, ctx);
51817
        var index = expr.index.visitExpression(this, ctx);
51818
        var value = expr.value.visitExpression(this, ctx);
51819
        receiver[index] = value;
51820
        return value;
51821
    };
51822
    StatementInterpreter.prototype.visitWritePropExpr = function (expr, ctx) {
51823
        var receiver = expr.receiver.visitExpression(this, ctx);
51824
        var value = expr.value.visitExpression(this, ctx);
51825
        receiver[expr.name] = value;
51826
        return value;
51827
    };
51828
    StatementInterpreter.prototype.visitInvokeMethodExpr = function (expr, ctx) {
51829
        var receiver = expr.receiver.visitExpression(this, ctx);
51830
        var args = this.visitAllExpressions(expr.args, ctx);
51831
        var result;
51832
        if (expr.builtin != null) {
51833
            switch (expr.builtin) {
51834
                case BuiltinMethod.ConcatArray:
51835
                    result = receiver.concat.apply(receiver, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(args));
51836
                    break;
51837
                case BuiltinMethod.SubscribeObservable:
51838
                    result = receiver.subscribe({ next: args[0] });
51839
                    break;
51840
                case BuiltinMethod.Bind:
51841
                    result = receiver.bind.apply(receiver, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(args));
51842
                    break;
51843
                default:
51844
                    throw new Error("Unknown builtin method " + expr.builtin);
51845
            }
51846
        }
51847
        else {
51848
            result = receiver[expr.name].apply(receiver, args);
51849
        }
51850
        return result;
51851
    };
51852
    StatementInterpreter.prototype.visitInvokeFunctionExpr = function (stmt, ctx) {
51853
        var args = this.visitAllExpressions(stmt.args, ctx);
51854
        var fnExpr = stmt.fn;
51855
        if (fnExpr instanceof ReadVarExpr && fnExpr.builtin === BuiltinVar.Super) {
51856
            ctx.instance.constructor.prototype.constructor.apply(ctx.instance, args);
51857
            return null;
51858
        }
51859
        else {
51860
            var fn$$1 = stmt.fn.visitExpression(this, ctx);
51861
            return fn$$1.apply(null, args);
51862
        }
51863
    };
51864
    StatementInterpreter.prototype.visitReturnStmt = function (stmt, ctx) {
51865
        return new ReturnValue(stmt.value.visitExpression(this, ctx));
51866
    };
51867
    StatementInterpreter.prototype.visitDeclareClassStmt = function (stmt, ctx) {
51868
        var clazz = createDynamicClass(stmt, ctx, this);
51869
        ctx.vars.set(stmt.name, clazz);
51870
        if (stmt.hasModifier(StmtModifier.Exported)) {
51871
            ctx.exports.push(stmt.name);
51872
        }
51873
        return null;
51874
    };
51875
    StatementInterpreter.prototype.visitExpressionStmt = function (stmt, ctx) {
51876
        return stmt.expr.visitExpression(this, ctx);
51877
    };
51878
    StatementInterpreter.prototype.visitIfStmt = function (stmt, ctx) {
51879
        var condition = stmt.condition.visitExpression(this, ctx);
51880
        if (condition) {
51881
            return this.visitAllStatements(stmt.trueCase, ctx);
51882
        }
51883
        else if (stmt.falseCase != null) {
51884
            return this.visitAllStatements(stmt.falseCase, ctx);
51885
        }
51886
        return null;
51887
    };
51888
    StatementInterpreter.prototype.visitTryCatchStmt = function (stmt, ctx) {
51889
        try {
51890
            return this.visitAllStatements(stmt.bodyStmts, ctx);
51891
        }
51892
        catch (e) {
51893
            var childCtx = ctx.createChildWihtLocalVars();
51894
            childCtx.vars.set(CATCH_ERROR_VAR$2, e);
51895
            childCtx.vars.set(CATCH_STACK_VAR$2, e.stack);
51896
            return this.visitAllStatements(stmt.catchStmts, childCtx);
51897
        }
51898
    };
51899
    StatementInterpreter.prototype.visitThrowStmt = function (stmt, ctx) {
51900
        throw stmt.error.visitExpression(this, ctx);
51901
    };
51902
    StatementInterpreter.prototype.visitCommentStmt = function (stmt, context) { return null; };
51903
    StatementInterpreter.prototype.visitJSDocCommentStmt = function (stmt, context) { return null; };
51904
    StatementInterpreter.prototype.visitInstantiateExpr = function (ast, ctx) {
51905
        var args = this.visitAllExpressions(ast.args, ctx);
51906
        var clazz = ast.classExpr.visitExpression(this, ctx);
51907
        return new (clazz.bind.apply(clazz, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], args)))();
51908
    };
51909
    StatementInterpreter.prototype.visitLiteralExpr = function (ast, ctx) { return ast.value; };
51910
    StatementInterpreter.prototype.visitExternalExpr = function (ast, ctx) {
51911
        return this.reflector.resolveExternalReference(ast.value);
51912
    };
51913
    StatementInterpreter.prototype.visitConditionalExpr = function (ast, ctx) {
51914
        if (ast.condition.visitExpression(this, ctx)) {
51915
            return ast.trueCase.visitExpression(this, ctx);
51916
        }
51917
        else if (ast.falseCase != null) {
51918
            return ast.falseCase.visitExpression(this, ctx);
51919
        }
51920
        return null;
51921
    };
51922
    StatementInterpreter.prototype.visitNotExpr = function (ast, ctx) {
51923
        return !ast.condition.visitExpression(this, ctx);
51924
    };
51925
    StatementInterpreter.prototype.visitAssertNotNullExpr = function (ast, ctx) {
51926
        return ast.condition.visitExpression(this, ctx);
51927
    };
51928
    StatementInterpreter.prototype.visitCastExpr = function (ast, ctx) {
51929
        return ast.value.visitExpression(this, ctx);
51930
    };
51931
    StatementInterpreter.prototype.visitFunctionExpr = function (ast, ctx) {
51932
        var paramNames = ast.params.map(function (param) { return param.name; });
51933
        return _declareFn(paramNames, ast.statements, ctx, this);
51934
    };
51935
    StatementInterpreter.prototype.visitDeclareFunctionStmt = function (stmt, ctx) {
51936
        var paramNames = stmt.params.map(function (param) { return param.name; });
51937
        ctx.vars.set(stmt.name, _declareFn(paramNames, stmt.statements, ctx, this));
51938
        if (stmt.hasModifier(StmtModifier.Exported)) {
51939
            ctx.exports.push(stmt.name);
51940
        }
51941
        return null;
51942
    };
51943
    StatementInterpreter.prototype.visitBinaryOperatorExpr = function (ast, ctx) {
51944
        var _this = this;
51945
        var lhs = function () { return ast.lhs.visitExpression(_this, ctx); };
51946
        var rhs = function () { return ast.rhs.visitExpression(_this, ctx); };
51947
        switch (ast.operator) {
51948
            case BinaryOperator.Equals:
51949
                return lhs() == rhs();
51950
            case BinaryOperator.Identical:
51951
                return lhs() === rhs();
51952
            case BinaryOperator.NotEquals:
51953
                return lhs() != rhs();
51954
            case BinaryOperator.NotIdentical:
51955
                return lhs() !== rhs();
51956
            case BinaryOperator.And:
51957
                return lhs() && rhs();
51958
            case BinaryOperator.Or:
51959
                return lhs() || rhs();
51960
            case BinaryOperator.Plus:
51961
                return lhs() + rhs();
51962
            case BinaryOperator.Minus:
51963
                return lhs() - rhs();
51964
            case BinaryOperator.Divide:
51965
                return lhs() / rhs();
51966
            case BinaryOperator.Multiply:
51967
                return lhs() * rhs();
51968
            case BinaryOperator.Modulo:
51969
                return lhs() % rhs();
51970
            case BinaryOperator.Lower:
51971
                return lhs() < rhs();
51972
            case BinaryOperator.LowerEquals:
51973
                return lhs() <= rhs();
51974
            case BinaryOperator.Bigger:
51975
                return lhs() > rhs();
51976
            case BinaryOperator.BiggerEquals:
51977
                return lhs() >= rhs();
51978
            default:
51979
                throw new Error("Unknown operator " + ast.operator);
51980
        }
51981
    };
51982
    StatementInterpreter.prototype.visitReadPropExpr = function (ast, ctx) {
51983
        var result;
51984
        var receiver = ast.receiver.visitExpression(this, ctx);
51985
        result = receiver[ast.name];
51986
        return result;
51987
    };
51988
    StatementInterpreter.prototype.visitReadKeyExpr = function (ast, ctx) {
51989
        var receiver = ast.receiver.visitExpression(this, ctx);
51990
        var prop = ast.index.visitExpression(this, ctx);
51991
        return receiver[prop];
51992
    };
51993
    StatementInterpreter.prototype.visitLiteralArrayExpr = function (ast, ctx) {
51994
        return this.visitAllExpressions(ast.entries, ctx);
51995
    };
51996
    StatementInterpreter.prototype.visitLiteralMapExpr = function (ast, ctx) {
51997
        var _this = this;
51998
        var result = {};
51999
        ast.entries.forEach(function (entry) { return result[entry.key] = entry.value.visitExpression(_this, ctx); });
52000
        return result;
52001
    };
52002
    StatementInterpreter.prototype.visitCommaExpr = function (ast, context) {
52003
        var values = this.visitAllExpressions(ast.parts, context);
52004
        return values[values.length - 1];
52005
    };
52006
    StatementInterpreter.prototype.visitAllExpressions = function (expressions, ctx) {
52007
        var _this = this;
52008
        return expressions.map(function (expr) { return expr.visitExpression(_this, ctx); });
52009
    };
52010
    StatementInterpreter.prototype.visitAllStatements = function (statements, ctx) {
52011
        for (var i = 0; i < statements.length; i++) {
52012
            var stmt = statements[i];
52013
            var val = stmt.visitStatement(this, ctx);
52014
            if (val instanceof ReturnValue) {
52015
                return val;
52016
            }
52017
        }
52018
        return null;
52019
    };
52020
    return StatementInterpreter;
52021
}());
52022
function _declareFn(varNames, statements, ctx, visitor) {
52023
    return function () {
52024
        var args = [];
52025
        for (var _i = 0; _i < arguments.length; _i++) {
52026
            args[_i] = arguments[_i];
52027
        }
52028
        return _executeFunctionStatements(varNames, args, statements, ctx, visitor);
52029
    };
52030
}
52031
var CATCH_ERROR_VAR$2 = 'error';
52032
var CATCH_STACK_VAR$2 = 'stack';
52033
 
52034
/**
52035
 * @license
52036
 * Copyright Google Inc. All Rights Reserved.
52037
 *
52038
 * Use of this source code is governed by an MIT-style license that can be
52039
 * found in the LICENSE file at https://angular.io/license
52040
 */
52041
var AbstractJsEmitterVisitor = /** @class */ (function (_super) {
52042
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(AbstractJsEmitterVisitor, _super);
52043
    function AbstractJsEmitterVisitor() {
52044
        return _super.call(this, false) || this;
52045
    }
52046
    AbstractJsEmitterVisitor.prototype.visitDeclareClassStmt = function (stmt, ctx) {
52047
        var _this = this;
52048
        ctx.pushClass(stmt);
52049
        this._visitClassConstructor(stmt, ctx);
52050
        if (stmt.parent != null) {
52051
            ctx.print(stmt, stmt.name + ".prototype = Object.create(");
52052
            stmt.parent.visitExpression(this, ctx);
52053
            ctx.println(stmt, ".prototype);");
52054
        }
52055
        stmt.getters.forEach(function (getter) { return _this._visitClassGetter(stmt, getter, ctx); });
52056
        stmt.methods.forEach(function (method) { return _this._visitClassMethod(stmt, method, ctx); });
52057
        ctx.popClass();
52058
        return null;
52059
    };
52060
    AbstractJsEmitterVisitor.prototype._visitClassConstructor = function (stmt, ctx) {
52061
        ctx.print(stmt, "function " + stmt.name + "(");
52062
        if (stmt.constructorMethod != null) {
52063
            this._visitParams(stmt.constructorMethod.params, ctx);
52064
        }
52065
        ctx.println(stmt, ") {");
52066
        ctx.incIndent();
52067
        if (stmt.constructorMethod != null) {
52068
            if (stmt.constructorMethod.body.length > 0) {
52069
                ctx.println(stmt, "var self = this;");
52070
                this.visitAllStatements(stmt.constructorMethod.body, ctx);
52071
            }
52072
        }
52073
        ctx.decIndent();
52074
        ctx.println(stmt, "}");
52075
    };
52076
    AbstractJsEmitterVisitor.prototype._visitClassGetter = function (stmt, getter, ctx) {
52077
        ctx.println(stmt, "Object.defineProperty(" + stmt.name + ".prototype, '" + getter.name + "', { get: function() {");
52078
        ctx.incIndent();
52079
        if (getter.body.length > 0) {
52080
            ctx.println(stmt, "var self = this;");
52081
            this.visitAllStatements(getter.body, ctx);
52082
        }
52083
        ctx.decIndent();
52084
        ctx.println(stmt, "}});");
52085
    };
52086
    AbstractJsEmitterVisitor.prototype._visitClassMethod = function (stmt, method, ctx) {
52087
        ctx.print(stmt, stmt.name + ".prototype." + method.name + " = function(");
52088
        this._visitParams(method.params, ctx);
52089
        ctx.println(stmt, ") {");
52090
        ctx.incIndent();
52091
        if (method.body.length > 0) {
52092
            ctx.println(stmt, "var self = this;");
52093
            this.visitAllStatements(method.body, ctx);
52094
        }
52095
        ctx.decIndent();
52096
        ctx.println(stmt, "};");
52097
    };
52098
    AbstractJsEmitterVisitor.prototype.visitReadVarExpr = function (ast, ctx) {
52099
        if (ast.builtin === BuiltinVar.This) {
52100
            ctx.print(ast, 'self');
52101
        }
52102
        else if (ast.builtin === BuiltinVar.Super) {
52103
            throw new Error("'super' needs to be handled at a parent ast node, not at the variable level!");
52104
        }
52105
        else {
52106
            _super.prototype.visitReadVarExpr.call(this, ast, ctx);
52107
        }
52108
        return null;
52109
    };
52110
    AbstractJsEmitterVisitor.prototype.visitDeclareVarStmt = function (stmt, ctx) {
52111
        ctx.print(stmt, "var " + stmt.name);
52112
        if (stmt.value) {
52113
            ctx.print(stmt, ' = ');
52114
            stmt.value.visitExpression(this, ctx);
52115
        }
52116
        ctx.println(stmt, ";");
52117
        return null;
52118
    };
52119
    AbstractJsEmitterVisitor.prototype.visitCastExpr = function (ast, ctx) {
52120
        ast.value.visitExpression(this, ctx);
52121
        return null;
52122
    };
52123
    AbstractJsEmitterVisitor.prototype.visitInvokeFunctionExpr = function (expr, ctx) {
52124
        var fnExpr = expr.fn;
52125
        if (fnExpr instanceof ReadVarExpr && fnExpr.builtin === BuiltinVar.Super) {
52126
            ctx.currentClass.parent.visitExpression(this, ctx);
52127
            ctx.print(expr, ".call(this");
52128
            if (expr.args.length > 0) {
52129
                ctx.print(expr, ", ");
52130
                this.visitAllExpressions(expr.args, ctx, ',');
52131
            }
52132
            ctx.print(expr, ")");
52133
        }
52134
        else {
52135
            _super.prototype.visitInvokeFunctionExpr.call(this, expr, ctx);
52136
        }
52137
        return null;
52138
    };
52139
    AbstractJsEmitterVisitor.prototype.visitFunctionExpr = function (ast, ctx) {
52140
        ctx.print(ast, "function" + (ast.name ? ' ' + ast.name : '') + "(");
52141
        this._visitParams(ast.params, ctx);
52142
        ctx.println(ast, ") {");
52143
        ctx.incIndent();
52144
        this.visitAllStatements(ast.statements, ctx);
52145
        ctx.decIndent();
52146
        ctx.print(ast, "}");
52147
        return null;
52148
    };
52149
    AbstractJsEmitterVisitor.prototype.visitDeclareFunctionStmt = function (stmt, ctx) {
52150
        ctx.print(stmt, "function " + stmt.name + "(");
52151
        this._visitParams(stmt.params, ctx);
52152
        ctx.println(stmt, ") {");
52153
        ctx.incIndent();
52154
        this.visitAllStatements(stmt.statements, ctx);
52155
        ctx.decIndent();
52156
        ctx.println(stmt, "}");
52157
        return null;
52158
    };
52159
    AbstractJsEmitterVisitor.prototype.visitTryCatchStmt = function (stmt, ctx) {
52160
        ctx.println(stmt, "try {");
52161
        ctx.incIndent();
52162
        this.visitAllStatements(stmt.bodyStmts, ctx);
52163
        ctx.decIndent();
52164
        ctx.println(stmt, "} catch (" + CATCH_ERROR_VAR$1.name + ") {");
52165
        ctx.incIndent();
52166
        var catchStmts = [CATCH_STACK_VAR$1.set(CATCH_ERROR_VAR$1.prop('stack')).toDeclStmt(null, [
52167
                StmtModifier.Final
52168
            ])].concat(stmt.catchStmts);
52169
        this.visitAllStatements(catchStmts, ctx);
52170
        ctx.decIndent();
52171
        ctx.println(stmt, "}");
52172
        return null;
52173
    };
52174
    AbstractJsEmitterVisitor.prototype._visitParams = function (params, ctx) {
52175
        this.visitAllObjects(function (param) { return ctx.print(null, param.name); }, params, ctx, ',');
52176
    };
52177
    AbstractJsEmitterVisitor.prototype.getBuiltinMethodName = function (method) {
52178
        var name;
52179
        switch (method) {
52180
            case BuiltinMethod.ConcatArray:
52181
                name = 'concat';
52182
                break;
52183
            case BuiltinMethod.SubscribeObservable:
52184
                name = 'subscribe';
52185
                break;
52186
            case BuiltinMethod.Bind:
52187
                name = 'bind';
52188
                break;
52189
            default:
52190
                throw new Error("Unknown builtin method: " + method);
52191
        }
52192
        return name;
52193
    };
52194
    return AbstractJsEmitterVisitor;
52195
}(AbstractEmitterVisitor));
52196
 
52197
/**
52198
 * @license
52199
 * Copyright Google Inc. All Rights Reserved.
52200
 *
52201
 * Use of this source code is governed by an MIT-style license that can be
52202
 * found in the LICENSE file at https://angular.io/license
52203
 */
52204
function evalExpression(sourceUrl, ctx, vars, createSourceMap) {
52205
    var fnBody = ctx.toSource() + "\n//# sourceURL=" + sourceUrl;
52206
    var fnArgNames = [];
52207
    var fnArgValues = [];
52208
    for (var argName in vars) {
52209
        fnArgNames.push(argName);
52210
        fnArgValues.push(vars[argName]);
52211
    }
52212
    if (createSourceMap) {
52213
        // using `new Function(...)` generates a header, 1 line of no arguments, 2 lines otherwise
52214
        // E.g. ```
52215
        // function anonymous(a,b,c
52216
        // /**/) { ... }```
52217
        // We don't want to hard code this fact, so we auto detect it via an empty function first.
52218
        var emptyFn = new (Function.bind.apply(Function, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], fnArgNames.concat('return null;'))))().toString();
52219
        var headerLines = emptyFn.slice(0, emptyFn.indexOf('return null;')).split('\n').length - 1;
52220
        fnBody += "\n" + ctx.toSourceMapGenerator(sourceUrl, headerLines).toJsComment();
52221
    }
52222
    return new (Function.bind.apply(Function, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], fnArgNames.concat(fnBody))))().apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(fnArgValues));
52223
}
52224
function jitStatements(sourceUrl, statements, reflector, createSourceMaps) {
52225
    var converter = new JitEmitterVisitor(reflector);
52226
    var ctx = EmitterVisitorContext.createRoot();
52227
    converter.visitAllStatements(statements, ctx);
52228
    converter.createReturnStmt(ctx);
52229
    return evalExpression(sourceUrl, ctx, converter.getArgs(), createSourceMaps);
52230
}
52231
var JitEmitterVisitor = /** @class */ (function (_super) {
52232
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(JitEmitterVisitor, _super);
52233
    function JitEmitterVisitor(reflector) {
52234
        var _this = _super.call(this) || this;
52235
        _this.reflector = reflector;
52236
        _this._evalArgNames = [];
52237
        _this._evalArgValues = [];
52238
        _this._evalExportedVars = [];
52239
        return _this;
52240
    }
52241
    JitEmitterVisitor.prototype.createReturnStmt = function (ctx) {
52242
        var stmt = new ReturnStatement(new LiteralMapExpr(this._evalExportedVars.map(function (resultVar) { return new LiteralMapEntry(resultVar, variable(resultVar), false); })));
52243
        stmt.visitStatement(this, ctx);
52244
    };
52245
    JitEmitterVisitor.prototype.getArgs = function () {
52246
        var result = {};
52247
        for (var i = 0; i < this._evalArgNames.length; i++) {
52248
            result[this._evalArgNames[i]] = this._evalArgValues[i];
52249
        }
52250
        return result;
52251
    };
52252
    JitEmitterVisitor.prototype.visitExternalExpr = function (ast, ctx) {
52253
        var value = this.reflector.resolveExternalReference(ast.value);
52254
        var id = this._evalArgValues.indexOf(value);
52255
        if (id === -1) {
52256
            id = this._evalArgValues.length;
52257
            this._evalArgValues.push(value);
52258
            var name_1 = identifierName({ reference: value }) || 'val';
52259
            this._evalArgNames.push("jit_" + name_1 + "_" + id);
52260
        }
52261
        ctx.print(ast, this._evalArgNames[id]);
52262
        return null;
52263
    };
52264
    JitEmitterVisitor.prototype.visitDeclareVarStmt = function (stmt, ctx) {
52265
        if (stmt.hasModifier(StmtModifier.Exported)) {
52266
            this._evalExportedVars.push(stmt.name);
52267
        }
52268
        return _super.prototype.visitDeclareVarStmt.call(this, stmt, ctx);
52269
    };
52270
    JitEmitterVisitor.prototype.visitDeclareFunctionStmt = function (stmt, ctx) {
52271
        if (stmt.hasModifier(StmtModifier.Exported)) {
52272
            this._evalExportedVars.push(stmt.name);
52273
        }
52274
        return _super.prototype.visitDeclareFunctionStmt.call(this, stmt, ctx);
52275
    };
52276
    JitEmitterVisitor.prototype.visitDeclareClassStmt = function (stmt, ctx) {
52277
        if (stmt.hasModifier(StmtModifier.Exported)) {
52278
            this._evalExportedVars.push(stmt.name);
52279
        }
52280
        return _super.prototype.visitDeclareClassStmt.call(this, stmt, ctx);
52281
    };
52282
    return JitEmitterVisitor;
52283
}(AbstractJsEmitterVisitor));
52284
 
52285
/**
52286
 * @license
52287
 * Copyright Google Inc. All Rights Reserved.
52288
 *
52289
 * Use of this source code is governed by an MIT-style license that can be
52290
 * found in the LICENSE file at https://angular.io/license
52291
 */
52292
/**
52293
 * An internal module of the Angular compiler that begins with component types,
52294
 * extracts templates, and eventually produces a compiled version of the component
52295
 * ready for linking into an application.
52296
 *
52297
 * @security  When compiling templates at runtime, you must ensure that the entire template comes
52298
 * from a trusted source. Attacker-controlled data introduced by a template could expose your
52299
 * application to XSS risks.  For more detail, see the [Security Guide](http://g.co/ng/security).
52300
 */
52301
var JitCompiler = /** @class */ (function () {
52302
    function JitCompiler(_metadataResolver, _templateParser, _styleCompiler, _viewCompiler, _ngModuleCompiler, _summaryResolver, _reflector, _compilerConfig, _console, getExtraNgModuleProviders) {
52303
        this._metadataResolver = _metadataResolver;
52304
        this._templateParser = _templateParser;
52305
        this._styleCompiler = _styleCompiler;
52306
        this._viewCompiler = _viewCompiler;
52307
        this._ngModuleCompiler = _ngModuleCompiler;
52308
        this._summaryResolver = _summaryResolver;
52309
        this._reflector = _reflector;
52310
        this._compilerConfig = _compilerConfig;
52311
        this._console = _console;
52312
        this.getExtraNgModuleProviders = getExtraNgModuleProviders;
52313
        this._compiledTemplateCache = new Map();
52314
        this._compiledHostTemplateCache = new Map();
52315
        this._compiledDirectiveWrapperCache = new Map();
52316
        this._compiledNgModuleCache = new Map();
52317
        this._sharedStylesheetCount = 0;
52318
        this._addedAotSummaries = new Set();
52319
    }
52320
    JitCompiler.prototype.compileModuleSync = function (moduleType) {
52321
        return SyncAsync.assertSync(this._compileModuleAndComponents(moduleType, true));
52322
    };
52323
    JitCompiler.prototype.compileModuleAsync = function (moduleType) {
52324
        return Promise.resolve(this._compileModuleAndComponents(moduleType, false));
52325
    };
52326
    JitCompiler.prototype.compileModuleAndAllComponentsSync = function (moduleType) {
52327
        return SyncAsync.assertSync(this._compileModuleAndAllComponents(moduleType, true));
52328
    };
52329
    JitCompiler.prototype.compileModuleAndAllComponentsAsync = function (moduleType) {
52330
        return Promise.resolve(this._compileModuleAndAllComponents(moduleType, false));
52331
    };
52332
    JitCompiler.prototype.getComponentFactory = function (component) {
52333
        var summary = this._metadataResolver.getDirectiveSummary(component);
52334
        return summary.componentFactory;
52335
    };
52336
    JitCompiler.prototype.loadAotSummaries = function (summaries) {
52337
        this.clearCache();
52338
        this._addAotSummaries(summaries);
52339
    };
52340
    JitCompiler.prototype._addAotSummaries = function (fn$$1) {
52341
        if (this._addedAotSummaries.has(fn$$1)) {
52342
            return;
52343
        }
52344
        this._addedAotSummaries.add(fn$$1);
52345
        var summaries = fn$$1();
52346
        for (var i = 0; i < summaries.length; i++) {
52347
            var entry = summaries[i];
52348
            if (typeof entry === 'function') {
52349
                this._addAotSummaries(entry);
52350
            }
52351
            else {
52352
                var summary = entry;
52353
                this._summaryResolver.addSummary({ symbol: summary.type.reference, metadata: null, type: summary });
52354
            }
52355
        }
52356
    };
52357
    JitCompiler.prototype.hasAotSummary = function (ref) { return !!this._summaryResolver.resolveSummary(ref); };
52358
    JitCompiler.prototype._filterJitIdentifiers = function (ids) {
52359
        var _this = this;
52360
        return ids.map(function (mod) { return mod.reference; }).filter(function (ref) { return !_this.hasAotSummary(ref); });
52361
    };
52362
    JitCompiler.prototype._compileModuleAndComponents = function (moduleType, isSync) {
52363
        var _this = this;
52364
        return SyncAsync.then(this._loadModules(moduleType, isSync), function () {
52365
            _this._compileComponents(moduleType, null);
52366
            return _this._compileModule(moduleType);
52367
        });
52368
    };
52369
    JitCompiler.prototype._compileModuleAndAllComponents = function (moduleType, isSync) {
52370
        var _this = this;
52371
        return SyncAsync.then(this._loadModules(moduleType, isSync), function () {
52372
            var componentFactories = [];
52373
            _this._compileComponents(moduleType, componentFactories);
52374
            return {
52375
                ngModuleFactory: _this._compileModule(moduleType),
52376
                componentFactories: componentFactories
52377
            };
52378
        });
52379
    };
52380
    JitCompiler.prototype._loadModules = function (mainModule, isSync) {
52381
        var _this = this;
52382
        var loading = [];
52383
        var mainNgModule = this._metadataResolver.getNgModuleMetadata(mainModule);
52384
        // Note: for runtime compilation, we want to transitively compile all modules,
52385
        // so we also need to load the declared directives / pipes for all nested modules.
52386
        this._filterJitIdentifiers(mainNgModule.transitiveModule.modules).forEach(function (nestedNgModule) {
52387
            // getNgModuleMetadata only returns null if the value passed in is not an NgModule
52388
            var moduleMeta = _this._metadataResolver.getNgModuleMetadata(nestedNgModule);
52389
            _this._filterJitIdentifiers(moduleMeta.declaredDirectives).forEach(function (ref) {
52390
                var promise = _this._metadataResolver.loadDirectiveMetadata(moduleMeta.type.reference, ref, isSync);
52391
                if (promise) {
52392
                    loading.push(promise);
52393
                }
52394
            });
52395
            _this._filterJitIdentifiers(moduleMeta.declaredPipes)
52396
                .forEach(function (ref) { return _this._metadataResolver.getOrLoadPipeMetadata(ref); });
52397
        });
52398
        return SyncAsync.all(loading);
52399
    };
52400
    JitCompiler.prototype._compileModule = function (moduleType) {
52401
        var ngModuleFactory = this._compiledNgModuleCache.get(moduleType);
52402
        if (!ngModuleFactory) {
52403
            var moduleMeta = this._metadataResolver.getNgModuleMetadata(moduleType);
52404
            // Always provide a bound Compiler
52405
            var extraProviders = this.getExtraNgModuleProviders(moduleMeta.type.reference);
52406
            var outputCtx = createOutputContext();
52407
            var compileResult = this._ngModuleCompiler.compile(outputCtx, moduleMeta, extraProviders);
52408
            ngModuleFactory = this._interpretOrJit(ngModuleJitUrl(moduleMeta), outputCtx.statements)[compileResult.ngModuleFactoryVar];
52409
            this._compiledNgModuleCache.set(moduleMeta.type.reference, ngModuleFactory);
52410
        }
52411
        return ngModuleFactory;
52412
    };
52413
    /**
52414
     * @internal
52415
     */
52416
    JitCompiler.prototype._compileComponents = function (mainModule, allComponentFactories) {
52417
        var _this = this;
52418
        var ngModule = this._metadataResolver.getNgModuleMetadata(mainModule);
52419
        var moduleByJitDirective = new Map();
52420
        var templates = new Set();
52421
        var transJitModules = this._filterJitIdentifiers(ngModule.transitiveModule.modules);
52422
        transJitModules.forEach(function (localMod) {
52423
            var localModuleMeta = _this._metadataResolver.getNgModuleMetadata(localMod);
52424
            _this._filterJitIdentifiers(localModuleMeta.declaredDirectives).forEach(function (dirRef) {
52425
                moduleByJitDirective.set(dirRef, localModuleMeta);
52426
                var dirMeta = _this._metadataResolver.getDirectiveMetadata(dirRef);
52427
                if (dirMeta.isComponent) {
52428
                    templates.add(_this._createCompiledTemplate(dirMeta, localModuleMeta));
52429
                    if (allComponentFactories) {
52430
                        var template = _this._createCompiledHostTemplate(dirMeta.type.reference, localModuleMeta);
52431
                        templates.add(template);
52432
                        allComponentFactories.push(dirMeta.componentFactory);
52433
                    }
52434
                }
52435
            });
52436
        });
52437
        transJitModules.forEach(function (localMod) {
52438
            var localModuleMeta = _this._metadataResolver.getNgModuleMetadata(localMod);
52439
            _this._filterJitIdentifiers(localModuleMeta.declaredDirectives).forEach(function (dirRef) {
52440
                var dirMeta = _this._metadataResolver.getDirectiveMetadata(dirRef);
52441
                if (dirMeta.isComponent) {
52442
                    dirMeta.entryComponents.forEach(function (entryComponentType) {
52443
                        var moduleMeta = moduleByJitDirective.get(entryComponentType.componentType);
52444
                        templates.add(_this._createCompiledHostTemplate(entryComponentType.componentType, moduleMeta));
52445
                    });
52446
                }
52447
            });
52448
            localModuleMeta.entryComponents.forEach(function (entryComponentType) {
52449
                if (!_this.hasAotSummary(entryComponentType.componentType.reference)) {
52450
                    var moduleMeta = moduleByJitDirective.get(entryComponentType.componentType);
52451
                    templates.add(_this._createCompiledHostTemplate(entryComponentType.componentType, moduleMeta));
52452
                }
52453
            });
52454
        });
52455
        templates.forEach(function (template) { return _this._compileTemplate(template); });
52456
    };
52457
    JitCompiler.prototype.clearCacheFor = function (type) {
52458
        this._compiledNgModuleCache.delete(type);
52459
        this._metadataResolver.clearCacheFor(type);
52460
        this._compiledHostTemplateCache.delete(type);
52461
        var compiledTemplate = this._compiledTemplateCache.get(type);
52462
        if (compiledTemplate) {
52463
            this._compiledTemplateCache.delete(type);
52464
        }
52465
    };
52466
    JitCompiler.prototype.clearCache = function () {
52467
        // Note: don't clear the _addedAotSummaries, as they don't change!
52468
        this._metadataResolver.clearCache();
52469
        this._compiledTemplateCache.clear();
52470
        this._compiledHostTemplateCache.clear();
52471
        this._compiledNgModuleCache.clear();
52472
    };
52473
    JitCompiler.prototype._createCompiledHostTemplate = function (compType, ngModule) {
52474
        if (!ngModule) {
52475
            throw new Error("Component " + stringify(compType) + " is not part of any NgModule or the module has not been imported into your module.");
52476
        }
52477
        var compiledTemplate = this._compiledHostTemplateCache.get(compType);
52478
        if (!compiledTemplate) {
52479
            var compMeta = this._metadataResolver.getDirectiveMetadata(compType);
52480
            assertComponent(compMeta);
52481
            var hostMeta = this._metadataResolver.getHostComponentMetadata(compMeta, compMeta.componentFactory.viewDefFactory);
52482
            compiledTemplate =
52483
                new CompiledTemplate(true, compMeta.type, hostMeta, ngModule, [compMeta.type]);
52484
            this._compiledHostTemplateCache.set(compType, compiledTemplate);
52485
        }
52486
        return compiledTemplate;
52487
    };
52488
    JitCompiler.prototype._createCompiledTemplate = function (compMeta, ngModule) {
52489
        var compiledTemplate = this._compiledTemplateCache.get(compMeta.type.reference);
52490
        if (!compiledTemplate) {
52491
            assertComponent(compMeta);
52492
            compiledTemplate = new CompiledTemplate(false, compMeta.type, compMeta, ngModule, ngModule.transitiveModule.directives);
52493
            this._compiledTemplateCache.set(compMeta.type.reference, compiledTemplate);
52494
        }
52495
        return compiledTemplate;
52496
    };
52497
    JitCompiler.prototype._compileTemplate = function (template) {
52498
        var _this = this;
52499
        if (template.isCompiled) {
52500
            return;
52501
        }
52502
        var compMeta = template.compMeta;
52503
        var externalStylesheetsByModuleUrl = new Map();
52504
        var outputContext = createOutputContext();
52505
        var componentStylesheet = this._styleCompiler.compileComponent(outputContext, compMeta);
52506
        compMeta.template.externalStylesheets.forEach(function (stylesheetMeta) {
52507
            var compiledStylesheet = _this._styleCompiler.compileStyles(createOutputContext(), compMeta, stylesheetMeta);
52508
            externalStylesheetsByModuleUrl.set(stylesheetMeta.moduleUrl, compiledStylesheet);
52509
        });
52510
        this._resolveStylesCompileResult(componentStylesheet, externalStylesheetsByModuleUrl);
52511
        var pipes = template.ngModule.transitiveModule.pipes.map(function (pipe) { return _this._metadataResolver.getPipeSummary(pipe.reference); });
52512
        var _a = this._parseTemplate(compMeta, template.ngModule, template.directives), parsedTemplate = _a.template, usedPipes = _a.pipes;
52513
        var compileResult = this._viewCompiler.compileComponent(outputContext, compMeta, parsedTemplate, variable(componentStylesheet.stylesVar), usedPipes);
52514
        var evalResult = this._interpretOrJit(templateJitUrl(template.ngModule.type, template.compMeta), outputContext.statements);
52515
        var viewClass = evalResult[compileResult.viewClassVar];
52516
        var rendererType = evalResult[compileResult.rendererTypeVar];
52517
        template.compiled(viewClass, rendererType);
52518
    };
52519
    JitCompiler.prototype._parseTemplate = function (compMeta, ngModule, directiveIdentifiers) {
52520
        var _this = this;
52521
        // Note: ! is ok here as components always have a template.
52522
        var preserveWhitespaces = compMeta.template.preserveWhitespaces;
52523
        var directives = directiveIdentifiers.map(function (dir) { return _this._metadataResolver.getDirectiveSummary(dir.reference); });
52524
        var pipes = ngModule.transitiveModule.pipes.map(function (pipe) { return _this._metadataResolver.getPipeSummary(pipe.reference); });
52525
        return this._templateParser.parse(compMeta, compMeta.template.htmlAst, directives, pipes, ngModule.schemas, templateSourceUrl(ngModule.type, compMeta, compMeta.template), preserveWhitespaces);
52526
    };
52527
    JitCompiler.prototype._resolveStylesCompileResult = function (result, externalStylesheetsByModuleUrl) {
52528
        var _this = this;
52529
        result.dependencies.forEach(function (dep, i) {
52530
            var nestedCompileResult = externalStylesheetsByModuleUrl.get(dep.moduleUrl);
52531
            var nestedStylesArr = _this._resolveAndEvalStylesCompileResult(nestedCompileResult, externalStylesheetsByModuleUrl);
52532
            dep.setValue(nestedStylesArr);
52533
        });
52534
    };
52535
    JitCompiler.prototype._resolveAndEvalStylesCompileResult = function (result, externalStylesheetsByModuleUrl) {
52536
        this._resolveStylesCompileResult(result, externalStylesheetsByModuleUrl);
52537
        return this._interpretOrJit(sharedStylesheetJitUrl(result.meta, this._sharedStylesheetCount++), result.outputCtx.statements)[result.stylesVar];
52538
    };
52539
    JitCompiler.prototype._interpretOrJit = function (sourceUrl, statements) {
52540
        if (!this._compilerConfig.useJit) {
52541
            return interpretStatements(statements, this._reflector);
52542
        }
52543
        else {
52544
            return jitStatements(sourceUrl, statements, this._reflector, this._compilerConfig.jitDevMode);
52545
        }
52546
    };
52547
    return JitCompiler;
52548
}());
52549
var CompiledTemplate = /** @class */ (function () {
52550
    function CompiledTemplate(isHost, compType, compMeta, ngModule, directives) {
52551
        this.isHost = isHost;
52552
        this.compType = compType;
52553
        this.compMeta = compMeta;
52554
        this.ngModule = ngModule;
52555
        this.directives = directives;
52556
        this._viewClass = null;
52557
        this.isCompiled = false;
52558
    }
52559
    CompiledTemplate.prototype.compiled = function (viewClass, rendererType) {
52560
        this._viewClass = viewClass;
52561
        this.compMeta.componentViewType.setDelegate(viewClass);
52562
        for (var prop in rendererType) {
52563
            this.compMeta.rendererType[prop] = rendererType[prop];
52564
        }
52565
        this.isCompiled = true;
52566
    };
52567
    return CompiledTemplate;
52568
}());
52569
function assertComponent(meta) {
52570
    if (!meta.isComponent) {
52571
        throw new Error("Could not compile '" + identifierName(meta.type) + "' because it is not a component.");
52572
    }
52573
}
52574
function createOutputContext() {
52575
    var importExpr$$1 = function (symbol) {
52576
        return importExpr({ name: identifierName(symbol), moduleName: null, runtime: symbol });
52577
    };
52578
    return { statements: [], genFilePath: '', importExpr: importExpr$$1, constantPool: new ConstantPool() };
52579
}
52580
 
52581
/**
52582
 * @license
52583
 * Copyright Google Inc. All Rights Reserved.
52584
 *
52585
 * Use of this source code is governed by an MIT-style license that can be
52586
 * found in the LICENSE file at https://angular.io/license
52587
 */
52588
/**
52589
 * Provides access to reflection data about symbols that the compiler needs.
52590
 */
52591
var CompileReflector = /** @class */ (function () {
52592
    function CompileReflector() {
52593
    }
52594
    return CompileReflector;
52595
}());
52596
 
52597
/**
52598
 * @license
52599
 * Copyright Google Inc. All Rights Reserved.
52600
 *
52601
 * Use of this source code is governed by an MIT-style license that can be
52602
 * found in the LICENSE file at https://angular.io/license
52603
 */
52604
/**
52605
 * Create a {@link UrlResolver} with no package prefix.
52606
 */
52607
function createUrlResolverWithoutPackagePrefix() {
52608
    return new UrlResolver();
52609
}
52610
function createOfflineCompileUrlResolver() {
52611
    return new UrlResolver('.');
52612
}
52613
var UrlResolver = /** @class */ (function () {
52614
    function UrlResolverImpl(_packagePrefix) {
52615
        if (_packagePrefix === void 0) { _packagePrefix = null; }
52616
        this._packagePrefix = _packagePrefix;
52617
    }
52618
    /**
52619
     * Resolves the `url` given the `baseUrl`:
52620
     * - when the `url` is null, the `baseUrl` is returned,
52621
     * - if `url` is relative ('path/to/here', './path/to/here'), the resolved url is a combination of
52622
     * `baseUrl` and `url`,
52623
     * - if `url` is absolute (it has a scheme: 'http://', 'https://' or start with '/'), the `url` is
52624
     * returned as is (ignoring the `baseUrl`)
52625
     */
52626
    UrlResolverImpl.prototype.resolve = function (baseUrl, url) {
52627
        var resolvedUrl = url;
52628
        if (baseUrl != null && baseUrl.length > 0) {
52629
            resolvedUrl = _resolveUrl(baseUrl, resolvedUrl);
52630
        }
52631
        var resolvedParts = _split(resolvedUrl);
52632
        var prefix = this._packagePrefix;
52633
        if (prefix != null && resolvedParts != null &&
52634
            resolvedParts[_ComponentIndex.Scheme] == 'package') {
52635
            var path = resolvedParts[_ComponentIndex.Path];
52636
            prefix = prefix.replace(/\/+$/, '');
52637
            path = path.replace(/^\/+/, '');
52638
            return prefix + "/" + path;
52639
        }
52640
        return resolvedUrl;
52641
    };
52642
    return UrlResolverImpl;
52643
}());
52644
/**
52645
 * Extract the scheme of a URL.
52646
 */
52647
function getUrlScheme(url) {
52648
    var match = _split(url);
52649
    return (match && match[_ComponentIndex.Scheme]) || '';
52650
}
52651
// The code below is adapted from Traceur:
52652
// https://github.com/google/traceur-compiler/blob/9511c1dafa972bf0de1202a8a863bad02f0f95a8/src/runtime/url.js
52653
/**
52654
 * Builds a URI string from already-encoded parts.
52655
 *
52656
 * No encoding is performed.  Any component may be omitted as either null or
52657
 * undefined.
52658
 *
52659
 * @param opt_scheme The scheme such as 'http'.
52660
 * @param opt_userInfo The user name before the '@'.
52661
 * @param opt_domain The domain such as 'www.google.com', already
52662
 *     URI-encoded.
52663
 * @param opt_port The port number.
52664
 * @param opt_path The path, already URI-encoded.  If it is not
52665
 *     empty, it must begin with a slash.
52666
 * @param opt_queryData The URI-encoded query data.
52667
 * @param opt_fragment The URI-encoded fragment identifier.
52668
 * @return The fully combined URI.
52669
 */
52670
function _buildFromEncodedParts(opt_scheme, opt_userInfo, opt_domain, opt_port, opt_path, opt_queryData, opt_fragment) {
52671
    var out = [];
52672
    if (opt_scheme != null) {
52673
        out.push(opt_scheme + ':');
52674
    }
52675
    if (opt_domain != null) {
52676
        out.push('//');
52677
        if (opt_userInfo != null) {
52678
            out.push(opt_userInfo + '@');
52679
        }
52680
        out.push(opt_domain);
52681
        if (opt_port != null) {
52682
            out.push(':' + opt_port);
52683
        }
52684
    }
52685
    if (opt_path != null) {
52686
        out.push(opt_path);
52687
    }
52688
    if (opt_queryData != null) {
52689
        out.push('?' + opt_queryData);
52690
    }
52691
    if (opt_fragment != null) {
52692
        out.push('#' + opt_fragment);
52693
    }
52694
    return out.join('');
52695
}
52696
/**
52697
 * A regular expression for breaking a URI into its component parts.
52698
 *
52699
 * {@link http://www.gbiv.com/protocols/uri/rfc/rfc3986.html#RFC2234} says
52700
 * As the "first-match-wins" algorithm is identical to the "greedy"
52701
 * disambiguation method used by POSIX regular expressions, it is natural and
52702
 * commonplace to use a regular expression for parsing the potential five
52703
 * components of a URI reference.
52704
 *
52705
 * The following line is the regular expression for breaking-down a
52706
 * well-formed URI reference into its components.
52707
 *
52708
 * <pre>
52709
 * ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?
52710
 *  12            3  4          5       6  7        8 9
52711
 * </pre>
52712
 *
52713
 * The numbers in the second line above are only to assist readability; they
52714
 * indicate the reference points for each subexpression (i.e., each paired
52715
 * parenthesis). We refer to the value matched for subexpression <n> as $<n>.
52716
 * For example, matching the above expression to
52717
 * <pre>
52718
 *     http://www.ics.uci.edu/pub/ietf/uri/#Related
52719
 * </pre>
52720
 * results in the following subexpression matches:
52721
 * <pre>
52722
 *    $1 = http:
52723
 *    $2 = http
52724
 *    $3 = //www.ics.uci.edu
52725
 *    $4 = www.ics.uci.edu
52726
 *    $5 = /pub/ietf/uri/
52727
 *    $6 = <undefined>
52728
 *    $7 = <undefined>
52729
 *    $8 = #Related
52730
 *    $9 = Related
52731
 * </pre>
52732
 * where <undefined> indicates that the component is not present, as is the
52733
 * case for the query component in the above example. Therefore, we can
52734
 * determine the value of the five components as
52735
 * <pre>
52736
 *    scheme    = $2
52737
 *    authority = $4
52738
 *    path      = $5
52739
 *    query     = $7
52740
 *    fragment  = $9
52741
 * </pre>
52742
 *
52743
 * The regular expression has been modified slightly to expose the
52744
 * userInfo, domain, and port separately from the authority.
52745
 * The modified version yields
52746
 * <pre>
52747
 *    $1 = http              scheme
52748
 *    $2 = <undefined>       userInfo -\
52749
 *    $3 = www.ics.uci.edu   domain     | authority
52750
 *    $4 = <undefined>       port     -/
52751
 *    $5 = /pub/ietf/uri/    path
52752
 *    $6 = <undefined>       query without ?
52753
 *    $7 = Related           fragment without #
52754
 * </pre>
52755
 * @internal
52756
 */
52757
var _splitRe = new RegExp('^' +
52758
    '(?:' +
52759
    '([^:/?#.]+)' + // scheme - ignore special characters
52760
    // used by other URL parts such as :,
52761
    // ?, /, #, and .
52762
    ':)?' +
52763
    '(?://' +
52764
    '(?:([^/?#]*)@)?' + // userInfo
52765
    '([\\w\\d\\-\\u0100-\\uffff.%]*)' + // domain - restrict to letters,
52766
    // digits, dashes, dots, percent
52767
    // escapes, and unicode characters.
52768
    '(?::([0-9]+))?' + // port
52769
    ')?' +
52770
    '([^?#]+)?' + // path
52771
    '(?:\\?([^#]*))?' + // query
52772
    '(?:#(.*))?' + // fragment
52773
    '$');
52774
/**
52775
 * The index of each URI component in the return value of goog.uri.utils.split.
52776
 * @enum {number}
52777
 */
52778
var _ComponentIndex;
52779
(function (_ComponentIndex) {
52780
    _ComponentIndex[_ComponentIndex["Scheme"] = 1] = "Scheme";
52781
    _ComponentIndex[_ComponentIndex["UserInfo"] = 2] = "UserInfo";
52782
    _ComponentIndex[_ComponentIndex["Domain"] = 3] = "Domain";
52783
    _ComponentIndex[_ComponentIndex["Port"] = 4] = "Port";
52784
    _ComponentIndex[_ComponentIndex["Path"] = 5] = "Path";
52785
    _ComponentIndex[_ComponentIndex["QueryData"] = 6] = "QueryData";
52786
    _ComponentIndex[_ComponentIndex["Fragment"] = 7] = "Fragment";
52787
})(_ComponentIndex || (_ComponentIndex = {}));
52788
/**
52789
 * Splits a URI into its component parts.
52790
 *
52791
 * Each component can be accessed via the component indices; for example:
52792
 * <pre>
52793
 * goog.uri.utils.split(someStr)[goog.uri.utils.CompontentIndex.QUERY_DATA];
52794
 * </pre>
52795
 *
52796
 * @param uri The URI string to examine.
52797
 * @return Each component still URI-encoded.
52798
 *     Each component that is present will contain the encoded value, whereas
52799
 *     components that are not present will be undefined or empty, depending
52800
 *     on the browser's regular expression implementation.  Never null, since
52801
 *     arbitrary strings may still look like path names.
52802
 */
52803
function _split(uri) {
52804
    return uri.match(_splitRe);
52805
}
52806
/**
52807
  * Removes dot segments in given path component, as described in
52808
  * RFC 3986, section 5.2.4.
52809
  *
52810
  * @param path A non-empty path component.
52811
  * @return Path component with removed dot segments.
52812
  */
52813
function _removeDotSegments(path) {
52814
    if (path == '/')
52815
        return '/';
52816
    var leadingSlash = path[0] == '/' ? '/' : '';
52817
    var trailingSlash = path[path.length - 1] === '/' ? '/' : '';
52818
    var segments = path.split('/');
52819
    var out = [];
52820
    var up = 0;
52821
    for (var pos = 0; pos < segments.length; pos++) {
52822
        var segment = segments[pos];
52823
        switch (segment) {
52824
            case '':
52825
            case '.':
52826
                break;
52827
            case '..':
52828
                if (out.length > 0) {
52829
                    out.pop();
52830
                }
52831
                else {
52832
                    up++;
52833
                }
52834
                break;
52835
            default:
52836
                out.push(segment);
52837
        }
52838
    }
52839
    if (leadingSlash == '') {
52840
        while (up-- > 0) {
52841
            out.unshift('..');
52842
        }
52843
        if (out.length === 0)
52844
            out.push('.');
52845
    }
52846
    return leadingSlash + out.join('/') + trailingSlash;
52847
}
52848
/**
52849
 * Takes an array of the parts from split and canonicalizes the path part
52850
 * and then joins all the parts.
52851
 */
52852
function _joinAndCanonicalizePath(parts) {
52853
    var path = parts[_ComponentIndex.Path];
52854
    path = path == null ? '' : _removeDotSegments(path);
52855
    parts[_ComponentIndex.Path] = path;
52856
    return _buildFromEncodedParts(parts[_ComponentIndex.Scheme], parts[_ComponentIndex.UserInfo], parts[_ComponentIndex.Domain], parts[_ComponentIndex.Port], path, parts[_ComponentIndex.QueryData], parts[_ComponentIndex.Fragment]);
52857
}
52858
/**
52859
 * Resolves a URL.
52860
 * @param base The URL acting as the base URL.
52861
 * @param to The URL to resolve.
52862
 */
52863
function _resolveUrl(base, url) {
52864
    var parts = _split(encodeURI(url));
52865
    var baseParts = _split(base);
52866
    if (parts[_ComponentIndex.Scheme] != null) {
52867
        return _joinAndCanonicalizePath(parts);
52868
    }
52869
    else {
52870
        parts[_ComponentIndex.Scheme] = baseParts[_ComponentIndex.Scheme];
52871
    }
52872
    for (var i = _ComponentIndex.Scheme; i <= _ComponentIndex.Port; i++) {
52873
        if (parts[i] == null) {
52874
            parts[i] = baseParts[i];
52875
        }
52876
    }
52877
    if (parts[_ComponentIndex.Path][0] == '/') {
52878
        return _joinAndCanonicalizePath(parts);
52879
    }
52880
    var path = baseParts[_ComponentIndex.Path];
52881
    if (path == null)
52882
        path = '/';
52883
    var index = path.lastIndexOf('/');
52884
    path = path.substring(0, index + 1) + parts[_ComponentIndex.Path];
52885
    parts[_ComponentIndex.Path] = path;
52886
    return _joinAndCanonicalizePath(parts);
52887
}
52888
 
52889
/**
52890
 * @license
52891
 * Copyright Google Inc. All Rights Reserved.
52892
 *
52893
 * Use of this source code is governed by an MIT-style license that can be
52894
 * found in the LICENSE file at https://angular.io/license
52895
 */
52896
/**
52897
 * An interface for retrieving documents by URL that the compiler uses
52898
 * to load templates.
52899
 */
52900
var ResourceLoader = /** @class */ (function () {
52901
    function ResourceLoader() {
52902
    }
52903
    ResourceLoader.prototype.get = function (url) { return ''; };
52904
    return ResourceLoader;
52905
}());
52906
 
52907
/**
52908
 * @license
52909
 * Copyright Google Inc. All Rights Reserved.
52910
 *
52911
 * Use of this source code is governed by an MIT-style license that can be
52912
 * found in the LICENSE file at https://angular.io/license
52913
 */
52914
/**
52915
 * Extract i18n messages from source code
52916
 */
52917
var Extractor = /** @class */ (function () {
52918
    function Extractor(host, staticSymbolResolver, messageBundle, metadataResolver) {
52919
        this.host = host;
52920
        this.staticSymbolResolver = staticSymbolResolver;
52921
        this.messageBundle = messageBundle;
52922
        this.metadataResolver = metadataResolver;
52923
    }
52924
    Extractor.prototype.extract = function (rootFiles) {
52925
        var _this = this;
52926
        var _a = analyzeAndValidateNgModules(rootFiles, this.host, this.staticSymbolResolver, this.metadataResolver), files = _a.files, ngModules = _a.ngModules;
52927
        return Promise
52928
            .all(ngModules.map(function (ngModule) { return _this.metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, false); }))
52929
            .then(function () {
52930
            var errors = [];
52931
            files.forEach(function (file) {
52932
                var compMetas = [];
52933
                file.directives.forEach(function (directiveType) {
52934
                    var dirMeta = _this.metadataResolver.getDirectiveMetadata(directiveType);
52935
                    if (dirMeta && dirMeta.isComponent) {
52936
                        compMetas.push(dirMeta);
52937
                    }
52938
                });
52939
                compMetas.forEach(function (compMeta) {
52940
                    var html = compMeta.template.template;
52941
                    var interpolationConfig = InterpolationConfig.fromArray(compMeta.template.interpolation);
52942
                    errors.push.apply(errors, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(_this.messageBundle.updateFromTemplate(html, file.fileName, interpolationConfig)));
52943
                });
52944
            });
52945
            if (errors.length) {
52946
                throw new Error(errors.map(function (e) { return e.toString(); }).join('\n'));
52947
            }
52948
            return _this.messageBundle;
52949
        });
52950
    };
52951
    Extractor.create = function (host, locale) {
52952
        var htmlParser = new HtmlParser();
52953
        var urlResolver = createAotUrlResolver(host);
52954
        var symbolCache = new StaticSymbolCache();
52955
        var summaryResolver = new AotSummaryResolver(host, symbolCache);
52956
        var staticSymbolResolver = new StaticSymbolResolver(host, symbolCache, summaryResolver);
52957
        var staticReflector = new StaticReflector(summaryResolver, staticSymbolResolver);
52958
        var config = new CompilerConfig({ defaultEncapsulation: ViewEncapsulation.Emulated, useJit: false });
52959
        var normalizer = new DirectiveNormalizer({ get: function (url) { return host.loadResource(url); } }, urlResolver, htmlParser, config);
52960
        var elementSchemaRegistry = new DomElementSchemaRegistry();
52961
        var resolver = new CompileMetadataResolver(config, htmlParser, new NgModuleResolver(staticReflector), new DirectiveResolver(staticReflector), new PipeResolver(staticReflector), summaryResolver, elementSchemaRegistry, normalizer, console, symbolCache, staticReflector);
52962
        // TODO(vicb): implicit tags & attributes
52963
        var messageBundle = new MessageBundle(htmlParser, [], {}, locale);
52964
        var extractor = new Extractor(host, staticSymbolResolver, messageBundle, resolver);
52965
        return { extractor: extractor, staticReflector: staticReflector };
52966
    };
52967
    return Extractor;
52968
}());
52969
 
52970
/**
52971
 * @license
52972
 * Copyright Google Inc. All Rights Reserved.
52973
 *
52974
 * Use of this source code is governed by an MIT-style license that can be
52975
 * found in the LICENSE file at https://angular.io/license
52976
 */
52977
 
52978
/**
52979
 * @license
52980
 * Copyright Google Inc. All Rights Reserved.
52981
 *
52982
 * Use of this source code is governed by an MIT-style license that can be
52983
 * found in the LICENSE file at https://angular.io/license
52984
 */
52985
/**
52986
 * @module
52987
 * @description
52988
 * Entry point for all APIs of the compiler package.
52989
 *
52990
 * <div class="callout is-critical">
52991
 *   <header>Unstable APIs</header>
52992
 *   <p>
52993
 *     All compiler apis are currently considered experimental and private!
52994
 *   </p>
52995
 *   <p>
52996
 *     We expect the APIs in this package to keep on changing. Do not rely on them.
52997
 *   </p>
52998
 * </div>
52999
 */
53000
 
53001
// This file only reexports content of the `src` folder. Keep it that way.
53002
 
53003
/**
53004
 * @license
53005
 * Copyright Google Inc. All Rights Reserved.
53006
 *
53007
 * Use of this source code is governed by an MIT-style license that can be
53008
 * found in the LICENSE file at https://angular.io/license
53009
 */
53010
/**
53011
 * @module
53012
 * @description
53013
 * Entry point for all public APIs of this package.
53014
 */
53015
 
53016
// This file only reexports content of the `src` folder. Keep it that way.
53017
 
53018
/**
53019
 * @license
53020
 * Copyright Google Inc. All Rights Reserved.
53021
 *
53022
 * Use of this source code is governed by an MIT-style license that can be
53023
 * found in the LICENSE file at https://angular.io/license
53024
 */
53025
// This file is not used to build this module. It is only used during editing
53026
// by the TypeScript language service and during build for verification. `ngc`
53027
// replaces this file with production index.ts when it rewrites private symbol
53028
// names.
53029
 
53030
/**
53031
 * @license
53032
 * Copyright Google Inc. All Rights Reserved.
53033
 *
53034
 * Use of this source code is governed by an MIT-style license that can be
53035
 * found in the LICENSE file at https://angular.io/license
53036
 */
53037
// This file is not used to build this module. It is only used during editing
53038
// by the TypeScript language service and during build for verification. `ngc`
53039
// replaces this file with production index.ts when it rewrites private symbol
53040
// names.
53041
 
53042
 
53043
//# sourceMappingURL=compiler.js.map
53044
 
53045
 
53046
/***/ }),
53047
 
53048
/***/ "./node_modules/@angular/compiler/src/util.js":
53049
/*!****************************************************!*\
53050
  !*** ./node_modules/@angular/compiler/src/util.js ***!
53051
  \****************************************************/
53052
/*! no static exports found */
53053
/***/ (function(module, exports, __webpack_require__) {
53054
 
53055
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
53056
 * @license
53057
 * Copyright Google Inc. All Rights Reserved.
53058
 *
53059
 * Use of this source code is governed by an MIT-style license that can be
53060
 * found in the LICENSE file at https://angular.io/license
53061
 */
53062
(function (factory) {
53063
    if (typeof module === "object" && typeof module.exports === "object") {
53064
        var v = factory(__webpack_require__("./node_modules/@angular/compiler/src sync recursive"), exports);
53065
        if (v !== undefined) module.exports = v;
53066
    }
53067
    else if (true) {
53068
        !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
53069
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
53070
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
53071
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
53072
    }
53073
})(function (require, exports) {
53074
    "use strict";
53075
    Object.defineProperty(exports, "__esModule", { value: true });
53076
    var DASH_CASE_REGEXP = /-+([a-z0-9])/g;
53077
    function dashCaseToCamelCase(input) {
53078
        return input.replace(DASH_CASE_REGEXP, function () {
53079
            var m = [];
53080
            for (var _i = 0; _i < arguments.length; _i++) {
53081
                m[_i] = arguments[_i];
53082
            }
53083
            return m[1].toUpperCase();
53084
        });
53085
    }
53086
    exports.dashCaseToCamelCase = dashCaseToCamelCase;
53087
    function splitAtColon(input, defaultValues) {
53088
        return _splitAt(input, ':', defaultValues);
53089
    }
53090
    exports.splitAtColon = splitAtColon;
53091
    function splitAtPeriod(input, defaultValues) {
53092
        return _splitAt(input, '.', defaultValues);
53093
    }
53094
    exports.splitAtPeriod = splitAtPeriod;
53095
    function _splitAt(input, character, defaultValues) {
53096
        var characterIndex = input.indexOf(character);
53097
        if (characterIndex == -1)
53098
            return defaultValues;
53099
        return [input.slice(0, characterIndex).trim(), input.slice(characterIndex + 1).trim()];
53100
    }
53101
    function visitValue(value, visitor, context) {
53102
        if (Array.isArray(value)) {
53103
            return visitor.visitArray(value, context);
53104
        }
53105
        if (isStrictStringMap(value)) {
53106
            return visitor.visitStringMap(value, context);
53107
        }
53108
        if (value == null || typeof value == 'string' || typeof value == 'number' ||
53109
            typeof value == 'boolean') {
53110
            return visitor.visitPrimitive(value, context);
53111
        }
53112
        return visitor.visitOther(value, context);
53113
    }
53114
    exports.visitValue = visitValue;
53115
    function isDefined(val) {
53116
        return val !== null && val !== undefined;
53117
    }
53118
    exports.isDefined = isDefined;
53119
    function noUndefined(val) {
53120
        return val === undefined ? null : val;
53121
    }
53122
    exports.noUndefined = noUndefined;
53123
    var ValueTransformer = /** @class */ (function () {
53124
        function ValueTransformer() {
53125
        }
53126
        ValueTransformer.prototype.visitArray = function (arr, context) {
53127
            var _this = this;
53128
            return arr.map(function (value) { return visitValue(value, _this, context); });
53129
        };
53130
        ValueTransformer.prototype.visitStringMap = function (map, context) {
53131
            var _this = this;
53132
            var result = {};
53133
            Object.keys(map).forEach(function (key) { result[key] = visitValue(map[key], _this, context); });
53134
            return result;
53135
        };
53136
        ValueTransformer.prototype.visitPrimitive = function (value, context) { return value; };
53137
        ValueTransformer.prototype.visitOther = function (value, context) { return value; };
53138
        return ValueTransformer;
53139
    }());
53140
    exports.ValueTransformer = ValueTransformer;
53141
    exports.SyncAsync = {
53142
        assertSync: function (value) {
53143
            if (isPromise(value)) {
53144
                throw new Error("Illegal state: value cannot be a promise");
53145
            }
53146
            return value;
53147
        },
53148
        then: function (value, cb) { return isPromise(value) ? value.then(cb) : cb(value); },
53149
        all: function (syncAsyncValues) {
53150
            return syncAsyncValues.some(isPromise) ? Promise.all(syncAsyncValues) : syncAsyncValues;
53151
        }
53152
    };
53153
    function error(msg) {
53154
        throw new Error("Internal Error: " + msg);
53155
    }
53156
    exports.error = error;
53157
    function syntaxError(msg, parseErrors) {
53158
        var error = Error(msg);
53159
        error[ERROR_SYNTAX_ERROR] = true;
53160
        if (parseErrors)
53161
            error[ERROR_PARSE_ERRORS] = parseErrors;
53162
        return error;
53163
    }
53164
    exports.syntaxError = syntaxError;
53165
    var ERROR_SYNTAX_ERROR = 'ngSyntaxError';
53166
    var ERROR_PARSE_ERRORS = 'ngParseErrors';
53167
    function isSyntaxError(error) {
53168
        return error[ERROR_SYNTAX_ERROR];
53169
    }
53170
    exports.isSyntaxError = isSyntaxError;
53171
    function getParseErrors(error) {
53172
        return error[ERROR_PARSE_ERRORS] || [];
53173
    }
53174
    exports.getParseErrors = getParseErrors;
53175
    // Escape characters that have a special meaning in Regular Expressions
53176
    function escapeRegExp(s) {
53177
        return s.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
53178
    }
53179
    exports.escapeRegExp = escapeRegExp;
53180
    var STRING_MAP_PROTO = Object.getPrototypeOf({});
53181
    function isStrictStringMap(obj) {
53182
        return typeof obj === 'object' && obj !== null && Object.getPrototypeOf(obj) === STRING_MAP_PROTO;
53183
    }
53184
    function utf8Encode(str) {
53185
        var encoded = '';
53186
        for (var index = 0; index < str.length; index++) {
53187
            var codePoint = str.charCodeAt(index);
53188
            // decode surrogate
53189
            // see https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
53190
            if (codePoint >= 0xd800 && codePoint <= 0xdbff && str.length > (index + 1)) {
53191
                var low = str.charCodeAt(index + 1);
53192
                if (low >= 0xdc00 && low <= 0xdfff) {
53193
                    index++;
53194
                    codePoint = ((codePoint - 0xd800) << 10) + low - 0xdc00 + 0x10000;
53195
                }
53196
            }
53197
            if (codePoint <= 0x7f) {
53198
                encoded += String.fromCharCode(codePoint);
53199
            }
53200
            else if (codePoint <= 0x7ff) {
53201
                encoded += String.fromCharCode(((codePoint >> 6) & 0x1F) | 0xc0, (codePoint & 0x3f) | 0x80);
53202
            }
53203
            else if (codePoint <= 0xffff) {
53204
                encoded += String.fromCharCode((codePoint >> 12) | 0xe0, ((codePoint >> 6) & 0x3f) | 0x80, (codePoint & 0x3f) | 0x80);
53205
            }
53206
            else if (codePoint <= 0x1fffff) {
53207
                encoded += String.fromCharCode(((codePoint >> 18) & 0x07) | 0xf0, ((codePoint >> 12) & 0x3f) | 0x80, ((codePoint >> 6) & 0x3f) | 0x80, (codePoint & 0x3f) | 0x80);
53208
            }
53209
        }
53210
        return encoded;
53211
    }
53212
    exports.utf8Encode = utf8Encode;
53213
    function stringify(token) {
53214
        if (typeof token === 'string') {
53215
            return token;
53216
        }
53217
        if (token instanceof Array) {
53218
            return '[' + token.map(stringify).join(', ') + ']';
53219
        }
53220
        if (token == null) {
53221
            return '' + token;
53222
        }
53223
        if (token.overriddenName) {
53224
            return "" + token.overriddenName;
53225
        }
53226
        if (token.name) {
53227
            return "" + token.name;
53228
        }
53229
        // WARNING: do not try to `JSON.stringify(token)` here
53230
        // see https://github.com/angular/angular/issues/23440
53231
        var res = token.toString();
53232
        if (res == null) {
53233
            return '' + res;
53234
        }
53235
        var newLineIndex = res.indexOf('\n');
53236
        return newLineIndex === -1 ? res : res.substring(0, newLineIndex);
53237
    }
53238
    exports.stringify = stringify;
53239
    /**
53240
     * Lazily retrieves the reference value from a forwardRef.
53241
     */
53242
    function resolveForwardRef(type) {
53243
        if (typeof type === 'function' && type.hasOwnProperty('__forward_ref__')) {
53244
            return type();
53245
        }
53246
        else {
53247
            return type;
53248
        }
53249
    }
53250
    exports.resolveForwardRef = resolveForwardRef;
53251
    /**
53252
     * Determine if the argument is shaped like a Promise
53253
     */
53254
    function isPromise(obj) {
53255
        // allow any Promise/A+ compliant thenable.
53256
        // It's up to the caller to ensure that obj.then conforms to the spec
53257
        return !!obj && typeof obj.then === 'function';
53258
    }
53259
    exports.isPromise = isPromise;
53260
    var Version = /** @class */ (function () {
53261
        function Version(full) {
53262
            this.full = full;
53263
            var splits = full.split('.');
53264
            this.major = splits[0];
53265
            this.minor = splits[1];
53266
            this.patch = splits.slice(2).join('.');
53267
        }
53268
        return Version;
53269
    }());
53270
    exports.Version = Version;
53271
});
53272
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2NvbXBpbGVyL3NyYy91dGlsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRzs7Ozs7Ozs7Ozs7O0lBT0gsSUFBTSxnQkFBZ0IsR0FBRyxlQUFlLENBQUM7SUFFekMsNkJBQW9DLEtBQWE7UUFDL0MsTUFBTSxDQUFDLEtBQUssQ0FBQyxPQUFPLENBQUMsZ0JBQWdCLEVBQUU7WUFBQyxXQUFXO2lCQUFYLFVBQVcsRUFBWCxxQkFBVyxFQUFYLElBQVc7Z0JBQVgsc0JBQVc7O1lBQUssT0FBQSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsV0FBVyxFQUFFO1FBQWxCLENBQWtCLENBQUMsQ0FBQztJQUM5RSxDQUFDO0lBRkQsa0RBRUM7SUFFRCxzQkFBNkIsS0FBYSxFQUFFLGFBQXVCO1FBQ2pFLE1BQU0sQ0FBQyxRQUFRLENBQUMsS0FBSyxFQUFFLEdBQUcsRUFBRSxhQUFhLENBQUMsQ0FBQztJQUM3QyxDQUFDO0lBRkQsb0NBRUM7SUFFRCx1QkFBOEIsS0FBYSxFQUFFLGFBQXVCO1FBQ2xFLE1BQU0sQ0FBQyxRQUFRLENBQUMsS0FBSyxFQUFFLEdBQUcsRUFBRSxhQUFhLENBQUMsQ0FBQztJQUM3QyxDQUFDO0lBRkQsc0NBRUM7SUFFRCxrQkFBa0IsS0FBYSxFQUFFLFNBQWlCLEVBQUUsYUFBdUI7UUFDekUsSUFBTSxjQUFjLEdBQUcsS0FBSyxDQUFDLE9BQU8sQ0FBQyxTQUFTLENBQUMsQ0FBQztRQUNoRCxFQUFFLENBQUMsQ0FBQyxjQUFjLElBQUksQ0FBQyxDQUFDLENBQUM7WUFBQyxNQUFNLENBQUMsYUFBYSxDQUFDO1FBQy9DLE1BQU0sQ0FBQyxDQUFDLEtBQUssQ0FBQyxLQUFLLENBQUMsQ0FBQyxFQUFFLGNBQWMsQ0FBQyxDQUFDLElBQUksRUFBRSxFQUFFLEtBQUssQ0FBQyxLQUFLLENBQUMsY0FBYyxHQUFHLENBQUMsQ0FBQyxDQUFDLElBQUksRUFBRSxDQUFDLENBQUM7SUFDekYsQ0FBQztJQUVELG9CQUEyQixLQUFVLEVBQUUsT0FBcUIsRUFBRSxPQUFZO1FBQ3hFLEVBQUUsQ0FBQyxDQUFDLEtBQUssQ0FBQyxPQUFPLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDO1lBQ3pCLE1BQU0sQ0FBQyxPQUFPLENBQUMsVUFBVSxDQUFRLEtBQUssRUFBRSxPQUFPLENBQUMsQ0FBQztRQUNuRCxDQUFDO1FBRUQsRUFBRSxDQUFDLENBQUMsaUJBQWlCLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDO1lBQzdCLE1BQU0sQ0FBQyxPQUFPLENBQUMsY0FBYyxDQUF1QixLQUFLLEVBQUUsT0FBTyxDQUFDLENBQUM7UUFDdEUsQ0FBQztRQUVELEVBQUUsQ0FBQyxDQUFDLEtBQUssSUFBSSxJQUFJLElBQUksT0FBTyxLQUFLLElBQUksUUFBUSxJQUFJLE9BQU8sS0FBSyxJQUFJLFFBQVE7WUFDckUsT0FBTyxLQUFLLElBQUksU0FBUyxDQUFDLENBQUMsQ0FBQztZQUM5QixNQUFNLENBQUMsT0FBTyxDQUFDLGNBQWMsQ0FBQyxLQUFLLEVBQUUsT0FBTyxDQUFDLENBQUM7UUFDaEQsQ0FBQztRQUVELE1BQU0sQ0FBQyxPQUFPLENBQUMsVUFBVSxDQUFDLEtBQUssRUFBRSxPQUFPLENBQUMsQ0FBQztJQUM1QyxDQUFDO0lBZkQsZ0NBZUM7SUFFRCxtQkFBMEIsR0FBUTtRQUNoQyxNQUFNLENBQUMsR0FBRyxLQUFLLElBQUksSUFBSSxHQUFHLEtBQUssU0FBUyxDQUFDO0lBQzNDLENBQUM7SUFGRCw4QkFFQztJQUVELHFCQUErQixHQUFrQjtRQUMvQyxNQUFNLENBQUMsR0FBRyxLQUFLLFNBQVMsQ0FBQyxDQUFDLENBQUMsSUFBTSxDQUFDLENBQUMsQ0FBQyxHQUFHLENBQUM7SUFDMUMsQ0FBQztJQUZELGtDQUVDO0lBU0Q7UUFBQTtRQVdBLENBQUM7UUFWQyxxQ0FBVSxHQUFWLFVBQVcsR0FBVSxFQUFFLE9BQVk7WUFBbkMsaUJBRUM7WUFEQyxNQUFNLENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FBQyxVQUFBLEtBQUssSUFBSSxPQUFBLFVBQVUsQ0FBQyxLQUFLLEVBQUUsS0FBSSxFQUFFLE9BQU8sQ0FBQyxFQUFoQyxDQUFnQyxDQUFDLENBQUM7UUFDNUQsQ0FBQztRQUNELHlDQUFjLEdBQWQsVUFBZSxHQUF5QixFQUFFLE9BQVk7WUFBdEQsaUJBSUM7WUFIQyxJQUFNLE1BQU0sR0FBeUIsRUFBRSxDQUFDO1lBQ3hDLE1BQU0sQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUMsT0FBTyxDQUFDLFVBQUEsR0FBRyxJQUFNLE1BQU0sQ0FBQyxHQUFHLENBQUMsR0FBRyxVQUFVLENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FBQyxFQUFFLEtBQUksRUFBRSxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO1lBQ3hGLE1BQU0sQ0FBQyxNQUFNLENBQUM7UUFDaEIsQ0FBQztRQUNELHlDQUFjLEdBQWQsVUFBZSxLQUFVLEVBQUUsT0FBWSxJQUFTLE1BQU0sQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDO1FBQy9ELHFDQUFVLEdBQVYsVUFBVyxLQUFVLEVBQUUsT0FBWSxJQUFTLE1BQU0sQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDO1FBQzdELHVCQUFDO0lBQUQsQ0FBQyxBQVhELElBV0M7SUFYWSw0Q0FBZ0I7SUFlaEIsUUFBQSxTQUFTLEdBQUc7UUFDdkIsVUFBVSxFQUFFLFVBQUksS0FBbUI7WUFDakMsRUFBRSxDQUFDLENBQUMsU0FBUyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQztnQkFDckIsTUFBTSxJQUFJLEtBQUssQ0FBQywwQ0FBMEMsQ0FBQyxDQUFDO1lBQzlELENBQUM7WUFDRCxNQUFNLENBQUMsS0FBSyxDQUFDO1FBQ2YsQ0FBQztRQUNELElBQUksRUFBRSxVQUFPLEtBQW1CLEVBQUUsRUFBOEMsSUFDcEQsTUFBTSxDQUFDLFNBQVMsQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUEsQ0FBQztRQUNsRixHQUFHLEVBQUUsVUFBSSxlQUErQjtZQUN0QyxNQUFNLENBQUMsZUFBZSxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDLENBQUMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxlQUFlLENBQUMsQ0FBQyxDQUFDLENBQUMsZUFBc0IsQ0FBQztRQUNqRyxDQUFDO0tBQ0YsQ0FBQztJQUVGLGVBQXNCLEdBQVc7UUFDL0IsTUFBTSxJQUFJLEtBQUssQ0FBQyxxQkFBbUIsR0FBSyxDQUFDLENBQUM7SUFDNUMsQ0FBQztJQUZELHNCQUVDO0lBRUQscUJBQTRCLEdBQVcsRUFBRSxXQUEwQjtRQUNqRSxJQUFNLEtBQUssR0FBRyxLQUFLLENBQUMsR0FBRyxDQUFDLENBQUM7UUFDeEIsS0FBYSxDQUFDLGtCQUFrQixDQUFDLEdBQUcsSUFBSSxDQUFDO1FBQzFDLEVBQUUsQ0FBQyxDQUFDLFdBQVcsQ0FBQztZQUFFLEtBQWEsQ0FBQyxrQkFBa0IsQ0FBQyxHQUFHLFdBQVcsQ0FBQztRQUNsRSxNQUFNLENBQUMsS0FBSyxDQUFDO0lBQ2YsQ0FBQztJQUxELGtDQUtDO0lBRUQsSUFBTSxrQkFBa0IsR0FBRyxlQUFlLENBQUM7SUFDM0MsSUFBTSxrQkFBa0IsR0FBRyxlQUFlLENBQUM7SUFFM0MsdUJBQThCLEtBQVk7UUFDeEMsTUFBTSxDQUFFLEtBQWEsQ0FBQyxrQkFBa0IsQ0FBQyxDQUFDO0lBQzVDLENBQUM7SUFGRCxzQ0FFQztJQUVELHdCQUErQixLQUFZO1FBQ3pDLE1BQU0sQ0FBRSxLQUFhLENBQUMsa0JBQWtCLENBQUMsSUFBSSxFQUFFLENBQUM7SUFDbEQsQ0FBQztJQUZELHdDQUVDO0lBRUQsdUVBQXVFO0lBQ3ZFLHNCQUE2QixDQUFTO1FBQ3BDLE1BQU0sQ0FBQyxDQUFDLENBQUMsT0FBTyxDQUFDLDRCQUE0QixFQUFFLE1BQU0sQ0FBQyxDQUFDO0lBQ3pELENBQUM7SUFGRCxvQ0FFQztJQUVELElBQU0sZ0JBQWdCLEdBQUcsTUFBTSxDQUFDLGNBQWMsQ0FBQyxFQUFFLENBQUMsQ0FBQztJQUNuRCwyQkFBMkIsR0FBUTtRQUNqQyxNQUFNLENBQUMsT0FBTyxHQUFHLEtBQUssUUFBUSxJQUFJLEdBQUcsS0FBSyxJQUFJLElBQUksTUFBTSxDQUFDLGNBQWMsQ0FBQyxHQUFHLENBQUMsS0FBSyxnQkFBZ0IsQ0FBQztJQUNwRyxDQUFDO0lBRUQsb0JBQTJCLEdBQVc7UUFDcEMsSUFBSSxPQUFPLEdBQUcsRUFBRSxDQUFDO1FBQ2pCLEdBQUcsQ0FBQyxDQUFDLElBQUksS0FBSyxHQUFHLENBQUMsRUFBRSxLQUFLLEdBQUcsR0FBRyxDQUFDLE1BQU0sRUFBRSxLQUFLLEVBQUUsRUFBRSxDQUFDO1lBQ2hELElBQUksU0FBUyxHQUFHLEdBQUcsQ0FBQyxVQUFVLENBQUMsS0FBSyxDQUFDLENBQUM7WUFFdEMsbUJBQW1CO1lBQ25CLDRFQUE0RTtZQUM1RSxFQUFFLENBQUMsQ0FBQyxTQUFTLElBQUksTUFBTSxJQUFJLFNBQVMsSUFBSSxNQUFNLElBQUksR0FBRyxDQUFDLE1BQU0sR0FBRyxDQUFDLEtBQUssR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7Z0JBQzNFLElBQU0sR0FBRyxHQUFHLEdBQUcsQ0FBQyxVQUFVLENBQUMsS0FBSyxHQUFHLENBQUMsQ0FBQyxDQUFDO2dCQUN0QyxFQUFFLENBQUMsQ0FBQyxHQUFHLElBQUksTUFBTSxJQUFJLEdBQUcsSUFBSSxNQUFNLENBQUMsQ0FBQyxDQUFDO29CQUNuQyxLQUFLLEVBQUUsQ0FBQztvQkFDUixTQUFTLEdBQUcsQ0FBQyxDQUFDLFNBQVMsR0FBRyxNQUFNLENBQUMsSUFBSSxFQUFFLENBQUMsR0FBRyxHQUFHLEdBQUcsTUFBTSxHQUFHLE9BQU8sQ0FBQztnQkFDcEUsQ0FBQztZQUNILENBQUM7WUFFRCxFQUFFLENBQUMsQ0FBQyxTQUFTLElBQUksSUFBSSxDQUFDLENBQUMsQ0FBQztnQkFDdEIsT0FBTyxJQUFJLE1BQU0sQ0FBQyxZQUFZLENBQUMsU0FBUyxDQUFDLENBQUM7WUFDNUMsQ0FBQztZQUFDLElBQUksQ0FBQyxFQUFFLENBQUMsQ0FBQyxTQUFTLElBQUksS0FBSyxDQUFDLENBQUMsQ0FBQztnQkFDOUIsT0FBTyxJQUFJLE1BQU0sQ0FBQyxZQUFZLENBQUMsQ0FBQyxDQUFDLFNBQVMsSUFBSSxDQUFDLENBQUMsR0FBRyxJQUFJLENBQUMsR0FBRyxJQUFJLEVBQUUsQ0FBQyxTQUFTLEdBQUcsSUFBSSxDQUFDLEdBQUcsSUFBSSxDQUFDLENBQUM7WUFDOUYsQ0FBQztZQUFDLElBQUksQ0FBQyxFQUFFLENBQUMsQ0FBQyxTQUFTLElBQUksTUFBTSxDQUFDLENBQUMsQ0FBQztnQkFDL0IsT0FBTyxJQUFJLE1BQU0sQ0FBQyxZQUFZLENBQzFCLENBQUMsU0FBUyxJQUFJLEVBQUUsQ0FBQyxHQUFHLElBQUksRUFBRSxDQUFDLENBQUMsU0FBUyxJQUFJLENBQUMsQ0FBQyxHQUFHLElBQUksQ0FBQyxHQUFHLElBQUksRUFBRSxDQUFDLFNBQVMsR0FBRyxJQUFJLENBQUMsR0FBRyxJQUFJLENBQUMsQ0FBQztZQUM3RixDQUFDO1lBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQyxDQUFDLFNBQVMsSUFBSSxRQUFRLENBQUMsQ0FBQyxDQUFDO2dCQUNqQyxPQUFPLElBQUksTUFBTSxDQUFDLFlBQVksQ0FDMUIsQ0FBQyxDQUFDLFNBQVMsSUFBSSxFQUFFLENBQUMsR0FBRyxJQUFJLENBQUMsR0FBRyxJQUFJLEVBQUUsQ0FBQyxDQUFDLFNBQVMsSUFBSSxFQUFFLENBQUMsR0FBRyxJQUFJLENBQUMsR0FBRyxJQUFJLEVBQ3BFLENBQUMsQ0FBQyxTQUFTLElBQUksQ0FBQyxDQUFDLEdBQUcsSUFBSSxDQUFDLEdBQUcsSUFBSSxFQUFFLENBQUMsU0FBUyxHQUFHLElBQUksQ0FBQyxHQUFHLElBQUksQ0FBQyxDQUFDO1lBQ25FLENBQUM7UUFDSCxDQUFDO1FBRUQsTUFBTSxDQUFDLE9BQU8sQ0FBQztJQUNqQixDQUFDO0lBOUJELGdDQThCQztJQVNELG1CQUEwQixLQUFVO1FBQ2xDLEVBQUUsQ0FBQyxDQUFDLE9BQU8sS0FBSyxLQUFLLFFBQVEsQ0FBQyxDQUFDLENBQUM7WUFDOUIsTUFBTSxDQUFDLEtBQUssQ0FBQztRQUNmLENBQUM7UUFFRCxFQUFFLENBQUMsQ0FBQyxLQUFLLFlBQVksS0FBSyxDQUFDLENBQUMsQ0FBQztZQUMzQixNQUFNLENBQUMsR0FBRyxHQUFHLEtBQUssQ0FBQyxHQUFHLENBQUMsU0FBUyxDQUFDLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxHQUFHLEdBQUcsQ0FBQztRQUNyRCxDQUFDO1FBRUQsRUFBRSxDQUFDLENBQUMsS0FBSyxJQUFJLElBQUksQ0FBQyxDQUFDLENBQUM7WUFDbEIsTUFBTSxDQUFDLEVBQUUsR0FBRyxLQUFLLENBQUM7UUFDcEIsQ0FBQztRQUVELEVBQUUsQ0FBQyxDQUFDLEtBQUssQ0FBQyxjQUFjLENBQUMsQ0FBQyxDQUFDO1lBQ3pCLE1BQU0sQ0FBQyxLQUFHLEtBQUssQ0FBQyxjQUFnQixDQUFDO1FBQ25DLENBQUM7UUFFRCxFQUFFLENBQUMsQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQztZQUNmLE1BQU0sQ0FBQyxLQUFHLEtBQUssQ0FBQyxJQUFNLENBQUM7UUFDekIsQ0FBQztRQUVELHNEQUFzRDtRQUN0RCxzREFBc0Q7UUFDdEQsSUFBTSxHQUFHLEdBQUcsS0FBSyxDQUFDLFFBQVEsRUFBRSxDQUFDO1FBRTdCLEVBQUUsQ0FBQyxDQUFDLEdBQUcsSUFBSSxJQUFJLENBQUMsQ0FBQyxDQUFDO1lBQ2hCLE1BQU0sQ0FBQyxFQUFFLEdBQUcsR0FBRyxDQUFDO1FBQ2xCLENBQUM7UUFFRCxJQUFNLFlBQVksR0FBRyxHQUFHLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO1FBQ3ZDLE1BQU0sQ0FBQyxZQUFZLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsR0FBRyxDQUFDLFNBQVMsQ0FBQyxDQUFDLEVBQUUsWUFBWSxDQUFDLENBQUM7SUFDcEUsQ0FBQztJQS9CRCw4QkErQkM7SUFFRDs7T0FFRztJQUNILDJCQUFrQyxJQUFTO1FBQ3pDLEVBQUUsQ0FBQyxDQUFDLE9BQU8sSUFBSSxLQUFLLFVBQVUsSUFBSSxJQUFJLENBQUMsY0FBYyxDQUFDLGlCQUFpQixDQUFDLENBQUMsQ0FBQyxDQUFDO1lBQ3pFLE1BQU0sQ0FBQyxJQUFJLEVBQUUsQ0FBQztRQUNoQixDQUFDO1FBQUMsSUFBSSxDQUFDLENBQUM7WUFDTixNQUFNLENBQUMsSUFBSSxDQUFDO1FBQ2QsQ0FBQztJQUNILENBQUM7SUFORCw4Q0FNQztJQUVEOztPQUVHO0lBQ0gsbUJBQTBCLEdBQVE7UUFDaEMsMkNBQTJDO1FBQzNDLHFFQUFxRTtRQUNyRSxNQUFNLENBQUMsQ0FBQyxDQUFDLEdBQUcsSUFBSSxPQUFPLEdBQUcsQ0FBQyxJQUFJLEtBQUssVUFBVSxDQUFDO0lBQ2pELENBQUM7SUFKRCw4QkFJQztJQUVEO1FBS0UsaUJBQW1CLElBQVk7WUFBWixTQUFJLEdBQUosSUFBSSxDQUFRO1lBQzdCLElBQU0sTUFBTSxHQUFHLElBQUksQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLENBQUM7WUFDL0IsSUFBSSxDQUFDLEtBQUssR0FBRyxNQUFNLENBQUMsQ0FBQyxDQUFDLENBQUM7WUFDdkIsSUFBSSxDQUFDLEtBQUssR0FBRyxNQUFNLENBQUMsQ0FBQyxDQUFDLENBQUM7WUFDdkIsSUFBSSxDQUFDLEtBQUssR0FBRyxNQUFNLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztRQUN6QyxDQUFDO1FBQ0gsY0FBQztJQUFELENBQUMsQUFYRCxJQVdDO0lBWFksMEJBQU8iLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBsaWNlbnNlXG4gKiBDb3B5cmlnaHQgR29vZ2xlIEluYy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbiAqXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZVxuICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2FuZ3VsYXIuaW8vbGljZW5zZVxuICovXG5cbmltcG9ydCB7Q29uc3RhbnRQb29sfSBmcm9tICcuL2NvbnN0YW50X3Bvb2wnO1xuXG5pbXBvcnQgKiBhcyBvIGZyb20gJy4vb3V0cHV0L291dHB1dF9hc3QnO1xuaW1wb3J0IHtQYXJzZUVycm9yfSBmcm9tICcuL3BhcnNlX3V0aWwnO1xuXG5jb25zdCBEQVNIX0NBU0VfUkVHRVhQID0gLy0rKFthLXowLTldKS9nO1xuXG5leHBvcnQgZnVuY3Rpb24gZGFzaENhc2VUb0NhbWVsQ2FzZShpbnB1dDogc3RyaW5nKTogc3RyaW5nIHtcbiAgcmV0dXJuIGlucHV0LnJlcGxhY2UoREFTSF9DQVNFX1JFR0VYUCwgKC4uLm06IGFueVtdKSA9PiBtWzFdLnRvVXBwZXJDYXNlKCkpO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gc3BsaXRBdENvbG9uKGlucHV0OiBzdHJpbmcsIGRlZmF1bHRWYWx1ZXM6IHN0cmluZ1tdKTogc3RyaW5nW10ge1xuICByZXR1cm4gX3NwbGl0QXQoaW5wdXQsICc6JywgZGVmYXVsdFZhbHVlcyk7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBzcGxpdEF0UGVyaW9kKGlucHV0OiBzdHJpbmcsIGRlZmF1bHRWYWx1ZXM6IHN0cmluZ1tdKTogc3RyaW5nW10ge1xuICByZXR1cm4gX3NwbGl0QXQoaW5wdXQsICcuJywgZGVmYXVsdFZhbHVlcyk7XG59XG5cbmZ1bmN0aW9uIF9zcGxpdEF0KGlucHV0OiBzdHJpbmcsIGNoYXJhY3Rlcjogc3RyaW5nLCBkZWZhdWx0VmFsdWVzOiBzdHJpbmdbXSk6IHN0cmluZ1tdIHtcbiAgY29uc3QgY2hhcmFjdGVySW5kZXggPSBpbnB1dC5pbmRleE9mKGNoYXJhY3Rlcik7XG4gIGlmIChjaGFyYWN0ZXJJbmRleCA9PSAtMSkgcmV0dXJuIGRlZmF1bHRWYWx1ZXM7XG4gIHJldHVybiBbaW5wdXQuc2xpY2UoMCwgY2hhcmFjdGVySW5kZXgpLnRyaW0oKSwgaW5wdXQuc2xpY2UoY2hhcmFjdGVySW5kZXggKyAxKS50cmltKCldO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gdmlzaXRWYWx1ZSh2YWx1ZTogYW55LCB2aXNpdG9yOiBWYWx1ZVZpc2l0b3IsIGNvbnRleHQ6IGFueSk6IGFueSB7XG4gIGlmIChBcnJheS5pc0FycmF5KHZhbHVlKSkge1xuICAgIHJldHVybiB2aXNpdG9yLnZpc2l0QXJyYXkoPGFueVtdPnZhbHVlLCBjb250ZXh0KTtcbiAgfVxuXG4gIGlmIChpc1N0cmljdFN0cmluZ01hcCh2YWx1ZSkpIHtcbiAgICByZXR1cm4gdmlzaXRvci52aXNpdFN0cmluZ01hcCg8e1trZXk6IHN0cmluZ106IGFueX0+dmFsdWUsIGNvbnRleHQpO1xuICB9XG5cbiAgaWYgKHZhbHVlID09IG51bGwgfHwgdHlwZW9mIHZhbHVlID09ICdzdHJpbmcnIHx8IHR5cGVvZiB2YWx1ZSA9PSAnbnVtYmVyJyB8fFxuICAgICAgdHlwZW9mIHZhbHVlID09ICdib29sZWFuJykge1xuICAgIHJldHVybiB2aXNpdG9yLnZpc2l0UHJpbWl0aXZlKHZhbHVlLCBjb250ZXh0KTtcbiAgfVxuXG4gIHJldHVybiB2aXNpdG9yLnZpc2l0T3RoZXIodmFsdWUsIGNvbnRleHQpO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gaXNEZWZpbmVkKHZhbDogYW55KTogYm9vbGVhbiB7XG4gIHJldHVybiB2YWwgIT09IG51bGwgJiYgdmFsICE9PSB1bmRlZmluZWQ7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBub1VuZGVmaW5lZDxUPih2YWw6IFQgfCB1bmRlZmluZWQpOiBUIHtcbiAgcmV0dXJuIHZhbCA9PT0gdW5kZWZpbmVkID8gbnVsbCAhIDogdmFsO1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIFZhbHVlVmlzaXRvciB7XG4gIHZpc2l0QXJyYXkoYXJyOiBhbnlbXSwgY29udGV4dDogYW55KTogYW55O1xuICB2aXNpdFN0cmluZ01hcChtYXA6IHtba2V5OiBzdHJpbmddOiBhbnl9LCBjb250ZXh0OiBhbnkpOiBhbnk7XG4gIHZpc2l0UHJpbWl0aXZlKHZhbHVlOiBhbnksIGNvbnRleHQ6IGFueSk6IGFueTtcbiAgdmlzaXRPdGhlcih2YWx1ZTogYW55LCBjb250ZXh0OiBhbnkpOiBhbnk7XG59XG5cbmV4cG9ydCBjbGFzcyBWYWx1ZVRyYW5zZm9ybWVyIGltcGxlbWVudHMgVmFsdWVWaXNpdG9yIHtcbiAgdmlzaXRBcnJheShhcnI6IGFueVtdLCBjb250ZXh0OiBhbnkpOiBhbnkge1xuICAgIHJldHVybiBhcnIubWFwKHZhbHVlID0+IHZpc2l0VmFsdWUodmFsdWUsIHRoaXMsIGNvbnRleHQpKTtcbiAgfVxuICB2aXNpdFN0cmluZ01hcChtYXA6IHtba2V5OiBzdHJpbmddOiBhbnl9LCBjb250ZXh0OiBhbnkpOiBhbnkge1xuICAgIGNvbnN0IHJlc3VsdDoge1trZXk6IHN0cmluZ106IGFueX0gPSB7fTtcbiAgICBPYmplY3Qua2V5cyhtYXApLmZvckVhY2goa2V5ID0+IHsgcmVzdWx0W2tleV0gPSB2aXNpdFZhbHVlKG1hcFtrZXldLCB0aGlzLCBjb250ZXh0KTsgfSk7XG4gICAgcmV0dXJuIHJlc3VsdDtcbiAgfVxuICB2aXNpdFByaW1pdGl2ZSh2YWx1ZTogYW55LCBjb250ZXh0OiBhbnkpOiBhbnkgeyByZXR1cm4gdmFsdWU7IH1cbiAgdmlzaXRPdGhlcih2YWx1ZTogYW55LCBjb250ZXh0OiBhbnkpOiBhbnkgeyByZXR1cm4gdmFsdWU7IH1cbn1cblxuZXhwb3J0IHR5cGUgU3luY0FzeW5jPFQ+ID0gVCB8IFByb21pc2U8VD47XG5cbmV4cG9ydCBjb25zdCBTeW5jQXN5bmMgPSB7XG4gIGFzc2VydFN5bmM6IDxUPih2YWx1ZTogU3luY0FzeW5jPFQ+KTogVCA9PiB7XG4gICAgaWYgKGlzUHJvbWlzZSh2YWx1ZSkpIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcihgSWxsZWdhbCBzdGF0ZTogdmFsdWUgY2Fubm90IGJlIGEgcHJvbWlzZWApO1xuICAgIH1cbiAgICByZXR1cm4gdmFsdWU7XG4gIH0sXG4gIHRoZW46IDxULCBSPih2YWx1ZTogU3luY0FzeW5jPFQ+LCBjYjogKHZhbHVlOiBUKSA9PiBSIHwgUHJvbWlzZTxSPnwgU3luY0FzeW5jPFI+KTpcbiAgICAgICAgICAgIFN5bmNBc3luYzxSPiA9PiB7IHJldHVybiBpc1Byb21pc2UodmFsdWUpID8gdmFsdWUudGhlbihjYikgOiBjYih2YWx1ZSk7fSxcbiAgYWxsOiA8VD4oc3luY0FzeW5jVmFsdWVzOiBTeW5jQXN5bmM8VD5bXSk6IFN5bmNBc3luYzxUW10+ID0+IHtcbiAgICByZXR1cm4gc3luY0FzeW5jVmFsdWVzLnNvbWUoaXNQcm9taXNlKSA/IFByb21pc2UuYWxsKHN5bmNBc3luY1ZhbHVlcykgOiBzeW5jQXN5bmNWYWx1ZXMgYXMgVFtdO1xuICB9XG59O1xuXG5leHBvcnQgZnVuY3Rpb24gZXJyb3IobXNnOiBzdHJpbmcpOiBuZXZlciB7XG4gIHRocm93IG5ldyBFcnJvcihgSW50ZXJuYWwgRXJyb3I6ICR7bXNnfWApO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gc3ludGF4RXJyb3IobXNnOiBzdHJpbmcsIHBhcnNlRXJyb3JzPzogUGFyc2VFcnJvcltdKTogRXJyb3Ige1xuICBjb25zdCBlcnJvciA9IEVycm9yKG1zZyk7XG4gIChlcnJvciBhcyBhbnkpW0VSUk9SX1NZTlRBWF9FUlJPUl0gPSB0cnVlO1xuICBpZiAocGFyc2VFcnJvcnMpIChlcnJvciBhcyBhbnkpW0VSUk9SX1BBUlNFX0VSUk9SU10gPSBwYXJzZUVycm9ycztcbiAgcmV0dXJuIGVycm9yO1xufVxuXG5jb25zdCBFUlJPUl9TWU5UQVhfRVJST1IgPSAnbmdTeW50YXhFcnJvcic7XG5jb25zdCBFUlJPUl9QQVJTRV9FUlJPUlMgPSAnbmdQYXJzZUVycm9ycyc7XG5cbmV4cG9ydCBmdW5jdGlvbiBpc1N5bnRheEVycm9yKGVycm9yOiBFcnJvcik6IGJvb2xlYW4ge1xuICByZXR1cm4gKGVycm9yIGFzIGFueSlbRVJST1JfU1lOVEFYX0VSUk9SXTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGdldFBhcnNlRXJyb3JzKGVycm9yOiBFcnJvcik6IFBhcnNlRXJyb3JbXSB7XG4gIHJldHVybiAoZXJyb3IgYXMgYW55KVtFUlJPUl9QQVJTRV9FUlJPUlNdIHx8IFtdO1xufVxuXG4vLyBFc2NhcGUgY2hhcmFjdGVycyB0aGF0IGhhdmUgYSBzcGVjaWFsIG1lYW5pbmcgaW4gUmVndWxhciBFeHByZXNzaW9uc1xuZXhwb3J0IGZ1bmN0aW9uIGVzY2FwZVJlZ0V4cChzOiBzdHJpbmcpOiBzdHJpbmcge1xuICByZXR1cm4gcy5yZXBsYWNlKC8oWy4qKz9ePSE6JHt9KCl8W1xcXVxcL1xcXFxdKS9nLCAnXFxcXCQxJyk7XG59XG5cbmNvbnN0IFNUUklOR19NQVBfUFJPVE8gPSBPYmplY3QuZ2V0UHJvdG90eXBlT2Yoe30pO1xuZnVuY3Rpb24gaXNTdHJpY3RTdHJpbmdNYXAob2JqOiBhbnkpOiBib29sZWFuIHtcbiAgcmV0dXJuIHR5cGVvZiBvYmogPT09ICdvYmplY3QnICYmIG9iaiAhPT0gbnVsbCAmJiBPYmplY3QuZ2V0UHJvdG90eXBlT2Yob2JqKSA9PT0gU1RSSU5HX01BUF9QUk9UTztcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHV0ZjhFbmNvZGUoc3RyOiBzdHJpbmcpOiBzdHJpbmcge1xuICBsZXQgZW5jb2RlZCA9ICcnO1xuICBmb3IgKGxldCBpbmRleCA9IDA7IGluZGV4IDwgc3RyLmxlbmd0aDsgaW5kZXgrKykge1xuICAgIGxldCBjb2RlUG9pbnQgPSBzdHIuY2hhckNvZGVBdChpbmRleCk7XG5cbiAgICAvLyBkZWNvZGUgc3Vycm9nYXRlXG4gICAgLy8gc2VlIGh0dHBzOi8vbWF0aGlhc2J5bmVucy5iZS9ub3Rlcy9qYXZhc2NyaXB0LWVuY29kaW5nI3N1cnJvZ2F0ZS1mb3JtdWxhZVxuICAgIGlmIChjb2RlUG9pbnQgPj0gMHhkODAwICYmIGNvZGVQb2ludCA8PSAweGRiZmYgJiYgc3RyLmxlbmd0aCA+IChpbmRleCArIDEpKSB7XG4gICAgICBjb25zdCBsb3cgPSBzdHIuY2hhckNvZGVBdChpbmRleCArIDEpO1xuICAgICAgaWYgKGxvdyA+PSAweGRjMDAgJiYgbG93IDw9IDB4ZGZmZikge1xuICAgICAgICBpbmRleCsrO1xuICAgICAgICBjb2RlUG9pbnQgPSAoKGNvZGVQb2ludCAtIDB4ZDgwMCkgPDwgMTApICsgbG93IC0gMHhkYzAwICsgMHgxMDAwMDtcbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAoY29kZVBvaW50IDw9IDB4N2YpIHtcbiAgICAgIGVuY29kZWQgKz0gU3RyaW5nLmZyb21DaGFyQ29kZShjb2RlUG9pbnQpO1xuICAgIH0gZWxzZSBpZiAoY29kZVBvaW50IDw9IDB4N2ZmKSB7XG4gICAgICBlbmNvZGVkICs9IFN0cmluZy5mcm9tQ2hhckNvZGUoKChjb2RlUG9pbnQgPj4gNikgJiAweDFGKSB8IDB4YzAsIChjb2RlUG9pbnQgJiAweDNmKSB8IDB4ODApO1xuICAgIH0gZWxzZSBpZiAoY29kZVBvaW50IDw9IDB4ZmZmZikge1xuICAgICAgZW5jb2RlZCArPSBTdHJpbmcuZnJvbUNoYXJDb2RlKFxuICAgICAgICAgIChjb2RlUG9pbnQgPj4gMTIpIHwgMHhlMCwgKChjb2RlUG9pbnQgPj4gNikgJiAweDNmKSB8IDB4ODAsIChjb2RlUG9pbnQgJiAweDNmKSB8IDB4ODApO1xuICAgIH0gZWxzZSBpZiAoY29kZVBvaW50IDw9IDB4MWZmZmZmKSB7XG4gICAgICBlbmNvZGVkICs9IFN0cmluZy5mcm9tQ2hhckNvZGUoXG4gICAgICAgICAgKChjb2RlUG9pbnQgPj4gMTgpICYgMHgwNykgfCAweGYwLCAoKGNvZGVQb2ludCA+PiAxMikgJiAweDNmKSB8IDB4ODAsXG4gICAgICAgICAgKChjb2RlUG9pbnQgPj4gNikgJiAweDNmKSB8IDB4ODAsIChjb2RlUG9pbnQgJiAweDNmKSB8IDB4ODApO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiBlbmNvZGVkO1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIE91dHB1dENvbnRleHQge1xuICBnZW5GaWxlUGF0aDogc3RyaW5nO1xuICBzdGF0ZW1lbnRzOiBvLlN0YXRlbWVudFtdO1xuICBjb25zdGFudFBvb2w6IENvbnN0YW50UG9vbDtcbiAgaW1wb3J0RXhwcihyZWZlcmVuY2U6IGFueSwgdHlwZVBhcmFtcz86IG8uVHlwZVtdfG51bGwsIHVzZVN1bW1hcmllcz86IGJvb2xlYW4pOiBvLkV4cHJlc3Npb247XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBzdHJpbmdpZnkodG9rZW46IGFueSk6IHN0cmluZyB7XG4gIGlmICh0eXBlb2YgdG9rZW4gPT09ICdzdHJpbmcnKSB7XG4gICAgcmV0dXJuIHRva2VuO1xuICB9XG5cbiAgaWYgKHRva2VuIGluc3RhbmNlb2YgQXJyYXkpIHtcbiAgICByZXR1cm4gJ1snICsgdG9rZW4ubWFwKHN0cmluZ2lmeSkuam9pbignLCAnKSArICddJztcbiAgfVxuXG4gIGlmICh0b2tlbiA9PSBudWxsKSB7XG4gICAgcmV0dXJuICcnICsgdG9rZW47XG4gIH1cblxuICBpZiAodG9rZW4ub3ZlcnJpZGRlbk5hbWUpIHtcbiAgICByZXR1cm4gYCR7dG9rZW4ub3ZlcnJpZGRlbk5hbWV9YDtcbiAgfVxuXG4gIGlmICh0b2tlbi5uYW1lKSB7XG4gICAgcmV0dXJuIGAke3Rva2VuLm5hbWV9YDtcbiAgfVxuXG4gIC8vIFdBUk5JTkc6IGRvIG5vdCB0cnkgdG8gYEpTT04uc3RyaW5naWZ5KHRva2VuKWAgaGVyZVxuICAvLyBzZWUgaHR0cHM6Ly9naXRodWIuY29tL2FuZ3VsYXIvYW5ndWxhci9pc3N1ZXMvMjM0NDBcbiAgY29uc3QgcmVzID0gdG9rZW4udG9TdHJpbmcoKTtcblxuICBpZiAocmVzID09IG51bGwpIHtcbiAgICByZXR1cm4gJycgKyByZXM7XG4gIH1cblxuICBjb25zdCBuZXdMaW5lSW5kZXggPSByZXMuaW5kZXhPZignXFxuJyk7XG4gIHJldHVybiBuZXdMaW5lSW5kZXggPT09IC0xID8gcmVzIDogcmVzLnN1YnN0cmluZygwLCBuZXdMaW5lSW5kZXgpO1xufVxuXG4vKipcbiAqIExhemlseSByZXRyaWV2ZXMgdGhlIHJlZmVyZW5jZSB2YWx1ZSBmcm9tIGEgZm9yd2FyZFJlZi5cbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIHJlc29sdmVGb3J3YXJkUmVmKHR5cGU6IGFueSk6IGFueSB7XG4gIGlmICh0eXBlb2YgdHlwZSA9PT0gJ2Z1bmN0aW9uJyAmJiB0eXBlLmhhc093blByb3BlcnR5KCdfX2ZvcndhcmRfcmVmX18nKSkge1xuICAgIHJldHVybiB0eXBlKCk7XG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuIHR5cGU7XG4gIH1cbn1cblxuLyoqXG4gKiBEZXRlcm1pbmUgaWYgdGhlIGFyZ3VtZW50IGlzIHNoYXBlZCBsaWtlIGEgUHJvbWlzZVxuICovXG5leHBvcnQgZnVuY3Rpb24gaXNQcm9taXNlKG9iajogYW55KTogb2JqIGlzIFByb21pc2U8YW55PiB7XG4gIC8vIGFsbG93IGFueSBQcm9taXNlL0ErIGNvbXBsaWFudCB0aGVuYWJsZS5cbiAgLy8gSXQncyB1cCB0byB0aGUgY2FsbGVyIHRvIGVuc3VyZSB0aGF0IG9iai50aGVuIGNvbmZvcm1zIHRvIHRoZSBzcGVjXG4gIHJldHVybiAhIW9iaiAmJiB0eXBlb2Ygb2JqLnRoZW4gPT09ICdmdW5jdGlvbic7XG59XG5cbmV4cG9ydCBjbGFzcyBWZXJzaW9uIHtcbiAgcHVibGljIHJlYWRvbmx5IG1ham9yOiBzdHJpbmc7XG4gIHB1YmxpYyByZWFkb25seSBtaW5vcjogc3RyaW5nO1xuICBwdWJsaWMgcmVhZG9ubHkgcGF0Y2g6IHN0cmluZztcblxuICBjb25zdHJ1Y3RvcihwdWJsaWMgZnVsbDogc3RyaW5nKSB7XG4gICAgY29uc3Qgc3BsaXRzID0gZnVsbC5zcGxpdCgnLicpO1xuICAgIHRoaXMubWFqb3IgPSBzcGxpdHNbMF07XG4gICAgdGhpcy5taW5vciA9IHNwbGl0c1sxXTtcbiAgICB0aGlzLnBhdGNoID0gc3BsaXRzLnNsaWNlKDIpLmpvaW4oJy4nKTtcbiAgfVxufVxuXG5leHBvcnQgaW50ZXJmYWNlIENvbnNvbGUge1xuICBsb2cobWVzc2FnZTogc3RyaW5nKTogdm9pZDtcbiAgd2FybihtZXNzYWdlOiBzdHJpbmcpOiB2b2lkO1xufVxuIl19
53273
 
53274
/***/ }),
53275
 
53276
/***/ "./node_modules/@angular/core/fesm5/core.js":
53277
/*!**************************************************!*\
53278
  !*** ./node_modules/@angular/core/fesm5/core.js ***!
53279
  \**************************************************/
53280
/*! exports provided: ɵangular_packages_core_core_j, ɵangular_packages_core_core_k, ɵangular_packages_core_core_l, ɵangular_packages_core_core_f, ɵangular_packages_core_core_g, ɵangular_packages_core_core_h, ɵangular_packages_core_core_i, ɵangular_packages_core_core_c, ɵangular_packages_core_core_d, ɵangular_packages_core_core_e, ɵangular_packages_core_core_m, ɵangular_packages_core_core_o, ɵangular_packages_core_core_n, ɵangular_packages_core_core_r, ɵangular_packages_core_core_p, ɵangular_packages_core_core_q, ɵangular_packages_core_core_v, ɵangular_packages_core_core_x, ɵangular_packages_core_core_w, ɵangular_packages_core_core_u, ɵangular_packages_core_core_y, ɵangular_packages_core_core_bb, ɵangular_packages_core_core_bd, ɵangular_packages_core_core_be, ɵangular_packages_core_core_bc, ɵangular_packages_core_core_ba, ɵangular_packages_core_core_z, ɵangular_packages_core_core_a, ɵangular_packages_core_core_b, ɵangular_packages_core_core_s, ɵangular_packages_core_core_t, createPlatform, assertPlatform, destroyPlatform, getPlatform, PlatformRef, ApplicationRef, enableProdMode, isDevMode, createPlatformFactory, NgProbeToken, APP_ID, PACKAGE_ROOT_URL, PLATFORM_INITIALIZER, PLATFORM_ID, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationInitStatus, DebugElement, DebugNode, asNativeElements, getDebugNode, Testability, TestabilityRegistry, setTestabilityGetter, TRANSLATIONS, TRANSLATIONS_FORMAT, LOCALE_ID, MissingTranslationStrategy, ApplicationModule, wtfCreateScope, wtfLeave, wtfStartTimeRange, wtfEndTimeRange, Type, EventEmitter, ErrorHandler, Sanitizer, SecurityContext, ANALYZE_FOR_ENTRY_COMPONENTS, Attribute, ContentChild, ContentChildren, Query, ViewChild, ViewChildren, Component, Directive, HostBinding, HostListener, Input, Output, Pipe, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, NgModule, ViewEncapsulation, Version, VERSION, defineInjectable, defineInjector, forwardRef, resolveForwardRef, Injectable, inject, INJECTOR, Injector, ReflectiveInjector, createInjector, ResolvedReflectiveFactory, ReflectiveKey, InjectionToken, Inject, Optional, Self, SkipSelf, Host, NgZone, RenderComponentType, Renderer, Renderer2, RendererFactory2, RendererStyleFlags2, RootRenderer, COMPILER_OPTIONS, Compiler, CompilerFactory, ModuleWithComponentFactories, ComponentFactory, ComponentRef, ComponentFactoryResolver, ElementRef, NgModuleFactory, NgModuleRef, NgModuleFactoryLoader, getModuleFactory, QueryList, SystemJsNgModuleLoader, SystemJsNgModuleLoaderConfig, TemplateRef, ViewContainerRef, EmbeddedViewRef, ViewRef, ChangeDetectionStrategy, ChangeDetectorRef, DefaultIterableDiffer, IterableDiffers, KeyValueDiffers, SimpleChange, WrappedValue, platformCore, ɵALLOW_MULTIPLE_PLATFORMS, ɵAPP_ID_RANDOM_PROVIDER, ɵdefaultIterableDiffers, ɵdevModeEqual, ɵisListLikeIterable, ɵChangeDetectorStatus, ɵisDefaultChangeDetectionStrategy, ɵConsole, ɵinject, ɵsetCurrentInjector, ɵAPP_ROOT, ɵComponentFactory, ɵCodegenComponentFactoryResolver, ɵReflectionCapabilities, ɵRenderDebugInfo, ɵ_sanitizeHtml, ɵ_sanitizeStyle, ɵ_sanitizeUrl, ɵglobal, ɵlooseIdentical, ɵstringify, ɵmakeDecorator, ɵisObservable, ɵisPromise, ɵclearOverrides, ɵoverrideComponentView, ɵoverrideProvider, ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, ɵdefineComponent, ɵdefineDirective, ɵdefinePipe, ɵdetectChanges, ɵrenderComponent, ɵdirectiveInject, ɵinjectTemplateRef, ɵinjectViewContainerRef, ɵinjectChangeDetectorRef, ɵinjectAttribute, ɵPublicFeature, ɵNgOnChangesFeature, ɵmarkDirty, ɵNC, ɵC, ɵE, ɵL, ɵT, ɵV, ɵQ, ɵd, ɵP, ɵb, ɵi1, ɵi2, ɵi3, ɵi4, ɵi5, ɵi6, ɵi7, ɵi8, ɵiV, ɵpb1, ɵpb2, ɵpb3, ɵpb4, ɵpbV, ɵf0, ɵf1, ɵf2, ɵf3, ɵf4, ɵf5, ɵf6, ɵf7, ɵf8, ɵfV, ɵcR, ɵcr, ɵqR, ɵe, ɵp, ɵpD, ɵa, ɵs, ɵsn, ɵk, ɵkn, ɵt, ɵv, ɵst, ɵld, ɵPp, ɵwhenRendered, ɵbypassSanitizationTrustHtml, ɵbypassSanitizationTrustStyle, ɵbypassSanitizationTrustScript, ɵbypassSanitizationTrustUrl, ɵbypassSanitizationTrustResourceUrl, ɵsanitizeHtml, ɵsanitizeStyle, ɵsanitizeUrl, ɵsanitizeResourceUrl, ɵregisterModuleFactory, ɵEMPTY_ARRAY, ɵEMPTY_MAP, ɵand, ɵccf, ɵcmf, ɵcrt, ɵdid, ɵeld, ɵelementEventFullName, ɵgetComponentViewDefinitionFactory, ɵinlineInterpolate, ɵinterpolate, ɵmod, ɵmpd, ɵncd, ɵnov, ɵpid, ɵprd, ɵpad, ɵpod, ɵppd, ɵqud, ɵted, ɵunv, ɵvid */
53281
/***/ (function(module, __webpack_exports__, __webpack_require__) {
53282
 
53283
"use strict";
53284
__webpack_require__.r(__webpack_exports__);
53285
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_j", function() { return _iterableDiffersFactory; });
53286
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_k", function() { return _keyValueDiffersFactory; });
53287
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_l", function() { return _localeFactory; });
53288
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_f", function() { return _appIdRandomProviderFactory; });
53289
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_g", function() { return defaultKeyValueDiffers; });
53290
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_h", function() { return DefaultIterableDifferFactory; });
53291
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_i", function() { return DefaultKeyValueDifferFactory; });
53292
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_c", function() { return ReflectiveInjector_; });
53293
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_d", function() { return ReflectiveDependency; });
53294
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_e", function() { return resolveReflectiveProviders; });
53295
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_m", function() { return wtfEnabled; });
53296
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_o", function() { return createScope; });
53297
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_n", function() { return detectWTF; });
53298
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_r", function() { return endTimeRange; });
53299
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_p", function() { return leave; });
53300
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_q", function() { return startTimeRange; });
53301
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_v", function() { return getOrCreateChangeDetectorRef; });
53302
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_x", function() { return getOrCreateContainerRef; });
53303
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_w", function() { return getOrCreateInjectable; });
53304
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_u", function() { return getOrCreateNodeInjector; });
53305
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_y", function() { return getOrCreateTemplateRef; });
53306
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bb", function() { return bindingUpdated; });
53307
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bd", function() { return bindingUpdated2; });
53308
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_be", function() { return bindingUpdated4; });
53309
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bc", function() { return checkAndUpdateBinding$1; });
53310
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_ba", function() { return consumeBinding; });
53311
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_z", function() { return getCreationMode; });
53312
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_a", function() { return makeParamDecorator; });
53313
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_b", function() { return makePropDecorator; });
53314
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_s", function() { return _def; });
53315
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_t", function() { return DebugContext; });
53316
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createPlatform", function() { return createPlatform; });
53317
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "assertPlatform", function() { return assertPlatform; });
53318
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "destroyPlatform", function() { return destroyPlatform; });
53319
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPlatform", function() { return getPlatform; });
53320
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PlatformRef", function() { return PlatformRef; });
53321
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ApplicationRef", function() { return ApplicationRef; });
53322
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "enableProdMode", function() { return enableProdMode; });
53323
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDevMode", function() { return isDevMode; });
53324
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createPlatformFactory", function() { return createPlatformFactory; });
53325
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgProbeToken", function() { return NgProbeToken; });
53326
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APP_ID", function() { return APP_ID; });
53327
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PACKAGE_ROOT_URL", function() { return PACKAGE_ROOT_URL; });
53328
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PLATFORM_INITIALIZER", function() { return PLATFORM_INITIALIZER; });
53329
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PLATFORM_ID", function() { return PLATFORM_ID; });
53330
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APP_BOOTSTRAP_LISTENER", function() { return APP_BOOTSTRAP_LISTENER; });
53331
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APP_INITIALIZER", function() { return APP_INITIALIZER; });
53332
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ApplicationInitStatus", function() { return ApplicationInitStatus; });
53333
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DebugElement", function() { return DebugElement; });
53334
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DebugNode", function() { return DebugNode; });
53335
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asNativeElements", function() { return asNativeElements; });
53336
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDebugNode", function() { return getDebugNode; });
53337
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Testability", function() { return Testability; });
53338
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TestabilityRegistry", function() { return TestabilityRegistry; });
53339
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTestabilityGetter", function() { return setTestabilityGetter; });
53340
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TRANSLATIONS", function() { return TRANSLATIONS; });
53341
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TRANSLATIONS_FORMAT", function() { return TRANSLATIONS_FORMAT; });
53342
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LOCALE_ID", function() { return LOCALE_ID; });
53343
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MissingTranslationStrategy", function() { return MissingTranslationStrategy; });
53344
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ApplicationModule", function() { return ApplicationModule; });
53345
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wtfCreateScope", function() { return wtfCreateScope; });
53346
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wtfLeave", function() { return wtfLeave; });
53347
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wtfStartTimeRange", function() { return wtfStartTimeRange; });
53348
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wtfEndTimeRange", function() { return wtfEndTimeRange; });
53349
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Type", function() { return Type; });
53350
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EventEmitter", function() { return EventEmitter; });
53351
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ErrorHandler", function() { return ErrorHandler; });
53352
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sanitizer", function() { return Sanitizer; });
53353
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SecurityContext", function() { return SecurityContext; });
53354
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ANALYZE_FOR_ENTRY_COMPONENTS", function() { return ANALYZE_FOR_ENTRY_COMPONENTS; });
53355
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Attribute", function() { return Attribute; });
53356
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContentChild", function() { return ContentChild; });
53357
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContentChildren", function() { return ContentChildren; });
53358
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Query", function() { return Query; });
53359
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewChild", function() { return ViewChild; });
53360
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewChildren", function() { return ViewChildren; });
53361
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Component", function() { return Component; });
53362
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Directive", function() { return Directive; });
53363
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HostBinding", function() { return HostBinding; });
53364
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HostListener", function() { return HostListener; });
53365
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Input", function() { return Input; });
53366
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Output", function() { return Output; });
53367
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Pipe", function() { return Pipe; });
53368
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CUSTOM_ELEMENTS_SCHEMA", function() { return CUSTOM_ELEMENTS_SCHEMA; });
53369
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NO_ERRORS_SCHEMA", function() { return NO_ERRORS_SCHEMA; });
53370
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgModule", function() { return NgModule; });
53371
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewEncapsulation", function() { return ViewEncapsulation; });
53372
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Version", function() { return Version; });
53373
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; });
53374
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defineInjectable", function() { return defineInjectable; });
53375
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defineInjector", function() { return defineInjector; });
53376
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forwardRef", function() { return forwardRef; });
53377
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resolveForwardRef", function() { return resolveForwardRef; });
53378
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Injectable", function() { return Injectable; });
53379
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inject", function() { return inject; });
53380
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "INJECTOR", function() { return INJECTOR; });
53381
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Injector", function() { return Injector; });
53382
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReflectiveInjector", function() { return ReflectiveInjector; });
53383
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createInjector", function() { return createInjector; });
53384
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResolvedReflectiveFactory", function() { return ResolvedReflectiveFactory; });
53385
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReflectiveKey", function() { return ReflectiveKey; });
53386
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InjectionToken", function() { return InjectionToken; });
53387
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Inject", function() { return Inject; });
53388
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Optional", function() { return Optional; });
53389
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Self", function() { return Self; });
53390
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SkipSelf", function() { return SkipSelf; });
53391
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Host", function() { return Host; });
53392
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgZone", function() { return NgZone; });
53393
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenderComponentType", function() { return RenderComponentType; });
53394
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Renderer", function() { return Renderer; });
53395
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Renderer2", function() { return Renderer2; });
53396
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RendererFactory2", function() { return RendererFactory2; });
53397
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RendererStyleFlags2", function() { return RendererStyleFlags2; });
53398
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RootRenderer", function() { return RootRenderer; });
53399
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "COMPILER_OPTIONS", function() { return COMPILER_OPTIONS; });
53400
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Compiler", function() { return Compiler; });
53401
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompilerFactory", function() { return CompilerFactory; });
53402
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModuleWithComponentFactories", function() { return ModuleWithComponentFactories; });
53403
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComponentFactory", function() { return ComponentFactory; });
53404
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComponentRef", function() { return ComponentRef; });
53405
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComponentFactoryResolver", function() { return ComponentFactoryResolver; });
53406
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ElementRef", function() { return ElementRef; });
53407
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgModuleFactory", function() { return NgModuleFactory; });
53408
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgModuleRef", function() { return NgModuleRef; });
53409
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgModuleFactoryLoader", function() { return NgModuleFactoryLoader; });
53410
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getModuleFactory", function() { return getModuleFactory; });
53411
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueryList", function() { return QueryList; });
53412
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SystemJsNgModuleLoader", function() { return SystemJsNgModuleLoader; });
53413
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SystemJsNgModuleLoaderConfig", function() { return SystemJsNgModuleLoaderConfig; });
53414
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TemplateRef", function() { return TemplateRef; });
53415
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewContainerRef", function() { return ViewContainerRef; });
53416
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmbeddedViewRef", function() { return EmbeddedViewRef; });
53417
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewRef", function() { return ViewRef; });
53418
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChangeDetectionStrategy", function() { return ChangeDetectionStrategy; });
53419
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChangeDetectorRef", function() { return ChangeDetectorRef; });
53420
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultIterableDiffer", function() { return DefaultIterableDiffer; });
53421
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IterableDiffers", function() { return IterableDiffers; });
53422
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeyValueDiffers", function() { return KeyValueDiffers; });
53423
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleChange", function() { return SimpleChange; });
53424
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WrappedValue", function() { return WrappedValue; });
53425
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "platformCore", function() { return platformCore; });
53426
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵALLOW_MULTIPLE_PLATFORMS", function() { return ALLOW_MULTIPLE_PLATFORMS; });
53427
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵAPP_ID_RANDOM_PROVIDER", function() { return APP_ID_RANDOM_PROVIDER; });
53428
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵdefaultIterableDiffers", function() { return defaultIterableDiffers; });
53429
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵdevModeEqual", function() { return devModeEqual; });
53430
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵisListLikeIterable", function() { return isListLikeIterable; });
53431
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵChangeDetectorStatus", function() { return ChangeDetectorStatus; });
53432
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵisDefaultChangeDetectionStrategy", function() { return isDefaultChangeDetectionStrategy; });
53433
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵConsole", function() { return Console; });
53434
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinject", function() { return inject; });
53435
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵsetCurrentInjector", function() { return setCurrentInjector; });
53436
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵAPP_ROOT", function() { return APP_ROOT; });
53437
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵComponentFactory", function() { return ComponentFactory; });
53438
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵCodegenComponentFactoryResolver", function() { return CodegenComponentFactoryResolver; });
53439
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵReflectionCapabilities", function() { return ReflectionCapabilities; });
53440
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵRenderDebugInfo", function() { return RenderDebugInfo; });
53441
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵ_sanitizeHtml", function() { return _sanitizeHtml; });
53442
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵ_sanitizeStyle", function() { return _sanitizeStyle; });
53443
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵ_sanitizeUrl", function() { return _sanitizeUrl; });
53444
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵglobal", function() { return _global; });
53445
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵlooseIdentical", function() { return looseIdentical; });
53446
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵstringify", function() { return stringify; });
53447
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵmakeDecorator", function() { return makeDecorator; });
53448
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵisObservable", function() { return isObservable; });
53449
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵisPromise", function() { return isPromise; });
53450
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵclearOverrides", function() { return clearOverrides; });
53451
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵoverrideComponentView", function() { return overrideComponentView; });
53452
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵoverrideProvider", function() { return overrideProvider; });
53453
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR", function() { return NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR; });
53454
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵdefineComponent", function() { return defineComponent; });
53455
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵdefineDirective", function() { return defineDirective; });
53456
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵdefinePipe", function() { return definePipe; });
53457
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵdetectChanges", function() { return detectChanges; });
53458
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵrenderComponent", function() { return renderComponent; });
53459
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵdirectiveInject", function() { return directiveInject; });
53460
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinjectTemplateRef", function() { return injectTemplateRef; });
53461
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinjectViewContainerRef", function() { return injectViewContainerRef; });
53462
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinjectChangeDetectorRef", function() { return injectChangeDetectorRef; });
53463
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinjectAttribute", function() { return injectAttribute; });
53464
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵPublicFeature", function() { return PublicFeature; });
53465
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNgOnChangesFeature", function() { return NgOnChangesFeature; });
53466
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵmarkDirty", function() { return markDirty; });
53467
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNC", function() { return NO_CHANGE; });
53468
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵC", function() { return container; });
53469
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵE", function() { return elementStart; });
53470
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵL", function() { return listener; });
53471
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵT", function() { return text; });
53472
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵV", function() { return embeddedViewStart; });
53473
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵQ", function() { return query; });
53474
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵd", function() { return loadDirective; });
53475
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵP", function() { return projection; });
53476
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵb", function() { return bind; });
53477
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵi1", function() { return interpolation1; });
53478
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵi2", function() { return interpolation2; });
53479
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵi3", function() { return interpolation3; });
53480
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵi4", function() { return interpolation4; });
53481
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵi5", function() { return interpolation5; });
53482
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵi6", function() { return interpolation6; });
53483
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵi7", function() { return interpolation7; });
53484
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵi8", function() { return interpolation8; });
53485
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵiV", function() { return interpolationV; });
53486
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpb1", function() { return pipeBind1; });
53487
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpb2", function() { return pipeBind2; });
53488
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpb3", function() { return pipeBind3; });
53489
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpb4", function() { return pipeBind4; });
53490
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpbV", function() { return pipeBindV; });
53491
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵf0", function() { return pureFunction0; });
53492
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵf1", function() { return pureFunction1; });
53493
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵf2", function() { return pureFunction2; });
53494
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵf3", function() { return pureFunction3; });
53495
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵf4", function() { return pureFunction4; });
53496
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵf5", function() { return pureFunction5; });
53497
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵf6", function() { return pureFunction6; });
53498
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵf7", function() { return pureFunction7; });
53499
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵf8", function() { return pureFunction8; });
53500
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵfV", function() { return pureFunctionV; });
53501
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcR", function() { return containerRefreshStart; });
53502
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcr", function() { return containerRefreshEnd; });
53503
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵqR", function() { return queryRefresh; });
53504
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵe", function() { return elementEnd; });
53505
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵp", function() { return elementProperty; });
53506
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpD", function() { return projectionDef; });
53507
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵa", function() { return elementAttribute; });
53508
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵs", function() { return elementStyle; });
53509
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵsn", function() { return elementStyleNamed; });
53510
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵk", function() { return elementClass; });
53511
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵkn", function() { return elementClassNamed; });
53512
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵt", function() { return textBinding; });
53513
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵv", function() { return embeddedViewEnd; });
53514
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵst", function() { return store; });
53515
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵld", function() { return load; });
53516
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵPp", function() { return pipe; });
53517
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵwhenRendered", function() { return whenRendered; });
53518
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵbypassSanitizationTrustHtml", function() { return bypassSanitizationTrustHtml; });
53519
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵbypassSanitizationTrustStyle", function() { return bypassSanitizationTrustStyle; });
53520
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵbypassSanitizationTrustScript", function() { return bypassSanitizationTrustScript; });
53521
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵbypassSanitizationTrustUrl", function() { return bypassSanitizationTrustUrl; });
53522
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵbypassSanitizationTrustResourceUrl", function() { return bypassSanitizationTrustResourceUrl; });
53523
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵsanitizeHtml", function() { return sanitizeHtml; });
53524
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵsanitizeStyle", function() { return sanitizeStyle; });
53525
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵsanitizeUrl", function() { return sanitizeUrl; });
53526
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵsanitizeResourceUrl", function() { return sanitizeResourceUrl; });
53527
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵregisterModuleFactory", function() { return registerModuleFactory; });
53528
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵEMPTY_ARRAY", function() { return EMPTY_ARRAY$2; });
53529
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵEMPTY_MAP", function() { return EMPTY_MAP; });
53530
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵand", function() { return anchorDef; });
53531
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵccf", function() { return createComponentFactory; });
53532
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcmf", function() { return createNgModuleFactory; });
53533
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcrt", function() { return createRendererType2; });
53534
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵdid", function() { return directiveDef; });
53535
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵeld", function() { return elementDef; });
53536
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵelementEventFullName", function() { return elementEventFullName; });
53537
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetComponentViewDefinitionFactory", function() { return getComponentViewDefinitionFactory; });
53538
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinlineInterpolate", function() { return inlineInterpolate; });
53539
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinterpolate", function() { return interpolate; });
53540
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵmod", function() { return moduleDef; });
53541
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵmpd", function() { return moduleProvideDef; });
53542
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵncd", function() { return ngContentDef; });
53543
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵnov", function() { return nodeValue; });
53544
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpid", function() { return pipeDef; });
53545
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵprd", function() { return providerDef; });
53546
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpad", function() { return pureArrayDef; });
53547
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpod", function() { return pureObjectDef; });
53548
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵppd", function() { return purePipeDef; });
53549
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵqud", function() { return queryDef; });
53550
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵted", function() { return textDef; });
53551
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵunv", function() { return unwrapValue; });
53552
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵvid", function() { return viewDef; });
53553
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
53554
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
53555
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
53556
/**
53557
 * @license Angular v6.0.3
53558
 * (c) 2010-2018 Google, Inc. https://angular.io/
53559
 * License: MIT
53560
 */
53561
 
53562
 
53563
 
53564
 
53565
 
53566
/**
53567
 * @license
53568
 * Copyright Google Inc. All Rights Reserved.
53569
 *
53570
 * Use of this source code is governed by an MIT-style license that can be
53571
 * found in the LICENSE file at https://angular.io/license
53572
 */
53573
/**
53574
 * Construct an `InjectableDef` which defines how a token will be constructed by the DI system, and
53575
 * in which injectors (if any) it will be available.
53576
 *
53577
 * This should be assigned to a static `ngInjectableDef` field on a type, which will then be an
53578
 * `InjectableType`.
53579
 *
53580
 * Options:
53581
 * * `providedIn` determines which injectors will include the injectable, by either associating it
53582
 *   with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be
53583
 *   provided in the `'root'` injector, which will be the application-level injector in most apps.
53584
 * * `factory` gives the zero argument function which will create an instance of the injectable.
53585
 *   The factory can call `inject` to access the `Injector` and request injection of dependencies.
53586
 *
53587
 * @experimental
53588
 */
53589
function defineInjectable(opts) {
53590
    return {
53591
        providedIn: opts.providedIn || null, factory: opts.factory, value: undefined,
53592
    };
53593
}
53594
/**
53595
 * Construct an `InjectorDef` which configures an injector.
53596
 *
53597
 * This should be assigned to a static `ngInjectorDef` field on a type, which will then be an
53598
 * `InjectorType`.
53599
 *
53600
 * Options:
53601
 *
53602
 * * `factory`: an `InjectorType` is an instantiable type, so a zero argument `factory` function to
53603
 *   create the type must be provided. If that factory function needs to inject arguments, it can
53604
 *   use the `inject` function.
53605
 * * `providers`: an optional array of providers to add to the injector. Each provider must
53606
 *   either have a factory or point to a type which has an `ngInjectableDef` static property (the
53607
 *   type must be an `InjectableType`).
53608
 * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s
53609
 *   whose providers will also be added to the injector. Locally provided types will override
53610
 *   providers from imports.
53611
 *
53612
 * @experimental
53613
 */
53614
function defineInjector(options) {
53615
    return {
53616
        factory: options.factory, providers: options.providers || [], imports: options.imports || [],
53617
    };
53618
}
53619
 
53620
/**
53621
 * @license
53622
 * Copyright Google Inc. All Rights Reserved.
53623
 *
53624
 * Use of this source code is governed by an MIT-style license that can be
53625
 * found in the LICENSE file at https://angular.io/license
53626
 */
53627
/**
53628
 * Creates a token that can be used in a DI Provider.
53629
 *
53630
 * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a
53631
 * runtime representation) such as when injecting an interface, callable type, array or
53632
 * parametrized type.
53633
 *
53634
 * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by
53635
 * the `Injector`. This provides additional level of type safety.
53636
 *
53637
 * ```
53638
 * interface MyInterface {...}
53639
 * var myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken'));
53640
 * // myInterface is inferred to be MyInterface.
53641
 * ```
53642
 *
53643
 * When creating an `InjectionToken`, you can optionally specify a factory function which returns
53644
 * (possibly by creating) a default value of the parameterized type `T`. This sets up the
53645
 * `InjectionToken` using this factory as a provider as if it was defined explicitly in the
53646
 * application's root injector. If the factory function, which takes zero arguments, needs to inject
53647
 * dependencies, it can do so using the `inject` function. See below for an example.
53648
 *
53649
 * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which
53650
 * overrides the above behavior and marks the token as belonging to a particular `@NgModule`. As
53651
 * mentioned above, `'root'` is the default value for `providedIn`.
53652
 *
53653
 * ### Example
53654
 *
53655
 * #### Tree-shakeable InjectionToken
53656
 *
53657
 * {@example core/di/ts/injector_spec.ts region='ShakeableInjectionToken'}
53658
 *
53659
 * #### Plain InjectionToken
53660
 *
53661
 * {@example core/di/ts/injector_spec.ts region='InjectionToken'}
53662
 *
53663
 *
53664
 */
53665
var InjectionToken = /** @class */ (function () {
53666
    function InjectionToken(_desc, options) {
53667
        this._desc = _desc;
53668
        /** @internal */
53669
        this.ngMetadataName = 'InjectionToken';
53670
        if (options !== undefined) {
53671
            this.ngInjectableDef = defineInjectable({
53672
                providedIn: options.providedIn || 'root',
53673
                factory: options.factory,
53674
            });
53675
        }
53676
        else {
53677
            this.ngInjectableDef = undefined;
53678
        }
53679
    }
53680
    InjectionToken.prototype.toString = function () { return "InjectionToken " + this._desc; };
53681
    return InjectionToken;
53682
}());
53683
 
53684
/**
53685
 * @license
53686
 * Copyright Google Inc. All Rights Reserved.
53687
 *
53688
 * Use of this source code is governed by an MIT-style license that can be
53689
 * found in the LICENSE file at https://angular.io/license
53690
 */
53691
var ANNOTATIONS = '__annotations__';
53692
var PARAMETERS = '__parameters__';
53693
var PROP_METADATA = '__prop__metadata__';
53694
/**
53695
 * @suppress {globalThis}
53696
 */
53697
function makeDecorator(name, props, parentClass, chainFn, typeFn) {
53698
    var metaCtor = makeMetadataCtor(props);
53699
    function DecoratorFactory() {
53700
        var args = [];
53701
        for (var _i = 0; _i < arguments.length; _i++) {
53702
            args[_i] = arguments[_i];
53703
        }
53704
        if (this instanceof DecoratorFactory) {
53705
            metaCtor.call.apply(metaCtor, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([this], args));
53706
            return this;
53707
        }
53708
        var annotationInstance = new ((_a = DecoratorFactory).bind.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], args)))();
53709
        var TypeDecorator = function TypeDecorator(cls) {
53710
            typeFn && typeFn.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([cls], args));
53711
            // Use of Object.defineProperty is important since it creates non-enumerable property which
53712
            // prevents the property is copied during subclassing.
53713
            var annotations = cls.hasOwnProperty(ANNOTATIONS) ?
53714
                cls[ANNOTATIONS] :
53715
                Object.defineProperty(cls, ANNOTATIONS, { value: [] })[ANNOTATIONS];
53716
            annotations.push(annotationInstance);
53717
            return cls;
53718
        };
53719
        if (chainFn)
53720
            chainFn(TypeDecorator);
53721
        return TypeDecorator;
53722
        var _a;
53723
    }
53724
    if (parentClass) {
53725
        DecoratorFactory.prototype = Object.create(parentClass.prototype);
53726
    }
53727
    DecoratorFactory.prototype.ngMetadataName = name;
53728
    DecoratorFactory.annotationCls = DecoratorFactory;
53729
    return DecoratorFactory;
53730
}
53731
function makeMetadataCtor(props) {
53732
    return function ctor() {
53733
        var args = [];
53734
        for (var _i = 0; _i < arguments.length; _i++) {
53735
            args[_i] = arguments[_i];
53736
        }
53737
        if (props) {
53738
            var values = props.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(args));
53739
            for (var propName in values) {
53740
                this[propName] = values[propName];
53741
            }
53742
        }
53743
    };
53744
}
53745
function makeParamDecorator(name, props, parentClass) {
53746
    var metaCtor = makeMetadataCtor(props);
53747
    function ParamDecoratorFactory() {
53748
        var args = [];
53749
        for (var _i = 0; _i < arguments.length; _i++) {
53750
            args[_i] = arguments[_i];
53751
        }
53752
        if (this instanceof ParamDecoratorFactory) {
53753
            metaCtor.apply(this, args);
53754
            return this;
53755
        }
53756
        var annotationInstance = new ((_a = ParamDecoratorFactory).bind.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], args)))();
53757
        ParamDecorator.annotation = annotationInstance;
53758
        return ParamDecorator;
53759
        function ParamDecorator(cls, unusedKey, index) {
53760
            // Use of Object.defineProperty is important since it creates non-enumerable property which
53761
            // prevents the property is copied during subclassing.
53762
            var parameters = cls.hasOwnProperty(PARAMETERS) ?
53763
                cls[PARAMETERS] :
53764
                Object.defineProperty(cls, PARAMETERS, { value: [] })[PARAMETERS];
53765
            // there might be gaps if some in between parameters do not have annotations.
53766
            // we pad with nulls.
53767
            while (parameters.length <= index) {
53768
                parameters.push(null);
53769
            }
53770
            (parameters[index] = parameters[index] || []).push(annotationInstance);
53771
            return cls;
53772
        }
53773
        var _a;
53774
    }
53775
    if (parentClass) {
53776
        ParamDecoratorFactory.prototype = Object.create(parentClass.prototype);
53777
    }
53778
    ParamDecoratorFactory.prototype.ngMetadataName = name;
53779
    ParamDecoratorFactory.annotationCls = ParamDecoratorFactory;
53780
    return ParamDecoratorFactory;
53781
}
53782
function makePropDecorator(name, props, parentClass) {
53783
    var metaCtor = makeMetadataCtor(props);
53784
    function PropDecoratorFactory() {
53785
        var args = [];
53786
        for (var _i = 0; _i < arguments.length; _i++) {
53787
            args[_i] = arguments[_i];
53788
        }
53789
        if (this instanceof PropDecoratorFactory) {
53790
            metaCtor.apply(this, args);
53791
            return this;
53792
        }
53793
        var decoratorInstance = new ((_a = PropDecoratorFactory).bind.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], args)))();
53794
        return function PropDecorator(target, name) {
53795
            var constructor = target.constructor;
53796
            // Use of Object.defineProperty is important since it creates non-enumerable property which
53797
            // prevents the property is copied during subclassing.
53798
            var meta = constructor.hasOwnProperty(PROP_METADATA) ?
53799
                constructor[PROP_METADATA] :
53800
                Object.defineProperty(constructor, PROP_METADATA, { value: {} })[PROP_METADATA];
53801
            meta[name] = meta.hasOwnProperty(name) && meta[name] || [];
53802
            meta[name].unshift(decoratorInstance);
53803
        };
53804
        var _a;
53805
    }
53806
    if (parentClass) {
53807
        PropDecoratorFactory.prototype = Object.create(parentClass.prototype);
53808
    }
53809
    PropDecoratorFactory.prototype.ngMetadataName = name;
53810
    PropDecoratorFactory.annotationCls = PropDecoratorFactory;
53811
    return PropDecoratorFactory;
53812
}
53813
 
53814
/**
53815
 * @license
53816
 * Copyright Google Inc. All Rights Reserved.
53817
 *
53818
 * Use of this source code is governed by an MIT-style license that can be
53819
 * found in the LICENSE file at https://angular.io/license
53820
 */
53821
/**
53822
 * This token can be used to create a virtual provider that will populate the
53823
 * `entryComponents` fields of components and ng modules based on its `useValue`.
53824
 * All components that are referenced in the `useValue` value (either directly
53825
 * or in a nested array or map) will be added to the `entryComponents` property.
53826
 *
53827
 * ### Example
53828
 * The following example shows how the router can populate the `entryComponents`
53829
 * field of an NgModule based on the router configuration which refers
53830
 * to components.
53831
 *
53832
 * ```typescript
53833
 * // helper function inside the router
53834
 * function provideRoutes(routes) {
53835
 *   return [
53836
 *     {provide: ROUTES, useValue: routes},
53837
 *     {provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: routes, multi: true}
53838
 *   ];
53839
 * }
53840
 *
53841
 * // user code
53842
 * let routes = [
53843
 *   {path: '/root', component: RootComp},
53844
 *   {path: '/teams', component: TeamsComp}
53845
 * ];
53846
 *
53847
 * @NgModule({
53848
 *   providers: [provideRoutes(routes)]
53849
 * })
53850
 * class ModuleWithRoutes {}
53851
 * ```
53852
 *
53853
 * @experimental
53854
 */
53855
var ANALYZE_FOR_ENTRY_COMPONENTS = new InjectionToken('AnalyzeForEntryComponents');
53856
/**
53857
 * Attribute decorator and metadata.
53858
 *
53859
 *
53860
 * @Annotation
53861
 */
53862
var Attribute = makeParamDecorator('Attribute', function (attributeName) { return ({ attributeName: attributeName }); });
53863
/**
53864
 * Base class for query metadata.
53865
 *
53866
 * See {@link ContentChildren}, {@link ContentChild}, {@link ViewChildren}, {@link ViewChild} for
53867
 * more information.
53868
 *
53869
 *
53870
 */
53871
var Query = /** @class */ (function () {
53872
    function Query() {
53873
    }
53874
    return Query;
53875
}());
53876
/**
53877
 * ContentChildren decorator and metadata.
53878
 *
53879
 *
53880
 *  @Annotation
53881
 */
53882
var ContentChildren = makePropDecorator('ContentChildren', function (selector, data) {
53883
    if (data === void 0) { data = {}; }
53884
    return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ selector: selector, first: false, isViewQuery: false, descendants: false }, data));
53885
}, Query);
53886
/**
53887
 * ContentChild decorator and metadata.
53888
 *
53889
 *
53890
 * @Annotation
53891
 */
53892
var ContentChild = makePropDecorator('ContentChild', function (selector, data) {
53893
    if (data === void 0) { data = {}; }
53894
    return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ selector: selector, first: true, isViewQuery: false, descendants: true }, data));
53895
}, Query);
53896
/**
53897
 * ViewChildren decorator and metadata.
53898
 *
53899
 *
53900
 * @Annotation
53901
 */
53902
var ViewChildren = makePropDecorator('ViewChildren', function (selector, data) {
53903
    if (data === void 0) { data = {}; }
53904
    return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ selector: selector, first: false, isViewQuery: true, descendants: true }, data));
53905
}, Query);
53906
/**
53907
 * ViewChild decorator and metadata.
53908
 *
53909
 *
53910
 * @Annotation
53911
 */
53912
var ViewChild = makePropDecorator('ViewChild', function (selector, data) {
53913
    return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ selector: selector, first: true, isViewQuery: true, descendants: true }, data));
53914
}, Query);
53915
 
53916
/**
53917
 * @license
53918
 * Copyright Google Inc. All Rights Reserved.
53919
 *
53920
 * Use of this source code is governed by an MIT-style license that can be
53921
 * found in the LICENSE file at https://angular.io/license
53922
 */
53923
/**
53924
 * @license
53925
 * Copyright Google Inc. All Rights Reserved.
53926
 *
53927
 * Use of this source code is governed by an MIT-style license that can be
53928
 * found in the LICENSE file at https://angular.io/license
53929
 */
53930
/**
53931
 * Describes within the change detector which strategy will be used the next time change
53932
 * detection is triggered.
53933
 *
53934
 */
53935
/**
53936
 * Describes within the change detector which strategy will be used the next time change
53937
 * detection is triggered.
53938
 *
53939
 */
53940
var ChangeDetectionStrategy;
53941
/**
53942
 * Describes within the change detector which strategy will be used the next time change
53943
 * detection is triggered.
53944
 *
53945
 */
53946
(function (ChangeDetectionStrategy) {
53947
    /**
53948
     * `OnPush` means that the change detector's mode will be initially set to `CheckOnce`.
53949
     */
53950
    ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"] = 0] = "OnPush";
53951
    /**
53952
     * `Default` means that the change detector's mode will be initially set to `CheckAlways`.
53953
     */
53954
    ChangeDetectionStrategy[ChangeDetectionStrategy["Default"] = 1] = "Default";
53955
})(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));
53956
/**
53957
 * Describes the status of the detector.
53958
 */
53959
/**
53960
 * Describes the status of the detector.
53961
 */
53962
var ChangeDetectorStatus;
53963
/**
53964
 * Describes the status of the detector.
53965
 */
53966
(function (ChangeDetectorStatus) {
53967
    /**
53968
     * `CheckOnce` means that after calling detectChanges the mode of the change detector
53969
     * will become `Checked`.
53970
     */
53971
    ChangeDetectorStatus[ChangeDetectorStatus["CheckOnce"] = 0] = "CheckOnce";
53972
    /**
53973
     * `Checked` means that the change detector should be skipped until its mode changes to
53974
     * `CheckOnce`.
53975
     */
53976
    ChangeDetectorStatus[ChangeDetectorStatus["Checked"] = 1] = "Checked";
53977
    /**
53978
     * `CheckAlways` means that after calling detectChanges the mode of the change detector
53979
     * will remain `CheckAlways`.
53980
     */
53981
    ChangeDetectorStatus[ChangeDetectorStatus["CheckAlways"] = 2] = "CheckAlways";
53982
    /**
53983
     * `Detached` means that the change detector sub tree is not a part of the main tree and
53984
     * should be skipped.
53985
     */
53986
    ChangeDetectorStatus[ChangeDetectorStatus["Detached"] = 3] = "Detached";
53987
    /**
53988
     * `Errored` means that the change detector encountered an error checking a binding
53989
     * or calling a directive lifecycle method and is now in an inconsistent state. Change
53990
     * detectors in this state will no longer detect changes.
53991
     */
53992
    ChangeDetectorStatus[ChangeDetectorStatus["Errored"] = 4] = "Errored";
53993
    /**
53994
     * `Destroyed` means that the change detector is destroyed.
53995
     */
53996
    ChangeDetectorStatus[ChangeDetectorStatus["Destroyed"] = 5] = "Destroyed";
53997
})(ChangeDetectorStatus || (ChangeDetectorStatus = {}));
53998
function isDefaultChangeDetectionStrategy(changeDetectionStrategy) {
53999
    return changeDetectionStrategy == null ||
54000
        changeDetectionStrategy === ChangeDetectionStrategy.Default;
54001
}
54002
 
54003
/**
54004
 * @license
54005
 * Copyright Google Inc. All Rights Reserved.
54006
 *
54007
 * Use of this source code is governed by an MIT-style license that can be
54008
 * found in the LICENSE file at https://angular.io/license
54009
 */
54010
/**
54011
 * Directive decorator and metadata.
54012
 *
54013
 *
54014
 * @Annotation
54015
 */
54016
var Directive = makeDecorator('Directive', function (dir) {
54017
    if (dir === void 0) { dir = {}; }
54018
    return dir;
54019
});
54020
/**
54021
 * Component decorator and metadata.
54022
 *
54023
 *
54024
 * @Annotation
54025
 */
54026
var Component = makeDecorator('Component', function (c) {
54027
    if (c === void 0) { c = {}; }
54028
    return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ changeDetection: ChangeDetectionStrategy.Default }, c));
54029
}, Directive);
54030
/**
54031
 * Pipe decorator and metadata.
54032
 *
54033
 * Use the `@Pipe` annotation to declare that a given class is a pipe. A pipe
54034
 * class must also implement {@link PipeTransform} interface.
54035
 *
54036
 * To use the pipe include a reference to the pipe class in
54037
 * {@link NgModule#declarations}.
54038
 *
54039
 *
54040
 * @Annotation
54041
 */
54042
var Pipe = makeDecorator('Pipe', function (p) { return (Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ pure: true }, p)); });
54043
/**
54044
 * Input decorator and metadata.
54045
 *
54046
 *
54047
 * @Annotation
54048
 */
54049
var Input = makePropDecorator('Input', function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); });
54050
/**
54051
 * Output decorator and metadata.
54052
 *
54053
 *
54054
 * @Annotation
54055
 */
54056
var Output = makePropDecorator('Output', function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); });
54057
/**
54058
 * HostBinding decorator and metadata.
54059
 *
54060
 *
54061
 * @Annotation
54062
 */
54063
var HostBinding = makePropDecorator('HostBinding', function (hostPropertyName) { return ({ hostPropertyName: hostPropertyName }); });
54064
/**
54065
 * HostListener decorator and metadata.
54066
 *
54067
 *
54068
 * @Annotation
54069
 */
54070
var HostListener = makePropDecorator('HostListener', function (eventName, args) { return ({ eventName: eventName, args: args }); });
54071
 
54072
/**
54073
 * @license
54074
 * Copyright Google Inc. All Rights Reserved.
54075
 *
54076
 * Use of this source code is governed by an MIT-style license that can be
54077
 * found in the LICENSE file at https://angular.io/license
54078
 */
54079
/**
54080
 * @description
54081
 *
54082
 * Represents a type that a Component or other object is instances of.
54083
 *
54084
 * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is be represented by
54085
 * the `MyCustomComponent` constructor function.
54086
 *
54087
 *
54088
 */
54089
var Type = Function;
54090
function isType(v) {
54091
    return typeof v === 'function';
54092
}
54093
 
54094
/**
54095
 * @license
54096
 * Copyright Google Inc. All Rights Reserved.
54097
 *
54098
 * Use of this source code is governed by an MIT-style license that can be
54099
 * found in the LICENSE file at https://angular.io/license
54100
 */
54101
var __window = typeof window !== 'undefined' && window;
54102
var __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&
54103
    self instanceof WorkerGlobalScope && self;
54104
var __global = typeof global !== 'undefined' && global;
54105
var _global = __window || __global || __self;
54106
var promise = Promise.resolve(0);
54107
var _symbolIterator = null;
54108
function getSymbolIterator() {
54109
    if (!_symbolIterator) {
54110
        var Symbol_1 = _global['Symbol'];
54111
        if (Symbol_1 && Symbol_1.iterator) {
54112
            _symbolIterator = Symbol_1.iterator;
54113
        }
54114
        else {
54115
            // es6-shim specific logic
54116
            var keys = Object.getOwnPropertyNames(Map.prototype);
54117
            for (var i = 0; i < keys.length; ++i) {
54118
                var key = keys[i];
54119
                if (key !== 'entries' && key !== 'size' &&
54120
                    Map.prototype[key] === Map.prototype['entries']) {
54121
                    _symbolIterator = key;
54122
                }
54123
            }
54124
        }
54125
    }
54126
    return _symbolIterator;
54127
}
54128
function scheduleMicroTask(fn) {
54129
    if (typeof Zone === 'undefined') {
54130
        // use promise to schedule microTask instead of use Zone
54131
        promise.then(function () { fn && fn.apply(null, null); });
54132
    }
54133
    else {
54134
        Zone.current.scheduleMicroTask('scheduleMicrotask', fn);
54135
    }
54136
}
54137
// JS has NaN !== NaN
54138
function looseIdentical(a, b) {
54139
    return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);
54140
}
54141
function stringify(token) {
54142
    if (typeof token === 'string') {
54143
        return token;
54144
    }
54145
    if (token instanceof Array) {
54146
        return '[' + token.map(stringify).join(', ') + ']';
54147
    }
54148
    if (token == null) {
54149
        return '' + token;
54150
    }
54151
    if (token.overriddenName) {
54152
        return "" + token.overriddenName;
54153
    }
54154
    if (token.name) {
54155
        return "" + token.name;
54156
    }
54157
    var res = token.toString();
54158
    if (res == null) {
54159
        return '' + res;
54160
    }
54161
    var newLineIndex = res.indexOf('\n');
54162
    return newLineIndex === -1 ? res : res.substring(0, newLineIndex);
54163
}
54164
 
54165
/**
54166
 * @license
54167
 * Copyright Google Inc. All Rights Reserved.
54168
 *
54169
 * Use of this source code is governed by an MIT-style license that can be
54170
 * found in the LICENSE file at https://angular.io/license
54171
 */
54172
/**
54173
 * Attention: These regex has to hold even if the code is minified!
54174
 */
54175
var DELEGATE_CTOR = /^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*arguments\)/;
54176
var INHERITED_CLASS = /^class\s+[A-Za-z\d$_]*\s*extends\s+[A-Za-z\d$_]+\s*{/;
54177
var INHERITED_CLASS_WITH_CTOR = /^class\s+[A-Za-z\d$_]*\s*extends\s+[A-Za-z\d$_]+\s*{[\s\S]*constructor\s*\(/;
54178
var ReflectionCapabilities = /** @class */ (function () {
54179
    function ReflectionCapabilities(reflect) {
54180
        this._reflect = reflect || _global['Reflect'];
54181
    }
54182
    ReflectionCapabilities.prototype.isReflectionEnabled = function () { return true; };
54183
    ReflectionCapabilities.prototype.factory = function (t) { return function () {
54184
        var args = [];
54185
        for (var _i = 0; _i < arguments.length; _i++) {
54186
            args[_i] = arguments[_i];
54187
        }
54188
        return new (t.bind.apply(t, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], args)))();
54189
    }; };
54190
    /** @internal */
54191
    /** @internal */
54192
    ReflectionCapabilities.prototype._zipTypesAndAnnotations = /** @internal */
54193
    function (paramTypes, paramAnnotations) {
54194
        var result;
54195
        if (typeof paramTypes === 'undefined') {
54196
            result = new Array(paramAnnotations.length);
54197
        }
54198
        else {
54199
            result = new Array(paramTypes.length);
54200
        }
54201
        for (var i = 0; i < result.length; i++) {
54202
            // TS outputs Object for parameters without types, while Traceur omits
54203
            // the annotations. For now we preserve the Traceur behavior to aid
54204
            // migration, but this can be revisited.
54205
            if (typeof paramTypes === 'undefined') {
54206
                result[i] = [];
54207
            }
54208
            else if (paramTypes[i] != Object) {
54209
                result[i] = [paramTypes[i]];
54210
            }
54211
            else {
54212
                result[i] = [];
54213
            }
54214
            if (paramAnnotations && paramAnnotations[i] != null) {
54215
                result[i] = result[i].concat(paramAnnotations[i]);
54216
            }
54217
        }
54218
        return result;
54219
    };
54220
    ReflectionCapabilities.prototype._ownParameters = function (type, parentCtor) {
54221
        var typeStr = type.toString();
54222
        // If we have no decorators, we only have function.length as metadata.
54223
        // In that case, to detect whether a child class declared an own constructor or not,
54224
        // we need to look inside of that constructor to check whether it is
54225
        // just calling the parent.
54226
        // This also helps to work around for https://github.com/Microsoft/TypeScript/issues/12439
54227
        // that sets 'design:paramtypes' to []
54228
        // if a class inherits from another class but has no ctor declared itself.
54229
        if (DELEGATE_CTOR.exec(typeStr) ||
54230
            (INHERITED_CLASS.exec(typeStr) && !INHERITED_CLASS_WITH_CTOR.exec(typeStr))) {
54231
            return null;
54232
        }
54233
        // Prefer the direct API.
54234
        if (type.parameters && type.parameters !== parentCtor.parameters) {
54235
            return type.parameters;
54236
        }
54237
        // API of tsickle for lowering decorators to properties on the class.
54238
        var tsickleCtorParams = type.ctorParameters;
54239
        if (tsickleCtorParams && tsickleCtorParams !== parentCtor.ctorParameters) {
54240
            // Newer tsickle uses a function closure
54241
            // Retain the non-function case for compatibility with older tsickle
54242
            var ctorParameters = typeof tsickleCtorParams === 'function' ? tsickleCtorParams() : tsickleCtorParams;
54243
            var paramTypes_1 = ctorParameters.map(function (ctorParam) { return ctorParam && ctorParam.type; });
54244
            var paramAnnotations_1 = ctorParameters.map(function (ctorParam) {
54245
                return ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators);
54246
            });
54247
            return this._zipTypesAndAnnotations(paramTypes_1, paramAnnotations_1);
54248
        }
54249
        // API for metadata created by invoking the decorators.
54250
        var paramAnnotations = type.hasOwnProperty(PARAMETERS) && type[PARAMETERS];
54251
        var paramTypes = this._reflect && this._reflect.getOwnMetadata &&
54252
            this._reflect.getOwnMetadata('design:paramtypes', type);
54253
        if (paramTypes || paramAnnotations) {
54254
            return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);
54255
        }
54256
        // If a class has no decorators, at least create metadata
54257
        // based on function.length.
54258
        // Note: We know that this is a real constructor as we checked
54259
        // the content of the constructor above.
54260
        return new Array(type.length).fill(undefined);
54261
    };
54262
    ReflectionCapabilities.prototype.parameters = function (type) {
54263
        // Note: only report metadata if we have at least one class decorator
54264
        // to stay in sync with the static reflector.
54265
        if (!isType(type)) {
54266
            return [];
54267
        }
54268
        var parentCtor = getParentCtor(type);
54269
        var parameters = this._ownParameters(type, parentCtor);
54270
        if (!parameters && parentCtor !== Object) {
54271
            parameters = this.parameters(parentCtor);
54272
        }
54273
        return parameters || [];
54274
    };
54275
    ReflectionCapabilities.prototype._ownAnnotations = function (typeOrFunc, parentCtor) {
54276
        // Prefer the direct API.
54277
        if (typeOrFunc.annotations && typeOrFunc.annotations !== parentCtor.annotations) {
54278
            var annotations = typeOrFunc.annotations;
54279
            if (typeof annotations === 'function' && annotations.annotations) {
54280
                annotations = annotations.annotations;
54281
            }
54282
            return annotations;
54283
        }
54284
        // API of tsickle for lowering decorators to properties on the class.
54285
        if (typeOrFunc.decorators && typeOrFunc.decorators !== parentCtor.decorators) {
54286
            return convertTsickleDecoratorIntoMetadata(typeOrFunc.decorators);
54287
        }
54288
        // API for metadata created by invoking the decorators.
54289
        if (typeOrFunc.hasOwnProperty(ANNOTATIONS)) {
54290
            return typeOrFunc[ANNOTATIONS];
54291
        }
54292
        return null;
54293
    };
54294
    ReflectionCapabilities.prototype.annotations = function (typeOrFunc) {
54295
        if (!isType(typeOrFunc)) {
54296
            return [];
54297
        }
54298
        var parentCtor = getParentCtor(typeOrFunc);
54299
        var ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || [];
54300
        var parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : [];
54301
        return parentAnnotations.concat(ownAnnotations);
54302
    };
54303
    ReflectionCapabilities.prototype._ownPropMetadata = function (typeOrFunc, parentCtor) {
54304
        // Prefer the direct API.
54305
        if (typeOrFunc.propMetadata &&
54306
            typeOrFunc.propMetadata !== parentCtor.propMetadata) {
54307
            var propMetadata = typeOrFunc.propMetadata;
54308
            if (typeof propMetadata === 'function' && propMetadata.propMetadata) {
54309
                propMetadata = propMetadata.propMetadata;
54310
            }
54311
            return propMetadata;
54312
        }
54313
        // API of tsickle for lowering decorators to properties on the class.
54314
        if (typeOrFunc.propDecorators &&
54315
            typeOrFunc.propDecorators !== parentCtor.propDecorators) {
54316
            var propDecorators_1 = typeOrFunc.propDecorators;
54317
            var propMetadata_1 = {};
54318
            Object.keys(propDecorators_1).forEach(function (prop) {
54319
                propMetadata_1[prop] = convertTsickleDecoratorIntoMetadata(propDecorators_1[prop]);
54320
            });
54321
            return propMetadata_1;
54322
        }
54323
        // API for metadata created by invoking the decorators.
54324
        if (typeOrFunc.hasOwnProperty(PROP_METADATA)) {
54325
            return typeOrFunc[PROP_METADATA];
54326
        }
54327
        return null;
54328
    };
54329
    ReflectionCapabilities.prototype.propMetadata = function (typeOrFunc) {
54330
        if (!isType(typeOrFunc)) {
54331
            return {};
54332
        }
54333
        var parentCtor = getParentCtor(typeOrFunc);
54334
        var propMetadata = {};
54335
        if (parentCtor !== Object) {
54336
            var parentPropMetadata_1 = this.propMetadata(parentCtor);
54337
            Object.keys(parentPropMetadata_1).forEach(function (propName) {
54338
                propMetadata[propName] = parentPropMetadata_1[propName];
54339
            });
54340
        }
54341
        var ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor);
54342
        if (ownPropMetadata) {
54343
            Object.keys(ownPropMetadata).forEach(function (propName) {
54344
                var decorators = [];
54345
                if (propMetadata.hasOwnProperty(propName)) {
54346
                    decorators.push.apply(decorators, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(propMetadata[propName]));
54347
                }
54348
                decorators.push.apply(decorators, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(ownPropMetadata[propName]));
54349
                propMetadata[propName] = decorators;
54350
            });
54351
        }
54352
        return propMetadata;
54353
    };
54354
    ReflectionCapabilities.prototype.hasLifecycleHook = function (type, lcProperty) {
54355
        return type instanceof Type && lcProperty in type.prototype;
54356
    };
54357
    ReflectionCapabilities.prototype.guards = function (type) { return {}; };
54358
    ReflectionCapabilities.prototype.getter = function (name) { return new Function('o', 'return o.' + name + ';'); };
54359
    ReflectionCapabilities.prototype.setter = function (name) {
54360
        return new Function('o', 'v', 'return o.' + name + ' = v;');
54361
    };
54362
    ReflectionCapabilities.prototype.method = function (name) {
54363
        var functionBody = "if (!o." + name + ") throw new Error('\"" + name + "\" is undefined');\n        return o." + name + ".apply(o, args);";
54364
        return new Function('o', 'args', functionBody);
54365
    };
54366
    // There is not a concept of import uri in Js, but this is useful in developing Dart applications.
54367
    // There is not a concept of import uri in Js, but this is useful in developing Dart applications.
54368
    ReflectionCapabilities.prototype.importUri =
54369
    // There is not a concept of import uri in Js, but this is useful in developing Dart applications.
54370
    function (type) {
54371
        // StaticSymbol
54372
        if (typeof type === 'object' && type['filePath']) {
54373
            return type['filePath'];
54374
        }
54375
        // Runtime type
54376
        return "./" + stringify(type);
54377
    };
54378
    ReflectionCapabilities.prototype.resourceUri = function (type) { return "./" + stringify(type); };
54379
    ReflectionCapabilities.prototype.resolveIdentifier = function (name, moduleUrl, members, runtime) {
54380
        return runtime;
54381
    };
54382
    ReflectionCapabilities.prototype.resolveEnum = function (enumIdentifier, name) { return enumIdentifier[name]; };
54383
    return ReflectionCapabilities;
54384
}());
54385
function convertTsickleDecoratorIntoMetadata(decoratorInvocations) {
54386
    if (!decoratorInvocations) {
54387
        return [];
54388
    }
54389
    return decoratorInvocations.map(function (decoratorInvocation) {
54390
        var decoratorType = decoratorInvocation.type;
54391
        var annotationCls = decoratorType.annotationCls;
54392
        var annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : [];
54393
        return new (annotationCls.bind.apply(annotationCls, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], annotationArgs)))();
54394
    });
54395
}
54396
function getParentCtor(ctor) {
54397
    var parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;
54398
    var parentCtor = parentProto ? parentProto.constructor : null;
54399
    // Note: We always use `Object` as the null value
54400
    // to simplify checking later on.
54401
    return parentCtor || Object;
54402
}
54403
 
54404
/**
54405
 * @license
54406
 * Copyright Google Inc. All Rights Reserved.
54407
 *
54408
 * Use of this source code is governed by an MIT-style license that can be
54409
 * found in the LICENSE file at https://angular.io/license
54410
 */
54411
function getClosureSafeProperty(objWithPropertyToExtract, target) {
54412
    for (var key in objWithPropertyToExtract) {
54413
        if (objWithPropertyToExtract[key] === target) {
54414
            return key;
54415
        }
54416
    }
54417
    throw Error('Could not find renamed property on target object.');
54418
}
54419
 
54420
/**
54421
 * @license
54422
 * Copyright Google Inc. All Rights Reserved.
54423
 *
54424
 * Use of this source code is governed by an MIT-style license that can be
54425
 * found in the LICENSE file at https://angular.io/license
54426
 */
54427
/**
54428
 * Allows to refer to references which are not yet defined.
54429
 *
54430
 * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of
54431
 * DI is declared,
54432
 * but not yet defined. It is also used when the `token` which we use when creating a query is not
54433
 * yet defined.
54434
 *
54435
 * ### Example
54436
 * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}
54437
 * @experimental
54438
 */
54439
function forwardRef(forwardRefFn) {
54440
    forwardRefFn.__forward_ref__ = forwardRef;
54441
    forwardRefFn.toString = function () { return stringify(this()); };
54442
    return forwardRefFn;
54443
}
54444
/**
54445
 * Lazily retrieves the reference value from a forwardRef.
54446
 *
54447
 * Acts as the identity function when given a non-forward-ref value.
54448
 *
54449
 * ### Example ([live demo](http://plnkr.co/edit/GU72mJrk1fiodChcmiDR?p=preview))
54450
 *
54451
 * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}
54452
 *
54453
 * See: {@link forwardRef}
54454
 * @experimental
54455
 */
54456
function resolveForwardRef(type) {
54457
    if (typeof type === 'function' && type.hasOwnProperty('__forward_ref__') &&
54458
        type.__forward_ref__ === forwardRef) {
54459
        return type();
54460
    }
54461
    else {
54462
        return type;
54463
    }
54464
}
54465
 
54466
/**
54467
 * @license
54468
 * Copyright Google Inc. All Rights Reserved.
54469
 *
54470
 * Use of this source code is governed by an MIT-style license that can be
54471
 * found in the LICENSE file at https://angular.io/license
54472
 */
54473
/**
54474
 * Inject decorator and metadata.
54475
 *
54476
 *
54477
 * @Annotation
54478
 */
54479
var Inject = makeParamDecorator('Inject', function (token) { return ({ token: token }); });
54480
/**
54481
 * Optional decorator and metadata.
54482
 *
54483
 *
54484
 * @Annotation
54485
 */
54486
var Optional = makeParamDecorator('Optional');
54487
/**
54488
 * Self decorator and metadata.
54489
 *
54490
 *
54491
 * @Annotation
54492
 */
54493
var Self = makeParamDecorator('Self');
54494
/**
54495
 * SkipSelf decorator and metadata.
54496
 *
54497
 *
54498
 * @Annotation
54499
 */
54500
var SkipSelf = makeParamDecorator('SkipSelf');
54501
/**
54502
 * Host decorator and metadata.
54503
 *
54504
 *
54505
 * @Annotation
54506
 */
54507
var Host = makeParamDecorator('Host');
54508
 
54509
/**
54510
 * @license
54511
 * Copyright Google Inc. All Rights Reserved.
54512
 *
54513
 * Use of this source code is governed by an MIT-style license that can be
54514
 * found in the LICENSE file at https://angular.io/license
54515
 */
54516
var SOURCE = '__source';
54517
var _THROW_IF_NOT_FOUND = new Object();
54518
var THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;
54519
/**
54520
 * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.
54521
 *
54522
 * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a
54523
 * project.
54524
 *
54525
 * @experimental
54526
 */
54527
var INJECTOR = new InjectionToken('INJECTOR');
54528
var NullInjector = /** @class */ (function () {
54529
    function NullInjector() {
54530
    }
54531
    NullInjector.prototype.get = function (token, notFoundValue) {
54532
        if (notFoundValue === void 0) { notFoundValue = _THROW_IF_NOT_FOUND; }
54533
        if (notFoundValue === _THROW_IF_NOT_FOUND) {
54534
            throw new Error("NullInjectorError: No provider for " + stringify(token) + "!");
54535
        }
54536
        return notFoundValue;
54537
    };
54538
    return NullInjector;
54539
}());
54540
/**
54541
 * @usageNotes
54542
 * ```
54543
 * const injector: Injector = ...;
54544
 * injector.get(...);
54545
 * ```
54546
 *
54547
 * @description
54548
 *
54549
 * Concrete injectors implement this interface.
54550
 *
54551
 * For more details, see the {@linkDocs guide/dependency-injection "Dependency Injection Guide"}.
54552
 *
54553
 * ### Example
54554
 *
54555
 * {@example core/di/ts/injector_spec.ts region='Injector'}
54556
 *
54557
 * `Injector` returns itself when given `Injector` as a token:
54558
 * {@example core/di/ts/injector_spec.ts region='injectInjector'}
54559
 *
54560
 *
54561
 */
54562
var Injector = /** @class */ (function () {
54563
    function Injector() {
54564
    }
54565
    /**
54566
     * Create a new Injector which is configure using `StaticProvider`s.
54567
     *
54568
     * ### Example
54569
     *
54570
     * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
54571
     */
54572
    /**
54573
       * Create a new Injector which is configure using `StaticProvider`s.
54574
       *
54575
       * ### Example
54576
       *
54577
       * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
54578
       */
54579
    Injector.create = /**
54580
       * Create a new Injector which is configure using `StaticProvider`s.
54581
       *
54582
       * ### Example
54583
       *
54584
       * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
54585
       */
54586
    function (options, parent) {
54587
        if (Array.isArray(options)) {
54588
            return new StaticInjector(options, parent);
54589
        }
54590
        else {
54591
            return new StaticInjector(options.providers, options.parent, options.name || null);
54592
        }
54593
    };
54594
    Injector.THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;
54595
    Injector.NULL = new NullInjector();
54596
    Injector.ngInjectableDef = defineInjectable({
54597
        providedIn: 'any',
54598
        factory: function () { return inject(INJECTOR); },
54599
    });
54600
    return Injector;
54601
}());
54602
var IDENT = function (value) {
54603
    return value;
54604
};
54605
var EMPTY = [];
54606
var CIRCULAR = IDENT;
54607
var MULTI_PROVIDER_FN = function () {
54608
    return Array.prototype.slice.call(arguments);
54609
};
54610
var GET_PROPERTY_NAME$1 = {};
54611
var USE_VALUE$1 = getClosureSafeProperty$1({ provide: String, useValue: GET_PROPERTY_NAME$1 });
54612
var NG_TOKEN_PATH = 'ngTokenPath';
54613
var NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';
54614
var NULL_INJECTOR = Injector.NULL;
54615
var NEW_LINE = /\n/gm;
54616
var NO_NEW_LINE = 'ɵ';
54617
var StaticInjector = /** @class */ (function () {
54618
    function StaticInjector(providers, parent, source) {
54619
        if (parent === void 0) { parent = NULL_INJECTOR; }
54620
        if (source === void 0) { source = null; }
54621
        this.parent = parent;
54622
        this.source = source;
54623
        var records = this._records = new Map();
54624
        records.set(Injector, { token: Injector, fn: IDENT, deps: EMPTY, value: this, useNew: false });
54625
        records.set(INJECTOR, { token: INJECTOR, fn: IDENT, deps: EMPTY, value: this, useNew: false });
54626
        recursivelyProcessProviders(records, providers);
54627
    }
54628
    StaticInjector.prototype.get = function (token, notFoundValue, flags) {
54629
        if (flags === void 0) { flags = 0 /* Default */; }
54630
        var record = this._records.get(token);
54631
        try {
54632
            return tryResolveToken(token, record, this._records, this.parent, notFoundValue, flags);
54633
        }
54634
        catch (e) {
54635
            var tokenPath = e[NG_TEMP_TOKEN_PATH];
54636
            if (token[SOURCE]) {
54637
                tokenPath.unshift(token[SOURCE]);
54638
            }
54639
            e.message = formatError('\n' + e.message, tokenPath, this.source);
54640
            e[NG_TOKEN_PATH] = tokenPath;
54641
            e[NG_TEMP_TOKEN_PATH] = null;
54642
            throw e;
54643
        }
54644
    };
54645
    StaticInjector.prototype.toString = function () {
54646
        var tokens = [], records = this._records;
54647
        records.forEach(function (v, token) { return tokens.push(stringify(token)); });
54648
        return "StaticInjector[" + tokens.join(', ') + "]";
54649
    };
54650
    return StaticInjector;
54651
}());
54652
function resolveProvider(provider) {
54653
    var deps = computeDeps(provider);
54654
    var fn = IDENT;
54655
    var value = EMPTY;
54656
    var useNew = false;
54657
    var provide = resolveForwardRef(provider.provide);
54658
    if (USE_VALUE$1 in provider) {
54659
        // We need to use USE_VALUE in provider since provider.useValue could be defined as undefined.
54660
        value = provider.useValue;
54661
    }
54662
    else if (provider.useFactory) {
54663
        fn = provider.useFactory;
54664
    }
54665
    else if (provider.useExisting) {
54666
        // Just use IDENT
54667
    }
54668
    else if (provider.useClass) {
54669
        useNew = true;
54670
        fn = resolveForwardRef(provider.useClass);
54671
    }
54672
    else if (typeof provide == 'function') {
54673
        useNew = true;
54674
        fn = provide;
54675
    }
54676
    else {
54677
        throw staticError('StaticProvider does not have [useValue|useFactory|useExisting|useClass] or [provide] is not newable', provider);
54678
    }
54679
    return { deps: deps, fn: fn, useNew: useNew, value: value };
54680
}
54681
function multiProviderMixError(token) {
54682
    return staticError('Cannot mix multi providers and regular providers', token);
54683
}
54684
function recursivelyProcessProviders(records, provider) {
54685
    if (provider) {
54686
        provider = resolveForwardRef(provider);
54687
        if (provider instanceof Array) {
54688
            // if we have an array recurse into the array
54689
            for (var i = 0; i < provider.length; i++) {
54690
                recursivelyProcessProviders(records, provider[i]);
54691
            }
54692
        }
54693
        else if (typeof provider === 'function') {
54694
            // Functions were supported in ReflectiveInjector, but are not here. For safety give useful
54695
            // error messages
54696
            throw staticError('Function/Class not supported', provider);
54697
        }
54698
        else if (provider && typeof provider === 'object' && provider.provide) {
54699
            // At this point we have what looks like a provider: {provide: ?, ....}
54700
            var token = resolveForwardRef(provider.provide);
54701
            var resolvedProvider = resolveProvider(provider);
54702
            if (provider.multi === true) {
54703
                // This is a multi provider.
54704
                var multiProvider = records.get(token);
54705
                if (multiProvider) {
54706
                    if (multiProvider.fn !== MULTI_PROVIDER_FN) {
54707
                        throw multiProviderMixError(token);
54708
                    }
54709
                }
54710
                else {
54711
                    // Create a placeholder factory which will look up the constituents of the multi provider.
54712
                    records.set(token, multiProvider = {
54713
                        token: provider.provide,
54714
                        deps: [],
54715
                        useNew: false,
54716
                        fn: MULTI_PROVIDER_FN,
54717
                        value: EMPTY
54718
                    });
54719
                }
54720
                // Treat the provider as the token.
54721
                token = provider;
54722
                multiProvider.deps.push({ token: token, options: 6 /* Default */ });
54723
            }
54724
            var record = records.get(token);
54725
            if (record && record.fn == MULTI_PROVIDER_FN) {
54726
                throw multiProviderMixError(token);
54727
            }
54728
            records.set(token, resolvedProvider);
54729
        }
54730
        else {
54731
            throw staticError('Unexpected provider', provider);
54732
        }
54733
    }
54734
}
54735
function tryResolveToken(token, record, records, parent, notFoundValue, flags) {
54736
    try {
54737
        return resolveToken(token, record, records, parent, notFoundValue, flags);
54738
    }
54739
    catch (e) {
54740
        // ensure that 'e' is of type Error.
54741
        if (!(e instanceof Error)) {
54742
            e = new Error(e);
54743
        }
54744
        var path = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];
54745
        path.unshift(token);
54746
        if (record && record.value == CIRCULAR) {
54747
            // Reset the Circular flag.
54748
            record.value = EMPTY;
54749
        }
54750
        throw e;
54751
    }
54752
}
54753
function resolveToken(token, record, records, parent, notFoundValue, flags) {
54754
    var value;
54755
    if (record && !(flags & 4 /* SkipSelf */)) {
54756
        // If we don't have a record, this implies that we don't own the provider hence don't know how
54757
        // to resolve it.
54758
        value = record.value;
54759
        if (value == CIRCULAR) {
54760
            throw Error(NO_NEW_LINE + 'Circular dependency');
54761
        }
54762
        else if (value === EMPTY) {
54763
            record.value = CIRCULAR;
54764
            var obj = undefined;
54765
            var useNew = record.useNew;
54766
            var fn = record.fn;
54767
            var depRecords = record.deps;
54768
            var deps = EMPTY;
54769
            if (depRecords.length) {
54770
                deps = [];
54771
                for (var i = 0; i < depRecords.length; i++) {
54772
                    var depRecord = depRecords[i];
54773
                    var options = depRecord.options;
54774
                    var childRecord = options & 2 /* CheckSelf */ ? records.get(depRecord.token) : undefined;
54775
                    deps.push(tryResolveToken(
54776
                    // Current Token to resolve
54777
                    depRecord.token, childRecord, records,
54778
                    // If we don't know how to resolve dependency and we should not check parent for it,
54779
                    // than pass in Null injector.
54780
                    !childRecord && !(options & 4 /* CheckParent */) ? NULL_INJECTOR : parent, options & 1 /* Optional */ ? null : Injector.THROW_IF_NOT_FOUND, 0 /* Default */));
54781
                }
54782
            }
54783
            record.value = value = useNew ? new ((_a = fn).bind.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], deps)))() : fn.apply(obj, deps);
54784
        }
54785
    }
54786
    else if (!(flags & 2 /* Self */)) {
54787
        value = parent.get(token, notFoundValue, 0 /* Default */);
54788
    }
54789
    return value;
54790
    var _a;
54791
}
54792
function computeDeps(provider) {
54793
    var deps = EMPTY;
54794
    var providerDeps = provider.deps;
54795
    if (providerDeps && providerDeps.length) {
54796
        deps = [];
54797
        for (var i = 0; i < providerDeps.length; i++) {
54798
            var options = 6;
54799
            var token = resolveForwardRef(providerDeps[i]);
54800
            if (token instanceof Array) {
54801
                for (var j = 0, annotations = token; j < annotations.length; j++) {
54802
                    var annotation = annotations[j];
54803
                    if (annotation instanceof Optional || annotation == Optional) {
54804
                        options = options | 1 /* Optional */;
54805
                    }
54806
                    else if (annotation instanceof SkipSelf || annotation == SkipSelf) {
54807
                        options = options & ~2 /* CheckSelf */;
54808
                    }
54809
                    else if (annotation instanceof Self || annotation == Self) {
54810
                        options = options & ~4 /* CheckParent */;
54811
                    }
54812
                    else if (annotation instanceof Inject) {
54813
                        token = annotation.token;
54814
                    }
54815
                    else {
54816
                        token = resolveForwardRef(annotation);
54817
                    }
54818
                }
54819
            }
54820
            deps.push({ token: token, options: options });
54821
        }
54822
    }
54823
    else if (provider.useExisting) {
54824
        var token = resolveForwardRef(provider.useExisting);
54825
        deps = [{ token: token, options: 6 /* Default */ }];
54826
    }
54827
    else if (!providerDeps && !(USE_VALUE$1 in provider)) {
54828
        // useValue & useExisting are the only ones which are exempt from deps all others need it.
54829
        throw staticError('\'deps\' required', provider);
54830
    }
54831
    return deps;
54832
}
54833
function formatError(text, obj, source) {
54834
    if (source === void 0) { source = null; }
54835
    text = text && text.charAt(0) === '\n' && text.charAt(1) == NO_NEW_LINE ? text.substr(2) : text;
54836
    var context = stringify(obj);
54837
    if (obj instanceof Array) {
54838
        context = obj.map(stringify).join(' -> ');
54839
    }
54840
    else if (typeof obj === 'object') {
54841
        var parts = [];
54842
        for (var key in obj) {
54843
            if (obj.hasOwnProperty(key)) {
54844
                var value = obj[key];
54845
                parts.push(key + ':' + (typeof value === 'string' ? JSON.stringify(value) : stringify(value)));
54846
            }
54847
        }
54848
        context = "{" + parts.join(', ') + "}";
54849
    }
54850
    return "StaticInjectorError" + (source ? '(' + source + ')' : '') + "[" + context + "]: " + text.replace(NEW_LINE, '\n  ');
54851
}
54852
function staticError(text, obj) {
54853
    return new Error(formatError(text, obj));
54854
}
54855
function getClosureSafeProperty$1(objWithPropertyToExtract) {
54856
    for (var key in objWithPropertyToExtract) {
54857
        if (objWithPropertyToExtract[key] === GET_PROPERTY_NAME$1) {
54858
            return key;
54859
        }
54860
    }
54861
    throw Error('!prop');
54862
}
54863
/**
54864
 * Current injector value used by `inject`.
54865
 * - `undefined`: it is an error to call `inject`
54866
 * - `null`: `inject` can be called but there is no injector (limp-mode).
54867
 * - Injector instance: Use the injector for resolution.
54868
 */
54869
var _currentInjector = undefined;
54870
function setCurrentInjector(injector) {
54871
    var former = _currentInjector;
54872
    _currentInjector = injector;
54873
    return former;
54874
}
54875
function inject(token, flags) {
54876
    if (flags === void 0) { flags = 0 /* Default */; }
54877
    if (_currentInjector === undefined) {
54878
        throw new Error("inject() must be called from an injection context");
54879
    }
54880
    else if (_currentInjector === null) {
54881
        var injectableDef = token.ngInjectableDef;
54882
        if (injectableDef && injectableDef.providedIn == 'root') {
54883
            return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() :
54884
                injectableDef.value;
54885
        }
54886
        throw new Error("Injector: NOT_FOUND [" + stringify(token) + "]");
54887
    }
54888
    else {
54889
        return _currentInjector.get(token, flags & 8 /* Optional */ ? null : undefined, flags);
54890
    }
54891
}
54892
function injectArgs(types) {
54893
    var args = [];
54894
    for (var i = 0; i < types.length; i++) {
54895
        var arg = types[i];
54896
        if (Array.isArray(arg)) {
54897
            if (arg.length === 0) {
54898
                throw new Error('Arguments array must have arguments.');
54899
            }
54900
            var type = undefined;
54901
            var flags = 0;
54902
            for (var j = 0; j < arg.length; j++) {
54903
                var meta = arg[j];
54904
                if (meta instanceof Optional || meta.__proto__.ngMetadataName === 'Optional') {
54905
                    flags |= 8 /* Optional */;
54906
                }
54907
                else if (meta instanceof SkipSelf || meta.__proto__.ngMetadataName === 'SkipSelf') {
54908
                    flags |= 4 /* SkipSelf */;
54909
                }
54910
                else if (meta instanceof Self || meta.__proto__.ngMetadataName === 'Self') {
54911
                    flags |= 2 /* Self */;
54912
                }
54913
                else if (meta instanceof Inject) {
54914
                    type = meta.token;
54915
                }
54916
                else {
54917
                    type = meta;
54918
                }
54919
            }
54920
            args.push(inject((type), flags));
54921
        }
54922
        else {
54923
            args.push(inject(arg));
54924
        }
54925
    }
54926
    return args;
54927
}
54928
 
54929
/**
54930
 * @license
54931
 * Copyright Google Inc. All Rights Reserved.
54932
 *
54933
 * Use of this source code is governed by an MIT-style license that can be
54934
 * found in the LICENSE file at https://angular.io/license
54935
 */
54936
var GET_PROPERTY_NAME = {};
54937
var ɵ0 = GET_PROPERTY_NAME;
54938
var USE_VALUE = getClosureSafeProperty({ provide: String, useValue: ɵ0 }, GET_PROPERTY_NAME);
54939
var EMPTY_ARRAY = [];
54940
function convertInjectableProviderToFactory(type, provider) {
54941
    if (!provider) {
54942
        var reflectionCapabilities = new ReflectionCapabilities();
54943
        var deps_1 = reflectionCapabilities.parameters(type);
54944
        // TODO - convert to flags.
54945
        return function () { return new (type.bind.apply(type, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], injectArgs(deps_1))))(); };
54946
    }
54947
    if (USE_VALUE in provider) {
54948
        var valueProvider_1 = provider;
54949
        return function () { return valueProvider_1.useValue; };
54950
    }
54951
    else if (provider.useExisting) {
54952
        var existingProvider_1 = provider;
54953
        return function () { return inject(existingProvider_1.useExisting); };
54954
    }
54955
    else if (provider.useFactory) {
54956
        var factoryProvider_1 = provider;
54957
        return function () { return factoryProvider_1.useFactory.apply(factoryProvider_1, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(injectArgs(factoryProvider_1.deps || EMPTY_ARRAY))); };
54958
    }
54959
    else if (provider.useClass) {
54960
        var classProvider_1 = provider;
54961
        var deps_2 = provider.deps;
54962
        if (!deps_2) {
54963
            var reflectionCapabilities = new ReflectionCapabilities();
54964
            deps_2 = reflectionCapabilities.parameters(type);
54965
        }
54966
        return function () {
54967
            return new ((_a = classProvider_1.useClass).bind.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], injectArgs(deps_2))))();
54968
            var _a;
54969
        };
54970
    }
54971
    else {
54972
        var deps_3 = provider.deps;
54973
        if (!deps_3) {
54974
            var reflectionCapabilities = new ReflectionCapabilities();
54975
            deps_3 = reflectionCapabilities.parameters(type);
54976
        }
54977
        return function () { return new (type.bind.apply(type, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], injectArgs((deps_3)))))(); };
54978
    }
54979
}
54980
/**
54981
* Injectable decorator and metadata.
54982
*
54983
*
54984
* @Annotation
54985
*/
54986
var Injectable = makeDecorator('Injectable', undefined, undefined, undefined, function (injectableType, options) {
54987
    if (options && options.providedIn !== undefined &&
54988
        injectableType.ngInjectableDef === undefined) {
54989
        injectableType.ngInjectableDef = defineInjectable({
54990
            providedIn: options.providedIn,
54991
            factory: convertInjectableProviderToFactory(injectableType, options)
54992
        });
54993
    }
54994
});
54995
 
54996
/**
54997
 * @license
54998
 * Copyright Google Inc. All Rights Reserved.
54999
 *
55000
 * Use of this source code is governed by an MIT-style license that can be
55001
 * found in the LICENSE file at https://angular.io/license
55002
 */
55003
/**
55004
 * Defines a schema that will allow:
55005
 * - any non-Angular elements with a `-` in their name,
55006
 * - any properties on elements with a `-` in their name which is the common rule for custom
55007
 * elements.
55008
 *
55009
 *
55010
 */
55011
var CUSTOM_ELEMENTS_SCHEMA = {
55012
    name: 'custom-elements'
55013
};
55014
/**
55015
 * Defines a schema that will allow any property on any element.
55016
 *
55017
 * @experimental
55018
 */
55019
var NO_ERRORS_SCHEMA = {
55020
    name: 'no-errors-schema'
55021
};
55022
/**
55023
 * NgModule decorator and metadata.
55024
 *
55025
 *
55026
 * @Annotation
55027
 */
55028
var NgModule = makeDecorator('NgModule', function (ngModule) { return ngModule; }, undefined, undefined, function (moduleType, metadata) {
55029
    var imports = (metadata && metadata.imports) || [];
55030
    if (metadata && metadata.exports) {
55031
        imports = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(imports, [metadata.exports]);
55032
    }
55033
    moduleType.ngInjectorDef = defineInjector({
55034
        factory: convertInjectableProviderToFactory(moduleType, { useClass: moduleType }),
55035
        providers: metadata && metadata.providers,
55036
        imports: imports,
55037
    });
55038
});
55039
 
55040
/**
55041
 * @license
55042
 * Copyright Google Inc. All Rights Reserved.
55043
 *
55044
 * Use of this source code is governed by an MIT-style license that can be
55045
 * found in the LICENSE file at https://angular.io/license
55046
 */
55047
/**
55048
 * @license
55049
 * Copyright Google Inc. All Rights Reserved.
55050
 *
55051
 * Use of this source code is governed by an MIT-style license that can be
55052
 * found in the LICENSE file at https://angular.io/license
55053
 */
55054
/**
55055
 * Defines template and style encapsulation options available for Component's {@link Component}.
55056
 *
55057
 * See {@link Component#encapsulation encapsulation}.
55058
 *
55059
 */
55060
/**
55061
 * Defines template and style encapsulation options available for Component's {@link Component}.
55062
 *
55063
 * See {@link Component#encapsulation encapsulation}.
55064
 *
55065
 */
55066
var ViewEncapsulation;
55067
/**
55068
 * Defines template and style encapsulation options available for Component's {@link Component}.
55069
 *
55070
 * See {@link Component#encapsulation encapsulation}.
55071
 *
55072
 */
55073
(function (ViewEncapsulation) {
55074
    /**
55075
     * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host
55076
     * Element and pre-processing the style rules provided via {@link Component#styles styles} or
55077
     * {@link Component#styleUrls styleUrls}, and adding the new Host Element attribute to all
55078
     * selectors.
55079
     *
55080
     * This is the default option.
55081
     */
55082
    ViewEncapsulation[ViewEncapsulation["Emulated"] = 0] = "Emulated";
55083
    /**
55084
     * Use the native encapsulation mechanism of the renderer.
55085
     *
55086
     * For the DOM this means using [Shadow DOM](https://w3c.github.io/webcomponents/spec/shadow/) and
55087
     * creating a ShadowRoot for Component's Host Element.
55088
     */
55089
    ViewEncapsulation[ViewEncapsulation["Native"] = 1] = "Native";
55090
    /**
55091
     * Don't provide any template or style encapsulation.
55092
     */
55093
    ViewEncapsulation[ViewEncapsulation["None"] = 2] = "None";
55094
})(ViewEncapsulation || (ViewEncapsulation = {}));
55095
 
55096
/**
55097
 * @license
55098
 * Copyright Google Inc. All Rights Reserved.
55099
 *
55100
 * Use of this source code is governed by an MIT-style license that can be
55101
 * found in the LICENSE file at https://angular.io/license
55102
 */
55103
 
55104
/**
55105
 * @license
55106
 * Copyright Google Inc. All Rights Reserved.
55107
 *
55108
 * Use of this source code is governed by an MIT-style license that can be
55109
 * found in the LICENSE file at https://angular.io/license
55110
 */
55111
/**
55112
 * @description Represents the version of Angular
55113
 *
55114
 *
55115
 */
55116
var Version = /** @class */ (function () {
55117
    function Version(full) {
55118
        this.full = full;
55119
        this.major = full.split('.')[0];
55120
        this.minor = full.split('.')[1];
55121
        this.patch = full.split('.').slice(2).join('.');
55122
    }
55123
    return Version;
55124
}());
55125
var VERSION = new Version('6.0.3');
55126
 
55127
/**
55128
 * @license
55129
 * Copyright Google Inc. All Rights Reserved.
55130
 *
55131
 * Use of this source code is governed by an MIT-style license that can be
55132
 * found in the LICENSE file at https://angular.io/license
55133
 */
55134
 
55135
var ERROR_DEBUG_CONTEXT = 'ngDebugContext';
55136
var ERROR_ORIGINAL_ERROR = 'ngOriginalError';
55137
var ERROR_LOGGER = 'ngErrorLogger';
55138
 
55139
function getDebugContext(error) {
55140
    return error[ERROR_DEBUG_CONTEXT];
55141
}
55142
function getOriginalError(error) {
55143
    return error[ERROR_ORIGINAL_ERROR];
55144
}
55145
function getErrorLogger(error) {
55146
    return error[ERROR_LOGGER] || defaultErrorLogger;
55147
}
55148
function defaultErrorLogger(console) {
55149
    var values = [];
55150
    for (var _i = 1; _i < arguments.length; _i++) {
55151
        values[_i - 1] = arguments[_i];
55152
    }
55153
    console.error.apply(console, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(values));
55154
}
55155
 
55156
/**
55157
 * @license
55158
 * Copyright Google Inc. All Rights Reserved.
55159
 *
55160
 * Use of this source code is governed by an MIT-style license that can be
55161
 * found in the LICENSE file at https://angular.io/license
55162
 */
55163
/**
55164
 *
55165
 * @description
55166
 * Provides a hook for centralized exception handling.
55167
 *
55168
 * The default implementation of `ErrorHandler` prints error messages to the `console`. To
55169
 * intercept error handling, write a custom exception handler that replaces this default as
55170
 * appropriate for your app.
55171
 *
55172
 * ### Example
55173
 *
55174
 * ```
55175
 * class MyErrorHandler implements ErrorHandler {
55176
 *   handleError(error) {
55177
 *     // do something with the exception
55178
 *   }
55179
 * }
55180
 *
55181
 * @NgModule({
55182
 *   providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]
55183
 * })
55184
 * class MyModule {}
55185
 * ```
55186
 *
55187
 *
55188
 */
55189
var ErrorHandler = /** @class */ (function () {
55190
    function ErrorHandler() {
55191
        /**
55192
           * @internal
55193
           */
55194
        this._console = console;
55195
    }
55196
    ErrorHandler.prototype.handleError = function (error) {
55197
        var originalError = this._findOriginalError(error);
55198
        var context = this._findContext(error);
55199
        // Note: Browser consoles show the place from where console.error was called.
55200
        // We can use this to give users additional information about the error.
55201
        var errorLogger = getErrorLogger(error);
55202
        errorLogger(this._console, "ERROR", error);
55203
        if (originalError) {
55204
            errorLogger(this._console, "ORIGINAL ERROR", originalError);
55205
        }
55206
        if (context) {
55207
            errorLogger(this._console, 'ERROR CONTEXT', context);
55208
        }
55209
    };
55210
    /** @internal */
55211
    /** @internal */
55212
    ErrorHandler.prototype._findContext = /** @internal */
55213
    function (error) {
55214
        if (error) {
55215
            return getDebugContext(error) ? getDebugContext(error) :
55216
                this._findContext(getOriginalError(error));
55217
        }
55218
        return null;
55219
    };
55220
    /** @internal */
55221
    /** @internal */
55222
    ErrorHandler.prototype._findOriginalError = /** @internal */
55223
    function (error) {
55224
        var e = getOriginalError(error);
55225
        while (e && getOriginalError(e)) {
55226
            e = getOriginalError(e);
55227
        }
55228
        return e;
55229
    };
55230
    return ErrorHandler;
55231
}());
55232
function wrappedError(message, originalError) {
55233
    var msg = message + " caused by: " + (originalError instanceof Error ? originalError.message : originalError);
55234
    var error = Error(msg);
55235
    error[ERROR_ORIGINAL_ERROR] = originalError;
55236
    return error;
55237
}
55238
 
55239
/**
55240
 * @license
55241
 * Copyright Google Inc. All Rights Reserved.
55242
 *
55243
 * Use of this source code is governed by an MIT-style license that can be
55244
 * found in the LICENSE file at https://angular.io/license
55245
 */
55246
function findFirstClosedCycle(keys) {
55247
    var res = [];
55248
    for (var i = 0; i < keys.length; ++i) {
55249
        if (res.indexOf(keys[i]) > -1) {
55250
            res.push(keys[i]);
55251
            return res;
55252
        }
55253
        res.push(keys[i]);
55254
    }
55255
    return res;
55256
}
55257
function constructResolvingPath(keys) {
55258
    if (keys.length > 1) {
55259
        var reversed = findFirstClosedCycle(keys.slice().reverse());
55260
        var tokenStrs = reversed.map(function (k) { return stringify(k.token); });
55261
        return ' (' + tokenStrs.join(' -> ') + ')';
55262
    }
55263
    return '';
55264
}
55265
function injectionError(injector, key, constructResolvingMessage, originalError) {
55266
    var keys = [key];
55267
    var errMsg = constructResolvingMessage(keys);
55268
    var error = (originalError ? wrappedError(errMsg, originalError) : Error(errMsg));
55269
    error.addKey = addKey;
55270
    error.keys = keys;
55271
    error.injectors = [injector];
55272
    error.constructResolvingMessage = constructResolvingMessage;
55273
    error[ERROR_ORIGINAL_ERROR] = originalError;
55274
    return error;
55275
}
55276
function addKey(injector, key) {
55277
    this.injectors.push(injector);
55278
    this.keys.push(key);
55279
    // Note: This updated message won't be reflected in the `.stack` property
55280
    this.message = this.constructResolvingMessage(this.keys);
55281
}
55282
/**
55283
 * Thrown when trying to retrieve a dependency by key from {@link Injector}, but the
55284
 * {@link Injector} does not have a {@link Provider} for the given key.
55285
 *
55286
 * ### Example ([live demo](http://plnkr.co/edit/vq8D3FRB9aGbnWJqtEPE?p=preview))
55287
 *
55288
 * ```typescript
55289
 * class A {
55290
 *   constructor(b:B) {}
55291
 * }
55292
 *
55293
 * expect(() => Injector.resolveAndCreate([A])).toThrowError();
55294
 * ```
55295
 */
55296
function noProviderError(injector, key) {
55297
    return injectionError(injector, key, function (keys) {
55298
        var first = stringify(keys[0].token);
55299
        return "No provider for " + first + "!" + constructResolvingPath(keys);
55300
    });
55301
}
55302
/**
55303
 * Thrown when dependencies form a cycle.
55304
 *
55305
 * ### Example ([live demo](http://plnkr.co/edit/wYQdNos0Tzql3ei1EV9j?p=info))
55306
 *
55307
 * ```typescript
55308
 * var injector = Injector.resolveAndCreate([
55309
 *   {provide: "one", useFactory: (two) => "two", deps: [[new Inject("two")]]},
55310
 *   {provide: "two", useFactory: (one) => "one", deps: [[new Inject("one")]]}
55311
 * ]);
55312
 *
55313
 * expect(() => injector.get("one")).toThrowError();
55314
 * ```
55315
 *
55316
 * Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed.
55317
 */
55318
function cyclicDependencyError(injector, key) {
55319
    return injectionError(injector, key, function (keys) {
55320
        return "Cannot instantiate cyclic dependency!" + constructResolvingPath(keys);
55321
    });
55322
}
55323
/**
55324
 * Thrown when a constructing type returns with an Error.
55325
 *
55326
 * The `InstantiationError` class contains the original error plus the dependency graph which caused
55327
 * this object to be instantiated.
55328
 *
55329
 * ### Example ([live demo](http://plnkr.co/edit/7aWYdcqTQsP0eNqEdUAf?p=preview))
55330
 *
55331
 * ```typescript
55332
 * class A {
55333
 *   constructor() {
55334
 *     throw new Error('message');
55335
 *   }
55336
 * }
55337
 *
55338
 * var injector = Injector.resolveAndCreate([A]);
55339
 
55340
 * try {
55341
 *   injector.get(A);
55342
 * } catch (e) {
55343
 *   expect(e instanceof InstantiationError).toBe(true);
55344
 *   expect(e.originalException.message).toEqual("message");
55345
 *   expect(e.originalStack).toBeDefined();
55346
 * }
55347
 * ```
55348
 */
55349
function instantiationError(injector, originalException, originalStack, key) {
55350
    return injectionError(injector, key, function (keys) {
55351
        var first = stringify(keys[0].token);
55352
        return originalException.message + ": Error during instantiation of " + first + "!" + constructResolvingPath(keys) + ".";
55353
    }, originalException);
55354
}
55355
/**
55356
 * Thrown when an object other then {@link Provider} (or `Type`) is passed to {@link Injector}
55357
 * creation.
55358
 *
55359
 * ### Example ([live demo](http://plnkr.co/edit/YatCFbPAMCL0JSSQ4mvH?p=preview))
55360
 *
55361
 * ```typescript
55362
 * expect(() => Injector.resolveAndCreate(["not a type"])).toThrowError();
55363
 * ```
55364
 */
55365
function invalidProviderError(provider) {
55366
    return Error("Invalid provider - only instances of Provider and Type are allowed, got: " + provider);
55367
}
55368
/**
55369
 * Thrown when the class has no annotation information.
55370
 *
55371
 * Lack of annotation information prevents the {@link Injector} from determining which dependencies
55372
 * need to be injected into the constructor.
55373
 *
55374
 * ### Example ([live demo](http://plnkr.co/edit/rHnZtlNS7vJOPQ6pcVkm?p=preview))
55375
 *
55376
 * ```typescript
55377
 * class A {
55378
 *   constructor(b) {}
55379
 * }
55380
 *
55381
 * expect(() => Injector.resolveAndCreate([A])).toThrowError();
55382
 * ```
55383
 *
55384
 * This error is also thrown when the class not marked with {@link Injectable} has parameter types.
55385
 *
55386
 * ```typescript
55387
 * class B {}
55388
 *
55389
 * class A {
55390
 *   constructor(b:B) {} // no information about the parameter types of A is available at runtime.
55391
 * }
55392
 *
55393
 * expect(() => Injector.resolveAndCreate([A,B])).toThrowError();
55394
 * ```
55395
 *
55396
 */
55397
function noAnnotationError(typeOrFunc, params) {
55398
    var signature = [];
55399
    for (var i = 0, ii = params.length; i < ii; i++) {
55400
        var parameter = params[i];
55401
        if (!parameter || parameter.length == 0) {
55402
            signature.push('?');
55403
        }
55404
        else {
55405
            signature.push(parameter.map(stringify).join(' '));
55406
        }
55407
    }
55408
    return Error('Cannot resolve all parameters for \'' + stringify(typeOrFunc) + '\'(' +
55409
        signature.join(', ') + '). ' +
55410
        'Make sure that all the parameters are decorated with Inject or have valid type annotations and that \'' +
55411
        stringify(typeOrFunc) + '\' is decorated with Injectable.');
55412
}
55413
/**
55414
 * Thrown when getting an object by index.
55415
 *
55416
 * ### Example ([live demo](http://plnkr.co/edit/bRs0SX2OTQiJzqvjgl8P?p=preview))
55417
 *
55418
 * ```typescript
55419
 * class A {}
55420
 *
55421
 * var injector = Injector.resolveAndCreate([A]);
55422
 *
55423
 * expect(() => injector.getAt(100)).toThrowError();
55424
 * ```
55425
 *
55426
 */
55427
function outOfBoundsError(index) {
55428
    return Error("Index " + index + " is out-of-bounds.");
55429
}
55430
// TODO: add a working example after alpha38 is released
55431
/**
55432
 * Thrown when a multi provider and a regular provider are bound to the same token.
55433
 *
55434
 * ### Example
55435
 *
55436
 * ```typescript
55437
 * expect(() => Injector.resolveAndCreate([
55438
 *   { provide: "Strings", useValue: "string1", multi: true},
55439
 *   { provide: "Strings", useValue: "string2", multi: false}
55440
 * ])).toThrowError();
55441
 * ```
55442
 */
55443
function mixingMultiProvidersWithRegularProvidersError(provider1, provider2) {
55444
    return Error("Cannot mix multi providers and regular providers, got: " + provider1 + " " + provider2);
55445
}
55446
 
55447
/**
55448
 * @license
55449
 * Copyright Google Inc. All Rights Reserved.
55450
 *
55451
 * Use of this source code is governed by an MIT-style license that can be
55452
 * found in the LICENSE file at https://angular.io/license
55453
 */
55454
/**
55455
 * A unique object used for retrieving items from the {@link ReflectiveInjector}.
55456
 *
55457
 * Keys have:
55458
 * - a system-wide unique `id`.
55459
 * - a `token`.
55460
 *
55461
 * `Key` is used internally by {@link ReflectiveInjector} because its system-wide unique `id` allows
55462
 * the
55463
 * injector to store created objects in a more efficient way.
55464
 *
55465
 * `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when
55466
 * resolving
55467
 * providers.
55468
 * @deprecated No replacement
55469
 */
55470
var ReflectiveKey = /** @class */ (function () {
55471
    /**
55472
     * Private
55473
     */
55474
    function ReflectiveKey(token, id) {
55475
        this.token = token;
55476
        this.id = id;
55477
        if (!token) {
55478
            throw new Error('Token must be defined!');
55479
        }
55480
        this.displayName = stringify(this.token);
55481
    }
55482
    /**
55483
     * Retrieves a `Key` for a token.
55484
     */
55485
    /**
55486
       * Retrieves a `Key` for a token.
55487
       */
55488
    ReflectiveKey.get = /**
55489
       * Retrieves a `Key` for a token.
55490
       */
55491
    function (token) {
55492
        return _globalKeyRegistry.get(resolveForwardRef(token));
55493
    };
55494
    Object.defineProperty(ReflectiveKey, "numberOfKeys", {
55495
        /**
55496
         * @returns the number of keys registered in the system.
55497
         */
55498
        get: /**
55499
           * @returns the number of keys registered in the system.
55500
           */
55501
        function () { return _globalKeyRegistry.numberOfKeys; },
55502
        enumerable: true,
55503
        configurable: true
55504
    });
55505
    return ReflectiveKey;
55506
}());
55507
var KeyRegistry = /** @class */ (function () {
55508
    function KeyRegistry() {
55509
        this._allKeys = new Map();
55510
    }
55511
    KeyRegistry.prototype.get = function (token) {
55512
        if (token instanceof ReflectiveKey)
55513
            return token;
55514
        if (this._allKeys.has(token)) {
55515
            return this._allKeys.get(token);
55516
        }
55517
        var newKey = new ReflectiveKey(token, ReflectiveKey.numberOfKeys);
55518
        this._allKeys.set(token, newKey);
55519
        return newKey;
55520
    };
55521
    Object.defineProperty(KeyRegistry.prototype, "numberOfKeys", {
55522
        get: function () { return this._allKeys.size; },
55523
        enumerable: true,
55524
        configurable: true
55525
    });
55526
    return KeyRegistry;
55527
}());
55528
var _globalKeyRegistry = new KeyRegistry();
55529
 
55530
/**
55531
 * @license
55532
 * Copyright Google Inc. All Rights Reserved.
55533
 *
55534
 * Use of this source code is governed by an MIT-style license that can be
55535
 * found in the LICENSE file at https://angular.io/license
55536
 */
55537
/**
55538
 * Provides access to reflection data about symbols. Used internally by Angular
55539
 * to power dependency injection and compilation.
55540
 */
55541
var Reflector = /** @class */ (function () {
55542
    function Reflector(reflectionCapabilities) {
55543
        this.reflectionCapabilities = reflectionCapabilities;
55544
    }
55545
    Reflector.prototype.updateCapabilities = function (caps) { this.reflectionCapabilities = caps; };
55546
    Reflector.prototype.factory = function (type) { return this.reflectionCapabilities.factory(type); };
55547
    Reflector.prototype.parameters = function (typeOrFunc) {
55548
        return this.reflectionCapabilities.parameters(typeOrFunc);
55549
    };
55550
    Reflector.prototype.annotations = function (typeOrFunc) {
55551
        return this.reflectionCapabilities.annotations(typeOrFunc);
55552
    };
55553
    Reflector.prototype.propMetadata = function (typeOrFunc) {
55554
        return this.reflectionCapabilities.propMetadata(typeOrFunc);
55555
    };
55556
    Reflector.prototype.hasLifecycleHook = function (type, lcProperty) {
55557
        return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);
55558
    };
55559
    Reflector.prototype.getter = function (name) { return this.reflectionCapabilities.getter(name); };
55560
    Reflector.prototype.setter = function (name) { return this.reflectionCapabilities.setter(name); };
55561
    Reflector.prototype.method = function (name) { return this.reflectionCapabilities.method(name); };
55562
    Reflector.prototype.importUri = function (type) { return this.reflectionCapabilities.importUri(type); };
55563
    Reflector.prototype.resourceUri = function (type) { return this.reflectionCapabilities.resourceUri(type); };
55564
    Reflector.prototype.resolveIdentifier = function (name, moduleUrl, members, runtime) {
55565
        return this.reflectionCapabilities.resolveIdentifier(name, moduleUrl, members, runtime);
55566
    };
55567
    Reflector.prototype.resolveEnum = function (identifier, name) {
55568
        return this.reflectionCapabilities.resolveEnum(identifier, name);
55569
    };
55570
    return Reflector;
55571
}());
55572
 
55573
/**
55574
 * @license
55575
 * Copyright Google Inc. All Rights Reserved.
55576
 *
55577
 * Use of this source code is governed by an MIT-style license that can be
55578
 * found in the LICENSE file at https://angular.io/license
55579
 */
55580
/**
55581
 * The {@link Reflector} used internally in Angular to access metadata
55582
 * about symbols.
55583
 */
55584
var reflector = new Reflector(new ReflectionCapabilities());
55585
 
55586
/**
55587
 * @license
55588
 * Copyright Google Inc. All Rights Reserved.
55589
 *
55590
 * Use of this source code is governed by an MIT-style license that can be
55591
 * found in the LICENSE file at https://angular.io/license
55592
 */
55593
/**
55594
 * `Dependency` is used by the framework to extend DI.
55595
 * This is internal to Angular and should not be used directly.
55596
 */
55597
var ReflectiveDependency = /** @class */ (function () {
55598
    function ReflectiveDependency(key, optional, visibility) {
55599
        this.key = key;
55600
        this.optional = optional;
55601
        this.visibility = visibility;
55602
    }
55603
    ReflectiveDependency.fromKey = function (key) {
55604
        return new ReflectiveDependency(key, false, null);
55605
    };
55606
    return ReflectiveDependency;
55607
}());
55608
var _EMPTY_LIST = [];
55609
var ResolvedReflectiveProvider_ = /** @class */ (function () {
55610
    function ResolvedReflectiveProvider_(key, resolvedFactories, multiProvider) {
55611
        this.key = key;
55612
        this.resolvedFactories = resolvedFactories;
55613
        this.multiProvider = multiProvider;
55614
        this.resolvedFactory = this.resolvedFactories[0];
55615
    }
55616
    return ResolvedReflectiveProvider_;
55617
}());
55618
/**
55619
 * An internal resolved representation of a factory function created by resolving {@link
55620
 * Provider}.
55621
 * @experimental
55622
 */
55623
var ResolvedReflectiveFactory = /** @class */ (function () {
55624
    function ResolvedReflectiveFactory(/**
55625
           * Factory function which can return an instance of an object represented by a key.
55626
           */
55627
    factory, /**
55628
           * Arguments (dependencies) to the `factory` function.
55629
           */
55630
    dependencies) {
55631
        this.factory = factory;
55632
        this.dependencies = dependencies;
55633
    }
55634
    return ResolvedReflectiveFactory;
55635
}());
55636
/**
55637
 * Resolve a single provider.
55638
 */
55639
function resolveReflectiveFactory(provider) {
55640
    var factoryFn;
55641
    var resolvedDeps;
55642
    if (provider.useClass) {
55643
        var useClass = resolveForwardRef(provider.useClass);
55644
        factoryFn = reflector.factory(useClass);
55645
        resolvedDeps = _dependenciesFor(useClass);
55646
    }
55647
    else if (provider.useExisting) {
55648
        factoryFn = function (aliasInstance) { return aliasInstance; };
55649
        resolvedDeps = [ReflectiveDependency.fromKey(ReflectiveKey.get(provider.useExisting))];
55650
    }
55651
    else if (provider.useFactory) {
55652
        factoryFn = provider.useFactory;
55653
        resolvedDeps = constructDependencies(provider.useFactory, provider.deps);
55654
    }
55655
    else {
55656
        factoryFn = function () { return provider.useValue; };
55657
        resolvedDeps = _EMPTY_LIST;
55658
    }
55659
    return new ResolvedReflectiveFactory(factoryFn, resolvedDeps);
55660
}
55661
/**
55662
 * Converts the {@link Provider} into {@link ResolvedProvider}.
55663
 *
55664
 * {@link Injector} internally only uses {@link ResolvedProvider}, {@link Provider} contains
55665
 * convenience provider syntax.
55666
 */
55667
function resolveReflectiveProvider(provider) {
55668
    return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);
55669
}
55670
/**
55671
 * Resolve a list of Providers.
55672
 */
55673
function resolveReflectiveProviders(providers) {
55674
    var normalized = _normalizeProviders(providers, []);
55675
    var resolved = normalized.map(resolveReflectiveProvider);
55676
    var resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map());
55677
    return Array.from(resolvedProviderMap.values());
55678
}
55679
/**
55680
 * Merges a list of ResolvedProviders into a list where
55681
 * each key is contained exactly once and multi providers
55682
 * have been merged.
55683
 */
55684
function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {
55685
    for (var i = 0; i < providers.length; i++) {
55686
        var provider = providers[i];
55687
        var existing = normalizedProvidersMap.get(provider.key.id);
55688
        if (existing) {
55689
            if (provider.multiProvider !== existing.multiProvider) {
55690
                throw mixingMultiProvidersWithRegularProvidersError(existing, provider);
55691
            }
55692
            if (provider.multiProvider) {
55693
                for (var j = 0; j < provider.resolvedFactories.length; j++) {
55694
                    existing.resolvedFactories.push(provider.resolvedFactories[j]);
55695
                }
55696
            }
55697
            else {
55698
                normalizedProvidersMap.set(provider.key.id, provider);
55699
            }
55700
        }
55701
        else {
55702
            var resolvedProvider = void 0;
55703
            if (provider.multiProvider) {
55704
                resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);
55705
            }
55706
            else {
55707
                resolvedProvider = provider;
55708
            }
55709
            normalizedProvidersMap.set(provider.key.id, resolvedProvider);
55710
        }
55711
    }
55712
    return normalizedProvidersMap;
55713
}
55714
function _normalizeProviders(providers, res) {
55715
    providers.forEach(function (b) {
55716
        if (b instanceof Type) {
55717
            res.push({ provide: b, useClass: b });
55718
        }
55719
        else if (b && typeof b == 'object' && b.provide !== undefined) {
55720
            res.push(b);
55721
        }
55722
        else if (b instanceof Array) {
55723
            _normalizeProviders(b, res);
55724
        }
55725
        else {
55726
            throw invalidProviderError(b);
55727
        }
55728
    });
55729
    return res;
55730
}
55731
function constructDependencies(typeOrFunc, dependencies) {
55732
    if (!dependencies) {
55733
        return _dependenciesFor(typeOrFunc);
55734
    }
55735
    else {
55736
        var params_1 = dependencies.map(function (t) { return [t]; });
55737
        return dependencies.map(function (t) { return _extractToken(typeOrFunc, t, params_1); });
55738
    }
55739
}
55740
function _dependenciesFor(typeOrFunc) {
55741
    var params = reflector.parameters(typeOrFunc);
55742
    if (!params)
55743
        return [];
55744
    if (params.some(function (p) { return p == null; })) {
55745
        throw noAnnotationError(typeOrFunc, params);
55746
    }
55747
    return params.map(function (p) { return _extractToken(typeOrFunc, p, params); });
55748
}
55749
function _extractToken(typeOrFunc, metadata, params) {
55750
    var token = null;
55751
    var optional = false;
55752
    if (!Array.isArray(metadata)) {
55753
        if (metadata instanceof Inject) {
55754
            return _createDependency(metadata.token, optional, null);
55755
        }
55756
        else {
55757
            return _createDependency(metadata, optional, null);
55758
        }
55759
    }
55760
    var visibility = null;
55761
    for (var i = 0; i < metadata.length; ++i) {
55762
        var paramMetadata = metadata[i];
55763
        if (paramMetadata instanceof Type) {
55764
            token = paramMetadata;
55765
        }
55766
        else if (paramMetadata instanceof Inject) {
55767
            token = paramMetadata.token;
55768
        }
55769
        else if (paramMetadata instanceof Optional) {
55770
            optional = true;
55771
        }
55772
        else if (paramMetadata instanceof Self || paramMetadata instanceof SkipSelf) {
55773
            visibility = paramMetadata;
55774
        }
55775
        else if (paramMetadata instanceof InjectionToken) {
55776
            token = paramMetadata;
55777
        }
55778
    }
55779
    token = resolveForwardRef(token);
55780
    if (token != null) {
55781
        return _createDependency(token, optional, visibility);
55782
    }
55783
    else {
55784
        throw noAnnotationError(typeOrFunc, params);
55785
    }
55786
}
55787
function _createDependency(token, optional, visibility) {
55788
    return new ReflectiveDependency(ReflectiveKey.get(token), optional, visibility);
55789
}
55790
 
55791
/**
55792
 * @license
55793
 * Copyright Google Inc. All Rights Reserved.
55794
 *
55795
 * Use of this source code is governed by an MIT-style license that can be
55796
 * found in the LICENSE file at https://angular.io/license
55797
 */
55798
// Threshold for the dynamic version
55799
var UNDEFINED = new Object();
55800
/**
55801
 * A ReflectiveDependency injection container used for instantiating objects and resolving
55802
 * dependencies.
55803
 *
55804
 * An `Injector` is a replacement for a `new` operator, which can automatically resolve the
55805
 * constructor dependencies.
55806
 *
55807
 * In typical use, application code asks for the dependencies in the constructor and they are
55808
 * resolved by the `Injector`.
55809
 *
55810
 * ### Example ([live demo](http://plnkr.co/edit/jzjec0?p=preview))
55811
 *
55812
 * The following example creates an `Injector` configured to create `Engine` and `Car`.
55813
 *
55814
 * ```typescript
55815
 * @Injectable()
55816
 * class Engine {
55817
 * }
55818
 *
55819
 * @Injectable()
55820
 * class Car {
55821
 *   constructor(public engine:Engine) {}
55822
 * }
55823
 *
55824
 * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
55825
 * var car = injector.get(Car);
55826
 * expect(car instanceof Car).toBe(true);
55827
 * expect(car.engine instanceof Engine).toBe(true);
55828
 * ```
55829
 *
55830
 * Notice, we don't use the `new` operator because we explicitly want to have the `Injector`
55831
 * resolve all of the object's dependencies automatically.
55832
 *
55833
 * @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead.
55834
 */
55835
var ReflectiveInjector = /** @class */ (function () {
55836
    function ReflectiveInjector() {
55837
    }
55838
    /**
55839
     * Turns an array of provider definitions into an array of resolved providers.
55840
     *
55841
     * A resolution is a process of flattening multiple nested arrays and converting individual
55842
     * providers into an array of {@link ResolvedReflectiveProvider}s.
55843
     *
55844
     * ### Example ([live demo](http://plnkr.co/edit/AiXTHi?p=preview))
55845
     *
55846
     * ```typescript
55847
     * @Injectable()
55848
     * class Engine {
55849
     * }
55850
     *
55851
     * @Injectable()
55852
     * class Car {
55853
     *   constructor(public engine:Engine) {}
55854
     * }
55855
     *
55856
     * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);
55857
     *
55858
     * expect(providers.length).toEqual(2);
55859
     *
55860
     * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);
55861
     * expect(providers[0].key.displayName).toBe("Car");
55862
     * expect(providers[0].dependencies.length).toEqual(1);
55863
     * expect(providers[0].factory).toBeDefined();
55864
     *
55865
     * expect(providers[1].key.displayName).toBe("Engine");
55866
     * });
55867
     * ```
55868
     *
55869
     * See {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders} for more info.
55870
     */
55871
    /**
55872
       * Turns an array of provider definitions into an array of resolved providers.
55873
       *
55874
       * A resolution is a process of flattening multiple nested arrays and converting individual
55875
       * providers into an array of {@link ResolvedReflectiveProvider}s.
55876
       *
55877
       * ### Example ([live demo](http://plnkr.co/edit/AiXTHi?p=preview))
55878
       *
55879
       * ```typescript
55880
       * @Injectable()
55881
       * class Engine {
55882
       * }
55883
       *
55884
       * @Injectable()
55885
       * class Car {
55886
       *   constructor(public engine:Engine) {}
55887
       * }
55888
       *
55889
       * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);
55890
       *
55891
       * expect(providers.length).toEqual(2);
55892
       *
55893
       * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);
55894
       * expect(providers[0].key.displayName).toBe("Car");
55895
       * expect(providers[0].dependencies.length).toEqual(1);
55896
       * expect(providers[0].factory).toBeDefined();
55897
       *
55898
       * expect(providers[1].key.displayName).toBe("Engine");
55899
       * });
55900
       * ```
55901
       *
55902
       * See {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders} for more info.
55903
       */
55904
    ReflectiveInjector.resolve = /**
55905
       * Turns an array of provider definitions into an array of resolved providers.
55906
       *
55907
       * A resolution is a process of flattening multiple nested arrays and converting individual
55908
       * providers into an array of {@link ResolvedReflectiveProvider}s.
55909
       *
55910
       * ### Example ([live demo](http://plnkr.co/edit/AiXTHi?p=preview))
55911
       *
55912
       * ```typescript
55913
       * @Injectable()
55914
       * class Engine {
55915
       * }
55916
       *
55917
       * @Injectable()
55918
       * class Car {
55919
       *   constructor(public engine:Engine) {}
55920
       * }
55921
       *
55922
       * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);
55923
       *
55924
       * expect(providers.length).toEqual(2);
55925
       *
55926
       * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);
55927
       * expect(providers[0].key.displayName).toBe("Car");
55928
       * expect(providers[0].dependencies.length).toEqual(1);
55929
       * expect(providers[0].factory).toBeDefined();
55930
       *
55931
       * expect(providers[1].key.displayName).toBe("Engine");
55932
       * });
55933
       * ```
55934
       *
55935
       * See {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders} for more info.
55936
       */
55937
    function (providers) {
55938
        return resolveReflectiveProviders(providers);
55939
    };
55940
    /**
55941
     * Resolves an array of providers and creates an injector from those providers.
55942
     *
55943
     * The passed-in providers can be an array of `Type`, {@link Provider},
55944
     * or a recursive array of more providers.
55945
     *
55946
     * ### Example ([live demo](http://plnkr.co/edit/ePOccA?p=preview))
55947
     *
55948
     * ```typescript
55949
     * @Injectable()
55950
     * class Engine {
55951
     * }
55952
     *
55953
     * @Injectable()
55954
     * class Car {
55955
     *   constructor(public engine:Engine) {}
55956
     * }
55957
     *
55958
     * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
55959
     * expect(injector.get(Car) instanceof Car).toBe(true);
55960
     * ```
55961
     *
55962
     * This function is slower than the corresponding `fromResolvedProviders`
55963
     * because it needs to resolve the passed-in providers first.
55964
     * See {@link ReflectiveInjector#resolve resolve} and
55965
     * {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders}.
55966
     */
55967
    /**
55968
       * Resolves an array of providers and creates an injector from those providers.
55969
       *
55970
       * The passed-in providers can be an array of `Type`, {@link Provider},
55971
       * or a recursive array of more providers.
55972
       *
55973
       * ### Example ([live demo](http://plnkr.co/edit/ePOccA?p=preview))
55974
       *
55975
       * ```typescript
55976
       * @Injectable()
55977
       * class Engine {
55978
       * }
55979
       *
55980
       * @Injectable()
55981
       * class Car {
55982
       *   constructor(public engine:Engine) {}
55983
       * }
55984
       *
55985
       * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
55986
       * expect(injector.get(Car) instanceof Car).toBe(true);
55987
       * ```
55988
       *
55989
       * This function is slower than the corresponding `fromResolvedProviders`
55990
       * because it needs to resolve the passed-in providers first.
55991
       * See {@link ReflectiveInjector#resolve resolve} and
55992
       * {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders}.
55993
       */
55994
    ReflectiveInjector.resolveAndCreate = /**
55995
       * Resolves an array of providers and creates an injector from those providers.
55996
       *
55997
       * The passed-in providers can be an array of `Type`, {@link Provider},
55998
       * or a recursive array of more providers.
55999
       *
56000
       * ### Example ([live demo](http://plnkr.co/edit/ePOccA?p=preview))
56001
       *
56002
       * ```typescript
56003
       * @Injectable()
56004
       * class Engine {
56005
       * }
56006
       *
56007
       * @Injectable()
56008
       * class Car {
56009
       *   constructor(public engine:Engine) {}
56010
       * }
56011
       *
56012
       * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
56013
       * expect(injector.get(Car) instanceof Car).toBe(true);
56014
       * ```
56015
       *
56016
       * This function is slower than the corresponding `fromResolvedProviders`
56017
       * because it needs to resolve the passed-in providers first.
56018
       * See {@link ReflectiveInjector#resolve resolve} and
56019
       * {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders}.
56020
       */
56021
    function (providers, parent) {
56022
        var ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);
56023
        return ReflectiveInjector.fromResolvedProviders(ResolvedReflectiveProviders, parent);
56024
    };
56025
    /**
56026
     * Creates an injector from previously resolved providers.
56027
     *
56028
     * This API is the recommended way to construct injectors in performance-sensitive parts.
56029
     *
56030
     * ### Example ([live demo](http://plnkr.co/edit/KrSMci?p=preview))
56031
     *
56032
     * ```typescript
56033
     * @Injectable()
56034
     * class Engine {
56035
     * }
56036
     *
56037
     * @Injectable()
56038
     * class Car {
56039
     *   constructor(public engine:Engine) {}
56040
     * }
56041
     *
56042
     * var providers = ReflectiveInjector.resolve([Car, Engine]);
56043
     * var injector = ReflectiveInjector.fromResolvedProviders(providers);
56044
     * expect(injector.get(Car) instanceof Car).toBe(true);
56045
     * ```
56046
     * @experimental
56047
     */
56048
    /**
56049
       * Creates an injector from previously resolved providers.
56050
       *
56051
       * This API is the recommended way to construct injectors in performance-sensitive parts.
56052
       *
56053
       * ### Example ([live demo](http://plnkr.co/edit/KrSMci?p=preview))
56054
       *
56055
       * ```typescript
56056
       * @Injectable()
56057
       * class Engine {
56058
       * }
56059
       *
56060
       * @Injectable()
56061
       * class Car {
56062
       *   constructor(public engine:Engine) {}
56063
       * }
56064
       *
56065
       * var providers = ReflectiveInjector.resolve([Car, Engine]);
56066
       * var injector = ReflectiveInjector.fromResolvedProviders(providers);
56067
       * expect(injector.get(Car) instanceof Car).toBe(true);
56068
       * ```
56069
       * @experimental
56070
       */
56071
    ReflectiveInjector.fromResolvedProviders = /**
56072
       * Creates an injector from previously resolved providers.
56073
       *
56074
       * This API is the recommended way to construct injectors in performance-sensitive parts.
56075
       *
56076
       * ### Example ([live demo](http://plnkr.co/edit/KrSMci?p=preview))
56077
       *
56078
       * ```typescript
56079
       * @Injectable()
56080
       * class Engine {
56081
       * }
56082
       *
56083
       * @Injectable()
56084
       * class Car {
56085
       *   constructor(public engine:Engine) {}
56086
       * }
56087
       *
56088
       * var providers = ReflectiveInjector.resolve([Car, Engine]);
56089
       * var injector = ReflectiveInjector.fromResolvedProviders(providers);
56090
       * expect(injector.get(Car) instanceof Car).toBe(true);
56091
       * ```
56092
       * @experimental
56093
       */
56094
    function (providers, parent) {
56095
        return new ReflectiveInjector_(providers, parent);
56096
    };
56097
    return ReflectiveInjector;
56098
}());
56099
var ReflectiveInjector_ = /** @class */ (function () {
56100
    /**
56101
     * Private
56102
     */
56103
    function ReflectiveInjector_(_providers, _parent) {
56104
        /** @internal */
56105
        this._constructionCounter = 0;
56106
        this._providers = _providers;
56107
        this.parent = _parent || null;
56108
        var len = _providers.length;
56109
        this.keyIds = new Array(len);
56110
        this.objs = new Array(len);
56111
        for (var i = 0; i < len; i++) {
56112
            this.keyIds[i] = _providers[i].key.id;
56113
            this.objs[i] = UNDEFINED;
56114
        }
56115
    }
56116
    ReflectiveInjector_.prototype.get = function (token, notFoundValue) {
56117
        if (notFoundValue === void 0) { notFoundValue = THROW_IF_NOT_FOUND; }
56118
        return this._getByKey(ReflectiveKey.get(token), null, notFoundValue);
56119
    };
56120
    ReflectiveInjector_.prototype.resolveAndCreateChild = function (providers) {
56121
        var ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);
56122
        return this.createChildFromResolved(ResolvedReflectiveProviders);
56123
    };
56124
    ReflectiveInjector_.prototype.createChildFromResolved = function (providers) {
56125
        var inj = new ReflectiveInjector_(providers);
56126
        inj.parent = this;
56127
        return inj;
56128
    };
56129
    ReflectiveInjector_.prototype.resolveAndInstantiate = function (provider) {
56130
        return this.instantiateResolved(ReflectiveInjector.resolve([provider])[0]);
56131
    };
56132
    ReflectiveInjector_.prototype.instantiateResolved = function (provider) {
56133
        return this._instantiateProvider(provider);
56134
    };
56135
    ReflectiveInjector_.prototype.getProviderAtIndex = function (index) {
56136
        if (index < 0 || index >= this._providers.length) {
56137
            throw outOfBoundsError(index);
56138
        }
56139
        return this._providers[index];
56140
    };
56141
    /** @internal */
56142
    /** @internal */
56143
    ReflectiveInjector_.prototype._new = /** @internal */
56144
    function (provider) {
56145
        if (this._constructionCounter++ > this._getMaxNumberOfObjects()) {
56146
            throw cyclicDependencyError(this, provider.key);
56147
        }
56148
        return this._instantiateProvider(provider);
56149
    };
56150
    ReflectiveInjector_.prototype._getMaxNumberOfObjects = function () { return this.objs.length; };
56151
    ReflectiveInjector_.prototype._instantiateProvider = function (provider) {
56152
        if (provider.multiProvider) {
56153
            var res = new Array(provider.resolvedFactories.length);
56154
            for (var i = 0; i < provider.resolvedFactories.length; ++i) {
56155
                res[i] = this._instantiate(provider, provider.resolvedFactories[i]);
56156
            }
56157
            return res;
56158
        }
56159
        else {
56160
            return this._instantiate(provider, provider.resolvedFactories[0]);
56161
        }
56162
    };
56163
    ReflectiveInjector_.prototype._instantiate = function (provider, ResolvedReflectiveFactory$$1) {
56164
        var _this = this;
56165
        var factory = ResolvedReflectiveFactory$$1.factory;
56166
        var deps;
56167
        try {
56168
            deps =
56169
                ResolvedReflectiveFactory$$1.dependencies.map(function (dep) { return _this._getByReflectiveDependency(dep); });
56170
        }
56171
        catch (e) {
56172
            if (e.addKey) {
56173
                e.addKey(this, provider.key);
56174
            }
56175
            throw e;
56176
        }
56177
        var obj;
56178
        try {
56179
            obj = factory.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(deps));
56180
        }
56181
        catch (e) {
56182
            throw instantiationError(this, e, e.stack, provider.key);
56183
        }
56184
        return obj;
56185
    };
56186
    ReflectiveInjector_.prototype._getByReflectiveDependency = function (dep) {
56187
        return this._getByKey(dep.key, dep.visibility, dep.optional ? null : THROW_IF_NOT_FOUND);
56188
    };
56189
    ReflectiveInjector_.prototype._getByKey = function (key, visibility, notFoundValue) {
56190
        if (key === ReflectiveInjector_.INJECTOR_KEY) {
56191
            return this;
56192
        }
56193
        if (visibility instanceof Self) {
56194
            return this._getByKeySelf(key, notFoundValue);
56195
        }
56196
        else {
56197
            return this._getByKeyDefault(key, notFoundValue, visibility);
56198
        }
56199
    };
56200
    ReflectiveInjector_.prototype._getObjByKeyId = function (keyId) {
56201
        for (var i = 0; i < this.keyIds.length; i++) {
56202
            if (this.keyIds[i] === keyId) {
56203
                if (this.objs[i] === UNDEFINED) {
56204
                    this.objs[i] = this._new(this._providers[i]);
56205
                }
56206
                return this.objs[i];
56207
            }
56208
        }
56209
        return UNDEFINED;
56210
    };
56211
    /** @internal */
56212
    /** @internal */
56213
    ReflectiveInjector_.prototype._throwOrNull = /** @internal */
56214
    function (key, notFoundValue) {
56215
        if (notFoundValue !== THROW_IF_NOT_FOUND) {
56216
            return notFoundValue;
56217
        }
56218
        else {
56219
            throw noProviderError(this, key);
56220
        }
56221
    };
56222
    /** @internal */
56223
    /** @internal */
56224
    ReflectiveInjector_.prototype._getByKeySelf = /** @internal */
56225
    function (key, notFoundValue) {
56226
        var obj = this._getObjByKeyId(key.id);
56227
        return (obj !== UNDEFINED) ? obj : this._throwOrNull(key, notFoundValue);
56228
    };
56229
    /** @internal */
56230
    /** @internal */
56231
    ReflectiveInjector_.prototype._getByKeyDefault = /** @internal */
56232
    function (key, notFoundValue, visibility) {
56233
        var inj;
56234
        if (visibility instanceof SkipSelf) {
56235
            inj = this.parent;
56236
        }
56237
        else {
56238
            inj = this;
56239
        }
56240
        while (inj instanceof ReflectiveInjector_) {
56241
            var inj_ = inj;
56242
            var obj = inj_._getObjByKeyId(key.id);
56243
            if (obj !== UNDEFINED)
56244
                return obj;
56245
            inj = inj_.parent;
56246
        }
56247
        if (inj !== null) {
56248
            return inj.get(key.token, notFoundValue);
56249
        }
56250
        else {
56251
            return this._throwOrNull(key, notFoundValue);
56252
        }
56253
    };
56254
    Object.defineProperty(ReflectiveInjector_.prototype, "displayName", {
56255
        get: function () {
56256
            var providers = _mapProviders(this, function (b) { return ' "' + b.key.displayName + '" '; })
56257
                .join(', ');
56258
            return "ReflectiveInjector(providers: [" + providers + "])";
56259
        },
56260
        enumerable: true,
56261
        configurable: true
56262
    });
56263
    ReflectiveInjector_.prototype.toString = function () { return this.displayName; };
56264
    ReflectiveInjector_.INJECTOR_KEY = ReflectiveKey.get(Injector);
56265
    return ReflectiveInjector_;
56266
}());
56267
function _mapProviders(injector, fn) {
56268
    var res = new Array(injector._providers.length);
56269
    for (var i = 0; i < injector._providers.length; ++i) {
56270
        res[i] = fn(injector.getProviderAtIndex(i));
56271
    }
56272
    return res;
56273
}
56274
 
56275
/**
56276
 * @license
56277
 * Copyright Google Inc. All Rights Reserved.
56278
 *
56279
 * Use of this source code is governed by an MIT-style license that can be
56280
 * found in the LICENSE file at https://angular.io/license
56281
 */
56282
/**
56283
 * An internal token whose presence in an injector indicates that the injector should treat itself
56284
 * as a root scoped injector when processing requests for unknown tokens which may indicate
56285
 * they are provided in the root scope.
56286
 */
56287
var APP_ROOT = new InjectionToken('The presence of this token marks an injector as being the root injector.');
56288
 
56289
/**
56290
 * @license
56291
 * Copyright Google Inc. All Rights Reserved.
56292
 *
56293
 * Use of this source code is governed by an MIT-style license that can be
56294
 * found in the LICENSE file at https://angular.io/license
56295
 */
56296
/**
56297
 * Marker which indicates that a value has not yet been created from the factory function.
56298
 */
56299
var NOT_YET = {};
56300
/**
56301
 * Marker which indicates that the factory function for a token is in the process of being called.
56302
 *
56303
 * If the injector is asked to inject a token with its value set to CIRCULAR, that indicates
56304
 * injection of a dependency has recursively attempted to inject the original token, and there is
56305
 * a circular dependency among the providers.
56306
 */
56307
var CIRCULAR$1 = {};
56308
var EMPTY_ARRAY$1 = [];
56309
/**
56310
 * A lazily initialized NullInjector.
56311
 */
56312
var NULL_INJECTOR$1 = undefined;
56313
function getNullInjector() {
56314
    if (NULL_INJECTOR$1 === undefined) {
56315
        NULL_INJECTOR$1 = new NullInjector();
56316
    }
56317
    return NULL_INJECTOR$1;
56318
}
56319
/**
56320
 * Create a new `Injector` which is configured using `InjectorType`s.
56321
 *
56322
 * @experimental
56323
 */
56324
function createInjector(defType, parent) {
56325
    if (parent === void 0) { parent = null; }
56326
    parent = parent || getNullInjector();
56327
    return new R3Injector(defType, parent);
56328
}
56329
var R3Injector = /** @class */ (function () {
56330
    function R3Injector(def, parent) {
56331
        var _this = this;
56332
        this.parent = parent;
56333
        /**
56334
           * Map of tokens to records which contain the instances of those tokens.
56335
           */
56336
        this.records = new Map();
56337
        /**
56338
           * The transitive set of `InjectorType`s which define this injector.
56339
           */
56340
        this.injectorDefTypes = new Set();
56341
        /**
56342
           * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.
56343
           */
56344
        this.onDestroy = new Set();
56345
        /**
56346
           * Flag indicating that this injector was previously destroyed.
56347
           */
56348
        this.destroyed = false;
56349
        // Start off by creating Records for every provider declared in every InjectorType
56350
        // included transitively in `def`.
56351
        deepForEach([def], function (injectorDef) { return _this.processInjectorType(injectorDef, new Set()); });
56352
        // Make sure the INJECTOR token provides this injector.
56353
        this.records.set(INJECTOR, makeRecord(undefined, this));
56354
        // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide
56355
        // any injectable scoped to APP_ROOT_SCOPE.
56356
        this.isRootInjector = this.records.has(APP_ROOT);
56357
        // Eagerly instantiate the InjectorType classes themselves.
56358
        this.injectorDefTypes.forEach(function (defType) { return _this.get(defType); });
56359
    }
56360
    /**
56361
     * Destroy the injector and release references to every instance or provider associated with it.
56362
     *
56363
     * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a
56364
     * hook was found.
56365
     */
56366
    /**
56367
       * Destroy the injector and release references to every instance or provider associated with it.
56368
       *
56369
       * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a
56370
       * hook was found.
56371
       */
56372
    R3Injector.prototype.destroy = /**
56373
       * Destroy the injector and release references to every instance or provider associated with it.
56374
       *
56375
       * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a
56376
       * hook was found.
56377
       */
56378
    function () {
56379
        this.assertNotDestroyed();
56380
        // Set destroyed = true first, in case lifecycle hooks re-enter destroy().
56381
        this.destroyed = true;
56382
        try {
56383
            // Call all the lifecycle hooks.
56384
            this.onDestroy.forEach(function (service) { return service.ngOnDestroy(); });
56385
        }
56386
        finally {
56387
            // Release all references.
56388
            this.records.clear();
56389
            this.onDestroy.clear();
56390
            this.injectorDefTypes.clear();
56391
        }
56392
    };
56393
    R3Injector.prototype.get = function (token, notFoundValue, flags) {
56394
        if (notFoundValue === void 0) { notFoundValue = THROW_IF_NOT_FOUND; }
56395
        if (flags === void 0) { flags = 0 /* Default */; }
56396
        this.assertNotDestroyed();
56397
        // Set the injection context.
56398
        var previousInjector = setCurrentInjector(this);
56399
        try {
56400
            // Check for the SkipSelf flag.
56401
            if (!(flags & 4 /* SkipSelf */)) {
56402
                // SkipSelf isn't set, check if the record belongs to this injector.
56403
                var record = this.records.get(token);
56404
                if (record === undefined) {
56405
                    // No record, but maybe the token is scoped to this injector. Look for an ngInjectableDef
56406
                    // with a scope matching this injector.
56407
                    var def = couldBeInjectableType(token) &&
56408
                        token.ngInjectableDef ||
56409
                        undefined;
56410
                    if (def !== undefined && this.injectableDefInScope(def)) {
56411
                        // Found an ngInjectableDef and it's scoped to this injector. Pretend as if it was here
56412
                        // all along.
56413
                        record = injectableDefRecord(token);
56414
                        this.records.set(token, record);
56415
                    }
56416
                }
56417
                // If a record was found, get the instance for it and return it.
56418
                if (record !== undefined) {
56419
                    return this.hydrate(token, record);
56420
                }
56421
            }
56422
            // Select the next injector based on the Self flag - if self is set, the next injector is
56423
            // the NullInjector, otherwise it's the parent.
56424
            var next = !(flags & 2 /* Self */) ? this.parent : getNullInjector();
56425
            return this.parent.get(token, notFoundValue);
56426
        }
56427
        finally {
56428
            // Lastly, clean up the state by restoring the previous injector.
56429
            setCurrentInjector(previousInjector);
56430
        }
56431
    };
56432
    R3Injector.prototype.assertNotDestroyed = function () {
56433
        if (this.destroyed) {
56434
            throw new Error('Injector has already been destroyed.');
56435
        }
56436
    };
56437
    /**
56438
     * Add an `InjectorType` or `InjectorDefTypeWithProviders` and all of its transitive providers
56439
     * to this injector.
56440
     */
56441
    /**
56442
       * Add an `InjectorType` or `InjectorDefTypeWithProviders` and all of its transitive providers
56443
       * to this injector.
56444
       */
56445
    R3Injector.prototype.processInjectorType = /**
56446
       * Add an `InjectorType` or `InjectorDefTypeWithProviders` and all of its transitive providers
56447
       * to this injector.
56448
       */
56449
    function (defOrWrappedDef, parents) {
56450
        var _this = this;
56451
        defOrWrappedDef = resolveForwardRef(defOrWrappedDef);
56452
        // Either the defOrWrappedDef is an InjectorType (with ngInjectorDef) or an
56453
        // InjectorDefTypeWithProviders (aka ModuleWithProviders). Detecting either is a megamorphic
56454
        // read, so care is taken to only do the read once.
56455
        // First attempt to read the ngInjectorDef.
56456
        var def = defOrWrappedDef.ngInjectorDef;
56457
        // If that's not present, then attempt to read ngModule from the InjectorDefTypeWithProviders.
56458
        var ngModule = (def == null) && defOrWrappedDef.ngModule || undefined;
56459
        // Determine the InjectorType. In the case where `defOrWrappedDef` is an `InjectorType`,
56460
        // then this is easy. In the case of an InjectorDefTypeWithProviders, then the definition type
56461
        // is the `ngModule`.
56462
        var defType = (ngModule === undefined) ? defOrWrappedDef : ngModule;
56463
        // If defOrWrappedType was an InjectorDefTypeWithProviders, then .providers may hold some
56464
        // extra providers.
56465
        var providers = (ngModule !== undefined) && defOrWrappedDef.providers ||
56466
            EMPTY_ARRAY$1;
56467
        // Finally, if defOrWrappedType was an `InjectorDefTypeWithProviders`, then the actual
56468
        // `InjectorDef` is on its `ngModule`.
56469
        if (ngModule !== undefined) {
56470
            def = ngModule.ngInjectorDef;
56471
        }
56472
        // If no definition was found, throw.
56473
        if (def == null) {
56474
            throw new Error("Type " + stringify(defType) + " is missing an ngInjectorDef definition.");
56475
        }
56476
        // Check for circular dependencies.
56477
        if (parents.has(defType)) {
56478
            throw new Error("Circular dependency: type " + stringify(defType) + " ends up importing itself.");
56479
        }
56480
        // Track the InjectorType and add a provider for it.
56481
        this.injectorDefTypes.add(defType);
56482
        this.records.set(defType, makeRecord(def.factory));
56483
        // Add providers in the same way that @NgModule resolution did:
56484
        // First, include providers from any imports.
56485
        if (def.imports != null) {
56486
            // Before processing defType's imports, add it to the set of parents. This way, if it ends
56487
            // up deeply importing itself, this can be detected.
56488
            parents.add(defType);
56489
            try {
56490
                deepForEach(def.imports, function (imported) { return _this.processInjectorType(imported, parents); });
56491
            }
56492
            finally {
56493
                // Remove it from the parents set when finished.
56494
                parents.delete(defType);
56495
            }
56496
        }
56497
        // Next, include providers listed on the definition itself.
56498
        if (def.providers != null) {
56499
            deepForEach(def.providers, function (provider) { return _this.processProvider(provider); });
56500
        }
56501
        // Finally, include providers from an InjectorDefTypeWithProviders if there was one.
56502
        deepForEach(providers, function (provider) { return _this.processProvider(provider); });
56503
    };
56504
    /**
56505
     * Process a `SingleProvider` and add it.
56506
     */
56507
    /**
56508
       * Process a `SingleProvider` and add it.
56509
       */
56510
    R3Injector.prototype.processProvider = /**
56511
       * Process a `SingleProvider` and add it.
56512
       */
56513
    function (provider) {
56514
        // Determine the token from the provider. Either it's its own token, or has a {provide: ...}
56515
        // property.
56516
        provider = resolveForwardRef(provider);
56517
        var token = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);
56518
        // Construct a `Record` for the provider.
56519
        var record = providerToRecord(provider);
56520
        if (!isTypeProvider(provider) && provider.multi === true) {
56521
            // If the provider indicates that it's a multi-provider, process it specially.
56522
            // First check whether it's been defined already.
56523
            var multiRecord_1 = this.records.get(token);
56524
            if (multiRecord_1) {
56525
                // It has. Throw a nice error if
56526
                if (multiRecord_1.multi === undefined) {
56527
                    throw new Error("Mixed multi-provider for " + token + ".");
56528
                }
56529
            }
56530
            else {
56531
                token = provider;
56532
                multiRecord_1 = makeRecord(undefined, NOT_YET, true);
56533
                multiRecord_1.factory = function () { return injectArgs((multiRecord_1.multi)); };
56534
                this.records.set(token, multiRecord_1);
56535
            }
56536
            token = provider;
56537
            multiRecord_1.multi.push(provider);
56538
        }
56539
        var existing = this.records.get(token);
56540
        if (existing && existing.multi !== undefined) {
56541
            throw new Error("Mixed multi-provider for " + token);
56542
        }
56543
        this.records.set(token, record);
56544
    };
56545
    R3Injector.prototype.hydrate = function (token, record) {
56546
        if (record.value === CIRCULAR$1) {
56547
            throw new Error("Circular dep for " + stringify(token));
56548
        }
56549
        else if (record.value === NOT_YET) {
56550
            record.value = CIRCULAR$1;
56551
            record.value = record.factory();
56552
        }
56553
        if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {
56554
            this.onDestroy.add(record.value);
56555
        }
56556
        return record.value;
56557
    };
56558
    R3Injector.prototype.injectableDefInScope = function (def) {
56559
        if (!def.providedIn) {
56560
            return false;
56561
        }
56562
        else if (typeof def.providedIn === 'string') {
56563
            return def.providedIn === 'any' || (def.providedIn === 'root' && this.isRootInjector);
56564
        }
56565
        else {
56566
            return this.injectorDefTypes.has(def.providedIn);
56567
        }
56568
    };
56569
    return R3Injector;
56570
}());
56571
function injectableDefRecord(token) {
56572
    var def = token.ngInjectableDef;
56573
    if (def === undefined) {
56574
        throw new Error("Type " + stringify(token) + " is missing an ngInjectableDef definition.");
56575
    }
56576
    return makeRecord(def.factory);
56577
}
56578
function providerToRecord(provider) {
56579
    var token = resolveForwardRef(provider);
56580
    var value = NOT_YET;
56581
    var factory = undefined;
56582
    if (isTypeProvider(provider)) {
56583
        return injectableDefRecord(provider);
56584
    }
56585
    else {
56586
        token = resolveForwardRef(provider.provide);
56587
        if (isValueProvider(provider)) {
56588
            value = provider.useValue;
56589
        }
56590
        else if (isExistingProvider(provider)) {
56591
            factory = function () { return inject(provider.useExisting); };
56592
        }
56593
        else if (isFactoryProvider(provider)) {
56594
            factory = function () { return provider.useFactory.apply(provider, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(injectArgs(provider.deps || []))); };
56595
        }
56596
        else {
56597
            var classRef_1 = provider.useClass || token;
56598
            if (hasDeps(provider)) {
56599
                factory = function () { return new ((classRef_1).bind.apply((classRef_1), Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], injectArgs(provider.deps))))(); };
56600
            }
56601
            else {
56602
                return injectableDefRecord(classRef_1);
56603
            }
56604
        }
56605
    }
56606
    return makeRecord(factory, value);
56607
}
56608
function makeRecord(factory, value, multi) {
56609
    if (value === void 0) { value = NOT_YET; }
56610
    if (multi === void 0) { multi = false; }
56611
    return {
56612
        factory: factory,
56613
        value: value,
56614
        multi: multi ? [] : undefined,
56615
    };
56616
}
56617
function deepForEach(input, fn) {
56618
    input.forEach(function (value) { return Array.isArray(value) ? deepForEach(value, fn) : fn(value); });
56619
}
56620
function isValueProvider(value) {
56621
    return USE_VALUE$1 in value;
56622
}
56623
function isExistingProvider(value) {
56624
    return !!value.useExisting;
56625
}
56626
function isFactoryProvider(value) {
56627
    return !!value.useFactory;
56628
}
56629
function isTypeProvider(value) {
56630
    return typeof value === 'function';
56631
}
56632
function hasDeps(value) {
56633
    return !!value.deps;
56634
}
56635
function hasOnDestroy(value) {
56636
    return typeof value === 'object' && value != null && value.ngOnDestroy &&
56637
        typeof value.ngOnDestroy === 'function';
56638
}
56639
function couldBeInjectableType(value) {
56640
    return (typeof value === 'function') ||
56641
        (typeof value === 'object' && value instanceof InjectionToken);
56642
}
56643
 
56644
/**
56645
 * @license
56646
 * Copyright Google Inc. All Rights Reserved.
56647
 *
56648
 * Use of this source code is governed by an MIT-style license that can be
56649
 * found in the LICENSE file at https://angular.io/license
56650
 */
56651
 
56652
/**
56653
 * @license
56654
 * Copyright Google Inc. All Rights Reserved.
56655
 *
56656
 * Use of this source code is governed by an MIT-style license that can be
56657
 * found in the LICENSE file at https://angular.io/license
56658
 */
56659
/**
56660
 * Determine if the argument is shaped like a Promise
56661
 */
56662
function isPromise(obj) {
56663
    // allow any Promise/A+ compliant thenable.
56664
    // It's up to the caller to ensure that obj.then conforms to the spec
56665
    return !!obj && typeof obj.then === 'function';
56666
}
56667
/**
56668
 * Determine if the argument is an Observable
56669
 */
56670
function isObservable(obj) {
56671
    // TODO: use Symbol.observable when https://github.com/ReactiveX/rxjs/issues/2415 will be resolved
56672
    return !!obj && typeof obj.subscribe === 'function';
56673
}
56674
 
56675
/**
56676
 * @license
56677
 * Copyright Google Inc. All Rights Reserved.
56678
 *
56679
 * Use of this source code is governed by an MIT-style license that can be
56680
 * found in the LICENSE file at https://angular.io/license
56681
 */
56682
/**
56683
 * A function that will be executed when an application is initialized.
56684
 * @experimental
56685
 */
56686
var APP_INITIALIZER = new InjectionToken('Application Initializer');
56687
/**
56688
 * A class that reflects the state of running {@link APP_INITIALIZER}s.
56689
 *
56690
 * @experimental
56691
 */
56692
var ApplicationInitStatus = /** @class */ (function () {
56693
    function ApplicationInitStatus(appInits) {
56694
        var _this = this;
56695
        this.appInits = appInits;
56696
        this.initialized = false;
56697
        this.done = false;
56698
        this.donePromise = new Promise(function (res, rej) {
56699
            _this.resolve = res;
56700
            _this.reject = rej;
56701
        });
56702
    }
56703
    /** @internal */
56704
    /** @internal */
56705
    ApplicationInitStatus.prototype.runInitializers = /** @internal */
56706
    function () {
56707
        var _this = this;
56708
        if (this.initialized) {
56709
            return;
56710
        }
56711
        var asyncInitPromises = [];
56712
        var complete = function () {
56713
            _this.done = true;
56714
            _this.resolve();
56715
        };
56716
        if (this.appInits) {
56717
            for (var i = 0; i < this.appInits.length; i++) {
56718
                var initResult = this.appInits[i]();
56719
                if (isPromise(initResult)) {
56720
                    asyncInitPromises.push(initResult);
56721
                }
56722
            }
56723
        }
56724
        Promise.all(asyncInitPromises).then(function () { complete(); }).catch(function (e) { _this.reject(e); });
56725
        if (asyncInitPromises.length === 0) {
56726
            complete();
56727
        }
56728
        this.initialized = true;
56729
    };
56730
    ApplicationInitStatus.decorators = [
56731
        { type: Injectable }
56732
    ];
56733
    /** @nocollapse */
56734
    ApplicationInitStatus.ctorParameters = function () { return [
56735
        { type: Array, decorators: [{ type: Inject, args: [APP_INITIALIZER,] }, { type: Optional },] },
56736
    ]; };
56737
    return ApplicationInitStatus;
56738
}());
56739
 
56740
/**
56741
 * @license
56742
 * Copyright Google Inc. All Rights Reserved.
56743
 *
56744
 * Use of this source code is governed by an MIT-style license that can be
56745
 * found in the LICENSE file at https://angular.io/license
56746
 */
56747
/**
56748
 * A DI Token representing a unique string id assigned to the application by Angular and used
56749
 * primarily for prefixing application attributes and CSS styles when
56750
 * {@link ViewEncapsulation#Emulated ViewEncapsulation.Emulated} is being used.
56751
 *
56752
 * If you need to avoid randomly generated value to be used as an application id, you can provide
56753
 * a custom value via a DI provider <!-- TODO: provider --> configuring the root {@link Injector}
56754
 * using this token.
56755
 * @experimental
56756
 */
56757
var APP_ID = new InjectionToken('AppId');
56758
function _appIdRandomProviderFactory() {
56759
    return "" + _randomChar() + _randomChar() + _randomChar();
56760
}
56761
/**
56762
 * Providers that will generate a random APP_ID_TOKEN.
56763
 * @experimental
56764
 */
56765
var APP_ID_RANDOM_PROVIDER = {
56766
    provide: APP_ID,
56767
    useFactory: _appIdRandomProviderFactory,
56768
    deps: [],
56769
};
56770
function _randomChar() {
56771
    return String.fromCharCode(97 + Math.floor(Math.random() * 25));
56772
}
56773
/**
56774
 * A function that will be executed when a platform is initialized.
56775
 * @experimental
56776
 */
56777
var PLATFORM_INITIALIZER = new InjectionToken('Platform Initializer');
56778
/**
56779
 * A token that indicates an opaque platform id.
56780
 * @experimental
56781
 */
56782
var PLATFORM_ID = new InjectionToken('Platform ID');
56783
/**
56784
 * All callbacks provided via this token will be called for every component that is bootstrapped.
56785
 * Signature of the callback:
56786
 *
56787
 * `(componentRef: ComponentRef) => void`.
56788
 *
56789
 * @experimental
56790
 */
56791
var APP_BOOTSTRAP_LISTENER = new InjectionToken('appBootstrapListener');
56792
/**
56793
 * A token which indicates the root directory of the application
56794
 * @experimental
56795
 */
56796
var PACKAGE_ROOT_URL = new InjectionToken('Application Packages Root URL');
56797
 
56798
/**
56799
 * @license
56800
 * Copyright Google Inc. All Rights Reserved.
56801
 *
56802
 * Use of this source code is governed by an MIT-style license that can be
56803
 * found in the LICENSE file at https://angular.io/license
56804
 */
56805
var Console = /** @class */ (function () {
56806
    function Console() {
56807
    }
56808
    Console.prototype.log = function (message) {
56809
        // tslint:disable-next-line:no-console
56810
        console.log(message);
56811
    };
56812
    // Note: for reporting errors use `DOM.logError()` as it is platform specific
56813
    // Note: for reporting errors use `DOM.logError()` as it is platform specific
56814
    Console.prototype.warn =
56815
    // Note: for reporting errors use `DOM.logError()` as it is platform specific
56816
    function (message) {
56817
        // tslint:disable-next-line:no-console
56818
        console.warn(message);
56819
    };
56820
    Console.decorators = [
56821
        { type: Injectable }
56822
    ];
56823
    /** @nocollapse */
56824
    Console.ctorParameters = function () { return []; };
56825
    return Console;
56826
}());
56827
 
56828
/**
56829
 * @license
56830
 * Copyright Google Inc. All Rights Reserved.
56831
 *
56832
 * Use of this source code is governed by an MIT-style license that can be
56833
 * found in the LICENSE file at https://angular.io/license
56834
 */
56835
/**
56836
 * Combination of NgModuleFactory and ComponentFactorys.
56837
 *
56838
 * @experimental
56839
 */
56840
var ModuleWithComponentFactories = /** @class */ (function () {
56841
    function ModuleWithComponentFactories(ngModuleFactory, componentFactories) {
56842
        this.ngModuleFactory = ngModuleFactory;
56843
        this.componentFactories = componentFactories;
56844
    }
56845
    return ModuleWithComponentFactories;
56846
}());
56847
function _throwError() {
56848
    throw new Error("Runtime compiler is not loaded");
56849
}
56850
/**
56851
 * Low-level service for running the angular compiler during runtime
56852
 * to create {@link ComponentFactory}s, which
56853
 * can later be used to create and render a Component instance.
56854
 *
56855
 * Each `@NgModule` provides an own `Compiler` to its injector,
56856
 * that will use the directives/pipes of the ng module for compilation
56857
 * of components.
56858
 *
56859
 */
56860
var Compiler = /** @class */ (function () {
56861
    function Compiler() {
56862
    }
56863
    /**
56864
     * Compiles the given NgModule and all of its components. All templates of the components listed
56865
     * in `entryComponents` have to be inlined.
56866
     */
56867
    /**
56868
       * Compiles the given NgModule and all of its components. All templates of the components listed
56869
       * in `entryComponents` have to be inlined.
56870
       */
56871
    Compiler.prototype.compileModuleSync = /**
56872
       * Compiles the given NgModule and all of its components. All templates of the components listed
56873
       * in `entryComponents` have to be inlined.
56874
       */
56875
    function (moduleType) { throw _throwError(); };
56876
    /**
56877
     * Compiles the given NgModule and all of its components
56878
     */
56879
    /**
56880
       * Compiles the given NgModule and all of its components
56881
       */
56882
    Compiler.prototype.compileModuleAsync = /**
56883
       * Compiles the given NgModule and all of its components
56884
       */
56885
    function (moduleType) { throw _throwError(); };
56886
    /**
56887
     * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.
56888
     */
56889
    /**
56890
       * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.
56891
       */
56892
    Compiler.prototype.compileModuleAndAllComponentsSync = /**
56893
       * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.
56894
       */
56895
    function (moduleType) {
56896
        throw _throwError();
56897
    };
56898
    /**
56899
     * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.
56900
     */
56901
    /**
56902
       * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.
56903
       */
56904
    Compiler.prototype.compileModuleAndAllComponentsAsync = /**
56905
       * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.
56906
       */
56907
    function (moduleType) {
56908
        throw _throwError();
56909
    };
56910
    /**
56911
     * Clears all caches.
56912
     */
56913
    /**
56914
       * Clears all caches.
56915
       */
56916
    Compiler.prototype.clearCache = /**
56917
       * Clears all caches.
56918
       */
56919
    function () { };
56920
    /**
56921
     * Clears the cache for the given component/ngModule.
56922
     */
56923
    /**
56924
       * Clears the cache for the given component/ngModule.
56925
       */
56926
    Compiler.prototype.clearCacheFor = /**
56927
       * Clears the cache for the given component/ngModule.
56928
       */
56929
    function (type) { };
56930
    Compiler.decorators = [
56931
        { type: Injectable }
56932
    ];
56933
    /** @nocollapse */
56934
    Compiler.ctorParameters = function () { return []; };
56935
    return Compiler;
56936
}());
56937
/**
56938
 * Token to provide CompilerOptions in the platform injector.
56939
 *
56940
 * @experimental
56941
 */
56942
var COMPILER_OPTIONS = new InjectionToken('compilerOptions');
56943
/**
56944
 * A factory for creating a Compiler
56945
 *
56946
 * @experimental
56947
 */
56948
var CompilerFactory = /** @class */ (function () {
56949
    function CompilerFactory() {
56950
    }
56951
    return CompilerFactory;
56952
}());
56953
 
56954
/**
56955
 * @license
56956
 * Copyright Google Inc. All Rights Reserved.
56957
 *
56958
 * Use of this source code is governed by an MIT-style license that can be
56959
 * found in the LICENSE file at https://angular.io/license
56960
 */
56961
/**
56962
 * Represents an instance of a Component created via a {@link ComponentFactory}.
56963
 *
56964
 * `ComponentRef` provides access to the Component Instance as well other objects related to this
56965
 * Component Instance and allows you to destroy the Component Instance via the {@link #destroy}
56966
 * method.
56967
 *
56968
 */
56969
var ComponentRef = /** @class */ (function () {
56970
    function ComponentRef() {
56971
    }
56972
    return ComponentRef;
56973
}());
56974
var ComponentFactory = /** @class */ (function () {
56975
    function ComponentFactory() {
56976
    }
56977
    return ComponentFactory;
56978
}());
56979
 
56980
/**
56981
 * @license
56982
 * Copyright Google Inc. All Rights Reserved.
56983
 *
56984
 * Use of this source code is governed by an MIT-style license that can be
56985
 * found in the LICENSE file at https://angular.io/license
56986
 */
56987
function noComponentFactoryError(component) {
56988
    var error = Error("No component factory found for " + stringify(component) + ". Did you add it to @NgModule.entryComponents?");
56989
    error[ERROR_COMPONENT] = component;
56990
    return error;
56991
}
56992
var ERROR_COMPONENT = 'ngComponent';
56993
 
56994
var _NullComponentFactoryResolver = /** @class */ (function () {
56995
    function _NullComponentFactoryResolver() {
56996
    }
56997
    _NullComponentFactoryResolver.prototype.resolveComponentFactory = function (component) {
56998
        throw noComponentFactoryError(component);
56999
    };
57000
    return _NullComponentFactoryResolver;
57001
}());
57002
var ComponentFactoryResolver = /** @class */ (function () {
57003
    function ComponentFactoryResolver() {
57004
    }
57005
    ComponentFactoryResolver.NULL = new _NullComponentFactoryResolver();
57006
    return ComponentFactoryResolver;
57007
}());
57008
var CodegenComponentFactoryResolver = /** @class */ (function () {
57009
    function CodegenComponentFactoryResolver(factories, _parent, _ngModule) {
57010
        this._parent = _parent;
57011
        this._ngModule = _ngModule;
57012
        this._factories = new Map();
57013
        for (var i = 0; i < factories.length; i++) {
57014
            var factory = factories[i];
57015
            this._factories.set(factory.componentType, factory);
57016
        }
57017
    }
57018
    CodegenComponentFactoryResolver.prototype.resolveComponentFactory = function (component) {
57019
        var factory = this._factories.get(component);
57020
        if (!factory && this._parent) {
57021
            factory = this._parent.resolveComponentFactory(component);
57022
        }
57023
        if (!factory) {
57024
            throw noComponentFactoryError(component);
57025
        }
57026
        return new ComponentFactoryBoundToModule(factory, this._ngModule);
57027
    };
57028
    return CodegenComponentFactoryResolver;
57029
}());
57030
var ComponentFactoryBoundToModule = /** @class */ (function (_super) {
57031
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ComponentFactoryBoundToModule, _super);
57032
    function ComponentFactoryBoundToModule(factory, ngModule) {
57033
        var _this = _super.call(this) || this;
57034
        _this.factory = factory;
57035
        _this.ngModule = ngModule;
57036
        _this.selector = factory.selector;
57037
        _this.componentType = factory.componentType;
57038
        _this.ngContentSelectors = factory.ngContentSelectors;
57039
        _this.inputs = factory.inputs;
57040
        _this.outputs = factory.outputs;
57041
        return _this;
57042
    }
57043
    ComponentFactoryBoundToModule.prototype.create = function (injector, projectableNodes, rootSelectorOrNode, ngModule) {
57044
        return this.factory.create(injector, projectableNodes, rootSelectorOrNode, ngModule || this.ngModule);
57045
    };
57046
    return ComponentFactoryBoundToModule;
57047
}(ComponentFactory));
57048
 
57049
/**
57050
 * @license
57051
 * Copyright Google Inc. All Rights Reserved.
57052
 *
57053
 * Use of this source code is governed by an MIT-style license that can be
57054
 * found in the LICENSE file at https://angular.io/license
57055
 */
57056
/**
57057
 * Represents an instance of an NgModule created via a {@link NgModuleFactory}.
57058
 *
57059
 * `NgModuleRef` provides access to the NgModule Instance as well other objects related to this
57060
 * NgModule Instance.
57061
 *
57062
 *
57063
 */
57064
var NgModuleRef = /** @class */ (function () {
57065
    function NgModuleRef() {
57066
    }
57067
    return NgModuleRef;
57068
}());
57069
/**
57070
 * @experimental
57071
 */
57072
var NgModuleFactory = /** @class */ (function () {
57073
    function NgModuleFactory() {
57074
    }
57075
    return NgModuleFactory;
57076
}());
57077
 
57078
/**
57079
 * @license
57080
 * Copyright Google Inc. All Rights Reserved.
57081
 *
57082
 * Use of this source code is governed by an MIT-style license that can be
57083
 * found in the LICENSE file at https://angular.io/license
57084
 */
57085
var trace;
57086
var events;
57087
function detectWTF() {
57088
    var wtf = _global /** TODO #9100 */['wtf'];
57089
    if (wtf) {
57090
        trace = wtf['trace'];
57091
        if (trace) {
57092
            events = trace['events'];
57093
            return true;
57094
        }
57095
    }
57096
    return false;
57097
}
57098
function createScope(signature, flags) {
57099
    if (flags === void 0) { flags = null; }
57100
    return events.createScope(signature, flags);
57101
}
57102
function leave(scope, returnValue) {
57103
    trace.leaveScope(scope, returnValue);
57104
    return returnValue;
57105
}
57106
function startTimeRange(rangeType, action) {
57107
    return trace.beginTimeRange(rangeType, action);
57108
}
57109
function endTimeRange(range) {
57110
    trace.endTimeRange(range);
57111
}
57112
 
57113
/**
57114
 * @license
57115
 * Copyright Google Inc. All Rights Reserved.
57116
 *
57117
 * Use of this source code is governed by an MIT-style license that can be
57118
 * found in the LICENSE file at https://angular.io/license
57119
 */
57120
/**
57121
 * True if WTF is enabled.
57122
 */
57123
var wtfEnabled = detectWTF();
57124
function noopScope(arg0, arg1) {
57125
    return null;
57126
}
57127
/**
57128
 * Create trace scope.
57129
 *
57130
 * Scopes must be strictly nested and are analogous to stack frames, but
57131
 * do not have to follow the stack frames. Instead it is recommended that they follow logical
57132
 * nesting. You may want to use
57133
 * [Event
57134
 * Signatures](http://google.github.io/tracing-framework/instrumenting-code.html#custom-events)
57135
 * as they are defined in WTF.
57136
 *
57137
 * Used to mark scope entry. The return value is used to leave the scope.
57138
 *
57139
 *     var myScope = wtfCreateScope('MyClass#myMethod(ascii someVal)');
57140
 *
57141
 *     someMethod() {
57142
 *        var s = myScope('Foo'); // 'Foo' gets stored in tracing UI
57143
 *        // DO SOME WORK HERE
57144
 *        return wtfLeave(s, 123); // Return value 123
57145
 *     }
57146
 *
57147
 * Note, adding try-finally block around the work to ensure that `wtfLeave` gets called can
57148
 * negatively impact the performance of your application. For this reason we recommend that
57149
 * you don't add them to ensure that `wtfLeave` gets called. In production `wtfLeave` is a noop and
57150
 * so try-finally block has no value. When debugging perf issues, skipping `wtfLeave`, do to
57151
 * exception, will produce incorrect trace, but presence of exception signifies logic error which
57152
 * needs to be fixed before the app should be profiled. Add try-finally only when you expect that
57153
 * an exception is expected during normal execution while profiling.
57154
 *
57155
 * @experimental
57156
 */
57157
var wtfCreateScope = wtfEnabled ? createScope : function (signature, flags) { return noopScope; };
57158
/**
57159
 * Used to mark end of Scope.
57160
 *
57161
 * - `scope` to end.
57162
 * - `returnValue` (optional) to be passed to the WTF.
57163
 *
57164
 * Returns the `returnValue for easy chaining.
57165
 * @experimental
57166
 */
57167
var wtfLeave = wtfEnabled ? leave : function (s, r) { return r; };
57168
/**
57169
 * Used to mark Async start. Async are similar to scope but they don't have to be strictly nested.
57170
 * The return value is used in the call to [endAsync]. Async ranges only work if WTF has been
57171
 * enabled.
57172
 *
57173
 *     someMethod() {
57174
 *        var s = wtfStartTimeRange('HTTP:GET', 'some.url');
57175
 *        var future = new Future.delay(5).then((_) {
57176
 *          wtfEndTimeRange(s);
57177
 *        });
57178
 *     }
57179
 * @experimental
57180
 */
57181
var wtfStartTimeRange = wtfEnabled ? startTimeRange : function (rangeType, action) { return null; };
57182
/**
57183
 * Ends a async time range operation.
57184
 * [range] is the return value from [wtfStartTimeRange] Async ranges only work if WTF has been
57185
 * enabled.
57186
 * @experimental
57187
 */
57188
var wtfEndTimeRange = wtfEnabled ? endTimeRange : function (r) { return null; };
57189
 
57190
/**
57191
 * @license
57192
 * Copyright Google Inc. All Rights Reserved.
57193
 *
57194
 * Use of this source code is governed by an MIT-style license that can be
57195
 * found in the LICENSE file at https://angular.io/license
57196
 */
57197
/**
57198
 * Use by directives and components to emit custom Events.
57199
 *
57200
 * ### Examples
57201
 *
57202
 * In the following example, `Zippy` alternatively emits `open` and `close` events when its
57203
 * title gets clicked:
57204
 *
57205
 * ```
57206
 * @Component({
57207
 *   selector: 'zippy',
57208
 *   template: `
57209
 *   <div class="zippy">
57210
 *     <div (click)="toggle()">Toggle</div>
57211
 *     <div [hidden]="!visible">
57212
 *       <ng-content></ng-content>
57213
 *     </div>
57214
 *  </div>`})
57215
 * export class Zippy {
57216
 *   visible: boolean = true;
57217
 *   @Output() open: EventEmitter<any> = new EventEmitter();
57218
 *   @Output() close: EventEmitter<any> = new EventEmitter();
57219
 *
57220
 *   toggle() {
57221
 *     this.visible = !this.visible;
57222
 *     if (this.visible) {
57223
 *       this.open.emit(null);
57224
 *     } else {
57225
 *       this.close.emit(null);
57226
 *     }
57227
 *   }
57228
 * }
57229
 * ```
57230
 *
57231
 * The events payload can be accessed by the parameter `$event` on the components output event
57232
 * handler:
57233
 *
57234
 * ```
57235
 * <zippy (open)="onOpen($event)" (close)="onClose($event)"></zippy>
57236
 * ```
57237
 *
57238
 * Uses Rx.Observable but provides an adapter to make it work as specified here:
57239
 * https://github.com/jhusain/observable-spec
57240
 *
57241
 * Once a reference implementation of the spec is available, switch to it.
57242
 *
57243
 */
57244
var EventEmitter = /** @class */ (function (_super) {
57245
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(EventEmitter, _super);
57246
    /**
57247
     * Creates an instance of {@link EventEmitter}, which depending on `isAsync`,
57248
     * delivers events synchronously or asynchronously.
57249
     *
57250
     * @param isAsync By default, events are delivered synchronously (default value: `false`).
57251
     * Set to `true` for asynchronous event delivery.
57252
     */
57253
    function EventEmitter(isAsync) {
57254
        if (isAsync === void 0) { isAsync = false; }
57255
        var _this = _super.call(this) || this;
57256
        _this.__isAsync = isAsync;
57257
        return _this;
57258
    }
57259
    EventEmitter.prototype.emit = function (value) { _super.prototype.next.call(this, value); };
57260
    EventEmitter.prototype.subscribe = function (generatorOrNext, error, complete) {
57261
        var schedulerFn;
57262
        var errorFn = function (err) { return null; };
57263
        var completeFn = function () { return null; };
57264
        if (generatorOrNext && typeof generatorOrNext === 'object') {
57265
            schedulerFn = this.__isAsync ? function (value) {
57266
                setTimeout(function () { return generatorOrNext.next(value); });
57267
            } : function (value) { generatorOrNext.next(value); };
57268
            if (generatorOrNext.error) {
57269
                errorFn = this.__isAsync ? function (err) { setTimeout(function () { return generatorOrNext.error(err); }); } :
57270
                    function (err) { generatorOrNext.error(err); };
57271
            }
57272
            if (generatorOrNext.complete) {
57273
                completeFn = this.__isAsync ? function () { setTimeout(function () { return generatorOrNext.complete(); }); } :
57274
                    function () { generatorOrNext.complete(); };
57275
            }
57276
        }
57277
        else {
57278
            schedulerFn = this.__isAsync ? function (value) { setTimeout(function () { return generatorOrNext(value); }); } :
57279
                function (value) { generatorOrNext(value); };
57280
            if (error) {
57281
                errorFn =
57282
                    this.__isAsync ? function (err) { setTimeout(function () { return error(err); }); } : function (err) { error(err); };
57283
            }
57284
            if (complete) {
57285
                completeFn =
57286
                    this.__isAsync ? function () { setTimeout(function () { return complete(); }); } : function () { complete(); };
57287
            }
57288
        }
57289
        var sink = _super.prototype.subscribe.call(this, schedulerFn, errorFn, completeFn);
57290
        if (generatorOrNext instanceof rxjs__WEBPACK_IMPORTED_MODULE_1__["Subscription"]) {
57291
            generatorOrNext.add(sink);
57292
        }
57293
        return sink;
57294
    };
57295
    return EventEmitter;
57296
}(rxjs__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
57297
 
57298
/**
57299
 * @license
57300
 * Copyright Google Inc. All Rights Reserved.
57301
 *
57302
 * Use of this source code is governed by an MIT-style license that can be
57303
 * found in the LICENSE file at https://angular.io/license
57304
 */
57305
/**
57306
 * An injectable service for executing work inside or outside of the Angular zone.
57307
 *
57308
 * The most common use of this service is to optimize performance when starting a work consisting of
57309
 * one or more asynchronous tasks that don't require UI updates or error handling to be handled by
57310
 * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks
57311
 * can reenter the Angular zone via {@link #run}.
57312
 *
57313
 * <!-- TODO: add/fix links to:
57314
 *   - docs explaining zones and the use of zones in Angular and change-detection
57315
 *   - link to runOutsideAngular/run (throughout this file!)
57316
 *   -->
57317
 *
57318
 * ### Example
57319
 *
57320
 * ```
57321
 * import {Component, NgZone} from '@angular/core';
57322
 * import {NgIf} from '@angular/common';
57323
 *
57324
 * @Component({
57325
 *   selector: 'ng-zone-demo',
57326
 *   template: `
57327
 *     <h2>Demo: NgZone</h2>
57328
 *
57329
 *     <p>Progress: {{progress}}%</p>
57330
 *     <p *ngIf="progress >= 100">Done processing {{label}} of Angular zone!</p>
57331
 *
57332
 *     <button (click)="processWithinAngularZone()">Process within Angular zone</button>
57333
 *     <button (click)="processOutsideOfAngularZone()">Process outside of Angular zone</button>
57334
 *   `,
57335
 * })
57336
 * export class NgZoneDemo {
57337
 *   progress: number = 0;
57338
 *   label: string;
57339
 *
57340
 *   constructor(private _ngZone: NgZone) {}
57341
 *
57342
 *   // Loop inside the Angular zone
57343
 *   // so the UI DOES refresh after each setTimeout cycle
57344
 *   processWithinAngularZone() {
57345
 *     this.label = 'inside';
57346
 *     this.progress = 0;
57347
 *     this._increaseProgress(() => console.log('Inside Done!'));
57348
 *   }
57349
 *
57350
 *   // Loop outside of the Angular zone
57351
 *   // so the UI DOES NOT refresh after each setTimeout cycle
57352
 *   processOutsideOfAngularZone() {
57353
 *     this.label = 'outside';
57354
 *     this.progress = 0;
57355
 *     this._ngZone.runOutsideAngular(() => {
57356
 *       this._increaseProgress(() => {
57357
 *         // reenter the Angular zone and display done
57358
 *         this._ngZone.run(() => { console.log('Outside Done!'); });
57359
 *       });
57360
 *     });
57361
 *   }
57362
 *
57363
 *   _increaseProgress(doneCallback: () => void) {
57364
 *     this.progress += 1;
57365
 *     console.log(`Current progress: ${this.progress}%`);
57366
 *
57367
 *     if (this.progress < 100) {
57368
 *       window.setTimeout(() => this._increaseProgress(doneCallback), 10);
57369
 *     } else {
57370
 *       doneCallback();
57371
 *     }
57372
 *   }
57373
 * }
57374
 * ```
57375
 *
57376
 * @experimental
57377
 */
57378
var NgZone = /** @class */ (function () {
57379
    function NgZone(_a) {
57380
        var _b = _a.enableLongStackTrace, enableLongStackTrace = _b === void 0 ? false : _b;
57381
        this.hasPendingMicrotasks = false;
57382
        this.hasPendingMacrotasks = false;
57383
        /**
57384
           * Whether there are no outstanding microtasks or macrotasks.
57385
           */
57386
        this.isStable = true;
57387
        /**
57388
           * Notifies when code enters Angular Zone. This gets fired first on VM Turn.
57389
           */
57390
        this.onUnstable = new EventEmitter(false);
57391
        /**
57392
           * Notifies when there is no more microtasks enqueued in the current VM Turn.
57393
           * This is a hint for Angular to do change detection, which may enqueue more microtasks.
57394
           * For this reason this event can fire multiple times per VM Turn.
57395
           */
57396
        this.onMicrotaskEmpty = new EventEmitter(false);
57397
        /**
57398
           * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which
57399
           * implies we are about to relinquish VM turn.
57400
           * This event gets called just once.
57401
           */
57402
        this.onStable = new EventEmitter(false);
57403
        /**
57404
           * Notifies that an error has been delivered.
57405
           */
57406
        this.onError = new EventEmitter(false);
57407
        if (typeof Zone == 'undefined') {
57408
            throw new Error("In this configuration Angular requires Zone.js");
57409
        }
57410
        Zone.assertZonePatched();
57411
        var self = this;
57412
        self._nesting = 0;
57413
        self._outer = self._inner = Zone.current;
57414
        if (Zone['wtfZoneSpec']) {
57415
            self._inner = self._inner.fork(Zone['wtfZoneSpec']);
57416
        }
57417
        if (Zone['TaskTrackingZoneSpec']) {
57418
            self._inner = self._inner.fork(new Zone['TaskTrackingZoneSpec']);
57419
        }
57420
        if (enableLongStackTrace && Zone['longStackTraceZoneSpec']) {
57421
            self._inner = self._inner.fork(Zone['longStackTraceZoneSpec']);
57422
        }
57423
        forkInnerZoneWithAngularBehavior(self);
57424
    }
57425
    NgZone.isInAngularZone = function () { return Zone.current.get('isAngularZone') === true; };
57426
    NgZone.assertInAngularZone = function () {
57427
        if (!NgZone.isInAngularZone()) {
57428
            throw new Error('Expected to be in Angular Zone, but it is not!');
57429
        }
57430
    };
57431
    NgZone.assertNotInAngularZone = function () {
57432
        if (NgZone.isInAngularZone()) {
57433
            throw new Error('Expected to not be in Angular Zone, but it is!');
57434
        }
57435
    };
57436
    /**
57437
     * Executes the `fn` function synchronously within the Angular zone and returns value returned by
57438
     * the function.
57439
     *
57440
     * Running functions via `run` allows you to reenter Angular zone from a task that was executed
57441
     * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
57442
     *
57443
     * Any future tasks or microtasks scheduled from within this function will continue executing from
57444
     * within the Angular zone.
57445
     *
57446
     * If a synchronous error happens it will be rethrown and not reported via `onError`.
57447
     */
57448
    /**
57449
       * Executes the `fn` function synchronously within the Angular zone and returns value returned by
57450
       * the function.
57451
       *
57452
       * Running functions via `run` allows you to reenter Angular zone from a task that was executed
57453
       * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
57454
       *
57455
       * Any future tasks or microtasks scheduled from within this function will continue executing from
57456
       * within the Angular zone.
57457
       *
57458
       * If a synchronous error happens it will be rethrown and not reported via `onError`.
57459
       */
57460
    NgZone.prototype.run = /**
57461
       * Executes the `fn` function synchronously within the Angular zone and returns value returned by
57462
       * the function.
57463
       *
57464
       * Running functions via `run` allows you to reenter Angular zone from a task that was executed
57465
       * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
57466
       *
57467
       * Any future tasks or microtasks scheduled from within this function will continue executing from
57468
       * within the Angular zone.
57469
       *
57470
       * If a synchronous error happens it will be rethrown and not reported via `onError`.
57471
       */
57472
    function (fn, applyThis, applyArgs) {
57473
        return this._inner.run(fn, applyThis, applyArgs);
57474
    };
57475
    /**
57476
     * Executes the `fn` function synchronously within the Angular zone as a task and returns value
57477
     * returned by the function.
57478
     *
57479
     * Running functions via `run` allows you to reenter Angular zone from a task that was executed
57480
     * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
57481
     *
57482
     * Any future tasks or microtasks scheduled from within this function will continue executing from
57483
     * within the Angular zone.
57484
     *
57485
     * If a synchronous error happens it will be rethrown and not reported via `onError`.
57486
     */
57487
    /**
57488
       * Executes the `fn` function synchronously within the Angular zone as a task and returns value
57489
       * returned by the function.
57490
       *
57491
       * Running functions via `run` allows you to reenter Angular zone from a task that was executed
57492
       * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
57493
       *
57494
       * Any future tasks or microtasks scheduled from within this function will continue executing from
57495
       * within the Angular zone.
57496
       *
57497
       * If a synchronous error happens it will be rethrown and not reported via `onError`.
57498
       */
57499
    NgZone.prototype.runTask = /**
57500
       * Executes the `fn` function synchronously within the Angular zone as a task and returns value
57501
       * returned by the function.
57502
       *
57503
       * Running functions via `run` allows you to reenter Angular zone from a task that was executed
57504
       * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
57505
       *
57506
       * Any future tasks or microtasks scheduled from within this function will continue executing from
57507
       * within the Angular zone.
57508
       *
57509
       * If a synchronous error happens it will be rethrown and not reported via `onError`.
57510
       */
57511
    function (fn, applyThis, applyArgs, name) {
57512
        var zone = this._inner;
57513
        var task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop, noop);
57514
        try {
57515
            return zone.runTask(task, applyThis, applyArgs);
57516
        }
57517
        finally {
57518
            zone.cancelTask(task);
57519
        }
57520
    };
57521
    /**
57522
     * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not
57523
     * rethrown.
57524
     */
57525
    /**
57526
       * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not
57527
       * rethrown.
57528
       */
57529
    NgZone.prototype.runGuarded = /**
57530
       * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not
57531
       * rethrown.
57532
       */
57533
    function (fn, applyThis, applyArgs) {
57534
        return this._inner.runGuarded(fn, applyThis, applyArgs);
57535
    };
57536
    /**
57537
     * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by
57538
     * the function.
57539
     *
57540
     * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do
57541
     * work that
57542
     * doesn't trigger Angular change-detection or is subject to Angular's error handling.
57543
     *
57544
     * Any future tasks or microtasks scheduled from within this function will continue executing from
57545
     * outside of the Angular zone.
57546
     *
57547
     * Use {@link #run} to reenter the Angular zone and do work that updates the application model.
57548
     */
57549
    /**
57550
       * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by
57551
       * the function.
57552
       *
57553
       * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do
57554
       * work that
57555
       * doesn't trigger Angular change-detection or is subject to Angular's error handling.
57556
       *
57557
       * Any future tasks or microtasks scheduled from within this function will continue executing from
57558
       * outside of the Angular zone.
57559
       *
57560
       * Use {@link #run} to reenter the Angular zone and do work that updates the application model.
57561
       */
57562
    NgZone.prototype.runOutsideAngular = /**
57563
       * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by
57564
       * the function.
57565
       *
57566
       * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do
57567
       * work that
57568
       * doesn't trigger Angular change-detection or is subject to Angular's error handling.
57569
       *
57570
       * Any future tasks or microtasks scheduled from within this function will continue executing from
57571
       * outside of the Angular zone.
57572
       *
57573
       * Use {@link #run} to reenter the Angular zone and do work that updates the application model.
57574
       */
57575
    function (fn) {
57576
        return this._outer.run(fn);
57577
    };
57578
    return NgZone;
57579
}());
57580
function noop() { }
57581
var EMPTY_PAYLOAD = {};
57582
function checkStable(zone) {
57583
    if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) {
57584
        try {
57585
            zone._nesting++;
57586
            zone.onMicrotaskEmpty.emit(null);
57587
        }
57588
        finally {
57589
            zone._nesting--;
57590
            if (!zone.hasPendingMicrotasks) {
57591
                try {
57592
                    zone.runOutsideAngular(function () { return zone.onStable.emit(null); });
57593
                }
57594
                finally {
57595
                    zone.isStable = true;
57596
                }
57597
            }
57598
        }
57599
    }
57600
}
57601
function forkInnerZoneWithAngularBehavior(zone) {
57602
    zone._inner = zone._inner.fork({
57603
        name: 'angular',
57604
        properties: { 'isAngularZone': true },
57605
        onInvokeTask: function (delegate, current, target, task, applyThis, applyArgs) {
57606
            try {
57607
                onEnter(zone);
57608
                return delegate.invokeTask(target, task, applyThis, applyArgs);
57609
            }
57610
            finally {
57611
                onLeave(zone);
57612
            }
57613
        },
57614
        onInvoke: function (delegate, current, target, callback, applyThis, applyArgs, source) {
57615
            try {
57616
                onEnter(zone);
57617
                return delegate.invoke(target, callback, applyThis, applyArgs, source);
57618
            }
57619
            finally {
57620
                onLeave(zone);
57621
            }
57622
        },
57623
        onHasTask: function (delegate, current, target, hasTaskState) {
57624
            delegate.hasTask(target, hasTaskState);
57625
            if (current === target) {
57626
                // We are only interested in hasTask events which originate from our zone
57627
                // (A child hasTask event is not interesting to us)
57628
                if (hasTaskState.change == 'microTask') {
57629
                    zone.hasPendingMicrotasks = hasTaskState.microTask;
57630
                    checkStable(zone);
57631
                }
57632
                else if (hasTaskState.change == 'macroTask') {
57633
                    zone.hasPendingMacrotasks = hasTaskState.macroTask;
57634
                }
57635
            }
57636
        },
57637
        onHandleError: function (delegate, current, target, error) {
57638
            delegate.handleError(target, error);
57639
            zone.runOutsideAngular(function () { return zone.onError.emit(error); });
57640
            return false;
57641
        }
57642
    });
57643
}
57644
function onEnter(zone) {
57645
    zone._nesting++;
57646
    if (zone.isStable) {
57647
        zone.isStable = false;
57648
        zone.onUnstable.emit(null);
57649
    }
57650
}
57651
function onLeave(zone) {
57652
    zone._nesting--;
57653
    checkStable(zone);
57654
}
57655
/**
57656
 * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls
57657
 * to framework to perform rendering.
57658
 */
57659
var NoopNgZone = /** @class */ (function () {
57660
    function NoopNgZone() {
57661
        this.hasPendingMicrotasks = false;
57662
        this.hasPendingMacrotasks = false;
57663
        this.isStable = true;
57664
        this.onUnstable = new EventEmitter();
57665
        this.onMicrotaskEmpty = new EventEmitter();
57666
        this.onStable = new EventEmitter();
57667
        this.onError = new EventEmitter();
57668
    }
57669
    NoopNgZone.prototype.run = function (fn) { return fn(); };
57670
    NoopNgZone.prototype.runGuarded = function (fn) { return fn(); };
57671
    NoopNgZone.prototype.runOutsideAngular = function (fn) { return fn(); };
57672
    NoopNgZone.prototype.runTask = function (fn) { return fn(); };
57673
    return NoopNgZone;
57674
}());
57675
 
57676
/**
57677
 * @license
57678
 * Copyright Google Inc. All Rights Reserved.
57679
 *
57680
 * Use of this source code is governed by an MIT-style license that can be
57681
 * found in the LICENSE file at https://angular.io/license
57682
 */
57683
/**
57684
 * The Testability service provides testing hooks that can be accessed from
57685
 * the browser and by services such as Protractor. Each bootstrapped Angular
57686
 * application on the page will have an instance of Testability.
57687
 * @experimental
57688
 */
57689
var Testability = /** @class */ (function () {
57690
    function Testability(_ngZone) {
57691
        var _this = this;
57692
        this._ngZone = _ngZone;
57693
        this._pendingCount = 0;
57694
        this._isZoneStable = true;
57695
        /**
57696
           * Whether any work was done since the last 'whenStable' callback. This is
57697
           * useful to detect if this could have potentially destabilized another
57698
           * component while it is stabilizing.
57699
           * @internal
57700
           */
57701
        this._didWork = false;
57702
        this._callbacks = [];
57703
        this._watchAngularEvents();
57704
        _ngZone.run(function () { _this.taskTrackingZone = Zone.current.get('TaskTrackingZone'); });
57705
    }
57706
    Testability.prototype._watchAngularEvents = function () {
57707
        var _this = this;
57708
        this._ngZone.onUnstable.subscribe({
57709
            next: function () {
57710
                _this._didWork = true;
57711
                _this._isZoneStable = false;
57712
            }
57713
        });
57714
        this._ngZone.runOutsideAngular(function () {
57715
            _this._ngZone.onStable.subscribe({
57716
                next: function () {
57717
                    NgZone.assertNotInAngularZone();
57718
                    scheduleMicroTask(function () {
57719
                        _this._isZoneStable = true;
57720
                        _this._runCallbacksIfReady();
57721
                    });
57722
                }
57723
            });
57724
        });
57725
    };
57726
    /**
57727
     * Increases the number of pending request
57728
     * @deprecated pending requests are now tracked with zones.
57729
     */
57730
    /**
57731
       * Increases the number of pending request
57732
       * @deprecated pending requests are now tracked with zones.
57733
       */
57734
    Testability.prototype.increasePendingRequestCount = /**
57735
       * Increases the number of pending request
57736
       * @deprecated pending requests are now tracked with zones.
57737
       */
57738
    function () {
57739
        this._pendingCount += 1;
57740
        this._didWork = true;
57741
        return this._pendingCount;
57742
    };
57743
    /**
57744
     * Decreases the number of pending request
57745
     * @deprecated pending requests are now tracked with zones
57746
     */
57747
    /**
57748
       * Decreases the number of pending request
57749
       * @deprecated pending requests are now tracked with zones
57750
       */
57751
    Testability.prototype.decreasePendingRequestCount = /**
57752
       * Decreases the number of pending request
57753
       * @deprecated pending requests are now tracked with zones
57754
       */
57755
    function () {
57756
        this._pendingCount -= 1;
57757
        if (this._pendingCount < 0) {
57758
            throw new Error('pending async requests below zero');
57759
        }
57760
        this._runCallbacksIfReady();
57761
        return this._pendingCount;
57762
    };
57763
    /**
57764
     * Whether an associated application is stable
57765
     */
57766
    /**
57767
       * Whether an associated application is stable
57768
       */
57769
    Testability.prototype.isStable = /**
57770
       * Whether an associated application is stable
57771
       */
57772
    function () {
57773
        return this._isZoneStable && this._pendingCount === 0 && !this._ngZone.hasPendingMacrotasks;
57774
    };
57775
    Testability.prototype._runCallbacksIfReady = function () {
57776
        var _this = this;
57777
        if (this.isStable()) {
57778
            // Schedules the call backs in a new frame so that it is always async.
57779
            scheduleMicroTask(function () {
57780
                while (_this._callbacks.length !== 0) {
57781
                    var cb = (_this._callbacks.pop());
57782
                    clearTimeout(cb.timeoutId);
57783
                    cb.doneCb(_this._didWork);
57784
                }
57785
                _this._didWork = false;
57786
            });
57787
        }
57788
        else {
57789
            // Still not stable, send updates.
57790
            var pending_1 = this.getPendingTasks();
57791
            this._callbacks = this._callbacks.filter(function (cb) {
57792
                if (cb.updateCb && cb.updateCb(pending_1)) {
57793
                    clearTimeout(cb.timeoutId);
57794
                    return false;
57795
                }
57796
                return true;
57797
            });
57798
            this._didWork = true;
57799
        }
57800
    };
57801
    Testability.prototype.getPendingTasks = function () {
57802
        if (!this.taskTrackingZone) {
57803
            return [];
57804
        }
57805
        return this.taskTrackingZone.macroTasks.map(function (t) {
57806
            return {
57807
                source: t.source,
57808
                isPeriodic: t.data.isPeriodic,
57809
                delay: t.data.delay,
57810
                // From TaskTrackingZone:
57811
                // https://github.com/angular/zone.js/blob/master/lib/zone-spec/task-tracking.ts#L40
57812
                creationLocation: t.creationLocation,
57813
                // Added by Zones for XHRs
57814
                // https://github.com/angular/zone.js/blob/master/lib/browser/browser.ts#L133
57815
                xhr: t.data.target
57816
            };
57817
        });
57818
    };
57819
    Testability.prototype.addCallback = function (cb, timeout, updateCb) {
57820
        var _this = this;
57821
        var timeoutId = -1;
57822
        if (timeout && timeout > 0) {
57823
            timeoutId = setTimeout(function () {
57824
                _this._callbacks = _this._callbacks.filter(function (cb) { return cb.timeoutId !== timeoutId; });
57825
                cb(_this._didWork, _this.getPendingTasks());
57826
            }, timeout);
57827
        }
57828
        this._callbacks.push({ doneCb: cb, timeoutId: timeoutId, updateCb: updateCb });
57829
    };
57830
    /**
57831
     * Wait for the application to be stable with a timeout. If the timeout is reached before that
57832
     * happens, the callback receives a list of the macro tasks that were pending, otherwise null.
57833
     *
57834
     * @param doneCb The callback to invoke when Angular is stable or the timeout expires
57835
     *    whichever comes first.
57836
     * @param timeout Optional. The maximum time to wait for Angular to become stable. If not
57837
     *    specified, whenStable() will wait forever.
57838
     * @param updateCb Optional. If specified, this callback will be invoked whenever the set of
57839
     *    pending macrotasks changes. If this callback returns true doneCb will not be invoked
57840
     *    and no further updates will be issued.
57841
     */
57842
    /**
57843
       * Wait for the application to be stable with a timeout. If the timeout is reached before that
57844
       * happens, the callback receives a list of the macro tasks that were pending, otherwise null.
57845
       *
57846
       * @param doneCb The callback to invoke when Angular is stable or the timeout expires
57847
       *    whichever comes first.
57848
       * @param timeout Optional. The maximum time to wait for Angular to become stable. If not
57849
       *    specified, whenStable() will wait forever.
57850
       * @param updateCb Optional. If specified, this callback will be invoked whenever the set of
57851
       *    pending macrotasks changes. If this callback returns true doneCb will not be invoked
57852
       *    and no further updates will be issued.
57853
       */
57854
    Testability.prototype.whenStable = /**
57855
       * Wait for the application to be stable with a timeout. If the timeout is reached before that
57856
       * happens, the callback receives a list of the macro tasks that were pending, otherwise null.
57857
       *
57858
       * @param doneCb The callback to invoke when Angular is stable or the timeout expires
57859
       *    whichever comes first.
57860
       * @param timeout Optional. The maximum time to wait for Angular to become stable. If not
57861
       *    specified, whenStable() will wait forever.
57862
       * @param updateCb Optional. If specified, this callback will be invoked whenever the set of
57863
       *    pending macrotasks changes. If this callback returns true doneCb will not be invoked
57864
       *    and no further updates will be issued.
57865
       */
57866
    function (doneCb, timeout, updateCb) {
57867
        if (updateCb && !this.taskTrackingZone) {
57868
            throw new Error('Task tracking zone is required when passing an update callback to ' +
57869
                'whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');
57870
        }
57871
        // These arguments are 'Function' above to keep the public API simple.
57872
        this.addCallback(doneCb, timeout, updateCb);
57873
        this._runCallbacksIfReady();
57874
    };
57875
    /**
57876
     * Get the number of pending requests
57877
     * @deprecated pending requests are now tracked with zones
57878
     */
57879
    /**
57880
       * Get the number of pending requests
57881
       * @deprecated pending requests are now tracked with zones
57882
       */
57883
    Testability.prototype.getPendingRequestCount = /**
57884
       * Get the number of pending requests
57885
       * @deprecated pending requests are now tracked with zones
57886
       */
57887
    function () { return this._pendingCount; };
57888
    /**
57889
     * Find providers by name
57890
     * @param using The root element to search from
57891
     * @param provider The name of binding variable
57892
     * @param exactMatch Whether using exactMatch
57893
     */
57894
    /**
57895
       * Find providers by name
57896
       * @param using The root element to search from
57897
       * @param provider The name of binding variable
57898
       * @param exactMatch Whether using exactMatch
57899
       */
57900
    Testability.prototype.findProviders = /**
57901
       * Find providers by name
57902
       * @param using The root element to search from
57903
       * @param provider The name of binding variable
57904
       * @param exactMatch Whether using exactMatch
57905
       */
57906
    function (using, provider, exactMatch) {
57907
        // TODO(juliemr): implement.
57908
        return [];
57909
    };
57910
    Testability.decorators = [
57911
        { type: Injectable }
57912
    ];
57913
    /** @nocollapse */
57914
    Testability.ctorParameters = function () { return [
57915
        { type: NgZone, },
57916
    ]; };
57917
    return Testability;
57918
}());
57919
/**
57920
 * A global registry of {@link Testability} instances for specific elements.
57921
 * @experimental
57922
 */
57923
var TestabilityRegistry = /** @class */ (function () {
57924
    function TestabilityRegistry() {
57925
        /** @internal */
57926
        this._applications = new Map();
57927
        _testabilityGetter.addToWindow(this);
57928
    }
57929
    /**
57930
     * Registers an application with a testability hook so that it can be tracked
57931
     * @param token token of application, root element
57932
     * @param testability Testability hook
57933
     */
57934
    /**
57935
       * Registers an application with a testability hook so that it can be tracked
57936
       * @param token token of application, root element
57937
       * @param testability Testability hook
57938
       */
57939
    TestabilityRegistry.prototype.registerApplication = /**
57940
       * Registers an application with a testability hook so that it can be tracked
57941
       * @param token token of application, root element
57942
       * @param testability Testability hook
57943
       */
57944
    function (token, testability) {
57945
        this._applications.set(token, testability);
57946
    };
57947
    /**
57948
     * Unregisters an application.
57949
     * @param token token of application, root element
57950
     */
57951
    /**
57952
       * Unregisters an application.
57953
       * @param token token of application, root element
57954
       */
57955
    TestabilityRegistry.prototype.unregisterApplication = /**
57956
       * Unregisters an application.
57957
       * @param token token of application, root element
57958
       */
57959
    function (token) { this._applications.delete(token); };
57960
    /**
57961
     * Unregisters all applications
57962
     */
57963
    /**
57964
       * Unregisters all applications
57965
       */
57966
    TestabilityRegistry.prototype.unregisterAllApplications = /**
57967
       * Unregisters all applications
57968
       */
57969
    function () { this._applications.clear(); };
57970
    /**
57971
     * Get a testability hook associated with the application
57972
     * @param elem root element
57973
     */
57974
    /**
57975
       * Get a testability hook associated with the application
57976
       * @param elem root element
57977
       */
57978
    TestabilityRegistry.prototype.getTestability = /**
57979
       * Get a testability hook associated with the application
57980
       * @param elem root element
57981
       */
57982
    function (elem) { return this._applications.get(elem) || null; };
57983
    /**
57984
     * Get all registered testabilities
57985
     */
57986
    /**
57987
       * Get all registered testabilities
57988
       */
57989
    TestabilityRegistry.prototype.getAllTestabilities = /**
57990
       * Get all registered testabilities
57991
       */
57992
    function () { return Array.from(this._applications.values()); };
57993
    /**
57994
     * Get all registered applications(root elements)
57995
     */
57996
    /**
57997
       * Get all registered applications(root elements)
57998
       */
57999
    TestabilityRegistry.prototype.getAllRootElements = /**
58000
       * Get all registered applications(root elements)
58001
       */
58002
    function () { return Array.from(this._applications.keys()); };
58003
    /**
58004
     * Find testability of a node in the Tree
58005
     * @param elem node
58006
     * @param findInAncestors whether finding testability in ancestors if testability was not found in
58007
     * current node
58008
     */
58009
    /**
58010
       * Find testability of a node in the Tree
58011
       * @param elem node
58012
       * @param findInAncestors whether finding testability in ancestors if testability was not found in
58013
       * current node
58014
       */
58015
    TestabilityRegistry.prototype.findTestabilityInTree = /**
58016
       * Find testability of a node in the Tree
58017
       * @param elem node
58018
       * @param findInAncestors whether finding testability in ancestors if testability was not found in
58019
       * current node
58020
       */
58021
    function (elem, findInAncestors) {
58022
        if (findInAncestors === void 0) { findInAncestors = true; }
58023
        return _testabilityGetter.findTestabilityInTree(this, elem, findInAncestors);
58024
    };
58025
    TestabilityRegistry.decorators = [
58026
        { type: Injectable }
58027
    ];
58028
    /** @nocollapse */
58029
    TestabilityRegistry.ctorParameters = function () { return []; };
58030
    return TestabilityRegistry;
58031
}());
58032
var _NoopGetTestability = /** @class */ (function () {
58033
    function _NoopGetTestability() {
58034
    }
58035
    _NoopGetTestability.prototype.addToWindow = function (registry) { };
58036
    _NoopGetTestability.prototype.findTestabilityInTree = function (registry, elem, findInAncestors) {
58037
        return null;
58038
    };
58039
    return _NoopGetTestability;
58040
}());
58041
/**
58042
 * Set the {@link GetTestability} implementation used by the Angular testing framework.
58043
 * @experimental
58044
 */
58045
function setTestabilityGetter(getter) {
58046
    _testabilityGetter = getter;
58047
}
58048
var _testabilityGetter = new _NoopGetTestability();
58049
 
58050
/**
58051
 * @license
58052
 * Copyright Google Inc. All Rights Reserved.
58053
 *
58054
 * Use of this source code is governed by an MIT-style license that can be
58055
 * found in the LICENSE file at https://angular.io/license
58056
 */
58057
var _devMode = true;
58058
var _runModeLocked = false;
58059
var _platform;
58060
var ALLOW_MULTIPLE_PLATFORMS = new InjectionToken('AllowMultipleToken');
58061
/**
58062
 * Disable Angular's development mode, which turns off assertions and other
58063
 * checks within the framework.
58064
 *
58065
 * One important assertion this disables verifies that a change detection pass
58066
 * does not result in additional changes to any bindings (also known as
58067
 * unidirectional data flow).
58068
 *
58069
 *
58070
 */
58071
function enableProdMode() {
58072
    if (_runModeLocked) {
58073
        throw new Error('Cannot enable prod mode after platform setup.');
58074
    }
58075
    _devMode = false;
58076
}
58077
/**
58078
 * Returns whether Angular is in development mode. After called once,
58079
 * the value is locked and won't change any more.
58080
 *
58081
 * By default, this is true, unless a user calls `enableProdMode` before calling this.
58082
 *
58083
 * @experimental APIs related to application bootstrap are currently under review.
58084
 */
58085
function isDevMode() {
58086
    _runModeLocked = true;
58087
    return _devMode;
58088
}
58089
/**
58090
 * A token for third-party components that can register themselves with NgProbe.
58091
 *
58092
 * @experimental
58093
 */
58094
var NgProbeToken = /** @class */ (function () {
58095
    function NgProbeToken(name, token) {
58096
        this.name = name;
58097
        this.token = token;
58098
    }
58099
    return NgProbeToken;
58100
}());
58101
/**
58102
 * Creates a platform.
58103
 * Platforms have to be eagerly created via this function.
58104
 *
58105
 * @experimental APIs related to application bootstrap are currently under review.
58106
 */
58107
function createPlatform(injector) {
58108
    if (_platform && !_platform.destroyed &&
58109
        !_platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {
58110
        throw new Error('There can be only one platform. Destroy the previous one to create a new one.');
58111
    }
58112
    _platform = injector.get(PlatformRef);
58113
    var inits = injector.get(PLATFORM_INITIALIZER, null);
58114
    if (inits)
58115
        inits.forEach(function (init) { return init(); });
58116
    return _platform;
58117
}
58118
/**
58119
 * Creates a factory for a platform
58120
 *
58121
 * @experimental APIs related to application bootstrap are currently under review.
58122
 */
58123
function createPlatformFactory(parentPlatformFactory, name, providers) {
58124
    if (providers === void 0) { providers = []; }
58125
    var desc = "Platform: " + name;
58126
    var marker = new InjectionToken(desc);
58127
    return function (extraProviders) {
58128
        if (extraProviders === void 0) { extraProviders = []; }
58129
        var platform = getPlatform();
58130
        if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {
58131
            if (parentPlatformFactory) {
58132
                parentPlatformFactory(providers.concat(extraProviders).concat({ provide: marker, useValue: true }));
58133
            }
58134
            else {
58135
                var injectedProviders = providers.concat(extraProviders).concat({ provide: marker, useValue: true });
58136
                createPlatform(Injector.create({ providers: injectedProviders, name: desc }));
58137
            }
58138
        }
58139
        return assertPlatform(marker);
58140
    };
58141
}
58142
/**
58143
 * Checks that there currently is a platform which contains the given token as a provider.
58144
 *
58145
 * @experimental APIs related to application bootstrap are currently under review.
58146
 */
58147
function assertPlatform(requiredToken) {
58148
    var platform = getPlatform();
58149
    if (!platform) {
58150
        throw new Error('No platform exists!');
58151
    }
58152
    if (!platform.injector.get(requiredToken, null)) {
58153
        throw new Error('A platform with a different configuration has been created. Please destroy it first.');
58154
    }
58155
    return platform;
58156
}
58157
/**
58158
 * Destroy the existing platform.
58159
 *
58160
 * @experimental APIs related to application bootstrap are currently under review.
58161
 */
58162
function destroyPlatform() {
58163
    if (_platform && !_platform.destroyed) {
58164
        _platform.destroy();
58165
    }
58166
}
58167
/**
58168
 * Returns the current platform.
58169
 *
58170
 * @experimental APIs related to application bootstrap are currently under review.
58171
 */
58172
function getPlatform() {
58173
    return _platform && !_platform.destroyed ? _platform : null;
58174
}
58175
/**
58176
 * The Angular platform is the entry point for Angular on a web page. Each page
58177
 * has exactly one platform, and services (such as reflection) which are common
58178
 * to every Angular application running on the page are bound in its scope.
58179
 *
58180
 * A page's platform is initialized implicitly when a platform is created via a platform factory
58181
 * (e.g. {@link platformBrowser}), or explicitly by calling the {@link createPlatform} function.
58182
 *
58183
 *
58184
 */
58185
var PlatformRef = /** @class */ (function () {
58186
    /** @internal */
58187
    function PlatformRef(_injector) {
58188
        this._injector = _injector;
58189
        this._modules = [];
58190
        this._destroyListeners = [];
58191
        this._destroyed = false;
58192
    }
58193
    /**
58194
     * Creates an instance of an `@NgModule` for the given platform
58195
     * for offline compilation.
58196
     *
58197
     * ## Simple Example
58198
     *
58199
     * ```typescript
58200
     * my_module.ts:
58201
     *
58202
     * @NgModule({
58203
     *   imports: [BrowserModule]
58204
     * })
58205
     * class MyModule {}
58206
     *
58207
     * main.ts:
58208
     * import {MyModuleNgFactory} from './my_module.ngfactory';
58209
     * import {platformBrowser} from '@angular/platform-browser';
58210
     *
58211
     * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);
58212
     * ```
58213
     *
58214
     * @experimental APIs related to application bootstrap are currently under review.
58215
     */
58216
    /**
58217
       * Creates an instance of an `@NgModule` for the given platform
58218
       * for offline compilation.
58219
       *
58220
       * ## Simple Example
58221
       *
58222
       * ```typescript
58223
       * my_module.ts:
58224
       *
58225
       * @NgModule({
58226
       *   imports: [BrowserModule]
58227
       * })
58228
       * class MyModule {}
58229
       *
58230
       * main.ts:
58231
       * import {MyModuleNgFactory} from './my_module.ngfactory';
58232
       * import {platformBrowser} from '@angular/platform-browser';
58233
       *
58234
       * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);
58235
       * ```
58236
       *
58237
       * @experimental APIs related to application bootstrap are currently under review.
58238
       */
58239
    PlatformRef.prototype.bootstrapModuleFactory = /**
58240
       * Creates an instance of an `@NgModule` for the given platform
58241
       * for offline compilation.
58242
       *
58243
       * ## Simple Example
58244
       *
58245
       * ```typescript
58246
       * my_module.ts:
58247
       *
58248
       * @NgModule({
58249
       *   imports: [BrowserModule]
58250
       * })
58251
       * class MyModule {}
58252
       *
58253
       * main.ts:
58254
       * import {MyModuleNgFactory} from './my_module.ngfactory';
58255
       * import {platformBrowser} from '@angular/platform-browser';
58256
       *
58257
       * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);
58258
       * ```
58259
       *
58260
       * @experimental APIs related to application bootstrap are currently under review.
58261
       */
58262
    function (moduleFactory, options) {
58263
        var _this = this;
58264
        // Note: We need to create the NgZone _before_ we instantiate the module,
58265
        // as instantiating the module creates some providers eagerly.
58266
        // So we create a mini parent injector that just contains the new NgZone and
58267
        // pass that as parent to the NgModuleFactory.
58268
        var ngZoneOption = options ? options.ngZone : undefined;
58269
        var ngZone = getNgZone(ngZoneOption);
58270
        var providers = [{ provide: NgZone, useValue: ngZone }];
58271
        // Attention: Don't use ApplicationRef.run here,
58272
        // as we want to be sure that all possible constructor calls are inside `ngZone.run`!
58273
        return ngZone.run(function () {
58274
            var ngZoneInjector = Injector.create({ providers: providers, parent: _this.injector, name: moduleFactory.moduleType.name });
58275
            var moduleRef = moduleFactory.create(ngZoneInjector);
58276
            var exceptionHandler = moduleRef.injector.get(ErrorHandler, null);
58277
            if (!exceptionHandler) {
58278
                throw new Error('No ErrorHandler. Is platform module (BrowserModule) included?');
58279
            }
58280
            moduleRef.onDestroy(function () { return remove(_this._modules, moduleRef); });
58281
            ngZone.runOutsideAngular(function () {
58282
                return ngZone.onError.subscribe({ next: function (error) { exceptionHandler.handleError(error); } });
58283
            });
58284
            return _callAndReportToErrorHandler(exceptionHandler, (ngZone), function () {
58285
                var initStatus = moduleRef.injector.get(ApplicationInitStatus);
58286
                initStatus.runInitializers();
58287
                return initStatus.donePromise.then(function () {
58288
                    _this._moduleDoBootstrap(moduleRef);
58289
                    return moduleRef;
58290
                });
58291
            });
58292
        });
58293
    };
58294
    /**
58295
     * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.
58296
     *
58297
     * ## Simple Example
58298
     *
58299
     * ```typescript
58300
     * @NgModule({
58301
     *   imports: [BrowserModule]
58302
     * })
58303
     * class MyModule {}
58304
     *
58305
     * let moduleRef = platformBrowser().bootstrapModule(MyModule);
58306
     * ```
58307
     *
58308
     */
58309
    /**
58310
       * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.
58311
       *
58312
       * ## Simple Example
58313
       *
58314
       * ```typescript
58315
       * @NgModule({
58316
       *   imports: [BrowserModule]
58317
       * })
58318
       * class MyModule {}
58319
       *
58320
       * let moduleRef = platformBrowser().bootstrapModule(MyModule);
58321
       * ```
58322
       *
58323
       */
58324
    PlatformRef.prototype.bootstrapModule = /**
58325
       * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.
58326
       *
58327
       * ## Simple Example
58328
       *
58329
       * ```typescript
58330
       * @NgModule({
58331
       *   imports: [BrowserModule]
58332
       * })
58333
       * class MyModule {}
58334
       *
58335
       * let moduleRef = platformBrowser().bootstrapModule(MyModule);
58336
       * ```
58337
       *
58338
       */
58339
    function (moduleType, compilerOptions) {
58340
        var _this = this;
58341
        if (compilerOptions === void 0) { compilerOptions = []; }
58342
        var compilerFactory = this.injector.get(CompilerFactory);
58343
        var options = optionsReducer({}, compilerOptions);
58344
        var compiler = compilerFactory.createCompiler([options]);
58345
        return compiler.compileModuleAsync(moduleType)
58346
            .then(function (moduleFactory) { return _this.bootstrapModuleFactory(moduleFactory, options); });
58347
    };
58348
    PlatformRef.prototype._moduleDoBootstrap = function (moduleRef) {
58349
        var appRef = moduleRef.injector.get(ApplicationRef);
58350
        if (moduleRef._bootstrapComponents.length > 0) {
58351
            moduleRef._bootstrapComponents.forEach(function (f) { return appRef.bootstrap(f); });
58352
        }
58353
        else if (moduleRef.instance.ngDoBootstrap) {
58354
            moduleRef.instance.ngDoBootstrap(appRef);
58355
        }
58356
        else {
58357
            throw new Error("The module " + stringify(moduleRef.instance.constructor) + " was bootstrapped, but it does not declare \"@NgModule.bootstrap\" components nor a \"ngDoBootstrap\" method. " +
58358
                "Please define one of these.");
58359
        }
58360
        this._modules.push(moduleRef);
58361
    };
58362
    /**
58363
     * Register a listener to be called when the platform is disposed.
58364
     */
58365
    /**
58366
       * Register a listener to be called when the platform is disposed.
58367
       */
58368
    PlatformRef.prototype.onDestroy = /**
58369
       * Register a listener to be called when the platform is disposed.
58370
       */
58371
    function (callback) { this._destroyListeners.push(callback); };
58372
    Object.defineProperty(PlatformRef.prototype, "injector", {
58373
        /**
58374
         * Retrieve the platform {@link Injector}, which is the parent injector for
58375
         * every Angular application on the page and provides singleton providers.
58376
         */
58377
        get: /**
58378
           * Retrieve the platform {@link Injector}, which is the parent injector for
58379
           * every Angular application on the page and provides singleton providers.
58380
           */
58381
        function () { return this._injector; },
58382
        enumerable: true,
58383
        configurable: true
58384
    });
58385
    /**
58386
     * Destroy the Angular platform and all Angular applications on the page.
58387
     */
58388
    /**
58389
       * Destroy the Angular platform and all Angular applications on the page.
58390
       */
58391
    PlatformRef.prototype.destroy = /**
58392
       * Destroy the Angular platform and all Angular applications on the page.
58393
       */
58394
    function () {
58395
        if (this._destroyed) {
58396
            throw new Error('The platform has already been destroyed!');
58397
        }
58398
        this._modules.slice().forEach(function (module) { return module.destroy(); });
58399
        this._destroyListeners.forEach(function (listener) { return listener(); });
58400
        this._destroyed = true;
58401
    };
58402
    Object.defineProperty(PlatformRef.prototype, "destroyed", {
58403
        get: function () { return this._destroyed; },
58404
        enumerable: true,
58405
        configurable: true
58406
    });
58407
    PlatformRef.decorators = [
58408
        { type: Injectable }
58409
    ];
58410
    /** @nocollapse */
58411
    PlatformRef.ctorParameters = function () { return [
58412
        { type: Injector, },
58413
    ]; };
58414
    return PlatformRef;
58415
}());
58416
function getNgZone(ngZoneOption) {
58417
    var ngZone;
58418
    if (ngZoneOption === 'noop') {
58419
        ngZone = new NoopNgZone();
58420
    }
58421
    else {
58422
        ngZone = (ngZoneOption === 'zone.js' ? undefined : ngZoneOption) ||
58423
            new NgZone({ enableLongStackTrace: isDevMode() });
58424
    }
58425
    return ngZone;
58426
}
58427
function _callAndReportToErrorHandler(errorHandler, ngZone, callback) {
58428
    try {
58429
        var result = callback();
58430
        if (isPromise(result)) {
58431
            return result.catch(function (e) {
58432
                ngZone.runOutsideAngular(function () { return errorHandler.handleError(e); });
58433
                // rethrow as the exception handler might not do it
58434
                throw e;
58435
            });
58436
        }
58437
        return result;
58438
    }
58439
    catch (e) {
58440
        ngZone.runOutsideAngular(function () { return errorHandler.handleError(e); });
58441
        // rethrow as the exception handler might not do it
58442
        throw e;
58443
    }
58444
}
58445
function optionsReducer(dst, objs) {
58446
    if (Array.isArray(objs)) {
58447
        dst = objs.reduce(optionsReducer, dst);
58448
    }
58449
    else {
58450
        dst = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, dst, objs);
58451
    }
58452
    return dst;
58453
}
58454
/**
58455
 * A reference to an Angular application running on a page.
58456
 *
58457
 *
58458
 */
58459
var ApplicationRef = /** @class */ (function () {
58460
    /** @internal */
58461
    function ApplicationRef(_zone, _console, _injector, _exceptionHandler, _componentFactoryResolver, _initStatus) {
58462
        var _this = this;
58463
        this._zone = _zone;
58464
        this._console = _console;
58465
        this._injector = _injector;
58466
        this._exceptionHandler = _exceptionHandler;
58467
        this._componentFactoryResolver = _componentFactoryResolver;
58468
        this._initStatus = _initStatus;
58469
        this._bootstrapListeners = [];
58470
        this._views = [];
58471
        this._runningTick = false;
58472
        this._enforceNoNewChanges = false;
58473
        this._stable = true;
58474
        /**
58475
           * Get a list of component types registered to this application.
58476
           * This list is populated even before the component is created.
58477
           */
58478
        this.componentTypes = [];
58479
        /**
58480
           * Get a list of components registered to this application.
58481
           */
58482
        this.components = [];
58483
        this._enforceNoNewChanges = isDevMode();
58484
        this._zone.onMicrotaskEmpty.subscribe({ next: function () { _this._zone.run(function () { _this.tick(); }); } });
58485
        var isCurrentlyStable = new rxjs__WEBPACK_IMPORTED_MODULE_1__["Observable"](function (observer) {
58486
            _this._stable = _this._zone.isStable && !_this._zone.hasPendingMacrotasks &&
58487
                !_this._zone.hasPendingMicrotasks;
58488
            _this._zone.runOutsideAngular(function () {
58489
                observer.next(_this._stable);
58490
                observer.complete();
58491
            });
58492
        });
58493
        var isStable = new rxjs__WEBPACK_IMPORTED_MODULE_1__["Observable"](function (observer) {
58494
            // Create the subscription to onStable outside the Angular Zone so that
58495
            // the callback is run outside the Angular Zone.
58496
            var stableSub;
58497
            _this._zone.runOutsideAngular(function () {
58498
                stableSub = _this._zone.onStable.subscribe(function () {
58499
                    NgZone.assertNotInAngularZone();
58500
                    // Check whether there are no pending macro/micro tasks in the next tick
58501
                    // to allow for NgZone to update the state.
58502
                    scheduleMicroTask(function () {
58503
                        if (!_this._stable && !_this._zone.hasPendingMacrotasks &&
58504
                            !_this._zone.hasPendingMicrotasks) {
58505
                            _this._stable = true;
58506
                            observer.next(true);
58507
                        }
58508
                    });
58509
                });
58510
            });
58511
            var unstableSub = _this._zone.onUnstable.subscribe(function () {
58512
                NgZone.assertInAngularZone();
58513
                if (_this._stable) {
58514
                    _this._stable = false;
58515
                    _this._zone.runOutsideAngular(function () { observer.next(false); });
58516
                }
58517
            });
58518
            return function () {
58519
                stableSub.unsubscribe();
58520
                unstableSub.unsubscribe();
58521
            };
58522
        });
58523
        this.isStable =
58524
            Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["merge"])(isCurrentlyStable, isStable.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["share"])()));
58525
    }
58526
    /**
58527
     * Bootstrap a new component at the root level of the application.
58528
     *
58529
     * ### Bootstrap process
58530
     *
58531
     * When bootstrapping a new root component into an application, Angular mounts the
58532
     * specified application component onto DOM elements identified by the [componentType]'s
58533
     * selector and kicks off automatic change detection to finish initializing the component.
58534
     *
58535
     * Optionally, a component can be mounted onto a DOM element that does not match the
58536
     * [componentType]'s selector.
58537
     *
58538
     * ### Example
58539
     * {@example core/ts/platform/platform.ts region='longform'}
58540
     */
58541
    /**
58542
       * Bootstrap a new component at the root level of the application.
58543
       *
58544
       * ### Bootstrap process
58545
       *
58546
       * When bootstrapping a new root component into an application, Angular mounts the
58547
       * specified application component onto DOM elements identified by the [componentType]'s
58548
       * selector and kicks off automatic change detection to finish initializing the component.
58549
       *
58550
       * Optionally, a component can be mounted onto a DOM element that does not match the
58551
       * [componentType]'s selector.
58552
       *
58553
       * ### Example
58554
       * {@example core/ts/platform/platform.ts region='longform'}
58555
       */
58556
    ApplicationRef.prototype.bootstrap = /**
58557
       * Bootstrap a new component at the root level of the application.
58558
       *
58559
       * ### Bootstrap process
58560
       *
58561
       * When bootstrapping a new root component into an application, Angular mounts the
58562
       * specified application component onto DOM elements identified by the [componentType]'s
58563
       * selector and kicks off automatic change detection to finish initializing the component.
58564
       *
58565
       * Optionally, a component can be mounted onto a DOM element that does not match the
58566
       * [componentType]'s selector.
58567
       *
58568
       * ### Example
58569
       * {@example core/ts/platform/platform.ts region='longform'}
58570
       */
58571
    function (componentOrFactory, rootSelectorOrNode) {
58572
        var _this = this;
58573
        if (!this._initStatus.done) {
58574
            throw new Error('Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.');
58575
        }
58576
        var componentFactory;
58577
        if (componentOrFactory instanceof ComponentFactory) {
58578
            componentFactory = componentOrFactory;
58579
        }
58580
        else {
58581
            componentFactory =
58582
                (this._componentFactoryResolver.resolveComponentFactory(componentOrFactory));
58583
        }
58584
        this.componentTypes.push(componentFactory.componentType);
58585
        // Create a factory associated with the current module if it's not bound to some other
58586
        var ngModule = componentFactory instanceof ComponentFactoryBoundToModule ?
58587
            null :
58588
            this._injector.get(NgModuleRef);
58589
        var selectorOrNode = rootSelectorOrNode || componentFactory.selector;
58590
        var compRef = componentFactory.create(Injector.NULL, [], selectorOrNode, ngModule);
58591
        compRef.onDestroy(function () { _this._unloadComponent(compRef); });
58592
        var testability = compRef.injector.get(Testability, null);
58593
        if (testability) {
58594
            compRef.injector.get(TestabilityRegistry)
58595
                .registerApplication(compRef.location.nativeElement, testability);
58596
        }
58597
        this._loadComponent(compRef);
58598
        if (isDevMode()) {
58599
            this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode.");
58600
        }
58601
        return compRef;
58602
    };
58603
    /**
58604
     * Invoke this method to explicitly process change detection and its side-effects.
58605
     *
58606
     * In development mode, `tick()` also performs a second change detection cycle to ensure that no
58607
     * further changes are detected. If additional changes are picked up during this second cycle,
58608
     * bindings in the app have side-effects that cannot be resolved in a single change detection
58609
     * pass.
58610
     * In this case, Angular throws an error, since an Angular application can only have one change
58611
     * detection pass during which all change detection must complete.
58612
     */
58613
    /**
58614
       * Invoke this method to explicitly process change detection and its side-effects.
58615
       *
58616
       * In development mode, `tick()` also performs a second change detection cycle to ensure that no
58617
       * further changes are detected. If additional changes are picked up during this second cycle,
58618
       * bindings in the app have side-effects that cannot be resolved in a single change detection
58619
       * pass.
58620
       * In this case, Angular throws an error, since an Angular application can only have one change
58621
       * detection pass during which all change detection must complete.
58622
       */
58623
    ApplicationRef.prototype.tick = /**
58624
       * Invoke this method to explicitly process change detection and its side-effects.
58625
       *
58626
       * In development mode, `tick()` also performs a second change detection cycle to ensure that no
58627
       * further changes are detected. If additional changes are picked up during this second cycle,
58628
       * bindings in the app have side-effects that cannot be resolved in a single change detection
58629
       * pass.
58630
       * In this case, Angular throws an error, since an Angular application can only have one change
58631
       * detection pass during which all change detection must complete.
58632
       */
58633
    function () {
58634
        var _this = this;
58635
        if (this._runningTick) {
58636
            throw new Error('ApplicationRef.tick is called recursively');
58637
        }
58638
        var scope = ApplicationRef._tickScope();
58639
        try {
58640
            this._runningTick = true;
58641
            this._views.forEach(function (view) { return view.detectChanges(); });
58642
            if (this._enforceNoNewChanges) {
58643
                this._views.forEach(function (view) { return view.checkNoChanges(); });
58644
            }
58645
        }
58646
        catch (e) {
58647
            // Attention: Don't rethrow as it could cancel subscriptions to Observables!
58648
            this._zone.runOutsideAngular(function () { return _this._exceptionHandler.handleError(e); });
58649
        }
58650
        finally {
58651
            this._runningTick = false;
58652
            wtfLeave(scope);
58653
        }
58654
    };
58655
    /**
58656
     * Attaches a view so that it will be dirty checked.
58657
     * The view will be automatically detached when it is destroyed.
58658
     * This will throw if the view is already attached to a ViewContainer.
58659
     */
58660
    /**
58661
       * Attaches a view so that it will be dirty checked.
58662
       * The view will be automatically detached when it is destroyed.
58663
       * This will throw if the view is already attached to a ViewContainer.
58664
       */
58665
    ApplicationRef.prototype.attachView = /**
58666
       * Attaches a view so that it will be dirty checked.
58667
       * The view will be automatically detached when it is destroyed.
58668
       * This will throw if the view is already attached to a ViewContainer.
58669
       */
58670
    function (viewRef) {
58671
        var view = viewRef;
58672
        this._views.push(view);
58673
        view.attachToAppRef(this);
58674
    };
58675
    /**
58676
     * Detaches a view from dirty checking again.
58677
     */
58678
    /**
58679
       * Detaches a view from dirty checking again.
58680
       */
58681
    ApplicationRef.prototype.detachView = /**
58682
       * Detaches a view from dirty checking again.
58683
       */
58684
    function (viewRef) {
58685
        var view = viewRef;
58686
        remove(this._views, view);
58687
        view.detachFromAppRef();
58688
    };
58689
    ApplicationRef.prototype._loadComponent = function (componentRef) {
58690
        this.attachView(componentRef.hostView);
58691
        this.tick();
58692
        this.components.push(componentRef);
58693
        // Get the listeners lazily to prevent DI cycles.
58694
        var listeners = this._injector.get(APP_BOOTSTRAP_LISTENER, []).concat(this._bootstrapListeners);
58695
        listeners.forEach(function (listener) { return listener(componentRef); });
58696
    };
58697
    ApplicationRef.prototype._unloadComponent = function (componentRef) {
58698
        this.detachView(componentRef.hostView);
58699
        remove(this.components, componentRef);
58700
    };
58701
    /** @internal */
58702
    /** @internal */
58703
    ApplicationRef.prototype.ngOnDestroy = /** @internal */
58704
    function () {
58705
        // TODO(alxhub): Dispose of the NgZone.
58706
        this._views.slice().forEach(function (view) { return view.destroy(); });
58707
    };
58708
    Object.defineProperty(ApplicationRef.prototype, "viewCount", {
58709
        /**
58710
         * Returns the number of attached views.
58711
         */
58712
        get: /**
58713
           * Returns the number of attached views.
58714
           */
58715
        function () { return this._views.length; },
58716
        enumerable: true,
58717
        configurable: true
58718
    });
58719
    /** @internal */
58720
    ApplicationRef._tickScope = wtfCreateScope('ApplicationRef#tick()');
58721
    ApplicationRef.decorators = [
58722
        { type: Injectable }
58723
    ];
58724
    /** @nocollapse */
58725
    ApplicationRef.ctorParameters = function () { return [
58726
        { type: NgZone, },
58727
        { type: Console, },
58728
        { type: Injector, },
58729
        { type: ErrorHandler, },
58730
        { type: ComponentFactoryResolver, },
58731
        { type: ApplicationInitStatus, },
58732
    ]; };
58733
    return ApplicationRef;
58734
}());
58735
function remove(list, el) {
58736
    var index = list.indexOf(el);
58737
    if (index > -1) {
58738
        list.splice(index, 1);
58739
    }
58740
}
58741
 
58742
/**
58743
 * @license
58744
 * Copyright Google Inc. All Rights Reserved.
58745
 *
58746
 * Use of this source code is governed by an MIT-style license that can be
58747
 * found in the LICENSE file at https://angular.io/license
58748
 */
58749
 
58750
/**
58751
 * @license
58752
 * Copyright Google Inc. All Rights Reserved.
58753
 *
58754
 * Use of this source code is governed by an MIT-style license that can be
58755
 * found in the LICENSE file at https://angular.io/license
58756
 */
58757
/**
58758
 * @deprecated Use `RendererType2` (and `Renderer2`) instead.
58759
 */
58760
var RenderComponentType = /** @class */ (function () {
58761
    function RenderComponentType(id, templateUrl, slotCount, encapsulation, styles, animations) {
58762
        this.id = id;
58763
        this.templateUrl = templateUrl;
58764
        this.slotCount = slotCount;
58765
        this.encapsulation = encapsulation;
58766
        this.styles = styles;
58767
        this.animations = animations;
58768
    }
58769
    return RenderComponentType;
58770
}());
58771
/**
58772
 * @deprecated Debug info is handeled internally in the view engine now.
58773
 */
58774
var RenderDebugInfo = /** @class */ (function () {
58775
    function RenderDebugInfo() {
58776
    }
58777
    return RenderDebugInfo;
58778
}());
58779
/**
58780
 * @deprecated Use the `Renderer2` instead.
58781
 */
58782
var Renderer = /** @class */ (function () {
58783
    function Renderer() {
58784
    }
58785
    return Renderer;
58786
}());
58787
var Renderer2Interceptor = new InjectionToken('Renderer2Interceptor');
58788
/**
58789
 * Injectable service that provides a low-level interface for modifying the UI.
58790
 *
58791
 * Use this service to bypass Angular's templating and make custom UI changes that can't be
58792
 * expressed declaratively. For example if you need to set a property or an attribute whose name is
58793
 * not statically known, use {@link Renderer#setElementProperty setElementProperty} or
58794
 * {@link Renderer#setElementAttribute setElementAttribute} respectively.
58795
 *
58796
 * If you are implementing a custom renderer, you must implement this interface.
58797
 *
58798
 * The default Renderer implementation is `DomRenderer`. Also available is `WebWorkerRenderer`.
58799
 *
58800
 * @deprecated Use `RendererFactory2` instead.
58801
 */
58802
var RootRenderer = /** @class */ (function () {
58803
    function RootRenderer() {
58804
    }
58805
    return RootRenderer;
58806
}());
58807
/**
58808
 * @experimental
58809
 */
58810
var RendererFactory2 = /** @class */ (function () {
58811
    function RendererFactory2() {
58812
    }
58813
    return RendererFactory2;
58814
}());
58815
/**
58816
 * @experimental
58817
 */
58818
/**
58819
 * @experimental
58820
 */
58821
var RendererStyleFlags2;
58822
/**
58823
 * @experimental
58824
 */
58825
(function (RendererStyleFlags2) {
58826
    RendererStyleFlags2[RendererStyleFlags2["Important"] = 1] = "Important";
58827
    RendererStyleFlags2[RendererStyleFlags2["DashCase"] = 2] = "DashCase";
58828
})(RendererStyleFlags2 || (RendererStyleFlags2 = {}));
58829
/**
58830
 * @experimental
58831
 */
58832
var Renderer2 = /** @class */ (function () {
58833
    function Renderer2() {
58834
    }
58835
    return Renderer2;
58836
}());
58837
 
58838
/**
58839
 * @license
58840
 * Copyright Google Inc. All Rights Reserved.
58841
 *
58842
 * Use of this source code is governed by an MIT-style license that can be
58843
 * found in the LICENSE file at https://angular.io/license
58844
 */
58845
 
58846
/**
58847
 * @license
58848
 * Copyright Google Inc. All Rights Reserved.
58849
 *
58850
 * Use of this source code is governed by an MIT-style license that can be
58851
 * found in the LICENSE file at https://angular.io/license
58852
 */
58853
/**
58854
 * A wrapper around a native element inside of a View.
58855
 *
58856
 * An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM
58857
 * element.
58858
 *
58859
 * @security Permitting direct access to the DOM can make your application more vulnerable to
58860
 * XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the
58861
 * [Security Guide](http://g.co/ng/security).
58862
 *
58863
 *
58864
 */
58865
// Note: We don't expose things like `Injector`, `ViewContainer`, ... here,
58866
// i.e. users have to ask for what they need. With that, we can build better analysis tools
58867
// and could do better codegen in the future.
58868
var ElementRef = /** @class */ (function () {
58869
    function ElementRef(nativeElement) {
58870
        this.nativeElement = nativeElement;
58871
    }
58872
    return ElementRef;
58873
}());
58874
 
58875
/**
58876
 * @license
58877
 * Copyright Google Inc. All Rights Reserved.
58878
 *
58879
 * Use of this source code is governed by an MIT-style license that can be
58880
 * found in the LICENSE file at https://angular.io/license
58881
 */
58882
/**
58883
 * Used to load ng module factories.
58884
 *
58885
 */
58886
var NgModuleFactoryLoader = /** @class */ (function () {
58887
    function NgModuleFactoryLoader() {
58888
    }
58889
    return NgModuleFactoryLoader;
58890
}());
58891
var moduleFactories = new Map();
58892
/**
58893
 * Registers a loaded module. Should only be called from generated NgModuleFactory code.
58894
 * @experimental
58895
 */
58896
function registerModuleFactory(id, factory) {
58897
    var existing = moduleFactories.get(id);
58898
    if (existing) {
58899
        throw new Error("Duplicate module registered for " + id + " - " + existing.moduleType.name + " vs " + factory.moduleType.name);
58900
    }
58901
    moduleFactories.set(id, factory);
58902
}
58903
 
58904
/**
58905
 * Returns the NgModuleFactory with the given id, if it exists and has been loaded.
58906
 * Factories for modules that do not specify an `id` cannot be retrieved. Throws if the module
58907
 * cannot be found.
58908
 * @experimental
58909
 */
58910
function getModuleFactory(id) {
58911
    var factory = moduleFactories.get(id);
58912
    if (!factory)
58913
        throw new Error("No module with ID " + id + " loaded");
58914
    return factory;
58915
}
58916
 
58917
/**
58918
 * @license
58919
 * Copyright Google Inc. All Rights Reserved.
58920
 *
58921
 * Use of this source code is governed by an MIT-style license that can be
58922
 * found in the LICENSE file at https://angular.io/license
58923
 */
58924
/**
58925
 * An unmodifiable list of items that Angular keeps up to date when the state
58926
 * of the application changes.
58927
 *
58928
 * The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList}
58929
 * provide.
58930
 *
58931
 * Implements an iterable interface, therefore it can be used in both ES6
58932
 * javascript `for (var i of items)` loops as well as in Angular templates with
58933
 * `*ngFor="let i of myList"`.
58934
 *
58935
 * Changes can be observed by subscribing to the changes `Observable`.
58936
 *
58937
 * NOTE: In the future this class will implement an `Observable` interface.
58938
 *
58939
 * ### Example ([live demo](http://plnkr.co/edit/RX8sJnQYl9FWuSCWme5z?p=preview))
58940
 * ```typescript
58941
 * @Component({...})
58942
 * class Container {
58943
 *   @ViewChildren(Item) items:QueryList<Item>;
58944
 * }
58945
 * ```
58946
 *
58947
 */
58948
var QueryList = /** @class */ (function () {
58949
    function QueryList() {
58950
        this.dirty = true;
58951
        this._results = [];
58952
        this.changes = new EventEmitter();
58953
        this.length = 0;
58954
    }
58955
    /**
58956
     * See
58957
     * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
58958
     */
58959
    /**
58960
       * See
58961
       * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
58962
       */
58963
    QueryList.prototype.map = /**
58964
       * See
58965
       * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
58966
       */
58967
    function (fn) { return this._results.map(fn); };
58968
    /**
58969
     * See
58970
     * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
58971
     */
58972
    /**
58973
       * See
58974
       * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
58975
       */
58976
    QueryList.prototype.filter = /**
58977
       * See
58978
       * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
58979
       */
58980
    function (fn) {
58981
        return this._results.filter(fn);
58982
    };
58983
    /**
58984
     * See
58985
     * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
58986
     */
58987
    /**
58988
       * See
58989
       * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
58990
       */
58991
    QueryList.prototype.find = /**
58992
       * See
58993
       * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
58994
       */
58995
    function (fn) {
58996
        return this._results.find(fn);
58997
    };
58998
    /**
58999
     * See
59000
     * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
59001
     */
59002
    /**
59003
       * See
59004
       * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
59005
       */
59006
    QueryList.prototype.reduce = /**
59007
       * See
59008
       * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
59009
       */
59010
    function (fn, init) {
59011
        return this._results.reduce(fn, init);
59012
    };
59013
    /**
59014
     * See
59015
     * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
59016
     */
59017
    /**
59018
       * See
59019
       * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
59020
       */
59021
    QueryList.prototype.forEach = /**
59022
       * See
59023
       * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
59024
       */
59025
    function (fn) { this._results.forEach(fn); };
59026
    /**
59027
     * See
59028
     * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
59029
     */
59030
    /**
59031
       * See
59032
       * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
59033
       */
59034
    QueryList.prototype.some = /**
59035
       * See
59036
       * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
59037
       */
59038
    function (fn) {
59039
        return this._results.some(fn);
59040
    };
59041
    QueryList.prototype.toArray = function () { return this._results.slice(); };
59042
    QueryList.prototype[getSymbolIterator()] = function () { return this._results[getSymbolIterator()](); };
59043
    QueryList.prototype.toString = function () { return this._results.toString(); };
59044
    QueryList.prototype.reset = function (res) {
59045
        this._results = flatten(res);
59046
        this.dirty = false;
59047
        this.length = this._results.length;
59048
        this.last = this._results[this.length - 1];
59049
        this.first = this._results[0];
59050
    };
59051
    QueryList.prototype.notifyOnChanges = function () { this.changes.emit(this); };
59052
    /** internal */
59053
    /** internal */
59054
    QueryList.prototype.setDirty = /** internal */
59055
    function () { this.dirty = true; };
59056
    /** internal */
59057
    /** internal */
59058
    QueryList.prototype.destroy = /** internal */
59059
    function () {
59060
        this.changes.complete();
59061
        this.changes.unsubscribe();
59062
    };
59063
    return QueryList;
59064
}());
59065
function flatten(list) {
59066
    return list.reduce(function (flat, item) {
59067
        var flatItem = Array.isArray(item) ? flatten(item) : item;
59068
        return flat.concat(flatItem);
59069
    }, []);
59070
}
59071
 
59072
/**
59073
 * @license
59074
 * Copyright Google Inc. All Rights Reserved.
59075
 *
59076
 * Use of this source code is governed by an MIT-style license that can be
59077
 * found in the LICENSE file at https://angular.io/license
59078
 */
59079
var _SEPARATOR = '#';
59080
var FACTORY_CLASS_SUFFIX = 'NgFactory';
59081
/**
59082
 * Configuration for SystemJsNgModuleLoader.
59083
 * token.
59084
 *
59085
 * @experimental
59086
 */
59087
var SystemJsNgModuleLoaderConfig = /** @class */ (function () {
59088
    function SystemJsNgModuleLoaderConfig() {
59089
    }
59090
    return SystemJsNgModuleLoaderConfig;
59091
}());
59092
var DEFAULT_CONFIG = {
59093
    factoryPathPrefix: '',
59094
    factoryPathSuffix: '.ngfactory',
59095
};
59096
/**
59097
 * NgModuleFactoryLoader that uses SystemJS to load NgModuleFactory
59098
 * @experimental
59099
 */
59100
var SystemJsNgModuleLoader = /** @class */ (function () {
59101
    function SystemJsNgModuleLoader(_compiler, config) {
59102
        this._compiler = _compiler;
59103
        this._config = config || DEFAULT_CONFIG;
59104
    }
59105
    SystemJsNgModuleLoader.prototype.load = function (path) {
59106
        var offlineMode = this._compiler instanceof Compiler;
59107
        return offlineMode ? this.loadFactory(path) : this.loadAndCompile(path);
59108
    };
59109
    SystemJsNgModuleLoader.prototype.loadAndCompile = function (path) {
59110
        var _this = this;
59111
        var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(path.split(_SEPARATOR), 2), module = _a[0], exportName = _a[1];
59112
        if (exportName === undefined) {
59113
            exportName = 'default';
59114
        }
59115
        return __webpack_require__("./src/$$_lazy_route_resource lazy recursive")(module)
59116
            .then(function (module) { return module[exportName]; })
59117
            .then(function (type) { return checkNotEmpty(type, module, exportName); })
59118
            .then(function (type) { return _this._compiler.compileModuleAsync(type); });
59119
    };
59120
    SystemJsNgModuleLoader.prototype.loadFactory = function (path) {
59121
        var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(path.split(_SEPARATOR), 2), module = _a[0], exportName = _a[1];
59122
        var factoryClassSuffix = FACTORY_CLASS_SUFFIX;
59123
        if (exportName === undefined) {
59124
            exportName = 'default';
59125
            factoryClassSuffix = '';
59126
        }
59127
        return __webpack_require__("./src/$$_lazy_route_resource lazy recursive")(this._config.factoryPathPrefix + module + this._config.factoryPathSuffix)
59128
            .then(function (module) { return module[exportName + factoryClassSuffix]; })
59129
            .then(function (factory) { return checkNotEmpty(factory, module, exportName); });
59130
    };
59131
    SystemJsNgModuleLoader.decorators = [
59132
        { type: Injectable }
59133
    ];
59134
    /** @nocollapse */
59135
    SystemJsNgModuleLoader.ctorParameters = function () { return [
59136
        { type: Compiler, },
59137
        { type: SystemJsNgModuleLoaderConfig, decorators: [{ type: Optional },] },
59138
    ]; };
59139
    return SystemJsNgModuleLoader;
59140
}());
59141
function checkNotEmpty(value, modulePath, exportName) {
59142
    if (!value) {
59143
        throw new Error("Cannot find '" + exportName + "' in '" + modulePath + "'");
59144
    }
59145
    return value;
59146
}
59147
 
59148
/**
59149
 * @license
59150
 * Copyright Google Inc. All Rights Reserved.
59151
 *
59152
 * Use of this source code is governed by an MIT-style license that can be
59153
 * found in the LICENSE file at https://angular.io/license
59154
 */
59155
/**
59156
 * Represents an Embedded Template that can be used to instantiate Embedded Views.
59157
 *
59158
 * You can access a `TemplateRef`, in two ways. Via a directive placed on a `<ng-template>` element
59159
 * (or directive prefixed with `*`) and have the `TemplateRef` for this Embedded View injected into
59160
 * the constructor of the directive using the `TemplateRef` Token. Alternatively you can query for
59161
 * the `TemplateRef` from a Component or a Directive via {@link Query}.
59162
 *
59163
 * To instantiate Embedded Views based on a Template, use {@link ViewContainerRef#
59164
 * createEmbeddedView}, which will create the View and attach it to the View Container.
59165
 *
59166
 */
59167
var TemplateRef = /** @class */ (function () {
59168
    function TemplateRef() {
59169
    }
59170
    return TemplateRef;
59171
}());
59172
 
59173
/**
59174
 * @license
59175
 * Copyright Google Inc. All Rights Reserved.
59176
 *
59177
 * Use of this source code is governed by an MIT-style license that can be
59178
 * found in the LICENSE file at https://angular.io/license
59179
 */
59180
/**
59181
 * Represents a container where one or more Views can be attached.
59182
 *
59183
 * The container can contain two kinds of Views. Host Views, created by instantiating a
59184
 * {@link Component} via {@link #createComponent}, and Embedded Views, created by instantiating an
59185
 * {@link TemplateRef Embedded Template} via {@link #createEmbeddedView}.
59186
 *
59187
 * The location of the View Container within the containing View is specified by the Anchor
59188
 * `element`. Each View Container can have only one Anchor Element and each Anchor Element can only
59189
 * have a single View Container.
59190
 *
59191
 * Root elements of Views attached to this container become siblings of the Anchor Element in
59192
 * the Rendered View.
59193
 *
59194
 * To access a `ViewContainerRef` of an Element, you can either place a {@link Directive} injected
59195
 * with `ViewContainerRef` on the Element, or you obtain it via a {@link ViewChild} query.
59196
 *
59197
 */
59198
var ViewContainerRef = /** @class */ (function () {
59199
    function ViewContainerRef() {
59200
    }
59201
    return ViewContainerRef;
59202
}());
59203
 
59204
/**
59205
 * @license
59206
 * Copyright Google Inc. All Rights Reserved.
59207
 *
59208
 * Use of this source code is governed by an MIT-style license that can be
59209
 * found in the LICENSE file at https://angular.io/license
59210
 */
59211
var ChangeDetectorRef = /** @class */ (function () {
59212
    function ChangeDetectorRef() {
59213
    }
59214
    return ChangeDetectorRef;
59215
}());
59216
 
59217
/**
59218
 * @license
59219
 * Copyright Google Inc. All Rights Reserved.
59220
 *
59221
 * Use of this source code is governed by an MIT-style license that can be
59222
 * found in the LICENSE file at https://angular.io/license
59223
 */
59224
var ViewRef = /** @class */ (function (_super) {
59225
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ViewRef, _super);
59226
    function ViewRef() {
59227
        return _super !== null && _super.apply(this, arguments) || this;
59228
    }
59229
    return ViewRef;
59230
}(ChangeDetectorRef));
59231
/**
59232
 * Represents an Angular View.
59233
 *
59234
 * <!-- TODO: move the next two paragraphs to the dev guide -->
59235
 * A View is a fundamental building block of the application UI. It is the smallest grouping of
59236
 * Elements which are created and destroyed together.
59237
 *
59238
 * Properties of elements in a View can change, but the structure (number and order) of elements in
59239
 * a View cannot. Changing the structure of Elements can only be done by inserting, moving or
59240
 * removing nested Views via a {@link ViewContainerRef}. Each View can contain many View Containers.
59241
 * <!-- /TODO -->
59242
 *
59243
 * ### Example
59244
 *
59245
 * Given this template...
59246
 *
59247
 * ```
59248
 * Count: {{items.length}}
59249
 * <ul>
59250
 *   <li *ngFor="let  item of items">{{item}}</li>
59251
 * </ul>
59252
 * ```
59253
 *
59254
 * We have two {@link TemplateRef}s:
59255
 *
59256
 * Outer {@link TemplateRef}:
59257
 * ```
59258
 * Count: {{items.length}}
59259
 * <ul>
59260
 *   <ng-template ngFor let-item [ngForOf]="items"></ng-template>
59261
 * </ul>
59262
 * ```
59263
 *
59264
 * Inner {@link TemplateRef}:
59265
 * ```
59266
 *   <li>{{item}}</li>
59267
 * ```
59268
 *
59269
 * Notice that the original template is broken down into two separate {@link TemplateRef}s.
59270
 *
59271
 * The outer/inner {@link TemplateRef}s are then assembled into views like so:
59272
 *
59273
 * ```
59274
 * <!-- ViewRef: outer-0 -->
59275
 * Count: 2
59276
 * <ul>
59277
 *   <ng-template view-container-ref></ng-template>
59278
 *   <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->
59279
 *   <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->
59280
 * </ul>
59281
 * <!-- /ViewRef: outer-0 -->
59282
 * ```
59283
 * @experimental
59284
 */
59285
var EmbeddedViewRef = /** @class */ (function (_super) {
59286
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(EmbeddedViewRef, _super);
59287
    function EmbeddedViewRef() {
59288
        return _super !== null && _super.apply(this, arguments) || this;
59289
    }
59290
    return EmbeddedViewRef;
59291
}(ViewRef));
59292
 
59293
/**
59294
 * @license
59295
 * Copyright Google Inc. All Rights Reserved.
59296
 *
59297
 * Use of this source code is governed by an MIT-style license that can be
59298
 * found in the LICENSE file at https://angular.io/license
59299
 */
59300
 
59301
/**
59302
 * @license
59303
 * Copyright Google Inc. All Rights Reserved.
59304
 *
59305
 * Use of this source code is governed by an MIT-style license that can be
59306
 * found in the LICENSE file at https://angular.io/license
59307
 */
59308
var EventListener = /** @class */ (function () {
59309
    function EventListener(name, callback) {
59310
        this.name = name;
59311
        this.callback = callback;
59312
    }
59313
    return EventListener;
59314
}());
59315
/**
59316
 * @experimental All debugging apis are currently experimental.
59317
 */
59318
var DebugNode = /** @class */ (function () {
59319
    function DebugNode(nativeNode, parent, _debugContext) {
59320
        this._debugContext = _debugContext;
59321
        this.nativeNode = nativeNode;
59322
        if (parent && parent instanceof DebugElement) {
59323
            parent.addChild(this);
59324
        }
59325
        else {
59326
            this.parent = null;
59327
        }
59328
        this.listeners = [];
59329
    }
59330
    Object.defineProperty(DebugNode.prototype, "injector", {
59331
        get: function () { return this._debugContext.injector; },
59332
        enumerable: true,
59333
        configurable: true
59334
    });
59335
    Object.defineProperty(DebugNode.prototype, "componentInstance", {
59336
        get: function () { return this._debugContext.component; },
59337
        enumerable: true,
59338
        configurable: true
59339
    });
59340
    Object.defineProperty(DebugNode.prototype, "context", {
59341
        get: function () { return this._debugContext.context; },
59342
        enumerable: true,
59343
        configurable: true
59344
    });
59345
    Object.defineProperty(DebugNode.prototype, "references", {
59346
        get: function () { return this._debugContext.references; },
59347
        enumerable: true,
59348
        configurable: true
59349
    });
59350
    Object.defineProperty(DebugNode.prototype, "providerTokens", {
59351
        get: function () { return this._debugContext.providerTokens; },
59352
        enumerable: true,
59353
        configurable: true
59354
    });
59355
    return DebugNode;
59356
}());
59357
/**
59358
 * @experimental All debugging apis are currently experimental.
59359
 */
59360
var DebugElement = /** @class */ (function (_super) {
59361
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(DebugElement, _super);
59362
    function DebugElement(nativeNode, parent, _debugContext) {
59363
        var _this = _super.call(this, nativeNode, parent, _debugContext) || this;
59364
        _this.properties = {};
59365
        _this.attributes = {};
59366
        _this.classes = {};
59367
        _this.styles = {};
59368
        _this.childNodes = [];
59369
        _this.nativeElement = nativeNode;
59370
        return _this;
59371
    }
59372
    DebugElement.prototype.addChild = function (child) {
59373
        if (child) {
59374
            this.childNodes.push(child);
59375
            child.parent = this;
59376
        }
59377
    };
59378
    DebugElement.prototype.removeChild = function (child) {
59379
        var childIndex = this.childNodes.indexOf(child);
59380
        if (childIndex !== -1) {
59381
            child.parent = null;
59382
            this.childNodes.splice(childIndex, 1);
59383
        }
59384
    };
59385
    DebugElement.prototype.insertChildrenAfter = function (child, newChildren) {
59386
        var _this = this;
59387
        var siblingIndex = this.childNodes.indexOf(child);
59388
        if (siblingIndex !== -1) {
59389
            (_a = this.childNodes).splice.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([siblingIndex + 1, 0], newChildren));
59390
            newChildren.forEach(function (c) {
59391
                if (c.parent) {
59392
                    c.parent.removeChild(c);
59393
                }
59394
                c.parent = _this;
59395
            });
59396
        }
59397
        var _a;
59398
    };
59399
    DebugElement.prototype.insertBefore = function (refChild, newChild) {
59400
        var refIndex = this.childNodes.indexOf(refChild);
59401
        if (refIndex === -1) {
59402
            this.addChild(newChild);
59403
        }
59404
        else {
59405
            if (newChild.parent) {
59406
                newChild.parent.removeChild(newChild);
59407
            }
59408
            newChild.parent = this;
59409
            this.childNodes.splice(refIndex, 0, newChild);
59410
        }
59411
    };
59412
    DebugElement.prototype.query = function (predicate) {
59413
        var results = this.queryAll(predicate);
59414
        return results[0] || null;
59415
    };
59416
    DebugElement.prototype.queryAll = function (predicate) {
59417
        var matches = [];
59418
        _queryElementChildren(this, predicate, matches);
59419
        return matches;
59420
    };
59421
    DebugElement.prototype.queryAllNodes = function (predicate) {
59422
        var matches = [];
59423
        _queryNodeChildren(this, predicate, matches);
59424
        return matches;
59425
    };
59426
    Object.defineProperty(DebugElement.prototype, "children", {
59427
        get: function () {
59428
            return this.childNodes.filter(function (node) { return node instanceof DebugElement; });
59429
        },
59430
        enumerable: true,
59431
        configurable: true
59432
    });
59433
    DebugElement.prototype.triggerEventHandler = function (eventName, eventObj) {
59434
        this.listeners.forEach(function (listener) {
59435
            if (listener.name == eventName) {
59436
                listener.callback(eventObj);
59437
            }
59438
        });
59439
    };
59440
    return DebugElement;
59441
}(DebugNode));
59442
/**
59443
 * @experimental
59444
 */
59445
function asNativeElements(debugEls) {
59446
    return debugEls.map(function (el) { return el.nativeElement; });
59447
}
59448
function _queryElementChildren(element, predicate, matches) {
59449
    element.childNodes.forEach(function (node) {
59450
        if (node instanceof DebugElement) {
59451
            if (predicate(node)) {
59452
                matches.push(node);
59453
            }
59454
            _queryElementChildren(node, predicate, matches);
59455
        }
59456
    });
59457
}
59458
function _queryNodeChildren(parentNode, predicate, matches) {
59459
    if (parentNode instanceof DebugElement) {
59460
        parentNode.childNodes.forEach(function (node) {
59461
            if (predicate(node)) {
59462
                matches.push(node);
59463
            }
59464
            if (node instanceof DebugElement) {
59465
                _queryNodeChildren(node, predicate, matches);
59466
            }
59467
        });
59468
    }
59469
}
59470
// Need to keep the nodes in a global Map so that multiple angular apps are supported.
59471
var _nativeNodeToDebugNode = new Map();
59472
/**
59473
 * @experimental
59474
 */
59475
function getDebugNode(nativeNode) {
59476
    return _nativeNodeToDebugNode.get(nativeNode) || null;
59477
}
59478
 
59479
function indexDebugNode(node) {
59480
    _nativeNodeToDebugNode.set(node.nativeNode, node);
59481
}
59482
function removeDebugNodeFromIndex(node) {
59483
    _nativeNodeToDebugNode.delete(node.nativeNode);
59484
}
59485
 
59486
/**
59487
 * @license
59488
 * Copyright Google Inc. All Rights Reserved.
59489
 *
59490
 * Use of this source code is governed by an MIT-style license that can be
59491
 * found in the LICENSE file at https://angular.io/license
59492
 */
59493
function devModeEqual(a, b) {
59494
    var isListLikeIterableA = isListLikeIterable(a);
59495
    var isListLikeIterableB = isListLikeIterable(b);
59496
    if (isListLikeIterableA && isListLikeIterableB) {
59497
        return areIterablesEqual(a, b, devModeEqual);
59498
    }
59499
    else {
59500
        var isAObject = a && (typeof a === 'object' || typeof a === 'function');
59501
        var isBObject = b && (typeof b === 'object' || typeof b === 'function');
59502
        if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {
59503
            return true;
59504
        }
59505
        else {
59506
            return looseIdentical(a, b);
59507
        }
59508
    }
59509
}
59510
/**
59511
 * Indicates that the result of a {@link Pipe} transformation has changed even though the
59512
 * reference has not changed.
59513
 *
59514
 * Wrapped values are unwrapped automatically during the change detection, and the unwrapped value
59515
 * is stored.
59516
 *
59517
 * Example:
59518
 *
59519
 * ```
59520
 * if (this._latestValue === this._latestReturnedValue) {
59521
 *    return this._latestReturnedValue;
59522
 *  } else {
59523
 *    this._latestReturnedValue = this._latestValue;
59524
 *    return WrappedValue.wrap(this._latestValue); // this will force update
59525
 *  }
59526
 * ```
59527
 *
59528
 */
59529
var WrappedValue = /** @class */ (function () {
59530
    function WrappedValue(value) {
59531
        this.wrapped = value;
59532
    }
59533
    /** Creates a wrapped value. */
59534
    /** Creates a wrapped value. */
59535
    WrappedValue.wrap = /** Creates a wrapped value. */
59536
    function (value) { return new WrappedValue(value); };
59537
    /**
59538
     * Returns the underlying value of a wrapped value.
59539
     * Returns the given `value` when it is not wrapped.
59540
     **/
59541
    /**
59542
       * Returns the underlying value of a wrapped value.
59543
       * Returns the given `value` when it is not wrapped.
59544
       **/
59545
    WrappedValue.unwrap = /**
59546
       * Returns the underlying value of a wrapped value.
59547
       * Returns the given `value` when it is not wrapped.
59548
       **/
59549
    function (value) { return WrappedValue.isWrapped(value) ? value.wrapped : value; };
59550
    /** Returns true if `value` is a wrapped value. */
59551
    /** Returns true if `value` is a wrapped value. */
59552
    WrappedValue.isWrapped = /** Returns true if `value` is a wrapped value. */
59553
    function (value) { return value instanceof WrappedValue; };
59554
    return WrappedValue;
59555
}());
59556
/**
59557
 * Represents a basic change from a previous to a new value.
59558
 *
59559
 */
59560
var SimpleChange = /** @class */ (function () {
59561
    function SimpleChange(previousValue, currentValue, firstChange) {
59562
        this.previousValue = previousValue;
59563
        this.currentValue = currentValue;
59564
        this.firstChange = firstChange;
59565
    }
59566
    /**
59567
     * Check whether the new value is the first value assigned.
59568
     */
59569
    /**
59570
       * Check whether the new value is the first value assigned.
59571
       */
59572
    SimpleChange.prototype.isFirstChange = /**
59573
       * Check whether the new value is the first value assigned.
59574
       */
59575
    function () { return this.firstChange; };
59576
    return SimpleChange;
59577
}());
59578
function isListLikeIterable(obj) {
59579
    if (!isJsObject(obj))
59580
        return false;
59581
    return Array.isArray(obj) ||
59582
        (!(obj instanceof Map) && // JS Map are iterables but return entries as [k, v]
59583
            // JS Map are iterables but return entries as [k, v]
59584
            getSymbolIterator() in obj); // JS Iterable have a Symbol.iterator prop
59585
}
59586
function areIterablesEqual(a, b, comparator) {
59587
    var iterator1 = a[getSymbolIterator()]();
59588
    var iterator2 = b[getSymbolIterator()]();
59589
    while (true) {
59590
        var item1 = iterator1.next();
59591
        var item2 = iterator2.next();
59592
        if (item1.done && item2.done)
59593
            return true;
59594
        if (item1.done || item2.done)
59595
            return false;
59596
        if (!comparator(item1.value, item2.value))
59597
            return false;
59598
    }
59599
}
59600
function iterateListLike(obj, fn) {
59601
    if (Array.isArray(obj)) {
59602
        for (var i = 0; i < obj.length; i++) {
59603
            fn(obj[i]);
59604
        }
59605
    }
59606
    else {
59607
        var iterator = obj[getSymbolIterator()]();
59608
        var item = void 0;
59609
        while (!((item = iterator.next()).done)) {
59610
            fn(item.value);
59611
        }
59612
    }
59613
}
59614
function isJsObject(o) {
59615
    return o !== null && (typeof o === 'function' || typeof o === 'object');
59616
}
59617
 
59618
/**
59619
 * @license
59620
 * Copyright Google Inc. All Rights Reserved.
59621
 *
59622
 * Use of this source code is governed by an MIT-style license that can be
59623
 * found in the LICENSE file at https://angular.io/license
59624
 */
59625
var DefaultIterableDifferFactory = /** @class */ (function () {
59626
    function DefaultIterableDifferFactory() {
59627
    }
59628
    DefaultIterableDifferFactory.prototype.supports = function (obj) { return isListLikeIterable(obj); };
59629
    DefaultIterableDifferFactory.prototype.create = function (trackByFn) {
59630
        return new DefaultIterableDiffer(trackByFn);
59631
    };
59632
    return DefaultIterableDifferFactory;
59633
}());
59634
var trackByIdentity = function (index, item) { return item; };
59635
/**
59636
 * @deprecated v4.0.0 - Should not be part of public API.
59637
 */
59638
var DefaultIterableDiffer = /** @class */ (function () {
59639
    function DefaultIterableDiffer(trackByFn) {
59640
        this.length = 0;
59641
        // Keeps track of the used records at any point in time (during & across `_check()` calls)
59642
        this._linkedRecords = null;
59643
        // Keeps track of the removed records at any point in time during `_check()` calls.
59644
        this._unlinkedRecords = null;
59645
        this._previousItHead = null;
59646
        this._itHead = null;
59647
        this._itTail = null;
59648
        this._additionsHead = null;
59649
        this._additionsTail = null;
59650
        this._movesHead = null;
59651
        this._movesTail = null;
59652
        this._removalsHead = null;
59653
        this._removalsTail = null;
59654
        // Keeps track of records where custom track by is the same, but item identity has changed
59655
        this._identityChangesHead = null;
59656
        this._identityChangesTail = null;
59657
        this._trackByFn = trackByFn || trackByIdentity;
59658
    }
59659
    DefaultIterableDiffer.prototype.forEachItem = function (fn) {
59660
        var record;
59661
        for (record = this._itHead; record !== null; record = record._next) {
59662
            fn(record);
59663
        }
59664
    };
59665
    DefaultIterableDiffer.prototype.forEachOperation = function (fn) {
59666
        var nextIt = this._itHead;
59667
        var nextRemove = this._removalsHead;
59668
        var addRemoveOffset = 0;
59669
        var moveOffsets = null;
59670
        while (nextIt || nextRemove) {
59671
            // Figure out which is the next record to process
59672
            // Order: remove, add, move
59673
            var record = !nextRemove ||
59674
                nextIt &&
59675
                    (nextIt.currentIndex) <
59676
                        getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ?
59677
                nextIt :
59678
                nextRemove;
59679
            var adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);
59680
            var currentIndex = record.currentIndex;
59681
            // consume the item, and adjust the addRemoveOffset and update moveDistance if necessary
59682
            if (record === nextRemove) {
59683
                addRemoveOffset--;
59684
                nextRemove = nextRemove._nextRemoved;
59685
            }
59686
            else {
59687
                nextIt = nextIt._next;
59688
                if (record.previousIndex == null) {
59689
                    addRemoveOffset++;
59690
                }
59691
                else {
59692
                    // INVARIANT:  currentIndex < previousIndex
59693
                    if (!moveOffsets)
59694
                        moveOffsets = [];
59695
                    var localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;
59696
                    var localCurrentIndex = (currentIndex) - addRemoveOffset;
59697
                    if (localMovePreviousIndex != localCurrentIndex) {
59698
                        for (var i = 0; i < localMovePreviousIndex; i++) {
59699
                            var offset = i < moveOffsets.length ? moveOffsets[i] : (moveOffsets[i] = 0);
59700
                            var index = offset + i;
59701
                            if (localCurrentIndex <= index && index < localMovePreviousIndex) {
59702
                                moveOffsets[i] = offset + 1;
59703
                            }
59704
                        }
59705
                        var previousIndex = record.previousIndex;
59706
                        moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;
59707
                    }
59708
                }
59709
            }
59710
            if (adjPreviousIndex !== currentIndex) {
59711
                fn(record, adjPreviousIndex, currentIndex);
59712
            }
59713
        }
59714
    };
59715
    DefaultIterableDiffer.prototype.forEachPreviousItem = function (fn) {
59716
        var record;
59717
        for (record = this._previousItHead; record !== null; record = record._nextPrevious) {
59718
            fn(record);
59719
        }
59720
    };
59721
    DefaultIterableDiffer.prototype.forEachAddedItem = function (fn) {
59722
        var record;
59723
        for (record = this._additionsHead; record !== null; record = record._nextAdded) {
59724
            fn(record);
59725
        }
59726
    };
59727
    DefaultIterableDiffer.prototype.forEachMovedItem = function (fn) {
59728
        var record;
59729
        for (record = this._movesHead; record !== null; record = record._nextMoved) {
59730
            fn(record);
59731
        }
59732
    };
59733
    DefaultIterableDiffer.prototype.forEachRemovedItem = function (fn) {
59734
        var record;
59735
        for (record = this._removalsHead; record !== null; record = record._nextRemoved) {
59736
            fn(record);
59737
        }
59738
    };
59739
    DefaultIterableDiffer.prototype.forEachIdentityChange = function (fn) {
59740
        var record;
59741
        for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {
59742
            fn(record);
59743
        }
59744
    };
59745
    DefaultIterableDiffer.prototype.diff = function (collection) {
59746
        if (collection == null)
59747
            collection = [];
59748
        if (!isListLikeIterable(collection)) {
59749
            throw new Error("Error trying to diff '" + stringify(collection) + "'. Only arrays and iterables are allowed");
59750
        }
59751
        if (this.check(collection)) {
59752
            return this;
59753
        }
59754
        else {
59755
            return null;
59756
        }
59757
    };
59758
    DefaultIterableDiffer.prototype.onDestroy = function () { };
59759
    DefaultIterableDiffer.prototype.check = function (collection) {
59760
        var _this = this;
59761
        this._reset();
59762
        var record = this._itHead;
59763
        var mayBeDirty = false;
59764
        var index;
59765
        var item;
59766
        var itemTrackBy;
59767
        if (Array.isArray(collection)) {
59768
            this.length = collection.length;
59769
            for (var index_1 = 0; index_1 < this.length; index_1++) {
59770
                item = collection[index_1];
59771
                itemTrackBy = this._trackByFn(index_1, item);
59772
                if (record === null || !looseIdentical(record.trackById, itemTrackBy)) {
59773
                    record = this._mismatch(record, item, itemTrackBy, index_1);
59774
                    mayBeDirty = true;
59775
                }
59776
                else {
59777
                    if (mayBeDirty) {
59778
                        // TODO(misko): can we limit this to duplicates only?
59779
                        record = this._verifyReinsertion(record, item, itemTrackBy, index_1);
59780
                    }
59781
                    if (!looseIdentical(record.item, item))
59782
                        this._addIdentityChange(record, item);
59783
                }
59784
                record = record._next;
59785
            }
59786
        }
59787
        else {
59788
            index = 0;
59789
            iterateListLike(collection, function (item) {
59790
                itemTrackBy = _this._trackByFn(index, item);
59791
                if (record === null || !looseIdentical(record.trackById, itemTrackBy)) {
59792
                    record = _this._mismatch(record, item, itemTrackBy, index);
59793
                    mayBeDirty = true;
59794
                }
59795
                else {
59796
                    if (mayBeDirty) {
59797
                        // TODO(misko): can we limit this to duplicates only?
59798
                        record = _this._verifyReinsertion(record, item, itemTrackBy, index);
59799
                    }
59800
                    if (!looseIdentical(record.item, item))
59801
                        _this._addIdentityChange(record, item);
59802
                }
59803
                record = record._next;
59804
                index++;
59805
            });
59806
            this.length = index;
59807
        }
59808
        this._truncate(record);
59809
        this.collection = collection;
59810
        return this.isDirty;
59811
    };
59812
    Object.defineProperty(DefaultIterableDiffer.prototype, "isDirty", {
59813
        /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity
59814
         * changes.
59815
         */
59816
        get: /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity
59817
           * changes.
59818
           */
59819
        function () {
59820
            return this._additionsHead !== null || this._movesHead !== null ||
59821
                this._removalsHead !== null || this._identityChangesHead !== null;
59822
        },
59823
        enumerable: true,
59824
        configurable: true
59825
    });
59826
    /**
59827
     * Reset the state of the change objects to show no changes. This means set previousKey to
59828
     * currentKey, and clear all of the queues (additions, moves, removals).
59829
     * Set the previousIndexes of moved and added items to their currentIndexes
59830
     * Reset the list of additions, moves and removals
59831
     *
59832
     * @internal
59833
     */
59834
    /**
59835
       * Reset the state of the change objects to show no changes. This means set previousKey to
59836
       * currentKey, and clear all of the queues (additions, moves, removals).
59837
       * Set the previousIndexes of moved and added items to their currentIndexes
59838
       * Reset the list of additions, moves and removals
59839
       *
59840
       * @internal
59841
       */
59842
    DefaultIterableDiffer.prototype._reset = /**
59843
       * Reset the state of the change objects to show no changes. This means set previousKey to
59844
       * currentKey, and clear all of the queues (additions, moves, removals).
59845
       * Set the previousIndexes of moved and added items to their currentIndexes
59846
       * Reset the list of additions, moves and removals
59847
       *
59848
       * @internal
59849
       */
59850
    function () {
59851
        if (this.isDirty) {
59852
            var record = void 0;
59853
            var nextRecord = void 0;
59854
            for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {
59855
                record._nextPrevious = record._next;
59856
            }
59857
            for (record = this._additionsHead; record !== null; record = record._nextAdded) {
59858
                record.previousIndex = record.currentIndex;
59859
            }
59860
            this._additionsHead = this._additionsTail = null;
59861
            for (record = this._movesHead; record !== null; record = nextRecord) {
59862
                record.previousIndex = record.currentIndex;
59863
                nextRecord = record._nextMoved;
59864
            }
59865
            this._movesHead = this._movesTail = null;
59866
            this._removalsHead = this._removalsTail = null;
59867
            this._identityChangesHead = this._identityChangesTail = null;
59868
            // TODO(vicb): when assert gets supported
59869
            // assert(!this.isDirty);
59870
        }
59871
    };
59872
    /**
59873
     * This is the core function which handles differences between collections.
59874
     *
59875
     * - `record` is the record which we saw at this position last time. If null then it is a new
59876
     *   item.
59877
     * - `item` is the current item in the collection
59878
     * - `index` is the position of the item in the collection
59879
     *
59880
     * @internal
59881
     */
59882
    /**
59883
       * This is the core function which handles differences between collections.
59884
       *
59885
       * - `record` is the record which we saw at this position last time. If null then it is a new
59886
       *   item.
59887
       * - `item` is the current item in the collection
59888
       * - `index` is the position of the item in the collection
59889
       *
59890
       * @internal
59891
       */
59892
    DefaultIterableDiffer.prototype._mismatch = /**
59893
       * This is the core function which handles differences between collections.
59894
       *
59895
       * - `record` is the record which we saw at this position last time. If null then it is a new
59896
       *   item.
59897
       * - `item` is the current item in the collection
59898
       * - `index` is the position of the item in the collection
59899
       *
59900
       * @internal
59901
       */
59902
    function (record, item, itemTrackBy, index) {
59903
        // The previous record after which we will append the current one.
59904
        var previousRecord;
59905
        if (record === null) {
59906
            previousRecord = this._itTail;
59907
        }
59908
        else {
59909
            previousRecord = record._prev;
59910
            // Remove the record from the collection since we know it does not match the item.
59911
            this._remove(record);
59912
        }
59913
        // Attempt to see if we have seen the item before.
59914
        record = this._linkedRecords === null ? null : this._linkedRecords.get(itemTrackBy, index);
59915
        if (record !== null) {
59916
            // We have seen this before, we need to move it forward in the collection.
59917
            // But first we need to check if identity changed, so we can update in view if necessary
59918
            if (!looseIdentical(record.item, item))
59919
                this._addIdentityChange(record, item);
59920
            this._moveAfter(record, previousRecord, index);
59921
        }
59922
        else {
59923
            // Never seen it, check evicted list.
59924
            record = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);
59925
            if (record !== null) {
59926
                // It is an item which we have evicted earlier: reinsert it back into the list.
59927
                // But first we need to check if identity changed, so we can update in view if necessary
59928
                if (!looseIdentical(record.item, item))
59929
                    this._addIdentityChange(record, item);
59930
                this._reinsertAfter(record, previousRecord, index);
59931
            }
59932
            else {
59933
                // It is a new item: add it.
59934
                record =
59935
                    this._addAfter(new IterableChangeRecord_(item, itemTrackBy), previousRecord, index);
59936
            }
59937
        }
59938
        return record;
59939
    };
59940
    /**
59941
     * This check is only needed if an array contains duplicates. (Short circuit of nothing dirty)
59942
     *
59943
     * Use case: `[a, a]` => `[b, a, a]`
59944
     *
59945
     * If we did not have this check then the insertion of `b` would:
59946
     *   1) evict first `a`
59947
     *   2) insert `b` at `0` index.
59948
     *   3) leave `a` at index `1` as is. <-- this is wrong!
59949
     *   3) reinsert `a` at index 2. <-- this is wrong!
59950
     *
59951
     * The correct behavior is:
59952
     *   1) evict first `a`
59953
     *   2) insert `b` at `0` index.
59954
     *   3) reinsert `a` at index 1.
59955
     *   3) move `a` at from `1` to `2`.
59956
     *
59957
     *
59958
     * Double check that we have not evicted a duplicate item. We need to check if the item type may
59959
     * have already been removed:
59960
     * The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted
59961
     * at the end. Which will show up as the two 'a's switching position. This is incorrect, since a
59962
     * better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a'
59963
     * at the end.
59964
     *
59965
     * @internal
59966
     */
59967
    /**
59968
       * This check is only needed if an array contains duplicates. (Short circuit of nothing dirty)
59969
       *
59970
       * Use case: `[a, a]` => `[b, a, a]`
59971
       *
59972
       * If we did not have this check then the insertion of `b` would:
59973
       *   1) evict first `a`
59974
       *   2) insert `b` at `0` index.
59975
       *   3) leave `a` at index `1` as is. <-- this is wrong!
59976
       *   3) reinsert `a` at index 2. <-- this is wrong!
59977
       *
59978
       * The correct behavior is:
59979
       *   1) evict first `a`
59980
       *   2) insert `b` at `0` index.
59981
       *   3) reinsert `a` at index 1.
59982
       *   3) move `a` at from `1` to `2`.
59983
       *
59984
       *
59985
       * Double check that we have not evicted a duplicate item. We need to check if the item type may
59986
       * have already been removed:
59987
       * The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted
59988
       * at the end. Which will show up as the two 'a's switching position. This is incorrect, since a
59989
       * better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a'
59990
       * at the end.
59991
       *
59992
       * @internal
59993
       */
59994
    DefaultIterableDiffer.prototype._verifyReinsertion = /**
59995
       * This check is only needed if an array contains duplicates. (Short circuit of nothing dirty)
59996
       *
59997
       * Use case: `[a, a]` => `[b, a, a]`
59998
       *
59999
       * If we did not have this check then the insertion of `b` would:
60000
       *   1) evict first `a`
60001
       *   2) insert `b` at `0` index.
60002
       *   3) leave `a` at index `1` as is. <-- this is wrong!
60003
       *   3) reinsert `a` at index 2. <-- this is wrong!
60004
       *
60005
       * The correct behavior is:
60006
       *   1) evict first `a`
60007
       *   2) insert `b` at `0` index.
60008
       *   3) reinsert `a` at index 1.
60009
       *   3) move `a` at from `1` to `2`.
60010
       *
60011
       *
60012
       * Double check that we have not evicted a duplicate item. We need to check if the item type may
60013
       * have already been removed:
60014
       * The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted
60015
       * at the end. Which will show up as the two 'a's switching position. This is incorrect, since a
60016
       * better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a'
60017
       * at the end.
60018
       *
60019
       * @internal
60020
       */
60021
    function (record, item, itemTrackBy, index) {
60022
        var reinsertRecord = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);
60023
        if (reinsertRecord !== null) {
60024
            record = this._reinsertAfter(reinsertRecord, (record._prev), index);
60025
        }
60026
        else if (record.currentIndex != index) {
60027
            record.currentIndex = index;
60028
            this._addToMoves(record, index);
60029
        }
60030
        return record;
60031
    };
60032
    /**
60033
     * Get rid of any excess {@link IterableChangeRecord_}s from the previous collection
60034
     *
60035
     * - `record` The first excess {@link IterableChangeRecord_}.
60036
     *
60037
     * @internal
60038
     */
60039
    /**
60040
       * Get rid of any excess {@link IterableChangeRecord_}s from the previous collection
60041
       *
60042
       * - `record` The first excess {@link IterableChangeRecord_}.
60043
       *
60044
       * @internal
60045
       */
60046
    DefaultIterableDiffer.prototype._truncate = /**
60047
       * Get rid of any excess {@link IterableChangeRecord_}s from the previous collection
60048
       *
60049
       * - `record` The first excess {@link IterableChangeRecord_}.
60050
       *
60051
       * @internal
60052
       */
60053
    function (record) {
60054
        // Anything after that needs to be removed;
60055
        while (record !== null) {
60056
            var nextRecord = record._next;
60057
            this._addToRemovals(this._unlink(record));
60058
            record = nextRecord;
60059
        }
60060
        if (this._unlinkedRecords !== null) {
60061
            this._unlinkedRecords.clear();
60062
        }
60063
        if (this._additionsTail !== null) {
60064
            this._additionsTail._nextAdded = null;
60065
        }
60066
        if (this._movesTail !== null) {
60067
            this._movesTail._nextMoved = null;
60068
        }
60069
        if (this._itTail !== null) {
60070
            this._itTail._next = null;
60071
        }
60072
        if (this._removalsTail !== null) {
60073
            this._removalsTail._nextRemoved = null;
60074
        }
60075
        if (this._identityChangesTail !== null) {
60076
            this._identityChangesTail._nextIdentityChange = null;
60077
        }
60078
    };
60079
    /** @internal */
60080
    /** @internal */
60081
    DefaultIterableDiffer.prototype._reinsertAfter = /** @internal */
60082
    function (record, prevRecord, index) {
60083
        if (this._unlinkedRecords !== null) {
60084
            this._unlinkedRecords.remove(record);
60085
        }
60086
        var prev = record._prevRemoved;
60087
        var next = record._nextRemoved;
60088
        if (prev === null) {
60089
            this._removalsHead = next;
60090
        }
60091
        else {
60092
            prev._nextRemoved = next;
60093
        }
60094
        if (next === null) {
60095
            this._removalsTail = prev;
60096
        }
60097
        else {
60098
            next._prevRemoved = prev;
60099
        }
60100
        this._insertAfter(record, prevRecord, index);
60101
        this._addToMoves(record, index);
60102
        return record;
60103
    };
60104
    /** @internal */
60105
    /** @internal */
60106
    DefaultIterableDiffer.prototype._moveAfter = /** @internal */
60107
    function (record, prevRecord, index) {
60108
        this._unlink(record);
60109
        this._insertAfter(record, prevRecord, index);
60110
        this._addToMoves(record, index);
60111
        return record;
60112
    };
60113
    /** @internal */
60114
    /** @internal */
60115
    DefaultIterableDiffer.prototype._addAfter = /** @internal */
60116
    function (record, prevRecord, index) {
60117
        this._insertAfter(record, prevRecord, index);
60118
        if (this._additionsTail === null) {
60119
            // TODO(vicb):
60120
            // assert(this._additionsHead === null);
60121
            this._additionsTail = this._additionsHead = record;
60122
        }
60123
        else {
60124
            // TODO(vicb):
60125
            // assert(_additionsTail._nextAdded === null);
60126
            // assert(record._nextAdded === null);
60127
            this._additionsTail = this._additionsTail._nextAdded = record;
60128
        }
60129
        return record;
60130
    };
60131
    /** @internal */
60132
    /** @internal */
60133
    DefaultIterableDiffer.prototype._insertAfter = /** @internal */
60134
    function (record, prevRecord, index) {
60135
        // TODO(vicb):
60136
        // assert(record != prevRecord);
60137
        // assert(record._next === null);
60138
        // assert(record._prev === null);
60139
        var next = prevRecord === null ? this._itHead : prevRecord._next;
60140
        // TODO(vicb):
60141
        // assert(next != record);
60142
        // assert(prevRecord != record);
60143
        record._next = next;
60144
        record._prev = prevRecord;
60145
        if (next === null) {
60146
            this._itTail = record;
60147
        }
60148
        else {
60149
            next._prev = record;
60150
        }
60151
        if (prevRecord === null) {
60152
            this._itHead = record;
60153
        }
60154
        else {
60155
            prevRecord._next = record;
60156
        }
60157
        if (this._linkedRecords === null) {
60158
            this._linkedRecords = new _DuplicateMap();
60159
        }
60160
        this._linkedRecords.put(record);
60161
        record.currentIndex = index;
60162
        return record;
60163
    };
60164
    /** @internal */
60165
    /** @internal */
60166
    DefaultIterableDiffer.prototype._remove = /** @internal */
60167
    function (record) {
60168
        return this._addToRemovals(this._unlink(record));
60169
    };
60170
    /** @internal */
60171
    /** @internal */
60172
    DefaultIterableDiffer.prototype._unlink = /** @internal */
60173
    function (record) {
60174
        if (this._linkedRecords !== null) {
60175
            this._linkedRecords.remove(record);
60176
        }
60177
        var prev = record._prev;
60178
        var next = record._next;
60179
        // TODO(vicb):
60180
        // assert((record._prev = null) === null);
60181
        // assert((record._next = null) === null);
60182
        if (prev === null) {
60183
            this._itHead = next;
60184
        }
60185
        else {
60186
            prev._next = next;
60187
        }
60188
        if (next === null) {
60189
            this._itTail = prev;
60190
        }
60191
        else {
60192
            next._prev = prev;
60193
        }
60194
        return record;
60195
    };
60196
    /** @internal */
60197
    /** @internal */
60198
    DefaultIterableDiffer.prototype._addToMoves = /** @internal */
60199
    function (record, toIndex) {
60200
        // TODO(vicb):
60201
        // assert(record._nextMoved === null);
60202
        if (record.previousIndex === toIndex) {
60203
            return record;
60204
        }
60205
        if (this._movesTail === null) {
60206
            // TODO(vicb):
60207
            // assert(_movesHead === null);
60208
            this._movesTail = this._movesHead = record;
60209
        }
60210
        else {
60211
            // TODO(vicb):
60212
            // assert(_movesTail._nextMoved === null);
60213
            this._movesTail = this._movesTail._nextMoved = record;
60214
        }
60215
        return record;
60216
    };
60217
    DefaultIterableDiffer.prototype._addToRemovals = function (record) {
60218
        if (this._unlinkedRecords === null) {
60219
            this._unlinkedRecords = new _DuplicateMap();
60220
        }
60221
        this._unlinkedRecords.put(record);
60222
        record.currentIndex = null;
60223
        record._nextRemoved = null;
60224
        if (this._removalsTail === null) {
60225
            // TODO(vicb):
60226
            // assert(_removalsHead === null);
60227
            this._removalsTail = this._removalsHead = record;
60228
            record._prevRemoved = null;
60229
        }
60230
        else {
60231
            // TODO(vicb):
60232
            // assert(_removalsTail._nextRemoved === null);
60233
            // assert(record._nextRemoved === null);
60234
            record._prevRemoved = this._removalsTail;
60235
            this._removalsTail = this._removalsTail._nextRemoved = record;
60236
        }
60237
        return record;
60238
    };
60239
    /** @internal */
60240
    /** @internal */
60241
    DefaultIterableDiffer.prototype._addIdentityChange = /** @internal */
60242
    function (record, item) {
60243
        record.item = item;
60244
        if (this._identityChangesTail === null) {
60245
            this._identityChangesTail = this._identityChangesHead = record;
60246
        }
60247
        else {
60248
            this._identityChangesTail = this._identityChangesTail._nextIdentityChange = record;
60249
        }
60250
        return record;
60251
    };
60252
    return DefaultIterableDiffer;
60253
}());
60254
var IterableChangeRecord_ = /** @class */ (function () {
60255
    function IterableChangeRecord_(item, trackById) {
60256
        this.item = item;
60257
        this.trackById = trackById;
60258
        this.currentIndex = null;
60259
        this.previousIndex = null;
60260
        /** @internal */
60261
        this._nextPrevious = null;
60262
        /** @internal */
60263
        this._prev = null;
60264
        /** @internal */
60265
        this._next = null;
60266
        /** @internal */
60267
        this._prevDup = null;
60268
        /** @internal */
60269
        this._nextDup = null;
60270
        /** @internal */
60271
        this._prevRemoved = null;
60272
        /** @internal */
60273
        this._nextRemoved = null;
60274
        /** @internal */
60275
        this._nextAdded = null;
60276
        /** @internal */
60277
        this._nextMoved = null;
60278
        /** @internal */
60279
        this._nextIdentityChange = null;
60280
    }
60281
    return IterableChangeRecord_;
60282
}());
60283
// A linked list of CollectionChangeRecords with the same IterableChangeRecord_.item
60284
var _DuplicateItemRecordList = /** @class */ (function () {
60285
    function _DuplicateItemRecordList() {
60286
        /** @internal */
60287
        this._head = null;
60288
        /** @internal */
60289
        this._tail = null;
60290
    }
60291
    /**
60292
     * Append the record to the list of duplicates.
60293
     *
60294
     * Note: by design all records in the list of duplicates hold the same value in record.item.
60295
     */
60296
    /**
60297
       * Append the record to the list of duplicates.
60298
       *
60299
       * Note: by design all records in the list of duplicates hold the same value in record.item.
60300
       */
60301
    _DuplicateItemRecordList.prototype.add = /**
60302
       * Append the record to the list of duplicates.
60303
       *
60304
       * Note: by design all records in the list of duplicates hold the same value in record.item.
60305
       */
60306
    function (record) {
60307
        if (this._head === null) {
60308
            this._head = this._tail = record;
60309
            record._nextDup = null;
60310
            record._prevDup = null;
60311
        }
60312
        else {
60313
            // TODO(vicb):
60314
            // assert(record.item ==  _head.item ||
60315
            //       record.item is num && record.item.isNaN && _head.item is num && _head.item.isNaN);
60316
            // TODO(vicb):
60317
            // assert(record.item ==  _head.item ||
60318
            //       record.item is num && record.item.isNaN && _head.item is num && _head.item.isNaN);
60319
            this._tail._nextDup = record;
60320
            record._prevDup = this._tail;
60321
            record._nextDup = null;
60322
            this._tail = record;
60323
        }
60324
    };
60325
    // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and
60326
    // IterableChangeRecord_.currentIndex >= atOrAfterIndex
60327
    // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and
60328
    // IterableChangeRecord_.currentIndex >= atOrAfterIndex
60329
    _DuplicateItemRecordList.prototype.get =
60330
    // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and
60331
    // IterableChangeRecord_.currentIndex >= atOrAfterIndex
60332
    function (trackById, atOrAfterIndex) {
60333
        var record;
60334
        for (record = this._head; record !== null; record = record._nextDup) {
60335
            if ((atOrAfterIndex === null || atOrAfterIndex <= (record.currentIndex)) &&
60336
                looseIdentical(record.trackById, trackById)) {
60337
                return record;
60338
            }
60339
        }
60340
        return null;
60341
    };
60342
    /**
60343
     * Remove one {@link IterableChangeRecord_} from the list of duplicates.
60344
     *
60345
     * Returns whether the list of duplicates is empty.
60346
     */
60347
    /**
60348
       * Remove one {@link IterableChangeRecord_} from the list of duplicates.
60349
       *
60350
       * Returns whether the list of duplicates is empty.
60351
       */
60352
    _DuplicateItemRecordList.prototype.remove = /**
60353
       * Remove one {@link IterableChangeRecord_} from the list of duplicates.
60354
       *
60355
       * Returns whether the list of duplicates is empty.
60356
       */
60357
    function (record) {
60358
        // TODO(vicb):
60359
        // assert(() {
60360
        //  // verify that the record being removed is in the list.
60361
        //  for (IterableChangeRecord_ cursor = _head; cursor != null; cursor = cursor._nextDup) {
60362
        //    if (identical(cursor, record)) return true;
60363
        //  }
60364
        //  return false;
60365
        //});
60366
        var prev = record._prevDup;
60367
        var next = record._nextDup;
60368
        if (prev === null) {
60369
            this._head = next;
60370
        }
60371
        else {
60372
            prev._nextDup = next;
60373
        }
60374
        if (next === null) {
60375
            this._tail = prev;
60376
        }
60377
        else {
60378
            next._prevDup = prev;
60379
        }
60380
        return this._head === null;
60381
    };
60382
    return _DuplicateItemRecordList;
60383
}());
60384
var _DuplicateMap = /** @class */ (function () {
60385
    function _DuplicateMap() {
60386
        this.map = new Map();
60387
    }
60388
    _DuplicateMap.prototype.put = function (record) {
60389
        var key = record.trackById;
60390
        var duplicates = this.map.get(key);
60391
        if (!duplicates) {
60392
            duplicates = new _DuplicateItemRecordList();
60393
            this.map.set(key, duplicates);
60394
        }
60395
        duplicates.add(record);
60396
    };
60397
    /**
60398
     * Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we
60399
     * have already iterated over, we use the `atOrAfterIndex` to pretend it is not there.
60400
     *
60401
     * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we
60402
     * have any more `a`s needs to return the second `a`.
60403
     */
60404
    /**
60405
       * Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we
60406
       * have already iterated over, we use the `atOrAfterIndex` to pretend it is not there.
60407
       *
60408
       * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we
60409
       * have any more `a`s needs to return the second `a`.
60410
       */
60411
    _DuplicateMap.prototype.get = /**
60412
       * Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we
60413
       * have already iterated over, we use the `atOrAfterIndex` to pretend it is not there.
60414
       *
60415
       * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we
60416
       * have any more `a`s needs to return the second `a`.
60417
       */
60418
    function (trackById, atOrAfterIndex) {
60419
        var key = trackById;
60420
        var recordList = this.map.get(key);
60421
        return recordList ? recordList.get(trackById, atOrAfterIndex) : null;
60422
    };
60423
    /**
60424
     * Removes a {@link IterableChangeRecord_} from the list of duplicates.
60425
     *
60426
     * The list of duplicates also is removed from the map if it gets empty.
60427
     */
60428
    /**
60429
       * Removes a {@link IterableChangeRecord_} from the list of duplicates.
60430
       *
60431
       * The list of duplicates also is removed from the map if it gets empty.
60432
       */
60433
    _DuplicateMap.prototype.remove = /**
60434
       * Removes a {@link IterableChangeRecord_} from the list of duplicates.
60435
       *
60436
       * The list of duplicates also is removed from the map if it gets empty.
60437
       */
60438
    function (record) {
60439
        var key = record.trackById;
60440
        var recordList = (this.map.get(key));
60441
        // Remove the list of duplicates when it gets empty
60442
        if (recordList.remove(record)) {
60443
            this.map.delete(key);
60444
        }
60445
        return record;
60446
    };
60447
    Object.defineProperty(_DuplicateMap.prototype, "isEmpty", {
60448
        get: function () { return this.map.size === 0; },
60449
        enumerable: true,
60450
        configurable: true
60451
    });
60452
    _DuplicateMap.prototype.clear = function () { this.map.clear(); };
60453
    return _DuplicateMap;
60454
}());
60455
function getPreviousIndex(item, addRemoveOffset, moveOffsets) {
60456
    var previousIndex = item.previousIndex;
60457
    if (previousIndex === null)
60458
        return previousIndex;
60459
    var moveOffset = 0;
60460
    if (moveOffsets && previousIndex < moveOffsets.length) {
60461
        moveOffset = moveOffsets[previousIndex];
60462
    }
60463
    return previousIndex + addRemoveOffset + moveOffset;
60464
}
60465
 
60466
/**
60467
 * @license
60468
 * Copyright Google Inc. All Rights Reserved.
60469
 *
60470
 * Use of this source code is governed by an MIT-style license that can be
60471
 * found in the LICENSE file at https://angular.io/license
60472
 */
60473
var DefaultKeyValueDifferFactory = /** @class */ (function () {
60474
    function DefaultKeyValueDifferFactory() {
60475
    }
60476
    DefaultKeyValueDifferFactory.prototype.supports = function (obj) { return obj instanceof Map || isJsObject(obj); };
60477
    DefaultKeyValueDifferFactory.prototype.create = function () { return new DefaultKeyValueDiffer(); };
60478
    return DefaultKeyValueDifferFactory;
60479
}());
60480
var DefaultKeyValueDiffer = /** @class */ (function () {
60481
    function DefaultKeyValueDiffer() {
60482
        this._records = new Map();
60483
        this._mapHead = null;
60484
        // _appendAfter is used in the check loop
60485
        this._appendAfter = null;
60486
        this._previousMapHead = null;
60487
        this._changesHead = null;
60488
        this._changesTail = null;
60489
        this._additionsHead = null;
60490
        this._additionsTail = null;
60491
        this._removalsHead = null;
60492
        this._removalsTail = null;
60493
    }
60494
    Object.defineProperty(DefaultKeyValueDiffer.prototype, "isDirty", {
60495
        get: function () {
60496
            return this._additionsHead !== null || this._changesHead !== null ||
60497
                this._removalsHead !== null;
60498
        },
60499
        enumerable: true,
60500
        configurable: true
60501
    });
60502
    DefaultKeyValueDiffer.prototype.forEachItem = function (fn) {
60503
        var record;
60504
        for (record = this._mapHead; record !== null; record = record._next) {
60505
            fn(record);
60506
        }
60507
    };
60508
    DefaultKeyValueDiffer.prototype.forEachPreviousItem = function (fn) {
60509
        var record;
60510
        for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {
60511
            fn(record);
60512
        }
60513
    };
60514
    DefaultKeyValueDiffer.prototype.forEachChangedItem = function (fn) {
60515
        var record;
60516
        for (record = this._changesHead; record !== null; record = record._nextChanged) {
60517
            fn(record);
60518
        }
60519
    };
60520
    DefaultKeyValueDiffer.prototype.forEachAddedItem = function (fn) {
60521
        var record;
60522
        for (record = this._additionsHead; record !== null; record = record._nextAdded) {
60523
            fn(record);
60524
        }
60525
    };
60526
    DefaultKeyValueDiffer.prototype.forEachRemovedItem = function (fn) {
60527
        var record;
60528
        for (record = this._removalsHead; record !== null; record = record._nextRemoved) {
60529
            fn(record);
60530
        }
60531
    };
60532
    DefaultKeyValueDiffer.prototype.diff = function (map) {
60533
        if (!map) {
60534
            map = new Map();
60535
        }
60536
        else if (!(map instanceof Map || isJsObject(map))) {
60537
            throw new Error("Error trying to diff '" + stringify(map) + "'. Only maps and objects are allowed");
60538
        }
60539
        return this.check(map) ? this : null;
60540
    };
60541
    DefaultKeyValueDiffer.prototype.onDestroy = function () { };
60542
    /**
60543
     * Check the current state of the map vs the previous.
60544
     * The algorithm is optimised for when the keys do no change.
60545
     */
60546
    /**
60547
       * Check the current state of the map vs the previous.
60548
       * The algorithm is optimised for when the keys do no change.
60549
       */
60550
    DefaultKeyValueDiffer.prototype.check = /**
60551
       * Check the current state of the map vs the previous.
60552
       * The algorithm is optimised for when the keys do no change.
60553
       */
60554
    function (map) {
60555
        var _this = this;
60556
        this._reset();
60557
        var insertBefore = this._mapHead;
60558
        this._appendAfter = null;
60559
        this._forEach(map, function (value, key) {
60560
            if (insertBefore && insertBefore.key === key) {
60561
                _this._maybeAddToChanges(insertBefore, value);
60562
                _this._appendAfter = insertBefore;
60563
                insertBefore = insertBefore._next;
60564
            }
60565
            else {
60566
                var record = _this._getOrCreateRecordForKey(key, value);
60567
                insertBefore = _this._insertBeforeOrAppend(insertBefore, record);
60568
            }
60569
        });
60570
        // Items remaining at the end of the list have been deleted
60571
        if (insertBefore) {
60572
            if (insertBefore._prev) {
60573
                insertBefore._prev._next = null;
60574
            }
60575
            this._removalsHead = insertBefore;
60576
            for (var record = insertBefore; record !== null; record = record._nextRemoved) {
60577
                if (record === this._mapHead) {
60578
                    this._mapHead = null;
60579
                }
60580
                this._records.delete(record.key);
60581
                record._nextRemoved = record._next;
60582
                record.previousValue = record.currentValue;
60583
                record.currentValue = null;
60584
                record._prev = null;
60585
                record._next = null;
60586
            }
60587
        }
60588
        // Make sure tails have no next records from previous runs
60589
        if (this._changesTail)
60590
            this._changesTail._nextChanged = null;
60591
        if (this._additionsTail)
60592
            this._additionsTail._nextAdded = null;
60593
        return this.isDirty;
60594
    };
60595
    /**
60596
     * Inserts a record before `before` or append at the end of the list when `before` is null.
60597
     *
60598
     * Notes:
60599
     * - This method appends at `this._appendAfter`,
60600
     * - This method updates `this._appendAfter`,
60601
     * - The return value is the new value for the insertion pointer.
60602
     */
60603
    /**
60604
       * Inserts a record before `before` or append at the end of the list when `before` is null.
60605
       *
60606
       * Notes:
60607
       * - This method appends at `this._appendAfter`,
60608
       * - This method updates `this._appendAfter`,
60609
       * - The return value is the new value for the insertion pointer.
60610
       */
60611
    DefaultKeyValueDiffer.prototype._insertBeforeOrAppend = /**
60612
       * Inserts a record before `before` or append at the end of the list when `before` is null.
60613
       *
60614
       * Notes:
60615
       * - This method appends at `this._appendAfter`,
60616
       * - This method updates `this._appendAfter`,
60617
       * - The return value is the new value for the insertion pointer.
60618
       */
60619
    function (before, record) {
60620
        if (before) {
60621
            var prev = before._prev;
60622
            record._next = before;
60623
            record._prev = prev;
60624
            before._prev = record;
60625
            if (prev) {
60626
                prev._next = record;
60627
            }
60628
            if (before === this._mapHead) {
60629
                this._mapHead = record;
60630
            }
60631
            this._appendAfter = before;
60632
            return before;
60633
        }
60634
        if (this._appendAfter) {
60635
            this._appendAfter._next = record;
60636
            record._prev = this._appendAfter;
60637
        }
60638
        else {
60639
            this._mapHead = record;
60640
        }
60641
        this._appendAfter = record;
60642
        return null;
60643
    };
60644
    DefaultKeyValueDiffer.prototype._getOrCreateRecordForKey = function (key, value) {
60645
        if (this._records.has(key)) {
60646
            var record_1 = (this._records.get(key));
60647
            this._maybeAddToChanges(record_1, value);
60648
            var prev = record_1._prev;
60649
            var next = record_1._next;
60650
            if (prev) {
60651
                prev._next = next;
60652
            }
60653
            if (next) {
60654
                next._prev = prev;
60655
            }
60656
            record_1._next = null;
60657
            record_1._prev = null;
60658
            return record_1;
60659
        }
60660
        var record = new KeyValueChangeRecord_(key);
60661
        this._records.set(key, record);
60662
        record.currentValue = value;
60663
        this._addToAdditions(record);
60664
        return record;
60665
    };
60666
    /** @internal */
60667
    /** @internal */
60668
    DefaultKeyValueDiffer.prototype._reset = /** @internal */
60669
    function () {
60670
        if (this.isDirty) {
60671
            var record = void 0;
60672
            // let `_previousMapHead` contain the state of the map before the changes
60673
            this._previousMapHead = this._mapHead;
60674
            for (record = this._previousMapHead; record !== null; record = record._next) {
60675
                record._nextPrevious = record._next;
60676
            }
60677
            // Update `record.previousValue` with the value of the item before the changes
60678
            // We need to update all changed items (that's those which have been added and changed)
60679
            for (record = this._changesHead; record !== null; record = record._nextChanged) {
60680
                record.previousValue = record.currentValue;
60681
            }
60682
            for (record = this._additionsHead; record != null; record = record._nextAdded) {
60683
                record.previousValue = record.currentValue;
60684
            }
60685
            this._changesHead = this._changesTail = null;
60686
            this._additionsHead = this._additionsTail = null;
60687
            this._removalsHead = null;
60688
        }
60689
    };
60690
    // Add the record or a given key to the list of changes only when the value has actually changed
60691
    // Add the record or a given key to the list of changes only when the value has actually changed
60692
    DefaultKeyValueDiffer.prototype._maybeAddToChanges =
60693
    // Add the record or a given key to the list of changes only when the value has actually changed
60694
    function (record, newValue) {
60695
        if (!looseIdentical(newValue, record.currentValue)) {
60696
            record.previousValue = record.currentValue;
60697
            record.currentValue = newValue;
60698
            this._addToChanges(record);
60699
        }
60700
    };
60701
    DefaultKeyValueDiffer.prototype._addToAdditions = function (record) {
60702
        if (this._additionsHead === null) {
60703
            this._additionsHead = this._additionsTail = record;
60704
        }
60705
        else {
60706
            this._additionsTail._nextAdded = record;
60707
            this._additionsTail = record;
60708
        }
60709
    };
60710
    DefaultKeyValueDiffer.prototype._addToChanges = function (record) {
60711
        if (this._changesHead === null) {
60712
            this._changesHead = this._changesTail = record;
60713
        }
60714
        else {
60715
            this._changesTail._nextChanged = record;
60716
            this._changesTail = record;
60717
        }
60718
    };
60719
    /** @internal */
60720
    /** @internal */
60721
    DefaultKeyValueDiffer.prototype._forEach = /** @internal */
60722
    function (obj, fn) {
60723
        if (obj instanceof Map) {
60724
            obj.forEach(fn);
60725
        }
60726
        else {
60727
            Object.keys(obj).forEach(function (k) { return fn(obj[k], k); });
60728
        }
60729
    };
60730
    return DefaultKeyValueDiffer;
60731
}());
60732
var KeyValueChangeRecord_ = /** @class */ (function () {
60733
    function KeyValueChangeRecord_(key) {
60734
        this.key = key;
60735
        this.previousValue = null;
60736
        this.currentValue = null;
60737
        /** @internal */
60738
        this._nextPrevious = null;
60739
        /** @internal */
60740
        this._next = null;
60741
        /** @internal */
60742
        this._prev = null;
60743
        /** @internal */
60744
        this._nextAdded = null;
60745
        /** @internal */
60746
        this._nextRemoved = null;
60747
        /** @internal */
60748
        this._nextChanged = null;
60749
    }
60750
    return KeyValueChangeRecord_;
60751
}());
60752
 
60753
/**
60754
 * @license
60755
 * Copyright Google Inc. All Rights Reserved.
60756
 *
60757
 * Use of this source code is governed by an MIT-style license that can be
60758
 * found in the LICENSE file at https://angular.io/license
60759
 */
60760
/**
60761
 * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.
60762
 *
60763
 */
60764
var IterableDiffers = /** @class */ (function () {
60765
    function IterableDiffers(factories) {
60766
        this.factories = factories;
60767
    }
60768
    IterableDiffers.create = function (factories, parent) {
60769
        if (parent != null) {
60770
            var copied = parent.factories.slice();
60771
            factories = factories.concat(copied);
60772
        }
60773
        return new IterableDiffers(factories);
60774
    };
60775
    /**
60776
     * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the
60777
     * inherited {@link IterableDiffers} instance with the provided factories and return a new
60778
     * {@link IterableDiffers} instance.
60779
     *
60780
     * The following example shows how to extend an existing list of factories,
60781
     * which will only be applied to the injector for this component and its children.
60782
     * This step is all that's required to make a new {@link IterableDiffer} available.
60783
     *
60784
     * ### Example
60785
     *
60786
     * ```
60787
     * @Component({
60788
     *   viewProviders: [
60789
     *     IterableDiffers.extend([new ImmutableListDiffer()])
60790
     *   ]
60791
     * })
60792
     * ```
60793
     */
60794
    /**
60795
       * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the
60796
       * inherited {@link IterableDiffers} instance with the provided factories and return a new
60797
       * {@link IterableDiffers} instance.
60798
       *
60799
       * The following example shows how to extend an existing list of factories,
60800
       * which will only be applied to the injector for this component and its children.
60801
       * This step is all that's required to make a new {@link IterableDiffer} available.
60802
       *
60803
       * ### Example
60804
       *
60805
       * ```
60806
       * @Component({
60807
       *   viewProviders: [
60808
       *     IterableDiffers.extend([new ImmutableListDiffer()])
60809
       *   ]
60810
       * })
60811
       * ```
60812
       */
60813
    IterableDiffers.extend = /**
60814
       * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the
60815
       * inherited {@link IterableDiffers} instance with the provided factories and return a new
60816
       * {@link IterableDiffers} instance.
60817
       *
60818
       * The following example shows how to extend an existing list of factories,
60819
       * which will only be applied to the injector for this component and its children.
60820
       * This step is all that's required to make a new {@link IterableDiffer} available.
60821
       *
60822
       * ### Example
60823
       *
60824
       * ```
60825
       * @Component({
60826
       *   viewProviders: [
60827
       *     IterableDiffers.extend([new ImmutableListDiffer()])
60828
       *   ]
60829
       * })
60830
       * ```
60831
       */
60832
    function (factories) {
60833
        return {
60834
            provide: IterableDiffers,
60835
            useFactory: function (parent) {
60836
                if (!parent) {
60837
                    // Typically would occur when calling IterableDiffers.extend inside of dependencies passed
60838
                    // to
60839
                    // bootstrap(), which would override default pipes instead of extending them.
60840
                    throw new Error('Cannot extend IterableDiffers without a parent injector');
60841
                }
60842
                return IterableDiffers.create(factories, parent);
60843
            },
60844
            // Dependency technically isn't optional, but we can provide a better error message this way.
60845
            deps: [[IterableDiffers, new SkipSelf(), new Optional()]]
60846
        };
60847
    };
60848
    IterableDiffers.prototype.find = function (iterable) {
60849
        var factory = this.factories.find(function (f) { return f.supports(iterable); });
60850
        if (factory != null) {
60851
            return factory;
60852
        }
60853
        else {
60854
            throw new Error("Cannot find a differ supporting object '" + iterable + "' of type '" + getTypeNameForDebugging(iterable) + "'");
60855
        }
60856
    };
60857
    IterableDiffers.ngInjectableDef = defineInjectable({
60858
        providedIn: 'root',
60859
        factory: function () { return new IterableDiffers([new DefaultIterableDifferFactory()]); }
60860
    });
60861
    return IterableDiffers;
60862
}());
60863
function getTypeNameForDebugging(type) {
60864
    return type['name'] || typeof type;
60865
}
60866
 
60867
/**
60868
 * @license
60869
 * Copyright Google Inc. All Rights Reserved.
60870
 *
60871
 * Use of this source code is governed by an MIT-style license that can be
60872
 * found in the LICENSE file at https://angular.io/license
60873
 */
60874
/**
60875
 * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.
60876
 *
60877
 */
60878
var KeyValueDiffers = /** @class */ (function () {
60879
    function KeyValueDiffers(factories) {
60880
        this.factories = factories;
60881
    }
60882
    KeyValueDiffers.create = function (factories, parent) {
60883
        if (parent) {
60884
            var copied = parent.factories.slice();
60885
            factories = factories.concat(copied);
60886
        }
60887
        return new KeyValueDiffers(factories);
60888
    };
60889
    /**
60890
     * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the
60891
     * inherited {@link KeyValueDiffers} instance with the provided factories and return a new
60892
     * {@link KeyValueDiffers} instance.
60893
     *
60894
     * The following example shows how to extend an existing list of factories,
60895
     * which will only be applied to the injector for this component and its children.
60896
     * This step is all that's required to make a new {@link KeyValueDiffer} available.
60897
     *
60898
     * ### Example
60899
     *
60900
     * ```
60901
     * @Component({
60902
     *   viewProviders: [
60903
     *     KeyValueDiffers.extend([new ImmutableMapDiffer()])
60904
     *   ]
60905
     * })
60906
     * ```
60907
     */
60908
    /**
60909
       * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the
60910
       * inherited {@link KeyValueDiffers} instance with the provided factories and return a new
60911
       * {@link KeyValueDiffers} instance.
60912
       *
60913
       * The following example shows how to extend an existing list of factories,
60914
       * which will only be applied to the injector for this component and its children.
60915
       * This step is all that's required to make a new {@link KeyValueDiffer} available.
60916
       *
60917
       * ### Example
60918
       *
60919
       * ```
60920
       * @Component({
60921
       *   viewProviders: [
60922
       *     KeyValueDiffers.extend([new ImmutableMapDiffer()])
60923
       *   ]
60924
       * })
60925
       * ```
60926
       */
60927
    KeyValueDiffers.extend = /**
60928
       * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the
60929
       * inherited {@link KeyValueDiffers} instance with the provided factories and return a new
60930
       * {@link KeyValueDiffers} instance.
60931
       *
60932
       * The following example shows how to extend an existing list of factories,
60933
       * which will only be applied to the injector for this component and its children.
60934
       * This step is all that's required to make a new {@link KeyValueDiffer} available.
60935
       *
60936
       * ### Example
60937
       *
60938
       * ```
60939
       * @Component({
60940
       *   viewProviders: [
60941
       *     KeyValueDiffers.extend([new ImmutableMapDiffer()])
60942
       *   ]
60943
       * })
60944
       * ```
60945
       */
60946
    function (factories) {
60947
        return {
60948
            provide: KeyValueDiffers,
60949
            useFactory: function (parent) {
60950
                if (!parent) {
60951
                    // Typically would occur when calling KeyValueDiffers.extend inside of dependencies passed
60952
                    // to bootstrap(), which would override default pipes instead of extending them.
60953
                    throw new Error('Cannot extend KeyValueDiffers without a parent injector');
60954
                }
60955
                return KeyValueDiffers.create(factories, parent);
60956
            },
60957
            // Dependency technically isn't optional, but we can provide a better error message this way.
60958
            deps: [[KeyValueDiffers, new SkipSelf(), new Optional()]]
60959
        };
60960
    };
60961
    KeyValueDiffers.prototype.find = function (kv) {
60962
        var factory = this.factories.find(function (f) { return f.supports(kv); });
60963
        if (factory) {
60964
            return factory;
60965
        }
60966
        throw new Error("Cannot find a differ supporting object '" + kv + "'");
60967
    };
60968
    return KeyValueDiffers;
60969
}());
60970
 
60971
/**
60972
 * @license
60973
 * Copyright Google Inc. All Rights Reserved.
60974
 *
60975
 * Use of this source code is governed by an MIT-style license that can be
60976
 * found in the LICENSE file at https://angular.io/license
60977
 */
60978
/**
60979
 * Structural diffing for `Object`s and `Map`s.
60980
 */
60981
var keyValDiff = [new DefaultKeyValueDifferFactory()];
60982
/**
60983
 * Structural diffing for `Iterable` types such as `Array`s.
60984
 */
60985
var iterableDiff = [new DefaultIterableDifferFactory()];
60986
var defaultIterableDiffers = new IterableDiffers(iterableDiff);
60987
var defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);
60988
 
60989
/**
60990
 * @license
60991
 * Copyright Google Inc. All Rights Reserved.
60992
 *
60993
 * Use of this source code is governed by an MIT-style license that can be
60994
 * found in the LICENSE file at https://angular.io/license
60995
 */
60996
 
60997
/**
60998
 * @license
60999
 * Copyright Google Inc. All Rights Reserved.
61000
 *
61001
 * Use of this source code is governed by an MIT-style license that can be
61002
 * found in the LICENSE file at https://angular.io/license
61003
 */
61004
var _CORE_PLATFORM_PROVIDERS = [
61005
    // Set a default platform name for platforms that don't set it explicitly.
61006
    { provide: PLATFORM_ID, useValue: 'unknown' },
61007
    { provide: PlatformRef, deps: [Injector] },
61008
    { provide: TestabilityRegistry, deps: [] },
61009
    { provide: Console, deps: [] },
61010
];
61011
/**
61012
 * This platform has to be included in any other platform
61013
 *
61014
 * @experimental
61015
 */
61016
var platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS);
61017
 
61018
/**
61019
 * @license
61020
 * Copyright Google Inc. All Rights Reserved.
61021
 *
61022
 * Use of this source code is governed by an MIT-style license that can be
61023
 * found in the LICENSE file at https://angular.io/license
61024
 */
61025
/**
61026
 * Provide this token to set the locale of your application.
61027
 * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,
61028
 * DecimalPipe and PercentPipe) and by ICU expressions.
61029
 *
61030
 * See the {@linkDocs guide/i18n#setting-up-locale i18n guide} for more information.
61031
 *
61032
 * ### Example
61033
 *
61034
 * ```typescript
61035
 * import { LOCALE_ID } from '@angular/core';
61036
 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
61037
 * import { AppModule } from './app/app.module';
61038
 *
61039
 * platformBrowserDynamic().bootstrapModule(AppModule, {
61040
 *   providers: [{provide: LOCALE_ID, useValue: 'en-US' }]
61041
 * });
61042
 * ```
61043
 *
61044
 * @experimental i18n support is experimental.
61045
 */
61046
var LOCALE_ID = new InjectionToken('LocaleId');
61047
/**
61048
 * Use this token at bootstrap to provide the content of your translation file (`xtb`,
61049
 * `xlf` or `xlf2`) when you want to translate your application in another language.
61050
 *
61051
 * See the {@linkDocs guide/i18n#merge i18n guide} for more information.
61052
 *
61053
 * ### Example
61054
 *
61055
 * ```typescript
61056
 * import { TRANSLATIONS } from '@angular/core';
61057
 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
61058
 * import { AppModule } from './app/app.module';
61059
 *
61060
 * // content of your translation file
61061
 * const translations = '....';
61062
 *
61063
 * platformBrowserDynamic().bootstrapModule(AppModule, {
61064
 *   providers: [{provide: TRANSLATIONS, useValue: translations }]
61065
 * });
61066
 * ```
61067
 *
61068
 * @experimental i18n support is experimental.
61069
 */
61070
var TRANSLATIONS = new InjectionToken('Translations');
61071
/**
61072
 * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,
61073
 * `xlf` or `xlf2`.
61074
 *
61075
 * See the {@linkDocs guide/i18n#merge i18n guide} for more information.
61076
 *
61077
 * ### Example
61078
 *
61079
 * ```typescript
61080
 * import { TRANSLATIONS_FORMAT } from '@angular/core';
61081
 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
61082
 * import { AppModule } from './app/app.module';
61083
 *
61084
 * platformBrowserDynamic().bootstrapModule(AppModule, {
61085
 *   providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]
61086
 * });
61087
 * ```
61088
 *
61089
 * @experimental i18n support is experimental.
61090
 */
61091
var TRANSLATIONS_FORMAT = new InjectionToken('TranslationsFormat');
61092
/**
61093
 * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy
61094
 * that the compiler should use in case of missing translations:
61095
 * - Error: throw if you have missing translations.
61096
 * - Warning (default): show a warning in the console and/or shell.
61097
 * - Ignore: do nothing.
61098
 *
61099
 * See the {@linkDocs guide/i18n#missing-translation i18n guide} for more information.
61100
 *
61101
 * ### Example
61102
 * ```typescript
61103
 * import { MissingTranslationStrategy } from '@angular/core';
61104
 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
61105
 * import { AppModule } from './app/app.module';
61106
 *
61107
 * platformBrowserDynamic().bootstrapModule(AppModule, {
61108
 *   missingTranslation: MissingTranslationStrategy.Error
61109
 * });
61110
 * ```
61111
 *
61112
 * @experimental i18n support is experimental.
61113
 */
61114
/**
61115
 * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy
61116
 * that the compiler should use in case of missing translations:
61117
 * - Error: throw if you have missing translations.
61118
 * - Warning (default): show a warning in the console and/or shell.
61119
 * - Ignore: do nothing.
61120
 *
61121
 * See the {@linkDocs guide/i18n#missing-translation i18n guide} for more information.
61122
 *
61123
 * ### Example
61124
 * ```typescript
61125
 * import { MissingTranslationStrategy } from '@angular/core';
61126
 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
61127
 * import { AppModule } from './app/app.module';
61128
 *
61129
 * platformBrowserDynamic().bootstrapModule(AppModule, {
61130
 *   missingTranslation: MissingTranslationStrategy.Error
61131
 * });
61132
 * ```
61133
 *
61134
 * @experimental i18n support is experimental.
61135
 */
61136
var MissingTranslationStrategy;
61137
/**
61138
 * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy
61139
 * that the compiler should use in case of missing translations:
61140
 * - Error: throw if you have missing translations.
61141
 * - Warning (default): show a warning in the console and/or shell.
61142
 * - Ignore: do nothing.
61143
 *
61144
 * See the {@linkDocs guide/i18n#missing-translation i18n guide} for more information.
61145
 *
61146
 * ### Example
61147
 * ```typescript
61148
 * import { MissingTranslationStrategy } from '@angular/core';
61149
 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
61150
 * import { AppModule } from './app/app.module';
61151
 *
61152
 * platformBrowserDynamic().bootstrapModule(AppModule, {
61153
 *   missingTranslation: MissingTranslationStrategy.Error
61154
 * });
61155
 * ```
61156
 *
61157
 * @experimental i18n support is experimental.
61158
 */
61159
(function (MissingTranslationStrategy) {
61160
    MissingTranslationStrategy[MissingTranslationStrategy["Error"] = 0] = "Error";
61161
    MissingTranslationStrategy[MissingTranslationStrategy["Warning"] = 1] = "Warning";
61162
    MissingTranslationStrategy[MissingTranslationStrategy["Ignore"] = 2] = "Ignore";
61163
})(MissingTranslationStrategy || (MissingTranslationStrategy = {}));
61164
 
61165
/**
61166
 * @license
61167
 * Copyright Google Inc. All Rights Reserved.
61168
 *
61169
 * Use of this source code is governed by an MIT-style license that can be
61170
 * found in the LICENSE file at https://angular.io/license
61171
 */
61172
function _iterableDiffersFactory() {
61173
    return defaultIterableDiffers;
61174
}
61175
function _keyValueDiffersFactory() {
61176
    return defaultKeyValueDiffers;
61177
}
61178
function _localeFactory(locale) {
61179
    return locale || 'en-US';
61180
}
61181
/**
61182
 * This module includes the providers of @angular/core that are needed
61183
 * to bootstrap components via `ApplicationRef`.
61184
 *
61185
 * @experimental
61186
 */
61187
var ApplicationModule = /** @class */ (function () {
61188
    // Inject ApplicationRef to make it eager...
61189
    function ApplicationModule(appRef) {
61190
    }
61191
    ApplicationModule.decorators = [
61192
        { type: NgModule, args: [{
61193
                    providers: [
61194
                        ApplicationRef,
61195
                        ApplicationInitStatus,
61196
                        Compiler,
61197
                        APP_ID_RANDOM_PROVIDER,
61198
                        { provide: IterableDiffers, useFactory: _iterableDiffersFactory },
61199
                        { provide: KeyValueDiffers, useFactory: _keyValueDiffersFactory },
61200
                        {
61201
                            provide: LOCALE_ID,
61202
                            useFactory: _localeFactory,
61203
                            deps: [[new Inject(LOCALE_ID), new Optional(), new SkipSelf()]]
61204
                        },
61205
                    ]
61206
                },] }
61207
    ];
61208
    /** @nocollapse */
61209
    ApplicationModule.ctorParameters = function () { return [
61210
        { type: ApplicationRef, },
61211
    ]; };
61212
    return ApplicationModule;
61213
}());
61214
 
61215
/**
61216
 * @license
61217
 * Copyright Google Inc. All Rights Reserved.
61218
 *
61219
 * Use of this source code is governed by an MIT-style license that can be
61220
 * found in the LICENSE file at https://angular.io/license
61221
 */
61222
/**
61223
 * This helper class is used to get hold of an inert tree of DOM elements containing dirty HTML
61224
 * that needs sanitizing.
61225
 * Depending upon browser support we must use one of three strategies for doing this.
61226
 * Support: Safari 10.x -> XHR strategy
61227
 * Support: Firefox -> DomParser strategy
61228
 * Default: InertDocument strategy
61229
 */
61230
var InertBodyHelper = /** @class */ (function () {
61231
    function InertBodyHelper(defaultDoc) {
61232
        this.defaultDoc = defaultDoc;
61233
        this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert');
61234
        this.inertBodyElement = this.inertDocument.body;
61235
        if (this.inertBodyElement == null) {
61236
            // usually there should be only one body element in the document, but IE doesn't have any, so
61237
            // we need to create one.
61238
            var inertHtml = this.inertDocument.createElement('html');
61239
            this.inertDocument.appendChild(inertHtml);
61240
            this.inertBodyElement = this.inertDocument.createElement('body');
61241
            inertHtml.appendChild(this.inertBodyElement);
61242
        }
61243
        this.inertBodyElement.innerHTML = '<svg><g onload="this.parentNode.remove()"></g></svg>';
61244
        if (this.inertBodyElement.querySelector && !this.inertBodyElement.querySelector('svg')) {
61245
            // We just hit the Safari 10.1 bug - which allows JS to run inside the SVG G element
61246
            // so use the XHR strategy.
61247
            this.getInertBodyElement = this.getInertBodyElement_XHR;
61248
            return;
61249
        }
61250
        this.inertBodyElement.innerHTML =
61251
            '<svg><p><style><img src="</style><img src=x onerror=alert(1)//">';
61252
        if (this.inertBodyElement.querySelector && this.inertBodyElement.querySelector('svg img')) {
61253
            // We just hit the Firefox bug - which prevents the inner img JS from being sanitized
61254
            // so use the DOMParser strategy, if it is available.
61255
            // If the DOMParser is not available then we are not in Firefox (Server/WebWorker?) so we
61256
            // fall through to the default strategy below.
61257
            if (isDOMParserAvailable()) {
61258
                this.getInertBodyElement = this.getInertBodyElement_DOMParser;
61259
                return;
61260
            }
61261
        }
61262
        // None of the bugs were hit so it is safe for us to use the default InertDocument strategy
61263
        this.getInertBodyElement = this.getInertBodyElement_InertDocument;
61264
    }
61265
    /**
61266
     * Use XHR to create and fill an inert body element (on Safari 10.1)
61267
     * See
61268
     * https://github.com/cure53/DOMPurify/blob/a992d3a75031cb8bb032e5ea8399ba972bdf9a65/src/purify.js#L439-L449
61269
     */
61270
    /**
61271
       * Use XHR to create and fill an inert body element (on Safari 10.1)
61272
       * See
61273
       * https://github.com/cure53/DOMPurify/blob/a992d3a75031cb8bb032e5ea8399ba972bdf9a65/src/purify.js#L439-L449
61274
       */
61275
    InertBodyHelper.prototype.getInertBodyElement_XHR = /**
61276
       * Use XHR to create and fill an inert body element (on Safari 10.1)
61277
       * See
61278
       * https://github.com/cure53/DOMPurify/blob/a992d3a75031cb8bb032e5ea8399ba972bdf9a65/src/purify.js#L439-L449
61279
       */
61280
    function (html) {
61281
        // We add these extra elements to ensure that the rest of the content is parsed as expected
61282
        // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the
61283
        // `<head>` tag.
61284
        html = '<body><remove></remove>' + html + '</body>';
61285
        try {
61286
            html = encodeURI(html);
61287
        }
61288
        catch (e) {
61289
            return null;
61290
        }
61291
        var xhr = new XMLHttpRequest();
61292
        xhr.responseType = 'document';
61293
        xhr.open('GET', 'data:text/html;charset=utf-8,' + html, false);
61294
        xhr.send(null);
61295
        var body = xhr.response.body;
61296
        body.removeChild((body.firstChild));
61297
        return body;
61298
    };
61299
    /**
61300
     * Use DOMParser to create and fill an inert body element (on Firefox)
61301
     * See https://github.com/cure53/DOMPurify/releases/tag/0.6.7
61302
     *
61303
     */
61304
    /**
61305
       * Use DOMParser to create and fill an inert body element (on Firefox)
61306
       * See https://github.com/cure53/DOMPurify/releases/tag/0.6.7
61307
       *
61308
       */
61309
    InertBodyHelper.prototype.getInertBodyElement_DOMParser = /**
61310
       * Use DOMParser to create and fill an inert body element (on Firefox)
61311
       * See https://github.com/cure53/DOMPurify/releases/tag/0.6.7
61312
       *
61313
       */
61314
    function (html) {
61315
        // We add these extra elements to ensure that the rest of the content is parsed as expected
61316
        // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the
61317
        // `<head>` tag.
61318
        html = '<body><remove></remove>' + html + '</body>';
61319
        try {
61320
            var body = new window
61321
                .DOMParser()
61322
                .parseFromString(html, 'text/html')
61323
                .body;
61324
            body.removeChild((body.firstChild));
61325
            return body;
61326
        }
61327
        catch (e) {
61328
            return null;
61329
        }
61330
    };
61331
    /**
61332
     * Use an HTML5 `template` element, if supported, or an inert body element created via
61333
     * `createHtmlDocument` to create and fill an inert DOM element.
61334
     * This is the default sane strategy to use if the browser does not require one of the specialised
61335
     * strategies above.
61336
     */
61337
    /**
61338
       * Use an HTML5 `template` element, if supported, or an inert body element created via
61339
       * `createHtmlDocument` to create and fill an inert DOM element.
61340
       * This is the default sane strategy to use if the browser does not require one of the specialised
61341
       * strategies above.
61342
       */
61343
    InertBodyHelper.prototype.getInertBodyElement_InertDocument = /**
61344
       * Use an HTML5 `template` element, if supported, or an inert body element created via
61345
       * `createHtmlDocument` to create and fill an inert DOM element.
61346
       * This is the default sane strategy to use if the browser does not require one of the specialised
61347
       * strategies above.
61348
       */
61349
    function (html) {
61350
        // Prefer using <template> element if supported.
61351
        var templateEl = this.inertDocument.createElement('template');
61352
        if ('content' in templateEl) {
61353
            templateEl.innerHTML = html;
61354
            return templateEl;
61355
        }
61356
        this.inertBodyElement.innerHTML = html;
61357
        // Support: IE 9-11 only
61358
        // strip custom-namespaced attributes on IE<=11
61359
        if (this.defaultDoc.documentMode) {
61360
            this.stripCustomNsAttrs(this.inertBodyElement);
61361
        }
61362
        return this.inertBodyElement;
61363
    };
61364
    /**
61365
     * When IE9-11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1'
61366
     * attribute to declare ns1 namespace and prefixes the attribute with 'ns1' (e.g.
61367
     * 'ns1:xlink:foo').
61368
     *
61369
     * This is undesirable since we don't want to allow any of these custom attributes. This method
61370
     * strips them all.
61371
     */
61372
    /**
61373
       * When IE9-11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1'
61374
       * attribute to declare ns1 namespace and prefixes the attribute with 'ns1' (e.g.
61375
       * 'ns1:xlink:foo').
61376
       *
61377
       * This is undesirable since we don't want to allow any of these custom attributes. This method
61378
       * strips them all.
61379
       */
61380
    InertBodyHelper.prototype.stripCustomNsAttrs = /**
61381
       * When IE9-11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1'
61382
       * attribute to declare ns1 namespace and prefixes the attribute with 'ns1' (e.g.
61383
       * 'ns1:xlink:foo').
61384
       *
61385
       * This is undesirable since we don't want to allow any of these custom attributes. This method
61386
       * strips them all.
61387
       */
61388
    function (el) {
61389
        var elAttrs = el.attributes;
61390
        // loop backwards so that we can support removals.
61391
        for (var i = elAttrs.length - 1; 0 < i; i--) {
61392
            var attrib = elAttrs.item(i);
61393
            var attrName = attrib.name;
61394
            if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) {
61395
                el.removeAttribute(attrName);
61396
            }
61397
        }
61398
        var childNode = el.firstChild;
61399
        while (childNode) {
61400
            if (childNode.nodeType === Node.ELEMENT_NODE)
61401
                this.stripCustomNsAttrs(childNode);
61402
            childNode = childNode.nextSibling;
61403
        }
61404
    };
61405
    return InertBodyHelper;
61406
}());
61407
/**
61408
 * We need to determine whether the DOMParser exists in the global context.
61409
 * The try-catch is because, on some browsers, trying to access this property
61410
 * on window can actually throw an error.
61411
 *
61412
 * @suppress {uselessCode}
61413
 */
61414
function isDOMParserAvailable() {
61415
    try {
61416
        return !!window.DOMParser;
61417
    }
61418
    catch (e) {
61419
        return false;
61420
    }
61421
}
61422
 
61423
/**
61424
 * @license
61425
 * Copyright Google Inc. All Rights Reserved.
61426
 *
61427
 * Use of this source code is governed by an MIT-style license that can be
61428
 * found in the LICENSE file at https://angular.io/license
61429
 */
61430
/**
61431
 * A pattern that recognizes a commonly useful subset of URLs that are safe.
61432
 *
61433
 * This regular expression matches a subset of URLs that will not cause script
61434
 * execution if used in URL context within a HTML document. Specifically, this
61435
 * regular expression matches if (comment from here on and regex copied from
61436
 * Soy's EscapingConventions):
61437
 * (1) Either a protocol in a whitelist (http, https, mailto or ftp).
61438
 * (2) or no protocol.  A protocol must be followed by a colon. The below
61439
 *     allows that by allowing colons only after one of the characters [/?#].
61440
 *     A colon after a hash (#) must be in the fragment.
61441
 *     Otherwise, a colon after a (?) must be in a query.
61442
 *     Otherwise, a colon after a single solidus (/) must be in a path.
61443
 *     Otherwise, a colon after a double solidus (//) must be in the authority
61444
 *     (before port).
61445
 *
61446
 * The pattern disallows &, used in HTML entity declarations before
61447
 * one of the characters in [/?#]. This disallows HTML entities used in the
61448
 * protocol name, which should never happen, e.g. "h&#116;tp" for "http".
61449
 * It also disallows HTML entities in the first path part of a relative path,
61450
 * e.g. "foo&lt;bar/baz".  Our existing escaping functions should not produce
61451
 * that. More importantly, it disallows masking of a colon,
61452
 * e.g. "javascript&#58;...".
61453
 *
61454
 * This regular expression was taken from the Closure sanitization library.
61455
 */
61456
var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
61457
/** A pattern that matches safe data URLs. Only matches image, video and audio types. */
61458
var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;
61459
function _sanitizeUrl(url) {
61460
    url = String(url);
61461
    if (url.match(SAFE_URL_PATTERN) || url.match(DATA_URL_PATTERN))
61462
        return url;
61463
    if (isDevMode()) {
61464
        console.warn("WARNING: sanitizing unsafe URL value " + url + " (see http://g.co/ng/security#xss)");
61465
    }
61466
    return 'unsafe:' + url;
61467
}
61468
function sanitizeSrcset(srcset) {
61469
    srcset = String(srcset);
61470
    return srcset.split(',').map(function (srcset) { return _sanitizeUrl(srcset.trim()); }).join(', ');
61471
}
61472
 
61473
/**
61474
 * @license
61475
 * Copyright Google Inc. All Rights Reserved.
61476
 *
61477
 * Use of this source code is governed by an MIT-style license that can be
61478
 * found in the LICENSE file at https://angular.io/license
61479
 */
61480
function tagSet(tags) {
61481
    var res = {};
61482
    try {
61483
        for (var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(tags.split(',')), _b = _a.next(); !_b.done; _b = _a.next()) {
61484
            var t = _b.value;
61485
            res[t] = true;
61486
        }
61487
    }
61488
    catch (e_1_1) { e_1 = { error: e_1_1 }; }
61489
    finally {
61490
        try {
61491
            if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
61492
        }
61493
        finally { if (e_1) throw e_1.error; }
61494
    }
61495
    return res;
61496
    var e_1, _c;
61497
}
61498
function merge$1() {
61499
    var sets = [];
61500
    for (var _i = 0; _i < arguments.length; _i++) {
61501
        sets[_i] = arguments[_i];
61502
    }
61503
    var res = {};
61504
    try {
61505
        for (var sets_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(sets), sets_1_1 = sets_1.next(); !sets_1_1.done; sets_1_1 = sets_1.next()) {
61506
            var s = sets_1_1.value;
61507
            for (var v in s) {
61508
                if (s.hasOwnProperty(v))
61509
                    res[v] = true;
61510
            }
61511
        }
61512
    }
61513
    catch (e_2_1) { e_2 = { error: e_2_1 }; }
61514
    finally {
61515
        try {
61516
            if (sets_1_1 && !sets_1_1.done && (_a = sets_1.return)) _a.call(sets_1);
61517
        }
61518
        finally { if (e_2) throw e_2.error; }
61519
    }
61520
    return res;
61521
    var e_2, _a;
61522
}
61523
// Good source of info about elements and attributes
61524
// http://dev.w3.org/html5/spec/Overview.html#semantics
61525
// http://simon.html5.org/html-elements
61526
// Safe Void Elements - HTML5
61527
// http://dev.w3.org/html5/spec/Overview.html#void-elements
61528
var VOID_ELEMENTS = tagSet('area,br,col,hr,img,wbr');
61529
// Elements that you can, intentionally, leave open (and which close themselves)
61530
// http://dev.w3.org/html5/spec/Overview.html#optional-tags
61531
var OPTIONAL_END_TAG_BLOCK_ELEMENTS = tagSet('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr');
61532
var OPTIONAL_END_TAG_INLINE_ELEMENTS = tagSet('rp,rt');
61533
var OPTIONAL_END_TAG_ELEMENTS = merge$1(OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS);
61534
// Safe Block Elements - HTML5
61535
var BLOCK_ELEMENTS = merge$1(OPTIONAL_END_TAG_BLOCK_ELEMENTS, tagSet('address,article,' +
61536
    'aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,' +
61537
    'h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul'));
61538
// Inline Elements - HTML5
61539
var INLINE_ELEMENTS = merge$1(OPTIONAL_END_TAG_INLINE_ELEMENTS, tagSet('a,abbr,acronym,audio,b,' +
61540
    'bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,' +
61541
    'samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video'));
61542
var VALID_ELEMENTS = merge$1(VOID_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS);
61543
// Attributes that have href and hence need to be sanitized
61544
var URI_ATTRS = tagSet('background,cite,href,itemtype,longdesc,poster,src,xlink:href');
61545
// Attributes that have special href set hence need to be sanitized
61546
var SRCSET_ATTRS = tagSet('srcset');
61547
var HTML_ATTRS = tagSet('abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,' +
61548
    'compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,' +
61549
    'ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,' +
61550
    'scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,' +
61551
    'valign,value,vspace,width');
61552
// NB: This currently consciously doesn't support SVG. SVG sanitization has had several security
61553
// issues in the past, so it seems safer to leave it out if possible. If support for binding SVG via
61554
// innerHTML is required, SVG attributes should be added here.
61555
// NB: Sanitization does not allow <form> elements or other active elements (<button> etc). Those
61556
// can be sanitized, but they increase security surface area without a legitimate use case, so they
61557
// are left out here.
61558
var VALID_ATTRS = merge$1(URI_ATTRS, SRCSET_ATTRS, HTML_ATTRS);
61559
/**
61560
 * SanitizingHtmlSerializer serializes a DOM fragment, stripping out any unsafe elements and unsafe
61561
 * attributes.
61562
 */
61563
var SanitizingHtmlSerializer = /** @class */ (function () {
61564
    function SanitizingHtmlSerializer() {
61565
        // Explicitly track if something was stripped, to avoid accidentally warning of sanitization just
61566
        // because characters were re-encoded.
61567
        this.sanitizedSomething = false;
61568
        this.buf = [];
61569
    }
61570
    SanitizingHtmlSerializer.prototype.sanitizeChildren = function (el) {
61571
        // This cannot use a TreeWalker, as it has to run on Angular's various DOM adapters.
61572
        // However this code never accesses properties off of `document` before deleting its contents
61573
        // again, so it shouldn't be vulnerable to DOM clobbering.
61574
        var current = (el.firstChild);
61575
        while (current) {
61576
            if (current.nodeType === Node.ELEMENT_NODE) {
61577
                this.startElement(current);
61578
            }
61579
            else if (current.nodeType === Node.TEXT_NODE) {
61580
                this.chars((current.nodeValue));
61581
            }
61582
            else {
61583
                // Strip non-element, non-text nodes.
61584
                this.sanitizedSomething = true;
61585
            }
61586
            if (current.firstChild) {
61587
                current = (current.firstChild);
61588
                continue;
61589
            }
61590
            while (current) {
61591
                // Leaving the element. Walk up and to the right, closing tags as we go.
61592
                if (current.nodeType === Node.ELEMENT_NODE) {
61593
                    this.endElement(current);
61594
                }
61595
                var next = this.checkClobberedElement(current, (current.nextSibling));
61596
                if (next) {
61597
                    current = next;
61598
                    break;
61599
                }
61600
                current = this.checkClobberedElement(current, (current.parentNode));
61601
            }
61602
        }
61603
        return this.buf.join('');
61604
    };
61605
    SanitizingHtmlSerializer.prototype.startElement = function (element) {
61606
        var tagName = element.nodeName.toLowerCase();
61607
        if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {
61608
            this.sanitizedSomething = true;
61609
            return;
61610
        }
61611
        this.buf.push('<');
61612
        this.buf.push(tagName);
61613
        var elAttrs = element.attributes;
61614
        for (var i = 0; i < elAttrs.length; i++) {
61615
            var elAttr = elAttrs.item(i);
61616
            var attrName = elAttr.name;
61617
            var lower = attrName.toLowerCase();
61618
            if (!VALID_ATTRS.hasOwnProperty(lower)) {
61619
                this.sanitizedSomething = true;
61620
                continue;
61621
            }
61622
            var value = elAttr.value;
61623
            // TODO(martinprobst): Special case image URIs for data:image/...
61624
            if (URI_ATTRS[lower])
61625
                value = _sanitizeUrl(value);
61626
            if (SRCSET_ATTRS[lower])
61627
                value = sanitizeSrcset(value);
61628
            this.buf.push(' ', attrName, '="', encodeEntities(value), '"');
61629
        }
61630
        this.buf.push('>');
61631
    };
61632
    SanitizingHtmlSerializer.prototype.endElement = function (current) {
61633
        var tagName = current.nodeName.toLowerCase();
61634
        if (VALID_ELEMENTS.hasOwnProperty(tagName) && !VOID_ELEMENTS.hasOwnProperty(tagName)) {
61635
            this.buf.push('</');
61636
            this.buf.push(tagName);
61637
            this.buf.push('>');
61638
        }
61639
    };
61640
    SanitizingHtmlSerializer.prototype.chars = function (chars) { this.buf.push(encodeEntities(chars)); };
61641
    SanitizingHtmlSerializer.prototype.checkClobberedElement = function (node, nextNode) {
61642
        if (nextNode &&
61643
            (node.compareDocumentPosition(nextNode) &
61644
                Node.DOCUMENT_POSITION_CONTAINED_BY) === Node.DOCUMENT_POSITION_CONTAINED_BY) {
61645
            throw new Error("Failed to sanitize html because the element is clobbered: " + node.outerHTML);
61646
        }
61647
        return nextNode;
61648
    };
61649
    return SanitizingHtmlSerializer;
61650
}());
61651
// Regular Expressions for parsing tags and attributes
61652
var SURROGATE_PAIR_REGEXP = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
61653
// ! to ~ is the ASCII range.
61654
var NON_ALPHANUMERIC_REGEXP = /([^\#-~ |!])/g;
61655
/**
61656
 * Escapes all potentially dangerous characters, so that the
61657
 * resulting string can be safely inserted into attribute or
61658
 * element text.
61659
 * @param value
61660
 */
61661
function encodeEntities(value) {
61662
    return value.replace(/&/g, '&amp;')
61663
        .replace(SURROGATE_PAIR_REGEXP, function (match) {
61664
        var hi = match.charCodeAt(0);
61665
        var low = match.charCodeAt(1);
61666
        return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';';
61667
    })
61668
        .replace(NON_ALPHANUMERIC_REGEXP, function (match) { return '&#' + match.charCodeAt(0) + ';'; })
61669
        .replace(/</g, '&lt;')
61670
        .replace(/>/g, '&gt;');
61671
}
61672
var inertBodyHelper;
61673
/**
61674
 * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to
61675
 * the DOM in a browser environment.
61676
 */
61677
function _sanitizeHtml(defaultDoc, unsafeHtmlInput) {
61678
    var inertBodyElement = null;
61679
    try {
61680
        inertBodyHelper = inertBodyHelper || new InertBodyHelper(defaultDoc);
61681
        // Make sure unsafeHtml is actually a string (TypeScript types are not enforced at runtime).
61682
        var unsafeHtml = unsafeHtmlInput ? String(unsafeHtmlInput) : '';
61683
        inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);
61684
        // mXSS protection. Repeatedly parse the document to make sure it stabilizes, so that a browser
61685
        // trying to auto-correct incorrect HTML cannot cause formerly inert HTML to become dangerous.
61686
        var mXSSAttempts = 5;
61687
        var parsedHtml = unsafeHtml;
61688
        do {
61689
            if (mXSSAttempts === 0) {
61690
                throw new Error('Failed to sanitize html because the input is unstable');
61691
            }
61692
            mXSSAttempts--;
61693
            unsafeHtml = parsedHtml;
61694
            parsedHtml = inertBodyElement.innerHTML;
61695
            inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);
61696
        } while (unsafeHtml !== parsedHtml);
61697
        var sanitizer = new SanitizingHtmlSerializer();
61698
        var safeHtml = sanitizer.sanitizeChildren(getTemplateContent((inertBodyElement)) || inertBodyElement);
61699
        if (isDevMode() && sanitizer.sanitizedSomething) {
61700
            console.warn('WARNING: sanitizing HTML stripped some content (see http://g.co/ng/security#xss).');
61701
        }
61702
        return safeHtml;
61703
    }
61704
    finally {
61705
        // In case anything goes wrong, clear out inertElement to reset the entire DOM structure.
61706
        if (inertBodyElement) {
61707
            var parent_1 = getTemplateContent(inertBodyElement) || inertBodyElement;
61708
            while (parent_1.firstChild) {
61709
                parent_1.removeChild(parent_1.firstChild);
61710
            }
61711
        }
61712
    }
61713
}
61714
function getTemplateContent(el) {
61715
    return 'content' in el /** Microsoft/TypeScript#21517 */ && isTemplateElement(el) ?
61716
        el.content :
61717
        null;
61718
}
61719
function isTemplateElement(el) {
61720
    return el.nodeType === Node.ELEMENT_NODE && el.nodeName === 'TEMPLATE';
61721
}
61722
 
61723
/**
61724
 * @license
61725
 * Copyright Google Inc. All Rights Reserved.
61726
 *
61727
 * Use of this source code is governed by an MIT-style license that can be
61728
 * found in the LICENSE file at https://angular.io/license
61729
 */
61730
/**
61731
 * Regular expression for safe style values.
61732
 *
61733
 * Quotes (" and ') are allowed, but a check must be done elsewhere to ensure they're balanced.
61734
 *
61735
 * ',' allows multiple values to be assigned to the same property (e.g. background-attachment or
61736
 * font-family) and hence could allow multiple values to get injected, but that should pose no risk
61737
 * of XSS.
61738
 *
61739
 * The function expression checks only for XSS safety, not for CSS validity.
61740
 *
61741
 * This regular expression was taken from the Closure sanitization library, and augmented for
61742
 * transformation values.
61743
 */
61744
var VALUES = '[-,."\'%_!# a-zA-Z0-9]+';
61745
var TRANSFORMATION_FNS = '(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|3d)?';
61746
var COLOR_FNS = '(?:rgb|hsl)a?';
61747
var GRADIENTS = '(?:repeating-)?(?:linear|radial)-gradient';
61748
var CSS3_FNS = '(?:calc|attr)';
61749
var FN_ARGS = '\\([-0-9.%, #a-zA-Z]+\\)';
61750
var SAFE_STYLE_VALUE = new RegExp("^(" + VALUES + "|" +
61751
    ("(?:" + TRANSFORMATION_FNS + "|" + COLOR_FNS + "|" + GRADIENTS + "|" + CSS3_FNS + ")") +
61752
    (FN_ARGS + ")$"), 'g');
61753
/**
61754
 * Matches a `url(...)` value with an arbitrary argument as long as it does
61755
 * not contain parentheses.
61756
 *
61757
 * The URL value still needs to be sanitized separately.
61758
 *
61759
 * `url(...)` values are a very common use case, e.g. for `background-image`. With carefully crafted
61760
 * CSS style rules, it is possible to construct an information leak with `url` values in CSS, e.g.
61761
 * by observing whether scroll bars are displayed, or character ranges used by a font face
61762
 * definition.
61763
 *
61764
 * Angular only allows binding CSS values (as opposed to entire CSS rules), so it is unlikely that
61765
 * binding a URL value without further cooperation from the page will cause an information leak, and
61766
 * if so, it is just a leak, not a full blown XSS vulnerability.
61767
 *
61768
 * Given the common use case, low likelihood of attack vector, and low impact of an attack, this
61769
 * code is permissive and allows URLs that sanitize otherwise.
61770
 */
61771
var URL_RE = /^url\(([^)]+)\)$/;
61772
/**
61773
 * Checks that quotes (" and ') are properly balanced inside a string. Assumes
61774
 * that neither escape (\) nor any other character that could result in
61775
 * breaking out of a string parsing context are allowed;
61776
 * see http://www.w3.org/TR/css3-syntax/#string-token-diagram.
61777
 *
61778
 * This code was taken from the Closure sanitization library.
61779
 */
61780
function hasBalancedQuotes(value) {
61781
    var outsideSingle = true;
61782
    var outsideDouble = true;
61783
    for (var i = 0; i < value.length; i++) {
61784
        var c = value.charAt(i);
61785
        if (c === '\'' && outsideDouble) {
61786
            outsideSingle = !outsideSingle;
61787
        }
61788
        else if (c === '"' && outsideSingle) {
61789
            outsideDouble = !outsideDouble;
61790
        }
61791
    }
61792
    return outsideSingle && outsideDouble;
61793
}
61794
/**
61795
 * Sanitizes the given untrusted CSS style property value (i.e. not an entire object, just a single
61796
 * value) and returns a value that is safe to use in a browser environment.
61797
 */
61798
function _sanitizeStyle(value) {
61799
    value = String(value).trim(); // Make sure it's actually a string.
61800
    if (!value)
61801
        return '';
61802
    // Single url(...) values are supported, but only for URLs that sanitize cleanly. See above for
61803
    // reasoning behind this.
61804
    var urlMatch = value.match(URL_RE);
61805
    if ((urlMatch && _sanitizeUrl(urlMatch[1]) === urlMatch[1]) ||
61806
        value.match(SAFE_STYLE_VALUE) && hasBalancedQuotes(value)) {
61807
        return value; // Safe style values.
61808
    }
61809
    if (isDevMode()) {
61810
        console.warn("WARNING: sanitizing unsafe style value " + value + " (see http://g.co/ng/security#xss).");
61811
    }
61812
    return 'unsafe';
61813
}
61814
 
61815
/**
61816
 * @license
61817
 * Copyright Google Inc. All Rights Reserved.
61818
 *
61819
 * Use of this source code is governed by an MIT-style license that can be
61820
 * found in the LICENSE file at https://angular.io/license
61821
 */
61822
/**
61823
 * @license
61824
 * Copyright Google Inc. All Rights Reserved.
61825
 *
61826
 * Use of this source code is governed by an MIT-style license that can be
61827
 * found in the LICENSE file at https://angular.io/license
61828
 */
61829
/**
61830
 * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property
61831
 * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly
61832
 * handled.
61833
 *
61834
 * See DomSanitizer for more details on security in Angular applications.
61835
 *
61836
 *
61837
 */
61838
/**
61839
 * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property
61840
 * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly
61841
 * handled.
61842
 *
61843
 * See DomSanitizer for more details on security in Angular applications.
61844
 *
61845
 *
61846
 */
61847
var SecurityContext;
61848
/**
61849
 * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property
61850
 * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly
61851
 * handled.
61852
 *
61853
 * See DomSanitizer for more details on security in Angular applications.
61854
 *
61855
 *
61856
 */
61857
(function (SecurityContext) {
61858
    SecurityContext[SecurityContext["NONE"] = 0] = "NONE";
61859
    SecurityContext[SecurityContext["HTML"] = 1] = "HTML";
61860
    SecurityContext[SecurityContext["STYLE"] = 2] = "STYLE";
61861
    SecurityContext[SecurityContext["SCRIPT"] = 3] = "SCRIPT";
61862
    SecurityContext[SecurityContext["URL"] = 4] = "URL";
61863
    SecurityContext[SecurityContext["RESOURCE_URL"] = 5] = "RESOURCE_URL";
61864
})(SecurityContext || (SecurityContext = {}));
61865
/**
61866
 * Sanitizer is used by the views to sanitize potentially dangerous values.
61867
 *
61868
 *
61869
 */
61870
var Sanitizer = /** @class */ (function () {
61871
    function Sanitizer() {
61872
    }
61873
    return Sanitizer;
61874
}());
61875
 
61876
/**
61877
 * @license
61878
 * Copyright Google Inc. All Rights Reserved.
61879
 *
61880
 * Use of this source code is governed by an MIT-style license that can be
61881
 * found in the LICENSE file at https://angular.io/license
61882
 */
61883
// Called before each cycle of a view's check to detect whether this is in the
61884
// initState for which we need to call ngOnInit, ngAfterContentInit or ngAfterViewInit
61885
// lifecycle methods. Returns true if this check cycle should call lifecycle
61886
// methods.
61887
function shiftInitState(view, priorInitState, newInitState) {
61888
    // Only update the InitState if we are currently in the prior state.
61889
    // For example, only move into CallingInit if we are in BeforeInit. Only
61890
    // move into CallingContentInit if we are in CallingInit. Normally this will
61891
    // always be true because of how checkCycle is called in checkAndUpdateView.
61892
    // However, if checkAndUpdateView is called recursively or if an exception is
61893
    // thrown while checkAndUpdateView is running, checkAndUpdateView starts over
61894
    // from the beginning. This ensures the state is monotonically increasing,
61895
    // terminating in the AfterInit state, which ensures the Init methods are called
61896
    // at least once and only once.
61897
    var state = view.state;
61898
    var initState = state & 1792;
61899
    if (initState === priorInitState) {
61900
        view.state = (state & ~1792 /* InitState_Mask */) | newInitState;
61901
        view.initIndex = -1;
61902
        return true;
61903
    }
61904
    return initState === newInitState;
61905
}
61906
// Returns true if the lifecycle init method should be called for the node with
61907
// the given init index.
61908
function shouldCallLifecycleInitHook(view, initState, index) {
61909
    if ((view.state & 1792 /* InitState_Mask */) === initState && view.initIndex <= index) {
61910
        view.initIndex = index + 1;
61911
        return true;
61912
    }
61913
    return false;
61914
}
61915
/**
61916
 * Accessor for view.nodes, enforcing that every usage site stays monomorphic.
61917
 */
61918
function asTextData(view, index) {
61919
    return view.nodes[index];
61920
}
61921
/**
61922
 * Accessor for view.nodes, enforcing that every usage site stays monomorphic.
61923
 */
61924
function asElementData(view, index) {
61925
    return view.nodes[index];
61926
}
61927
/**
61928
 * Accessor for view.nodes, enforcing that every usage site stays monomorphic.
61929
 */
61930
function asProviderData(view, index) {
61931
    return view.nodes[index];
61932
}
61933
/**
61934
 * Accessor for view.nodes, enforcing that every usage site stays monomorphic.
61935
 */
61936
function asPureExpressionData(view, index) {
61937
    return view.nodes[index];
61938
}
61939
/**
61940
 * Accessor for view.nodes, enforcing that every usage site stays monomorphic.
61941
 */
61942
function asQueryList(view, index) {
61943
    return view.nodes[index];
61944
}
61945
var DebugContext = /** @class */ (function () {
61946
    function DebugContext() {
61947
    }
61948
    return DebugContext;
61949
}());
61950
/**
61951
 * This object is used to prevent cycles in the source files and to have a place where
61952
 * debug mode can hook it. It is lazily filled when `isDevMode` is known.
61953
 */
61954
var Services = {
61955
    setCurrentNode: (undefined),
61956
    createRootView: (undefined),
61957
    createEmbeddedView: (undefined),
61958
    createComponentView: (undefined),
61959
    createNgModuleRef: (undefined),
61960
    overrideProvider: (undefined),
61961
    overrideComponentView: (undefined),
61962
    clearOverrides: (undefined),
61963
    checkAndUpdateView: (undefined),
61964
    checkNoChangesView: (undefined),
61965
    destroyView: (undefined),
61966
    resolveDep: (undefined),
61967
    createDebugContext: (undefined),
61968
    handleEvent: (undefined),
61969
    updateDirectives: (undefined),
61970
    updateRenderer: (undefined),
61971
    dirtyParentQueries: (undefined),
61972
};
61973
 
61974
/**
61975
 * @license
61976
 * Copyright Google Inc. All Rights Reserved.
61977
 *
61978
 * Use of this source code is governed by an MIT-style license that can be
61979
 * found in the LICENSE file at https://angular.io/license
61980
 */
61981
function expressionChangedAfterItHasBeenCheckedError(context, oldValue, currValue, isFirstCheck) {
61982
    var msg = "ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '" + oldValue + "'. Current value: '" + currValue + "'.";
61983
    if (isFirstCheck) {
61984
        msg +=
61985
            " It seems like the view has been created after its parent and its children have been dirty checked." +
61986
                " Has it been created in a change detection hook ?";
61987
    }
61988
    return viewDebugError(msg, context);
61989
}
61990
function viewWrappedDebugError(err, context) {
61991
    if (!(err instanceof Error)) {
61992
        // errors that are not Error instances don't have a stack,
61993
        // so it is ok to wrap them into a new Error object...
61994
        err = new Error(err.toString());
61995
    }
61996
    _addDebugContext(err, context);
61997
    return err;
61998
}
61999
function viewDebugError(msg, context) {
62000
    var err = new Error(msg);
62001
    _addDebugContext(err, context);
62002
    return err;
62003
}
62004
function _addDebugContext(err, context) {
62005
    err[ERROR_DEBUG_CONTEXT] = context;
62006
    err[ERROR_LOGGER] = context.logError.bind(context);
62007
}
62008
function isViewDebugError(err) {
62009
    return !!getDebugContext(err);
62010
}
62011
function viewDestroyedError(action) {
62012
    return new Error("ViewDestroyedError: Attempt to use a destroyed view: " + action);
62013
}
62014
 
62015
/**
62016
 * @license
62017
 * Copyright Google Inc. All Rights Reserved.
62018
 *
62019
 * Use of this source code is governed by an MIT-style license that can be
62020
 * found in the LICENSE file at https://angular.io/license
62021
 */
62022
var NOOP = function () { };
62023
var _tokenKeyCache = new Map();
62024
function tokenKey(token) {
62025
    var key = _tokenKeyCache.get(token);
62026
    if (!key) {
62027
        key = stringify(token) + '_' + _tokenKeyCache.size;
62028
        _tokenKeyCache.set(token, key);
62029
    }
62030
    return key;
62031
}
62032
function unwrapValue(view, nodeIdx, bindingIdx, value) {
62033
    if (WrappedValue.isWrapped(value)) {
62034
        value = WrappedValue.unwrap(value);
62035
        var globalBindingIdx = view.def.nodes[nodeIdx].bindingIndex + bindingIdx;
62036
        var oldValue = WrappedValue.unwrap(view.oldValues[globalBindingIdx]);
62037
        view.oldValues[globalBindingIdx] = new WrappedValue(oldValue);
62038
    }
62039
    return value;
62040
}
62041
var UNDEFINED_RENDERER_TYPE_ID = '$$undefined';
62042
var EMPTY_RENDERER_TYPE_ID = '$$empty';
62043
// Attention: this function is called as top level function.
62044
// Putting any logic in here will destroy closure tree shaking!
62045
function createRendererType2(values) {
62046
    return {
62047
        id: UNDEFINED_RENDERER_TYPE_ID,
62048
        styles: values.styles,
62049
        encapsulation: values.encapsulation,
62050
        data: values.data
62051
    };
62052
}
62053
var _renderCompCount = 0;
62054
function resolveRendererType2(type) {
62055
    if (type && type.id === UNDEFINED_RENDERER_TYPE_ID) {
62056
        // first time we see this RendererType2. Initialize it...
62057
        var isFilled = ((type.encapsulation != null && type.encapsulation !== ViewEncapsulation.None) ||
62058
            type.styles.length || Object.keys(type.data).length);
62059
        if (isFilled) {
62060
            type.id = "c" + _renderCompCount++;
62061
        }
62062
        else {
62063
            type.id = EMPTY_RENDERER_TYPE_ID;
62064
        }
62065
    }
62066
    if (type && type.id === EMPTY_RENDERER_TYPE_ID) {
62067
        type = null;
62068
    }
62069
    return type || null;
62070
}
62071
function checkBinding(view, def, bindingIdx, value) {
62072
    var oldValues = view.oldValues;
62073
    if ((view.state & 2 /* FirstCheck */) ||
62074
        !looseIdentical(oldValues[def.bindingIndex + bindingIdx], value)) {
62075
        return true;
62076
    }
62077
    return false;
62078
}
62079
function checkAndUpdateBinding(view, def, bindingIdx, value) {
62080
    if (checkBinding(view, def, bindingIdx, value)) {
62081
        view.oldValues[def.bindingIndex + bindingIdx] = value;
62082
        return true;
62083
    }
62084
    return false;
62085
}
62086
function checkBindingNoChanges(view, def, bindingIdx, value) {
62087
    var oldValue = view.oldValues[def.bindingIndex + bindingIdx];
62088
    if ((view.state & 1 /* BeforeFirstCheck */) || !devModeEqual(oldValue, value)) {
62089
        var bindingName = def.bindings[bindingIdx].name;
62090
        throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view, def.nodeIndex), bindingName + ": " + oldValue, bindingName + ": " + value, (view.state & 1 /* BeforeFirstCheck */) !== 0);
62091
    }
62092
}
62093
function markParentViewsForCheck(view) {
62094
    var currView = view;
62095
    while (currView) {
62096
        if (currView.def.flags & 2 /* OnPush */) {
62097
            currView.state |= 8 /* ChecksEnabled */;
62098
        }
62099
        currView = currView.viewContainerParent || currView.parent;
62100
    }
62101
}
62102
function markParentViewsForCheckProjectedViews(view, endView) {
62103
    var currView = view;
62104
    while (currView && currView !== endView) {
62105
        currView.state |= 64 /* CheckProjectedViews */;
62106
        currView = currView.viewContainerParent || currView.parent;
62107
    }
62108
}
62109
function dispatchEvent(view, nodeIndex, eventName, event) {
62110
    try {
62111
        var nodeDef = view.def.nodes[nodeIndex];
62112
        var startView = nodeDef.flags & 33554432 /* ComponentView */ ?
62113
            asElementData(view, nodeIndex).componentView :
62114
            view;
62115
        markParentViewsForCheck(startView);
62116
        return Services.handleEvent(view, nodeIndex, eventName, event);
62117
    }
62118
    catch (e) {
62119
        // Attention: Don't rethrow, as it would cancel Observable subscriptions!
62120
        view.root.errorHandler.handleError(e);
62121
    }
62122
}
62123
function declaredViewContainer(view) {
62124
    if (view.parent) {
62125
        var parentView = view.parent;
62126
        return asElementData(parentView, view.parentNodeDef.nodeIndex);
62127
    }
62128
    return null;
62129
}
62130
/**
62131
 * for component views, this is the host element.
62132
 * for embedded views, this is the index of the parent node
62133
 * that contains the view container.
62134
 */
62135
function viewParentEl(view) {
62136
    var parentView = view.parent;
62137
    if (parentView) {
62138
        return view.parentNodeDef.parent;
62139
    }
62140
    else {
62141
        return null;
62142
    }
62143
}
62144
function renderNode(view, def) {
62145
    switch (def.flags & 201347067 /* Types */) {
62146
        case 1 /* TypeElement */:
62147
            return asElementData(view, def.nodeIndex).renderElement;
62148
        case 2 /* TypeText */:
62149
            return asTextData(view, def.nodeIndex).renderText;
62150
    }
62151
}
62152
function elementEventFullName(target, name) {
62153
    return target ? target + ":" + name : name;
62154
}
62155
function isComponentView(view) {
62156
    return !!view.parent && !!(view.parentNodeDef.flags & 32768 /* Component */);
62157
}
62158
function isEmbeddedView(view) {
62159
    return !!view.parent && !(view.parentNodeDef.flags & 32768 /* Component */);
62160
}
62161
function filterQueryId(queryId) {
62162
    return 1 << (queryId % 32);
62163
}
62164
function splitMatchedQueriesDsl(matchedQueriesDsl) {
62165
    var matchedQueries = {};
62166
    var matchedQueryIds = 0;
62167
    var references = {};
62168
    if (matchedQueriesDsl) {
62169
        matchedQueriesDsl.forEach(function (_a) {
62170
            var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(_a, 2), queryId = _b[0], valueType = _b[1];
62171
            if (typeof queryId === 'number') {
62172
                matchedQueries[queryId] = valueType;
62173
                matchedQueryIds |= filterQueryId(queryId);
62174
            }
62175
            else {
62176
                references[queryId] = valueType;
62177
            }
62178
        });
62179
    }
62180
    return { matchedQueries: matchedQueries, references: references, matchedQueryIds: matchedQueryIds };
62181
}
62182
function splitDepsDsl(deps, sourceName) {
62183
    return deps.map(function (value) {
62184
        var token;
62185
        var flags;
62186
        if (Array.isArray(value)) {
62187
            _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(value, 2), flags = _a[0], token = _a[1];
62188
        }
62189
        else {
62190
            flags = 0 /* None */;
62191
            token = value;
62192
        }
62193
        if (token && (typeof token === 'function' || typeof token === 'object') && sourceName) {
62194
            Object.defineProperty(token, SOURCE, { value: sourceName, configurable: true });
62195
        }
62196
        return { flags: flags, token: token, tokenKey: tokenKey(token) };
62197
        var _a;
62198
    });
62199
}
62200
function getParentRenderElement(view, renderHost, def) {
62201
    var renderParent = def.renderParent;
62202
    if (renderParent) {
62203
        if ((renderParent.flags & 1 /* TypeElement */) === 0 ||
62204
            (renderParent.flags & 33554432 /* ComponentView */) === 0 ||
62205
            (renderParent.element.componentRendererType &&
62206
                renderParent.element.componentRendererType.encapsulation ===
62207
                    ViewEncapsulation.Native)) {
62208
            // only children of non components, or children of components with native encapsulation should
62209
            // be attached.
62210
            return asElementData(view, def.renderParent.nodeIndex).renderElement;
62211
        }
62212
    }
62213
    else {
62214
        return renderHost;
62215
    }
62216
}
62217
var DEFINITION_CACHE = new WeakMap();
62218
function resolveDefinition(factory) {
62219
    var value = DEFINITION_CACHE.get(factory);
62220
    if (!value) {
62221
        value = factory(function () { return NOOP; });
62222
        value.factory = factory;
62223
        DEFINITION_CACHE.set(factory, value);
62224
    }
62225
    return value;
62226
}
62227
function rootRenderNodes(view) {
62228
    var renderNodes = [];
62229
    visitRootRenderNodes(view, 0 /* Collect */, undefined, undefined, renderNodes);
62230
    return renderNodes;
62231
}
62232
function visitRootRenderNodes(view, action, parentNode, nextSibling, target) {
62233
    // We need to re-compute the parent node in case the nodes have been moved around manually
62234
    if (action === 3 /* RemoveChild */) {
62235
        parentNode = view.renderer.parentNode(renderNode(view, (view.def.lastRenderRootNode)));
62236
    }
62237
    visitSiblingRenderNodes(view, action, 0, view.def.nodes.length - 1, parentNode, nextSibling, target);
62238
}
62239
function visitSiblingRenderNodes(view, action, startIndex, endIndex, parentNode, nextSibling, target) {
62240
    for (var i = startIndex; i <= endIndex; i++) {
62241
        var nodeDef = view.def.nodes[i];
62242
        if (nodeDef.flags & (1 /* TypeElement */ | 2 /* TypeText */ | 8 /* TypeNgContent */)) {
62243
            visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target);
62244
        }
62245
        // jump to next sibling
62246
        i += nodeDef.childCount;
62247
    }
62248
}
62249
function visitProjectedRenderNodes(view, ngContentIndex, action, parentNode, nextSibling, target) {
62250
    var compView = view;
62251
    while (compView && !isComponentView(compView)) {
62252
        compView = compView.parent;
62253
    }
62254
    var hostView = compView.parent;
62255
    var hostElDef = viewParentEl((compView));
62256
    var startIndex = hostElDef.nodeIndex + 1;
62257
    var endIndex = hostElDef.nodeIndex + hostElDef.childCount;
62258
    for (var i = startIndex; i <= endIndex; i++) {
62259
        var nodeDef = hostView.def.nodes[i];
62260
        if (nodeDef.ngContentIndex === ngContentIndex) {
62261
            visitRenderNode((hostView), nodeDef, action, parentNode, nextSibling, target);
62262
        }
62263
        // jump to next sibling
62264
        i += nodeDef.childCount;
62265
    }
62266
    if (!hostView.parent) {
62267
        // a root view
62268
        var projectedNodes = view.root.projectableNodes[ngContentIndex];
62269
        if (projectedNodes) {
62270
            for (var i = 0; i < projectedNodes.length; i++) {
62271
                execRenderNodeAction(view, projectedNodes[i], action, parentNode, nextSibling, target);
62272
            }
62273
        }
62274
    }
62275
}
62276
function visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target) {
62277
    if (nodeDef.flags & 8 /* TypeNgContent */) {
62278
        visitProjectedRenderNodes(view, nodeDef.ngContent.index, action, parentNode, nextSibling, target);
62279
    }
62280
    else {
62281
        var rn = renderNode(view, nodeDef);
62282
        if (action === 3 /* RemoveChild */ && (nodeDef.flags & 33554432 /* ComponentView */) &&
62283
            (nodeDef.bindingFlags & 48 /* CatSyntheticProperty */)) {
62284
            // Note: we might need to do both actions.
62285
            if (nodeDef.bindingFlags & (16 /* SyntheticProperty */)) {
62286
                execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);
62287
            }
62288
            if (nodeDef.bindingFlags & (32 /* SyntheticHostProperty */)) {
62289
                var compView = asElementData(view, nodeDef.nodeIndex).componentView;
62290
                execRenderNodeAction(compView, rn, action, parentNode, nextSibling, target);
62291
            }
62292
        }
62293
        else {
62294
            execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);
62295
        }
62296
        if (nodeDef.flags & 16777216 /* EmbeddedViews */) {
62297
            var embeddedViews = asElementData(view, nodeDef.nodeIndex).viewContainer._embeddedViews;
62298
            for (var k = 0; k < embeddedViews.length; k++) {
62299
                visitRootRenderNodes(embeddedViews[k], action, parentNode, nextSibling, target);
62300
            }
62301
        }
62302
        if (nodeDef.flags & 1 /* TypeElement */ && !nodeDef.element.name) {
62303
            visitSiblingRenderNodes(view, action, nodeDef.nodeIndex + 1, nodeDef.nodeIndex + nodeDef.childCount, parentNode, nextSibling, target);
62304
        }
62305
    }
62306
}
62307
function execRenderNodeAction(view, renderNode, action, parentNode, nextSibling, target) {
62308
    var renderer = view.renderer;
62309
    switch (action) {
62310
        case 1 /* AppendChild */:
62311
            renderer.appendChild(parentNode, renderNode);
62312
            break;
62313
        case 2 /* InsertBefore */:
62314
            renderer.insertBefore(parentNode, renderNode, nextSibling);
62315
            break;
62316
        case 3 /* RemoveChild */:
62317
            renderer.removeChild(parentNode, renderNode);
62318
            break;
62319
        case 0 /* Collect */:
62320
            target.push(renderNode);
62321
            break;
62322
    }
62323
}
62324
var NS_PREFIX_RE = /^:([^:]+):(.+)$/;
62325
function splitNamespace(name) {
62326
    if (name[0] === ':') {
62327
        var match = (name.match(NS_PREFIX_RE));
62328
        return [match[1], match[2]];
62329
    }
62330
    return ['', name];
62331
}
62332
function calcBindingFlags(bindings) {
62333
    var flags = 0;
62334
    for (var i = 0; i < bindings.length; i++) {
62335
        flags |= bindings[i].flags;
62336
    }
62337
    return flags;
62338
}
62339
function interpolate(valueCount, constAndInterp) {
62340
    var result = '';
62341
    for (var i = 0; i < valueCount * 2; i = i + 2) {
62342
        result = result + constAndInterp[i] + _toStringWithNull(constAndInterp[i + 1]);
62343
    }
62344
    return result + constAndInterp[valueCount * 2];
62345
}
62346
function inlineInterpolate(valueCount, c0, a1, c1, a2, c2, a3, c3, a4, c4, a5, c5, a6, c6, a7, c7, a8, c8, a9, c9) {
62347
    switch (valueCount) {
62348
        case 1:
62349
            return c0 + _toStringWithNull(a1) + c1;
62350
        case 2:
62351
            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2;
62352
        case 3:
62353
            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +
62354
                c3;
62355
        case 4:
62356
            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +
62357
                c3 + _toStringWithNull(a4) + c4;
62358
        case 5:
62359
            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +
62360
                c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5;
62361
        case 6:
62362
            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +
62363
                c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6;
62364
        case 7:
62365
            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +
62366
                c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +
62367
                c6 + _toStringWithNull(a7) + c7;
62368
        case 8:
62369
            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +
62370
                c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +
62371
                c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8;
62372
        case 9:
62373
            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +
62374
                c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +
62375
                c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8 + _toStringWithNull(a9) + c9;
62376
        default:
62377
            throw new Error("Does not support more than 9 expressions");
62378
    }
62379
}
62380
function _toStringWithNull(v) {
62381
    return v != null ? v.toString() : '';
62382
}
62383
var EMPTY_ARRAY$2 = [];
62384
var EMPTY_MAP = {};
62385
 
62386
/**
62387
 * @license
62388
 * Copyright Google Inc. All Rights Reserved.
62389
 *
62390
 * Use of this source code is governed by an MIT-style license that can be
62391
 * found in the LICENSE file at https://angular.io/license
62392
 */
62393
function anchorDef(flags, matchedQueriesDsl, ngContentIndex, childCount, handleEvent, templateFactory) {
62394
    flags |= 1 /* TypeElement */;
62395
    var _a = splitMatchedQueriesDsl(matchedQueriesDsl), matchedQueries = _a.matchedQueries, references = _a.references, matchedQueryIds = _a.matchedQueryIds;
62396
    var template = templateFactory ? resolveDefinition(templateFactory) : null;
62397
    return {
62398
        // will bet set by the view definition
62399
        nodeIndex: -1,
62400
        parent: null,
62401
        renderParent: null,
62402
        bindingIndex: -1,
62403
        outputIndex: -1,
62404
        // regular values
62405
        flags: flags,
62406
        checkIndex: -1,
62407
        childFlags: 0,
62408
        directChildFlags: 0,
62409
        childMatchedQueries: 0, matchedQueries: matchedQueries, matchedQueryIds: matchedQueryIds, references: references, ngContentIndex: ngContentIndex, childCount: childCount,
62410
        bindings: [],
62411
        bindingFlags: 0,
62412
        outputs: [],
62413
        element: {
62414
            ns: null,
62415
            name: null,
62416
            attrs: null, template: template,
62417
            componentProvider: null,
62418
            componentView: null,
62419
            componentRendererType: null,
62420
            publicProviders: null,
62421
            allProviders: null,
62422
            handleEvent: handleEvent || NOOP
62423
        },
62424
        provider: null,
62425
        text: null,
62426
        query: null,
62427
        ngContent: null
62428
    };
62429
}
62430
function elementDef(checkIndex, flags, matchedQueriesDsl, ngContentIndex, childCount, namespaceAndName, fixedAttrs, bindings, outputs, handleEvent, componentView, componentRendererType) {
62431
    if (fixedAttrs === void 0) { fixedAttrs = []; }
62432
    if (!handleEvent) {
62433
        handleEvent = NOOP;
62434
    }
62435
    var _a = splitMatchedQueriesDsl(matchedQueriesDsl), matchedQueries = _a.matchedQueries, references = _a.references, matchedQueryIds = _a.matchedQueryIds;
62436
    var ns = (null);
62437
    var name = (null);
62438
    if (namespaceAndName) {
62439
        _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(splitNamespace(namespaceAndName), 2), ns = _b[0], name = _b[1];
62440
    }
62441
    bindings = bindings || [];
62442
    var bindingDefs = new Array(bindings.length);
62443
    for (var i = 0; i < bindings.length; i++) {
62444
        var _c = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(bindings[i], 3), bindingFlags = _c[0], namespaceAndName_1 = _c[1], suffixOrSecurityContext = _c[2];
62445
        var _d = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(splitNamespace(namespaceAndName_1), 2), ns_1 = _d[0], name_1 = _d[1];
62446
        var securityContext = (undefined);
62447
        var suffix = (undefined);
62448
        switch (bindingFlags & 15 /* Types */) {
62449
            case 4 /* TypeElementStyle */:
62450
                suffix = suffixOrSecurityContext;
62451
                break;
62452
            case 1 /* TypeElementAttribute */:
62453
            case 8 /* TypeProperty */:
62454
                securityContext = suffixOrSecurityContext;
62455
                break;
62456
        }
62457
        bindingDefs[i] =
62458
            { flags: bindingFlags, ns: ns_1, name: name_1, nonMinifiedName: name_1, securityContext: securityContext, suffix: suffix };
62459
    }
62460
    outputs = outputs || [];
62461
    var outputDefs = new Array(outputs.length);
62462
    for (var i = 0; i < outputs.length; i++) {
62463
        var _e = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(outputs[i], 2), target = _e[0], eventName = _e[1];
62464
        outputDefs[i] = {
62465
            type: 0 /* ElementOutput */,
62466
            target: target, eventName: eventName,
62467
            propName: null
62468
        };
62469
    }
62470
    fixedAttrs = fixedAttrs || [];
62471
    var attrs = fixedAttrs.map(function (_a) {
62472
        var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(_a, 2), namespaceAndName = _b[0], value = _b[1];
62473
        var _c = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(splitNamespace(namespaceAndName), 2), ns = _c[0], name = _c[1];
62474
        return [ns, name, value];
62475
    });
62476
    componentRendererType = resolveRendererType2(componentRendererType);
62477
    if (componentView) {
62478
        flags |= 33554432 /* ComponentView */;
62479
    }
62480
    flags |= 1 /* TypeElement */;
62481
    return {
62482
        // will bet set by the view definition
62483
        nodeIndex: -1,
62484
        parent: null,
62485
        renderParent: null,
62486
        bindingIndex: -1,
62487
        outputIndex: -1,
62488
        // regular values
62489
        checkIndex: checkIndex,
62490
        flags: flags,
62491
        childFlags: 0,
62492
        directChildFlags: 0,
62493
        childMatchedQueries: 0, matchedQueries: matchedQueries, matchedQueryIds: matchedQueryIds, references: references, ngContentIndex: ngContentIndex, childCount: childCount,
62494
        bindings: bindingDefs,
62495
        bindingFlags: calcBindingFlags(bindingDefs),
62496
        outputs: outputDefs,
62497
        element: {
62498
            ns: ns,
62499
            name: name,
62500
            attrs: attrs,
62501
            template: null,
62502
            // will bet set by the view definition
62503
            componentProvider: null,
62504
            componentView: componentView || null,
62505
            componentRendererType: componentRendererType,
62506
            publicProviders: null,
62507
            allProviders: null,
62508
            handleEvent: handleEvent || NOOP,
62509
        },
62510
        provider: null,
62511
        text: null,
62512
        query: null,
62513
        ngContent: null
62514
    };
62515
    var _b;
62516
}
62517
function createElement(view, renderHost, def) {
62518
    var elDef = (def.element);
62519
    var rootSelectorOrNode = view.root.selectorOrNode;
62520
    var renderer = view.renderer;
62521
    var el;
62522
    if (view.parent || !rootSelectorOrNode) {
62523
        if (elDef.name) {
62524
            el = renderer.createElement(elDef.name, elDef.ns);
62525
        }
62526
        else {
62527
            el = renderer.createComment('');
62528
        }
62529
        var parentEl = getParentRenderElement(view, renderHost, def);
62530
        if (parentEl) {
62531
            renderer.appendChild(parentEl, el);
62532
        }
62533
    }
62534
    else {
62535
        el = renderer.selectRootElement(rootSelectorOrNode);
62536
    }
62537
    if (elDef.attrs) {
62538
        for (var i = 0; i < elDef.attrs.length; i++) {
62539
            var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(elDef.attrs[i], 3), ns = _a[0], name_2 = _a[1], value = _a[2];
62540
            renderer.setAttribute(el, name_2, value, ns);
62541
        }
62542
    }
62543
    return el;
62544
}
62545
function listenToElementOutputs(view, compView, def, el) {
62546
    for (var i = 0; i < def.outputs.length; i++) {
62547
        var output = def.outputs[i];
62548
        var handleEventClosure = renderEventHandlerClosure(view, def.nodeIndex, elementEventFullName(output.target, output.eventName));
62549
        var listenTarget = output.target;
62550
        var listenerView = view;
62551
        if (output.target === 'component') {
62552
            listenTarget = null;
62553
            listenerView = compView;
62554
        }
62555
        var disposable = listenerView.renderer.listen(listenTarget || el, output.eventName, handleEventClosure);
62556
        view.disposables[def.outputIndex + i] = disposable;
62557
    }
62558
}
62559
function renderEventHandlerClosure(view, index, eventName) {
62560
    return function (event) { return dispatchEvent(view, index, eventName, event); };
62561
}
62562
function checkAndUpdateElementInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
62563
    var bindLen = def.bindings.length;
62564
    var changed = false;
62565
    if (bindLen > 0 && checkAndUpdateElementValue(view, def, 0, v0))
62566
        changed = true;
62567
    if (bindLen > 1 && checkAndUpdateElementValue(view, def, 1, v1))
62568
        changed = true;
62569
    if (bindLen > 2 && checkAndUpdateElementValue(view, def, 2, v2))
62570
        changed = true;
62571
    if (bindLen > 3 && checkAndUpdateElementValue(view, def, 3, v3))
62572
        changed = true;
62573
    if (bindLen > 4 && checkAndUpdateElementValue(view, def, 4, v4))
62574
        changed = true;
62575
    if (bindLen > 5 && checkAndUpdateElementValue(view, def, 5, v5))
62576
        changed = true;
62577
    if (bindLen > 6 && checkAndUpdateElementValue(view, def, 6, v6))
62578
        changed = true;
62579
    if (bindLen > 7 && checkAndUpdateElementValue(view, def, 7, v7))
62580
        changed = true;
62581
    if (bindLen > 8 && checkAndUpdateElementValue(view, def, 8, v8))
62582
        changed = true;
62583
    if (bindLen > 9 && checkAndUpdateElementValue(view, def, 9, v9))
62584
        changed = true;
62585
    return changed;
62586
}
62587
function checkAndUpdateElementDynamic(view, def, values) {
62588
    var changed = false;
62589
    for (var i = 0; i < values.length; i++) {
62590
        if (checkAndUpdateElementValue(view, def, i, values[i]))
62591
            changed = true;
62592
    }
62593
    return changed;
62594
}
62595
function checkAndUpdateElementValue(view, def, bindingIdx, value) {
62596
    if (!checkAndUpdateBinding(view, def, bindingIdx, value)) {
62597
        return false;
62598
    }
62599
    var binding = def.bindings[bindingIdx];
62600
    var elData = asElementData(view, def.nodeIndex);
62601
    var renderNode$$1 = elData.renderElement;
62602
    var name = (binding.name);
62603
    switch (binding.flags & 15 /* Types */) {
62604
        case 1 /* TypeElementAttribute */:
62605
            setElementAttribute(view, binding, renderNode$$1, binding.ns, name, value);
62606
            break;
62607
        case 2 /* TypeElementClass */:
62608
            setElementClass(view, renderNode$$1, name, value);
62609
            break;
62610
        case 4 /* TypeElementStyle */:
62611
            setElementStyle(view, binding, renderNode$$1, name, value);
62612
            break;
62613
        case 8 /* TypeProperty */:
62614
            var bindView = (def.flags & 33554432 /* ComponentView */ &&
62615
                binding.flags & 32 /* SyntheticHostProperty */) ?
62616
                elData.componentView :
62617
                view;
62618
            setElementProperty(bindView, binding, renderNode$$1, name, value);
62619
            break;
62620
    }
62621
    return true;
62622
}
62623
function setElementAttribute(view, binding, renderNode$$1, ns, name, value) {
62624
    var securityContext = binding.securityContext;
62625
    var renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;
62626
    renderValue = renderValue != null ? renderValue.toString() : null;
62627
    var renderer = view.renderer;
62628
    if (value != null) {
62629
        renderer.setAttribute(renderNode$$1, name, renderValue, ns);
62630
    }
62631
    else {
62632
        renderer.removeAttribute(renderNode$$1, name, ns);
62633
    }
62634
}
62635
function setElementClass(view, renderNode$$1, name, value) {
62636
    var renderer = view.renderer;
62637
    if (value) {
62638
        renderer.addClass(renderNode$$1, name);
62639
    }
62640
    else {
62641
        renderer.removeClass(renderNode$$1, name);
62642
    }
62643
}
62644
function setElementStyle(view, binding, renderNode$$1, name, value) {
62645
    var renderValue = view.root.sanitizer.sanitize(SecurityContext.STYLE, value);
62646
    if (renderValue != null) {
62647
        renderValue = renderValue.toString();
62648
        var unit = binding.suffix;
62649
        if (unit != null) {
62650
            renderValue = renderValue + unit;
62651
        }
62652
    }
62653
    else {
62654
        renderValue = null;
62655
    }
62656
    var renderer = view.renderer;
62657
    if (renderValue != null) {
62658
        renderer.setStyle(renderNode$$1, name, renderValue);
62659
    }
62660
    else {
62661
        renderer.removeStyle(renderNode$$1, name);
62662
    }
62663
}
62664
function setElementProperty(view, binding, renderNode$$1, name, value) {
62665
    var securityContext = binding.securityContext;
62666
    var renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;
62667
    view.renderer.setProperty(renderNode$$1, name, renderValue);
62668
}
62669
 
62670
/**
62671
 * @license
62672
 * Copyright Google Inc. All Rights Reserved.
62673
 *
62674
 * Use of this source code is governed by an MIT-style license that can be
62675
 * found in the LICENSE file at https://angular.io/license
62676
 */
62677
var UNDEFINED_VALUE = new Object();
62678
var InjectorRefTokenKey$1 = tokenKey(Injector);
62679
var INJECTORRefTokenKey$1 = tokenKey(INJECTOR);
62680
var NgModuleRefTokenKey = tokenKey(NgModuleRef);
62681
function moduleProvideDef(flags, token, value, deps) {
62682
    // Need to resolve forwardRefs as e.g. for `useValue` we
62683
    // lowered the expression and then stopped evaluating it,
62684
    // i.e. also didn't unwrap it.
62685
    value = resolveForwardRef(value);
62686
    var depDefs = splitDepsDsl(deps, stringify(token));
62687
    return {
62688
        // will bet set by the module definition
62689
        index: -1,
62690
        deps: depDefs, flags: flags, token: token, value: value
62691
    };
62692
}
62693
function moduleDef(providers) {
62694
    var providersByKey = {};
62695
    var modules = [];
62696
    var isRoot = false;
62697
    for (var i = 0; i < providers.length; i++) {
62698
        var provider = providers[i];
62699
        if (provider.token === APP_ROOT) {
62700
            isRoot = true;
62701
        }
62702
        if (provider.flags & 1073741824 /* TypeNgModule */) {
62703
            modules.push(provider.token);
62704
        }
62705
        provider.index = i;
62706
        providersByKey[tokenKey(provider.token)] = provider;
62707
    }
62708
    return {
62709
        // Will be filled later...
62710
        factory: null,
62711
        providersByKey: providersByKey,
62712
        providers: providers,
62713
        modules: modules,
62714
        isRoot: isRoot,
62715
    };
62716
}
62717
function initNgModule(data) {
62718
    var def = data._def;
62719
    var providers = data._providers = new Array(def.providers.length);
62720
    for (var i = 0; i < def.providers.length; i++) {
62721
        var provDef = def.providers[i];
62722
        if (!(provDef.flags & 4096 /* LazyProvider */)) {
62723
            // Make sure the provider has not been already initialized outside this loop.
62724
            if (providers[i] === undefined) {
62725
                providers[i] = _createProviderInstance$1(data, provDef);
62726
            }
62727
        }
62728
    }
62729
}
62730
function resolveNgModuleDep(data, depDef, notFoundValue) {
62731
    if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }
62732
    var former = setCurrentInjector(data);
62733
    try {
62734
        if (depDef.flags & 8 /* Value */) {
62735
            return depDef.token;
62736
        }
62737
        if (depDef.flags & 2 /* Optional */) {
62738
            notFoundValue = null;
62739
        }
62740
        if (depDef.flags & 1 /* SkipSelf */) {
62741
            return data._parent.get(depDef.token, notFoundValue);
62742
        }
62743
        var tokenKey_1 = depDef.tokenKey;
62744
        switch (tokenKey_1) {
62745
            case InjectorRefTokenKey$1:
62746
            case INJECTORRefTokenKey$1:
62747
            case NgModuleRefTokenKey:
62748
                return data;
62749
        }
62750
        var providerDef = data._def.providersByKey[tokenKey_1];
62751
        if (providerDef) {
62752
            var providerInstance = data._providers[providerDef.index];
62753
            if (providerInstance === undefined) {
62754
                providerInstance = data._providers[providerDef.index] =
62755
                    _createProviderInstance$1(data, providerDef);
62756
            }
62757
            return providerInstance === UNDEFINED_VALUE ? undefined : providerInstance;
62758
        }
62759
        else if (depDef.token.ngInjectableDef && targetsModule(data, depDef.token.ngInjectableDef)) {
62760
            var injectableDef = depDef.token.ngInjectableDef;
62761
            var index = data._providers.length;
62762
            data._def.providersByKey[depDef.tokenKey] = {
62763
                flags: 1024 /* TypeFactoryProvider */ | 4096 /* LazyProvider */,
62764
                value: injectableDef.factory,
62765
                deps: [], index: index,
62766
                token: depDef.token,
62767
            };
62768
            data._providers[index] = UNDEFINED_VALUE;
62769
            return (data._providers[index] =
62770
                _createProviderInstance$1(data, data._def.providersByKey[depDef.tokenKey]));
62771
        }
62772
        return data._parent.get(depDef.token, notFoundValue);
62773
    }
62774
    finally {
62775
        setCurrentInjector(former);
62776
    }
62777
}
62778
function moduleTransitivelyPresent(ngModule, scope) {
62779
    return ngModule._def.modules.indexOf(scope) > -1;
62780
}
62781
function targetsModule(ngModule, def) {
62782
    return def.providedIn != null && (moduleTransitivelyPresent(ngModule, def.providedIn) ||
62783
        def.providedIn === 'root' && ngModule._def.isRoot);
62784
}
62785
function _createProviderInstance$1(ngModule, providerDef) {
62786
    var injectable;
62787
    switch (providerDef.flags & 201347067 /* Types */) {
62788
        case 512 /* TypeClassProvider */:
62789
            injectable = _createClass(ngModule, providerDef.value, providerDef.deps);
62790
            break;
62791
        case 1024 /* TypeFactoryProvider */:
62792
            injectable = _callFactory(ngModule, providerDef.value, providerDef.deps);
62793
            break;
62794
        case 2048 /* TypeUseExistingProvider */:
62795
            injectable = resolveNgModuleDep(ngModule, providerDef.deps[0]);
62796
            break;
62797
        case 256 /* TypeValueProvider */:
62798
            injectable = providerDef.value;
62799
            break;
62800
    }
62801
    // The read of `ngOnDestroy` here is slightly expensive as it's megamorphic, so it should be
62802
    // avoided if possible. The sequence of checks here determines whether ngOnDestroy needs to be
62803
    // checked. It might not if the `injectable` isn't an object or if NodeFlags.OnDestroy is already
62804
    // set (ngOnDestroy was detected statically).
62805
    if (injectable !== UNDEFINED_VALUE && injectable != null && typeof injectable === 'object' &&
62806
        !(providerDef.flags & 131072 /* OnDestroy */) && typeof injectable.ngOnDestroy === 'function') {
62807
        providerDef.flags |= 131072 /* OnDestroy */;
62808
    }
62809
    return injectable === undefined ? UNDEFINED_VALUE : injectable;
62810
}
62811
function _createClass(ngModule, ctor, deps) {
62812
    var len = deps.length;
62813
    switch (len) {
62814
        case 0:
62815
            return new ctor();
62816
        case 1:
62817
            return new ctor(resolveNgModuleDep(ngModule, deps[0]));
62818
        case 2:
62819
            return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));
62820
        case 3:
62821
            return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]), resolveNgModuleDep(ngModule, deps[2]));
62822
        default:
62823
            var depValues = new Array(len);
62824
            for (var i = 0; i < len; i++) {
62825
                depValues[i] = resolveNgModuleDep(ngModule, deps[i]);
62826
            }
62827
            return new (ctor.bind.apply(ctor, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], depValues)))();
62828
    }
62829
}
62830
function _callFactory(ngModule, factory, deps) {
62831
    var len = deps.length;
62832
    switch (len) {
62833
        case 0:
62834
            return factory();
62835
        case 1:
62836
            return factory(resolveNgModuleDep(ngModule, deps[0]));
62837
        case 2:
62838
            return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));
62839
        case 3:
62840
            return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]), resolveNgModuleDep(ngModule, deps[2]));
62841
        default:
62842
            var depValues = Array(len);
62843
            for (var i = 0; i < len; i++) {
62844
                depValues[i] = resolveNgModuleDep(ngModule, deps[i]);
62845
            }
62846
            return factory.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(depValues));
62847
    }
62848
}
62849
function callNgModuleLifecycle(ngModule, lifecycles) {
62850
    var def = ngModule._def;
62851
    var destroyed = new Set();
62852
    for (var i = 0; i < def.providers.length; i++) {
62853
        var provDef = def.providers[i];
62854
        if (provDef.flags & 131072 /* OnDestroy */) {
62855
            var instance = ngModule._providers[i];
62856
            if (instance && instance !== UNDEFINED_VALUE) {
62857
                var onDestroy = instance.ngOnDestroy;
62858
                if (typeof onDestroy === 'function' && !destroyed.has(instance)) {
62859
                    onDestroy.apply(instance);
62860
                    destroyed.add(instance);
62861
                }
62862
            }
62863
        }
62864
    }
62865
}
62866
 
62867
/**
62868
 * @license
62869
 * Copyright Google Inc. All Rights Reserved.
62870
 *
62871
 * Use of this source code is governed by an MIT-style license that can be
62872
 * found in the LICENSE file at https://angular.io/license
62873
 */
62874
function attachEmbeddedView(parentView, elementData, viewIndex, view) {
62875
    var embeddedViews = elementData.viewContainer._embeddedViews;
62876
    if (viewIndex === null || viewIndex === undefined) {
62877
        viewIndex = embeddedViews.length;
62878
    }
62879
    view.viewContainerParent = parentView;
62880
    addToArray(embeddedViews, (viewIndex), view);
62881
    attachProjectedView(elementData, view);
62882
    Services.dirtyParentQueries(view);
62883
    var prevView = (viewIndex) > 0 ? embeddedViews[(viewIndex) - 1] : null;
62884
    renderAttachEmbeddedView(elementData, prevView, view);
62885
}
62886
function attachProjectedView(vcElementData, view) {
62887
    var dvcElementData = declaredViewContainer(view);
62888
    if (!dvcElementData || dvcElementData === vcElementData ||
62889
        view.state & 16 /* IsProjectedView */) {
62890
        return;
62891
    }
62892
    // Note: For performance reasons, we
62893
    // - add a view to template._projectedViews only 1x throughout its lifetime,
62894
    //   and remove it not until the view is destroyed.
62895
    //   (hard, as when a parent view is attached/detached we would need to attach/detach all
62896
    //    nested projected views as well, even across component boundaries).
62897
    // - don't track the insertion order of views in the projected views array
62898
    //   (hard, as when the views of the same template are inserted different view containers)
62899
    view.state |= 16 /* IsProjectedView */;
62900
    var projectedViews = dvcElementData.template._projectedViews;
62901
    if (!projectedViews) {
62902
        projectedViews = dvcElementData.template._projectedViews = [];
62903
    }
62904
    projectedViews.push(view);
62905
    // Note: we are changing the NodeDef here as we cannot calculate
62906
    // the fact whether a template is used for projection during compilation.
62907
    markNodeAsProjectedTemplate(view.parent.def, (view.parentNodeDef));
62908
}
62909
function markNodeAsProjectedTemplate(viewDef, nodeDef) {
62910
    if (nodeDef.flags & 4 /* ProjectedTemplate */) {
62911
        return;
62912
    }
62913
    viewDef.nodeFlags |= 4 /* ProjectedTemplate */;
62914
    nodeDef.flags |= 4 /* ProjectedTemplate */;
62915
    var parentNodeDef = nodeDef.parent;
62916
    while (parentNodeDef) {
62917
        parentNodeDef.childFlags |= 4 /* ProjectedTemplate */;
62918
        parentNodeDef = parentNodeDef.parent;
62919
    }
62920
}
62921
function detachEmbeddedView(elementData, viewIndex) {
62922
    var embeddedViews = elementData.viewContainer._embeddedViews;
62923
    if (viewIndex == null || viewIndex >= embeddedViews.length) {
62924
        viewIndex = embeddedViews.length - 1;
62925
    }
62926
    if (viewIndex < 0) {
62927
        return null;
62928
    }
62929
    var view = embeddedViews[viewIndex];
62930
    view.viewContainerParent = null;
62931
    removeFromArray(embeddedViews, viewIndex);
62932
    // See attachProjectedView for why we don't update projectedViews here.
62933
    Services.dirtyParentQueries(view);
62934
    renderDetachView(view);
62935
    return view;
62936
}
62937
function detachProjectedView(view) {
62938
    if (!(view.state & 16 /* IsProjectedView */)) {
62939
        return;
62940
    }
62941
    var dvcElementData = declaredViewContainer(view);
62942
    if (dvcElementData) {
62943
        var projectedViews = dvcElementData.template._projectedViews;
62944
        if (projectedViews) {
62945
            removeFromArray(projectedViews, projectedViews.indexOf(view));
62946
            Services.dirtyParentQueries(view);
62947
        }
62948
    }
62949
}
62950
function moveEmbeddedView(elementData, oldViewIndex, newViewIndex) {
62951
    var embeddedViews = elementData.viewContainer._embeddedViews;
62952
    var view = embeddedViews[oldViewIndex];
62953
    removeFromArray(embeddedViews, oldViewIndex);
62954
    if (newViewIndex == null) {
62955
        newViewIndex = embeddedViews.length;
62956
    }
62957
    addToArray(embeddedViews, newViewIndex, view);
62958
    // Note: Don't need to change projectedViews as the order in there
62959
    // as always invalid...
62960
    Services.dirtyParentQueries(view);
62961
    renderDetachView(view);
62962
    var prevView = newViewIndex > 0 ? embeddedViews[newViewIndex - 1] : null;
62963
    renderAttachEmbeddedView(elementData, prevView, view);
62964
    return view;
62965
}
62966
function renderAttachEmbeddedView(elementData, prevView, view) {
62967
    var prevRenderNode = prevView ? renderNode(prevView, (prevView.def.lastRenderRootNode)) :
62968
        elementData.renderElement;
62969
    var parentNode = view.renderer.parentNode(prevRenderNode);
62970
    var nextSibling = view.renderer.nextSibling(prevRenderNode);
62971
    // Note: We can't check if `nextSibling` is present, as on WebWorkers it will always be!
62972
    // However, browsers automatically do `appendChild` when there is no `nextSibling`.
62973
    visitRootRenderNodes(view, 2 /* InsertBefore */, parentNode, nextSibling, undefined);
62974
}
62975
function renderDetachView(view) {
62976
    visitRootRenderNodes(view, 3 /* RemoveChild */, null, null, undefined);
62977
}
62978
function addToArray(arr, index, value) {
62979
    // perf: array.push is faster than array.splice!
62980
    if (index >= arr.length) {
62981
        arr.push(value);
62982
    }
62983
    else {
62984
        arr.splice(index, 0, value);
62985
    }
62986
}
62987
function removeFromArray(arr, index) {
62988
    // perf: array.pop is faster than array.splice!
62989
    if (index >= arr.length - 1) {
62990
        arr.pop();
62991
    }
62992
    else {
62993
        arr.splice(index, 1);
62994
    }
62995
}
62996
 
62997
/**
62998
 * @license
62999
 * Copyright Google Inc. All Rights Reserved.
63000
 *
63001
 * Use of this source code is governed by an MIT-style license that can be
63002
 * found in the LICENSE file at https://angular.io/license
63003
 */
63004
var EMPTY_CONTEXT = new Object();
63005
// Attention: this function is called as top level function.
63006
// Putting any logic in here will destroy closure tree shaking!
63007
function createComponentFactory(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors) {
63008
    return new ComponentFactory_(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors);
63009
}
63010
function getComponentViewDefinitionFactory(componentFactory) {
63011
    return componentFactory.viewDefFactory;
63012
}
63013
var ComponentFactory_ = /** @class */ (function (_super) {
63014
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ComponentFactory_, _super);
63015
    function ComponentFactory_(selector, componentType, viewDefFactory, _inputs, _outputs, ngContentSelectors) {
63016
        var _this =
63017
        // Attention: this ctor is called as top level function.
63018
        // Putting any logic in here will destroy closure tree shaking!
63019
        _super.call(this) || this;
63020
        _this.selector = selector;
63021
        _this.componentType = componentType;
63022
        _this._inputs = _inputs;
63023
        _this._outputs = _outputs;
63024
        _this.ngContentSelectors = ngContentSelectors;
63025
        _this.viewDefFactory = viewDefFactory;
63026
        return _this;
63027
    }
63028
    Object.defineProperty(ComponentFactory_.prototype, "inputs", {
63029
        get: function () {
63030
            var inputsArr = [];
63031
            var inputs = (this._inputs);
63032
            for (var propName in inputs) {
63033
                var templateName = inputs[propName];
63034
                inputsArr.push({ propName: propName, templateName: templateName });
63035
            }
63036
            return inputsArr;
63037
        },
63038
        enumerable: true,
63039
        configurable: true
63040
    });
63041
    Object.defineProperty(ComponentFactory_.prototype, "outputs", {
63042
        get: function () {
63043
            var outputsArr = [];
63044
            for (var propName in this._outputs) {
63045
                var templateName = this._outputs[propName];
63046
                outputsArr.push({ propName: propName, templateName: templateName });
63047
            }
63048
            return outputsArr;
63049
        },
63050
        enumerable: true,
63051
        configurable: true
63052
    });
63053
    /**
63054
     * Creates a new component.
63055
     */
63056
    /**
63057
       * Creates a new component.
63058
       */
63059
    ComponentFactory_.prototype.create = /**
63060
       * Creates a new component.
63061
       */
63062
    function (injector, projectableNodes, rootSelectorOrNode, ngModule) {
63063
        if (!ngModule) {
63064
            throw new Error('ngModule should be provided');
63065
        }
63066
        var viewDef = resolveDefinition(this.viewDefFactory);
63067
        var componentNodeIndex = viewDef.nodes[0].element.componentProvider.nodeIndex;
63068
        var view = Services.createRootView(injector, projectableNodes || [], rootSelectorOrNode, viewDef, ngModule, EMPTY_CONTEXT);
63069
        var component = asProviderData(view, componentNodeIndex).instance;
63070
        if (rootSelectorOrNode) {
63071
            view.renderer.setAttribute(asElementData(view, 0).renderElement, 'ng-version', VERSION.full);
63072
        }
63073
        return new ComponentRef_(view, new ViewRef_(view), component);
63074
    };
63075
    return ComponentFactory_;
63076
}(ComponentFactory));
63077
var ComponentRef_ = /** @class */ (function (_super) {
63078
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ComponentRef_, _super);
63079
    function ComponentRef_(_view, _viewRef, _component) {
63080
        var _this = _super.call(this) || this;
63081
        _this._view = _view;
63082
        _this._viewRef = _viewRef;
63083
        _this._component = _component;
63084
        _this._elDef = _this._view.def.nodes[0];
63085
        _this.hostView = _viewRef;
63086
        _this.changeDetectorRef = _viewRef;
63087
        _this.instance = _component;
63088
        return _this;
63089
    }
63090
    Object.defineProperty(ComponentRef_.prototype, "location", {
63091
        get: function () {
63092
            return new ElementRef(asElementData(this._view, this._elDef.nodeIndex).renderElement);
63093
        },
63094
        enumerable: true,
63095
        configurable: true
63096
    });
63097
    Object.defineProperty(ComponentRef_.prototype, "injector", {
63098
        get: function () { return new Injector_(this._view, this._elDef); },
63099
        enumerable: true,
63100
        configurable: true
63101
    });
63102
    Object.defineProperty(ComponentRef_.prototype, "componentType", {
63103
        get: function () { return this._component.constructor; },
63104
        enumerable: true,
63105
        configurable: true
63106
    });
63107
    ComponentRef_.prototype.destroy = function () { this._viewRef.destroy(); };
63108
    ComponentRef_.prototype.onDestroy = function (callback) { this._viewRef.onDestroy(callback); };
63109
    return ComponentRef_;
63110
}(ComponentRef));
63111
function createViewContainerData(view, elDef, elData) {
63112
    return new ViewContainerRef_(view, elDef, elData);
63113
}
63114
var ViewContainerRef_ = /** @class */ (function () {
63115
    function ViewContainerRef_(_view, _elDef, _data) {
63116
        this._view = _view;
63117
        this._elDef = _elDef;
63118
        this._data = _data;
63119
        /**
63120
           * @internal
63121
           */
63122
        this._embeddedViews = [];
63123
    }
63124
    Object.defineProperty(ViewContainerRef_.prototype, "element", {
63125
        get: function () { return new ElementRef(this._data.renderElement); },
63126
        enumerable: true,
63127
        configurable: true
63128
    });
63129
    Object.defineProperty(ViewContainerRef_.prototype, "injector", {
63130
        get: function () { return new Injector_(this._view, this._elDef); },
63131
        enumerable: true,
63132
        configurable: true
63133
    });
63134
    Object.defineProperty(ViewContainerRef_.prototype, "parentInjector", {
63135
        get: function () {
63136
            var view = this._view;
63137
            var elDef = this._elDef.parent;
63138
            while (!elDef && view) {
63139
                elDef = viewParentEl(view);
63140
                view = (view.parent);
63141
            }
63142
            return view ? new Injector_(view, elDef) : new Injector_(this._view, null);
63143
        },
63144
        enumerable: true,
63145
        configurable: true
63146
    });
63147
    ViewContainerRef_.prototype.clear = function () {
63148
        var len = this._embeddedViews.length;
63149
        for (var i = len - 1; i >= 0; i--) {
63150
            var view = (detachEmbeddedView(this._data, i));
63151
            Services.destroyView(view);
63152
        }
63153
    };
63154
    ViewContainerRef_.prototype.get = function (index) {
63155
        var view = this._embeddedViews[index];
63156
        if (view) {
63157
            var ref = new ViewRef_(view);
63158
            ref.attachToViewContainerRef(this);
63159
            return ref;
63160
        }
63161
        return null;
63162
    };
63163
    Object.defineProperty(ViewContainerRef_.prototype, "length", {
63164
        get: function () { return this._embeddedViews.length; },
63165
        enumerable: true,
63166
        configurable: true
63167
    });
63168
    ViewContainerRef_.prototype.createEmbeddedView = function (templateRef, context, index) {
63169
        var viewRef = templateRef.createEmbeddedView(context || {});
63170
        this.insert(viewRef, index);
63171
        return viewRef;
63172
    };
63173
    ViewContainerRef_.prototype.createComponent = function (componentFactory, index, injector, projectableNodes, ngModuleRef) {
63174
        var contextInjector = injector || this.parentInjector;
63175
        if (!ngModuleRef && !(componentFactory instanceof ComponentFactoryBoundToModule)) {
63176
            ngModuleRef = contextInjector.get(NgModuleRef);
63177
        }
63178
        var componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);
63179
        this.insert(componentRef.hostView, index);
63180
        return componentRef;
63181
    };
63182
    ViewContainerRef_.prototype.insert = function (viewRef, index) {
63183
        if (viewRef.destroyed) {
63184
            throw new Error('Cannot insert a destroyed View in a ViewContainer!');
63185
        }
63186
        var viewRef_ = viewRef;
63187
        var viewData = viewRef_._view;
63188
        attachEmbeddedView(this._view, this._data, index, viewData);
63189
        viewRef_.attachToViewContainerRef(this);
63190
        return viewRef;
63191
    };
63192
    ViewContainerRef_.prototype.move = function (viewRef, currentIndex) {
63193
        if (viewRef.destroyed) {
63194
            throw new Error('Cannot move a destroyed View in a ViewContainer!');
63195
        }
63196
        var previousIndex = this._embeddedViews.indexOf(viewRef._view);
63197
        moveEmbeddedView(this._data, previousIndex, currentIndex);
63198
        return viewRef;
63199
    };
63200
    ViewContainerRef_.prototype.indexOf = function (viewRef) {
63201
        return this._embeddedViews.indexOf(viewRef._view);
63202
    };
63203
    ViewContainerRef_.prototype.remove = function (index) {
63204
        var viewData = detachEmbeddedView(this._data, index);
63205
        if (viewData) {
63206
            Services.destroyView(viewData);
63207
        }
63208
    };
63209
    ViewContainerRef_.prototype.detach = function (index) {
63210
        var view = detachEmbeddedView(this._data, index);
63211
        return view ? new ViewRef_(view) : null;
63212
    };
63213
    return ViewContainerRef_;
63214
}());
63215
function createChangeDetectorRef(view) {
63216
    return new ViewRef_(view);
63217
}
63218
var ViewRef_ = /** @class */ (function () {
63219
    function ViewRef_(_view) {
63220
        this._view = _view;
63221
        this._viewContainerRef = null;
63222
        this._appRef = null;
63223
    }
63224
    Object.defineProperty(ViewRef_.prototype, "rootNodes", {
63225
        get: function () { return rootRenderNodes(this._view); },
63226
        enumerable: true,
63227
        configurable: true
63228
    });
63229
    Object.defineProperty(ViewRef_.prototype, "context", {
63230
        get: function () { return this._view.context; },
63231
        enumerable: true,
63232
        configurable: true
63233
    });
63234
    Object.defineProperty(ViewRef_.prototype, "destroyed", {
63235
        get: function () { return (this._view.state & 128 /* Destroyed */) !== 0; },
63236
        enumerable: true,
63237
        configurable: true
63238
    });
63239
    ViewRef_.prototype.markForCheck = function () { markParentViewsForCheck(this._view); };
63240
    ViewRef_.prototype.detach = function () { this._view.state &= ~4 /* Attached */; };
63241
    ViewRef_.prototype.detectChanges = function () {
63242
        var fs = this._view.root.rendererFactory;
63243
        if (fs.begin) {
63244
            fs.begin();
63245
        }
63246
        try {
63247
            Services.checkAndUpdateView(this._view);
63248
        }
63249
        finally {
63250
            if (fs.end) {
63251
                fs.end();
63252
            }
63253
        }
63254
    };
63255
    ViewRef_.prototype.checkNoChanges = function () { Services.checkNoChangesView(this._view); };
63256
    ViewRef_.prototype.reattach = function () { this._view.state |= 4 /* Attached */; };
63257
    ViewRef_.prototype.onDestroy = function (callback) {
63258
        if (!this._view.disposables) {
63259
            this._view.disposables = [];
63260
        }
63261
        this._view.disposables.push(callback);
63262
    };
63263
    ViewRef_.prototype.destroy = function () {
63264
        if (this._appRef) {
63265
            this._appRef.detachView(this);
63266
        }
63267
        else if (this._viewContainerRef) {
63268
            this._viewContainerRef.detach(this._viewContainerRef.indexOf(this));
63269
        }
63270
        Services.destroyView(this._view);
63271
    };
63272
    ViewRef_.prototype.detachFromAppRef = function () {
63273
        this._appRef = null;
63274
        renderDetachView(this._view);
63275
        Services.dirtyParentQueries(this._view);
63276
    };
63277
    ViewRef_.prototype.attachToAppRef = function (appRef) {
63278
        if (this._viewContainerRef) {
63279
            throw new Error('This view is already attached to a ViewContainer!');
63280
        }
63281
        this._appRef = appRef;
63282
    };
63283
    ViewRef_.prototype.attachToViewContainerRef = function (vcRef) {
63284
        if (this._appRef) {
63285
            throw new Error('This view is already attached directly to the ApplicationRef!');
63286
        }
63287
        this._viewContainerRef = vcRef;
63288
    };
63289
    return ViewRef_;
63290
}());
63291
function createTemplateData(view, def) {
63292
    return new TemplateRef_(view, def);
63293
}
63294
var TemplateRef_ = /** @class */ (function (_super) {
63295
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TemplateRef_, _super);
63296
    function TemplateRef_(_parentView, _def) {
63297
        var _this = _super.call(this) || this;
63298
        _this._parentView = _parentView;
63299
        _this._def = _def;
63300
        return _this;
63301
    }
63302
    TemplateRef_.prototype.createEmbeddedView = function (context) {
63303
        return new ViewRef_(Services.createEmbeddedView(this._parentView, this._def, (this._def.element.template), context));
63304
    };
63305
    Object.defineProperty(TemplateRef_.prototype, "elementRef", {
63306
        get: function () {
63307
            return new ElementRef(asElementData(this._parentView, this._def.nodeIndex).renderElement);
63308
        },
63309
        enumerable: true,
63310
        configurable: true
63311
    });
63312
    return TemplateRef_;
63313
}(TemplateRef));
63314
function createInjector$1(view, elDef) {
63315
    return new Injector_(view, elDef);
63316
}
63317
var Injector_ = /** @class */ (function () {
63318
    function Injector_(view, elDef) {
63319
        this.view = view;
63320
        this.elDef = elDef;
63321
    }
63322
    Injector_.prototype.get = function (token, notFoundValue) {
63323
        if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }
63324
        var allowPrivateServices = this.elDef ? (this.elDef.flags & 33554432 /* ComponentView */) !== 0 : false;
63325
        return Services.resolveDep(this.view, this.elDef, allowPrivateServices, { flags: 0 /* None */, token: token, tokenKey: tokenKey(token) }, notFoundValue);
63326
    };
63327
    return Injector_;
63328
}());
63329
function nodeValue(view, index) {
63330
    var def = view.def.nodes[index];
63331
    if (def.flags & 1 /* TypeElement */) {
63332
        var elData = asElementData(view, def.nodeIndex);
63333
        return def.element.template ? elData.template : elData.renderElement;
63334
    }
63335
    else if (def.flags & 2 /* TypeText */) {
63336
        return asTextData(view, def.nodeIndex).renderText;
63337
    }
63338
    else if (def.flags & (20224 /* CatProvider */ | 16 /* TypePipe */)) {
63339
        return asProviderData(view, def.nodeIndex).instance;
63340
    }
63341
    throw new Error("Illegal state: read nodeValue for node index " + index);
63342
}
63343
function createRendererV1(view) {
63344
    return new RendererAdapter(view.renderer);
63345
}
63346
var RendererAdapter = /** @class */ (function () {
63347
    function RendererAdapter(delegate) {
63348
        this.delegate = delegate;
63349
    }
63350
    RendererAdapter.prototype.selectRootElement = function (selectorOrNode) {
63351
        return this.delegate.selectRootElement(selectorOrNode);
63352
    };
63353
    RendererAdapter.prototype.createElement = function (parent, namespaceAndName) {
63354
        var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(splitNamespace(namespaceAndName), 2), ns = _a[0], name = _a[1];
63355
        var el = this.delegate.createElement(name, ns);
63356
        if (parent) {
63357
            this.delegate.appendChild(parent, el);
63358
        }
63359
        return el;
63360
    };
63361
    RendererAdapter.prototype.createViewRoot = function (hostElement) { return hostElement; };
63362
    RendererAdapter.prototype.createTemplateAnchor = function (parentElement) {
63363
        var comment = this.delegate.createComment('');
63364
        if (parentElement) {
63365
            this.delegate.appendChild(parentElement, comment);
63366
        }
63367
        return comment;
63368
    };
63369
    RendererAdapter.prototype.createText = function (parentElement, value) {
63370
        var node = this.delegate.createText(value);
63371
        if (parentElement) {
63372
            this.delegate.appendChild(parentElement, node);
63373
        }
63374
        return node;
63375
    };
63376
    RendererAdapter.prototype.projectNodes = function (parentElement, nodes) {
63377
        for (var i = 0; i < nodes.length; i++) {
63378
            this.delegate.appendChild(parentElement, nodes[i]);
63379
        }
63380
    };
63381
    RendererAdapter.prototype.attachViewAfter = function (node, viewRootNodes) {
63382
        var parentElement = this.delegate.parentNode(node);
63383
        var nextSibling = this.delegate.nextSibling(node);
63384
        for (var i = 0; i < viewRootNodes.length; i++) {
63385
            this.delegate.insertBefore(parentElement, viewRootNodes[i], nextSibling);
63386
        }
63387
    };
63388
    RendererAdapter.prototype.detachView = function (viewRootNodes) {
63389
        for (var i = 0; i < viewRootNodes.length; i++) {
63390
            var node = viewRootNodes[i];
63391
            var parentElement = this.delegate.parentNode(node);
63392
            this.delegate.removeChild(parentElement, node);
63393
        }
63394
    };
63395
    RendererAdapter.prototype.destroyView = function (hostElement, viewAllNodes) {
63396
        for (var i = 0; i < viewAllNodes.length; i++) {
63397
            this.delegate.destroyNode(viewAllNodes[i]);
63398
        }
63399
    };
63400
    RendererAdapter.prototype.listen = function (renderElement, name, callback) {
63401
        return this.delegate.listen(renderElement, name, callback);
63402
    };
63403
    RendererAdapter.prototype.listenGlobal = function (target, name, callback) {
63404
        return this.delegate.listen(target, name, callback);
63405
    };
63406
    RendererAdapter.prototype.setElementProperty = function (renderElement, propertyName, propertyValue) {
63407
        this.delegate.setProperty(renderElement, propertyName, propertyValue);
63408
    };
63409
    RendererAdapter.prototype.setElementAttribute = function (renderElement, namespaceAndName, attributeValue) {
63410
        var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(splitNamespace(namespaceAndName), 2), ns = _a[0], name = _a[1];
63411
        if (attributeValue != null) {
63412
            this.delegate.setAttribute(renderElement, name, attributeValue, ns);
63413
        }
63414
        else {
63415
            this.delegate.removeAttribute(renderElement, name, ns);
63416
        }
63417
    };
63418
    RendererAdapter.prototype.setBindingDebugInfo = function (renderElement, propertyName, propertyValue) { };
63419
    RendererAdapter.prototype.setElementClass = function (renderElement, className, isAdd) {
63420
        if (isAdd) {
63421
            this.delegate.addClass(renderElement, className);
63422
        }
63423
        else {
63424
            this.delegate.removeClass(renderElement, className);
63425
        }
63426
    };
63427
    RendererAdapter.prototype.setElementStyle = function (renderElement, styleName, styleValue) {
63428
        if (styleValue != null) {
63429
            this.delegate.setStyle(renderElement, styleName, styleValue);
63430
        }
63431
        else {
63432
            this.delegate.removeStyle(renderElement, styleName);
63433
        }
63434
    };
63435
    RendererAdapter.prototype.invokeElementMethod = function (renderElement, methodName, args) {
63436
        renderElement[methodName].apply(renderElement, args);
63437
    };
63438
    RendererAdapter.prototype.setText = function (renderNode$$1, text) { this.delegate.setValue(renderNode$$1, text); };
63439
    RendererAdapter.prototype.animate = function () { throw new Error('Renderer.animate is no longer supported!'); };
63440
    return RendererAdapter;
63441
}());
63442
function createNgModuleRef(moduleType, parent, bootstrapComponents, def) {
63443
    return new NgModuleRef_(moduleType, parent, bootstrapComponents, def);
63444
}
63445
var NgModuleRef_ = /** @class */ (function () {
63446
    function NgModuleRef_(_moduleType, _parent, _bootstrapComponents, _def) {
63447
        this._moduleType = _moduleType;
63448
        this._parent = _parent;
63449
        this._bootstrapComponents = _bootstrapComponents;
63450
        this._def = _def;
63451
        this._destroyListeners = [];
63452
        this._destroyed = false;
63453
        this.injector = this;
63454
        initNgModule(this);
63455
    }
63456
    NgModuleRef_.prototype.get = function (token, notFoundValue, injectFlags) {
63457
        if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }
63458
        if (injectFlags === void 0) { injectFlags = 0 /* Default */; }
63459
        var flags = 0;
63460
        if (injectFlags & 4 /* SkipSelf */) {
63461
            flags |= 1 /* SkipSelf */;
63462
        }
63463
        else if (injectFlags & 2 /* Self */) {
63464
            flags |= 4 /* Self */;
63465
        }
63466
        return resolveNgModuleDep(this, { token: token, tokenKey: tokenKey(token), flags: flags }, notFoundValue);
63467
    };
63468
    Object.defineProperty(NgModuleRef_.prototype, "instance", {
63469
        get: function () { return this.get(this._moduleType); },
63470
        enumerable: true,
63471
        configurable: true
63472
    });
63473
    Object.defineProperty(NgModuleRef_.prototype, "componentFactoryResolver", {
63474
        get: function () { return this.get(ComponentFactoryResolver); },
63475
        enumerable: true,
63476
        configurable: true
63477
    });
63478
    NgModuleRef_.prototype.destroy = function () {
63479
        if (this._destroyed) {
63480
            throw new Error("The ng module " + stringify(this.instance.constructor) + " has already been destroyed.");
63481
        }
63482
        this._destroyed = true;
63483
        callNgModuleLifecycle(this, 131072 /* OnDestroy */);
63484
        this._destroyListeners.forEach(function (listener) { return listener(); });
63485
    };
63486
    NgModuleRef_.prototype.onDestroy = function (callback) { this._destroyListeners.push(callback); };
63487
    return NgModuleRef_;
63488
}());
63489
 
63490
/**
63491
 * @license
63492
 * Copyright Google Inc. All Rights Reserved.
63493
 *
63494
 * Use of this source code is governed by an MIT-style license that can be
63495
 * found in the LICENSE file at https://angular.io/license
63496
 */
63497
var RendererV1TokenKey = tokenKey(Renderer);
63498
var Renderer2TokenKey = tokenKey(Renderer2);
63499
var ElementRefTokenKey = tokenKey(ElementRef);
63500
var ViewContainerRefTokenKey = tokenKey(ViewContainerRef);
63501
var TemplateRefTokenKey = tokenKey(TemplateRef);
63502
var ChangeDetectorRefTokenKey = tokenKey(ChangeDetectorRef);
63503
var InjectorRefTokenKey = tokenKey(Injector);
63504
var INJECTORRefTokenKey = tokenKey(INJECTOR);
63505
function directiveDef(checkIndex, flags, matchedQueries, childCount, ctor, deps, props, outputs) {
63506
    var bindings = [];
63507
    if (props) {
63508
        for (var prop in props) {
63509
            var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(props[prop], 2), bindingIndex = _a[0], nonMinifiedName = _a[1];
63510
            bindings[bindingIndex] = {
63511
                flags: 8 /* TypeProperty */,
63512
                name: prop, nonMinifiedName: nonMinifiedName,
63513
                ns: null,
63514
                securityContext: null,
63515
                suffix: null
63516
            };
63517
        }
63518
    }
63519
    var outputDefs = [];
63520
    if (outputs) {
63521
        for (var propName in outputs) {
63522
            outputDefs.push({ type: 1 /* DirectiveOutput */, propName: propName, target: null, eventName: outputs[propName] });
63523
        }
63524
    }
63525
    flags |= 16384 /* TypeDirective */;
63526
    return _def(checkIndex, flags, matchedQueries, childCount, ctor, ctor, deps, bindings, outputDefs);
63527
}
63528
function pipeDef(flags, ctor, deps) {
63529
    flags |= 16 /* TypePipe */;
63530
    return _def(-1, flags, null, 0, ctor, ctor, deps);
63531
}
63532
function providerDef(flags, matchedQueries, token, value, deps) {
63533
    return _def(-1, flags, matchedQueries, 0, token, value, deps);
63534
}
63535
function _def(checkIndex, flags, matchedQueriesDsl, childCount, token, value, deps, bindings, outputs) {
63536
    var _a = splitMatchedQueriesDsl(matchedQueriesDsl), matchedQueries = _a.matchedQueries, references = _a.references, matchedQueryIds = _a.matchedQueryIds;
63537
    if (!outputs) {
63538
        outputs = [];
63539
    }
63540
    if (!bindings) {
63541
        bindings = [];
63542
    }
63543
    // Need to resolve forwardRefs as e.g. for `useValue` we
63544
    // lowered the expression and then stopped evaluating it,
63545
    // i.e. also didn't unwrap it.
63546
    value = resolveForwardRef(value);
63547
    var depDefs = splitDepsDsl(deps, stringify(token));
63548
    return {
63549
        // will bet set by the view definition
63550
        nodeIndex: -1,
63551
        parent: null,
63552
        renderParent: null,
63553
        bindingIndex: -1,
63554
        outputIndex: -1,
63555
        // regular values
63556
        checkIndex: checkIndex,
63557
        flags: flags,
63558
        childFlags: 0,
63559
        directChildFlags: 0,
63560
        childMatchedQueries: 0, matchedQueries: matchedQueries, matchedQueryIds: matchedQueryIds, references: references,
63561
        ngContentIndex: -1, childCount: childCount, bindings: bindings,
63562
        bindingFlags: calcBindingFlags(bindings), outputs: outputs,
63563
        element: null,
63564
        provider: { token: token, value: value, deps: depDefs },
63565
        text: null,
63566
        query: null,
63567
        ngContent: null
63568
    };
63569
}
63570
function createProviderInstance(view, def) {
63571
    return _createProviderInstance(view, def);
63572
}
63573
function createPipeInstance(view, def) {
63574
    // deps are looked up from component.
63575
    var compView = view;
63576
    while (compView.parent && !isComponentView(compView)) {
63577
        compView = compView.parent;
63578
    }
63579
    // pipes can see the private services of the component
63580
    var allowPrivateServices = true;
63581
    // pipes are always eager and classes!
63582
    return createClass((compView.parent), (viewParentEl(compView)), allowPrivateServices, def.provider.value, def.provider.deps);
63583
}
63584
function createDirectiveInstance(view, def) {
63585
    // components can see other private services, other directives can't.
63586
    var allowPrivateServices = (def.flags & 32768 /* Component */) > 0;
63587
    // directives are always eager and classes!
63588
    var instance = createClass(view, (def.parent), allowPrivateServices, def.provider.value, def.provider.deps);
63589
    if (def.outputs.length) {
63590
        for (var i = 0; i < def.outputs.length; i++) {
63591
            var output = def.outputs[i];
63592
            var subscription = instance[output.propName].subscribe(eventHandlerClosure(view, def.parent.nodeIndex, output.eventName));
63593
            view.disposables[def.outputIndex + i] = subscription.unsubscribe.bind(subscription);
63594
        }
63595
    }
63596
    return instance;
63597
}
63598
function eventHandlerClosure(view, index, eventName) {
63599
    return function (event) { return dispatchEvent(view, index, eventName, event); };
63600
}
63601
function checkAndUpdateDirectiveInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
63602
    var providerData = asProviderData(view, def.nodeIndex);
63603
    var directive = providerData.instance;
63604
    var changed = false;
63605
    var changes = (undefined);
63606
    var bindLen = def.bindings.length;
63607
    if (bindLen > 0 && checkBinding(view, def, 0, v0)) {
63608
        changed = true;
63609
        changes = updateProp(view, providerData, def, 0, v0, changes);
63610
    }
63611
    if (bindLen > 1 && checkBinding(view, def, 1, v1)) {
63612
        changed = true;
63613
        changes = updateProp(view, providerData, def, 1, v1, changes);
63614
    }
63615
    if (bindLen > 2 && checkBinding(view, def, 2, v2)) {
63616
        changed = true;
63617
        changes = updateProp(view, providerData, def, 2, v2, changes);
63618
    }
63619
    if (bindLen > 3 && checkBinding(view, def, 3, v3)) {
63620
        changed = true;
63621
        changes = updateProp(view, providerData, def, 3, v3, changes);
63622
    }
63623
    if (bindLen > 4 && checkBinding(view, def, 4, v4)) {
63624
        changed = true;
63625
        changes = updateProp(view, providerData, def, 4, v4, changes);
63626
    }
63627
    if (bindLen > 5 && checkBinding(view, def, 5, v5)) {
63628
        changed = true;
63629
        changes = updateProp(view, providerData, def, 5, v5, changes);
63630
    }
63631
    if (bindLen > 6 && checkBinding(view, def, 6, v6)) {
63632
        changed = true;
63633
        changes = updateProp(view, providerData, def, 6, v6, changes);
63634
    }
63635
    if (bindLen > 7 && checkBinding(view, def, 7, v7)) {
63636
        changed = true;
63637
        changes = updateProp(view, providerData, def, 7, v7, changes);
63638
    }
63639
    if (bindLen > 8 && checkBinding(view, def, 8, v8)) {
63640
        changed = true;
63641
        changes = updateProp(view, providerData, def, 8, v8, changes);
63642
    }
63643
    if (bindLen > 9 && checkBinding(view, def, 9, v9)) {
63644
        changed = true;
63645
        changes = updateProp(view, providerData, def, 9, v9, changes);
63646
    }
63647
    if (changes) {
63648
        directive.ngOnChanges(changes);
63649
    }
63650
    if ((def.flags & 65536 /* OnInit */) &&
63651
        shouldCallLifecycleInitHook(view, 256 /* InitState_CallingOnInit */, def.nodeIndex)) {
63652
        directive.ngOnInit();
63653
    }
63654
    if (def.flags & 262144 /* DoCheck */) {
63655
        directive.ngDoCheck();
63656
    }
63657
    return changed;
63658
}
63659
function checkAndUpdateDirectiveDynamic(view, def, values) {
63660
    var providerData = asProviderData(view, def.nodeIndex);
63661
    var directive = providerData.instance;
63662
    var changed = false;
63663
    var changes = (undefined);
63664
    for (var i = 0; i < values.length; i++) {
63665
        if (checkBinding(view, def, i, values[i])) {
63666
            changed = true;
63667
            changes = updateProp(view, providerData, def, i, values[i], changes);
63668
        }
63669
    }
63670
    if (changes) {
63671
        directive.ngOnChanges(changes);
63672
    }
63673
    if ((def.flags & 65536 /* OnInit */) &&
63674
        shouldCallLifecycleInitHook(view, 256 /* InitState_CallingOnInit */, def.nodeIndex)) {
63675
        directive.ngOnInit();
63676
    }
63677
    if (def.flags & 262144 /* DoCheck */) {
63678
        directive.ngDoCheck();
63679
    }
63680
    return changed;
63681
}
63682
function _createProviderInstance(view, def) {
63683
    // private services can see other private services
63684
    var allowPrivateServices = (def.flags & 8192 /* PrivateProvider */) > 0;
63685
    var providerDef = def.provider;
63686
    switch (def.flags & 201347067 /* Types */) {
63687
        case 512 /* TypeClassProvider */:
63688
            return createClass(view, (def.parent), allowPrivateServices, providerDef.value, providerDef.deps);
63689
        case 1024 /* TypeFactoryProvider */:
63690
            return callFactory(view, (def.parent), allowPrivateServices, providerDef.value, providerDef.deps);
63691
        case 2048 /* TypeUseExistingProvider */:
63692
            return resolveDep(view, (def.parent), allowPrivateServices, providerDef.deps[0]);
63693
        case 256 /* TypeValueProvider */:
63694
            return providerDef.value;
63695
    }
63696
}
63697
function createClass(view, elDef, allowPrivateServices, ctor, deps) {
63698
    var len = deps.length;
63699
    switch (len) {
63700
        case 0:
63701
            return new ctor();
63702
        case 1:
63703
            return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]));
63704
        case 2:
63705
            return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]));
63706
        case 3:
63707
            return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]), resolveDep(view, elDef, allowPrivateServices, deps[2]));
63708
        default:
63709
            var depValues = new Array(len);
63710
            for (var i = 0; i < len; i++) {
63711
                depValues[i] = resolveDep(view, elDef, allowPrivateServices, deps[i]);
63712
            }
63713
            return new (ctor.bind.apply(ctor, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([void 0], depValues)))();
63714
    }
63715
}
63716
function callFactory(view, elDef, allowPrivateServices, factory, deps) {
63717
    var len = deps.length;
63718
    switch (len) {
63719
        case 0:
63720
            return factory();
63721
        case 1:
63722
            return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]));
63723
        case 2:
63724
            return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]));
63725
        case 3:
63726
            return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]), resolveDep(view, elDef, allowPrivateServices, deps[2]));
63727
        default:
63728
            var depValues = Array(len);
63729
            for (var i = 0; i < len; i++) {
63730
                depValues[i] = resolveDep(view, elDef, allowPrivateServices, deps[i]);
63731
            }
63732
            return factory.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(depValues));
63733
    }
63734
}
63735
// This default value is when checking the hierarchy for a token.
63736
//
63737
// It means both:
63738
// - the token is not provided by the current injector,
63739
// - only the element injectors should be checked (ie do not check module injectors
63740
//
63741
//          mod1
63742
//         /
63743
//       el1   mod2
63744
//         \  /
63745
//         el2
63746
//
63747
// When requesting el2.injector.get(token), we should check in the following order and return the
63748
// first found value:
63749
// - el2.injector.get(token, default)
63750
// - el1.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) -> do not check the module
63751
// - mod2.injector.get(token, default)
63752
var NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {};
63753
function resolveDep(view, elDef, allowPrivateServices, depDef, notFoundValue) {
63754
    if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }
63755
    if (depDef.flags & 8 /* Value */) {
63756
        return depDef.token;
63757
    }
63758
    var startView = view;
63759
    if (depDef.flags & 2 /* Optional */) {
63760
        notFoundValue = null;
63761
    }
63762
    var tokenKey$$1 = depDef.tokenKey;
63763
    if (tokenKey$$1 === ChangeDetectorRefTokenKey) {
63764
        // directives on the same element as a component should be able to control the change detector
63765
        // of that component as well.
63766
        allowPrivateServices = !!(elDef && elDef.element.componentView);
63767
    }
63768
    if (elDef && (depDef.flags & 1 /* SkipSelf */)) {
63769
        allowPrivateServices = false;
63770
        elDef = (elDef.parent);
63771
    }
63772
    var searchView = view;
63773
    while (searchView) {
63774
        if (elDef) {
63775
            switch (tokenKey$$1) {
63776
                case RendererV1TokenKey: {
63777
                    var compView = findCompView(searchView, elDef, allowPrivateServices);
63778
                    return createRendererV1(compView);
63779
                }
63780
                case Renderer2TokenKey: {
63781
                    var compView = findCompView(searchView, elDef, allowPrivateServices);
63782
                    return compView.renderer;
63783
                }
63784
                case ElementRefTokenKey:
63785
                    return new ElementRef(asElementData(searchView, elDef.nodeIndex).renderElement);
63786
                case ViewContainerRefTokenKey:
63787
                    return asElementData(searchView, elDef.nodeIndex).viewContainer;
63788
                case TemplateRefTokenKey: {
63789
                    if (elDef.element.template) {
63790
                        return asElementData(searchView, elDef.nodeIndex).template;
63791
                    }
63792
                    break;
63793
                }
63794
                case ChangeDetectorRefTokenKey: {
63795
                    var cdView = findCompView(searchView, elDef, allowPrivateServices);
63796
                    return createChangeDetectorRef(cdView);
63797
                }
63798
                case InjectorRefTokenKey:
63799
                case INJECTORRefTokenKey:
63800
                    return createInjector$1(searchView, elDef);
63801
                default:
63802
                    var providerDef_1 = (allowPrivateServices ? elDef.element.allProviders :
63803
                        elDef.element.publicProviders)[tokenKey$$1];
63804
                    if (providerDef_1) {
63805
                        var providerData = asProviderData(searchView, providerDef_1.nodeIndex);
63806
                        if (!providerData) {
63807
                            providerData = { instance: _createProviderInstance(searchView, providerDef_1) };
63808
                            searchView.nodes[providerDef_1.nodeIndex] = providerData;
63809
                        }
63810
                        return providerData.instance;
63811
                    }
63812
            }
63813
        }
63814
        allowPrivateServices = isComponentView(searchView);
63815
        elDef = (viewParentEl(searchView));
63816
        searchView = (searchView.parent);
63817
        if (depDef.flags & 4 /* Self */) {
63818
            searchView = null;
63819
        }
63820
    }
63821
    var value = startView.root.injector.get(depDef.token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR);
63822
    if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||
63823
        notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {
63824
        // Return the value from the root element injector when
63825
        // - it provides it
63826
        //   (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)
63827
        // - the module injector should not be checked
63828
        //   (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)
63829
        return value;
63830
    }
63831
    return startView.root.ngModule.injector.get(depDef.token, notFoundValue);
63832
}
63833
function findCompView(view, elDef, allowPrivateServices) {
63834
    var compView;
63835
    if (allowPrivateServices) {
63836
        compView = asElementData(view, elDef.nodeIndex).componentView;
63837
    }
63838
    else {
63839
        compView = view;
63840
        while (compView.parent && !isComponentView(compView)) {
63841
            compView = compView.parent;
63842
        }
63843
    }
63844
    return compView;
63845
}
63846
function updateProp(view, providerData, def, bindingIdx, value, changes) {
63847
    if (def.flags & 32768 /* Component */) {
63848
        var compView = asElementData(view, def.parent.nodeIndex).componentView;
63849
        if (compView.def.flags & 2 /* OnPush */) {
63850
            compView.state |= 8 /* ChecksEnabled */;
63851
        }
63852
    }
63853
    var binding = def.bindings[bindingIdx];
63854
    var propName = (binding.name);
63855
    // Note: This is still safe with Closure Compiler as
63856
    // the user passed in the property name as an object has to `providerDef`,
63857
    // so Closure Compiler will have renamed the property correctly already.
63858
    providerData.instance[propName] = value;
63859
    if (def.flags & 524288 /* OnChanges */) {
63860
        changes = changes || {};
63861
        var oldValue = WrappedValue.unwrap(view.oldValues[def.bindingIndex + bindingIdx]);
63862
        var binding_1 = def.bindings[bindingIdx];
63863
        changes[binding_1.nonMinifiedName] =
63864
            new SimpleChange(oldValue, value, (view.state & 2 /* FirstCheck */) !== 0);
63865
    }
63866
    view.oldValues[def.bindingIndex + bindingIdx] = value;
63867
    return changes;
63868
}
63869
// This function calls the ngAfterContentCheck, ngAfterContentInit,
63870
// ngAfterViewCheck, and ngAfterViewInit lifecycle hooks (depending on the node
63871
// flags in lifecycle). Unlike ngDoCheck, ngOnChanges and ngOnInit, which are
63872
// called during a pre-order traversal of the view tree (that is calling the
63873
// parent hooks before the child hooks) these events are sent in using a
63874
// post-order traversal of the tree (children before parents). This changes the
63875
// meaning of initIndex in the view state. For ngOnInit, initIndex tracks the
63876
// expected nodeIndex which a ngOnInit should be called. When sending
63877
// ngAfterContentInit and ngAfterViewInit it is the expected count of
63878
// ngAfterContentInit or ngAfterViewInit methods that have been called. This
63879
// ensure that despite being called recursively or after picking up after an
63880
// exception, the ngAfterContentInit or ngAfterViewInit will be called on the
63881
// correct nodes. Consider for example, the following (where E is an element
63882
// and D is a directive)
63883
//  Tree:       pre-order index  post-order index
63884
//    E1        0                6
63885
//      E2      1                1
63886
//       D3     2                0
63887
//      E4      3                5
63888
//       E5     4                4
63889
//        E6    5                2
63890
//        E7    6                3
63891
// As can be seen, the post-order index has an unclear relationship to the
63892
// pre-order index (postOrderIndex === preOrderIndex - parentCount +
63893
// childCount). Since number of calls to ngAfterContentInit and ngAfterViewInit
63894
// are stable (will be the same for the same view regardless of exceptions or
63895
// recursion) we just need to count them which will roughly correspond to the
63896
// post-order index (it skips elements and directives that do not have
63897
// lifecycle hooks).
63898
//
63899
// For example, if an exception is raised in the E6.onAfterViewInit() the
63900
// initIndex is left at 3 (by shouldCallLifecycleInitHook() which set it to
63901
// initIndex + 1). When checkAndUpdateView() is called again D3, E2 and E6 will
63902
// not have their ngAfterViewInit() called but, starting with E7, the rest of
63903
// the view will begin getting ngAfterViewInit() called until a check and
63904
// pass is complete.
63905
//
63906
// This algorthim also handles recursion. Consider if E4's ngAfterViewInit()
63907
// indirectly calls E1's ChangeDetectorRef.detectChanges(). The expected
63908
// initIndex is set to 6, the recusive checkAndUpdateView() starts walk again.
63909
// D3, E2, E6, E7, E5 and E4 are skipped, ngAfterViewInit() is called on E1.
63910
// When the recursion returns the initIndex will be 7 so E1 is skipped as it
63911
// has already been called in the recursively called checkAnUpdateView().
63912
function callLifecycleHooksChildrenFirst(view, lifecycles) {
63913
    if (!(view.def.nodeFlags & lifecycles)) {
63914
        return;
63915
    }
63916
    var nodes = view.def.nodes;
63917
    var initIndex = 0;
63918
    for (var i = 0; i < nodes.length; i++) {
63919
        var nodeDef = nodes[i];
63920
        var parent_1 = nodeDef.parent;
63921
        if (!parent_1 && nodeDef.flags & lifecycles) {
63922
            // matching root node (e.g. a pipe)
63923
            callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);
63924
        }
63925
        if ((nodeDef.childFlags & lifecycles) === 0) {
63926
            // no child matches one of the lifecycles
63927
            i += nodeDef.childCount;
63928
        }
63929
        while (parent_1 && (parent_1.flags & 1 /* TypeElement */) &&
63930
            i === parent_1.nodeIndex + parent_1.childCount) {
63931
            // last child of an element
63932
            if (parent_1.directChildFlags & lifecycles) {
63933
                initIndex = callElementProvidersLifecycles(view, parent_1, lifecycles, initIndex);
63934
            }
63935
            parent_1 = parent_1.parent;
63936
        }
63937
    }
63938
}
63939
function callElementProvidersLifecycles(view, elDef, lifecycles, initIndex) {
63940
    for (var i = elDef.nodeIndex + 1; i <= elDef.nodeIndex + elDef.childCount; i++) {
63941
        var nodeDef = view.def.nodes[i];
63942
        if (nodeDef.flags & lifecycles) {
63943
            callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);
63944
        }
63945
        // only visit direct children
63946
        i += nodeDef.childCount;
63947
    }
63948
    return initIndex;
63949
}
63950
function callProviderLifecycles(view, index, lifecycles, initIndex) {
63951
    var providerData = asProviderData(view, index);
63952
    if (!providerData) {
63953
        return;
63954
    }
63955
    var provider = providerData.instance;
63956
    if (!provider) {
63957
        return;
63958
    }
63959
    Services.setCurrentNode(view, index);
63960
    if (lifecycles & 1048576 /* AfterContentInit */ &&
63961
        shouldCallLifecycleInitHook(view, 512 /* InitState_CallingAfterContentInit */, initIndex)) {
63962
        provider.ngAfterContentInit();
63963
    }
63964
    if (lifecycles & 2097152 /* AfterContentChecked */) {
63965
        provider.ngAfterContentChecked();
63966
    }
63967
    if (lifecycles & 4194304 /* AfterViewInit */ &&
63968
        shouldCallLifecycleInitHook(view, 768 /* InitState_CallingAfterViewInit */, initIndex)) {
63969
        provider.ngAfterViewInit();
63970
    }
63971
    if (lifecycles & 8388608 /* AfterViewChecked */) {
63972
        provider.ngAfterViewChecked();
63973
    }
63974
    if (lifecycles & 131072 /* OnDestroy */) {
63975
        provider.ngOnDestroy();
63976
    }
63977
}
63978
 
63979
/**
63980
 * @license
63981
 * Copyright Google Inc. All Rights Reserved.
63982
 *
63983
 * Use of this source code is governed by an MIT-style license that can be
63984
 * found in the LICENSE file at https://angular.io/license
63985
 */
63986
function queryDef(flags, id, bindings) {
63987
    var bindingDefs = [];
63988
    for (var propName in bindings) {
63989
        var bindingType = bindings[propName];
63990
        bindingDefs.push({ propName: propName, bindingType: bindingType });
63991
    }
63992
    return {
63993
        // will bet set by the view definition
63994
        nodeIndex: -1,
63995
        parent: null,
63996
        renderParent: null,
63997
        bindingIndex: -1,
63998
        outputIndex: -1,
63999
        // regular values
64000
        // TODO(vicb): check
64001
        checkIndex: -1, flags: flags,
64002
        childFlags: 0,
64003
        directChildFlags: 0,
64004
        childMatchedQueries: 0,
64005
        ngContentIndex: -1,
64006
        matchedQueries: {},
64007
        matchedQueryIds: 0,
64008
        references: {},
64009
        childCount: 0,
64010
        bindings: [],
64011
        bindingFlags: 0,
64012
        outputs: [],
64013
        element: null,
64014
        provider: null,
64015
        text: null,
64016
        query: { id: id, filterId: filterQueryId(id), bindings: bindingDefs },
64017
        ngContent: null
64018
    };
64019
}
64020
function createQuery() {
64021
    return new QueryList();
64022
}
64023
function dirtyParentQueries(view) {
64024
    var queryIds = view.def.nodeMatchedQueries;
64025
    while (view.parent && isEmbeddedView(view)) {
64026
        var tplDef = (view.parentNodeDef);
64027
        view = view.parent;
64028
        // content queries
64029
        var end = tplDef.nodeIndex + tplDef.childCount;
64030
        for (var i = 0; i <= end; i++) {
64031
            var nodeDef = view.def.nodes[i];
64032
            if ((nodeDef.flags & 67108864 /* TypeContentQuery */) &&
64033
                (nodeDef.flags & 536870912 /* DynamicQuery */) &&
64034
                (nodeDef.query.filterId & queryIds) === nodeDef.query.filterId) {
64035
                asQueryList(view, i).setDirty();
64036
            }
64037
            if ((nodeDef.flags & 1 /* TypeElement */ && i + nodeDef.childCount < tplDef.nodeIndex) ||
64038
                !(nodeDef.childFlags & 67108864 /* TypeContentQuery */) ||
64039
                !(nodeDef.childFlags & 536870912 /* DynamicQuery */)) {
64040
                // skip elements that don't contain the template element or no query.
64041
                i += nodeDef.childCount;
64042
            }
64043
        }
64044
    }
64045
    // view queries
64046
    if (view.def.nodeFlags & 134217728 /* TypeViewQuery */) {
64047
        for (var i = 0; i < view.def.nodes.length; i++) {
64048
            var nodeDef = view.def.nodes[i];
64049
            if ((nodeDef.flags & 134217728 /* TypeViewQuery */) && (nodeDef.flags & 536870912 /* DynamicQuery */)) {
64050
                asQueryList(view, i).setDirty();
64051
            }
64052
            // only visit the root nodes
64053
            i += nodeDef.childCount;
64054
        }
64055
    }
64056
}
64057
function checkAndUpdateQuery(view, nodeDef) {
64058
    var queryList = asQueryList(view, nodeDef.nodeIndex);
64059
    if (!queryList.dirty) {
64060
        return;
64061
    }
64062
    var directiveInstance;
64063
    var newValues = (undefined);
64064
    if (nodeDef.flags & 67108864 /* TypeContentQuery */) {
64065
        var elementDef = (nodeDef.parent.parent);
64066
        newValues = calcQueryValues(view, elementDef.nodeIndex, elementDef.nodeIndex + elementDef.childCount, (nodeDef.query), []);
64067
        directiveInstance = asProviderData(view, nodeDef.parent.nodeIndex).instance;
64068
    }
64069
    else if (nodeDef.flags & 134217728 /* TypeViewQuery */) {
64070
        newValues = calcQueryValues(view, 0, view.def.nodes.length - 1, (nodeDef.query), []);
64071
        directiveInstance = view.component;
64072
    }
64073
    queryList.reset(newValues);
64074
    var bindings = nodeDef.query.bindings;
64075
    var notify = false;
64076
    for (var i = 0; i < bindings.length; i++) {
64077
        var binding = bindings[i];
64078
        var boundValue = void 0;
64079
        switch (binding.bindingType) {
64080
            case 0 /* First */:
64081
                boundValue = queryList.first;
64082
                break;
64083
            case 1 /* All */:
64084
                boundValue = queryList;
64085
                notify = true;
64086
                break;
64087
        }
64088
        directiveInstance[binding.propName] = boundValue;
64089
    }
64090
    if (notify) {
64091
        queryList.notifyOnChanges();
64092
    }
64093
}
64094
function calcQueryValues(view, startIndex, endIndex, queryDef, values) {
64095
    for (var i = startIndex; i <= endIndex; i++) {
64096
        var nodeDef = view.def.nodes[i];
64097
        var valueType = nodeDef.matchedQueries[queryDef.id];
64098
        if (valueType != null) {
64099
            values.push(getQueryValue(view, nodeDef, valueType));
64100
        }
64101
        if (nodeDef.flags & 1 /* TypeElement */ && nodeDef.element.template &&
64102
            (nodeDef.element.template.nodeMatchedQueries & queryDef.filterId) ===
64103
                queryDef.filterId) {
64104
            var elementData = asElementData(view, i);
64105
            // check embedded views that were attached at the place of their template,
64106
            // but process child nodes first if some match the query (see issue #16568)
64107
            if ((nodeDef.childMatchedQueries & queryDef.filterId) === queryDef.filterId) {
64108
                calcQueryValues(view, i + 1, i + nodeDef.childCount, queryDef, values);
64109
                i += nodeDef.childCount;
64110
            }
64111
            if (nodeDef.flags & 16777216 /* EmbeddedViews */) {
64112
                var embeddedViews = elementData.viewContainer._embeddedViews;
64113
                for (var k = 0; k < embeddedViews.length; k++) {
64114
                    var embeddedView = embeddedViews[k];
64115
                    var dvc = declaredViewContainer(embeddedView);
64116
                    if (dvc && dvc === elementData) {
64117
                        calcQueryValues(embeddedView, 0, embeddedView.def.nodes.length - 1, queryDef, values);
64118
                    }
64119
                }
64120
            }
64121
            var projectedViews = elementData.template._projectedViews;
64122
            if (projectedViews) {
64123
                for (var k = 0; k < projectedViews.length; k++) {
64124
                    var projectedView = projectedViews[k];
64125
                    calcQueryValues(projectedView, 0, projectedView.def.nodes.length - 1, queryDef, values);
64126
                }
64127
            }
64128
        }
64129
        if ((nodeDef.childMatchedQueries & queryDef.filterId) !== queryDef.filterId) {
64130
            // if no child matches the query, skip the children.
64131
            i += nodeDef.childCount;
64132
        }
64133
    }
64134
    return values;
64135
}
64136
function getQueryValue(view, nodeDef, queryValueType) {
64137
    if (queryValueType != null) {
64138
        // a match
64139
        switch (queryValueType) {
64140
            case 1 /* RenderElement */:
64141
                return asElementData(view, nodeDef.nodeIndex).renderElement;
64142
            case 0 /* ElementRef */:
64143
                return new ElementRef(asElementData(view, nodeDef.nodeIndex).renderElement);
64144
            case 2 /* TemplateRef */:
64145
                return asElementData(view, nodeDef.nodeIndex).template;
64146
            case 3 /* ViewContainerRef */:
64147
                return asElementData(view, nodeDef.nodeIndex).viewContainer;
64148
            case 4 /* Provider */:
64149
                return asProviderData(view, nodeDef.nodeIndex).instance;
64150
        }
64151
    }
64152
}
64153
 
64154
/**
64155
 * @license
64156
 * Copyright Google Inc. All Rights Reserved.
64157
 *
64158
 * Use of this source code is governed by an MIT-style license that can be
64159
 * found in the LICENSE file at https://angular.io/license
64160
 */
64161
function ngContentDef(ngContentIndex, index) {
64162
    return {
64163
        // will bet set by the view definition
64164
        nodeIndex: -1,
64165
        parent: null,
64166
        renderParent: null,
64167
        bindingIndex: -1,
64168
        outputIndex: -1,
64169
        // regular values
64170
        checkIndex: -1,
64171
        flags: 8 /* TypeNgContent */,
64172
        childFlags: 0,
64173
        directChildFlags: 0,
64174
        childMatchedQueries: 0,
64175
        matchedQueries: {},
64176
        matchedQueryIds: 0,
64177
        references: {}, ngContentIndex: ngContentIndex,
64178
        childCount: 0,
64179
        bindings: [],
64180
        bindingFlags: 0,
64181
        outputs: [],
64182
        element: null,
64183
        provider: null,
64184
        text: null,
64185
        query: null,
64186
        ngContent: { index: index }
64187
    };
64188
}
64189
function appendNgContent(view, renderHost, def) {
64190
    var parentEl = getParentRenderElement(view, renderHost, def);
64191
    if (!parentEl) {
64192
        // Nothing to do if there is no parent element.
64193
        return;
64194
    }
64195
    var ngContentIndex = def.ngContent.index;
64196
    visitProjectedRenderNodes(view, ngContentIndex, 1 /* AppendChild */, parentEl, null, undefined);
64197
}
64198
 
64199
/**
64200
 * @license
64201
 * Copyright Google Inc. All Rights Reserved.
64202
 *
64203
 * Use of this source code is governed by an MIT-style license that can be
64204
 * found in the LICENSE file at https://angular.io/license
64205
 */
64206
function purePipeDef(checkIndex, argCount) {
64207
    // argCount + 1 to include the pipe as first arg
64208
    return _pureExpressionDef(128 /* TypePurePipe */, checkIndex, new Array(argCount + 1));
64209
}
64210
function pureArrayDef(checkIndex, argCount) {
64211
    return _pureExpressionDef(32 /* TypePureArray */, checkIndex, new Array(argCount));
64212
}
64213
function pureObjectDef(checkIndex, propToIndex) {
64214
    var keys = Object.keys(propToIndex);
64215
    var nbKeys = keys.length;
64216
    var propertyNames = new Array(nbKeys);
64217
    for (var i = 0; i < nbKeys; i++) {
64218
        var key = keys[i];
64219
        var index = propToIndex[key];
64220
        propertyNames[index] = key;
64221
    }
64222
    return _pureExpressionDef(64 /* TypePureObject */, checkIndex, propertyNames);
64223
}
64224
function _pureExpressionDef(flags, checkIndex, propertyNames) {
64225
    var bindings = new Array(propertyNames.length);
64226
    for (var i = 0; i < propertyNames.length; i++) {
64227
        var prop = propertyNames[i];
64228
        bindings[i] = {
64229
            flags: 8 /* TypeProperty */,
64230
            name: prop,
64231
            ns: null,
64232
            nonMinifiedName: prop,
64233
            securityContext: null,
64234
            suffix: null
64235
        };
64236
    }
64237
    return {
64238
        // will bet set by the view definition
64239
        nodeIndex: -1,
64240
        parent: null,
64241
        renderParent: null,
64242
        bindingIndex: -1,
64243
        outputIndex: -1,
64244
        // regular values
64245
        checkIndex: checkIndex,
64246
        flags: flags,
64247
        childFlags: 0,
64248
        directChildFlags: 0,
64249
        childMatchedQueries: 0,
64250
        matchedQueries: {},
64251
        matchedQueryIds: 0,
64252
        references: {},
64253
        ngContentIndex: -1,
64254
        childCount: 0, bindings: bindings,
64255
        bindingFlags: calcBindingFlags(bindings),
64256
        outputs: [],
64257
        element: null,
64258
        provider: null,
64259
        text: null,
64260
        query: null,
64261
        ngContent: null
64262
    };
64263
}
64264
function createPureExpression(view, def) {
64265
    return { value: undefined };
64266
}
64267
function checkAndUpdatePureExpressionInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
64268
    var bindings = def.bindings;
64269
    var changed = false;
64270
    var bindLen = bindings.length;
64271
    if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0))
64272
        changed = true;
64273
    if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1))
64274
        changed = true;
64275
    if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2))
64276
        changed = true;
64277
    if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3))
64278
        changed = true;
64279
    if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4))
64280
        changed = true;
64281
    if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5))
64282
        changed = true;
64283
    if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6))
64284
        changed = true;
64285
    if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7))
64286
        changed = true;
64287
    if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8))
64288
        changed = true;
64289
    if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9))
64290
        changed = true;
64291
    if (changed) {
64292
        var data = asPureExpressionData(view, def.nodeIndex);
64293
        var value = void 0;
64294
        switch (def.flags & 201347067 /* Types */) {
64295
            case 32 /* TypePureArray */:
64296
                value = new Array(bindings.length);
64297
                if (bindLen > 0)
64298
                    value[0] = v0;
64299
                if (bindLen > 1)
64300
                    value[1] = v1;
64301
                if (bindLen > 2)
64302
                    value[2] = v2;
64303
                if (bindLen > 3)
64304
                    value[3] = v3;
64305
                if (bindLen > 4)
64306
                    value[4] = v4;
64307
                if (bindLen > 5)
64308
                    value[5] = v5;
64309
                if (bindLen > 6)
64310
                    value[6] = v6;
64311
                if (bindLen > 7)
64312
                    value[7] = v7;
64313
                if (bindLen > 8)
64314
                    value[8] = v8;
64315
                if (bindLen > 9)
64316
                    value[9] = v9;
64317
                break;
64318
            case 64 /* TypePureObject */:
64319
                value = {};
64320
                if (bindLen > 0)
64321
                    value[bindings[0].name] = v0;
64322
                if (bindLen > 1)
64323
                    value[bindings[1].name] = v1;
64324
                if (bindLen > 2)
64325
                    value[bindings[2].name] = v2;
64326
                if (bindLen > 3)
64327
                    value[bindings[3].name] = v3;
64328
                if (bindLen > 4)
64329
                    value[bindings[4].name] = v4;
64330
                if (bindLen > 5)
64331
                    value[bindings[5].name] = v5;
64332
                if (bindLen > 6)
64333
                    value[bindings[6].name] = v6;
64334
                if (bindLen > 7)
64335
                    value[bindings[7].name] = v7;
64336
                if (bindLen > 8)
64337
                    value[bindings[8].name] = v8;
64338
                if (bindLen > 9)
64339
                    value[bindings[9].name] = v9;
64340
                break;
64341
            case 128 /* TypePurePipe */:
64342
                var pipe = v0;
64343
                switch (bindLen) {
64344
                    case 1:
64345
                        value = pipe.transform(v0);
64346
                        break;
64347
                    case 2:
64348
                        value = pipe.transform(v1);
64349
                        break;
64350
                    case 3:
64351
                        value = pipe.transform(v1, v2);
64352
                        break;
64353
                    case 4:
64354
                        value = pipe.transform(v1, v2, v3);
64355
                        break;
64356
                    case 5:
64357
                        value = pipe.transform(v1, v2, v3, v4);
64358
                        break;
64359
                    case 6:
64360
                        value = pipe.transform(v1, v2, v3, v4, v5);
64361
                        break;
64362
                    case 7:
64363
                        value = pipe.transform(v1, v2, v3, v4, v5, v6);
64364
                        break;
64365
                    case 8:
64366
                        value = pipe.transform(v1, v2, v3, v4, v5, v6, v7);
64367
                        break;
64368
                    case 9:
64369
                        value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8);
64370
                        break;
64371
                    case 10:
64372
                        value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8, v9);
64373
                        break;
64374
                }
64375
                break;
64376
        }
64377
        data.value = value;
64378
    }
64379
    return changed;
64380
}
64381
function checkAndUpdatePureExpressionDynamic(view, def, values) {
64382
    var bindings = def.bindings;
64383
    var changed = false;
64384
    for (var i = 0; i < values.length; i++) {
64385
        // Note: We need to loop over all values, so that
64386
        // the old values are updates as well!
64387
        if (checkAndUpdateBinding(view, def, i, values[i])) {
64388
            changed = true;
64389
        }
64390
    }
64391
    if (changed) {
64392
        var data = asPureExpressionData(view, def.nodeIndex);
64393
        var value = void 0;
64394
        switch (def.flags & 201347067 /* Types */) {
64395
            case 32 /* TypePureArray */:
64396
                value = values;
64397
                break;
64398
            case 64 /* TypePureObject */:
64399
                value = {};
64400
                for (var i = 0; i < values.length; i++) {
64401
                    value[bindings[i].name] = values[i];
64402
                }
64403
                break;
64404
            case 128 /* TypePurePipe */:
64405
                var pipe = values[0];
64406
                var params = values.slice(1);
64407
                value = pipe.transform.apply(pipe, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(params));
64408
                break;
64409
        }
64410
        data.value = value;
64411
    }
64412
    return changed;
64413
}
64414
 
64415
/**
64416
 * @license
64417
 * Copyright Google Inc. All Rights Reserved.
64418
 *
64419
 * Use of this source code is governed by an MIT-style license that can be
64420
 * found in the LICENSE file at https://angular.io/license
64421
 */
64422
function textDef(checkIndex, ngContentIndex, staticText) {
64423
    var bindings = new Array(staticText.length - 1);
64424
    for (var i = 1; i < staticText.length; i++) {
64425
        bindings[i - 1] = {
64426
            flags: 8 /* TypeProperty */,
64427
            name: null,
64428
            ns: null,
64429
            nonMinifiedName: null,
64430
            securityContext: null,
64431
            suffix: staticText[i],
64432
        };
64433
    }
64434
    return {
64435
        // will bet set by the view definition
64436
        nodeIndex: -1,
64437
        parent: null,
64438
        renderParent: null,
64439
        bindingIndex: -1,
64440
        outputIndex: -1,
64441
        // regular values
64442
        checkIndex: checkIndex,
64443
        flags: 2 /* TypeText */,
64444
        childFlags: 0,
64445
        directChildFlags: 0,
64446
        childMatchedQueries: 0,
64447
        matchedQueries: {},
64448
        matchedQueryIds: 0,
64449
        references: {}, ngContentIndex: ngContentIndex,
64450
        childCount: 0, bindings: bindings,
64451
        bindingFlags: 8 /* TypeProperty */,
64452
        outputs: [],
64453
        element: null,
64454
        provider: null,
64455
        text: { prefix: staticText[0] },
64456
        query: null,
64457
        ngContent: null,
64458
    };
64459
}
64460
function createText(view, renderHost, def) {
64461
    var renderNode$$1;
64462
    var renderer = view.renderer;
64463
    renderNode$$1 = renderer.createText(def.text.prefix);
64464
    var parentEl = getParentRenderElement(view, renderHost, def);
64465
    if (parentEl) {
64466
        renderer.appendChild(parentEl, renderNode$$1);
64467
    }
64468
    return { renderText: renderNode$$1 };
64469
}
64470
function checkAndUpdateTextInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
64471
    var changed = false;
64472
    var bindings = def.bindings;
64473
    var bindLen = bindings.length;
64474
    if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0))
64475
        changed = true;
64476
    if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1))
64477
        changed = true;
64478
    if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2))
64479
        changed = true;
64480
    if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3))
64481
        changed = true;
64482
    if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4))
64483
        changed = true;
64484
    if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5))
64485
        changed = true;
64486
    if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6))
64487
        changed = true;
64488
    if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7))
64489
        changed = true;
64490
    if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8))
64491
        changed = true;
64492
    if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9))
64493
        changed = true;
64494
    if (changed) {
64495
        var value = def.text.prefix;
64496
        if (bindLen > 0)
64497
            value += _addInterpolationPart(v0, bindings[0]);
64498
        if (bindLen > 1)
64499
            value += _addInterpolationPart(v1, bindings[1]);
64500
        if (bindLen > 2)
64501
            value += _addInterpolationPart(v2, bindings[2]);
64502
        if (bindLen > 3)
64503
            value += _addInterpolationPart(v3, bindings[3]);
64504
        if (bindLen > 4)
64505
            value += _addInterpolationPart(v4, bindings[4]);
64506
        if (bindLen > 5)
64507
            value += _addInterpolationPart(v5, bindings[5]);
64508
        if (bindLen > 6)
64509
            value += _addInterpolationPart(v6, bindings[6]);
64510
        if (bindLen > 7)
64511
            value += _addInterpolationPart(v7, bindings[7]);
64512
        if (bindLen > 8)
64513
            value += _addInterpolationPart(v8, bindings[8]);
64514
        if (bindLen > 9)
64515
            value += _addInterpolationPart(v9, bindings[9]);
64516
        var renderNode$$1 = asTextData(view, def.nodeIndex).renderText;
64517
        view.renderer.setValue(renderNode$$1, value);
64518
    }
64519
    return changed;
64520
}
64521
function checkAndUpdateTextDynamic(view, def, values) {
64522
    var bindings = def.bindings;
64523
    var changed = false;
64524
    for (var i = 0; i < values.length; i++) {
64525
        // Note: We need to loop over all values, so that
64526
        // the old values are updates as well!
64527
        if (checkAndUpdateBinding(view, def, i, values[i])) {
64528
            changed = true;
64529
        }
64530
    }
64531
    if (changed) {
64532
        var value = '';
64533
        for (var i = 0; i < values.length; i++) {
64534
            value = value + _addInterpolationPart(values[i], bindings[i]);
64535
        }
64536
        value = def.text.prefix + value;
64537
        var renderNode$$1 = asTextData(view, def.nodeIndex).renderText;
64538
        view.renderer.setValue(renderNode$$1, value);
64539
    }
64540
    return changed;
64541
}
64542
function _addInterpolationPart(value, binding) {
64543
    var valueStr = value != null ? value.toString() : '';
64544
    return valueStr + binding.suffix;
64545
}
64546
 
64547
/**
64548
 * @license
64549
 * Copyright Google Inc. All Rights Reserved.
64550
 *
64551
 * Use of this source code is governed by an MIT-style license that can be
64552
 * found in the LICENSE file at https://angular.io/license
64553
 */
64554
function viewDef(flags, nodes, updateDirectives, updateRenderer) {
64555
    // clone nodes and set auto calculated values
64556
    var viewBindingCount = 0;
64557
    var viewDisposableCount = 0;
64558
    var viewNodeFlags = 0;
64559
    var viewRootNodeFlags = 0;
64560
    var viewMatchedQueries = 0;
64561
    var currentParent = null;
64562
    var currentRenderParent = null;
64563
    var currentElementHasPublicProviders = false;
64564
    var currentElementHasPrivateProviders = false;
64565
    var lastRenderRootNode = null;
64566
    for (var i = 0; i < nodes.length; i++) {
64567
        var node = nodes[i];
64568
        node.nodeIndex = i;
64569
        node.parent = currentParent;
64570
        node.bindingIndex = viewBindingCount;
64571
        node.outputIndex = viewDisposableCount;
64572
        node.renderParent = currentRenderParent;
64573
        viewNodeFlags |= node.flags;
64574
        viewMatchedQueries |= node.matchedQueryIds;
64575
        if (node.element) {
64576
            var elDef = node.element;
64577
            elDef.publicProviders =
64578
                currentParent ? currentParent.element.publicProviders : Object.create(null);
64579
            elDef.allProviders = elDef.publicProviders;
64580
            // Note: We assume that all providers of an element are before any child element!
64581
            currentElementHasPublicProviders = false;
64582
            currentElementHasPrivateProviders = false;
64583
            if (node.element.template) {
64584
                viewMatchedQueries |= node.element.template.nodeMatchedQueries;
64585
            }
64586
        }
64587
        validateNode(currentParent, node, nodes.length);
64588
        viewBindingCount += node.bindings.length;
64589
        viewDisposableCount += node.outputs.length;
64590
        if (!currentRenderParent && (node.flags & 3 /* CatRenderNode */)) {
64591
            lastRenderRootNode = node;
64592
        }
64593
        if (node.flags & 20224 /* CatProvider */) {
64594
            if (!currentElementHasPublicProviders) {
64595
                currentElementHasPublicProviders = true;
64596
                // Use prototypical inheritance to not get O(n^2) complexity...
64597
                // Use prototypical inheritance to not get O(n^2) complexity...
64598
                currentParent.element.publicProviders =
64599
                    Object.create(currentParent.element.publicProviders);
64600
                currentParent.element.allProviders = currentParent.element.publicProviders;
64601
            }
64602
            var isPrivateService = (node.flags & 8192 /* PrivateProvider */) !== 0;
64603
            var isComponent = (node.flags & 32768 /* Component */) !== 0;
64604
            if (!isPrivateService || isComponent) {
64605
                currentParent.element.publicProviders[tokenKey(node.provider.token)] = node;
64606
            }
64607
            else {
64608
                if (!currentElementHasPrivateProviders) {
64609
                    currentElementHasPrivateProviders = true;
64610
                    // Use prototypical inheritance to not get O(n^2) complexity...
64611
                    // Use prototypical inheritance to not get O(n^2) complexity...
64612
                    currentParent.element.allProviders =
64613
                        Object.create(currentParent.element.publicProviders);
64614
                }
64615
                currentParent.element.allProviders[tokenKey(node.provider.token)] = node;
64616
            }
64617
            if (isComponent) {
64618
                currentParent.element.componentProvider = node;
64619
            }
64620
        }
64621
        if (currentParent) {
64622
            currentParent.childFlags |= node.flags;
64623
            currentParent.directChildFlags |= node.flags;
64624
            currentParent.childMatchedQueries |= node.matchedQueryIds;
64625
            if (node.element && node.element.template) {
64626
                currentParent.childMatchedQueries |= node.element.template.nodeMatchedQueries;
64627
            }
64628
        }
64629
        else {
64630
            viewRootNodeFlags |= node.flags;
64631
        }
64632
        if (node.childCount > 0) {
64633
            currentParent = node;
64634
            if (!isNgContainer(node)) {
64635
                currentRenderParent = node;
64636
            }
64637
        }
64638
        else {
64639
            // When the current node has no children, check if it is the last children of its parent.
64640
            // When it is, propagate the flags up.
64641
            // The loop is required because an element could be the last transitive children of several
64642
            // elements. We loop to either the root or the highest opened element (= with remaining
64643
            // children)
64644
            while (currentParent && i === currentParent.nodeIndex + currentParent.childCount) {
64645
                var newParent = currentParent.parent;
64646
                if (newParent) {
64647
                    newParent.childFlags |= currentParent.childFlags;
64648
                    newParent.childMatchedQueries |= currentParent.childMatchedQueries;
64649
                }
64650
                currentParent = newParent;
64651
                // We also need to update the render parent & account for ng-container
64652
                if (currentParent && isNgContainer(currentParent)) {
64653
                    currentRenderParent = currentParent.renderParent;
64654
                }
64655
                else {
64656
                    currentRenderParent = currentParent;
64657
                }
64658
            }
64659
        }
64660
    }
64661
    var handleEvent = function (view, nodeIndex, eventName, event) {
64662
        return nodes[nodeIndex].element.handleEvent(view, eventName, event);
64663
    };
64664
    return {
64665
        // Will be filled later...
64666
        factory: null,
64667
        nodeFlags: viewNodeFlags,
64668
        rootNodeFlags: viewRootNodeFlags,
64669
        nodeMatchedQueries: viewMatchedQueries, flags: flags,
64670
        nodes: nodes,
64671
        updateDirectives: updateDirectives || NOOP,
64672
        updateRenderer: updateRenderer || NOOP, handleEvent: handleEvent,
64673
        bindingCount: viewBindingCount,
64674
        outputCount: viewDisposableCount, lastRenderRootNode: lastRenderRootNode
64675
    };
64676
}
64677
function isNgContainer(node) {
64678
    return (node.flags & 1 /* TypeElement */) !== 0 && node.element.name === null;
64679
}
64680
function validateNode(parent, node, nodeCount) {
64681
    var template = node.element && node.element.template;
64682
    if (template) {
64683
        if (!template.lastRenderRootNode) {
64684
            throw new Error("Illegal State: Embedded templates without nodes are not allowed!");
64685
        }
64686
        if (template.lastRenderRootNode &&
64687
            template.lastRenderRootNode.flags & 16777216 /* EmbeddedViews */) {
64688
            throw new Error("Illegal State: Last root node of a template can't have embedded views, at index " + node.nodeIndex + "!");
64689
        }
64690
    }
64691
    if (node.flags & 20224 /* CatProvider */) {
64692
        var parentFlags = parent ? parent.flags : 0;
64693
        if ((parentFlags & 1 /* TypeElement */) === 0) {
64694
            throw new Error("Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index " + node.nodeIndex + "!");
64695
        }
64696
    }
64697
    if (node.query) {
64698
        if (node.flags & 67108864 /* TypeContentQuery */ &&
64699
            (!parent || (parent.flags & 16384 /* TypeDirective */) === 0)) {
64700
            throw new Error("Illegal State: Content Query nodes need to be children of directives, at index " + node.nodeIndex + "!");
64701
        }
64702
        if (node.flags & 134217728 /* TypeViewQuery */ && parent) {
64703
            throw new Error("Illegal State: View Query nodes have to be top level nodes, at index " + node.nodeIndex + "!");
64704
        }
64705
    }
64706
    if (node.childCount) {
64707
        var parentEnd = parent ? parent.nodeIndex + parent.childCount : nodeCount - 1;
64708
        if (node.nodeIndex <= parentEnd && node.nodeIndex + node.childCount > parentEnd) {
64709
            throw new Error("Illegal State: childCount of node leads outside of parent, at index " + node.nodeIndex + "!");
64710
        }
64711
    }
64712
}
64713
function createEmbeddedView(parent, anchorDef$$1, viewDef, context) {
64714
    // embedded views are seen as siblings to the anchor, so we need
64715
    // to get the parent of the anchor and use it as parentIndex.
64716
    var view = createView(parent.root, parent.renderer, parent, anchorDef$$1, viewDef);
64717
    initView(view, parent.component, context);
64718
    createViewNodes(view);
64719
    return view;
64720
}
64721
function createRootView(root, def, context) {
64722
    var view = createView(root, root.renderer, null, null, def);
64723
    initView(view, context, context);
64724
    createViewNodes(view);
64725
    return view;
64726
}
64727
function createComponentView(parentView, nodeDef, viewDef, hostElement) {
64728
    var rendererType = nodeDef.element.componentRendererType;
64729
    var compRenderer;
64730
    if (!rendererType) {
64731
        compRenderer = parentView.root.renderer;
64732
    }
64733
    else {
64734
        compRenderer = parentView.root.rendererFactory.createRenderer(hostElement, rendererType);
64735
    }
64736
    return createView(parentView.root, compRenderer, parentView, nodeDef.element.componentProvider, viewDef);
64737
}
64738
function createView(root, renderer, parent, parentNodeDef, def) {
64739
    var nodes = new Array(def.nodes.length);
64740
    var disposables = def.outputCount ? new Array(def.outputCount) : null;
64741
    var view = {
64742
        def: def,
64743
        parent: parent,
64744
        viewContainerParent: null, parentNodeDef: parentNodeDef,
64745
        context: null,
64746
        component: null, nodes: nodes,
64747
        state: 13 /* CatInit */, root: root, renderer: renderer,
64748
        oldValues: new Array(def.bindingCount), disposables: disposables,
64749
        initIndex: -1
64750
    };
64751
    return view;
64752
}
64753
function initView(view, component, context) {
64754
    view.component = component;
64755
    view.context = context;
64756
}
64757
function createViewNodes(view) {
64758
    var renderHost;
64759
    if (isComponentView(view)) {
64760
        var hostDef = view.parentNodeDef;
64761
        renderHost = asElementData((view.parent), hostDef.parent.nodeIndex).renderElement;
64762
    }
64763
    var def = view.def;
64764
    var nodes = view.nodes;
64765
    for (var i = 0; i < def.nodes.length; i++) {
64766
        var nodeDef = def.nodes[i];
64767
        Services.setCurrentNode(view, i);
64768
        var nodeData = void 0;
64769
        switch (nodeDef.flags & 201347067 /* Types */) {
64770
            case 1 /* TypeElement */:
64771
                var el = createElement(view, renderHost, nodeDef);
64772
                var componentView = (undefined);
64773
                if (nodeDef.flags & 33554432 /* ComponentView */) {
64774
                    var compViewDef = resolveDefinition((nodeDef.element.componentView));
64775
                    componentView = Services.createComponentView(view, nodeDef, compViewDef, el);
64776
                }
64777
                listenToElementOutputs(view, componentView, nodeDef, el);
64778
                nodeData = {
64779
                    renderElement: el,
64780
                    componentView: componentView,
64781
                    viewContainer: null,
64782
                    template: nodeDef.element.template ? createTemplateData(view, nodeDef) : undefined
64783
                };
64784
                if (nodeDef.flags & 16777216 /* EmbeddedViews */) {
64785
                    nodeData.viewContainer = createViewContainerData(view, nodeDef, nodeData);
64786
                }
64787
                break;
64788
            case 2 /* TypeText */:
64789
                nodeData = createText(view, renderHost, nodeDef);
64790
                break;
64791
            case 512 /* TypeClassProvider */:
64792
            case 1024 /* TypeFactoryProvider */:
64793
            case 2048 /* TypeUseExistingProvider */:
64794
            case 256 /* TypeValueProvider */: {
64795
                nodeData = nodes[i];
64796
                if (!nodeData && !(nodeDef.flags & 4096 /* LazyProvider */)) {
64797
                    var instance = createProviderInstance(view, nodeDef);
64798
                    nodeData = { instance: instance };
64799
                }
64800
                break;
64801
            }
64802
            case 16 /* TypePipe */: {
64803
                var instance = createPipeInstance(view, nodeDef);
64804
                nodeData = { instance: instance };
64805
                break;
64806
            }
64807
            case 16384 /* TypeDirective */: {
64808
                nodeData = nodes[i];
64809
                if (!nodeData) {
64810
                    var instance = createDirectiveInstance(view, nodeDef);
64811
                    nodeData = { instance: instance };
64812
                }
64813
                if (nodeDef.flags & 32768 /* Component */) {
64814
                    var compView = asElementData(view, nodeDef.parent.nodeIndex).componentView;
64815
                    initView(compView, nodeData.instance, nodeData.instance);
64816
                }
64817
                break;
64818
            }
64819
            case 32 /* TypePureArray */:
64820
            case 64 /* TypePureObject */:
64821
            case 128 /* TypePurePipe */:
64822
                nodeData = createPureExpression(view, nodeDef);
64823
                break;
64824
            case 67108864 /* TypeContentQuery */:
64825
            case 134217728 /* TypeViewQuery */:
64826
                nodeData = createQuery();
64827
                break;
64828
            case 8 /* TypeNgContent */:
64829
                appendNgContent(view, renderHost, nodeDef);
64830
                // no runtime data needed for NgContent...
64831
                nodeData = undefined;
64832
                break;
64833
        }
64834
        nodes[i] = nodeData;
64835
    }
64836
    // Create the ViewData.nodes of component views after we created everything else,
64837
    // so that e.g. ng-content works
64838
    execComponentViewsAction(view, ViewAction.CreateViewNodes);
64839
    // fill static content and view queries
64840
    execQueriesAction(view, 67108864 /* TypeContentQuery */ | 134217728 /* TypeViewQuery */, 268435456 /* StaticQuery */, 0 /* CheckAndUpdate */);
64841
}
64842
function checkNoChangesView(view) {
64843
    markProjectedViewsForCheck(view);
64844
    Services.updateDirectives(view, 1 /* CheckNoChanges */);
64845
    execEmbeddedViewsAction(view, ViewAction.CheckNoChanges);
64846
    Services.updateRenderer(view, 1 /* CheckNoChanges */);
64847
    execComponentViewsAction(view, ViewAction.CheckNoChanges);
64848
    // Note: We don't check queries for changes as we didn't do this in v2.x.
64849
    // TODO(tbosch): investigate if we can enable the check again in v5.x with a nicer error message.
64850
    view.state &= ~(64 /* CheckProjectedViews */ | 32 /* CheckProjectedView */);
64851
}
64852
function checkAndUpdateView(view) {
64853
    if (view.state & 1 /* BeforeFirstCheck */) {
64854
        view.state &= ~1 /* BeforeFirstCheck */;
64855
        view.state |= 2 /* FirstCheck */;
64856
    }
64857
    else {
64858
        view.state &= ~2 /* FirstCheck */;
64859
    }
64860
    shiftInitState(view, 0 /* InitState_BeforeInit */, 256 /* InitState_CallingOnInit */);
64861
    markProjectedViewsForCheck(view);
64862
    Services.updateDirectives(view, 0 /* CheckAndUpdate */);
64863
    execEmbeddedViewsAction(view, ViewAction.CheckAndUpdate);
64864
    execQueriesAction(view, 67108864 /* TypeContentQuery */, 536870912 /* DynamicQuery */, 0 /* CheckAndUpdate */);
64865
    var callInit = shiftInitState(view, 256 /* InitState_CallingOnInit */, 512 /* InitState_CallingAfterContentInit */);
64866
    callLifecycleHooksChildrenFirst(view, 2097152 /* AfterContentChecked */ | (callInit ? 1048576 /* AfterContentInit */ : 0));
64867
    Services.updateRenderer(view, 0 /* CheckAndUpdate */);
64868
    execComponentViewsAction(view, ViewAction.CheckAndUpdate);
64869
    execQueriesAction(view, 134217728 /* TypeViewQuery */, 536870912 /* DynamicQuery */, 0 /* CheckAndUpdate */);
64870
    callInit = shiftInitState(view, 512 /* InitState_CallingAfterContentInit */, 768 /* InitState_CallingAfterViewInit */);
64871
    callLifecycleHooksChildrenFirst(view, 8388608 /* AfterViewChecked */ | (callInit ? 4194304 /* AfterViewInit */ : 0));
64872
    if (view.def.flags & 2 /* OnPush */) {
64873
        view.state &= ~8 /* ChecksEnabled */;
64874
    }
64875
    view.state &= ~(64 /* CheckProjectedViews */ | 32 /* CheckProjectedView */);
64876
    shiftInitState(view, 768 /* InitState_CallingAfterViewInit */, 1024 /* InitState_AfterInit */);
64877
}
64878
function checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
64879
    if (argStyle === 0 /* Inline */) {
64880
        return checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);
64881
    }
64882
    else {
64883
        return checkAndUpdateNodeDynamic(view, nodeDef, v0);
64884
    }
64885
}
64886
function markProjectedViewsForCheck(view) {
64887
    var def = view.def;
64888
    if (!(def.nodeFlags & 4 /* ProjectedTemplate */)) {
64889
        return;
64890
    }
64891
    for (var i = 0; i < def.nodes.length; i++) {
64892
        var nodeDef = def.nodes[i];
64893
        if (nodeDef.flags & 4 /* ProjectedTemplate */) {
64894
            var projectedViews = asElementData(view, i).template._projectedViews;
64895
            if (projectedViews) {
64896
                for (var i_1 = 0; i_1 < projectedViews.length; i_1++) {
64897
                    var projectedView = projectedViews[i_1];
64898
                    projectedView.state |= 32 /* CheckProjectedView */;
64899
                    markParentViewsForCheckProjectedViews(projectedView, view);
64900
                }
64901
            }
64902
        }
64903
        else if ((nodeDef.childFlags & 4 /* ProjectedTemplate */) === 0) {
64904
            // a parent with leafs
64905
            // no child is a component,
64906
            // then skip the children
64907
            i += nodeDef.childCount;
64908
        }
64909
    }
64910
}
64911
function checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
64912
    switch (nodeDef.flags & 201347067 /* Types */) {
64913
        case 1 /* TypeElement */:
64914
            return checkAndUpdateElementInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);
64915
        case 2 /* TypeText */:
64916
            return checkAndUpdateTextInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);
64917
        case 16384 /* TypeDirective */:
64918
            return checkAndUpdateDirectiveInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);
64919
        case 32 /* TypePureArray */:
64920
        case 64 /* TypePureObject */:
64921
        case 128 /* TypePurePipe */:
64922
            return checkAndUpdatePureExpressionInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);
64923
        default:
64924
            throw 'unreachable';
64925
    }
64926
}
64927
function checkAndUpdateNodeDynamic(view, nodeDef, values) {
64928
    switch (nodeDef.flags & 201347067 /* Types */) {
64929
        case 1 /* TypeElement */:
64930
            return checkAndUpdateElementDynamic(view, nodeDef, values);
64931
        case 2 /* TypeText */:
64932
            return checkAndUpdateTextDynamic(view, nodeDef, values);
64933
        case 16384 /* TypeDirective */:
64934
            return checkAndUpdateDirectiveDynamic(view, nodeDef, values);
64935
        case 32 /* TypePureArray */:
64936
        case 64 /* TypePureObject */:
64937
        case 128 /* TypePurePipe */:
64938
            return checkAndUpdatePureExpressionDynamic(view, nodeDef, values);
64939
        default:
64940
            throw 'unreachable';
64941
    }
64942
}
64943
function checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
64944
    if (argStyle === 0 /* Inline */) {
64945
        checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);
64946
    }
64947
    else {
64948
        checkNoChangesNodeDynamic(view, nodeDef, v0);
64949
    }
64950
    // Returning false is ok here as we would have thrown in case of a change.
64951
    return false;
64952
}
64953
function checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
64954
    var bindLen = nodeDef.bindings.length;
64955
    if (bindLen > 0)
64956
        checkBindingNoChanges(view, nodeDef, 0, v0);
64957
    if (bindLen > 1)
64958
        checkBindingNoChanges(view, nodeDef, 1, v1);
64959
    if (bindLen > 2)
64960
        checkBindingNoChanges(view, nodeDef, 2, v2);
64961
    if (bindLen > 3)
64962
        checkBindingNoChanges(view, nodeDef, 3, v3);
64963
    if (bindLen > 4)
64964
        checkBindingNoChanges(view, nodeDef, 4, v4);
64965
    if (bindLen > 5)
64966
        checkBindingNoChanges(view, nodeDef, 5, v5);
64967
    if (bindLen > 6)
64968
        checkBindingNoChanges(view, nodeDef, 6, v6);
64969
    if (bindLen > 7)
64970
        checkBindingNoChanges(view, nodeDef, 7, v7);
64971
    if (bindLen > 8)
64972
        checkBindingNoChanges(view, nodeDef, 8, v8);
64973
    if (bindLen > 9)
64974
        checkBindingNoChanges(view, nodeDef, 9, v9);
64975
}
64976
function checkNoChangesNodeDynamic(view, nodeDef, values) {
64977
    for (var i = 0; i < values.length; i++) {
64978
        checkBindingNoChanges(view, nodeDef, i, values[i]);
64979
    }
64980
}
64981
/**
64982
 * Workaround https://github.com/angular/tsickle/issues/497
64983
 * @suppress {misplacedTypeAnnotation}
64984
 */
64985
function checkNoChangesQuery(view, nodeDef) {
64986
    var queryList = asQueryList(view, nodeDef.nodeIndex);
64987
    if (queryList.dirty) {
64988
        throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view, nodeDef.nodeIndex), "Query " + nodeDef.query.id + " not dirty", "Query " + nodeDef.query.id + " dirty", (view.state & 1 /* BeforeFirstCheck */) !== 0);
64989
    }
64990
}
64991
function destroyView(view) {
64992
    if (view.state & 128 /* Destroyed */) {
64993
        return;
64994
    }
64995
    execEmbeddedViewsAction(view, ViewAction.Destroy);
64996
    execComponentViewsAction(view, ViewAction.Destroy);
64997
    callLifecycleHooksChildrenFirst(view, 131072 /* OnDestroy */);
64998
    if (view.disposables) {
64999
        for (var i = 0; i < view.disposables.length; i++) {
65000
            view.disposables[i]();
65001
        }
65002
    }
65003
    detachProjectedView(view);
65004
    if (view.renderer.destroyNode) {
65005
        destroyViewNodes(view);
65006
    }
65007
    if (isComponentView(view)) {
65008
        view.renderer.destroy();
65009
    }
65010
    view.state |= 128 /* Destroyed */;
65011
}
65012
function destroyViewNodes(view) {
65013
    var len = view.def.nodes.length;
65014
    for (var i = 0; i < len; i++) {
65015
        var def = view.def.nodes[i];
65016
        if (def.flags & 1 /* TypeElement */) {
65017
            view.renderer.destroyNode(asElementData(view, i).renderElement);
65018
        }
65019
        else if (def.flags & 2 /* TypeText */) {
65020
            view.renderer.destroyNode(asTextData(view, i).renderText);
65021
        }
65022
        else if (def.flags & 67108864 /* TypeContentQuery */ || def.flags & 134217728 /* TypeViewQuery */) {
65023
            asQueryList(view, i).destroy();
65024
        }
65025
    }
65026
}
65027
var ViewAction;
65028
(function (ViewAction) {
65029
    ViewAction[ViewAction["CreateViewNodes"] = 0] = "CreateViewNodes";
65030
    ViewAction[ViewAction["CheckNoChanges"] = 1] = "CheckNoChanges";
65031
    ViewAction[ViewAction["CheckNoChangesProjectedViews"] = 2] = "CheckNoChangesProjectedViews";
65032
    ViewAction[ViewAction["CheckAndUpdate"] = 3] = "CheckAndUpdate";
65033
    ViewAction[ViewAction["CheckAndUpdateProjectedViews"] = 4] = "CheckAndUpdateProjectedViews";
65034
    ViewAction[ViewAction["Destroy"] = 5] = "Destroy";
65035
})(ViewAction || (ViewAction = {}));
65036
function execComponentViewsAction(view, action) {
65037
    var def = view.def;
65038
    if (!(def.nodeFlags & 33554432 /* ComponentView */)) {
65039
        return;
65040
    }
65041
    for (var i = 0; i < def.nodes.length; i++) {
65042
        var nodeDef = def.nodes[i];
65043
        if (nodeDef.flags & 33554432 /* ComponentView */) {
65044
            // a leaf
65045
            callViewAction(asElementData(view, i).componentView, action);
65046
        }
65047
        else if ((nodeDef.childFlags & 33554432 /* ComponentView */) === 0) {
65048
            // a parent with leafs
65049
            // no child is a component,
65050
            // then skip the children
65051
            i += nodeDef.childCount;
65052
        }
65053
    }
65054
}
65055
function execEmbeddedViewsAction(view, action) {
65056
    var def = view.def;
65057
    if (!(def.nodeFlags & 16777216 /* EmbeddedViews */)) {
65058
        return;
65059
    }
65060
    for (var i = 0; i < def.nodes.length; i++) {
65061
        var nodeDef = def.nodes[i];
65062
        if (nodeDef.flags & 16777216 /* EmbeddedViews */) {
65063
            // a leaf
65064
            var embeddedViews = asElementData(view, i).viewContainer._embeddedViews;
65065
            for (var k = 0; k < embeddedViews.length; k++) {
65066
                callViewAction(embeddedViews[k], action);
65067
            }
65068
        }
65069
        else if ((nodeDef.childFlags & 16777216 /* EmbeddedViews */) === 0) {
65070
            // a parent with leafs
65071
            // no child is a component,
65072
            // then skip the children
65073
            i += nodeDef.childCount;
65074
        }
65075
    }
65076
}
65077
function callViewAction(view, action) {
65078
    var viewState = view.state;
65079
    switch (action) {
65080
        case ViewAction.CheckNoChanges:
65081
            if ((viewState & 128 /* Destroyed */) === 0) {
65082
                if ((viewState & 12 /* CatDetectChanges */) === 12 /* CatDetectChanges */) {
65083
                    checkNoChangesView(view);
65084
                }
65085
                else if (viewState & 64 /* CheckProjectedViews */) {
65086
                    execProjectedViewsAction(view, ViewAction.CheckNoChangesProjectedViews);
65087
                }
65088
            }
65089
            break;
65090
        case ViewAction.CheckNoChangesProjectedViews:
65091
            if ((viewState & 128 /* Destroyed */) === 0) {
65092
                if (viewState & 32 /* CheckProjectedView */) {
65093
                    checkNoChangesView(view);
65094
                }
65095
                else if (viewState & 64 /* CheckProjectedViews */) {
65096
                    execProjectedViewsAction(view, action);
65097
                }
65098
            }
65099
            break;
65100
        case ViewAction.CheckAndUpdate:
65101
            if ((viewState & 128 /* Destroyed */) === 0) {
65102
                if ((viewState & 12 /* CatDetectChanges */) === 12 /* CatDetectChanges */) {
65103
                    checkAndUpdateView(view);
65104
                }
65105
                else if (viewState & 64 /* CheckProjectedViews */) {
65106
                    execProjectedViewsAction(view, ViewAction.CheckAndUpdateProjectedViews);
65107
                }
65108
            }
65109
            break;
65110
        case ViewAction.CheckAndUpdateProjectedViews:
65111
            if ((viewState & 128 /* Destroyed */) === 0) {
65112
                if (viewState & 32 /* CheckProjectedView */) {
65113
                    checkAndUpdateView(view);
65114
                }
65115
                else if (viewState & 64 /* CheckProjectedViews */) {
65116
                    execProjectedViewsAction(view, action);
65117
                }
65118
            }
65119
            break;
65120
        case ViewAction.Destroy:
65121
            // Note: destroyView recurses over all views,
65122
            // so we don't need to special case projected views here.
65123
            destroyView(view);
65124
            break;
65125
        case ViewAction.CreateViewNodes:
65126
            createViewNodes(view);
65127
            break;
65128
    }
65129
}
65130
function execProjectedViewsAction(view, action) {
65131
    execEmbeddedViewsAction(view, action);
65132
    execComponentViewsAction(view, action);
65133
}
65134
function execQueriesAction(view, queryFlags, staticDynamicQueryFlag, checkType) {
65135
    if (!(view.def.nodeFlags & queryFlags) || !(view.def.nodeFlags & staticDynamicQueryFlag)) {
65136
        return;
65137
    }
65138
    var nodeCount = view.def.nodes.length;
65139
    for (var i = 0; i < nodeCount; i++) {
65140
        var nodeDef = view.def.nodes[i];
65141
        if ((nodeDef.flags & queryFlags) && (nodeDef.flags & staticDynamicQueryFlag)) {
65142
            Services.setCurrentNode(view, nodeDef.nodeIndex);
65143
            switch (checkType) {
65144
                case 0 /* CheckAndUpdate */:
65145
                    checkAndUpdateQuery(view, nodeDef);
65146
                    break;
65147
                case 1 /* CheckNoChanges */:
65148
                    checkNoChangesQuery(view, nodeDef);
65149
                    break;
65150
            }
65151
        }
65152
        if (!(nodeDef.childFlags & queryFlags) || !(nodeDef.childFlags & staticDynamicQueryFlag)) {
65153
            // no child has a matching query
65154
            // then skip the children
65155
            i += nodeDef.childCount;
65156
        }
65157
    }
65158
}
65159
 
65160
/**
65161
 * @license
65162
 * Copyright Google Inc. All Rights Reserved.
65163
 *
65164
 * Use of this source code is governed by an MIT-style license that can be
65165
 * found in the LICENSE file at https://angular.io/license
65166
 */
65167
var initialized = false;
65168
function initServicesIfNeeded() {
65169
    if (initialized) {
65170
        return;
65171
    }
65172
    initialized = true;
65173
    var services = isDevMode() ? createDebugServices() : createProdServices();
65174
    Services.setCurrentNode = services.setCurrentNode;
65175
    Services.createRootView = services.createRootView;
65176
    Services.createEmbeddedView = services.createEmbeddedView;
65177
    Services.createComponentView = services.createComponentView;
65178
    Services.createNgModuleRef = services.createNgModuleRef;
65179
    Services.overrideProvider = services.overrideProvider;
65180
    Services.overrideComponentView = services.overrideComponentView;
65181
    Services.clearOverrides = services.clearOverrides;
65182
    Services.checkAndUpdateView = services.checkAndUpdateView;
65183
    Services.checkNoChangesView = services.checkNoChangesView;
65184
    Services.destroyView = services.destroyView;
65185
    Services.resolveDep = resolveDep;
65186
    Services.createDebugContext = services.createDebugContext;
65187
    Services.handleEvent = services.handleEvent;
65188
    Services.updateDirectives = services.updateDirectives;
65189
    Services.updateRenderer = services.updateRenderer;
65190
    Services.dirtyParentQueries = dirtyParentQueries;
65191
}
65192
function createProdServices() {
65193
    return {
65194
        setCurrentNode: function () { },
65195
        createRootView: createProdRootView,
65196
        createEmbeddedView: createEmbeddedView,
65197
        createComponentView: createComponentView,
65198
        createNgModuleRef: createNgModuleRef,
65199
        overrideProvider: NOOP,
65200
        overrideComponentView: NOOP,
65201
        clearOverrides: NOOP,
65202
        checkAndUpdateView: checkAndUpdateView,
65203
        checkNoChangesView: checkNoChangesView,
65204
        destroyView: destroyView,
65205
        createDebugContext: function (view, nodeIndex) { return new DebugContext_(view, nodeIndex); },
65206
        handleEvent: function (view, nodeIndex, eventName, event) {
65207
            return view.def.handleEvent(view, nodeIndex, eventName, event);
65208
        },
65209
        updateDirectives: function (view, checkType) {
65210
            return view.def.updateDirectives(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode :
65211
                prodCheckNoChangesNode, view);
65212
        },
65213
        updateRenderer: function (view, checkType) {
65214
            return view.def.updateRenderer(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode :
65215
                prodCheckNoChangesNode, view);
65216
        },
65217
    };
65218
}
65219
function createDebugServices() {
65220
    return {
65221
        setCurrentNode: debugSetCurrentNode,
65222
        createRootView: debugCreateRootView,
65223
        createEmbeddedView: debugCreateEmbeddedView,
65224
        createComponentView: debugCreateComponentView,
65225
        createNgModuleRef: debugCreateNgModuleRef,
65226
        overrideProvider: debugOverrideProvider,
65227
        overrideComponentView: debugOverrideComponentView,
65228
        clearOverrides: debugClearOverrides,
65229
        checkAndUpdateView: debugCheckAndUpdateView,
65230
        checkNoChangesView: debugCheckNoChangesView,
65231
        destroyView: debugDestroyView,
65232
        createDebugContext: function (view, nodeIndex) { return new DebugContext_(view, nodeIndex); },
65233
        handleEvent: debugHandleEvent,
65234
        updateDirectives: debugUpdateDirectives,
65235
        updateRenderer: debugUpdateRenderer,
65236
    };
65237
}
65238
function createProdRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) {
65239
    var rendererFactory = ngModule.injector.get(RendererFactory2);
65240
    return createRootView(createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode), def, context);
65241
}
65242
function debugCreateRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) {
65243
    var rendererFactory = ngModule.injector.get(RendererFactory2);
65244
    var root = createRootData(elInjector, ngModule, new DebugRendererFactory2(rendererFactory), projectableNodes, rootSelectorOrNode);
65245
    var defWithOverride = applyProviderOverridesToView(def);
65246
    return callWithDebugContext(DebugAction.create, createRootView, null, [root, defWithOverride, context]);
65247
}
65248
function createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode) {
65249
    var sanitizer = ngModule.injector.get(Sanitizer);
65250
    var errorHandler = ngModule.injector.get(ErrorHandler);
65251
    var renderer = rendererFactory.createRenderer(null, null);
65252
    return {
65253
        ngModule: ngModule,
65254
        injector: elInjector, projectableNodes: projectableNodes,
65255
        selectorOrNode: rootSelectorOrNode, sanitizer: sanitizer, rendererFactory: rendererFactory, renderer: renderer, errorHandler: errorHandler
65256
    };
65257
}
65258
function debugCreateEmbeddedView(parentView, anchorDef, viewDef$$1, context) {
65259
    var defWithOverride = applyProviderOverridesToView(viewDef$$1);
65260
    return callWithDebugContext(DebugAction.create, createEmbeddedView, null, [parentView, anchorDef, defWithOverride, context]);
65261
}
65262
function debugCreateComponentView(parentView, nodeDef, viewDef$$1, hostElement) {
65263
    var overrideComponentView = viewDefOverrides.get(nodeDef.element.componentProvider.provider.token);
65264
    if (overrideComponentView) {
65265
        viewDef$$1 = overrideComponentView;
65266
    }
65267
    else {
65268
        viewDef$$1 = applyProviderOverridesToView(viewDef$$1);
65269
    }
65270
    return callWithDebugContext(DebugAction.create, createComponentView, null, [parentView, nodeDef, viewDef$$1, hostElement]);
65271
}
65272
function debugCreateNgModuleRef(moduleType, parentInjector, bootstrapComponents, def) {
65273
    var defWithOverride = applyProviderOverridesToNgModule(def);
65274
    return createNgModuleRef(moduleType, parentInjector, bootstrapComponents, defWithOverride);
65275
}
65276
var providerOverrides = new Map();
65277
var providerOverridesWithScope = new Map();
65278
var viewDefOverrides = new Map();
65279
function debugOverrideProvider(override) {
65280
    providerOverrides.set(override.token, override);
65281
    if (typeof override.token === 'function' && override.token.ngInjectableDef &&
65282
        typeof override.token.ngInjectableDef.providedIn === 'function') {
65283
        providerOverridesWithScope.set(override.token, override);
65284
    }
65285
}
65286
function debugOverrideComponentView(comp, compFactory) {
65287
    var hostViewDef = resolveDefinition(getComponentViewDefinitionFactory(compFactory));
65288
    var compViewDef = resolveDefinition((hostViewDef.nodes[0].element.componentView));
65289
    viewDefOverrides.set(comp, compViewDef);
65290
}
65291
function debugClearOverrides() {
65292
    providerOverrides.clear();
65293
    providerOverridesWithScope.clear();
65294
    viewDefOverrides.clear();
65295
}
65296
// Notes about the algorithm:
65297
// 1) Locate the providers of an element and check if one of them was overwritten
65298
// 2) Change the providers of that element
65299
//
65300
// We only create new datastructures if we need to, to keep perf impact
65301
// reasonable.
65302
function applyProviderOverridesToView(def) {
65303
    if (providerOverrides.size === 0) {
65304
        return def;
65305
    }
65306
    var elementIndicesWithOverwrittenProviders = findElementIndicesWithOverwrittenProviders(def);
65307
    if (elementIndicesWithOverwrittenProviders.length === 0) {
65308
        return def;
65309
    }
65310
    // clone the whole view definition,
65311
    // as it maintains references between the nodes that are hard to update.
65312
    def = def.factory(function () { return NOOP; });
65313
    for (var i = 0; i < elementIndicesWithOverwrittenProviders.length; i++) {
65314
        applyProviderOverridesToElement(def, elementIndicesWithOverwrittenProviders[i]);
65315
    }
65316
    return def;
65317
    function findElementIndicesWithOverwrittenProviders(def) {
65318
        var elIndicesWithOverwrittenProviders = [];
65319
        var lastElementDef = null;
65320
        for (var i = 0; i < def.nodes.length; i++) {
65321
            var nodeDef = def.nodes[i];
65322
            if (nodeDef.flags & 1 /* TypeElement */) {
65323
                lastElementDef = nodeDef;
65324
            }
65325
            if (lastElementDef && nodeDef.flags & 3840 /* CatProviderNoDirective */ &&
65326
                providerOverrides.has(nodeDef.provider.token)) {
65327
                elIndicesWithOverwrittenProviders.push(lastElementDef.nodeIndex);
65328
                lastElementDef = null;
65329
            }
65330
        }
65331
        return elIndicesWithOverwrittenProviders;
65332
    }
65333
    function applyProviderOverridesToElement(viewDef$$1, elIndex) {
65334
        for (var i = elIndex + 1; i < viewDef$$1.nodes.length; i++) {
65335
            var nodeDef = viewDef$$1.nodes[i];
65336
            if (nodeDef.flags & 1 /* TypeElement */) {
65337
                // stop at the next element
65338
                return;
65339
            }
65340
            if (nodeDef.flags & 3840 /* CatProviderNoDirective */) {
65341
                var provider = (nodeDef.provider);
65342
                var override = providerOverrides.get(provider.token);
65343
                if (override) {
65344
                    nodeDef.flags = (nodeDef.flags & ~3840 /* CatProviderNoDirective */) | override.flags;
65345
                    provider.deps = splitDepsDsl(override.deps);
65346
                    provider.value = override.value;
65347
                }
65348
            }
65349
        }
65350
    }
65351
}
65352
// Notes about the algorithm:
65353
// We only create new datastructures if we need to, to keep perf impact
65354
// reasonable.
65355
function applyProviderOverridesToNgModule(def) {
65356
    var _a = calcHasOverrides(def), hasOverrides = _a.hasOverrides, hasDeprecatedOverrides = _a.hasDeprecatedOverrides;
65357
    if (!hasOverrides) {
65358
        return def;
65359
    }
65360
    // clone the whole view definition,
65361
    // as it maintains references between the nodes that are hard to update.
65362
    def = def.factory(function () { return NOOP; });
65363
    applyProviderOverrides(def);
65364
    return def;
65365
    function calcHasOverrides(def) {
65366
        var hasOverrides = false;
65367
        var hasDeprecatedOverrides = false;
65368
        if (providerOverrides.size === 0) {
65369
            return { hasOverrides: hasOverrides, hasDeprecatedOverrides: hasDeprecatedOverrides };
65370
        }
65371
        def.providers.forEach(function (node) {
65372
            var override = providerOverrides.get(node.token);
65373
            if ((node.flags & 3840 /* CatProviderNoDirective */) && override) {
65374
                hasOverrides = true;
65375
                hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;
65376
            }
65377
        });
65378
        def.modules.forEach(function (module) {
65379
            providerOverridesWithScope.forEach(function (override, token) {
65380
                if (token.ngInjectableDef.providedIn === module) {
65381
                    hasOverrides = true;
65382
                    hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;
65383
                }
65384
            });
65385
        });
65386
        return { hasOverrides: hasOverrides, hasDeprecatedOverrides: hasDeprecatedOverrides };
65387
    }
65388
    function applyProviderOverrides(def) {
65389
        for (var i = 0; i < def.providers.length; i++) {
65390
            var provider = def.providers[i];
65391
            if (hasDeprecatedOverrides) {
65392
                // We had a bug where me made
65393
                // all providers lazy. Keep this logic behind a flag
65394
                // for migrating existing users.
65395
                provider.flags |= 4096 /* LazyProvider */;
65396
            }
65397
            var override = providerOverrides.get(provider.token);
65398
            if (override) {
65399
                provider.flags = (provider.flags & ~3840 /* CatProviderNoDirective */) | override.flags;
65400
                provider.deps = splitDepsDsl(override.deps);
65401
                provider.value = override.value;
65402
            }
65403
        }
65404
        if (providerOverridesWithScope.size > 0) {
65405
            var moduleSet_1 = new Set(def.modules);
65406
            providerOverridesWithScope.forEach(function (override, token) {
65407
                if (moduleSet_1.has(token.ngInjectableDef.providedIn)) {
65408
                    var provider = {
65409
                        token: token,
65410
                        flags: override.flags | (hasDeprecatedOverrides ? 4096 /* LazyProvider */ : 0 /* None */),
65411
                        deps: splitDepsDsl(override.deps),
65412
                        value: override.value,
65413
                        index: def.providers.length,
65414
                    };
65415
                    def.providers.push(provider);
65416
                    def.providersByKey[tokenKey(token)] = provider;
65417
                }
65418
            });
65419
        }
65420
    }
65421
}
65422
function prodCheckAndUpdateNode(view, checkIndex, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
65423
    var nodeDef = view.def.nodes[checkIndex];
65424
    checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);
65425
    return (nodeDef.flags & 224 /* CatPureExpression */) ?
65426
        asPureExpressionData(view, checkIndex).value :
65427
        undefined;
65428
}
65429
function prodCheckNoChangesNode(view, checkIndex, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
65430
    var nodeDef = view.def.nodes[checkIndex];
65431
    checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);
65432
    return (nodeDef.flags & 224 /* CatPureExpression */) ?
65433
        asPureExpressionData(view, checkIndex).value :
65434
        undefined;
65435
}
65436
function debugCheckAndUpdateView(view) {
65437
    return callWithDebugContext(DebugAction.detectChanges, checkAndUpdateView, null, [view]);
65438
}
65439
function debugCheckNoChangesView(view) {
65440
    return callWithDebugContext(DebugAction.checkNoChanges, checkNoChangesView, null, [view]);
65441
}
65442
function debugDestroyView(view) {
65443
    return callWithDebugContext(DebugAction.destroy, destroyView, null, [view]);
65444
}
65445
var DebugAction;
65446
(function (DebugAction) {
65447
    DebugAction[DebugAction["create"] = 0] = "create";
65448
    DebugAction[DebugAction["detectChanges"] = 1] = "detectChanges";
65449
    DebugAction[DebugAction["checkNoChanges"] = 2] = "checkNoChanges";
65450
    DebugAction[DebugAction["destroy"] = 3] = "destroy";
65451
    DebugAction[DebugAction["handleEvent"] = 4] = "handleEvent";
65452
})(DebugAction || (DebugAction = {}));
65453
var _currentAction;
65454
var _currentView;
65455
var _currentNodeIndex;
65456
function debugSetCurrentNode(view, nodeIndex) {
65457
    _currentView = view;
65458
    _currentNodeIndex = nodeIndex;
65459
}
65460
function debugHandleEvent(view, nodeIndex, eventName, event) {
65461
    debugSetCurrentNode(view, nodeIndex);
65462
    return callWithDebugContext(DebugAction.handleEvent, view.def.handleEvent, null, [view, nodeIndex, eventName, event]);
65463
}
65464
function debugUpdateDirectives(view, checkType) {
65465
    if (view.state & 128 /* Destroyed */) {
65466
        throw viewDestroyedError(DebugAction[_currentAction]);
65467
    }
65468
    debugSetCurrentNode(view, nextDirectiveWithBinding(view, 0));
65469
    return view.def.updateDirectives(debugCheckDirectivesFn, view);
65470
    function debugCheckDirectivesFn(view, nodeIndex, argStyle) {
65471
        var values = [];
65472
        for (var _i = 3; _i < arguments.length; _i++) {
65473
            values[_i - 3] = arguments[_i];
65474
        }
65475
        var nodeDef = view.def.nodes[nodeIndex];
65476
        if (checkType === 0 /* CheckAndUpdate */) {
65477
            debugCheckAndUpdateNode(view, nodeDef, argStyle, values);
65478
        }
65479
        else {
65480
            debugCheckNoChangesNode(view, nodeDef, argStyle, values);
65481
        }
65482
        if (nodeDef.flags & 16384 /* TypeDirective */) {
65483
            debugSetCurrentNode(view, nextDirectiveWithBinding(view, nodeIndex));
65484
        }
65485
        return (nodeDef.flags & 224 /* CatPureExpression */) ?
65486
            asPureExpressionData(view, nodeDef.nodeIndex).value :
65487
            undefined;
65488
    }
65489
}
65490
function debugUpdateRenderer(view, checkType) {
65491
    if (view.state & 128 /* Destroyed */) {
65492
        throw viewDestroyedError(DebugAction[_currentAction]);
65493
    }
65494
    debugSetCurrentNode(view, nextRenderNodeWithBinding(view, 0));
65495
    return view.def.updateRenderer(debugCheckRenderNodeFn, view);
65496
    function debugCheckRenderNodeFn(view, nodeIndex, argStyle) {
65497
        var values = [];
65498
        for (var _i = 3; _i < arguments.length; _i++) {
65499
            values[_i - 3] = arguments[_i];
65500
        }
65501
        var nodeDef = view.def.nodes[nodeIndex];
65502
        if (checkType === 0 /* CheckAndUpdate */) {
65503
            debugCheckAndUpdateNode(view, nodeDef, argStyle, values);
65504
        }
65505
        else {
65506
            debugCheckNoChangesNode(view, nodeDef, argStyle, values);
65507
        }
65508
        if (nodeDef.flags & 3 /* CatRenderNode */) {
65509
            debugSetCurrentNode(view, nextRenderNodeWithBinding(view, nodeIndex));
65510
        }
65511
        return (nodeDef.flags & 224 /* CatPureExpression */) ?
65512
            asPureExpressionData(view, nodeDef.nodeIndex).value :
65513
            undefined;
65514
    }
65515
}
65516
function debugCheckAndUpdateNode(view, nodeDef, argStyle, givenValues) {
65517
    var changed = checkAndUpdateNode.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([view, nodeDef, argStyle], givenValues));
65518
    if (changed) {
65519
        var values = argStyle === 1 /* Dynamic */ ? givenValues[0] : givenValues;
65520
        if (nodeDef.flags & 16384 /* TypeDirective */) {
65521
            var bindingValues = {};
65522
            for (var i = 0; i < nodeDef.bindings.length; i++) {
65523
                var binding = nodeDef.bindings[i];
65524
                var value = values[i];
65525
                if (binding.flags & 8 /* TypeProperty */) {
65526
                    bindingValues[normalizeDebugBindingName((binding.nonMinifiedName))] =
65527
                        normalizeDebugBindingValue(value);
65528
                }
65529
            }
65530
            var elDef = (nodeDef.parent);
65531
            var el = asElementData(view, elDef.nodeIndex).renderElement;
65532
            if (!elDef.element.name) {
65533
                // a comment.
65534
                view.renderer.setValue(el, "bindings=" + JSON.stringify(bindingValues, null, 2));
65535
            }
65536
            else {
65537
                // a regular element.
65538
                for (var attr in bindingValues) {
65539
                    var value = bindingValues[attr];
65540
                    if (value != null) {
65541
                        view.renderer.setAttribute(el, attr, value);
65542
                    }
65543
                    else {
65544
                        view.renderer.removeAttribute(el, attr);
65545
                    }
65546
                }
65547
            }
65548
        }
65549
    }
65550
}
65551
function debugCheckNoChangesNode(view, nodeDef, argStyle, values) {
65552
    checkNoChangesNode.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([view, nodeDef, argStyle], values));
65553
}
65554
function normalizeDebugBindingName(name) {
65555
    // Attribute names with `$` (eg `x-y$`) are valid per spec, but unsupported by some browsers
65556
    name = camelCaseToDashCase(name.replace(/[$@]/g, '_'));
65557
    return "ng-reflect-" + name;
65558
}
65559
var CAMEL_CASE_REGEXP = /([A-Z])/g;
65560
function camelCaseToDashCase(input) {
65561
    return input.replace(CAMEL_CASE_REGEXP, function () {
65562
        var m = [];
65563
        for (var _i = 0; _i < arguments.length; _i++) {
65564
            m[_i] = arguments[_i];
65565
        }
65566
        return '-' + m[1].toLowerCase();
65567
    });
65568
}
65569
function normalizeDebugBindingValue(value) {
65570
    try {
65571
        // Limit the size of the value as otherwise the DOM just gets polluted.
65572
        return value != null ? value.toString().slice(0, 30) : value;
65573
    }
65574
    catch (e) {
65575
        return '[ERROR] Exception while trying to serialize the value';
65576
    }
65577
}
65578
function nextDirectiveWithBinding(view, nodeIndex) {
65579
    for (var i = nodeIndex; i < view.def.nodes.length; i++) {
65580
        var nodeDef = view.def.nodes[i];
65581
        if (nodeDef.flags & 16384 /* TypeDirective */ && nodeDef.bindings && nodeDef.bindings.length) {
65582
            return i;
65583
        }
65584
    }
65585
    return null;
65586
}
65587
function nextRenderNodeWithBinding(view, nodeIndex) {
65588
    for (var i = nodeIndex; i < view.def.nodes.length; i++) {
65589
        var nodeDef = view.def.nodes[i];
65590
        if ((nodeDef.flags & 3 /* CatRenderNode */) && nodeDef.bindings && nodeDef.bindings.length) {
65591
            return i;
65592
        }
65593
    }
65594
    return null;
65595
}
65596
var DebugContext_ = /** @class */ (function () {
65597
    function DebugContext_(view, nodeIndex) {
65598
        this.view = view;
65599
        this.nodeIndex = nodeIndex;
65600
        if (nodeIndex == null) {
65601
            this.nodeIndex = nodeIndex = 0;
65602
        }
65603
        this.nodeDef = view.def.nodes[nodeIndex];
65604
        var elDef = this.nodeDef;
65605
        var elView = view;
65606
        while (elDef && (elDef.flags & 1 /* TypeElement */) === 0) {
65607
            elDef = (elDef.parent);
65608
        }
65609
        if (!elDef) {
65610
            while (!elDef && elView) {
65611
                elDef = (viewParentEl(elView));
65612
                elView = (elView.parent);
65613
            }
65614
        }
65615
        this.elDef = elDef;
65616
        this.elView = elView;
65617
    }
65618
    Object.defineProperty(DebugContext_.prototype, "elOrCompView", {
65619
        get: function () {
65620
            // Has to be done lazily as we use the DebugContext also during creation of elements...
65621
            return asElementData(this.elView, this.elDef.nodeIndex).componentView || this.view;
65622
        },
65623
        enumerable: true,
65624
        configurable: true
65625
    });
65626
    Object.defineProperty(DebugContext_.prototype, "injector", {
65627
        get: function () { return createInjector$1(this.elView, this.elDef); },
65628
        enumerable: true,
65629
        configurable: true
65630
    });
65631
    Object.defineProperty(DebugContext_.prototype, "component", {
65632
        get: function () { return this.elOrCompView.component; },
65633
        enumerable: true,
65634
        configurable: true
65635
    });
65636
    Object.defineProperty(DebugContext_.prototype, "context", {
65637
        get: function () { return this.elOrCompView.context; },
65638
        enumerable: true,
65639
        configurable: true
65640
    });
65641
    Object.defineProperty(DebugContext_.prototype, "providerTokens", {
65642
        get: function () {
65643
            var tokens = [];
65644
            if (this.elDef) {
65645
                for (var i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) {
65646
                    var childDef = this.elView.def.nodes[i];
65647
                    if (childDef.flags & 20224 /* CatProvider */) {
65648
                        tokens.push(childDef.provider.token);
65649
                    }
65650
                    i += childDef.childCount;
65651
                }
65652
            }
65653
            return tokens;
65654
        },
65655
        enumerable: true,
65656
        configurable: true
65657
    });
65658
    Object.defineProperty(DebugContext_.prototype, "references", {
65659
        get: function () {
65660
            var references = {};
65661
            if (this.elDef) {
65662
                collectReferences(this.elView, this.elDef, references);
65663
                for (var i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) {
65664
                    var childDef = this.elView.def.nodes[i];
65665
                    if (childDef.flags & 20224 /* CatProvider */) {
65666
                        collectReferences(this.elView, childDef, references);
65667
                    }
65668
                    i += childDef.childCount;
65669
                }
65670
            }
65671
            return references;
65672
        },
65673
        enumerable: true,
65674
        configurable: true
65675
    });
65676
    Object.defineProperty(DebugContext_.prototype, "componentRenderElement", {
65677
        get: function () {
65678
            var elData = findHostElement(this.elOrCompView);
65679
            return elData ? elData.renderElement : undefined;
65680
        },
65681
        enumerable: true,
65682
        configurable: true
65683
    });
65684
    Object.defineProperty(DebugContext_.prototype, "renderNode", {
65685
        get: function () {
65686
            return this.nodeDef.flags & 2 /* TypeText */ ? renderNode(this.view, this.nodeDef) :
65687
                renderNode(this.elView, this.elDef);
65688
        },
65689
        enumerable: true,
65690
        configurable: true
65691
    });
65692
    DebugContext_.prototype.logError = function (console) {
65693
        var values = [];
65694
        for (var _i = 1; _i < arguments.length; _i++) {
65695
            values[_i - 1] = arguments[_i];
65696
        }
65697
        var logViewDef;
65698
        var logNodeIndex;
65699
        if (this.nodeDef.flags & 2 /* TypeText */) {
65700
            logViewDef = this.view.def;
65701
            logNodeIndex = this.nodeDef.nodeIndex;
65702
        }
65703
        else {
65704
            logViewDef = this.elView.def;
65705
            logNodeIndex = this.elDef.nodeIndex;
65706
        }
65707
        // Note: we only generate a log function for text and element nodes
65708
        // to make the generated code as small as possible.
65709
        var renderNodeIndex = getRenderNodeIndex(logViewDef, logNodeIndex);
65710
        var currRenderNodeIndex = -1;
65711
        var nodeLogger = function () {
65712
            currRenderNodeIndex++;
65713
            if (currRenderNodeIndex === renderNodeIndex) {
65714
                return (_a = console.error).bind.apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])([console], values));
65715
            }
65716
            else {
65717
                return NOOP;
65718
            }
65719
            var _a;
65720
        };
65721
        logViewDef.factory(nodeLogger);
65722
        if (currRenderNodeIndex < renderNodeIndex) {
65723
            console.error('Illegal state: the ViewDefinitionFactory did not call the logger!');
65724
            console.error.apply(console, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(values));
65725
        }
65726
    };
65727
    return DebugContext_;
65728
}());
65729
function getRenderNodeIndex(viewDef$$1, nodeIndex) {
65730
    var renderNodeIndex = -1;
65731
    for (var i = 0; i <= nodeIndex; i++) {
65732
        var nodeDef = viewDef$$1.nodes[i];
65733
        if (nodeDef.flags & 3 /* CatRenderNode */) {
65734
            renderNodeIndex++;
65735
        }
65736
    }
65737
    return renderNodeIndex;
65738
}
65739
function findHostElement(view) {
65740
    while (view && !isComponentView(view)) {
65741
        view = (view.parent);
65742
    }
65743
    if (view.parent) {
65744
        return asElementData(view.parent, viewParentEl(view).nodeIndex);
65745
    }
65746
    return null;
65747
}
65748
function collectReferences(view, nodeDef, references) {
65749
    for (var refName in nodeDef.references) {
65750
        references[refName] = getQueryValue(view, nodeDef, nodeDef.references[refName]);
65751
    }
65752
}
65753
function callWithDebugContext(action, fn, self, args) {
65754
    var oldAction = _currentAction;
65755
    var oldView = _currentView;
65756
    var oldNodeIndex = _currentNodeIndex;
65757
    try {
65758
        _currentAction = action;
65759
        var result = fn.apply(self, args);
65760
        _currentView = oldView;
65761
        _currentNodeIndex = oldNodeIndex;
65762
        _currentAction = oldAction;
65763
        return result;
65764
    }
65765
    catch (e) {
65766
        if (isViewDebugError(e) || !_currentView) {
65767
            throw e;
65768
        }
65769
        throw viewWrappedDebugError(e, (getCurrentDebugContext()));
65770
    }
65771
}
65772
function getCurrentDebugContext() {
65773
    return _currentView ? new DebugContext_(_currentView, _currentNodeIndex) : null;
65774
}
65775
var DebugRendererFactory2 = /** @class */ (function () {
65776
    function DebugRendererFactory2(delegate) {
65777
        this.delegate = delegate;
65778
    }
65779
    DebugRendererFactory2.prototype.createRenderer = function (element, renderData) {
65780
        return new DebugRenderer2(this.delegate.createRenderer(element, renderData));
65781
    };
65782
    DebugRendererFactory2.prototype.begin = function () {
65783
        if (this.delegate.begin) {
65784
            this.delegate.begin();
65785
        }
65786
    };
65787
    DebugRendererFactory2.prototype.end = function () {
65788
        if (this.delegate.end) {
65789
            this.delegate.end();
65790
        }
65791
    };
65792
    DebugRendererFactory2.prototype.whenRenderingDone = function () {
65793
        if (this.delegate.whenRenderingDone) {
65794
            return this.delegate.whenRenderingDone();
65795
        }
65796
        return Promise.resolve(null);
65797
    };
65798
    return DebugRendererFactory2;
65799
}());
65800
var DebugRenderer2 = /** @class */ (function () {
65801
    function DebugRenderer2(delegate) {
65802
        this.delegate = delegate;
65803
        this.data = this.delegate.data;
65804
    }
65805
    DebugRenderer2.prototype.destroyNode = function (node) {
65806
        removeDebugNodeFromIndex((getDebugNode(node)));
65807
        if (this.delegate.destroyNode) {
65808
            this.delegate.destroyNode(node);
65809
        }
65810
    };
65811
    DebugRenderer2.prototype.destroy = function () { this.delegate.destroy(); };
65812
    DebugRenderer2.prototype.createElement = function (name, namespace) {
65813
        var el = this.delegate.createElement(name, namespace);
65814
        var debugCtx = getCurrentDebugContext();
65815
        if (debugCtx) {
65816
            var debugEl = new DebugElement(el, null, debugCtx);
65817
            debugEl.name = name;
65818
            indexDebugNode(debugEl);
65819
        }
65820
        return el;
65821
    };
65822
    DebugRenderer2.prototype.createComment = function (value) {
65823
        var comment = this.delegate.createComment(value);
65824
        var debugCtx = getCurrentDebugContext();
65825
        if (debugCtx) {
65826
            indexDebugNode(new DebugNode(comment, null, debugCtx));
65827
        }
65828
        return comment;
65829
    };
65830
    DebugRenderer2.prototype.createText = function (value) {
65831
        var text = this.delegate.createText(value);
65832
        var debugCtx = getCurrentDebugContext();
65833
        if (debugCtx) {
65834
            indexDebugNode(new DebugNode(text, null, debugCtx));
65835
        }
65836
        return text;
65837
    };
65838
    DebugRenderer2.prototype.appendChild = function (parent, newChild) {
65839
        var debugEl = getDebugNode(parent);
65840
        var debugChildEl = getDebugNode(newChild);
65841
        if (debugEl && debugChildEl && debugEl instanceof DebugElement) {
65842
            debugEl.addChild(debugChildEl);
65843
        }
65844
        this.delegate.appendChild(parent, newChild);
65845
    };
65846
    DebugRenderer2.prototype.insertBefore = function (parent, newChild, refChild) {
65847
        var debugEl = getDebugNode(parent);
65848
        var debugChildEl = getDebugNode(newChild);
65849
        var debugRefEl = (getDebugNode(refChild));
65850
        if (debugEl && debugChildEl && debugEl instanceof DebugElement) {
65851
            debugEl.insertBefore(debugRefEl, debugChildEl);
65852
        }
65853
        this.delegate.insertBefore(parent, newChild, refChild);
65854
    };
65855
    DebugRenderer2.prototype.removeChild = function (parent, oldChild) {
65856
        var debugEl = getDebugNode(parent);
65857
        var debugChildEl = getDebugNode(oldChild);
65858
        if (debugEl && debugChildEl && debugEl instanceof DebugElement) {
65859
            debugEl.removeChild(debugChildEl);
65860
        }
65861
        this.delegate.removeChild(parent, oldChild);
65862
    };
65863
    DebugRenderer2.prototype.selectRootElement = function (selectorOrNode) {
65864
        var el = this.delegate.selectRootElement(selectorOrNode);
65865
        var debugCtx = getCurrentDebugContext();
65866
        if (debugCtx) {
65867
            indexDebugNode(new DebugElement(el, null, debugCtx));
65868
        }
65869
        return el;
65870
    };
65871
    DebugRenderer2.prototype.setAttribute = function (el, name, value, namespace) {
65872
        var debugEl = getDebugNode(el);
65873
        if (debugEl && debugEl instanceof DebugElement) {
65874
            var fullName = namespace ? namespace + ':' + name : name;
65875
            debugEl.attributes[fullName] = value;
65876
        }
65877
        this.delegate.setAttribute(el, name, value, namespace);
65878
    };
65879
    DebugRenderer2.prototype.removeAttribute = function (el, name, namespace) {
65880
        var debugEl = getDebugNode(el);
65881
        if (debugEl && debugEl instanceof DebugElement) {
65882
            var fullName = namespace ? namespace + ':' + name : name;
65883
            debugEl.attributes[fullName] = null;
65884
        }
65885
        this.delegate.removeAttribute(el, name, namespace);
65886
    };
65887
    DebugRenderer2.prototype.addClass = function (el, name) {
65888
        var debugEl = getDebugNode(el);
65889
        if (debugEl && debugEl instanceof DebugElement) {
65890
            debugEl.classes[name] = true;
65891
        }
65892
        this.delegate.addClass(el, name);
65893
    };
65894
    DebugRenderer2.prototype.removeClass = function (el, name) {
65895
        var debugEl = getDebugNode(el);
65896
        if (debugEl && debugEl instanceof DebugElement) {
65897
            debugEl.classes[name] = false;
65898
        }
65899
        this.delegate.removeClass(el, name);
65900
    };
65901
    DebugRenderer2.prototype.setStyle = function (el, style, value, flags) {
65902
        var debugEl = getDebugNode(el);
65903
        if (debugEl && debugEl instanceof DebugElement) {
65904
            debugEl.styles[style] = value;
65905
        }
65906
        this.delegate.setStyle(el, style, value, flags);
65907
    };
65908
    DebugRenderer2.prototype.removeStyle = function (el, style, flags) {
65909
        var debugEl = getDebugNode(el);
65910
        if (debugEl && debugEl instanceof DebugElement) {
65911
            debugEl.styles[style] = null;
65912
        }
65913
        this.delegate.removeStyle(el, style, flags);
65914
    };
65915
    DebugRenderer2.prototype.setProperty = function (el, name, value) {
65916
        var debugEl = getDebugNode(el);
65917
        if (debugEl && debugEl instanceof DebugElement) {
65918
            debugEl.properties[name] = value;
65919
        }
65920
        this.delegate.setProperty(el, name, value);
65921
    };
65922
    DebugRenderer2.prototype.listen = function (target, eventName, callback) {
65923
        if (typeof target !== 'string') {
65924
            var debugEl = getDebugNode(target);
65925
            if (debugEl) {
65926
                debugEl.listeners.push(new EventListener(eventName, callback));
65927
            }
65928
        }
65929
        return this.delegate.listen(target, eventName, callback);
65930
    };
65931
    DebugRenderer2.prototype.parentNode = function (node) { return this.delegate.parentNode(node); };
65932
    DebugRenderer2.prototype.nextSibling = function (node) { return this.delegate.nextSibling(node); };
65933
    DebugRenderer2.prototype.setValue = function (node, value) { return this.delegate.setValue(node, value); };
65934
    return DebugRenderer2;
65935
}());
65936
 
65937
/**
65938
 * @license
65939
 * Copyright Google Inc. All Rights Reserved.
65940
 *
65941
 * Use of this source code is governed by an MIT-style license that can be
65942
 * found in the LICENSE file at https://angular.io/license
65943
 */
65944
function overrideProvider(override) {
65945
    initServicesIfNeeded();
65946
    return Services.overrideProvider(override);
65947
}
65948
function overrideComponentView(comp, componentFactory) {
65949
    initServicesIfNeeded();
65950
    return Services.overrideComponentView(comp, componentFactory);
65951
}
65952
function clearOverrides() {
65953
    initServicesIfNeeded();
65954
    return Services.clearOverrides();
65955
}
65956
// Attention: this function is called as top level function.
65957
// Putting any logic in here will destroy closure tree shaking!
65958
function createNgModuleFactory(ngModuleType, bootstrapComponents, defFactory) {
65959
    return new NgModuleFactory_(ngModuleType, bootstrapComponents, defFactory);
65960
}
65961
var NgModuleFactory_ = /** @class */ (function (_super) {
65962
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(NgModuleFactory_, _super);
65963
    function NgModuleFactory_(moduleType, _bootstrapComponents, _ngModuleDefFactory) {
65964
        var _this =
65965
        // Attention: this ctor is called as top level function.
65966
        // Putting any logic in here will destroy closure tree shaking!
65967
        _super.call(this) || this;
65968
        _this.moduleType = moduleType;
65969
        _this._bootstrapComponents = _bootstrapComponents;
65970
        _this._ngModuleDefFactory = _ngModuleDefFactory;
65971
        return _this;
65972
    }
65973
    NgModuleFactory_.prototype.create = function (parentInjector) {
65974
        initServicesIfNeeded();
65975
        var def = resolveDefinition(this._ngModuleDefFactory);
65976
        return Services.createNgModuleRef(this.moduleType, parentInjector || Injector.NULL, this._bootstrapComponents, def);
65977
    };
65978
    return NgModuleFactory_;
65979
}(NgModuleFactory));
65980
 
65981
/**
65982
 * @license
65983
 * Copyright Google Inc. All Rights Reserved.
65984
 *
65985
 * Use of this source code is governed by an MIT-style license that can be
65986
 * found in the LICENSE file at https://angular.io/license
65987
 */
65988
 
65989
/**
65990
 * @license
65991
 * Copyright Google Inc. All Rights Reserved.
65992
 *
65993
 * Use of this source code is governed by an MIT-style license that can be
65994
 * found in the LICENSE file at https://angular.io/license
65995
 */
65996
 
65997
/**
65998
 * @license
65999
 * Copyright Google Inc. All Rights Reserved.
66000
 *
66001
 * Use of this source code is governed by an MIT-style license that can be
66002
 * found in the LICENSE file at https://angular.io/license
66003
 */
66004
// The functions in this file verify that the assumptions we are making
66005
// about state in an instruction are correct before implementing any logic.
66006
// They are meant only to be called in dev mode as sanity checks.
66007
 
66008
function assertEqual(actual, expected, msg) {
66009
    if (actual != expected) {
66010
        throwError(msg);
66011
    }
66012
}
66013
function assertNotEqual(actual, expected, msg) {
66014
    if (actual == expected) {
66015
        throwError(msg);
66016
    }
66017
}
66018
function assertSame(actual, expected, msg) {
66019
    if (actual !== expected) {
66020
        throwError(msg);
66021
    }
66022
}
66023
function assertLessThan(actual, expected, msg) {
66024
    if (actual >= expected) {
66025
        throwError(msg);
66026
    }
66027
}
66028
function assertGreaterThan(actual, expected, msg) {
66029
    if (actual <= expected) {
66030
        throwError(msg);
66031
    }
66032
}
66033
function assertNull(actual, msg) {
66034
    if (actual != null) {
66035
        throwError(msg);
66036
    }
66037
}
66038
function assertNotNull(actual, msg) {
66039
    if (actual == null) {
66040
        throwError(msg);
66041
    }
66042
}
66043
function assertComponentType(actual, msg) {
66044
    if (msg === void 0) { msg = 'Type passed in is not ComponentType, it does not have \'ngComponentDef\' property.'; }
66045
    if (!actual.ngComponentDef) {
66046
        throwError(msg);
66047
    }
66048
}
66049
function throwError(msg) {
66050
    debugger; // Left intentionally for better debugger experience.
66051
    throw new Error("ASSERTION ERROR: " + msg);
66052
}
66053
 
66054
/**
66055
 * @license
66056
 * Copyright Google Inc. All Rights Reserved.
66057
 *
66058
 * Use of this source code is governed by an MIT-style license that can be
66059
 * found in the LICENSE file at https://angular.io/license
66060
 */
66061
/**
66062
 * If this is the first template pass, any ngOnInit or ngDoCheck hooks will be queued into
66063
 * TView.initHooks during directiveCreate.
66064
 *
66065
 * The directive index and hook type are encoded into one number (1st bit: type, remaining bits:
66066
 * directive index), then saved in the even indices of the initHooks array. The odd indices
66067
 * hold the hook functions themselves.
66068
 *
66069
 * @param index The index of the directive in LView.data
66070
 * @param hooks The static hooks map on the directive def
66071
 * @param tView The current TView
66072
 */
66073
function queueInitHooks(index, onInit, doCheck, tView) {
66074
    ngDevMode &&
66075
        assertEqual(tView.firstTemplatePass, true, 'Should only be called on first template pass');
66076
    if (onInit) {
66077
        (tView.initHooks || (tView.initHooks = [])).push(index, onInit);
66078
    }
66079
    if (doCheck) {
66080
        (tView.initHooks || (tView.initHooks = [])).push(index, doCheck);
66081
        (tView.checkHooks || (tView.checkHooks = [])).push(index, doCheck);
66082
    }
66083
}
66084
/**
66085
 * Loops through the directives on a node and queues all their hooks except ngOnInit
66086
 * and ngDoCheck, which are queued separately in directiveCreate.
66087
 */
66088
function queueLifecycleHooks(flags, currentView) {
66089
    var tView = currentView.tView;
66090
    if (tView.firstTemplatePass === true) {
66091
        var start = flags >> 13;
66092
        var count = flags & 4095;
66093
        var end = start + count;
66094
        // It's necessary to loop through the directives at elementEnd() (rather than processing in
66095
        // directiveCreate) so we can preserve the current hook order. Content, view, and destroy
66096
        // hooks for projected components and directives must be called *before* their hosts.
66097
        for (var i = start; i < end; i++) {
66098
            var def = tView.directives[i];
66099
            queueContentHooks(def, tView, i);
66100
            queueViewHooks(def, tView, i);
66101
            queueDestroyHooks(def, tView, i);
66102
        }
66103
    }
66104
}
66105
/** Queues afterContentInit and afterContentChecked hooks on TView */
66106
function queueContentHooks(def, tView, i) {
66107
    if (def.afterContentInit) {
66108
        (tView.contentHooks || (tView.contentHooks = [])).push(i, def.afterContentInit);
66109
    }
66110
    if (def.afterContentChecked) {
66111
        (tView.contentHooks || (tView.contentHooks = [])).push(i, def.afterContentChecked);
66112
        (tView.contentCheckHooks || (tView.contentCheckHooks = [])).push(i, def.afterContentChecked);
66113
    }
66114
}
66115
/** Queues afterViewInit and afterViewChecked hooks on TView */
66116
function queueViewHooks(def, tView, i) {
66117
    if (def.afterViewInit) {
66118
        (tView.viewHooks || (tView.viewHooks = [])).push(i, def.afterViewInit);
66119
    }
66120
    if (def.afterViewChecked) {
66121
        (tView.viewHooks || (tView.viewHooks = [])).push(i, def.afterViewChecked);
66122
        (tView.viewCheckHooks || (tView.viewCheckHooks = [])).push(i, def.afterViewChecked);
66123
    }
66124
}
66125
/** Queues onDestroy hooks on TView */
66126
function queueDestroyHooks(def, tView, i) {
66127
    if (def.onDestroy != null) {
66128
        (tView.destroyHooks || (tView.destroyHooks = [])).push(i, def.onDestroy);
66129
    }
66130
}
66131
/**
66132
 * Calls onInit and doCheck calls if they haven't already been called.
66133
 *
66134
 * @param currentView The current view
66135
 */
66136
function executeInitHooks(currentView, tView, creationMode) {
66137
    if (currentView.lifecycleStage === 1 /* Init */) {
66138
        executeHooks((currentView.directives), tView.initHooks, tView.checkHooks, creationMode);
66139
        currentView.lifecycleStage = 2 /* AfterInit */;
66140
    }
66141
}
66142
/**
66143
 * Iterates over afterViewInit and afterViewChecked functions and calls them.
66144
 *
66145
 * @param currentView The current view
66146
 */
66147
function executeHooks(data, allHooks, checkHooks, creationMode) {
66148
    var hooksToCall = creationMode ? allHooks : checkHooks;
66149
    if (hooksToCall) {
66150
        callHooks(data, hooksToCall);
66151
    }
66152
}
66153
/**
66154
 * Calls lifecycle hooks with their contexts, skipping init hooks if it's not
66155
 * creation mode.
66156
 *
66157
 * @param currentView The current view
66158
 * @param arr The array in which the hooks are found
66159
 */
66160
function callHooks(data, arr) {
66161
    for (var i = 0; i < arr.length; i += 2) {
66162
        arr[i + 1].call(data[arr[i]]);
66163
    }
66164
}
66165
 
66166
/**
66167
 * @license
66168
 * Copyright Google Inc. All Rights Reserved.
66169
 *
66170
 * Use of this source code is governed by an MIT-style license that can be
66171
 * found in the LICENSE file at https://angular.io/license
66172
 */
66173
if (typeof ngDevMode == 'undefined') {
66174
    if (typeof window != 'undefined')
66175
        window.ngDevMode = true;
66176
    if (typeof self != 'undefined')
66177
        self.ngDevMode = true;
66178
    if (typeof global != 'undefined')
66179
        global.ngDevMode = true;
66180
}
66181
 
66182
/**
66183
 * @license
66184
 * Copyright Google Inc. All Rights Reserved.
66185
 *
66186
 * Use of this source code is governed by an MIT-style license that can be
66187
 * found in the LICENSE file at https://angular.io/license
66188
 */
66189
var NG_PROJECT_AS_ATTR_NAME = 'ngProjectAs';
66190
// Note: This hack is necessary so we don't erroneously get a circular dependency
66191
// failure based on types.
66192
 
66193
/**
66194
 * @license
66195
 * Copyright Google Inc. All Rights Reserved.
66196
 *
66197
 * Use of this source code is governed by an MIT-style license that can be
66198
 * found in the LICENSE file at https://angular.io/license
66199
 */
66200
function assertNodeType(node, type) {
66201
    assertNotNull(node, 'should be called with a node');
66202
    assertEqual(node.type, type, "should be a " + typeName(type));
66203
}
66204
function assertNodeOfPossibleTypes(node) {
66205
    var types = [];
66206
    for (var _i = 1; _i < arguments.length; _i++) {
66207
        types[_i - 1] = arguments[_i];
66208
    }
66209
    assertNotNull(node, 'should be called with a node');
66210
    var found = types.some(function (type) { return node.type === type; });
66211
    assertEqual(found, true, "Should be one of " + types.map(typeName).join(', '));
66212
}
66213
function typeName(type) {
66214
    if (type == 1 /* Projection */)
66215
        return 'Projection';
66216
    if (type == 0 /* Container */)
66217
        return 'Container';
66218
    if (type == 2 /* View */)
66219
        return 'View';
66220
    if (type == 3 /* Element */)
66221
        return 'Element';
66222
    return '<unknown>';
66223
}
66224
 
66225
/**
66226
 * @license
66227
 * Copyright Google Inc. All Rights Reserved.
66228
 *
66229
 * Use of this source code is governed by an MIT-style license that can be
66230
 * found in the LICENSE file at https://angular.io/license
66231
 */
66232
// Note: This hack is necessary so we don't erroneously get a circular dependency
66233
// failure based on types.
66234
 
66235
/**
66236
 * @license
66237
 * Copyright Google Inc. All Rights Reserved.
66238
 *
66239
 * Use of this source code is governed by an MIT-style license that can be
66240
 * found in the LICENSE file at https://angular.io/license
66241
 */
66242
// Note: This hack is necessary so we don't erroneously get a circular dependency
66243
// failure based on types.
66244
 
66245
/**
66246
 * @license
66247
 * Copyright Google Inc. All Rights Reserved.
66248
 *
66249
 * Use of this source code is governed by an MIT-style license that can be
66250
 * found in the LICENSE file at https://angular.io/license
66251
 */
66252
// TODO: cleanup once the code is merged in angular/angular
66253
// TODO: cleanup once the code is merged in angular/angular
66254
var RendererStyleFlags3;
66255
// TODO: cleanup once the code is merged in angular/angular
66256
(function (RendererStyleFlags3) {
66257
    RendererStyleFlags3[RendererStyleFlags3["Important"] = 1] = "Important";
66258
    RendererStyleFlags3[RendererStyleFlags3["DashCase"] = 2] = "DashCase";
66259
})(RendererStyleFlags3 || (RendererStyleFlags3 = {}));
66260
/** Returns whether the `renderer` is a `ProceduralRenderer3` */
66261
function isProceduralRenderer(renderer) {
66262
    return !!(renderer.listen);
66263
}
66264
var domRendererFactory3 = {
66265
    createRenderer: function (hostElement, rendererType) { return document; }
66266
};
66267
// Note: This hack is necessary so we don't erroneously get a circular dependency
66268
// failure based on types.
66269
 
66270
/**
66271
 * @license
66272
 * Copyright Google Inc. All Rights Reserved.
66273
 *
66274
 * Use of this source code is governed by an MIT-style license that can be
66275
 * found in the LICENSE file at https://angular.io/license
66276
 */
66277
// Note: This hack is necessary so we don't erroneously get a circular dependency
66278
// failure based on types.
66279
 
66280
/**
66281
 * @license
66282
 * Copyright Google Inc. All Rights Reserved.
66283
 *
66284
 * Use of this source code is governed by an MIT-style license that can be
66285
 * found in the LICENSE file at https://angular.io/license
66286
 */
66287
/**
66288
* Must use this method for CD (instead of === ) since NaN !== NaN
66289
*/
66290
function isDifferent(a, b) {
66291
    // NaN is the only value that is not equal to itself so the first
66292
    // test checks if both a and b are not NaN
66293
    return !(a !== a && b !== b) && a !== b;
66294
}
66295
function stringify$1(value) {
66296
    if (typeof value == 'function')
66297
        return value.name || value;
66298
    if (typeof value == 'string')
66299
        return value;
66300
    if (value == null)
66301
        return '';
66302
    return '' + value;
66303
}
66304
/**
66305
 *  Function that throws a "not implemented" error so it's clear certain
66306
 *  behaviors/methods aren't yet ready.
66307
 *
66308
 * @returns Not implemented error
66309
 */
66310
function notImplemented() {
66311
    return new Error('NotImplemented');
66312
}
66313
/**
66314
 * Flattens an array in non-recursive way. Input arrays are not modified.
66315
 */
66316
function flatten$1(list) {
66317
    var result = [];
66318
    var i = 0;
66319
    while (i < list.length) {
66320
        var item = list[i];
66321
        if (Array.isArray(item)) {
66322
            if (item.length > 0) {
66323
                list = item.concat(list.slice(i + 1));
66324
                i = 0;
66325
            }
66326
            else {
66327
                i++;
66328
            }
66329
        }
66330
        else {
66331
            result.push(item);
66332
            i++;
66333
        }
66334
    }
66335
    return result;
66336
}
66337
 
66338
/**
66339
 * @license
66340
 * Copyright Google Inc. All Rights Reserved.
66341
 *
66342
 * Use of this source code is governed by an MIT-style license that can be
66343
 * found in the LICENSE file at https://angular.io/license
66344
 */
66345
/**
66346
 * Returns the first RNode following the given LNode in the same parent DOM element.
66347
 *
66348
 * This is needed in order to insert the given node with insertBefore.
66349
 *
66350
 * @param node The node whose following DOM node must be found.
66351
 * @param stopNode A parent node at which the lookup in the tree should be stopped, or null if the
66352
 * lookup should not be stopped until the result is found.
66353
 * @returns RNode before which the provided node should be inserted or null if the lookup was
66354
 * stopped
66355
 * or if there is no native node after the given logical node in the same native parent.
66356
 */
66357
function findNextRNodeSibling(node, stopNode) {
66358
    var currentNode = node;
66359
    while (currentNode && currentNode !== stopNode) {
66360
        var pNextOrParent = currentNode.pNextOrParent;
66361
        if (pNextOrParent) {
66362
            while (pNextOrParent.type !== 1 /* Projection */) {
66363
                var nativeNode = findFirstRNode(pNextOrParent);
66364
                if (nativeNode) {
66365
                    return nativeNode;
66366
                }
66367
                pNextOrParent = (pNextOrParent.pNextOrParent);
66368
            }
66369
            currentNode = pNextOrParent;
66370
        }
66371
        else {
66372
            var currentSibling = currentNode.next;
66373
            while (currentSibling) {
66374
                var nativeNode = findFirstRNode(currentSibling);
66375
                if (nativeNode) {
66376
                    return nativeNode;
66377
                }
66378
                currentSibling = currentSibling.next;
66379
            }
66380
            var parentNode = currentNode.parent;
66381
            currentNode = null;
66382
            if (parentNode) {
66383
                var parentType = parentNode.type;
66384
                if (parentType === 0 /* Container */ || parentType === 2 /* View */) {
66385
                    currentNode = parentNode;
66386
                }
66387
            }
66388
        }
66389
    }
66390
    return null;
66391
}
66392
/**
66393
 * Get the next node in the LNode tree, taking into account the place where a node is
66394
 * projected (in the shadow DOM) rather than where it comes from (in the light DOM).
66395
 *
66396
 * @param node The node whose next node in the LNode tree must be found.
66397
 * @return LNode|null The next sibling in the LNode tree.
66398
 */
66399
function getNextLNodeWithProjection(node) {
66400
    var pNextOrParent = node.pNextOrParent;
66401
    if (pNextOrParent) {
66402
        // The node is projected
66403
        var isLastProjectedNode = pNextOrParent.type === 1;
66404
        // returns pNextOrParent if we are not at the end of the list, null otherwise
66405
        return isLastProjectedNode ? null : pNextOrParent;
66406
    }
66407
    // returns node.next because the the node is not projected
66408
    return node.next;
66409
}
66410
/**
66411
 * Find the next node in the LNode tree, taking into account the place where a node is
66412
 * projected (in the shadow DOM) rather than where it comes from (in the light DOM).
66413
 *
66414
 * If there is no sibling node, this function goes to the next sibling of the parent node...
66415
 * until it reaches rootNode (at which point null is returned).
66416
 *
66417
 * @param initialNode The node whose following node in the LNode tree must be found.
66418
 * @param rootNode The root node at which the lookup should stop.
66419
 * @return LNode|null The following node in the LNode tree.
66420
 */
66421
function getNextOrParentSiblingNode(initialNode, rootNode) {
66422
    var node = initialNode;
66423
    var nextNode = getNextLNodeWithProjection(node);
66424
    while (node && !nextNode) {
66425
        // if node.pNextOrParent is not null here, it is not the next node
66426
        // (because, at this point, nextNode is null, so it is the parent)
66427
        node = node.pNextOrParent || node.parent;
66428
        if (node === rootNode) {
66429
            return null;
66430
        }
66431
        nextNode = node && getNextLNodeWithProjection(node);
66432
    }
66433
    return nextNode;
66434
}
66435
/**
66436
 * Returns the first RNode inside the given LNode.
66437
 *
66438
 * @param node The node whose first DOM node must be found
66439
 * @returns RNode The first RNode of the given LNode or null if there is none.
66440
 */
66441
function findFirstRNode(rootNode) {
66442
    var node = rootNode;
66443
    while (node) {
66444
        var nextNode = null;
66445
        if (node.type === 3 /* Element */) {
66446
            // A LElementNode has a matching RNode in LElementNode.native
66447
            return node.native;
66448
        }
66449
        else if (node.type === 0 /* Container */) {
66450
            var lContainerNode = node;
66451
            var childContainerData = lContainerNode.dynamicLContainerNode ?
66452
                lContainerNode.dynamicLContainerNode.data :
66453
                lContainerNode.data;
66454
            nextNode = childContainerData.views.length ? childContainerData.views[0].child : null;
66455
        }
66456
        else if (node.type === 1 /* Projection */) {
66457
            // For Projection look at the first projected node
66458
            nextNode = node.data.head;
66459
        }
66460
        else {
66461
            // Otherwise look at the first child
66462
            nextNode = node.child;
66463
        }
66464
        node = nextNode === null ? getNextOrParentSiblingNode(node, rootNode) : nextNode;
66465
    }
66466
    return null;
66467
}
66468
function createTextNode(value, renderer) {
66469
    return isProceduralRenderer(renderer) ? renderer.createText(stringify$1(value)) :
66470
        renderer.createTextNode(stringify$1(value));
66471
}
66472
function addRemoveViewFromContainer(container, rootNode, insertMode, beforeNode) {
66473
    ngDevMode && assertNodeType(container, 0 /* Container */);
66474
    ngDevMode && assertNodeType(rootNode, 2 /* View */);
66475
    var parentNode = container.data.renderParent;
66476
    var parent = parentNode ? parentNode.native : null;
66477
    var node = rootNode.child;
66478
    if (parent) {
66479
        while (node) {
66480
            var nextNode = null;
66481
            var renderer = container.view.renderer;
66482
            if (node.type === 3 /* Element */) {
66483
                if (insertMode) {
66484
                    if (!node.native) {
66485
                        // If the native element doesn't exist, this is a bound text node that hasn't yet been
66486
                        // created because update mode has not run (occurs when a bound text node is a root
66487
                        // node of a dynamically created view). See textBinding() in instructions for ctx.
66488
                        // If the native element doesn't exist, this is a bound text node that hasn't yet been
66489
                        // created because update mode has not run (occurs when a bound text node is a root
66490
                        // node of a dynamically created view). See textBinding() in instructions for ctx.
66491
                        node.native = createTextNode('', renderer);
66492
                    }
66493
                    isProceduralRenderer(renderer) ?
66494
                        renderer.insertBefore(parent, (node.native), beforeNode) :
66495
                        parent.insertBefore((node.native), beforeNode, true);
66496
                }
66497
                else {
66498
                    isProceduralRenderer(renderer) ? renderer.removeChild(parent, (node.native)) :
66499
                        parent.removeChild((node.native));
66500
                }
66501
                nextNode = node.next;
66502
            }
66503
            else if (node.type === 0 /* Container */) {
66504
                // if we get to a container, it must be a root node of a view because we are only
66505
                // propagating down into child views / containers and not child elements
66506
                var childContainerData = node.data;
66507
                childContainerData.renderParent = parentNode;
66508
                nextNode = childContainerData.views.length ? childContainerData.views[0].child : null;
66509
            }
66510
            else if (node.type === 1 /* Projection */) {
66511
                nextNode = node.data.head;
66512
            }
66513
            else {
66514
                nextNode = node.child;
66515
            }
66516
            if (nextNode === null) {
66517
                node = getNextOrParentSiblingNode(node, rootNode);
66518
            }
66519
            else {
66520
                node = nextNode;
66521
            }
66522
        }
66523
    }
66524
}
66525
/**
66526
 * Traverses the tree of component views and containers to remove listeners and
66527
 * call onDestroy callbacks.
66528
 *
66529
 * Notes:
66530
 *  - Because it's used for onDestroy calls, it needs to be bottom-up.
66531
 *  - Must process containers instead of their views to avoid splicing
66532
 *  when views are destroyed and re-added.
66533
 *  - Using a while loop because it's faster than recursion
66534
 *  - Destroy only called on movement to sibling or movement to parent (laterally or up)
66535
 *
66536
 *  @param rootView The view to destroy
66537
 */
66538
function destroyViewTree(rootView) {
66539
    var viewOrContainer = rootView;
66540
    while (viewOrContainer) {
66541
        var next = null;
66542
        if (viewOrContainer.views && viewOrContainer.views.length) {
66543
            next = viewOrContainer.views[0].data;
66544
        }
66545
        else if (viewOrContainer.child) {
66546
            next = viewOrContainer.child;
66547
        }
66548
        else if (viewOrContainer.next) {
66549
            cleanUpView(viewOrContainer);
66550
            next = viewOrContainer.next;
66551
        }
66552
        if (next == null) {
66553
            // If the viewOrContainer is the rootView, then the cleanup is done twice.
66554
            // Without this check, ngOnDestroy would be called twice for a directive on an element.
66555
            while (viewOrContainer && !viewOrContainer.next && viewOrContainer !== rootView) {
66556
                cleanUpView(viewOrContainer);
66557
                viewOrContainer = getParentState(viewOrContainer, rootView);
66558
            }
66559
            cleanUpView(viewOrContainer || rootView);
66560
            next = viewOrContainer && viewOrContainer.next;
66561
        }
66562
        viewOrContainer = next;
66563
    }
66564
}
66565
/**
66566
 * Inserts a view into a container.
66567
 *
66568
 * This adds the view to the container's array of active views in the correct
66569
 * position. It also adds the view's elements to the DOM if the container isn't a
66570
 * root node of another view (in that case, the view's elements will be added when
66571
 * the container's parent view is added later).
66572
 *
66573
 * @param container The container into which the view should be inserted
66574
 * @param newView The view to insert
66575
 * @param index The index at which to insert the view
66576
 * @returns The inserted view
66577
 */
66578
function insertView(container, newView, index) {
66579
    var state = container.data;
66580
    var views = state.views;
66581
    if (index > 0) {
66582
        // This is a new view, we need to add it to the children.
66583
        setViewNext(views[index - 1], newView);
66584
    }
66585
    if (index < views.length) {
66586
        setViewNext(newView, views[index]);
66587
        views.splice(index, 0, newView);
66588
    }
66589
    else {
66590
        views.push(newView);
66591
    }
66592
    // If the container's renderParent is null, we know that it is a root node of its own parent view
66593
    // and we should wait until that parent processes its nodes (otherwise, we will insert this view's
66594
    // nodes twice - once now and once when its parent inserts its views).
66595
    if (container.data.renderParent !== null) {
66596
        var beforeNode = findNextRNodeSibling(newView, container);
66597
        if (!beforeNode) {
66598
            var containerNextNativeNode = container.native;
66599
            if (containerNextNativeNode === undefined) {
66600
                containerNextNativeNode = container.native = findNextRNodeSibling(container, null);
66601
            }
66602
            beforeNode = containerNextNativeNode;
66603
        }
66604
        addRemoveViewFromContainer(container, newView, true, beforeNode);
66605
    }
66606
    return newView;
66607
}
66608
/**
66609
 * Removes a view from a container.
66610
 *
66611
 * This method splices the view from the container's array of active views. It also
66612
 * removes the view's elements from the DOM and conducts cleanup (e.g. removing
66613
 * listeners, calling onDestroys).
66614
 *
66615
 * @param container The container from which to remove a view
66616
 * @param removeIndex The index of the view to remove
66617
 * @returns The removed view
66618
 */
66619
function removeView(container, removeIndex) {
66620
    var views = container.data.views;
66621
    var viewNode = views[removeIndex];
66622
    if (removeIndex > 0) {
66623
        setViewNext(views[removeIndex - 1], viewNode.next);
66624
    }
66625
    views.splice(removeIndex, 1);
66626
    viewNode.next = null;
66627
    destroyViewTree(viewNode.data);
66628
    addRemoveViewFromContainer(container, viewNode, false);
66629
    // Notify query that view has been removed
66630
    container.data.queries && container.data.queries.removeView(removeIndex);
66631
    return viewNode;
66632
}
66633
/**
66634
 * Sets a next on the view node, so views in for loops can easily jump from
66635
 * one view to the next to add/remove elements. Also adds the LView (view.data)
66636
 * to the view tree for easy traversal when cleaning up the view.
66637
 *
66638
 * @param view The view to set up
66639
 * @param next The view's new next
66640
 */
66641
function setViewNext(view, next) {
66642
    view.next = next;
66643
    view.data.next = next ? next.data : null;
66644
}
66645
/**
66646
 * Determines which LViewOrLContainer to jump to when traversing back up the
66647
 * tree in destroyViewTree.
66648
 *
66649
 * Normally, the view's parent LView should be checked, but in the case of
66650
 * embedded views, the container (which is the view node's parent, but not the
66651
 * LView's parent) needs to be checked for a possible next property.
66652
 *
66653
 * @param state The LViewOrLContainer for which we need a parent state
66654
 * @param rootView The rootView, so we don't propagate too far up the view tree
66655
 * @returns The correct parent LViewOrLContainer
66656
 */
66657
function getParentState(state, rootView) {
66658
    var node;
66659
    if ((node = state.node) && node.type === 2 /* View */) {
66660
        // if it's an embedded view, the state needs to go up to the container, in case the
66661
        // container has a next
66662
        return node.parent.data;
66663
    }
66664
    else {
66665
        // otherwise, use parent view for containers or component views
66666
        return state.parent === rootView ? null : state.parent;
66667
    }
66668
}
66669
/**
66670
 * Removes all listeners and call all onDestroys in a given view.
66671
 *
66672
 * @param view The LView to clean up
66673
 */
66674
function cleanUpView(view) {
66675
    removeListeners(view);
66676
    executeOnDestroys(view);
66677
    executePipeOnDestroys(view);
66678
}
66679
/** Removes listeners and unsubscribes from output subscriptions */
66680
function removeListeners(view) {
66681
    var cleanup = (view.cleanup);
66682
    if (cleanup != null) {
66683
        for (var i = 0; i < cleanup.length - 1; i += 2) {
66684
            if (typeof cleanup[i] === 'string') {
66685
                cleanup[i + 1].removeEventListener(cleanup[i], cleanup[i + 2], cleanup[i + 3]);
66686
                i += 2;
66687
            }
66688
            else {
66689
                cleanup[i].call(cleanup[i + 1]);
66690
            }
66691
        }
66692
        view.cleanup = null;
66693
    }
66694
}
66695
/** Calls onDestroy hooks for this view */
66696
function executeOnDestroys(view) {
66697
    var tView = view.tView;
66698
    var destroyHooks;
66699
    if (tView != null && (destroyHooks = tView.destroyHooks) != null) {
66700
        callHooks((view.directives), destroyHooks);
66701
    }
66702
}
66703
/** Calls pipe destroy hooks for this view */
66704
function executePipeOnDestroys(view) {
66705
    var pipeDestroyHooks = view.tView && view.tView.pipeDestroyHooks;
66706
    if (pipeDestroyHooks) {
66707
        callHooks((view.data), pipeDestroyHooks);
66708
    }
66709
}
66710
/**
66711
 * Returns whether a native element should be inserted in the given parent.
66712
 *
66713
 * The native node can be inserted when its parent is:
66714
 * - A regular element => Yes
66715
 * - A component host element =>
66716
 *    - if the `currentView` === the parent `view`: The element is in the content (vs the
66717
 *      template)
66718
 *      => don't add as the parent component will project if needed.
66719
 *    - `currentView` !== the parent `view` => The element is in the template (vs the content),
66720
 *      add it
66721
 * - View element => delay insertion, will be done on `viewEnd()`
66722
 *
66723
 * @param parent The parent in which to insert the child
66724
 * @param currentView The LView being processed
66725
 * @return boolean Whether the child element should be inserted.
66726
 */
66727
function canInsertNativeNode(parent, currentView) {
66728
    var parentIsElement = parent.type === 3;
66729
    return parentIsElement &&
66730
        (parent.view !== currentView || parent.data === null /* Regular Element. */);
66731
}
66732
/**
66733
 * Appends the `child` element to the `parent`.
66734
 *
66735
 * The element insertion might be delayed {@link canInsertNativeNode}
66736
 *
66737
 * @param parent The parent to which to append the child
66738
 * @param child The child that should be appended
66739
 * @param currentView The current LView
66740
 * @returns Whether or not the child was appended
66741
 */
66742
function appendChild(parent, child, currentView) {
66743
    if (child !== null && canInsertNativeNode(parent, currentView)) {
66744
        // We only add element if not in View or not projected.
66745
        var renderer = currentView.renderer;
66746
        isProceduralRenderer(renderer) ? renderer.appendChild(parent.native, child) :
66747
            parent.native.appendChild(child);
66748
        return true;
66749
    }
66750
    return false;
66751
}
66752
/**
66753
 * Inserts the provided node before the correct element in the DOM.
66754
 *
66755
 * The element insertion might be delayed {@link canInsertNativeNode}
66756
 *
66757
 * @param node Node to insert
66758
 * @param currentView Current LView
66759
 */
66760
function insertChild(node, currentView) {
66761
    var parent = (node.parent);
66762
    if (canInsertNativeNode(parent, currentView)) {
66763
        var nativeSibling = findNextRNodeSibling(node, null);
66764
        var renderer = currentView.renderer;
66765
        isProceduralRenderer(renderer) ?
66766
            renderer.insertBefore((parent.native), (node.native), nativeSibling) :
66767
            parent.native.insertBefore((node.native), nativeSibling, false);
66768
    }
66769
}
66770
/**
66771
 * Appends a projected node to the DOM, or in the case of a projected container,
66772
 * appends the nodes from all of the container's active views to the DOM.
66773
 *
66774
 * @param node The node to process
66775
 * @param currentParent The last parent element to be processed
66776
 * @param currentView Current LView
66777
 */
66778
function appendProjectedNode(node, currentParent, currentView) {
66779
    if (node.type !== 0 /* Container */) {
66780
        appendChild(currentParent, node.native, currentView);
66781
    }
66782
    else {
66783
        // The node we are adding is a Container and we are adding it to Element which
66784
        // is not a component (no more re-projection).
66785
        // Alternatively a container is projected at the root of a component's template
66786
        // and can't be re-projected (as not content of any component).
66787
        // Assignee the final projection location in those cases.
66788
        var lContainer = node.data;
66789
        lContainer.renderParent = currentParent;
66790
        var views = lContainer.views;
66791
        for (var i = 0; i < views.length; i++) {
66792
            addRemoveViewFromContainer(node, views[i], true, null);
66793
        }
66794
    }
66795
    if (node.dynamicLContainerNode) {
66796
        node.dynamicLContainerNode.data.renderParent = currentParent;
66797
    }
66798
}
66799
 
66800
/**
66801
 * @license
66802
 * Copyright Google Inc. All Rights Reserved.
66803
 *
66804
 * Use of this source code is governed by an MIT-style license that can be
66805
 * found in the LICENSE file at https://angular.io/license
66806
 */
66807
function isCssClassMatching(nodeClassAttrVal, cssClassToMatch) {
66808
    var nodeClassesLen = nodeClassAttrVal.length;
66809
    var matchIndex = nodeClassAttrVal.indexOf(cssClassToMatch);
66810
    var matchEndIdx = matchIndex + cssClassToMatch.length;
66811
    if (matchIndex === -1 // no match
66812
        || (matchIndex > 0 && nodeClassAttrVal[matchIndex - 1] !== ' ') // no space before
66813
        ||
66814
            (matchEndIdx < nodeClassesLen && nodeClassAttrVal[matchEndIdx] !== ' ')) {
66815
        return false;
66816
    }
66817
    return true;
66818
}
66819
/**
66820
 * A utility function to match an Ivy node static data against a simple CSS selector
66821
 *
66822
 * @param node static data to match
66823
 * @param selector
66824
 * @returns true if node matches the selector.
66825
 */
66826
function isNodeMatchingSelector(tNode, selector) {
66827
    ngDevMode && assertNotNull(selector[0], 'Selector should have a tag name');
66828
    var mode = 4;
66829
    var nodeAttrs = (tNode.attrs);
66830
    // When processing ":not" selectors, we skip to the next ":not" if the
66831
    // current one doesn't match
66832
    var skipToNextSelector = false;
66833
    for (var i = 0; i < selector.length; i++) {
66834
        var current = selector[i];
66835
        if (typeof current === 'number') {
66836
            // If we finish processing a :not selector and it hasn't failed, return false
66837
            if (!skipToNextSelector && !isPositive(mode) && !isPositive(current)) {
66838
                return false;
66839
            }
66840
            // If we are skipping to the next :not() and this mode flag is positive,
66841
            // it's a part of the current :not() selector, and we should keep skipping
66842
            if (skipToNextSelector && isPositive(current))
66843
                continue;
66844
            skipToNextSelector = false;
66845
            mode = current | (mode & 1 /* NOT */);
66846
            continue;
66847
        }
66848
        if (skipToNextSelector)
66849
            continue;
66850
        if (mode & 4 /* ELEMENT */) {
66851
            mode = 2 /* ATTRIBUTE */ | mode & 1 /* NOT */;
66852
            if (current !== '' && current !== tNode.tagName) {
66853
                if (isPositive(mode))
66854
                    return false;
66855
                skipToNextSelector = true;
66856
            }
66857
        }
66858
        else {
66859
            var attrName = mode & 8 /* CLASS */ ? 'class' : current;
66860
            var attrIndexInNode = findAttrIndexInNode(attrName, nodeAttrs);
66861
            if (attrIndexInNode === -1) {
66862
                if (isPositive(mode))
66863
                    return false;
66864
                skipToNextSelector = true;
66865
                continue;
66866
            }
66867
            var selectorAttrValue = mode & 8 /* CLASS */ ? current : selector[++i];
66868
            if (selectorAttrValue !== '') {
66869
                var nodeAttrValue = nodeAttrs[attrIndexInNode + 1];
66870
                if (mode & 8 /* CLASS */ &&
66871
                    !isCssClassMatching(nodeAttrValue, selectorAttrValue) ||
66872
                    mode & 2 /* ATTRIBUTE */ && selectorAttrValue !== nodeAttrValue) {
66873
                    if (isPositive(mode))
66874
                        return false;
66875
                    skipToNextSelector = true;
66876
                }
66877
            }
66878
        }
66879
    }
66880
    return isPositive(mode) || skipToNextSelector;
66881
}
66882
function isPositive(mode) {
66883
    return (mode & 1 /* NOT */) === 0;
66884
}
66885
function findAttrIndexInNode(name, attrs) {
66886
    if (attrs === null)
66887
        return -1;
66888
    for (var i = 0; i < attrs.length; i += 2) {
66889
        if (attrs[i] === name)
66890
            return i;
66891
    }
66892
    return -1;
66893
}
66894
function isNodeMatchingSelectorList(tNode, selector) {
66895
    for (var i = 0; i < selector.length; i++) {
66896
        if (isNodeMatchingSelector(tNode, selector[i])) {
66897
            return true;
66898
        }
66899
    }
66900
    return false;
66901
}
66902
function getProjectAsAttrValue(tNode) {
66903
    var nodeAttrs = tNode.attrs;
66904
    if (nodeAttrs != null) {
66905
        var ngProjectAsAttrIdx = nodeAttrs.indexOf(NG_PROJECT_AS_ATTR_NAME);
66906
        // only check for ngProjectAs in attribute names, don't accidentally match attribute's value
66907
        // (attribute names are stored at even indexes)
66908
        if ((ngProjectAsAttrIdx & 1) === 0) {
66909
            return nodeAttrs[ngProjectAsAttrIdx + 1];
66910
        }
66911
    }
66912
    return null;
66913
}
66914
/**
66915
 * Checks a given node against matching selectors and returns
66916
 * selector index (or 0 if none matched).
66917
 *
66918
 * This function takes into account the ngProjectAs attribute: if present its value will be compared
66919
 * to the raw (un-parsed) CSS selector instead of using standard selector matching logic.
66920
 */
66921
function matchingSelectorIndex(tNode, selectors, textSelectors) {
66922
    var ngProjectAsAttrVal = getProjectAsAttrValue(tNode);
66923
    for (var i = 0; i < selectors.length; i++) {
66924
        // if a node has the ngProjectAs attribute match it against unparsed selector
66925
        // match a node against a parsed selector only if ngProjectAs attribute is not present
66926
        if (ngProjectAsAttrVal === textSelectors[i] ||
66927
            ngProjectAsAttrVal === null && isNodeMatchingSelectorList(tNode, selectors[i])) {
66928
            return i + 1; // first matching selector "captures" a given node
66929
        }
66930
    }
66931
    return 0;
66932
}
66933
 
66934
/** Called when directives inject each other (creating a circular dependency) */
66935
function throwCyclicDependencyError(token) {
66936
    throw new Error("Cannot instantiate cyclic dependency! " + token);
66937
}
66938
/** Called when there are multiple component selectors that match a given node */
66939
function throwMultipleComponentError(tNode) {
66940
    throw new Error("Multiple components match node with tagname " + tNode.tagName);
66941
}
66942
/** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */
66943
function throwErrorIfNoChangesMode(creationMode, checkNoChangesMode, oldValue, currValue) {
66944
    if (checkNoChangesMode) {
66945
        var msg = "ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '" + oldValue + "'. Current value: '" + currValue + "'.";
66946
        if (creationMode) {
66947
            msg +=
66948
                " It seems like the view has been created after its parent and its children have been dirty checked." +
66949
                    " Has it been created in a change detection hook ?";
66950
        }
66951
        // TODO: include debug context
66952
        throw new Error(msg);
66953
    }
66954
}
66955
 
66956
/**
66957
 * @license
66958
 * Copyright Google Inc. All Rights Reserved.
66959
 *
66960
 * Use of this source code is governed by an MIT-style license that can be
66961
 * found in the LICENSE file at https://angular.io/license
66962
 */
66963
/**
66964
 * Directive (D) sets a property on all component instances using this constant as a key and the
66965
 * component's host node (LElement) as the value. This is used in methods like detectChanges to
66966
 * facilitate jumping from an instance to the host node.
66967
 */
66968
var NG_HOST_SYMBOL = '__ngHostLNode__';
66969
/**
66970
 * A permanent marker promise which signifies that the current CD tree is
66971
 * clean.
66972
 */
66973
var _CLEAN_PROMISE = Promise.resolve(null);
66974
/**
66975
 * Directive and element indices for top-level directive.
66976
 *
66977
 * Saved here to avoid re-instantiating an array on every change detection run.
66978
 */
66979
var _ROOT_DIRECTIVE_INDICES = [0, 0];
66980
/**
66981
 * Token set in currentMatches while dependencies are being resolved.
66982
 *
66983
 * If we visit a directive that has a value set to CIRCULAR, we know we've
66984
 * already seen it, and thus have a circular dependency.
66985
 */
66986
var CIRCULAR$2 = '__CIRCULAR__';
66987
/**
66988
 * This property gets set before entering a template.
66989
 *
66990
 * This renderer can be one of two varieties of Renderer3:
66991
 *
66992
 * - ObjectedOrientedRenderer3
66993
 *
66994
 * This is the native browser API style, e.g. operations are methods on individual objects
66995
 * like HTMLElement. With this style, no additional code is needed as a facade (reducing payload
66996
 * size).
66997
 *
66998
 * - ProceduralRenderer3
66999
 *
67000
 * In non-native browser environments (e.g. platforms such as web-workers), this is the facade
67001
 * that enables element manipulation. This also facilitates backwards compatibility with
67002
 * Renderer2.
67003
 */
67004
var renderer;
67005
var rendererFactory;
67006
function getRenderer() {
67007
    // top level variables should not be exported for performance reason (PERF_NOTES.md)
67008
    return renderer;
67009
}
67010
/** Used to set the parent property when nodes are created. */
67011
var previousOrParentNode;
67012
function getPreviousOrParentNode() {
67013
    // top level variables should not be exported for performance reason (PERF_NOTES.md)
67014
    return previousOrParentNode;
67015
}
67016
/**
67017
 * If `isParent` is:
67018
 *  - `true`: then `previousOrParentNode` points to a parent node.
67019
 *  - `false`: then `previousOrParentNode` points to previous node (sibling).
67020
 */
67021
var isParent;
67022
/**
67023
 * Static data that corresponds to the instance-specific data array on an LView.
67024
 *
67025
 * Each node's static data is stored in tData at the same index that it's stored
67026
 * in the data array. Any nodes that do not have static data store a null value in
67027
 * tData to avoid a sparse array.
67028
 */
67029
var tData;
67030
/**
67031
 * State of the current view being processed.
67032
 *
67033
 * NOTE: we cheat here and initialize it to `null` even thought the type does not
67034
 * contain `null`. This is because we expect this value to be not `null` as soon
67035
 * as we enter the view. Declaring the type as `null` would require us to place `!`
67036
 * in most instructions since they all assume that `currentView` is defined.
67037
 */
67038
var currentView = (null);
67039
var currentQueries;
67040
function getCurrentQueries(QueryType) {
67041
    // top level variables should not be exported for performance reason (PERF_NOTES.md)
67042
    return currentQueries || (currentQueries = new QueryType());
67043
}
67044
/**
67045
 * This property gets set before entering a template.
67046
 */
67047
var creationMode;
67048
function getCreationMode() {
67049
    // top level variables should not be exported for performance reason (PERF_NOTES.md)
67050
    return creationMode;
67051
}
67052
/**
67053
 * An array of nodes (text, element, container, etc), pipes, their bindings, and
67054
 * any local variables that need to be stored between invocations.
67055
 */
67056
var data;
67057
/**
67058
 * An array of directive instances in the current view.
67059
 *
67060
 * These must be stored separately from LNodes because their presence is
67061
 * unknown at compile-time and thus space cannot be reserved in data[].
67062
 */
67063
var directives;
67064
/**
67065
 * When a view is destroyed, listeners need to be released and outputs need to be
67066
 * unsubscribed. This cleanup array stores both listener data (in chunks of 4)
67067
 * and output data (in chunks of 2) for a particular view. Combining the arrays
67068
 * saves on memory (70 bytes per array) and on a few bytes of code size (for two
67069
 * separate for loops).
67070
 *
67071
 * If it's a listener being stored:
67072
 * 1st index is: event name to remove
67073
 * 2nd index is: native element
67074
 * 3rd index is: listener function
67075
 * 4th index is: useCapture boolean
67076
 *
67077
 * If it's an output subscription:
67078
 * 1st index is: unsubscribe function
67079
 * 2nd index is: context for function
67080
 */
67081
var cleanup;
67082
/**
67083
 * In this mode, any changes in bindings will throw an ExpressionChangedAfterChecked error.
67084
 *
67085
 * Necessary to support ChangeDetectorRef.checkNoChanges().
67086
 */
67087
var checkNoChangesMode = false;
67088
/** Whether or not this is the first time the current view has been processed. */
67089
var firstTemplatePass = true;
67090
/**
67091
 * Swap the current state with a new state.
67092
 *
67093
 * For performance reasons we store the state in the top level of the module.
67094
 * This way we minimize the number of properties to read. Whenever a new view
67095
 * is entered we have to store the state for later, and when the view is
67096
 * exited the state has to be restored
67097
 *
67098
 * @param newView New state to become active
67099
 * @param host Element to which the View is a child of
67100
 * @returns the previous state;
67101
 */
67102
function enterView(newView, host) {
67103
    var oldView = currentView;
67104
    data = newView && newView.data;
67105
    directives = newView && newView.directives;
67106
    tData = newView && newView.tView.data;
67107
    creationMode = newView && (newView.flags & 1 /* CreationMode */) === 1 /* CreationMode */;
67108
    firstTemplatePass = newView && newView.tView.firstTemplatePass;
67109
    cleanup = newView && newView.cleanup;
67110
    renderer = newView && newView.renderer;
67111
    if (newView && newView.bindingIndex < 0) {
67112
        newView.bindingIndex = newView.bindingStartIndex;
67113
    }
67114
    if (host != null) {
67115
        previousOrParentNode = host;
67116
        isParent = true;
67117
    }
67118
    currentView = newView;
67119
    currentQueries = newView && newView.queries;
67120
    return oldView;
67121
}
67122
/**
67123
 * Used in lieu of enterView to make it clear when we are exiting a child view. This makes
67124
 * the direction of traversal (up or down the view tree) a bit clearer.
67125
 */
67126
function leaveView(newView) {
67127
    if (!checkNoChangesMode) {
67128
        executeHooks((directives), currentView.tView.viewHooks, currentView.tView.viewCheckHooks, creationMode);
67129
    }
67130
    // Views should be clean and in update mode after being checked, so these bits are cleared
67131
    currentView.flags &= ~(1 /* CreationMode */ | 4 /* Dirty */);
67132
    currentView.lifecycleStage = 1 /* Init */;
67133
    currentView.bindingIndex = -1;
67134
    enterView(newView, null);
67135
}
67136
/**  Refreshes directives in this view and triggers any init/content hooks.  */
67137
function refreshDirectives() {
67138
    executeInitAndContentHooks();
67139
    var tView = currentView.tView;
67140
    // This needs to be set before children are processed to support recursive components
67141
    tView.firstTemplatePass = firstTemplatePass = false;
67142
    setHostBindings(tView.hostBindings);
67143
    refreshChildComponents(tView.components);
67144
}
67145
/** Sets the host bindings for the current view. */
67146
function setHostBindings(bindings) {
67147
    if (bindings != null) {
67148
        var defs = (currentView.tView.directives);
67149
        for (var i = 0; i < bindings.length; i += 2) {
67150
            var dirIndex = bindings[i];
67151
            var def = defs[dirIndex];
67152
            def.hostBindings && def.hostBindings(dirIndex, bindings[i + 1]);
67153
        }
67154
    }
67155
}
67156
/** Refreshes child components in the current view. */
67157
function refreshChildComponents(components) {
67158
    if (components != null) {
67159
        for (var i = 0; i < components.length; i += 2) {
67160
            componentRefresh(components[i], components[i + 1]);
67161
        }
67162
    }
67163
}
67164
function executeInitAndContentHooks() {
67165
    if (!checkNoChangesMode) {
67166
        var tView = currentView.tView;
67167
        executeInitHooks(currentView, tView, creationMode);
67168
        executeHooks((directives), tView.contentHooks, tView.contentCheckHooks, creationMode);
67169
    }
67170
}
67171
function createLView(viewId, renderer, tView, template, context, flags) {
67172
    var newView = {
67173
        parent: currentView,
67174
        id: viewId,
67175
        // -1 for component views
67176
        flags: flags | 1 /* CreationMode */ | 8 /* Attached */,
67177
        node: (null),
67178
        // until we initialize it in createNode.
67179
        data: [],
67180
        directives: null,
67181
        tView: tView,
67182
        cleanup: null,
67183
        renderer: renderer,
67184
        child: null,
67185
        tail: null,
67186
        next: null,
67187
        bindingStartIndex: -1,
67188
        bindingIndex: -1,
67189
        template: template,
67190
        context: context,
67191
        dynamicViewCount: 0,
67192
        lifecycleStage: 1 /* Init */,
67193
        queries: null,
67194
        injector: currentView && currentView.injector,
67195
    };
67196
    return newView;
67197
}
67198
/**
67199
 * Creation of LNode object is extracted to a separate function so we always create LNode object
67200
 * with the same shape
67201
 * (same properties assigned in the same order).
67202
 */
67203
function createLNodeObject(type, currentView, parent, native, state, queries) {
67204
    return {
67205
        type: type,
67206
        native: native,
67207
        view: currentView,
67208
        parent: parent,
67209
        child: null,
67210
        next: null,
67211
        nodeInjector: parent ? parent.nodeInjector : null,
67212
        data: state,
67213
        queries: queries,
67214
        tNode: null,
67215
        pNextOrParent: null,
67216
        dynamicLContainerNode: null
67217
    };
67218
}
67219
function createLNode(index, type, native, state) {
67220
    var parent = isParent ? previousOrParentNode :
67221
        previousOrParentNode && previousOrParentNode.parent;
67222
    var queries = (isParent ? currentQueries : previousOrParentNode && previousOrParentNode.queries) ||
67223
        parent && parent.queries && parent.queries.child();
67224
    var isState = state != null;
67225
    var node = createLNodeObject(type, currentView, parent, native, isState ? state : null, queries);
67226
    if ((type & 2 /* ViewOrElement */) === 2 /* ViewOrElement */ && isState) {
67227
        // Bit of a hack to bust through the readonly because there is a circular dep between
67228
        // LView and LNode.
67229
        ngDevMode && assertNull(state.node, 'LView.node should not have been initialized');
67230
        state.node = node;
67231
    }
67232
    if (index != null) {
67233
        // We are Element or Container
67234
        ngDevMode && assertDataNext(index);
67235
        data[index] = node;
67236
        // Every node adds a value to the static data array to avoid a sparse array
67237
        if (index >= tData.length) {
67238
            tData[index] = null;
67239
        }
67240
        else {
67241
            node.tNode = tData[index];
67242
        }
67243
        // Now link ourselves into the tree.
67244
        if (isParent) {
67245
            currentQueries = null;
67246
            if (previousOrParentNode.view === currentView ||
67247
                previousOrParentNode.type === 2 /* View */) {
67248
                // We are in the same view, which means we are adding content node to the parent View.
67249
                ngDevMode && assertNull(previousOrParentNode.child, "previousOrParentNode's child should not have been set.");
67250
                previousOrParentNode.child = node;
67251
            }
67252
            else {
67253
                // We are adding component view, so we don't link parent node child to this node.
67254
            }
67255
        }
67256
        else if (previousOrParentNode) {
67257
            ngDevMode && assertNull(previousOrParentNode.next, "previousOrParentNode's next property should not have been set " + index + ".");
67258
            previousOrParentNode.next = node;
67259
            if (previousOrParentNode.dynamicLContainerNode) {
67260
                previousOrParentNode.dynamicLContainerNode.next = node;
67261
            }
67262
        }
67263
    }
67264
    previousOrParentNode = node;
67265
    isParent = true;
67266
    return node;
67267
}
67268
/**
67269
 * Resets the application state.
67270
 */
67271
function resetApplicationState() {
67272
    isParent = false;
67273
    previousOrParentNode = (null);
67274
}
67275
/**
67276
 *
67277
 * @param hostNode Existing node to render into.
67278
 * @param template Template function with the instructions.
67279
 * @param context to pass into the template.
67280
 * @param providedRendererFactory renderer factory to use
67281
 * @param host The host element node to use
67282
 * @param directives Directive defs that should be used for matching
67283
 * @param pipes Pipe defs that should be used for matching
67284
 */
67285
 
67286
function renderEmbeddedTemplate(viewNode, template, context, renderer, directives, pipes) {
67287
    var _isParent = isParent;
67288
    var _previousOrParentNode = previousOrParentNode;
67289
    var oldView;
67290
    try {
67291
        isParent = true;
67292
        previousOrParentNode = (null);
67293
        var rf = 2;
67294
        if (viewNode == null) {
67295
            var tView = getOrCreateTView(template, directives || null, pipes || null);
67296
            var lView = createLView(-1, renderer, tView, template, context, 2 /* CheckAlways */);
67297
            viewNode = createLNode(null, 2 /* View */, null, lView);
67298
            rf = 1 /* Create */;
67299
        }
67300
        oldView = enterView(viewNode.data, viewNode);
67301
        template(rf, context);
67302
        refreshDirectives();
67303
        refreshDynamicChildren();
67304
    }
67305
    finally {
67306
        leaveView((oldView));
67307
        isParent = _isParent;
67308
        previousOrParentNode = _previousOrParentNode;
67309
    }
67310
    return viewNode;
67311
}
67312
function renderComponentOrTemplate(node, hostView, componentOrContext, template) {
67313
    var oldView = enterView(hostView, node);
67314
    try {
67315
        if (rendererFactory.begin) {
67316
            rendererFactory.begin();
67317
        }
67318
        if (template) {
67319
            template(getRenderFlags(hostView), (componentOrContext));
67320
            refreshDynamicChildren();
67321
            refreshDirectives();
67322
        }
67323
        else {
67324
            executeInitAndContentHooks();
67325
            // Element was stored at 0 in data and directive was stored at 0 in directives
67326
            // in renderComponent()
67327
            setHostBindings(_ROOT_DIRECTIVE_INDICES);
67328
            componentRefresh(0, 0);
67329
        }
67330
    }
67331
    finally {
67332
        if (rendererFactory.end) {
67333
            rendererFactory.end();
67334
        }
67335
        leaveView(oldView);
67336
    }
67337
}
67338
/**
67339
 * This function returns the default configuration of rendering flags depending on when the
67340
 * template is in creation mode or update mode. By default, the update block is run with the
67341
 * creation block when the view is in creation mode. Otherwise, the update block is run
67342
 * alone.
67343
 *
67344
 * Dynamically created views do NOT use this configuration (update block and create block are
67345
 * always run separately).
67346
 */
67347
function getRenderFlags(view) {
67348
    return view.flags & 1 /* CreationMode */ ? 1 /* Create */ | 2 /* Update */ :
67349
        2 /* Update */;
67350
}
67351
/**
67352
 * Create DOM element. The instruction must later be followed by `elementEnd()` call.
67353
 *
67354
 * @param index Index of the element in the data array
67355
 * @param name Name of the DOM Node
67356
 * @param attrs Statically bound set of attributes to be written into the DOM element on creation.
67357
 * @param localRefs A set of local reference bindings on the element.
67358
 *
67359
 * Attributes and localRefs are passed as an array of strings where elements with an even index
67360
 * hold an attribute name and elements with an odd index hold an attribute value, ex.:
67361
 * ['id', 'warning5', 'class', 'alert']
67362
 */
67363
function elementStart(index, name, attrs, localRefs) {
67364
    ngDevMode &&
67365
        assertEqual(currentView.bindingStartIndex, -1, 'elements should be created before any bindings');
67366
    var native = renderer.createElement(name);
67367
    var node = createLNode(index, 3 /* Element */, (native), null);
67368
    if (attrs)
67369
        setUpAttributes(native, attrs);
67370
    appendChild((node.parent), native, currentView);
67371
    createDirectivesAndLocals(index, name, attrs, localRefs, null);
67372
    return native;
67373
}
67374
function createDirectivesAndLocals(index, name, attrs, localRefs, containerData) {
67375
    var node = previousOrParentNode;
67376
    if (firstTemplatePass) {
67377
        ngDevMode && assertDataInRange(index - 1);
67378
        node.tNode = tData[index] = createTNode(name, attrs || null, containerData);
67379
        cacheMatchingDirectivesForNode(node.tNode, currentView.tView, localRefs || null);
67380
    }
67381
    else {
67382
        instantiateDirectivesDirectly();
67383
    }
67384
    saveResolvedLocalsInData();
67385
}
67386
/**
67387
 * On first template pass, we match each node against available directive selectors and save
67388
 * the resulting defs in the correct instantiation order for subsequent change detection runs
67389
 * (so dependencies are always created before the directives that inject them).
67390
 */
67391
function cacheMatchingDirectivesForNode(tNode, tView, localRefs) {
67392
    // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in tsickle.
67393
    var exportsMap = localRefs ? { '': -1 } : null;
67394
    var matches = tView.currentMatches = findDirectiveMatches(tNode);
67395
    if (matches) {
67396
        for (var i = 0; i < matches.length; i += 2) {
67397
            var def = matches[i];
67398
            var valueIndex = i + 1;
67399
            resolveDirective(def, valueIndex, matches, tView);
67400
            saveNameToExportMap(matches[valueIndex], def, exportsMap);
67401
        }
67402
    }
67403
    if (exportsMap)
67404
        cacheMatchingLocalNames(tNode, localRefs, exportsMap);
67405
}
67406
/** Matches the current node against all available selectors. */
67407
function findDirectiveMatches(tNode) {
67408
    var registry = currentView.tView.directiveRegistry;
67409
    var matches = null;
67410
    if (registry) {
67411
        for (var i = 0; i < registry.length; i++) {
67412
            var def = registry[i];
67413
            if (isNodeMatchingSelectorList(tNode, (def.selectors))) {
67414
                if (def.template) {
67415
                    if (tNode.flags & 4096 /* isComponent */)
67416
                        throwMultipleComponentError(tNode);
67417
                    tNode.flags = 4096 /* isComponent */;
67418
                }
67419
                if (def.diPublic)
67420
                    def.diPublic(def);
67421
                (matches || (matches = [])).push(def, null);
67422
            }
67423
        }
67424
    }
67425
    return matches;
67426
}
67427
function resolveDirective(def, valueIndex, matches, tView) {
67428
    if (matches[valueIndex] === null) {
67429
        matches[valueIndex] = CIRCULAR$2;
67430
        var instance = def.factory();
67431
        (tView.directives || (tView.directives = [])).push(def);
67432
        return directiveCreate(matches[valueIndex] = tView.directives.length - 1, instance, def);
67433
    }
67434
    else if (matches[valueIndex] === CIRCULAR$2) {
67435
        // If we revisit this directive before it's resolved, we know it's circular
67436
        throwCyclicDependencyError(def.type);
67437
    }
67438
    return null;
67439
}
67440
/** Stores index of component's host element so it will be queued for view refresh during CD. */
67441
function queueComponentIndexForCheck(dirIndex) {
67442
    if (firstTemplatePass) {
67443
        (currentView.tView.components || (currentView.tView.components = [])).push(dirIndex, data.length - 1);
67444
    }
67445
}
67446
/** Stores index of directive and host element so it will be queued for binding refresh during CD.
67447
 */
67448
function queueHostBindingForCheck(dirIndex) {
67449
    ngDevMode &&
67450
        assertEqual(firstTemplatePass, true, 'Should only be called in first template pass.');
67451
    (currentView.tView.hostBindings || (currentView.tView.hostBindings = [])).push(dirIndex, data.length - 1);
67452
}
67453
/** Sets the context for a ChangeDetectorRef to the given instance. */
67454
function initChangeDetectorIfExisting(injector, instance, view) {
67455
    if (injector && injector.changeDetectorRef != null) {
67456
        injector.changeDetectorRef._setComponentContext(view, instance);
67457
    }
67458
}
67459
function isComponent(tNode) {
67460
    return (tNode.flags & 4096 /* isComponent */) === 4096 /* isComponent */;
67461
}
67462
/**
67463
 * This function instantiates the given directives.
67464
 */
67465
function instantiateDirectivesDirectly() {
67466
    var tNode = (previousOrParentNode.tNode);
67467
    var count = tNode.flags & 4095;
67468
    if (count > 0) {
67469
        var start = tNode.flags >> 13;
67470
        var end = start + count;
67471
        var tDirectives = (currentView.tView.directives);
67472
        for (var i = start; i < end; i++) {
67473
            var def = tDirectives[i];
67474
            directiveCreate(i, def.factory(), def);
67475
        }
67476
    }
67477
}
67478
/** Caches local names and their matching directive indices for query and template lookups. */
67479
function cacheMatchingLocalNames(tNode, localRefs, exportsMap) {
67480
    if (localRefs) {
67481
        var localNames = tNode.localNames = [];
67482
        // Local names must be stored in tNode in the same order that localRefs are defined
67483
        // in the template to ensure the data is loaded in the same slots as their refs
67484
        // in the template (for template queries).
67485
        for (var i = 0; i < localRefs.length; i += 2) {
67486
            var index = exportsMap[localRefs[i + 1]];
67487
            if (index == null)
67488
                throw new Error("Export of name '" + localRefs[i + 1] + "' not found!");
67489
            localNames.push(localRefs[i], index);
67490
        }
67491
    }
67492
}
67493
/**
67494
 * Builds up an export map as directives are created, so local refs can be quickly mapped
67495
 * to their directive instances.
67496
 */
67497
function saveNameToExportMap(index, def, exportsMap) {
67498
    if (exportsMap) {
67499
        if (def.exportAs)
67500
            exportsMap[def.exportAs] = index;
67501
        if (def.template)
67502
            exportsMap[''] = index;
67503
    }
67504
}
67505
/**
67506
 * Takes a list of local names and indices and pushes the resolved local variable values
67507
 * to data[] in the same order as they are loaded in the template with load().
67508
 */
67509
function saveResolvedLocalsInData() {
67510
    var localNames = previousOrParentNode.tNode.localNames;
67511
    if (localNames) {
67512
        for (var i = 0; i < localNames.length; i += 2) {
67513
            var index = localNames[i + 1];
67514
            var value = index === -1 ? previousOrParentNode.native : directives[index];
67515
            data.push(value);
67516
        }
67517
    }
67518
}
67519
/**
67520
 * Gets TView from a template function or creates a new TView
67521
 * if it doesn't already exist.
67522
 *
67523
 * @param template The template from which to get static data
67524
 * @param directives Directive defs that should be saved on TView
67525
 * @param pipes Pipe defs that should be saved on TView
67526
 * @returns TView
67527
 */
67528
function getOrCreateTView(template, directives, pipes) {
67529
    return template.ngPrivateData ||
67530
        (template.ngPrivateData = createTView(directives, pipes));
67531
}
67532
/** Creates a TView instance */
67533
function createTView(defs, pipes) {
67534
    return {
67535
        data: [],
67536
        directives: null,
67537
        firstTemplatePass: true,
67538
        initHooks: null,
67539
        checkHooks: null,
67540
        contentHooks: null,
67541
        contentCheckHooks: null,
67542
        viewHooks: null,
67543
        viewCheckHooks: null,
67544
        destroyHooks: null,
67545
        pipeDestroyHooks: null,
67546
        hostBindings: null,
67547
        components: null,
67548
        directiveRegistry: typeof defs === 'function' ? defs() : defs,
67549
        pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,
67550
        currentMatches: null
67551
    };
67552
}
67553
function setUpAttributes(native, attrs) {
67554
    ngDevMode && assertEqual(attrs.length % 2, 0, 'each attribute should have a key and a value');
67555
    var isProc = isProceduralRenderer(renderer);
67556
    for (var i = 0; i < attrs.length; i += 2) {
67557
        var attrName = attrs[i];
67558
        if (attrName !== NG_PROJECT_AS_ATTR_NAME) {
67559
            var attrVal = attrs[i + 1];
67560
            isProc ? renderer.setAttribute(native, attrName, attrVal) :
67561
                native.setAttribute(attrName, attrVal);
67562
        }
67563
    }
67564
}
67565
function createError(text, token) {
67566
    return new Error("Renderer: " + text + " [" + stringify$1(token) + "]");
67567
}
67568
/**
67569
 * Locates the host native element, used for bootstrapping existing nodes into rendering pipeline.
67570
 *
67571
 * @param elementOrSelector Render element or CSS selector to locate the element.
67572
 */
67573
function locateHostElement(factory, elementOrSelector) {
67574
    ngDevMode && assertDataInRange(-1);
67575
    rendererFactory = factory;
67576
    var defaultRenderer = factory.createRenderer(null, null);
67577
    var rNode = typeof elementOrSelector === 'string' ?
67578
        (isProceduralRenderer(defaultRenderer) ?
67579
            defaultRenderer.selectRootElement(elementOrSelector) :
67580
            defaultRenderer.querySelector(elementOrSelector)) :
67581
        elementOrSelector;
67582
    if (ngDevMode && !rNode) {
67583
        if (typeof elementOrSelector === 'string') {
67584
            throw createError('Host node with selector not found:', elementOrSelector);
67585
        }
67586
        else {
67587
            throw createError('Host node is required:', elementOrSelector);
67588
        }
67589
    }
67590
    return rNode;
67591
}
67592
/**
67593
 * Creates the host LNode.
67594
 *
67595
 * @param rNode Render host element.
67596
 * @param def ComponentDef
67597
 *
67598
 * @returns LElementNode created
67599
 */
67600
function hostElement(tag, rNode, def) {
67601
    resetApplicationState();
67602
    var node = createLNode(0, 3 /* Element */, rNode, createLView(-1, renderer, getOrCreateTView(def.template, def.directiveDefs, def.pipeDefs), null, null, def.onPush ? 4 /* Dirty */ : 2 /* CheckAlways */));
67603
    if (firstTemplatePass) {
67604
        node.tNode = createTNode(tag, null, null);
67605
        node.tNode.flags = 4096 /* isComponent */;
67606
        if (def.diPublic)
67607
            def.diPublic(def);
67608
        currentView.tView.directives = [def];
67609
    }
67610
    return node;
67611
}
67612
/**
67613
 * Adds an event listener to the current node.
67614
 *
67615
 * If an output exists on one of the node's directives, it also subscribes to the output
67616
 * and saves the subscription for later cleanup.
67617
 *
67618
 * @param eventName Name of the event
67619
 * @param listenerFn The function to be called when event emits
67620
 * @param useCapture Whether or not to use capture in event listener.
67621
 */
67622
function listener(eventName, listenerFn, useCapture) {
67623
    if (useCapture === void 0) { useCapture = false; }
67624
    ngDevMode && assertPreviousIsParent();
67625
    var node = previousOrParentNode;
67626
    var native = node.native;
67627
    // In order to match current behavior, native DOM event listeners must be added for all
67628
    // events (including outputs).
67629
    var cleanupFns = cleanup || (cleanup = currentView.cleanup = []);
67630
    if (isProceduralRenderer(renderer)) {
67631
        var wrappedListener = wrapListenerWithDirtyLogic(currentView, listenerFn);
67632
        var cleanupFn = renderer.listen(native, eventName, wrappedListener);
67633
        cleanupFns.push(cleanupFn, null);
67634
    }
67635
    else {
67636
        var wrappedListener = wrapListenerWithDirtyAndDefault(currentView, listenerFn);
67637
        native.addEventListener(eventName, wrappedListener, useCapture);
67638
        cleanupFns.push(eventName, native, wrappedListener, useCapture);
67639
    }
67640
    var tNode = (node.tNode);
67641
    if (tNode.outputs === undefined) {
67642
        // if we create TNode here, inputs must be undefined so we know they still need to be
67643
        // checked
67644
        tNode.outputs = generatePropertyAliases(node.tNode.flags, 1 /* Output */);
67645
    }
67646
    var outputs = tNode.outputs;
67647
    var outputData;
67648
    if (outputs && (outputData = outputs[eventName])) {
67649
        createOutput(outputData, listenerFn);
67650
    }
67651
}
67652
/**
67653
 * Iterates through the outputs associated with a particular event name and subscribes to
67654
 * each output.
67655
 */
67656
function createOutput(outputs, listener) {
67657
    for (var i = 0; i < outputs.length; i += 2) {
67658
        ngDevMode && assertDataInRange(outputs[i], (directives));
67659
        var subscription = directives[outputs[i]][outputs[i + 1]].subscribe(listener);
67660
        cleanup.push(subscription.unsubscribe, subscription);
67661
    }
67662
}
67663
/** Mark the end of the element. */
67664
function elementEnd() {
67665
    if (isParent) {
67666
        isParent = false;
67667
    }
67668
    else {
67669
        ngDevMode && assertHasParent();
67670
        previousOrParentNode = (previousOrParentNode.parent);
67671
    }
67672
    ngDevMode && assertNodeType(previousOrParentNode, 3 /* Element */);
67673
    var queries = previousOrParentNode.queries;
67674
    queries && queries.addNode(previousOrParentNode);
67675
    queueLifecycleHooks(previousOrParentNode.tNode.flags, currentView);
67676
}
67677
/**
67678
 * Updates the value of removes an attribute on an Element.
67679
 *
67680
 * @param number index The index of the element in the data array
67681
 * @param name name The name of the attribute.
67682
 * @param value value The attribute is removed when value is `null` or `undefined`.
67683
 *                  Otherwise the attribute value is set to the stringified value.
67684
 * @param sanitizer An optional function used to sanitize the value.
67685
 */
67686
function elementAttribute(index, name, value, sanitizer) {
67687
    if (value !== NO_CHANGE) {
67688
        var element = data[index];
67689
        if (value == null) {
67690
            isProceduralRenderer(renderer) ? renderer.removeAttribute(element.native, name) :
67691
                element.native.removeAttribute(name);
67692
        }
67693
        else {
67694
            var strValue = sanitizer == null ? stringify$1(value) : sanitizer(value);
67695
            isProceduralRenderer(renderer) ? renderer.setAttribute(element.native, name, strValue) :
67696
                element.native.setAttribute(name, strValue);
67697
        }
67698
    }
67699
}
67700
/**
67701
 * Update a property on an Element.
67702
 *
67703
 * If the property name also exists as an input property on one of the element's directives,
67704
 * the component property will be set instead of the element property. This check must
67705
 * be conducted at runtime so child components that add new @Inputs don't have to be re-compiled.
67706
 *
67707
 * @param index The index of the element to update in the data array
67708
 * @param propName Name of property. Because it is going to DOM, this is not subject to
67709
 *        renaming as part of minification.
67710
 * @param value New value to write.
67711
 * @param sanitizer An optional function used to sanitize the value.
67712
 */
67713
function elementProperty(index, propName, value, sanitizer) {
67714
    if (value === NO_CHANGE)
67715
        return;
67716
    var node = data[index];
67717
    var tNode = (node.tNode);
67718
    // if tNode.inputs is undefined, a listener has created outputs, but inputs haven't
67719
    // yet been checked
67720
    if (tNode && tNode.inputs === undefined) {
67721
        // mark inputs as checked
67722
        tNode.inputs = generatePropertyAliases(node.tNode.flags, 0 /* Input */);
67723
    }
67724
    var inputData = tNode && tNode.inputs;
67725
    var dataValue;
67726
    if (inputData && (dataValue = inputData[propName])) {
67727
        setInputsForProperty(dataValue, value);
67728
        markDirtyIfOnPush(node);
67729
    }
67730
    else {
67731
        // It is assumed that the sanitizer is only added when the compiler determines that the property
67732
        // is risky, so sanitization can be done without further checks.
67733
        value = sanitizer != null ? sanitizer(value) : value;
67734
        var native = node.native;
67735
        isProceduralRenderer(renderer) ? renderer.setProperty(native, propName, value) :
67736
            (native.setProperty ? native.setProperty(propName, value) :
67737
                native[propName] = value);
67738
    }
67739
}
67740
/**
67741
 * Constructs a TNode object from the arguments.
67742
 *
67743
 * @param tagName
67744
 * @param attrs
67745
 * @param data
67746
 * @param localNames A list of local names and their matching indices
67747
 * @returns the TNode object
67748
 */
67749
function createTNode(tagName, attrs, data) {
67750
    return {
67751
        flags: 0,
67752
        tagName: tagName,
67753
        attrs: attrs,
67754
        localNames: null,
67755
        initialInputs: undefined,
67756
        inputs: undefined,
67757
        outputs: undefined,
67758
        data: data
67759
    };
67760
}
67761
/**
67762
 * Given a list of directive indices and minified input names, sets the
67763
 * input properties on the corresponding directives.
67764
 */
67765
function setInputsForProperty(inputs, value) {
67766
    for (var i = 0; i < inputs.length; i += 2) {
67767
        ngDevMode && assertDataInRange(inputs[i], (directives));
67768
        directives[inputs[i]][inputs[i + 1]] = value;
67769
    }
67770
}
67771
/**
67772
 * Consolidates all inputs or outputs of all directives on this logical node.
67773
 *
67774
 * @param number lNodeFlags logical node flags
67775
 * @param Direction direction whether to consider inputs or outputs
67776
 * @returns PropertyAliases|null aggregate of all properties if any, `null` otherwise
67777
 */
67778
function generatePropertyAliases(tNodeFlags, direction) {
67779
    var count = tNodeFlags & 4095;
67780
    var propStore = null;
67781
    if (count > 0) {
67782
        var start = tNodeFlags >> 13;
67783
        var end = start + count;
67784
        var isInput = direction === 0;
67785
        var defs = (currentView.tView.directives);
67786
        for (var i = start; i < end; i++) {
67787
            var directiveDef = defs[i];
67788
            var propertyAliasMap = isInput ? directiveDef.inputs : directiveDef.outputs;
67789
            for (var publicName in propertyAliasMap) {
67790
                if (propertyAliasMap.hasOwnProperty(publicName)) {
67791
                    propStore = propStore || {};
67792
                    var internalName = propertyAliasMap[publicName];
67793
                    var hasProperty = propStore.hasOwnProperty(publicName);
67794
                    hasProperty ? propStore[publicName].push(i, internalName) :
67795
                        (propStore[publicName] = [i, internalName]);
67796
                }
67797
            }
67798
        }
67799
    }
67800
    return propStore;
67801
}
67802
/**
67803
 * Add or remove a class in a `classList` on a DOM element.
67804
 *
67805
 * This instruction is meant to handle the [class.foo]="exp" case
67806
 *
67807
 * @param index The index of the element to update in the data array
67808
 * @param className Name of class to toggle. Because it is going to DOM, this is not subject to
67809
 *        renaming as part of minification.
67810
 * @param value A value indicating if a given class should be added or removed.
67811
 */
67812
function elementClassNamed(index, className, value) {
67813
    if (value !== NO_CHANGE) {
67814
        var lElement = data[index];
67815
        if (value) {
67816
            isProceduralRenderer(renderer) ? renderer.addClass(lElement.native, className) :
67817
                lElement.native.classList.add(className);
67818
        }
67819
        else {
67820
            isProceduralRenderer(renderer) ? renderer.removeClass(lElement.native, className) :
67821
                lElement.native.classList.remove(className);
67822
        }
67823
    }
67824
}
67825
/**
67826
 * Set the `className` property on a DOM element.
67827
 *
67828
 * This instruction is meant to handle the `[class]="exp"` usage.
67829
 *
67830
 * `elementClass` instruction writes the value to the "element's" `className` property.
67831
 *
67832
 * @param index The index of the element to update in the data array
67833
 * @param value A value indicating a set of classes which should be applied. The method overrides
67834
 *   any existing classes. The value is stringified (`toString`) before it is applied to the
67835
 *   element.
67836
 */
67837
function elementClass(index, value) {
67838
    if (value !== NO_CHANGE) {
67839
        // TODO: This is a naive implementation which simply writes value to the `className`. In the
67840
        // future
67841
        // we will add logic here which would work with the animation code.
67842
        var lElement = data[index];
67843
        isProceduralRenderer(renderer) ? renderer.setProperty(lElement.native, 'className', value) :
67844
            lElement.native['className'] = stringify$1(value);
67845
    }
67846
}
67847
function elementStyleNamed(index, styleName, value, suffixOrSanitizer) {
67848
    if (value !== NO_CHANGE) {
67849
        var lElement = data[index];
67850
        if (value == null) {
67851
            isProceduralRenderer(renderer) ?
67852
                renderer.removeStyle(lElement.native, styleName, RendererStyleFlags3.DashCase) :
67853
                lElement.native['style'].removeProperty(styleName);
67854
        }
67855
        else {
67856
            var strValue = typeof suffixOrSanitizer == 'function' ? suffixOrSanitizer(value) : stringify$1(value);
67857
            if (typeof suffixOrSanitizer == 'string')
67858
                strValue = strValue + suffixOrSanitizer;
67859
            isProceduralRenderer(renderer) ?
67860
                renderer.setStyle(lElement.native, styleName, strValue, RendererStyleFlags3.DashCase) :
67861
                lElement.native['style'].setProperty(styleName, strValue);
67862
        }
67863
    }
67864
}
67865
/**
67866
 * Set the `style` property on a DOM element.
67867
 *
67868
 * This instruction is meant to handle the `[style]="exp"` usage.
67869
 *
67870
 *
67871
 * @param index The index of the element to update in the data array
67872
 * @param value A value indicating if a given style should be added or removed.
67873
 *   The expected shape of `value` is an object where keys are style names and the values
67874
 *   are their corresponding values to set. If value is falsy than the style is remove. An absence
67875
 *   of style does not cause that style to be removed. `NO_CHANGE` implies that no update should be
67876
 *   performed.
67877
 */
67878
function elementStyle(index, value) {
67879
    if (value !== NO_CHANGE) {
67880
        // TODO: This is a naive implementation which simply writes value to the `style`. In the future
67881
        // we will add logic here which would work with the animation code.
67882
        var lElement = data[index];
67883
        if (isProceduralRenderer(renderer)) {
67884
            renderer.setProperty(lElement.native, 'style', value);
67885
        }
67886
        else {
67887
            var style = lElement.native['style'];
67888
            for (var i = 0, keys = Object.keys(value); i < keys.length; i++) {
67889
                var styleName = keys[i];
67890
                var styleValue = value[styleName];
67891
                styleValue == null ? style.removeProperty(styleName) :
67892
                    style.setProperty(styleName, styleValue);
67893
            }
67894
        }
67895
    }
67896
}
67897
/**
67898
 * Create static text node
67899
 *
67900
 * @param index Index of the node in the data array.
67901
 * @param value Value to write. This value will be stringified.
67902
 *   If value is not provided than the actual creation of the text node is delayed.
67903
 */
67904
function text(index, value) {
67905
    ngDevMode &&
67906
        assertEqual(currentView.bindingStartIndex, -1, 'text nodes should be created before bindings');
67907
    var textNode = value != null ? createTextNode(value, renderer) : null;
67908
    var node = createLNode(index, 3 /* Element */, textNode);
67909
    // Text nodes are self closing.
67910
    isParent = false;
67911
    appendChild((node.parent), textNode, currentView);
67912
}
67913
/**
67914
 * Create text node with binding
67915
 * Bindings should be handled externally with the proper bind(1-8) method
67916
 *
67917
 * @param index Index of the node in the data array.
67918
 * @param value Stringified value to write.
67919
 */
67920
function textBinding(index, value) {
67921
    ngDevMode && assertDataInRange(index);
67922
    var existingNode = data[index];
67923
    ngDevMode && assertNotNull(existingNode, 'existing node');
67924
    if (existingNode.native) {
67925
        // If DOM node exists and value changed, update textContent
67926
        value !== NO_CHANGE &&
67927
            (isProceduralRenderer(renderer) ? renderer.setValue(existingNode.native, stringify$1(value)) :
67928
                existingNode.native.textContent = stringify$1(value));
67929
    }
67930
    else {
67931
        // Node was created but DOM node creation was delayed. Create and append now.
67932
        existingNode.native = createTextNode(value, renderer);
67933
        insertChild(existingNode, currentView);
67934
    }
67935
}
67936
/**
67937
 * Create a directive.
67938
 *
67939
 * NOTE: directives can be created in order other than the index order. They can also
67940
 *       be retrieved before they are created in which case the value will be null.
67941
 *
67942
 * @param directive The directive instance.
67943
 * @param directiveDef DirectiveDef object which contains information about the template.
67944
 */
67945
function directiveCreate(index, directive, directiveDef) {
67946
    var instance = baseDirectiveCreate(index, directive, directiveDef);
67947
    ngDevMode && assertNotNull(previousOrParentNode.tNode, 'previousOrParentNode.tNode');
67948
    var tNode = previousOrParentNode.tNode;
67949
    var isComponent = directiveDef.template;
67950
    if (isComponent) {
67951
        addComponentLogic(index, directive, directiveDef);
67952
    }
67953
    if (firstTemplatePass) {
67954
        // Init hooks are queued now so ngOnInit is called in host components before
67955
        // any projected components.
67956
        queueInitHooks(index, directiveDef.onInit, directiveDef.doCheck, currentView.tView);
67957
        if (directiveDef.hostBindings)
67958
            queueHostBindingForCheck(index);
67959
    }
67960
    if (tNode && tNode.attrs) {
67961
        setInputsFromAttrs(index, instance, directiveDef.inputs, tNode);
67962
    }
67963
    return instance;
67964
}
67965
function addComponentLogic(index, instance, def) {
67966
    var tView = getOrCreateTView(def.template, def.directiveDefs, def.pipeDefs);
67967
    // Only component views should be added to the view tree directly. Embedded views are
67968
    // accessed through their containers because they may be removed / re-added later.
67969
    var hostView = addToViewTree(currentView, createLView(-1, rendererFactory.createRenderer(previousOrParentNode.native, def.rendererType), tView, null, null, def.onPush ? 4 /* Dirty */ : 2 /* CheckAlways */));
67970
    previousOrParentNode.data = hostView;
67971
    hostView.node = previousOrParentNode;
67972
    initChangeDetectorIfExisting(previousOrParentNode.nodeInjector, instance, hostView);
67973
    if (firstTemplatePass)
67974
        queueComponentIndexForCheck(index);
67975
}
67976
/**
67977
 * A lighter version of directiveCreate() that is used for the root component
67978
 *
67979
 * This version does not contain features that we don't already support at root in
67980
 * current Angular. Example: local refs and inputs on root component.
67981
 */
67982
function baseDirectiveCreate(index, directive, directiveDef) {
67983
    ngDevMode &&
67984
        assertEqual(currentView.bindingStartIndex, -1, 'directives should be created before any bindings');
67985
    ngDevMode && assertPreviousIsParent();
67986
    Object.defineProperty(directive, NG_HOST_SYMBOL, { enumerable: false, value: previousOrParentNode });
67987
    if (directives == null)
67988
        currentView.directives = directives = [];
67989
    ngDevMode && assertDataNext(index, directives);
67990
    directives[index] = directive;
67991
    if (firstTemplatePass) {
67992
        var flags = previousOrParentNode.tNode.flags;
67993
        if ((flags & 4095 /* DirectiveCountMask */) === 0) {
67994
            // When the first directive is created:
67995
            // - save the index,
67996
            // - set the number of directives to 1
67997
            // When the first directive is created:
67998
            // - save the index,
67999
            // - set the number of directives to 1
68000
            previousOrParentNode.tNode.flags =
68001
                index << 13 /* DirectiveStartingIndexShift */ | flags & 4096 /* isComponent */ | 1;
68002
        }
68003
        else {
68004
            // Only need to bump the size when subsequent directives are created
68005
            ngDevMode && assertNotEqual(flags & 4095 /* DirectiveCountMask */, 4095 /* DirectiveCountMask */, 'Reached the max number of directives');
68006
            previousOrParentNode.tNode.flags++;
68007
        }
68008
    }
68009
    else {
68010
        var diPublic = directiveDef.diPublic;
68011
        if (diPublic)
68012
            diPublic((directiveDef));
68013
    }
68014
    if (directiveDef.attributes != null && previousOrParentNode.type == 3 /* Element */) {
68015
        setUpAttributes(previousOrParentNode.native, directiveDef.attributes);
68016
    }
68017
    return directive;
68018
}
68019
/**
68020
 * Sets initial input properties on directive instances from attribute data
68021
 *
68022
 * @param directiveIndex Index of the directive in directives array
68023
 * @param instance Instance of the directive on which to set the initial inputs
68024
 * @param inputs The list of inputs from the directive def
68025
 * @param tNode The static data for this node
68026
 */
68027
function setInputsFromAttrs(directiveIndex, instance, inputs, tNode) {
68028
    var initialInputData = tNode.initialInputs;
68029
    if (initialInputData === undefined || directiveIndex >= initialInputData.length) {
68030
        initialInputData = generateInitialInputs(directiveIndex, inputs, tNode);
68031
    }
68032
    var initialInputs = initialInputData[directiveIndex];
68033
    if (initialInputs) {
68034
        for (var i = 0; i < initialInputs.length; i += 2) {
68035
            instance[initialInputs[i]] = initialInputs[i + 1];
68036
        }
68037
    }
68038
}
68039
/**
68040
 * Generates initialInputData for a node and stores it in the template's static storage
68041
 * so subsequent template invocations don't have to recalculate it.
68042
 *
68043
 * initialInputData is an array containing values that need to be set as input properties
68044
 * for directives on this node, but only once on creation. We need this array to support
68045
 * the case where you set an @Input property of a directive using attribute-like syntax.
68046
 * e.g. if you have a `name` @Input, you can set it once like this:
68047
 *
68048
 * <my-component name="Bess"></my-component>
68049
 *
68050
 * @param directiveIndex Index to store the initial input data
68051
 * @param inputs The list of inputs from the directive def
68052
 * @param tNode The static data on this node
68053
 */
68054
function generateInitialInputs(directiveIndex, inputs, tNode) {
68055
    var initialInputData = tNode.initialInputs || (tNode.initialInputs = []);
68056
    initialInputData[directiveIndex] = null;
68057
    var attrs = (tNode.attrs);
68058
    for (var i = 0; i < attrs.length; i += 2) {
68059
        var attrName = attrs[i];
68060
        var minifiedInputName = inputs[attrName];
68061
        if (minifiedInputName !== undefined) {
68062
            var inputsToStore = initialInputData[directiveIndex] || (initialInputData[directiveIndex] = []);
68063
            inputsToStore.push(minifiedInputName, attrs[i + 1]);
68064
        }
68065
    }
68066
    return initialInputData;
68067
}
68068
function createLContainer(parentLNode, currentView, template) {
68069
    ngDevMode && assertNotNull(parentLNode, 'containers should have a parent');
68070
    return {
68071
        views: [],
68072
        nextIndex: 0,
68073
        // If the direct parent of the container is a view, its views will need to be added
68074
        // through insertView() when its parent view is being inserted:
68075
        renderParent: canInsertNativeNode(parentLNode, currentView) ? parentLNode : null,
68076
        template: template == null ? null : template,
68077
        next: null,
68078
        parent: currentView,
68079
        dynamicViewCount: 0,
68080
        queries: null
68081
    };
68082
}
68083
/**
68084
 * Creates an LContainerNode.
68085
 *
68086
 * Only `LViewNodes` can go into `LContainerNodes`.
68087
 *
68088
 * @param index The index of the container in the data array
68089
 * @param template Optional inline template
68090
 * @param tagName The name of the container element, if applicable
68091
 * @param attrs The attrs attached to the container, if applicable
68092
 * @param localRefs A set of local reference bindings on the element.
68093
 */
68094
function container(index, template, tagName, attrs, localRefs) {
68095
    ngDevMode && assertEqual(currentView.bindingStartIndex, -1, 'container nodes should be created before any bindings');
68096
    var currentParent = isParent ? previousOrParentNode : previousOrParentNode.parent;
68097
    var lContainer = createLContainer(currentParent, currentView, template);
68098
    var node = createLNode(index, 0 /* Container */, undefined, lContainer);
68099
    // Containers are added to the current view tree instead of their embedded views
68100
    // because views can be removed and re-inserted.
68101
    addToViewTree(currentView, node.data);
68102
    createDirectivesAndLocals(index, tagName || null, attrs, localRefs, []);
68103
    isParent = false;
68104
    ngDevMode && assertNodeType(previousOrParentNode, 0 /* Container */);
68105
    var queries = node.queries;
68106
    if (queries) {
68107
        // check if a given container node matches
68108
        queries.addNode(node);
68109
        // prepare place for matching nodes from views inserted into a given container
68110
        lContainer.queries = queries.container();
68111
    }
68112
}
68113
/**
68114
 * Sets a container up to receive views.
68115
 *
68116
 * @param index The index of the container in the data array
68117
 */
68118
function containerRefreshStart(index) {
68119
    ngDevMode && assertDataInRange(index);
68120
    previousOrParentNode = data[index];
68121
    ngDevMode && assertNodeType(previousOrParentNode, 0 /* Container */);
68122
    isParent = true;
68123
    previousOrParentNode.data.nextIndex = 0;
68124
    ngDevMode && assertSame(previousOrParentNode.native, undefined, "the container's native element should not have been set yet.");
68125
    if (!checkNoChangesMode) {
68126
        // We need to execute init hooks here so ngOnInit hooks are called in top level views
68127
        // before they are called in embedded views (for backwards compatibility).
68128
        executeInitHooks(currentView, currentView.tView, creationMode);
68129
    }
68130
}
68131
/**
68132
 * Marks the end of the LContainerNode.
68133
 *
68134
 * Marking the end of LContainerNode is the time when to child Views get inserted or removed.
68135
 */
68136
function containerRefreshEnd() {
68137
    if (isParent) {
68138
        isParent = false;
68139
    }
68140
    else {
68141
        ngDevMode && assertNodeType(previousOrParentNode, 2 /* View */);
68142
        ngDevMode && assertHasParent();
68143
        previousOrParentNode = (previousOrParentNode.parent);
68144
    }
68145
    ngDevMode && assertNodeType(previousOrParentNode, 0 /* Container */);
68146
    var container = previousOrParentNode;
68147
    container.native = undefined;
68148
    ngDevMode && assertNodeType(container, 0 /* Container */);
68149
    var nextIndex = container.data.nextIndex;
68150
    // remove extra views at the end of the container
68151
    while (nextIndex < container.data.views.length) {
68152
        removeView(container, nextIndex);
68153
    }
68154
}
68155
function refreshDynamicChildren() {
68156
    for (var current = currentView.child; current !== null; current = current.next) {
68157
        if (current.dynamicViewCount !== 0 && current.views) {
68158
            var container_1 = current;
68159
            for (var i = 0; i < container_1.views.length; i++) {
68160
                var view = container_1.views[i];
68161
                // The directives and pipes are not needed here as an existing view is only being refreshed.
68162
                renderEmbeddedTemplate(view, (view.data.template), (view.data.context), renderer);
68163
            }
68164
        }
68165
    }
68166
}
68167
/**
68168
 * Looks for a view with a given view block id inside a provided LContainer.
68169
 * Removes views that need to be deleted in the process.
68170
 *
68171
 * @param containerNode where to search for views
68172
 * @param startIdx starting index in the views array to search from
68173
 * @param viewBlockId exact view block id to look for
68174
 * @returns index of a found view or -1 if not found
68175
 */
68176
function scanForView(containerNode, startIdx, viewBlockId) {
68177
    var views = containerNode.data.views;
68178
    for (var i = startIdx; i < views.length; i++) {
68179
        var viewAtPositionId = views[i].data.id;
68180
        if (viewAtPositionId === viewBlockId) {
68181
            return views[i];
68182
        }
68183
        else if (viewAtPositionId < viewBlockId) {
68184
            // found a view that should not be at this position - remove
68185
            removeView(containerNode, i);
68186
        }
68187
        else {
68188
            // found a view with id grater than the one we are searching for
68189
            // which means that required view doesn't exist and can't be found at
68190
            // later positions in the views array - stop the search here
68191
            break;
68192
        }
68193
    }
68194
    return null;
68195
}
68196
/**
68197
 * Marks the start of an embedded view.
68198
 *
68199
 * @param viewBlockId The ID of this view
68200
 * @return boolean Whether or not this view is in creation mode
68201
 */
68202
function embeddedViewStart(viewBlockId) {
68203
    var container = (isParent ? previousOrParentNode : previousOrParentNode.parent);
68204
    ngDevMode && assertNodeType(container, 0 /* Container */);
68205
    var lContainer = container.data;
68206
    var viewNode = scanForView(container, lContainer.nextIndex, viewBlockId);
68207
    if (viewNode) {
68208
        previousOrParentNode = viewNode;
68209
        ngDevMode && assertNodeType(previousOrParentNode, 2 /* View */);
68210
        isParent = true;
68211
        enterView(viewNode.data, viewNode);
68212
    }
68213
    else {
68214
        // When we create a new LView, we always reset the state of the instructions.
68215
        var newView = createLView(viewBlockId, renderer, getOrCreateEmbeddedTView(viewBlockId, container), null, null, 2 /* CheckAlways */);
68216
        if (lContainer.queries) {
68217
            newView.queries = lContainer.queries.enterView(lContainer.nextIndex);
68218
        }
68219
        enterView(newView, viewNode = createLNode(null, 2 /* View */, null, newView));
68220
    }
68221
    return getRenderFlags(viewNode.data);
68222
}
68223
/**
68224
 * Initialize the TView (e.g. static data) for the active embedded view.
68225
 *
68226
 * Each embedded view needs to set the global tData variable to the static data for
68227
 * that view. Otherwise, the view's static data for a particular node would overwrite
68228
 * the static data for a node in the view above it with the same index (since it's in the
68229
 * same template).
68230
 *
68231
 * @param viewIndex The index of the TView in TContainer
68232
 * @param parent The parent container in which to look for the view's static data
68233
 * @returns TView
68234
 */
68235
function getOrCreateEmbeddedTView(viewIndex, parent) {
68236
    ngDevMode && assertNodeType(parent, 0 /* Container */);
68237
    var tContainer = parent.tNode.data;
68238
    if (viewIndex >= tContainer.length || tContainer[viewIndex] == null) {
68239
        var tView = currentView.tView;
68240
        tContainer[viewIndex] = createTView(tView.directiveRegistry, tView.pipeRegistry);
68241
    }
68242
    return tContainer[viewIndex];
68243
}
68244
/** Marks the end of an embedded view. */
68245
function embeddedViewEnd() {
68246
    refreshDirectives();
68247
    isParent = false;
68248
    var viewNode = previousOrParentNode = currentView.node;
68249
    var containerNode = previousOrParentNode.parent;
68250
    if (containerNode) {
68251
        ngDevMode && assertNodeType(viewNode, 2 /* View */);
68252
        ngDevMode && assertNodeType(containerNode, 0 /* Container */);
68253
        var lContainer = containerNode.data;
68254
        if (creationMode) {
68255
            // When projected nodes are going to be inserted, the renderParent of the dynamic container
68256
            // used by the ViewContainerRef must be set.
68257
            setRenderParentInProjectedNodes(lContainer.renderParent, viewNode);
68258
            // it is a new view, insert it into collection of views for a given container
68259
            insertView(containerNode, viewNode, lContainer.nextIndex);
68260
        }
68261
        lContainer.nextIndex++;
68262
    }
68263
    leaveView((currentView.parent));
68264
    ngDevMode && assertEqual(isParent, false, 'isParent');
68265
    ngDevMode && assertNodeType(previousOrParentNode, 2 /* View */);
68266
}
68267
/**
68268
 * For nodes which are projected inside an embedded view, this function sets the renderParent
68269
 * of their dynamic LContainerNode.
68270
 * @param renderParent the renderParent of the LContainer which contains the embedded view.
68271
 * @param viewNode the embedded view.
68272
 */
68273
function setRenderParentInProjectedNodes(renderParent, viewNode) {
68274
    if (renderParent != null) {
68275
        var node = viewNode.child;
68276
        while (node) {
68277
            if (node.type === 1 /* Projection */) {
68278
                var nodeToProject = node.data.head;
68279
                var lastNodeToProject = node.data.tail;
68280
                while (nodeToProject) {
68281
                    if (nodeToProject.dynamicLContainerNode) {
68282
                        nodeToProject.dynamicLContainerNode.data.renderParent = renderParent;
68283
                    }
68284
                    nodeToProject = nodeToProject === lastNodeToProject ? null : nodeToProject.pNextOrParent;
68285
                }
68286
            }
68287
            node = node.next;
68288
        }
68289
    }
68290
}
68291
/**
68292
 * Refreshes components by entering the component view and processing its bindings, queries, etc.
68293
 *
68294
 * @param directiveIndex
68295
 * @param elementIndex
68296
 */
68297
function componentRefresh(directiveIndex, elementIndex) {
68298
    ngDevMode && assertDataInRange(elementIndex);
68299
    var element = data[elementIndex];
68300
    ngDevMode && assertNodeType(element, 3 /* Element */);
68301
    ngDevMode && assertNotNull(element.data, "Component's host node should have an LView attached.");
68302
    var hostView = (element.data);
68303
    // Only attached CheckAlways components or attached, dirty OnPush components should be checked
68304
    if (viewAttached(hostView) && hostView.flags & (2 /* CheckAlways */ | 4 /* Dirty */)) {
68305
        ngDevMode && assertDataInRange(directiveIndex, (directives));
68306
        var def = currentView.tView.directives[directiveIndex];
68307
        detectChangesInternal(hostView, element, def, getDirectiveInstance(directives[directiveIndex]));
68308
    }
68309
}
68310
/** Returns a boolean for whether the view is attached */
68311
function viewAttached(view) {
68312
    return (view.flags & 8 /* Attached */) === 8 /* Attached */;
68313
}
68314
/**
68315
 * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.
68316
 * It takes all the selectors from the entire component's template and decides where
68317
 * each projected node belongs (it re-distributes nodes among "buckets" where each "bucket" is
68318
 * backed by a selector).
68319
 *
68320
 * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text,
68321
 * un-parsed form.
68322
 *
68323
 * The parsed form is needed for efficient matching of a node against a given CSS selector.
68324
 * The un-parsed, textual form is needed for support of the ngProjectAs attribute.
68325
 *
68326
 * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more
68327
 * drawbacks:
68328
 * - having only a textual form would require runtime parsing of CSS selectors;
68329
 * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a
68330
 * template author).
68331
 *
68332
 * @param selectors A collection of parsed CSS selectors
68333
 * @param rawSelectors A collection of CSS selectors in the raw, un-parsed form
68334
 */
68335
function projectionDef(index, selectors, textSelectors) {
68336
    var noOfNodeBuckets = selectors ? selectors.length + 1 : 1;
68337
    var distributedNodes = new Array(noOfNodeBuckets);
68338
    for (var i = 0; i < noOfNodeBuckets; i++) {
68339
        distributedNodes[i] = [];
68340
    }
68341
    var componentNode = findComponentHost(currentView);
68342
    var componentChild = componentNode.child;
68343
    while (componentChild !== null) {
68344
        // execute selector matching logic if and only if:
68345
        // - there are selectors defined
68346
        // - a node has a tag name / attributes that can be matched
68347
        if (selectors && componentChild.tNode) {
68348
            var matchedIdx = matchingSelectorIndex(componentChild.tNode, selectors, (textSelectors));
68349
            distributedNodes[matchedIdx].push(componentChild);
68350
        }
68351
        else {
68352
            distributedNodes[0].push(componentChild);
68353
        }
68354
        componentChild = componentChild.next;
68355
    }
68356
    ngDevMode && assertDataNext(index);
68357
    data[index] = distributedNodes;
68358
}
68359
/**
68360
 * Updates the linked list of a projection node, by appending another linked list.
68361
 *
68362
 * @param projectionNode Projection node whose projected nodes linked list has to be updated
68363
 * @param appendedFirst First node of the linked list to append.
68364
 * @param appendedLast Last node of the linked list to append.
68365
 */
68366
function appendToProjectionNode(projectionNode, appendedFirst, appendedLast) {
68367
    ngDevMode && assertEqual(!!appendedFirst, !!appendedLast, 'appendedFirst can be null if and only if appendedLast is also null');
68368
    if (!appendedLast) {
68369
        // nothing to append
68370
        return;
68371
    }
68372
    var projectionNodeData = projectionNode.data;
68373
    if (projectionNodeData.tail) {
68374
        projectionNodeData.tail.pNextOrParent = appendedFirst;
68375
    }
68376
    else {
68377
        projectionNodeData.head = appendedFirst;
68378
    }
68379
    projectionNodeData.tail = appendedLast;
68380
    appendedLast.pNextOrParent = projectionNode;
68381
}
68382
/**
68383
 * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call
68384
 * to the projectionDef instruction.
68385
 *
68386
 * @param nodeIndex
68387
 * @param localIndex - index under which distribution of projected nodes was memorized
68388
 * @param selectorIndex - 0 means <ng-content> without any selector
68389
 * @param attrs - attributes attached to the ng-content node, if present
68390
 */
68391
function projection(nodeIndex, localIndex, selectorIndex, attrs) {
68392
    if (selectorIndex === void 0) { selectorIndex = 0; }
68393
    var node = createLNode(nodeIndex, 1 /* Projection */, null, { head: null, tail: null });
68394
    if (node.tNode == null) {
68395
        node.tNode = createTNode(null, attrs || null, null);
68396
    }
68397
    isParent = false; // self closing
68398
    var currentParent = node.parent;
68399
    // re-distribution of projectable nodes is memorized on a component's view level
68400
    var componentNode = findComponentHost(currentView);
68401
    // make sure that nodes to project were memorized
68402
    var nodesForSelector = componentNode.data.data[localIndex][selectorIndex];
68403
    // build the linked list of projected nodes:
68404
    for (var i = 0; i < nodesForSelector.length; i++) {
68405
        var nodeToProject = nodesForSelector[i];
68406
        if (nodeToProject.type === 1 /* Projection */) {
68407
            var previouslyProjected = nodeToProject.data;
68408
            appendToProjectionNode(node, previouslyProjected.head, previouslyProjected.tail);
68409
        }
68410
        else {
68411
            appendToProjectionNode(node, nodeToProject, nodeToProject);
68412
        }
68413
    }
68414
    if (canInsertNativeNode(currentParent, currentView)) {
68415
        ngDevMode && assertNodeType(currentParent, 3 /* Element */);
68416
        // process each node in the list of projected nodes:
68417
        var nodeToProject = node.data.head;
68418
        var lastNodeToProject = node.data.tail;
68419
        while (nodeToProject) {
68420
            appendProjectedNode(nodeToProject, currentParent, currentView);
68421
            nodeToProject = nodeToProject === lastNodeToProject ? null : nodeToProject.pNextOrParent;
68422
        }
68423
    }
68424
}
68425
/**
68426
 * Given a current view, finds the nearest component's host (LElement).
68427
 *
68428
 * @param lView LView for which we want a host element node
68429
 * @returns The host node
68430
 */
68431
function findComponentHost(lView) {
68432
    var viewRootLNode = lView.node;
68433
    while (viewRootLNode.type === 2 /* View */) {
68434
        ngDevMode && assertNotNull(lView.parent, 'lView.parent');
68435
        lView = (lView.parent);
68436
        viewRootLNode = lView.node;
68437
    }
68438
    ngDevMode && assertNodeType(viewRootLNode, 3 /* Element */);
68439
    ngDevMode && assertNotNull(viewRootLNode.data, 'node.data');
68440
    return viewRootLNode;
68441
}
68442
/**
68443
 * Adds a LView or a LContainer to the end of the current view tree.
68444
 *
68445
 * This structure will be used to traverse through nested views to remove listeners
68446
 * and call onDestroy callbacks.
68447
 *
68448
 * @param currentView The view where LView or LContainer should be added
68449
 * @param state The LView or LContainer to add to the view tree
68450
 * @returns The state passed in
68451
 */
68452
function addToViewTree(currentView, state) {
68453
    currentView.tail ? (currentView.tail.next = state) : (currentView.child = state);
68454
    currentView.tail = state;
68455
    return state;
68456
}
68457
/** If node is an OnPush component, marks its LView dirty. */
68458
function markDirtyIfOnPush(node) {
68459
    // Because data flows down the component tree, ancestors do not need to be marked dirty
68460
    if (node.data && !(node.data.flags & 2 /* CheckAlways */)) {
68461
        node.data.flags |= 4 /* Dirty */;
68462
    }
68463
}
68464
/**
68465
 * Wraps an event listener so its host view and its ancestor views will be marked dirty
68466
 * whenever the event fires. Necessary to support OnPush components.
68467
 */
68468
function wrapListenerWithDirtyLogic(view, listenerFn) {
68469
    return function (e) {
68470
        markViewDirty(view);
68471
        return listenerFn(e);
68472
    };
68473
}
68474
/**
68475
 * Wraps an event listener so its host view and its ancestor views will be marked dirty
68476
 * whenever the event fires. Also wraps with preventDefault behavior.
68477
 */
68478
function wrapListenerWithDirtyAndDefault(view, listenerFn) {
68479
    return function wrapListenerIn_markViewDirty(e) {
68480
        markViewDirty(view);
68481
        if (listenerFn(e) === false) {
68482
            e.preventDefault();
68483
            // Necessary for legacy browsers that don't support preventDefault (e.g. IE)
68484
            e.returnValue = false;
68485
        }
68486
    };
68487
}
68488
/** Marks current view and all ancestors dirty */
68489
function markViewDirty(view) {
68490
    var currentView = view;
68491
    while (currentView.parent != null) {
68492
        currentView.flags |= 4 /* Dirty */;
68493
        currentView = currentView.parent;
68494
    }
68495
    currentView.flags |= 4 /* Dirty */;
68496
    ngDevMode && assertNotNull(currentView.context, 'rootContext');
68497
    scheduleTick(currentView.context);
68498
}
68499
/**
68500
 * Used to schedule change detection on the whole application.
68501
 *
68502
 * Unlike `tick`, `scheduleTick` coalesces multiple calls into one change detection run.
68503
 * It is usually called indirectly by calling `markDirty` when the view needs to be
68504
 * re-rendered.
68505
 *
68506
 * Typically `scheduleTick` uses `requestAnimationFrame` to coalesce multiple
68507
 * `scheduleTick` requests. The scheduling function can be overridden in
68508
 * `renderComponent`'s `scheduler` option.
68509
 */
68510
function scheduleTick(rootContext) {
68511
    if (rootContext.clean == _CLEAN_PROMISE) {
68512
        var res_1;
68513
        rootContext.clean = new Promise(function (r) { return res_1 = r; });
68514
        rootContext.scheduler(function () {
68515
            tick(rootContext.component);
68516
            res_1(null);
68517
            rootContext.clean = _CLEAN_PROMISE;
68518
        });
68519
    }
68520
}
68521
/**
68522
 * Used to perform change detection on the whole application.
68523
 *
68524
 * This is equivalent to `detectChanges`, but invoked on root component. Additionally, `tick`
68525
 * executes lifecycle hooks and conditionally checks components based on their
68526
 * `ChangeDetectionStrategy` and dirtiness.
68527
 *
68528
 * The preferred way to trigger change detection is to call `markDirty`. `markDirty` internally
68529
 * schedules `tick` using a scheduler in order to coalesce multiple `markDirty` calls into a
68530
 * single change detection run. By default, the scheduler is `requestAnimationFrame`, but can
68531
 * be changed when calling `renderComponent` and providing the `scheduler` option.
68532
 */
68533
function tick(component) {
68534
    var rootView = getRootView(component);
68535
    var rootComponent = rootView.context.component;
68536
    var hostNode = _getComponentHostLElementNode(rootComponent);
68537
    ngDevMode && assertNotNull(hostNode.data, 'Component host node should be attached to an LView');
68538
    renderComponentOrTemplate(hostNode, rootView, rootComponent);
68539
}
68540
/**
68541
 * Retrieve the root view from any component by walking the parent `LView` until
68542
 * reaching the root `LView`.
68543
 *
68544
 * @param component any component
68545
 */
68546
function getRootView(component) {
68547
    ngDevMode && assertNotNull(component, 'component');
68548
    var lElementNode = _getComponentHostLElementNode(component);
68549
    var lView = lElementNode.view;
68550
    while (lView.parent) {
68551
        lView = lView.parent;
68552
    }
68553
    return lView;
68554
}
68555
/**
68556
 * Synchronously perform change detection on a component (and possibly its sub-components).
68557
 *
68558
 * This function triggers change detection in a synchronous way on a component. There should
68559
 * be very little reason to call this function directly since a preferred way to do change
68560
 * detection is to {@link markDirty} the component and wait for the scheduler to call this method
68561
 * at some future point in time. This is because a single user action often results in many
68562
 * components being invalidated and calling change detection on each component synchronously
68563
 * would be inefficient. It is better to wait until all components are marked as dirty and
68564
 * then perform single change detection across all of the components
68565
 *
68566
 * @param component The component which the change detection should be performed on.
68567
 */
68568
function detectChanges(component) {
68569
    var hostNode = _getComponentHostLElementNode(component);
68570
    ngDevMode && assertNotNull(hostNode.data, 'Component host node should be attached to an LView');
68571
    var componentIndex = hostNode.tNode.flags >> 13;
68572
    var def = hostNode.view.tView.directives[componentIndex];
68573
    detectChangesInternal(hostNode.data, hostNode, def, component);
68574
}
68575
/**
68576
 * Checks the change detector and its children, and throws if any changes are detected.
68577
 *
68578
 * This is used in development mode to verify that running change detection doesn't
68579
 * introduce other changes.
68580
 */
68581
function checkNoChanges(component) {
68582
    checkNoChangesMode = true;
68583
    try {
68584
        detectChanges(component);
68585
    }
68586
    finally {
68587
        checkNoChangesMode = false;
68588
    }
68589
}
68590
/** Checks the view of the component provided. Does not gate on dirty checks or execute doCheck. */
68591
function detectChangesInternal(hostView, hostNode, def, component) {
68592
    var oldView = enterView(hostView, hostNode);
68593
    var template = def.template;
68594
    try {
68595
        template(getRenderFlags(hostView), component);
68596
        refreshDirectives();
68597
        refreshDynamicChildren();
68598
    }
68599
    finally {
68600
        leaveView(oldView);
68601
    }
68602
}
68603
/**
68604
 * Mark the component as dirty (needing change detection).
68605
 *
68606
 * Marking a component dirty will schedule a change detection on this
68607
 * component at some point in the future. Marking an already dirty
68608
 * component as dirty is a noop. Only one outstanding change detection
68609
 * can be scheduled per component tree. (Two components bootstrapped with
68610
 * separate `renderComponent` will have separate schedulers)
68611
 *
68612
 * When the root component is bootstrapped with `renderComponent`, a scheduler
68613
 * can be provided.
68614
 *
68615
 * @param component Component to mark as dirty.
68616
 */
68617
function markDirty(component) {
68618
    ngDevMode && assertNotNull(component, 'component');
68619
    var lElementNode = _getComponentHostLElementNode(component);
68620
    markViewDirty(lElementNode.view);
68621
}
68622
/** A special value which designates that a value has not changed. */
68623
var NO_CHANGE = {};
68624
/**
68625
 *  Initializes the binding start index. Will get inlined.
68626
 *
68627
 *  This function must be called before any binding related function is called
68628
 *  (ie `bind()`, `interpolationX()`, `pureFunctionX()`)
68629
 */
68630
function initBindings() {
68631
    ngDevMode && assertEqual(currentView.bindingStartIndex, -1, 'Binding start index should only be set once, when null');
68632
    ngDevMode && assertEqual(currentView.bindingIndex, -1, 'Binding index should not yet be set ' + currentView.bindingIndex);
68633
    currentView.bindingIndex = currentView.bindingStartIndex = data.length;
68634
}
68635
/**
68636
 * Creates a single value binding.
68637
 *
68638
 * @param value Value to diff
68639
 */
68640
function bind(value) {
68641
    if (currentView.bindingStartIndex < 0) {
68642
        initBindings();
68643
        return data[currentView.bindingIndex++] = value;
68644
    }
68645
    var changed = value !== NO_CHANGE && isDifferent(data[currentView.bindingIndex], value);
68646
    if (changed) {
68647
        throwErrorIfNoChangesMode(creationMode, checkNoChangesMode, data[currentView.bindingIndex], value);
68648
        data[currentView.bindingIndex] = value;
68649
    }
68650
    currentView.bindingIndex++;
68651
    return changed ? value : NO_CHANGE;
68652
}
68653
/**
68654
 * Create interpolation bindings with a variable number of expressions.
68655
 *
68656
 * If there are 1 to 8 expressions `interpolation1()` to `interpolation8()` should be used instead.
68657
 * Those are faster because there is no need to create an array of expressions and iterate over it.
68658
 *
68659
 * `values`:
68660
 * - has static text at even indexes,
68661
 * - has evaluated expressions at odd indexes.
68662
 *
68663
 * Returns the concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.
68664
 */
68665
function interpolationV(values) {
68666
    ngDevMode && assertLessThan(2, values.length, 'should have at least 3 values');
68667
    ngDevMode && assertEqual(values.length % 2, 1, 'should have an odd number of values');
68668
    var different = false;
68669
    for (var i = 1; i < values.length; i += 2) {
68670
        // Check if bindings (odd indexes) have changed
68671
        bindingUpdated(values[i]) && (different = true);
68672
    }
68673
    if (!different) {
68674
        return NO_CHANGE;
68675
    }
68676
    // Build the updated content
68677
    var content = values[0];
68678
    for (var i = 1; i < values.length; i += 2) {
68679
        content += stringify$1(values[i]) + values[i + 1];
68680
    }
68681
    return content;
68682
}
68683
/**
68684
 * Creates an interpolation binding with 1 expression.
68685
 *
68686
 * @param prefix static value used for concatenation only.
68687
 * @param v0 value checked for change.
68688
 * @param suffix static value used for concatenation only.
68689
 */
68690
function interpolation1(prefix, v0, suffix) {
68691
    var different = bindingUpdated(v0);
68692
    return different ? prefix + stringify$1(v0) + suffix : NO_CHANGE;
68693
}
68694
/** Creates an interpolation binding with 2 expressions. */
68695
function interpolation2(prefix, v0, i0, v1, suffix) {
68696
    var different = bindingUpdated2(v0, v1);
68697
    return different ? prefix + stringify$1(v0) + i0 + stringify$1(v1) + suffix : NO_CHANGE;
68698
}
68699
/** Creates an interpolation bindings with 3 expressions. */
68700
function interpolation3(prefix, v0, i0, v1, i1, v2, suffix) {
68701
    var different = bindingUpdated2(v0, v1);
68702
    different = bindingUpdated(v2) || different;
68703
    return different ? prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + suffix :
68704
        NO_CHANGE;
68705
}
68706
/** Create an interpolation binding with 4 expressions. */
68707
function interpolation4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {
68708
    var different = bindingUpdated4(v0, v1, v2, v3);
68709
    return different ?
68710
        prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) +
68711
            suffix :
68712
        NO_CHANGE;
68713
}
68714
/** Creates an interpolation binding with 5 expressions. */
68715
function interpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {
68716
    var different = bindingUpdated4(v0, v1, v2, v3);
68717
    different = bindingUpdated(v4) || different;
68718
    return different ?
68719
        prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) + i3 +
68720
            stringify$1(v4) + suffix :
68721
        NO_CHANGE;
68722
}
68723
/** Creates an interpolation binding with 6 expressions. */
68724
function interpolation6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {
68725
    var different = bindingUpdated4(v0, v1, v2, v3);
68726
    different = bindingUpdated2(v4, v5) || different;
68727
    return different ?
68728
        prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) + i3 +
68729
            stringify$1(v4) + i4 + stringify$1(v5) + suffix :
68730
        NO_CHANGE;
68731
}
68732
/** Creates an interpolation binding with 7 expressions. */
68733
function interpolation7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {
68734
    var different = bindingUpdated4(v0, v1, v2, v3);
68735
    different = bindingUpdated2(v4, v5) || different;
68736
    different = bindingUpdated(v6) || different;
68737
    return different ?
68738
        prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) + i3 +
68739
            stringify$1(v4) + i4 + stringify$1(v5) + i5 + stringify$1(v6) + suffix :
68740
        NO_CHANGE;
68741
}
68742
/** Creates an interpolation binding with 8 expressions. */
68743
function interpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {
68744
    var different = bindingUpdated4(v0, v1, v2, v3);
68745
    different = bindingUpdated4(v4, v5, v6, v7) || different;
68746
    return different ?
68747
        prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) + i3 +
68748
            stringify$1(v4) + i4 + stringify$1(v5) + i5 + stringify$1(v6) + i6 + stringify$1(v7) + suffix :
68749
        NO_CHANGE;
68750
}
68751
/** Store a value in the `data` at a given `index`. */
68752
function store(index, value) {
68753
    // We don't store any static data for local variables, so the first time
68754
    // we see the template, we should store as null to avoid a sparse array
68755
    if (index >= tData.length) {
68756
        tData[index] = null;
68757
    }
68758
    data[index] = value;
68759
}
68760
/** Retrieves a value from the `data`. */
68761
function load(index) {
68762
    ngDevMode && assertDataInRange(index);
68763
    return data[index];
68764
}
68765
/** Retrieves a value from the `directives` array. */
68766
function loadDirective(index) {
68767
    ngDevMode && assertNotNull(directives, 'Directives array should be defined if reading a dir.');
68768
    ngDevMode && assertDataInRange(index, (directives));
68769
    return directives[index];
68770
}
68771
/** Gets the current binding value and increments the binding index. */
68772
function consumeBinding() {
68773
    ngDevMode && assertDataInRange(currentView.bindingIndex);
68774
    ngDevMode &&
68775
        assertNotEqual(data[currentView.bindingIndex], NO_CHANGE, 'Stored value should never be NO_CHANGE.');
68776
    return data[currentView.bindingIndex++];
68777
}
68778
/** Updates binding if changed, then returns whether it was updated. */
68779
function bindingUpdated(value) {
68780
    ngDevMode && assertNotEqual(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');
68781
    if (currentView.bindingStartIndex < 0) {
68782
        initBindings();
68783
    }
68784
    else if (isDifferent(data[currentView.bindingIndex], value)) {
68785
        throwErrorIfNoChangesMode(creationMode, checkNoChangesMode, data[currentView.bindingIndex], value);
68786
    }
68787
    else {
68788
        currentView.bindingIndex++;
68789
        return false;
68790
    }
68791
    data[currentView.bindingIndex++] = value;
68792
    return true;
68793
}
68794
/** Updates binding if changed, then returns the latest value. */
68795
function checkAndUpdateBinding$1(value) {
68796
    bindingUpdated(value);
68797
    return value;
68798
}
68799
/** Updates 2 bindings if changed, then returns whether either was updated. */
68800
function bindingUpdated2(exp1, exp2) {
68801
    var different = bindingUpdated(exp1);
68802
    return bindingUpdated(exp2) || different;
68803
}
68804
/** Updates 4 bindings if changed, then returns whether any was updated. */
68805
function bindingUpdated4(exp1, exp2, exp3, exp4) {
68806
    var different = bindingUpdated2(exp1, exp2);
68807
    return bindingUpdated2(exp3, exp4) || different;
68808
}
68809
function getTView() {
68810
    return currentView.tView;
68811
}
68812
function getDirectiveInstance(instanceOrArray) {
68813
    // Directives with content queries store an array in directives[directiveIndex]
68814
    // with the instance as the first index
68815
    return Array.isArray(instanceOrArray) ? instanceOrArray[0] : instanceOrArray;
68816
}
68817
function assertPreviousIsParent() {
68818
    assertEqual(isParent, true, 'previousOrParentNode should be a parent');
68819
}
68820
function assertHasParent() {
68821
    assertNotNull(previousOrParentNode.parent, 'previousOrParentNode should have a parent');
68822
}
68823
function assertDataInRange(index, arr) {
68824
    if (arr == null)
68825
        arr = data;
68826
    assertLessThan(index, arr ? arr.length : 0, 'index expected to be a valid data index');
68827
}
68828
function assertDataNext(index, arr) {
68829
    if (arr == null)
68830
        arr = data;
68831
    assertEqual(arr.length, index, "index " + index + " expected to be at the end of arr (length " + arr.length + ")");
68832
}
68833
function _getComponentHostLElementNode(component) {
68834
    ngDevMode && assertNotNull(component, 'expecting component got null');
68835
    var lElementNode = component[NG_HOST_SYMBOL];
68836
    ngDevMode && assertNotNull(component, 'object is not a component');
68837
    return lElementNode;
68838
}
68839
var CLEAN_PROMISE = _CLEAN_PROMISE;
68840
var ROOT_DIRECTIVE_INDICES = _ROOT_DIRECTIVE_INDICES;
68841
 
68842
/**
68843
 * @license
68844
 * Copyright Google Inc. All Rights Reserved.
68845
 *
68846
 * Use of this source code is governed by an MIT-style license that can be
68847
 * found in the LICENSE file at https://angular.io/license
68848
 */
68849
var ViewRef$1 = /** @class */ (function () {
68850
    function ViewRef(_view, context) {
68851
        this._view = _view;
68852
        this.context = (context);
68853
    }
68854
    /** @internal */
68855
    /** @internal */
68856
    ViewRef.prototype._setComponentContext = /** @internal */
68857
    function (view, context) {
68858
        this._view = view;
68859
        this.context = context;
68860
    };
68861
    ViewRef.prototype.destroy = function () {  };
68862
    ViewRef.prototype.onDestroy = function (callback) {  };
68863
    /**
68864
     * Marks a view and all of its ancestors dirty.
68865
     *
68866
     * It also triggers change detection by calling `scheduleTick` internally, which coalesces
68867
     * multiple `markForCheck` calls to into one change detection run.
68868
     *
68869
     * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is
68870
     * checked when it needs to be re-rendered but the two normal triggers haven't marked it
68871
     * dirty (i.e. inputs haven't changed and events haven't fired in the view).
68872
     *
68873
     * <!-- TODO: Add a link to a chapter on OnPush components -->
68874
     *
68875
     * ### Example ([live demo](https://stackblitz.com/edit/angular-kx7rrw))
68876
     *
68877
     * ```typescript
68878
     * @Component({
68879
     *   selector: 'my-app',
68880
     *   template: `Number of ticks: {{numberOfTicks}}`
68881
     *   changeDetection: ChangeDetectionStrategy.OnPush,
68882
     * })
68883
     * class AppComponent {
68884
     *   numberOfTicks = 0;
68885
     *
68886
     *   constructor(private ref: ChangeDetectorRef) {
68887
     *     setInterval(() => {
68888
     *       this.numberOfTicks++;
68889
     *       // the following is required, otherwise the view will not be updated
68890
     *       this.ref.markForCheck();
68891
     *     }, 1000);
68892
     *   }
68893
     * }
68894
     * ```
68895
     */
68896
    /**
68897
       * Marks a view and all of its ancestors dirty.
68898
       *
68899
       * It also triggers change detection by calling `scheduleTick` internally, which coalesces
68900
       * multiple `markForCheck` calls to into one change detection run.
68901
       *
68902
       * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is
68903
       * checked when it needs to be re-rendered but the two normal triggers haven't marked it
68904
       * dirty (i.e. inputs haven't changed and events haven't fired in the view).
68905
       *
68906
       * <!-- TODO: Add a link to a chapter on OnPush components -->
68907
       *
68908
       * ### Example ([live demo](https://stackblitz.com/edit/angular-kx7rrw))
68909
       *
68910
       * ```typescript
68911
       * @Component({
68912
       *   selector: 'my-app',
68913
       *   template: `Number of ticks: {{numberOfTicks}}`
68914
       *   changeDetection: ChangeDetectionStrategy.OnPush,
68915
       * })
68916
       * class AppComponent {
68917
       *   numberOfTicks = 0;
68918
       *
68919
       *   constructor(private ref: ChangeDetectorRef) {
68920
       *     setInterval(() => {
68921
       *       this.numberOfTicks++;
68922
       *       // the following is required, otherwise the view will not be updated
68923
       *       this.ref.markForCheck();
68924
       *     }, 1000);
68925
       *   }
68926
       * }
68927
       * ```
68928
       */
68929
    ViewRef.prototype.markForCheck = /**
68930
       * Marks a view and all of its ancestors dirty.
68931
       *
68932
       * It also triggers change detection by calling `scheduleTick` internally, which coalesces
68933
       * multiple `markForCheck` calls to into one change detection run.
68934
       *
68935
       * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is
68936
       * checked when it needs to be re-rendered but the two normal triggers haven't marked it
68937
       * dirty (i.e. inputs haven't changed and events haven't fired in the view).
68938
       *
68939
       * <!-- TODO: Add a link to a chapter on OnPush components -->
68940
       *
68941
       * ### Example ([live demo](https://stackblitz.com/edit/angular-kx7rrw))
68942
       *
68943
       * ```typescript
68944
       * @Component({
68945
       *   selector: 'my-app',
68946
       *   template: `Number of ticks: {{numberOfTicks}}`
68947
       *   changeDetection: ChangeDetectionStrategy.OnPush,
68948
       * })
68949
       * class AppComponent {
68950
       *   numberOfTicks = 0;
68951
       *
68952
       *   constructor(private ref: ChangeDetectorRef) {
68953
       *     setInterval(() => {
68954
       *       this.numberOfTicks++;
68955
       *       // the following is required, otherwise the view will not be updated
68956
       *       this.ref.markForCheck();
68957
       *     }, 1000);
68958
       *   }
68959
       * }
68960
       * ```
68961
       */
68962
    function () { markViewDirty(this._view); };
68963
    /**
68964
     * Detaches the view from the change detection tree.
68965
     *
68966
     * Detached views will not be checked during change detection runs until they are
68967
     * re-attached, even if they are dirty. `detach` can be used in combination with
68968
     * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change
68969
     * detection checks.
68970
     *
68971
     * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
68972
     * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
68973
     *
68974
     * ### Example
68975
     *
68976
     * The following example defines a component with a large list of readonly data.
68977
     * Imagine the data changes constantly, many times per second. For performance reasons,
68978
     * we want to check and update the list every five seconds. We can do that by detaching
68979
     * the component's change detector and doing a local check every five seconds.
68980
     *
68981
     * ```typescript
68982
     * class DataProvider {
68983
     *   // in a real application the returned data will be different every time
68984
     *   get data() {
68985
     *     return [1,2,3,4,5];
68986
     *   }
68987
     * }
68988
     *
68989
     * @Component({
68990
     *   selector: 'giant-list',
68991
     *   template: `
68992
     *     <li *ngFor="let d of dataProvider.data">Data {{d}}</li>
68993
     *   `,
68994
     * })
68995
     * class GiantList {
68996
     *   constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {
68997
     *     ref.detach();
68998
     *     setInterval(() => {
68999
     *       this.ref.detectChanges();
69000
     *     }, 5000);
69001
     *   }
69002
     * }
69003
     *
69004
     * @Component({
69005
     *   selector: 'app',
69006
     *   providers: [DataProvider],
69007
     *   template: `
69008
     *     <giant-list><giant-list>
69009
     *   `,
69010
     * })
69011
     * class App {
69012
     * }
69013
     * ```
69014
     */
69015
    /**
69016
       * Detaches the view from the change detection tree.
69017
       *
69018
       * Detached views will not be checked during change detection runs until they are
69019
       * re-attached, even if they are dirty. `detach` can be used in combination with
69020
       * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change
69021
       * detection checks.
69022
       *
69023
       * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
69024
       * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
69025
       *
69026
       * ### Example
69027
       *
69028
       * The following example defines a component with a large list of readonly data.
69029
       * Imagine the data changes constantly, many times per second. For performance reasons,
69030
       * we want to check and update the list every five seconds. We can do that by detaching
69031
       * the component's change detector and doing a local check every five seconds.
69032
       *
69033
       * ```typescript
69034
       * class DataProvider {
69035
       *   // in a real application the returned data will be different every time
69036
       *   get data() {
69037
       *     return [1,2,3,4,5];
69038
       *   }
69039
       * }
69040
       *
69041
       * @Component({
69042
       *   selector: 'giant-list',
69043
       *   template: `
69044
       *     <li *ngFor="let d of dataProvider.data">Data {{d}}</li>
69045
       *   `,
69046
       * })
69047
       * class GiantList {
69048
       *   constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {
69049
       *     ref.detach();
69050
       *     setInterval(() => {
69051
       *       this.ref.detectChanges();
69052
       *     }, 5000);
69053
       *   }
69054
       * }
69055
       *
69056
       * @Component({
69057
       *   selector: 'app',
69058
       *   providers: [DataProvider],
69059
       *   template: `
69060
       *     <giant-list><giant-list>
69061
       *   `,
69062
       * })
69063
       * class App {
69064
       * }
69065
       * ```
69066
       */
69067
    ViewRef.prototype.detach = /**
69068
       * Detaches the view from the change detection tree.
69069
       *
69070
       * Detached views will not be checked during change detection runs until they are
69071
       * re-attached, even if they are dirty. `detach` can be used in combination with
69072
       * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change
69073
       * detection checks.
69074
       *
69075
       * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
69076
       * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
69077
       *
69078
       * ### Example
69079
       *
69080
       * The following example defines a component with a large list of readonly data.
69081
       * Imagine the data changes constantly, many times per second. For performance reasons,
69082
       * we want to check and update the list every five seconds. We can do that by detaching
69083
       * the component's change detector and doing a local check every five seconds.
69084
       *
69085
       * ```typescript
69086
       * class DataProvider {
69087
       *   // in a real application the returned data will be different every time
69088
       *   get data() {
69089
       *     return [1,2,3,4,5];
69090
       *   }
69091
       * }
69092
       *
69093
       * @Component({
69094
       *   selector: 'giant-list',
69095
       *   template: `
69096
       *     <li *ngFor="let d of dataProvider.data">Data {{d}}</li>
69097
       *   `,
69098
       * })
69099
       * class GiantList {
69100
       *   constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {
69101
       *     ref.detach();
69102
       *     setInterval(() => {
69103
       *       this.ref.detectChanges();
69104
       *     }, 5000);
69105
       *   }
69106
       * }
69107
       *
69108
       * @Component({
69109
       *   selector: 'app',
69110
       *   providers: [DataProvider],
69111
       *   template: `
69112
       *     <giant-list><giant-list>
69113
       *   `,
69114
       * })
69115
       * class App {
69116
       * }
69117
       * ```
69118
       */
69119
    function () { this._view.flags &= ~8 /* Attached */; };
69120
    /**
69121
     * Re-attaches a view to the change detection tree.
69122
     *
69123
     * This can be used to re-attach views that were previously detached from the tree
69124
     * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.
69125
     *
69126
     * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
69127
     *
69128
     * ### Example ([live demo](https://stackblitz.com/edit/angular-ymgsxw))
69129
     *
69130
     * The following example creates a component displaying `live` data. The component will detach
69131
     * its change detector from the main change detector tree when the component's live property
69132
     * is set to false.
69133
     *
69134
     * ```typescript
69135
     * class DataProvider {
69136
     *   data = 1;
69137
     *
69138
     *   constructor() {
69139
     *     setInterval(() => {
69140
     *       this.data = this.data * 2;
69141
     *     }, 500);
69142
     *   }
69143
     * }
69144
     *
69145
     * @Component({
69146
     *   selector: 'live-data',
69147
     *   inputs: ['live'],
69148
     *   template: 'Data: {{dataProvider.data}}'
69149
     * })
69150
     * class LiveData {
69151
     *   constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}
69152
     *
69153
     *   set live(value) {
69154
     *     if (value) {
69155
     *       this.ref.reattach();
69156
     *     } else {
69157
     *       this.ref.detach();
69158
     *     }
69159
     *   }
69160
     * }
69161
     *
69162
     * @Component({
69163
     *   selector: 'my-app',
69164
     *   providers: [DataProvider],
69165
     *   template: `
69166
     *     Live Update: <input type="checkbox" [(ngModel)]="live">
69167
     *     <live-data [live]="live"><live-data>
69168
     *   `,
69169
     * })
69170
     * class AppComponent {
69171
     *   live = true;
69172
     * }
69173
     * ```
69174
     */
69175
    /**
69176
       * Re-attaches a view to the change detection tree.
69177
       *
69178
       * This can be used to re-attach views that were previously detached from the tree
69179
       * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.
69180
       *
69181
       * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
69182
       *
69183
       * ### Example ([live demo](https://stackblitz.com/edit/angular-ymgsxw))
69184
       *
69185
       * The following example creates a component displaying `live` data. The component will detach
69186
       * its change detector from the main change detector tree when the component's live property
69187
       * is set to false.
69188
       *
69189
       * ```typescript
69190
       * class DataProvider {
69191
       *   data = 1;
69192
       *
69193
       *   constructor() {
69194
       *     setInterval(() => {
69195
       *       this.data = this.data * 2;
69196
       *     }, 500);
69197
       *   }
69198
       * }
69199
       *
69200
       * @Component({
69201
       *   selector: 'live-data',
69202
       *   inputs: ['live'],
69203
       *   template: 'Data: {{dataProvider.data}}'
69204
       * })
69205
       * class LiveData {
69206
       *   constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}
69207
       *
69208
       *   set live(value) {
69209
       *     if (value) {
69210
       *       this.ref.reattach();
69211
       *     } else {
69212
       *       this.ref.detach();
69213
       *     }
69214
       *   }
69215
       * }
69216
       *
69217
       * @Component({
69218
       *   selector: 'my-app',
69219
       *   providers: [DataProvider],
69220
       *   template: `
69221
       *     Live Update: <input type="checkbox" [(ngModel)]="live">
69222
       *     <live-data [live]="live"><live-data>
69223
       *   `,
69224
       * })
69225
       * class AppComponent {
69226
       *   live = true;
69227
       * }
69228
       * ```
69229
       */
69230
    ViewRef.prototype.reattach = /**
69231
       * Re-attaches a view to the change detection tree.
69232
       *
69233
       * This can be used to re-attach views that were previously detached from the tree
69234
       * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.
69235
       *
69236
       * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
69237
       *
69238
       * ### Example ([live demo](https://stackblitz.com/edit/angular-ymgsxw))
69239
       *
69240
       * The following example creates a component displaying `live` data. The component will detach
69241
       * its change detector from the main change detector tree when the component's live property
69242
       * is set to false.
69243
       *
69244
       * ```typescript
69245
       * class DataProvider {
69246
       *   data = 1;
69247
       *
69248
       *   constructor() {
69249
       *     setInterval(() => {
69250
       *       this.data = this.data * 2;
69251
       *     }, 500);
69252
       *   }
69253
       * }
69254
       *
69255
       * @Component({
69256
       *   selector: 'live-data',
69257
       *   inputs: ['live'],
69258
       *   template: 'Data: {{dataProvider.data}}'
69259
       * })
69260
       * class LiveData {
69261
       *   constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}
69262
       *
69263
       *   set live(value) {
69264
       *     if (value) {
69265
       *       this.ref.reattach();
69266
       *     } else {
69267
       *       this.ref.detach();
69268
       *     }
69269
       *   }
69270
       * }
69271
       *
69272
       * @Component({
69273
       *   selector: 'my-app',
69274
       *   providers: [DataProvider],
69275
       *   template: `
69276
       *     Live Update: <input type="checkbox" [(ngModel)]="live">
69277
       *     <live-data [live]="live"><live-data>
69278
       *   `,
69279
       * })
69280
       * class AppComponent {
69281
       *   live = true;
69282
       * }
69283
       * ```
69284
       */
69285
    function () { this._view.flags |= 8 /* Attached */; };
69286
    /**
69287
     * Checks the view and its children.
69288
     *
69289
     * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement
69290
     * local change detection checks.
69291
     *
69292
     * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
69293
     * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
69294
     *
69295
     * ### Example
69296
     *
69297
     * The following example defines a component with a large list of readonly data.
69298
     * Imagine, the data changes constantly, many times per second. For performance reasons,
69299
     * we want to check and update the list every five seconds.
69300
     *
69301
     * We can do that by detaching the component's change detector and doing a local change detection
69302
     * check every five seconds.
69303
     *
69304
     * See {@link ChangeDetectorRef#detach detach} for more information.
69305
     */
69306
    /**
69307
       * Checks the view and its children.
69308
       *
69309
       * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement
69310
       * local change detection checks.
69311
       *
69312
       * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
69313
       * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
69314
       *
69315
       * ### Example
69316
       *
69317
       * The following example defines a component with a large list of readonly data.
69318
       * Imagine, the data changes constantly, many times per second. For performance reasons,
69319
       * we want to check and update the list every five seconds.
69320
       *
69321
       * We can do that by detaching the component's change detector and doing a local change detection
69322
       * check every five seconds.
69323
       *
69324
       * See {@link ChangeDetectorRef#detach detach} for more information.
69325
       */
69326
    ViewRef.prototype.detectChanges = /**
69327
       * Checks the view and its children.
69328
       *
69329
       * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement
69330
       * local change detection checks.
69331
       *
69332
       * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
69333
       * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
69334
       *
69335
       * ### Example
69336
       *
69337
       * The following example defines a component with a large list of readonly data.
69338
       * Imagine, the data changes constantly, many times per second. For performance reasons,
69339
       * we want to check and update the list every five seconds.
69340
       *
69341
       * We can do that by detaching the component's change detector and doing a local change detection
69342
       * check every five seconds.
69343
       *
69344
       * See {@link ChangeDetectorRef#detach detach} for more information.
69345
       */
69346
    function () { detectChanges(this.context); };
69347
    /**
69348
     * Checks the change detector and its children, and throws if any changes are detected.
69349
     *
69350
     * This is used in development mode to verify that running change detection doesn't
69351
     * introduce other changes.
69352
     */
69353
    /**
69354
       * Checks the change detector and its children, and throws if any changes are detected.
69355
       *
69356
       * This is used in development mode to verify that running change detection doesn't
69357
       * introduce other changes.
69358
       */
69359
    ViewRef.prototype.checkNoChanges = /**
69360
       * Checks the change detector and its children, and throws if any changes are detected.
69361
       *
69362
       * This is used in development mode to verify that running change detection doesn't
69363
       * introduce other changes.
69364
       */
69365
    function () { checkNoChanges(this.context); };
69366
    return ViewRef;
69367
}());
69368
var EmbeddedViewRef$1 = /** @class */ (function (_super) {
69369
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(EmbeddedViewRef, _super);
69370
    function EmbeddedViewRef(viewNode, template, context) {
69371
        var _this = _super.call(this, viewNode.data, context) || this;
69372
        _this._lViewNode = viewNode;
69373
        return _this;
69374
    }
69375
    return EmbeddedViewRef;
69376
}(ViewRef$1));
69377
/**
69378
 * Creates a ViewRef bundled with destroy functionality.
69379
 *
69380
 * @param context The context for this view
69381
 * @returns The ViewRef
69382
 */
69383
function createViewRef(view, context) {
69384
    // TODO: add detectChanges back in when implementing ChangeDetectorRef.detectChanges
69385
    return addDestroyable(new ViewRef$1((view), context));
69386
}
69387
/**
69388
 * Decorates an object with destroy logic (implementing the DestroyRef interface)
69389
 * and returns the enhanced object.
69390
 *
69391
 * @param obj The object to decorate
69392
 * @returns The object with destroy logic
69393
 */
69394
function addDestroyable(obj) {
69395
    var destroyFn = null;
69396
    obj.destroyed = false;
69397
    obj.destroy = function () {
69398
        destroyFn && destroyFn.forEach(function (fn) { return fn(); });
69399
        this.destroyed = true;
69400
    };
69401
    obj.onDestroy = function (fn) { return (destroyFn || (destroyFn = [])).push(fn); };
69402
    return obj;
69403
}
69404
 
69405
/**
69406
 * @license
69407
 * Copyright Google Inc. All Rights Reserved.
69408
 *
69409
 * Use of this source code is governed by an MIT-style license that can be
69410
 * found in the LICENSE file at https://angular.io/license
69411
 */
69412
/**
69413
 * Bootstraps a component, then creates and returns a `ComponentRef` for that component.
69414
 *
69415
 * @param componentType Component to bootstrap
69416
 * @param options Optional parameters which control bootstrapping
69417
 */
69418
 
69419
// TODO: A hack to not pull in the NullInjector from @angular/core.
69420
 
69421
/**
69422
 * Bootstraps a Component into an existing host element and returns an instance
69423
 * of the component.
69424
 *
69425
 * Use this function to bootstrap a component into the DOM tree. Each invocation
69426
 * of this function will create a separate tree of components, injectors and
69427
 * change detection cycles and lifetimes. To dynamically insert a new component
69428
 * into an existing tree such that it shares the same injection, change detection
69429
 * and object lifetime, use {@link ViewContainer#createComponent}.
69430
 *
69431
 * @param componentType Component to bootstrap
69432
 * @param options Optional parameters which control bootstrapping
69433
 */
69434
function renderComponent(componentType /* Type as workaround for: Microsoft/TypeScript/issues/4881 */, opts) {
69435
    if (opts === void 0) { opts = {}; }
69436
    ngDevMode && assertComponentType(componentType);
69437
    var rendererFactory = opts.rendererFactory || domRendererFactory3;
69438
    var componentDef = componentType.ngComponentDef;
69439
    if (componentDef.type != componentType)
69440
        componentDef.type = componentType;
69441
    var component;
69442
    // The first index of the first selector is the tag name.
69443
    var componentTag = componentDef.selectors[0][0];
69444
    var hostNode = locateHostElement(rendererFactory, opts.host || componentTag);
69445
    var rootContext = {
69446
        // Incomplete initialization due to circular reference.
69447
        component: (null),
69448
        scheduler: opts.scheduler || requestAnimationFrame.bind(window),
69449
        clean: CLEAN_PROMISE,
69450
    };
69451
    var rootView = createLView(-1, rendererFactory.createRenderer(hostNode, componentDef.rendererType), createTView(null, null), null, rootContext, componentDef.onPush ? 4 /* Dirty */ : 2 /* CheckAlways */);
69452
    rootView.injector = opts.injector || null;
69453
    var oldView = enterView(rootView, (null));
69454
    var elementNode;
69455
    try {
69456
        if (rendererFactory.begin)
69457
            rendererFactory.begin();
69458
        // Create element node at index 0 in data array
69459
        elementNode = hostElement(componentTag, hostNode, componentDef);
69460
        // Create directive instance with factory() and store at index 0 in directives array
69461
        component = rootContext.component = baseDirectiveCreate(0, componentDef.factory(), componentDef);
69462
        initChangeDetectorIfExisting(elementNode.nodeInjector, component, (elementNode.data));
69463
        opts.hostFeatures && opts.hostFeatures.forEach(function (feature) { return feature(component, componentDef); });
69464
        executeInitAndContentHooks();
69465
        setHostBindings(ROOT_DIRECTIVE_INDICES);
69466
        detectChangesInternal(elementNode.data, elementNode, componentDef, component);
69467
    }
69468
    finally {
69469
        leaveView(oldView);
69470
        if (rendererFactory.end)
69471
            rendererFactory.end();
69472
    }
69473
    return component;
69474
}
69475
/**
69476
 * Used to enable lifecycle hooks on the root component.
69477
 *
69478
 * Include this feature when calling `renderComponent` if the root component
69479
 * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't
69480
 * be called properly.
69481
 *
69482
 * Example:
69483
 *
69484
 * ```
69485
 * renderComponent(AppComponent, {features: [RootLifecycleHooks]});
69486
 * ```
69487
 */
69488
 
69489
/**
69490
 * Retrieve the root context for any component by walking the parent `LView` until
69491
 * reaching the root `LView`.
69492
 *
69493
 * @param component any component
69494
 */
69495
function getRootContext(component) {
69496
    var rootContext = getRootView(component).context;
69497
    ngDevMode && assertNotNull(rootContext, 'rootContext');
69498
    return rootContext;
69499
}
69500
/**
69501
 * Retrieve the host element of the component.
69502
 *
69503
 * Use this function to retrieve the host element of the component. The host
69504
 * element is the element which the component is associated with.
69505
 *
69506
 * @param component Component for which the host element should be retrieved.
69507
 */
69508
 
69509
/**
69510
 * Retrieves the rendered text for a given component.
69511
 *
69512
 * This function retrieves the host element of a component and
69513
 * and then returns the `textContent` for that element. This implies
69514
 * that the text returned will include re-projected content of
69515
 * the component as well.
69516
 *
69517
 * @param component The component to return the content text for.
69518
 */
69519
 
69520
/**
69521
 * Wait on component until it is rendered.
69522
 *
69523
 * This function returns a `Promise` which is resolved when the component's
69524
 * change detection is executed. This is determined by finding the scheduler
69525
 * associated with the `component`'s render tree and waiting until the scheduler
69526
 * flushes. If nothing is scheduled, the function returns a resolved promise.
69527
 *
69528
 * Example:
69529
 * ```
69530
 * await whenRendered(myComponent);
69531
 * ```
69532
 *
69533
 * @param component Component to wait upon
69534
 * @returns Promise which resolves when the component is rendered.
69535
 */
69536
function whenRendered(component) {
69537
    return getRootContext(component).clean;
69538
}
69539
 
69540
/**
69541
 * @license
69542
 * Copyright Google Inc. All Rights Reserved.
69543
 *
69544
 * Use of this source code is governed by an MIT-style license that can be
69545
 * found in the LICENSE file at https://angular.io/license
69546
 */
69547
/**
69548
 * If a directive is diPublic, bloomAdd sets a property on the instance with this constant as
69549
 * the key and the directive's unique ID as the value. This allows us to map directives to their
69550
 * bloom filter bit for DI.
69551
 */
69552
var NG_ELEMENT_ID = '__NG_ELEMENT_ID__';
69553
/**
69554
 * The number of slots in each bloom filter (used by DI). The larger this number, the fewer
69555
 * directives that will share slots, and thus, the fewer false positives when checking for
69556
 * the existence of a directive.
69557
 */
69558
var BLOOM_SIZE = 256;
69559
/** Counter used to generate unique IDs for directives. */
69560
var nextNgElementId = 0;
69561
/**
69562
 * Registers this directive as present in its node's injector by flipping the directive's
69563
 * corresponding bit in the injector's bloom filter.
69564
 *
69565
 * @param injector The node injector in which the directive should be registered
69566
 * @param type The directive to register
69567
 */
69568
function bloomAdd(injector, type) {
69569
    var id = type[NG_ELEMENT_ID];
69570
    // Set a unique ID on the directive type, so if something tries to inject the directive,
69571
    // we can easily retrieve the ID and hash it into the bloom bit that should be checked.
69572
    if (id == null) {
69573
        id = type[NG_ELEMENT_ID] = nextNgElementId++;
69574
    }
69575
    // We only have BLOOM_SIZE (256) slots in our bloom filter (8 buckets * 32 bits each),
69576
    // so all unique IDs must be modulo-ed into a number from 0 - 255 to fit into the filter.
69577
    // This means that after 255, some directives will share slots, leading to some false positives
69578
    // when checking for a directive's presence.
69579
    var bloomBit = id % BLOOM_SIZE;
69580
    // Create a mask that targets the specific bit associated with the directive.
69581
    // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding
69582
    // to bit positions 0 - 31 in a 32 bit integer.
69583
    var mask = 1 << bloomBit;
69584
    // Use the raw bloomBit number to determine which bloom filter bucket we should check
69585
    // e.g: bf0 = [0 - 31], bf1 = [32 - 63], bf2 = [64 - 95], bf3 = [96 - 127], etc
69586
    if (bloomBit < 128) {
69587
        // Then use the mask to flip on the bit (0-31) associated with the directive in that bucket
69588
        bloomBit < 64 ? (bloomBit < 32 ? (injector.bf0 |= mask) : (injector.bf1 |= mask)) :
69589
            (bloomBit < 96 ? (injector.bf2 |= mask) : (injector.bf3 |= mask));
69590
    }
69591
    else {
69592
        bloomBit < 192 ? (bloomBit < 160 ? (injector.bf4 |= mask) : (injector.bf5 |= mask)) :
69593
            (bloomBit < 224 ? (injector.bf6 |= mask) : (injector.bf7 |= mask));
69594
    }
69595
}
69596
function getOrCreateNodeInjector() {
69597
    ngDevMode && assertPreviousIsParent();
69598
    return getOrCreateNodeInjectorForNode(getPreviousOrParentNode());
69599
}
69600
/**
69601
 * Creates (or gets an existing) injector for a given element or container.
69602
 *
69603
 * @param node for which an injector should be retrieved / created.
69604
 * @returns Node injector
69605
 */
69606
function getOrCreateNodeInjectorForNode(node) {
69607
    var nodeInjector = node.nodeInjector;
69608
    var parentInjector = node.parent && node.parent.nodeInjector;
69609
    if (nodeInjector != parentInjector) {
69610
        return nodeInjector;
69611
    }
69612
    return node.nodeInjector = {
69613
        parent: parentInjector,
69614
        node: node,
69615
        bf0: 0,
69616
        bf1: 0,
69617
        bf2: 0,
69618
        bf3: 0,
69619
        bf4: 0,
69620
        bf5: 0,
69621
        bf6: 0,
69622
        bf7: 0,
69623
        cbf0: parentInjector == null ? 0 : parentInjector.cbf0 | parentInjector.bf0,
69624
        cbf1: parentInjector == null ? 0 : parentInjector.cbf1 | parentInjector.bf1,
69625
        cbf2: parentInjector == null ? 0 : parentInjector.cbf2 | parentInjector.bf2,
69626
        cbf3: parentInjector == null ? 0 : parentInjector.cbf3 | parentInjector.bf3,
69627
        cbf4: parentInjector == null ? 0 : parentInjector.cbf4 | parentInjector.bf4,
69628
        cbf5: parentInjector == null ? 0 : parentInjector.cbf5 | parentInjector.bf5,
69629
        cbf6: parentInjector == null ? 0 : parentInjector.cbf6 | parentInjector.bf6,
69630
        cbf7: parentInjector == null ? 0 : parentInjector.cbf7 | parentInjector.bf7,
69631
        templateRef: null,
69632
        viewContainerRef: null,
69633
        elementRef: null,
69634
        changeDetectorRef: null
69635
    };
69636
}
69637
/**
69638
 * Makes a directive public to the DI system by adding it to an injector's bloom filter.
69639
 *
69640
 * @param di The node injector in which a directive will be added
69641
 * @param def The definition of the directive to be made public
69642
 */
69643
function diPublicInInjector(di, def) {
69644
    bloomAdd(di, def.type);
69645
}
69646
/**
69647
 * Makes a directive public to the DI system by adding it to an injector's bloom filter.
69648
 *
69649
 * @param def The definition of the directive to be made public
69650
 */
69651
function diPublic(def) {
69652
    diPublicInInjector(getOrCreateNodeInjector(), def);
69653
}
69654
function directiveInject(token, flags) {
69655
    if (flags === void 0) { flags = 0 /* Default */; }
69656
    return getOrCreateInjectable(getOrCreateNodeInjector(), token, flags);
69657
}
69658
/**
69659
 * Creates an ElementRef and stores it on the injector.
69660
 * Or, if the ElementRef already exists, retrieves the existing ElementRef.
69661
 *
69662
 * @returns The ElementRef instance to use
69663
 */
69664
 
69665
/**
69666
 * Creates a TemplateRef and stores it on the injector. Or, if the TemplateRef already
69667
 * exists, retrieves the existing TemplateRef.
69668
 *
69669
 * @returns The TemplateRef instance to use
69670
 */
69671
function injectTemplateRef() {
69672
    return getOrCreateTemplateRef(getOrCreateNodeInjector());
69673
}
69674
/**
69675
 * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef
69676
 * already exists, retrieves the existing ViewContainerRef.
69677
 *
69678
 * @returns The ViewContainerRef instance to use
69679
 */
69680
function injectViewContainerRef() {
69681
    return getOrCreateContainerRef(getOrCreateNodeInjector());
69682
}
69683
/** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */
69684
function injectChangeDetectorRef() {
69685
    return getOrCreateChangeDetectorRef(getOrCreateNodeInjector(), null);
69686
}
69687
/**
69688
 * Inject static attribute value into directive constructor.
69689
 *
69690
 * This method is used with `factory` functions which are generated as part of
69691
 * `defineDirective` or `defineComponent`. The method retrieves the static value
69692
 * of an attribute. (Dynamic attributes are not supported since they are not resolved
69693
 *  at the time of injection and can change over time.)
69694
 *
69695
 * # Example
69696
 * Given:
69697
 * ```
69698
 * @Component(...)
69699
 * class MyComponent {
69700
 *   constructor(@Attribute('title') title: string) { ... }
69701
 * }
69702
 * ```
69703
 * When instantiated with
69704
 * ```
69705
 * <my-component title="Hello"></my-component>
69706
 * ```
69707
 *
69708
 * Then factory method generated is:
69709
 * ```
69710
 * MyComponent.ngComponentDef = defineComponent({
69711
 *   factory: () => new MyComponent(injectAttribute('title'))
69712
 *   ...
69713
 * })
69714
 * ```
69715
 *
69716
 * @experimental
69717
 */
69718
function injectAttribute(attrName) {
69719
    ngDevMode && assertPreviousIsParent();
69720
    var lElement = getPreviousOrParentNode();
69721
    ngDevMode && assertNodeType(lElement, 3 /* Element */);
69722
    var tElement = (lElement.tNode);
69723
    ngDevMode && assertNotNull(tElement, 'expecting tNode');
69724
    var attrs = tElement.attrs;
69725
    if (attrs) {
69726
        for (var i = 0; i < attrs.length; i = i + 2) {
69727
            if (attrs[i] == attrName) {
69728
                return attrs[i + 1];
69729
            }
69730
        }
69731
    }
69732
    return undefined;
69733
}
69734
/**
69735
 * Creates a ViewRef and stores it on the injector as ChangeDetectorRef (public alias).
69736
 * Or, if it already exists, retrieves the existing instance.
69737
 *
69738
 * @returns The ChangeDetectorRef to use
69739
 */
69740
function getOrCreateChangeDetectorRef(di, context) {
69741
    if (di.changeDetectorRef)
69742
        return di.changeDetectorRef;
69743
    var currentNode = di.node;
69744
    if (isComponent((currentNode.tNode))) {
69745
        return di.changeDetectorRef = createViewRef(currentNode.data, context);
69746
    }
69747
    else if (currentNode.type === 3 /* Element */) {
69748
        return di.changeDetectorRef = getOrCreateHostChangeDetector(currentNode.view.node);
69749
    }
69750
    return null;
69751
}
69752
/** Gets or creates ChangeDetectorRef for the closest host component */
69753
function getOrCreateHostChangeDetector(currentNode) {
69754
    var hostNode = getClosestComponentAncestor(currentNode);
69755
    var hostInjector = hostNode.nodeInjector;
69756
    var existingRef = hostInjector && hostInjector.changeDetectorRef;
69757
    return existingRef ?
69758
        existingRef :
69759
        createViewRef(hostNode.data, hostNode.view
69760
            .directives[hostNode.tNode.flags >> 13 /* DirectiveStartingIndexShift */]);
69761
}
69762
/**
69763
 * If the node is an embedded view, traverses up the view tree to return the closest
69764
 * ancestor view that is attached to a component. If it's already a component node,
69765
 * returns itself.
69766
 */
69767
function getClosestComponentAncestor(node) {
69768
    while (node.type === 2 /* View */) {
69769
        node = node.view.node;
69770
    }
69771
    return node;
69772
}
69773
/**
69774
 * Searches for an instance of the given directive type up the injector tree and returns
69775
 * that instance if found.
69776
 *
69777
 * Specifically, it gets the bloom filter bit associated with the directive (see bloomHashBit),
69778
 * checks that bit against the bloom filter structure to identify an injector that might have
69779
 * the directive (see bloomFindPossibleInjector), then searches the directives on that injector
69780
 * for a match.
69781
 *
69782
 * If not found, it will propagate up to the next parent injector until the token
69783
 * is found or the top is reached.
69784
 *
69785
 * @param di Node injector where the search should start
69786
 * @param token The directive type to search for
69787
 * @param flags Injection flags (e.g. CheckParent)
69788
 * @returns The instance found
69789
 */
69790
function getOrCreateInjectable(di, token, flags) {
69791
    var bloomHash = bloomHashBit(token);
69792
    // If the token has a bloom hash, then it is a directive that is public to the injection system
69793
    // (diPublic). If there is no hash, fall back to the module injector.
69794
    if (bloomHash === null) {
69795
        var moduleInjector = getPreviousOrParentNode().view.injector;
69796
        var formerInjector = setCurrentInjector(moduleInjector);
69797
        try {
69798
            return inject(token, flags);
69799
        }
69800
        finally {
69801
            setCurrentInjector(formerInjector);
69802
        }
69803
    }
69804
    else {
69805
        var injector = di;
69806
        while (injector) {
69807
            // Get the closest potential matching injector (upwards in the injector tree) that
69808
            // *potentially* has the token.
69809
            injector = bloomFindPossibleInjector(injector, bloomHash);
69810
            // If no injector is found, we *know* that there is no ancestor injector that contains the
69811
            // token, so we abort.
69812
            if (!injector) {
69813
                break;
69814
            }
69815
            // At this point, we have an injector which *may* contain the token, so we step through the
69816
            // directives associated with the injector's corresponding node to get the directive instance.
69817
            var node = injector.node;
69818
            var flags_1 = node.tNode.flags;
69819
            var count = flags_1 & 4095;
69820
            if (count !== 0) {
69821
                var start = flags_1 >> 13;
69822
                var end = start + count;
69823
                var defs = (node.view.tView.directives);
69824
                for (var i = start; i < end; i++) {
69825
                    // Get the definition for the directive at this index and, if it is injectable (diPublic),
69826
                    // and matches the given token, return the directive instance.
69827
                    var directiveDef = defs[i];
69828
                    if (directiveDef.type === token && directiveDef.diPublic) {
69829
                        return getDirectiveInstance(node.view.directives[i]);
69830
                    }
69831
                }
69832
            }
69833
            // If we *didn't* find the directive for the token and we are searching the current node's
69834
            // injector, it's possible the directive is on this node and hasn't been created yet.
69835
            var instance = void 0;
69836
            if (injector === di && (instance = searchMatchesQueuedForCreation(node, token))) {
69837
                return instance;
69838
            }
69839
            // The def wasn't found anywhere on this node, so it might be a false positive.
69840
            // Traverse up the tree and continue searching.
69841
            injector = injector.parent;
69842
        }
69843
    }
69844
    // No directive was found for the given token.
69845
    // TODO: implement optional, check-self, and check-parent.
69846
    throw new Error('Implement');
69847
}
69848
function searchMatchesQueuedForCreation(node, token) {
69849
    var matches = node.view.tView.currentMatches;
69850
    if (matches) {
69851
        for (var i = 0; i < matches.length; i += 2) {
69852
            var def = matches[i];
69853
            if (def.type === token) {
69854
                return resolveDirective(def, i + 1, matches, node.view.tView);
69855
            }
69856
        }
69857
    }
69858
    return null;
69859
}
69860
/**
69861
 * Given a directive type, this function returns the bit in an injector's bloom filter
69862
 * that should be used to determine whether or not the directive is present.
69863
 *
69864
 * When the directive was added to the bloom filter, it was given a unique ID that can be
69865
 * retrieved on the class. Since there are only BLOOM_SIZE slots per bloom filter, the directive's
69866
 * ID must be modulo-ed by BLOOM_SIZE to get the correct bloom bit (directives share slots after
69867
 * BLOOM_SIZE is reached).
69868
 *
69869
 * @param type The directive type
69870
 * @returns The bloom bit to check for the directive
69871
 */
69872
function bloomHashBit(type) {
69873
    var id = type[NG_ELEMENT_ID];
69874
    return typeof id === 'number' ? id % BLOOM_SIZE : null;
69875
}
69876
/**
69877
 * Finds the closest injector that might have a certain directive.
69878
 *
69879
 * Each directive corresponds to a bit in an injector's bloom filter. Given the bloom bit to
69880
 * check and a starting injector, this function traverses up injectors until it finds an
69881
 * injector that contains a 1 for that bit in its bloom filter. A 1 indicates that the
69882
 * injector may have that directive. It only *may* have the directive because directives begin
69883
 * to share bloom filter bits after the BLOOM_SIZE is reached, and it could correspond to a
69884
 * different directive sharing the bit.
69885
 *
69886
 * Note: We can skip checking further injectors up the tree if an injector's cbf structure
69887
 * has a 0 for that bloom bit. Since cbf contains the merged value of all the parent
69888
 * injectors, a 0 in the bloom bit indicates that the parents definitely do not contain
69889
 * the directive and do not need to be checked.
69890
 *
69891
 * @param injector The starting node injector to check
69892
 * @param  bloomBit The bit to check in each injector's bloom filter
69893
 * @returns An injector that might have the directive
69894
 */
69895
function bloomFindPossibleInjector(startInjector, bloomBit) {
69896
    // Create a mask that targets the specific bit associated with the directive we're looking for.
69897
    // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding
69898
    // to bit positions 0 - 31 in a 32 bit integer.
69899
    var mask = 1 << bloomBit;
69900
    // Traverse up the injector tree until we find a potential match or until we know there *isn't* a
69901
    // match.
69902
    var injector = startInjector;
69903
    while (injector) {
69904
        // Our bloom filter size is 256 bits, which is eight 32-bit bloom filter buckets:
69905
        // bf0 = [0 - 31], bf1 = [32 - 63], bf2 = [64 - 95], bf3 = [96 - 127], etc.
69906
        // Get the bloom filter value from the appropriate bucket based on the directive's bloomBit.
69907
        var value = void 0;
69908
        if (bloomBit < 128) {
69909
            value = bloomBit < 64 ? (bloomBit < 32 ? injector.bf0 : injector.bf1) :
69910
                (bloomBit < 96 ? injector.bf2 : injector.bf3);
69911
        }
69912
        else {
69913
            value = bloomBit < 192 ? (bloomBit < 160 ? injector.bf4 : injector.bf5) :
69914
                (bloomBit < 224 ? injector.bf6 : injector.bf7);
69915
        }
69916
        // If the bloom filter value has the bit corresponding to the directive's bloomBit flipped on,
69917
        // this injector is a potential match.
69918
        if ((value & mask) === mask) {
69919
            return injector;
69920
        }
69921
        // If the current injector does not have the directive, check the bloom filters for the ancestor
69922
        // injectors (cbf0 - cbf7). These filters capture *all* ancestor injectors.
69923
        if (bloomBit < 128) {
69924
            value = bloomBit < 64 ? (bloomBit < 32 ? injector.cbf0 : injector.cbf1) :
69925
                (bloomBit < 96 ? injector.cbf2 : injector.cbf3);
69926
        }
69927
        else {
69928
            value = bloomBit < 192 ? (bloomBit < 160 ? injector.cbf4 : injector.cbf5) :
69929
                (bloomBit < 224 ? injector.cbf6 : injector.cbf7);
69930
        }
69931
        // If the ancestor bloom filter value has the bit corresponding to the directive, traverse up to
69932
        // find the specific injector. If the ancestor bloom filter does not have the bit, we can abort.
69933
        injector = (value & mask) ? injector.parent : null;
69934
    }
69935
    return null;
69936
}
69937
var ReadFromInjectorFn = /** @class */ (function () {
69938
    function ReadFromInjectorFn(read) {
69939
        this.read = read;
69940
    }
69941
    return ReadFromInjectorFn;
69942
}());
69943
/**
69944
 * Creates an ElementRef for a given node injector and stores it on the injector.
69945
 * Or, if the ElementRef already exists, retrieves the existing ElementRef.
69946
 *
69947
 * @param di The node injector where we should store a created ElementRef
69948
 * @returns The ElementRef instance to use
69949
 */
69950
function getOrCreateElementRef(di) {
69951
    return di.elementRef || (di.elementRef = new ElementRef$1(di.node.type === 0 /* Container */ ? null : di.node.native));
69952
}
69953
 
69954
 
69955
 
69956
 
69957
/** A ref to a node's native element. */
69958
var ElementRef$1 = /** @class */ (function () {
69959
    function ElementRef(nativeElement) {
69960
        this.nativeElement = nativeElement;
69961
    }
69962
    return ElementRef;
69963
}());
69964
/**
69965
 * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef
69966
 * already exists, retrieves the existing ViewContainerRef.
69967
 *
69968
 * @returns The ViewContainerRef instance to use
69969
 */
69970
function getOrCreateContainerRef(di) {
69971
    if (!di.viewContainerRef) {
69972
        var vcRefHost = di.node;
69973
        ngDevMode && assertNodeOfPossibleTypes(vcRefHost, 0 /* Container */, 3 /* Element */);
69974
        var lContainer = createLContainer((vcRefHost.parent), vcRefHost.view);
69975
        var lContainerNode = createLNodeObject(0 /* Container */, vcRefHost.view, (vcRefHost.parent), undefined, lContainer, null);
69976
        vcRefHost.dynamicLContainerNode = lContainerNode;
69977
        addToViewTree(vcRefHost.view, lContainer);
69978
        di.viewContainerRef = new ViewContainerRef$1(lContainerNode);
69979
    }
69980
    return di.viewContainerRef;
69981
}
69982
/**
69983
 * A ref to a container that enables adding and removing views from that container
69984
 * imperatively.
69985
 */
69986
var ViewContainerRef$1 = /** @class */ (function () {
69987
    function ViewContainerRef(_lContainerNode) {
69988
        this._lContainerNode = _lContainerNode;
69989
        this._viewRefs = [];
69990
    }
69991
    ViewContainerRef.prototype.clear = function () {
69992
        var lContainer = this._lContainerNode.data;
69993
        while (lContainer.views.length) {
69994
            this.remove(0);
69995
        }
69996
    };
69997
    ViewContainerRef.prototype.get = function (index) { return this._viewRefs[index] || null; };
69998
    Object.defineProperty(ViewContainerRef.prototype, "length", {
69999
        get: function () {
70000
            var lContainer = this._lContainerNode.data;
70001
            return lContainer.views.length;
70002
        },
70003
        enumerable: true,
70004
        configurable: true
70005
    });
70006
    ViewContainerRef.prototype.createEmbeddedView = function (templateRef, context, index) {
70007
        var viewRef = templateRef.createEmbeddedView(context || {});
70008
        this.insert(viewRef, index);
70009
        return viewRef;
70010
    };
70011
    ViewContainerRef.prototype.createComponent = function (componentFactory, index, injector, projectableNodes, ngModule) {
70012
        throw notImplemented();
70013
    };
70014
    ViewContainerRef.prototype.insert = function (viewRef, index) {
70015
        var lViewNode = viewRef._lViewNode;
70016
        var adjustedIdx = this._adjustIndex(index);
70017
        insertView(this._lContainerNode, lViewNode, adjustedIdx);
70018
        // invalidate cache of next sibling RNode (we do similar operation in the containerRefreshEnd
70019
        // instruction)
70020
        this._lContainerNode.native = undefined;
70021
        this._viewRefs.splice(adjustedIdx, 0, viewRef);
70022
        lViewNode.parent = this._lContainerNode;
70023
        // If the view is dynamic (has a template), it needs to be counted both at the container
70024
        // level and at the node above the container.
70025
        if (lViewNode.data.template !== null) {
70026
            // Increment the container view count.
70027
            this._lContainerNode.data.dynamicViewCount++;
70028
            // Look for the parent node and increment its dynamic view count.
70029
            if (this._lContainerNode.parent !== null && this._lContainerNode.parent.data !== null) {
70030
                ngDevMode && assertNodeOfPossibleTypes(this._lContainerNode.parent, 2 /* View */, 3 /* Element */);
70031
                this._lContainerNode.parent.data.dynamicViewCount++;
70032
            }
70033
        }
70034
        return viewRef;
70035
    };
70036
    ViewContainerRef.prototype.move = function (viewRef, newIndex) {
70037
        var index = this.indexOf(viewRef);
70038
        this.detach(index);
70039
        this.insert(viewRef, this._adjustIndex(newIndex));
70040
        return viewRef;
70041
    };
70042
    ViewContainerRef.prototype.indexOf = function (viewRef) { return this._viewRefs.indexOf(viewRef); };
70043
    ViewContainerRef.prototype.remove = function (index) {
70044
        this.detach(index);
70045
        // TODO(ml): proper destroy of the ViewRef, i.e. recursively destroy the LviewNode and its
70046
        // children, delete DOM nodes and QueryList, trigger hooks (onDestroy), destroy the renderer,
70047
        // detach projected nodes
70048
    };
70049
    ViewContainerRef.prototype.detach = function (index) {
70050
        var adjustedIdx = this._adjustIndex(index, -1);
70051
        removeView(this._lContainerNode, adjustedIdx);
70052
        return this._viewRefs.splice(adjustedIdx, 1)[0] || null;
70053
    };
70054
    ViewContainerRef.prototype._adjustIndex = function (index, shift) {
70055
        if (shift === void 0) { shift = 0; }
70056
        if (index == null) {
70057
            return this._lContainerNode.data.views.length + shift;
70058
        }
70059
        if (ngDevMode) {
70060
            assertGreaterThan(index, -1, 'index must be positive');
70061
            // +1 because it's legal to insert at the end.
70062
            assertLessThan(index, this._lContainerNode.data.views.length + 1 + shift, 'index');
70063
        }
70064
        return index;
70065
    };
70066
    return ViewContainerRef;
70067
}());
70068
/**
70069
 * Creates a TemplateRef and stores it on the injector. Or, if the TemplateRef already
70070
 * exists, retrieves the existing TemplateRef.
70071
 *
70072
 * @param di The node injector where we should store a created TemplateRef
70073
 * @returns The TemplateRef instance to use
70074
 */
70075
function getOrCreateTemplateRef(di) {
70076
    ngDevMode && assertNodeType(di.node, 0 /* Container */);
70077
    var data = di.node.data;
70078
    var tView = di.node.view.tView;
70079
    return di.templateRef || (di.templateRef = new TemplateRef$1(getOrCreateElementRef(di), (data.template), getRenderer(), tView.directiveRegistry, tView.pipeRegistry));
70080
}
70081
var TemplateRef$1 = /** @class */ (function () {
70082
    function TemplateRef(elementRef, template, _renderer, _directives, _pipes) {
70083
        this._renderer = _renderer;
70084
        this._directives = _directives;
70085
        this._pipes = _pipes;
70086
        this.elementRef = elementRef;
70087
        this._template = template;
70088
    }
70089
    TemplateRef.prototype.createEmbeddedView = function (context) {
70090
        var viewNode = renderEmbeddedTemplate(null, this._template, context, this._renderer, this._directives, this._pipes);
70091
        return addDestroyable(new EmbeddedViewRef$1(viewNode, this._template, context));
70092
    };
70093
    return TemplateRef;
70094
}());
70095
 
70096
/**
70097
 * @license
70098
 * Copyright Google Inc. All Rights Reserved.
70099
 *
70100
 * Use of this source code is governed by an MIT-style license that can be
70101
 * found in the LICENSE file at https://angular.io/license
70102
 */
70103
/**
70104
 * Create a component definition object.
70105
 *
70106
 *
70107
 * # Example
70108
 * ```
70109
 * class MyDirective {
70110
 *   // Generated by Angular Template Compiler
70111
 *   // [Symbol] syntax will not be supported by TypeScript until v2.7
70112
 *   static ngComponentDef = defineComponent({
70113
 *     ...
70114
 *   });
70115
 * }
70116
 * ```
70117
 */
70118
function defineComponent(componentDefinition) {
70119
    var type = componentDefinition.type;
70120
    var pipeTypes = (componentDefinition.pipes);
70121
    var directiveTypes = (componentDefinition.directives);
70122
    var def = {
70123
        type: type,
70124
        diPublic: null,
70125
        factory: componentDefinition.factory,
70126
        template: componentDefinition.template || (null),
70127
        hostBindings: componentDefinition.hostBindings || null,
70128
        attributes: componentDefinition.attributes || null,
70129
        inputs: invertObject(componentDefinition.inputs),
70130
        outputs: invertObject(componentDefinition.outputs),
70131
        rendererType: resolveRendererType2(componentDefinition.rendererType) || null,
70132
        exportAs: componentDefinition.exportAs,
70133
        onInit: type.prototype.ngOnInit || null,
70134
        doCheck: type.prototype.ngDoCheck || null,
70135
        afterContentInit: type.prototype.ngAfterContentInit || null,
70136
        afterContentChecked: type.prototype.ngAfterContentChecked || null,
70137
        afterViewInit: type.prototype.ngAfterViewInit || null,
70138
        afterViewChecked: type.prototype.ngAfterViewChecked || null,
70139
        onDestroy: type.prototype.ngOnDestroy || null,
70140
        onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,
70141
        directiveDefs: directiveTypes ?
70142
            function () {
70143
                return (typeof directiveTypes === 'function' ? directiveTypes() : directiveTypes)
70144
                    .map(extractDirectiveDef);
70145
            } :
70146
            null,
70147
        pipeDefs: pipeTypes ?
70148
            function () { return (typeof pipeTypes === 'function' ? pipeTypes() : pipeTypes).map(extractPipeDef); } :
70149
            null,
70150
        selectors: componentDefinition.selectors
70151
    };
70152
    var feature = componentDefinition.features;
70153
    feature && feature.forEach(function (fn) { return fn(def); });
70154
    return def;
70155
}
70156
function extractDirectiveDef(type) {
70157
    var def = type.ngComponentDef || type.ngDirectiveDef;
70158
    if (ngDevMode && !def) {
70159
        throw new Error("'" + type.name + "' is neither 'ComponentType' or 'DirectiveType'.");
70160
    }
70161
    return def;
70162
}
70163
function extractPipeDef(type) {
70164
    var def = type.ngPipeDef;
70165
    if (ngDevMode && !def) {
70166
        throw new Error("'" + type.name + "' is not a 'PipeType'.");
70167
    }
70168
    return def;
70169
}
70170
var PRIVATE_PREFIX = '__ngOnChanges_';
70171
/**
70172
 * Creates an NgOnChangesFeature function for a component's features list.
70173
 *
70174
 * It accepts an optional map of minified input property names to original property names,
70175
 * if any input properties have a public alias.
70176
 *
70177
 * The NgOnChangesFeature function that is returned decorates a component with support for
70178
 * the ngOnChanges lifecycle hook, so it should be included in any component that implements
70179
 * that hook.
70180
 *
70181
 * Example usage:
70182
 *
70183
 * ```
70184
 * static ngComponentDef = defineComponent({
70185
 *   ...
70186
 *   inputs: {name: 'publicName'},
70187
 *   features: [NgOnChangesFeature({name: 'name'})]
70188
 * });
70189
 * ```
70190
 *
70191
 * @param inputPropertyNames Map of input property names, if they are aliased
70192
 * @returns DirectiveDefFeature
70193
 */
70194
function NgOnChangesFeature(inputPropertyNames) {
70195
    return function (definition) {
70196
        var inputs = definition.inputs;
70197
        var proto = definition.type.prototype;
70198
        // Place where we will store SimpleChanges if there is a change
70199
        Object.defineProperty(proto, PRIVATE_PREFIX, { value: undefined, writable: true });
70200
        var _loop_1 = function (pubKey) {
70201
            var minKey = inputs[pubKey];
70202
            var propertyName = inputPropertyNames && inputPropertyNames[minKey] || pubKey;
70203
            var privateMinKey = PRIVATE_PREFIX + minKey;
70204
            // Create a place where the actual value will be stored and make it non-enumerable
70205
            Object.defineProperty(proto, privateMinKey, { value: undefined, writable: true });
70206
            var existingDesc = Object.getOwnPropertyDescriptor(proto, minKey);
70207
            // create a getter and setter for property
70208
            Object.defineProperty(proto, minKey, {
70209
                get: function () {
70210
                    return (existingDesc && existingDesc.get) ? existingDesc.get.call(this) :
70211
                        this[privateMinKey];
70212
                },
70213
                set: function (value) {
70214
                    var simpleChanges = this[PRIVATE_PREFIX];
70215
                    var isFirstChange = simpleChanges === undefined;
70216
                    if (simpleChanges == null) {
70217
                        simpleChanges = this[PRIVATE_PREFIX] = {};
70218
                    }
70219
                    simpleChanges[propertyName] = new SimpleChange(this[privateMinKey], value, isFirstChange);
70220
                    (existingDesc && existingDesc.set) ? existingDesc.set.call(this, value) :
70221
                        this[privateMinKey] = value;
70222
                }
70223
            });
70224
        };
70225
        for (var pubKey in inputs) {
70226
            _loop_1(pubKey);
70227
        }
70228
        // If an onInit hook is defined, it will need to wrap the ngOnChanges call
70229
        // so the call order is changes-init-check in creation mode. In subsequent
70230
        // change detection runs, only the check wrapper will be called.
70231
        if (definition.onInit != null) {
70232
            definition.onInit = onChangesWrapper(definition.onInit);
70233
        }
70234
        definition.doCheck = onChangesWrapper(definition.doCheck);
70235
    };
70236
    function onChangesWrapper(delegateHook) {
70237
        return function () {
70238
            var simpleChanges = this[PRIVATE_PREFIX];
70239
            if (simpleChanges != null) {
70240
                this.ngOnChanges(simpleChanges);
70241
                this[PRIVATE_PREFIX] = null;
70242
            }
70243
            delegateHook && delegateHook.apply(this);
70244
        };
70245
    }
70246
}
70247
function PublicFeature(definition) {
70248
    definition.diPublic = diPublic;
70249
}
70250
var EMPTY$1 = {};
70251
/** Swaps the keys and values of an object. */
70252
function invertObject(obj) {
70253
    if (obj == null)
70254
        return EMPTY$1;
70255
    var newObj = {};
70256
    for (var minifiedKey in obj) {
70257
        newObj[obj[minifiedKey]] = minifiedKey;
70258
    }
70259
    return newObj;
70260
}
70261
/**
70262
 * Create a directive definition object.
70263
 *
70264
 * # Example
70265
 * ```
70266
 * class MyDirective {
70267
 *   // Generated by Angular Template Compiler
70268
 *   // [Symbol] syntax will not be supported by TypeScript until v2.7
70269
 *   static ngDirectiveDef = defineDirective({
70270
 *     ...
70271
 *   });
70272
 * }
70273
 * ```
70274
 */
70275
var defineDirective = defineComponent;
70276
/**
70277
 * Create a pipe definition object.
70278
 *
70279
 * # Example
70280
 * ```
70281
 * class MyPipe implements PipeTransform {
70282
 *   // Generated by Angular Template Compiler
70283
 *   static ngPipeDef = definePipe({
70284
 *     ...
70285
 *   });
70286
 * }
70287
 * ```
70288
 * @param pipeDef Pipe definition generated by the compiler
70289
 */
70290
function definePipe(pipeDef) {
70291
    return {
70292
        name: pipeDef.name,
70293
        n: pipeDef.factory,
70294
        pure: pipeDef.pure !== false,
70295
        onDestroy: pipeDef.type.prototype.ngOnDestroy || null
70296
    };
70297
}
70298
 
70299
/**
70300
 * @license
70301
 * Copyright Google Inc. All Rights Reserved.
70302
 *
70303
 * Use of this source code is governed by an MIT-style license that can be
70304
 * found in the LICENSE file at https://angular.io/license
70305
 */
70306
/**
70307
 * If the value hasn't been saved, calls the pure function to store and return the
70308
 * value. If it has been saved, returns the saved value.
70309
 *
70310
 * @param pureFn Function that returns a value
70311
 * @returns value
70312
 */
70313
function pureFunction0(pureFn, thisArg) {
70314
    return getCreationMode() ? checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg) : pureFn()) :
70315
        consumeBinding();
70316
}
70317
/**
70318
 * If the value of the provided exp has changed, calls the pure function to return
70319
 * an updated value. Or if the value has not changed, returns cached value.
70320
 *
70321
 * @param pureFn Function that returns an updated value
70322
 * @param exp Updated expression value
70323
 * @returns Updated value
70324
 */
70325
function pureFunction1(pureFn, exp, thisArg) {
70326
    return bindingUpdated(exp) ?
70327
        checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp) : pureFn(exp)) :
70328
        consumeBinding();
70329
}
70330
/**
70331
 * If the value of any provided exp has changed, calls the pure function to return
70332
 * an updated value. Or if no values have changed, returns cached value.
70333
 *
70334
 * @param pureFn
70335
 * @param exp1
70336
 * @param exp2
70337
 * @returns Updated value
70338
 */
70339
function pureFunction2(pureFn, exp1, exp2, thisArg) {
70340
    return bindingUpdated2(exp1, exp2) ?
70341
        checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2)) :
70342
        consumeBinding();
70343
}
70344
/**
70345
 * If the value of any provided exp has changed, calls the pure function to return
70346
 * an updated value. Or if no values have changed, returns cached value.
70347
 *
70348
 * @param pureFn
70349
 * @param exp1
70350
 * @param exp2
70351
 * @param exp3
70352
 * @returns Updated value
70353
 */
70354
function pureFunction3(pureFn, exp1, exp2, exp3, thisArg) {
70355
    var different = bindingUpdated2(exp1, exp2);
70356
    return bindingUpdated(exp3) || different ?
70357
        checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2, exp3) : pureFn(exp1, exp2, exp3)) :
70358
        consumeBinding();
70359
}
70360
/**
70361
 * If the value of any provided exp has changed, calls the pure function to return
70362
 * an updated value. Or if no values have changed, returns cached value.
70363
 *
70364
 * @param pureFn
70365
 * @param exp1
70366
 * @param exp2
70367
 * @param exp3
70368
 * @param exp4
70369
 * @returns Updated value
70370
 */
70371
function pureFunction4(pureFn, exp1, exp2, exp3, exp4, thisArg) {
70372
    return bindingUpdated4(exp1, exp2, exp3, exp4) ?
70373
        checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4) : pureFn(exp1, exp2, exp3, exp4)) :
70374
        consumeBinding();
70375
}
70376
/**
70377
 * If the value of any provided exp has changed, calls the pure function to return
70378
 * an updated value. Or if no values have changed, returns cached value.
70379
 *
70380
 * @param pureFn
70381
 * @param exp1
70382
 * @param exp2
70383
 * @param exp3
70384
 * @param exp4
70385
 * @param exp5
70386
 * @returns Updated value
70387
 */
70388
function pureFunction5(pureFn, exp1, exp2, exp3, exp4, exp5, thisArg) {
70389
    var different = bindingUpdated4(exp1, exp2, exp3, exp4);
70390
    return bindingUpdated(exp5) || different ?
70391
        checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5) :
70392
            pureFn(exp1, exp2, exp3, exp4, exp5)) :
70393
        consumeBinding();
70394
}
70395
/**
70396
 * If the value of any provided exp has changed, calls the pure function to return
70397
 * an updated value. Or if no values have changed, returns cached value.
70398
 *
70399
 * @param pureFn
70400
 * @param exp1
70401
 * @param exp2
70402
 * @param exp3
70403
 * @param exp4
70404
 * @param exp5
70405
 * @param exp6
70406
 * @returns Updated value
70407
 */
70408
function pureFunction6(pureFn, exp1, exp2, exp3, exp4, exp5, exp6, thisArg) {
70409
    var different = bindingUpdated4(exp1, exp2, exp3, exp4);
70410
    return bindingUpdated2(exp5, exp6) || different ?
70411
        checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6) :
70412
            pureFn(exp1, exp2, exp3, exp4, exp5, exp6)) :
70413
        consumeBinding();
70414
}
70415
/**
70416
 * If the value of any provided exp has changed, calls the pure function to return
70417
 * an updated value. Or if no values have changed, returns cached value.
70418
 *
70419
 * @param pureFn
70420
 * @param exp1
70421
 * @param exp2
70422
 * @param exp3
70423
 * @param exp4
70424
 * @param exp5
70425
 * @param exp6
70426
 * @param exp7
70427
 * @returns Updated value
70428
 */
70429
function pureFunction7(pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, thisArg) {
70430
    var different = bindingUpdated4(exp1, exp2, exp3, exp4);
70431
    different = bindingUpdated2(exp5, exp6) || different;
70432
    return bindingUpdated(exp7) || different ?
70433
        checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7) :
70434
            pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7)) :
70435
        consumeBinding();
70436
}
70437
/**
70438
 * If the value of any provided exp has changed, calls the pure function to return
70439
 * an updated value. Or if no values have changed, returns cached value.
70440
 *
70441
 * @param pureFn
70442
 * @param exp1
70443
 * @param exp2
70444
 * @param exp3
70445
 * @param exp4
70446
 * @param exp5
70447
 * @param exp6
70448
 * @param exp7
70449
 * @param exp8
70450
 * @returns Updated value
70451
 */
70452
function pureFunction8(pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8, thisArg) {
70453
    var different = bindingUpdated4(exp1, exp2, exp3, exp4);
70454
    return bindingUpdated4(exp5, exp6, exp7, exp8) || different ?
70455
        checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8) :
70456
            pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8)) :
70457
        consumeBinding();
70458
}
70459
/**
70460
 * pureFunction instruction that can support any number of bindings.
70461
 *
70462
 * If the value of any provided exp has changed, calls the pure function to return
70463
 * an updated value. Or if no values have changed, returns cached value.
70464
 *
70465
 * @param pureFn A pure function that takes binding values and builds an object or array
70466
 * containing those values.
70467
 * @param exp An array of binding values
70468
 * @returns Updated value
70469
 */
70470
function pureFunctionV(pureFn, exps, thisArg) {
70471
    var different = false;
70472
    for (var i = 0; i < exps.length; i++) {
70473
        bindingUpdated(exps[i]) && (different = true);
70474
    }
70475
    return different ? checkAndUpdateBinding$1(pureFn.apply(thisArg, exps)) : consumeBinding();
70476
}
70477
 
70478
/**
70479
 * @license
70480
 * Copyright Google Inc. All Rights Reserved.
70481
 *
70482
 * Use of this source code is governed by an MIT-style license that can be
70483
 * found in the LICENSE file at https://angular.io/license
70484
 */
70485
/**
70486
 * Create a pipe.
70487
 *
70488
 * @param index Pipe index where the pipe will be stored.
70489
 * @param pipeName The name of the pipe
70490
 * @returns T the instance of the pipe.
70491
 */
70492
function pipe(index, pipeName) {
70493
    var tView = getTView();
70494
    var pipeDef;
70495
    if (tView.firstTemplatePass) {
70496
        pipeDef = getPipeDef(pipeName, tView.pipeRegistry);
70497
        tView.data[index] = pipeDef;
70498
        if (pipeDef.onDestroy) {
70499
            (tView.pipeDestroyHooks || (tView.pipeDestroyHooks = [])).push(index, pipeDef.onDestroy);
70500
        }
70501
    }
70502
    else {
70503
        pipeDef = tView.data[index];
70504
    }
70505
    var pipeInstance = pipeDef.n();
70506
    store(index, pipeInstance);
70507
    return pipeInstance;
70508
}
70509
/**
70510
 * Searches the pipe registry for a pipe with the given name. If one is found,
70511
 * returns the pipe. Otherwise, an error is thrown because the pipe cannot be resolved.
70512
 *
70513
 * @param name Name of pipe to resolve
70514
 * @param registry Full list of available pipes
70515
 * @returns Matching PipeDef
70516
 */
70517
function getPipeDef(name, registry) {
70518
    if (registry) {
70519
        for (var i = 0; i < registry.length; i++) {
70520
            var pipeDef = registry[i];
70521
            if (name === pipeDef.name) {
70522
                return pipeDef;
70523
            }
70524
        }
70525
    }
70526
    throw new Error("Pipe with name '" + name + "' not found!");
70527
}
70528
/**
70529
 * Invokes a pipe with 1 arguments.
70530
 *
70531
 * This instruction acts as a guard to {@link PipeTransform#transform} invoking
70532
 * the pipe only when an input to the pipe changes.
70533
 *
70534
 * @param index Pipe index where the pipe was stored on creation.
70535
 * @param v1 1st argument to {@link PipeTransform#transform}.
70536
 */
70537
function pipeBind1(index, v1) {
70538
    var pipeInstance = load(index);
70539
    return isPure(index) ? pureFunction1(pipeInstance.transform, v1, pipeInstance) :
70540
        pipeInstance.transform(v1);
70541
}
70542
/**
70543
 * Invokes a pipe with 2 arguments.
70544
 *
70545
 * This instruction acts as a guard to {@link PipeTransform#transform} invoking
70546
 * the pipe only when an input to the pipe changes.
70547
 *
70548
 * @param index Pipe index where the pipe was stored on creation.
70549
 * @param v1 1st argument to {@link PipeTransform#transform}.
70550
 * @param v2 2nd argument to {@link PipeTransform#transform}.
70551
 */
70552
function pipeBind2(index, v1, v2) {
70553
    var pipeInstance = load(index);
70554
    return isPure(index) ? pureFunction2(pipeInstance.transform, v1, v2, pipeInstance) :
70555
        pipeInstance.transform(v1, v2);
70556
}
70557
/**
70558
 * Invokes a pipe with 3 arguments.
70559
 *
70560
 * This instruction acts as a guard to {@link PipeTransform#transform} invoking
70561
 * the pipe only when an input to the pipe changes.
70562
 *
70563
 * @param index Pipe index where the pipe was stored on creation.
70564
 * @param v1 1st argument to {@link PipeTransform#transform}.
70565
 * @param v2 2nd argument to {@link PipeTransform#transform}.
70566
 * @param v3 4rd argument to {@link PipeTransform#transform}.
70567
 */
70568
function pipeBind3(index, v1, v2, v3) {
70569
    var pipeInstance = load(index);
70570
    return isPure(index) ? pureFunction3(pipeInstance.transform.bind(pipeInstance), v1, v2, v3) :
70571
        pipeInstance.transform(v1, v2, v3);
70572
}
70573
/**
70574
 * Invokes a pipe with 4 arguments.
70575
 *
70576
 * This instruction acts as a guard to {@link PipeTransform#transform} invoking
70577
 * the pipe only when an input to the pipe changes.
70578
 *
70579
 * @param index Pipe index where the pipe was stored on creation.
70580
 * @param v1 1st argument to {@link PipeTransform#transform}.
70581
 * @param v2 2nd argument to {@link PipeTransform#transform}.
70582
 * @param v3 3rd argument to {@link PipeTransform#transform}.
70583
 * @param v4 4th argument to {@link PipeTransform#transform}.
70584
 */
70585
function pipeBind4(index, v1, v2, v3, v4) {
70586
    var pipeInstance = load(index);
70587
    return isPure(index) ? pureFunction4(pipeInstance.transform, v1, v2, v3, v4, pipeInstance) :
70588
        pipeInstance.transform(v1, v2, v3, v4);
70589
}
70590
/**
70591
 * Invokes a pipe with variable number of arguments.
70592
 *
70593
 * This instruction acts as a guard to {@link PipeTransform#transform} invoking
70594
 * the pipe only when an input to the pipe changes.
70595
 *
70596
 * @param index Pipe index where the pipe was stored on creation.
70597
 * @param values Array of arguments to pass to {@link PipeTransform#transform} method.
70598
 */
70599
function pipeBindV(index, values) {
70600
    var pipeInstance = load(index);
70601
    return isPure(index) ? pureFunctionV(pipeInstance.transform, values, pipeInstance) :
70602
        pipeInstance.transform.apply(pipeInstance, values);
70603
}
70604
function isPure(index) {
70605
    return getTView().data[index].pure;
70606
}
70607
 
70608
/**
70609
 * @license
70610
 * Copyright Google Inc. All Rights Reserved.
70611
 *
70612
 * Use of this source code is governed by an MIT-style license that can be
70613
 * found in the LICENSE file at https://angular.io/license
70614
 */
70615
// Note: This hack is necessary so we don't erroneously get a circular dependency
70616
// failure based on types.
70617
 
70618
/**
70619
 * @license
70620
 * Copyright Google Inc. All Rights Reserved.
70621
 *
70622
 * Use of this source code is governed by an MIT-style license that can be
70623
 * found in the LICENSE file at https://angular.io/license
70624
 */
70625
// Note: This hack is necessary so we don't erroneously get a circular dependency
70626
// failure based on types.
70627
 
70628
/**
70629
 * @license
70630
 * Copyright Google Inc. All Rights Reserved.
70631
 *
70632
 * Use of this source code is governed by an MIT-style license that can be
70633
 * found in the LICENSE file at https://angular.io/license
70634
 */
70635
// Note: This hack is necessary so we don't erroneously get a circular dependency
70636
// failure based on types.
70637
 
70638
/**
70639
 * @license
70640
 * Copyright Google Inc. All Rights Reserved.
70641
 *
70642
 * Use of this source code is governed by an MIT-style license that can be
70643
 * found in the LICENSE file at https://angular.io/license
70644
 */
70645
var LQueries_ = /** @class */ (function () {
70646
    function LQueries_(deep) {
70647
        this.shallow = null;
70648
        this.deep = null;
70649
        this.deep = deep == null ? null : deep;
70650
    }
70651
    LQueries_.prototype.track = function (queryList, predicate, descend, read) {
70652
        // TODO(misko): This is not right. In case of inherited state, a calling track will incorrectly
70653
        // mutate parent.
70654
        if (descend) {
70655
            this.deep = createQuery$1(this.deep, queryList, predicate, read != null ? read : null);
70656
        }
70657
        else {
70658
            this.shallow = createQuery$1(this.shallow, queryList, predicate, read != null ? read : null);
70659
        }
70660
    };
70661
    LQueries_.prototype.child = function () {
70662
        if (this.deep === null) {
70663
            // if we don't have any deep queries then no need to track anything more.
70664
            return null;
70665
        }
70666
        if (this.shallow === null) {
70667
            // DeepQuery: We can reuse the current state if the child state would be same as current
70668
            // state.
70669
            return this;
70670
        }
70671
        else {
70672
            // We need to create new state
70673
            return new LQueries_(this.deep);
70674
        }
70675
    };
70676
    LQueries_.prototype.container = function () {
70677
        var result = null;
70678
        var query = this.deep;
70679
        while (query) {
70680
            var containerValues = []; // prepare room for views
70681
            query.values.push(containerValues);
70682
            var clonedQuery = { next: null, list: query.list, predicate: query.predicate, values: containerValues };
70683
            clonedQuery.next = result;
70684
            result = clonedQuery;
70685
            query = query.next;
70686
        }
70687
        return result ? new LQueries_(result) : null;
70688
    };
70689
    LQueries_.prototype.enterView = function (index) {
70690
        var result = null;
70691
        var query = this.deep;
70692
        while (query) {
70693
            var viewValues = []; // prepare room for view nodes
70694
            query.values.splice(index, 0, viewValues);
70695
            var clonedQuery = { next: null, list: query.list, predicate: query.predicate, values: viewValues };
70696
            clonedQuery.next = result;
70697
            result = clonedQuery;
70698
            query = query.next;
70699
        }
70700
        return result ? new LQueries_(result) : null;
70701
    };
70702
    LQueries_.prototype.addNode = function (node) {
70703
        add(this.shallow, node);
70704
        add(this.deep, node);
70705
    };
70706
    LQueries_.prototype.removeView = function (index) {
70707
        var query = this.deep;
70708
        while (query) {
70709
            var removed = query.values.splice(index, 1);
70710
            // mark a query as dirty only when removed view had matching modes
70711
            ngDevMode && assertEqual(removed.length, 1, 'removed.length');
70712
            if (removed[0].length) {
70713
                query.list.setDirty();
70714
            }
70715
            query = query.next;
70716
        }
70717
    };
70718
    return LQueries_;
70719
}());
70720
/**
70721
 * Iterates over local names for a given node and returns directive index
70722
 * (or -1 if a local name points to an element).
70723
 *
70724
 * @param tNode static data of a node to check
70725
 * @param selector selector to match
70726
 * @returns directive index, -1 or null if a selector didn't match any of the local names
70727
 */
70728
function getIdxOfMatchingSelector(tNode, selector) {
70729
    var localNames = tNode.localNames;
70730
    if (localNames) {
70731
        for (var i = 0; i < localNames.length; i += 2) {
70732
            if (localNames[i] === selector) {
70733
                return localNames[i + 1];
70734
            }
70735
        }
70736
    }
70737
    return null;
70738
}
70739
/**
70740
 * Iterates over all the directives for a node and returns index of a directive for a given type.
70741
 *
70742
 * @param node Node on which directives are present.
70743
 * @param type Type of a directive to look for.
70744
 * @returns Index of a found directive or null when none found.
70745
 */
70746
function getIdxOfMatchingDirective(node, type) {
70747
    var defs = (node.view.tView.directives);
70748
    var flags = node.tNode.flags;
70749
    var count = flags & 4095;
70750
    var start = flags >> 13;
70751
    var end = start + count;
70752
    for (var i = start; i < end; i++) {
70753
        var def = defs[i];
70754
        if (def.type === type && def.diPublic) {
70755
            return i;
70756
        }
70757
    }
70758
    return null;
70759
}
70760
function readFromNodeInjector(nodeInjector, node, read, directiveIdx) {
70761
    if (read instanceof ReadFromInjectorFn) {
70762
        return read.read(nodeInjector, node, directiveIdx);
70763
    }
70764
    else {
70765
        var matchingIdx = getIdxOfMatchingDirective(node, read);
70766
        if (matchingIdx !== null) {
70767
            return node.view.directives[matchingIdx];
70768
        }
70769
    }
70770
    return null;
70771
}
70772
function add(query, node) {
70773
    var nodeInjector = getOrCreateNodeInjectorForNode(node);
70774
    while (query) {
70775
        var predicate = query.predicate;
70776
        var type = predicate.type;
70777
        if (type) {
70778
            var directiveIdx = getIdxOfMatchingDirective(node, type);
70779
            if (directiveIdx !== null) {
70780
                // a node is matching a predicate - determine what to read
70781
                // if read token and / or strategy is not specified, use type as read token
70782
                var result = readFromNodeInjector(nodeInjector, node, predicate.read || type, directiveIdx);
70783
                if (result !== null) {
70784
                    addMatch(query, result);
70785
                }
70786
            }
70787
        }
70788
        else {
70789
            var selector = (predicate.selector);
70790
            for (var i = 0; i < selector.length; i++) {
70791
                ngDevMode && assertNotNull(node.tNode, 'node.tNode');
70792
                var directiveIdx = getIdxOfMatchingSelector((node.tNode), selector[i]);
70793
                if (directiveIdx !== null) {
70794
                    // a node is matching a predicate - determine what to read
70795
                    // note that queries using name selector must specify read strategy
70796
                    ngDevMode && assertNotNull(predicate.read, 'the node should have a predicate');
70797
                    var result = readFromNodeInjector(nodeInjector, node, (predicate.read), directiveIdx);
70798
                    if (result !== null) {
70799
                        addMatch(query, result);
70800
                    }
70801
                }
70802
            }
70803
        }
70804
        query = query.next;
70805
    }
70806
}
70807
function addMatch(query, matchingValue) {
70808
    query.values.push(matchingValue);
70809
    query.list.setDirty();
70810
}
70811
function createPredicate(predicate, read) {
70812
    var isArray = Array.isArray(predicate);
70813
    return {
70814
        type: isArray ? null : predicate,
70815
        selector: isArray ? predicate : null,
70816
        read: read
70817
    };
70818
}
70819
function createQuery$1(previous, queryList, predicate, read) {
70820
    return {
70821
        next: previous,
70822
        list: queryList,
70823
        predicate: createPredicate(predicate, read),
70824
        values: queryList._valuesTree
70825
    };
70826
}
70827
var QueryList_ = /** @class */ (function () {
70828
    function QueryList_() {
70829
        this.dirty = true;
70830
        this.changes = new EventEmitter();
70831
        this._values = [];
70832
        /** @internal */
70833
        this._valuesTree = [];
70834
    }
70835
    Object.defineProperty(QueryList_.prototype, "length", {
70836
        get: function () { return this._values.length; },
70837
        enumerable: true,
70838
        configurable: true
70839
    });
70840
    Object.defineProperty(QueryList_.prototype, "first", {
70841
        get: function () {
70842
            var values = this._values;
70843
            return values.length ? values[0] : null;
70844
        },
70845
        enumerable: true,
70846
        configurable: true
70847
    });
70848
    Object.defineProperty(QueryList_.prototype, "last", {
70849
        get: function () {
70850
            var values = this._values;
70851
            return values.length ? values[values.length - 1] : null;
70852
        },
70853
        enumerable: true,
70854
        configurable: true
70855
    });
70856
    /**
70857
     * See
70858
     * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
70859
     */
70860
    /**
70861
       * See
70862
       * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
70863
       */
70864
    QueryList_.prototype.map = /**
70865
       * See
70866
       * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
70867
       */
70868
    function (fn) { return this._values.map(fn); };
70869
    /**
70870
     * See
70871
     * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
70872
     */
70873
    /**
70874
       * See
70875
       * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
70876
       */
70877
    QueryList_.prototype.filter = /**
70878
       * See
70879
       * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
70880
       */
70881
    function (fn) {
70882
        return this._values.filter(fn);
70883
    };
70884
    /**
70885
     * See
70886
     * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
70887
     */
70888
    /**
70889
       * See
70890
       * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
70891
       */
70892
    QueryList_.prototype.find = /**
70893
       * See
70894
       * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
70895
       */
70896
    function (fn) {
70897
        return this._values.find(fn);
70898
    };
70899
    /**
70900
     * See
70901
     * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
70902
     */
70903
    /**
70904
       * See
70905
       * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
70906
       */
70907
    QueryList_.prototype.reduce = /**
70908
       * See
70909
       * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
70910
       */
70911
    function (fn, init) {
70912
        return this._values.reduce(fn, init);
70913
    };
70914
    /**
70915
     * See
70916
     * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
70917
     */
70918
    /**
70919
       * See
70920
       * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
70921
       */
70922
    QueryList_.prototype.forEach = /**
70923
       * See
70924
       * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
70925
       */
70926
    function (fn) { this._values.forEach(fn); };
70927
    /**
70928
     * See
70929
     * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
70930
     */
70931
    /**
70932
       * See
70933
       * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
70934
       */
70935
    QueryList_.prototype.some = /**
70936
       * See
70937
       * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
70938
       */
70939
    function (fn) {
70940
        return this._values.some(fn);
70941
    };
70942
    QueryList_.prototype.toArray = function () { return this._values.slice(0); };
70943
    QueryList_.prototype[getSymbolIterator()] = function () { return this._values[getSymbolIterator()](); };
70944
    QueryList_.prototype.toString = function () { return this._values.toString(); };
70945
    QueryList_.prototype.reset = function (res) {
70946
        this._values = flatten$1(res);
70947
        this.dirty = false;
70948
    };
70949
    QueryList_.prototype.notifyOnChanges = function () { this.changes.emit(this); };
70950
    QueryList_.prototype.setDirty = function () { this.dirty = true; };
70951
    QueryList_.prototype.destroy = function () {
70952
        this.changes.complete();
70953
        this.changes.unsubscribe();
70954
    };
70955
    return QueryList_;
70956
}());
70957
var QueryList$1 = QueryList_;
70958
/**
70959
 * Creates and returns a QueryList.
70960
 *
70961
 * @param memoryIndex The index in memory where the QueryList should be saved. If null,
70962
 * this is is a content query and the QueryList will be saved later through directiveCreate.
70963
 * @param predicate The type for which the query will search
70964
 * @param descend Whether or not to descend into children
70965
 * @param read What to save in the query
70966
 * @returns QueryList<T>
70967
 */
70968
function query(memoryIndex, predicate, descend, read) {
70969
    ngDevMode && assertPreviousIsParent();
70970
    var queryList = new QueryList$1();
70971
    var queries = getCurrentQueries(LQueries_);
70972
    queries.track(queryList, predicate, descend, read);
70973
    if (memoryIndex != null) {
70974
        store(memoryIndex, queryList);
70975
    }
70976
    return queryList;
70977
}
70978
/**
70979
 * Refreshes a query by combining matches from all active views and removing matches from deleted
70980
 * views.
70981
 * Returns true if a query got dirty during change detection, false otherwise.
70982
 */
70983
function queryRefresh(queryList) {
70984
    var queryListImpl = queryList;
70985
    if (queryList.dirty) {
70986
        queryList.reset(queryListImpl._valuesTree);
70987
        queryList.notifyOnChanges();
70988
        return true;
70989
    }
70990
    return false;
70991
}
70992
 
70993
/**
70994
 * @license
70995
 * Copyright Google Inc. All Rights Reserved.
70996
 *
70997
 * Use of this source code is governed by an MIT-style license that can be
70998
 * found in the LICENSE file at https://angular.io/license
70999
 */
71000
 
71001
/**
71002
 * @license
71003
 * Copyright Google Inc. All Rights Reserved.
71004
 *
71005
 * Use of this source code is governed by an MIT-style license that can be
71006
 * found in the LICENSE file at https://angular.io/license
71007
 */
71008
var BRAND = '__SANITIZER_TRUSTED_BRAND__';
71009
/**
71010
 * An `html` sanitizer which converts untrusted `html` **string** into trusted string by removing
71011
 * dangerous content.
71012
 *
71013
 * This method parses the `html` and locates potentially dangerous content (such as urls and
71014
 * javascript) and removes it.
71015
 *
71016
 * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}.
71017
 *
71018
 * @param unsafeHtml untrusted `html`, typically from the user.
71019
 * @returns `html` string which is safe to display to user, because all of the dangerous javascript
71020
 * and urls have been removed.
71021
 */
71022
function sanitizeHtml(unsafeHtml) {
71023
    if (unsafeHtml instanceof String && unsafeHtml[BRAND] === 'Html') {
71024
        return unsafeHtml.toString();
71025
    }
71026
    return _sanitizeHtml(document, stringify$1(unsafeHtml));
71027
}
71028
/**
71029
 * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing
71030
 * dangerous content.
71031
 *
71032
 * This method parses the `style` and locates potentially dangerous content (such as urls and
71033
 * javascript) and removes it.
71034
 *
71035
 * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustStyle}.
71036
 *
71037
 * @param unsafeStyle untrusted `style`, typically from the user.
71038
 * @returns `style` string which is safe to bind to the `style` properties, because all of the
71039
 * dangerous javascript and urls have been removed.
71040
 */
71041
function sanitizeStyle(unsafeStyle) {
71042
    if (unsafeStyle instanceof String && unsafeStyle[BRAND] === 'Style') {
71043
        return unsafeStyle.toString();
71044
    }
71045
    return _sanitizeStyle(stringify$1(unsafeStyle));
71046
}
71047
/**
71048
 * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing
71049
 * dangerous
71050
 * content.
71051
 *
71052
 * This method parses the `url` and locates potentially dangerous content (such as javascript) and
71053
 * removes it.
71054
 *
71055
 * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}.
71056
 *
71057
 * @param unsafeUrl untrusted `url`, typically from the user.
71058
 * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because
71059
 * all of the dangerous javascript has been removed.
71060
 */
71061
function sanitizeUrl(unsafeUrl) {
71062
    if (unsafeUrl instanceof String && unsafeUrl[BRAND] === 'Url') {
71063
        return unsafeUrl.toString();
71064
    }
71065
    return _sanitizeUrl(stringify$1(unsafeUrl));
71066
}
71067
/**
71068
 * A `url` sanitizer which only lets trusted `url`s through.
71069
 *
71070
 * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}.
71071
 *
71072
 * @param unsafeResourceUrl untrusted `url`, typically from the user.
71073
 * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because
71074
 * only trusted `url`s have been allowed to pass.
71075
 */
71076
function sanitizeResourceUrl(unsafeResourceUrl) {
71077
    if (unsafeResourceUrl instanceof String &&
71078
        unsafeResourceUrl[BRAND] === 'ResourceUrl') {
71079
        return unsafeResourceUrl.toString();
71080
    }
71081
    throw new Error('unsafe value used in a resource URL context (see http://g.co/ng/security#xss)');
71082
}
71083
/**
71084
 * A `script` sanitizer which only lets trusted javascript through.
71085
 *
71086
 * This passes only `script`s marked trusted by calling {@link bypassSanitizationTrustScript}.
71087
 *
71088
 * @param unsafeScript untrusted `script`, typically from the user.
71089
 * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`,
71090
 * because only trusted `scripts`s have been allowed to pass.
71091
 */
71092
 
71093
/**
71094
 * Mark `html` string as trusted.
71095
 *
71096
 * This function wraps the trusted string in `String` and brands it in a way which makes it
71097
 * recognizable to {@link htmlSanitizer} to be trusted implicitly.
71098
 *
71099
 * @param trustedHtml `html` string which needs to be implicitly trusted.
71100
 * @returns a `html` `String` which has been branded to be implicitly trusted.
71101
 */
71102
function bypassSanitizationTrustHtml(trustedHtml) {
71103
    return bypassSanitizationTrustString(trustedHtml, 'Html');
71104
}
71105
/**
71106
 * Mark `style` string as trusted.
71107
 *
71108
 * This function wraps the trusted string in `String` and brands it in a way which makes it
71109
 * recognizable to {@link styleSanitizer} to be trusted implicitly.
71110
 *
71111
 * @param trustedStyle `style` string which needs to be implicitly trusted.
71112
 * @returns a `style` `String` which has been branded to be implicitly trusted.
71113
 */
71114
function bypassSanitizationTrustStyle(trustedStyle) {
71115
    return bypassSanitizationTrustString(trustedStyle, 'Style');
71116
}
71117
/**
71118
 * Mark `script` string as trusted.
71119
 *
71120
 * This function wraps the trusted string in `String` and brands it in a way which makes it
71121
 * recognizable to {@link scriptSanitizer} to be trusted implicitly.
71122
 *
71123
 * @param trustedScript `script` string which needs to be implicitly trusted.
71124
 * @returns a `script` `String` which has been branded to be implicitly trusted.
71125
 */
71126
function bypassSanitizationTrustScript(trustedScript) {
71127
    return bypassSanitizationTrustString(trustedScript, 'Script');
71128
}
71129
/**
71130
 * Mark `url` string as trusted.
71131
 *
71132
 * This function wraps the trusted string in `String` and brands it in a way which makes it
71133
 * recognizable to {@link urlSanitizer} to be trusted implicitly.
71134
 *
71135
 * @param trustedUrl `url` string which needs to be implicitly trusted.
71136
 * @returns a `url` `String` which has been branded to be implicitly trusted.
71137
 */
71138
function bypassSanitizationTrustUrl(trustedUrl) {
71139
    return bypassSanitizationTrustString(trustedUrl, 'Url');
71140
}
71141
/**
71142
 * Mark `url` string as trusted.
71143
 *
71144
 * This function wraps the trusted string in `String` and brands it in a way which makes it
71145
 * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly.
71146
 *
71147
 * @param trustedResourceUrl `url` string which needs to be implicitly trusted.
71148
 * @returns a `url` `String` which has been branded to be implicitly trusted.
71149
 */
71150
function bypassSanitizationTrustResourceUrl(trustedResourceUrl) {
71151
    return bypassSanitizationTrustString(trustedResourceUrl, 'ResourceUrl');
71152
}
71153
function bypassSanitizationTrustString(trustedString, mode) {
71154
    var trusted = new String(trustedString);
71155
    trusted[BRAND] = mode;
71156
    return trusted;
71157
}
71158
 
71159
/**
71160
 * @license
71161
 * Copyright Google Inc. All Rights Reserved.
71162
 *
71163
 * Use of this source code is governed by an MIT-style license that can be
71164
 * found in the LICENSE file at https://angular.io/license
71165
 */
71166
 
71167
// clang-format on
71168
 
71169
/**
71170
 * @license
71171
 * Copyright Google Inc. All Rights Reserved.
71172
 *
71173
 * Use of this source code is governed by an MIT-style license that can be
71174
 * found in the LICENSE file at https://angular.io/license
71175
 */
71176
 
71177
/**
71178
 * @license
71179
 * Copyright Google Inc. All Rights Reserved.
71180
 *
71181
 * Use of this source code is governed by an MIT-style license that can be
71182
 * found in the LICENSE file at https://angular.io/license
71183
 */
71184
 
71185
/**
71186
 * @license
71187
 * Copyright Google Inc. All Rights Reserved.
71188
 *
71189
 * Use of this source code is governed by an MIT-style license that can be
71190
 * found in the LICENSE file at https://angular.io/license
71191
 */
71192
 
71193
// This file only reexports content of the `src` folder. Keep it that way.
71194
 
71195
/**
71196
 * @license
71197
 * Copyright Google Inc. All Rights Reserved.
71198
 *
71199
 * Use of this source code is governed by an MIT-style license that can be
71200
 * found in the LICENSE file at https://angular.io/license
71201
 */
71202
 
71203
/**
71204
 * Generated bundle index. Do not edit.
71205
 */
71206
 
71207
 
71208
//# sourceMappingURL=core.js.map
71209
 
71210
 
71211
/***/ }),
71212
 
71213
/***/ "./node_modules/@angular/forms/fesm5/forms.js":
71214
/*!****************************************************!*\
71215
  !*** ./node_modules/@angular/forms/fesm5/forms.js ***!
71216
  \****************************************************/
71217
/*! exports provided: ɵangular_packages_forms_forms_bb, ɵangular_packages_forms_forms_ba, ɵangular_packages_forms_forms_y, ɵangular_packages_forms_forms_z, ɵangular_packages_forms_forms_a, ɵangular_packages_forms_forms_b, ɵangular_packages_forms_forms_c, ɵangular_packages_forms_forms_d, ɵangular_packages_forms_forms_e, ɵangular_packages_forms_forms_f, ɵangular_packages_forms_forms_g, ɵangular_packages_forms_forms_bg, ɵangular_packages_forms_forms_bc, ɵangular_packages_forms_forms_bd, ɵangular_packages_forms_forms_h, ɵangular_packages_forms_forms_i, ɵangular_packages_forms_forms_be, ɵangular_packages_forms_forms_bf, ɵangular_packages_forms_forms_j, ɵangular_packages_forms_forms_k, ɵangular_packages_forms_forms_l, ɵangular_packages_forms_forms_m, ɵangular_packages_forms_forms_o, ɵangular_packages_forms_forms_n, ɵangular_packages_forms_forms_p, ɵangular_packages_forms_forms_r, ɵangular_packages_forms_forms_q, ɵangular_packages_forms_forms_t, ɵangular_packages_forms_forms_u, ɵangular_packages_forms_forms_w, ɵangular_packages_forms_forms_v, ɵangular_packages_forms_forms_x, ɵangular_packages_forms_forms_s, AbstractControlDirective, AbstractFormGroupDirective, CheckboxControlValueAccessor, ControlContainer, NG_VALUE_ACCESSOR, COMPOSITION_BUFFER_MODE, DefaultValueAccessor, NgControl, NgControlStatus, NgControlStatusGroup, NgForm, NgModel, NgModelGroup, RadioControlValueAccessor, FormControlDirective, FormControlName, FormGroupDirective, FormArrayName, FormGroupName, NgSelectOption, SelectControlValueAccessor, SelectMultipleControlValueAccessor, CheckboxRequiredValidator, EmailValidator, MaxLengthValidator, MinLengthValidator, PatternValidator, RequiredValidator, FormBuilder, AbstractControl, FormArray, FormControl, FormGroup, NG_ASYNC_VALIDATORS, NG_VALIDATORS, Validators, VERSION, FormsModule, ReactiveFormsModule */
71218
/***/ (function(module, __webpack_exports__, __webpack_require__) {
71219
 
71220
"use strict";
71221
__webpack_require__.r(__webpack_exports__);
71222
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_bb", function() { return InternalFormsSharedModule; });
71223
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_ba", function() { return REACTIVE_DRIVEN_DIRECTIVES; });
71224
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_y", function() { return SHARED_FORM_DIRECTIVES; });
71225
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_z", function() { return TEMPLATE_DRIVEN_DIRECTIVES; });
71226
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_a", function() { return CHECKBOX_VALUE_ACCESSOR; });
71227
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_b", function() { return DEFAULT_VALUE_ACCESSOR; });
71228
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_c", function() { return AbstractControlStatus; });
71229
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_d", function() { return ngControlStatusHost; });
71230
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_e", function() { return formDirectiveProvider; });
71231
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_f", function() { return formControlBinding; });
71232
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_g", function() { return modelGroupProvider; });
71233
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_bg", function() { return NgNoValidate; });
71234
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_bc", function() { return NUMBER_VALUE_ACCESSOR; });
71235
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_bd", function() { return NumberValueAccessor; });
71236
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_h", function() { return RADIO_VALUE_ACCESSOR; });
71237
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_i", function() { return RadioControlRegistry; });
71238
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_be", function() { return RANGE_VALUE_ACCESSOR; });
71239
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_bf", function() { return RangeValueAccessor; });
71240
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_j", function() { return NG_MODEL_WITH_FORM_CONTROL_WARNING; });
71241
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_k", function() { return formControlBinding$1; });
71242
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_l", function() { return controlNameBinding; });
71243
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_m", function() { return formDirectiveProvider$1; });
71244
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_o", function() { return formArrayNameProvider; });
71245
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_n", function() { return formGroupNameProvider; });
71246
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_p", function() { return SELECT_VALUE_ACCESSOR; });
71247
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_r", function() { return NgSelectMultipleOption; });
71248
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_q", function() { return SELECT_MULTIPLE_VALUE_ACCESSOR; });
71249
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_t", function() { return CHECKBOX_REQUIRED_VALIDATOR; });
71250
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_u", function() { return EMAIL_VALIDATOR; });
71251
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_w", function() { return MAX_LENGTH_VALIDATOR; });
71252
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_v", function() { return MIN_LENGTH_VALIDATOR; });
71253
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_x", function() { return PATTERN_VALIDATOR; });
71254
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_s", function() { return REQUIRED_VALIDATOR; });
71255
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractControlDirective", function() { return AbstractControlDirective; });
71256
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractFormGroupDirective", function() { return AbstractFormGroupDirective; });
71257
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CheckboxControlValueAccessor", function() { return CheckboxControlValueAccessor; });
71258
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ControlContainer", function() { return ControlContainer; });
71259
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NG_VALUE_ACCESSOR", function() { return NG_VALUE_ACCESSOR; });
71260
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "COMPOSITION_BUFFER_MODE", function() { return COMPOSITION_BUFFER_MODE; });
71261
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultValueAccessor", function() { return DefaultValueAccessor; });
71262
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgControl", function() { return NgControl; });
71263
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgControlStatus", function() { return NgControlStatus; });
71264
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgControlStatusGroup", function() { return NgControlStatusGroup; });
71265
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgForm", function() { return NgForm; });
71266
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgModel", function() { return NgModel; });
71267
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgModelGroup", function() { return NgModelGroup; });
71268
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RadioControlValueAccessor", function() { return RadioControlValueAccessor; });
71269
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormControlDirective", function() { return FormControlDirective; });
71270
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormControlName", function() { return FormControlName; });
71271
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormGroupDirective", function() { return FormGroupDirective; });
71272
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormArrayName", function() { return FormArrayName; });
71273
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormGroupName", function() { return FormGroupName; });
71274
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgSelectOption", function() { return NgSelectOption; });
71275
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectControlValueAccessor", function() { return SelectControlValueAccessor; });
71276
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectMultipleControlValueAccessor", function() { return SelectMultipleControlValueAccessor; });
71277
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CheckboxRequiredValidator", function() { return CheckboxRequiredValidator; });
71278
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmailValidator", function() { return EmailValidator; });
71279
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MaxLengthValidator", function() { return MaxLengthValidator; });
71280
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MinLengthValidator", function() { return MinLengthValidator; });
71281
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PatternValidator", function() { return PatternValidator; });
71282
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RequiredValidator", function() { return RequiredValidator; });
71283
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormBuilder", function() { return FormBuilder; });
71284
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractControl", function() { return AbstractControl; });
71285
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormArray", function() { return FormArray; });
71286
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormControl", function() { return FormControl; });
71287
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormGroup", function() { return FormGroup; });
71288
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NG_ASYNC_VALIDATORS", function() { return NG_ASYNC_VALIDATORS; });
71289
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NG_VALIDATORS", function() { return NG_VALIDATORS; });
71290
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Validators", function() { return Validators; });
71291
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; });
71292
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormsModule", function() { return FormsModule; });
71293
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReactiveFormsModule", function() { return ReactiveFormsModule; });
71294
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
71295
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
71296
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
71297
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
71298
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js");
71299
/**
71300
 * @license Angular v6.0.3
71301
 * (c) 2010-2018 Google, Inc. https://angular.io/
71302
 * License: MIT
71303
 */
71304
 
71305
 
71306
 
71307
 
71308
 
71309
 
71310
 
71311
/**
71312
 * @license
71313
 * Copyright Google Inc. All Rights Reserved.
71314
 *
71315
 * Use of this source code is governed by an MIT-style license that can be
71316
 * found in the LICENSE file at https://angular.io/license
71317
 */
71318
/**
71319
 * Base class for control directives.
71320
 *
71321
 * Only used internally in the forms module.
71322
 *
71323
 *
71324
 */
71325
var AbstractControlDirective = /** @class */ (function () {
71326
    function AbstractControlDirective() {
71327
    }
71328
    Object.defineProperty(AbstractControlDirective.prototype, "value", {
71329
        /** The value of the control. */
71330
        get: /** The value of the control. */
71331
        function () { return this.control ? this.control.value : null; },
71332
        enumerable: true,
71333
        configurable: true
71334
    });
71335
    Object.defineProperty(AbstractControlDirective.prototype, "valid", {
71336
        /**
71337
         * A control is `valid` when its `status === VALID`.
71338
         *
71339
         * In order to have this status, the control must have passed all its
71340
         * validation checks.
71341
         */
71342
        get: /**
71343
           * A control is `valid` when its `status === VALID`.
71344
           *
71345
           * In order to have this status, the control must have passed all its
71346
           * validation checks.
71347
           */
71348
        function () { return this.control ? this.control.valid : null; },
71349
        enumerable: true,
71350
        configurable: true
71351
    });
71352
    Object.defineProperty(AbstractControlDirective.prototype, "invalid", {
71353
        /**
71354
         * A control is `invalid` when its `status === INVALID`.
71355
         *
71356
         * In order to have this status, the control must have failed
71357
         * at least one of its validation checks.
71358
         */
71359
        get: /**
71360
           * A control is `invalid` when its `status === INVALID`.
71361
           *
71362
           * In order to have this status, the control must have failed
71363
           * at least one of its validation checks.
71364
           */
71365
        function () { return this.control ? this.control.invalid : null; },
71366
        enumerable: true,
71367
        configurable: true
71368
    });
71369
    Object.defineProperty(AbstractControlDirective.prototype, "pending", {
71370
        /**
71371
         * A control is `pending` when its `status === PENDING`.
71372
         *
71373
         * In order to have this status, the control must be in the
71374
         * middle of conducting a validation check.
71375
         */
71376
        get: /**
71377
           * A control is `pending` when its `status === PENDING`.
71378
           *
71379
           * In order to have this status, the control must be in the
71380
           * middle of conducting a validation check.
71381
           */
71382
        function () { return this.control ? this.control.pending : null; },
71383
        enumerable: true,
71384
        configurable: true
71385
    });
71386
    Object.defineProperty(AbstractControlDirective.prototype, "disabled", {
71387
        /**
71388
         * A control is `disabled` when its `status === DISABLED`.
71389
         *
71390
         * Disabled controls are exempt from validation checks and
71391
         * are not included in the aggregate value of their ancestor
71392
         * controls.
71393
         */
71394
        get: /**
71395
           * A control is `disabled` when its `status === DISABLED`.
71396
           *
71397
           * Disabled controls are exempt from validation checks and
71398
           * are not included in the aggregate value of their ancestor
71399
           * controls.
71400
           */
71401
        function () { return this.control ? this.control.disabled : null; },
71402
        enumerable: true,
71403
        configurable: true
71404
    });
71405
    Object.defineProperty(AbstractControlDirective.prototype, "enabled", {
71406
        /**
71407
         * A control is `enabled` as long as its `status !== DISABLED`.
71408
         *
71409
         * In other words, it has a status of `VALID`, `INVALID`, or
71410
         * `PENDING`.
71411
         */
71412
        get: /**
71413
           * A control is `enabled` as long as its `status !== DISABLED`.
71414
           *
71415
           * In other words, it has a status of `VALID`, `INVALID`, or
71416
           * `PENDING`.
71417
           */
71418
        function () { return this.control ? this.control.enabled : null; },
71419
        enumerable: true,
71420
        configurable: true
71421
    });
71422
    Object.defineProperty(AbstractControlDirective.prototype, "errors", {
71423
        /**
71424
         * Returns any errors generated by failing validation. If there
71425
         * are no errors, it will return null.
71426
         */
71427
        get: /**
71428
           * Returns any errors generated by failing validation. If there
71429
           * are no errors, it will return null.
71430
           */
71431
        function () { return this.control ? this.control.errors : null; },
71432
        enumerable: true,
71433
        configurable: true
71434
    });
71435
    Object.defineProperty(AbstractControlDirective.prototype, "pristine", {
71436
        /**
71437
         * A control is `pristine` if the user has not yet changed
71438
         * the value in the UI.
71439
         *
71440
         * Note that programmatic changes to a control's value will
71441
         * *not* mark it dirty.
71442
         */
71443
        get: /**
71444
           * A control is `pristine` if the user has not yet changed
71445
           * the value in the UI.
71446
           *
71447
           * Note that programmatic changes to a control's value will
71448
           * *not* mark it dirty.
71449
           */
71450
        function () { return this.control ? this.control.pristine : null; },
71451
        enumerable: true,
71452
        configurable: true
71453
    });
71454
    Object.defineProperty(AbstractControlDirective.prototype, "dirty", {
71455
        /**
71456
         * A control is `dirty` if the user has changed the value
71457
         * in the UI.
71458
         *
71459
         * Note that programmatic changes to a control's value will
71460
         * *not* mark it dirty.
71461
         */
71462
        get: /**
71463
           * A control is `dirty` if the user has changed the value
71464
           * in the UI.
71465
           *
71466
           * Note that programmatic changes to a control's value will
71467
           * *not* mark it dirty.
71468
           */
71469
        function () { return this.control ? this.control.dirty : null; },
71470
        enumerable: true,
71471
        configurable: true
71472
    });
71473
    Object.defineProperty(AbstractControlDirective.prototype, "touched", {
71474
        /**
71475
         * A control is marked `touched` once the user has triggered
71476
         * a `blur` event on it.
71477
         */
71478
        get: /**
71479
           * A control is marked `touched` once the user has triggered
71480
           * a `blur` event on it.
71481
           */
71482
        function () { return this.control ? this.control.touched : null; },
71483
        enumerable: true,
71484
        configurable: true
71485
    });
71486
    Object.defineProperty(AbstractControlDirective.prototype, "status", {
71487
        get: function () { return this.control ? this.control.status : null; },
71488
        enumerable: true,
71489
        configurable: true
71490
    });
71491
    Object.defineProperty(AbstractControlDirective.prototype, "untouched", {
71492
        /**
71493
         * A control is `untouched` if the user has not yet triggered
71494
         * a `blur` event on it.
71495
         */
71496
        get: /**
71497
           * A control is `untouched` if the user has not yet triggered
71498
           * a `blur` event on it.
71499
           */
71500
        function () { return this.control ? this.control.untouched : null; },
71501
        enumerable: true,
71502
        configurable: true
71503
    });
71504
    Object.defineProperty(AbstractControlDirective.prototype, "statusChanges", {
71505
        /**
71506
         * Emits an event every time the validation status of the control
71507
         * is re-calculated.
71508
         */
71509
        get: /**
71510
           * Emits an event every time the validation status of the control
71511
           * is re-calculated.
71512
           */
71513
        function () {
71514
            return this.control ? this.control.statusChanges : null;
71515
        },
71516
        enumerable: true,
71517
        configurable: true
71518
    });
71519
    Object.defineProperty(AbstractControlDirective.prototype, "valueChanges", {
71520
        /**
71521
         * Emits an event every time the value of the control changes, in
71522
         * the UI or programmatically.
71523
         */
71524
        get: /**
71525
           * Emits an event every time the value of the control changes, in
71526
           * the UI or programmatically.
71527
           */
71528
        function () {
71529
            return this.control ? this.control.valueChanges : null;
71530
        },
71531
        enumerable: true,
71532
        configurable: true
71533
    });
71534
    Object.defineProperty(AbstractControlDirective.prototype, "path", {
71535
        /**
71536
         * Returns an array that represents the path from the top-level form
71537
         * to this control. Each index is the string name of the control on
71538
         * that level.
71539
         */
71540
        get: /**
71541
           * Returns an array that represents the path from the top-level form
71542
           * to this control. Each index is the string name of the control on
71543
           * that level.
71544
           */
71545
        function () { return null; },
71546
        enumerable: true,
71547
        configurable: true
71548
    });
71549
    /**
71550
     * Resets the form control. This means by default:
71551
     *
71552
     * * it is marked as `pristine`
71553
     * * it is marked as `untouched`
71554
     * * value is set to null
71555
     *
71556
     * For more information, see `AbstractControl`.
71557
     */
71558
    /**
71559
       * Resets the form control. This means by default:
71560
       *
71561
       * * it is marked as `pristine`
71562
       * * it is marked as `untouched`
71563
       * * value is set to null
71564
       *
71565
       * For more information, see `AbstractControl`.
71566
       */
71567
    AbstractControlDirective.prototype.reset = /**
71568
       * Resets the form control. This means by default:
71569
       *
71570
       * * it is marked as `pristine`
71571
       * * it is marked as `untouched`
71572
       * * value is set to null
71573
       *
71574
       * For more information, see `AbstractControl`.
71575
       */
71576
    function (value) {
71577
        if (value === void 0) { value = undefined; }
71578
        if (this.control)
71579
            this.control.reset(value);
71580
    };
71581
    /**
71582
     * Returns true if the control with the given path has the error specified. Otherwise
71583
     * returns false.
71584
     *
71585
     * If no path is given, it checks for the error on the present control.
71586
     */
71587
    /**
71588
       * Returns true if the control with the given path has the error specified. Otherwise
71589
       * returns false.
71590
       *
71591
       * If no path is given, it checks for the error on the present control.
71592
       */
71593
    AbstractControlDirective.prototype.hasError = /**
71594
       * Returns true if the control with the given path has the error specified. Otherwise
71595
       * returns false.
71596
       *
71597
       * If no path is given, it checks for the error on the present control.
71598
       */
71599
    function (errorCode, path) {
71600
        return this.control ? this.control.hasError(errorCode, path) : false;
71601
    };
71602
    /**
71603
     * Returns error data if the control with the given path has the error specified. Otherwise
71604
     * returns null or undefined.
71605
     *
71606
     * If no path is given, it checks for the error on the present control.
71607
     */
71608
    /**
71609
       * Returns error data if the control with the given path has the error specified. Otherwise
71610
       * returns null or undefined.
71611
       *
71612
       * If no path is given, it checks for the error on the present control.
71613
       */
71614
    AbstractControlDirective.prototype.getError = /**
71615
       * Returns error data if the control with the given path has the error specified. Otherwise
71616
       * returns null or undefined.
71617
       *
71618
       * If no path is given, it checks for the error on the present control.
71619
       */
71620
    function (errorCode, path) {
71621
        return this.control ? this.control.getError(errorCode, path) : null;
71622
    };
71623
    return AbstractControlDirective;
71624
}());
71625
 
71626
/**
71627
 * @license
71628
 * Copyright Google Inc. All Rights Reserved.
71629
 *
71630
 * Use of this source code is governed by an MIT-style license that can be
71631
 * found in the LICENSE file at https://angular.io/license
71632
 */
71633
/**
71634
 * A directive that contains multiple `NgControl`s.
71635
 *
71636
 * Only used by the forms module.
71637
 *
71638
 *
71639
 */
71640
var ControlContainer = /** @class */ (function (_super) {
71641
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ControlContainer, _super);
71642
    function ControlContainer() {
71643
        return _super !== null && _super.apply(this, arguments) || this;
71644
    }
71645
    Object.defineProperty(ControlContainer.prototype, "formDirective", {
71646
        /**
71647
         * Get the form to which this container belongs.
71648
         */
71649
        get: /**
71650
           * Get the form to which this container belongs.
71651
           */
71652
        function () { return null; },
71653
        enumerable: true,
71654
        configurable: true
71655
    });
71656
    Object.defineProperty(ControlContainer.prototype, "path", {
71657
        /**
71658
         * Get the path to this container.
71659
         */
71660
        get: /**
71661
           * Get the path to this container.
71662
           */
71663
        function () { return null; },
71664
        enumerable: true,
71665
        configurable: true
71666
    });
71667
    return ControlContainer;
71668
}(AbstractControlDirective));
71669
 
71670
/**
71671
 * @license
71672
 * Copyright Google Inc. All Rights Reserved.
71673
 *
71674
 * Use of this source code is governed by an MIT-style license that can be
71675
 * found in the LICENSE file at https://angular.io/license
71676
 */
71677
function isEmptyInputValue(value) {
71678
    // we don't check for string here so it also works with arrays
71679
    return value == null || value.length === 0;
71680
}
71681
/**
71682
 * Providers for validators to be used for `FormControl`s in a form.
71683
 *
71684
 * Provide this using `multi: true` to add validators.
71685
 *
71686
 * ### Example
71687
 *
71688
 * ```typescript
71689
 * @Directive({
71690
 *   selector: '[custom-validator]',
71691
 *   providers: [{provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true}]
71692
 * })
71693
 * class CustomValidatorDirective implements Validator {
71694
 *   validate(control: AbstractControl): ValidationErrors | null {
71695
 *     return {"custom": true};
71696
 *   }
71697
 * }
71698
 * ```
71699
 *
71700
 *
71701
 */
71702
var NG_VALIDATORS = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('NgValidators');
71703
/**
71704
 * Providers for asynchronous validators to be used for `FormControl`s
71705
 * in a form.
71706
 *
71707
 * Provide this using `multi: true` to add validators.
71708
 *
71709
 * See `NG_VALIDATORS` for more details.
71710
 *
71711
 *
71712
 */
71713
var NG_ASYNC_VALIDATORS = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('NgAsyncValidators');
71714
var EMAIL_REGEXP = /^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/;
71715
/**
71716
 * Provides a set of validators used by form controls.
71717
 *
71718
 * A validator is a function that processes a `FormControl` or collection of
71719
 * controls and returns a map of errors. A null map means that validation has passed.
71720
 *
71721
 * ### Example
71722
 *
71723
 * ```typescript
71724
 * var loginControl = new FormControl("", Validators.required)
71725
 * ```
71726
 *
71727
 *
71728
 */
71729
var Validators = /** @class */ (function () {
71730
    function Validators() {
71731
    }
71732
    /**
71733
     * Validator that requires controls to have a value greater than a number.
71734
     *`min()` exists only as a function, not as a directive. For example,
71735
     * `control = new FormControl('', Validators.min(3));`.
71736
     */
71737
    /**
71738
       * Validator that requires controls to have a value greater than a number.
71739
       *`min()` exists only as a function, not as a directive. For example,
71740
       * `control = new FormControl('', Validators.min(3));`.
71741
       */
71742
    Validators.min = /**
71743
       * Validator that requires controls to have a value greater than a number.
71744
       *`min()` exists only as a function, not as a directive. For example,
71745
       * `control = new FormControl('', Validators.min(3));`.
71746
       */
71747
    function (min) {
71748
        return function (control) {
71749
            if (isEmptyInputValue(control.value) || isEmptyInputValue(min)) {
71750
                return null; // don't validate empty values to allow optional controls
71751
            }
71752
            var value = parseFloat(control.value);
71753
            // Controls with NaN values after parsing should be treated as not having a
71754
            // minimum, per the HTML forms spec: https://www.w3.org/TR/html5/forms.html#attr-input-min
71755
            return !isNaN(value) && value < min ? { 'min': { 'min': min, 'actual': control.value } } : null;
71756
        };
71757
    };
71758
    /**
71759
     * Validator that requires controls to have a value less than a number.
71760
     * `max()` exists only as a function, not as a directive. For example,
71761
     * `control = new FormControl('', Validators.max(15));`.
71762
     */
71763
    /**
71764
       * Validator that requires controls to have a value less than a number.
71765
       * `max()` exists only as a function, not as a directive. For example,
71766
       * `control = new FormControl('', Validators.max(15));`.
71767
       */
71768
    Validators.max = /**
71769
       * Validator that requires controls to have a value less than a number.
71770
       * `max()` exists only as a function, not as a directive. For example,
71771
       * `control = new FormControl('', Validators.max(15));`.
71772
       */
71773
    function (max) {
71774
        return function (control) {
71775
            if (isEmptyInputValue(control.value) || isEmptyInputValue(max)) {
71776
                return null; // don't validate empty values to allow optional controls
71777
            }
71778
            var value = parseFloat(control.value);
71779
            // Controls with NaN values after parsing should be treated as not having a
71780
            // maximum, per the HTML forms spec: https://www.w3.org/TR/html5/forms.html#attr-input-max
71781
            return !isNaN(value) && value > max ? { 'max': { 'max': max, 'actual': control.value } } : null;
71782
        };
71783
    };
71784
    /**
71785
     * Validator that requires controls to have a non-empty value.
71786
     */
71787
    /**
71788
       * Validator that requires controls to have a non-empty value.
71789
       */
71790
    Validators.required = /**
71791
       * Validator that requires controls to have a non-empty value.
71792
       */
71793
    function (control) {
71794
        return isEmptyInputValue(control.value) ? { 'required': true } : null;
71795
    };
71796
    /**
71797
     * Validator that requires control value to be true.
71798
     */
71799
    /**
71800
       * Validator that requires control value to be true.
71801
       */
71802
    Validators.requiredTrue = /**
71803
       * Validator that requires control value to be true.
71804
       */
71805
    function (control) {
71806
        return control.value === true ? null : { 'required': true };
71807
    };
71808
    /**
71809
     * Validator that performs email validation.
71810
     */
71811
    /**
71812
       * Validator that performs email validation.
71813
       */
71814
    Validators.email = /**
71815
       * Validator that performs email validation.
71816
       */
71817
    function (control) {
71818
        if (isEmptyInputValue(control.value)) {
71819
            return null; // don't validate empty values to allow optional controls
71820
        }
71821
        return EMAIL_REGEXP.test(control.value) ? null : { 'email': true };
71822
    };
71823
    /**
71824
     * Validator that requires controls to have a value of a minimum length.
71825
     */
71826
    /**
71827
       * Validator that requires controls to have a value of a minimum length.
71828
       */
71829
    Validators.minLength = /**
71830
       * Validator that requires controls to have a value of a minimum length.
71831
       */
71832
    function (minLength) {
71833
        return function (control) {
71834
            if (isEmptyInputValue(control.value)) {
71835
                return null; // don't validate empty values to allow optional controls
71836
            }
71837
            var length = control.value ? control.value.length : 0;
71838
            return length < minLength ?
71839
                { 'minlength': { 'requiredLength': minLength, 'actualLength': length } } :
71840
                null;
71841
        };
71842
    };
71843
    /**
71844
     * Validator that requires controls to have a value of a maximum length.
71845
     */
71846
    /**
71847
       * Validator that requires controls to have a value of a maximum length.
71848
       */
71849
    Validators.maxLength = /**
71850
       * Validator that requires controls to have a value of a maximum length.
71851
       */
71852
    function (maxLength) {
71853
        return function (control) {
71854
            var length = control.value ? control.value.length : 0;
71855
            return length > maxLength ?
71856
                { 'maxlength': { 'requiredLength': maxLength, 'actualLength': length } } :
71857
                null;
71858
        };
71859
    };
71860
    /**
71861
     * Validator that requires a control to match a regex to its value.
71862
     */
71863
    /**
71864
       * Validator that requires a control to match a regex to its value.
71865
       */
71866
    Validators.pattern = /**
71867
       * Validator that requires a control to match a regex to its value.
71868
       */
71869
    function (pattern) {
71870
        if (!pattern)
71871
            return Validators.nullValidator;
71872
        var regex;
71873
        var regexStr;
71874
        if (typeof pattern === 'string') {
71875
            regexStr = '';
71876
            if (pattern.charAt(0) !== '^')
71877
                regexStr += '^';
71878
            regexStr += pattern;
71879
            if (pattern.charAt(pattern.length - 1) !== '$')
71880
                regexStr += '$';
71881
            regex = new RegExp(regexStr);
71882
        }
71883
        else {
71884
            regexStr = pattern.toString();
71885
            regex = pattern;
71886
        }
71887
        return function (control) {
71888
            if (isEmptyInputValue(control.value)) {
71889
                return null; // don't validate empty values to allow optional controls
71890
            }
71891
            var value = control.value;
71892
            return regex.test(value) ? null :
71893
                { 'pattern': { 'requiredPattern': regexStr, 'actualValue': value } };
71894
        };
71895
    };
71896
    /**
71897
     * No-op validator.
71898
     */
71899
    /**
71900
       * No-op validator.
71901
       */
71902
    Validators.nullValidator = /**
71903
       * No-op validator.
71904
       */
71905
    function (c) { return null; };
71906
    Validators.compose = function (validators) {
71907
        if (!validators)
71908
            return null;
71909
        var presentValidators = validators.filter(isPresent);
71910
        if (presentValidators.length == 0)
71911
            return null;
71912
        return function (control) {
71913
            return _mergeErrors(_executeValidators(control, presentValidators));
71914
        };
71915
    };
71916
    Validators.composeAsync = function (validators) {
71917
        if (!validators)
71918
            return null;
71919
        var presentValidators = validators.filter(isPresent);
71920
        if (presentValidators.length == 0)
71921
            return null;
71922
        return function (control) {
71923
            var observables = _executeAsyncValidators(control, presentValidators).map(toObservable);
71924
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["forkJoin"])(observables).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(_mergeErrors));
71925
        };
71926
    };
71927
    return Validators;
71928
}());
71929
function isPresent(o) {
71930
    return o != null;
71931
}
71932
function toObservable(r) {
71933
    var obs = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵisPromise"])(r) ? Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(r) : r;
71934
    if (!(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵisObservable"])(obs))) {
71935
        throw new Error("Expected validator to return Promise or Observable.");
71936
    }
71937
    return obs;
71938
}
71939
function _executeValidators(control, validators) {
71940
    return validators.map(function (v) { return v(control); });
71941
}
71942
function _executeAsyncValidators(control, validators) {
71943
    return validators.map(function (v) { return v(control); });
71944
}
71945
function _mergeErrors(arrayOfErrors) {
71946
    var res = arrayOfErrors.reduce(function (res, errors) {
71947
        return errors != null ? Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, (res), errors) : res;
71948
    }, {});
71949
    return Object.keys(res).length === 0 ? null : res;
71950
}
71951
 
71952
/**
71953
 * @license
71954
 * Copyright Google Inc. All Rights Reserved.
71955
 *
71956
 * Use of this source code is governed by an MIT-style license that can be
71957
 * found in the LICENSE file at https://angular.io/license
71958
 */
71959
/**
71960
 * Used to provide a `ControlValueAccessor` for form controls.
71961
 *
71962
 * See `DefaultValueAccessor` for how to implement one.
71963
 *
71964
 */
71965
var NG_VALUE_ACCESSOR = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('NgValueAccessor');
71966
 
71967
/**
71968
 * @license
71969
 * Copyright Google Inc. All Rights Reserved.
71970
 *
71971
 * Use of this source code is governed by an MIT-style license that can be
71972
 * found in the LICENSE file at https://angular.io/license
71973
 */
71974
var CHECKBOX_VALUE_ACCESSOR = {
71975
    provide: NG_VALUE_ACCESSOR,
71976
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(function () { return CheckboxControlValueAccessor; }),
71977
    multi: true,
71978
};
71979
/**
71980
 * The accessor for writing a value and listening to changes on a checkbox input element.
71981
 *
71982
 *  ### Example
71983
 *  ```
71984
 *  <input type="checkbox" name="rememberLogin" ngModel>
71985
 *  ```
71986
 *
71987
 *
71988
 */
71989
var CheckboxControlValueAccessor = /** @class */ (function () {
71990
    function CheckboxControlValueAccessor(_renderer, _elementRef) {
71991
        this._renderer = _renderer;
71992
        this._elementRef = _elementRef;
71993
        this.onChange = function (_) { };
71994
        this.onTouched = function () { };
71995
    }
71996
    CheckboxControlValueAccessor.prototype.writeValue = function (value) {
71997
        this._renderer.setProperty(this._elementRef.nativeElement, 'checked', value);
71998
    };
71999
    CheckboxControlValueAccessor.prototype.registerOnChange = function (fn) { this.onChange = fn; };
72000
    CheckboxControlValueAccessor.prototype.registerOnTouched = function (fn) { this.onTouched = fn; };
72001
    CheckboxControlValueAccessor.prototype.setDisabledState = function (isDisabled) {
72002
        this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);
72003
    };
72004
    CheckboxControlValueAccessor.decorators = [
72005
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
72006
                    selector: 'input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]',
72007
                    host: { '(change)': 'onChange($event.target.checked)', '(blur)': 'onTouched()' },
72008
                    providers: [CHECKBOX_VALUE_ACCESSOR]
72009
                },] }
72010
    ];
72011
    /** @nocollapse */
72012
    CheckboxControlValueAccessor.ctorParameters = function () { return [
72013
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"], },
72014
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
72015
    ]; };
72016
    return CheckboxControlValueAccessor;
72017
}());
72018
 
72019
/**
72020
 * @license
72021
 * Copyright Google Inc. All Rights Reserved.
72022
 *
72023
 * Use of this source code is governed by an MIT-style license that can be
72024
 * found in the LICENSE file at https://angular.io/license
72025
 */
72026
var DEFAULT_VALUE_ACCESSOR = {
72027
    provide: NG_VALUE_ACCESSOR,
72028
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(function () { return DefaultValueAccessor; }),
72029
    multi: true
72030
};
72031
/**
72032
 * We must check whether the agent is Android because composition events
72033
 * behave differently between iOS and Android.
72034
 */
72035
function _isAndroid() {
72036
    var userAgent = Object(_angular_platform_browser__WEBPACK_IMPORTED_MODULE_4__["ɵgetDOM"])() ? Object(_angular_platform_browser__WEBPACK_IMPORTED_MODULE_4__["ɵgetDOM"])().getUserAgent() : '';
72037
    return /android (\d+)/.test(userAgent.toLowerCase());
72038
}
72039
/**
72040
 * Turn this mode on if you want form directives to buffer IME input until compositionend
72041
 * @experimental
72042
 */
72043
var COMPOSITION_BUFFER_MODE = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('CompositionEventMode');
72044
/**
72045
 * The default accessor for writing a value and listening to changes that is used by the
72046
 * `NgModel`, `FormControlDirective`, and `FormControlName` directives.
72047
 *
72048
 *  ### Example
72049
 *  ```
72050
 *  <input type="text" name="searchQuery" ngModel>
72051
 *  ```
72052
 *
72053
 *
72054
 */
72055
var DefaultValueAccessor = /** @class */ (function () {
72056
    function DefaultValueAccessor(_renderer, _elementRef, _compositionMode) {
72057
        this._renderer = _renderer;
72058
        this._elementRef = _elementRef;
72059
        this._compositionMode = _compositionMode;
72060
        this.onChange = function (_) { };
72061
        this.onTouched = function () { };
72062
        /** Whether the user is creating a composition string (IME events). */
72063
        this._composing = false;
72064
        if (this._compositionMode == null) {
72065
            this._compositionMode = !_isAndroid();
72066
        }
72067
    }
72068
    DefaultValueAccessor.prototype.writeValue = function (value) {
72069
        var normalizedValue = value == null ? '' : value;
72070
        this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);
72071
    };
72072
    DefaultValueAccessor.prototype.registerOnChange = function (fn) { this.onChange = fn; };
72073
    DefaultValueAccessor.prototype.registerOnTouched = function (fn) { this.onTouched = fn; };
72074
    DefaultValueAccessor.prototype.setDisabledState = function (isDisabled) {
72075
        this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);
72076
    };
72077
    /** @internal */
72078
    /** @internal */
72079
    DefaultValueAccessor.prototype._handleInput = /** @internal */
72080
    function (value) {
72081
        if (!this._compositionMode || (this._compositionMode && !this._composing)) {
72082
            this.onChange(value);
72083
        }
72084
    };
72085
    /** @internal */
72086
    /** @internal */
72087
    DefaultValueAccessor.prototype._compositionStart = /** @internal */
72088
    function () { this._composing = true; };
72089
    /** @internal */
72090
    /** @internal */
72091
    DefaultValueAccessor.prototype._compositionEnd = /** @internal */
72092
    function (value) {
72093
        this._composing = false;
72094
        this._compositionMode && this.onChange(value);
72095
    };
72096
    DefaultValueAccessor.decorators = [
72097
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
72098
                    selector: 'input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]',
72099
                    // TODO: vsavkin replace the above selector with the one below it once
72100
                    // https://github.com/angular/angular/issues/3011 is implemented
72101
                    // selector: '[ngModel],[formControl],[formControlName]',
72102
                    host: {
72103
                        '(input)': '$any(this)._handleInput($event.target.value)',
72104
                        '(blur)': 'onTouched()',
72105
                        '(compositionstart)': '$any(this)._compositionStart()',
72106
                        '(compositionend)': '$any(this)._compositionEnd($event.target.value)'
72107
                    },
72108
                    providers: [DEFAULT_VALUE_ACCESSOR]
72109
                },] }
72110
    ];
72111
    /** @nocollapse */
72112
    DefaultValueAccessor.ctorParameters = function () { return [
72113
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"], },
72114
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
72115
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [COMPOSITION_BUFFER_MODE,] },] },
72116
    ]; };
72117
    return DefaultValueAccessor;
72118
}());
72119
 
72120
/**
72121
 * @license
72122
 * Copyright Google Inc. All Rights Reserved.
72123
 *
72124
 * Use of this source code is governed by an MIT-style license that can be
72125
 * found in the LICENSE file at https://angular.io/license
72126
 */
72127
function normalizeValidator(validator) {
72128
    if (validator.validate) {
72129
        return function (c) { return validator.validate(c); };
72130
    }
72131
    else {
72132
        return validator;
72133
    }
72134
}
72135
function normalizeAsyncValidator(validator) {
72136
    if (validator.validate) {
72137
        return function (c) { return validator.validate(c); };
72138
    }
72139
    else {
72140
        return validator;
72141
    }
72142
}
72143
 
72144
/**
72145
 * @license
72146
 * Copyright Google Inc. All Rights Reserved.
72147
 *
72148
 * Use of this source code is governed by an MIT-style license that can be
72149
 * found in the LICENSE file at https://angular.io/license
72150
 */
72151
var NUMBER_VALUE_ACCESSOR = {
72152
    provide: NG_VALUE_ACCESSOR,
72153
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(function () { return NumberValueAccessor; }),
72154
    multi: true
72155
};
72156
/**
72157
 * The accessor for writing a number value and listening to changes that is used by the
72158
 * `NgModel`, `FormControlDirective`, and `FormControlName` directives.
72159
 *
72160
 *  ### Example
72161
 *  ```
72162
 *  <input type="number" [(ngModel)]="age">
72163
 *  ```
72164
 */
72165
var NumberValueAccessor = /** @class */ (function () {
72166
    function NumberValueAccessor(_renderer, _elementRef) {
72167
        this._renderer = _renderer;
72168
        this._elementRef = _elementRef;
72169
        this.onChange = function (_) { };
72170
        this.onTouched = function () { };
72171
    }
72172
    NumberValueAccessor.prototype.writeValue = function (value) {
72173
        // The value needs to be normalized for IE9, otherwise it is set to 'null' when null
72174
        var normalizedValue = value == null ? '' : value;
72175
        this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);
72176
    };
72177
    NumberValueAccessor.prototype.registerOnChange = function (fn) {
72178
        this.onChange = function (value) { fn(value == '' ? null : parseFloat(value)); };
72179
    };
72180
    NumberValueAccessor.prototype.registerOnTouched = function (fn) { this.onTouched = fn; };
72181
    NumberValueAccessor.prototype.setDisabledState = function (isDisabled) {
72182
        this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);
72183
    };
72184
    NumberValueAccessor.decorators = [
72185
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
72186
                    selector: 'input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]',
72187
                    host: {
72188
                        '(change)': 'onChange($event.target.value)',
72189
                        '(input)': 'onChange($event.target.value)',
72190
                        '(blur)': 'onTouched()'
72191
                    },
72192
                    providers: [NUMBER_VALUE_ACCESSOR]
72193
                },] }
72194
    ];
72195
    /** @nocollapse */
72196
    NumberValueAccessor.ctorParameters = function () { return [
72197
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"], },
72198
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
72199
    ]; };
72200
    return NumberValueAccessor;
72201
}());
72202
 
72203
/**
72204
 * @license
72205
 * Copyright Google Inc. All Rights Reserved.
72206
 *
72207
 * Use of this source code is governed by an MIT-style license that can be
72208
 * found in the LICENSE file at https://angular.io/license
72209
 */
72210
function unimplemented() {
72211
    throw new Error('unimplemented');
72212
}
72213
/**
72214
 * A base class that all control directive extend.
72215
 * It binds a `FormControl` object to a DOM element.
72216
 *
72217
 * Used internally by Angular forms.
72218
 *
72219
 *
72220
 */
72221
var NgControl = /** @class */ (function (_super) {
72222
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(NgControl, _super);
72223
    function NgControl() {
72224
        var _this = _super !== null && _super.apply(this, arguments) || this;
72225
        /** @internal */
72226
        _this._parent = null;
72227
        _this.name = null;
72228
        _this.valueAccessor = null;
72229
        /** @internal */
72230
        _this._rawValidators = [];
72231
        /** @internal */
72232
        _this._rawAsyncValidators = [];
72233
        return _this;
72234
    }
72235
    Object.defineProperty(NgControl.prototype, "validator", {
72236
        get: function () { return unimplemented(); },
72237
        enumerable: true,
72238
        configurable: true
72239
    });
72240
    Object.defineProperty(NgControl.prototype, "asyncValidator", {
72241
        get: function () { return unimplemented(); },
72242
        enumerable: true,
72243
        configurable: true
72244
    });
72245
    return NgControl;
72246
}(AbstractControlDirective));
72247
 
72248
/**
72249
 * @license
72250
 * Copyright Google Inc. All Rights Reserved.
72251
 *
72252
 * Use of this source code is governed by an MIT-style license that can be
72253
 * found in the LICENSE file at https://angular.io/license
72254
 */
72255
var RADIO_VALUE_ACCESSOR = {
72256
    provide: NG_VALUE_ACCESSOR,
72257
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(function () { return RadioControlValueAccessor; }),
72258
    multi: true
72259
};
72260
/**
72261
 * Internal class used by Angular to uncheck radio buttons with the matching name.
72262
 */
72263
var RadioControlRegistry = /** @class */ (function () {
72264
    function RadioControlRegistry() {
72265
        this._accessors = [];
72266
    }
72267
    RadioControlRegistry.prototype.add = function (control, accessor) {
72268
        this._accessors.push([control, accessor]);
72269
    };
72270
    RadioControlRegistry.prototype.remove = function (accessor) {
72271
        for (var i = this._accessors.length - 1; i >= 0; --i) {
72272
            if (this._accessors[i][1] === accessor) {
72273
                this._accessors.splice(i, 1);
72274
                return;
72275
            }
72276
        }
72277
    };
72278
    RadioControlRegistry.prototype.select = function (accessor) {
72279
        var _this = this;
72280
        this._accessors.forEach(function (c) {
72281
            if (_this._isSameGroup(c, accessor) && c[1] !== accessor) {
72282
                c[1].fireUncheck(accessor.value);
72283
            }
72284
        });
72285
    };
72286
    RadioControlRegistry.prototype._isSameGroup = function (controlPair, accessor) {
72287
        if (!controlPair[0].control)
72288
            return false;
72289
        return controlPair[0]._parent === accessor._control._parent &&
72290
            controlPair[1].name === accessor.name;
72291
    };
72292
    RadioControlRegistry.decorators = [
72293
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }
72294
    ];
72295
    /** @nocollapse */
72296
    RadioControlRegistry.ctorParameters = function () { return []; };
72297
    return RadioControlRegistry;
72298
}());
72299
/**
72300
 * @description
72301
 *
72302
 * Writes radio control values and listens to radio control changes.
72303
 *
72304
 * Used by `NgModel`, `FormControlDirective`, and `FormControlName`
72305
 * to keep the view synced with the `FormControl` model.
72306
 *
72307
 * If you have imported the `FormsModule` or the `ReactiveFormsModule`, this
72308
 * value accessor will be active on any radio control that has a form directive. You do
72309
 * **not** need to add a special selector to activate it.
72310
 *
72311
 * ### How to use radio buttons with form directives
72312
 *
72313
 * To use radio buttons in a template-driven form, you'll want to ensure that radio buttons
72314
 * in the same group have the same `name` attribute.  Radio buttons with different `name`
72315
 * attributes do not affect each other.
72316
 *
72317
 * {@example forms/ts/radioButtons/radio_button_example.ts region='TemplateDriven'}
72318
 *
72319
 * When using radio buttons in a reactive form, radio buttons in the same group should have the
72320
 * same `formControlName`. You can also add a `name` attribute, but it's optional.
72321
 *
72322
 * {@example forms/ts/reactiveRadioButtons/reactive_radio_button_example.ts region='Reactive'}
72323
 *
72324
 *  * **npm package**: `@angular/forms`
72325
 *
72326
 *
72327
 */
72328
var RadioControlValueAccessor = /** @class */ (function () {
72329
    function RadioControlValueAccessor(_renderer, _elementRef, _registry, _injector) {
72330
        this._renderer = _renderer;
72331
        this._elementRef = _elementRef;
72332
        this._registry = _registry;
72333
        this._injector = _injector;
72334
        this.onChange = function () { };
72335
        this.onTouched = function () { };
72336
    }
72337
    RadioControlValueAccessor.prototype.ngOnInit = function () {
72338
        this._control = this._injector.get(NgControl);
72339
        this._checkName();
72340
        this._registry.add(this._control, this);
72341
    };
72342
    RadioControlValueAccessor.prototype.ngOnDestroy = function () { this._registry.remove(this); };
72343
    RadioControlValueAccessor.prototype.writeValue = function (value) {
72344
        this._state = value === this.value;
72345
        this._renderer.setProperty(this._elementRef.nativeElement, 'checked', this._state);
72346
    };
72347
    RadioControlValueAccessor.prototype.registerOnChange = function (fn) {
72348
        var _this = this;
72349
        this._fn = fn;
72350
        this.onChange = function () {
72351
            fn(_this.value);
72352
            _this._registry.select(_this);
72353
        };
72354
    };
72355
    RadioControlValueAccessor.prototype.fireUncheck = function (value) { this.writeValue(value); };
72356
    RadioControlValueAccessor.prototype.registerOnTouched = function (fn) { this.onTouched = fn; };
72357
    RadioControlValueAccessor.prototype.setDisabledState = function (isDisabled) {
72358
        this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);
72359
    };
72360
    RadioControlValueAccessor.prototype._checkName = function () {
72361
        if (this.name && this.formControlName && this.name !== this.formControlName) {
72362
            this._throwNameError();
72363
        }
72364
        if (!this.name && this.formControlName)
72365
            this.name = this.formControlName;
72366
    };
72367
    RadioControlValueAccessor.prototype._throwNameError = function () {
72368
        throw new Error("\n      If you define both a name and a formControlName attribute on your radio button, their values\n      must match. Ex: <input type=\"radio\" formControlName=\"food\" name=\"food\">\n    ");
72369
    };
72370
    RadioControlValueAccessor.decorators = [
72371
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
72372
                    selector: 'input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]',
72373
                    host: { '(change)': 'onChange()', '(blur)': 'onTouched()' },
72374
                    providers: [RADIO_VALUE_ACCESSOR]
72375
                },] }
72376
    ];
72377
    /** @nocollapse */
72378
    RadioControlValueAccessor.ctorParameters = function () { return [
72379
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"], },
72380
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
72381
        { type: RadioControlRegistry, },
72382
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"], },
72383
    ]; };
72384
    RadioControlValueAccessor.propDecorators = {
72385
        "name": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
72386
        "formControlName": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
72387
        "value": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
72388
    };
72389
    return RadioControlValueAccessor;
72390
}());
72391
 
72392
/**
72393
 * @license
72394
 * Copyright Google Inc. All Rights Reserved.
72395
 *
72396
 * Use of this source code is governed by an MIT-style license that can be
72397
 * found in the LICENSE file at https://angular.io/license
72398
 */
72399
var RANGE_VALUE_ACCESSOR = {
72400
    provide: NG_VALUE_ACCESSOR,
72401
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(function () { return RangeValueAccessor; }),
72402
    multi: true
72403
};
72404
/**
72405
 * The accessor for writing a range value and listening to changes that is used by the
72406
 * `NgModel`, `FormControlDirective`, and `FormControlName` directives.
72407
 *
72408
 *  ### Example
72409
 *  ```
72410
 *  <input type="range" [(ngModel)]="age" >
72411
 *  ```
72412
 */
72413
var RangeValueAccessor = /** @class */ (function () {
72414
    function RangeValueAccessor(_renderer, _elementRef) {
72415
        this._renderer = _renderer;
72416
        this._elementRef = _elementRef;
72417
        this.onChange = function (_) { };
72418
        this.onTouched = function () { };
72419
    }
72420
    RangeValueAccessor.prototype.writeValue = function (value) {
72421
        this._renderer.setProperty(this._elementRef.nativeElement, 'value', parseFloat(value));
72422
    };
72423
    RangeValueAccessor.prototype.registerOnChange = function (fn) {
72424
        this.onChange = function (value) { fn(value == '' ? null : parseFloat(value)); };
72425
    };
72426
    RangeValueAccessor.prototype.registerOnTouched = function (fn) { this.onTouched = fn; };
72427
    RangeValueAccessor.prototype.setDisabledState = function (isDisabled) {
72428
        this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);
72429
    };
72430
    RangeValueAccessor.decorators = [
72431
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
72432
                    selector: 'input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]',
72433
                    host: {
72434
                        '(change)': 'onChange($event.target.value)',
72435
                        '(input)': 'onChange($event.target.value)',
72436
                        '(blur)': 'onTouched()'
72437
                    },
72438
                    providers: [RANGE_VALUE_ACCESSOR]
72439
                },] }
72440
    ];
72441
    /** @nocollapse */
72442
    RangeValueAccessor.ctorParameters = function () { return [
72443
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"], },
72444
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
72445
    ]; };
72446
    return RangeValueAccessor;
72447
}());
72448
 
72449
/**
72450
 * @license
72451
 * Copyright Google Inc. All Rights Reserved.
72452
 *
72453
 * Use of this source code is governed by an MIT-style license that can be
72454
 * found in the LICENSE file at https://angular.io/license
72455
 */
72456
var FormErrorExamples = {
72457
    formControlName: "\n    <div [formGroup]=\"myGroup\">\n      <input formControlName=\"firstName\">\n    </div>\n\n    In your class:\n\n    this.myGroup = new FormGroup({\n       firstName: new FormControl()\n    });",
72458
    formGroupName: "\n    <div [formGroup]=\"myGroup\">\n       <div formGroupName=\"person\">\n          <input formControlName=\"firstName\">\n       </div>\n    </div>\n\n    In your class:\n\n    this.myGroup = new FormGroup({\n       person: new FormGroup({ firstName: new FormControl() })\n    });",
72459
    formArrayName: "\n    <div [formGroup]=\"myGroup\">\n      <div formArrayName=\"cities\">\n        <div *ngFor=\"let city of cityArray.controls; index as i\">\n          <input [formControlName]=\"i\">\n        </div>\n      </div>\n    </div>\n\n    In your class:\n\n    this.cityArray = new FormArray([new FormControl('SF')]);\n    this.myGroup = new FormGroup({\n      cities: this.cityArray\n    });",
72460
    ngModelGroup: "\n    <form>\n       <div ngModelGroup=\"person\">\n          <input [(ngModel)]=\"person.name\" name=\"firstName\">\n       </div>\n    </form>",
72461
    ngModelWithFormGroup: "\n    <div [formGroup]=\"myGroup\">\n       <input formControlName=\"firstName\">\n       <input [(ngModel)]=\"showMoreControls\" [ngModelOptions]=\"{standalone: true}\">\n    </div>\n  "
72462
};
72463
 
72464
/**
72465
 * @license
72466
 * Copyright Google Inc. All Rights Reserved.
72467
 *
72468
 * Use of this source code is governed by an MIT-style license that can be
72469
 * found in the LICENSE file at https://angular.io/license
72470
 */
72471
var ReactiveErrors = /** @class */ (function () {
72472
    function ReactiveErrors() {
72473
    }
72474
    ReactiveErrors.controlParentException = function () {
72475
        throw new Error("formControlName must be used with a parent formGroup directive.  You'll want to add a formGroup\n       directive and pass it an existing FormGroup instance (you can create one in your class).\n\n      Example:\n\n      " + FormErrorExamples.formControlName);
72476
    };
72477
    ReactiveErrors.ngModelGroupException = function () {
72478
        throw new Error("formControlName cannot be used with an ngModelGroup parent. It is only compatible with parents\n       that also have a \"form\" prefix: formGroupName, formArrayName, or formGroup.\n\n       Option 1:  Update the parent to be formGroupName (reactive form strategy)\n\n        " + FormErrorExamples.formGroupName + "\n\n        Option 2: Use ngModel instead of formControlName (template-driven strategy)\n\n        " + FormErrorExamples.ngModelGroup);
72479
    };
72480
    ReactiveErrors.missingFormException = function () {
72481
        throw new Error("formGroup expects a FormGroup instance. Please pass one in.\n\n       Example:\n\n       " + FormErrorExamples.formControlName);
72482
    };
72483
    ReactiveErrors.groupParentException = function () {
72484
        throw new Error("formGroupName must be used with a parent formGroup directive.  You'll want to add a formGroup\n      directive and pass it an existing FormGroup instance (you can create one in your class).\n\n      Example:\n\n      " + FormErrorExamples.formGroupName);
72485
    };
72486
    ReactiveErrors.arrayParentException = function () {
72487
        throw new Error("formArrayName must be used with a parent formGroup directive.  You'll want to add a formGroup\n       directive and pass it an existing FormGroup instance (you can create one in your class).\n\n        Example:\n\n        " + FormErrorExamples.formArrayName);
72488
    };
72489
    ReactiveErrors.disabledAttrWarning = function () {
72490
        console.warn("\n      It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\n      when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\n      you. We recommend using this approach to avoid 'changed after checked' errors.\n       \n      Example: \n      form = new FormGroup({\n        first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\n        last: new FormControl('Drew', Validators.required)\n      });\n    ");
72491
    };
72492
    ReactiveErrors.ngModelWarning = function (directiveName) {
72493
        console.warn("\n    It looks like you're using ngModel on the same form field as " + directiveName + ". \n    Support for using the ngModel input property and ngModelChange event with \n    reactive form directives has been deprecated in Angular v6 and will be removed \n    in Angular v7.\n    \n    For more information on this, see our API docs here:\n    https://angular.io/api/forms/" + (directiveName === 'formControl' ? 'FormControlDirective'
72494
            : 'FormControlName') + "#use-with-ngmodel\n    ");
72495
    };
72496
    return ReactiveErrors;
72497
}());
72498
 
72499
/**
72500
 * @license
72501
 * Copyright Google Inc. All Rights Reserved.
72502
 *
72503
 * Use of this source code is governed by an MIT-style license that can be
72504
 * found in the LICENSE file at https://angular.io/license
72505
 */
72506
var SELECT_VALUE_ACCESSOR = {
72507
    provide: NG_VALUE_ACCESSOR,
72508
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(function () { return SelectControlValueAccessor; }),
72509
    multi: true
72510
};
72511
function _buildValueString(id, value) {
72512
    if (id == null)
72513
        return "" + value;
72514
    if (value && typeof value === 'object')
72515
        value = 'Object';
72516
    return (id + ": " + value).slice(0, 50);
72517
}
72518
function _extractId(valueString) {
72519
    return valueString.split(':')[0];
72520
}
72521
/**
72522
 * @description
72523
 *
72524
 * Writes values and listens to changes on a select element.
72525
 *
72526
 * Used by `NgModel`, `FormControlDirective`, and `FormControlName`
72527
 * to keep the view synced with the `FormControl` model.
72528
 *
72529
 * If you have imported the `FormsModule` or the `ReactiveFormsModule`, this
72530
 * value accessor will be active on any select control that has a form directive. You do
72531
 * **not** need to add a special selector to activate it.
72532
 *
72533
 * ### How to use select controls with form directives
72534
 *
72535
 * To use a select in a template-driven form, simply add an `ngModel` and a `name`
72536
 * attribute to the main `<select>` tag.
72537
 *
72538
 * If your option values are simple strings, you can bind to the normal `value` property
72539
 * on the option.  If your option values happen to be objects (and you'd like to save the
72540
 * selection in your form as an object), use `ngValue` instead:
72541
 *
72542
 * {@example forms/ts/selectControl/select_control_example.ts region='Component'}
72543
 *
72544
 * In reactive forms, you'll also want to add your form directive (`formControlName` or
72545
 * `formControl`) on the main `<select>` tag. Like in the former example, you have the
72546
 * choice of binding to the  `value` or `ngValue` property on the select's options.
72547
 *
72548
 * {@example forms/ts/reactiveSelectControl/reactive_select_control_example.ts region='Component'}
72549
 *
72550
 * ### Caveat: Option selection
72551
 *
72552
 * Angular uses object identity to select option. It's possible for the identities of items
72553
 * to change while the data does not. This can happen, for example, if the items are produced
72554
 * from an RPC to the server, and that RPC is re-run. Even if the data hasn't changed, the
72555
 * second response will produce objects with different identities.
72556
 *
72557
 * To customize the default option comparison algorithm, `<select>` supports `compareWith` input.
72558
 * `compareWith` takes a **function** which has two arguments: `option1` and `option2`.
72559
 * If `compareWith` is given, Angular selects option by the return value of the function.
72560
 *
72561
 * #### Syntax
72562
 *
72563
 * ```
72564
 * <select [compareWith]="compareFn"  [(ngModel)]="selectedCountries">
72565
 *     <option *ngFor="let country of countries" [ngValue]="country">
72566
 *         {{country.name}}
72567
 *     </option>
72568
 * </select>
72569
 *
72570
 * compareFn(c1: Country, c2: Country): boolean {
72571
 *     return c1 && c2 ? c1.id === c2.id : c1 === c2;
72572
 * }
72573
 * ```
72574
 *
72575
 * Note: We listen to the 'change' event because 'input' events aren't fired
72576
 * for selects in Firefox and IE:
72577
 * https://bugzilla.mozilla.org/show_bug.cgi?id=1024350
72578
 * https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/4660045/
72579
 *
72580
 * * **npm package**: `@angular/forms`
72581
 *
72582
 *
72583
 */
72584
var SelectControlValueAccessor = /** @class */ (function () {
72585
    function SelectControlValueAccessor(_renderer, _elementRef) {
72586
        this._renderer = _renderer;
72587
        this._elementRef = _elementRef;
72588
        /** @internal */
72589
        this._optionMap = new Map();
72590
        /** @internal */
72591
        this._idCounter = 0;
72592
        this.onChange = function (_) { };
72593
        this.onTouched = function () { };
72594
        this._compareWith = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵlooseIdentical"];
72595
    }
72596
    Object.defineProperty(SelectControlValueAccessor.prototype, "compareWith", {
72597
        set: function (fn) {
72598
            if (typeof fn !== 'function') {
72599
                throw new Error("compareWith must be a function, but received " + JSON.stringify(fn));
72600
            }
72601
            this._compareWith = fn;
72602
        },
72603
        enumerable: true,
72604
        configurable: true
72605
    });
72606
    SelectControlValueAccessor.prototype.writeValue = function (value) {
72607
        this.value = value;
72608
        var id = this._getOptionId(value);
72609
        if (id == null) {
72610
            this._renderer.setProperty(this._elementRef.nativeElement, 'selectedIndex', -1);
72611
        }
72612
        var valueString = _buildValueString(id, value);
72613
        this._renderer.setProperty(this._elementRef.nativeElement, 'value', valueString);
72614
    };
72615
    SelectControlValueAccessor.prototype.registerOnChange = function (fn) {
72616
        var _this = this;
72617
        this.onChange = function (valueString) {
72618
            _this.value = _this._getOptionValue(valueString);
72619
            fn(_this.value);
72620
        };
72621
    };
72622
    SelectControlValueAccessor.prototype.registerOnTouched = function (fn) { this.onTouched = fn; };
72623
    SelectControlValueAccessor.prototype.setDisabledState = function (isDisabled) {
72624
        this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);
72625
    };
72626
    /** @internal */
72627
    /** @internal */
72628
    SelectControlValueAccessor.prototype._registerOption = /** @internal */
72629
    function () { return (this._idCounter++).toString(); };
72630
    /** @internal */
72631
    /** @internal */
72632
    SelectControlValueAccessor.prototype._getOptionId = /** @internal */
72633
    function (value) {
72634
        try {
72635
            for (var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(Array.from(this._optionMap.keys())), _b = _a.next(); !_b.done; _b = _a.next()) {
72636
                var id = _b.value;
72637
                if (this._compareWith(this._optionMap.get(id), value))
72638
                    return id;
72639
            }
72640
        }
72641
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
72642
        finally {
72643
            try {
72644
                if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
72645
            }
72646
            finally { if (e_1) throw e_1.error; }
72647
        }
72648
        return null;
72649
        var e_1, _c;
72650
    };
72651
    /** @internal */
72652
    /** @internal */
72653
    SelectControlValueAccessor.prototype._getOptionValue = /** @internal */
72654
    function (valueString) {
72655
        var id = _extractId(valueString);
72656
        return this._optionMap.has(id) ? this._optionMap.get(id) : valueString;
72657
    };
72658
    SelectControlValueAccessor.decorators = [
72659
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
72660
                    selector: 'select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]',
72661
                    host: { '(change)': 'onChange($event.target.value)', '(blur)': 'onTouched()' },
72662
                    providers: [SELECT_VALUE_ACCESSOR]
72663
                },] }
72664
    ];
72665
    /** @nocollapse */
72666
    SelectControlValueAccessor.ctorParameters = function () { return [
72667
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"], },
72668
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
72669
    ]; };
72670
    SelectControlValueAccessor.propDecorators = {
72671
        "compareWith": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
72672
    };
72673
    return SelectControlValueAccessor;
72674
}());
72675
/**
72676
 * @description
72677
 *
72678
 * Marks `<option>` as dynamic, so Angular can be notified when options change.
72679
 *
72680
 * See docs for `SelectControlValueAccessor` for usage examples.
72681
 *
72682
 *
72683
 */
72684
var NgSelectOption = /** @class */ (function () {
72685
    function NgSelectOption(_element, _renderer, _select) {
72686
        this._element = _element;
72687
        this._renderer = _renderer;
72688
        this._select = _select;
72689
        if (this._select)
72690
            this.id = this._select._registerOption();
72691
    }
72692
    Object.defineProperty(NgSelectOption.prototype, "ngValue", {
72693
        set: function (value) {
72694
            if (this._select == null)
72695
                return;
72696
            this._select._optionMap.set(this.id, value);
72697
            this._setElementValue(_buildValueString(this.id, value));
72698
            this._select.writeValue(this._select.value);
72699
        },
72700
        enumerable: true,
72701
        configurable: true
72702
    });
72703
    Object.defineProperty(NgSelectOption.prototype, "value", {
72704
        set: function (value) {
72705
            this._setElementValue(value);
72706
            if (this._select)
72707
                this._select.writeValue(this._select.value);
72708
        },
72709
        enumerable: true,
72710
        configurable: true
72711
    });
72712
    /** @internal */
72713
    /** @internal */
72714
    NgSelectOption.prototype._setElementValue = /** @internal */
72715
    function (value) {
72716
        this._renderer.setProperty(this._element.nativeElement, 'value', value);
72717
    };
72718
    NgSelectOption.prototype.ngOnDestroy = function () {
72719
        if (this._select) {
72720
            this._select._optionMap.delete(this.id);
72721
            this._select.writeValue(this._select.value);
72722
        }
72723
    };
72724
    NgSelectOption.decorators = [
72725
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{ selector: 'option' },] }
72726
    ];
72727
    /** @nocollapse */
72728
    NgSelectOption.ctorParameters = function () { return [
72729
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
72730
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"], },
72731
        { type: SelectControlValueAccessor, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Host"] },] },
72732
    ]; };
72733
    NgSelectOption.propDecorators = {
72734
        "ngValue": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['ngValue',] },],
72735
        "value": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['value',] },],
72736
    };
72737
    return NgSelectOption;
72738
}());
72739
 
72740
/**
72741
 * @license
72742
 * Copyright Google Inc. All Rights Reserved.
72743
 *
72744
 * Use of this source code is governed by an MIT-style license that can be
72745
 * found in the LICENSE file at https://angular.io/license
72746
 */
72747
var SELECT_MULTIPLE_VALUE_ACCESSOR = {
72748
    provide: NG_VALUE_ACCESSOR,
72749
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(function () { return SelectMultipleControlValueAccessor; }),
72750
    multi: true
72751
};
72752
function _buildValueString$1(id, value) {
72753
    if (id == null)
72754
        return "" + value;
72755
    if (typeof value === 'string')
72756
        value = "'" + value + "'";
72757
    if (value && typeof value === 'object')
72758
        value = 'Object';
72759
    return (id + ": " + value).slice(0, 50);
72760
}
72761
function _extractId$1(valueString) {
72762
    return valueString.split(':')[0];
72763
}
72764
/**
72765
 * The accessor for writing a value and listening to changes on a select element.
72766
 *
72767
 *  ### Caveat: Options selection
72768
 *
72769
 * Angular uses object identity to select options. It's possible for the identities of items
72770
 * to change while the data does not. This can happen, for example, if the items are produced
72771
 * from an RPC to the server, and that RPC is re-run. Even if the data hasn't changed, the
72772
 * second response will produce objects with different identities.
72773
 *
72774
 * To customize the default option comparison algorithm, `<select multiple>` supports `compareWith`
72775
 * input. `compareWith` takes a **function** which has two arguments: `option1` and `option2`.
72776
 * If `compareWith` is given, Angular selects options by the return value of the function.
72777
 *
72778
 * #### Syntax
72779
 *
72780
 * ```
72781
 * <select multiple [compareWith]="compareFn"  [(ngModel)]="selectedCountries">
72782
 *     <option *ngFor="let country of countries" [ngValue]="country">
72783
 *         {{country.name}}
72784
 *     </option>
72785
 * </select>
72786
 *
72787
 * compareFn(c1: Country, c2: Country): boolean {
72788
 *     return c1 && c2 ? c1.id === c2.id : c1 === c2;
72789
 * }
72790
 * ```
72791
 *
72792
 *
72793
 */
72794
var SelectMultipleControlValueAccessor = /** @class */ (function () {
72795
    function SelectMultipleControlValueAccessor(_renderer, _elementRef) {
72796
        this._renderer = _renderer;
72797
        this._elementRef = _elementRef;
72798
        /** @internal */
72799
        this._optionMap = new Map();
72800
        /** @internal */
72801
        this._idCounter = 0;
72802
        this.onChange = function (_) { };
72803
        this.onTouched = function () { };
72804
        this._compareWith = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵlooseIdentical"];
72805
    }
72806
    Object.defineProperty(SelectMultipleControlValueAccessor.prototype, "compareWith", {
72807
        set: function (fn) {
72808
            if (typeof fn !== 'function') {
72809
                throw new Error("compareWith must be a function, but received " + JSON.stringify(fn));
72810
            }
72811
            this._compareWith = fn;
72812
        },
72813
        enumerable: true,
72814
        configurable: true
72815
    });
72816
    SelectMultipleControlValueAccessor.prototype.writeValue = function (value) {
72817
        var _this = this;
72818
        this.value = value;
72819
        var optionSelectedStateSetter;
72820
        if (Array.isArray(value)) {
72821
            // convert values to ids
72822
            var ids_1 = value.map(function (v) { return _this._getOptionId(v); });
72823
            optionSelectedStateSetter = function (opt, o) { opt._setSelected(ids_1.indexOf(o.toString()) > -1); };
72824
        }
72825
        else {
72826
            optionSelectedStateSetter = function (opt, o) { opt._setSelected(false); };
72827
        }
72828
        this._optionMap.forEach(optionSelectedStateSetter);
72829
    };
72830
    SelectMultipleControlValueAccessor.prototype.registerOnChange = function (fn) {
72831
        var _this = this;
72832
        this.onChange = function (_) {
72833
            var selected = [];
72834
            if (_.hasOwnProperty('selectedOptions')) {
72835
                var options = _.selectedOptions;
72836
                for (var i = 0; i < options.length; i++) {
72837
                    var opt = options.item(i);
72838
                    var val = _this._getOptionValue(opt.value);
72839
                    selected.push(val);
72840
                }
72841
            }
72842
            else {
72843
                var options = _.options;
72844
                for (var i = 0; i < options.length; i++) {
72845
                    var opt = options.item(i);
72846
                    if (opt.selected) {
72847
                        var val = _this._getOptionValue(opt.value);
72848
                        selected.push(val);
72849
                    }
72850
                }
72851
            }
72852
            _this.value = selected;
72853
            fn(selected);
72854
        };
72855
    };
72856
    SelectMultipleControlValueAccessor.prototype.registerOnTouched = function (fn) { this.onTouched = fn; };
72857
    SelectMultipleControlValueAccessor.prototype.setDisabledState = function (isDisabled) {
72858
        this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);
72859
    };
72860
    /** @internal */
72861
    /** @internal */
72862
    SelectMultipleControlValueAccessor.prototype._registerOption = /** @internal */
72863
    function (value) {
72864
        var id = (this._idCounter++).toString();
72865
        this._optionMap.set(id, value);
72866
        return id;
72867
    };
72868
    /** @internal */
72869
    /** @internal */
72870
    SelectMultipleControlValueAccessor.prototype._getOptionId = /** @internal */
72871
    function (value) {
72872
        try {
72873
            for (var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(Array.from(this._optionMap.keys())), _b = _a.next(); !_b.done; _b = _a.next()) {
72874
                var id = _b.value;
72875
                if (this._compareWith(this._optionMap.get(id)._value, value))
72876
                    return id;
72877
            }
72878
        }
72879
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
72880
        finally {
72881
            try {
72882
                if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
72883
            }
72884
            finally { if (e_1) throw e_1.error; }
72885
        }
72886
        return null;
72887
        var e_1, _c;
72888
    };
72889
    /** @internal */
72890
    /** @internal */
72891
    SelectMultipleControlValueAccessor.prototype._getOptionValue = /** @internal */
72892
    function (valueString) {
72893
        var id = _extractId$1(valueString);
72894
        return this._optionMap.has(id) ? this._optionMap.get(id)._value : valueString;
72895
    };
72896
    SelectMultipleControlValueAccessor.decorators = [
72897
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
72898
                    selector: 'select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]',
72899
                    host: { '(change)': 'onChange($event.target)', '(blur)': 'onTouched()' },
72900
                    providers: [SELECT_MULTIPLE_VALUE_ACCESSOR]
72901
                },] }
72902
    ];
72903
    /** @nocollapse */
72904
    SelectMultipleControlValueAccessor.ctorParameters = function () { return [
72905
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"], },
72906
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
72907
    ]; };
72908
    SelectMultipleControlValueAccessor.propDecorators = {
72909
        "compareWith": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
72910
    };
72911
    return SelectMultipleControlValueAccessor;
72912
}());
72913
/**
72914
 * Marks `<option>` as dynamic, so Angular can be notified when options change.
72915
 *
72916
 * ### Example
72917
 *
72918
 * ```
72919
 * <select multiple name="city" ngModel>
72920
 *   <option *ngFor="let c of cities" [value]="c"></option>
72921
 * </select>
72922
 * ```
72923
 */
72924
var NgSelectMultipleOption = /** @class */ (function () {
72925
    function NgSelectMultipleOption(_element, _renderer, _select) {
72926
        this._element = _element;
72927
        this._renderer = _renderer;
72928
        this._select = _select;
72929
        if (this._select) {
72930
            this.id = this._select._registerOption(this);
72931
        }
72932
    }
72933
    Object.defineProperty(NgSelectMultipleOption.prototype, "ngValue", {
72934
        set: function (value) {
72935
            if (this._select == null)
72936
                return;
72937
            this._value = value;
72938
            this._setElementValue(_buildValueString$1(this.id, value));
72939
            this._select.writeValue(this._select.value);
72940
        },
72941
        enumerable: true,
72942
        configurable: true
72943
    });
72944
    Object.defineProperty(NgSelectMultipleOption.prototype, "value", {
72945
        set: function (value) {
72946
            if (this._select) {
72947
                this._value = value;
72948
                this._setElementValue(_buildValueString$1(this.id, value));
72949
                this._select.writeValue(this._select.value);
72950
            }
72951
            else {
72952
                this._setElementValue(value);
72953
            }
72954
        },
72955
        enumerable: true,
72956
        configurable: true
72957
    });
72958
    /** @internal */
72959
    /** @internal */
72960
    NgSelectMultipleOption.prototype._setElementValue = /** @internal */
72961
    function (value) {
72962
        this._renderer.setProperty(this._element.nativeElement, 'value', value);
72963
    };
72964
    /** @internal */
72965
    /** @internal */
72966
    NgSelectMultipleOption.prototype._setSelected = /** @internal */
72967
    function (selected) {
72968
        this._renderer.setProperty(this._element.nativeElement, 'selected', selected);
72969
    };
72970
    NgSelectMultipleOption.prototype.ngOnDestroy = function () {
72971
        if (this._select) {
72972
            this._select._optionMap.delete(this.id);
72973
            this._select.writeValue(this._select.value);
72974
        }
72975
    };
72976
    NgSelectMultipleOption.decorators = [
72977
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{ selector: 'option' },] }
72978
    ];
72979
    /** @nocollapse */
72980
    NgSelectMultipleOption.ctorParameters = function () { return [
72981
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
72982
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"], },
72983
        { type: SelectMultipleControlValueAccessor, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Host"] },] },
72984
    ]; };
72985
    NgSelectMultipleOption.propDecorators = {
72986
        "ngValue": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['ngValue',] },],
72987
        "value": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['value',] },],
72988
    };
72989
    return NgSelectMultipleOption;
72990
}());
72991
 
72992
/**
72993
 * @license
72994
 * Copyright Google Inc. All Rights Reserved.
72995
 *
72996
 * Use of this source code is governed by an MIT-style license that can be
72997
 * found in the LICENSE file at https://angular.io/license
72998
 */
72999
function controlPath(name, parent) {
73000
    return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])((parent.path), [name]);
73001
}
73002
function setUpControl(control, dir) {
73003
    if (!control)
73004
        _throwError(dir, 'Cannot find control with');
73005
    if (!dir.valueAccessor)
73006
        _throwError(dir, 'No value accessor for form control with');
73007
    control.validator = Validators.compose([(control.validator), dir.validator]);
73008
    control.asyncValidator = Validators.composeAsync([(control.asyncValidator), dir.asyncValidator]);
73009
    dir.valueAccessor.writeValue(control.value);
73010
    setUpViewChangePipeline(control, dir);
73011
    setUpModelChangePipeline(control, dir);
73012
    setUpBlurPipeline(control, dir);
73013
    if (dir.valueAccessor.setDisabledState) {
73014
        control.registerOnDisabledChange(function (isDisabled) { dir.valueAccessor.setDisabledState(isDisabled); });
73015
    }
73016
    // re-run validation when validator binding changes, e.g. minlength=3 -> minlength=4
73017
    dir._rawValidators.forEach(function (validator) {
73018
        if (validator.registerOnValidatorChange)
73019
            validator.registerOnValidatorChange(function () { return control.updateValueAndValidity(); });
73020
    });
73021
    dir._rawAsyncValidators.forEach(function (validator) {
73022
        if (validator.registerOnValidatorChange)
73023
            validator.registerOnValidatorChange(function () { return control.updateValueAndValidity(); });
73024
    });
73025
}
73026
function cleanUpControl(control, dir) {
73027
    dir.valueAccessor.registerOnChange(function () { return _noControlError(dir); });
73028
    dir.valueAccessor.registerOnTouched(function () { return _noControlError(dir); });
73029
    dir._rawValidators.forEach(function (validator) {
73030
        if (validator.registerOnValidatorChange) {
73031
            validator.registerOnValidatorChange(null);
73032
        }
73033
    });
73034
    dir._rawAsyncValidators.forEach(function (validator) {
73035
        if (validator.registerOnValidatorChange) {
73036
            validator.registerOnValidatorChange(null);
73037
        }
73038
    });
73039
    if (control)
73040
        control._clearChangeFns();
73041
}
73042
function setUpViewChangePipeline(control, dir) {
73043
    dir.valueAccessor.registerOnChange(function (newValue) {
73044
        control._pendingValue = newValue;
73045
        control._pendingChange = true;
73046
        control._pendingDirty = true;
73047
        if (control.updateOn === 'change')
73048
            updateControl(control, dir);
73049
    });
73050
}
73051
function setUpBlurPipeline(control, dir) {
73052
    dir.valueAccessor.registerOnTouched(function () {
73053
        control._pendingTouched = true;
73054
        if (control.updateOn === 'blur' && control._pendingChange)
73055
            updateControl(control, dir);
73056
        if (control.updateOn !== 'submit')
73057
            control.markAsTouched();
73058
    });
73059
}
73060
function updateControl(control, dir) {
73061
    if (control._pendingDirty)
73062
        control.markAsDirty();
73063
    control.setValue(control._pendingValue, { emitModelToViewChange: false });
73064
    dir.viewToModelUpdate(control._pendingValue);
73065
    control._pendingChange = false;
73066
}
73067
function setUpModelChangePipeline(control, dir) {
73068
    control.registerOnChange(function (newValue, emitModelEvent) {
73069
        // control -> view
73070
        // control -> view
73071
        dir.valueAccessor.writeValue(newValue);
73072
        // control -> ngModel
73073
        if (emitModelEvent)
73074
            dir.viewToModelUpdate(newValue);
73075
    });
73076
}
73077
function setUpFormContainer(control, dir) {
73078
    if (control == null)
73079
        _throwError(dir, 'Cannot find control with');
73080
    control.validator = Validators.compose([control.validator, dir.validator]);
73081
    control.asyncValidator = Validators.composeAsync([control.asyncValidator, dir.asyncValidator]);
73082
}
73083
function _noControlError(dir) {
73084
    return _throwError(dir, 'There is no FormControl instance attached to form control element with');
73085
}
73086
function _throwError(dir, message) {
73087
    var messageEnd;
73088
    if (dir.path.length > 1) {
73089
        messageEnd = "path: '" + dir.path.join(' -> ') + "'";
73090
    }
73091
    else if (dir.path[0]) {
73092
        messageEnd = "name: '" + dir.path + "'";
73093
    }
73094
    else {
73095
        messageEnd = 'unspecified name attribute';
73096
    }
73097
    throw new Error(message + " " + messageEnd);
73098
}
73099
function composeValidators(validators) {
73100
    return validators != null ? Validators.compose(validators.map(normalizeValidator)) : null;
73101
}
73102
function composeAsyncValidators(validators) {
73103
    return validators != null ? Validators.composeAsync(validators.map(normalizeAsyncValidator)) :
73104
        null;
73105
}
73106
function isPropertyUpdated(changes, viewModel) {
73107
    if (!changes.hasOwnProperty('model'))
73108
        return false;
73109
    var change = changes['model'];
73110
    if (change.isFirstChange())
73111
        return true;
73112
    return !Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵlooseIdentical"])(viewModel, change.currentValue);
73113
}
73114
var BUILTIN_ACCESSORS = [
73115
    CheckboxControlValueAccessor,
73116
    RangeValueAccessor,
73117
    NumberValueAccessor,
73118
    SelectControlValueAccessor,
73119
    SelectMultipleControlValueAccessor,
73120
    RadioControlValueAccessor,
73121
];
73122
function isBuiltInAccessor(valueAccessor) {
73123
    return BUILTIN_ACCESSORS.some(function (a) { return valueAccessor.constructor === a; });
73124
}
73125
function syncPendingControls(form, directives) {
73126
    form._syncPendingControls();
73127
    directives.forEach(function (dir) {
73128
        var control = dir.control;
73129
        if (control.updateOn === 'submit' && control._pendingChange) {
73130
            dir.viewToModelUpdate(control._pendingValue);
73131
            control._pendingChange = false;
73132
        }
73133
    });
73134
}
73135
// TODO: vsavkin remove it once https://github.com/angular/angular/issues/3011 is implemented
73136
function selectValueAccessor(dir, valueAccessors) {
73137
    if (!valueAccessors)
73138
        return null;
73139
    if (!Array.isArray(valueAccessors))
73140
        _throwError(dir, 'Value accessor was not provided as an array for form control with');
73141
    var defaultAccessor = undefined;
73142
    var builtinAccessor = undefined;
73143
    var customAccessor = undefined;
73144
    valueAccessors.forEach(function (v) {
73145
        if (v.constructor === DefaultValueAccessor) {
73146
            defaultAccessor = v;
73147
        }
73148
        else if (isBuiltInAccessor(v)) {
73149
            if (builtinAccessor)
73150
                _throwError(dir, 'More than one built-in value accessor matches form control with');
73151
            builtinAccessor = v;
73152
        }
73153
        else {
73154
            if (customAccessor)
73155
                _throwError(dir, 'More than one custom value accessor matches form control with');
73156
            customAccessor = v;
73157
        }
73158
    });
73159
    if (customAccessor)
73160
        return customAccessor;
73161
    if (builtinAccessor)
73162
        return builtinAccessor;
73163
    if (defaultAccessor)
73164
        return defaultAccessor;
73165
    _throwError(dir, 'No valid value accessor for form control with');
73166
    return null;
73167
}
73168
function removeDir(list, el) {
73169
    var index = list.indexOf(el);
73170
    if (index > -1)
73171
        list.splice(index, 1);
73172
}
73173
// TODO(kara): remove after deprecation period
73174
function _ngModelWarning(name, type, instance, warningConfig) {
73175
    if (!Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["isDevMode"])() || warningConfig === 'never')
73176
        return;
73177
    if (((warningConfig === null || warningConfig === 'once') && !type._ngModelWarningSentOnce) ||
73178
        (warningConfig === 'always' && !instance._ngModelWarningSent)) {
73179
        ReactiveErrors.ngModelWarning(name);
73180
        type._ngModelWarningSentOnce = true;
73181
        instance._ngModelWarningSent = true;
73182
    }
73183
}
73184
 
73185
/**
73186
 * @license
73187
 * Copyright Google Inc. All Rights Reserved.
73188
 *
73189
 * Use of this source code is governed by an MIT-style license that can be
73190
 * found in the LICENSE file at https://angular.io/license
73191
 */
73192
/**
73193
 * This is a base class for code shared between `NgModelGroup` and `FormGroupName`.
73194
 *
73195
 *
73196
 */
73197
var AbstractFormGroupDirective = /** @class */ (function (_super) {
73198
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(AbstractFormGroupDirective, _super);
73199
    function AbstractFormGroupDirective() {
73200
        return _super !== null && _super.apply(this, arguments) || this;
73201
    }
73202
    AbstractFormGroupDirective.prototype.ngOnInit = function () {
73203
        this._checkParentType();
73204
        this.formDirective.addFormGroup(this);
73205
    };
73206
    AbstractFormGroupDirective.prototype.ngOnDestroy = function () {
73207
        if (this.formDirective) {
73208
            this.formDirective.removeFormGroup(this);
73209
        }
73210
    };
73211
    Object.defineProperty(AbstractFormGroupDirective.prototype, "control", {
73212
        /**
73213
         * Get the `FormGroup` backing this binding.
73214
         */
73215
        get: /**
73216
           * Get the `FormGroup` backing this binding.
73217
           */
73218
        function () { return this.formDirective.getFormGroup(this); },
73219
        enumerable: true,
73220
        configurable: true
73221
    });
73222
    Object.defineProperty(AbstractFormGroupDirective.prototype, "path", {
73223
        /**
73224
         * Get the path to this control group.
73225
         */
73226
        get: /**
73227
           * Get the path to this control group.
73228
           */
73229
        function () { return controlPath(this.name, this._parent); },
73230
        enumerable: true,
73231
        configurable: true
73232
    });
73233
    Object.defineProperty(AbstractFormGroupDirective.prototype, "formDirective", {
73234
        /**
73235
         * Get the `Form` to which this group belongs.
73236
         */
73237
        get: /**
73238
           * Get the `Form` to which this group belongs.
73239
           */
73240
        function () { return this._parent ? this._parent.formDirective : null; },
73241
        enumerable: true,
73242
        configurable: true
73243
    });
73244
    Object.defineProperty(AbstractFormGroupDirective.prototype, "validator", {
73245
        get: function () { return composeValidators(this._validators); },
73246
        enumerable: true,
73247
        configurable: true
73248
    });
73249
    Object.defineProperty(AbstractFormGroupDirective.prototype, "asyncValidator", {
73250
        get: function () {
73251
            return composeAsyncValidators(this._asyncValidators);
73252
        },
73253
        enumerable: true,
73254
        configurable: true
73255
    });
73256
    /** @internal */
73257
    /** @internal */
73258
    AbstractFormGroupDirective.prototype._checkParentType = /** @internal */
73259
    function () { };
73260
    return AbstractFormGroupDirective;
73261
}(ControlContainer));
73262
 
73263
/**
73264
 * @license
73265
 * Copyright Google Inc. All Rights Reserved.
73266
 *
73267
 * Use of this source code is governed by an MIT-style license that can be
73268
 * found in the LICENSE file at https://angular.io/license
73269
 */
73270
var AbstractControlStatus = /** @class */ (function () {
73271
    function AbstractControlStatus(cd) {
73272
        this._cd = cd;
73273
    }
73274
    Object.defineProperty(AbstractControlStatus.prototype, "ngClassUntouched", {
73275
        get: function () { return this._cd.control ? this._cd.control.untouched : false; },
73276
        enumerable: true,
73277
        configurable: true
73278
    });
73279
    Object.defineProperty(AbstractControlStatus.prototype, "ngClassTouched", {
73280
        get: function () { return this._cd.control ? this._cd.control.touched : false; },
73281
        enumerable: true,
73282
        configurable: true
73283
    });
73284
    Object.defineProperty(AbstractControlStatus.prototype, "ngClassPristine", {
73285
        get: function () { return this._cd.control ? this._cd.control.pristine : false; },
73286
        enumerable: true,
73287
        configurable: true
73288
    });
73289
    Object.defineProperty(AbstractControlStatus.prototype, "ngClassDirty", {
73290
        get: function () { return this._cd.control ? this._cd.control.dirty : false; },
73291
        enumerable: true,
73292
        configurable: true
73293
    });
73294
    Object.defineProperty(AbstractControlStatus.prototype, "ngClassValid", {
73295
        get: function () { return this._cd.control ? this._cd.control.valid : false; },
73296
        enumerable: true,
73297
        configurable: true
73298
    });
73299
    Object.defineProperty(AbstractControlStatus.prototype, "ngClassInvalid", {
73300
        get: function () { return this._cd.control ? this._cd.control.invalid : false; },
73301
        enumerable: true,
73302
        configurable: true
73303
    });
73304
    Object.defineProperty(AbstractControlStatus.prototype, "ngClassPending", {
73305
        get: function () { return this._cd.control ? this._cd.control.pending : false; },
73306
        enumerable: true,
73307
        configurable: true
73308
    });
73309
    return AbstractControlStatus;
73310
}());
73311
var ngControlStatusHost = {
73312
    '[class.ng-untouched]': 'ngClassUntouched',
73313
    '[class.ng-touched]': 'ngClassTouched',
73314
    '[class.ng-pristine]': 'ngClassPristine',
73315
    '[class.ng-dirty]': 'ngClassDirty',
73316
    '[class.ng-valid]': 'ngClassValid',
73317
    '[class.ng-invalid]': 'ngClassInvalid',
73318
    '[class.ng-pending]': 'ngClassPending',
73319
};
73320
/**
73321
 * Directive automatically applied to Angular form controls that sets CSS classes
73322
 * based on control status. The following classes are applied as the properties
73323
 * become true:
73324
 *
73325
 * * ng-valid
73326
 * * ng-invalid
73327
 * * ng-pending
73328
 * * ng-pristine
73329
 * * ng-dirty
73330
 * * ng-untouched
73331
 * * ng-touched
73332
 *
73333
 *
73334
 */
73335
var NgControlStatus = /** @class */ (function (_super) {
73336
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(NgControlStatus, _super);
73337
    function NgControlStatus(cd) {
73338
        return _super.call(this, cd) || this;
73339
    }
73340
    NgControlStatus.decorators = [
73341
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{ selector: '[formControlName],[ngModel],[formControl]', host: ngControlStatusHost },] }
73342
    ];
73343
    /** @nocollapse */
73344
    NgControlStatus.ctorParameters = function () { return [
73345
        { type: NgControl, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Self"] },] },
73346
    ]; };
73347
    return NgControlStatus;
73348
}(AbstractControlStatus));
73349
/**
73350
 * Directive automatically applied to Angular form groups that sets CSS classes
73351
 * based on control status (valid/invalid/dirty/etc).
73352
 *
73353
 *
73354
 */
73355
var NgControlStatusGroup = /** @class */ (function (_super) {
73356
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(NgControlStatusGroup, _super);
73357
    function NgControlStatusGroup(cd) {
73358
        return _super.call(this, cd) || this;
73359
    }
73360
    NgControlStatusGroup.decorators = [
73361
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
73362
                    selector: '[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]',
73363
                    host: ngControlStatusHost
73364
                },] }
73365
    ];
73366
    /** @nocollapse */
73367
    NgControlStatusGroup.ctorParameters = function () { return [
73368
        { type: ControlContainer, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Self"] },] },
73369
    ]; };
73370
    return NgControlStatusGroup;
73371
}(AbstractControlStatus));
73372
 
73373
/**
73374
 * @license
73375
 * Copyright Google Inc. All Rights Reserved.
73376
 *
73377
 * Use of this source code is governed by an MIT-style license that can be
73378
 * found in the LICENSE file at https://angular.io/license
73379
 */
73380
/**
73381
 * Indicates that a FormControl is valid, i.e. that no errors exist in the input value.
73382
 */
73383
var VALID = 'VALID';
73384
/**
73385
 * Indicates that a FormControl is invalid, i.e. that an error exists in the input value.
73386
 */
73387
var INVALID = 'INVALID';
73388
/**
73389
 * Indicates that a FormControl is pending, i.e. that async validation is occurring and
73390
 * errors are not yet available for the input value.
73391
 */
73392
var PENDING = 'PENDING';
73393
/**
73394
 * Indicates that a FormControl is disabled, i.e. that the control is exempt from ancestor
73395
 * calculations of validity or value.
73396
 */
73397
var DISABLED = 'DISABLED';
73398
function _find(control, path, delimiter) {
73399
    if (path == null)
73400
        return null;
73401
    if (!(path instanceof Array)) {
73402
        path = path.split(delimiter);
73403
    }
73404
    if (path instanceof Array && (path.length === 0))
73405
        return null;
73406
    return path.reduce(function (v, name) {
73407
        if (v instanceof FormGroup) {
73408
            return v.controls[name] || null;
73409
        }
73410
        if (v instanceof FormArray) {
73411
            return v.at(name) || null;
73412
        }
73413
        return null;
73414
    }, control);
73415
}
73416
function coerceToValidator(validatorOrOpts) {
73417
    var validator = (isOptionsObj(validatorOrOpts) ? validatorOrOpts.validators :
73418
        validatorOrOpts);
73419
    return Array.isArray(validator) ? composeValidators(validator) : validator || null;
73420
}
73421
function coerceToAsyncValidator(asyncValidator, validatorOrOpts) {
73422
    var origAsyncValidator = (isOptionsObj(validatorOrOpts) ? validatorOrOpts.asyncValidators :
73423
        asyncValidator);
73424
    return Array.isArray(origAsyncValidator) ? composeAsyncValidators(origAsyncValidator) :
73425
        origAsyncValidator || null;
73426
}
73427
function isOptionsObj(validatorOrOpts) {
73428
    return validatorOrOpts != null && !Array.isArray(validatorOrOpts) &&
73429
        typeof validatorOrOpts === 'object';
73430
}
73431
/**
73432
 * @description
73433
 *
73434
 * This is the base class for `FormControl`, `FormGroup`, and `FormArray`.
73435
 *
73436
 * It provides some of the shared behavior that all controls and groups of controls have, like
73437
 * running validators, calculating status, and resetting state. It also defines the properties
73438
 * that are shared between all sub-classes, like `value`, `valid`, and `dirty`. It shouldn't be
73439
 * instantiated directly.
73440
 *
73441
 * @see [Forms Guide](/guide/forms)
73442
 * @see [Reactive Forms Guide](/guide/reactive-forms)
73443
 * @see [Dynamic Forms Guide](/guide/dynamic-form)
73444
 *
73445
 */
73446
var AbstractControl = /** @class */ (function () {
73447
    /**
73448
     * Initialize the AbstractControl instance.
73449
     * @param validator The function that will determine the synchronous validity of this control.
73450
     * @param asyncValidator The function that will determine the asynchronous validity of this
73451
     * control.
73452
     */
73453
    function AbstractControl(validator, asyncValidator) {
73454
        this.validator = validator;
73455
        this.asyncValidator = asyncValidator;
73456
        /** @internal */
73457
        this._onCollectionChange = function () { };
73458
        /**
73459
           * A control is `pristine` if the user has not yet changed
73460
           * the value in the UI.
73461
           *
73462
           * Note that programmatic changes to a control's value will
73463
           * *not* mark it dirty.
73464
           */
73465
        this.pristine = true;
73466
        /**
73467
          * A control is marked `touched` once the user has triggered
73468
          * a `blur` event on it.
73469
          */
73470
        this.touched = false;
73471
        /** @internal */
73472
        this._onDisabledChange = [];
73473
    }
73474
    Object.defineProperty(AbstractControl.prototype, "parent", {
73475
        /**
73476
         * The parent control.
73477
         */
73478
        get: /**
73479
           * The parent control.
73480
           */
73481
        function () { return this._parent; },
73482
        enumerable: true,
73483
        configurable: true
73484
    });
73485
    Object.defineProperty(AbstractControl.prototype, "valid", {
73486
        /**
73487
         * A control is `valid` when its `status === VALID`.
73488
         *
73489
         * In order to have this status, the control must have passed all its
73490
         * validation checks.
73491
         */
73492
        get: /**
73493
           * A control is `valid` when its `status === VALID`.
73494
           *
73495
           * In order to have this status, the control must have passed all its
73496
           * validation checks.
73497
           */
73498
        function () { return this.status === VALID; },
73499
        enumerable: true,
73500
        configurable: true
73501
    });
73502
    Object.defineProperty(AbstractControl.prototype, "invalid", {
73503
        /**
73504
         * A control is `invalid` when its `status === INVALID`.
73505
         *
73506
         * In order to have this status, the control must have failed
73507
         * at least one of its validation checks.
73508
         */
73509
        get: /**
73510
           * A control is `invalid` when its `status === INVALID`.
73511
           *
73512
           * In order to have this status, the control must have failed
73513
           * at least one of its validation checks.
73514
           */
73515
        function () { return this.status === INVALID; },
73516
        enumerable: true,
73517
        configurable: true
73518
    });
73519
    Object.defineProperty(AbstractControl.prototype, "pending", {
73520
        /**
73521
         * A control is `pending` when its `status === PENDING`.
73522
         *
73523
         * In order to have this status, the control must be in the
73524
         * middle of conducting a validation check.
73525
         */
73526
        get: /**
73527
           * A control is `pending` when its `status === PENDING`.
73528
           *
73529
           * In order to have this status, the control must be in the
73530
           * middle of conducting a validation check.
73531
           */
73532
        function () { return this.status == PENDING; },
73533
        enumerable: true,
73534
        configurable: true
73535
    });
73536
    Object.defineProperty(AbstractControl.prototype, "disabled", {
73537
        /**
73538
         * A control is `disabled` when its `status === DISABLED`.
73539
         *
73540
         * Disabled controls are exempt from validation checks and
73541
         * are not included in the aggregate value of their ancestor
73542
         * controls.
73543
         */
73544
        get: /**
73545
           * A control is `disabled` when its `status === DISABLED`.
73546
           *
73547
           * Disabled controls are exempt from validation checks and
73548
           * are not included in the aggregate value of their ancestor
73549
           * controls.
73550
           */
73551
        function () { return this.status === DISABLED; },
73552
        enumerable: true,
73553
        configurable: true
73554
    });
73555
    Object.defineProperty(AbstractControl.prototype, "enabled", {
73556
        /**
73557
         * A control is `enabled` as long as its `status !== DISABLED`.
73558
         *
73559
         * In other words, it has a status of `VALID`, `INVALID`, or
73560
         * `PENDING`.
73561
         */
73562
        get: /**
73563
           * A control is `enabled` as long as its `status !== DISABLED`.
73564
           *
73565
           * In other words, it has a status of `VALID`, `INVALID`, or
73566
           * `PENDING`.
73567
           */
73568
        function () { return this.status !== DISABLED; },
73569
        enumerable: true,
73570
        configurable: true
73571
    });
73572
    Object.defineProperty(AbstractControl.prototype, "dirty", {
73573
        /**
73574
         * A control is `dirty` if the user has changed the value
73575
         * in the UI.
73576
         *
73577
         * Note that programmatic changes to a control's value will
73578
         * *not* mark it dirty.
73579
         */
73580
        get: /**
73581
           * A control is `dirty` if the user has changed the value
73582
           * in the UI.
73583
           *
73584
           * Note that programmatic changes to a control's value will
73585
           * *not* mark it dirty.
73586
           */
73587
        function () { return !this.pristine; },
73588
        enumerable: true,
73589
        configurable: true
73590
    });
73591
    Object.defineProperty(AbstractControl.prototype, "untouched", {
73592
        /**
73593
         * A control is `untouched` if the user has not yet triggered
73594
         * a `blur` event on it.
73595
         */
73596
        get: /**
73597
           * A control is `untouched` if the user has not yet triggered
73598
           * a `blur` event on it.
73599
           */
73600
        function () { return !this.touched; },
73601
        enumerable: true,
73602
        configurable: true
73603
    });
73604
    Object.defineProperty(AbstractControl.prototype, "updateOn", {
73605
        /**
73606
         * Returns the update strategy of the `AbstractControl` (i.e.
73607
         * the event on which the control will update itself).
73608
         * Possible values: `'change'` (default) | `'blur'` | `'submit'`
73609
         */
73610
        get: /**
73611
           * Returns the update strategy of the `AbstractControl` (i.e.
73612
           * the event on which the control will update itself).
73613
           * Possible values: `'change'` (default) | `'blur'` | `'submit'`
73614
           */
73615
        function () {
73616
            return this._updateOn ? this._updateOn : (this.parent ? this.parent.updateOn : 'change');
73617
        },
73618
        enumerable: true,
73619
        configurable: true
73620
    });
73621
    /**
73622
     * Sets the synchronous validators that are active on this control.  Calling
73623
     * this will overwrite any existing sync validators.
73624
     */
73625
    /**
73626
       * Sets the synchronous validators that are active on this control.  Calling
73627
       * this will overwrite any existing sync validators.
73628
       */
73629
    AbstractControl.prototype.setValidators = /**
73630
       * Sets the synchronous validators that are active on this control.  Calling
73631
       * this will overwrite any existing sync validators.
73632
       */
73633
    function (newValidator) {
73634
        this.validator = coerceToValidator(newValidator);
73635
    };
73636
    /**
73637
     * Sets the async validators that are active on this control. Calling this
73638
     * will overwrite any existing async validators.
73639
     */
73640
    /**
73641
       * Sets the async validators that are active on this control. Calling this
73642
       * will overwrite any existing async validators.
73643
       */
73644
    AbstractControl.prototype.setAsyncValidators = /**
73645
       * Sets the async validators that are active on this control. Calling this
73646
       * will overwrite any existing async validators.
73647
       */
73648
    function (newValidator) {
73649
        this.asyncValidator = coerceToAsyncValidator(newValidator);
73650
    };
73651
    /**
73652
     * Empties out the sync validator list.
73653
     */
73654
    /**
73655
       * Empties out the sync validator list.
73656
       */
73657
    AbstractControl.prototype.clearValidators = /**
73658
       * Empties out the sync validator list.
73659
       */
73660
    function () { this.validator = null; };
73661
    /**
73662
     * Empties out the async validator list.
73663
     */
73664
    /**
73665
       * Empties out the async validator list.
73666
       */
73667
    AbstractControl.prototype.clearAsyncValidators = /**
73668
       * Empties out the async validator list.
73669
       */
73670
    function () { this.asyncValidator = null; };
73671
    /**
73672
     * Marks the control as `touched`.
73673
     *
73674
     * This will also mark all direct ancestors as `touched` to maintain
73675
     * the model.
73676
     */
73677
    /**
73678
       * Marks the control as `touched`.
73679
       *
73680
       * This will also mark all direct ancestors as `touched` to maintain
73681
       * the model.
73682
       */
73683
    AbstractControl.prototype.markAsTouched = /**
73684
       * Marks the control as `touched`.
73685
       *
73686
       * This will also mark all direct ancestors as `touched` to maintain
73687
       * the model.
73688
       */
73689
    function (opts) {
73690
        if (opts === void 0) { opts = {}; }
73691
        this.touched = true;
73692
        if (this._parent && !opts.onlySelf) {
73693
            this._parent.markAsTouched(opts);
73694
        }
73695
    };
73696
    /**
73697
     * Marks the control as `untouched`.
73698
     *
73699
     * If the control has any children, it will also mark all children as `untouched`
73700
     * to maintain the model, and re-calculate the `touched` status of all parent
73701
     * controls.
73702
     */
73703
    /**
73704
       * Marks the control as `untouched`.
73705
       *
73706
       * If the control has any children, it will also mark all children as `untouched`
73707
       * to maintain the model, and re-calculate the `touched` status of all parent
73708
       * controls.
73709
       */
73710
    AbstractControl.prototype.markAsUntouched = /**
73711
       * Marks the control as `untouched`.
73712
       *
73713
       * If the control has any children, it will also mark all children as `untouched`
73714
       * to maintain the model, and re-calculate the `touched` status of all parent
73715
       * controls.
73716
       */
73717
    function (opts) {
73718
        if (opts === void 0) { opts = {}; }
73719
        this.touched = false;
73720
        this._pendingTouched = false;
73721
        this._forEachChild(function (control) { control.markAsUntouched({ onlySelf: true }); });
73722
        if (this._parent && !opts.onlySelf) {
73723
            this._parent._updateTouched(opts);
73724
        }
73725
    };
73726
    /**
73727
     * Marks the control as `dirty`.
73728
     *
73729
     * This will also mark all direct ancestors as `dirty` to maintain
73730
     * the model.
73731
     */
73732
    /**
73733
       * Marks the control as `dirty`.
73734
       *
73735
       * This will also mark all direct ancestors as `dirty` to maintain
73736
       * the model.
73737
       */
73738
    AbstractControl.prototype.markAsDirty = /**
73739
       * Marks the control as `dirty`.
73740
       *
73741
       * This will also mark all direct ancestors as `dirty` to maintain
73742
       * the model.
73743
       */
73744
    function (opts) {
73745
        if (opts === void 0) { opts = {}; }
73746
        this.pristine = false;
73747
        if (this._parent && !opts.onlySelf) {
73748
            this._parent.markAsDirty(opts);
73749
        }
73750
    };
73751
    /**
73752
     * Marks the control as `pristine`.
73753
     *
73754
     * If the control has any children, it will also mark all children as `pristine`
73755
     * to maintain the model, and re-calculate the `pristine` status of all parent
73756
     * controls.
73757
     */
73758
    /**
73759
       * Marks the control as `pristine`.
73760
       *
73761
       * If the control has any children, it will also mark all children as `pristine`
73762
       * to maintain the model, and re-calculate the `pristine` status of all parent
73763
       * controls.
73764
       */
73765
    AbstractControl.prototype.markAsPristine = /**
73766
       * Marks the control as `pristine`.
73767
       *
73768
       * If the control has any children, it will also mark all children as `pristine`
73769
       * to maintain the model, and re-calculate the `pristine` status of all parent
73770
       * controls.
73771
       */
73772
    function (opts) {
73773
        if (opts === void 0) { opts = {}; }
73774
        this.pristine = true;
73775
        this._pendingDirty = false;
73776
        this._forEachChild(function (control) { control.markAsPristine({ onlySelf: true }); });
73777
        if (this._parent && !opts.onlySelf) {
73778
            this._parent._updatePristine(opts);
73779
        }
73780
    };
73781
    /**
73782
     * Marks the control as `pending`.
73783
     *
73784
     * An event will be emitted by `statusChanges` by default.
73785
     *
73786
     * Passing `false` for `emitEvent` will cause `statusChanges` to not event an event.
73787
     */
73788
    /**
73789
       * Marks the control as `pending`.
73790
       *
73791
       * An event will be emitted by `statusChanges` by default.
73792
       *
73793
       * Passing `false` for `emitEvent` will cause `statusChanges` to not event an event.
73794
       */
73795
    AbstractControl.prototype.markAsPending = /**
73796
       * Marks the control as `pending`.
73797
       *
73798
       * An event will be emitted by `statusChanges` by default.
73799
       *
73800
       * Passing `false` for `emitEvent` will cause `statusChanges` to not event an event.
73801
       */
73802
    function (opts) {
73803
        if (opts === void 0) { opts = {}; }
73804
        this.status = PENDING;
73805
        if (opts.emitEvent !== false) {
73806
            this.statusChanges.emit(this.status);
73807
        }
73808
        if (this._parent && !opts.onlySelf) {
73809
            this._parent.markAsPending(opts);
73810
        }
73811
    };
73812
    /**
73813
     * Disables the control. This means the control will be exempt from validation checks and
73814
     * excluded from the aggregate value of any parent. Its status is `DISABLED`.
73815
     *
73816
     * If the control has children, all children will be disabled to maintain the model.
73817
     */
73818
    /**
73819
       * Disables the control. This means the control will be exempt from validation checks and
73820
       * excluded from the aggregate value of any parent. Its status is `DISABLED`.
73821
       *
73822
       * If the control has children, all children will be disabled to maintain the model.
73823
       */
73824
    AbstractControl.prototype.disable = /**
73825
       * Disables the control. This means the control will be exempt from validation checks and
73826
       * excluded from the aggregate value of any parent. Its status is `DISABLED`.
73827
       *
73828
       * If the control has children, all children will be disabled to maintain the model.
73829
       */
73830
    function (opts) {
73831
        if (opts === void 0) { opts = {}; }
73832
        this.status = DISABLED;
73833
        this.errors = null;
73834
        this._forEachChild(function (control) { control.disable(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, opts, { onlySelf: true })); });
73835
        this._updateValue();
73836
        if (opts.emitEvent !== false) {
73837
            this.valueChanges.emit(this.value);
73838
            this.statusChanges.emit(this.status);
73839
        }
73840
        this._updateAncestors(opts);
73841
        this._onDisabledChange.forEach(function (changeFn) { return changeFn(true); });
73842
    };
73843
    /**
73844
     * Enables the control. This means the control will be included in validation checks and
73845
     * the aggregate value of its parent. Its status is re-calculated based on its value and
73846
     * its validators.
73847
     *
73848
     * If the control has children, all children will be enabled.
73849
     */
73850
    /**
73851
       * Enables the control. This means the control will be included in validation checks and
73852
       * the aggregate value of its parent. Its status is re-calculated based on its value and
73853
       * its validators.
73854
       *
73855
       * If the control has children, all children will be enabled.
73856
       */
73857
    AbstractControl.prototype.enable = /**
73858
       * Enables the control. This means the control will be included in validation checks and
73859
       * the aggregate value of its parent. Its status is re-calculated based on its value and
73860
       * its validators.
73861
       *
73862
       * If the control has children, all children will be enabled.
73863
       */
73864
    function (opts) {
73865
        if (opts === void 0) { opts = {}; }
73866
        this.status = VALID;
73867
        this._forEachChild(function (control) { control.enable(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, opts, { onlySelf: true })); });
73868
        this.updateValueAndValidity({ onlySelf: true, emitEvent: opts.emitEvent });
73869
        this._updateAncestors(opts);
73870
        this._onDisabledChange.forEach(function (changeFn) { return changeFn(false); });
73871
    };
73872
    AbstractControl.prototype._updateAncestors = function (opts) {
73873
        if (this._parent && !opts.onlySelf) {
73874
            this._parent.updateValueAndValidity(opts);
73875
            this._parent._updatePristine();
73876
            this._parent._updateTouched();
73877
        }
73878
    };
73879
    AbstractControl.prototype.setParent = function (parent) { this._parent = parent; };
73880
    /**
73881
     * Re-calculates the value and validation status of the control.
73882
     *
73883
     * By default, it will also update the value and validity of its ancestors.
73884
     */
73885
    /**
73886
       * Re-calculates the value and validation status of the control.
73887
       *
73888
       * By default, it will also update the value and validity of its ancestors.
73889
       */
73890
    AbstractControl.prototype.updateValueAndValidity = /**
73891
       * Re-calculates the value and validation status of the control.
73892
       *
73893
       * By default, it will also update the value and validity of its ancestors.
73894
       */
73895
    function (opts) {
73896
        if (opts === void 0) { opts = {}; }
73897
        this._setInitialStatus();
73898
        this._updateValue();
73899
        if (this.enabled) {
73900
            this._cancelExistingSubscription();
73901
            this.errors = this._runValidator();
73902
            this.status = this._calculateStatus();
73903
            if (this.status === VALID || this.status === PENDING) {
73904
                this._runAsyncValidator(opts.emitEvent);
73905
            }
73906
        }
73907
        if (opts.emitEvent !== false) {
73908
            this.valueChanges.emit(this.value);
73909
            this.statusChanges.emit(this.status);
73910
        }
73911
        if (this._parent && !opts.onlySelf) {
73912
            this._parent.updateValueAndValidity(opts);
73913
        }
73914
    };
73915
    /** @internal */
73916
    /** @internal */
73917
    AbstractControl.prototype._updateTreeValidity = /** @internal */
73918
    function (opts) {
73919
        if (opts === void 0) { opts = { emitEvent: true }; }
73920
        this._forEachChild(function (ctrl) { return ctrl._updateTreeValidity(opts); });
73921
        this.updateValueAndValidity({ onlySelf: true, emitEvent: opts.emitEvent });
73922
    };
73923
    AbstractControl.prototype._setInitialStatus = function () {
73924
        this.status = this._allControlsDisabled() ? DISABLED : VALID;
73925
    };
73926
    AbstractControl.prototype._runValidator = function () {
73927
        return this.validator ? this.validator(this) : null;
73928
    };
73929
    AbstractControl.prototype._runAsyncValidator = function (emitEvent) {
73930
        var _this = this;
73931
        if (this.asyncValidator) {
73932
            this.status = PENDING;
73933
            var obs = toObservable(this.asyncValidator(this));
73934
            this._asyncValidationSubscription =
73935
                obs.subscribe(function (errors) { return _this.setErrors(errors, { emitEvent: emitEvent }); });
73936
        }
73937
    };
73938
    AbstractControl.prototype._cancelExistingSubscription = function () {
73939
        if (this._asyncValidationSubscription) {
73940
            this._asyncValidationSubscription.unsubscribe();
73941
        }
73942
    };
73943
    /**
73944
     * Sets errors on a form control.
73945
     *
73946
     * This is used when validations are run manually by the user, rather than automatically.
73947
     *
73948
     * Calling `setErrors` will also update the validity of the parent control.
73949
     *
73950
     * ### Example
73951
     *
73952
     * ```
73953
     * const login = new FormControl("someLogin");
73954
     * login.setErrors({
73955
     *   "notUnique": true
73956
     * });
73957
     *
73958
     * expect(login.valid).toEqual(false);
73959
     * expect(login.errors).toEqual({"notUnique": true});
73960
     *
73961
     * login.setValue("someOtherLogin");
73962
     *
73963
     * expect(login.valid).toEqual(true);
73964
     * ```
73965
     */
73966
    /**
73967
       * Sets errors on a form control.
73968
       *
73969
       * This is used when validations are run manually by the user, rather than automatically.
73970
       *
73971
       * Calling `setErrors` will also update the validity of the parent control.
73972
       *
73973
       * ### Example
73974
       *
73975
       * ```
73976
       * const login = new FormControl("someLogin");
73977
       * login.setErrors({
73978
       *   "notUnique": true
73979
       * });
73980
       *
73981
       * expect(login.valid).toEqual(false);
73982
       * expect(login.errors).toEqual({"notUnique": true});
73983
       *
73984
       * login.setValue("someOtherLogin");
73985
       *
73986
       * expect(login.valid).toEqual(true);
73987
       * ```
73988
       */
73989
    AbstractControl.prototype.setErrors = /**
73990
       * Sets errors on a form control.
73991
       *
73992
       * This is used when validations are run manually by the user, rather than automatically.
73993
       *
73994
       * Calling `setErrors` will also update the validity of the parent control.
73995
       *
73996
       * ### Example
73997
       *
73998
       * ```
73999
       * const login = new FormControl("someLogin");
74000
       * login.setErrors({
74001
       *   "notUnique": true
74002
       * });
74003
       *
74004
       * expect(login.valid).toEqual(false);
74005
       * expect(login.errors).toEqual({"notUnique": true});
74006
       *
74007
       * login.setValue("someOtherLogin");
74008
       *
74009
       * expect(login.valid).toEqual(true);
74010
       * ```
74011
       */
74012
    function (errors, opts) {
74013
        if (opts === void 0) { opts = {}; }
74014
        this.errors = errors;
74015
        this._updateControlsErrors(opts.emitEvent !== false);
74016
    };
74017
    /**
74018
     * Retrieves a child control given the control's name or path.
74019
     *
74020
     * Paths can be passed in as an array or a string delimited by a dot.
74021
     *
74022
     * To get a control nested within a `person` sub-group:
74023
     *
74024
     * * `this.form.get('person.name');`
74025
     *
74026
     * -OR-
74027
     *
74028
     * * `this.form.get(['person', 'name']);`
74029
     */
74030
    /**
74031
       * Retrieves a child control given the control's name or path.
74032
       *
74033
       * Paths can be passed in as an array or a string delimited by a dot.
74034
       *
74035
       * To get a control nested within a `person` sub-group:
74036
       *
74037
       * * `this.form.get('person.name');`
74038
       *
74039
       * -OR-
74040
       *
74041
       * * `this.form.get(['person', 'name']);`
74042
       */
74043
    AbstractControl.prototype.get = /**
74044
       * Retrieves a child control given the control's name or path.
74045
       *
74046
       * Paths can be passed in as an array or a string delimited by a dot.
74047
       *
74048
       * To get a control nested within a `person` sub-group:
74049
       *
74050
       * * `this.form.get('person.name');`
74051
       *
74052
       * -OR-
74053
       *
74054
       * * `this.form.get(['person', 'name']);`
74055
       */
74056
    function (path) { return _find(this, path, '.'); };
74057
    /**
74058
     * Returns error data if the control with the given path has the error specified. Otherwise
74059
     * returns null or undefined.
74060
     *
74061
     * If no path is given, it checks for the error on the present control.
74062
     */
74063
    /**
74064
       * Returns error data if the control with the given path has the error specified. Otherwise
74065
       * returns null or undefined.
74066
       *
74067
       * If no path is given, it checks for the error on the present control.
74068
       */
74069
    AbstractControl.prototype.getError = /**
74070
       * Returns error data if the control with the given path has the error specified. Otherwise
74071
       * returns null or undefined.
74072
       *
74073
       * If no path is given, it checks for the error on the present control.
74074
       */
74075
    function (errorCode, path) {
74076
        var control = path ? this.get(path) : this;
74077
        return control && control.errors ? control.errors[errorCode] : null;
74078
    };
74079
    /**
74080
     * Returns true if the control with the given path has the error specified. Otherwise
74081
     * returns false.
74082
     *
74083
     * If no path is given, it checks for the error on the present control.
74084
     */
74085
    /**
74086
       * Returns true if the control with the given path has the error specified. Otherwise
74087
       * returns false.
74088
       *
74089
       * If no path is given, it checks for the error on the present control.
74090
       */
74091
    AbstractControl.prototype.hasError = /**
74092
       * Returns true if the control with the given path has the error specified. Otherwise
74093
       * returns false.
74094
       *
74095
       * If no path is given, it checks for the error on the present control.
74096
       */
74097
    function (errorCode, path) { return !!this.getError(errorCode, path); };
74098
    Object.defineProperty(AbstractControl.prototype, "root", {
74099
        /**
74100
         * Retrieves the top-level ancestor of this control.
74101
         */
74102
        get: /**
74103
           * Retrieves the top-level ancestor of this control.
74104
           */
74105
        function () {
74106
            var x = this;
74107
            while (x._parent) {
74108
                x = x._parent;
74109
            }
74110
            return x;
74111
        },
74112
        enumerable: true,
74113
        configurable: true
74114
    });
74115
    /** @internal */
74116
    /** @internal */
74117
    AbstractControl.prototype._updateControlsErrors = /** @internal */
74118
    function (emitEvent) {
74119
        this.status = this._calculateStatus();
74120
        if (emitEvent) {
74121
            this.statusChanges.emit(this.status);
74122
        }
74123
        if (this._parent) {
74124
            this._parent._updateControlsErrors(emitEvent);
74125
        }
74126
    };
74127
    /** @internal */
74128
    /** @internal */
74129
    AbstractControl.prototype._initObservables = /** @internal */
74130
    function () {
74131
        this.valueChanges = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
74132
        this.statusChanges = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
74133
    };
74134
    AbstractControl.prototype._calculateStatus = function () {
74135
        if (this._allControlsDisabled())
74136
            return DISABLED;
74137
        if (this.errors)
74138
            return INVALID;
74139
        if (this._anyControlsHaveStatus(PENDING))
74140
            return PENDING;
74141
        if (this._anyControlsHaveStatus(INVALID))
74142
            return INVALID;
74143
        return VALID;
74144
    };
74145
    /** @internal */
74146
    /** @internal */
74147
    AbstractControl.prototype._anyControlsHaveStatus = /** @internal */
74148
    function (status) {
74149
        return this._anyControls(function (control) { return control.status === status; });
74150
    };
74151
    /** @internal */
74152
    /** @internal */
74153
    AbstractControl.prototype._anyControlsDirty = /** @internal */
74154
    function () {
74155
        return this._anyControls(function (control) { return control.dirty; });
74156
    };
74157
    /** @internal */
74158
    /** @internal */
74159
    AbstractControl.prototype._anyControlsTouched = /** @internal */
74160
    function () {
74161
        return this._anyControls(function (control) { return control.touched; });
74162
    };
74163
    /** @internal */
74164
    /** @internal */
74165
    AbstractControl.prototype._updatePristine = /** @internal */
74166
    function (opts) {
74167
        if (opts === void 0) { opts = {}; }
74168
        this.pristine = !this._anyControlsDirty();
74169
        if (this._parent && !opts.onlySelf) {
74170
            this._parent._updatePristine(opts);
74171
        }
74172
    };
74173
    /** @internal */
74174
    /** @internal */
74175
    AbstractControl.prototype._updateTouched = /** @internal */
74176
    function (opts) {
74177
        if (opts === void 0) { opts = {}; }
74178
        this.touched = this._anyControlsTouched();
74179
        if (this._parent && !opts.onlySelf) {
74180
            this._parent._updateTouched(opts);
74181
        }
74182
    };
74183
    /** @internal */
74184
    /** @internal */
74185
    AbstractControl.prototype._isBoxedValue = /** @internal */
74186
    function (formState) {
74187
        return typeof formState === 'object' && formState !== null &&
74188
            Object.keys(formState).length === 2 && 'value' in formState && 'disabled' in formState;
74189
    };
74190
    /** @internal */
74191
    /** @internal */
74192
    AbstractControl.prototype._registerOnCollectionChange = /** @internal */
74193
    function (fn) { this._onCollectionChange = fn; };
74194
    /** @internal */
74195
    /** @internal */
74196
    AbstractControl.prototype._setUpdateStrategy = /** @internal */
74197
    function (opts) {
74198
        if (isOptionsObj(opts) && opts.updateOn != null) {
74199
            this._updateOn = (opts.updateOn);
74200
        }
74201
    };
74202
    return AbstractControl;
74203
}());
74204
/**
74205
 * @description
74206
 *
74207
 * Tracks the value and validation status of an individual form control.
74208
 *
74209
 * This is one of the three fundamental building blocks of Angular forms, along with
74210
 * `FormGroup` and `FormArray`.
74211
 *
74212
 * When instantiating a `FormControl`, you can pass in an initial value as the
74213
 * first argument. Example:
74214
 *
74215
 * ```ts
74216
 * const ctrl = new FormControl('some value');
74217
 * console.log(ctrl.value);     // 'some value'
74218
 *```
74219
 *
74220
 * You can also initialize the control with a form state object on instantiation,
74221
 * which includes both the value and whether or not the control is disabled.
74222
 * You can't use the value key without the disabled key; both are required
74223
 * to use this way of initialization.
74224
 *
74225
 * ```ts
74226
 * const ctrl = new FormControl({value: 'n/a', disabled: true});
74227
 * console.log(ctrl.value);     // 'n/a'
74228
 * console.log(ctrl.status);   // 'DISABLED'
74229
 * ```
74230
 *
74231
 * The second `FormControl` argument can accept one of three things:
74232
 * * a sync validator function
74233
 * * an array of sync validator functions
74234
 * * an options object containing validator and/or async validator functions
74235
 *
74236
 * Example of a single sync validator function:
74237
 *
74238
 * ```ts
74239
 * const ctrl = new FormControl('', Validators.required);
74240
 * console.log(ctrl.value);     // ''
74241
 * console.log(ctrl.status);   // 'INVALID'
74242
 * ```
74243
 *
74244
 * Example using options object:
74245
 *
74246
 * ```ts
74247
 * const ctrl = new FormControl('', {
74248
 *    validators: Validators.required,
74249
 *    asyncValidators: myAsyncValidator
74250
 * });
74251
 * ```
74252
 *
74253
 * The options object can also be used to define when the control should update.
74254
 * By default, the value and validity of a control updates whenever the value
74255
 * changes. You can configure it to update on the blur event instead by setting
74256
 * the `updateOn` option to `'blur'`.
74257
 *
74258
 * ```ts
74259
 * const c = new FormControl('', { updateOn: 'blur' });
74260
 * ```
74261
 *
74262
 * You can also set `updateOn` to `'submit'`, which will delay value and validity
74263
 * updates until the parent form of the control fires a submit event.
74264
 *
74265
 * See its superclass, `AbstractControl`, for more properties and methods.
74266
 *
74267
 * * **npm package**: `@angular/forms`
74268
 *
74269
 *
74270
 */
74271
var FormControl = /** @class */ (function (_super) {
74272
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FormControl, _super);
74273
    function FormControl(formState, validatorOrOpts, asyncValidator) {
74274
        if (formState === void 0) { formState = null; }
74275
        var _this = _super.call(this, coerceToValidator(validatorOrOpts), coerceToAsyncValidator(asyncValidator, validatorOrOpts)) || this;
74276
        /** @internal */
74277
        _this._onChange = [];
74278
        _this._applyFormState(formState);
74279
        _this._setUpdateStrategy(validatorOrOpts);
74280
        _this.updateValueAndValidity({ onlySelf: true, emitEvent: false });
74281
        _this._initObservables();
74282
        return _this;
74283
    }
74284
    /**
74285
     * Set the value of the form control to `value`.
74286
     *
74287
     * If `onlySelf` is `true`, this change will only affect the validation of this `FormControl`
74288
     * and not its parent component. This defaults to false.
74289
     *
74290
     * If `emitEvent` is `true`, this
74291
     * change will cause a `valueChanges` event on the `FormControl` to be emitted. This defaults
74292
     * to true (as it falls through to `updateValueAndValidity`).
74293
     *
74294
     * If `emitModelToViewChange` is `true`, the view will be notified about the new value
74295
     * via an `onChange` event. This is the default behavior if `emitModelToViewChange` is not
74296
     * specified.
74297
     *
74298
     * If `emitViewToModelChange` is `true`, an ngModelChange event will be fired to update the
74299
     * model.  This is the default behavior if `emitViewToModelChange` is not specified.
74300
     */
74301
    /**
74302
       * Set the value of the form control to `value`.
74303
       *
74304
       * If `onlySelf` is `true`, this change will only affect the validation of this `FormControl`
74305
       * and not its parent component. This defaults to false.
74306
       *
74307
       * If `emitEvent` is `true`, this
74308
       * change will cause a `valueChanges` event on the `FormControl` to be emitted. This defaults
74309
       * to true (as it falls through to `updateValueAndValidity`).
74310
       *
74311
       * If `emitModelToViewChange` is `true`, the view will be notified about the new value
74312
       * via an `onChange` event. This is the default behavior if `emitModelToViewChange` is not
74313
       * specified.
74314
       *
74315
       * If `emitViewToModelChange` is `true`, an ngModelChange event will be fired to update the
74316
       * model.  This is the default behavior if `emitViewToModelChange` is not specified.
74317
       */
74318
    FormControl.prototype.setValue = /**
74319
       * Set the value of the form control to `value`.
74320
       *
74321
       * If `onlySelf` is `true`, this change will only affect the validation of this `FormControl`
74322
       * and not its parent component. This defaults to false.
74323
       *
74324
       * If `emitEvent` is `true`, this
74325
       * change will cause a `valueChanges` event on the `FormControl` to be emitted. This defaults
74326
       * to true (as it falls through to `updateValueAndValidity`).
74327
       *
74328
       * If `emitModelToViewChange` is `true`, the view will be notified about the new value
74329
       * via an `onChange` event. This is the default behavior if `emitModelToViewChange` is not
74330
       * specified.
74331
       *
74332
       * If `emitViewToModelChange` is `true`, an ngModelChange event will be fired to update the
74333
       * model.  This is the default behavior if `emitViewToModelChange` is not specified.
74334
       */
74335
    function (value, options) {
74336
        var _this = this;
74337
        if (options === void 0) { options = {}; }
74338
        this.value = this._pendingValue = value;
74339
        if (this._onChange.length && options.emitModelToViewChange !== false) {
74340
            this._onChange.forEach(function (changeFn) { return changeFn(_this.value, options.emitViewToModelChange !== false); });
74341
        }
74342
        this.updateValueAndValidity(options);
74343
    };
74344
    /**
74345
     * Patches the value of a control.
74346
     *
74347
     * This function is functionally the same as {@link FormControl#setValue setValue} at this level.
74348
     * It exists for symmetry with {@link FormGroup#patchValue patchValue} on `FormGroups` and
74349
     * `FormArrays`, where it does behave differently.
74350
     */
74351
    /**
74352
       * Patches the value of a control.
74353
       *
74354
       * This function is functionally the same as {@link FormControl#setValue setValue} at this level.
74355
       * It exists for symmetry with {@link FormGroup#patchValue patchValue} on `FormGroups` and
74356
       * `FormArrays`, where it does behave differently.
74357
       */
74358
    FormControl.prototype.patchValue = /**
74359
       * Patches the value of a control.
74360
       *
74361
       * This function is functionally the same as {@link FormControl#setValue setValue} at this level.
74362
       * It exists for symmetry with {@link FormGroup#patchValue patchValue} on `FormGroups` and
74363
       * `FormArrays`, where it does behave differently.
74364
       */
74365
    function (value, options) {
74366
        if (options === void 0) { options = {}; }
74367
        this.setValue(value, options);
74368
    };
74369
    /**
74370
     * Resets the form control. This means by default:
74371
     *
74372
     * * it is marked as `pristine`
74373
     * * it is marked as `untouched`
74374
     * * value is set to null
74375
     *
74376
     * You can also reset to a specific form state by passing through a standalone
74377
     * value or a form state object that contains both a value and a disabled state
74378
     * (these are the only two properties that cannot be calculated).
74379
     *
74380
     * Ex:
74381
     *
74382
     * ```ts
74383
     * this.control.reset('Nancy');
74384
     *
74385
     * console.log(this.control.value);  // 'Nancy'
74386
     * ```
74387
     *
74388
     * OR
74389
     *
74390
     * ```
74391
     * this.control.reset({value: 'Nancy', disabled: true});
74392
     *
74393
     * console.log(this.control.value);  // 'Nancy'
74394
     * console.log(this.control.status);  // 'DISABLED'
74395
     * ```
74396
     */
74397
    /**
74398
       * Resets the form control. This means by default:
74399
       *
74400
       * * it is marked as `pristine`
74401
       * * it is marked as `untouched`
74402
       * * value is set to null
74403
       *
74404
       * You can also reset to a specific form state by passing through a standalone
74405
       * value or a form state object that contains both a value and a disabled state
74406
       * (these are the only two properties that cannot be calculated).
74407
       *
74408
       * Ex:
74409
       *
74410
       * ```ts
74411
       * this.control.reset('Nancy');
74412
       *
74413
       * console.log(this.control.value);  // 'Nancy'
74414
       * ```
74415
       *
74416
       * OR
74417
       *
74418
       * ```
74419
       * this.control.reset({value: 'Nancy', disabled: true});
74420
       *
74421
       * console.log(this.control.value);  // 'Nancy'
74422
       * console.log(this.control.status);  // 'DISABLED'
74423
       * ```
74424
       */
74425
    FormControl.prototype.reset = /**
74426
       * Resets the form control. This means by default:
74427
       *
74428
       * * it is marked as `pristine`
74429
       * * it is marked as `untouched`
74430
       * * value is set to null
74431
       *
74432
       * You can also reset to a specific form state by passing through a standalone
74433
       * value or a form state object that contains both a value and a disabled state
74434
       * (these are the only two properties that cannot be calculated).
74435
       *
74436
       * Ex:
74437
       *
74438
       * ```ts
74439
       * this.control.reset('Nancy');
74440
       *
74441
       * console.log(this.control.value);  // 'Nancy'
74442
       * ```
74443
       *
74444
       * OR
74445
       *
74446
       * ```
74447
       * this.control.reset({value: 'Nancy', disabled: true});
74448
       *
74449
       * console.log(this.control.value);  // 'Nancy'
74450
       * console.log(this.control.status);  // 'DISABLED'
74451
       * ```
74452
       */
74453
    function (formState, options) {
74454
        if (formState === void 0) { formState = null; }
74455
        if (options === void 0) { options = {}; }
74456
        this._applyFormState(formState);
74457
        this.markAsPristine(options);
74458
        this.markAsUntouched(options);
74459
        this.setValue(this.value, options);
74460
        this._pendingChange = false;
74461
    };
74462
    /**
74463
     * @internal
74464
     */
74465
    /**
74466
       * @internal
74467
       */
74468
    FormControl.prototype._updateValue = /**
74469
       * @internal
74470
       */
74471
    function () { };
74472
    /**
74473
     * @internal
74474
     */
74475
    /**
74476
       * @internal
74477
       */
74478
    FormControl.prototype._anyControls = /**
74479
       * @internal
74480
       */
74481
    function (condition) { return false; };
74482
    /**
74483
     * @internal
74484
     */
74485
    /**
74486
       * @internal
74487
       */
74488
    FormControl.prototype._allControlsDisabled = /**
74489
       * @internal
74490
       */
74491
    function () { return this.disabled; };
74492
    /**
74493
     * Register a listener for change events.
74494
     */
74495
    /**
74496
       * Register a listener for change events.
74497
       */
74498
    FormControl.prototype.registerOnChange = /**
74499
       * Register a listener for change events.
74500
       */
74501
    function (fn) { this._onChange.push(fn); };
74502
    /**
74503
     * @internal
74504
     */
74505
    /**
74506
       * @internal
74507
       */
74508
    FormControl.prototype._clearChangeFns = /**
74509
       * @internal
74510
       */
74511
    function () {
74512
        this._onChange = [];
74513
        this._onDisabledChange = [];
74514
        this._onCollectionChange = function () { };
74515
    };
74516
    /**
74517
     * Register a listener for disabled events.
74518
     */
74519
    /**
74520
       * Register a listener for disabled events.
74521
       */
74522
    FormControl.prototype.registerOnDisabledChange = /**
74523
       * Register a listener for disabled events.
74524
       */
74525
    function (fn) {
74526
        this._onDisabledChange.push(fn);
74527
    };
74528
    /**
74529
     * @internal
74530
     */
74531
    /**
74532
       * @internal
74533
       */
74534
    FormControl.prototype._forEachChild = /**
74535
       * @internal
74536
       */
74537
    function (cb) { };
74538
    /** @internal */
74539
    /** @internal */
74540
    FormControl.prototype._syncPendingControls = /** @internal */
74541
    function () {
74542
        if (this.updateOn === 'submit') {
74543
            if (this._pendingDirty)
74544
                this.markAsDirty();
74545
            if (this._pendingTouched)
74546
                this.markAsTouched();
74547
            if (this._pendingChange) {
74548
                this.setValue(this._pendingValue, { onlySelf: true, emitModelToViewChange: false });
74549
                return true;
74550
            }
74551
        }
74552
        return false;
74553
    };
74554
    FormControl.prototype._applyFormState = function (formState) {
74555
        if (this._isBoxedValue(formState)) {
74556
            this.value = this._pendingValue = formState.value;
74557
            formState.disabled ? this.disable({ onlySelf: true, emitEvent: false }) :
74558
                this.enable({ onlySelf: true, emitEvent: false });
74559
        }
74560
        else {
74561
            this.value = this._pendingValue = formState;
74562
        }
74563
    };
74564
    return FormControl;
74565
}(AbstractControl));
74566
/**
74567
 * @description
74568
 *
74569
 * Tracks the value and validity state of a group of `FormControl` instances.
74570
 *
74571
 * A `FormGroup` aggregates the values of each child `FormControl` into one object,
74572
 * with each control name as the key.  It calculates its status by reducing the statuses
74573
 * of its children. For example, if one of the controls in a group is invalid, the entire
74574
 * group becomes invalid.
74575
 *
74576
 * `FormGroup` is one of the three fundamental building blocks used to define forms in Angular,
74577
 * along with `FormControl` and `FormArray`.
74578
 *
74579
 * When instantiating a `FormGroup`, pass in a collection of child controls as the first
74580
 * argument. The key for each child will be the name under which it is registered.
74581
 *
74582
 * ### Example
74583
 *
74584
 * ```
74585
 * const form = new FormGroup({
74586
 *   first: new FormControl('Nancy', Validators.minLength(2)),
74587
 *   last: new FormControl('Drew'),
74588
 * });
74589
 *
74590
 * console.log(form.value);   // {first: 'Nancy', last; 'Drew'}
74591
 * console.log(form.status);  // 'VALID'
74592
 * ```
74593
 *
74594
 * You can also include group-level validators as the second arg, or group-level async
74595
 * validators as the third arg. These come in handy when you want to perform validation
74596
 * that considers the value of more than one child control.
74597
 *
74598
 * ### Example
74599
 *
74600
 * ```
74601
 * const form = new FormGroup({
74602
 *   password: new FormControl('', Validators.minLength(2)),
74603
 *   passwordConfirm: new FormControl('', Validators.minLength(2)),
74604
 * }, passwordMatchValidator);
74605
 *
74606
 *
74607
 * function passwordMatchValidator(g: FormGroup) {
74608
 *    return g.get('password').value === g.get('passwordConfirm').value
74609
 *       ? null : {'mismatch': true};
74610
 * }
74611
 * ```
74612
 *
74613
 * Like `FormControl` instances, you can alternatively choose to pass in
74614
 * validators and async validators as part of an options object.
74615
 *
74616
 * ```
74617
 * const form = new FormGroup({
74618
 *   password: new FormControl('')
74619
 *   passwordConfirm: new FormControl('')
74620
 * }, {validators: passwordMatchValidator, asyncValidators: otherValidator});
74621
 * ```
74622
 *
74623
 * The options object can also be used to set a default value for each child
74624
 * control's `updateOn` property. If you set `updateOn` to `'blur'` at the
74625
 * group level, all child controls will default to 'blur', unless the child
74626
 * has explicitly specified a different `updateOn` value.
74627
 *
74628
 * ```ts
74629
 * const c = new FormGroup({
74630
 *    one: new FormControl()
74631
 * }, {updateOn: 'blur'});
74632
 * ```
74633
 *
74634
 * * **npm package**: `@angular/forms`
74635
 *
74636
 *
74637
 */
74638
var FormGroup = /** @class */ (function (_super) {
74639
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FormGroup, _super);
74640
    function FormGroup(controls, validatorOrOpts, asyncValidator) {
74641
        var _this = _super.call(this, coerceToValidator(validatorOrOpts), coerceToAsyncValidator(asyncValidator, validatorOrOpts)) || this;
74642
        _this.controls = controls;
74643
        _this._initObservables();
74644
        _this._setUpdateStrategy(validatorOrOpts);
74645
        _this._setUpControls();
74646
        _this.updateValueAndValidity({ onlySelf: true, emitEvent: false });
74647
        return _this;
74648
    }
74649
    /**
74650
     * Registers a control with the group's list of controls.
74651
     *
74652
     * This method does not update the value or validity of the control, so for most cases you'll want
74653
     * to use {@link FormGroup#addControl addControl} instead.
74654
     */
74655
    /**
74656
       * Registers a control with the group's list of controls.
74657
       *
74658
       * This method does not update the value or validity of the control, so for most cases you'll want
74659
       * to use {@link FormGroup#addControl addControl} instead.
74660
       */
74661
    FormGroup.prototype.registerControl = /**
74662
       * Registers a control with the group's list of controls.
74663
       *
74664
       * This method does not update the value or validity of the control, so for most cases you'll want
74665
       * to use {@link FormGroup#addControl addControl} instead.
74666
       */
74667
    function (name, control) {
74668
        if (this.controls[name])
74669
            return this.controls[name];
74670
        this.controls[name] = control;
74671
        control.setParent(this);
74672
        control._registerOnCollectionChange(this._onCollectionChange);
74673
        return control;
74674
    };
74675
    /**
74676
     * Add a control to this group.
74677
     */
74678
    /**
74679
       * Add a control to this group.
74680
       */
74681
    FormGroup.prototype.addControl = /**
74682
       * Add a control to this group.
74683
       */
74684
    function (name, control) {
74685
        this.registerControl(name, control);
74686
        this.updateValueAndValidity();
74687
        this._onCollectionChange();
74688
    };
74689
    /**
74690
     * Remove a control from this group.
74691
     */
74692
    /**
74693
       * Remove a control from this group.
74694
       */
74695
    FormGroup.prototype.removeControl = /**
74696
       * Remove a control from this group.
74697
       */
74698
    function (name) {
74699
        if (this.controls[name])
74700
            this.controls[name]._registerOnCollectionChange(function () { });
74701
        delete (this.controls[name]);
74702
        this.updateValueAndValidity();
74703
        this._onCollectionChange();
74704
    };
74705
    /**
74706
     * Replace an existing control.
74707
     */
74708
    /**
74709
       * Replace an existing control.
74710
       */
74711
    FormGroup.prototype.setControl = /**
74712
       * Replace an existing control.
74713
       */
74714
    function (name, control) {
74715
        if (this.controls[name])
74716
            this.controls[name]._registerOnCollectionChange(function () { });
74717
        delete (this.controls[name]);
74718
        if (control)
74719
            this.registerControl(name, control);
74720
        this.updateValueAndValidity();
74721
        this._onCollectionChange();
74722
    };
74723
    /**
74724
     * Check whether there is an enabled control with the given name in the group.
74725
     *
74726
     * It will return false for disabled controls. If you'd like to check for existence in the group
74727
     * only, use {@link AbstractControl#get get} instead.
74728
     */
74729
    /**
74730
       * Check whether there is an enabled control with the given name in the group.
74731
       *
74732
       * It will return false for disabled controls. If you'd like to check for existence in the group
74733
       * only, use {@link AbstractControl#get get} instead.
74734
       */
74735
    FormGroup.prototype.contains = /**
74736
       * Check whether there is an enabled control with the given name in the group.
74737
       *
74738
       * It will return false for disabled controls. If you'd like to check for existence in the group
74739
       * only, use {@link AbstractControl#get get} instead.
74740
       */
74741
    function (controlName) {
74742
        return this.controls.hasOwnProperty(controlName) && this.controls[controlName].enabled;
74743
    };
74744
    /**
74745
     *  Sets the value of the `FormGroup`. It accepts an object that matches
74746
     *  the structure of the group, with control names as keys.
74747
     *
74748
     *  ### Example
74749
     *
74750
     *  ```
74751
     *  const form = new FormGroup({
74752
     *     first: new FormControl(),
74753
     *     last: new FormControl()
74754
     *  });
74755
     *  console.log(form.value);   // {first: null, last: null}
74756
     *
74757
     *  form.setValue({first: 'Nancy', last: 'Drew'});
74758
     *  console.log(form.value);   // {first: 'Nancy', last: 'Drew'}
74759
     *
74760
     *  ```
74761
     * @throws This method performs strict checks, so it will throw an error if you try
74762
     * to set the value of a control that doesn't exist or if you exclude the
74763
     * value of a control.
74764
     */
74765
    /**
74766
       *  Sets the value of the `FormGroup`. It accepts an object that matches
74767
       *  the structure of the group, with control names as keys.
74768
       *
74769
       *  ### Example
74770
       *
74771
       *  ```
74772
       *  const form = new FormGroup({
74773
       *     first: new FormControl(),
74774
       *     last: new FormControl()
74775
       *  });
74776
       *  console.log(form.value);   // {first: null, last: null}
74777
       *
74778
       *  form.setValue({first: 'Nancy', last: 'Drew'});
74779
       *  console.log(form.value);   // {first: 'Nancy', last: 'Drew'}
74780
       *
74781
       *  ```
74782
       * @throws This method performs strict checks, so it will throw an error if you try
74783
       * to set the value of a control that doesn't exist or if you exclude the
74784
       * value of a control.
74785
       */
74786
    FormGroup.prototype.setValue = /**
74787
       *  Sets the value of the `FormGroup`. It accepts an object that matches
74788
       *  the structure of the group, with control names as keys.
74789
       *
74790
       *  ### Example
74791
       *
74792
       *  ```
74793
       *  const form = new FormGroup({
74794
       *     first: new FormControl(),
74795
       *     last: new FormControl()
74796
       *  });
74797
       *  console.log(form.value);   // {first: null, last: null}
74798
       *
74799
       *  form.setValue({first: 'Nancy', last: 'Drew'});
74800
       *  console.log(form.value);   // {first: 'Nancy', last: 'Drew'}
74801
       *
74802
       *  ```
74803
       * @throws This method performs strict checks, so it will throw an error if you try
74804
       * to set the value of a control that doesn't exist or if you exclude the
74805
       * value of a control.
74806
       */
74807
    function (value, options) {
74808
        var _this = this;
74809
        if (options === void 0) { options = {}; }
74810
        this._checkAllValuesPresent(value);
74811
        Object.keys(value).forEach(function (name) {
74812
            _this._throwIfControlMissing(name);
74813
            _this.controls[name].setValue(value[name], { onlySelf: true, emitEvent: options.emitEvent });
74814
        });
74815
        this.updateValueAndValidity(options);
74816
    };
74817
    /**
74818
     *  Patches the value of the `FormGroup`. It accepts an object with control
74819
     *  names as keys, and will do its best to match the values to the correct controls
74820
     *  in the group.
74821
     *
74822
     *  It accepts both super-sets and sub-sets of the group without throwing an error.
74823
     *
74824
     *  ### Example
74825
     *
74826
     *  ```
74827
     *  const form = new FormGroup({
74828
     *     first: new FormControl(),
74829
     *     last: new FormControl()
74830
     *  });
74831
     *  console.log(form.value);   // {first: null, last: null}
74832
     *
74833
     *  form.patchValue({first: 'Nancy'});
74834
     *  console.log(form.value);   // {first: 'Nancy', last: null}
74835
     *
74836
     *  ```
74837
     */
74838
    /**
74839
       *  Patches the value of the `FormGroup`. It accepts an object with control
74840
       *  names as keys, and will do its best to match the values to the correct controls
74841
       *  in the group.
74842
       *
74843
       *  It accepts both super-sets and sub-sets of the group without throwing an error.
74844
       *
74845
       *  ### Example
74846
       *
74847
       *  ```
74848
       *  const form = new FormGroup({
74849
       *     first: new FormControl(),
74850
       *     last: new FormControl()
74851
       *  });
74852
       *  console.log(form.value);   // {first: null, last: null}
74853
       *
74854
       *  form.patchValue({first: 'Nancy'});
74855
       *  console.log(form.value);   // {first: 'Nancy', last: null}
74856
       *
74857
       *  ```
74858
       */
74859
    FormGroup.prototype.patchValue = /**
74860
       *  Patches the value of the `FormGroup`. It accepts an object with control
74861
       *  names as keys, and will do its best to match the values to the correct controls
74862
       *  in the group.
74863
       *
74864
       *  It accepts both super-sets and sub-sets of the group without throwing an error.
74865
       *
74866
       *  ### Example
74867
       *
74868
       *  ```
74869
       *  const form = new FormGroup({
74870
       *     first: new FormControl(),
74871
       *     last: new FormControl()
74872
       *  });
74873
       *  console.log(form.value);   // {first: null, last: null}
74874
       *
74875
       *  form.patchValue({first: 'Nancy'});
74876
       *  console.log(form.value);   // {first: 'Nancy', last: null}
74877
       *
74878
       *  ```
74879
       */
74880
    function (value, options) {
74881
        var _this = this;
74882
        if (options === void 0) { options = {}; }
74883
        Object.keys(value).forEach(function (name) {
74884
            if (_this.controls[name]) {
74885
                _this.controls[name].patchValue(value[name], { onlySelf: true, emitEvent: options.emitEvent });
74886
            }
74887
        });
74888
        this.updateValueAndValidity(options);
74889
    };
74890
    /**
74891
     * Resets the `FormGroup`. This means by default:
74892
     *
74893
     * * The group and all descendants are marked `pristine`
74894
     * * The group and all descendants are marked `untouched`
74895
     * * The value of all descendants will be null or null maps
74896
     *
74897
     * You can also reset to a specific form state by passing in a map of states
74898
     * that matches the structure of your form, with control names as keys. The state
74899
     * can be a standalone value or a form state object with both a value and a disabled
74900
     * status.
74901
     *
74902
     * ### Example
74903
     *
74904
     * ```ts
74905
     * this.form.reset({first: 'name', last: 'last name'});
74906
     *
74907
     * console.log(this.form.value);  // {first: 'name', last: 'last name'}
74908
     * ```
74909
     *
74910
     * - OR -
74911
     *
74912
     * ```
74913
     * this.form.reset({
74914
     *   first: {value: 'name', disabled: true},
74915
     *   last: 'last'
74916
     * });
74917
     *
74918
     * console.log(this.form.value);  // {first: 'name', last: 'last name'}
74919
     * console.log(this.form.get('first').status);  // 'DISABLED'
74920
     * ```
74921
     */
74922
    /**
74923
       * Resets the `FormGroup`. This means by default:
74924
       *
74925
       * * The group and all descendants are marked `pristine`
74926
       * * The group and all descendants are marked `untouched`
74927
       * * The value of all descendants will be null or null maps
74928
       *
74929
       * You can also reset to a specific form state by passing in a map of states
74930
       * that matches the structure of your form, with control names as keys. The state
74931
       * can be a standalone value or a form state object with both a value and a disabled
74932
       * status.
74933
       *
74934
       * ### Example
74935
       *
74936
       * ```ts
74937
       * this.form.reset({first: 'name', last: 'last name'});
74938
       *
74939
       * console.log(this.form.value);  // {first: 'name', last: 'last name'}
74940
       * ```
74941
       *
74942
       * - OR -
74943
       *
74944
       * ```
74945
       * this.form.reset({
74946
       *   first: {value: 'name', disabled: true},
74947
       *   last: 'last'
74948
       * });
74949
       *
74950
       * console.log(this.form.value);  // {first: 'name', last: 'last name'}
74951
       * console.log(this.form.get('first').status);  // 'DISABLED'
74952
       * ```
74953
       */
74954
    FormGroup.prototype.reset = /**
74955
       * Resets the `FormGroup`. This means by default:
74956
       *
74957
       * * The group and all descendants are marked `pristine`
74958
       * * The group and all descendants are marked `untouched`
74959
       * * The value of all descendants will be null or null maps
74960
       *
74961
       * You can also reset to a specific form state by passing in a map of states
74962
       * that matches the structure of your form, with control names as keys. The state
74963
       * can be a standalone value or a form state object with both a value and a disabled
74964
       * status.
74965
       *
74966
       * ### Example
74967
       *
74968
       * ```ts
74969
       * this.form.reset({first: 'name', last: 'last name'});
74970
       *
74971
       * console.log(this.form.value);  // {first: 'name', last: 'last name'}
74972
       * ```
74973
       *
74974
       * - OR -
74975
       *
74976
       * ```
74977
       * this.form.reset({
74978
       *   first: {value: 'name', disabled: true},
74979
       *   last: 'last'
74980
       * });
74981
       *
74982
       * console.log(this.form.value);  // {first: 'name', last: 'last name'}
74983
       * console.log(this.form.get('first').status);  // 'DISABLED'
74984
       * ```
74985
       */
74986
    function (value, options) {
74987
        if (value === void 0) { value = {}; }
74988
        if (options === void 0) { options = {}; }
74989
        this._forEachChild(function (control, name) {
74990
            control.reset(value[name], { onlySelf: true, emitEvent: options.emitEvent });
74991
        });
74992
        this.updateValueAndValidity(options);
74993
        this._updatePristine(options);
74994
        this._updateTouched(options);
74995
    };
74996
    /**
74997
     * The aggregate value of the `FormGroup`, including any disabled controls.
74998
     *
74999
     * If you'd like to include all values regardless of disabled status, use this method.
75000
     * Otherwise, the `value` property is the best way to get the value of the group.
75001
     */
75002
    /**
75003
       * The aggregate value of the `FormGroup`, including any disabled controls.
75004
       *
75005
       * If you'd like to include all values regardless of disabled status, use this method.
75006
       * Otherwise, the `value` property is the best way to get the value of the group.
75007
       */
75008
    FormGroup.prototype.getRawValue = /**
75009
       * The aggregate value of the `FormGroup`, including any disabled controls.
75010
       *
75011
       * If you'd like to include all values regardless of disabled status, use this method.
75012
       * Otherwise, the `value` property is the best way to get the value of the group.
75013
       */
75014
    function () {
75015
        return this._reduceChildren({}, function (acc, control, name) {
75016
            acc[name] = control instanceof FormControl ? control.value : control.getRawValue();
75017
            return acc;
75018
        });
75019
    };
75020
    /** @internal */
75021
    /** @internal */
75022
    FormGroup.prototype._syncPendingControls = /** @internal */
75023
    function () {
75024
        var subtreeUpdated = this._reduceChildren(false, function (updated, child) {
75025
            return child._syncPendingControls() ? true : updated;
75026
        });
75027
        if (subtreeUpdated)
75028
            this.updateValueAndValidity({ onlySelf: true });
75029
        return subtreeUpdated;
75030
    };
75031
    /** @internal */
75032
    /** @internal */
75033
    FormGroup.prototype._throwIfControlMissing = /** @internal */
75034
    function (name) {
75035
        if (!Object.keys(this.controls).length) {
75036
            throw new Error("\n        There are no form controls registered with this group yet.  If you're using ngModel,\n        you may want to check next tick (e.g. use setTimeout).\n      ");
75037
        }
75038
        if (!this.controls[name]) {
75039
            throw new Error("Cannot find form control with name: " + name + ".");
75040
        }
75041
    };
75042
    /** @internal */
75043
    /** @internal */
75044
    FormGroup.prototype._forEachChild = /** @internal */
75045
    function (cb) {
75046
        var _this = this;
75047
        Object.keys(this.controls).forEach(function (k) { return cb(_this.controls[k], k); });
75048
    };
75049
    /** @internal */
75050
    /** @internal */
75051
    FormGroup.prototype._setUpControls = /** @internal */
75052
    function () {
75053
        var _this = this;
75054
        this._forEachChild(function (control) {
75055
            control.setParent(_this);
75056
            control._registerOnCollectionChange(_this._onCollectionChange);
75057
        });
75058
    };
75059
    /** @internal */
75060
    /** @internal */
75061
    FormGroup.prototype._updateValue = /** @internal */
75062
    function () { this.value = this._reduceValue(); };
75063
    /** @internal */
75064
    /** @internal */
75065
    FormGroup.prototype._anyControls = /** @internal */
75066
    function (condition) {
75067
        var _this = this;
75068
        var res = false;
75069
        this._forEachChild(function (control, name) {
75070
            res = res || (_this.contains(name) && condition(control));
75071
        });
75072
        return res;
75073
    };
75074
    /** @internal */
75075
    /** @internal */
75076
    FormGroup.prototype._reduceValue = /** @internal */
75077
    function () {
75078
        var _this = this;
75079
        return this._reduceChildren({}, function (acc, control, name) {
75080
            if (control.enabled || _this.disabled) {
75081
                acc[name] = control.value;
75082
            }
75083
            return acc;
75084
        });
75085
    };
75086
    /** @internal */
75087
    /** @internal */
75088
    FormGroup.prototype._reduceChildren = /** @internal */
75089
    function (initValue, fn) {
75090
        var res = initValue;
75091
        this._forEachChild(function (control, name) { res = fn(res, control, name); });
75092
        return res;
75093
    };
75094
    /** @internal */
75095
    /** @internal */
75096
    FormGroup.prototype._allControlsDisabled = /** @internal */
75097
    function () {
75098
        try {
75099
            for (var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(Object.keys(this.controls)), _b = _a.next(); !_b.done; _b = _a.next()) {
75100
                var controlName = _b.value;
75101
                if (this.controls[controlName].enabled) {
75102
                    return false;
75103
                }
75104
            }
75105
        }
75106
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
75107
        finally {
75108
            try {
75109
                if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
75110
            }
75111
            finally { if (e_1) throw e_1.error; }
75112
        }
75113
        return Object.keys(this.controls).length > 0 || this.disabled;
75114
        var e_1, _c;
75115
    };
75116
    /** @internal */
75117
    /** @internal */
75118
    FormGroup.prototype._checkAllValuesPresent = /** @internal */
75119
    function (value) {
75120
        this._forEachChild(function (control, name) {
75121
            if (value[name] === undefined) {
75122
                throw new Error("Must supply a value for form control with name: '" + name + "'.");
75123
            }
75124
        });
75125
    };
75126
    return FormGroup;
75127
}(AbstractControl));
75128
/**
75129
 * @description
75130
 *
75131
 * Tracks the value and validity state of an array of `FormControl`,
75132
 * `FormGroup` or `FormArray` instances.
75133
 *
75134
 * A `FormArray` aggregates the values of each child `FormControl` into an array.
75135
 * It calculates its status by reducing the statuses of its children. For example, if one of
75136
 * the controls in a `FormArray` is invalid, the entire array becomes invalid.
75137
 *
75138
 * `FormArray` is one of the three fundamental building blocks used to define forms in Angular,
75139
 * along with `FormControl` and `FormGroup`.
75140
 *
75141
 * When instantiating a `FormArray`, pass in an array of child controls as the first
75142
 * argument.
75143
 *
75144
 * ### Example
75145
 *
75146
 * ```
75147
 * const arr = new FormArray([
75148
 *   new FormControl('Nancy', Validators.minLength(2)),
75149
 *   new FormControl('Drew'),
75150
 * ]);
75151
 *
75152
 * console.log(arr.value);   // ['Nancy', 'Drew']
75153
 * console.log(arr.status);  // 'VALID'
75154
 * ```
75155
 *
75156
 * You can also include array-level validators and async validators. These come in handy
75157
 * when you want to perform validation that considers the value of more than one child
75158
 * control.
75159
 *
75160
 * The two types of validators can be passed in separately as the second and third arg
75161
 * respectively, or together as part of an options object.
75162
 *
75163
 * ```
75164
 * const arr = new FormArray([
75165
 *   new FormControl('Nancy'),
75166
 *   new FormControl('Drew')
75167
 * ], {validators: myValidator, asyncValidators: myAsyncValidator});
75168
 * ```
75169
 *
75170
 * The options object can also be used to set a default value for each child
75171
 * control's `updateOn` property. If you set `updateOn` to `'blur'` at the
75172
 * array level, all child controls will default to 'blur', unless the child
75173
 * has explicitly specified a different `updateOn` value.
75174
 *
75175
 * ```ts
75176
 * const c = new FormArray([
75177
 *    new FormControl()
75178
 * ], {updateOn: 'blur'});
75179
 * ```
75180
 *
75181
 * ### Adding or removing controls
75182
 *
75183
 * To change the controls in the array, use the `push`, `insert`, or `removeAt` methods
75184
 * in `FormArray` itself. These methods ensure the controls are properly tracked in the
75185
 * form's hierarchy. Do not modify the array of `AbstractControl`s used to instantiate
75186
 * the `FormArray` directly, as that will result in strange and unexpected behavior such
75187
 * as broken change detection.
75188
 *
75189
 * * **npm package**: `@angular/forms`
75190
 *
75191
 *
75192
 */
75193
var FormArray = /** @class */ (function (_super) {
75194
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FormArray, _super);
75195
    function FormArray(controls, validatorOrOpts, asyncValidator) {
75196
        var _this = _super.call(this, coerceToValidator(validatorOrOpts), coerceToAsyncValidator(asyncValidator, validatorOrOpts)) || this;
75197
        _this.controls = controls;
75198
        _this._initObservables();
75199
        _this._setUpdateStrategy(validatorOrOpts);
75200
        _this._setUpControls();
75201
        _this.updateValueAndValidity({ onlySelf: true, emitEvent: false });
75202
        return _this;
75203
    }
75204
    /**
75205
     * Get the `AbstractControl` at the given `index` in the array.
75206
     */
75207
    /**
75208
       * Get the `AbstractControl` at the given `index` in the array.
75209
       */
75210
    FormArray.prototype.at = /**
75211
       * Get the `AbstractControl` at the given `index` in the array.
75212
       */
75213
    function (index) { return this.controls[index]; };
75214
    /**
75215
     * Insert a new `AbstractControl` at the end of the array.
75216
     */
75217
    /**
75218
       * Insert a new `AbstractControl` at the end of the array.
75219
       */
75220
    FormArray.prototype.push = /**
75221
       * Insert a new `AbstractControl` at the end of the array.
75222
       */
75223
    function (control) {
75224
        this.controls.push(control);
75225
        this._registerControl(control);
75226
        this.updateValueAndValidity();
75227
        this._onCollectionChange();
75228
    };
75229
    /** Insert a new `AbstractControl` at the given `index` in the array. */
75230
    /** Insert a new `AbstractControl` at the given `index` in the array. */
75231
    FormArray.prototype.insert = /** Insert a new `AbstractControl` at the given `index` in the array. */
75232
    function (index, control) {
75233
        this.controls.splice(index, 0, control);
75234
        this._registerControl(control);
75235
        this.updateValueAndValidity();
75236
    };
75237
    /** Remove the control at the given `index` in the array. */
75238
    /** Remove the control at the given `index` in the array. */
75239
    FormArray.prototype.removeAt = /** Remove the control at the given `index` in the array. */
75240
    function (index) {
75241
        if (this.controls[index])
75242
            this.controls[index]._registerOnCollectionChange(function () { });
75243
        this.controls.splice(index, 1);
75244
        this.updateValueAndValidity();
75245
    };
75246
    /**
75247
     * Replace an existing control.
75248
     */
75249
    /**
75250
       * Replace an existing control.
75251
       */
75252
    FormArray.prototype.setControl = /**
75253
       * Replace an existing control.
75254
       */
75255
    function (index, control) {
75256
        if (this.controls[index])
75257
            this.controls[index]._registerOnCollectionChange(function () { });
75258
        this.controls.splice(index, 1);
75259
        if (control) {
75260
            this.controls.splice(index, 0, control);
75261
            this._registerControl(control);
75262
        }
75263
        this.updateValueAndValidity();
75264
        this._onCollectionChange();
75265
    };
75266
    Object.defineProperty(FormArray.prototype, "length", {
75267
        /**
75268
         * Length of the control array.
75269
         */
75270
        get: /**
75271
           * Length of the control array.
75272
           */
75273
        function () { return this.controls.length; },
75274
        enumerable: true,
75275
        configurable: true
75276
    });
75277
    /**
75278
     *  Sets the value of the `FormArray`. It accepts an array that matches
75279
     *  the structure of the control.
75280
     *
75281
     * This method performs strict checks, so it will throw an error if you try
75282
     * to set the value of a control that doesn't exist or if you exclude the
75283
     * value of a control.
75284
     *
75285
     *  ### Example
75286
     *
75287
     *  ```
75288
     *  const arr = new FormArray([
75289
     *     new FormControl(),
75290
     *     new FormControl()
75291
     *  ]);
75292
     *  console.log(arr.value);   // [null, null]
75293
     *
75294
     *  arr.setValue(['Nancy', 'Drew']);
75295
     *  console.log(arr.value);   // ['Nancy', 'Drew']
75296
     *  ```
75297
     */
75298
    /**
75299
       *  Sets the value of the `FormArray`. It accepts an array that matches
75300
       *  the structure of the control.
75301
       *
75302
       * This method performs strict checks, so it will throw an error if you try
75303
       * to set the value of a control that doesn't exist or if you exclude the
75304
       * value of a control.
75305
       *
75306
       *  ### Example
75307
       *
75308
       *  ```
75309
       *  const arr = new FormArray([
75310
       *     new FormControl(),
75311
       *     new FormControl()
75312
       *  ]);
75313
       *  console.log(arr.value);   // [null, null]
75314
       *
75315
       *  arr.setValue(['Nancy', 'Drew']);
75316
       *  console.log(arr.value);   // ['Nancy', 'Drew']
75317
       *  ```
75318
       */
75319
    FormArray.prototype.setValue = /**
75320
       *  Sets the value of the `FormArray`. It accepts an array that matches
75321
       *  the structure of the control.
75322
       *
75323
       * This method performs strict checks, so it will throw an error if you try
75324
       * to set the value of a control that doesn't exist or if you exclude the
75325
       * value of a control.
75326
       *
75327
       *  ### Example
75328
       *
75329
       *  ```
75330
       *  const arr = new FormArray([
75331
       *     new FormControl(),
75332
       *     new FormControl()
75333
       *  ]);
75334
       *  console.log(arr.value);   // [null, null]
75335
       *
75336
       *  arr.setValue(['Nancy', 'Drew']);
75337
       *  console.log(arr.value);   // ['Nancy', 'Drew']
75338
       *  ```
75339
       */
75340
    function (value, options) {
75341
        var _this = this;
75342
        if (options === void 0) { options = {}; }
75343
        this._checkAllValuesPresent(value);
75344
        value.forEach(function (newValue, index) {
75345
            _this._throwIfControlMissing(index);
75346
            _this.at(index).setValue(newValue, { onlySelf: true, emitEvent: options.emitEvent });
75347
        });
75348
        this.updateValueAndValidity(options);
75349
    };
75350
    /**
75351
     *  Patches the value of the `FormArray`. It accepts an array that matches the
75352
     *  structure of the control, and will do its best to match the values to the correct
75353
     *  controls in the group.
75354
     *
75355
     *  It accepts both super-sets and sub-sets of the array without throwing an error.
75356
     *
75357
     *  ### Example
75358
     *
75359
     *  ```
75360
     *  const arr = new FormArray([
75361
     *     new FormControl(),
75362
     *     new FormControl()
75363
     *  ]);
75364
     *  console.log(arr.value);   // [null, null]
75365
     *
75366
     *  arr.patchValue(['Nancy']);
75367
     *  console.log(arr.value);   // ['Nancy', null]
75368
     *  ```
75369
     */
75370
    /**
75371
       *  Patches the value of the `FormArray`. It accepts an array that matches the
75372
       *  structure of the control, and will do its best to match the values to the correct
75373
       *  controls in the group.
75374
       *
75375
       *  It accepts both super-sets and sub-sets of the array without throwing an error.
75376
       *
75377
       *  ### Example
75378
       *
75379
       *  ```
75380
       *  const arr = new FormArray([
75381
       *     new FormControl(),
75382
       *     new FormControl()
75383
       *  ]);
75384
       *  console.log(arr.value);   // [null, null]
75385
       *
75386
       *  arr.patchValue(['Nancy']);
75387
       *  console.log(arr.value);   // ['Nancy', null]
75388
       *  ```
75389
       */
75390
    FormArray.prototype.patchValue = /**
75391
       *  Patches the value of the `FormArray`. It accepts an array that matches the
75392
       *  structure of the control, and will do its best to match the values to the correct
75393
       *  controls in the group.
75394
       *
75395
       *  It accepts both super-sets and sub-sets of the array without throwing an error.
75396
       *
75397
       *  ### Example
75398
       *
75399
       *  ```
75400
       *  const arr = new FormArray([
75401
       *     new FormControl(),
75402
       *     new FormControl()
75403
       *  ]);
75404
       *  console.log(arr.value);   // [null, null]
75405
       *
75406
       *  arr.patchValue(['Nancy']);
75407
       *  console.log(arr.value);   // ['Nancy', null]
75408
       *  ```
75409
       */
75410
    function (value, options) {
75411
        var _this = this;
75412
        if (options === void 0) { options = {}; }
75413
        value.forEach(function (newValue, index) {
75414
            if (_this.at(index)) {
75415
                _this.at(index).patchValue(newValue, { onlySelf: true, emitEvent: options.emitEvent });
75416
            }
75417
        });
75418
        this.updateValueAndValidity(options);
75419
    };
75420
    /**
75421
     * Resets the `FormArray`. This means by default:
75422
     *
75423
     * * The array and all descendants are marked `pristine`
75424
     * * The array and all descendants are marked `untouched`
75425
     * * The value of all descendants will be null or null maps
75426
     *
75427
     * You can also reset to a specific form state by passing in an array of states
75428
     * that matches the structure of the control. The state can be a standalone value
75429
     * or a form state object with both a value and a disabled status.
75430
     *
75431
     * ### Example
75432
     *
75433
     * ```ts
75434
     * this.arr.reset(['name', 'last name']);
75435
     *
75436
     * console.log(this.arr.value);  // ['name', 'last name']
75437
     * ```
75438
     *
75439
     * - OR -
75440
     *
75441
     * ```
75442
     * this.arr.reset([
75443
     *   {value: 'name', disabled: true},
75444
     *   'last'
75445
     * ]);
75446
     *
75447
     * console.log(this.arr.value);  // ['name', 'last name']
75448
     * console.log(this.arr.get(0).status);  // 'DISABLED'
75449
     * ```
75450
     */
75451
    /**
75452
       * Resets the `FormArray`. This means by default:
75453
       *
75454
       * * The array and all descendants are marked `pristine`
75455
       * * The array and all descendants are marked `untouched`
75456
       * * The value of all descendants will be null or null maps
75457
       *
75458
       * You can also reset to a specific form state by passing in an array of states
75459
       * that matches the structure of the control. The state can be a standalone value
75460
       * or a form state object with both a value and a disabled status.
75461
       *
75462
       * ### Example
75463
       *
75464
       * ```ts
75465
       * this.arr.reset(['name', 'last name']);
75466
       *
75467
       * console.log(this.arr.value);  // ['name', 'last name']
75468
       * ```
75469
       *
75470
       * - OR -
75471
       *
75472
       * ```
75473
       * this.arr.reset([
75474
       *   {value: 'name', disabled: true},
75475
       *   'last'
75476
       * ]);
75477
       *
75478
       * console.log(this.arr.value);  // ['name', 'last name']
75479
       * console.log(this.arr.get(0).status);  // 'DISABLED'
75480
       * ```
75481
       */
75482
    FormArray.prototype.reset = /**
75483
       * Resets the `FormArray`. This means by default:
75484
       *
75485
       * * The array and all descendants are marked `pristine`
75486
       * * The array and all descendants are marked `untouched`
75487
       * * The value of all descendants will be null or null maps
75488
       *
75489
       * You can also reset to a specific form state by passing in an array of states
75490
       * that matches the structure of the control. The state can be a standalone value
75491
       * or a form state object with both a value and a disabled status.
75492
       *
75493
       * ### Example
75494
       *
75495
       * ```ts
75496
       * this.arr.reset(['name', 'last name']);
75497
       *
75498
       * console.log(this.arr.value);  // ['name', 'last name']
75499
       * ```
75500
       *
75501
       * - OR -
75502
       *
75503
       * ```
75504
       * this.arr.reset([
75505
       *   {value: 'name', disabled: true},
75506
       *   'last'
75507
       * ]);
75508
       *
75509
       * console.log(this.arr.value);  // ['name', 'last name']
75510
       * console.log(this.arr.get(0).status);  // 'DISABLED'
75511
       * ```
75512
       */
75513
    function (value, options) {
75514
        if (value === void 0) { value = []; }
75515
        if (options === void 0) { options = {}; }
75516
        this._forEachChild(function (control, index) {
75517
            control.reset(value[index], { onlySelf: true, emitEvent: options.emitEvent });
75518
        });
75519
        this.updateValueAndValidity(options);
75520
        this._updatePristine(options);
75521
        this._updateTouched(options);
75522
    };
75523
    /**
75524
     * The aggregate value of the array, including any disabled controls.
75525
     *
75526
     * If you'd like to include all values regardless of disabled status, use this method.
75527
     * Otherwise, the `value` property is the best way to get the value of the array.
75528
     */
75529
    /**
75530
       * The aggregate value of the array, including any disabled controls.
75531
       *
75532
       * If you'd like to include all values regardless of disabled status, use this method.
75533
       * Otherwise, the `value` property is the best way to get the value of the array.
75534
       */
75535
    FormArray.prototype.getRawValue = /**
75536
       * The aggregate value of the array, including any disabled controls.
75537
       *
75538
       * If you'd like to include all values regardless of disabled status, use this method.
75539
       * Otherwise, the `value` property is the best way to get the value of the array.
75540
       */
75541
    function () {
75542
        return this.controls.map(function (control) {
75543
            return control instanceof FormControl ? control.value : control.getRawValue();
75544
        });
75545
    };
75546
    /** @internal */
75547
    /** @internal */
75548
    FormArray.prototype._syncPendingControls = /** @internal */
75549
    function () {
75550
        var subtreeUpdated = this.controls.reduce(function (updated, child) {
75551
            return child._syncPendingControls() ? true : updated;
75552
        }, false);
75553
        if (subtreeUpdated)
75554
            this.updateValueAndValidity({ onlySelf: true });
75555
        return subtreeUpdated;
75556
    };
75557
    /** @internal */
75558
    /** @internal */
75559
    FormArray.prototype._throwIfControlMissing = /** @internal */
75560
    function (index) {
75561
        if (!this.controls.length) {
75562
            throw new Error("\n        There are no form controls registered with this array yet.  If you're using ngModel,\n        you may want to check next tick (e.g. use setTimeout).\n      ");
75563
        }
75564
        if (!this.at(index)) {
75565
            throw new Error("Cannot find form control at index " + index);
75566
        }
75567
    };
75568
    /** @internal */
75569
    /** @internal */
75570
    FormArray.prototype._forEachChild = /** @internal */
75571
    function (cb) {
75572
        this.controls.forEach(function (control, index) { cb(control, index); });
75573
    };
75574
    /** @internal */
75575
    /** @internal */
75576
    FormArray.prototype._updateValue = /** @internal */
75577
    function () {
75578
        var _this = this;
75579
        this.value =
75580
            this.controls.filter(function (control) { return control.enabled || _this.disabled; })
75581
                .map(function (control) { return control.value; });
75582
    };
75583
    /** @internal */
75584
    /** @internal */
75585
    FormArray.prototype._anyControls = /** @internal */
75586
    function (condition) {
75587
        return this.controls.some(function (control) { return control.enabled && condition(control); });
75588
    };
75589
    /** @internal */
75590
    /** @internal */
75591
    FormArray.prototype._setUpControls = /** @internal */
75592
    function () {
75593
        var _this = this;
75594
        this._forEachChild(function (control) { return _this._registerControl(control); });
75595
    };
75596
    /** @internal */
75597
    /** @internal */
75598
    FormArray.prototype._checkAllValuesPresent = /** @internal */
75599
    function (value) {
75600
        this._forEachChild(function (control, i) {
75601
            if (value[i] === undefined) {
75602
                throw new Error("Must supply a value for form control at index: " + i + ".");
75603
            }
75604
        });
75605
    };
75606
    /** @internal */
75607
    /** @internal */
75608
    FormArray.prototype._allControlsDisabled = /** @internal */
75609
    function () {
75610
        try {
75611
            for (var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(this.controls), _b = _a.next(); !_b.done; _b = _a.next()) {
75612
                var control = _b.value;
75613
                if (control.enabled)
75614
                    return false;
75615
            }
75616
        }
75617
        catch (e_2_1) { e_2 = { error: e_2_1 }; }
75618
        finally {
75619
            try {
75620
                if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
75621
            }
75622
            finally { if (e_2) throw e_2.error; }
75623
        }
75624
        return this.controls.length > 0 || this.disabled;
75625
        var e_2, _c;
75626
    };
75627
    FormArray.prototype._registerControl = function (control) {
75628
        control.setParent(this);
75629
        control._registerOnCollectionChange(this._onCollectionChange);
75630
    };
75631
    return FormArray;
75632
}(AbstractControl));
75633
 
75634
/**
75635
 * @license
75636
 * Copyright Google Inc. All Rights Reserved.
75637
 *
75638
 * Use of this source code is governed by an MIT-style license that can be
75639
 * found in the LICENSE file at https://angular.io/license
75640
 */
75641
var formDirectiveProvider = {
75642
    provide: ControlContainer,
75643
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(function () { return NgForm; })
75644
};
75645
var resolvedPromise = Promise.resolve(null);
75646
/**
75647
 * @description
75648
 *
75649
 * Creates a top-level `FormGroup` instance and binds it to a form
75650
 * to track aggregate form value and validation status.
75651
 *
75652
 * As soon as you import the `FormsModule`, this directive becomes active by default on
75653
 * all `<form>` tags.  You don't need to add a special selector.
75654
 *
75655
 * You can export the directive into a local template variable using `ngForm` as the key
75656
 * (ex: `#myForm="ngForm"`). This is optional, but useful.  Many properties from the underlying
75657
 * `FormGroup` instance are duplicated on the directive itself, so a reference to it
75658
 * will give you access to the aggregate value and validity status of the form, as well as
75659
 * user interaction properties like `dirty` and `touched`.
75660
 *
75661
 * To register child controls with the form, you'll want to use `NgModel` with a
75662
 * `name` attribute.  You can also use `NgModelGroup` if you'd like to create
75663
 * sub-groups within the form.
75664
 *
75665
 * You can listen to the directive's `ngSubmit` event to be notified when the user has
75666
 * triggered a form submission. The `ngSubmit` event will be emitted with the original form
75667
 * submission event.
75668
 *
75669
 * In template driven forms, all `<form>` tags are automatically tagged as `NgForm`.
75670
 * If you want to import the `FormsModule` but skip its usage in some forms,
75671
 * for example, to use native HTML5 validation, you can add `ngNoForm` and the `<form>`
75672
 * tags won't create an `NgForm` directive. In reactive forms, using `ngNoForm` is
75673
 * unnecessary because the `<form>` tags are inert. In that case, you would
75674
 * refrain from using the `formGroup` directive.
75675
 *
75676
 * {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}
75677
 *
75678
 * * **npm package**: `@angular/forms`
75679
 *
75680
 * * **NgModule**: `FormsModule`
75681
 *
75682
 *
75683
 */
75684
var NgForm = /** @class */ (function (_super) {
75685
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(NgForm, _super);
75686
    function NgForm(validators, asyncValidators) {
75687
        var _this = _super.call(this) || this;
75688
        _this.submitted = false;
75689
        _this._directives = [];
75690
        _this.ngSubmit = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
75691
        _this.form =
75692
            new FormGroup({}, composeValidators(validators), composeAsyncValidators(asyncValidators));
75693
        return _this;
75694
    }
75695
    NgForm.prototype.ngAfterViewInit = function () { this._setUpdateStrategy(); };
75696
    Object.defineProperty(NgForm.prototype, "formDirective", {
75697
        get: function () { return this; },
75698
        enumerable: true,
75699
        configurable: true
75700
    });
75701
    Object.defineProperty(NgForm.prototype, "control", {
75702
        get: function () { return this.form; },
75703
        enumerable: true,
75704
        configurable: true
75705
    });
75706
    Object.defineProperty(NgForm.prototype, "path", {
75707
        get: function () { return []; },
75708
        enumerable: true,
75709
        configurable: true
75710
    });
75711
    Object.defineProperty(NgForm.prototype, "controls", {
75712
        get: function () { return this.form.controls; },
75713
        enumerable: true,
75714
        configurable: true
75715
    });
75716
    NgForm.prototype.addControl = function (dir) {
75717
        var _this = this;
75718
        resolvedPromise.then(function () {
75719
            var container = _this._findContainer(dir.path);
75720
            dir.control = container.registerControl(dir.name, dir.control);
75721
            setUpControl(dir.control, dir);
75722
            dir.control.updateValueAndValidity({ emitEvent: false });
75723
            _this._directives.push(dir);
75724
        });
75725
    };
75726
    NgForm.prototype.getControl = function (dir) { return this.form.get(dir.path); };
75727
    NgForm.prototype.removeControl = function (dir) {
75728
        var _this = this;
75729
        resolvedPromise.then(function () {
75730
            var container = _this._findContainer(dir.path);
75731
            if (container) {
75732
                container.removeControl(dir.name);
75733
            }
75734
            removeDir(_this._directives, dir);
75735
        });
75736
    };
75737
    NgForm.prototype.addFormGroup = function (dir) {
75738
        var _this = this;
75739
        resolvedPromise.then(function () {
75740
            var container = _this._findContainer(dir.path);
75741
            var group = new FormGroup({});
75742
            setUpFormContainer(group, dir);
75743
            container.registerControl(dir.name, group);
75744
            group.updateValueAndValidity({ emitEvent: false });
75745
        });
75746
    };
75747
    NgForm.prototype.removeFormGroup = function (dir) {
75748
        var _this = this;
75749
        resolvedPromise.then(function () {
75750
            var container = _this._findContainer(dir.path);
75751
            if (container) {
75752
                container.removeControl(dir.name);
75753
            }
75754
        });
75755
    };
75756
    NgForm.prototype.getFormGroup = function (dir) { return this.form.get(dir.path); };
75757
    NgForm.prototype.updateModel = function (dir, value) {
75758
        var _this = this;
75759
        resolvedPromise.then(function () {
75760
            var ctrl = _this.form.get((dir.path));
75761
            ctrl.setValue(value);
75762
        });
75763
    };
75764
    NgForm.prototype.setValue = function (value) { this.control.setValue(value); };
75765
    NgForm.prototype.onSubmit = function ($event) {
75766
        this.submitted = true;
75767
        syncPendingControls(this.form, this._directives);
75768
        this.ngSubmit.emit($event);
75769
        return false;
75770
    };
75771
    NgForm.prototype.onReset = function () { this.resetForm(); };
75772
    NgForm.prototype.resetForm = function (value) {
75773
        if (value === void 0) { value = undefined; }
75774
        this.form.reset(value);
75775
        this.submitted = false;
75776
    };
75777
    NgForm.prototype._setUpdateStrategy = function () {
75778
        if (this.options && this.options.updateOn != null) {
75779
            this.form._updateOn = this.options.updateOn;
75780
        }
75781
    };
75782
    /** @internal */
75783
    /** @internal */
75784
    NgForm.prototype._findContainer = /** @internal */
75785
    function (path) {
75786
        path.pop();
75787
        return path.length ? this.form.get(path) : this.form;
75788
    };
75789
    NgForm.decorators = [
75790
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
75791
                    selector: 'form:not([ngNoForm]):not([formGroup]),ngForm,[ngForm]',
75792
                    providers: [formDirectiveProvider],
75793
                    host: { '(submit)': 'onSubmit($event)', '(reset)': 'onReset()' },
75794
                    outputs: ['ngSubmit'],
75795
                    exportAs: 'ngForm'
75796
                },] }
75797
    ];
75798
    /** @nocollapse */
75799
    NgForm.ctorParameters = function () { return [
75800
        { type: Array, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Self"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [NG_VALIDATORS,] },] },
75801
        { type: Array, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Self"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [NG_ASYNC_VALIDATORS,] },] },
75802
    ]; };
75803
    NgForm.propDecorators = {
75804
        "options": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['ngFormOptions',] },],
75805
    };
75806
    return NgForm;
75807
}(ControlContainer));
75808
 
75809
/**
75810
 * @license
75811
 * Copyright Google Inc. All Rights Reserved.
75812
 *
75813
 * Use of this source code is governed by an MIT-style license that can be
75814
 * found in the LICENSE file at https://angular.io/license
75815
 */
75816
var TemplateDrivenErrors = /** @class */ (function () {
75817
    function TemplateDrivenErrors() {
75818
    }
75819
    TemplateDrivenErrors.modelParentException = function () {
75820
        throw new Error("\n      ngModel cannot be used to register form controls with a parent formGroup directive.  Try using\n      formGroup's partner directive \"formControlName\" instead.  Example:\n\n      " + FormErrorExamples.formControlName + "\n\n      Or, if you'd like to avoid registering this form control, indicate that it's standalone in ngModelOptions:\n\n      Example:\n\n      " + FormErrorExamples.ngModelWithFormGroup);
75821
    };
75822
    TemplateDrivenErrors.formGroupNameException = function () {
75823
        throw new Error("\n      ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n      Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n      " + FormErrorExamples.formGroupName + "\n\n      Option 2:  Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n      " + FormErrorExamples.ngModelGroup);
75824
    };
75825
    TemplateDrivenErrors.missingNameException = function () {
75826
        throw new Error("If ngModel is used within a form tag, either the name attribute must be set or the form\n      control must be defined as 'standalone' in ngModelOptions.\n\n      Example 1: <input [(ngModel)]=\"person.firstName\" name=\"first\">\n      Example 2: <input [(ngModel)]=\"person.firstName\" [ngModelOptions]=\"{standalone: true}\">");
75827
    };
75828
    TemplateDrivenErrors.modelGroupParentException = function () {
75829
        throw new Error("\n      ngModelGroup cannot be used with a parent formGroup directive.\n\n      Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n      " + FormErrorExamples.formGroupName + "\n\n      Option 2:  Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n      " + FormErrorExamples.ngModelGroup);
75830
    };
75831
    return TemplateDrivenErrors;
75832
}());
75833
 
75834
/**
75835
 * @license
75836
 * Copyright Google Inc. All Rights Reserved.
75837
 *
75838
 * Use of this source code is governed by an MIT-style license that can be
75839
 * found in the LICENSE file at https://angular.io/license
75840
 */
75841
var modelGroupProvider = {
75842
    provide: ControlContainer,
75843
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(function () { return NgModelGroup; })
75844
};
75845
/**
75846
 * @description
75847
 *
75848
 * Creates and binds a `FormGroup` instance to a DOM element.
75849
 *
75850
 * This directive can only be used as a child of `NgForm` (or in other words,
75851
 * within `<form>` tags).
75852
 *
75853
 * Use this directive if you'd like to create a sub-group within a form. This can
75854
 * come in handy if you want to validate a sub-group of your form separately from
75855
 * the rest of your form, or if some values in your domain model make more sense to
75856
 * consume together in a nested object.
75857
 *
75858
 * Pass in the name you'd like this sub-group to have and it will become the key
75859
 * for the sub-group in the form's full value. You can also export the directive into
75860
 * a local template variable using `ngModelGroup` (ex: `#myGroup="ngModelGroup"`).
75861
 *
75862
 * {@example forms/ts/ngModelGroup/ng_model_group_example.ts region='Component'}
75863
 *
75864
 * * **npm package**: `@angular/forms`
75865
 *
75866
 * * **NgModule**: `FormsModule`
75867
 *
75868
 *
75869
 */
75870
var NgModelGroup = /** @class */ (function (_super) {
75871
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(NgModelGroup, _super);
75872
    function NgModelGroup(parent, validators, asyncValidators) {
75873
        var _this = _super.call(this) || this;
75874
        _this._parent = parent;
75875
        _this._validators = validators;
75876
        _this._asyncValidators = asyncValidators;
75877
        return _this;
75878
    }
75879
    /** @internal */
75880
    /** @internal */
75881
    NgModelGroup.prototype._checkParentType = /** @internal */
75882
    function () {
75883
        if (!(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm)) {
75884
            TemplateDrivenErrors.modelGroupParentException();
75885
        }
75886
    };
75887
    NgModelGroup.decorators = [
75888
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{ selector: '[ngModelGroup]', providers: [modelGroupProvider], exportAs: 'ngModelGroup' },] }
75889
    ];
75890
    /** @nocollapse */
75891
    NgModelGroup.ctorParameters = function () { return [
75892
        { type: ControlContainer, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Host"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"] },] },
75893
        { type: Array, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Self"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [NG_VALIDATORS,] },] },
75894
        { type: Array, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Self"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [NG_ASYNC_VALIDATORS,] },] },
75895
    ]; };
75896
    NgModelGroup.propDecorators = {
75897
        "name": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['ngModelGroup',] },],
75898
    };
75899
    return NgModelGroup;
75900
}(AbstractFormGroupDirective));
75901
 
75902
/**
75903
 * @license
75904
 * Copyright Google Inc. All Rights Reserved.
75905
 *
75906
 * Use of this source code is governed by an MIT-style license that can be
75907
 * found in the LICENSE file at https://angular.io/license
75908
 */
75909
var formControlBinding = {
75910
    provide: NgControl,
75911
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(function () { return NgModel; })
75912
};
75913
/**
75914
 * `ngModel` forces an additional change detection run when its inputs change:
75915
 * E.g.:
75916
 * ```
75917
 * <div>{{myModel.valid}}</div>
75918
 * <input [(ngModel)]="myValue" #myModel="ngModel">
75919
 * ```
75920
 * I.e. `ngModel` can export itself on the element and then be used in the template.
75921
 * Normally, this would result in expressions before the `input` that use the exported directive
75922
 * to have and old value as they have been
75923
 * dirty checked before. As this is a very common case for `ngModel`, we added this second change
75924
 * detection run.
75925
 *
75926
 * Notes:
75927
 * - this is just one extra run no matter how many `ngModel` have been changed.
75928
 * - this is a general problem when using `exportAs` for directives!
75929
 */
75930
var resolvedPromise$1 = Promise.resolve(null);
75931
/**
75932
 * @description
75933
 *
75934
 * Creates a `FormControl` instance from a domain model and binds it
75935
 * to a form control element.
75936
 *
75937
 * The `FormControl` instance will track the value, user interaction, and
75938
 * validation status of the control and keep the view synced with the model. If used
75939
 * within a parent form, the directive will also register itself with the form as a child
75940
 * control.
75941
 *
75942
 * This directive can be used by itself or as part of a larger form. All you need is the
75943
 * `ngModel` selector to activate it.
75944
 *
75945
 * It accepts a domain model as an optional `Input`. If you have a one-way binding
75946
 * to `ngModel` with `[]` syntax, changing the value of the domain model in the component
75947
 * class will set the value in the view. If you have a two-way binding with `[()]` syntax
75948
 * (also known as 'banana-box syntax'), the value in the UI will always be synced back to
75949
 * the domain model in your class as well.
75950
 *
75951
 * If you wish to inspect the properties of the associated `FormControl` (like
75952
 * validity state), you can also export the directive into a local template variable using
75953
 * `ngModel` as the key (ex: `#myVar="ngModel"`). You can then access the control using the
75954
 * directive's `control` property, but most properties you'll need (like `valid` and `dirty`)
75955
 * will fall through to the control anyway, so you can access them directly. You can see a
75956
 * full list of properties directly available in `AbstractControlDirective`.
75957
 *
75958
 * The following is an example of a simple standalone control using `ngModel`:
75959
 *
75960
 * {@example forms/ts/simpleNgModel/simple_ng_model_example.ts region='Component'}
75961
 *
75962
 * When using the `ngModel` within `<form>` tags, you'll also need to supply a `name` attribute
75963
 * so that the control can be registered with the parent form under that name.
75964
 *
75965
 * It's worth noting that in the context of a parent form, you often can skip one-way or
75966
 * two-way binding because the parent form will sync the value for you. You can access
75967
 * its properties by exporting it into a local template variable using `ngForm` (ex:
75968
 * `#f="ngForm"`). Then you can pass it where it needs to go on submit.
75969
 *
75970
 * If you do need to populate initial values into your form, using a one-way binding for
75971
 * `ngModel` tends to be sufficient as long as you use the exported form's value rather
75972
 * than the domain model's value on submit.
75973
 *
75974
 * Take a look at an example of using `ngModel` within a form:
75975
 *
75976
 * {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}
75977
 *
75978
 * To see `ngModel` examples with different form control types, see:
75979
 *
75980
 * * Radio buttons: `RadioControlValueAccessor`
75981
 * * Selects: `SelectControlValueAccessor`
75982
 *
75983
 * **npm package**: `@angular/forms`
75984
 *
75985
 * **NgModule**: `FormsModule`
75986
 *
75987
 *
75988
 */
75989
var NgModel = /** @class */ (function (_super) {
75990
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(NgModel, _super);
75991
    function NgModel(parent, validators, asyncValidators, valueAccessors) {
75992
        var _this = _super.call(this) || this;
75993
        _this.control = new FormControl();
75994
        /** @internal */
75995
        _this._registered = false;
75996
        _this.update = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
75997
        _this._parent = parent;
75998
        _this._rawValidators = validators || [];
75999
        _this._rawAsyncValidators = asyncValidators || [];
76000
        _this.valueAccessor = selectValueAccessor(_this, valueAccessors);
76001
        return _this;
76002
    }
76003
    NgModel.prototype.ngOnChanges = function (changes) {
76004
        this._checkForErrors();
76005
        if (!this._registered)
76006
            this._setUpControl();
76007
        if ('isDisabled' in changes) {
76008
            this._updateDisabled(changes);
76009
        }
76010
        if (isPropertyUpdated(changes, this.viewModel)) {
76011
            this._updateValue(this.model);
76012
            this.viewModel = this.model;
76013
        }
76014
    };
76015
    NgModel.prototype.ngOnDestroy = function () { this.formDirective && this.formDirective.removeControl(this); };
76016
    Object.defineProperty(NgModel.prototype, "path", {
76017
        get: function () {
76018
            return this._parent ? controlPath(this.name, this._parent) : [this.name];
76019
        },
76020
        enumerable: true,
76021
        configurable: true
76022
    });
76023
    Object.defineProperty(NgModel.prototype, "formDirective", {
76024
        get: function () { return this._parent ? this._parent.formDirective : null; },
76025
        enumerable: true,
76026
        configurable: true
76027
    });
76028
    Object.defineProperty(NgModel.prototype, "validator", {
76029
        get: function () { return composeValidators(this._rawValidators); },
76030
        enumerable: true,
76031
        configurable: true
76032
    });
76033
    Object.defineProperty(NgModel.prototype, "asyncValidator", {
76034
        get: function () {
76035
            return composeAsyncValidators(this._rawAsyncValidators);
76036
        },
76037
        enumerable: true,
76038
        configurable: true
76039
    });
76040
    NgModel.prototype.viewToModelUpdate = function (newValue) {
76041
        this.viewModel = newValue;
76042
        this.update.emit(newValue);
76043
    };
76044
    NgModel.prototype._setUpControl = function () {
76045
        this._setUpdateStrategy();
76046
        this._isStandalone() ? this._setUpStandalone() :
76047
            this.formDirective.addControl(this);
76048
        this._registered = true;
76049
    };
76050
    NgModel.prototype._setUpdateStrategy = function () {
76051
        if (this.options && this.options.updateOn != null) {
76052
            this.control._updateOn = this.options.updateOn;
76053
        }
76054
    };
76055
    NgModel.prototype._isStandalone = function () {
76056
        return !this._parent || !!(this.options && this.options.standalone);
76057
    };
76058
    NgModel.prototype._setUpStandalone = function () {
76059
        setUpControl(this.control, this);
76060
        this.control.updateValueAndValidity({ emitEvent: false });
76061
    };
76062
    NgModel.prototype._checkForErrors = function () {
76063
        if (!this._isStandalone()) {
76064
            this._checkParentType();
76065
        }
76066
        this._checkName();
76067
    };
76068
    NgModel.prototype._checkParentType = function () {
76069
        if (!(this._parent instanceof NgModelGroup) &&
76070
            this._parent instanceof AbstractFormGroupDirective) {
76071
            TemplateDrivenErrors.formGroupNameException();
76072
        }
76073
        else if (!(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm)) {
76074
            TemplateDrivenErrors.modelParentException();
76075
        }
76076
    };
76077
    NgModel.prototype._checkName = function () {
76078
        if (this.options && this.options.name)
76079
            this.name = this.options.name;
76080
        if (!this._isStandalone() && !this.name) {
76081
            TemplateDrivenErrors.missingNameException();
76082
        }
76083
    };
76084
    NgModel.prototype._updateValue = function (value) {
76085
        var _this = this;
76086
        resolvedPromise$1.then(function () { _this.control.setValue(value, { emitViewToModelChange: false }); });
76087
    };
76088
    NgModel.prototype._updateDisabled = function (changes) {
76089
        var _this = this;
76090
        var disabledValue = changes['isDisabled'].currentValue;
76091
        var isDisabled = disabledValue === '' || (disabledValue && disabledValue !== 'false');
76092
        resolvedPromise$1.then(function () {
76093
            if (isDisabled && !_this.control.disabled) {
76094
                _this.control.disable();
76095
            }
76096
            else if (!isDisabled && _this.control.disabled) {
76097
                _this.control.enable();
76098
            }
76099
        });
76100
    };
76101
    NgModel.decorators = [
76102
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
76103
                    selector: '[ngModel]:not([formControlName]):not([formControl])',
76104
                    providers: [formControlBinding],
76105
                    exportAs: 'ngModel'
76106
                },] }
76107
    ];
76108
    /** @nocollapse */
76109
    NgModel.ctorParameters = function () { return [
76110
        { type: ControlContainer, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Host"] },] },
76111
        { type: Array, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Self"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [NG_VALIDATORS,] },] },
76112
        { type: Array, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Self"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [NG_ASYNC_VALIDATORS,] },] },
76113
        { type: Array, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Self"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [NG_VALUE_ACCESSOR,] },] },
76114
    ]; };
76115
    NgModel.propDecorators = {
76116
        "name": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
76117
        "isDisabled": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['disabled',] },],
76118
        "model": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['ngModel',] },],
76119
        "options": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['ngModelOptions',] },],
76120
        "update": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"], args: ['ngModelChange',] },],
76121
    };
76122
    return NgModel;
76123
}(NgControl));
76124
 
76125
/**
76126
 * @license
76127
 * Copyright Google Inc. All Rights Reserved.
76128
 *
76129
 * Use of this source code is governed by an MIT-style license that can be
76130
 * found in the LICENSE file at https://angular.io/license
76131
 */
76132
/**
76133
 * Token to provide to turn off the ngModel warning on formControl and formControlName.
76134
 */
76135
var NG_MODEL_WITH_FORM_CONTROL_WARNING = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('NgModelWithFormControlWarning');
76136
var formControlBinding$1 = {
76137
    provide: NgControl,
76138
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(function () { return FormControlDirective; })
76139
};
76140
/**
76141
 * @description
76142
 *
76143
 * Syncs a standalone `FormControl` instance to a form control element.
76144
 *
76145
 * This directive ensures that any values written to the `FormControl`
76146
 * instance programmatically will be written to the DOM element (model -> view). Conversely,
76147
 * any values written to the DOM element through user input will be reflected in the
76148
 * `FormControl` instance (view -> model).
76149
 *
76150
 * Use this directive if you'd like to create and manage a `FormControl` instance directly.
76151
 * Simply create a `FormControl`, save it to your component class, and pass it into the
76152
 * `FormControlDirective`.
76153
 *
76154
 * This directive is designed to be used as a standalone control.  Unlike `FormControlName`,
76155
 * it does not require that your `FormControl` instance be part of any parent
76156
 * `FormGroup`, and it won't be registered to any `FormGroupDirective` that
76157
 * exists above it.
76158
 *
76159
 * **Get the value**: the `value` property is always synced and available on the
76160
 * `FormControl` instance. See a full list of available properties in
76161
 * `AbstractControl`.
76162
 *
76163
 * **Set the value**: You can pass in an initial value when instantiating the `FormControl`,
76164
 * or you can set it programmatically later using {@link AbstractControl#setValue setValue} or
76165
 * {@link AbstractControl#patchValue patchValue}.
76166
 *
76167
 * **Listen to value**: If you want to listen to changes in the value of the control, you can
76168
 * subscribe to the {@link AbstractControl#valueChanges valueChanges} event.  You can also listen to
76169
 * {@link AbstractControl#statusChanges statusChanges} to be notified when the validation status is
76170
 * re-calculated.
76171
 *
76172
 * ### Example
76173
 *
76174
 * {@example forms/ts/simpleFormControl/simple_form_control_example.ts region='Component'}
76175
 *
76176
 * * **npm package**: `@angular/forms`
76177
 *
76178
 * * **NgModule**: `ReactiveFormsModule`
76179
 *
76180
 * ### Use with ngModel
76181
 *
76182
 * Support for using the `ngModel` input property and `ngModelChange` event with reactive
76183
 * form directives has been deprecated in Angular v6 and will be removed in Angular v7.
76184
 *
76185
 * Now deprecated:
76186
 * ```html
76187
 * <input [formControl]="control" [(ngModel)]="value">
76188
 * ```
76189
 *
76190
 * ```ts
76191
 * this.value = 'some value';
76192
 * ```
76193
 *
76194
 * This has been deprecated for a few reasons. First, developers have found this pattern
76195
 * confusing. It seems like the actual `ngModel` directive is being used, but in fact it's
76196
 * an input/output property named `ngModel` on the reactive form directive that simply
76197
 * approximates (some of) its behavior. Specifically, it allows getting/setting the value
76198
 * and intercepting value events. However, some of `ngModel`'s other features - like
76199
 * delaying updates with`ngModelOptions` or exporting the directive - simply don't work,
76200
 * which has understandably caused some confusion.
76201
 *
76202
 * In addition, this pattern mixes template-driven and reactive forms strategies, which
76203
 * we generally don't recommend because it doesn't take advantage of the full benefits of
76204
 * either strategy. Setting the value in the template violates the template-agnostic
76205
 * principles behind reactive forms, whereas adding a `FormControl`/`FormGroup` layer in
76206
 * the class removes the convenience of defining forms in the template.
76207
 *
76208
 * To update your code before v7, you'll want to decide whether to stick with reactive form
76209
 * directives (and get/set values using reactive forms patterns) or switch over to
76210
 * template-driven directives.
76211
 *
76212
 * After (choice 1 - use reactive forms):
76213
 *
76214
 * ```html
76215
 * <input [formControl]="control">
76216
 * ```
76217
 *
76218
 * ```ts
76219
 * this.control.setValue('some value');
76220
 * ```
76221
 *
76222
 * After (choice 2 - use template-driven forms):
76223
 *
76224
 * ```html
76225
 * <input [(ngModel)]="value">
76226
 * ```
76227
 *
76228
 * ```ts
76229
 * this.value = 'some value';
76230
 * ```
76231
 *
76232
 * By default, when you use this pattern, you will see a deprecation warning once in dev
76233
 * mode. You can choose to silence this warning by providing a config for
76234
 * `ReactiveFormsModule` at import time:
76235
 *
76236
 * ```ts
76237
 * imports: [
76238
 *   ReactiveFormsModule.withConfig({warnOnNgModelWithFormControl: 'never'});
76239
 * ]
76240
 * ```
76241
 *
76242
 * Alternatively, you can choose to surface a separate warning for each instance of this
76243
 * pattern with a config value of `"always"`. This may help to track down where in the code
76244
 * the pattern is being used as the code is being updated.
76245
 *
76246
 *
76247
 */
76248
var FormControlDirective = /** @class */ (function (_super) {
76249
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FormControlDirective, _super);
76250
    function FormControlDirective(validators, asyncValidators, valueAccessors, _ngModelWarningConfig) {
76251
        var _this = _super.call(this) || this;
76252
        _this._ngModelWarningConfig = _ngModelWarningConfig;
76253
        /** @deprecated as of v6 */
76254
        _this.update = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
76255
        /**
76256
           * Instance property used to track whether an ngModel warning has been sent out for this
76257
           * particular FormControlDirective instance. Used to support warning config of "always".
76258
           *
76259
           * @internal
76260
           */
76261
        _this._ngModelWarningSent = false;
76262
        _this._rawValidators = validators || [];
76263
        _this._rawAsyncValidators = asyncValidators || [];
76264
        _this.valueAccessor = selectValueAccessor(_this, valueAccessors);
76265
        return _this;
76266
    }
76267
    Object.defineProperty(FormControlDirective.prototype, "isDisabled", {
76268
        set: function (isDisabled) { ReactiveErrors.disabledAttrWarning(); },
76269
        enumerable: true,
76270
        configurable: true
76271
    });
76272
    FormControlDirective.prototype.ngOnChanges = function (changes) {
76273
        if (this._isControlChanged(changes)) {
76274
            setUpControl(this.form, this);
76275
            if (this.control.disabled && this.valueAccessor.setDisabledState) {
76276
                this.valueAccessor.setDisabledState(true);
76277
            }
76278
            this.form.updateValueAndValidity({ emitEvent: false });
76279
        }
76280
        if (isPropertyUpdated(changes, this.viewModel)) {
76281
            _ngModelWarning('formControl', FormControlDirective, this, this._ngModelWarningConfig);
76282
            this.form.setValue(this.model);
76283
            this.viewModel = this.model;
76284
        }
76285
    };
76286
    Object.defineProperty(FormControlDirective.prototype, "path", {
76287
        get: function () { return []; },
76288
        enumerable: true,
76289
        configurable: true
76290
    });
76291
    Object.defineProperty(FormControlDirective.prototype, "validator", {
76292
        get: function () { return composeValidators(this._rawValidators); },
76293
        enumerable: true,
76294
        configurable: true
76295
    });
76296
    Object.defineProperty(FormControlDirective.prototype, "asyncValidator", {
76297
        get: function () {
76298
            return composeAsyncValidators(this._rawAsyncValidators);
76299
        },
76300
        enumerable: true,
76301
        configurable: true
76302
    });
76303
    Object.defineProperty(FormControlDirective.prototype, "control", {
76304
        get: function () { return this.form; },
76305
        enumerable: true,
76306
        configurable: true
76307
    });
76308
    FormControlDirective.prototype.viewToModelUpdate = function (newValue) {
76309
        this.viewModel = newValue;
76310
        this.update.emit(newValue);
76311
    };
76312
    FormControlDirective.prototype._isControlChanged = function (changes) {
76313
        return changes.hasOwnProperty('form');
76314
    };
76315
    /**
76316
       * Static property used to track whether any ngModel warnings have been sent across
76317
       * all instances of FormControlDirective. Used to support warning config of "once".
76318
       *
76319
       * @internal
76320
       */
76321
    FormControlDirective._ngModelWarningSentOnce = false;
76322
    FormControlDirective.decorators = [
76323
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{ selector: '[formControl]', providers: [formControlBinding$1], exportAs: 'ngForm' },] }
76324
    ];
76325
    /** @nocollapse */
76326
    FormControlDirective.ctorParameters = function () { return [
76327
        { type: Array, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Self"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [NG_VALIDATORS,] },] },
76328
        { type: Array, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Self"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [NG_ASYNC_VALIDATORS,] },] },
76329
        { type: Array, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Self"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [NG_VALUE_ACCESSOR,] },] },
76330
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [NG_MODEL_WITH_FORM_CONTROL_WARNING,] },] },
76331
    ]; };
76332
    FormControlDirective.propDecorators = {
76333
        "form": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['formControl',] },],
76334
        "isDisabled": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['disabled',] },],
76335
        "model": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['ngModel',] },],
76336
        "update": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"], args: ['ngModelChange',] },],
76337
    };
76338
    return FormControlDirective;
76339
}(NgControl));
76340
 
76341
/**
76342
 * @license
76343
 * Copyright Google Inc. All Rights Reserved.
76344
 *
76345
 * Use of this source code is governed by an MIT-style license that can be
76346
 * found in the LICENSE file at https://angular.io/license
76347
 */
76348
var formDirectiveProvider$1 = {
76349
    provide: ControlContainer,
76350
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(function () { return FormGroupDirective; })
76351
};
76352
/**
76353
 * @description
76354
 *
76355
 * Binds an existing `FormGroup` to a DOM element.
76356
 *
76357
 * This directive accepts an existing `FormGroup` instance. It will then use this
76358
 * `FormGroup` instance to match any child `FormControl`, `FormGroup`,
76359
 * and `FormArray` instances to child `FormControlName`, `FormGroupName`,
76360
 * and `FormArrayName` directives.
76361
 *
76362
 * **Set value**: You can set the form's initial value when instantiating the
76363
 * `FormGroup`, or you can set it programmatically later using the `FormGroup`'s
76364
 * {@link AbstractControl#setValue setValue} or {@link AbstractControl#patchValue patchValue}
76365
 * methods.
76366
 *
76367
 * **Listen to value**: If you want to listen to changes in the value of the form, you can subscribe
76368
 * to the `FormGroup`'s {@link AbstractControl#valueChanges valueChanges} event.  You can also
76369
 * listen to its {@link AbstractControl#statusChanges statusChanges} event to be notified when the
76370
 * validation status is re-calculated.
76371
 *
76372
 * Furthermore, you can listen to the directive's `ngSubmit` event to be notified when the user has
76373
 * triggered a form submission. The `ngSubmit` event will be emitted with the original form
76374
 * submission event.
76375
 *
76376
 * ### Example
76377
 *
76378
 * In this example, we create form controls for first name and last name.
76379
 *
76380
 * {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}
76381
 *
76382
 * **npm package**: `@angular/forms`
76383
 *
76384
 * **NgModule**: `ReactiveFormsModule`
76385
 *
76386
 *
76387
 */
76388
var FormGroupDirective = /** @class */ (function (_super) {
76389
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FormGroupDirective, _super);
76390
    function FormGroupDirective(_validators, _asyncValidators) {
76391
        var _this = _super.call(this) || this;
76392
        _this._validators = _validators;
76393
        _this._asyncValidators = _asyncValidators;
76394
        _this.submitted = false;
76395
        _this.directives = [];
76396
        _this.form = null;
76397
        _this.ngSubmit = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
76398
        return _this;
76399
    }
76400
    FormGroupDirective.prototype.ngOnChanges = function (changes) {
76401
        this._checkFormPresent();
76402
        if (changes.hasOwnProperty('form')) {
76403
            this._updateValidators();
76404
            this._updateDomValue();
76405
            this._updateRegistrations();
76406
        }
76407
    };
76408
    Object.defineProperty(FormGroupDirective.prototype, "formDirective", {
76409
        get: function () { return this; },
76410
        enumerable: true,
76411
        configurable: true
76412
    });
76413
    Object.defineProperty(FormGroupDirective.prototype, "control", {
76414
        get: function () { return this.form; },
76415
        enumerable: true,
76416
        configurable: true
76417
    });
76418
    Object.defineProperty(FormGroupDirective.prototype, "path", {
76419
        get: function () { return []; },
76420
        enumerable: true,
76421
        configurable: true
76422
    });
76423
    FormGroupDirective.prototype.addControl = function (dir) {
76424
        var ctrl = this.form.get(dir.path);
76425
        setUpControl(ctrl, dir);
76426
        ctrl.updateValueAndValidity({ emitEvent: false });
76427
        this.directives.push(dir);
76428
        return ctrl;
76429
    };
76430
    FormGroupDirective.prototype.getControl = function (dir) { return this.form.get(dir.path); };
76431
    FormGroupDirective.prototype.removeControl = function (dir) { removeDir(this.directives, dir); };
76432
    FormGroupDirective.prototype.addFormGroup = function (dir) {
76433
        var ctrl = this.form.get(dir.path);
76434
        setUpFormContainer(ctrl, dir);
76435
        ctrl.updateValueAndValidity({ emitEvent: false });
76436
    };
76437
    FormGroupDirective.prototype.removeFormGroup = function (dir) { };
76438
    FormGroupDirective.prototype.getFormGroup = function (dir) { return this.form.get(dir.path); };
76439
    FormGroupDirective.prototype.addFormArray = function (dir) {
76440
        var ctrl = this.form.get(dir.path);
76441
        setUpFormContainer(ctrl, dir);
76442
        ctrl.updateValueAndValidity({ emitEvent: false });
76443
    };
76444
    FormGroupDirective.prototype.removeFormArray = function (dir) { };
76445
    FormGroupDirective.prototype.getFormArray = function (dir) { return this.form.get(dir.path); };
76446
    FormGroupDirective.prototype.updateModel = function (dir, value) {
76447
        var ctrl = this.form.get(dir.path);
76448
        ctrl.setValue(value);
76449
    };
76450
    FormGroupDirective.prototype.onSubmit = function ($event) {
76451
        this.submitted = true;
76452
        syncPendingControls(this.form, this.directives);
76453
        this.ngSubmit.emit($event);
76454
        return false;
76455
    };
76456
    FormGroupDirective.prototype.onReset = function () { this.resetForm(); };
76457
    FormGroupDirective.prototype.resetForm = function (value) {
76458
        if (value === void 0) { value = undefined; }
76459
        this.form.reset(value);
76460
        this.submitted = false;
76461
    };
76462
    /** @internal */
76463
    /** @internal */
76464
    FormGroupDirective.prototype._updateDomValue = /** @internal */
76465
    function () {
76466
        var _this = this;
76467
        this.directives.forEach(function (dir) {
76468
            var newCtrl = _this.form.get(dir.path);
76469
            if (dir.control !== newCtrl) {
76470
                cleanUpControl(dir.control, dir);
76471
                if (newCtrl)
76472
                    setUpControl(newCtrl, dir);
76473
                dir.control = newCtrl;
76474
            }
76475
        });
76476
        this.form._updateTreeValidity({ emitEvent: false });
76477
    };
76478
    FormGroupDirective.prototype._updateRegistrations = function () {
76479
        var _this = this;
76480
        this.form._registerOnCollectionChange(function () { return _this._updateDomValue(); });
76481
        if (this._oldForm)
76482
            this._oldForm._registerOnCollectionChange(function () { });
76483
        this._oldForm = this.form;
76484
    };
76485
    FormGroupDirective.prototype._updateValidators = function () {
76486
        var sync = composeValidators(this._validators);
76487
        this.form.validator = Validators.compose([(this.form.validator), (sync)]);
76488
        var async = composeAsyncValidators(this._asyncValidators);
76489
        this.form.asyncValidator = Validators.composeAsync([(this.form.asyncValidator), (async)]);
76490
    };
76491
    FormGroupDirective.prototype._checkFormPresent = function () {
76492
        if (!this.form) {
76493
            ReactiveErrors.missingFormException();
76494
        }
76495
    };
76496
    FormGroupDirective.decorators = [
76497
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
76498
                    selector: '[formGroup]',
76499
                    providers: [formDirectiveProvider$1],
76500
                    host: { '(submit)': 'onSubmit($event)', '(reset)': 'onReset()' },
76501
                    exportAs: 'ngForm'
76502
                },] }
76503
    ];
76504
    /** @nocollapse */
76505
    FormGroupDirective.ctorParameters = function () { return [
76506
        { type: Array, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Self"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [NG_VALIDATORS,] },] },
76507
        { type: Array, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Self"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [NG_ASYNC_VALIDATORS,] },] },
76508
    ]; };
76509
    FormGroupDirective.propDecorators = {
76510
        "form": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['formGroup',] },],
76511
        "ngSubmit": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"] },],
76512
    };
76513
    return FormGroupDirective;
76514
}(ControlContainer));
76515
 
76516
/**
76517
 * @license
76518
 * Copyright Google Inc. All Rights Reserved.
76519
 *
76520
 * Use of this source code is governed by an MIT-style license that can be
76521
 * found in the LICENSE file at https://angular.io/license
76522
 */
76523
var formGroupNameProvider = {
76524
    provide: ControlContainer,
76525
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(function () { return FormGroupName; })
76526
};
76527
/**
76528
 * @description
76529
 *
76530
 * Syncs a nested `FormGroup` to a DOM element.
76531
 *
76532
 * This directive can only be used with a parent `FormGroupDirective` (selector:
76533
 * `[formGroup]`).
76534
 *
76535
 * It accepts the string name of the nested `FormGroup` you want to link, and
76536
 * will look for a `FormGroup` registered with that name in the parent
76537
 * `FormGroup` instance you passed into `FormGroupDirective`.
76538
 *
76539
 * Nested form groups can come in handy when you want to validate a sub-group of a
76540
 * form separately from the rest or when you'd like to group the values of certain
76541
 * controls into their own nested object.
76542
 *
76543
 * **Access the group**: You can access the associated `FormGroup` using the
76544
 * {@link AbstractControl#get get} method. Ex: `this.form.get('name')`.
76545
 *
76546
 * You can also access individual controls within the group using dot syntax.
76547
 * Ex: `this.form.get('name.first')`
76548
 *
76549
 * **Get the value**: the `value` property is always synced and available on the
76550
 * `FormGroup`. See a full list of available properties in `AbstractControl`.
76551
 *
76552
 * **Set the value**: You can set an initial value for each child control when instantiating
76553
 * the `FormGroup`, or you can set it programmatically later using
76554
 * {@link AbstractControl#setValue setValue} or {@link AbstractControl#patchValue patchValue}.
76555
 *
76556
 * **Listen to value**: If you want to listen to changes in the value of the group, you can
76557
 * subscribe to the {@link AbstractControl#valueChanges valueChanges} event.  You can also listen to
76558
 * {@link AbstractControl#statusChanges statusChanges} to be notified when the validation status is
76559
 * re-calculated.
76560
 *
76561
 * ### Example
76562
 *
76563
 * {@example forms/ts/nestedFormGroup/nested_form_group_example.ts region='Component'}
76564
 *
76565
 * * **npm package**: `@angular/forms`
76566
 *
76567
 * * **NgModule**: `ReactiveFormsModule`
76568
 *
76569
 *
76570
 */
76571
var FormGroupName = /** @class */ (function (_super) {
76572
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FormGroupName, _super);
76573
    function FormGroupName(parent, validators, asyncValidators) {
76574
        var _this = _super.call(this) || this;
76575
        _this._parent = parent;
76576
        _this._validators = validators;
76577
        _this._asyncValidators = asyncValidators;
76578
        return _this;
76579
    }
76580
    /** @internal */
76581
    /** @internal */
76582
    FormGroupName.prototype._checkParentType = /** @internal */
76583
    function () {
76584
        if (_hasInvalidParent(this._parent)) {
76585
            ReactiveErrors.groupParentException();
76586
        }
76587
    };
76588
    FormGroupName.decorators = [
76589
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{ selector: '[formGroupName]', providers: [formGroupNameProvider] },] }
76590
    ];
76591
    /** @nocollapse */
76592
    FormGroupName.ctorParameters = function () { return [
76593
        { type: ControlContainer, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Host"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"] },] },
76594
        { type: Array, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Self"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [NG_VALIDATORS,] },] },
76595
        { type: Array, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Self"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [NG_ASYNC_VALIDATORS,] },] },
76596
    ]; };
76597
    FormGroupName.propDecorators = {
76598
        "name": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['formGroupName',] },],
76599
    };
76600
    return FormGroupName;
76601
}(AbstractFormGroupDirective));
76602
var formArrayNameProvider = {
76603
    provide: ControlContainer,
76604
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(function () { return FormArrayName; })
76605
};
76606
/**
76607
 * @description
76608
 *
76609
 * Syncs a nested `FormArray` to a DOM element.
76610
 *
76611
 * This directive is designed to be used with a parent `FormGroupDirective` (selector:
76612
 * `[formGroup]`).
76613
 *
76614
 * It accepts the string name of the nested `FormArray` you want to link, and
76615
 * will look for a `FormArray` registered with that name in the parent
76616
 * `FormGroup` instance you passed into `FormGroupDirective`.
76617
 *
76618
 * Nested form arrays can come in handy when you have a group of form controls but
76619
 * you're not sure how many there will be. Form arrays allow you to create new
76620
 * form controls dynamically.
76621
 *
76622
 * **Access the array**: You can access the associated `FormArray` using the
76623
 * {@link AbstractControl#get get} method on the parent `FormGroup`.
76624
 * Ex: `this.form.get('cities')`.
76625
 *
76626
 * **Get the value**: the `value` property is always synced and available on the
76627
 * `FormArray`. See a full list of available properties in `AbstractControl`.
76628
 *
76629
 * **Set the value**: You can set an initial value for each child control when instantiating
76630
 * the `FormArray`, or you can set the value programmatically later using the
76631
 * `FormArray`'s {@link AbstractControl#setValue setValue} or
76632
 * {@link AbstractControl#patchValue patchValue} methods.
76633
 *
76634
 * **Listen to value**: If you want to listen to changes in the value of the array, you can
76635
 * subscribe to the `FormArray`'s {@link AbstractControl#valueChanges valueChanges} event.
76636
 * You can also listen to its {@link AbstractControl#statusChanges statusChanges} event to be
76637
 * notified when the validation status is re-calculated.
76638
 *
76639
 * **Add new controls**: You can add new controls to the `FormArray` dynamically by calling
76640
 * its {@link FormArray#push push} method.
76641
 * Ex: `this.form.get('cities').push(new FormControl());`
76642
 *
76643
 * ### Example
76644
 *
76645
 * {@example forms/ts/nestedFormArray/nested_form_array_example.ts region='Component'}
76646
 *
76647
 * * **npm package**: `@angular/forms`
76648
 *
76649
 * * **NgModule**: `ReactiveFormsModule`
76650
 *
76651
 *
76652
 */
76653
var FormArrayName = /** @class */ (function (_super) {
76654
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FormArrayName, _super);
76655
    function FormArrayName(parent, validators, asyncValidators) {
76656
        var _this = _super.call(this) || this;
76657
        _this._parent = parent;
76658
        _this._validators = validators;
76659
        _this._asyncValidators = asyncValidators;
76660
        return _this;
76661
    }
76662
    FormArrayName.prototype.ngOnInit = function () {
76663
        this._checkParentType();
76664
        this.formDirective.addFormArray(this);
76665
    };
76666
    FormArrayName.prototype.ngOnDestroy = function () {
76667
        if (this.formDirective) {
76668
            this.formDirective.removeFormArray(this);
76669
        }
76670
    };
76671
    Object.defineProperty(FormArrayName.prototype, "control", {
76672
        get: function () { return this.formDirective.getFormArray(this); },
76673
        enumerable: true,
76674
        configurable: true
76675
    });
76676
    Object.defineProperty(FormArrayName.prototype, "formDirective", {
76677
        get: function () {
76678
            return this._parent ? this._parent.formDirective : null;
76679
        },
76680
        enumerable: true,
76681
        configurable: true
76682
    });
76683
    Object.defineProperty(FormArrayName.prototype, "path", {
76684
        get: function () { return controlPath(this.name, this._parent); },
76685
        enumerable: true,
76686
        configurable: true
76687
    });
76688
    Object.defineProperty(FormArrayName.prototype, "validator", {
76689
        get: function () { return composeValidators(this._validators); },
76690
        enumerable: true,
76691
        configurable: true
76692
    });
76693
    Object.defineProperty(FormArrayName.prototype, "asyncValidator", {
76694
        get: function () {
76695
            return composeAsyncValidators(this._asyncValidators);
76696
        },
76697
        enumerable: true,
76698
        configurable: true
76699
    });
76700
    FormArrayName.prototype._checkParentType = function () {
76701
        if (_hasInvalidParent(this._parent)) {
76702
            ReactiveErrors.arrayParentException();
76703
        }
76704
    };
76705
    FormArrayName.decorators = [
76706
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{ selector: '[formArrayName]', providers: [formArrayNameProvider] },] }
76707
    ];
76708
    /** @nocollapse */
76709
    FormArrayName.ctorParameters = function () { return [
76710
        { type: ControlContainer, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Host"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"] },] },
76711
        { type: Array, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Self"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [NG_VALIDATORS,] },] },
76712
        { type: Array, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Self"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [NG_ASYNC_VALIDATORS,] },] },
76713
    ]; };
76714
    FormArrayName.propDecorators = {
76715
        "name": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['formArrayName',] },],
76716
    };
76717
    return FormArrayName;
76718
}(ControlContainer));
76719
function _hasInvalidParent(parent) {
76720
    return !(parent instanceof FormGroupName) && !(parent instanceof FormGroupDirective) &&
76721
        !(parent instanceof FormArrayName);
76722
}
76723
 
76724
/**
76725
 * @license
76726
 * Copyright Google Inc. All Rights Reserved.
76727
 *
76728
 * Use of this source code is governed by an MIT-style license that can be
76729
 * found in the LICENSE file at https://angular.io/license
76730
 */
76731
var controlNameBinding = {
76732
    provide: NgControl,
76733
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(function () { return FormControlName; })
76734
};
76735
/**
76736
 * @description
76737
 *
76738
 * Syncs a `FormControl` in an existing `FormGroup` to a form control
76739
 * element by name.
76740
 *
76741
 * This directive ensures that any values written to the `FormControl`
76742
 * instance programmatically will be written to the DOM element (model -> view). Conversely,
76743
 * any values written to the DOM element through user input will be reflected in the
76744
 * `FormControl` instance (view -> model).
76745
 *
76746
 * This directive is designed to be used with a parent `FormGroupDirective` (selector:
76747
 * `[formGroup]`).
76748
 *
76749
 * It accepts the string name of the `FormControl` instance you want to
76750
 * link, and will look for a `FormControl` registered with that name in the
76751
 * closest `FormGroup` or `FormArray` above it.
76752
 *
76753
 * **Access the control**: You can access the `FormControl` associated with
76754
 * this directive by using the {@link AbstractControl#get get} method.
76755
 * Ex: `this.form.get('first');`
76756
 *
76757
 * **Get value**: the `value` property is always synced and available on the `FormControl`.
76758
 * See a full list of available properties in `AbstractControl`.
76759
 *
76760
 *  **Set value**: You can set an initial value for the control when instantiating the
76761
 *  `FormControl`, or you can set it programmatically later using
76762
 *  {@link AbstractControl#setValue setValue} or {@link AbstractControl#patchValue patchValue}.
76763
 *
76764
 * **Listen to value**: If you want to listen to changes in the value of the control, you can
76765
 * subscribe to the {@link AbstractControl#valueChanges valueChanges} event.  You can also listen to
76766
 * {@link AbstractControl#statusChanges statusChanges} to be notified when the validation status is
76767
 * re-calculated.
76768
 *
76769
 * ### Example
76770
 *
76771
 * In this example, we create form controls for first name and last name.
76772
 *
76773
 * {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}
76774
 *
76775
 * To see `formControlName` examples with different form control types, see:
76776
 *
76777
 * * Radio buttons: `RadioControlValueAccessor`
76778
 * * Selects: `SelectControlValueAccessor`
76779
 *
76780
 * **npm package**: `@angular/forms`
76781
 *
76782
 * **NgModule**: `ReactiveFormsModule`
76783
 *
76784
 * ### Use with ngModel
76785
 *
76786
 * Support for using the `ngModel` input property and `ngModelChange` event with reactive
76787
 * form directives has been deprecated in Angular v6 and will be removed in Angular v7.
76788
 *
76789
 * Now deprecated:
76790
 * ```html
76791
 * <form [formGroup]="form">
76792
 *   <input formControlName="first" [(ngModel)]="value">
76793
 * </form>
76794
 * ```
76795
 *
76796
 * ```ts
76797
 * this.value = 'some value';
76798
 * ```
76799
 *
76800
 * This has been deprecated for a few reasons. First, developers have found this pattern
76801
 * confusing. It seems like the actual `ngModel` directive is being used, but in fact it's
76802
 * an input/output property named `ngModel` on the reactive form directive that simply
76803
 * approximates (some of) its behavior. Specifically, it allows getting/setting the value
76804
 * and intercepting value events. However, some of `ngModel`'s other features - like
76805
 * delaying updates with`ngModelOptions` or exporting the directive - simply don't work,
76806
 * which has understandably caused some confusion.
76807
 *
76808
 * In addition, this pattern mixes template-driven and reactive forms strategies, which
76809
 * we generally don't recommend because it doesn't take advantage of the full benefits of
76810
 * either strategy. Setting the value in the template violates the template-agnostic
76811
 * principles behind reactive forms, whereas adding a `FormControl`/`FormGroup` layer in
76812
 * the class removes the convenience of defining forms in the template.
76813
 *
76814
 * To update your code before v7, you'll want to decide whether to stick with reactive form
76815
 * directives (and get/set values using reactive forms patterns) or switch over to
76816
 * template-driven directives.
76817
 *
76818
 * After (choice 1 - use reactive forms):
76819
 *
76820
 * ```html
76821
 * <form [formGroup]="form">
76822
 *   <input formControlName="first">
76823
 * </form>
76824
 * ```
76825
 *
76826
 * ```ts
76827
 * this.form.get('first').setValue('some value');
76828
 * ```
76829
 *
76830
 * After (choice 2 - use template-driven forms):
76831
 *
76832
 * ```html
76833
 * <input [(ngModel)]="value">
76834
 * ```
76835
 *
76836
 * ```ts
76837
 * this.value = 'some value';
76838
 * ```
76839
 *
76840
 * By default, when you use this pattern, you will see a deprecation warning once in dev
76841
 * mode. You can choose to silence this warning by providing a config for
76842
 * `ReactiveFormsModule` at import time:
76843
 *
76844
 * ```ts
76845
 * imports: [
76846
 *   ReactiveFormsModule.withConfig({warnOnNgModelWithFormControl: 'never'});
76847
 * ]
76848
 * ```
76849
 *
76850
 * Alternatively, you can choose to surface a separate warning for each instance of this
76851
 * pattern with a config value of `"always"`. This may help to track down where in the code
76852
 * the pattern is being used as the code is being updated.
76853
 *
76854
 *
76855
 */
76856
var FormControlName = /** @class */ (function (_super) {
76857
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FormControlName, _super);
76858
    function FormControlName(parent, validators, asyncValidators, valueAccessors, _ngModelWarningConfig) {
76859
        var _this = _super.call(this) || this;
76860
        _this._ngModelWarningConfig = _ngModelWarningConfig;
76861
        _this._added = false;
76862
        /** @deprecated as of v6 */
76863
        _this.update = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
76864
        /**
76865
           * Instance property used to track whether an ngModel warning has been sent out for this
76866
           * particular FormControlName instance. Used to support warning config of "always".
76867
           *
76868
           * @internal
76869
           */
76870
        _this._ngModelWarningSent = false;
76871
        _this._parent = parent;
76872
        _this._rawValidators = validators || [];
76873
        _this._rawAsyncValidators = asyncValidators || [];
76874
        _this.valueAccessor = selectValueAccessor(_this, valueAccessors);
76875
        return _this;
76876
    }
76877
    Object.defineProperty(FormControlName.prototype, "isDisabled", {
76878
        set: function (isDisabled) { ReactiveErrors.disabledAttrWarning(); },
76879
        enumerable: true,
76880
        configurable: true
76881
    });
76882
    FormControlName.prototype.ngOnChanges = function (changes) {
76883
        if (!this._added)
76884
            this._setUpControl();
76885
        if (isPropertyUpdated(changes, this.viewModel)) {
76886
            _ngModelWarning('formControlName', FormControlName, this, this._ngModelWarningConfig);
76887
            this.viewModel = this.model;
76888
            this.formDirective.updateModel(this, this.model);
76889
        }
76890
    };
76891
    FormControlName.prototype.ngOnDestroy = function () {
76892
        if (this.formDirective) {
76893
            this.formDirective.removeControl(this);
76894
        }
76895
    };
76896
    FormControlName.prototype.viewToModelUpdate = function (newValue) {
76897
        this.viewModel = newValue;
76898
        this.update.emit(newValue);
76899
    };
76900
    Object.defineProperty(FormControlName.prototype, "path", {
76901
        get: function () { return controlPath(this.name, (this._parent)); },
76902
        enumerable: true,
76903
        configurable: true
76904
    });
76905
    Object.defineProperty(FormControlName.prototype, "formDirective", {
76906
        get: function () { return this._parent ? this._parent.formDirective : null; },
76907
        enumerable: true,
76908
        configurable: true
76909
    });
76910
    Object.defineProperty(FormControlName.prototype, "validator", {
76911
        get: function () { return composeValidators(this._rawValidators); },
76912
        enumerable: true,
76913
        configurable: true
76914
    });
76915
    Object.defineProperty(FormControlName.prototype, "asyncValidator", {
76916
        get: function () {
76917
            return composeAsyncValidators(this._rawAsyncValidators);
76918
        },
76919
        enumerable: true,
76920
        configurable: true
76921
    });
76922
    FormControlName.prototype._checkParentType = function () {
76923
        if (!(this._parent instanceof FormGroupName) &&
76924
            this._parent instanceof AbstractFormGroupDirective) {
76925
            ReactiveErrors.ngModelGroupException();
76926
        }
76927
        else if (!(this._parent instanceof FormGroupName) && !(this._parent instanceof FormGroupDirective) &&
76928
            !(this._parent instanceof FormArrayName)) {
76929
            ReactiveErrors.controlParentException();
76930
        }
76931
    };
76932
    FormControlName.prototype._setUpControl = function () {
76933
        this._checkParentType();
76934
        this.control = this.formDirective.addControl(this);
76935
        if (this.control.disabled && this.valueAccessor.setDisabledState) {
76936
            this.valueAccessor.setDisabledState(true);
76937
        }
76938
        this._added = true;
76939
    };
76940
    /**
76941
       * Static property used to track whether any ngModel warnings have been sent across
76942
       * all instances of FormControlName. Used to support warning config of "once".
76943
       *
76944
       * @internal
76945
       */
76946
    FormControlName._ngModelWarningSentOnce = false;
76947
    FormControlName.decorators = [
76948
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{ selector: '[formControlName]', providers: [controlNameBinding] },] }
76949
    ];
76950
    /** @nocollapse */
76951
    FormControlName.ctorParameters = function () { return [
76952
        { type: ControlContainer, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Host"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"] },] },
76953
        { type: Array, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Self"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [NG_VALIDATORS,] },] },
76954
        { type: Array, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Self"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [NG_ASYNC_VALIDATORS,] },] },
76955
        { type: Array, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Self"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [NG_VALUE_ACCESSOR,] },] },
76956
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [NG_MODEL_WITH_FORM_CONTROL_WARNING,] },] },
76957
    ]; };
76958
    FormControlName.propDecorators = {
76959
        "name": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['formControlName',] },],
76960
        "isDisabled": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['disabled',] },],
76961
        "model": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['ngModel',] },],
76962
        "update": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"], args: ['ngModelChange',] },],
76963
    };
76964
    return FormControlName;
76965
}(NgControl));
76966
 
76967
/**
76968
 * @license
76969
 * Copyright Google Inc. All Rights Reserved.
76970
 *
76971
 * Use of this source code is governed by an MIT-style license that can be
76972
 * found in the LICENSE file at https://angular.io/license
76973
 */
76974
var REQUIRED_VALIDATOR = {
76975
    provide: NG_VALIDATORS,
76976
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(function () { return RequiredValidator; }),
76977
    multi: true
76978
};
76979
var CHECKBOX_REQUIRED_VALIDATOR = {
76980
    provide: NG_VALIDATORS,
76981
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(function () { return CheckboxRequiredValidator; }),
76982
    multi: true
76983
};
76984
/**
76985
 * A Directive that adds the `required` validator to any controls marked with the
76986
 * `required` attribute, via the `NG_VALIDATORS` binding.
76987
 *
76988
 * ### Example
76989
 *
76990
 * ```
76991
 * <input name="fullName" ngModel required>
76992
 * ```
76993
 *
76994
 *
76995
 */
76996
var RequiredValidator = /** @class */ (function () {
76997
    function RequiredValidator() {
76998
    }
76999
    Object.defineProperty(RequiredValidator.prototype, "required", {
77000
        get: function () { return this._required; },
77001
        set: function (value) {
77002
            this._required = value != null && value !== false && "" + value !== 'false';
77003
            if (this._onChange)
77004
                this._onChange();
77005
        },
77006
        enumerable: true,
77007
        configurable: true
77008
    });
77009
    RequiredValidator.prototype.validate = function (c) {
77010
        return this.required ? Validators.required(c) : null;
77011
    };
77012
    RequiredValidator.prototype.registerOnValidatorChange = function (fn) { this._onChange = fn; };
77013
    RequiredValidator.decorators = [
77014
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
77015
                    selector: ':not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]',
77016
                    providers: [REQUIRED_VALIDATOR],
77017
                    host: { '[attr.required]': 'required ? "" : null' }
77018
                },] }
77019
    ];
77020
    /** @nocollapse */
77021
    RequiredValidator.ctorParameters = function () { return []; };
77022
    RequiredValidator.propDecorators = {
77023
        "required": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
77024
    };
77025
    return RequiredValidator;
77026
}());
77027
/**
77028
 * A Directive that adds the `required` validator to checkbox controls marked with the
77029
 * `required` attribute, via the `NG_VALIDATORS` binding.
77030
 *
77031
 * ### Example
77032
 *
77033
 * ```
77034
 * <input type="checkbox" name="active" ngModel required>
77035
 * ```
77036
 *
77037
 * @experimental
77038
 */
77039
var CheckboxRequiredValidator = /** @class */ (function (_super) {
77040
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CheckboxRequiredValidator, _super);
77041
    function CheckboxRequiredValidator() {
77042
        return _super !== null && _super.apply(this, arguments) || this;
77043
    }
77044
    CheckboxRequiredValidator.prototype.validate = function (c) {
77045
        return this.required ? Validators.requiredTrue(c) : null;
77046
    };
77047
    CheckboxRequiredValidator.decorators = [
77048
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
77049
                    selector: 'input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]',
77050
                    providers: [CHECKBOX_REQUIRED_VALIDATOR],
77051
                    host: { '[attr.required]': 'required ? "" : null' }
77052
                },] }
77053
    ];
77054
    /** @nocollapse */
77055
    CheckboxRequiredValidator.ctorParameters = function () { return []; };
77056
    return CheckboxRequiredValidator;
77057
}(RequiredValidator));
77058
/**
77059
 * Provider which adds `EmailValidator` to `NG_VALIDATORS`.
77060
 */
77061
var EMAIL_VALIDATOR = {
77062
    provide: NG_VALIDATORS,
77063
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(function () { return EmailValidator; }),
77064
    multi: true
77065
};
77066
/**
77067
 * A Directive that adds the `email` validator to controls marked with the
77068
 * `email` attribute, via the `NG_VALIDATORS` binding.
77069
 *
77070
 * ### Example
77071
 *
77072
 * ```
77073
 * <input type="email" name="email" ngModel email>
77074
 * <input type="email" name="email" ngModel email="true">
77075
 * <input type="email" name="email" ngModel [email]="true">
77076
 * ```
77077
 *
77078
 * @experimental
77079
 */
77080
var EmailValidator = /** @class */ (function () {
77081
    function EmailValidator() {
77082
    }
77083
    Object.defineProperty(EmailValidator.prototype, "email", {
77084
        set: function (value) {
77085
            this._enabled = value === '' || value === true || value === 'true';
77086
            if (this._onChange)
77087
                this._onChange();
77088
        },
77089
        enumerable: true,
77090
        configurable: true
77091
    });
77092
    EmailValidator.prototype.validate = function (c) {
77093
        return this._enabled ? Validators.email(c) : null;
77094
    };
77095
    EmailValidator.prototype.registerOnValidatorChange = function (fn) { this._onChange = fn; };
77096
    EmailValidator.decorators = [
77097
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
77098
                    selector: '[email][formControlName],[email][formControl],[email][ngModel]',
77099
                    providers: [EMAIL_VALIDATOR]
77100
                },] }
77101
    ];
77102
    /** @nocollapse */
77103
    EmailValidator.ctorParameters = function () { return []; };
77104
    EmailValidator.propDecorators = {
77105
        "email": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
77106
    };
77107
    return EmailValidator;
77108
}());
77109
/**
77110
 * Provider which adds `MinLengthValidator` to `NG_VALIDATORS`.
77111
 *
77112
 * ## Example:
77113
 *
77114
 * {@example common/forms/ts/validators/validators.ts region='min'}
77115
 */
77116
var MIN_LENGTH_VALIDATOR = {
77117
    provide: NG_VALIDATORS,
77118
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(function () { return MinLengthValidator; }),
77119
    multi: true
77120
};
77121
/**
77122
 * A directive which installs the `MinLengthValidator` for any `formControlName`,
77123
 * `formControl`, or control with `ngModel` that also has a `minlength` attribute.
77124
 *
77125
 *
77126
 */
77127
var MinLengthValidator = /** @class */ (function () {
77128
    function MinLengthValidator() {
77129
    }
77130
    MinLengthValidator.prototype.ngOnChanges = function (changes) {
77131
        if ('minlength' in changes) {
77132
            this._createValidator();
77133
            if (this._onChange)
77134
                this._onChange();
77135
        }
77136
    };
77137
    MinLengthValidator.prototype.validate = function (c) {
77138
        return this.minlength == null ? null : this._validator(c);
77139
    };
77140
    MinLengthValidator.prototype.registerOnValidatorChange = function (fn) { this._onChange = fn; };
77141
    MinLengthValidator.prototype._createValidator = function () {
77142
        this._validator = Validators.minLength(parseInt(this.minlength, 10));
77143
    };
77144
    MinLengthValidator.decorators = [
77145
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
77146
                    selector: '[minlength][formControlName],[minlength][formControl],[minlength][ngModel]',
77147
                    providers: [MIN_LENGTH_VALIDATOR],
77148
                    host: { '[attr.minlength]': 'minlength ? minlength : null' }
77149
                },] }
77150
    ];
77151
    /** @nocollapse */
77152
    MinLengthValidator.ctorParameters = function () { return []; };
77153
    MinLengthValidator.propDecorators = {
77154
        "minlength": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
77155
    };
77156
    return MinLengthValidator;
77157
}());
77158
/**
77159
 * Provider which adds `MaxLengthValidator` to `NG_VALIDATORS`.
77160
 *
77161
 * ## Example:
77162
 *
77163
 * {@example common/forms/ts/validators/validators.ts region='max'}
77164
 */
77165
var MAX_LENGTH_VALIDATOR = {
77166
    provide: NG_VALIDATORS,
77167
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(function () { return MaxLengthValidator; }),
77168
    multi: true
77169
};
77170
/**
77171
 * A directive which installs the `MaxLengthValidator` for any `formControlName,
77172
 * `formControl`,
77173
 * or control with `ngModel` that also has a `maxlength` attribute.
77174
 *
77175
 *
77176
 */
77177
var MaxLengthValidator = /** @class */ (function () {
77178
    function MaxLengthValidator() {
77179
    }
77180
    MaxLengthValidator.prototype.ngOnChanges = function (changes) {
77181
        if ('maxlength' in changes) {
77182
            this._createValidator();
77183
            if (this._onChange)
77184
                this._onChange();
77185
        }
77186
    };
77187
    MaxLengthValidator.prototype.validate = function (c) {
77188
        return this.maxlength != null ? this._validator(c) : null;
77189
    };
77190
    MaxLengthValidator.prototype.registerOnValidatorChange = function (fn) { this._onChange = fn; };
77191
    MaxLengthValidator.prototype._createValidator = function () {
77192
        this._validator = Validators.maxLength(parseInt(this.maxlength, 10));
77193
    };
77194
    MaxLengthValidator.decorators = [
77195
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
77196
                    selector: '[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]',
77197
                    providers: [MAX_LENGTH_VALIDATOR],
77198
                    host: { '[attr.maxlength]': 'maxlength ? maxlength : null' }
77199
                },] }
77200
    ];
77201
    /** @nocollapse */
77202
    MaxLengthValidator.ctorParameters = function () { return []; };
77203
    MaxLengthValidator.propDecorators = {
77204
        "maxlength": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
77205
    };
77206
    return MaxLengthValidator;
77207
}());
77208
var PATTERN_VALIDATOR = {
77209
    provide: NG_VALIDATORS,
77210
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(function () { return PatternValidator; }),
77211
    multi: true
77212
};
77213
/**
77214
 * A Directive that adds the `pattern` validator to any controls marked with the
77215
 * `pattern` attribute, via the `NG_VALIDATORS` binding. Uses attribute value
77216
 * as the regex to validate Control value against.  Follows pattern attribute
77217
 * semantics; i.e. regex must match entire Control value.
77218
 *
77219
 * ### Example
77220
 *
77221
 * ```
77222
 * <input [name]="fullName" pattern="[a-zA-Z ]*" ngModel>
77223
 * ```
77224
 *
77225
 */
77226
var PatternValidator = /** @class */ (function () {
77227
    function PatternValidator() {
77228
    }
77229
    PatternValidator.prototype.ngOnChanges = function (changes) {
77230
        if ('pattern' in changes) {
77231
            this._createValidator();
77232
            if (this._onChange)
77233
                this._onChange();
77234
        }
77235
    };
77236
    PatternValidator.prototype.validate = function (c) { return this._validator(c); };
77237
    PatternValidator.prototype.registerOnValidatorChange = function (fn) { this._onChange = fn; };
77238
    PatternValidator.prototype._createValidator = function () { this._validator = Validators.pattern(this.pattern); };
77239
    PatternValidator.decorators = [
77240
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
77241
                    selector: '[pattern][formControlName],[pattern][formControl],[pattern][ngModel]',
77242
                    providers: [PATTERN_VALIDATOR],
77243
                    host: { '[attr.pattern]': 'pattern ? pattern : null' }
77244
                },] }
77245
    ];
77246
    /** @nocollapse */
77247
    PatternValidator.ctorParameters = function () { return []; };
77248
    PatternValidator.propDecorators = {
77249
        "pattern": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
77250
    };
77251
    return PatternValidator;
77252
}());
77253
 
77254
/**
77255
 * @license
77256
 * Copyright Google Inc. All Rights Reserved.
77257
 *
77258
 * Use of this source code is governed by an MIT-style license that can be
77259
 * found in the LICENSE file at https://angular.io/license
77260
 */
77261
/**
77262
 * @description
77263
 *
77264
 * Creates an `AbstractControl` from a user-specified configuration.
77265
 *
77266
 * This is essentially syntactic sugar that shortens the `new FormGroup()`,
77267
 * `new FormControl()`, and `new FormArray()` boilerplate that can build up in larger
77268
 * forms.
77269
 *
77270
 * To use, inject `FormBuilder` into your component class. You can then call its methods
77271
 * directly.
77272
 *
77273
 * {@example forms/ts/formBuilder/form_builder_example.ts region='Component'}
77274
 *
77275
 *  * **npm package**: `@angular/forms`
77276
 *
77277
 *  * **NgModule**: `ReactiveFormsModule`
77278
 *
77279
 *
77280
 */
77281
var FormBuilder = /** @class */ (function () {
77282
    function FormBuilder() {
77283
    }
77284
    /**
77285
     * Construct a new `FormGroup` with the given map of configuration.
77286
     * Valid keys for the `extra` parameter map are `validator` and `asyncValidator`.
77287
     *
77288
     * See the `FormGroup` constructor for more details.
77289
     */
77290
    /**
77291
       * Construct a new `FormGroup` with the given map of configuration.
77292
       * Valid keys for the `extra` parameter map are `validator` and `asyncValidator`.
77293
       *
77294
       * See the `FormGroup` constructor for more details.
77295
       */
77296
    FormBuilder.prototype.group = /**
77297
       * Construct a new `FormGroup` with the given map of configuration.
77298
       * Valid keys for the `extra` parameter map are `validator` and `asyncValidator`.
77299
       *
77300
       * See the `FormGroup` constructor for more details.
77301
       */
77302
    function (controlsConfig, extra) {
77303
        if (extra === void 0) { extra = null; }
77304
        var controls = this._reduceControls(controlsConfig);
77305
        var validator = extra != null ? extra['validator'] : null;
77306
        var asyncValidator = extra != null ? extra['asyncValidator'] : null;
77307
        return new FormGroup(controls, validator, asyncValidator);
77308
    };
77309
    /**
77310
     * Construct a new `FormControl` with the given `formState`,`validator`, and
77311
     * `asyncValidator`.
77312
     *
77313
     * `formState` can either be a standalone value for the form control or an object
77314
     * that contains both a value and a disabled status.
77315
     *
77316
     */
77317
    /**
77318
       * Construct a new `FormControl` with the given `formState`,`validator`, and
77319
       * `asyncValidator`.
77320
       *
77321
       * `formState` can either be a standalone value for the form control or an object
77322
       * that contains both a value and a disabled status.
77323
       *
77324
       */
77325
    FormBuilder.prototype.control = /**
77326
       * Construct a new `FormControl` with the given `formState`,`validator`, and
77327
       * `asyncValidator`.
77328
       *
77329
       * `formState` can either be a standalone value for the form control or an object
77330
       * that contains both a value and a disabled status.
77331
       *
77332
       */
77333
    function (formState, validator, asyncValidator) {
77334
        return new FormControl(formState, validator, asyncValidator);
77335
    };
77336
    /**
77337
     * Construct a `FormArray` from the given `controlsConfig` array of
77338
     * configuration, with the given optional `validator` and `asyncValidator`.
77339
     */
77340
    /**
77341
       * Construct a `FormArray` from the given `controlsConfig` array of
77342
       * configuration, with the given optional `validator` and `asyncValidator`.
77343
       */
77344
    FormBuilder.prototype.array = /**
77345
       * Construct a `FormArray` from the given `controlsConfig` array of
77346
       * configuration, with the given optional `validator` and `asyncValidator`.
77347
       */
77348
    function (controlsConfig, validator, asyncValidator) {
77349
        var _this = this;
77350
        var controls = controlsConfig.map(function (c) { return _this._createControl(c); });
77351
        return new FormArray(controls, validator, asyncValidator);
77352
    };
77353
    /** @internal */
77354
    /** @internal */
77355
    FormBuilder.prototype._reduceControls = /** @internal */
77356
    function (controlsConfig) {
77357
        var _this = this;
77358
        var controls = {};
77359
        Object.keys(controlsConfig).forEach(function (controlName) {
77360
            controls[controlName] = _this._createControl(controlsConfig[controlName]);
77361
        });
77362
        return controls;
77363
    };
77364
    /** @internal */
77365
    /** @internal */
77366
    FormBuilder.prototype._createControl = /** @internal */
77367
    function (controlConfig) {
77368
        if (controlConfig instanceof FormControl || controlConfig instanceof FormGroup ||
77369
            controlConfig instanceof FormArray) {
77370
            return controlConfig;
77371
        }
77372
        else if (Array.isArray(controlConfig)) {
77373
            var value = controlConfig[0];
77374
            var validator = controlConfig.length > 1 ? controlConfig[1] : null;
77375
            var asyncValidator = controlConfig.length > 2 ? controlConfig[2] : null;
77376
            return this.control(value, validator, asyncValidator);
77377
        }
77378
        else {
77379
            return this.control(controlConfig);
77380
        }
77381
    };
77382
    FormBuilder.decorators = [
77383
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }
77384
    ];
77385
    /** @nocollapse */
77386
    FormBuilder.ctorParameters = function () { return []; };
77387
    return FormBuilder;
77388
}());
77389
 
77390
/**
77391
 * @license
77392
 * Copyright Google Inc. All Rights Reserved.
77393
 *
77394
 * Use of this source code is governed by an MIT-style license that can be
77395
 * found in the LICENSE file at https://angular.io/license
77396
 */
77397
var VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Version"]('6.0.3');
77398
 
77399
/**
77400
 * @license
77401
 * Copyright Google Inc. All Rights Reserved.
77402
 *
77403
 * Use of this source code is governed by an MIT-style license that can be
77404
 * found in the LICENSE file at https://angular.io/license
77405
 */
77406
/**
77407
 * @description
77408
 *
77409
 * Adds `novalidate` attribute to all forms by default.
77410
 *
77411
 * `novalidate` is used to disable browser's native form validation.
77412
 *
77413
 * If you want to use native validation with Angular forms, just add `ngNativeValidate` attribute:
77414
 *
77415
 * ```
77416
 * <form ngNativeValidate></form>
77417
 * ```
77418
 *
77419
 * @experimental
77420
 */
77421
var NgNoValidate = /** @class */ (function () {
77422
    function NgNoValidate() {
77423
    }
77424
    NgNoValidate.decorators = [
77425
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
77426
                    selector: 'form:not([ngNoForm]):not([ngNativeValidate])',
77427
                    host: { 'novalidate': '' },
77428
                },] }
77429
    ];
77430
    /** @nocollapse */
77431
    NgNoValidate.ctorParameters = function () { return []; };
77432
    return NgNoValidate;
77433
}());
77434
 
77435
/**
77436
 * @license
77437
 * Copyright Google Inc. All Rights Reserved.
77438
 *
77439
 * Use of this source code is governed by an MIT-style license that can be
77440
 * found in the LICENSE file at https://angular.io/license
77441
 */
77442
var SHARED_FORM_DIRECTIVES = [
77443
    NgNoValidate,
77444
    NgSelectOption,
77445
    NgSelectMultipleOption,
77446
    DefaultValueAccessor,
77447
    NumberValueAccessor,
77448
    RangeValueAccessor,
77449
    CheckboxControlValueAccessor,
77450
    SelectControlValueAccessor,
77451
    SelectMultipleControlValueAccessor,
77452
    RadioControlValueAccessor,
77453
    NgControlStatus,
77454
    NgControlStatusGroup,
77455
    RequiredValidator,
77456
    MinLengthValidator,
77457
    MaxLengthValidator,
77458
    PatternValidator,
77459
    CheckboxRequiredValidator,
77460
    EmailValidator,
77461
];
77462
var TEMPLATE_DRIVEN_DIRECTIVES = [NgModel, NgModelGroup, NgForm];
77463
var REACTIVE_DRIVEN_DIRECTIVES = [FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName];
77464
/**
77465
 * Internal module used for sharing directives between FormsModule and ReactiveFormsModule
77466
 */
77467
var InternalFormsSharedModule = /** @class */ (function () {
77468
    function InternalFormsSharedModule() {
77469
    }
77470
    InternalFormsSharedModule.decorators = [
77471
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{
77472
                    declarations: SHARED_FORM_DIRECTIVES,
77473
                    exports: SHARED_FORM_DIRECTIVES,
77474
                },] }
77475
    ];
77476
    /** @nocollapse */
77477
    InternalFormsSharedModule.ctorParameters = function () { return []; };
77478
    return InternalFormsSharedModule;
77479
}());
77480
 
77481
/**
77482
 * @license
77483
 * Copyright Google Inc. All Rights Reserved.
77484
 *
77485
 * Use of this source code is governed by an MIT-style license that can be
77486
 * found in the LICENSE file at https://angular.io/license
77487
 */
77488
/**
77489
 * The ng module for forms.
77490
 *
77491
 */
77492
var FormsModule = /** @class */ (function () {
77493
    function FormsModule() {
77494
    }
77495
    FormsModule.decorators = [
77496
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{
77497
                    declarations: TEMPLATE_DRIVEN_DIRECTIVES,
77498
                    providers: [RadioControlRegistry],
77499
                    exports: [InternalFormsSharedModule, TEMPLATE_DRIVEN_DIRECTIVES]
77500
                },] }
77501
    ];
77502
    /** @nocollapse */
77503
    FormsModule.ctorParameters = function () { return []; };
77504
    return FormsModule;
77505
}());
77506
/**
77507
 * The ng module for reactive forms.
77508
 *
77509
 */
77510
var ReactiveFormsModule = /** @class */ (function () {
77511
    function ReactiveFormsModule() {
77512
    }
77513
    ReactiveFormsModule.withConfig = function (opts) {
77514
        return {
77515
            ngModule: ReactiveFormsModule,
77516
            providers: [{
77517
                    provide: NG_MODEL_WITH_FORM_CONTROL_WARNING,
77518
                    useValue: opts.warnOnNgModelWithFormControl
77519
                }]
77520
        };
77521
    };
77522
    ReactiveFormsModule.decorators = [
77523
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{
77524
                    declarations: [REACTIVE_DRIVEN_DIRECTIVES],
77525
                    providers: [FormBuilder, RadioControlRegistry],
77526
                    exports: [InternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES]
77527
                },] }
77528
    ];
77529
    /** @nocollapse */
77530
    ReactiveFormsModule.ctorParameters = function () { return []; };
77531
    return ReactiveFormsModule;
77532
}());
77533
 
77534
/**
77535
 * @license
77536
 * Copyright Google Inc. All Rights Reserved.
77537
 *
77538
 * Use of this source code is governed by an MIT-style license that can be
77539
 * found in the LICENSE file at https://angular.io/license
77540
 */
77541
 
77542
/**
77543
 * @license
77544
 * Copyright Google Inc. All Rights Reserved.
77545
 *
77546
 * Use of this source code is governed by an MIT-style license that can be
77547
 * found in the LICENSE file at https://angular.io/license
77548
 */
77549
 
77550
// This file only reexports content of the `src` folder. Keep it that way.
77551
 
77552
/**
77553
 * @license
77554
 * Copyright Google Inc. All Rights Reserved.
77555
 *
77556
 * Use of this source code is governed by an MIT-style license that can be
77557
 * found in the LICENSE file at https://angular.io/license
77558
 */
77559
 
77560
/**
77561
 * Generated bundle index. Do not edit.
77562
 */
77563
 
77564
 
77565
//# sourceMappingURL=forms.js.map
77566
 
77567
 
77568
/***/ }),
77569
 
77570
/***/ "./node_modules/@angular/material/esm5/autocomplete.es5.js":
77571
/*!*****************************************************************!*\
77572
  !*** ./node_modules/@angular/material/esm5/autocomplete.es5.js ***!
77573
  \*****************************************************************/
77574
/*! exports provided: MatAutocompleteSelectedEvent, MatAutocompleteBase, _MatAutocompleteMixinBase, MAT_AUTOCOMPLETE_DEFAULT_OPTIONS, MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY, MatAutocomplete, MatAutocompleteModule, AUTOCOMPLETE_OPTION_HEIGHT, AUTOCOMPLETE_PANEL_HEIGHT, MAT_AUTOCOMPLETE_SCROLL_STRATEGY, MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY, MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER, MAT_AUTOCOMPLETE_VALUE_ACCESSOR, getMatAutocompleteMissingPanelError, MatAutocompleteTrigger, ɵa29 */
77575
/***/ (function(module, __webpack_exports__, __webpack_require__) {
77576
 
77577
"use strict";
77578
__webpack_require__.r(__webpack_exports__);
77579
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatAutocompleteSelectedEvent", function() { return MatAutocompleteSelectedEvent; });
77580
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatAutocompleteBase", function() { return MatAutocompleteBase; });
77581
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatAutocompleteMixinBase", function() { return _MatAutocompleteMixinBase; });
77582
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_AUTOCOMPLETE_DEFAULT_OPTIONS", function() { return MAT_AUTOCOMPLETE_DEFAULT_OPTIONS; });
77583
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY", function() { return MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY; });
77584
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatAutocomplete", function() { return MatAutocomplete; });
77585
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatAutocompleteModule", function() { return MatAutocompleteModule; });
77586
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AUTOCOMPLETE_OPTION_HEIGHT", function() { return AUTOCOMPLETE_OPTION_HEIGHT; });
77587
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AUTOCOMPLETE_PANEL_HEIGHT", function() { return AUTOCOMPLETE_PANEL_HEIGHT; });
77588
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_AUTOCOMPLETE_SCROLL_STRATEGY", function() { return MAT_AUTOCOMPLETE_SCROLL_STRATEGY; });
77589
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY", function() { return MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY; });
77590
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER", function() { return MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER; });
77591
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_AUTOCOMPLETE_VALUE_ACCESSOR", function() { return MAT_AUTOCOMPLETE_VALUE_ACCESSOR; });
77592
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMatAutocompleteMissingPanelError", function() { return getMatAutocompleteMissingPanelError; });
77593
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatAutocompleteTrigger", function() { return MatAutocompleteTrigger; });
77594
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵa29", function() { return MatAutocompleteOrigin; });
77595
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
77596
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
77597
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
77598
/* harmony import */ var _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/a11y */ "./node_modules/@angular/cdk/esm5/a11y.es5.js");
77599
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
77600
/* harmony import */ var _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/cdk/bidi */ "./node_modules/@angular/cdk/esm5/bidi.es5.js");
77601
/* harmony import */ var _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/cdk/keycodes */ "./node_modules/@angular/cdk/esm5/keycodes.es5.js");
77602
/* harmony import */ var _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/cdk/overlay */ "./node_modules/@angular/cdk/esm5/overlay.es5.js");
77603
/* harmony import */ var _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/cdk/portal */ "./node_modules/@angular/cdk/esm5/portal.es5.js");
77604
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
77605
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
77606
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
77607
/* harmony import */ var _angular_material_form_field__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/material/form-field */ "./node_modules/@angular/material/esm5/form-field.es5.js");
77608
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
77609
/**
77610
 * @license
77611
 * Copyright Google LLC All Rights Reserved.
77612
 *
77613
 * Use of this source code is governed by an MIT-style license that can be
77614
 * found in the LICENSE file at https://angular.io/license
77615
 */
77616
 
77617
 
77618
 
77619
 
77620
 
77621
 
77622
 
77623
 
77624
 
77625
 
77626
 
77627
 
77628
 
77629
 
77630
 
77631
/**
77632
 * @fileoverview added by tsickle
77633
 * @suppress {checkTypes} checked by tsc
77634
 */
77635
/**
77636
 * Autocomplete IDs need to be unique across components, so this counter exists outside of
77637
 * the component definition.
77638
 */
77639
var /** @type {?} */ _uniqueAutocompleteIdCounter = 0;
77640
/**
77641
 * Event object that is emitted when an autocomplete option is selected.
77642
 */
77643
var  /**
77644
 * Event object that is emitted when an autocomplete option is selected.
77645
 */
77646
MatAutocompleteSelectedEvent = /** @class */ (function () {
77647
    function MatAutocompleteSelectedEvent(source, option) {
77648
        this.source = source;
77649
        this.option = option;
77650
    }
77651
    return MatAutocompleteSelectedEvent;
77652
}());
77653
/**
77654
 * \@docs-private
77655
 */
77656
var  /**
77657
 * \@docs-private
77658
 */
77659
MatAutocompleteBase = /** @class */ (function () {
77660
    function MatAutocompleteBase() {
77661
    }
77662
    return MatAutocompleteBase;
77663
}());
77664
var /** @type {?} */ _MatAutocompleteMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_2__["mixinDisableRipple"])(MatAutocompleteBase);
77665
/**
77666
 * Injection token to be used to override the default options for `mat-autocomplete`.
77667
 */
77668
var /** @type {?} */ MAT_AUTOCOMPLETE_DEFAULT_OPTIONS = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('mat-autocomplete-default-options', {
77669
    providedIn: 'root',
77670
    factory: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY,
77671
});
77672
/**
77673
 * \@docs-private
77674
 * @return {?}
77675
 */
77676
function MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY() {
77677
    return { autoActiveFirstOption: false };
77678
}
77679
var MatAutocomplete = /** @class */ (function (_super) {
77680
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatAutocomplete, _super);
77681
    function MatAutocomplete(_changeDetectorRef, _elementRef, defaults) {
77682
        var _this = _super.call(this) || this;
77683
        _this._changeDetectorRef = _changeDetectorRef;
77684
        _this._elementRef = _elementRef;
77685
        /**
77686
         * Whether the autocomplete panel should be visible, depending on option length.
77687
         */
77688
        _this.showPanel = false;
77689
        _this._isOpen = false;
77690
        /**
77691
         * Function that maps an option's control value to its display value in the trigger.
77692
         */
77693
        _this.displayWith = null;
77694
        /**
77695
         * Event that is emitted whenever an option from the list is selected.
77696
         */
77697
        _this.optionSelected = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
77698
        /**
77699
         * Event that is emitted when the autocomplete panel is opened.
77700
         */
77701
        _this.opened = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
77702
        /**
77703
         * Event that is emitted when the autocomplete panel is closed.
77704
         */
77705
        _this.closed = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
77706
        _this._classList = {};
77707
        /**
77708
         * Unique ID to be used by autocomplete trigger's "aria-owns" property.
77709
         */
77710
        _this.id = "mat-autocomplete-" + _uniqueAutocompleteIdCounter++;
77711
        _this._autoActiveFirstOption = !!defaults.autoActiveFirstOption;
77712
        return _this;
77713
    }
77714
    Object.defineProperty(MatAutocomplete.prototype, "isOpen", {
77715
        /** Whether the autocomplete panel is open. */
77716
        get: /**
77717
         * Whether the autocomplete panel is open.
77718
         * @return {?}
77719
         */
77720
        function () { return this._isOpen && this.showPanel; },
77721
        enumerable: true,
77722
        configurable: true
77723
    });
77724
    Object.defineProperty(MatAutocomplete.prototype, "autoActiveFirstOption", {
77725
        get: /**
77726
         * Whether the first option should be highlighted when the autocomplete panel is opened.
77727
         * Can be configured globally through the `MAT_AUTOCOMPLETE_DEFAULT_OPTIONS` token.
77728
         * @return {?}
77729
         */
77730
        function () { return this._autoActiveFirstOption; },
77731
        set: /**
77732
         * @param {?} value
77733
         * @return {?}
77734
         */
77735
        function (value) {
77736
            this._autoActiveFirstOption = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_4__["coerceBooleanProperty"])(value);
77737
        },
77738
        enumerable: true,
77739
        configurable: true
77740
    });
77741
    Object.defineProperty(MatAutocomplete.prototype, "classList", {
77742
        set: /**
77743
         * Takes classes set on the host mat-autocomplete element and applies them to the panel
77744
         * inside the overlay container to allow for easy styling.
77745
         * @param {?} value
77746
         * @return {?}
77747
         */
77748
        function (value) {
77749
            var _this = this;
77750
            if (value && value.length) {
77751
                value.split(' ').forEach(function (className) { return _this._classList[className.trim()] = true; });
77752
                this._elementRef.nativeElement.className = '';
77753
            }
77754
        },
77755
        enumerable: true,
77756
        configurable: true
77757
    });
77758
    /**
77759
     * @return {?}
77760
     */
77761
    MatAutocomplete.prototype.ngAfterContentInit = /**
77762
     * @return {?}
77763
     */
77764
    function () {
77765
        this._keyManager = new _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_3__["ActiveDescendantKeyManager"](this.options).withWrap();
77766
        // Set the initial visibility state.
77767
        this._setVisibility();
77768
    };
77769
    /**
77770
     * Sets the panel scrollTop. This allows us to manually scroll to display options
77771
     * above or below the fold, as they are not actually being focused when active.
77772
     */
77773
    /**
77774
     * Sets the panel scrollTop. This allows us to manually scroll to display options
77775
     * above or below the fold, as they are not actually being focused when active.
77776
     * @param {?} scrollTop
77777
     * @return {?}
77778
     */
77779
    MatAutocomplete.prototype._setScrollTop = /**
77780
     * Sets the panel scrollTop. This allows us to manually scroll to display options
77781
     * above or below the fold, as they are not actually being focused when active.
77782
     * @param {?} scrollTop
77783
     * @return {?}
77784
     */
77785
    function (scrollTop) {
77786
        if (this.panel) {
77787
            this.panel.nativeElement.scrollTop = scrollTop;
77788
        }
77789
    };
77790
    /** Returns the panel's scrollTop. */
77791
    /**
77792
     * Returns the panel's scrollTop.
77793
     * @return {?}
77794
     */
77795
    MatAutocomplete.prototype._getScrollTop = /**
77796
     * Returns the panel's scrollTop.
77797
     * @return {?}
77798
     */
77799
    function () {
77800
        return this.panel ? this.panel.nativeElement.scrollTop : 0;
77801
    };
77802
    /** Panel should hide itself when the option list is empty. */
77803
    /**
77804
     * Panel should hide itself when the option list is empty.
77805
     * @return {?}
77806
     */
77807
    MatAutocomplete.prototype._setVisibility = /**
77808
     * Panel should hide itself when the option list is empty.
77809
     * @return {?}
77810
     */
77811
    function () {
77812
        this.showPanel = !!this.options.length;
77813
        this._classList['mat-autocomplete-visible'] = this.showPanel;
77814
        this._classList['mat-autocomplete-hidden'] = !this.showPanel;
77815
        this._changeDetectorRef.markForCheck();
77816
    };
77817
    /** Emits the `select` event. */
77818
    /**
77819
     * Emits the `select` event.
77820
     * @param {?} option
77821
     * @return {?}
77822
     */
77823
    MatAutocomplete.prototype._emitSelectEvent = /**
77824
     * Emits the `select` event.
77825
     * @param {?} option
77826
     * @return {?}
77827
     */
77828
    function (option) {
77829
        var /** @type {?} */ event = new MatAutocompleteSelectedEvent(this, option);
77830
        this.optionSelected.emit(event);
77831
    };
77832
    MatAutocomplete.decorators = [
77833
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"], args: [{selector: 'mat-autocomplete',
77834
                    template: "<ng-template><div class=\"mat-autocomplete-panel\" role=\"listbox\" [id]=\"id\" [ngClass]=\"_classList\" #panel><ng-content></ng-content></div></ng-template>",
77835
                    styles: [".mat-autocomplete-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;visibility:hidden;max-width:none;max-height:256px;position:relative;width:100%}.mat-autocomplete-panel:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mat-autocomplete-panel.mat-autocomplete-visible{visibility:visible}.mat-autocomplete-panel.mat-autocomplete-hidden{visibility:hidden}@media screen and (-ms-high-contrast:active){.mat-autocomplete-panel{outline:solid 1px}}"],
77836
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
77837
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
77838
                    exportAs: 'matAutocomplete',
77839
                    inputs: ['disableRipple'],
77840
                    host: {
77841
                        'class': 'mat-autocomplete'
77842
                    },
77843
                    providers: [
77844
                        { provide: _angular_material_core__WEBPACK_IMPORTED_MODULE_2__["MAT_OPTION_PARENT_COMPONENT"], useExisting: MatAutocomplete }
77845
                    ]
77846
                },] },
77847
    ];
77848
    /** @nocollapse */
77849
    MatAutocomplete.ctorParameters = function () { return [
77850
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"], },
77851
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
77852
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [MAT_AUTOCOMPLETE_DEFAULT_OPTIONS,] },] },
77853
    ]; };
77854
    MatAutocomplete.propDecorators = {
77855
        "template": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["TemplateRef"],] },],
77856
        "panel": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"], args: ['panel',] },],
77857
        "options": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChildren"], args: [_angular_material_core__WEBPACK_IMPORTED_MODULE_2__["MatOption"], { descendants: true },] },],
77858
        "optionGroups": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChildren"], args: [_angular_material_core__WEBPACK_IMPORTED_MODULE_2__["MatOptgroup"],] },],
77859
        "displayWith": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
77860
        "autoActiveFirstOption": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
77861
        "panelWidth": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
77862
        "optionSelected": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"] },],
77863
        "opened": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"] },],
77864
        "closed": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"] },],
77865
        "classList": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['class',] },],
77866
    };
77867
    return MatAutocomplete;
77868
}(_MatAutocompleteMixinBase));
77869
 
77870
/**
77871
 * @fileoverview added by tsickle
77872
 * @suppress {checkTypes} checked by tsc
77873
 */
77874
/**
77875
 * Directive applied to an element to make it usable
77876
 * as a connection point for an autocomplete panel.
77877
 */
77878
var MatAutocompleteOrigin = /** @class */ (function () {
77879
    function MatAutocompleteOrigin(elementRef) {
77880
        this.elementRef = elementRef;
77881
    }
77882
    MatAutocompleteOrigin.decorators = [
77883
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
77884
                    selector: '[matAutocompleteOrigin]',
77885
                    exportAs: 'matAutocompleteOrigin',
77886
                },] },
77887
    ];
77888
    /** @nocollapse */
77889
    MatAutocompleteOrigin.ctorParameters = function () { return [
77890
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
77891
    ]; };
77892
    return MatAutocompleteOrigin;
77893
}());
77894
 
77895
/**
77896
 * @fileoverview added by tsickle
77897
 * @suppress {checkTypes} checked by tsc
77898
 */
77899
/**
77900
 * The height of each autocomplete option.
77901
 */
77902
var /** @type {?} */ AUTOCOMPLETE_OPTION_HEIGHT = 48;
77903
/**
77904
 * The total height of the autocomplete panel.
77905
 */
77906
var /** @type {?} */ AUTOCOMPLETE_PANEL_HEIGHT = 256;
77907
/**
77908
 * Injection token that determines the scroll handling while the autocomplete panel is open.
77909
 */
77910
var /** @type {?} */ MAT_AUTOCOMPLETE_SCROLL_STRATEGY = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('mat-autocomplete-scroll-strategy');
77911
/**
77912
 * \@docs-private
77913
 * @param {?} overlay
77914
 * @return {?}
77915
 */
77916
function MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY(overlay) {
77917
    return function () { return overlay.scrollStrategies.reposition(); };
77918
}
77919
/**
77920
 * \@docs-private
77921
 */
77922
var /** @type {?} */ MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER = {
77923
    provide: MAT_AUTOCOMPLETE_SCROLL_STRATEGY,
77924
    deps: [_angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_7__["Overlay"]],
77925
    useFactory: MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY,
77926
};
77927
/**
77928
 * Provider that allows the autocomplete to register as a ControlValueAccessor.
77929
 * \@docs-private
77930
 */
77931
var /** @type {?} */ MAT_AUTOCOMPLETE_VALUE_ACCESSOR = {
77932
    provide: _angular_forms__WEBPACK_IMPORTED_MODULE_11__["NG_VALUE_ACCESSOR"],
77933
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(function () { return MatAutocompleteTrigger; }),
77934
    multi: true
77935
};
77936
/**
77937
 * Creates an error to be thrown when attempting to use an autocomplete trigger without a panel.
77938
 * @return {?}
77939
 */
77940
function getMatAutocompleteMissingPanelError() {
77941
    return Error('Attempting to open an undefined instance of `mat-autocomplete`. ' +
77942
        'Make sure that the id passed to the `matAutocomplete` is correct and that ' +
77943
        'you\'re attempting to open it after the ngAfterContentInit hook.');
77944
}
77945
var MatAutocompleteTrigger = /** @class */ (function () {
77946
    function MatAutocompleteTrigger(_element, _overlay, _viewContainerRef, _zone, _changeDetectorRef, _scrollStrategy, _dir, _formField, _document, _viewportRuler) {
77947
        var _this = this;
77948
        this._element = _element;
77949
        this._overlay = _overlay;
77950
        this._viewContainerRef = _viewContainerRef;
77951
        this._zone = _zone;
77952
        this._changeDetectorRef = _changeDetectorRef;
77953
        this._scrollStrategy = _scrollStrategy;
77954
        this._dir = _dir;
77955
        this._formField = _formField;
77956
        this._document = _document;
77957
        this._viewportRuler = _viewportRuler;
77958
        this._componentDestroyed = false;
77959
        this._autocompleteDisabled = false;
77960
        /**
77961
         * Whether or not the label state is being overridden.
77962
         */
77963
        this._manuallyFloatingLabel = false;
77964
        /**
77965
         * Subscription to viewport size changes.
77966
         */
77967
        this._viewportSubscription = rxjs__WEBPACK_IMPORTED_MODULE_13__["Subscription"].EMPTY;
77968
        /**
77969
         * Stream of keyboard events that can close the panel.
77970
         */
77971
        this._closeKeyEventStream = new rxjs__WEBPACK_IMPORTED_MODULE_13__["Subject"]();
77972
        /**
77973
         * `View -> model callback called when value changes`
77974
         */
77975
        this._onChange = function () { };
77976
        /**
77977
         * `View -> model callback called when autocomplete has been touched`
77978
         */
77979
        this._onTouched = function () { };
77980
        /**
77981
         * `autocomplete` attribute to be set on the input element.
77982
         * \@docs-private
77983
         */
77984
        this.autocompleteAttribute = 'off';
77985
        this._overlayAttached = false;
77986
        /**
77987
         * Stream of autocomplete option selections.
77988
         */
77989
        this.optionSelections = Object(rxjs__WEBPACK_IMPORTED_MODULE_13__["defer"])(function () {
77990
            if (_this.autocomplete && _this.autocomplete.options) {
77991
                return rxjs__WEBPACK_IMPORTED_MODULE_13__["merge"].apply(void 0, _this.autocomplete.options.map(function (option) { return option.onSelectionChange; }));
77992
            }
77993
            // If there are any subscribers before `ngAfterViewInit`, the `autocomplete` will be undefined.
77994
            // Return a stream that we'll replace with the real one once everything is in place.
77995
            return _this._zone.onStable
77996
                .asObservable()
77997
                .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["take"])(1), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["switchMap"])(function () { return _this.optionSelections; }));
77998
        });
77999
    }
78000
    Object.defineProperty(MatAutocompleteTrigger.prototype, "autocompleteDisabled", {
78001
        get: /**
78002
         * Whether the autocomplete is disabled. When disabled, the element will
78003
         * act as a regular input and the user won't be able to open the panel.
78004
         * @return {?}
78005
         */
78006
        function () { return this._autocompleteDisabled; },
78007
        set: /**
78008
         * @param {?} value
78009
         * @return {?}
78010
         */
78011
        function (value) {
78012
            this._autocompleteDisabled = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_4__["coerceBooleanProperty"])(value);
78013
        },
78014
        enumerable: true,
78015
        configurable: true
78016
    });
78017
    /**
78018
     * @return {?}
78019
     */
78020
    MatAutocompleteTrigger.prototype.ngOnDestroy = /**
78021
     * @return {?}
78022
     */
78023
    function () {
78024
        this._viewportSubscription.unsubscribe();
78025
        this._componentDestroyed = true;
78026
        this._destroyPanel();
78027
        this._closeKeyEventStream.complete();
78028
    };
78029
    Object.defineProperty(MatAutocompleteTrigger.prototype, "panelOpen", {
78030
        /** Whether or not the autocomplete panel is open. */
78031
        get: /**
78032
         * Whether or not the autocomplete panel is open.
78033
         * @return {?}
78034
         */
78035
        function () {
78036
            return this._overlayAttached && this.autocomplete.showPanel;
78037
        },
78038
        enumerable: true,
78039
        configurable: true
78040
    });
78041
    /** Opens the autocomplete suggestion panel. */
78042
    /**
78043
     * Opens the autocomplete suggestion panel.
78044
     * @return {?}
78045
     */
78046
    MatAutocompleteTrigger.prototype.openPanel = /**
78047
     * Opens the autocomplete suggestion panel.
78048
     * @return {?}
78049
     */
78050
    function () {
78051
        this._attachOverlay();
78052
        this._floatLabel();
78053
    };
78054
    /** Closes the autocomplete suggestion panel. */
78055
    /**
78056
     * Closes the autocomplete suggestion panel.
78057
     * @return {?}
78058
     */
78059
    MatAutocompleteTrigger.prototype.closePanel = /**
78060
     * Closes the autocomplete suggestion panel.
78061
     * @return {?}
78062
     */
78063
    function () {
78064
        this._resetLabel();
78065
        if (!this._overlayAttached) {
78066
            return;
78067
        }
78068
        if (this.panelOpen) {
78069
            // Only emit if the panel was visible.
78070
            this.autocomplete.closed.emit();
78071
        }
78072
        this.autocomplete._isOpen = this._overlayAttached = false;
78073
        if (this._overlayRef && this._overlayRef.hasAttached()) {
78074
            this._overlayRef.detach();
78075
            this._closingActionsSubscription.unsubscribe();
78076
        }
78077
        // Note that in some cases this can end up being called after the component is destroyed.
78078
        // Add a check to ensure that we don't try to run change detection on a destroyed view.
78079
        if (!this._componentDestroyed) {
78080
            // We need to trigger change detection manually, because
78081
            // `fromEvent` doesn't seem to do it at the proper time.
78082
            // This ensures that the label is reset when the
78083
            // user clicks outside.
78084
            this._changeDetectorRef.detectChanges();
78085
        }
78086
    };
78087
    Object.defineProperty(MatAutocompleteTrigger.prototype, "panelClosingActions", {
78088
        /**
78089
         * A stream of actions that should close the autocomplete panel, including
78090
         * when an option is selected, on blur, and when TAB is pressed.
78091
         */
78092
        get: /**
78093
         * A stream of actions that should close the autocomplete panel, including
78094
         * when an option is selected, on blur, and when TAB is pressed.
78095
         * @return {?}
78096
         */
78097
        function () {
78098
            var _this = this;
78099
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_13__["merge"])(this.optionSelections, this.autocomplete._keyManager.tabOut.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["filter"])(function () { return _this._overlayAttached; })), this._closeKeyEventStream, this._outsideClickStream, this._overlayRef ?
78100
                this._overlayRef.detachments().pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["filter"])(function () { return _this._overlayAttached; })) :
78101
                Object(rxjs__WEBPACK_IMPORTED_MODULE_13__["of"])()).pipe(
78102
            // Normalize the output so we return a consistent type.
78103
            Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["map"])(function (event) { return event instanceof _angular_material_core__WEBPACK_IMPORTED_MODULE_2__["MatOptionSelectionChange"] ? event : null; }));
78104
        },
78105
        enumerable: true,
78106
        configurable: true
78107
    });
78108
    Object.defineProperty(MatAutocompleteTrigger.prototype, "activeOption", {
78109
        /** The currently active option, coerced to MatOption type. */
78110
        get: /**
78111
         * The currently active option, coerced to MatOption type.
78112
         * @return {?}
78113
         */
78114
        function () {
78115
            if (this.autocomplete && this.autocomplete._keyManager) {
78116
                return this.autocomplete._keyManager.activeItem;
78117
            }
78118
            return null;
78119
        },
78120
        enumerable: true,
78121
        configurable: true
78122
    });
78123
    Object.defineProperty(MatAutocompleteTrigger.prototype, "_outsideClickStream", {
78124
        get: /**
78125
         * Stream of clicks outside of the autocomplete panel.
78126
         * @return {?}
78127
         */
78128
        function () {
78129
            var _this = this;
78130
            if (!this._document) {
78131
                return Object(rxjs__WEBPACK_IMPORTED_MODULE_13__["of"])(null);
78132
            }
78133
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_13__["merge"])(Object(rxjs__WEBPACK_IMPORTED_MODULE_13__["fromEvent"])(this._document, 'click'), Object(rxjs__WEBPACK_IMPORTED_MODULE_13__["fromEvent"])(this._document, 'touchend'))
78134
                .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["filter"])(function (event) {
78135
                var /** @type {?} */ clickTarget = /** @type {?} */ (event.target);
78136
                var /** @type {?} */ formField = _this._formField ?
78137
                    _this._formField._elementRef.nativeElement : null;
78138
                return _this._overlayAttached &&
78139
                    clickTarget !== _this._element.nativeElement &&
78140
                    (!formField || !formField.contains(clickTarget)) &&
78141
                    (!!_this._overlayRef && !_this._overlayRef.overlayElement.contains(clickTarget));
78142
            }));
78143
        },
78144
        enumerable: true,
78145
        configurable: true
78146
    });
78147
    // Implemented as part of ControlValueAccessor.
78148
    /**
78149
     * @param {?} value
78150
     * @return {?}
78151
     */
78152
    MatAutocompleteTrigger.prototype.writeValue = /**
78153
     * @param {?} value
78154
     * @return {?}
78155
     */
78156
    function (value) {
78157
        var _this = this;
78158
        Promise.resolve(null).then(function () { return _this._setTriggerValue(value); });
78159
    };
78160
    // Implemented as part of ControlValueAccessor.
78161
    /**
78162
     * @param {?} fn
78163
     * @return {?}
78164
     */
78165
    MatAutocompleteTrigger.prototype.registerOnChange = /**
78166
     * @param {?} fn
78167
     * @return {?}
78168
     */
78169
    function (fn) {
78170
        this._onChange = fn;
78171
    };
78172
    // Implemented as part of ControlValueAccessor.
78173
    /**
78174
     * @param {?} fn
78175
     * @return {?}
78176
     */
78177
    MatAutocompleteTrigger.prototype.registerOnTouched = /**
78178
     * @param {?} fn
78179
     * @return {?}
78180
     */
78181
    function (fn) {
78182
        this._onTouched = fn;
78183
    };
78184
    // Implemented as part of ControlValueAccessor.
78185
    /**
78186
     * @param {?} isDisabled
78187
     * @return {?}
78188
     */
78189
    MatAutocompleteTrigger.prototype.setDisabledState = /**
78190
     * @param {?} isDisabled
78191
     * @return {?}
78192
     */
78193
    function (isDisabled) {
78194
        this._element.nativeElement.disabled = isDisabled;
78195
    };
78196
    /**
78197
     * @param {?} event
78198
     * @return {?}
78199
     */
78200
    MatAutocompleteTrigger.prototype._handleKeydown = /**
78201
     * @param {?} event
78202
     * @return {?}
78203
     */
78204
    function (event) {
78205
        var /** @type {?} */ keyCode = event.keyCode;
78206
        // Prevent the default action on all escape key presses. This is here primarily to bring IE
78207
        // in line with other browsers. By default, pressing escape on IE will cause it to revert
78208
        // the input value to the one that it had on focus, however it won't dispatch any events
78209
        // which means that the model value will be out of sync with the view.
78210
        if (keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["ESCAPE"]) {
78211
            event.preventDefault();
78212
        }
78213
        // Close when pressing ESCAPE or ALT + UP_ARROW, based on the a11y guidelines.
78214
        // See: https://www.w3.org/TR/wai-aria-practices-1.1/#textbox-keyboard-interaction
78215
        if (this.panelOpen && (keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["ESCAPE"] || (keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["UP_ARROW"] && event.altKey))) {
78216
            this._resetActiveItem();
78217
            this._closeKeyEventStream.next();
78218
            event.stopPropagation();
78219
        }
78220
        else if (this.activeOption && keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["ENTER"] && this.panelOpen) {
78221
            this.activeOption._selectViaInteraction();
78222
            this._resetActiveItem();
78223
            event.preventDefault();
78224
        }
78225
        else if (this.autocomplete) {
78226
            var /** @type {?} */ prevActiveItem = this.autocomplete._keyManager.activeItem;
78227
            var /** @type {?} */ isArrowKey = keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["UP_ARROW"] || keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["DOWN_ARROW"];
78228
            if (this.panelOpen || keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["TAB"]) {
78229
                this.autocomplete._keyManager.onKeydown(event);
78230
            }
78231
            else if (isArrowKey && this._canOpen()) {
78232
                this.openPanel();
78233
            }
78234
            if (isArrowKey || this.autocomplete._keyManager.activeItem !== prevActiveItem) {
78235
                this._scrollToOption();
78236
            }
78237
        }
78238
    };
78239
    /**
78240
     * @param {?} event
78241
     * @return {?}
78242
     */
78243
    MatAutocompleteTrigger.prototype._handleInput = /**
78244
     * @param {?} event
78245
     * @return {?}
78246
     */
78247
    function (event) {
78248
        var /** @type {?} */ target = /** @type {?} */ (event.target);
78249
        var /** @type {?} */ value = target.value;
78250
        // Based on `NumberValueAccessor` from forms.
78251
        if (target.type === 'number') {
78252
            value = value == '' ? null : parseFloat(value);
78253
        }
78254
        // If the input has a placeholder, IE will fire the `input` event on page load,
78255
        // focus and blur, in addition to when the user actually changed the value. To
78256
        // filter out all of the extra events, we save the value on focus and between
78257
        // `input` events, and we check whether it changed.
78258
        // See: https://connect.microsoft.com/IE/feedback/details/885747/
78259
        if (this._previousValue !== value && document.activeElement === event.target) {
78260
            this._previousValue = value;
78261
            this._onChange(value);
78262
            if (this._canOpen()) {
78263
                this.openPanel();
78264
            }
78265
        }
78266
    };
78267
    /**
78268
     * @return {?}
78269
     */
78270
    MatAutocompleteTrigger.prototype._handleFocus = /**
78271
     * @return {?}
78272
     */
78273
    function () {
78274
        if (this._canOpen()) {
78275
            this._previousValue = this._element.nativeElement.value;
78276
            this._attachOverlay();
78277
            this._floatLabel(true);
78278
        }
78279
    };
78280
    /**
78281
     * In "auto" mode, the label will animate down as soon as focus is lost.
78282
     * This causes the value to jump when selecting an option with the mouse.
78283
     * This method manually floats the label until the panel can be closed.
78284
     * @param {?=} shouldAnimate Whether the label should be animated when it is floated.
78285
     * @return {?}
78286
     */
78287
    MatAutocompleteTrigger.prototype._floatLabel = /**
78288
     * In "auto" mode, the label will animate down as soon as focus is lost.
78289
     * This causes the value to jump when selecting an option with the mouse.
78290
     * This method manually floats the label until the panel can be closed.
78291
     * @param {?=} shouldAnimate Whether the label should be animated when it is floated.
78292
     * @return {?}
78293
     */
78294
    function (shouldAnimate) {
78295
        if (shouldAnimate === void 0) { shouldAnimate = false; }
78296
        if (this._formField && this._formField.floatLabel === 'auto') {
78297
            if (shouldAnimate) {
78298
                this._formField._animateAndLockLabel();
78299
            }
78300
            else {
78301
                this._formField.floatLabel = 'always';
78302
            }
78303
            this._manuallyFloatingLabel = true;
78304
        }
78305
    };
78306
    /**
78307
     * If the label has been manually elevated, return it to its normal state.
78308
     * @return {?}
78309
     */
78310
    MatAutocompleteTrigger.prototype._resetLabel = /**
78311
     * If the label has been manually elevated, return it to its normal state.
78312
     * @return {?}
78313
     */
78314
    function () {
78315
        if (this._manuallyFloatingLabel) {
78316
            this._formField.floatLabel = 'auto';
78317
            this._manuallyFloatingLabel = false;
78318
        }
78319
    };
78320
    /**
78321
     * Given that we are not actually focusing active options, we must manually adjust scroll
78322
     * to reveal options below the fold. First, we find the offset of the option from the top
78323
     * of the panel. If that offset is below the fold, the new scrollTop will be the offset -
78324
     * the panel height + the option height, so the active option will be just visible at the
78325
     * bottom of the panel. If that offset is above the top of the visible panel, the new scrollTop
78326
     * will become the offset. If that offset is visible within the panel already, the scrollTop is
78327
     * not adjusted.
78328
     * @return {?}
78329
     */
78330
    MatAutocompleteTrigger.prototype._scrollToOption = /**
78331
     * Given that we are not actually focusing active options, we must manually adjust scroll
78332
     * to reveal options below the fold. First, we find the offset of the option from the top
78333
     * of the panel. If that offset is below the fold, the new scrollTop will be the offset -
78334
     * the panel height + the option height, so the active option will be just visible at the
78335
     * bottom of the panel. If that offset is above the top of the visible panel, the new scrollTop
78336
     * will become the offset. If that offset is visible within the panel already, the scrollTop is
78337
     * not adjusted.
78338
     * @return {?}
78339
     */
78340
    function () {
78341
        var /** @type {?} */ index = this.autocomplete._keyManager.activeItemIndex || 0;
78342
        var /** @type {?} */ labelCount = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_2__["_countGroupLabelsBeforeOption"])(index, this.autocomplete.options, this.autocomplete.optionGroups);
78343
        var /** @type {?} */ newScrollPosition = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_2__["_getOptionScrollPosition"])(index + labelCount, AUTOCOMPLETE_OPTION_HEIGHT, this.autocomplete._getScrollTop(), AUTOCOMPLETE_PANEL_HEIGHT);
78344
        this.autocomplete._setScrollTop(newScrollPosition);
78345
    };
78346
    /**
78347
     * This method listens to a stream of panel closing actions and resets the
78348
     * stream every time the option list changes.
78349
     * @return {?}
78350
     */
78351
    MatAutocompleteTrigger.prototype._subscribeToClosingActions = /**
78352
     * This method listens to a stream of panel closing actions and resets the
78353
     * stream every time the option list changes.
78354
     * @return {?}
78355
     */
78356
    function () {
78357
        var _this = this;
78358
        var /** @type {?} */ firstStable = this._zone.onStable.asObservable().pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["take"])(1));
78359
        var /** @type {?} */ optionChanges = this.autocomplete.options.changes.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["tap"])(function () { return _this._positionStrategy.reapplyLastPosition(); }),
78360
        // Defer emitting to the stream until the next tick, because changing
78361
        // bindings in here will cause "changed after checked" errors.
78362
        Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["delay"])(0));
78363
        // When the zone is stable initially, and when the option list changes...
78364
        return Object(rxjs__WEBPACK_IMPORTED_MODULE_13__["merge"])(firstStable, optionChanges)
78365
            .pipe(
78366
        // create a new stream of panelClosingActions, replacing any previous streams
78367
        // that were created, and flatten it so our stream only emits closing events...
78368
        Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["switchMap"])(function () {
78369
            _this._resetActiveItem();
78370
            _this.autocomplete._setVisibility();
78371
            if (_this.panelOpen) {
78372
                /** @type {?} */ ((_this._overlayRef)).updatePosition();
78373
            }
78374
            return _this.panelClosingActions;
78375
        }),
78376
        // when the first closing event occurs...
78377
        Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["take"])(1))
78378
            .subscribe(function (event) { return _this._setValueAndClose(event); });
78379
    };
78380
    /**
78381
     * Destroys the autocomplete suggestion panel.
78382
     * @return {?}
78383
     */
78384
    MatAutocompleteTrigger.prototype._destroyPanel = /**
78385
     * Destroys the autocomplete suggestion panel.
78386
     * @return {?}
78387
     */
78388
    function () {
78389
        if (this._overlayRef) {
78390
            this.closePanel();
78391
            this._overlayRef.dispose();
78392
            this._overlayRef = null;
78393
        }
78394
    };
78395
    /**
78396
     * @param {?} value
78397
     * @return {?}
78398
     */
78399
    MatAutocompleteTrigger.prototype._setTriggerValue = /**
78400
     * @param {?} value
78401
     * @return {?}
78402
     */
78403
    function (value) {
78404
        var /** @type {?} */ toDisplay = this.autocomplete && this.autocomplete.displayWith ?
78405
            this.autocomplete.displayWith(value) :
78406
            value;
78407
        // Simply falling back to an empty string if the display value is falsy does not work properly.
78408
        // The display value can also be the number zero and shouldn't fall back to an empty string.
78409
        var /** @type {?} */ inputValue = toDisplay != null ? toDisplay : '';
78410
        // If it's used within a `MatFormField`, we should set it through the property so it can go
78411
        // through change detection.
78412
        if (this._formField) {
78413
            this._formField._control.value = inputValue;
78414
        }
78415
        else {
78416
            this._element.nativeElement.value = inputValue;
78417
        }
78418
    };
78419
    /**
78420
     * This method closes the panel, and if a value is specified, also sets the associated
78421
     * control to that value. It will also mark the control as dirty if this interaction
78422
     * stemmed from the user.
78423
     * @param {?} event
78424
     * @return {?}
78425
     */
78426
    MatAutocompleteTrigger.prototype._setValueAndClose = /**
78427
     * This method closes the panel, and if a value is specified, also sets the associated
78428
     * control to that value. It will also mark the control as dirty if this interaction
78429
     * stemmed from the user.
78430
     * @param {?} event
78431
     * @return {?}
78432
     */
78433
    function (event) {
78434
        if (event && event.source) {
78435
            this._clearPreviousSelectedOption(event.source);
78436
            this._setTriggerValue(event.source.value);
78437
            this._onChange(event.source.value);
78438
            this._element.nativeElement.focus();
78439
            this.autocomplete._emitSelectEvent(event.source);
78440
        }
78441
        this.closePanel();
78442
    };
78443
    /**
78444
     * Clear any previous selected option and emit a selection change event for this option
78445
     * @param {?} skip
78446
     * @return {?}
78447
     */
78448
    MatAutocompleteTrigger.prototype._clearPreviousSelectedOption = /**
78449
     * Clear any previous selected option and emit a selection change event for this option
78450
     * @param {?} skip
78451
     * @return {?}
78452
     */
78453
    function (skip) {
78454
        this.autocomplete.options.forEach(function (option) {
78455
            if (option != skip && option.selected) {
78456
                option.deselect();
78457
            }
78458
        });
78459
    };
78460
    /**
78461
     * @return {?}
78462
     */
78463
    MatAutocompleteTrigger.prototype._attachOverlay = /**
78464
     * @return {?}
78465
     */
78466
    function () {
78467
        var _this = this;
78468
        if (!this.autocomplete) {
78469
            throw getMatAutocompleteMissingPanelError();
78470
        }
78471
        if (!this._overlayRef) {
78472
            this._portal = new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_8__["TemplatePortal"](this.autocomplete.template, this._viewContainerRef);
78473
            this._overlayRef = this._overlay.create(this._getOverlayConfig());
78474
            if (this._viewportRuler) {
78475
                this._viewportSubscription = this._viewportRuler.change().subscribe(function () {
78476
                    if (_this.panelOpen && _this._overlayRef) {
78477
                        _this._overlayRef.updateSize({ width: _this._getPanelWidth() });
78478
                    }
78479
                });
78480
            }
78481
        }
78482
        else {
78483
            // Update the panel width and direction, in case anything has changed.
78484
            this._overlayRef.updateSize({ width: this._getPanelWidth() });
78485
        }
78486
        if (this._overlayRef && !this._overlayRef.hasAttached()) {
78487
            this._overlayRef.attach(this._portal);
78488
            this._closingActionsSubscription = this._subscribeToClosingActions();
78489
        }
78490
        var /** @type {?} */ wasOpen = this.panelOpen;
78491
        this.autocomplete._setVisibility();
78492
        this.autocomplete._isOpen = this._overlayAttached = true;
78493
        // We need to do an extra `panelOpen` check in here, because the
78494
        // autocomplete won't be shown if there are no options.
78495
        if (this.panelOpen && wasOpen !== this.panelOpen) {
78496
            this.autocomplete.opened.emit();
78497
        }
78498
    };
78499
    /**
78500
     * @return {?}
78501
     */
78502
    MatAutocompleteTrigger.prototype._getOverlayConfig = /**
78503
     * @return {?}
78504
     */
78505
    function () {
78506
        return new _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_7__["OverlayConfig"]({
78507
            positionStrategy: this._getOverlayPosition(),
78508
            scrollStrategy: this._scrollStrategy(),
78509
            width: this._getPanelWidth(),
78510
            direction: this._dir
78511
        });
78512
    };
78513
    /**
78514
     * @return {?}
78515
     */
78516
    MatAutocompleteTrigger.prototype._getOverlayPosition = /**
78517
     * @return {?}
78518
     */
78519
    function () {
78520
        this._positionStrategy = this._overlay.position()
78521
            .flexibleConnectedTo(this._getConnectedElement())
78522
            .withFlexibleDimensions(false)
78523
            .withPush(false)
78524
            .withPositions([
78525
            { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },
78526
            { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' }
78527
        ]);
78528
        return this._positionStrategy;
78529
    };
78530
    /**
78531
     * @return {?}
78532
     */
78533
    MatAutocompleteTrigger.prototype._getConnectedElement = /**
78534
     * @return {?}
78535
     */
78536
    function () {
78537
        if (this.connectedTo) {
78538
            return this.connectedTo.elementRef;
78539
        }
78540
        return this._formField ? this._formField.getConnectedOverlayOrigin() : this._element;
78541
    };
78542
    /**
78543
     * @return {?}
78544
     */
78545
    MatAutocompleteTrigger.prototype._getPanelWidth = /**
78546
     * @return {?}
78547
     */
78548
    function () {
78549
        return this.autocomplete.panelWidth || this._getHostWidth();
78550
    };
78551
    /**
78552
     * Returns the width of the input element, so the panel width can match it.
78553
     * @return {?}
78554
     */
78555
    MatAutocompleteTrigger.prototype._getHostWidth = /**
78556
     * Returns the width of the input element, so the panel width can match it.
78557
     * @return {?}
78558
     */
78559
    function () {
78560
        return this._getConnectedElement().nativeElement.getBoundingClientRect().width;
78561
    };
78562
    /**
78563
     * Resets the active item to -1 so arrow events will activate the
78564
     * correct options, or to 0 if the consumer opted into it.
78565
     * @return {?}
78566
     */
78567
    MatAutocompleteTrigger.prototype._resetActiveItem = /**
78568
     * Resets the active item to -1 so arrow events will activate the
78569
     * correct options, or to 0 if the consumer opted into it.
78570
     * @return {?}
78571
     */
78572
    function () {
78573
        this.autocomplete._keyManager.setActiveItem(this.autocomplete.autoActiveFirstOption ? 0 : -1);
78574
    };
78575
    /**
78576
     * Determines whether the panel can be opened.
78577
     * @return {?}
78578
     */
78579
    MatAutocompleteTrigger.prototype._canOpen = /**
78580
     * Determines whether the panel can be opened.
78581
     * @return {?}
78582
     */
78583
    function () {
78584
        var /** @type {?} */ element = this._element.nativeElement;
78585
        return !element.readOnly && !element.disabled && !this._autocompleteDisabled;
78586
    };
78587
    MatAutocompleteTrigger.decorators = [
78588
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
78589
                    selector: "input[matAutocomplete], textarea[matAutocomplete]",
78590
                    host: {
78591
                        '[attr.autocomplete]': 'autocompleteAttribute',
78592
                        '[attr.role]': 'autocompleteDisabled ? null : "combobox"',
78593
                        '[attr.aria-autocomplete]': 'autocompleteDisabled ? null : "list"',
78594
                        '[attr.aria-activedescendant]': 'activeOption?.id',
78595
                        '[attr.aria-expanded]': 'autocompleteDisabled ? null : panelOpen.toString()',
78596
                        '[attr.aria-owns]': '(autocompleteDisabled || !panelOpen) ? null : autocomplete?.id',
78597
                        // Note: we use `focusin`, as opposed to `focus`, in order to open the panel
78598
                        // a little earlier. This avoids issues where IE delays the focusing of the input.
78599
                        '(focusin)': '_handleFocus()',
78600
                        '(blur)': '_onTouched()',
78601
                        '(input)': '_handleInput($event)',
78602
                        '(keydown)': '_handleKeydown($event)',
78603
                    },
78604
                    exportAs: 'matAutocompleteTrigger',
78605
                    providers: [MAT_AUTOCOMPLETE_VALUE_ACCESSOR]
78606
                },] },
78607
    ];
78608
    /** @nocollapse */
78609
    MatAutocompleteTrigger.ctorParameters = function () { return [
78610
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
78611
        { type: _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_7__["Overlay"], },
78612
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"], },
78613
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"], },
78614
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"], },
78615
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [MAT_AUTOCOMPLETE_SCROLL_STRATEGY,] },] },
78616
        { type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_5__["Directionality"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] },] },
78617
        { type: _angular_material_form_field__WEBPACK_IMPORTED_MODULE_12__["MatFormField"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Host"] },] },
78618
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_9__["DOCUMENT"],] },] },
78619
        { type: _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_7__["ViewportRuler"], },
78620
    ]; };
78621
    MatAutocompleteTrigger.propDecorators = {
78622
        "autocomplete": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['matAutocomplete',] },],
78623
        "connectedTo": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['matAutocompleteConnectedTo',] },],
78624
        "autocompleteAttribute": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['autocomplete',] },],
78625
        "autocompleteDisabled": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['matAutocompleteDisabled',] },],
78626
    };
78627
    return MatAutocompleteTrigger;
78628
}());
78629
 
78630
/**
78631
 * @fileoverview added by tsickle
78632
 * @suppress {checkTypes} checked by tsc
78633
 */
78634
var MatAutocompleteModule = /** @class */ (function () {
78635
    function MatAutocompleteModule() {
78636
    }
78637
    MatAutocompleteModule.decorators = [
78638
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{
78639
                    imports: [_angular_material_core__WEBPACK_IMPORTED_MODULE_2__["MatOptionModule"], _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_7__["OverlayModule"], _angular_material_core__WEBPACK_IMPORTED_MODULE_2__["MatCommonModule"], _angular_common__WEBPACK_IMPORTED_MODULE_9__["CommonModule"]],
78640
                    exports: [
78641
                        MatAutocomplete,
78642
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_2__["MatOptionModule"],
78643
                        MatAutocompleteTrigger,
78644
                        MatAutocompleteOrigin,
78645
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_2__["MatCommonModule"]
78646
                    ],
78647
                    declarations: [MatAutocomplete, MatAutocompleteTrigger, MatAutocompleteOrigin],
78648
                    providers: [MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER],
78649
                },] },
78650
    ];
78651
    return MatAutocompleteModule;
78652
}());
78653
 
78654
/**
78655
 * @fileoverview added by tsickle
78656
 * @suppress {checkTypes} checked by tsc
78657
 */
78658
 
78659
/**
78660
 * @fileoverview added by tsickle
78661
 * @suppress {checkTypes} checked by tsc
78662
 */
78663
 
78664
 
78665
//# sourceMappingURL=autocomplete.es5.js.map
78666
 
78667
 
78668
/***/ }),
78669
 
78670
/***/ "./node_modules/@angular/material/esm5/badge.es5.js":
78671
/*!**********************************************************!*\
78672
  !*** ./node_modules/@angular/material/esm5/badge.es5.js ***!
78673
  \**********************************************************/
78674
/*! exports provided: MatBadgeModule, MatBadge */
78675
/***/ (function(module, __webpack_exports__, __webpack_require__) {
78676
 
78677
"use strict";
78678
__webpack_require__.r(__webpack_exports__);
78679
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatBadgeModule", function() { return MatBadgeModule; });
78680
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatBadge", function() { return MatBadge; });
78681
/* harmony import */ var _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/cdk/a11y */ "./node_modules/@angular/cdk/esm5/a11y.es5.js");
78682
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
78683
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
78684
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
78685
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
78686
/**
78687
 * @license
78688
 * Copyright Google LLC All Rights Reserved.
78689
 *
78690
 * Use of this source code is governed by an MIT-style license that can be
78691
 * found in the LICENSE file at https://angular.io/license
78692
 */
78693
 
78694
 
78695
 
78696
 
78697
 
78698
 
78699
/**
78700
 * @fileoverview added by tsickle
78701
 * @suppress {checkTypes} checked by tsc
78702
 */
78703
var /** @type {?} */ nextId = 0;
78704
/**
78705
 * Directive to display a text badge.
78706
 */
78707
var MatBadge = /** @class */ (function () {
78708
    function MatBadge(_document, _ngZone, _elementRef, _ariaDescriber) {
78709
        this._document = _document;
78710
        this._ngZone = _ngZone;
78711
        this._elementRef = _elementRef;
78712
        this._ariaDescriber = _ariaDescriber;
78713
        /**
78714
         * Whether the badge has any content.
78715
         */
78716
        this._hasContent = false;
78717
        this._color = 'primary';
78718
        this._overlap = true;
78719
        /**
78720
         * Position the badge should reside.
78721
         * Accepts any combination of 'above'|'below' and 'before'|'after'
78722
         */
78723
        this.position = 'above after';
78724
        /**
78725
         * Size of the badge. Can be 'small', 'medium', or 'large'.
78726
         */
78727
        this.size = 'medium';
78728
        /**
78729
         * Unique id for the badge
78730
         */
78731
        this._id = nextId++;
78732
    }
78733
    Object.defineProperty(MatBadge.prototype, "color", {
78734
        get: /**
78735
         * The color of the badge. Can be `primary`, `accent`, or `warn`.
78736
         * @return {?}
78737
         */
78738
        function () { return this._color; },
78739
        set: /**
78740
         * @param {?} value
78741
         * @return {?}
78742
         */
78743
        function (value) {
78744
            this._setColor(value);
78745
            this._color = value;
78746
        },
78747
        enumerable: true,
78748
        configurable: true
78749
    });
78750
    Object.defineProperty(MatBadge.prototype, "overlap", {
78751
        get: /**
78752
         * Whether the badge should overlap its contents or not
78753
         * @return {?}
78754
         */
78755
        function () { return this._overlap; },
78756
        set: /**
78757
         * @param {?} val
78758
         * @return {?}
78759
         */
78760
        function (val) {
78761
            this._overlap = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceBooleanProperty"])(val);
78762
        },
78763
        enumerable: true,
78764
        configurable: true
78765
    });
78766
    Object.defineProperty(MatBadge.prototype, "content", {
78767
        get: /**
78768
         * The content for the badge
78769
         * @return {?}
78770
         */
78771
        function () { return this._content; },
78772
        set: /**
78773
         * @param {?} value
78774
         * @return {?}
78775
         */
78776
        function (value) {
78777
            this._content = value;
78778
            this._hasContent = value != null && ("" + value).trim().length > 0;
78779
            this._updateTextContent();
78780
        },
78781
        enumerable: true,
78782
        configurable: true
78783
    });
78784
    Object.defineProperty(MatBadge.prototype, "description", {
78785
        get: /**
78786
         * Message used to describe the decorated element via aria-describedby
78787
         * @return {?}
78788
         */
78789
        function () { return this._description; },
78790
        set: /**
78791
         * @param {?} newDescription
78792
         * @return {?}
78793
         */
78794
        function (newDescription) {
78795
            if (newDescription !== this._description) {
78796
                this._updateHostAriaDescription(newDescription, this._description);
78797
                this._description = newDescription;
78798
            }
78799
        },
78800
        enumerable: true,
78801
        configurable: true
78802
    });
78803
    Object.defineProperty(MatBadge.prototype, "hidden", {
78804
        get: /**
78805
         * Whether the badge is hidden.
78806
         * @return {?}
78807
         */
78808
        function () { return this._hidden; },
78809
        set: /**
78810
         * @param {?} val
78811
         * @return {?}
78812
         */
78813
        function (val) {
78814
            this._hidden = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceBooleanProperty"])(val);
78815
        },
78816
        enumerable: true,
78817
        configurable: true
78818
    });
78819
    /** Whether the badge is above the host or not */
78820
    /**
78821
     * Whether the badge is above the host or not
78822
     * @return {?}
78823
     */
78824
    MatBadge.prototype.isAbove = /**
78825
     * Whether the badge is above the host or not
78826
     * @return {?}
78827
     */
78828
    function () {
78829
        return this.position.indexOf('below') === -1;
78830
    };
78831
    /** Whether the badge is after the host or not */
78832
    /**
78833
     * Whether the badge is after the host or not
78834
     * @return {?}
78835
     */
78836
    MatBadge.prototype.isAfter = /**
78837
     * Whether the badge is after the host or not
78838
     * @return {?}
78839
     */
78840
    function () {
78841
        return this.position.indexOf('before') === -1;
78842
    };
78843
    /**
78844
     * @return {?}
78845
     */
78846
    MatBadge.prototype.ngOnDestroy = /**
78847
     * @return {?}
78848
     */
78849
    function () {
78850
        if (this.description && this._badgeElement) {
78851
            this._ariaDescriber.removeDescription(this._badgeElement, this.description);
78852
        }
78853
    };
78854
    /**
78855
     * Injects a span element into the DOM with the content.
78856
     * @return {?}
78857
     */
78858
    MatBadge.prototype._updateTextContent = /**
78859
     * Injects a span element into the DOM with the content.
78860
     * @return {?}
78861
     */
78862
    function () {
78863
        if (!this._badgeElement) {
78864
            this._badgeElement = this._createBadgeElement();
78865
        }
78866
        else {
78867
            this._badgeElement.textContent = this.content;
78868
        }
78869
        return this._badgeElement;
78870
    };
78871
    /**
78872
     * Creates the badge element
78873
     * @return {?}
78874
     */
78875
    MatBadge.prototype._createBadgeElement = /**
78876
     * Creates the badge element
78877
     * @return {?}
78878
     */
78879
    function () {
78880
        var /** @type {?} */ badgeElement = this._document.createElement('span');
78881
        var /** @type {?} */ activeClass = 'mat-badge-active';
78882
        badgeElement.setAttribute('id', "mat-badge-content-" + this._id);
78883
        badgeElement.classList.add('mat-badge-content');
78884
        badgeElement.textContent = this.content;
78885
        if (this.description) {
78886
            badgeElement.setAttribute('aria-label', this.description);
78887
        }
78888
        this._elementRef.nativeElement.appendChild(badgeElement);
78889
        // animate in after insertion
78890
        if (typeof requestAnimationFrame === 'function') {
78891
            this._ngZone.runOutsideAngular(function () {
78892
                requestAnimationFrame(function () {
78893
                    badgeElement.classList.add(activeClass);
78894
                });
78895
            });
78896
        }
78897
        else {
78898
            badgeElement.classList.add(activeClass);
78899
        }
78900
        return badgeElement;
78901
    };
78902
    /**
78903
     * Sets the aria-label property on the element
78904
     * @param {?} newDescription
78905
     * @param {?} oldDescription
78906
     * @return {?}
78907
     */
78908
    MatBadge.prototype._updateHostAriaDescription = /**
78909
     * Sets the aria-label property on the element
78910
     * @param {?} newDescription
78911
     * @param {?} oldDescription
78912
     * @return {?}
78913
     */
78914
    function (newDescription, oldDescription) {
78915
        // ensure content available before setting label
78916
        var /** @type {?} */ content = this._updateTextContent();
78917
        if (oldDescription) {
78918
            this._ariaDescriber.removeDescription(content, oldDescription);
78919
        }
78920
        if (newDescription) {
78921
            this._ariaDescriber.describe(content, newDescription);
78922
        }
78923
    };
78924
    /**
78925
     * Adds css theme class given the color to the component host
78926
     * @param {?} colorPalette
78927
     * @return {?}
78928
     */
78929
    MatBadge.prototype._setColor = /**
78930
     * Adds css theme class given the color to the component host
78931
     * @param {?} colorPalette
78932
     * @return {?}
78933
     */
78934
    function (colorPalette) {
78935
        if (colorPalette !== this._color) {
78936
            if (this._color) {
78937
                this._elementRef.nativeElement.classList.remove("mat-badge-" + this._color);
78938
            }
78939
            if (colorPalette) {
78940
                this._elementRef.nativeElement.classList.add("mat-badge-" + colorPalette);
78941
            }
78942
        }
78943
    };
78944
    MatBadge.decorators = [
78945
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Directive"], args: [{
78946
                    selector: '[matBadge]',
78947
                    host: {
78948
                        'class': 'mat-badge',
78949
                        '[class.mat-badge-overlap]': 'overlap',
78950
                        '[class.mat-badge-above]': 'isAbove()',
78951
                        '[class.mat-badge-below]': '!isAbove()',
78952
                        '[class.mat-badge-before]': '!isAfter()',
78953
                        '[class.mat-badge-after]': 'isAfter()',
78954
                        '[class.mat-badge-small]': 'size === "small"',
78955
                        '[class.mat-badge-medium]': 'size === "medium"',
78956
                        '[class.mat-badge-large]': 'size === "large"',
78957
                        '[class.mat-badge-hidden]': 'hidden || !_hasContent',
78958
                    },
78959
                },] },
78960
    ];
78961
    /** @nocollapse */
78962
    MatBadge.ctorParameters = function () { return [
78963
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_2__["DOCUMENT"],] },] },
78964
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["NgZone"], },
78965
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ElementRef"], },
78966
        { type: _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_0__["AriaDescriber"], },
78967
    ]; };
78968
    MatBadge.propDecorators = {
78969
        "color": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Input"], args: ['matBadgeColor',] },],
78970
        "overlap": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Input"], args: ['matBadgeOverlap',] },],
78971
        "position": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Input"], args: ['matBadgePosition',] },],
78972
        "content": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Input"], args: ['matBadge',] },],
78973
        "description": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Input"], args: ['matBadgeDescription',] },],
78974
        "size": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Input"], args: ['matBadgeSize',] },],
78975
        "hidden": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Input"], args: ['matBadgeHidden',] },],
78976
    };
78977
    return MatBadge;
78978
}());
78979
 
78980
/**
78981
 * @fileoverview added by tsickle
78982
 * @suppress {checkTypes} checked by tsc
78983
 */
78984
var MatBadgeModule = /** @class */ (function () {
78985
    function MatBadgeModule() {
78986
    }
78987
    MatBadgeModule.decorators = [
78988
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["NgModule"], args: [{
78989
                    imports: [
78990
                        _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_0__["A11yModule"],
78991
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_4__["MatCommonModule"]
78992
                    ],
78993
                    exports: [MatBadge],
78994
                    declarations: [MatBadge],
78995
                },] },
78996
    ];
78997
    return MatBadgeModule;
78998
}());
78999
 
79000
/**
79001
 * @fileoverview added by tsickle
79002
 * @suppress {checkTypes} checked by tsc
79003
 */
79004
 
79005
/**
79006
 * @fileoverview added by tsickle
79007
 * @suppress {checkTypes} checked by tsc
79008
 */
79009
 
79010
 
79011
//# sourceMappingURL=badge.es5.js.map
79012
 
79013
 
79014
/***/ }),
79015
 
79016
/***/ "./node_modules/@angular/material/esm5/bottom-sheet.es5.js":
79017
/*!*****************************************************************!*\
79018
  !*** ./node_modules/@angular/material/esm5/bottom-sheet.es5.js ***!
79019
  \*****************************************************************/
79020
/*! exports provided: MatBottomSheetModule, MatBottomSheet, MAT_BOTTOM_SHEET_DATA, MatBottomSheetConfig, MatBottomSheetContainer, matBottomSheetAnimations, MatBottomSheetRef */
79021
/***/ (function(module, __webpack_exports__, __webpack_require__) {
79022
 
79023
"use strict";
79024
__webpack_require__.r(__webpack_exports__);
79025
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatBottomSheetModule", function() { return MatBottomSheetModule; });
79026
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatBottomSheet", function() { return MatBottomSheet; });
79027
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_BOTTOM_SHEET_DATA", function() { return MAT_BOTTOM_SHEET_DATA; });
79028
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatBottomSheetConfig", function() { return MatBottomSheetConfig; });
79029
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatBottomSheetContainer", function() { return MatBottomSheetContainer; });
79030
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matBottomSheetAnimations", function() { return matBottomSheetAnimations; });
79031
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatBottomSheetRef", function() { return MatBottomSheetRef; });
79032
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
79033
/* harmony import */ var _angular_animations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/animations */ "./node_modules/@angular/animations/fesm5/animations.js");
79034
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
79035
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
79036
/* harmony import */ var _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/cdk/portal */ "./node_modules/@angular/cdk/esm5/portal.es5.js");
79037
/* harmony import */ var _angular_cdk_layout__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/cdk/layout */ "./node_modules/@angular/cdk/esm5/layout.es5.js");
79038
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
79039
/* harmony import */ var _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/cdk/a11y */ "./node_modules/@angular/cdk/esm5/a11y.es5.js");
79040
/* harmony import */ var _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/cdk/overlay */ "./node_modules/@angular/cdk/esm5/overlay.es5.js");
79041
/* harmony import */ var _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/cdk/keycodes */ "./node_modules/@angular/cdk/esm5/keycodes.es5.js");
79042
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
79043
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
79044
/* harmony import */ var _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/cdk/bidi */ "./node_modules/@angular/cdk/esm5/bidi.es5.js");
79045
/**
79046
 * @license
79047
 * Copyright Google LLC All Rights Reserved.
79048
 *
79049
 * Use of this source code is governed by an MIT-style license that can be
79050
 * found in the LICENSE file at https://angular.io/license
79051
 */
79052
 
79053
 
79054
 
79055
 
79056
 
79057
 
79058
 
79059
 
79060
 
79061
 
79062
 
79063
 
79064
 
79065
 
79066
/**
79067
 * @fileoverview added by tsickle
79068
 * @suppress {checkTypes} checked by tsc
79069
 */
79070
/**
79071
 * Injection token that can be used to access the data that was passed in to a bottom sheet.
79072
 */
79073
var /** @type {?} */ MAT_BOTTOM_SHEET_DATA = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('MatBottomSheetData');
79074
/**
79075
 * Configuration used when opening a bottom sheet.
79076
 * @template D
79077
 */
79078
var  /**
79079
 * Configuration used when opening a bottom sheet.
79080
 * @template D
79081
 */
79082
MatBottomSheetConfig = /** @class */ (function () {
79083
    function MatBottomSheetConfig() {
79084
        /**
79085
         * Data being injected into the child component.
79086
         */
79087
        this.data = null;
79088
        /**
79089
         * Whether the bottom sheet has a backdrop.
79090
         */
79091
        this.hasBackdrop = true;
79092
        /**
79093
         * Whether the user can use escape or clicking outside to close the bottom sheet.
79094
         */
79095
        this.disableClose = false;
79096
        /**
79097
         * Aria label to assign to the bottom sheet element.
79098
         */
79099
        this.ariaLabel = null;
79100
        /**
79101
         * Whether the bottom sheet should close when the user goes backwards/forwards in history.
79102
         */
79103
        this.closeOnNavigation = true;
79104
    }
79105
    return MatBottomSheetConfig;
79106
}());
79107
 
79108
/**
79109
 * @fileoverview added by tsickle
79110
 * @suppress {checkTypes} checked by tsc
79111
 */
79112
/**
79113
 * Animations used by the Material bottom sheet.
79114
 */
79115
var /** @type {?} */ matBottomSheetAnimations = {
79116
    /** Animation that shows and hides a bottom sheet. */
79117
    bottomSheetState: Object(_angular_animations__WEBPACK_IMPORTED_MODULE_1__["trigger"])('state', [
79118
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_1__["state"])('void, hidden', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_1__["style"])({ transform: 'translateY(100%)' })),
79119
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_1__["state"])('visible', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_1__["style"])({ transform: 'translateY(0%)' })),
79120
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_1__["transition"])('visible => void, visible => hidden', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_1__["animate"])(_angular_material_core__WEBPACK_IMPORTED_MODULE_2__["AnimationDurations"].COMPLEX + " " + _angular_material_core__WEBPACK_IMPORTED_MODULE_2__["AnimationCurves"].ACCELERATION_CURVE)),
79121
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_1__["transition"])('void => visible', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_1__["animate"])(_angular_material_core__WEBPACK_IMPORTED_MODULE_2__["AnimationDurations"].EXITING + " " + _angular_material_core__WEBPACK_IMPORTED_MODULE_2__["AnimationCurves"].DECELERATION_CURVE)),
79122
    ])
79123
};
79124
 
79125
/**
79126
 * @fileoverview added by tsickle
79127
 * @suppress {checkTypes} checked by tsc
79128
 */
79129
/**
79130
 * Internal component that wraps user-provided bottom sheet content.
79131
 * \@docs-private
79132
 */
79133
var MatBottomSheetContainer = /** @class */ (function (_super) {
79134
    Object(tslib__WEBPACK_IMPORTED_MODULE_3__["__extends"])(MatBottomSheetContainer, _super);
79135
    function MatBottomSheetContainer(_elementRef, _changeDetectorRef, _focusTrapFactory, breakpointObserver, document, bottomSheetConfig) {
79136
        var _this = _super.call(this) || this;
79137
        _this._elementRef = _elementRef;
79138
        _this._changeDetectorRef = _changeDetectorRef;
79139
        _this._focusTrapFactory = _focusTrapFactory;
79140
        _this.bottomSheetConfig = bottomSheetConfig;
79141
        /**
79142
         * The state of the bottom sheet animations.
79143
         */
79144
        _this._animationState = 'void';
79145
        /**
79146
         * Emits whenever the state of the animation changes.
79147
         */
79148
        _this._animationStateChanged = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
79149
        /**
79150
         * Element that was focused before the bottom sheet was opened.
79151
         */
79152
        _this._elementFocusedBeforeOpened = null;
79153
        _this._document = document;
79154
        _this._breakpointSubscription = breakpointObserver
79155
            .observe([_angular_cdk_layout__WEBPACK_IMPORTED_MODULE_5__["Breakpoints"].Medium, _angular_cdk_layout__WEBPACK_IMPORTED_MODULE_5__["Breakpoints"].Large, _angular_cdk_layout__WEBPACK_IMPORTED_MODULE_5__["Breakpoints"].XLarge])
79156
            .subscribe(function () {
79157
            _this._toggleClass('mat-bottom-sheet-container-medium', breakpointObserver.isMatched(_angular_cdk_layout__WEBPACK_IMPORTED_MODULE_5__["Breakpoints"].Medium));
79158
            _this._toggleClass('mat-bottom-sheet-container-large', breakpointObserver.isMatched(_angular_cdk_layout__WEBPACK_IMPORTED_MODULE_5__["Breakpoints"].Large));
79159
            _this._toggleClass('mat-bottom-sheet-container-xlarge', breakpointObserver.isMatched(_angular_cdk_layout__WEBPACK_IMPORTED_MODULE_5__["Breakpoints"].XLarge));
79160
        });
79161
        return _this;
79162
    }
79163
    /** Attach a component portal as content to this bottom sheet container. */
79164
    /**
79165
     * Attach a component portal as content to this bottom sheet container.
79166
     * @template T
79167
     * @param {?} portal
79168
     * @return {?}
79169
     */
79170
    MatBottomSheetContainer.prototype.attachComponentPortal = /**
79171
     * Attach a component portal as content to this bottom sheet container.
79172
     * @template T
79173
     * @param {?} portal
79174
     * @return {?}
79175
     */
79176
    function (portal) {
79177
        this._validatePortalAttached();
79178
        this._setPanelClass();
79179
        this._savePreviouslyFocusedElement();
79180
        return this._portalOutlet.attachComponentPortal(portal);
79181
    };
79182
    /** Attach a template portal as content to this bottom sheet container. */
79183
    /**
79184
     * Attach a template portal as content to this bottom sheet container.
79185
     * @template C
79186
     * @param {?} portal
79187
     * @return {?}
79188
     */
79189
    MatBottomSheetContainer.prototype.attachTemplatePortal = /**
79190
     * Attach a template portal as content to this bottom sheet container.
79191
     * @template C
79192
     * @param {?} portal
79193
     * @return {?}
79194
     */
79195
    function (portal) {
79196
        this._validatePortalAttached();
79197
        this._setPanelClass();
79198
        this._savePreviouslyFocusedElement();
79199
        return this._portalOutlet.attachTemplatePortal(portal);
79200
    };
79201
    /** Begin animation of bottom sheet entrance into view. */
79202
    /**
79203
     * Begin animation of bottom sheet entrance into view.
79204
     * @return {?}
79205
     */
79206
    MatBottomSheetContainer.prototype.enter = /**
79207
     * Begin animation of bottom sheet entrance into view.
79208
     * @return {?}
79209
     */
79210
    function () {
79211
        if (!this._destroyed) {
79212
            this._animationState = 'visible';
79213
            this._changeDetectorRef.detectChanges();
79214
        }
79215
    };
79216
    /** Begin animation of the bottom sheet exiting from view. */
79217
    /**
79218
     * Begin animation of the bottom sheet exiting from view.
79219
     * @return {?}
79220
     */
79221
    MatBottomSheetContainer.prototype.exit = /**
79222
     * Begin animation of the bottom sheet exiting from view.
79223
     * @return {?}
79224
     */
79225
    function () {
79226
        if (!this._destroyed) {
79227
            this._animationState = 'hidden';
79228
            this._changeDetectorRef.markForCheck();
79229
        }
79230
    };
79231
    /**
79232
     * @return {?}
79233
     */
79234
    MatBottomSheetContainer.prototype.ngOnDestroy = /**
79235
     * @return {?}
79236
     */
79237
    function () {
79238
        this._breakpointSubscription.unsubscribe();
79239
        this._destroyed = true;
79240
    };
79241
    /**
79242
     * @param {?} event
79243
     * @return {?}
79244
     */
79245
    MatBottomSheetContainer.prototype._onAnimationDone = /**
79246
     * @param {?} event
79247
     * @return {?}
79248
     */
79249
    function (event) {
79250
        if (event.toState === 'visible') {
79251
            this._trapFocus();
79252
        }
79253
        else if (event.toState === 'hidden') {
79254
            this._restoreFocus();
79255
        }
79256
        this._animationStateChanged.emit(event);
79257
    };
79258
    /**
79259
     * @param {?} event
79260
     * @return {?}
79261
     */
79262
    MatBottomSheetContainer.prototype._onAnimationStart = /**
79263
     * @param {?} event
79264
     * @return {?}
79265
     */
79266
    function (event) {
79267
        this._animationStateChanged.emit(event);
79268
    };
79269
    /**
79270
     * @param {?} cssClass
79271
     * @param {?} add
79272
     * @return {?}
79273
     */
79274
    MatBottomSheetContainer.prototype._toggleClass = /**
79275
     * @param {?} cssClass
79276
     * @param {?} add
79277
     * @return {?}
79278
     */
79279
    function (cssClass, add) {
79280
        var /** @type {?} */ classList = this._elementRef.nativeElement.classList;
79281
        add ? classList.add(cssClass) : classList.remove(cssClass);
79282
    };
79283
    /**
79284
     * @return {?}
79285
     */
79286
    MatBottomSheetContainer.prototype._validatePortalAttached = /**
79287
     * @return {?}
79288
     */
79289
    function () {
79290
        if (this._portalOutlet.hasAttached()) {
79291
            throw Error('Attempting to attach bottom sheet content after content is already attached');
79292
        }
79293
    };
79294
    /**
79295
     * @return {?}
79296
     */
79297
    MatBottomSheetContainer.prototype._setPanelClass = /**
79298
     * @return {?}
79299
     */
79300
    function () {
79301
        var /** @type {?} */ element = this._elementRef.nativeElement;
79302
        var /** @type {?} */ panelClass = this.bottomSheetConfig.panelClass;
79303
        if (Array.isArray(panelClass)) {
79304
            // Note that we can't use a spread here, because IE doesn't support multiple arguments.
79305
            panelClass.forEach(function (cssClass) { return element.classList.add(cssClass); });
79306
        }
79307
        else if (panelClass) {
79308
            element.classList.add(panelClass);
79309
        }
79310
    };
79311
    /**
79312
     * Moves the focus inside the focus trap.
79313
     * @return {?}
79314
     */
79315
    MatBottomSheetContainer.prototype._trapFocus = /**
79316
     * Moves the focus inside the focus trap.
79317
     * @return {?}
79318
     */
79319
    function () {
79320
        if (!this._focusTrap) {
79321
            this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);
79322
        }
79323
        this._focusTrap.focusInitialElementWhenReady();
79324
    };
79325
    /**
79326
     * Restores focus to the element that was focused before the bottom sheet opened.
79327
     * @return {?}
79328
     */
79329
    MatBottomSheetContainer.prototype._restoreFocus = /**
79330
     * Restores focus to the element that was focused before the bottom sheet opened.
79331
     * @return {?}
79332
     */
79333
    function () {
79334
        var /** @type {?} */ toFocus = this._elementFocusedBeforeOpened;
79335
        // We need the extra check, because IE can set the `activeElement` to null in some cases.
79336
        if (toFocus && typeof toFocus.focus === 'function') {
79337
            toFocus.focus();
79338
        }
79339
        if (this._focusTrap) {
79340
            this._focusTrap.destroy();
79341
        }
79342
    };
79343
    /**
79344
     * Saves a reference to the element that was focused before the bottom sheet was opened.
79345
     * @return {?}
79346
     */
79347
    MatBottomSheetContainer.prototype._savePreviouslyFocusedElement = /**
79348
     * Saves a reference to the element that was focused before the bottom sheet was opened.
79349
     * @return {?}
79350
     */
79351
    function () {
79352
        var _this = this;
79353
        this._elementFocusedBeforeOpened = /** @type {?} */ (this._document.activeElement);
79354
        // The `focus` method isn't available during server-side rendering.
79355
        if (this._elementRef.nativeElement.focus) {
79356
            Promise.resolve().then(function () { return _this._elementRef.nativeElement.focus(); });
79357
        }
79358
    };
79359
    MatBottomSheetContainer.decorators = [
79360
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-bottom-sheet-container',
79361
                    template: "<ng-template cdkPortalOutlet></ng-template>",
79362
                    styles: [".mat-bottom-sheet-container{box-shadow:0 8px 10px -5px rgba(0,0,0,.2),0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12);padding:8px 16px;min-width:100vw;box-sizing:border-box;display:block;outline:0;max-height:80vh;overflow:auto}@media screen and (-ms-high-contrast:active){.mat-bottom-sheet-container{outline:1px solid}}.mat-bottom-sheet-container-medium{min-width:384px;max-width:calc(100vw - 128px)}.mat-bottom-sheet-container-large{min-width:512px;max-width:calc(100vw - 256px)}.mat-bottom-sheet-container-xlarge{min-width:576px;max-width:calc(100vw - 384px)}"],
79363
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
79364
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
79365
                    animations: [matBottomSheetAnimations.bottomSheetState],
79366
                    host: {
79367
                        'class': 'mat-bottom-sheet-container',
79368
                        'tabindex': '-1',
79369
                        'role': 'dialog',
79370
                        'aria-modal': 'true',
79371
                        '[attr.aria-label]': 'bottomSheetConfig?.ariaLabel',
79372
                        '[@state]': '_animationState',
79373
                        '(@state.start)': '_onAnimationStart($event)',
79374
                        '(@state.done)': '_onAnimationDone($event)'
79375
                    },
79376
                },] },
79377
    ];
79378
    /** @nocollapse */
79379
    MatBottomSheetContainer.ctorParameters = function () { return [
79380
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
79381
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"], },
79382
        { type: _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_7__["FocusTrapFactory"], },
79383
        { type: _angular_cdk_layout__WEBPACK_IMPORTED_MODULE_5__["BreakpointObserver"], },
79384
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_6__["DOCUMENT"],] },] },
79385
        { type: MatBottomSheetConfig, },
79386
    ]; };
79387
    MatBottomSheetContainer.propDecorators = {
79388
        "_portalOutlet": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: [_angular_cdk_portal__WEBPACK_IMPORTED_MODULE_4__["CdkPortalOutlet"],] },],
79389
    };
79390
    return MatBottomSheetContainer;
79391
}(_angular_cdk_portal__WEBPACK_IMPORTED_MODULE_4__["BasePortalOutlet"]));
79392
 
79393
/**
79394
 * @fileoverview added by tsickle
79395
 * @suppress {checkTypes} checked by tsc
79396
 */
79397
var MatBottomSheetModule = /** @class */ (function () {
79398
    function MatBottomSheetModule() {
79399
    }
79400
    MatBottomSheetModule.decorators = [
79401
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
79402
                    imports: [
79403
                        _angular_common__WEBPACK_IMPORTED_MODULE_6__["CommonModule"],
79404
                        _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_8__["OverlayModule"],
79405
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_2__["MatCommonModule"],
79406
                        _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_4__["PortalModule"],
79407
                    ],
79408
                    exports: [MatBottomSheetContainer, _angular_material_core__WEBPACK_IMPORTED_MODULE_2__["MatCommonModule"]],
79409
                    declarations: [MatBottomSheetContainer],
79410
                    entryComponents: [MatBottomSheetContainer],
79411
                },] },
79412
    ];
79413
    return MatBottomSheetModule;
79414
}());
79415
 
79416
/**
79417
 * @fileoverview added by tsickle
79418
 * @suppress {checkTypes} checked by tsc
79419
 */
79420
/**
79421
 * Reference to a bottom sheet dispatched from the bottom sheet service.
79422
 * @template T, R
79423
 */
79424
var  /**
79425
 * Reference to a bottom sheet dispatched from the bottom sheet service.
79426
 * @template T, R
79427
 */
79428
MatBottomSheetRef = /** @class */ (function () {
79429
    function MatBottomSheetRef(containerInstance, _overlayRef, location) {
79430
        var _this = this;
79431
        this._overlayRef = _overlayRef;
79432
        /**
79433
         * Subject for notifying the user that the bottom sheet has been dismissed.
79434
         */
79435
        this._afterDismissed = new rxjs__WEBPACK_IMPORTED_MODULE_10__["Subject"]();
79436
        /**
79437
         * Subject for notifying the user that the bottom sheet has opened and appeared.
79438
         */
79439
        this._afterOpened = new rxjs__WEBPACK_IMPORTED_MODULE_10__["Subject"]();
79440
        /**
79441
         * Subscription to changes in the user's location.
79442
         */
79443
        this._locationChanges = rxjs__WEBPACK_IMPORTED_MODULE_10__["Subscription"].EMPTY;
79444
        this.containerInstance = containerInstance;
79445
        // Emit when opening animation completes
79446
        containerInstance._animationStateChanged.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_11__["filter"])(function (event) { return event.phaseName === 'done' && event.toState === 'visible'; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_11__["take"])(1))
79447
            .subscribe(function () {
79448
            _this._afterOpened.next();
79449
            _this._afterOpened.complete();
79450
        });
79451
        // Dispose overlay when closing animation is complete
79452
        containerInstance._animationStateChanged.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_11__["filter"])(function (event) { return event.phaseName === 'done' && event.toState === 'hidden'; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_11__["take"])(1))
79453
            .subscribe(function () {
79454
            _this._locationChanges.unsubscribe();
79455
            _this._overlayRef.dispose();
79456
            _this._afterDismissed.next(_this._result);
79457
            _this._afterDismissed.complete();
79458
        });
79459
        if (!containerInstance.bottomSheetConfig.disableClose) {
79460
            Object(rxjs__WEBPACK_IMPORTED_MODULE_10__["merge"])(_overlayRef.backdropClick(), _overlayRef.keydownEvents().pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_11__["filter"])(function (event) { return event.keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__["ESCAPE"]; }))).subscribe(function () { return _this.dismiss(); });
79461
        }
79462
        if (location) {
79463
            this._locationChanges = location.subscribe(function () {
79464
                if (containerInstance.bottomSheetConfig.closeOnNavigation) {
79465
                    _this.dismiss();
79466
                }
79467
            });
79468
        }
79469
    }
79470
    /**
79471
     * Dismisses the bottom sheet.
79472
     * @param result Data to be passed back to the bottom sheet opener.
79473
     */
79474
    /**
79475
     * Dismisses the bottom sheet.
79476
     * @param {?=} result Data to be passed back to the bottom sheet opener.
79477
     * @return {?}
79478
     */
79479
    MatBottomSheetRef.prototype.dismiss = /**
79480
     * Dismisses the bottom sheet.
79481
     * @param {?=} result Data to be passed back to the bottom sheet opener.
79482
     * @return {?}
79483
     */
79484
    function (result) {
79485
        var _this = this;
79486
        if (!this._afterDismissed.closed) {
79487
            // Transition the backdrop in parallel to the bottom sheet.
79488
            this.containerInstance._animationStateChanged.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_11__["filter"])(function (event) { return event.phaseName === 'start'; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_11__["take"])(1)).subscribe(function () { return _this._overlayRef.detachBackdrop(); });
79489
            this._result = result;
79490
            this.containerInstance.exit();
79491
        }
79492
    };
79493
    /** Gets an observable that is notified when the bottom sheet is finished closing. */
79494
    /**
79495
     * Gets an observable that is notified when the bottom sheet is finished closing.
79496
     * @return {?}
79497
     */
79498
    MatBottomSheetRef.prototype.afterDismissed = /**
79499
     * Gets an observable that is notified when the bottom sheet is finished closing.
79500
     * @return {?}
79501
     */
79502
    function () {
79503
        return this._afterDismissed.asObservable();
79504
    };
79505
    /** Gets an observable that is notified when the bottom sheet has opened and appeared. */
79506
    /**
79507
     * Gets an observable that is notified when the bottom sheet has opened and appeared.
79508
     * @return {?}
79509
     */
79510
    MatBottomSheetRef.prototype.afterOpened = /**
79511
     * Gets an observable that is notified when the bottom sheet has opened and appeared.
79512
     * @return {?}
79513
     */
79514
    function () {
79515
        return this._afterOpened.asObservable();
79516
    };
79517
    /**
79518
     * Gets an observable that emits when the overlay's backdrop has been clicked.
79519
     */
79520
    /**
79521
     * Gets an observable that emits when the overlay's backdrop has been clicked.
79522
     * @return {?}
79523
     */
79524
    MatBottomSheetRef.prototype.backdropClick = /**
79525
     * Gets an observable that emits when the overlay's backdrop has been clicked.
79526
     * @return {?}
79527
     */
79528
    function () {
79529
        return this._overlayRef.backdropClick();
79530
    };
79531
    /**
79532
     * Gets an observable that emits when keydown events are targeted on the overlay.
79533
     */
79534
    /**
79535
     * Gets an observable that emits when keydown events are targeted on the overlay.
79536
     * @return {?}
79537
     */
79538
    MatBottomSheetRef.prototype.keydownEvents = /**
79539
     * Gets an observable that emits when keydown events are targeted on the overlay.
79540
     * @return {?}
79541
     */
79542
    function () {
79543
        return this._overlayRef.keydownEvents();
79544
    };
79545
    return MatBottomSheetRef;
79546
}());
79547
 
79548
/**
79549
 * @fileoverview added by tsickle
79550
 * @suppress {checkTypes} checked by tsc
79551
 */
79552
/**
79553
 * Service to trigger Material Design bottom sheets.
79554
 */
79555
var MatBottomSheet = /** @class */ (function () {
79556
    function MatBottomSheet(_overlay, _injector, _parentBottomSheet, _location) {
79557
        this._overlay = _overlay;
79558
        this._injector = _injector;
79559
        this._parentBottomSheet = _parentBottomSheet;
79560
        this._location = _location;
79561
        this._bottomSheetRefAtThisLevel = null;
79562
    }
79563
    Object.defineProperty(MatBottomSheet.prototype, "_openedBottomSheetRef", {
79564
        /** Reference to the currently opened bottom sheet. */
79565
        get: /**
79566
         * Reference to the currently opened bottom sheet.
79567
         * @return {?}
79568
         */
79569
        function () {
79570
            var /** @type {?} */ parent = this._parentBottomSheet;
79571
            return parent ? parent._openedBottomSheetRef : this._bottomSheetRefAtThisLevel;
79572
        },
79573
        set: /**
79574
         * @param {?} value
79575
         * @return {?}
79576
         */
79577
        function (value) {
79578
            if (this._parentBottomSheet) {
79579
                this._parentBottomSheet._openedBottomSheetRef = value;
79580
            }
79581
            else {
79582
                this._bottomSheetRefAtThisLevel = value;
79583
            }
79584
        },
79585
        enumerable: true,
79586
        configurable: true
79587
    });
79588
    /**
79589
     * @template T, D, R
79590
     * @param {?} componentOrTemplateRef
79591
     * @param {?=} config
79592
     * @return {?}
79593
     */
79594
    MatBottomSheet.prototype.open = /**
79595
     * @template T, D, R
79596
     * @param {?} componentOrTemplateRef
79597
     * @param {?=} config
79598
     * @return {?}
79599
     */
79600
    function (componentOrTemplateRef, config) {
79601
        var _this = this;
79602
        var /** @type {?} */ _config = _applyConfigDefaults(config);
79603
        var /** @type {?} */ overlayRef = this._createOverlay(_config);
79604
        var /** @type {?} */ container = this._attachContainer(overlayRef, _config);
79605
        var /** @type {?} */ ref = new MatBottomSheetRef(container, overlayRef, this._location);
79606
        if (componentOrTemplateRef instanceof _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]) {
79607
            container.attachTemplatePortal(new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_4__["TemplatePortal"](componentOrTemplateRef, /** @type {?} */ ((null)), /** @type {?} */ ({
79608
                $implicit: _config.data,
79609
                bottomSheetRef: ref
79610
            })));
79611
        }
79612
        else {
79613
            var /** @type {?} */ portal = new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_4__["ComponentPortal"](componentOrTemplateRef, undefined, this._createInjector(_config, ref));
79614
            var /** @type {?} */ contentRef = container.attachComponentPortal(portal);
79615
            ref.instance = contentRef.instance;
79616
        }
79617
        // When the bottom sheet is dismissed, clear the reference to it.
79618
        ref.afterDismissed().subscribe(function () {
79619
            // Clear the bottom sheet ref if it hasn't already been replaced by a newer one.
79620
            if (_this._openedBottomSheetRef == ref) {
79621
                _this._openedBottomSheetRef = null;
79622
            }
79623
        });
79624
        if (this._openedBottomSheetRef) {
79625
            // If a bottom sheet is already in view, dismiss it and enter the
79626
            // new bottom sheet after exit animation is complete.
79627
            this._openedBottomSheetRef.afterDismissed().subscribe(function () { return ref.containerInstance.enter(); });
79628
            this._openedBottomSheetRef.dismiss();
79629
        }
79630
        else {
79631
            // If no bottom sheet is in view, enter the new bottom sheet.
79632
            ref.containerInstance.enter();
79633
        }
79634
        this._openedBottomSheetRef = ref;
79635
        return ref;
79636
    };
79637
    /**
79638
     * Dismisses the currently-visible bottom sheet.
79639
     */
79640
    /**
79641
     * Dismisses the currently-visible bottom sheet.
79642
     * @return {?}
79643
     */
79644
    MatBottomSheet.prototype.dismiss = /**
79645
     * Dismisses the currently-visible bottom sheet.
79646
     * @return {?}
79647
     */
79648
    function () {
79649
        if (this._openedBottomSheetRef) {
79650
            this._openedBottomSheetRef.dismiss();
79651
        }
79652
    };
79653
    /**
79654
     * Attaches the bottom sheet container component to the overlay.
79655
     * @param {?} overlayRef
79656
     * @param {?} config
79657
     * @return {?}
79658
     */
79659
    MatBottomSheet.prototype._attachContainer = /**
79660
     * Attaches the bottom sheet container component to the overlay.
79661
     * @param {?} overlayRef
79662
     * @param {?} config
79663
     * @return {?}
79664
     */
79665
    function (overlayRef, config) {
79666
        var /** @type {?} */ userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
79667
        var /** @type {?} */ injector = new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_4__["PortalInjector"](userInjector || this._injector, new WeakMap([
79668
            [MatBottomSheetConfig, config]
79669
        ]));
79670
        var /** @type {?} */ containerPortal = new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_4__["ComponentPortal"](MatBottomSheetContainer, config.viewContainerRef, injector);
79671
        var /** @type {?} */ containerRef = overlayRef.attach(containerPortal);
79672
        return containerRef.instance;
79673
    };
79674
    /**
79675
     * Creates a new overlay and places it in the correct location.
79676
     * @param {?} config The user-specified bottom sheet config.
79677
     * @return {?}
79678
     */
79679
    MatBottomSheet.prototype._createOverlay = /**
79680
     * Creates a new overlay and places it in the correct location.
79681
     * @param {?} config The user-specified bottom sheet config.
79682
     * @return {?}
79683
     */
79684
    function (config) {
79685
        var /** @type {?} */ overlayConfig = new _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_8__["OverlayConfig"]({
79686
            direction: config.direction,
79687
            hasBackdrop: config.hasBackdrop,
79688
            maxWidth: '100%',
79689
            scrollStrategy: this._overlay.scrollStrategies.block(),
79690
            positionStrategy: this._overlay.position()
79691
                .global()
79692
                .centerHorizontally()
79693
                .bottom('0')
79694
        });
79695
        if (config.backdropClass) {
79696
            overlayConfig.backdropClass = config.backdropClass;
79697
        }
79698
        return this._overlay.create(overlayConfig);
79699
    };
79700
    /**
79701
     * Creates an injector to be used inside of a bottom sheet component.
79702
     * @template T
79703
     * @param {?} config Config that was used to create the bottom sheet.
79704
     * @param {?} bottomSheetRef Reference to the bottom sheet.
79705
     * @return {?}
79706
     */
79707
    MatBottomSheet.prototype._createInjector = /**
79708
     * Creates an injector to be used inside of a bottom sheet component.
79709
     * @template T
79710
     * @param {?} config Config that was used to create the bottom sheet.
79711
     * @param {?} bottomSheetRef Reference to the bottom sheet.
79712
     * @return {?}
79713
     */
79714
    function (config, bottomSheetRef) {
79715
        var /** @type {?} */ userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
79716
        var /** @type {?} */ injectionTokens = new WeakMap([
79717
            [MatBottomSheetRef, bottomSheetRef],
79718
            [MAT_BOTTOM_SHEET_DATA, config.data]
79719
        ]);
79720
        if (config.direction &&
79721
            (!userInjector || !userInjector.get(_angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_12__["Directionality"], null))) {
79722
            injectionTokens.set(_angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_12__["Directionality"], {
79723
                value: config.direction,
79724
                change: Object(rxjs__WEBPACK_IMPORTED_MODULE_10__["of"])()
79725
            });
79726
        }
79727
        return new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_4__["PortalInjector"](userInjector || this._injector, injectionTokens);
79728
    };
79729
    MatBottomSheet.decorators = [
79730
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"], args: [{ providedIn: MatBottomSheetModule },] },
79731
    ];
79732
    /** @nocollapse */
79733
    MatBottomSheet.ctorParameters = function () { return [
79734
        { type: _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_8__["Overlay"], },
79735
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"], },
79736
        { type: MatBottomSheet, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["SkipSelf"] },] },
79737
        { type: _angular_common__WEBPACK_IMPORTED_MODULE_6__["Location"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
79738
    ]; };
79739
    /** @nocollapse */ MatBottomSheet.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["defineInjectable"])({ factory: function MatBottomSheet_Factory() { return new MatBottomSheet(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["inject"])(_angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_8__["Overlay"]), Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_0__["INJECTOR"]), Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["inject"])(MatBottomSheet, 12), Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["inject"])(_angular_common__WEBPACK_IMPORTED_MODULE_6__["Location"], 8)); }, token: MatBottomSheet, providedIn: MatBottomSheetModule });
79740
    return MatBottomSheet;
79741
}());
79742
/**
79743
 * Applies default options to the bottom sheet config.
79744
 * @param {?=} config The configuration to which the defaults will be applied.
79745
 * @return {?} The new configuration object with defaults applied.
79746
 */
79747
function _applyConfigDefaults(config) {
79748
    return Object(tslib__WEBPACK_IMPORTED_MODULE_3__["__assign"])({}, new MatBottomSheetConfig(), config);
79749
}
79750
 
79751
/**
79752
 * @fileoverview added by tsickle
79753
 * @suppress {checkTypes} checked by tsc
79754
 */
79755
 
79756
/**
79757
 * @fileoverview added by tsickle
79758
 * @suppress {checkTypes} checked by tsc
79759
 */
79760
 
79761
 
79762
//# sourceMappingURL=bottom-sheet.es5.js.map
79763
 
79764
 
79765
/***/ }),
79766
 
79767
/***/ "./node_modules/@angular/material/esm5/button-toggle.es5.js":
79768
/*!******************************************************************!*\
79769
  !*** ./node_modules/@angular/material/esm5/button-toggle.es5.js ***!
79770
  \******************************************************************/
79771
/*! exports provided: MatButtonToggleGroupBase, _MatButtonToggleGroupMixinBase, MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR, MatButtonToggleGroupMultiple, MatButtonToggleChange, MatButtonToggleGroup, MatButtonToggleBase, _MatButtonToggleMixinBase, MatButtonToggle, MatButtonToggleModule */
79772
/***/ (function(module, __webpack_exports__, __webpack_require__) {
79773
 
79774
"use strict";
79775
__webpack_require__.r(__webpack_exports__);
79776
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatButtonToggleGroupBase", function() { return MatButtonToggleGroupBase; });
79777
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatButtonToggleGroupMixinBase", function() { return _MatButtonToggleGroupMixinBase; });
79778
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR", function() { return MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR; });
79779
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatButtonToggleGroupMultiple", function() { return MatButtonToggleGroupMultiple; });
79780
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatButtonToggleChange", function() { return MatButtonToggleChange; });
79781
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatButtonToggleGroup", function() { return MatButtonToggleGroup; });
79782
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatButtonToggleBase", function() { return MatButtonToggleBase; });
79783
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatButtonToggleMixinBase", function() { return _MatButtonToggleMixinBase; });
79784
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatButtonToggle", function() { return MatButtonToggle; });
79785
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatButtonToggleModule", function() { return MatButtonToggleModule; });
79786
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
79787
/* harmony import */ var _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/cdk/a11y */ "./node_modules/@angular/cdk/esm5/a11y.es5.js");
79788
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
79789
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
79790
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
79791
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
79792
/* harmony import */ var _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/cdk/collections */ "./node_modules/@angular/cdk/esm5/collections.es5.js");
79793
/**
79794
 * @license
79795
 * Copyright Google LLC All Rights Reserved.
79796
 *
79797
 * Use of this source code is governed by an MIT-style license that can be
79798
 * found in the LICENSE file at https://angular.io/license
79799
 */
79800
 
79801
 
79802
 
79803
 
79804
 
79805
 
79806
 
79807
 
79808
/**
79809
 * @fileoverview added by tsickle
79810
 * @suppress {checkTypes} checked by tsc
79811
 */
79812
/**
79813
 * \@docs-private
79814
 */
79815
var  /**
79816
 * \@docs-private
79817
 */
79818
MatButtonToggleGroupBase = /** @class */ (function () {
79819
    function MatButtonToggleGroupBase() {
79820
    }
79821
    return MatButtonToggleGroupBase;
79822
}());
79823
var /** @type {?} */ _MatButtonToggleGroupMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_5__["mixinDisabled"])(MatButtonToggleGroupBase);
79824
/**
79825
 * Provider Expression that allows mat-button-toggle-group to register as a ControlValueAccessor.
79826
 * This allows it to support [(ngModel)].
79827
 * \@docs-private
79828
 */
79829
var /** @type {?} */ MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR = {
79830
    provide: _angular_forms__WEBPACK_IMPORTED_MODULE_4__["NG_VALUE_ACCESSOR"],
79831
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["forwardRef"])(function () { return MatButtonToggleGroup; }),
79832
    multi: true
79833
};
79834
/**
79835
 * @deprecated Use `MatButtonToggleGroup` instead.
79836
 * \@breaking-change 7.0.0
79837
 */
79838
var  /**
79839
 * @deprecated Use `MatButtonToggleGroup` instead.
79840
 * \@breaking-change 7.0.0
79841
 */
79842
MatButtonToggleGroupMultiple = /** @class */ (function () {
79843
    function MatButtonToggleGroupMultiple() {
79844
    }
79845
    return MatButtonToggleGroupMultiple;
79846
}());
79847
var /** @type {?} */ _uniqueIdCounter = 0;
79848
/**
79849
 * Change event object emitted by MatButtonToggle.
79850
 */
79851
var  /**
79852
 * Change event object emitted by MatButtonToggle.
79853
 */
79854
MatButtonToggleChange = /** @class */ (function () {
79855
    function MatButtonToggleChange(source, value) {
79856
        this.source = source;
79857
        this.value = value;
79858
    }
79859
    return MatButtonToggleChange;
79860
}());
79861
/**
79862
 * Exclusive selection button toggle group that behaves like a radio-button group.
79863
 */
79864
var MatButtonToggleGroup = /** @class */ (function (_super) {
79865
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatButtonToggleGroup, _super);
79866
    function MatButtonToggleGroup(_changeDetector) {
79867
        var _this = _super.call(this) || this;
79868
        _this._changeDetector = _changeDetector;
79869
        _this._vertical = false;
79870
        _this._multiple = false;
79871
        /**
79872
         * The method to be called in order to update ngModel.
79873
         * Now `ngModel` binding is not supported in multiple selection mode.
79874
         */
79875
        _this._controlValueAccessorChangeFn = function () { };
79876
        /**
79877
         * onTouch function registered via registerOnTouch (ControlValueAccessor).
79878
         */
79879
        _this._onTouched = function () { };
79880
        _this._name = "mat-button-toggle-group-" + _uniqueIdCounter++;
79881
        /**
79882
         * Event that emits whenever the value of the group changes.
79883
         * Used to facilitate two-way data binding.
79884
         * \@docs-private
79885
         */
79886
        _this.valueChange = new _angular_core__WEBPACK_IMPORTED_MODULE_3__["EventEmitter"]();
79887
        /**
79888
         * Event emitted when the group's value changes.
79889
         */
79890
        _this.change = new _angular_core__WEBPACK_IMPORTED_MODULE_3__["EventEmitter"]();
79891
        return _this;
79892
    }
79893
    Object.defineProperty(MatButtonToggleGroup.prototype, "name", {
79894
        get: /**
79895
         * `name` attribute for the underlying `input` element.
79896
         * @return {?}
79897
         */
79898
        function () { return this._name; },
79899
        set: /**
79900
         * @param {?} value
79901
         * @return {?}
79902
         */
79903
        function (value) {
79904
            var _this = this;
79905
            this._name = value;
79906
            if (this._buttonToggles) {
79907
                this._buttonToggles.forEach(function (toggle) { return toggle.name = _this._name; });
79908
            }
79909
        },
79910
        enumerable: true,
79911
        configurable: true
79912
    });
79913
    Object.defineProperty(MatButtonToggleGroup.prototype, "vertical", {
79914
        get: /**
79915
         * Whether the toggle group is vertical.
79916
         * @return {?}
79917
         */
79918
        function () { return this._vertical; },
79919
        set: /**
79920
         * @param {?} value
79921
         * @return {?}
79922
         */
79923
        function (value) {
79924
            this._vertical = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__["coerceBooleanProperty"])(value);
79925
        },
79926
        enumerable: true,
79927
        configurable: true
79928
    });
79929
    Object.defineProperty(MatButtonToggleGroup.prototype, "value", {
79930
        get: /**
79931
         * Value of the toggle group.
79932
         * @return {?}
79933
         */
79934
        function () {
79935
            var /** @type {?} */ selected = this._selectionModel ? this._selectionModel.selected : [];
79936
            if (this.multiple) {
79937
                return selected.map(function (toggle) { return toggle.value; });
79938
            }
79939
            return selected[0] ? selected[0].value : undefined;
79940
        },
79941
        set: /**
79942
         * @param {?} newValue
79943
         * @return {?}
79944
         */
79945
        function (newValue) {
79946
            this._setSelectionByValue(newValue);
79947
            this.valueChange.emit(this.value);
79948
        },
79949
        enumerable: true,
79950
        configurable: true
79951
    });
79952
    Object.defineProperty(MatButtonToggleGroup.prototype, "selected", {
79953
        /** Selected button toggles in the group. */
79954
        get: /**
79955
         * Selected button toggles in the group.
79956
         * @return {?}
79957
         */
79958
        function () {
79959
            var /** @type {?} */ selected = this._selectionModel.selected;
79960
            return this.multiple ? selected : (selected[0] || null);
79961
        },
79962
        enumerable: true,
79963
        configurable: true
79964
    });
79965
    Object.defineProperty(MatButtonToggleGroup.prototype, "multiple", {
79966
        get: /**
79967
         * Whether multiple button toggles can be selected.
79968
         * @return {?}
79969
         */
79970
        function () { return this._multiple; },
79971
        set: /**
79972
         * @param {?} value
79973
         * @return {?}
79974
         */
79975
        function (value) {
79976
            this._multiple = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__["coerceBooleanProperty"])(value);
79977
        },
79978
        enumerable: true,
79979
        configurable: true
79980
    });
79981
    /**
79982
     * @return {?}
79983
     */
79984
    MatButtonToggleGroup.prototype.ngOnInit = /**
79985
     * @return {?}
79986
     */
79987
    function () {
79988
        this._selectionModel = new _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_6__["SelectionModel"](this.multiple, undefined, false);
79989
    };
79990
    /**
79991
     * @return {?}
79992
     */
79993
    MatButtonToggleGroup.prototype.ngAfterContentInit = /**
79994
     * @return {?}
79995
     */
79996
    function () {
79997
        (_a = this._selectionModel).select.apply(_a, this._buttonToggles.filter(function (toggle) { return toggle.checked; }));
79998
        var _a;
79999
    };
80000
    /**
80001
     * Sets the model value. Implemented as part of ControlValueAccessor.
80002
     * @param value Value to be set to the model.
80003
     */
80004
    /**
80005
     * Sets the model value. Implemented as part of ControlValueAccessor.
80006
     * @param {?} value Value to be set to the model.
80007
     * @return {?}
80008
     */
80009
    MatButtonToggleGroup.prototype.writeValue = /**
80010
     * Sets the model value. Implemented as part of ControlValueAccessor.
80011
     * @param {?} value Value to be set to the model.
80012
     * @return {?}
80013
     */
80014
    function (value) {
80015
        this.value = value;
80016
        this._changeDetector.markForCheck();
80017
    };
80018
    // Implemented as part of ControlValueAccessor.
80019
    /**
80020
     * @param {?} fn
80021
     * @return {?}
80022
     */
80023
    MatButtonToggleGroup.prototype.registerOnChange = /**
80024
     * @param {?} fn
80025
     * @return {?}
80026
     */
80027
    function (fn) {
80028
        this._controlValueAccessorChangeFn = fn;
80029
    };
80030
    // Implemented as part of ControlValueAccessor.
80031
    /**
80032
     * @param {?} fn
80033
     * @return {?}
80034
     */
80035
    MatButtonToggleGroup.prototype.registerOnTouched = /**
80036
     * @param {?} fn
80037
     * @return {?}
80038
     */
80039
    function (fn) {
80040
        this._onTouched = fn;
80041
    };
80042
    // Implemented as part of ControlValueAccessor.
80043
    /**
80044
     * @param {?} isDisabled
80045
     * @return {?}
80046
     */
80047
    MatButtonToggleGroup.prototype.setDisabledState = /**
80048
     * @param {?} isDisabled
80049
     * @return {?}
80050
     */
80051
    function (isDisabled) {
80052
        this.disabled = isDisabled;
80053
        if (this._buttonToggles) {
80054
            this._buttonToggles.forEach(function (toggle) { return toggle._markForCheck(); });
80055
        }
80056
    };
80057
    /** Dispatch change event with current selection and group value. */
80058
    /**
80059
     * Dispatch change event with current selection and group value.
80060
     * @return {?}
80061
     */
80062
    MatButtonToggleGroup.prototype._emitChangeEvent = /**
80063
     * Dispatch change event with current selection and group value.
80064
     * @return {?}
80065
     */
80066
    function () {
80067
        var /** @type {?} */ selected = this.selected;
80068
        var /** @type {?} */ source = Array.isArray(selected) ? selected[selected.length - 1] : selected;
80069
        var /** @type {?} */ event = new MatButtonToggleChange(/** @type {?} */ ((source)), this.value);
80070
        this._controlValueAccessorChangeFn(event.value);
80071
        this.change.emit(event);
80072
    };
80073
    /**
80074
     * Syncs a button toggle's selected state with the model value.
80075
     * @param toggle Toggle to be synced.
80076
     * @param select Whether the toggle should be selected.
80077
     * @param isUserInput Whether the change was a result of a user interaction.
80078
     */
80079
    /**
80080
     * Syncs a button toggle's selected state with the model value.
80081
     * @param {?} toggle Toggle to be synced.
80082
     * @param {?} select Whether the toggle should be selected.
80083
     * @param {?=} isUserInput Whether the change was a result of a user interaction.
80084
     * @return {?}
80085
     */
80086
    MatButtonToggleGroup.prototype._syncButtonToggle = /**
80087
     * Syncs a button toggle's selected state with the model value.
80088
     * @param {?} toggle Toggle to be synced.
80089
     * @param {?} select Whether the toggle should be selected.
80090
     * @param {?=} isUserInput Whether the change was a result of a user interaction.
80091
     * @return {?}
80092
     */
80093
    function (toggle, select, isUserInput) {
80094
        if (isUserInput === void 0) { isUserInput = false; }
80095
        // Deselect the currently-selected toggle, if we're in single-selection
80096
        // mode and the button being toggled isn't selected at the moment.
80097
        if (!this.multiple && this.selected && !toggle.checked) {
80098
            (/** @type {?} */ (this.selected)).checked = false;
80099
        }
80100
        if (select) {
80101
            this._selectionModel.select(toggle);
80102
        }
80103
        else {
80104
            this._selectionModel.deselect(toggle);
80105
        }
80106
        // Only emit the change event for user input.
80107
        if (isUserInput) {
80108
            this._emitChangeEvent();
80109
        }
80110
        // Note: we emit this one no matter whether it was a user interaction, because
80111
        // it is used by Angular to sync up the two-way data binding.
80112
        this.valueChange.emit(this.value);
80113
    };
80114
    /** Checks whether a button toggle is selected. */
80115
    /**
80116
     * Checks whether a button toggle is selected.
80117
     * @param {?} toggle
80118
     * @return {?}
80119
     */
80120
    MatButtonToggleGroup.prototype._isSelected = /**
80121
     * Checks whether a button toggle is selected.
80122
     * @param {?} toggle
80123
     * @return {?}
80124
     */
80125
    function (toggle) {
80126
        return this._selectionModel.isSelected(toggle);
80127
    };
80128
    /** Determines whether a button toggle should be checked on init. */
80129
    /**
80130
     * Determines whether a button toggle should be checked on init.
80131
     * @param {?} toggle
80132
     * @return {?}
80133
     */
80134
    MatButtonToggleGroup.prototype._isPrechecked = /**
80135
     * Determines whether a button toggle should be checked on init.
80136
     * @param {?} toggle
80137
     * @return {?}
80138
     */
80139
    function (toggle) {
80140
        if (typeof this._rawValue === 'undefined') {
80141
            return false;
80142
        }
80143
        if (this.multiple && Array.isArray(this._rawValue)) {
80144
            return this._rawValue.some(function (value) { return toggle.value != null && value === toggle.value; });
80145
        }
80146
        return toggle.value === this._rawValue;
80147
    };
80148
    /**
80149
     * Updates the selection state of the toggles in the group based on a value.
80150
     * @param {?} value
80151
     * @return {?}
80152
     */
80153
    MatButtonToggleGroup.prototype._setSelectionByValue = /**
80154
     * Updates the selection state of the toggles in the group based on a value.
80155
     * @param {?} value
80156
     * @return {?}
80157
     */
80158
    function (value) {
80159
        var _this = this;
80160
        this._rawValue = value;
80161
        if (!this._buttonToggles) {
80162
            return;
80163
        }
80164
        if (this.multiple && value) {
80165
            if (!Array.isArray(value)) {
80166
                throw Error('Value must be an array in multiple-selection mode.');
80167
            }
80168
            this._clearSelection();
80169
            value.forEach(function (currentValue) { return _this._selectValue(currentValue); });
80170
        }
80171
        else {
80172
            this._clearSelection();
80173
            this._selectValue(value);
80174
        }
80175
    };
80176
    /**
80177
     * Clears the selected toggles.
80178
     * @return {?}
80179
     */
80180
    MatButtonToggleGroup.prototype._clearSelection = /**
80181
     * Clears the selected toggles.
80182
     * @return {?}
80183
     */
80184
    function () {
80185
        this._selectionModel.clear();
80186
        this._buttonToggles.forEach(function (toggle) { return toggle.checked = false; });
80187
    };
80188
    /**
80189
     * Selects a value if there's a toggle that corresponds to it.
80190
     * @param {?} value
80191
     * @return {?}
80192
     */
80193
    MatButtonToggleGroup.prototype._selectValue = /**
80194
     * Selects a value if there's a toggle that corresponds to it.
80195
     * @param {?} value
80196
     * @return {?}
80197
     */
80198
    function (value) {
80199
        var /** @type {?} */ correspondingOption = this._buttonToggles.find(function (toggle) {
80200
            return toggle.value != null && toggle.value === value;
80201
        });
80202
        if (correspondingOption) {
80203
            correspondingOption.checked = true;
80204
            this._selectionModel.select(correspondingOption);
80205
        }
80206
    };
80207
    MatButtonToggleGroup.decorators = [
80208
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Directive"], args: [{
80209
                    selector: 'mat-button-toggle-group',
80210
                    providers: [
80211
                        MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR,
80212
                        { provide: MatButtonToggleGroupMultiple, useExisting: MatButtonToggleGroup },
80213
                    ],
80214
                    inputs: ['disabled'],
80215
                    host: {
80216
                        'role': 'group',
80217
                        'class': 'mat-button-toggle-group',
80218
                        '[class.mat-button-toggle-vertical]': 'vertical'
80219
                    },
80220
                    exportAs: 'matButtonToggleGroup',
80221
                },] },
80222
    ];
80223
    /** @nocollapse */
80224
    MatButtonToggleGroup.ctorParameters = function () { return [
80225
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ChangeDetectorRef"], },
80226
    ]; };
80227
    MatButtonToggleGroup.propDecorators = {
80228
        "_buttonToggles": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ContentChildren"], args: [Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["forwardRef"])(function () { return MatButtonToggle; }),] },],
80229
        "name": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Input"] },],
80230
        "vertical": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Input"] },],
80231
        "value": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Input"] },],
80232
        "valueChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Output"] },],
80233
        "multiple": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Input"] },],
80234
        "change": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Output"] },],
80235
    };
80236
    return MatButtonToggleGroup;
80237
}(_MatButtonToggleGroupMixinBase));
80238
/**
80239
 * \@docs-private
80240
 */
80241
var  /**
80242
 * \@docs-private
80243
 */
80244
MatButtonToggleBase = /** @class */ (function () {
80245
    function MatButtonToggleBase() {
80246
    }
80247
    return MatButtonToggleBase;
80248
}());
80249
var /** @type {?} */ _MatButtonToggleMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_5__["mixinDisableRipple"])(MatButtonToggleBase);
80250
/**
80251
 * Single button inside of a toggle group.
80252
 */
80253
var MatButtonToggle = /** @class */ (function (_super) {
80254
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatButtonToggle, _super);
80255
    function MatButtonToggle(toggleGroup, _changeDetectorRef, _elementRef, _focusMonitor,
80256
    // @breaking-change 8.0.0 `defaultTabIndex` to be made a required parameter.
80257
    defaultTabIndex) {
80258
        var _this = _super.call(this) || this;
80259
        _this._changeDetectorRef = _changeDetectorRef;
80260
        _this._elementRef = _elementRef;
80261
        _this._focusMonitor = _focusMonitor;
80262
        _this._isSingleSelector = false;
80263
        _this._checked = false;
80264
        /**
80265
         * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element
80266
         */
80267
        _this.ariaLabelledby = null;
80268
        _this._disabled = false;
80269
        /**
80270
         * Event emitted when the group value changes.
80271
         */
80272
        _this.change = new _angular_core__WEBPACK_IMPORTED_MODULE_3__["EventEmitter"]();
80273
        var /** @type {?} */ parsedTabIndex = Number(defaultTabIndex);
80274
        _this.tabIndex = (parsedTabIndex || parsedTabIndex === 0) ? parsedTabIndex : null;
80275
        _this.buttonToggleGroup = toggleGroup;
80276
        return _this;
80277
    }
80278
    Object.defineProperty(MatButtonToggle.prototype, "buttonId", {
80279
        /** Unique ID for the underlying `button` element. */
80280
        get: /**
80281
         * Unique ID for the underlying `button` element.
80282
         * @return {?}
80283
         */
80284
        function () { return this.id + "-button"; },
80285
        enumerable: true,
80286
        configurable: true
80287
    });
80288
    Object.defineProperty(MatButtonToggle.prototype, "checked", {
80289
        get: /**
80290
         * Whether the button is checked.
80291
         * @return {?}
80292
         */
80293
        function () {
80294
            return this.buttonToggleGroup ? this.buttonToggleGroup._isSelected(this) : this._checked;
80295
        },
80296
        set: /**
80297
         * @param {?} value
80298
         * @return {?}
80299
         */
80300
        function (value) {
80301
            var /** @type {?} */ newValue = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__["coerceBooleanProperty"])(value);
80302
            if (newValue !== this._checked) {
80303
                this._checked = newValue;
80304
                if (this.buttonToggleGroup) {
80305
                    this.buttonToggleGroup._syncButtonToggle(this, this._checked);
80306
                }
80307
                this._changeDetectorRef.markForCheck();
80308
            }
80309
        },
80310
        enumerable: true,
80311
        configurable: true
80312
    });
80313
    Object.defineProperty(MatButtonToggle.prototype, "disabled", {
80314
        get: /**
80315
         * Whether the button is disabled.
80316
         * @return {?}
80317
         */
80318
        function () {
80319
            return this._disabled || (this.buttonToggleGroup && this.buttonToggleGroup.disabled);
80320
        },
80321
        set: /**
80322
         * @param {?} value
80323
         * @return {?}
80324
         */
80325
        function (value) { this._disabled = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__["coerceBooleanProperty"])(value); },
80326
        enumerable: true,
80327
        configurable: true
80328
    });
80329
    /**
80330
     * @return {?}
80331
     */
80332
    MatButtonToggle.prototype.ngOnInit = /**
80333
     * @return {?}
80334
     */
80335
    function () {
80336
        this._isSingleSelector = this.buttonToggleGroup && !this.buttonToggleGroup.multiple;
80337
        this._type = this._isSingleSelector ? 'radio' : 'checkbox';
80338
        this.id = this.id || "mat-button-toggle-" + _uniqueIdCounter++;
80339
        if (this._isSingleSelector) {
80340
            this.name = this.buttonToggleGroup.name;
80341
        }
80342
        if (this.buttonToggleGroup && this.buttonToggleGroup._isPrechecked(this)) {
80343
            this.checked = true;
80344
        }
80345
        this._focusMonitor.monitor(this._elementRef.nativeElement, true);
80346
    };
80347
    /**
80348
     * @return {?}
80349
     */
80350
    MatButtonToggle.prototype.ngOnDestroy = /**
80351
     * @return {?}
80352
     */
80353
    function () {
80354
        this._focusMonitor.stopMonitoring(this._elementRef.nativeElement);
80355
    };
80356
    /** Focuses the button. */
80357
    /**
80358
     * Focuses the button.
80359
     * @return {?}
80360
     */
80361
    MatButtonToggle.prototype.focus = /**
80362
     * Focuses the button.
80363
     * @return {?}
80364
     */
80365
    function () {
80366
        this._buttonElement.nativeElement.focus();
80367
    };
80368
    /** Checks the button toggle due to an interaction with the underlying native button. */
80369
    /**
80370
     * Checks the button toggle due to an interaction with the underlying native button.
80371
     * @return {?}
80372
     */
80373
    MatButtonToggle.prototype._onButtonClick = /**
80374
     * Checks the button toggle due to an interaction with the underlying native button.
80375
     * @return {?}
80376
     */
80377
    function () {
80378
        var /** @type {?} */ newChecked = this._isSingleSelector ? true : !this._checked;
80379
        if (newChecked !== this._checked) {
80380
            this._checked = newChecked;
80381
            if (this.buttonToggleGroup) {
80382
                this.buttonToggleGroup._syncButtonToggle(this, this._checked, true);
80383
                this.buttonToggleGroup._onTouched();
80384
            }
80385
        }
80386
        // Emit a change event when it's the single selector
80387
        this.change.emit(new MatButtonToggleChange(this, this.value));
80388
    };
80389
    /**
80390
     * Marks the button toggle as needing checking for change detection.
80391
     * This method is exposed because the parent button toggle group will directly
80392
     * update bound properties of the radio button.
80393
     */
80394
    /**
80395
     * Marks the button toggle as needing checking for change detection.
80396
     * This method is exposed because the parent button toggle group will directly
80397
     * update bound properties of the radio button.
80398
     * @return {?}
80399
     */
80400
    MatButtonToggle.prototype._markForCheck = /**
80401
     * Marks the button toggle as needing checking for change detection.
80402
     * This method is exposed because the parent button toggle group will directly
80403
     * update bound properties of the radio button.
80404
     * @return {?}
80405
     */
80406
    function () {
80407
        // When the group value changes, the button will not be notified.
80408
        // Use `markForCheck` to explicit update button toggle's status.
80409
        this._changeDetectorRef.markForCheck();
80410
    };
80411
    MatButtonToggle.decorators = [
80412
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"], args: [{selector: 'mat-button-toggle',
80413
                    template: "<button #button class=\"mat-button-toggle-button\" type=\"button\" [id]=\"buttonId\" [attr.tabindex]=\"disabled ? -1 : tabIndex\" [attr.aria-pressed]=\"checked\" [disabled]=\"disabled || null\" [attr.name]=\"name || null\" [attr.aria-label]=\"ariaLabel\" [attr.aria-labelledby]=\"ariaLabelledby\" (click)=\"_onButtonClick()\"><div class=\"mat-button-toggle-label-content\"><ng-content></ng-content></div></button><div class=\"mat-button-toggle-focus-overlay\"></div><div class=\"mat-button-toggle-ripple\" matRipple [matRippleTrigger]=\"button\" [matRippleDisabled]=\"this.disableRipple || this.disabled\"></div>",
80414
                    styles: [".mat-button-toggle-group,.mat-button-toggle-standalone{box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);position:relative;display:inline-flex;flex-direction:row;border-radius:2px;cursor:pointer;white-space:nowrap;overflow:hidden}@media screen and (-ms-high-contrast:active){.mat-button-toggle-group,.mat-button-toggle-standalone{outline:solid 1px}}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle-disabled .mat-button-toggle-label-content{cursor:default}.mat-button-toggle{white-space:nowrap;position:relative;-webkit-tap-highlight-color:transparent}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:1}@media screen and (-ms-high-contrast:active){.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:.5}}.mat-button-toggle-label-content{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;line-height:36px;padding:0 16px;cursor:pointer}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{border-radius:inherit;pointer-events:none;opacity:0;top:0;left:0;right:0;bottom:0;position:absolute}@media screen and (-ms-high-contrast:active){.mat-button-toggle-checked .mat-button-toggle-focus-overlay{opacity:.5;height:0;border-bottom:solid 36px}}.mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:0 0;color:inherit;padding:0;margin:0;font:inherit;outline:0}"],
80415
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ViewEncapsulation"].None,
80416
                    exportAs: 'matButtonToggle',
80417
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ChangeDetectionStrategy"].OnPush,
80418
                    inputs: ['disableRipple'],
80419
                    host: {
80420
                        '[class.mat-button-toggle-standalone]': '!buttonToggleGroup',
80421
                        '[class.mat-button-toggle-checked]': 'checked',
80422
                        '[class.mat-button-toggle-disabled]': 'disabled',
80423
                        'class': 'mat-button-toggle',
80424
                        // Clear out the native tabindex here since we forward it to the underlying button
80425
                        '[attr.tabindex]': 'null',
80426
                        '[attr.id]': 'id',
80427
                    }
80428
                },] },
80429
    ];
80430
    /** @nocollapse */
80431
    MatButtonToggle.ctorParameters = function () { return [
80432
        { type: MatButtonToggleGroup, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Optional"] },] },
80433
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ChangeDetectorRef"], },
80434
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ElementRef"], },
80435
        { type: _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_1__["FocusMonitor"], },
80436
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Attribute"], args: ['tabindex',] },] },
80437
    ]; };
80438
    MatButtonToggle.propDecorators = {
80439
        "ariaLabel": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Input"], args: ['aria-label',] },],
80440
        "ariaLabelledby": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Input"], args: ['aria-labelledby',] },],
80441
        "_buttonElement": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ViewChild"], args: ['button',] },],
80442
        "id": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Input"] },],
80443
        "name": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Input"] },],
80444
        "value": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Input"] },],
80445
        "tabIndex": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Input"] },],
80446
        "checked": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Input"] },],
80447
        "disabled": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Input"] },],
80448
        "change": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Output"] },],
80449
    };
80450
    return MatButtonToggle;
80451
}(_MatButtonToggleMixinBase));
80452
 
80453
/**
80454
 * @fileoverview added by tsickle
80455
 * @suppress {checkTypes} checked by tsc
80456
 */
80457
var MatButtonToggleModule = /** @class */ (function () {
80458
    function MatButtonToggleModule() {
80459
    }
80460
    MatButtonToggleModule.decorators = [
80461
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["NgModule"], args: [{
80462
                    imports: [_angular_material_core__WEBPACK_IMPORTED_MODULE_5__["MatCommonModule"], _angular_material_core__WEBPACK_IMPORTED_MODULE_5__["MatRippleModule"]],
80463
                    exports: [_angular_material_core__WEBPACK_IMPORTED_MODULE_5__["MatCommonModule"], MatButtonToggleGroup, MatButtonToggle],
80464
                    declarations: [MatButtonToggleGroup, MatButtonToggle],
80465
                },] },
80466
    ];
80467
    return MatButtonToggleModule;
80468
}());
80469
 
80470
/**
80471
 * @fileoverview added by tsickle
80472
 * @suppress {checkTypes} checked by tsc
80473
 */
80474
 
80475
/**
80476
 * @fileoverview added by tsickle
80477
 * @suppress {checkTypes} checked by tsc
80478
 */
80479
 
80480
 
80481
//# sourceMappingURL=button-toggle.es5.js.map
80482
 
80483
 
80484
/***/ }),
80485
 
80486
/***/ "./node_modules/@angular/material/esm5/button.es5.js":
80487
/*!***********************************************************!*\
80488
  !*** ./node_modules/@angular/material/esm5/button.es5.js ***!
80489
  \***********************************************************/
80490
/*! exports provided: MatButtonModule, MatButtonBase, _MatButtonMixinBase, MatButton, MatAnchor */
80491
/***/ (function(module, __webpack_exports__, __webpack_require__) {
80492
 
80493
"use strict";
80494
__webpack_require__.r(__webpack_exports__);
80495
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatButtonModule", function() { return MatButtonModule; });
80496
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatButtonBase", function() { return MatButtonBase; });
80497
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatButtonMixinBase", function() { return _MatButtonMixinBase; });
80498
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatButton", function() { return MatButton; });
80499
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatAnchor", function() { return MatAnchor; });
80500
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
80501
/* harmony import */ var _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/cdk/a11y */ "./node_modules/@angular/cdk/esm5/a11y.es5.js");
80502
/* harmony import */ var _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/cdk/platform */ "./node_modules/@angular/cdk/esm5/platform.es5.js");
80503
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
80504
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
80505
/* harmony import */ var _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/platform-browser/animations */ "./node_modules/@angular/platform-browser/fesm5/animations.js");
80506
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
80507
/**
80508
 * @license
80509
 * Copyright Google LLC All Rights Reserved.
80510
 *
80511
 * Use of this source code is governed by an MIT-style license that can be
80512
 * found in the LICENSE file at https://angular.io/license
80513
 */
80514
 
80515
 
80516
 
80517
 
80518
 
80519
 
80520
 
80521
 
80522
/**
80523
 * @fileoverview added by tsickle
80524
 * @suppress {checkTypes} checked by tsc
80525
 */
80526
/**
80527
 * Default color palette for round buttons (mat-fab and mat-mini-fab)
80528
 */
80529
var /** @type {?} */ DEFAULT_ROUND_BUTTON_COLOR = 'accent';
80530
/**
80531
 * Default color palette for flat buttons (mat-flat-button)
80532
 */
80533
var /** @type {?} */ DEFAULT_FLAT_BUTTON_COLOR = 'primary';
80534
/**
80535
 * List of classes to add to MatButton instances based on host attributes to
80536
 * style as different variants.
80537
 */
80538
var /** @type {?} */ BUTTON_HOST_ATTRIBUTES = [
80539
    'mat-button',
80540
    'mat-flat-button',
80541
    'mat-icon-button',
80542
    'mat-raised-button',
80543
    'mat-stroked-button',
80544
    'mat-mini-fab',
80545
    'mat-fab',
80546
];
80547
/**
80548
 * \@docs-private
80549
 */
80550
var  /**
80551
 * \@docs-private
80552
 */
80553
MatButtonBase = /** @class */ (function () {
80554
    function MatButtonBase(_elementRef) {
80555
        this._elementRef = _elementRef;
80556
    }
80557
    return MatButtonBase;
80558
}());
80559
var /** @type {?} */ _MatButtonMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_4__["mixinColor"])(Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_4__["mixinDisabled"])(Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_4__["mixinDisableRipple"])(MatButtonBase)));
80560
/**
80561
 * Material design button.
80562
 */
80563
var MatButton = /** @class */ (function (_super) {
80564
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatButton, _super);
80565
    function MatButton(elementRef, _platform, _focusMonitor,
80566
    // @breaking-change 7.0.0 `_animationMode` parameter to be made required.
80567
    _animationMode) {
80568
        var _this = _super.call(this, elementRef) || this;
80569
        _this._platform = _platform;
80570
        _this._focusMonitor = _focusMonitor;
80571
        _this._animationMode = _animationMode;
80572
        /**
80573
         * Whether the button is round.
80574
         */
80575
        _this.isRoundButton = _this._hasHostAttributes('mat-fab', 'mat-mini-fab');
80576
        /**
80577
         * Whether the button is icon button.
80578
         */
80579
        _this.isIconButton = _this._hasHostAttributes('mat-icon-button');
80580
        // For each of the variant selectors that is prevent in the button's host
80581
        // attributes, add the correct corresponding class.
80582
        for (var _i = 0, BUTTON_HOST_ATTRIBUTES_1 = BUTTON_HOST_ATTRIBUTES; _i < BUTTON_HOST_ATTRIBUTES_1.length; _i++) {
80583
            var attr = BUTTON_HOST_ATTRIBUTES_1[_i];
80584
            if (_this._hasHostAttributes(attr)) {
80585
                (/** @type {?} */ (elementRef.nativeElement)).classList.add(attr);
80586
            }
80587
        }
80588
        _this._focusMonitor.monitor(_this._elementRef.nativeElement, true);
80589
        if (_this.isRoundButton) {
80590
            _this.color = DEFAULT_ROUND_BUTTON_COLOR;
80591
        }
80592
        else if (_this._hasHostAttributes('mat-flat-button')) {
80593
            _this.color = DEFAULT_FLAT_BUTTON_COLOR;
80594
        }
80595
        return _this;
80596
    }
80597
    /**
80598
     * @return {?}
80599
     */
80600
    MatButton.prototype.ngOnDestroy = /**
80601
     * @return {?}
80602
     */
80603
    function () {
80604
        this._focusMonitor.stopMonitoring(this._elementRef.nativeElement);
80605
    };
80606
    /** Focuses the button. */
80607
    /**
80608
     * Focuses the button.
80609
     * @return {?}
80610
     */
80611
    MatButton.prototype.focus = /**
80612
     * Focuses the button.
80613
     * @return {?}
80614
     */
80615
    function () {
80616
        this._getHostElement().focus();
80617
    };
80618
    /**
80619
     * @return {?}
80620
     */
80621
    MatButton.prototype._getHostElement = /**
80622
     * @return {?}
80623
     */
80624
    function () {
80625
        return this._elementRef.nativeElement;
80626
    };
80627
    /**
80628
     * @return {?}
80629
     */
80630
    MatButton.prototype._isRippleDisabled = /**
80631
     * @return {?}
80632
     */
80633
    function () {
80634
        return this.disableRipple || this.disabled;
80635
    };
80636
    /** Gets whether the button has one of the given attributes. */
80637
    /**
80638
     * Gets whether the button has one of the given attributes.
80639
     * @param {...?} attributes
80640
     * @return {?}
80641
     */
80642
    MatButton.prototype._hasHostAttributes = /**
80643
     * Gets whether the button has one of the given attributes.
80644
     * @param {...?} attributes
80645
     * @return {?}
80646
     */
80647
    function () {
80648
        var _this = this;
80649
        var attributes = [];
80650
        for (var _i = 0; _i < arguments.length; _i++) {
80651
            attributes[_i] = arguments[_i];
80652
        }
80653
        return attributes.some(function (attribute) { return _this._getHostElement().hasAttribute(attribute); });
80654
    };
80655
    MatButton.decorators = [
80656
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"], args: [{selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button],\n             button[mat-fab], button[mat-mini-fab], button[mat-stroked-button],\n             button[mat-flat-button]",
80657
                    exportAs: 'matButton',
80658
                    host: {
80659
                        '[disabled]': 'disabled || null',
80660
                        '[class._mat-animation-noopable]': '_animationMode === "NoopAnimations"',
80661
                    },
80662
                    template: "<span class=\"mat-button-wrapper\"><ng-content></ng-content></span><div matRipple class=\"mat-button-ripple\" [class.mat-button-ripple-round]=\"isRoundButton || isIconButton\" [matRippleDisabled]=\"_isRippleDisabled()\" [matRippleCentered]=\"isIconButton\" [matRippleTrigger]=\"_getHostElement()\"></div><div class=\"mat-button-focus-overlay\"></div>",
80663
                    styles: [".mat-button,.mat-flat-button,.mat-icon-button,.mat-stroked-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px;overflow:visible}.mat-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner{border:0}.mat-button[disabled],.mat-flat-button[disabled],.mat-icon-button[disabled],.mat-stroked-button[disabled]{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner{border:0}.mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover .mat-button-focus-overlay,.mat-stroked-button:hover .mat-button-focus-overlay{opacity:1}@media (hover:none){.mat-button:hover .mat-button-focus-overlay,.mat-stroked-button:hover .mat-button-focus-overlay{opacity:0}}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px;overflow:visible;transform:translate3d(0,0,0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button[disabled]{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}._mat-animation-noopable.mat-raised-button{transition:none;animation:none}.mat-raised-button:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mat-raised-button[disabled]{box-shadow:none}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button:not([class*=mat-elevation-z]){box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12)}.mat-flat-button:not([class*=mat-elevation-z]){box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12)}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px;overflow:visible;transform:translate3d(0,0,0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab[disabled]{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-fab::-moz-focus-inner{border:0}.mat-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}._mat-animation-noopable.mat-fab{transition:none;animation:none}.mat-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mat-fab[disabled]{box-shadow:none}.mat-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}.mat-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 12px 17px 2px rgba(0,0,0,.14),0 5px 22px 4px rgba(0,0,0,.12)}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px;overflow:visible;transform:translate3d(0,0,0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab[disabled]{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}._mat-animation-noopable.mat-mini-fab{transition:none;animation:none}.mat-mini-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mat-mini-fab[disabled]{box-shadow:none}.mat-mini-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}.mat-mini-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 12px 17px 2px rgba(0,0,0,.14),0 5px 22px 4px rgba(0,0,0,.12)}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button .mat-icon,.mat-icon-button i{line-height:24px}.mat-button-focus-overlay,.mat-button-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-focus-overlay{background-color:rgba(0,0,0,.12);border-radius:inherit;opacity:0;transition:opacity .2s cubic-bezier(.35,0,.25,1),background-color .2s cubic-bezier(.35,0,.25,1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}@media screen and (-ms-high-contrast:active){.mat-button-focus-overlay{background-color:rgba(255,255,255,.5)}}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:block;font-size:inherit;width:2.5em;height:2.5em}@media screen and (-ms-high-contrast:active){.mat-button,.mat-fab,.mat-flat-button,.mat-icon-button,.mat-mini-fab,.mat-raised-button{outline:solid 1px}}"],
80664
                    inputs: ['disabled', 'disableRipple', 'color'],
80665
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ViewEncapsulation"].None,
80666
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ChangeDetectionStrategy"].OnPush,
80667
                },] },
80668
    ];
80669
    /** @nocollapse */
80670
    MatButton.ctorParameters = function () { return [
80671
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ElementRef"], },
80672
        { type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__["Platform"], },
80673
        { type: _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_1__["FocusMonitor"], },
80674
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Inject"], args: [_angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_5__["ANIMATION_MODULE_TYPE"],] },] },
80675
    ]; };
80676
    MatButton.propDecorators = {
80677
        "ripple": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ViewChild"], args: [_angular_material_core__WEBPACK_IMPORTED_MODULE_4__["MatRipple"],] },],
80678
    };
80679
    return MatButton;
80680
}(_MatButtonMixinBase));
80681
/**
80682
 * Raised Material design button.
80683
 */
80684
var MatAnchor = /** @class */ (function (_super) {
80685
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatAnchor, _super);
80686
    function MatAnchor(platform, focusMonitor, elementRef,
80687
    // @breaking-change 7.0.0 `animationMode` parameter to be made required.
80688
    animationMode) {
80689
        return _super.call(this, elementRef, platform, focusMonitor, animationMode) || this;
80690
    }
80691
    /**
80692
     * @param {?} event
80693
     * @return {?}
80694
     */
80695
    MatAnchor.prototype._haltDisabledEvents = /**
80696
     * @param {?} event
80697
     * @return {?}
80698
     */
80699
    function (event) {
80700
        // A disabled button shouldn't apply any actions
80701
        if (this.disabled) {
80702
            event.preventDefault();
80703
            event.stopImmediatePropagation();
80704
        }
80705
    };
80706
    MatAnchor.decorators = [
80707
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"], args: [{selector: "a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab],\n             a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]",
80708
                    exportAs: 'matButton, matAnchor',
80709
                    host: {
80710
                        // Note that we ignore the user-specified tabindex when it's disabled for
80711
                        // consistency with the `mat-button` applied on native buttons where even
80712
                        // though they have an index, they're not tabbable.
80713
                        '[attr.tabindex]': 'disabled ? -1 : (tabIndex || 0)',
80714
                        '[attr.disabled]': 'disabled || null',
80715
                        '[attr.aria-disabled]': 'disabled.toString()',
80716
                        '(click)': '_haltDisabledEvents($event)',
80717
                        '[class._mat-animation-noopable]': '_animationMode === "NoopAnimations"',
80718
                    },
80719
                    inputs: ['disabled', 'disableRipple', 'color'],
80720
                    template: "<span class=\"mat-button-wrapper\"><ng-content></ng-content></span><div matRipple class=\"mat-button-ripple\" [class.mat-button-ripple-round]=\"isRoundButton || isIconButton\" [matRippleDisabled]=\"_isRippleDisabled()\" [matRippleCentered]=\"isIconButton\" [matRippleTrigger]=\"_getHostElement()\"></div><div class=\"mat-button-focus-overlay\"></div>",
80721
                    styles: [".mat-button,.mat-flat-button,.mat-icon-button,.mat-stroked-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px;overflow:visible}.mat-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner{border:0}.mat-button[disabled],.mat-flat-button[disabled],.mat-icon-button[disabled],.mat-stroked-button[disabled]{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner{border:0}.mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover .mat-button-focus-overlay,.mat-stroked-button:hover .mat-button-focus-overlay{opacity:1}@media (hover:none){.mat-button:hover .mat-button-focus-overlay,.mat-stroked-button:hover .mat-button-focus-overlay{opacity:0}}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px;overflow:visible;transform:translate3d(0,0,0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button[disabled]{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}._mat-animation-noopable.mat-raised-button{transition:none;animation:none}.mat-raised-button:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mat-raised-button[disabled]{box-shadow:none}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button:not([class*=mat-elevation-z]){box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12)}.mat-flat-button:not([class*=mat-elevation-z]){box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12)}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px;overflow:visible;transform:translate3d(0,0,0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab[disabled]{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-fab::-moz-focus-inner{border:0}.mat-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}._mat-animation-noopable.mat-fab{transition:none;animation:none}.mat-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mat-fab[disabled]{box-shadow:none}.mat-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}.mat-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 12px 17px 2px rgba(0,0,0,.14),0 5px 22px 4px rgba(0,0,0,.12)}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px;overflow:visible;transform:translate3d(0,0,0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab[disabled]{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}._mat-animation-noopable.mat-mini-fab{transition:none;animation:none}.mat-mini-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mat-mini-fab[disabled]{box-shadow:none}.mat-mini-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}.mat-mini-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 12px 17px 2px rgba(0,0,0,.14),0 5px 22px 4px rgba(0,0,0,.12)}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button .mat-icon,.mat-icon-button i{line-height:24px}.mat-button-focus-overlay,.mat-button-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-focus-overlay{background-color:rgba(0,0,0,.12);border-radius:inherit;opacity:0;transition:opacity .2s cubic-bezier(.35,0,.25,1),background-color .2s cubic-bezier(.35,0,.25,1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}@media screen and (-ms-high-contrast:active){.mat-button-focus-overlay{background-color:rgba(255,255,255,.5)}}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:block;font-size:inherit;width:2.5em;height:2.5em}@media screen and (-ms-high-contrast:active){.mat-button,.mat-fab,.mat-flat-button,.mat-icon-button,.mat-mini-fab,.mat-raised-button{outline:solid 1px}}"],
80722
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ViewEncapsulation"].None,
80723
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ChangeDetectionStrategy"].OnPush,
80724
                },] },
80725
    ];
80726
    /** @nocollapse */
80727
    MatAnchor.ctorParameters = function () { return [
80728
        { type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__["Platform"], },
80729
        { type: _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_1__["FocusMonitor"], },
80730
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ElementRef"], },
80731
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Inject"], args: [_angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_5__["ANIMATION_MODULE_TYPE"],] },] },
80732
    ]; };
80733
    MatAnchor.propDecorators = {
80734
        "tabIndex": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["Input"] },],
80735
    };
80736
    return MatAnchor;
80737
}(MatButton));
80738
 
80739
/**
80740
 * @fileoverview added by tsickle
80741
 * @suppress {checkTypes} checked by tsc
80742
 */
80743
var MatButtonModule = /** @class */ (function () {
80744
    function MatButtonModule() {
80745
    }
80746
    MatButtonModule.decorators = [
80747
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["NgModule"], args: [{
80748
                    imports: [
80749
                        _angular_common__WEBPACK_IMPORTED_MODULE_6__["CommonModule"],
80750
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_4__["MatRippleModule"],
80751
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_4__["MatCommonModule"],
80752
                    ],
80753
                    exports: [
80754
                        MatButton,
80755
                        MatAnchor,
80756
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_4__["MatCommonModule"],
80757
                    ],
80758
                    declarations: [
80759
                        MatButton,
80760
                        MatAnchor,
80761
                    ],
80762
                },] },
80763
    ];
80764
    return MatButtonModule;
80765
}());
80766
 
80767
/**
80768
 * @fileoverview added by tsickle
80769
 * @suppress {checkTypes} checked by tsc
80770
 */
80771
 
80772
/**
80773
 * @fileoverview added by tsickle
80774
 * @suppress {checkTypes} checked by tsc
80775
 */
80776
 
80777
 
80778
//# sourceMappingURL=button.es5.js.map
80779
 
80780
 
80781
/***/ }),
80782
 
80783
/***/ "./node_modules/@angular/material/esm5/card.es5.js":
80784
/*!*********************************************************!*\
80785
  !*** ./node_modules/@angular/material/esm5/card.es5.js ***!
80786
  \*********************************************************/
80787
/*! exports provided: MatCardContent, MatCardTitle, MatCardSubtitle, MatCardActions, MatCardFooter, MatCardImage, MatCardSmImage, MatCardMdImage, MatCardLgImage, MatCardXlImage, MatCardAvatar, MatCard, MatCardHeader, MatCardTitleGroup, MatCardModule */
80788
/***/ (function(module, __webpack_exports__, __webpack_require__) {
80789
 
80790
"use strict";
80791
__webpack_require__.r(__webpack_exports__);
80792
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCardContent", function() { return MatCardContent; });
80793
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCardTitle", function() { return MatCardTitle; });
80794
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCardSubtitle", function() { return MatCardSubtitle; });
80795
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCardActions", function() { return MatCardActions; });
80796
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCardFooter", function() { return MatCardFooter; });
80797
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCardImage", function() { return MatCardImage; });
80798
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCardSmImage", function() { return MatCardSmImage; });
80799
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCardMdImage", function() { return MatCardMdImage; });
80800
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCardLgImage", function() { return MatCardLgImage; });
80801
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCardXlImage", function() { return MatCardXlImage; });
80802
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCardAvatar", function() { return MatCardAvatar; });
80803
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCard", function() { return MatCard; });
80804
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCardHeader", function() { return MatCardHeader; });
80805
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCardTitleGroup", function() { return MatCardTitleGroup; });
80806
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCardModule", function() { return MatCardModule; });
80807
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
80808
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
80809
/**
80810
 * @license
80811
 * Copyright Google LLC All Rights Reserved.
80812
 *
80813
 * Use of this source code is governed by an MIT-style license that can be
80814
 * found in the LICENSE file at https://angular.io/license
80815
 */
80816
 
80817
 
80818
 
80819
/**
80820
 * @fileoverview added by tsickle
80821
 * @suppress {checkTypes} checked by tsc
80822
 */
80823
/**
80824
 * Content of a card, needed as it's used as a selector in the API.
80825
 * \@docs-private
80826
 */
80827
var MatCardContent = /** @class */ (function () {
80828
    function MatCardContent() {
80829
    }
80830
    MatCardContent.decorators = [
80831
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
80832
                    selector: 'mat-card-content',
80833
                    host: { 'class': 'mat-card-content' }
80834
                },] },
80835
    ];
80836
    return MatCardContent;
80837
}());
80838
/**
80839
 * Title of a card, needed as it's used as a selector in the API.
80840
 * \@docs-private
80841
 */
80842
var MatCardTitle = /** @class */ (function () {
80843
    function MatCardTitle() {
80844
    }
80845
    MatCardTitle.decorators = [
80846
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
80847
                    selector: "mat-card-title, [mat-card-title], [matCardTitle]",
80848
                    host: {
80849
                        'class': 'mat-card-title'
80850
                    }
80851
                },] },
80852
    ];
80853
    return MatCardTitle;
80854
}());
80855
/**
80856
 * Sub-title of a card, needed as it's used as a selector in the API.
80857
 * \@docs-private
80858
 */
80859
var MatCardSubtitle = /** @class */ (function () {
80860
    function MatCardSubtitle() {
80861
    }
80862
    MatCardSubtitle.decorators = [
80863
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
80864
                    selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]",
80865
                    host: {
80866
                        'class': 'mat-card-subtitle'
80867
                    }
80868
                },] },
80869
    ];
80870
    return MatCardSubtitle;
80871
}());
80872
/**
80873
 * Action section of a card, needed as it's used as a selector in the API.
80874
 * \@docs-private
80875
 */
80876
var MatCardActions = /** @class */ (function () {
80877
    function MatCardActions() {
80878
        /**
80879
         * Position of the actions inside the card.
80880
         */
80881
        this.align = 'start';
80882
    }
80883
    MatCardActions.decorators = [
80884
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
80885
                    selector: 'mat-card-actions',
80886
                    exportAs: 'matCardActions',
80887
                    host: {
80888
                        'class': 'mat-card-actions',
80889
                        '[class.mat-card-actions-align-end]': 'align === "end"',
80890
                    }
80891
                },] },
80892
    ];
80893
    /** @nocollapse */
80894
    MatCardActions.propDecorators = {
80895
        "align": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
80896
    };
80897
    return MatCardActions;
80898
}());
80899
/**
80900
 * Footer of a card, needed as it's used as a selector in the API.
80901
 * \@docs-private
80902
 */
80903
var MatCardFooter = /** @class */ (function () {
80904
    function MatCardFooter() {
80905
    }
80906
    MatCardFooter.decorators = [
80907
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
80908
                    selector: 'mat-card-footer',
80909
                    host: { 'class': 'mat-card-footer' }
80910
                },] },
80911
    ];
80912
    return MatCardFooter;
80913
}());
80914
/**
80915
 * Image used in a card, needed to add the mat- CSS styling.
80916
 * \@docs-private
80917
 */
80918
var MatCardImage = /** @class */ (function () {
80919
    function MatCardImage() {
80920
    }
80921
    MatCardImage.decorators = [
80922
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
80923
                    selector: '[mat-card-image], [matCardImage]',
80924
                    host: { 'class': 'mat-card-image' }
80925
                },] },
80926
    ];
80927
    return MatCardImage;
80928
}());
80929
/**
80930
 * Image used in a card, needed to add the mat- CSS styling.
80931
 * \@docs-private
80932
 */
80933
var MatCardSmImage = /** @class */ (function () {
80934
    function MatCardSmImage() {
80935
    }
80936
    MatCardSmImage.decorators = [
80937
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
80938
                    selector: '[mat-card-sm-image], [matCardImageSmall]',
80939
                    host: { 'class': 'mat-card-sm-image' }
80940
                },] },
80941
    ];
80942
    return MatCardSmImage;
80943
}());
80944
/**
80945
 * Image used in a card, needed to add the mat- CSS styling.
80946
 * \@docs-private
80947
 */
80948
var MatCardMdImage = /** @class */ (function () {
80949
    function MatCardMdImage() {
80950
    }
80951
    MatCardMdImage.decorators = [
80952
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
80953
                    selector: '[mat-card-md-image], [matCardImageMedium]',
80954
                    host: { 'class': 'mat-card-md-image' }
80955
                },] },
80956
    ];
80957
    return MatCardMdImage;
80958
}());
80959
/**
80960
 * Image used in a card, needed to add the mat- CSS styling.
80961
 * \@docs-private
80962
 */
80963
var MatCardLgImage = /** @class */ (function () {
80964
    function MatCardLgImage() {
80965
    }
80966
    MatCardLgImage.decorators = [
80967
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
80968
                    selector: '[mat-card-lg-image], [matCardImageLarge]',
80969
                    host: { 'class': 'mat-card-lg-image' }
80970
                },] },
80971
    ];
80972
    return MatCardLgImage;
80973
}());
80974
/**
80975
 * Large image used in a card, needed to add the mat- CSS styling.
80976
 * \@docs-private
80977
 */
80978
var MatCardXlImage = /** @class */ (function () {
80979
    function MatCardXlImage() {
80980
    }
80981
    MatCardXlImage.decorators = [
80982
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
80983
                    selector: '[mat-card-xl-image], [matCardImageXLarge]',
80984
                    host: { 'class': 'mat-card-xl-image' }
80985
                },] },
80986
    ];
80987
    return MatCardXlImage;
80988
}());
80989
/**
80990
 * Avatar image used in a card, needed to add the mat- CSS styling.
80991
 * \@docs-private
80992
 */
80993
var MatCardAvatar = /** @class */ (function () {
80994
    function MatCardAvatar() {
80995
    }
80996
    MatCardAvatar.decorators = [
80997
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
80998
                    selector: '[mat-card-avatar], [matCardAvatar]',
80999
                    host: { 'class': 'mat-card-avatar' }
81000
                },] },
81001
    ];
81002
    return MatCardAvatar;
81003
}());
81004
/**
81005
 * A basic content container component that adds the styles of a Material design card.
81006
 *
81007
 * While this component can be used alone, it also provides a number
81008
 * of preset styles for common card sections, including:
81009
 * - mat-card-title
81010
 * - mat-card-subtitle
81011
 * - mat-card-content
81012
 * - mat-card-actions
81013
 * - mat-card-footer
81014
 */
81015
var MatCard = /** @class */ (function () {
81016
    function MatCard() {
81017
    }
81018
    MatCard.decorators = [
81019
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-card',
81020
                    exportAs: 'matCard',
81021
                    template: "<ng-content></ng-content><ng-content select=\"mat-card-footer\"></ng-content>",
81022
                    styles: [".mat-card{transition:box-shadow 280ms cubic-bezier(.4,0,.2,1);display:block;position:relative;padding:24px;border-radius:2px}.mat-card:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.mat-card .mat-divider-horizontal{position:absolute;left:0;width:100%}[dir=rtl] .mat-card .mat-divider-horizontal{left:auto;right:0}.mat-card .mat-divider-horizontal.mat-divider-inset{position:static;margin:0}[dir=rtl] .mat-card .mat-divider-horizontal.mat-divider-inset{margin-right:0}.mat-card.mat-card-flat{box-shadow:none}@media screen and (-ms-high-contrast:active){.mat-card{outline:solid 1px}}.mat-card-actions,.mat-card-content,.mat-card-subtitle,.mat-card-title{display:block;margin-bottom:16px}.mat-card-actions{margin-left:-16px;margin-right:-16px;padding:8px 0}.mat-card-actions-align-end{display:flex;justify-content:flex-end}.mat-card-image{width:calc(100% + 48px);margin:0 -24px 16px -24px}.mat-card-xl-image{width:240px;height:240px;margin:-8px}.mat-card-footer{display:block;margin:0 -24px -24px -24px}.mat-card-actions .mat-button,.mat-card-actions .mat-raised-button{margin:0 4px}.mat-card-header{display:flex;flex-direction:row}.mat-card-header-text{margin:0 8px}.mat-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0}.mat-card-lg-image,.mat-card-md-image,.mat-card-sm-image{margin:-8px 0}.mat-card-title-group{display:flex;justify-content:space-between;margin:0 -8px}.mat-card-sm-image{width:80px;height:80px}.mat-card-md-image{width:112px;height:112px}.mat-card-lg-image{width:152px;height:152px}@media (max-width:599px){.mat-card{padding:24px 16px}.mat-card-actions{margin-left:-8px;margin-right:-8px}.mat-card-image{width:calc(100% + 32px);margin:16px -16px}.mat-card-title-group{margin:0}.mat-card-xl-image{margin-left:0;margin-right:0}.mat-card-header{margin:-8px 0 0 0}.mat-card-footer{margin-left:-16px;margin-right:-16px}}.mat-card-content>:first-child,.mat-card>:first-child{margin-top:0}.mat-card-content>:last-child:not(.mat-card-footer),.mat-card>:last-child:not(.mat-card-footer){margin-bottom:0}.mat-card-image:first-child{margin-top:-24px}.mat-card>.mat-card-actions:last-child{margin-bottom:-16px;padding-bottom:0}.mat-card-actions .mat-button:first-child,.mat-card-actions .mat-raised-button:first-child{margin-left:0;margin-right:0}.mat-card-subtitle:not(:first-child),.mat-card-title:not(:first-child){margin-top:-4px}.mat-card-header .mat-card-subtitle:not(:first-child){margin-top:-8px}.mat-card>.mat-card-xl-image:first-child{margin-top:-8px}.mat-card>.mat-card-xl-image:last-child{margin-bottom:-8px}"],
81023
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
81024
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
81025
                    host: { 'class': 'mat-card' }
81026
                },] },
81027
    ];
81028
    return MatCard;
81029
}());
81030
/**
81031
 * Component intended to be used within the `<mat-card>` component. It adds styles for a
81032
 * preset header section (i.e. a title, subtitle, and avatar layout).
81033
 * \@docs-private
81034
 */
81035
var MatCardHeader = /** @class */ (function () {
81036
    function MatCardHeader() {
81037
    }
81038
    MatCardHeader.decorators = [
81039
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-card-header',
81040
                    template: "<ng-content select=\"[mat-card-avatar], [matCardAvatar]\"></ng-content><div class=\"mat-card-header-text\"><ng-content select=\"mat-card-title, mat-card-subtitle, [mat-card-title], [mat-card-subtitle], [matCardTitle], [matCardSubtitle]\"></ng-content></div><ng-content></ng-content>",
81041
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
81042
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
81043
                    host: { 'class': 'mat-card-header' }
81044
                },] },
81045
    ];
81046
    return MatCardHeader;
81047
}());
81048
/**
81049
 * Component intended to be used within the `<mat-card>` component. It adds styles for a preset
81050
 * layout that groups an image with a title section.
81051
 * \@docs-private
81052
 */
81053
var MatCardTitleGroup = /** @class */ (function () {
81054
    function MatCardTitleGroup() {
81055
    }
81056
    MatCardTitleGroup.decorators = [
81057
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-card-title-group',
81058
                    template: "<div><ng-content select=\"mat-card-title, mat-card-subtitle, [mat-card-title], [mat-card-subtitle], [matCardTitle], [matCardSubtitle]\"></ng-content></div><ng-content select=\"img\"></ng-content><ng-content></ng-content>",
81059
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
81060
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
81061
                    host: { 'class': 'mat-card-title-group' }
81062
                },] },
81063
    ];
81064
    return MatCardTitleGroup;
81065
}());
81066
 
81067
/**
81068
 * @fileoverview added by tsickle
81069
 * @suppress {checkTypes} checked by tsc
81070
 */
81071
var MatCardModule = /** @class */ (function () {
81072
    function MatCardModule() {
81073
    }
81074
    MatCardModule.decorators = [
81075
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
81076
                    imports: [_angular_material_core__WEBPACK_IMPORTED_MODULE_1__["MatCommonModule"]],
81077
                    exports: [
81078
                        MatCard,
81079
                        MatCardHeader,
81080
                        MatCardTitleGroup,
81081
                        MatCardContent,
81082
                        MatCardTitle,
81083
                        MatCardSubtitle,
81084
                        MatCardActions,
81085
                        MatCardFooter,
81086
                        MatCardSmImage,
81087
                        MatCardMdImage,
81088
                        MatCardLgImage,
81089
                        MatCardImage,
81090
                        MatCardXlImage,
81091
                        MatCardAvatar,
81092
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_1__["MatCommonModule"],
81093
                    ],
81094
                    declarations: [
81095
                        MatCard, MatCardHeader, MatCardTitleGroup, MatCardContent, MatCardTitle, MatCardSubtitle,
81096
                        MatCardActions, MatCardFooter, MatCardSmImage, MatCardMdImage, MatCardLgImage, MatCardImage,
81097
                        MatCardXlImage, MatCardAvatar,
81098
                    ],
81099
                },] },
81100
    ];
81101
    return MatCardModule;
81102
}());
81103
 
81104
/**
81105
 * @fileoverview added by tsickle
81106
 * @suppress {checkTypes} checked by tsc
81107
 */
81108
 
81109
/**
81110
 * @fileoverview added by tsickle
81111
 * @suppress {checkTypes} checked by tsc
81112
 */
81113
 
81114
 
81115
//# sourceMappingURL=card.es5.js.map
81116
 
81117
 
81118
/***/ }),
81119
 
81120
/***/ "./node_modules/@angular/material/esm5/checkbox.es5.js":
81121
/*!*************************************************************!*\
81122
  !*** ./node_modules/@angular/material/esm5/checkbox.es5.js ***!
81123
  \*************************************************************/
81124
/*! exports provided: MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR, TransitionCheckState, MatCheckboxChange, MatCheckboxBase, _MatCheckboxMixinBase, MatCheckbox, MAT_CHECKBOX_CLICK_ACTION, MatCheckboxModule, MAT_CHECKBOX_REQUIRED_VALIDATOR, MatCheckboxRequiredValidator */
81125
/***/ (function(module, __webpack_exports__, __webpack_require__) {
81126
 
81127
"use strict";
81128
__webpack_require__.r(__webpack_exports__);
81129
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR", function() { return MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR; });
81130
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TransitionCheckState", function() { return TransitionCheckState; });
81131
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCheckboxChange", function() { return MatCheckboxChange; });
81132
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCheckboxBase", function() { return MatCheckboxBase; });
81133
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatCheckboxMixinBase", function() { return _MatCheckboxMixinBase; });
81134
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCheckbox", function() { return MatCheckbox; });
81135
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_CHECKBOX_CLICK_ACTION", function() { return MAT_CHECKBOX_CLICK_ACTION; });
81136
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCheckboxModule", function() { return MatCheckboxModule; });
81137
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_CHECKBOX_REQUIRED_VALIDATOR", function() { return MAT_CHECKBOX_REQUIRED_VALIDATOR; });
81138
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCheckboxRequiredValidator", function() { return MatCheckboxRequiredValidator; });
81139
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
81140
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
81141
/* harmony import */ var _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/cdk/a11y */ "./node_modules/@angular/cdk/esm5/a11y.es5.js");
81142
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
81143
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
81144
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
81145
/* harmony import */ var _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/platform-browser/animations */ "./node_modules/@angular/platform-browser/fesm5/animations.js");
81146
/* harmony import */ var _angular_cdk_observers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/cdk/observers */ "./node_modules/@angular/cdk/esm5/observers.es5.js");
81147
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
81148
/**
81149
 * @license
81150
 * Copyright Google LLC All Rights Reserved.
81151
 *
81152
 * Use of this source code is governed by an MIT-style license that can be
81153
 * found in the LICENSE file at https://angular.io/license
81154
 */
81155
 
81156
 
81157
 
81158
 
81159
 
81160
 
81161
 
81162
 
81163
 
81164
 
81165
/**
81166
 * @fileoverview added by tsickle
81167
 * @suppress {checkTypes} checked by tsc
81168
 */
81169
/**
81170
 * Injection token that can be used to specify the checkbox click behavior.
81171
 */
81172
var /** @type {?} */ MAT_CHECKBOX_CLICK_ACTION = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('mat-checkbox-click-action');
81173
 
81174
/**
81175
 * @fileoverview added by tsickle
81176
 * @suppress {checkTypes} checked by tsc
81177
 */
81178
// Increasing integer for generating unique ids for checkbox components.
81179
var /** @type {?} */ nextUniqueId = 0;
81180
/**
81181
 * Provider Expression that allows mat-checkbox to register as a ControlValueAccessor.
81182
 * This allows it to support [(ngModel)].
81183
 * \@docs-private
81184
 */
81185
var /** @type {?} */ MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR = {
81186
    provide: _angular_forms__WEBPACK_IMPORTED_MODULE_4__["NG_VALUE_ACCESSOR"],
81187
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () { return MatCheckbox; }),
81188
    multi: true
81189
};
81190
/** @enum {number} */
81191
var TransitionCheckState = {
81192
    /** The initial state of the component before any user interaction. */
81193
    Init: 0,
81194
    /** The state representing the component when it's becoming checked. */
81195
    Checked: 1,
81196
    /** The state representing the component when it's becoming unchecked. */
81197
    Unchecked: 2,
81198
    /** The state representing the component when it's becoming indeterminate. */
81199
    Indeterminate: 3,
81200
};
81201
TransitionCheckState[TransitionCheckState.Init] = "Init";
81202
TransitionCheckState[TransitionCheckState.Checked] = "Checked";
81203
TransitionCheckState[TransitionCheckState.Unchecked] = "Unchecked";
81204
TransitionCheckState[TransitionCheckState.Indeterminate] = "Indeterminate";
81205
/**
81206
 * Change event object emitted by MatCheckbox.
81207
 */
81208
var  /**
81209
 * Change event object emitted by MatCheckbox.
81210
 */
81211
MatCheckboxChange = /** @class */ (function () {
81212
    function MatCheckboxChange() {
81213
    }
81214
    return MatCheckboxChange;
81215
}());
81216
/**
81217
 * \@docs-private
81218
 */
81219
var  /**
81220
 * \@docs-private
81221
 */
81222
MatCheckboxBase = /** @class */ (function () {
81223
    function MatCheckboxBase(_elementRef) {
81224
        this._elementRef = _elementRef;
81225
    }
81226
    return MatCheckboxBase;
81227
}());
81228
var /** @type {?} */ _MatCheckboxMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_5__["mixinTabIndex"])(Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_5__["mixinColor"])(Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_5__["mixinDisableRipple"])(Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_5__["mixinDisabled"])(MatCheckboxBase)), 'accent'));
81229
/**
81230
 * A material design checkbox component. Supports all of the functionality of an HTML5 checkbox,
81231
 * and exposes a similar API. A MatCheckbox can be either checked, unchecked, indeterminate, or
81232
 * disabled. Note that all additional accessibility attributes are taken care of by the component,
81233
 * so there is no need to provide them yourself. However, if you want to omit a label and still
81234
 * have the checkbox be accessible, you may supply an [aria-label] input.
81235
 * See: https://material.io/design/components/selection-controls.html
81236
 */
81237
var MatCheckbox = /** @class */ (function (_super) {
81238
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(MatCheckbox, _super);
81239
    function MatCheckbox(elementRef, _changeDetectorRef, _focusMonitor, _ngZone, tabIndex, _clickAction, _animationMode) {
81240
        var _this = _super.call(this, elementRef) || this;
81241
        _this._changeDetectorRef = _changeDetectorRef;
81242
        _this._focusMonitor = _focusMonitor;
81243
        _this._ngZone = _ngZone;
81244
        _this._clickAction = _clickAction;
81245
        _this._animationMode = _animationMode;
81246
        /**
81247
         * Attached to the aria-label attribute of the host element. In most cases, arial-labelledby will
81248
         * take precedence so this may be omitted.
81249
         */
81250
        _this.ariaLabel = '';
81251
        /**
81252
         * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element
81253
         */
81254
        _this.ariaLabelledby = null;
81255
        _this._uniqueId = "mat-checkbox-" + ++nextUniqueId;
81256
        /**
81257
         * A unique id for the checkbox input. If none is supplied, it will be auto-generated.
81258
         */
81259
        _this.id = _this._uniqueId;
81260
        /**
81261
         * Whether the label should appear after or before the checkbox. Defaults to 'after'
81262
         */
81263
        _this.labelPosition = 'after';
81264
        /**
81265
         * Name value will be applied to the input element if present
81266
         */
81267
        _this.name = null;
81268
        /**
81269
         * Event emitted when the checkbox's `checked` value changes.
81270
         */
81271
        _this.change = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
81272
        /**
81273
         * Event emitted when the checkbox's `indeterminate` value changes.
81274
         */
81275
        _this.indeterminateChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
81276
        /**
81277
         * Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor.
81278
         * \@docs-private
81279
         */
81280
        _this._onTouched = function () { };
81281
        _this._currentAnimationClass = '';
81282
        _this._currentCheckState = TransitionCheckState.Init;
81283
        _this._controlValueAccessorChangeFn = function () { };
81284
        _this._checked = false;
81285
        _this._disabled = false;
81286
        _this._indeterminate = false;
81287
        _this.tabIndex = parseInt(tabIndex) || 0;
81288
        return _this;
81289
    }
81290
    Object.defineProperty(MatCheckbox.prototype, "inputId", {
81291
        /** Returns the unique id for the visual hidden input. */
81292
        get: /**
81293
         * Returns the unique id for the visual hidden input.
81294
         * @return {?}
81295
         */
81296
        function () { return (this.id || this._uniqueId) + "-input"; },
81297
        enumerable: true,
81298
        configurable: true
81299
    });
81300
    Object.defineProperty(MatCheckbox.prototype, "required", {
81301
        get: /**
81302
         * Whether the checkbox is required.
81303
         * @return {?}
81304
         */
81305
        function () { return this._required; },
81306
        set: /**
81307
         * @param {?} value
81308
         * @return {?}
81309
         */
81310
        function (value) { this._required = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceBooleanProperty"])(value); },
81311
        enumerable: true,
81312
        configurable: true
81313
    });
81314
    /**
81315
     * @return {?}
81316
     */
81317
    MatCheckbox.prototype.ngAfterViewInit = /**
81318
     * @return {?}
81319
     */
81320
    function () {
81321
        var _this = this;
81322
        this._focusMonitor
81323
            .monitor(this._inputElement.nativeElement)
81324
            .subscribe(function (focusOrigin) { return _this._onInputFocusChange(focusOrigin); });
81325
    };
81326
    /**
81327
     * @return {?}
81328
     */
81329
    MatCheckbox.prototype.ngOnDestroy = /**
81330
     * @return {?}
81331
     */
81332
    function () {
81333
        this._focusMonitor.stopMonitoring(this._inputElement.nativeElement);
81334
    };
81335
    Object.defineProperty(MatCheckbox.prototype, "checked", {
81336
        get: /**
81337
         * Whether the checkbox is checked.
81338
         * @return {?}
81339
         */
81340
        function () { return this._checked; },
81341
        set: /**
81342
         * @param {?} value
81343
         * @return {?}
81344
         */
81345
        function (value) {
81346
            if (value != this.checked) {
81347
                this._checked = value;
81348
                this._changeDetectorRef.markForCheck();
81349
            }
81350
        },
81351
        enumerable: true,
81352
        configurable: true
81353
    });
81354
    Object.defineProperty(MatCheckbox.prototype, "disabled", {
81355
        get: /**
81356
         * Whether the checkbox is disabled. This fully overrides the implementation provided by
81357
         * mixinDisabled, but the mixin is still required because mixinTabIndex requires it.
81358
         * @return {?}
81359
         */
81360
        function () { return this._disabled; },
81361
        set: /**
81362
         * @param {?} value
81363
         * @return {?}
81364
         */
81365
        function (value) {
81366
            if (value != this.disabled) {
81367
                this._disabled = value;
81368
                this._changeDetectorRef.markForCheck();
81369
            }
81370
        },
81371
        enumerable: true,
81372
        configurable: true
81373
    });
81374
    Object.defineProperty(MatCheckbox.prototype, "indeterminate", {
81375
        get: /**
81376
         * Whether the checkbox is indeterminate. This is also known as "mixed" mode and can be used to
81377
         * represent a checkbox with three states, e.g. a checkbox that represents a nested list of
81378
         * checkable items. Note that whenever checkbox is manually clicked, indeterminate is immediately
81379
         * set to false.
81380
         * @return {?}
81381
         */
81382
        function () { return this._indeterminate; },
81383
        set: /**
81384
         * @param {?} value
81385
         * @return {?}
81386
         */
81387
        function (value) {
81388
            var /** @type {?} */ changed = value != this._indeterminate;
81389
            this._indeterminate = value;
81390
            if (changed) {
81391
                if (this._indeterminate) {
81392
                    this._transitionCheckState(TransitionCheckState.Indeterminate);
81393
                }
81394
                else {
81395
                    this._transitionCheckState(this.checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);
81396
                }
81397
                this.indeterminateChange.emit(this._indeterminate);
81398
            }
81399
        },
81400
        enumerable: true,
81401
        configurable: true
81402
    });
81403
    /**
81404
     * @return {?}
81405
     */
81406
    MatCheckbox.prototype._isRippleDisabled = /**
81407
     * @return {?}
81408
     */
81409
    function () {
81410
        return this.disableRipple || this.disabled;
81411
    };
81412
    /** Method being called whenever the label text changes. */
81413
    /**
81414
     * Method being called whenever the label text changes.
81415
     * @return {?}
81416
     */
81417
    MatCheckbox.prototype._onLabelTextChange = /**
81418
     * Method being called whenever the label text changes.
81419
     * @return {?}
81420
     */
81421
    function () {
81422
        // This method is getting called whenever the label of the checkbox changes.
81423
        // Since the checkbox uses the OnPush strategy we need to notify it about the change
81424
        // that has been recognized by the cdkObserveContent directive.
81425
        this._changeDetectorRef.markForCheck();
81426
    };
81427
    // Implemented as part of ControlValueAccessor.
81428
    /**
81429
     * @param {?} value
81430
     * @return {?}
81431
     */
81432
    MatCheckbox.prototype.writeValue = /**
81433
     * @param {?} value
81434
     * @return {?}
81435
     */
81436
    function (value) {
81437
        this.checked = !!value;
81438
    };
81439
    // Implemented as part of ControlValueAccessor.
81440
    /**
81441
     * @param {?} fn
81442
     * @return {?}
81443
     */
81444
    MatCheckbox.prototype.registerOnChange = /**
81445
     * @param {?} fn
81446
     * @return {?}
81447
     */
81448
    function (fn) {
81449
        this._controlValueAccessorChangeFn = fn;
81450
    };
81451
    // Implemented as part of ControlValueAccessor.
81452
    /**
81453
     * @param {?} fn
81454
     * @return {?}
81455
     */
81456
    MatCheckbox.prototype.registerOnTouched = /**
81457
     * @param {?} fn
81458
     * @return {?}
81459
     */
81460
    function (fn) {
81461
        this._onTouched = fn;
81462
    };
81463
    // Implemented as part of ControlValueAccessor.
81464
    /**
81465
     * @param {?} isDisabled
81466
     * @return {?}
81467
     */
81468
    MatCheckbox.prototype.setDisabledState = /**
81469
     * @param {?} isDisabled
81470
     * @return {?}
81471
     */
81472
    function (isDisabled) {
81473
        this.disabled = isDisabled;
81474
    };
81475
    /**
81476
     * @return {?}
81477
     */
81478
    MatCheckbox.prototype._getAriaChecked = /**
81479
     * @return {?}
81480
     */
81481
    function () {
81482
        return this.checked ? 'true' : (this.indeterminate ? 'mixed' : 'false');
81483
    };
81484
    /**
81485
     * @param {?} newState
81486
     * @return {?}
81487
     */
81488
    MatCheckbox.prototype._transitionCheckState = /**
81489
     * @param {?} newState
81490
     * @return {?}
81491
     */
81492
    function (newState) {
81493
        var /** @type {?} */ oldState = this._currentCheckState;
81494
        var /** @type {?} */ element = this._elementRef.nativeElement;
81495
        if (oldState === newState) {
81496
            return;
81497
        }
81498
        if (this._currentAnimationClass.length > 0) {
81499
            element.classList.remove(this._currentAnimationClass);
81500
        }
81501
        this._currentAnimationClass = this._getAnimationClassForCheckStateTransition(oldState, newState);
81502
        this._currentCheckState = newState;
81503
        if (this._currentAnimationClass.length > 0) {
81504
            element.classList.add(this._currentAnimationClass);
81505
            // Remove the animation class to avoid animation when the checkbox is moved between containers
81506
            var /** @type {?} */ animationClass_1 = this._currentAnimationClass;
81507
            this._ngZone.runOutsideAngular(function () {
81508
                setTimeout(function () {
81509
                    element.classList.remove(animationClass_1);
81510
                }, 1000);
81511
            });
81512
        }
81513
    };
81514
    /**
81515
     * @return {?}
81516
     */
81517
    MatCheckbox.prototype._emitChangeEvent = /**
81518
     * @return {?}
81519
     */
81520
    function () {
81521
        var /** @type {?} */ event = new MatCheckboxChange();
81522
        event.source = this;
81523
        event.checked = this.checked;
81524
        this._controlValueAccessorChangeFn(this.checked);
81525
        this.change.emit(event);
81526
    };
81527
    /**
81528
     * Function is called whenever the focus changes for the input element.
81529
     * @param {?} focusOrigin
81530
     * @return {?}
81531
     */
81532
    MatCheckbox.prototype._onInputFocusChange = /**
81533
     * Function is called whenever the focus changes for the input element.
81534
     * @param {?} focusOrigin
81535
     * @return {?}
81536
     */
81537
    function (focusOrigin) {
81538
        var _this = this;
81539
        // TODO(paul): support `program`. See https://github.com/angular/material2/issues/9889
81540
        if (!this._focusRipple && focusOrigin === 'keyboard') {
81541
            this._focusRipple = this.ripple.launch(0, 0, { persistent: true });
81542
        }
81543
        else if (!focusOrigin) {
81544
            if (this._focusRipple) {
81545
                this._focusRipple.fadeOut();
81546
                this._focusRipple = null;
81547
            }
81548
            // When a focused element becomes disabled, the browser *immediately* fires a blur event.
81549
            // Angular does not expect events to be raised during change detection, so any state change
81550
            // (such as a form control's 'ng-touched') will cause a changed-after-checked error.
81551
            // See https://github.com/angular/angular/issues/17793. To work around this, we defer telling
81552
            // the form control it has been touched until the next tick.
81553
            Promise.resolve().then(function () { return _this._onTouched(); });
81554
        }
81555
    };
81556
    /** Toggles the `checked` state of the checkbox. */
81557
    /**
81558
     * Toggles the `checked` state of the checkbox.
81559
     * @return {?}
81560
     */
81561
    MatCheckbox.prototype.toggle = /**
81562
     * Toggles the `checked` state of the checkbox.
81563
     * @return {?}
81564
     */
81565
    function () {
81566
        this.checked = !this.checked;
81567
    };
81568
    /**
81569
     * Event handler for checkbox input element.
81570
     * Toggles checked state if element is not disabled.
81571
     * Do not toggle on (change) event since IE doesn't fire change event when
81572
     *   indeterminate checkbox is clicked.
81573
     * @param event
81574
     */
81575
    /**
81576
     * Event handler for checkbox input element.
81577
     * Toggles checked state if element is not disabled.
81578
     * Do not toggle on (change) event since IE doesn't fire change event when
81579
     *   indeterminate checkbox is clicked.
81580
     * @param {?} event
81581
     * @return {?}
81582
     */
81583
    MatCheckbox.prototype._onInputClick = /**
81584
     * Event handler for checkbox input element.
81585
     * Toggles checked state if element is not disabled.
81586
     * Do not toggle on (change) event since IE doesn't fire change event when
81587
     *   indeterminate checkbox is clicked.
81588
     * @param {?} event
81589
     * @return {?}
81590
     */
81591
    function (event) {
81592
        var _this = this;
81593
        // We have to stop propagation for click events on the visual hidden input element.
81594
        // By default, when a user clicks on a label element, a generated click event will be
81595
        // dispatched on the associated input element. Since we are using a label element as our
81596
        // root container, the click event on the `checkbox` will be executed twice.
81597
        // The real click event will bubble up, and the generated click event also tries to bubble up.
81598
        // This will lead to multiple click events.
81599
        // Preventing bubbling for the second event will solve that issue.
81600
        event.stopPropagation();
81601
        // If resetIndeterminate is false, and the current state is indeterminate, do nothing on click
81602
        if (!this.disabled && this._clickAction !== 'noop') {
81603
            // When user manually click on the checkbox, `indeterminate` is set to false.
81604
            if (this.indeterminate && this._clickAction !== 'check') {
81605
                Promise.resolve().then(function () {
81606
                    _this._indeterminate = false;
81607
                    _this.indeterminateChange.emit(_this._indeterminate);
81608
                });
81609
            }
81610
            this.toggle();
81611
            this._transitionCheckState(this._checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);
81612
            // Emit our custom change event if the native input emitted one.
81613
            // It is important to only emit it, if the native input triggered one, because
81614
            // we don't want to trigger a change event, when the `checked` variable changes for example.
81615
            this._emitChangeEvent();
81616
        }
81617
        else if (!this.disabled && this._clickAction === 'noop') {
81618
            // Reset native input when clicked with noop. The native checkbox becomes checked after
81619
            // click, reset it to be align with `checked` value of `mat-checkbox`.
81620
            this._inputElement.nativeElement.checked = this.checked;
81621
            this._inputElement.nativeElement.indeterminate = this.indeterminate;
81622
        }
81623
    };
81624
    /** Focuses the checkbox. */
81625
    /**
81626
     * Focuses the checkbox.
81627
     * @return {?}
81628
     */
81629
    MatCheckbox.prototype.focus = /**
81630
     * Focuses the checkbox.
81631
     * @return {?}
81632
     */
81633
    function () {
81634
        this._focusMonitor.focusVia(this._inputElement.nativeElement, 'keyboard');
81635
    };
81636
    /**
81637
     * @param {?} event
81638
     * @return {?}
81639
     */
81640
    MatCheckbox.prototype._onInteractionEvent = /**
81641
     * @param {?} event
81642
     * @return {?}
81643
     */
81644
    function (event) {
81645
        // We always have to stop propagation on the change event.
81646
        // Otherwise the change event, from the input element, will bubble up and
81647
        // emit its event object to the `change` output.
81648
        event.stopPropagation();
81649
    };
81650
    /**
81651
     * @param {?} oldState
81652
     * @param {?} newState
81653
     * @return {?}
81654
     */
81655
    MatCheckbox.prototype._getAnimationClassForCheckStateTransition = /**
81656
     * @param {?} oldState
81657
     * @param {?} newState
81658
     * @return {?}
81659
     */
81660
    function (oldState, newState) {
81661
        // Don't transition if animations are disabled.
81662
        if (this._animationMode === 'NoopAnimations') {
81663
            return '';
81664
        }
81665
        var /** @type {?} */ animSuffix = '';
81666
        switch (oldState) {
81667
            case TransitionCheckState.Init:
81668
                // Handle edge case where user interacts with checkbox that does not have [(ngModel)] or
81669
                // [checked] bound to it.
81670
                if (newState === TransitionCheckState.Checked) {
81671
                    animSuffix = 'unchecked-checked';
81672
                }
81673
                else if (newState == TransitionCheckState.Indeterminate) {
81674
                    animSuffix = 'unchecked-indeterminate';
81675
                }
81676
                else {
81677
                    return '';
81678
                }
81679
                break;
81680
            case TransitionCheckState.Unchecked:
81681
                animSuffix = newState === TransitionCheckState.Checked ?
81682
                    'unchecked-checked' : 'unchecked-indeterminate';
81683
                break;
81684
            case TransitionCheckState.Checked:
81685
                animSuffix = newState === TransitionCheckState.Unchecked ?
81686
                    'checked-unchecked' : 'checked-indeterminate';
81687
                break;
81688
            case TransitionCheckState.Indeterminate:
81689
                animSuffix = newState === TransitionCheckState.Checked ?
81690
                    'indeterminate-checked' : 'indeterminate-unchecked';
81691
                break;
81692
        }
81693
        return "mat-checkbox-anim-" + animSuffix;
81694
    };
81695
    MatCheckbox.decorators = [
81696
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-checkbox',
81697
                    template: "<label [attr.for]=\"inputId\" class=\"mat-checkbox-layout\" #label><div class=\"mat-checkbox-inner-container\" [class.mat-checkbox-inner-container-no-side-margin]=\"!checkboxLabel.textContent || !checkboxLabel.textContent.trim()\"><input #input class=\"mat-checkbox-input cdk-visually-hidden\" type=\"checkbox\" [id]=\"inputId\" [required]=\"required\" [checked]=\"checked\" [attr.value]=\"value\" [disabled]=\"disabled\" [attr.name]=\"name\" [tabIndex]=\"tabIndex\" [indeterminate]=\"indeterminate\" [attr.aria-label]=\"ariaLabel || null\" [attr.aria-labelledby]=\"ariaLabelledby\" [attr.aria-checked]=\"_getAriaChecked()\" (change)=\"_onInteractionEvent($event)\" (click)=\"_onInputClick($event)\"><div matRipple class=\"mat-checkbox-ripple\" [matRippleTrigger]=\"label\" [matRippleDisabled]=\"_isRippleDisabled()\" [matRippleRadius]=\"25\" [matRippleCentered]=\"true\" [matRippleAnimation]=\"{enterDuration: 150}\"></div><div class=\"mat-checkbox-frame\"></div><div class=\"mat-checkbox-background\"><svg version=\"1.1\" focusable=\"false\" class=\"mat-checkbox-checkmark\" viewBox=\"0 0 24 24\" xml:space=\"preserve\"><path class=\"mat-checkbox-checkmark-path\" fill=\"none\" stroke=\"white\" d=\"M4.1,12.7 9,17.6 20.3,6.3\"/></svg><div class=\"mat-checkbox-mixedmark\"></div></div></div><span class=\"mat-checkbox-label\" #checkboxLabel (cdkObserveContent)=\"_onLabelTextChange()\"><span style=\"display:none\">&nbsp;</span><ng-content></ng-content></span></label>",
81698
                    styles: ["@keyframes mat-checkbox-fade-in-background{0%{opacity:0}50%{opacity:1}}@keyframes mat-checkbox-fade-out-background{0%,50%{opacity:1}100%{opacity:0}}@keyframes mat-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:22.91026}50%{animation-timing-function:cubic-bezier(0,0,.2,.1)}100%{stroke-dashoffset:0}}@keyframes mat-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0,0,0,1)}100%{transform:scaleX(1)}}@keyframes mat-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(.4,0,1,1);stroke-dashoffset:0}to{stroke-dashoffset:-22.91026}}@keyframes mat-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0,0,.2,.1);opacity:1;transform:rotate(0)}to{opacity:0;transform:rotate(45deg)}}@keyframes mat-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(.14,0,0,1);opacity:0;transform:rotate(45deg)}to{opacity:1;transform:rotate(360deg)}}@keyframes mat-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0,0,.2,.1);opacity:0;transform:rotate(-45deg)}to{opacity:1;transform:rotate(0)}}@keyframes mat-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(.14,0,0,1);opacity:1;transform:rotate(0)}to{opacity:0;transform:rotate(315deg)}}@keyframes mat-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;opacity:1;transform:scaleX(1)}100%,32.8%{opacity:0;transform:scaleX(0)}}.mat-checkbox-checkmark,.mat-checkbox-mixedmark{width:calc(100% - 4px)}.mat-checkbox-background,.mat-checkbox-frame{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:2px;box-sizing:border-box;pointer-events:none}.mat-checkbox{transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1);cursor:pointer;-webkit-tap-highlight-color:transparent}._mat-animation-noopable.mat-checkbox{transition:none;animation:none}.mat-checkbox-layout{cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mat-checkbox-inner-container{display:inline-block;height:20px;line-height:0;margin:auto;margin-right:8px;order:0;position:relative;vertical-align:middle;white-space:nowrap;width:20px;flex-shrink:0}[dir=rtl] .mat-checkbox-inner-container{margin-left:8px;margin-right:auto}.mat-checkbox-inner-container-no-side-margin{margin-left:0;margin-right:0}.mat-checkbox-frame{background-color:transparent;transition:border-color 90ms cubic-bezier(0,0,.2,.1);border-width:2px;border-style:solid}._mat-animation-noopable .mat-checkbox-frame{transition:none}.mat-checkbox-background{align-items:center;display:inline-flex;justify-content:center;transition:background-color 90ms cubic-bezier(0,0,.2,.1),opacity 90ms cubic-bezier(0,0,.2,.1)}._mat-animation-noopable .mat-checkbox-background{transition:none}.mat-checkbox-checkmark{top:0;left:0;right:0;bottom:0;position:absolute;width:100%}.mat-checkbox-checkmark-path{stroke-dashoffset:22.91026;stroke-dasharray:22.91026;stroke-width:2.66667px}.mat-checkbox-mixedmark{height:2px;opacity:0;transform:scaleX(0) rotate(0)}@media screen and (-ms-high-contrast:active){.mat-checkbox-mixedmark{height:0;border-top:solid 2px;margin-top:2px}}.mat-checkbox-label-before .mat-checkbox-inner-container{order:1;margin-left:8px;margin-right:auto}[dir=rtl] .mat-checkbox-label-before .mat-checkbox-inner-container{margin-left:auto;margin-right:8px}.mat-checkbox-checked .mat-checkbox-checkmark{opacity:1}.mat-checkbox-checked .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-checked .mat-checkbox-mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark{opacity:0;transform:rotate(45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-indeterminate .mat-checkbox-mixedmark{opacity:1;transform:scaleX(1) rotate(0)}.mat-checkbox-unchecked .mat-checkbox-background{background-color:transparent}.mat-checkbox-disabled{cursor:default}.mat-checkbox-anim-unchecked-checked .mat-checkbox-background{animation:180ms linear 0s mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-checked .mat-checkbox-checkmark-path{animation:180ms linear 0s mat-checkbox-unchecked-checked-checkmark-path}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-background{animation:180ms linear 0s mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0s mat-checkbox-unchecked-indeterminate-mixedmark}.mat-checkbox-anim-checked-unchecked .mat-checkbox-background{animation:180ms linear 0s mat-checkbox-fade-out-background}.mat-checkbox-anim-checked-unchecked .mat-checkbox-checkmark-path{animation:90ms linear 0s mat-checkbox-checked-unchecked-checkmark-path}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-checkmark{animation:90ms linear 0s mat-checkbox-checked-indeterminate-checkmark}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0s mat-checkbox-checked-indeterminate-mixedmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-checkmark{animation:.5s linear 0s mat-checkbox-indeterminate-checked-checkmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-mixedmark{animation:.5s linear 0s mat-checkbox-indeterminate-checked-mixedmark}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-background{animation:180ms linear 0s mat-checkbox-fade-out-background}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-mixedmark{animation:.3s linear 0s mat-checkbox-indeterminate-unchecked-mixedmark}.mat-checkbox-input{bottom:0;left:50%}.mat-checkbox-ripple{position:absolute;left:calc(50% - 25px);top:calc(50% - 25px);height:50px;width:50px;z-index:1;pointer-events:none}"],
81699
                    exportAs: 'matCheckbox',
81700
                    host: {
81701
                        'class': 'mat-checkbox',
81702
                        '[id]': 'id',
81703
                        '[class.mat-checkbox-indeterminate]': 'indeterminate',
81704
                        '[class.mat-checkbox-checked]': 'checked',
81705
                        '[class.mat-checkbox-disabled]': 'disabled',
81706
                        '[class.mat-checkbox-label-before]': 'labelPosition == "before"',
81707
                        '[class._mat-animation-noopable]': "_animationMode === 'NoopAnimations'",
81708
                    },
81709
                    providers: [MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR],
81710
                    inputs: ['disableRipple', 'color', 'tabIndex'],
81711
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
81712
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush
81713
                },] },
81714
    ];
81715
    /** @nocollapse */
81716
    MatCheckbox.ctorParameters = function () { return [
81717
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
81718
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"], },
81719
        { type: _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_2__["FocusMonitor"], },
81720
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], },
81721
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Attribute"], args: ['tabindex',] },] },
81722
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [MAT_CHECKBOX_CLICK_ACTION,] },] },
81723
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_6__["ANIMATION_MODULE_TYPE"],] },] },
81724
    ]; };
81725
    MatCheckbox.propDecorators = {
81726
        "ariaLabel": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['aria-label',] },],
81727
        "ariaLabelledby": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['aria-labelledby',] },],
81728
        "id": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
81729
        "required": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
81730
        "labelPosition": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
81731
        "name": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
81732
        "change": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
81733
        "indeterminateChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
81734
        "value": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
81735
        "_inputElement": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: ['input',] },],
81736
        "ripple": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: [_angular_material_core__WEBPACK_IMPORTED_MODULE_5__["MatRipple"],] },],
81737
        "checked": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
81738
        "disabled": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
81739
        "indeterminate": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
81740
    };
81741
    return MatCheckbox;
81742
}(_MatCheckboxMixinBase));
81743
 
81744
/**
81745
 * @fileoverview added by tsickle
81746
 * @suppress {checkTypes} checked by tsc
81747
 */
81748
var /** @type {?} */ MAT_CHECKBOX_REQUIRED_VALIDATOR = {
81749
    provide: _angular_forms__WEBPACK_IMPORTED_MODULE_4__["NG_VALIDATORS"],
81750
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () { return MatCheckboxRequiredValidator; }),
81751
    multi: true
81752
};
81753
/**
81754
 * Validator for Material checkbox's required attribute in template-driven checkbox.
81755
 * Current CheckboxRequiredValidator only work with `input type=checkbox` and does not
81756
 * work with `mat-checkbox`.
81757
 */
81758
var MatCheckboxRequiredValidator = /** @class */ (function (_super) {
81759
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(MatCheckboxRequiredValidator, _super);
81760
    function MatCheckboxRequiredValidator() {
81761
        return _super !== null && _super.apply(this, arguments) || this;
81762
    }
81763
    MatCheckboxRequiredValidator.decorators = [
81764
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
81765
                    selector: "mat-checkbox[required][formControlName],\n             mat-checkbox[required][formControl], mat-checkbox[required][ngModel]",
81766
                    providers: [MAT_CHECKBOX_REQUIRED_VALIDATOR],
81767
                    host: { '[attr.required]': 'required ? "" : null' }
81768
                },] },
81769
    ];
81770
    return MatCheckboxRequiredValidator;
81771
}(_angular_forms__WEBPACK_IMPORTED_MODULE_4__["CheckboxRequiredValidator"]));
81772
 
81773
/**
81774
 * @fileoverview added by tsickle
81775
 * @suppress {checkTypes} checked by tsc
81776
 */
81777
var MatCheckboxModule = /** @class */ (function () {
81778
    function MatCheckboxModule() {
81779
    }
81780
    MatCheckboxModule.decorators = [
81781
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
81782
                    imports: [_angular_common__WEBPACK_IMPORTED_MODULE_8__["CommonModule"], _angular_material_core__WEBPACK_IMPORTED_MODULE_5__["MatRippleModule"], _angular_material_core__WEBPACK_IMPORTED_MODULE_5__["MatCommonModule"], _angular_cdk_observers__WEBPACK_IMPORTED_MODULE_7__["ObserversModule"]],
81783
                    exports: [MatCheckbox, MatCheckboxRequiredValidator, _angular_material_core__WEBPACK_IMPORTED_MODULE_5__["MatCommonModule"]],
81784
                    declarations: [MatCheckbox, MatCheckboxRequiredValidator],
81785
                },] },
81786
    ];
81787
    return MatCheckboxModule;
81788
}());
81789
 
81790
/**
81791
 * @fileoverview added by tsickle
81792
 * @suppress {checkTypes} checked by tsc
81793
 */
81794
 
81795
/**
81796
 * @fileoverview added by tsickle
81797
 * @suppress {checkTypes} checked by tsc
81798
 */
81799
 
81800
 
81801
//# sourceMappingURL=checkbox.es5.js.map
81802
 
81803
 
81804
/***/ }),
81805
 
81806
/***/ "./node_modules/@angular/material/esm5/chips.es5.js":
81807
/*!**********************************************************!*\
81808
  !*** ./node_modules/@angular/material/esm5/chips.es5.js ***!
81809
  \**********************************************************/
81810
/*! exports provided: MatChipsModule, MatChipListBase, _MatChipListMixinBase, MatChipListChange, MatChipList, MatChipSelectionChange, MatChipBase, _MatChipMixinBase, MatChipAvatar, MatChipTrailingIcon, MatChip, MatChipRemove, MatChipInput, MAT_CHIPS_DEFAULT_OPTIONS */
81811
/***/ (function(module, __webpack_exports__, __webpack_require__) {
81812
 
81813
"use strict";
81814
__webpack_require__.r(__webpack_exports__);
81815
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatChipsModule", function() { return MatChipsModule; });
81816
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatChipListBase", function() { return MatChipListBase; });
81817
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatChipListMixinBase", function() { return _MatChipListMixinBase; });
81818
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatChipListChange", function() { return MatChipListChange; });
81819
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatChipList", function() { return MatChipList; });
81820
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatChipSelectionChange", function() { return MatChipSelectionChange; });
81821
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatChipBase", function() { return MatChipBase; });
81822
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatChipMixinBase", function() { return _MatChipMixinBase; });
81823
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatChipAvatar", function() { return MatChipAvatar; });
81824
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatChipTrailingIcon", function() { return MatChipTrailingIcon; });
81825
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatChip", function() { return MatChip; });
81826
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatChipRemove", function() { return MatChipRemove; });
81827
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatChipInput", function() { return MatChipInput; });
81828
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_CHIPS_DEFAULT_OPTIONS", function() { return MAT_CHIPS_DEFAULT_OPTIONS; });
81829
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
81830
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
81831
/* harmony import */ var _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/cdk/keycodes */ "./node_modules/@angular/cdk/esm5/keycodes.es5.js");
81832
/* harmony import */ var _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/platform */ "./node_modules/@angular/cdk/esm5/platform.es5.js");
81833
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
81834
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
81835
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
81836
/* harmony import */ var _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/cdk/a11y */ "./node_modules/@angular/cdk/esm5/a11y.es5.js");
81837
/* harmony import */ var _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/cdk/bidi */ "./node_modules/@angular/cdk/esm5/bidi.es5.js");
81838
/* harmony import */ var _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/cdk/collections */ "./node_modules/@angular/cdk/esm5/collections.es5.js");
81839
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
81840
/* harmony import */ var _angular_material_form_field__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/material/form-field */ "./node_modules/@angular/material/esm5/form-field.es5.js");
81841
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
81842
/**
81843
 * @license
81844
 * Copyright Google LLC All Rights Reserved.
81845
 *
81846
 * Use of this source code is governed by an MIT-style license that can be
81847
 * found in the LICENSE file at https://angular.io/license
81848
 */
81849
 
81850
 
81851
 
81852
 
81853
 
81854
 
81855
 
81856
 
81857
 
81858
 
81859
 
81860
 
81861
 
81862
 
81863
/**
81864
 * @fileoverview added by tsickle
81865
 * @suppress {checkTypes} checked by tsc
81866
 */
81867
/**
81868
 * Event object emitted by MatChip when selected or deselected.
81869
 */
81870
var  /**
81871
 * Event object emitted by MatChip when selected or deselected.
81872
 */
81873
MatChipSelectionChange = /** @class */ (function () {
81874
    function MatChipSelectionChange(source, selected, isUserInput) {
81875
        if (isUserInput === void 0) { isUserInput = false; }
81876
        this.source = source;
81877
        this.selected = selected;
81878
        this.isUserInput = isUserInput;
81879
    }
81880
    return MatChipSelectionChange;
81881
}());
81882
/**
81883
 * \@docs-private
81884
 */
81885
var  /**
81886
 * \@docs-private
81887
 */
81888
MatChipBase = /** @class */ (function () {
81889
    function MatChipBase(_elementRef) {
81890
        this._elementRef = _elementRef;
81891
    }
81892
    return MatChipBase;
81893
}());
81894
var /** @type {?} */ _MatChipMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_5__["mixinColor"])(Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_5__["mixinDisableRipple"])(Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_5__["mixinDisabled"])(MatChipBase)), 'primary');
81895
var /** @type {?} */ CHIP_ATTRIBUTE_NAMES = ['mat-basic-chip'];
81896
/**
81897
 * Dummy directive to add CSS class to chip avatar.
81898
 * \@docs-private
81899
 */
81900
var MatChipAvatar = /** @class */ (function () {
81901
    function MatChipAvatar() {
81902
    }
81903
    MatChipAvatar.decorators = [
81904
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Directive"], args: [{
81905
                    selector: 'mat-chip-avatar, [matChipAvatar]',
81906
                    host: { 'class': 'mat-chip-avatar' }
81907
                },] },
81908
    ];
81909
    return MatChipAvatar;
81910
}());
81911
/**
81912
 * Dummy directive to add CSS class to chip trailing icon.
81913
 * \@docs-private
81914
 */
81915
var MatChipTrailingIcon = /** @class */ (function () {
81916
    function MatChipTrailingIcon() {
81917
    }
81918
    MatChipTrailingIcon.decorators = [
81919
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Directive"], args: [{
81920
                    selector: 'mat-chip-trailing-icon, [matChipTrailingIcon]',
81921
                    host: { 'class': 'mat-chip-trailing-icon' }
81922
                },] },
81923
    ];
81924
    return MatChipTrailingIcon;
81925
}());
81926
/**
81927
 * Material design styled Chip component. Used inside the MatChipList component.
81928
 */
81929
var MatChip = /** @class */ (function (_super) {
81930
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatChip, _super);
81931
    function MatChip(_elementRef, ngZone, platform, globalOptions) {
81932
        var _this = _super.call(this, _elementRef) || this;
81933
        _this._elementRef = _elementRef;
81934
        /**
81935
         * Whether the ripples are globally disabled through the RippleGlobalOptions
81936
         */
81937
        _this._ripplesGloballyDisabled = false;
81938
        /**
81939
         * Ripple configuration for ripples that are launched on pointer down.
81940
         * \@docs-private
81941
         */
81942
        _this.rippleConfig = {};
81943
        /**
81944
         * Whether the chip has focus.
81945
         */
81946
        _this._hasFocus = false;
81947
        /**
81948
         * Whether the chip list is selectable
81949
         */
81950
        _this.chipListSelectable = true;
81951
        _this._selected = false;
81952
        _this._selectable = true;
81953
        _this._removable = true;
81954
        /**
81955
         * Emits when the chip is focused.
81956
         */
81957
        _this._onFocus = new rxjs__WEBPACK_IMPORTED_MODULE_6__["Subject"]();
81958
        /**
81959
         * Emits when the chip is blured.
81960
         */
81961
        _this._onBlur = new rxjs__WEBPACK_IMPORTED_MODULE_6__["Subject"]();
81962
        /**
81963
         * Emitted when the chip is selected or deselected.
81964
         */
81965
        _this.selectionChange = new _angular_core__WEBPACK_IMPORTED_MODULE_4__["EventEmitter"]();
81966
        /**
81967
         * Emitted when the chip is destroyed.
81968
         */
81969
        _this.destroyed = new _angular_core__WEBPACK_IMPORTED_MODULE_4__["EventEmitter"]();
81970
        /**
81971
         * Emitted when a chip is to be removed.
81972
         */
81973
        _this.removed = new _angular_core__WEBPACK_IMPORTED_MODULE_4__["EventEmitter"]();
81974
        _this._addHostClassName();
81975
        _this._chipRipple = new _angular_material_core__WEBPACK_IMPORTED_MODULE_5__["RippleRenderer"](_this, ngZone, _elementRef, platform);
81976
        _this._chipRipple.setupTriggerEvents(_elementRef.nativeElement);
81977
        if (globalOptions) {
81978
            _this._ripplesGloballyDisabled = !!globalOptions.disabled;
81979
            // TODO(paul): Once the speedFactor is removed, we no longer need to copy each single option.
81980
            // TODO(paul): Once the speedFactor is removed, we no longer need to copy each single option.
81981
            _this.rippleConfig = {
81982
                speedFactor: globalOptions.baseSpeedFactor,
81983
                animation: globalOptions.animation,
81984
                terminateOnPointerUp: globalOptions.terminateOnPointerUp,
81985
            };
81986
        }
81987
        return _this;
81988
    }
81989
    Object.defineProperty(MatChip.prototype, "rippleDisabled", {
81990
        /**
81991
         * Whether ripples are disabled on interaction
81992
         * @docs-private
81993
         */
81994
        get: /**
81995
         * Whether ripples are disabled on interaction
81996
         * \@docs-private
81997
         * @return {?}
81998
         */
81999
        function () {
82000
            return this.disabled || this.disableRipple || this._ripplesGloballyDisabled;
82001
        },
82002
        enumerable: true,
82003
        configurable: true
82004
    });
82005
    Object.defineProperty(MatChip.prototype, "selected", {
82006
        get: /**
82007
         * Whether the chip is selected.
82008
         * @return {?}
82009
         */
82010
        function () { return this._selected; },
82011
        set: /**
82012
         * @param {?} value
82013
         * @return {?}
82014
         */
82015
        function (value) {
82016
            this._selected = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceBooleanProperty"])(value);
82017
            this.selectionChange.emit({
82018
                source: this,
82019
                isUserInput: false,
82020
                selected: value
82021
            });
82022
        },
82023
        enumerable: true,
82024
        configurable: true
82025
    });
82026
    Object.defineProperty(MatChip.prototype, "value", {
82027
        get: /**
82028
         * The value of the chip. Defaults to the content inside `<mat-chip>` tags.
82029
         * @return {?}
82030
         */
82031
        function () {
82032
            return this._value != undefined
82033
                ? this._value
82034
                : this._elementRef.nativeElement.textContent;
82035
        },
82036
        set: /**
82037
         * @param {?} value
82038
         * @return {?}
82039
         */
82040
        function (value) { this._value = value; },
82041
        enumerable: true,
82042
        configurable: true
82043
    });
82044
    Object.defineProperty(MatChip.prototype, "selectable", {
82045
        get: /**
82046
         * Whether or not the chip is selectable. When a chip is not selectable,
82047
         * changes to it's selected state are always ignored. By default a chip is
82048
         * selectable, and it becomes non-selectable if it's parent chip list is
82049
         * not selectable.
82050
         * @return {?}
82051
         */
82052
        function () { return this._selectable && this.chipListSelectable; },
82053
        set: /**
82054
         * @param {?} value
82055
         * @return {?}
82056
         */
82057
        function (value) {
82058
            this._selectable = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceBooleanProperty"])(value);
82059
        },
82060
        enumerable: true,
82061
        configurable: true
82062
    });
82063
    Object.defineProperty(MatChip.prototype, "removable", {
82064
        get: /**
82065
         * Determines whether or not the chip displays the remove styling and emits (removed) events.
82066
         * @return {?}
82067
         */
82068
        function () { return this._removable; },
82069
        set: /**
82070
         * @param {?} value
82071
         * @return {?}
82072
         */
82073
        function (value) {
82074
            this._removable = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceBooleanProperty"])(value);
82075
        },
82076
        enumerable: true,
82077
        configurable: true
82078
    });
82079
    Object.defineProperty(MatChip.prototype, "ariaSelected", {
82080
        /** The ARIA selected applied to the chip. */
82081
        get: /**
82082
         * The ARIA selected applied to the chip.
82083
         * @return {?}
82084
         */
82085
        function () {
82086
            return this.selectable ? this.selected.toString() : null;
82087
        },
82088
        enumerable: true,
82089
        configurable: true
82090
    });
82091
    /**
82092
     * @return {?}
82093
     */
82094
    MatChip.prototype._addHostClassName = /**
82095
     * @return {?}
82096
     */
82097
    function () {
82098
        // Add class for the different chips
82099
        for (var _i = 0, CHIP_ATTRIBUTE_NAMES_1 = CHIP_ATTRIBUTE_NAMES; _i < CHIP_ATTRIBUTE_NAMES_1.length; _i++) {
82100
            var attr = CHIP_ATTRIBUTE_NAMES_1[_i];
82101
            if (this._elementRef.nativeElement.hasAttribute(attr) ||
82102
                this._elementRef.nativeElement.tagName.toLowerCase() === attr) {
82103
                (/** @type {?} */ (this._elementRef.nativeElement)).classList.add(attr);
82104
                return;
82105
            }
82106
        }
82107
        (/** @type {?} */ (this._elementRef.nativeElement)).classList.add('mat-standard-chip');
82108
    };
82109
    /**
82110
     * @return {?}
82111
     */
82112
    MatChip.prototype.ngOnDestroy = /**
82113
     * @return {?}
82114
     */
82115
    function () {
82116
        this.destroyed.emit({ chip: this });
82117
        this._chipRipple._removeTriggerEvents();
82118
    };
82119
    /** Selects the chip. */
82120
    /**
82121
     * Selects the chip.
82122
     * @return {?}
82123
     */
82124
    MatChip.prototype.select = /**
82125
     * Selects the chip.
82126
     * @return {?}
82127
     */
82128
    function () {
82129
        this._selected = true;
82130
        this.selectionChange.emit({
82131
            source: this,
82132
            isUserInput: false,
82133
            selected: true
82134
        });
82135
    };
82136
    /** Deselects the chip. */
82137
    /**
82138
     * Deselects the chip.
82139
     * @return {?}
82140
     */
82141
    MatChip.prototype.deselect = /**
82142
     * Deselects the chip.
82143
     * @return {?}
82144
     */
82145
    function () {
82146
        this._selected = false;
82147
        this.selectionChange.emit({
82148
            source: this,
82149
            isUserInput: false,
82150
            selected: false
82151
        });
82152
    };
82153
    /** Select this chip and emit selected event */
82154
    /**
82155
     * Select this chip and emit selected event
82156
     * @return {?}
82157
     */
82158
    MatChip.prototype.selectViaInteraction = /**
82159
     * Select this chip and emit selected event
82160
     * @return {?}
82161
     */
82162
    function () {
82163
        this._selected = true;
82164
        // Emit select event when selected changes.
82165
        this.selectionChange.emit({
82166
            source: this,
82167
            isUserInput: true,
82168
            selected: true
82169
        });
82170
    };
82171
    /** Toggles the current selected state of this chip. */
82172
    /**
82173
     * Toggles the current selected state of this chip.
82174
     * @param {?=} isUserInput
82175
     * @return {?}
82176
     */
82177
    MatChip.prototype.toggleSelected = /**
82178
     * Toggles the current selected state of this chip.
82179
     * @param {?=} isUserInput
82180
     * @return {?}
82181
     */
82182
    function (isUserInput) {
82183
        if (isUserInput === void 0) { isUserInput = false; }
82184
        this._selected = !this.selected;
82185
        this.selectionChange.emit({
82186
            source: this,
82187
            isUserInput: isUserInput,
82188
            selected: this._selected
82189
        });
82190
        return this.selected;
82191
    };
82192
    /** Allows for programmatic focusing of the chip. */
82193
    /**
82194
     * Allows for programmatic focusing of the chip.
82195
     * @return {?}
82196
     */
82197
    MatChip.prototype.focus = /**
82198
     * Allows for programmatic focusing of the chip.
82199
     * @return {?}
82200
     */
82201
    function () {
82202
        if (!this._hasFocus) {
82203
            this._elementRef.nativeElement.focus();
82204
            this._onFocus.next({ chip: this });
82205
        }
82206
        this._hasFocus = true;
82207
    };
82208
    /**
82209
     * Allows for programmatic removal of the chip. Called by the MatChipList when the DELETE or
82210
     * BACKSPACE keys are pressed.
82211
     *
82212
     * Informs any listeners of the removal request. Does not remove the chip from the DOM.
82213
     */
82214
    /**
82215
     * Allows for programmatic removal of the chip. Called by the MatChipList when the DELETE or
82216
     * BACKSPACE keys are pressed.
82217
     *
82218
     * Informs any listeners of the removal request. Does not remove the chip from the DOM.
82219
     * @return {?}
82220
     */
82221
    MatChip.prototype.remove = /**
82222
     * Allows for programmatic removal of the chip. Called by the MatChipList when the DELETE or
82223
     * BACKSPACE keys are pressed.
82224
     *
82225
     * Informs any listeners of the removal request. Does not remove the chip from the DOM.
82226
     * @return {?}
82227
     */
82228
    function () {
82229
        if (this.removable) {
82230
            this.removed.emit({ chip: this });
82231
        }
82232
    };
82233
    /** Ensures events fire properly upon click. */
82234
    /**
82235
     * Ensures events fire properly upon click.
82236
     * @param {?} event
82237
     * @return {?}
82238
     */
82239
    MatChip.prototype._handleClick = /**
82240
     * Ensures events fire properly upon click.
82241
     * @param {?} event
82242
     * @return {?}
82243
     */
82244
    function (event) {
82245
        // Check disabled
82246
        if (this.disabled) {
82247
            return;
82248
        }
82249
        event.preventDefault();
82250
        event.stopPropagation();
82251
    };
82252
    /** Handle custom key presses. */
82253
    /**
82254
     * Handle custom key presses.
82255
     * @param {?} event
82256
     * @return {?}
82257
     */
82258
    MatChip.prototype._handleKeydown = /**
82259
     * Handle custom key presses.
82260
     * @param {?} event
82261
     * @return {?}
82262
     */
82263
    function (event) {
82264
        if (this.disabled) {
82265
            return;
82266
        }
82267
        switch (event.keyCode) {
82268
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_2__["DELETE"]:
82269
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_2__["BACKSPACE"]:
82270
                // If we are removable, remove the focused chip
82271
                this.remove();
82272
                // Always prevent so page navigation does not occur
82273
                event.preventDefault();
82274
                break;
82275
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_2__["SPACE"]:
82276
                // If we are selectable, toggle the focused chip
82277
                if (this.selectable) {
82278
                    this.toggleSelected(true);
82279
                }
82280
                // Always prevent space from scrolling the page since the list has focus
82281
                event.preventDefault();
82282
                break;
82283
        }
82284
    };
82285
    /**
82286
     * @return {?}
82287
     */
82288
    MatChip.prototype._blur = /**
82289
     * @return {?}
82290
     */
82291
    function () {
82292
        this._hasFocus = false;
82293
        this._onBlur.next({ chip: this });
82294
    };
82295
    MatChip.decorators = [
82296
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Directive"], args: [{
82297
                    selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]",
82298
                    inputs: ['color', 'disabled', 'disableRipple'],
82299
                    exportAs: 'matChip',
82300
                    host: {
82301
                        'class': 'mat-chip',
82302
                        '[attr.tabindex]': 'disabled ? null : -1',
82303
                        'role': 'option',
82304
                        '[class.mat-chip-selected]': 'selected',
82305
                        '[class.mat-chip-with-avatar]': 'avatar',
82306
                        '[class.mat-chip-with-trailing-icon]': 'trailingIcon || removeIcon',
82307
                        '[class.mat-chip-disabled]': 'disabled',
82308
                        '[attr.disabled]': 'disabled || null',
82309
                        '[attr.aria-disabled]': 'disabled.toString()',
82310
                        '[attr.aria-selected]': 'ariaSelected',
82311
                        '(click)': '_handleClick($event)',
82312
                        '(keydown)': '_handleKeydown($event)',
82313
                        '(focus)': 'focus()',
82314
                        '(blur)': '_blur()',
82315
                    },
82316
                },] },
82317
    ];
82318
    /** @nocollapse */
82319
    MatChip.ctorParameters = function () { return [
82320
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ElementRef"], },
82321
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["NgZone"], },
82322
        { type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_3__["Platform"], },
82323
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Inject"], args: [_angular_material_core__WEBPACK_IMPORTED_MODULE_5__["MAT_RIPPLE_GLOBAL_OPTIONS"],] },] },
82324
    ]; };
82325
    MatChip.propDecorators = {
82326
        "avatar": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ContentChild"], args: [MatChipAvatar,] },],
82327
        "trailingIcon": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ContentChild"], args: [MatChipTrailingIcon,] },],
82328
        "removeIcon": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ContentChild"], args: [Object(_angular_core__WEBPACK_IMPORTED_MODULE_4__["forwardRef"])(function () { return MatChipRemove; }),] },],
82329
        "selected": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
82330
        "value": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
82331
        "selectable": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
82332
        "removable": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
82333
        "selectionChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Output"] },],
82334
        "destroyed": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Output"] },],
82335
        "removed": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Output"] },],
82336
    };
82337
    return MatChip;
82338
}(_MatChipMixinBase));
82339
/**
82340
 * Applies proper (click) support and adds styling for use with the Material Design "cancel" icon
82341
 * available at https://material.io/icons/#ic_cancel.
82342
 *
82343
 * Example:
82344
 *
82345
 *     `<mat-chip>
82346
 *       <mat-icon matChipRemove>cancel</mat-icon>
82347
 *     </mat-chip>`
82348
 *
82349
 * You *may* use a custom icon, but you may need to override the `mat-chip-remove` positioning
82350
 * styles to properly center the icon within the chip.
82351
 */
82352
var MatChipRemove = /** @class */ (function () {
82353
    function MatChipRemove(_parentChip) {
82354
        this._parentChip = _parentChip;
82355
    }
82356
    /** Calls the parent chip's public `remove()` method if applicable. */
82357
    /**
82358
     * Calls the parent chip's public `remove()` method if applicable.
82359
     * @return {?}
82360
     */
82361
    MatChipRemove.prototype._handleClick = /**
82362
     * Calls the parent chip's public `remove()` method if applicable.
82363
     * @return {?}
82364
     */
82365
    function () {
82366
        if (this._parentChip.removable) {
82367
            this._parentChip.remove();
82368
        }
82369
    };
82370
    MatChipRemove.decorators = [
82371
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Directive"], args: [{
82372
                    selector: '[matChipRemove]',
82373
                    host: {
82374
                        'class': 'mat-chip-remove mat-chip-trailing-icon',
82375
                        '(click)': '_handleClick()',
82376
                    }
82377
                },] },
82378
    ];
82379
    /** @nocollapse */
82380
    MatChipRemove.ctorParameters = function () { return [
82381
        { type: MatChip, },
82382
    ]; };
82383
    return MatChipRemove;
82384
}());
82385
 
82386
/**
82387
 * @fileoverview added by tsickle
82388
 * @suppress {checkTypes} checked by tsc
82389
 */
82390
/**
82391
 * Injection token to be used to override the default options for the chips module.
82392
 */
82393
var /** @type {?} */ MAT_CHIPS_DEFAULT_OPTIONS = new _angular_core__WEBPACK_IMPORTED_MODULE_4__["InjectionToken"]('mat-chips-default-options');
82394
 
82395
/**
82396
 * @fileoverview added by tsickle
82397
 * @suppress {checkTypes} checked by tsc
82398
 */
82399
/**
82400
 * \@docs-private
82401
 */
82402
var  /**
82403
 * \@docs-private
82404
 */
82405
MatChipListBase = /** @class */ (function () {
82406
    function MatChipListBase(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, ngControl) {
82407
        this._defaultErrorStateMatcher = _defaultErrorStateMatcher;
82408
        this._parentForm = _parentForm;
82409
        this._parentFormGroup = _parentFormGroup;
82410
        this.ngControl = ngControl;
82411
    }
82412
    return MatChipListBase;
82413
}());
82414
var /** @type {?} */ _MatChipListMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_5__["mixinErrorState"])(MatChipListBase);
82415
// Increasing integer for generating unique ids for chip-list components.
82416
var /** @type {?} */ nextUniqueId = 0;
82417
/**
82418
 * Change event object that is emitted when the chip list value has changed.
82419
 */
82420
var  /**
82421
 * Change event object that is emitted when the chip list value has changed.
82422
 */
82423
MatChipListChange = /** @class */ (function () {
82424
    function MatChipListChange(source, value) {
82425
        this.source = source;
82426
        this.value = value;
82427
    }
82428
    return MatChipListChange;
82429
}());
82430
/**
82431
 * A material design chips component (named ChipList for it's similarity to the List component).
82432
 */
82433
var MatChipList = /** @class */ (function (_super) {
82434
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatChipList, _super);
82435
    function MatChipList(_elementRef, _changeDetectorRef, _dir, _parentForm, _parentFormGroup, _defaultErrorStateMatcher, /** @docs-private */
82436
    ngControl) {
82437
        var _this = _super.call(this, _defaultErrorStateMatcher, _parentForm, _parentFormGroup, ngControl) || this;
82438
        _this._elementRef = _elementRef;
82439
        _this._changeDetectorRef = _changeDetectorRef;
82440
        _this._dir = _dir;
82441
        _this.ngControl = ngControl;
82442
        /**
82443
         * Implemented as part of MatFormFieldControl.
82444
         * \@docs-private
82445
         */
82446
        _this.controlType = 'mat-chip-list';
82447
        /**
82448
         * When a chip is destroyed, we track the index so we can focus the appropriate next chip.
82449
         */
82450
        _this._lastDestroyedIndex = null;
82451
        /**
82452
         * Track which chips we're listening to for focus/destruction.
82453
         */
82454
        _this._chipSet = new WeakMap();
82455
        /**
82456
         * Subscription to tabbing out from the chip list.
82457
         */
82458
        _this._tabOutSubscription = rxjs__WEBPACK_IMPORTED_MODULE_6__["Subscription"].EMPTY;
82459
        /**
82460
         * Uid of the chip list
82461
         */
82462
        _this._uid = "mat-chip-list-" + nextUniqueId++;
82463
        /**
82464
         * Tab index for the chip list.
82465
         */
82466
        _this._tabIndex = 0;
82467
        /**
82468
         * User defined tab index.
82469
         * When it is not null, use user defined tab index. Otherwise use _tabIndex
82470
         */
82471
        _this._userTabIndex = null;
82472
        /**
82473
         * Function when touched
82474
         */
82475
        _this._onTouched = function () { };
82476
        /**
82477
         * Function when changed
82478
         */
82479
        _this._onChange = function () { };
82480
        _this._multiple = false;
82481
        _this._compareWith = function (o1, o2) { return o1 === o2; };
82482
        _this._required = false;
82483
        _this._disabled = false;
82484
        /**
82485
         * Orientation of the chip list.
82486
         */
82487
        _this.ariaOrientation = 'horizontal';
82488
        _this._selectable = true;
82489
        /**
82490
         * Event emitted when the selected chip list value has been changed by the user.
82491
         */
82492
        _this.change = new _angular_core__WEBPACK_IMPORTED_MODULE_4__["EventEmitter"]();
82493
        /**
82494
         * Event that emits whenever the raw value of the chip-list changes. This is here primarily
82495
         * to facilitate the two-way binding for the `value` input.
82496
         * \@docs-private
82497
         */
82498
        _this.valueChange = new _angular_core__WEBPACK_IMPORTED_MODULE_4__["EventEmitter"]();
82499
        if (_this.ngControl) {
82500
            _this.ngControl.valueAccessor = _this;
82501
        }
82502
        return _this;
82503
    }
82504
    Object.defineProperty(MatChipList.prototype, "selected", {
82505
        /** The array of selected chips inside chip list. */
82506
        get: /**
82507
         * The array of selected chips inside chip list.
82508
         * @return {?}
82509
         */
82510
        function () {
82511
            return this.multiple ? this._selectionModel.selected : this._selectionModel.selected[0];
82512
        },
82513
        enumerable: true,
82514
        configurable: true
82515
    });
82516
    Object.defineProperty(MatChipList.prototype, "role", {
82517
        /** The ARIA role applied to the chip list. */
82518
        get: /**
82519
         * The ARIA role applied to the chip list.
82520
         * @return {?}
82521
         */
82522
        function () { return this.empty ? null : 'listbox'; },
82523
        enumerable: true,
82524
        configurable: true
82525
    });
82526
    Object.defineProperty(MatChipList.prototype, "multiple", {
82527
        get: /**
82528
         * Whether the user should be allowed to select multiple chips.
82529
         * @return {?}
82530
         */
82531
        function () { return this._multiple; },
82532
        set: /**
82533
         * @param {?} value
82534
         * @return {?}
82535
         */
82536
        function (value) {
82537
            this._multiple = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceBooleanProperty"])(value);
82538
        },
82539
        enumerable: true,
82540
        configurable: true
82541
    });
82542
    Object.defineProperty(MatChipList.prototype, "compareWith", {
82543
        get: /**
82544
         * A function to compare the option values with the selected values. The first argument
82545
         * is a value from an option. The second is a value from the selection. A boolean
82546
         * should be returned.
82547
         * @return {?}
82548
         */
82549
        function () { return this._compareWith; },
82550
        set: /**
82551
         * @param {?} fn
82552
         * @return {?}
82553
         */
82554
        function (fn) {
82555
            this._compareWith = fn;
82556
            if (this._selectionModel) {
82557
                // A different comparator means the selection could change.
82558
                this._initializeSelection();
82559
            }
82560
        },
82561
        enumerable: true,
82562
        configurable: true
82563
    });
82564
    Object.defineProperty(MatChipList.prototype, "value", {
82565
        get: /**
82566
         * Implemented as part of MatFormFieldControl.
82567
         * \@docs-private
82568
         * @return {?}
82569
         */
82570
        function () { return this._value; },
82571
        set: /**
82572
         * @param {?} value
82573
         * @return {?}
82574
         */
82575
        function (value) {
82576
            this.writeValue(value);
82577
            this._value = value;
82578
        },
82579
        enumerable: true,
82580
        configurable: true
82581
    });
82582
    Object.defineProperty(MatChipList.prototype, "id", {
82583
        /**
82584
         * Implemented as part of MatFormFieldControl.
82585
         * @docs-private
82586
         */
82587
        get: /**
82588
         * Implemented as part of MatFormFieldControl.
82589
         * \@docs-private
82590
         * @return {?}
82591
         */
82592
        function () {
82593
            return this._chipInput ? this._chipInput.id : this._uid;
82594
        },
82595
        enumerable: true,
82596
        configurable: true
82597
    });
82598
    Object.defineProperty(MatChipList.prototype, "required", {
82599
        get: /**
82600
         * Implemented as part of MatFormFieldControl.
82601
         * \@docs-private
82602
         * @return {?}
82603
         */
82604
        function () { return this._required; },
82605
        set: /**
82606
         * @param {?} value
82607
         * @return {?}
82608
         */
82609
        function (value) {
82610
            this._required = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceBooleanProperty"])(value);
82611
            this.stateChanges.next();
82612
        },
82613
        enumerable: true,
82614
        configurable: true
82615
    });
82616
    Object.defineProperty(MatChipList.prototype, "placeholder", {
82617
        get: /**
82618
         * Implemented as part of MatFormFieldControl.
82619
         * \@docs-private
82620
         * @return {?}
82621
         */
82622
        function () {
82623
            return this._chipInput ? this._chipInput.placeholder : this._placeholder;
82624
        },
82625
        set: /**
82626
         * @param {?} value
82627
         * @return {?}
82628
         */
82629
        function (value) {
82630
            this._placeholder = value;
82631
            this.stateChanges.next();
82632
        },
82633
        enumerable: true,
82634
        configurable: true
82635
    });
82636
    Object.defineProperty(MatChipList.prototype, "focused", {
82637
        /** Whether any chips or the matChipInput inside of this chip-list has focus. */
82638
        get: /**
82639
         * Whether any chips or the matChipInput inside of this chip-list has focus.
82640
         * @return {?}
82641
         */
82642
        function () {
82643
            return (this._chipInput && this._chipInput.focused) || this.chips.some(function (chip) { return chip._hasFocus; });
82644
        },
82645
        enumerable: true,
82646
        configurable: true
82647
    });
82648
    Object.defineProperty(MatChipList.prototype, "empty", {
82649
        /**
82650
         * Implemented as part of MatFormFieldControl.
82651
         * @docs-private
82652
         */
82653
        get: /**
82654
         * Implemented as part of MatFormFieldControl.
82655
         * \@docs-private
82656
         * @return {?}
82657
         */
82658
        function () {
82659
            return (!this._chipInput || this._chipInput.empty) && this.chips.length === 0;
82660
        },
82661
        enumerable: true,
82662
        configurable: true
82663
    });
82664
    Object.defineProperty(MatChipList.prototype, "shouldLabelFloat", {
82665
        /**
82666
         * Implemented as part of MatFormFieldControl.
82667
         * @docs-private
82668
         */
82669
        get: /**
82670
         * Implemented as part of MatFormFieldControl.
82671
         * \@docs-private
82672
         * @return {?}
82673
         */
82674
        function () { return !this.empty || this.focused; },
82675
        enumerable: true,
82676
        configurable: true
82677
    });
82678
    Object.defineProperty(MatChipList.prototype, "disabled", {
82679
        get: /**
82680
         * Implemented as part of MatFormFieldControl.
82681
         * \@docs-private
82682
         * @return {?}
82683
         */
82684
        function () { return this.ngControl ? !!this.ngControl.disabled : this._disabled; },
82685
        set: /**
82686
         * @param {?} value
82687
         * @return {?}
82688
         */
82689
        function (value) { this._disabled = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceBooleanProperty"])(value); },
82690
        enumerable: true,
82691
        configurable: true
82692
    });
82693
    Object.defineProperty(MatChipList.prototype, "selectable", {
82694
        get: /**
82695
         * Whether or not this chip list is selectable. When a chip list is not selectable,
82696
         * the selected states for all the chips inside the chip list are always ignored.
82697
         * @return {?}
82698
         */
82699
        function () { return this._selectable; },
82700
        set: /**
82701
         * @param {?} value
82702
         * @return {?}
82703
         */
82704
        function (value) {
82705
            var _this = this;
82706
            this._selectable = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceBooleanProperty"])(value);
82707
            if (this.chips) {
82708
                this.chips.forEach(function (chip) { return chip.chipListSelectable = _this._selectable; });
82709
            }
82710
        },
82711
        enumerable: true,
82712
        configurable: true
82713
    });
82714
    Object.defineProperty(MatChipList.prototype, "tabIndex", {
82715
        set: /**
82716
         * @param {?} value
82717
         * @return {?}
82718
         */
82719
        function (value) {
82720
            this._userTabIndex = value;
82721
            this._tabIndex = value;
82722
        },
82723
        enumerable: true,
82724
        configurable: true
82725
    });
82726
    Object.defineProperty(MatChipList.prototype, "chipSelectionChanges", {
82727
        /** Combined stream of all of the child chips' selection change events. */
82728
        get: /**
82729
         * Combined stream of all of the child chips' selection change events.
82730
         * @return {?}
82731
         */
82732
        function () {
82733
            return rxjs__WEBPACK_IMPORTED_MODULE_6__["merge"].apply(void 0, this.chips.map(function (chip) { return chip.selectionChange; }));
82734
        },
82735
        enumerable: true,
82736
        configurable: true
82737
    });
82738
    Object.defineProperty(MatChipList.prototype, "chipFocusChanges", {
82739
        /** Combined stream of all of the child chips' focus change events. */
82740
        get: /**
82741
         * Combined stream of all of the child chips' focus change events.
82742
         * @return {?}
82743
         */
82744
        function () {
82745
            return rxjs__WEBPACK_IMPORTED_MODULE_6__["merge"].apply(void 0, this.chips.map(function (chip) { return chip._onFocus; }));
82746
        },
82747
        enumerable: true,
82748
        configurable: true
82749
    });
82750
    Object.defineProperty(MatChipList.prototype, "chipBlurChanges", {
82751
        /** Combined stream of all of the child chips' blur change events. */
82752
        get: /**
82753
         * Combined stream of all of the child chips' blur change events.
82754
         * @return {?}
82755
         */
82756
        function () {
82757
            return rxjs__WEBPACK_IMPORTED_MODULE_6__["merge"].apply(void 0, this.chips.map(function (chip) { return chip._onBlur; }));
82758
        },
82759
        enumerable: true,
82760
        configurable: true
82761
    });
82762
    Object.defineProperty(MatChipList.prototype, "chipRemoveChanges", {
82763
        /** Combined stream of all of the child chips' remove change events. */
82764
        get: /**
82765
         * Combined stream of all of the child chips' remove change events.
82766
         * @return {?}
82767
         */
82768
        function () {
82769
            return rxjs__WEBPACK_IMPORTED_MODULE_6__["merge"].apply(void 0, this.chips.map(function (chip) { return chip.destroyed; }));
82770
        },
82771
        enumerable: true,
82772
        configurable: true
82773
    });
82774
    /**
82775
     * @return {?}
82776
     */
82777
    MatChipList.prototype.ngAfterContentInit = /**
82778
     * @return {?}
82779
     */
82780
    function () {
82781
        var _this = this;
82782
        this._keyManager = new _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_7__["FocusKeyManager"](this.chips)
82783
            .withWrap()
82784
            .withVerticalOrientation()
82785
            .withHorizontalOrientation(this._dir ? this._dir.value : 'ltr');
82786
        // Prevents the chip list from capturing focus and redirecting
82787
        // it back to the first chip when the user tabs out.
82788
        this._tabOutSubscription = this._keyManager.tabOut.subscribe(function () {
82789
            _this._tabIndex = -1;
82790
            setTimeout(function () { return _this._tabIndex = _this._userTabIndex || 0; });
82791
        });
82792
        // When the list changes, re-subscribe
82793
        this._changeSubscription = this.chips.changes.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_12__["startWith"])(null)).subscribe(function () {
82794
            _this._resetChips();
82795
            // Reset chips selected/deselected status
82796
            // Reset chips selected/deselected status
82797
            _this._initializeSelection();
82798
            // Check to see if we need to update our tab index
82799
            // Check to see if we need to update our tab index
82800
            _this._updateTabIndex();
82801
            // Check to see if we have a destroyed chip and need to refocus
82802
            // Check to see if we have a destroyed chip and need to refocus
82803
            _this._updateFocusForDestroyedChips();
82804
            _this.stateChanges.next();
82805
        });
82806
    };
82807
    /**
82808
     * @return {?}
82809
     */
82810
    MatChipList.prototype.ngOnInit = /**
82811
     * @return {?}
82812
     */
82813
    function () {
82814
        this._selectionModel = new _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_9__["SelectionModel"](this.multiple, undefined, false);
82815
        this.stateChanges.next();
82816
    };
82817
    /**
82818
     * @return {?}
82819
     */
82820
    MatChipList.prototype.ngDoCheck = /**
82821
     * @return {?}
82822
     */
82823
    function () {
82824
        if (this.ngControl) {
82825
            // We need to re-evaluate this on every change detection cycle, because there are some
82826
            // error triggers that we can't subscribe to (e.g. parent form submissions). This means
82827
            // that whatever logic is in here has to be super lean or we risk destroying the performance.
82828
            this.updateErrorState();
82829
        }
82830
    };
82831
    /**
82832
     * @return {?}
82833
     */
82834
    MatChipList.prototype.ngOnDestroy = /**
82835
     * @return {?}
82836
     */
82837
    function () {
82838
        this._tabOutSubscription.unsubscribe();
82839
        if (this._changeSubscription) {
82840
            this._changeSubscription.unsubscribe();
82841
        }
82842
        if (this._chipRemoveSubscription) {
82843
            this._chipRemoveSubscription.unsubscribe();
82844
        }
82845
        this._dropSubscriptions();
82846
        this.stateChanges.complete();
82847
    };
82848
    /** Associates an HTML input element with this chip list. */
82849
    /**
82850
     * Associates an HTML input element with this chip list.
82851
     * @param {?} inputElement
82852
     * @return {?}
82853
     */
82854
    MatChipList.prototype.registerInput = /**
82855
     * Associates an HTML input element with this chip list.
82856
     * @param {?} inputElement
82857
     * @return {?}
82858
     */
82859
    function (inputElement) {
82860
        this._chipInput = inputElement;
82861
    };
82862
    /**
82863
     * Implemented as part of MatFormFieldControl.
82864
     * @docs-private
82865
     */
82866
    /**
82867
     * Implemented as part of MatFormFieldControl.
82868
     * \@docs-private
82869
     * @param {?} ids
82870
     * @return {?}
82871
     */
82872
    MatChipList.prototype.setDescribedByIds = /**
82873
     * Implemented as part of MatFormFieldControl.
82874
     * \@docs-private
82875
     * @param {?} ids
82876
     * @return {?}
82877
     */
82878
    function (ids) { this._ariaDescribedby = ids.join(' '); };
82879
    // Implemented as part of ControlValueAccessor.
82880
    /**
82881
     * @param {?} value
82882
     * @return {?}
82883
     */
82884
    MatChipList.prototype.writeValue = /**
82885
     * @param {?} value
82886
     * @return {?}
82887
     */
82888
    function (value) {
82889
        if (this.chips) {
82890
            this._setSelectionByValue(value, false);
82891
        }
82892
    };
82893
    // Implemented as part of ControlValueAccessor.
82894
    /**
82895
     * @param {?} fn
82896
     * @return {?}
82897
     */
82898
    MatChipList.prototype.registerOnChange = /**
82899
     * @param {?} fn
82900
     * @return {?}
82901
     */
82902
    function (fn) {
82903
        this._onChange = fn;
82904
    };
82905
    // Implemented as part of ControlValueAccessor.
82906
    /**
82907
     * @param {?} fn
82908
     * @return {?}
82909
     */
82910
    MatChipList.prototype.registerOnTouched = /**
82911
     * @param {?} fn
82912
     * @return {?}
82913
     */
82914
    function (fn) {
82915
        this._onTouched = fn;
82916
    };
82917
    // Implemented as part of ControlValueAccessor.
82918
    /**
82919
     * @param {?} isDisabled
82920
     * @return {?}
82921
     */
82922
    MatChipList.prototype.setDisabledState = /**
82923
     * @param {?} isDisabled
82924
     * @return {?}
82925
     */
82926
    function (isDisabled) {
82927
        this.disabled = isDisabled;
82928
        this._elementRef.nativeElement.disabled = isDisabled;
82929
        this.stateChanges.next();
82930
    };
82931
    /**
82932
     * Implemented as part of MatFormFieldControl.
82933
     * @docs-private
82934
     */
82935
    /**
82936
     * Implemented as part of MatFormFieldControl.
82937
     * \@docs-private
82938
     * @return {?}
82939
     */
82940
    MatChipList.prototype.onContainerClick = /**
82941
     * Implemented as part of MatFormFieldControl.
82942
     * \@docs-private
82943
     * @return {?}
82944
     */
82945
    function () { this.focus(); };
82946
    /**
82947
     * Focuses the the first non-disabled chip in this chip list, or the associated input when there
82948
     * are no eligible chips.
82949
     */
82950
    /**
82951
     * Focuses the the first non-disabled chip in this chip list, or the associated input when there
82952
     * are no eligible chips.
82953
     * @return {?}
82954
     */
82955
    MatChipList.prototype.focus = /**
82956
     * Focuses the the first non-disabled chip in this chip list, or the associated input when there
82957
     * are no eligible chips.
82958
     * @return {?}
82959
     */
82960
    function () {
82961
        // TODO: ARIA says this should focus the first `selected` chip if any are selected.
82962
        // Focus on first element if there's no chipInput inside chip-list
82963
        if (this._chipInput && this._chipInput.focused) {
82964
            // do nothing
82965
        }
82966
        else if (this.chips.length > 0) {
82967
            this._keyManager.setFirstItemActive();
82968
            this.stateChanges.next();
82969
        }
82970
        else {
82971
            this._focusInput();
82972
            this.stateChanges.next();
82973
        }
82974
    };
82975
    /** Attempt to focus an input if we have one. */
82976
    /**
82977
     * Attempt to focus an input if we have one.
82978
     * @return {?}
82979
     */
82980
    MatChipList.prototype._focusInput = /**
82981
     * Attempt to focus an input if we have one.
82982
     * @return {?}
82983
     */
82984
    function () {
82985
        if (this._chipInput) {
82986
            this._chipInput.focus();
82987
        }
82988
    };
82989
    /**
82990
     * Pass events to the keyboard manager. Available here for tests.
82991
     */
82992
    /**
82993
     * Pass events to the keyboard manager. Available here for tests.
82994
     * @param {?} event
82995
     * @return {?}
82996
     */
82997
    MatChipList.prototype._keydown = /**
82998
     * Pass events to the keyboard manager. Available here for tests.
82999
     * @param {?} event
83000
     * @return {?}
83001
     */
83002
    function (event) {
83003
        var /** @type {?} */ target = /** @type {?} */ (event.target);
83004
        // If they are on an empty input and hit backspace, focus the last chip
83005
        if (event.keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_2__["BACKSPACE"] && this._isInputEmpty(target)) {
83006
            this._keyManager.setLastItemActive();
83007
            event.preventDefault();
83008
        }
83009
        else if (target && target.classList.contains('mat-chip')) {
83010
            this._keyManager.onKeydown(event);
83011
            this.stateChanges.next();
83012
        }
83013
    };
83014
    /**
83015
     * Check the tab index as you should not be allowed to focus an empty list.
83016
     */
83017
    /**
83018
     * Check the tab index as you should not be allowed to focus an empty list.
83019
     * @return {?}
83020
     */
83021
    MatChipList.prototype._updateTabIndex = /**
83022
     * Check the tab index as you should not be allowed to focus an empty list.
83023
     * @return {?}
83024
     */
83025
    function () {
83026
        // If we have 0 chips, we should not allow keyboard focus
83027
        this._tabIndex = this._userTabIndex || (this.chips.length === 0 ? -1 : 0);
83028
    };
83029
    /**
83030
     * Update key manager's active item when chip is deleted.
83031
     * If the deleted chip is the last chip in chip list, focus the new last chip.
83032
     * Otherwise focus the next chip in the list.
83033
     * Save `_lastDestroyedIndex` so we can set the correct focus.
83034
     */
83035
    /**
83036
     * Update key manager's active item when chip is deleted.
83037
     * If the deleted chip is the last chip in chip list, focus the new last chip.
83038
     * Otherwise focus the next chip in the list.
83039
     * Save `_lastDestroyedIndex` so we can set the correct focus.
83040
     * @param {?} chip
83041
     * @return {?}
83042
     */
83043
    MatChipList.prototype._updateKeyManager = /**
83044
     * Update key manager's active item when chip is deleted.
83045
     * If the deleted chip is the last chip in chip list, focus the new last chip.
83046
     * Otherwise focus the next chip in the list.
83047
     * Save `_lastDestroyedIndex` so we can set the correct focus.
83048
     * @param {?} chip
83049
     * @return {?}
83050
     */
83051
    function (chip) {
83052
        var /** @type {?} */ chipIndex = this.chips.toArray().indexOf(chip);
83053
        if (this._isValidIndex(chipIndex)) {
83054
            if (chip._hasFocus) {
83055
                // Check whether the chip is not the last item
83056
                if (chipIndex < this.chips.length - 1) {
83057
                    this._keyManager.setActiveItem(chipIndex);
83058
                }
83059
                else if (chipIndex - 1 >= 0) {
83060
                    this._keyManager.setActiveItem(chipIndex - 1);
83061
                }
83062
            }
83063
            if (this._keyManager.activeItemIndex === chipIndex) {
83064
                this._lastDestroyedIndex = chipIndex;
83065
            }
83066
        }
83067
    };
83068
    /**
83069
     * Checks to see if a focus chip was recently destroyed so that we can refocus the next closest
83070
     * one.
83071
     */
83072
    /**
83073
     * Checks to see if a focus chip was recently destroyed so that we can refocus the next closest
83074
     * one.
83075
     * @return {?}
83076
     */
83077
    MatChipList.prototype._updateFocusForDestroyedChips = /**
83078
     * Checks to see if a focus chip was recently destroyed so that we can refocus the next closest
83079
     * one.
83080
     * @return {?}
83081
     */
83082
    function () {
83083
        var /** @type {?} */ chipsArray = this.chips.toArray();
83084
        if (this._lastDestroyedIndex != null && chipsArray.length > 0 && (this.focused ||
83085
            (this._keyManager.activeItem && chipsArray.indexOf(this._keyManager.activeItem) === -1))) {
83086
            // Check whether the destroyed chip was the last item
83087
            var /** @type {?} */ newFocusIndex = Math.min(this._lastDestroyedIndex, chipsArray.length - 1);
83088
            this._keyManager.setActiveItem(newFocusIndex);
83089
            var /** @type {?} */ focusChip = this._keyManager.activeItem;
83090
            // Focus the chip
83091
            if (focusChip) {
83092
                focusChip.focus();
83093
            }
83094
        }
83095
        // Reset our destroyed index
83096
        this._lastDestroyedIndex = null;
83097
    };
83098
    /**
83099
     * Utility to ensure all indexes are valid.
83100
     *
83101
     * @param {?} index The index to be checked.
83102
     * @return {?} True if the index is valid for our list of chips.
83103
     */
83104
    MatChipList.prototype._isValidIndex = /**
83105
     * Utility to ensure all indexes are valid.
83106
     *
83107
     * @param {?} index The index to be checked.
83108
     * @return {?} True if the index is valid for our list of chips.
83109
     */
83110
    function (index) {
83111
        return index >= 0 && index < this.chips.length;
83112
    };
83113
    /**
83114
     * @param {?} element
83115
     * @return {?}
83116
     */
83117
    MatChipList.prototype._isInputEmpty = /**
83118
     * @param {?} element
83119
     * @return {?}
83120
     */
83121
    function (element) {
83122
        if (element && element.nodeName.toLowerCase() === 'input') {
83123
            var /** @type {?} */ input = /** @type {?} */ (element);
83124
            return !input.value;
83125
        }
83126
        return false;
83127
    };
83128
    /**
83129
     * @param {?} value
83130
     * @param {?=} isUserInput
83131
     * @return {?}
83132
     */
83133
    MatChipList.prototype._setSelectionByValue = /**
83134
     * @param {?} value
83135
     * @param {?=} isUserInput
83136
     * @return {?}
83137
     */
83138
    function (value, isUserInput) {
83139
        var _this = this;
83140
        if (isUserInput === void 0) { isUserInput = true; }
83141
        this._clearSelection();
83142
        this.chips.forEach(function (chip) { return chip.deselect(); });
83143
        if (Array.isArray(value)) {
83144
            value.forEach(function (currentValue) { return _this._selectValue(currentValue, isUserInput); });
83145
            this._sortValues();
83146
        }
83147
        else {
83148
            var /** @type {?} */ correspondingChip = this._selectValue(value, isUserInput);
83149
            // Shift focus to the active item. Note that we shouldn't do this in multiple
83150
            // mode, because we don't know what chip the user interacted with last.
83151
            if (correspondingChip) {
83152
                if (isUserInput) {
83153
                    this._keyManager.setActiveItem(correspondingChip);
83154
                }
83155
            }
83156
        }
83157
    };
83158
    /**
83159
     * Finds and selects the chip based on its value.
83160
     * @param {?} value
83161
     * @param {?=} isUserInput
83162
     * @return {?} Chip that has the corresponding value.
83163
     */
83164
    MatChipList.prototype._selectValue = /**
83165
     * Finds and selects the chip based on its value.
83166
     * @param {?} value
83167
     * @param {?=} isUserInput
83168
     * @return {?} Chip that has the corresponding value.
83169
     */
83170
    function (value, isUserInput) {
83171
        var _this = this;
83172
        if (isUserInput === void 0) { isUserInput = true; }
83173
        var /** @type {?} */ correspondingChip = this.chips.find(function (chip) {
83174
            return chip.value != null && _this._compareWith(chip.value, value);
83175
        });
83176
        if (correspondingChip) {
83177
            isUserInput ? correspondingChip.selectViaInteraction() : correspondingChip.select();
83178
            this._selectionModel.select(correspondingChip);
83179
        }
83180
        return correspondingChip;
83181
    };
83182
    /**
83183
     * @return {?}
83184
     */
83185
    MatChipList.prototype._initializeSelection = /**
83186
     * @return {?}
83187
     */
83188
    function () {
83189
        var _this = this;
83190
        // Defer setting the value in order to avoid the "Expression
83191
        // has changed after it was checked" errors from Angular.
83192
        Promise.resolve().then(function () {
83193
            if (_this.ngControl || _this._value) {
83194
                _this._setSelectionByValue(_this.ngControl ? _this.ngControl.value : _this._value, false);
83195
                _this.stateChanges.next();
83196
            }
83197
        });
83198
    };
83199
    /**
83200
     * Deselects every chip in the list.
83201
     * @param {?=} skip Chip that should not be deselected.
83202
     * @return {?}
83203
     */
83204
    MatChipList.prototype._clearSelection = /**
83205
     * Deselects every chip in the list.
83206
     * @param {?=} skip Chip that should not be deselected.
83207
     * @return {?}
83208
     */
83209
    function (skip) {
83210
        this._selectionModel.clear();
83211
        this.chips.forEach(function (chip) {
83212
            if (chip !== skip) {
83213
                chip.deselect();
83214
            }
83215
        });
83216
        this.stateChanges.next();
83217
    };
83218
    /**
83219
     * Sorts the model values, ensuring that they keep the same
83220
     * order that they have in the panel.
83221
     * @return {?}
83222
     */
83223
    MatChipList.prototype._sortValues = /**
83224
     * Sorts the model values, ensuring that they keep the same
83225
     * order that they have in the panel.
83226
     * @return {?}
83227
     */
83228
    function () {
83229
        var _this = this;
83230
        if (this._multiple) {
83231
            this._selectionModel.clear();
83232
            this.chips.forEach(function (chip) {
83233
                if (chip.selected) {
83234
                    _this._selectionModel.select(chip);
83235
                }
83236
            });
83237
            this.stateChanges.next();
83238
        }
83239
    };
83240
    /**
83241
     * Emits change event to set the model value.
83242
     * @param {?=} fallbackValue
83243
     * @return {?}
83244
     */
83245
    MatChipList.prototype._propagateChanges = /**
83246
     * Emits change event to set the model value.
83247
     * @param {?=} fallbackValue
83248
     * @return {?}
83249
     */
83250
    function (fallbackValue) {
83251
        var /** @type {?} */ valueToEmit = null;
83252
        if (Array.isArray(this.selected)) {
83253
            valueToEmit = this.selected.map(function (chip) { return chip.value; });
83254
        }
83255
        else {
83256
            valueToEmit = this.selected ? this.selected.value : fallbackValue;
83257
        }
83258
        this._value = valueToEmit;
83259
        this.change.emit(new MatChipListChange(this, valueToEmit));
83260
        this.valueChange.emit(valueToEmit);
83261
        this._onChange(valueToEmit);
83262
        this._changeDetectorRef.markForCheck();
83263
    };
83264
    /** When blurred, mark the field as touched when focus moved outside the chip list. */
83265
    /**
83266
     * When blurred, mark the field as touched when focus moved outside the chip list.
83267
     * @return {?}
83268
     */
83269
    MatChipList.prototype._blur = /**
83270
     * When blurred, mark the field as touched when focus moved outside the chip list.
83271
     * @return {?}
83272
     */
83273
    function () {
83274
        var _this = this;
83275
        this._keyManager.setActiveItem(-1);
83276
        if (!this.disabled) {
83277
            if (this._chipInput) {
83278
                // If there's a chip input, we should check whether the focus moved to chip input.
83279
                // If the focus is not moved to chip input, mark the field as touched. If the focus moved
83280
                // to chip input, do nothing.
83281
                // Timeout is needed to wait for the focus() event trigger on chip input.
83282
                setTimeout(function () {
83283
                    if (!_this.focused) {
83284
                        _this._markAsTouched();
83285
                    }
83286
                });
83287
            }
83288
            else {
83289
                // If there's no chip input, then mark the field as touched.
83290
                this._markAsTouched();
83291
            }
83292
        }
83293
    };
83294
    /** Mark the field as touched */
83295
    /**
83296
     * Mark the field as touched
83297
     * @return {?}
83298
     */
83299
    MatChipList.prototype._markAsTouched = /**
83300
     * Mark the field as touched
83301
     * @return {?}
83302
     */
83303
    function () {
83304
        this._onTouched();
83305
        this._changeDetectorRef.markForCheck();
83306
        this.stateChanges.next();
83307
    };
83308
    /**
83309
     * @return {?}
83310
     */
83311
    MatChipList.prototype._resetChips = /**
83312
     * @return {?}
83313
     */
83314
    function () {
83315
        this._dropSubscriptions();
83316
        this._listenToChipsFocus();
83317
        this._listenToChipsSelection();
83318
        this._listenToChipsRemoved();
83319
    };
83320
    /**
83321
     * @return {?}
83322
     */
83323
    MatChipList.prototype._dropSubscriptions = /**
83324
     * @return {?}
83325
     */
83326
    function () {
83327
        if (this._chipFocusSubscription) {
83328
            this._chipFocusSubscription.unsubscribe();
83329
            this._chipFocusSubscription = null;
83330
        }
83331
        if (this._chipBlurSubscription) {
83332
            this._chipBlurSubscription.unsubscribe();
83333
            this._chipBlurSubscription = null;
83334
        }
83335
        if (this._chipSelectionSubscription) {
83336
            this._chipSelectionSubscription.unsubscribe();
83337
            this._chipSelectionSubscription = null;
83338
        }
83339
    };
83340
    /**
83341
     * Listens to user-generated selection events on each chip.
83342
     * @return {?}
83343
     */
83344
    MatChipList.prototype._listenToChipsSelection = /**
83345
     * Listens to user-generated selection events on each chip.
83346
     * @return {?}
83347
     */
83348
    function () {
83349
        var _this = this;
83350
        this._chipSelectionSubscription = this.chipSelectionChanges.subscribe(function (event) {
83351
            event.source.selected
83352
                ? _this._selectionModel.select(event.source)
83353
                : _this._selectionModel.deselect(event.source);
83354
            // For single selection chip list, make sure the deselected value is unselected.
83355
            if (!_this.multiple) {
83356
                _this.chips.forEach(function (chip) {
83357
                    if (!_this._selectionModel.isSelected(chip) && chip.selected) {
83358
                        chip.deselect();
83359
                    }
83360
                });
83361
            }
83362
            if (event.isUserInput) {
83363
                _this._propagateChanges();
83364
            }
83365
        });
83366
    };
83367
    /**
83368
     * Listens to user-generated selection events on each chip.
83369
     * @return {?}
83370
     */
83371
    MatChipList.prototype._listenToChipsFocus = /**
83372
     * Listens to user-generated selection events on each chip.
83373
     * @return {?}
83374
     */
83375
    function () {
83376
        var _this = this;
83377
        this._chipFocusSubscription = this.chipFocusChanges.subscribe(function (event) {
83378
            var /** @type {?} */ chipIndex = _this.chips.toArray().indexOf(event.chip);
83379
            if (_this._isValidIndex(chipIndex)) {
83380
                _this._keyManager.updateActiveItemIndex(chipIndex);
83381
            }
83382
            _this.stateChanges.next();
83383
        });
83384
        this._chipBlurSubscription = this.chipBlurChanges.subscribe(function () {
83385
            _this._blur();
83386
            _this.stateChanges.next();
83387
        });
83388
    };
83389
    /**
83390
     * @return {?}
83391
     */
83392
    MatChipList.prototype._listenToChipsRemoved = /**
83393
     * @return {?}
83394
     */
83395
    function () {
83396
        var _this = this;
83397
        this._chipRemoveSubscription = this.chipRemoveChanges.subscribe(function (event) {
83398
            _this._updateKeyManager(event.chip);
83399
        });
83400
    };
83401
    MatChipList.decorators = [
83402
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"], args: [{selector: 'mat-chip-list',
83403
                    template: "<div class=\"mat-chip-list-wrapper\"><ng-content></ng-content></div>",
83404
                    exportAs: 'matChipList',
83405
                    host: {
83406
                        '[attr.tabindex]': '_tabIndex',
83407
                        '[attr.aria-describedby]': '_ariaDescribedby || null',
83408
                        '[attr.aria-required]': 'required.toString()',
83409
                        '[attr.aria-disabled]': 'disabled.toString()',
83410
                        '[attr.aria-invalid]': 'errorState',
83411
                        '[attr.aria-multiselectable]': 'multiple',
83412
                        '[attr.role]': 'role',
83413
                        '[class.mat-chip-list-disabled]': 'disabled',
83414
                        '[class.mat-chip-list-invalid]': 'errorState',
83415
                        '[class.mat-chip-list-required]': 'required',
83416
                        '[attr.aria-orientation]': 'ariaOrientation',
83417
                        'class': 'mat-chip-list',
83418
                        '(focus)': 'focus()',
83419
                        '(blur)': '_blur()',
83420
                        '(keydown)': '_keydown($event)',
83421
                        '[id]': '_uid',
83422
                    },
83423
                    providers: [{ provide: _angular_material_form_field__WEBPACK_IMPORTED_MODULE_11__["MatFormFieldControl"], useExisting: MatChipList }],
83424
                    styles: [".mat-chip{position:relative;overflow:hidden;box-sizing:border-box;-webkit-tap-highlight-color:transparent}.mat-standard-chip{transition:box-shadow 280ms cubic-bezier(.4,0,.2,1);display:inline-flex;padding:7px 12px;border-radius:24px;align-items:center;cursor:default}.mat-standard-chip .mat-chip-remove.mat-icon{width:18px;height:18px}.mat-standard-chip:focus{box-shadow:0 3px 3px -2px rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 1px 8px 0 rgba(0,0,0,.12);outline:0}@media screen and (-ms-high-contrast:active){.mat-standard-chip{outline:solid 1px}.mat-standard-chip:focus{outline:dotted 2px}}.mat-standard-chip.mat-chip-with-avatar,.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-top:0;padding-bottom:0}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-right:7px;padding-left:0}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-left:7px;padding-right:0}.mat-standard-chip.mat-chip-with-trailing-icon{padding-top:7px;padding-bottom:7px;padding-right:7px;padding-left:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon{padding-left:7px;padding-right:12px}.mat-standard-chip.mat-chip-with-avatar{padding-left:0;padding-right:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-avatar{padding-right:0;padding-left:12px}.mat-standard-chip .mat-chip-avatar{width:32px;height:32px;margin-right:8px;margin-left:0}[dir=rtl] .mat-standard-chip .mat-chip-avatar{margin-left:8px;margin-right:0}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{width:18px;height:18px;cursor:pointer}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{margin-left:7px;margin-right:0}[dir=rtl] .mat-standard-chip .mat-chip-remove,[dir=rtl] .mat-standard-chip .mat-chip-trailing-icon{margin-right:7px;margin-left:0}.mat-chip-list-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;margin:-4px}.mat-chip-list-wrapper .mat-standard-chip,.mat-chip-list-wrapper input.mat-input-element{margin:4px}.mat-chip-list-stacked .mat-chip-list-wrapper{flex-direction:column;align-items:flex-start}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-standard-chip{width:100%}.mat-chip-avatar{border-radius:50%;justify-content:center;align-items:center;display:flex;overflow:hidden}input.mat-chip-input{width:150px;margin:3px;flex:1 0 150px}"],
83425
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewEncapsulation"].None,
83426
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ChangeDetectionStrategy"].OnPush
83427
                },] },
83428
    ];
83429
    /** @nocollapse */
83430
    MatChipList.ctorParameters = function () { return [
83431
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ElementRef"], },
83432
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ChangeDetectorRef"], },
83433
        { type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_8__["Directionality"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Optional"] },] },
83434
        { type: _angular_forms__WEBPACK_IMPORTED_MODULE_10__["NgForm"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Optional"] },] },
83435
        { type: _angular_forms__WEBPACK_IMPORTED_MODULE_10__["FormGroupDirective"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Optional"] },] },
83436
        { type: _angular_material_core__WEBPACK_IMPORTED_MODULE_5__["ErrorStateMatcher"], },
83437
        { type: _angular_forms__WEBPACK_IMPORTED_MODULE_10__["NgControl"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Self"] },] },
83438
    ]; };
83439
    MatChipList.propDecorators = {
83440
        "errorStateMatcher": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
83441
        "multiple": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
83442
        "compareWith": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
83443
        "value": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
83444
        "required": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
83445
        "placeholder": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
83446
        "disabled": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
83447
        "ariaOrientation": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"], args: ['aria-orientation',] },],
83448
        "selectable": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
83449
        "tabIndex": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
83450
        "change": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Output"] },],
83451
        "valueChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Output"] },],
83452
        "chips": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ContentChildren"], args: [MatChip,] },],
83453
    };
83454
    return MatChipList;
83455
}(_MatChipListMixinBase));
83456
 
83457
/**
83458
 * @fileoverview added by tsickle
83459
 * @suppress {checkTypes} checked by tsc
83460
 */
83461
// Increasing integer for generating unique ids.
83462
var /** @type {?} */ nextUniqueId$1 = 0;
83463
/**
83464
 * Directive that adds chip-specific behaviors to an input element inside `<mat-form-field>`.
83465
 * May be placed inside or outside of an `<mat-chip-list>`.
83466
 */
83467
var MatChipInput = /** @class */ (function () {
83468
    function MatChipInput(_elementRef, _defaultOptions) {
83469
        this._elementRef = _elementRef;
83470
        this._defaultOptions = _defaultOptions;
83471
        /**
83472
         * Whether the control is focused.
83473
         */
83474
        this.focused = false;
83475
        this._addOnBlur = false;
83476
        /**
83477
         * The list of key codes that will trigger a chipEnd event.
83478
         *
83479
         * Defaults to `[ENTER]`.
83480
         */
83481
        this.separatorKeyCodes = this._defaultOptions.separatorKeyCodes;
83482
        /**
83483
         * Emitted when a chip is to be added.
83484
         */
83485
        this.chipEnd = new _angular_core__WEBPACK_IMPORTED_MODULE_4__["EventEmitter"]();
83486
        /**
83487
         * The input's placeholder text.
83488
         */
83489
        this.placeholder = '';
83490
        /**
83491
         * Unique id for the input.
83492
         */
83493
        this.id = "mat-chip-list-input-" + nextUniqueId$1++;
83494
        this._inputElement = /** @type {?} */ (this._elementRef.nativeElement);
83495
    }
83496
    Object.defineProperty(MatChipInput.prototype, "chipList", {
83497
        set: /**
83498
         * Register input for chip list
83499
         * @param {?} value
83500
         * @return {?}
83501
         */
83502
        function (value) {
83503
            if (value) {
83504
                this._chipList = value;
83505
                this._chipList.registerInput(this);
83506
            }
83507
        },
83508
        enumerable: true,
83509
        configurable: true
83510
    });
83511
    Object.defineProperty(MatChipInput.prototype, "addOnBlur", {
83512
        get: /**
83513
         * Whether or not the chipEnd event will be emitted when the input is blurred.
83514
         * @return {?}
83515
         */
83516
        function () { return this._addOnBlur; },
83517
        set: /**
83518
         * @param {?} value
83519
         * @return {?}
83520
         */
83521
        function (value) { this._addOnBlur = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceBooleanProperty"])(value); },
83522
        enumerable: true,
83523
        configurable: true
83524
    });
83525
    Object.defineProperty(MatChipInput.prototype, "empty", {
83526
        /** Whether the input is empty. */
83527
        get: /**
83528
         * Whether the input is empty.
83529
         * @return {?}
83530
         */
83531
        function () { return !this._inputElement.value; },
83532
        enumerable: true,
83533
        configurable: true
83534
    });
83535
    /**
83536
     * @return {?}
83537
     */
83538
    MatChipInput.prototype.ngOnChanges = /**
83539
     * @return {?}
83540
     */
83541
    function () {
83542
        this._chipList.stateChanges.next();
83543
    };
83544
    /** Utility method to make host definition/tests more clear. */
83545
    /**
83546
     * Utility method to make host definition/tests more clear.
83547
     * @param {?=} event
83548
     * @return {?}
83549
     */
83550
    MatChipInput.prototype._keydown = /**
83551
     * Utility method to make host definition/tests more clear.
83552
     * @param {?=} event
83553
     * @return {?}
83554
     */
83555
    function (event) {
83556
        this._emitChipEnd(event);
83557
    };
83558
    /** Checks to see if the blur should emit the (chipEnd) event. */
83559
    /**
83560
     * Checks to see if the blur should emit the (chipEnd) event.
83561
     * @return {?}
83562
     */
83563
    MatChipInput.prototype._blur = /**
83564
     * Checks to see if the blur should emit the (chipEnd) event.
83565
     * @return {?}
83566
     */
83567
    function () {
83568
        if (this.addOnBlur) {
83569
            this._emitChipEnd();
83570
        }
83571
        this.focused = false;
83572
        // Blur the chip list if it is not focused
83573
        if (!this._chipList.focused) {
83574
            this._chipList._blur();
83575
        }
83576
        this._chipList.stateChanges.next();
83577
    };
83578
    /**
83579
     * @return {?}
83580
     */
83581
    MatChipInput.prototype._focus = /**
83582
     * @return {?}
83583
     */
83584
    function () {
83585
        this.focused = true;
83586
        this._chipList.stateChanges.next();
83587
    };
83588
    /** Checks to see if the (chipEnd) event needs to be emitted. */
83589
    /**
83590
     * Checks to see if the (chipEnd) event needs to be emitted.
83591
     * @param {?=} event
83592
     * @return {?}
83593
     */
83594
    MatChipInput.prototype._emitChipEnd = /**
83595
     * Checks to see if the (chipEnd) event needs to be emitted.
83596
     * @param {?=} event
83597
     * @return {?}
83598
     */
83599
    function (event) {
83600
        if (!this._inputElement.value && !!event) {
83601
            this._chipList._keydown(event);
83602
        }
83603
        if (!event || this.separatorKeyCodes.indexOf(event.keyCode) > -1) {
83604
            this.chipEnd.emit({ input: this._inputElement, value: this._inputElement.value });
83605
            if (event) {
83606
                event.preventDefault();
83607
            }
83608
        }
83609
    };
83610
    /**
83611
     * @return {?}
83612
     */
83613
    MatChipInput.prototype._onInput = /**
83614
     * @return {?}
83615
     */
83616
    function () {
83617
        // Let chip list know whenever the value changes.
83618
        this._chipList.stateChanges.next();
83619
    };
83620
    /** Focuses the input. */
83621
    /**
83622
     * Focuses the input.
83623
     * @return {?}
83624
     */
83625
    MatChipInput.prototype.focus = /**
83626
     * Focuses the input.
83627
     * @return {?}
83628
     */
83629
    function () { this._inputElement.focus(); };
83630
    MatChipInput.decorators = [
83631
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Directive"], args: [{
83632
                    selector: 'input[matChipInputFor]',
83633
                    exportAs: 'matChipInput, matChipInputFor',
83634
                    host: {
83635
                        'class': 'mat-chip-input mat-input-element',
83636
                        '(keydown)': '_keydown($event)',
83637
                        '(blur)': '_blur()',
83638
                        '(focus)': '_focus()',
83639
                        '(input)': '_onInput()',
83640
                        '[id]': 'id',
83641
                        '[attr.placeholder]': 'placeholder || null',
83642
                    }
83643
                },] },
83644
    ];
83645
    /** @nocollapse */
83646
    MatChipInput.ctorParameters = function () { return [
83647
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ElementRef"], },
83648
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Inject"], args: [MAT_CHIPS_DEFAULT_OPTIONS,] },] },
83649
    ]; };
83650
    MatChipInput.propDecorators = {
83651
        "chipList": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"], args: ['matChipInputFor',] },],
83652
        "addOnBlur": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"], args: ['matChipInputAddOnBlur',] },],
83653
        "separatorKeyCodes": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"], args: ['matChipInputSeparatorKeyCodes',] },],
83654
        "chipEnd": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Output"], args: ['matChipInputTokenEnd',] },],
83655
        "placeholder": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
83656
        "id": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
83657
    };
83658
    return MatChipInput;
83659
}());
83660
 
83661
/**
83662
 * @fileoverview added by tsickle
83663
 * @suppress {checkTypes} checked by tsc
83664
 */
83665
var /** @type {?} */ CHIP_DECLARATIONS = [
83666
    MatChipList,
83667
    MatChip,
83668
    MatChipInput,
83669
    MatChipRemove,
83670
    MatChipAvatar,
83671
    MatChipTrailingIcon,
83672
];
83673
var ɵ0 = {
83674
    separatorKeyCodes: [_angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_2__["ENTER"]]
83675
};
83676
var MatChipsModule = /** @class */ (function () {
83677
    function MatChipsModule() {
83678
    }
83679
    MatChipsModule.decorators = [
83680
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["NgModule"], args: [{
83681
                    exports: CHIP_DECLARATIONS,
83682
                    declarations: CHIP_DECLARATIONS,
83683
                    providers: [
83684
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_5__["ErrorStateMatcher"],
83685
                        {
83686
                            provide: MAT_CHIPS_DEFAULT_OPTIONS,
83687
                            useValue: /** @type {?} */ ((ɵ0))
83688
                        }
83689
                    ]
83690
                },] },
83691
    ];
83692
    return MatChipsModule;
83693
}());
83694
 
83695
/**
83696
 * @fileoverview added by tsickle
83697
 * @suppress {checkTypes} checked by tsc
83698
 */
83699
 
83700
/**
83701
 * @fileoverview added by tsickle
83702
 * @suppress {checkTypes} checked by tsc
83703
 */
83704
 
83705
 
83706
//# sourceMappingURL=chips.es5.js.map
83707
 
83708
 
83709
/***/ }),
83710
 
83711
/***/ "./node_modules/@angular/material/esm5/core.es5.js":
83712
/*!*********************************************************!*\
83713
  !*** ./node_modules/@angular/material/esm5/core.es5.js ***!
83714
  \*********************************************************/
83715
/*! exports provided: AnimationCurves, AnimationDurations, MatCommonModule, MATERIAL_SANITY_CHECKS, mixinDisabled, mixinColor, mixinDisableRipple, mixinTabIndex, mixinErrorState, mixinInitialized, NativeDateModule, MatNativeDateModule, MAT_DATE_LOCALE, MAT_DATE_LOCALE_FACTORY, MAT_DATE_LOCALE_PROVIDER, DateAdapter, MAT_DATE_FORMATS, NativeDateAdapter, MAT_NATIVE_DATE_FORMATS, ShowOnDirtyErrorStateMatcher, ErrorStateMatcher, MAT_HAMMER_OPTIONS, GestureConfig, MatLine, MatLineSetter, MatLineModule, MatOptionModule, MatOptionSelectionChange, MAT_OPTION_PARENT_COMPONENT, MatOption, _countGroupLabelsBeforeOption, _getOptionScrollPosition, MatOptgroupBase, _MatOptgroupMixinBase, MatOptgroup, MAT_LABEL_GLOBAL_OPTIONS, MatRippleModule, MAT_RIPPLE_GLOBAL_OPTIONS, MatRipple, RippleState, RippleRef, defaultRippleAnimationConfig, RippleRenderer, MatPseudoCheckboxModule, MatPseudoCheckbox, JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC, ɵa1 */
83716
/***/ (function(module, __webpack_exports__, __webpack_require__) {
83717
 
83718
"use strict";
83719
__webpack_require__.r(__webpack_exports__);
83720
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationCurves", function() { return AnimationCurves; });
83721
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationDurations", function() { return AnimationDurations; });
83722
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCommonModule", function() { return MatCommonModule; });
83723
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MATERIAL_SANITY_CHECKS", function() { return MATERIAL_SANITY_CHECKS; });
83724
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mixinDisabled", function() { return mixinDisabled; });
83725
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mixinColor", function() { return mixinColor; });
83726
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mixinDisableRipple", function() { return mixinDisableRipple; });
83727
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mixinTabIndex", function() { return mixinTabIndex; });
83728
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mixinErrorState", function() { return mixinErrorState; });
83729
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mixinInitialized", function() { return mixinInitialized; });
83730
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NativeDateModule", function() { return NativeDateModule; });
83731
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatNativeDateModule", function() { return MatNativeDateModule; });
83732
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_DATE_LOCALE", function() { return MAT_DATE_LOCALE; });
83733
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_DATE_LOCALE_FACTORY", function() { return MAT_DATE_LOCALE_FACTORY; });
83734
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_DATE_LOCALE_PROVIDER", function() { return MAT_DATE_LOCALE_PROVIDER; });
83735
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DateAdapter", function() { return DateAdapter; });
83736
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_DATE_FORMATS", function() { return MAT_DATE_FORMATS; });
83737
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NativeDateAdapter", function() { return NativeDateAdapter; });
83738
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_NATIVE_DATE_FORMATS", function() { return MAT_NATIVE_DATE_FORMATS; });
83739
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ShowOnDirtyErrorStateMatcher", function() { return ShowOnDirtyErrorStateMatcher; });
83740
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ErrorStateMatcher", function() { return ErrorStateMatcher; });
83741
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_HAMMER_OPTIONS", function() { return MAT_HAMMER_OPTIONS; });
83742
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GestureConfig", function() { return GestureConfig; });
83743
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatLine", function() { return MatLine; });
83744
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatLineSetter", function() { return MatLineSetter; });
83745
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatLineModule", function() { return MatLineModule; });
83746
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatOptionModule", function() { return MatOptionModule; });
83747
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatOptionSelectionChange", function() { return MatOptionSelectionChange; });
83748
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_OPTION_PARENT_COMPONENT", function() { return MAT_OPTION_PARENT_COMPONENT; });
83749
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatOption", function() { return MatOption; });
83750
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_countGroupLabelsBeforeOption", function() { return _countGroupLabelsBeforeOption; });
83751
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_getOptionScrollPosition", function() { return _getOptionScrollPosition; });
83752
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatOptgroupBase", function() { return MatOptgroupBase; });
83753
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatOptgroupMixinBase", function() { return _MatOptgroupMixinBase; });
83754
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatOptgroup", function() { return MatOptgroup; });
83755
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_LABEL_GLOBAL_OPTIONS", function() { return MAT_LABEL_GLOBAL_OPTIONS; });
83756
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatRippleModule", function() { return MatRippleModule; });
83757
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_RIPPLE_GLOBAL_OPTIONS", function() { return MAT_RIPPLE_GLOBAL_OPTIONS; });
83758
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatRipple", function() { return MatRipple; });
83759
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RippleState", function() { return RippleState; });
83760
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RippleRef", function() { return RippleRef; });
83761
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultRippleAnimationConfig", function() { return defaultRippleAnimationConfig; });
83762
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RippleRenderer", function() { return RippleRenderer; });
83763
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatPseudoCheckboxModule", function() { return MatPseudoCheckboxModule; });
83764
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatPseudoCheckbox", function() { return MatPseudoCheckbox; });
83765
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JAN", function() { return JAN; });
83766
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FEB", function() { return FEB; });
83767
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAR", function() { return MAR; });
83768
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APR", function() { return APR; });
83769
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAY", function() { return MAY; });
83770
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JUN", function() { return JUN; });
83771
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JUL", function() { return JUL; });
83772
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AUG", function() { return AUG; });
83773
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SEP", function() { return SEP; });
83774
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OCT", function() { return OCT; });
83775
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NOV", function() { return NOV; });
83776
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEC", function() { return DEC; });
83777
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵa1", function() { return MATERIAL_SANITY_CHECKS_FACTORY; });
83778
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
83779
/* harmony import */ var _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/cdk/bidi */ "./node_modules/@angular/cdk/esm5/bidi.es5.js");
83780
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
83781
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
83782
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
83783
/* harmony import */ var _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/cdk/platform */ "./node_modules/@angular/cdk/esm5/platform.es5.js");
83784
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js");
83785
/* harmony import */ var _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/platform-browser/animations */ "./node_modules/@angular/platform-browser/fesm5/animations.js");
83786
/* harmony import */ var _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/cdk/keycodes */ "./node_modules/@angular/cdk/esm5/keycodes.es5.js");
83787
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
83788
/**
83789
 * @license
83790
 * Copyright Google LLC All Rights Reserved.
83791
 *
83792
 * Use of this source code is governed by an MIT-style license that can be
83793
 * found in the LICENSE file at https://angular.io/license
83794
 */
83795
 
83796
 
83797
 
83798
 
83799
 
83800
 
83801
 
83802
 
83803
 
83804
 
83805
 
83806
/**
83807
 * @fileoverview added by tsickle
83808
 * @suppress {checkTypes} checked by tsc
83809
 */
83810
 
83811
/**
83812
 * \@docs-private
83813
 */
83814
var AnimationCurves = /** @class */ (function () {
83815
    function AnimationCurves() {
83816
    }
83817
    AnimationCurves.STANDARD_CURVE = 'cubic-bezier(0.4,0.0,0.2,1)';
83818
    AnimationCurves.DECELERATION_CURVE = 'cubic-bezier(0.0,0.0,0.2,1)';
83819
    AnimationCurves.ACCELERATION_CURVE = 'cubic-bezier(0.4,0.0,1,1)';
83820
    AnimationCurves.SHARP_CURVE = 'cubic-bezier(0.4,0.0,0.6,1)';
83821
    return AnimationCurves;
83822
}());
83823
/**
83824
 * \@docs-private
83825
 */
83826
var AnimationDurations = /** @class */ (function () {
83827
    function AnimationDurations() {
83828
    }
83829
    AnimationDurations.COMPLEX = '375ms';
83830
    AnimationDurations.ENTERING = '225ms';
83831
    AnimationDurations.EXITING = '195ms';
83832
    return AnimationDurations;
83833
}());
83834
 
83835
/**
83836
 * @fileoverview added by tsickle
83837
 * @suppress {checkTypes} checked by tsc
83838
 */
83839
/**
83840
 * Injection token that configures whether the Material sanity checks are enabled.
83841
 */
83842
var /** @type {?} */ MATERIAL_SANITY_CHECKS = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('mat-sanity-checks', {
83843
    providedIn: 'root',
83844
    factory: MATERIAL_SANITY_CHECKS_FACTORY,
83845
});
83846
/**
83847
 * \@docs-private
83848
 * @return {?}
83849
 */
83850
function MATERIAL_SANITY_CHECKS_FACTORY() {
83851
    return true;
83852
}
83853
/**
83854
 * Module that captures anything that should be loaded and/or run for *all* Angular Material
83855
 * components. This includes Bidi, etc.
83856
 *
83857
 * This module should be imported to each top-level component module (e.g., MatTabsModule).
83858
 */
83859
var MatCommonModule = /** @class */ (function () {
83860
    function MatCommonModule(_sanityChecksEnabled) {
83861
        this._sanityChecksEnabled = _sanityChecksEnabled;
83862
        /**
83863
         * Whether we've done the global sanity checks (e.g. a theme is loaded, there is a doctype).
83864
         */
83865
        this._hasDoneGlobalChecks = false;
83866
        /**
83867
         * Whether we've already checked for HammerJs availability.
83868
         */
83869
        this._hasCheckedHammer = false;
83870
        /**
83871
         * Reference to the global `document` object.
83872
         */
83873
        this._document = typeof document === 'object' && document ? document : null;
83874
        /**
83875
         * Reference to the global 'window' object.
83876
         */
83877
        this._window = typeof window === 'object' && window ? window : null;
83878
        if (this._areChecksEnabled() && !this._hasDoneGlobalChecks) {
83879
            this._checkDoctypeIsDefined();
83880
            this._checkThemeIsPresent();
83881
            this._hasDoneGlobalChecks = true;
83882
        }
83883
    }
83884
    /**
83885
     * Whether any sanity checks are enabled
83886
     * @return {?}
83887
     */
83888
    MatCommonModule.prototype._areChecksEnabled = /**
83889
     * Whether any sanity checks are enabled
83890
     * @return {?}
83891
     */
83892
    function () {
83893
        return this._sanityChecksEnabled && Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["isDevMode"])() && !this._isTestEnv();
83894
    };
83895
    /**
83896
     * Whether the code is running in tests.
83897
     * @return {?}
83898
     */
83899
    MatCommonModule.prototype._isTestEnv = /**
83900
     * Whether the code is running in tests.
83901
     * @return {?}
83902
     */
83903
    function () {
83904
        return this._window && (this._window['__karma__'] || this._window['jasmine']);
83905
    };
83906
    /**
83907
     * @return {?}
83908
     */
83909
    MatCommonModule.prototype._checkDoctypeIsDefined = /**
83910
     * @return {?}
83911
     */
83912
    function () {
83913
        if (this._document && !this._document.doctype) {
83914
            console.warn('Current document does not have a doctype. This may cause ' +
83915
                'some Angular Material components not to behave as expected.');
83916
        }
83917
    };
83918
    /**
83919
     * @return {?}
83920
     */
83921
    MatCommonModule.prototype._checkThemeIsPresent = /**
83922
     * @return {?}
83923
     */
83924
    function () {
83925
        // We need to assert that the `body` is defined, because these checks run very early
83926
        // and the `body` won't be defined if the consumer put their scripts in the `head`.
83927
        if (this._document && this._document.body && typeof getComputedStyle === 'function') {
83928
            var /** @type {?} */ testElement = this._document.createElement('div');
83929
            testElement.classList.add('mat-theme-loaded-marker');
83930
            this._document.body.appendChild(testElement);
83931
            var /** @type {?} */ computedStyle = getComputedStyle(testElement);
83932
            // In some situations the computed style of the test element can be null. For example in
83933
            // Firefox, the computed style is null if an application is running inside of a hidden iframe.
83934
            // See: https://bugzilla.mozilla.org/show_bug.cgi?id=548397
83935
            if (computedStyle && computedStyle.display !== 'none') {
83936
                console.warn('Could not find Angular Material core theme. Most Material ' +
83937
                    'components may not work as expected. For more info refer ' +
83938
                    'to the theming guide: https://material.angular.io/guide/theming');
83939
            }
83940
            this._document.body.removeChild(testElement);
83941
        }
83942
    };
83943
    /** Checks whether HammerJS is available. */
83944
    /**
83945
     * Checks whether HammerJS is available.
83946
     * @return {?}
83947
     */
83948
    MatCommonModule.prototype._checkHammerIsAvailable = /**
83949
     * Checks whether HammerJS is available.
83950
     * @return {?}
83951
     */
83952
    function () {
83953
        if (this._hasCheckedHammer || !this._window) {
83954
            return;
83955
        }
83956
        if (this._areChecksEnabled() && !this._window['Hammer']) {
83957
            console.warn('Could not find HammerJS. Certain Angular Material components may not work correctly.');
83958
        }
83959
        this._hasCheckedHammer = true;
83960
    };
83961
    MatCommonModule.decorators = [
83962
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
83963
                    imports: [_angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_1__["BidiModule"]],
83964
                    exports: [_angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_1__["BidiModule"]],
83965
                },] },
83966
    ];
83967
    /** @nocollapse */
83968
    MatCommonModule.ctorParameters = function () { return [
83969
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [MATERIAL_SANITY_CHECKS,] },] },
83970
    ]; };
83971
    return MatCommonModule;
83972
}());
83973
 
83974
/**
83975
 * @fileoverview added by tsickle
83976
 * @suppress {checkTypes} checked by tsc
83977
 */
83978
/**
83979
 * Mixin to augment a directive with a `disabled` property.
83980
 * @template T
83981
 * @param {?} base
83982
 * @return {?}
83983
 */
83984
function mixinDisabled(base) {
83985
    return /** @class */ (function (_super) {
83986
        Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(class_1, _super);
83987
        function class_1() {
83988
            var args = [];
83989
            for (var _i = 0; _i < arguments.length; _i++) {
83990
                args[_i] = arguments[_i];
83991
            }
83992
            var _this = _super.apply(this, args) || this;
83993
            _this._disabled = false;
83994
            return _this;
83995
        }
83996
        Object.defineProperty(class_1.prototype, "disabled", {
83997
            get: /**
83998
             * @return {?}
83999
             */
84000
            function () { return this._disabled; },
84001
            set: /**
84002
             * @param {?} value
84003
             * @return {?}
84004
             */
84005
            function (value) { this._disabled = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceBooleanProperty"])(value); },
84006
            enumerable: true,
84007
            configurable: true
84008
        });
84009
        return class_1;
84010
    }(base));
84011
}
84012
 
84013
/**
84014
 * @fileoverview added by tsickle
84015
 * @suppress {checkTypes} checked by tsc
84016
 */
84017
/**
84018
 * Mixin to augment a directive with a `color` property.
84019
 * @template T
84020
 * @param {?} base
84021
 * @param {?=} defaultColor
84022
 * @return {?}
84023
 */
84024
function mixinColor(base, defaultColor) {
84025
    return /** @class */ (function (_super) {
84026
        Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(class_1, _super);
84027
        function class_1() {
84028
            var args = [];
84029
            for (var _i = 0; _i < arguments.length; _i++) {
84030
                args[_i] = arguments[_i];
84031
            }
84032
            var _this = _super.apply(this, args) || this;
84033
            // Set the default color that can be specified from the mixin.
84034
            // Set the default color that can be specified from the mixin.
84035
            _this.color = defaultColor;
84036
            return _this;
84037
        }
84038
        Object.defineProperty(class_1.prototype, "color", {
84039
            get: /**
84040
             * @return {?}
84041
             */
84042
            function () { return this._color; },
84043
            set: /**
84044
             * @param {?} value
84045
             * @return {?}
84046
             */
84047
            function (value) {
84048
                var /** @type {?} */ colorPalette = value || defaultColor;
84049
                if (colorPalette !== this._color) {
84050
                    if (this._color) {
84051
                        this._elementRef.nativeElement.classList.remove("mat-" + this._color);
84052
                    }
84053
                    if (colorPalette) {
84054
                        this._elementRef.nativeElement.classList.add("mat-" + colorPalette);
84055
                    }
84056
                    this._color = colorPalette;
84057
                }
84058
            },
84059
            enumerable: true,
84060
            configurable: true
84061
        });
84062
        return class_1;
84063
    }(base));
84064
}
84065
 
84066
/**
84067
 * @fileoverview added by tsickle
84068
 * @suppress {checkTypes} checked by tsc
84069
 */
84070
/**
84071
 * Mixin to augment a directive with a `disableRipple` property.
84072
 * @template T
84073
 * @param {?} base
84074
 * @return {?}
84075
 */
84076
function mixinDisableRipple(base) {
84077
    return /** @class */ (function (_super) {
84078
        Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(class_1, _super);
84079
        function class_1() {
84080
            var args = [];
84081
            for (var _i = 0; _i < arguments.length; _i++) {
84082
                args[_i] = arguments[_i];
84083
            }
84084
            var _this = _super.apply(this, args) || this;
84085
            _this._disableRipple = false;
84086
            return _this;
84087
        }
84088
        Object.defineProperty(class_1.prototype, "disableRipple", {
84089
            /** Whether the ripple effect is disabled or not. */
84090
            get: /**
84091
             * Whether the ripple effect is disabled or not.
84092
             * @return {?}
84093
             */
84094
            function () { return this._disableRipple; },
84095
            set: /**
84096
             * @param {?} value
84097
             * @return {?}
84098
             */
84099
            function (value) { this._disableRipple = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceBooleanProperty"])(value); },
84100
            enumerable: true,
84101
            configurable: true
84102
        });
84103
        return class_1;
84104
    }(base));
84105
}
84106
 
84107
/**
84108
 * @fileoverview added by tsickle
84109
 * @suppress {checkTypes} checked by tsc
84110
 */
84111
/**
84112
 * Mixin to augment a directive with a `tabIndex` property.
84113
 * @template T
84114
 * @param {?} base
84115
 * @param {?=} defaultTabIndex
84116
 * @return {?}
84117
 */
84118
function mixinTabIndex(base, defaultTabIndex) {
84119
    if (defaultTabIndex === void 0) { defaultTabIndex = 0; }
84120
    return /** @class */ (function (_super) {
84121
        Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(class_1, _super);
84122
        function class_1() {
84123
            var args = [];
84124
            for (var _i = 0; _i < arguments.length; _i++) {
84125
                args[_i] = arguments[_i];
84126
            }
84127
            var _this = _super.apply(this, args) || this;
84128
            _this._tabIndex = defaultTabIndex;
84129
            return _this;
84130
        }
84131
        Object.defineProperty(class_1.prototype, "tabIndex", {
84132
            get: /**
84133
             * @return {?}
84134
             */
84135
            function () { return this.disabled ? -1 : this._tabIndex; },
84136
            set: /**
84137
             * @param {?} value
84138
             * @return {?}
84139
             */
84140
            function (value) {
84141
                // If the specified tabIndex value is null or undefined, fall back to the default value.
84142
                this._tabIndex = value != null ? value : defaultTabIndex;
84143
            },
84144
            enumerable: true,
84145
            configurable: true
84146
        });
84147
        return class_1;
84148
    }(base));
84149
}
84150
 
84151
/**
84152
 * @fileoverview added by tsickle
84153
 * @suppress {checkTypes} checked by tsc
84154
 */
84155
/**
84156
 * Mixin to augment a directive with updateErrorState method.
84157
 * For component with `errorState` and need to update `errorState`.
84158
 * @template T
84159
 * @param {?} base
84160
 * @return {?}
84161
 */
84162
function mixinErrorState(base) {
84163
    return /** @class */ (function (_super) {
84164
        Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(class_1, _super);
84165
        function class_1() {
84166
            var args = [];
84167
            for (var _i = 0; _i < arguments.length; _i++) {
84168
                args[_i] = arguments[_i];
84169
            }
84170
            var _this = _super.apply(this, args) || this;
84171
            /**
84172
             * Whether the component is in an error state.
84173
             */
84174
            _this.errorState = false;
84175
            /**
84176
             * Stream that emits whenever the state of the input changes such that the wrapping
84177
             * `MatFormField` needs to run change detection.
84178
             */
84179
            _this.stateChanges = new rxjs__WEBPACK_IMPORTED_MODULE_4__["Subject"]();
84180
            return _this;
84181
        }
84182
        /**
84183
         * @return {?}
84184
         */
84185
        class_1.prototype.updateErrorState = /**
84186
         * @return {?}
84187
         */
84188
        function () {
84189
            var /** @type {?} */ oldState = this.errorState;
84190
            var /** @type {?} */ parent = this._parentFormGroup || this._parentForm;
84191
            var /** @type {?} */ matcher = this.errorStateMatcher || this._defaultErrorStateMatcher;
84192
            var /** @type {?} */ control = this.ngControl ? /** @type {?} */ (this.ngControl.control) : null;
84193
            var /** @type {?} */ newState = matcher.isErrorState(control, parent);
84194
            if (newState !== oldState) {
84195
                this.errorState = newState;
84196
                this.stateChanges.next();
84197
            }
84198
        };
84199
        return class_1;
84200
    }(base));
84201
}
84202
 
84203
/**
84204
 * @fileoverview added by tsickle
84205
 * @suppress {checkTypes} checked by tsc
84206
 */
84207
/**
84208
 * Mixin to augment a directive with an initialized property that will emits when ngOnInit ends.
84209
 * @template T
84210
 * @param {?} base
84211
 * @return {?}
84212
 */
84213
function mixinInitialized(base) {
84214
    return /** @class */ (function (_super) {
84215
        Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(class_1, _super);
84216
        function class_1() {
84217
            var args = [];
84218
            for (var _i = 0; _i < arguments.length; _i++) {
84219
                args[_i] = arguments[_i];
84220
            }
84221
            var _this = _super.apply(this, args) || this;
84222
            /**
84223
             * Whether this directive has been marked as initialized.
84224
             */
84225
            _this._isInitialized = false;
84226
            /**
84227
             * List of subscribers that subscribed before the directive was initialized. Should be notified
84228
             * during _markInitialized. Set to null after pending subscribers are notified, and should
84229
             * not expect to be populated after.
84230
             */
84231
            _this._pendingSubscribers = [];
84232
            /**
84233
             * Observable stream that emits when the directive initializes. If already initialized, the
84234
             * subscriber is stored to be notified once _markInitialized is called.
84235
             */
84236
            _this.initialized = new rxjs__WEBPACK_IMPORTED_MODULE_4__["Observable"](function (subscriber) {
84237
                // If initialized, immediately notify the subscriber. Otherwise store the subscriber to notify
84238
                // when _markInitialized is called.
84239
                if (_this._isInitialized) {
84240
                    _this._notifySubscriber(subscriber);
84241
                }
84242
                else {
84243
                    /** @type {?} */ ((_this._pendingSubscribers)).push(subscriber);
84244
                }
84245
            });
84246
            return _this;
84247
        }
84248
        /**
84249
         * Marks the state as initialized and notifies pending subscribers. Should be called at the end
84250
         * of ngOnInit.
84251
         * @docs-private
84252
         */
84253
        /**
84254
         * Marks the state as initialized and notifies pending subscribers. Should be called at the end
84255
         * of ngOnInit.
84256
         * \@docs-private
84257
         * @return {?}
84258
         */
84259
        class_1.prototype._markInitialized = /**
84260
         * Marks the state as initialized and notifies pending subscribers. Should be called at the end
84261
         * of ngOnInit.
84262
         * \@docs-private
84263
         * @return {?}
84264
         */
84265
        function () {
84266
            if (this._isInitialized) {
84267
                throw Error('This directive has already been marked as initialized and ' +
84268
                    'should not be called twice.');
84269
            }
84270
            this._isInitialized = true; /** @type {?} */
84271
            ((this._pendingSubscribers)).forEach(this._notifySubscriber);
84272
            this._pendingSubscribers = null;
84273
        };
84274
        /** Emits and completes the subscriber stream (should only emit once). */
84275
        /**
84276
         * Emits and completes the subscriber stream (should only emit once).
84277
         * @param {?} subscriber
84278
         * @return {?}
84279
         */
84280
        class_1.prototype._notifySubscriber = /**
84281
         * Emits and completes the subscriber stream (should only emit once).
84282
         * @param {?} subscriber
84283
         * @return {?}
84284
         */
84285
        function (subscriber) {
84286
            subscriber.next();
84287
            subscriber.complete();
84288
        };
84289
        return class_1;
84290
    }(base));
84291
}
84292
 
84293
/**
84294
 * @fileoverview added by tsickle
84295
 * @suppress {checkTypes} checked by tsc
84296
 */
84297
 
84298
/**
84299
 * @fileoverview added by tsickle
84300
 * @suppress {checkTypes} checked by tsc
84301
 */
84302
/**
84303
 * InjectionToken for datepicker that can be used to override default locale code.
84304
 */
84305
var /** @type {?} */ MAT_DATE_LOCALE = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('MAT_DATE_LOCALE', {
84306
    providedIn: 'root',
84307
    factory: MAT_DATE_LOCALE_FACTORY,
84308
});
84309
/**
84310
 * \@docs-private
84311
 * @return {?}
84312
 */
84313
function MAT_DATE_LOCALE_FACTORY() {
84314
    return Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]);
84315
}
84316
/**
84317
 * No longer needed since MAT_DATE_LOCALE has been changed to a scoped injectable.
84318
 * If you are importing and providing this in your code you can simply remove it.
84319
 * @deprecated
84320
 * \@breaking-change 7.0.0
84321
 */
84322
var /** @type {?} */ MAT_DATE_LOCALE_PROVIDER = { provide: MAT_DATE_LOCALE, useExisting: _angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"] };
84323
/**
84324
 * Adapts type `D` to be usable as a date by cdk-based components that work with dates.
84325
 * @abstract
84326
 * @template D
84327
 */
84328
var  /**
84329
 * Adapts type `D` to be usable as a date by cdk-based components that work with dates.
84330
 * @abstract
84331
 * @template D
84332
 */
84333
DateAdapter = /** @class */ (function () {
84334
    function DateAdapter() {
84335
        this._localeChanges = new rxjs__WEBPACK_IMPORTED_MODULE_4__["Subject"]();
84336
    }
84337
    Object.defineProperty(DateAdapter.prototype, "localeChanges", {
84338
        /** A stream that emits when the locale changes. */
84339
        get: /**
84340
         * A stream that emits when the locale changes.
84341
         * @return {?}
84342
         */
84343
        function () { return this._localeChanges; },
84344
        enumerable: true,
84345
        configurable: true
84346
    });
84347
    /**
84348
     * Attempts to deserialize a value to a valid date object. This is different from parsing in that
84349
     * deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601
84350
     * string). The default implementation does not allow any deserialization, it simply checks that
84351
     * the given value is already a valid date object or null. The `<mat-datepicker>` will call this
84352
     * method on all of it's `@Input()` properties that accept dates. It is therefore possible to
84353
     * support passing values from your backend directly to these properties by overriding this method
84354
     * to also deserialize the format used by your backend.
84355
     * @param value The value to be deserialized into a date object.
84356
     * @returns The deserialized date object, either a valid date, null if the value can be
84357
     *     deserialized into a null date (e.g. the empty string), or an invalid date.
84358
     */
84359
    /**
84360
     * Attempts to deserialize a value to a valid date object. This is different from parsing in that
84361
     * deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601
84362
     * string). The default implementation does not allow any deserialization, it simply checks that
84363
     * the given value is already a valid date object or null. The `<mat-datepicker>` will call this
84364
     * method on all of it's `\@Input()` properties that accept dates. It is therefore possible to
84365
     * support passing values from your backend directly to these properties by overriding this method
84366
     * to also deserialize the format used by your backend.
84367
     * @param {?} value The value to be deserialized into a date object.
84368
     * @return {?} The deserialized date object, either a valid date, null if the value can be
84369
     *     deserialized into a null date (e.g. the empty string), or an invalid date.
84370
     */
84371
    DateAdapter.prototype.deserialize = /**
84372
     * Attempts to deserialize a value to a valid date object. This is different from parsing in that
84373
     * deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601
84374
     * string). The default implementation does not allow any deserialization, it simply checks that
84375
     * the given value is already a valid date object or null. The `<mat-datepicker>` will call this
84376
     * method on all of it's `\@Input()` properties that accept dates. It is therefore possible to
84377
     * support passing values from your backend directly to these properties by overriding this method
84378
     * to also deserialize the format used by your backend.
84379
     * @param {?} value The value to be deserialized into a date object.
84380
     * @return {?} The deserialized date object, either a valid date, null if the value can be
84381
     *     deserialized into a null date (e.g. the empty string), or an invalid date.
84382
     */
84383
    function (value) {
84384
        if (value == null || this.isDateInstance(value) && this.isValid(value)) {
84385
            return value;
84386
        }
84387
        return this.invalid();
84388
    };
84389
    /**
84390
     * Sets the locale used for all dates.
84391
     * @param locale The new locale.
84392
     */
84393
    /**
84394
     * Sets the locale used for all dates.
84395
     * @param {?} locale The new locale.
84396
     * @return {?}
84397
     */
84398
    DateAdapter.prototype.setLocale = /**
84399
     * Sets the locale used for all dates.
84400
     * @param {?} locale The new locale.
84401
     * @return {?}
84402
     */
84403
    function (locale) {
84404
        this.locale = locale;
84405
        this._localeChanges.next();
84406
    };
84407
    /**
84408
     * Compares two dates.
84409
     * @param first The first date to compare.
84410
     * @param second The second date to compare.
84411
     * @returns 0 if the dates are equal, a number less than 0 if the first date is earlier,
84412
     *     a number greater than 0 if the first date is later.
84413
     */
84414
    /**
84415
     * Compares two dates.
84416
     * @param {?} first The first date to compare.
84417
     * @param {?} second The second date to compare.
84418
     * @return {?} 0 if the dates are equal, a number less than 0 if the first date is earlier,
84419
     *     a number greater than 0 if the first date is later.
84420
     */
84421
    DateAdapter.prototype.compareDate = /**
84422
     * Compares two dates.
84423
     * @param {?} first The first date to compare.
84424
     * @param {?} second The second date to compare.
84425
     * @return {?} 0 if the dates are equal, a number less than 0 if the first date is earlier,
84426
     *     a number greater than 0 if the first date is later.
84427
     */
84428
    function (first, second) {
84429
        return this.getYear(first) - this.getYear(second) ||
84430
            this.getMonth(first) - this.getMonth(second) ||
84431
            this.getDate(first) - this.getDate(second);
84432
    };
84433
    /**
84434
     * Checks if two dates are equal.
84435
     * @param first The first date to check.
84436
     * @param second The second date to check.
84437
     * @returns Whether the two dates are equal.
84438
     *     Null dates are considered equal to other null dates.
84439
     */
84440
    /**
84441
     * Checks if two dates are equal.
84442
     * @param {?} first The first date to check.
84443
     * @param {?} second The second date to check.
84444
     * @return {?} Whether the two dates are equal.
84445
     *     Null dates are considered equal to other null dates.
84446
     */
84447
    DateAdapter.prototype.sameDate = /**
84448
     * Checks if two dates are equal.
84449
     * @param {?} first The first date to check.
84450
     * @param {?} second The second date to check.
84451
     * @return {?} Whether the two dates are equal.
84452
     *     Null dates are considered equal to other null dates.
84453
     */
84454
    function (first, second) {
84455
        if (first && second) {
84456
            var /** @type {?} */ firstValid = this.isValid(first);
84457
            var /** @type {?} */ secondValid = this.isValid(second);
84458
            if (firstValid && secondValid) {
84459
                return !this.compareDate(first, second);
84460
            }
84461
            return firstValid == secondValid;
84462
        }
84463
        return first == second;
84464
    };
84465
    /**
84466
     * Clamp the given date between min and max dates.
84467
     * @param date The date to clamp.
84468
     * @param min The minimum value to allow. If null or omitted no min is enforced.
84469
     * @param max The maximum value to allow. If null or omitted no max is enforced.
84470
     * @returns `min` if `date` is less than `min`, `max` if date is greater than `max`,
84471
     *     otherwise `date`.
84472
     */
84473
    /**
84474
     * Clamp the given date between min and max dates.
84475
     * @param {?} date The date to clamp.
84476
     * @param {?=} min The minimum value to allow. If null or omitted no min is enforced.
84477
     * @param {?=} max The maximum value to allow. If null or omitted no max is enforced.
84478
     * @return {?} `min` if `date` is less than `min`, `max` if date is greater than `max`,
84479
     *     otherwise `date`.
84480
     */
84481
    DateAdapter.prototype.clampDate = /**
84482
     * Clamp the given date between min and max dates.
84483
     * @param {?} date The date to clamp.
84484
     * @param {?=} min The minimum value to allow. If null or omitted no min is enforced.
84485
     * @param {?=} max The maximum value to allow. If null or omitted no max is enforced.
84486
     * @return {?} `min` if `date` is less than `min`, `max` if date is greater than `max`,
84487
     *     otherwise `date`.
84488
     */
84489
    function (date, min, max) {
84490
        if (min && this.compareDate(date, min) < 0) {
84491
            return min;
84492
        }
84493
        if (max && this.compareDate(date, max) > 0) {
84494
            return max;
84495
        }
84496
        return date;
84497
    };
84498
    return DateAdapter;
84499
}());
84500
 
84501
/**
84502
 * @fileoverview added by tsickle
84503
 * @suppress {checkTypes} checked by tsc
84504
 */
84505
var /** @type {?} */ MAT_DATE_FORMATS = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('mat-date-formats');
84506
 
84507
/**
84508
 * @fileoverview added by tsickle
84509
 * @suppress {checkTypes} checked by tsc
84510
 */
84511
/**
84512
 * Whether the browser supports the Intl API.
84513
 */
84514
var /** @type {?} */ SUPPORTS_INTL_API = typeof Intl != 'undefined';
84515
/**
84516
 * The default month names to use if Intl API is not available.
84517
 */
84518
var /** @type {?} */ DEFAULT_MONTH_NAMES = {
84519
    'long': [
84520
        'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September',
84521
        'October', 'November', 'December'
84522
    ],
84523
    'short': ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
84524
    'narrow': ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D']
84525
};
84526
var ɵ0 = function (i) { return String(i + 1); };
84527
/**
84528
 * The default date names to use if Intl API is not available.
84529
 */
84530
var /** @type {?} */ DEFAULT_DATE_NAMES = range(31, ɵ0);
84531
/**
84532
 * The default day of the week names to use if Intl API is not available.
84533
 */
84534
var /** @type {?} */ DEFAULT_DAY_OF_WEEK_NAMES = {
84535
    'long': ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
84536
    'short': ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
84537
    'narrow': ['S', 'M', 'T', 'W', 'T', 'F', 'S']
84538
};
84539
/**
84540
 * Matches strings that have the form of a valid RFC 3339 string
84541
 * (https://tools.ietf.org/html/rfc3339). Note that the string may not actually be a valid date
84542
 * because the regex will match strings an with out of bounds month, date, etc.
84543
 */
84544
var /** @type {?} */ ISO_8601_REGEX = /^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;
84545
/**
84546
 * Creates an array and fills it with values.
84547
 * @template T
84548
 * @param {?} length
84549
 * @param {?} valueFunction
84550
 * @return {?}
84551
 */
84552
function range(length, valueFunction) {
84553
    var /** @type {?} */ valuesArray = Array(length);
84554
    for (var /** @type {?} */ i = 0; i < length; i++) {
84555
        valuesArray[i] = valueFunction(i);
84556
    }
84557
    return valuesArray;
84558
}
84559
/**
84560
 * Adapts the native JS Date for use with cdk-based components that work with dates.
84561
 */
84562
var NativeDateAdapter = /** @class */ (function (_super) {
84563
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(NativeDateAdapter, _super);
84564
    function NativeDateAdapter(matDateLocale, platform) {
84565
        var _this = _super.call(this) || this;
84566
        /**
84567
         * Whether to use `timeZone: 'utc'` with `Intl.DateTimeFormat` when formatting dates.
84568
         * Without this `Intl.DateTimeFormat` sometimes chooses the wrong timeZone, which can throw off
84569
         * the result. (e.g. in the en-US locale `new Date(1800, 7, 14).toLocaleDateString()`
84570
         * will produce `'8/13/1800'`.
84571
         *
84572
         * TODO(mmalerba): drop this variable. It's not being used in the code right now. We're now
84573
         * getting the string representation of a Date object from it's utc representation. We're keeping
84574
         * it here for sometime, just for precaution, in case we decide to revert some of these changes
84575
         * though.
84576
         */
84577
        _this.useUtcForDisplay = true;
84578
        _super.prototype.setLocale.call(_this, matDateLocale);
84579
        // IE does its own time zone correction, so we disable this on IE.
84580
        // IE does its own time zone correction, so we disable this on IE.
84581
        _this.useUtcForDisplay = !platform.TRIDENT;
84582
        _this._clampDate = platform.TRIDENT || platform.EDGE;
84583
        return _this;
84584
    }
84585
    /**
84586
     * @param {?} date
84587
     * @return {?}
84588
     */
84589
    NativeDateAdapter.prototype.getYear = /**
84590
     * @param {?} date
84591
     * @return {?}
84592
     */
84593
    function (date) {
84594
        return date.getFullYear();
84595
    };
84596
    /**
84597
     * @param {?} date
84598
     * @return {?}
84599
     */
84600
    NativeDateAdapter.prototype.getMonth = /**
84601
     * @param {?} date
84602
     * @return {?}
84603
     */
84604
    function (date) {
84605
        return date.getMonth();
84606
    };
84607
    /**
84608
     * @param {?} date
84609
     * @return {?}
84610
     */
84611
    NativeDateAdapter.prototype.getDate = /**
84612
     * @param {?} date
84613
     * @return {?}
84614
     */
84615
    function (date) {
84616
        return date.getDate();
84617
    };
84618
    /**
84619
     * @param {?} date
84620
     * @return {?}
84621
     */
84622
    NativeDateAdapter.prototype.getDayOfWeek = /**
84623
     * @param {?} date
84624
     * @return {?}
84625
     */
84626
    function (date) {
84627
        return date.getDay();
84628
    };
84629
    /**
84630
     * @param {?} style
84631
     * @return {?}
84632
     */
84633
    NativeDateAdapter.prototype.getMonthNames = /**
84634
     * @param {?} style
84635
     * @return {?}
84636
     */
84637
    function (style) {
84638
        var _this = this;
84639
        if (SUPPORTS_INTL_API) {
84640
            var /** @type {?} */ dtf_1 = new Intl.DateTimeFormat(this.locale, { month: style, timeZone: 'utc' });
84641
            return range(12, function (i) {
84642
                return _this._stripDirectionalityCharacters(_this._format(dtf_1, new Date(2017, i, 1)));
84643
            });
84644
        }
84645
        return DEFAULT_MONTH_NAMES[style];
84646
    };
84647
    /**
84648
     * @return {?}
84649
     */
84650
    NativeDateAdapter.prototype.getDateNames = /**
84651
     * @return {?}
84652
     */
84653
    function () {
84654
        var _this = this;
84655
        if (SUPPORTS_INTL_API) {
84656
            var /** @type {?} */ dtf_2 = new Intl.DateTimeFormat(this.locale, { day: 'numeric', timeZone: 'utc' });
84657
            return range(31, function (i) {
84658
                return _this._stripDirectionalityCharacters(_this._format(dtf_2, new Date(2017, 0, i + 1)));
84659
            });
84660
        }
84661
        return DEFAULT_DATE_NAMES;
84662
    };
84663
    /**
84664
     * @param {?} style
84665
     * @return {?}
84666
     */
84667
    NativeDateAdapter.prototype.getDayOfWeekNames = /**
84668
     * @param {?} style
84669
     * @return {?}
84670
     */
84671
    function (style) {
84672
        var _this = this;
84673
        if (SUPPORTS_INTL_API) {
84674
            var /** @type {?} */ dtf_3 = new Intl.DateTimeFormat(this.locale, { weekday: style, timeZone: 'utc' });
84675
            return range(7, function (i) {
84676
                return _this._stripDirectionalityCharacters(_this._format(dtf_3, new Date(2017, 0, i + 1)));
84677
            });
84678
        }
84679
        return DEFAULT_DAY_OF_WEEK_NAMES[style];
84680
    };
84681
    /**
84682
     * @param {?} date
84683
     * @return {?}
84684
     */
84685
    NativeDateAdapter.prototype.getYearName = /**
84686
     * @param {?} date
84687
     * @return {?}
84688
     */
84689
    function (date) {
84690
        if (SUPPORTS_INTL_API) {
84691
            var /** @type {?} */ dtf = new Intl.DateTimeFormat(this.locale, { year: 'numeric', timeZone: 'utc' });
84692
            return this._stripDirectionalityCharacters(this._format(dtf, date));
84693
        }
84694
        return String(this.getYear(date));
84695
    };
84696
    /**
84697
     * @return {?}
84698
     */
84699
    NativeDateAdapter.prototype.getFirstDayOfWeek = /**
84700
     * @return {?}
84701
     */
84702
    function () {
84703
        // We can't tell using native JS Date what the first day of the week is, we default to Sunday.
84704
        return 0;
84705
    };
84706
    /**
84707
     * @param {?} date
84708
     * @return {?}
84709
     */
84710
    NativeDateAdapter.prototype.getNumDaysInMonth = /**
84711
     * @param {?} date
84712
     * @return {?}
84713
     */
84714
    function (date) {
84715
        return this.getDate(this._createDateWithOverflow(this.getYear(date), this.getMonth(date) + 1, 0));
84716
    };
84717
    /**
84718
     * @param {?} date
84719
     * @return {?}
84720
     */
84721
    NativeDateAdapter.prototype.clone = /**
84722
     * @param {?} date
84723
     * @return {?}
84724
     */
84725
    function (date) {
84726
        return this.createDate(this.getYear(date), this.getMonth(date), this.getDate(date));
84727
    };
84728
    /**
84729
     * @param {?} year
84730
     * @param {?} month
84731
     * @param {?} date
84732
     * @return {?}
84733
     */
84734
    NativeDateAdapter.prototype.createDate = /**
84735
     * @param {?} year
84736
     * @param {?} month
84737
     * @param {?} date
84738
     * @return {?}
84739
     */
84740
    function (year, month, date) {
84741
        // Check for invalid month and date (except upper bound on date which we have to check after
84742
        // creating the Date).
84743
        if (month < 0 || month > 11) {
84744
            throw Error("Invalid month index \"" + month + "\". Month index has to be between 0 and 11.");
84745
        }
84746
        if (date < 1) {
84747
            throw Error("Invalid date \"" + date + "\". Date has to be greater than 0.");
84748
        }
84749
        var /** @type {?} */ result = this._createDateWithOverflow(year, month, date);
84750
        // Check that the date wasn't above the upper bound for the month, causing the month to overflow
84751
        if (result.getMonth() != month) {
84752
            throw Error("Invalid date \"" + date + "\" for month with index \"" + month + "\".");
84753
        }
84754
        return result;
84755
    };
84756
    /**
84757
     * @return {?}
84758
     */
84759
    NativeDateAdapter.prototype.today = /**
84760
     * @return {?}
84761
     */
84762
    function () {
84763
        return new Date();
84764
    };
84765
    /**
84766
     * @param {?} value
84767
     * @return {?}
84768
     */
84769
    NativeDateAdapter.prototype.parse = /**
84770
     * @param {?} value
84771
     * @return {?}
84772
     */
84773
    function (value) {
84774
        // We have no way using the native JS Date to set the parse format or locale, so we ignore these
84775
        // parameters.
84776
        if (typeof value == 'number') {
84777
            return new Date(value);
84778
        }
84779
        return value ? new Date(Date.parse(value)) : null;
84780
    };
84781
    /**
84782
     * @param {?} date
84783
     * @param {?} displayFormat
84784
     * @return {?}
84785
     */
84786
    NativeDateAdapter.prototype.format = /**
84787
     * @param {?} date
84788
     * @param {?} displayFormat
84789
     * @return {?}
84790
     */
84791
    function (date, displayFormat) {
84792
        if (!this.isValid(date)) {
84793
            throw Error('NativeDateAdapter: Cannot format invalid date.');
84794
        }
84795
        if (SUPPORTS_INTL_API) {
84796
            // On IE and Edge the i18n API will throw a hard error that can crash the entire app
84797
            // if we attempt to format a date whose year is less than 1 or greater than 9999.
84798
            if (this._clampDate && (date.getFullYear() < 1 || date.getFullYear() > 9999)) {
84799
                date = this.clone(date);
84800
                date.setFullYear(Math.max(1, Math.min(9999, date.getFullYear())));
84801
            }
84802
            displayFormat = Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__assign"])({}, displayFormat, { timeZone: 'utc' });
84803
            var /** @type {?} */ dtf = new Intl.DateTimeFormat(this.locale, displayFormat);
84804
            return this._stripDirectionalityCharacters(this._format(dtf, date));
84805
        }
84806
        return this._stripDirectionalityCharacters(date.toDateString());
84807
    };
84808
    /**
84809
     * @param {?} date
84810
     * @param {?} years
84811
     * @return {?}
84812
     */
84813
    NativeDateAdapter.prototype.addCalendarYears = /**
84814
     * @param {?} date
84815
     * @param {?} years
84816
     * @return {?}
84817
     */
84818
    function (date, years) {
84819
        return this.addCalendarMonths(date, years * 12);
84820
    };
84821
    /**
84822
     * @param {?} date
84823
     * @param {?} months
84824
     * @return {?}
84825
     */
84826
    NativeDateAdapter.prototype.addCalendarMonths = /**
84827
     * @param {?} date
84828
     * @param {?} months
84829
     * @return {?}
84830
     */
84831
    function (date, months) {
84832
        var /** @type {?} */ newDate = this._createDateWithOverflow(this.getYear(date), this.getMonth(date) + months, this.getDate(date));
84833
        // It's possible to wind up in the wrong month if the original month has more days than the new
84834
        // month. In this case we want to go to the last day of the desired month.
84835
        // Note: the additional + 12 % 12 ensures we end up with a positive number, since JS % doesn't
84836
        // guarantee this.
84837
        if (this.getMonth(newDate) != ((this.getMonth(date) + months) % 12 + 12) % 12) {
84838
            newDate = this._createDateWithOverflow(this.getYear(newDate), this.getMonth(newDate), 0);
84839
        }
84840
        return newDate;
84841
    };
84842
    /**
84843
     * @param {?} date
84844
     * @param {?} days
84845
     * @return {?}
84846
     */
84847
    NativeDateAdapter.prototype.addCalendarDays = /**
84848
     * @param {?} date
84849
     * @param {?} days
84850
     * @return {?}
84851
     */
84852
    function (date, days) {
84853
        return this._createDateWithOverflow(this.getYear(date), this.getMonth(date), this.getDate(date) + days);
84854
    };
84855
    /**
84856
     * @param {?} date
84857
     * @return {?}
84858
     */
84859
    NativeDateAdapter.prototype.toIso8601 = /**
84860
     * @param {?} date
84861
     * @return {?}
84862
     */
84863
    function (date) {
84864
        return [
84865
            date.getUTCFullYear(),
84866
            this._2digit(date.getUTCMonth() + 1),
84867
            this._2digit(date.getUTCDate())
84868
        ].join('-');
84869
    };
84870
    /**
84871
     * Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings
84872
     * (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an
84873
     * invalid date for all other values.
84874
     */
84875
    /**
84876
     * Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings
84877
     * (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an
84878
     * invalid date for all other values.
84879
     * @param {?} value
84880
     * @return {?}
84881
     */
84882
    NativeDateAdapter.prototype.deserialize = /**
84883
     * Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings
84884
     * (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an
84885
     * invalid date for all other values.
84886
     * @param {?} value
84887
     * @return {?}
84888
     */
84889
    function (value) {
84890
        if (typeof value === 'string') {
84891
            if (!value) {
84892
                return null;
84893
            }
84894
            // The `Date` constructor accepts formats other than ISO 8601, so we need to make sure the
84895
            // string is the right format first.
84896
            if (ISO_8601_REGEX.test(value)) {
84897
                var /** @type {?} */ date = new Date(value);
84898
                if (this.isValid(date)) {
84899
                    return date;
84900
                }
84901
            }
84902
        }
84903
        return _super.prototype.deserialize.call(this, value);
84904
    };
84905
    /**
84906
     * @param {?} obj
84907
     * @return {?}
84908
     */
84909
    NativeDateAdapter.prototype.isDateInstance = /**
84910
     * @param {?} obj
84911
     * @return {?}
84912
     */
84913
    function (obj) {
84914
        return obj instanceof Date;
84915
    };
84916
    /**
84917
     * @param {?} date
84918
     * @return {?}
84919
     */
84920
    NativeDateAdapter.prototype.isValid = /**
84921
     * @param {?} date
84922
     * @return {?}
84923
     */
84924
    function (date) {
84925
        return !isNaN(date.getTime());
84926
    };
84927
    /**
84928
     * @return {?}
84929
     */
84930
    NativeDateAdapter.prototype.invalid = /**
84931
     * @return {?}
84932
     */
84933
    function () {
84934
        return new Date(NaN);
84935
    };
84936
    /**
84937
     * Creates a date but allows the month and date to overflow.
84938
     * @param {?} year
84939
     * @param {?} month
84940
     * @param {?} date
84941
     * @return {?}
84942
     */
84943
    NativeDateAdapter.prototype._createDateWithOverflow = /**
84944
     * Creates a date but allows the month and date to overflow.
84945
     * @param {?} year
84946
     * @param {?} month
84947
     * @param {?} date
84948
     * @return {?}
84949
     */
84950
    function (year, month, date) {
84951
        var /** @type {?} */ result = new Date(year, month, date);
84952
        // We need to correct for the fact that JS native Date treats years in range [0, 99] as
84953
        // abbreviations for 19xx.
84954
        if (year >= 0 && year < 100) {
84955
            result.setFullYear(this.getYear(result) - 1900);
84956
        }
84957
        return result;
84958
    };
84959
    /**
84960
     * Pads a number to make it two digits.
84961
     * @param {?} n The number to pad.
84962
     * @return {?} The padded number.
84963
     */
84964
    NativeDateAdapter.prototype._2digit = /**
84965
     * Pads a number to make it two digits.
84966
     * @param {?} n The number to pad.
84967
     * @return {?} The padded number.
84968
     */
84969
    function (n) {
84970
        return ('00' + n).slice(-2);
84971
    };
84972
    /**
84973
     * Strip out unicode LTR and RTL characters. Edge and IE insert these into formatted dates while
84974
     * other browsers do not. We remove them to make output consistent and because they interfere with
84975
     * date parsing.
84976
     * @param {?} str The string to strip direction characters from.
84977
     * @return {?} The stripped string.
84978
     */
84979
    NativeDateAdapter.prototype._stripDirectionalityCharacters = /**
84980
     * Strip out unicode LTR and RTL characters. Edge and IE insert these into formatted dates while
84981
     * other browsers do not. We remove them to make output consistent and because they interfere with
84982
     * date parsing.
84983
     * @param {?} str The string to strip direction characters from.
84984
     * @return {?} The stripped string.
84985
     */
84986
    function (str) {
84987
        return str.replace(/[\u200e\u200f]/g, '');
84988
    };
84989
    /**
84990
     * When converting Date object to string, javascript built-in functions may return wrong
84991
     * results because it applies its internal DST rules. The DST rules around the world change
84992
     * very frequently, and the current valid rule is not always valid in previous years though.
84993
     * We work around this problem building a new Date object which has its internal UTC
84994
     * representation with the local date and time.
84995
     * @param {?} dtf Intl.DateTimeFormat object, containg the desired string format. It must have
84996
     *    timeZone set to 'utc' to work fine.
84997
     * @param {?} date Date from which we want to get the string representation according to dtf
84998
     * @return {?} A Date object with its UTC representation based on the passed in date info
84999
     */
85000
    NativeDateAdapter.prototype._format = /**
85001
     * When converting Date object to string, javascript built-in functions may return wrong
85002
     * results because it applies its internal DST rules. The DST rules around the world change
85003
     * very frequently, and the current valid rule is not always valid in previous years though.
85004
     * We work around this problem building a new Date object which has its internal UTC
85005
     * representation with the local date and time.
85006
     * @param {?} dtf Intl.DateTimeFormat object, containg the desired string format. It must have
85007
     *    timeZone set to 'utc' to work fine.
85008
     * @param {?} date Date from which we want to get the string representation according to dtf
85009
     * @return {?} A Date object with its UTC representation based on the passed in date info
85010
     */
85011
    function (dtf, date) {
85012
        var /** @type {?} */ d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
85013
        return dtf.format(d);
85014
    };
85015
    NativeDateAdapter.decorators = [
85016
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] },
85017
    ];
85018
    /** @nocollapse */
85019
    NativeDateAdapter.ctorParameters = function () { return [
85020
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [MAT_DATE_LOCALE,] },] },
85021
        { type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_5__["Platform"], },
85022
    ]; };
85023
    return NativeDateAdapter;
85024
}(DateAdapter));
85025
 
85026
/**
85027
 * @fileoverview added by tsickle
85028
 * @suppress {checkTypes} checked by tsc
85029
 */
85030
 
85031
var /** @type {?} */ MAT_NATIVE_DATE_FORMATS = {
85032
    parse: {
85033
        dateInput: null,
85034
    },
85035
    display: {
85036
        dateInput: { year: 'numeric', month: 'numeric', day: 'numeric' },
85037
        monthYearLabel: { year: 'numeric', month: 'short' },
85038
        dateA11yLabel: { year: 'numeric', month: 'long', day: 'numeric' },
85039
        monthYearA11yLabel: { year: 'numeric', month: 'long' },
85040
    }
85041
};
85042
 
85043
/**
85044
 * @fileoverview added by tsickle
85045
 * @suppress {checkTypes} checked by tsc
85046
 */
85047
var NativeDateModule = /** @class */ (function () {
85048
    function NativeDateModule() {
85049
    }
85050
    NativeDateModule.decorators = [
85051
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
85052
                    imports: [_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_5__["PlatformModule"]],
85053
                    providers: [
85054
                        { provide: DateAdapter, useClass: NativeDateAdapter },
85055
                    ],
85056
                },] },
85057
    ];
85058
    return NativeDateModule;
85059
}());
85060
var ɵ0$1 = MAT_NATIVE_DATE_FORMATS;
85061
var MatNativeDateModule = /** @class */ (function () {
85062
    function MatNativeDateModule() {
85063
    }
85064
    MatNativeDateModule.decorators = [
85065
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
85066
                    imports: [NativeDateModule],
85067
                    providers: [{ provide: MAT_DATE_FORMATS, useValue: ɵ0$1 }],
85068
                },] },
85069
    ];
85070
    return MatNativeDateModule;
85071
}());
85072
 
85073
/**
85074
 * @fileoverview added by tsickle
85075
 * @suppress {checkTypes} checked by tsc
85076
 */
85077
/**
85078
 * Error state matcher that matches when a control is invalid and dirty.
85079
 */
85080
var ShowOnDirtyErrorStateMatcher = /** @class */ (function () {
85081
    function ShowOnDirtyErrorStateMatcher() {
85082
    }
85083
    /**
85084
     * @param {?} control
85085
     * @param {?} form
85086
     * @return {?}
85087
     */
85088
    ShowOnDirtyErrorStateMatcher.prototype.isErrorState = /**
85089
     * @param {?} control
85090
     * @param {?} form
85091
     * @return {?}
85092
     */
85093
    function (control, form) {
85094
        return !!(control && control.invalid && (control.dirty || (form && form.submitted)));
85095
    };
85096
    ShowOnDirtyErrorStateMatcher.decorators = [
85097
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] },
85098
    ];
85099
    return ShowOnDirtyErrorStateMatcher;
85100
}());
85101
/**
85102
 * Provider that defines how form controls behave with regards to displaying error messages.
85103
 */
85104
var ErrorStateMatcher = /** @class */ (function () {
85105
    function ErrorStateMatcher() {
85106
    }
85107
    /**
85108
     * @param {?} control
85109
     * @param {?} form
85110
     * @return {?}
85111
     */
85112
    ErrorStateMatcher.prototype.isErrorState = /**
85113
     * @param {?} control
85114
     * @param {?} form
85115
     * @return {?}
85116
     */
85117
    function (control, form) {
85118
        return !!(control && control.invalid && (control.touched || (form && form.submitted)));
85119
    };
85120
    ErrorStateMatcher.decorators = [
85121
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"], args: [{ providedIn: 'root' },] },
85122
    ];
85123
    /** @nocollapse */ ErrorStateMatcher.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["defineInjectable"])({ factory: function ErrorStateMatcher_Factory() { return new ErrorStateMatcher(); }, token: ErrorStateMatcher, providedIn: "root" });
85124
    return ErrorStateMatcher;
85125
}());
85126
 
85127
/**
85128
 * @fileoverview added by tsickle
85129
 * @suppress {checkTypes} checked by tsc
85130
 */
85131
/**
85132
 * Injection token that can be used to provide options to the Hammerjs instance.
85133
 * More info at http://hammerjs.github.io/api/.
85134
 */
85135
var /** @type {?} */ MAT_HAMMER_OPTIONS = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('MAT_HAMMER_OPTIONS');
85136
var /** @type {?} */ ANGULAR_MATERIAL_SUPPORTED_HAMMER_GESTURES = [
85137
    'longpress',
85138
    'slide',
85139
    'slidestart',
85140
    'slideend',
85141
    'slideright',
85142
    'slideleft'
85143
];
85144
var ɵ0$2 = function () { }, ɵ1 = function () { };
85145
/**
85146
 * Fake HammerInstance that is used when a Hammer instance is requested when HammerJS has not
85147
 * been loaded on the page.
85148
 */
85149
var /** @type {?} */ noopHammerInstance = {
85150
    on: ɵ0$2,
85151
    off: ɵ1,
85152
};
85153
/**
85154
 * Adjusts configuration of our gesture library, Hammer.
85155
 */
85156
var GestureConfig = /** @class */ (function (_super) {
85157
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(GestureConfig, _super);
85158
    function GestureConfig(_hammerOptions, commonModule) {
85159
        var _this = _super.call(this) || this;
85160
        _this._hammerOptions = _hammerOptions;
85161
        /**
85162
         * List of new event names to add to the gesture support list
85163
         */
85164
        _this.events = ANGULAR_MATERIAL_SUPPORTED_HAMMER_GESTURES;
85165
        if (commonModule) {
85166
            commonModule._checkHammerIsAvailable();
85167
        }
85168
        return _this;
85169
    }
85170
    /**
85171
     * Builds Hammer instance manually to add custom recognizers that match the Material Design spec.
85172
     *
85173
     * Our gesture names come from the Material Design gestures spec:
85174
     * https://material.io/design/#gestures-touch-mechanics
85175
     *
85176
     * More information on default recognizers can be found in Hammer docs:
85177
     * http://hammerjs.github.io/recognizer-pan/
85178
     * http://hammerjs.github.io/recognizer-press/
85179
     *
85180
     * @param element Element to which to assign the new HammerJS gestures.
85181
     * @returns Newly-created HammerJS instance.
85182
     */
85183
    /**
85184
     * Builds Hammer instance manually to add custom recognizers that match the Material Design spec.
85185
     *
85186
     * Our gesture names come from the Material Design gestures spec:
85187
     * https://material.io/design/#gestures-touch-mechanics
85188
     *
85189
     * More information on default recognizers can be found in Hammer docs:
85190
     * http://hammerjs.github.io/recognizer-pan/
85191
     * http://hammerjs.github.io/recognizer-press/
85192
     *
85193
     * @param {?} element Element to which to assign the new HammerJS gestures.
85194
     * @return {?} Newly-created HammerJS instance.
85195
     */
85196
    GestureConfig.prototype.buildHammer = /**
85197
     * Builds Hammer instance manually to add custom recognizers that match the Material Design spec.
85198
     *
85199
     * Our gesture names come from the Material Design gestures spec:
85200
     * https://material.io/design/#gestures-touch-mechanics
85201
     *
85202
     * More information on default recognizers can be found in Hammer docs:
85203
     * http://hammerjs.github.io/recognizer-pan/
85204
     * http://hammerjs.github.io/recognizer-press/
85205
     *
85206
     * @param {?} element Element to which to assign the new HammerJS gestures.
85207
     * @return {?} Newly-created HammerJS instance.
85208
     */
85209
    function (element) {
85210
        var /** @type {?} */ hammer = typeof window !== 'undefined' ? (/** @type {?} */ (window)).Hammer : null;
85211
        if (!hammer) {
85212
            // If HammerJS is not loaded here, return the noop HammerInstance. This is necessary to
85213
            // ensure that omitting HammerJS completely will not cause any errors while *also* supporting
85214
            // the lazy-loading of HammerJS via the HAMMER_LOADER token introduced in Angular 6.1.
85215
            // Because we can't depend on HAMMER_LOADER's existance until 7.0, we have to always set
85216
            // `this.events` to the set we support, instead of conditionally setting it to `[]` if
85217
            // `HAMMER_LOADER` is present (and then throwing an Error here if `window.Hammer` is
85218
            // undefined).
85219
            // @breaking-change 7.0.0
85220
            return noopHammerInstance;
85221
        }
85222
        var /** @type {?} */ mc = new hammer(element, this._hammerOptions || undefined);
85223
        // Default Hammer Recognizers.
85224
        var /** @type {?} */ pan = new hammer.Pan();
85225
        var /** @type {?} */ swipe = new hammer.Swipe();
85226
        var /** @type {?} */ press = new hammer.Press();
85227
        // Notice that a HammerJS recognizer can only depend on one other recognizer once.
85228
        // Otherwise the previous `recognizeWith` will be dropped.
85229
        // TODO: Confirm threshold numbers with Material Design UX Team
85230
        var /** @type {?} */ slide = this._createRecognizer(pan, { event: 'slide', threshold: 0 }, swipe);
85231
        var /** @type {?} */ longpress = this._createRecognizer(press, { event: 'longpress', time: 500 });
85232
        // Overwrite the default `pan` event to use the swipe event.
85233
        pan.recognizeWith(swipe);
85234
        // Add customized gestures to Hammer manager
85235
        mc.add([swipe, press, pan, slide, longpress]);
85236
        return /** @type {?} */ (mc);
85237
    };
85238
    /**
85239
     * Creates a new recognizer, without affecting the default recognizers of HammerJS
85240
     * @param {?} base
85241
     * @param {?} options
85242
     * @param {...?} inheritances
85243
     * @return {?}
85244
     */
85245
    GestureConfig.prototype._createRecognizer = /**
85246
     * Creates a new recognizer, without affecting the default recognizers of HammerJS
85247
     * @param {?} base
85248
     * @param {?} options
85249
     * @param {...?} inheritances
85250
     * @return {?}
85251
     */
85252
    function (base, options) {
85253
        var inheritances = [];
85254
        for (var _i = 2; _i < arguments.length; _i++) {
85255
            inheritances[_i - 2] = arguments[_i];
85256
        }
85257
        var /** @type {?} */ recognizer = new (/** @type {?} */ (base.constructor))(options);
85258
        inheritances.push(base);
85259
        inheritances.forEach(function (item) { return recognizer.recognizeWith(item); });
85260
        return recognizer;
85261
    };
85262
    GestureConfig.decorators = [
85263
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] },
85264
    ];
85265
    /** @nocollapse */
85266
    GestureConfig.ctorParameters = function () { return [
85267
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [MAT_HAMMER_OPTIONS,] },] },
85268
        { type: MatCommonModule, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
85269
    ]; };
85270
    return GestureConfig;
85271
}(_angular_platform_browser__WEBPACK_IMPORTED_MODULE_6__["HammerGestureConfig"]));
85272
 
85273
/**
85274
 * @fileoverview added by tsickle
85275
 * @suppress {checkTypes} checked by tsc
85276
 */
85277
/**
85278
 * Shared directive to count lines inside a text area, such as a list item.
85279
 * Line elements can be extracted with a \@ContentChildren(MatLine) query, then
85280
 * counted by checking the query list's length.
85281
 */
85282
var MatLine = /** @class */ (function () {
85283
    function MatLine() {
85284
    }
85285
    MatLine.decorators = [
85286
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
85287
                    selector: '[mat-line], [matLine]',
85288
                    host: { 'class': 'mat-line' }
85289
                },] },
85290
    ];
85291
    return MatLine;
85292
}());
85293
/**
85294
 * Helper that takes a query list of lines and sets the correct class on the host.
85295
 * \@docs-private
85296
 */
85297
var  /**
85298
 * Helper that takes a query list of lines and sets the correct class on the host.
85299
 * \@docs-private
85300
 */
85301
MatLineSetter = /** @class */ (function () {
85302
    function MatLineSetter(_lines, _element) {
85303
        var _this = this;
85304
        this._lines = _lines;
85305
        this._element = _element;
85306
        this._setLineClass(this._lines.length);
85307
        this._lines.changes.subscribe(function () {
85308
            _this._setLineClass(_this._lines.length);
85309
        });
85310
    }
85311
    /**
85312
     * @param {?} count
85313
     * @return {?}
85314
     */
85315
    MatLineSetter.prototype._setLineClass = /**
85316
     * @param {?} count
85317
     * @return {?}
85318
     */
85319
    function (count) {
85320
        this._resetClasses();
85321
        if (count === 2 || count === 3) {
85322
            this._setClass("mat-" + count + "-line", true);
85323
        }
85324
        else if (count > 3) {
85325
            this._setClass("mat-multi-line", true);
85326
        }
85327
    };
85328
    /**
85329
     * @return {?}
85330
     */
85331
    MatLineSetter.prototype._resetClasses = /**
85332
     * @return {?}
85333
     */
85334
    function () {
85335
        this._setClass('mat-2-line', false);
85336
        this._setClass('mat-3-line', false);
85337
        this._setClass('mat-multi-line', false);
85338
    };
85339
    /**
85340
     * @param {?} className
85341
     * @param {?} isAdd
85342
     * @return {?}
85343
     */
85344
    MatLineSetter.prototype._setClass = /**
85345
     * @param {?} className
85346
     * @param {?} isAdd
85347
     * @return {?}
85348
     */
85349
    function (className, isAdd) {
85350
        if (isAdd) {
85351
            this._element.nativeElement.classList.add(className);
85352
        }
85353
        else {
85354
            this._element.nativeElement.classList.remove(className);
85355
        }
85356
    };
85357
    return MatLineSetter;
85358
}());
85359
var MatLineModule = /** @class */ (function () {
85360
    function MatLineModule() {
85361
    }
85362
    MatLineModule.decorators = [
85363
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
85364
                    imports: [MatCommonModule],
85365
                    exports: [MatLine, MatCommonModule],
85366
                    declarations: [MatLine],
85367
                },] },
85368
    ];
85369
    return MatLineModule;
85370
}());
85371
 
85372
/**
85373
 * @fileoverview added by tsickle
85374
 * @suppress {checkTypes} checked by tsc
85375
 */
85376
 
85377
/** @enum {number} */
85378
var RippleState = {
85379
    FADING_IN: 0,
85380
    VISIBLE: 1,
85381
    FADING_OUT: 2,
85382
    HIDDEN: 3,
85383
};
85384
RippleState[RippleState.FADING_IN] = "FADING_IN";
85385
RippleState[RippleState.VISIBLE] = "VISIBLE";
85386
RippleState[RippleState.FADING_OUT] = "FADING_OUT";
85387
RippleState[RippleState.HIDDEN] = "HIDDEN";
85388
/**
85389
 * Reference to a previously launched ripple element.
85390
 */
85391
var  /**
85392
 * Reference to a previously launched ripple element.
85393
 */
85394
RippleRef = /** @class */ (function () {
85395
    function RippleRef(_renderer, element, config) {
85396
        this._renderer = _renderer;
85397
        this.element = element;
85398
        this.config = config;
85399
        /**
85400
         * Current state of the ripple reference.
85401
         */
85402
        this.state = RippleState.HIDDEN;
85403
    }
85404
    /** Fades out the ripple element. */
85405
    /**
85406
     * Fades out the ripple element.
85407
     * @return {?}
85408
     */
85409
    RippleRef.prototype.fadeOut = /**
85410
     * Fades out the ripple element.
85411
     * @return {?}
85412
     */
85413
    function () {
85414
        this._renderer.fadeOutRipple(this);
85415
    };
85416
    return RippleRef;
85417
}());
85418
 
85419
/**
85420
 * @fileoverview added by tsickle
85421
 * @suppress {checkTypes} checked by tsc
85422
 */
85423
/**
85424
 * Default ripple animation configuration for ripples without an explicit
85425
 * animation config specified.
85426
 */
85427
var /** @type {?} */ defaultRippleAnimationConfig = {
85428
    enterDuration: 450,
85429
    exitDuration: 400
85430
};
85431
/**
85432
 * Timeout for ignoring mouse events. Mouse events will be temporary ignored after touch
85433
 * events to avoid synthetic mouse events.
85434
 */
85435
var /** @type {?} */ ignoreMouseEventsTimeout = 800;
85436
/**
85437
 * Helper service that performs DOM manipulations. Not intended to be used outside this module.
85438
 * The constructor takes a reference to the ripple directive's host element and a map of DOM
85439
 * event handlers to be installed on the element that triggers ripple animations.
85440
 * This will eventually become a custom renderer once Angular support exists.
85441
 * \@docs-private
85442
 */
85443
var  /**
85444
 * Helper service that performs DOM manipulations. Not intended to be used outside this module.
85445
 * The constructor takes a reference to the ripple directive's host element and a map of DOM
85446
 * event handlers to be installed on the element that triggers ripple animations.
85447
 * This will eventually become a custom renderer once Angular support exists.
85448
 * \@docs-private
85449
 */
85450
RippleRenderer = /** @class */ (function () {
85451
    function RippleRenderer(_target, _ngZone, elementRef, platform) {
85452
        var _this = this;
85453
        this._target = _target;
85454
        this._ngZone = _ngZone;
85455
        /**
85456
         * Whether the pointer is currently down or not.
85457
         */
85458
        this._isPointerDown = false;
85459
        /**
85460
         * Events to be registered on the trigger element.
85461
         */
85462
        this._triggerEvents = new Map();
85463
        /**
85464
         * Set of currently active ripple references.
85465
         */
85466
        this._activeRipples = new Set();
85467
        /**
85468
         * Options that apply to all the event listeners that are bound by the renderer.
85469
         */
85470
        this._eventOptions = Object(_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_5__["supportsPassiveEventListeners"])() ? (/** @type {?} */ ({ passive: true })) : false;
85471
        /**
85472
         * Function being called whenever the trigger is being pressed using mouse.
85473
         */
85474
        this.onMousedown = function (event) {
85475
            var /** @type {?} */ isSyntheticEvent = _this._lastTouchStartEvent &&
85476
                Date.now() < _this._lastTouchStartEvent + ignoreMouseEventsTimeout;
85477
            if (!_this._target.rippleDisabled && !isSyntheticEvent) {
85478
                _this._isPointerDown = true;
85479
                _this.fadeInRipple(event.clientX, event.clientY, _this._target.rippleConfig);
85480
            }
85481
        };
85482
        /**
85483
         * Function being called whenever the trigger is being pressed using touch.
85484
         */
85485
        this.onTouchStart = function (event) {
85486
            if (!_this._target.rippleDisabled) {
85487
                // Some browsers fire mouse events after a `touchstart` event. Those synthetic mouse
85488
                // events will launch a second ripple if we don't ignore mouse events for a specific
85489
                // time after a touchstart event.
85490
                // Some browsers fire mouse events after a `touchstart` event. Those synthetic mouse
85491
                // events will launch a second ripple if we don't ignore mouse events for a specific
85492
                // time after a touchstart event.
85493
                _this._lastTouchStartEvent = Date.now();
85494
                _this._isPointerDown = true;
85495
                _this.fadeInRipple(event.touches[0].clientX, event.touches[0].clientY, _this._target.rippleConfig);
85496
            }
85497
        };
85498
        /**
85499
         * Function being called whenever the trigger is being released.
85500
         */
85501
        this.onPointerUp = function () {
85502
            if (!_this._isPointerDown) {
85503
                return;
85504
            }
85505
            _this._isPointerDown = false;
85506
            // Fade-out all ripples that are visible and not persistent.
85507
            // Fade-out all ripples that are visible and not persistent.
85508
            _this._activeRipples.forEach(function (ripple) {
85509
                // By default, only ripples that are completely visible will fade out on pointer release.
85510
                // If the `terminateOnPointerUp` option is set, ripples that still fade in will also fade out.
85511
                var /** @type {?} */ isVisible = ripple.state === RippleState.VISIBLE ||
85512
                    ripple.config.terminateOnPointerUp && ripple.state === RippleState.FADING_IN;
85513
                if (!ripple.config.persistent && isVisible) {
85514
                    ripple.fadeOut();
85515
                }
85516
            });
85517
        };
85518
        // Only do anything if we're on the browser.
85519
        if (platform.isBrowser) {
85520
            this._containerElement = elementRef.nativeElement;
85521
            // Specify events which need to be registered on the trigger.
85522
            this._triggerEvents.set('mousedown', this.onMousedown);
85523
            this._triggerEvents.set('mouseup', this.onPointerUp);
85524
            this._triggerEvents.set('mouseleave', this.onPointerUp);
85525
            this._triggerEvents.set('touchstart', this.onTouchStart);
85526
            this._triggerEvents.set('touchend', this.onPointerUp);
85527
        }
85528
    }
85529
    /**
85530
     * Fades in a ripple at the given coordinates.
85531
     * @param x Coordinate within the element, along the X axis at which to start the ripple.
85532
     * @param y Coordinate within the element, along the Y axis at which to start the ripple.
85533
     * @param config Extra ripple options.
85534
     */
85535
    /**
85536
     * Fades in a ripple at the given coordinates.
85537
     * @param {?} x Coordinate within the element, along the X axis at which to start the ripple.
85538
     * @param {?} y Coordinate within the element, along the Y axis at which to start the ripple.
85539
     * @param {?=} config Extra ripple options.
85540
     * @return {?}
85541
     */
85542
    RippleRenderer.prototype.fadeInRipple = /**
85543
     * Fades in a ripple at the given coordinates.
85544
     * @param {?} x Coordinate within the element, along the X axis at which to start the ripple.
85545
     * @param {?} y Coordinate within the element, along the Y axis at which to start the ripple.
85546
     * @param {?=} config Extra ripple options.
85547
     * @return {?}
85548
     */
85549
    function (x, y, config) {
85550
        var _this = this;
85551
        if (config === void 0) { config = {}; }
85552
        var /** @type {?} */ containerRect = this._containerRect =
85553
            this._containerRect || this._containerElement.getBoundingClientRect();
85554
        var /** @type {?} */ animationConfig = Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__assign"])({}, defaultRippleAnimationConfig, config.animation);
85555
        if (config.centered) {
85556
            x = containerRect.left + containerRect.width / 2;
85557
            y = containerRect.top + containerRect.height / 2;
85558
        }
85559
        var /** @type {?} */ radius = config.radius || distanceToFurthestCorner(x, y, containerRect);
85560
        var /** @type {?} */ offsetX = x - containerRect.left;
85561
        var /** @type {?} */ offsetY = y - containerRect.top;
85562
        var /** @type {?} */ duration = animationConfig.enterDuration / (config.speedFactor || 1);
85563
        var /** @type {?} */ ripple = document.createElement('div');
85564
        ripple.classList.add('mat-ripple-element');
85565
        ripple.style.left = offsetX - radius + "px";
85566
        ripple.style.top = offsetY - radius + "px";
85567
        ripple.style.height = radius * 2 + "px";
85568
        ripple.style.width = radius * 2 + "px";
85569
        // If the color is not set, the default CSS color will be used.
85570
        ripple.style.backgroundColor = config.color || null;
85571
        ripple.style.transitionDuration = duration + "ms";
85572
        this._containerElement.appendChild(ripple);
85573
        // By default the browser does not recalculate the styles of dynamically created
85574
        // ripple elements. This is critical because then the `scale` would not animate properly.
85575
        enforceStyleRecalculation(ripple);
85576
        ripple.style.transform = 'scale(1)';
85577
        // Exposed reference to the ripple that will be returned.
85578
        var /** @type {?} */ rippleRef = new RippleRef(this, ripple, config);
85579
        rippleRef.state = RippleState.FADING_IN;
85580
        // Add the ripple reference to the list of all active ripples.
85581
        this._activeRipples.add(rippleRef);
85582
        if (!config.persistent) {
85583
            this._mostRecentTransientRipple = rippleRef;
85584
        }
85585
        // Wait for the ripple element to be completely faded in.
85586
        // Once it's faded in, the ripple can be hidden immediately if the mouse is released.
85587
        this.runTimeoutOutsideZone(function () {
85588
            var /** @type {?} */ isMostRecentTransientRipple = rippleRef === _this._mostRecentTransientRipple;
85589
            rippleRef.state = RippleState.VISIBLE;
85590
            // When the timer runs out while the user has kept their pointer down, we want to
85591
            // keep only the persistent ripples and the latest transient ripple. We do this,
85592
            // because we don't want stacked transient ripples to appear after their enter
85593
            // animation has finished.
85594
            if (!config.persistent && (!isMostRecentTransientRipple || !_this._isPointerDown)) {
85595
                rippleRef.fadeOut();
85596
            }
85597
        }, duration);
85598
        return rippleRef;
85599
    };
85600
    /** Fades out a ripple reference. */
85601
    /**
85602
     * Fades out a ripple reference.
85603
     * @param {?} rippleRef
85604
     * @return {?}
85605
     */
85606
    RippleRenderer.prototype.fadeOutRipple = /**
85607
     * Fades out a ripple reference.
85608
     * @param {?} rippleRef
85609
     * @return {?}
85610
     */
85611
    function (rippleRef) {
85612
        var /** @type {?} */ wasActive = this._activeRipples.delete(rippleRef);
85613
        if (rippleRef === this._mostRecentTransientRipple) {
85614
            this._mostRecentTransientRipple = null;
85615
        }
85616
        // Clear out the cached bounding rect if we have no more ripples.
85617
        if (!this._activeRipples.size) {
85618
            this._containerRect = null;
85619
        }
85620
        // For ripples that are not active anymore, don't re-un the fade-out animation.
85621
        if (!wasActive) {
85622
            return;
85623
        }
85624
        var /** @type {?} */ rippleEl = rippleRef.element;
85625
        var /** @type {?} */ animationConfig = Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__assign"])({}, defaultRippleAnimationConfig, rippleRef.config.animation);
85626
        rippleEl.style.transitionDuration = animationConfig.exitDuration + "ms";
85627
        rippleEl.style.opacity = '0';
85628
        rippleRef.state = RippleState.FADING_OUT;
85629
        // Once the ripple faded out, the ripple can be safely removed from the DOM.
85630
        this.runTimeoutOutsideZone(function () {
85631
            rippleRef.state = RippleState.HIDDEN; /** @type {?} */
85632
            ((rippleEl.parentNode)).removeChild(rippleEl);
85633
        }, animationConfig.exitDuration);
85634
    };
85635
    /** Fades out all currently active ripples. */
85636
    /**
85637
     * Fades out all currently active ripples.
85638
     * @return {?}
85639
     */
85640
    RippleRenderer.prototype.fadeOutAll = /**
85641
     * Fades out all currently active ripples.
85642
     * @return {?}
85643
     */
85644
    function () {
85645
        this._activeRipples.forEach(function (ripple) { return ripple.fadeOut(); });
85646
    };
85647
    /** Sets up the trigger event listeners */
85648
    /**
85649
     * Sets up the trigger event listeners
85650
     * @param {?} element
85651
     * @return {?}
85652
     */
85653
    RippleRenderer.prototype.setupTriggerEvents = /**
85654
     * Sets up the trigger event listeners
85655
     * @param {?} element
85656
     * @return {?}
85657
     */
85658
    function (element) {
85659
        var _this = this;
85660
        if (!element || element === this._triggerElement) {
85661
            return;
85662
        }
85663
        // Remove all previously registered event listeners from the trigger element.
85664
        this._removeTriggerEvents();
85665
        this._ngZone.runOutsideAngular(function () {
85666
            _this._triggerEvents.forEach(function (fn, type) {
85667
                return element.addEventListener(type, fn, _this._eventOptions);
85668
            });
85669
        });
85670
        this._triggerElement = element;
85671
    };
85672
    /**
85673
     * Runs a timeout outside of the Angular zone to avoid triggering the change detection.
85674
     * @param {?} fn
85675
     * @param {?=} delay
85676
     * @return {?}
85677
     */
85678
    RippleRenderer.prototype.runTimeoutOutsideZone = /**
85679
     * Runs a timeout outside of the Angular zone to avoid triggering the change detection.
85680
     * @param {?} fn
85681
     * @param {?=} delay
85682
     * @return {?}
85683
     */
85684
    function (fn, delay) {
85685
        if (delay === void 0) { delay = 0; }
85686
        this._ngZone.runOutsideAngular(function () { return setTimeout(fn, delay); });
85687
    };
85688
    /** Removes previously registered event listeners from the trigger element. */
85689
    /**
85690
     * Removes previously registered event listeners from the trigger element.
85691
     * @return {?}
85692
     */
85693
    RippleRenderer.prototype._removeTriggerEvents = /**
85694
     * Removes previously registered event listeners from the trigger element.
85695
     * @return {?}
85696
     */
85697
    function () {
85698
        var _this = this;
85699
        if (this._triggerElement) {
85700
            this._triggerEvents.forEach(function (fn, type) {
85701
                /** @type {?} */ ((_this._triggerElement)).removeEventListener(type, fn, _this._eventOptions);
85702
            });
85703
        }
85704
    };
85705
    return RippleRenderer;
85706
}());
85707
/**
85708
 * Enforces a style recalculation of a DOM element by computing its styles.
85709
 * @param {?} element
85710
 * @return {?}
85711
 */
85712
function enforceStyleRecalculation(element) {
85713
    // Enforce a style recalculation by calling `getComputedStyle` and accessing any property.
85714
    // Calling `getPropertyValue` is important to let optimizers know that this is not a noop.
85715
    // See: https://gist.github.com/paulirish/5d52fb081b3570c81e3a
85716
    window.getComputedStyle(element).getPropertyValue('opacity');
85717
}
85718
/**
85719
 * Returns the distance from the point (x, y) to the furthest corner of a rectangle.
85720
 * @param {?} x
85721
 * @param {?} y
85722
 * @param {?} rect
85723
 * @return {?}
85724
 */
85725
function distanceToFurthestCorner(x, y, rect) {
85726
    var /** @type {?} */ distX = Math.max(Math.abs(x - rect.left), Math.abs(x - rect.right));
85727
    var /** @type {?} */ distY = Math.max(Math.abs(y - rect.top), Math.abs(y - rect.bottom));
85728
    return Math.sqrt(distX * distX + distY * distY);
85729
}
85730
 
85731
/**
85732
 * @fileoverview added by tsickle
85733
 * @suppress {checkTypes} checked by tsc
85734
 */
85735
/**
85736
 * Injection token that can be used to specify the global ripple options.
85737
 */
85738
var /** @type {?} */ MAT_RIPPLE_GLOBAL_OPTIONS = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('mat-ripple-global-options');
85739
var MatRipple = /** @class */ (function () {
85740
    function MatRipple(_elementRef, ngZone, platform, globalOptions, animationMode) {
85741
        this._elementRef = _elementRef;
85742
        /**
85743
         * If set, the radius in pixels of foreground ripples when fully expanded. If unset, the radius
85744
         * will be the distance from the center of the ripple to the furthest corner of the host element's
85745
         * bounding rectangle.
85746
         */
85747
        this.radius = 0;
85748
        /**
85749
         * If set, the normal duration of ripple animations is divided by this value. For example,
85750
         * setting it to 0.5 will cause the animations to take twice as long.
85751
         * A changed speedFactor will not modify the fade-out duration of the ripples.
85752
         * @deprecated Use the [matRippleAnimation] binding instead.
85753
         * \@breaking-change 7.0.0
85754
         */
85755
        this.speedFactor = 1;
85756
        this._disabled = false;
85757
        /**
85758
         * Whether ripple directive is initialized and the input bindings are set.
85759
         */
85760
        this._isInitialized = false;
85761
        this._globalOptions = globalOptions || {};
85762
        this._rippleRenderer = new RippleRenderer(this, ngZone, _elementRef, platform);
85763
        if (animationMode === 'NoopAnimations') {
85764
            this._globalOptions.animation = { enterDuration: 0, exitDuration: 0 };
85765
        }
85766
    }
85767
    Object.defineProperty(MatRipple.prototype, "disabled", {
85768
        get: /**
85769
         * Whether click events will not trigger the ripple. Ripples can be still launched manually
85770
         * by using the `launch()` method.
85771
         * @return {?}
85772
         */
85773
        function () { return this._disabled; },
85774
        set: /**
85775
         * @param {?} value
85776
         * @return {?}
85777
         */
85778
        function (value) {
85779
            this._disabled = value;
85780
            this._setupTriggerEventsIfEnabled();
85781
        },
85782
        enumerable: true,
85783
        configurable: true
85784
    });
85785
    Object.defineProperty(MatRipple.prototype, "trigger", {
85786
        get: /**
85787
         * The element that triggers the ripple when click events are received.
85788
         * Defaults to the directive's host element.
85789
         * @return {?}
85790
         */
85791
        function () { return this._trigger || this._elementRef.nativeElement; },
85792
        set: /**
85793
         * @param {?} trigger
85794
         * @return {?}
85795
         */
85796
        function (trigger) {
85797
            this._trigger = trigger;
85798
            this._setupTriggerEventsIfEnabled();
85799
        },
85800
        enumerable: true,
85801
        configurable: true
85802
    });
85803
    /**
85804
     * @return {?}
85805
     */
85806
    MatRipple.prototype.ngOnInit = /**
85807
     * @return {?}
85808
     */
85809
    function () {
85810
        this._isInitialized = true;
85811
        this._setupTriggerEventsIfEnabled();
85812
    };
85813
    /**
85814
     * @return {?}
85815
     */
85816
    MatRipple.prototype.ngOnDestroy = /**
85817
     * @return {?}
85818
     */
85819
    function () {
85820
        this._rippleRenderer._removeTriggerEvents();
85821
    };
85822
    /** Fades out all currently showing ripple elements. */
85823
    /**
85824
     * Fades out all currently showing ripple elements.
85825
     * @return {?}
85826
     */
85827
    MatRipple.prototype.fadeOutAll = /**
85828
     * Fades out all currently showing ripple elements.
85829
     * @return {?}
85830
     */
85831
    function () {
85832
        this._rippleRenderer.fadeOutAll();
85833
    };
85834
    Object.defineProperty(MatRipple.prototype, "rippleConfig", {
85835
        /** Ripple configuration from the directive's input values. */
85836
        get: /**
85837
         * Ripple configuration from the directive's input values.
85838
         * @return {?}
85839
         */
85840
        function () {
85841
            return {
85842
                centered: this.centered,
85843
                radius: this.radius,
85844
                color: this.color,
85845
                animation: Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__assign"])({}, this._globalOptions.animation, this.animation),
85846
                terminateOnPointerUp: this._globalOptions.terminateOnPointerUp,
85847
                speedFactor: this.speedFactor * (this._globalOptions.baseSpeedFactor || 1),
85848
            };
85849
        },
85850
        enumerable: true,
85851
        configurable: true
85852
    });
85853
    Object.defineProperty(MatRipple.prototype, "rippleDisabled", {
85854
        /** Whether ripples on pointer-down are disabled or not. */
85855
        get: /**
85856
         * Whether ripples on pointer-down are disabled or not.
85857
         * @return {?}
85858
         */
85859
        function () {
85860
            return this.disabled || !!this._globalOptions.disabled;
85861
        },
85862
        enumerable: true,
85863
        configurable: true
85864
    });
85865
    /**
85866
     * Sets up the the trigger event listeners if ripples are enabled.
85867
     * @return {?}
85868
     */
85869
    MatRipple.prototype._setupTriggerEventsIfEnabled = /**
85870
     * Sets up the the trigger event listeners if ripples are enabled.
85871
     * @return {?}
85872
     */
85873
    function () {
85874
        if (!this.disabled && this._isInitialized) {
85875
            this._rippleRenderer.setupTriggerEvents(this.trigger);
85876
        }
85877
    };
85878
    /** Launches a manual ripple at the specified coordinated or just by the ripple config. */
85879
    /**
85880
     * Launches a manual ripple at the specified coordinated or just by the ripple config.
85881
     * @param {?} configOrX
85882
     * @param {?=} y
85883
     * @param {?=} config
85884
     * @return {?}
85885
     */
85886
    MatRipple.prototype.launch = /**
85887
     * Launches a manual ripple at the specified coordinated or just by the ripple config.
85888
     * @param {?} configOrX
85889
     * @param {?=} y
85890
     * @param {?=} config
85891
     * @return {?}
85892
     */
85893
    function (configOrX, y, config) {
85894
        if (y === void 0) { y = 0; }
85895
        if (typeof configOrX === 'number') {
85896
            return this._rippleRenderer.fadeInRipple(configOrX, y, Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__assign"])({}, this.rippleConfig, config));
85897
        }
85898
        else {
85899
            return this._rippleRenderer.fadeInRipple(0, 0, Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__assign"])({}, this.rippleConfig, configOrX));
85900
        }
85901
    };
85902
    MatRipple.decorators = [
85903
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
85904
                    selector: '[mat-ripple], [matRipple]',
85905
                    exportAs: 'matRipple',
85906
                    host: {
85907
                        'class': 'mat-ripple',
85908
                        '[class.mat-ripple-unbounded]': 'unbounded'
85909
                    }
85910
                },] },
85911
    ];
85912
    /** @nocollapse */
85913
    MatRipple.ctorParameters = function () { return [
85914
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
85915
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], },
85916
        { type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_5__["Platform"], },
85917
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [MAT_RIPPLE_GLOBAL_OPTIONS,] },] },
85918
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_7__["ANIMATION_MODULE_TYPE"],] },] },
85919
    ]; };
85920
    MatRipple.propDecorators = {
85921
        "color": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['matRippleColor',] },],
85922
        "unbounded": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['matRippleUnbounded',] },],
85923
        "centered": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['matRippleCentered',] },],
85924
        "radius": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['matRippleRadius',] },],
85925
        "speedFactor": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['matRippleSpeedFactor',] },],
85926
        "animation": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['matRippleAnimation',] },],
85927
        "disabled": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['matRippleDisabled',] },],
85928
        "trigger": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['matRippleTrigger',] },],
85929
    };
85930
    return MatRipple;
85931
}());
85932
 
85933
/**
85934
 * @fileoverview added by tsickle
85935
 * @suppress {checkTypes} checked by tsc
85936
 */
85937
var MatRippleModule = /** @class */ (function () {
85938
    function MatRippleModule() {
85939
    }
85940
    MatRippleModule.decorators = [
85941
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
85942
                    imports: [MatCommonModule, _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_5__["PlatformModule"]],
85943
                    exports: [MatRipple, MatCommonModule],
85944
                    declarations: [MatRipple],
85945
                },] },
85946
    ];
85947
    return MatRippleModule;
85948
}());
85949
 
85950
/**
85951
 * @fileoverview added by tsickle
85952
 * @suppress {checkTypes} checked by tsc
85953
 */
85954
/**
85955
 * Component that shows a simplified checkbox without including any kind of "real" checkbox.
85956
 * Meant to be used when the checkbox is purely decorative and a large number of them will be
85957
 * included, such as for the options in a multi-select. Uses no SVGs or complex animations.
85958
 * Note that theming is meant to be handled by the parent element, e.g.
85959
 * `mat-primary .mat-pseudo-checkbox`.
85960
 *
85961
 * Note that this component will be completely invisible to screen-reader users. This is *not*
85962
 * interchangeable with `<mat-checkbox>` and should *not* be used if the user would directly
85963
 * interact with the checkbox. The pseudo-checkbox should only be used as an implementation detail
85964
 * of more complex components that appropriately handle selected / checked state.
85965
 * \@docs-private
85966
 */
85967
var MatPseudoCheckbox = /** @class */ (function () {
85968
    function MatPseudoCheckbox(_animationMode) {
85969
        this._animationMode = _animationMode;
85970
        /**
85971
         * Display state of the checkbox.
85972
         */
85973
        this.state = 'unchecked';
85974
        /**
85975
         * Whether the checkbox is disabled.
85976
         */
85977
        this.disabled = false;
85978
    }
85979
    MatPseudoCheckbox.decorators = [
85980
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
85981
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
85982
                    selector: 'mat-pseudo-checkbox',
85983
                    styles: [".mat-pseudo-checkbox{width:20px;height:20px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0,0,.2,.1),background-color 90ms cubic-bezier(0,0,.2,.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:'';border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0,0,.2,.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border-color:transparent}._mat-animation-noopable.mat-pseudo-checkbox{transition:none;animation:none}._mat-animation-noopable.mat-pseudo-checkbox::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:7px;left:0;width:16px;opacity:1}.mat-pseudo-checkbox-checked::after{top:3px;left:1px;width:12px;height:5px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1}"],
85984
                    template: '',
85985
                    host: {
85986
                        'class': 'mat-pseudo-checkbox',
85987
                        '[class.mat-pseudo-checkbox-indeterminate]': 'state === "indeterminate"',
85988
                        '[class.mat-pseudo-checkbox-checked]': 'state === "checked"',
85989
                        '[class.mat-pseudo-checkbox-disabled]': 'disabled',
85990
                        '[class._mat-animation-noopable]': '_animationMode === "NoopAnimations"',
85991
                    },
85992
                },] },
85993
    ];
85994
    /** @nocollapse */
85995
    MatPseudoCheckbox.ctorParameters = function () { return [
85996
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_7__["ANIMATION_MODULE_TYPE"],] },] },
85997
    ]; };
85998
    MatPseudoCheckbox.propDecorators = {
85999
        "state": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
86000
        "disabled": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
86001
    };
86002
    return MatPseudoCheckbox;
86003
}());
86004
 
86005
/**
86006
 * @fileoverview added by tsickle
86007
 * @suppress {checkTypes} checked by tsc
86008
 */
86009
var MatPseudoCheckboxModule = /** @class */ (function () {
86010
    function MatPseudoCheckboxModule() {
86011
    }
86012
    MatPseudoCheckboxModule.decorators = [
86013
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
86014
                    exports: [MatPseudoCheckbox],
86015
                    declarations: [MatPseudoCheckbox]
86016
                },] },
86017
    ];
86018
    return MatPseudoCheckboxModule;
86019
}());
86020
 
86021
/**
86022
 * @fileoverview added by tsickle
86023
 * @suppress {checkTypes} checked by tsc
86024
 */
86025
/**
86026
 * \@docs-private
86027
 */
86028
var  /**
86029
 * \@docs-private
86030
 */
86031
MatOptgroupBase = /** @class */ (function () {
86032
    function MatOptgroupBase() {
86033
    }
86034
    return MatOptgroupBase;
86035
}());
86036
var /** @type {?} */ _MatOptgroupMixinBase = mixinDisabled(MatOptgroupBase);
86037
// Counter for unique group ids.
86038
var /** @type {?} */ _uniqueOptgroupIdCounter = 0;
86039
/**
86040
 * Component that is used to group instances of `mat-option`.
86041
 */
86042
var MatOptgroup = /** @class */ (function (_super) {
86043
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(MatOptgroup, _super);
86044
    function MatOptgroup() {
86045
        var _this = _super !== null && _super.apply(this, arguments) || this;
86046
        /**
86047
         * Unique id for the underlying label.
86048
         */
86049
        _this._labelId = "mat-optgroup-label-" + _uniqueOptgroupIdCounter++;
86050
        return _this;
86051
    }
86052
    MatOptgroup.decorators = [
86053
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-optgroup',
86054
                    exportAs: 'matOptgroup',
86055
                    template: "<label class=\"mat-optgroup-label\" [id]=\"_labelId\">{{ label }}</label><ng-content select=\"mat-option, ng-container\"></ng-content>",
86056
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
86057
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
86058
                    inputs: ['disabled'],
86059
                    styles: [".mat-optgroup-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup-label[disabled]{cursor:default}[dir=rtl] .mat-optgroup-label{text-align:right}.mat-optgroup-label .mat-icon{margin-right:16px;vertical-align:middle}.mat-optgroup-label .mat-icon svg{vertical-align:top}[dir=rtl] .mat-optgroup-label .mat-icon{margin-left:16px;margin-right:0}"],
86060
                    host: {
86061
                        'class': 'mat-optgroup',
86062
                        'role': 'group',
86063
                        '[class.mat-optgroup-disabled]': 'disabled',
86064
                        '[attr.aria-disabled]': 'disabled.toString()',
86065
                        '[attr.aria-labelledby]': '_labelId',
86066
                    }
86067
                },] },
86068
    ];
86069
    /** @nocollapse */
86070
    MatOptgroup.propDecorators = {
86071
        "label": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
86072
    };
86073
    return MatOptgroup;
86074
}(_MatOptgroupMixinBase));
86075
 
86076
/**
86077
 * @fileoverview added by tsickle
86078
 * @suppress {checkTypes} checked by tsc
86079
 */
86080
/**
86081
 * Option IDs need to be unique across components, so this counter exists outside of
86082
 * the component definition.
86083
 */
86084
var /** @type {?} */ _uniqueIdCounter = 0;
86085
/**
86086
 * Event object emitted by MatOption when selected or deselected.
86087
 */
86088
var  /**
86089
 * Event object emitted by MatOption when selected or deselected.
86090
 */
86091
MatOptionSelectionChange = /** @class */ (function () {
86092
    function MatOptionSelectionChange(source, isUserInput) {
86093
        if (isUserInput === void 0) { isUserInput = false; }
86094
        this.source = source;
86095
        this.isUserInput = isUserInput;
86096
    }
86097
    return MatOptionSelectionChange;
86098
}());
86099
/**
86100
 * Injection token used to provide the parent component to options.
86101
 */
86102
var /** @type {?} */ MAT_OPTION_PARENT_COMPONENT = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('MAT_OPTION_PARENT_COMPONENT');
86103
/**
86104
 * Single option inside of a `<mat-select>` element.
86105
 */
86106
var MatOption = /** @class */ (function () {
86107
    function MatOption(_element, _changeDetectorRef, _parent, group) {
86108
        this._element = _element;
86109
        this._changeDetectorRef = _changeDetectorRef;
86110
        this._parent = _parent;
86111
        this.group = group;
86112
        this._selected = false;
86113
        this._active = false;
86114
        this._disabled = false;
86115
        this._id = "mat-option-" + _uniqueIdCounter++;
86116
        this._mostRecentViewValue = '';
86117
        /**
86118
         * Event emitted when the option is selected or deselected.
86119
         */
86120
        this.onSelectionChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
86121
        /**
86122
         * Emits when the state of the option changes and any parents have to be notified.
86123
         */
86124
        this._stateChanges = new rxjs__WEBPACK_IMPORTED_MODULE_4__["Subject"]();
86125
    }
86126
    Object.defineProperty(MatOption.prototype, "multiple", {
86127
        /** Whether the wrapping component is in multiple selection mode. */
86128
        get: /**
86129
         * Whether the wrapping component is in multiple selection mode.
86130
         * @return {?}
86131
         */
86132
        function () { return this._parent && this._parent.multiple; },
86133
        enumerable: true,
86134
        configurable: true
86135
    });
86136
    Object.defineProperty(MatOption.prototype, "id", {
86137
        /** The unique ID of the option. */
86138
        get: /**
86139
         * The unique ID of the option.
86140
         * @return {?}
86141
         */
86142
        function () { return this._id; },
86143
        enumerable: true,
86144
        configurable: true
86145
    });
86146
    Object.defineProperty(MatOption.prototype, "selected", {
86147
        /** Whether or not the option is currently selected. */
86148
        get: /**
86149
         * Whether or not the option is currently selected.
86150
         * @return {?}
86151
         */
86152
        function () { return this._selected; },
86153
        enumerable: true,
86154
        configurable: true
86155
    });
86156
    Object.defineProperty(MatOption.prototype, "disabled", {
86157
        get: /**
86158
         * Whether the option is disabled.
86159
         * @return {?}
86160
         */
86161
        function () { return (this.group && this.group.disabled) || this._disabled; },
86162
        set: /**
86163
         * @param {?} value
86164
         * @return {?}
86165
         */
86166
        function (value) { this._disabled = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceBooleanProperty"])(value); },
86167
        enumerable: true,
86168
        configurable: true
86169
    });
86170
    Object.defineProperty(MatOption.prototype, "disableRipple", {
86171
        /** Whether ripples for the option are disabled. */
86172
        get: /**
86173
         * Whether ripples for the option are disabled.
86174
         * @return {?}
86175
         */
86176
        function () { return this._parent && this._parent.disableRipple; },
86177
        enumerable: true,
86178
        configurable: true
86179
    });
86180
    Object.defineProperty(MatOption.prototype, "active", {
86181
        /**
86182
         * Whether or not the option is currently active and ready to be selected.
86183
         * An active option displays styles as if it is focused, but the
86184
         * focus is actually retained somewhere else. This comes in handy
86185
         * for components like autocomplete where focus must remain on the input.
86186
         */
86187
        get: /**
86188
         * Whether or not the option is currently active and ready to be selected.
86189
         * An active option displays styles as if it is focused, but the
86190
         * focus is actually retained somewhere else. This comes in handy
86191
         * for components like autocomplete where focus must remain on the input.
86192
         * @return {?}
86193
         */
86194
        function () {
86195
            return this._active;
86196
        },
86197
        enumerable: true,
86198
        configurable: true
86199
    });
86200
    Object.defineProperty(MatOption.prototype, "viewValue", {
86201
        /**
86202
         * The displayed value of the option. It is necessary to show the selected option in the
86203
         * select's trigger.
86204
         */
86205
        get: /**
86206
         * The displayed value of the option. It is necessary to show the selected option in the
86207
         * select's trigger.
86208
         * @return {?}
86209
         */
86210
        function () {
86211
            // TODO(kara): Add input property alternative for node envs.
86212
            return (this._getHostElement().textContent || '').trim();
86213
        },
86214
        enumerable: true,
86215
        configurable: true
86216
    });
86217
    /** Selects the option. */
86218
    /**
86219
     * Selects the option.
86220
     * @return {?}
86221
     */
86222
    MatOption.prototype.select = /**
86223
     * Selects the option.
86224
     * @return {?}
86225
     */
86226
    function () {
86227
        if (!this._selected) {
86228
            this._selected = true;
86229
            this._changeDetectorRef.markForCheck();
86230
            this._emitSelectionChangeEvent();
86231
        }
86232
    };
86233
    /** Deselects the option. */
86234
    /**
86235
     * Deselects the option.
86236
     * @return {?}
86237
     */
86238
    MatOption.prototype.deselect = /**
86239
     * Deselects the option.
86240
     * @return {?}
86241
     */
86242
    function () {
86243
        if (this._selected) {
86244
            this._selected = false;
86245
            this._changeDetectorRef.markForCheck();
86246
            this._emitSelectionChangeEvent();
86247
        }
86248
    };
86249
    /** Sets focus onto this option. */
86250
    /**
86251
     * Sets focus onto this option.
86252
     * @return {?}
86253
     */
86254
    MatOption.prototype.focus = /**
86255
     * Sets focus onto this option.
86256
     * @return {?}
86257
     */
86258
    function () {
86259
        var /** @type {?} */ element = this._getHostElement();
86260
        if (typeof element.focus === 'function') {
86261
            element.focus();
86262
        }
86263
    };
86264
    /**
86265
     * This method sets display styles on the option to make it appear
86266
     * active. This is used by the ActiveDescendantKeyManager so key
86267
     * events will display the proper options as active on arrow key events.
86268
     */
86269
    /**
86270
     * This method sets display styles on the option to make it appear
86271
     * active. This is used by the ActiveDescendantKeyManager so key
86272
     * events will display the proper options as active on arrow key events.
86273
     * @return {?}
86274
     */
86275
    MatOption.prototype.setActiveStyles = /**
86276
     * This method sets display styles on the option to make it appear
86277
     * active. This is used by the ActiveDescendantKeyManager so key
86278
     * events will display the proper options as active on arrow key events.
86279
     * @return {?}
86280
     */
86281
    function () {
86282
        if (!this._active) {
86283
            this._active = true;
86284
            this._changeDetectorRef.markForCheck();
86285
        }
86286
    };
86287
    /**
86288
     * This method removes display styles on the option that made it appear
86289
     * active. This is used by the ActiveDescendantKeyManager so key
86290
     * events will display the proper options as active on arrow key events.
86291
     */
86292
    /**
86293
     * This method removes display styles on the option that made it appear
86294
     * active. This is used by the ActiveDescendantKeyManager so key
86295
     * events will display the proper options as active on arrow key events.
86296
     * @return {?}
86297
     */
86298
    MatOption.prototype.setInactiveStyles = /**
86299
     * This method removes display styles on the option that made it appear
86300
     * active. This is used by the ActiveDescendantKeyManager so key
86301
     * events will display the proper options as active on arrow key events.
86302
     * @return {?}
86303
     */
86304
    function () {
86305
        if (this._active) {
86306
            this._active = false;
86307
            this._changeDetectorRef.markForCheck();
86308
        }
86309
    };
86310
    /** Gets the label to be used when determining whether the option should be focused. */
86311
    /**
86312
     * Gets the label to be used when determining whether the option should be focused.
86313
     * @return {?}
86314
     */
86315
    MatOption.prototype.getLabel = /**
86316
     * Gets the label to be used when determining whether the option should be focused.
86317
     * @return {?}
86318
     */
86319
    function () {
86320
        return this.viewValue;
86321
    };
86322
    /** Ensures the option is selected when activated from the keyboard. */
86323
    /**
86324
     * Ensures the option is selected when activated from the keyboard.
86325
     * @param {?} event
86326
     * @return {?}
86327
     */
86328
    MatOption.prototype._handleKeydown = /**
86329
     * Ensures the option is selected when activated from the keyboard.
86330
     * @param {?} event
86331
     * @return {?}
86332
     */
86333
    function (event) {
86334
        if (event.keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_8__["ENTER"] || event.keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_8__["SPACE"]) {
86335
            this._selectViaInteraction();
86336
            // Prevent the page from scrolling down and form submits.
86337
            event.preventDefault();
86338
        }
86339
    };
86340
    /**
86341
     * `Selects the option while indicating the selection came from the user. Used to
86342
     * determine if the select's view -> model callback should be invoked.`
86343
     */
86344
    /**
86345
     * `Selects the option while indicating the selection came from the user. Used to
86346
     * determine if the select's view -> model callback should be invoked.`
86347
     * @return {?}
86348
     */
86349
    MatOption.prototype._selectViaInteraction = /**
86350
     * `Selects the option while indicating the selection came from the user. Used to
86351
     * determine if the select's view -> model callback should be invoked.`
86352
     * @return {?}
86353
     */
86354
    function () {
86355
        if (!this.disabled) {
86356
            this._selected = this.multiple ? !this._selected : true;
86357
            this._changeDetectorRef.markForCheck();
86358
            this._emitSelectionChangeEvent(true);
86359
        }
86360
    };
86361
    /** Returns the correct tabindex for the option depending on disabled state. */
86362
    /**
86363
     * Returns the correct tabindex for the option depending on disabled state.
86364
     * @return {?}
86365
     */
86366
    MatOption.prototype._getTabIndex = /**
86367
     * Returns the correct tabindex for the option depending on disabled state.
86368
     * @return {?}
86369
     */
86370
    function () {
86371
        return this.disabled ? '-1' : '0';
86372
    };
86373
    /** Gets the host DOM element. */
86374
    /**
86375
     * Gets the host DOM element.
86376
     * @return {?}
86377
     */
86378
    MatOption.prototype._getHostElement = /**
86379
     * Gets the host DOM element.
86380
     * @return {?}
86381
     */
86382
    function () {
86383
        return this._element.nativeElement;
86384
    };
86385
    /**
86386
     * @return {?}
86387
     */
86388
    MatOption.prototype.ngAfterViewChecked = /**
86389
     * @return {?}
86390
     */
86391
    function () {
86392
        // Since parent components could be using the option's label to display the selected values
86393
        // (e.g. `mat-select`) and they don't have a way of knowing if the option's label has changed
86394
        // we have to check for changes in the DOM ourselves and dispatch an event. These checks are
86395
        // relatively cheap, however we still limit them only to selected options in order to avoid
86396
        // hitting the DOM too often.
86397
        if (this._selected) {
86398
            var /** @type {?} */ viewValue = this.viewValue;
86399
            if (viewValue !== this._mostRecentViewValue) {
86400
                this._mostRecentViewValue = viewValue;
86401
                this._stateChanges.next();
86402
            }
86403
        }
86404
    };
86405
    /**
86406
     * @return {?}
86407
     */
86408
    MatOption.prototype.ngOnDestroy = /**
86409
     * @return {?}
86410
     */
86411
    function () {
86412
        this._stateChanges.complete();
86413
    };
86414
    /**
86415
     * Emits the selection change event.
86416
     * @param {?=} isUserInput
86417
     * @return {?}
86418
     */
86419
    MatOption.prototype._emitSelectionChangeEvent = /**
86420
     * Emits the selection change event.
86421
     * @param {?=} isUserInput
86422
     * @return {?}
86423
     */
86424
    function (isUserInput) {
86425
        if (isUserInput === void 0) { isUserInput = false; }
86426
        this.onSelectionChange.emit(new MatOptionSelectionChange(this, isUserInput));
86427
    };
86428
    MatOption.decorators = [
86429
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-option',
86430
                    exportAs: 'matOption',
86431
                    host: {
86432
                        'role': 'option',
86433
                        '[attr.tabindex]': '_getTabIndex()',
86434
                        '[class.mat-selected]': 'selected',
86435
                        '[class.mat-option-multiple]': 'multiple',
86436
                        '[class.mat-active]': 'active',
86437
                        '[id]': 'id',
86438
                        '[attr.aria-selected]': 'selected.toString()',
86439
                        '[attr.aria-disabled]': 'disabled.toString()',
86440
                        '[class.mat-option-disabled]': 'disabled',
86441
                        '(click)': '_selectViaInteraction()',
86442
                        '(keydown)': '_handleKeydown($event)',
86443
                        'class': 'mat-option',
86444
                    },
86445
                    styles: [".mat-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative;cursor:pointer;outline:0;display:flex;flex-direction:row;max-width:100%;box-sizing:border-box;align-items:center;-webkit-tap-highlight-color:transparent}.mat-option[disabled]{cursor:default}[dir=rtl] .mat-option{text-align:right}.mat-option .mat-icon{margin-right:16px;vertical-align:middle}.mat-option .mat-icon svg{vertical-align:top}[dir=rtl] .mat-option .mat-icon{margin-left:16px;margin-right:0}.mat-option[aria-disabled=true]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:32px}[dir=rtl] .mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:16px;padding-right:32px}@media screen and (-ms-high-contrast:active){.mat-option{margin:0 1px}.mat-option.mat-active{border:solid 1px currentColor;margin:0}}.mat-option-text{display:inline-block;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.mat-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}@media screen and (-ms-high-contrast:active){.mat-option-ripple{opacity:.5}}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}"],
86446
                    template: "<mat-pseudo-checkbox *ngIf=\"multiple\" class=\"mat-option-pseudo-checkbox\" [state]=\"selected ? 'checked' : ''\" [disabled]=\"disabled\"></mat-pseudo-checkbox><span class=\"mat-option-text\"><ng-content></ng-content></span><div class=\"mat-option-ripple\" mat-ripple [matRippleTrigger]=\"_getHostElement()\" [matRippleDisabled]=\"disabled || disableRipple\"></div>",
86447
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
86448
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
86449
                },] },
86450
    ];
86451
    /** @nocollapse */
86452
    MatOption.ctorParameters = function () { return [
86453
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
86454
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"], },
86455
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [MAT_OPTION_PARENT_COMPONENT,] },] },
86456
        { type: MatOptgroup, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
86457
    ]; };
86458
    MatOption.propDecorators = {
86459
        "value": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
86460
        "disabled": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
86461
        "onSelectionChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
86462
    };
86463
    return MatOption;
86464
}());
86465
/**
86466
 * Counts the amount of option group labels that precede the specified option.
86467
 * \@docs-private
86468
 * @param {?} optionIndex Index of the option at which to start counting.
86469
 * @param {?} options Flat list of all of the options.
86470
 * @param {?} optionGroups Flat list of all of the option groups.
86471
 * @return {?}
86472
 */
86473
function _countGroupLabelsBeforeOption(optionIndex, options, optionGroups) {
86474
    if (optionGroups.length) {
86475
        var /** @type {?} */ optionsArray = options.toArray();
86476
        var /** @type {?} */ groups = optionGroups.toArray();
86477
        var /** @type {?} */ groupCounter = 0;
86478
        for (var /** @type {?} */ i = 0; i < optionIndex + 1; i++) {
86479
            if (optionsArray[i].group && optionsArray[i].group === groups[groupCounter]) {
86480
                groupCounter++;
86481
            }
86482
        }
86483
        return groupCounter;
86484
    }
86485
    return 0;
86486
}
86487
/**
86488
 * Determines the position to which to scroll a panel in order for an option to be into view.
86489
 * \@docs-private
86490
 * @param {?} optionIndex Index of the option to be scrolled into the view.
86491
 * @param {?} optionHeight Height of the options.
86492
 * @param {?} currentScrollPosition Current scroll position of the panel.
86493
 * @param {?} panelHeight Height of the panel.
86494
 * @return {?}
86495
 */
86496
function _getOptionScrollPosition(optionIndex, optionHeight, currentScrollPosition, panelHeight) {
86497
    var /** @type {?} */ optionOffset = optionIndex * optionHeight;
86498
    if (optionOffset < currentScrollPosition) {
86499
        return optionOffset;
86500
    }
86501
    if (optionOffset + optionHeight > currentScrollPosition + panelHeight) {
86502
        return Math.max(0, optionOffset - panelHeight + optionHeight);
86503
    }
86504
    return currentScrollPosition;
86505
}
86506
 
86507
/**
86508
 * @fileoverview added by tsickle
86509
 * @suppress {checkTypes} checked by tsc
86510
 */
86511
var MatOptionModule = /** @class */ (function () {
86512
    function MatOptionModule() {
86513
    }
86514
    MatOptionModule.decorators = [
86515
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
86516
                    imports: [MatRippleModule, _angular_common__WEBPACK_IMPORTED_MODULE_9__["CommonModule"], MatPseudoCheckboxModule],
86517
                    exports: [MatOption, MatOptgroup],
86518
                    declarations: [MatOption, MatOptgroup]
86519
                },] },
86520
    ];
86521
    return MatOptionModule;
86522
}());
86523
 
86524
/**
86525
 * @fileoverview added by tsickle
86526
 * @suppress {checkTypes} checked by tsc
86527
 */
86528
/**
86529
 * InjectionToken that can be used to specify the global label options.
86530
 */
86531
var /** @type {?} */ MAT_LABEL_GLOBAL_OPTIONS = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('mat-label-global-options');
86532
 
86533
/**
86534
 * @fileoverview added by tsickle
86535
 * @suppress {checkTypes} checked by tsc
86536
 */
86537
 
86538
/**
86539
 * When constructing a Date, the month is zero-based. This can be confusing, since people are
86540
 * used to seeing them one-based. So we create these aliases to make writing the tests easier.
86541
 */
86542
var /** @type {?} */ JAN = 0, /** @type {?} */ FEB = 1, /** @type {?} */ MAR = 2, /** @type {?} */ APR = 3, /** @type {?} */ MAY = 4, /** @type {?} */ JUN = 5, /** @type {?} */ JUL = 6, /** @type {?} */ AUG = 7, /** @type {?} */ SEP = 8, /** @type {?} */
86543
OCT = 9, /** @type {?} */ NOV = 10, /** @type {?} */ DEC = 11;
86544
 
86545
/**
86546
 * @fileoverview added by tsickle
86547
 * @suppress {checkTypes} checked by tsc
86548
 */
86549
 
86550
/**
86551
 * @fileoverview added by tsickle
86552
 * @suppress {checkTypes} checked by tsc
86553
 */
86554
 
86555
 
86556
//# sourceMappingURL=core.es5.js.map
86557
 
86558
 
86559
/***/ }),
86560
 
86561
/***/ "./node_modules/@angular/material/esm5/datepicker.es5.js":
86562
/*!***************************************************************!*\
86563
  !*** ./node_modules/@angular/material/esm5/datepicker.es5.js ***!
86564
  \***************************************************************/
86565
/*! exports provided: MatDatepickerModule, MatCalendarHeader, MatCalendar, MatCalendarCell, MatCalendarBody, MAT_DATEPICKER_SCROLL_STRATEGY, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER, MatDatepickerContentBase, _MatDatepickerContentMixinBase, MatDatepickerContent, MatDatepicker, matDatepickerAnimations, MAT_DATEPICKER_VALUE_ACCESSOR, MAT_DATEPICKER_VALIDATORS, MatDatepickerInputEvent, MatDatepickerInput, MatDatepickerIntl, MatDatepickerToggleIcon, MatDatepickerToggle, MatMonthView, MatYearView, ɵa34 */
86566
/***/ (function(module, __webpack_exports__, __webpack_require__) {
86567
 
86568
"use strict";
86569
__webpack_require__.r(__webpack_exports__);
86570
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatDatepickerModule", function() { return MatDatepickerModule; });
86571
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCalendarHeader", function() { return MatCalendarHeader; });
86572
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCalendar", function() { return MatCalendar; });
86573
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCalendarCell", function() { return MatCalendarCell; });
86574
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCalendarBody", function() { return MatCalendarBody; });
86575
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_DATEPICKER_SCROLL_STRATEGY", function() { return MAT_DATEPICKER_SCROLL_STRATEGY; });
86576
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY", function() { return MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY; });
86577
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER", function() { return MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER; });
86578
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatDatepickerContentBase", function() { return MatDatepickerContentBase; });
86579
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatDatepickerContentMixinBase", function() { return _MatDatepickerContentMixinBase; });
86580
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatDatepickerContent", function() { return MatDatepickerContent; });
86581
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatDatepicker", function() { return MatDatepicker; });
86582
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matDatepickerAnimations", function() { return matDatepickerAnimations; });
86583
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_DATEPICKER_VALUE_ACCESSOR", function() { return MAT_DATEPICKER_VALUE_ACCESSOR; });
86584
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_DATEPICKER_VALIDATORS", function() { return MAT_DATEPICKER_VALIDATORS; });
86585
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatDatepickerInputEvent", function() { return MatDatepickerInputEvent; });
86586
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatDatepickerInput", function() { return MatDatepickerInput; });
86587
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatDatepickerIntl", function() { return MatDatepickerIntl; });
86588
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatDatepickerToggleIcon", function() { return MatDatepickerToggleIcon; });
86589
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatDatepickerToggle", function() { return MatDatepickerToggle; });
86590
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatMonthView", function() { return MatMonthView; });
86591
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatYearView", function() { return MatYearView; });
86592
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵa34", function() { return MatMultiYearView; });
86593
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
86594
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
86595
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
86596
/* harmony import */ var _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/keycodes */ "./node_modules/@angular/cdk/esm5/keycodes.es5.js");
86597
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
86598
/* harmony import */ var _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/cdk/bidi */ "./node_modules/@angular/cdk/esm5/bidi.es5.js");
86599
/* harmony import */ var _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/cdk/portal */ "./node_modules/@angular/cdk/esm5/portal.es5.js");
86600
/* harmony import */ var _angular_animations__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/animations */ "./node_modules/@angular/animations/fesm5/animations.js");
86601
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
86602
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
86603
/* harmony import */ var _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/cdk/overlay */ "./node_modules/@angular/cdk/esm5/overlay.es5.js");
86604
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
86605
/* harmony import */ var _angular_material_dialog__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/material/dialog */ "./node_modules/@angular/material/esm5/dialog.es5.js");
86606
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
86607
/* harmony import */ var _angular_material_form_field__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @angular/material/form-field */ "./node_modules/@angular/material/esm5/form-field.es5.js");
86608
/* harmony import */ var _angular_material_input__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @angular/material/input */ "./node_modules/@angular/material/esm5/input.es5.js");
86609
/* harmony import */ var _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @angular/cdk/a11y */ "./node_modules/@angular/cdk/esm5/a11y.es5.js");
86610
/* harmony import */ var _angular_material_button__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @angular/material/button */ "./node_modules/@angular/material/esm5/button.es5.js");
86611
/**
86612
 * @license
86613
 * Copyright Google LLC All Rights Reserved.
86614
 *
86615
 * Use of this source code is governed by an MIT-style license that can be
86616
 * found in the LICENSE file at https://angular.io/license
86617
 */
86618
 
86619
 
86620
 
86621
 
86622
 
86623
 
86624
 
86625
 
86626
 
86627
 
86628
 
86629
 
86630
 
86631
 
86632
 
86633
 
86634
 
86635
 
86636
 
86637
/**
86638
 * @fileoverview added by tsickle
86639
 * @suppress {checkTypes} checked by tsc
86640
 */
86641
 
86642
/**
86643
 * \@docs-private
86644
 * @param {?} provider
86645
 * @return {?}
86646
 */
86647
function createMissingDateImplError(provider) {
86648
    return Error("MatDatepicker: No provider found for " + provider + ". You must import one of the following " +
86649
        "modules at your application root: MatNativeDateModule, MatMomentDateModule, or provide a " +
86650
        "custom implementation.");
86651
}
86652
 
86653
/**
86654
 * @fileoverview added by tsickle
86655
 * @suppress {checkTypes} checked by tsc
86656
 */
86657
/**
86658
 * Datepicker data that requires internationalization.
86659
 */
86660
var MatDatepickerIntl = /** @class */ (function () {
86661
    function MatDatepickerIntl() {
86662
        /**
86663
         * Stream that emits whenever the labels here are changed. Use this to notify
86664
         * components if the labels have changed after initialization.
86665
         */
86666
        this.changes = new rxjs__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
86667
        /**
86668
         * A label for the calendar popup (used by screen readers).
86669
         */
86670
        this.calendarLabel = 'Calendar';
86671
        /**
86672
         * A label for the button used to open the calendar popup (used by screen readers).
86673
         */
86674
        this.openCalendarLabel = 'Open calendar';
86675
        /**
86676
         * A label for the previous month button (used by screen readers).
86677
         */
86678
        this.prevMonthLabel = 'Previous month';
86679
        /**
86680
         * A label for the next month button (used by screen readers).
86681
         */
86682
        this.nextMonthLabel = 'Next month';
86683
        /**
86684
         * A label for the previous year button (used by screen readers).
86685
         */
86686
        this.prevYearLabel = 'Previous year';
86687
        /**
86688
         * A label for the next year button (used by screen readers).
86689
         */
86690
        this.nextYearLabel = 'Next year';
86691
        /**
86692
         * A label for the previous multi-year button (used by screen readers).
86693
         */
86694
        this.prevMultiYearLabel = 'Previous 20 years';
86695
        /**
86696
         * A label for the next multi-year button (used by screen readers).
86697
         */
86698
        this.nextMultiYearLabel = 'Next 20 years';
86699
        /**
86700
         * A label for the 'switch to month view' button (used by screen readers).
86701
         */
86702
        this.switchToMonthViewLabel = 'Choose date';
86703
        /**
86704
         * A label for the 'switch to year view' button (used by screen readers).
86705
         */
86706
        this.switchToMultiYearViewLabel = 'Choose month and year';
86707
    }
86708
    MatDatepickerIntl.decorators = [
86709
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"], args: [{ providedIn: 'root' },] },
86710
    ];
86711
    /** @nocollapse */ MatDatepickerIntl.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["defineInjectable"])({ factory: function MatDatepickerIntl_Factory() { return new MatDatepickerIntl(); }, token: MatDatepickerIntl, providedIn: "root" });
86712
    return MatDatepickerIntl;
86713
}());
86714
 
86715
/**
86716
 * @fileoverview added by tsickle
86717
 * @suppress {checkTypes} checked by tsc
86718
 */
86719
/**
86720
 * An internal class that represents the data corresponding to a single calendar cell.
86721
 * \@docs-private
86722
 */
86723
var  /**
86724
 * An internal class that represents the data corresponding to a single calendar cell.
86725
 * \@docs-private
86726
 */
86727
MatCalendarCell = /** @class */ (function () {
86728
    function MatCalendarCell(value, displayValue, ariaLabel, enabled) {
86729
        this.value = value;
86730
        this.displayValue = displayValue;
86731
        this.ariaLabel = ariaLabel;
86732
        this.enabled = enabled;
86733
    }
86734
    return MatCalendarCell;
86735
}());
86736
/**
86737
 * An internal component used to display calendar data in a table.
86738
 * \@docs-private
86739
 */
86740
var MatCalendarBody = /** @class */ (function () {
86741
    function MatCalendarBody(_elementRef, _ngZone) {
86742
        this._elementRef = _elementRef;
86743
        this._ngZone = _ngZone;
86744
        /**
86745
         * The number of columns in the table.
86746
         */
86747
        this.numCols = 7;
86748
        /**
86749
         * Whether to allow selection of disabled cells.
86750
         */
86751
        this.allowDisabledSelection = false;
86752
        /**
86753
         * The cell number of the active cell in the table.
86754
         */
86755
        this.activeCell = 0;
86756
        /**
86757
         * The aspect ratio (width / height) to use for the cells in the table. This aspect ratio will be
86758
         * maintained even as the table resizes.
86759
         */
86760
        this.cellAspectRatio = 1;
86761
        /**
86762
         * Emits when a new value is selected.
86763
         */
86764
        this.selectedValueChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
86765
    }
86766
    /**
86767
     * @param {?} cell
86768
     * @return {?}
86769
     */
86770
    MatCalendarBody.prototype._cellClicked = /**
86771
     * @param {?} cell
86772
     * @return {?}
86773
     */
86774
    function (cell) {
86775
        if (!this.allowDisabledSelection && !cell.enabled) {
86776
            return;
86777
        }
86778
        this.selectedValueChange.emit(cell.value);
86779
    };
86780
    Object.defineProperty(MatCalendarBody.prototype, "_firstRowOffset", {
86781
        /** The number of blank cells to put at the beginning for the first row. */
86782
        get: /**
86783
         * The number of blank cells to put at the beginning for the first row.
86784
         * @return {?}
86785
         */
86786
        function () {
86787
            return this.rows && this.rows.length && this.rows[0].length ?
86788
                this.numCols - this.rows[0].length : 0;
86789
        },
86790
        enumerable: true,
86791
        configurable: true
86792
    });
86793
    /**
86794
     * @param {?} rowIndex
86795
     * @param {?} colIndex
86796
     * @return {?}
86797
     */
86798
    MatCalendarBody.prototype._isActiveCell = /**
86799
     * @param {?} rowIndex
86800
     * @param {?} colIndex
86801
     * @return {?}
86802
     */
86803
    function (rowIndex, colIndex) {
86804
        var /** @type {?} */ cellNumber = rowIndex * this.numCols + colIndex;
86805
        // Account for the fact that the first row may not have as many cells.
86806
        if (rowIndex) {
86807
            cellNumber -= this._firstRowOffset;
86808
        }
86809
        return cellNumber == this.activeCell;
86810
    };
86811
    /** Focuses the active cell after the microtask queue is empty. */
86812
    /**
86813
     * Focuses the active cell after the microtask queue is empty.
86814
     * @return {?}
86815
     */
86816
    MatCalendarBody.prototype._focusActiveCell = /**
86817
     * Focuses the active cell after the microtask queue is empty.
86818
     * @return {?}
86819
     */
86820
    function () {
86821
        var _this = this;
86822
        this._ngZone.runOutsideAngular(function () {
86823
            _this._ngZone.onStable.asObservable().pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["take"])(1)).subscribe(function () {
86824
                _this._elementRef.nativeElement.querySelector('.mat-calendar-body-active').focus();
86825
            });
86826
        });
86827
    };
86828
    MatCalendarBody.decorators = [
86829
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: '[mat-calendar-body]',
86830
                    template: "<tr *ngIf=\"_firstRowOffset < labelMinRequiredCells\" aria-hidden=\"true\"><td class=\"mat-calendar-body-label\" [attr.colspan]=\"numCols\" [style.paddingTop.%]=\"50 * cellAspectRatio / numCols\" [style.paddingBottom.%]=\"50 * cellAspectRatio / numCols\">{{label}}</td></tr><tr *ngFor=\"let row of rows; let rowIndex = index\" role=\"row\"><td *ngIf=\"rowIndex === 0 && _firstRowOffset\" aria-hidden=\"true\" class=\"mat-calendar-body-label\" [attr.colspan]=\"_firstRowOffset\" [style.paddingTop.%]=\"50 * cellAspectRatio / numCols\" [style.paddingBottom.%]=\"50 * cellAspectRatio / numCols\">{{_firstRowOffset >= labelMinRequiredCells ? label : ''}}</td><td *ngFor=\"let item of row; let colIndex = index\" role=\"gridcell\" class=\"mat-calendar-body-cell\" [tabindex]=\"_isActiveCell(rowIndex, colIndex) ? 0 : -1\" [class.mat-calendar-body-disabled]=\"!item.enabled\" [class.mat-calendar-body-active]=\"_isActiveCell(rowIndex, colIndex)\" [attr.aria-label]=\"item.ariaLabel\" [attr.aria-disabled]=\"!item.enabled || null\" [attr.aria-selected]=\"selectedValue === item.value\" (click)=\"_cellClicked(item)\" [style.width.%]=\"100 / numCols\" [style.paddingTop.%]=\"50 * cellAspectRatio / numCols\" [style.paddingBottom.%]=\"50 * cellAspectRatio / numCols\"><div class=\"mat-calendar-body-cell-content\" [class.mat-calendar-body-selected]=\"selectedValue === item.value\" [class.mat-calendar-body-today]=\"todayValue === item.value\">{{item.displayValue}}</div></td></tr>",
86831
                    styles: [".mat-calendar-body{min-width:224px}.mat-calendar-body-label{height:0;line-height:0;text-align:left;padding-left:4.71429%;padding-right:4.71429%}.mat-calendar-body-cell{position:relative;height:0;line-height:0;text-align:center;outline:0;cursor:pointer}.mat-calendar-body-disabled{cursor:default}.mat-calendar-body-cell-content{position:absolute;top:5%;left:5%;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid;border-radius:999px}@media screen and (-ms-high-contrast:active){.mat-calendar-body-cell-content{border:none}}@media screen and (-ms-high-contrast:active){.mat-calendar-body-selected,.mat-datepicker-popup:not(:empty){outline:solid 1px}.mat-calendar-body-today{outline:dotted 1px}}[dir=rtl] .mat-calendar-body-label{text-align:right}"],
86832
                    host: {
86833
                        'class': 'mat-calendar-body',
86834
                        'role': 'grid',
86835
                        'attr.aria-readonly': 'true'
86836
                    },
86837
                    exportAs: 'matCalendarBody',
86838
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
86839
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
86840
                },] },
86841
    ];
86842
    /** @nocollapse */
86843
    MatCalendarBody.ctorParameters = function () { return [
86844
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
86845
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], },
86846
    ]; };
86847
    MatCalendarBody.propDecorators = {
86848
        "label": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
86849
        "rows": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
86850
        "todayValue": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
86851
        "selectedValue": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
86852
        "labelMinRequiredCells": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
86853
        "numCols": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
86854
        "allowDisabledSelection": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
86855
        "activeCell": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
86856
        "cellAspectRatio": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
86857
        "selectedValueChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
86858
    };
86859
    return MatCalendarBody;
86860
}());
86861
 
86862
/**
86863
 * @fileoverview added by tsickle
86864
 * @suppress {checkTypes} checked by tsc
86865
 */
86866
var /** @type {?} */ DAYS_PER_WEEK = 7;
86867
/**
86868
 * An internal component used to display a single month in the datepicker.
86869
 * \@docs-private
86870
 * @template D
86871
 */
86872
var MatMonthView = /** @class */ (function () {
86873
    function MatMonthView(_changeDetectorRef, _dateFormats, _dateAdapter, _dir) {
86874
        this._changeDetectorRef = _changeDetectorRef;
86875
        this._dateFormats = _dateFormats;
86876
        this._dateAdapter = _dateAdapter;
86877
        this._dir = _dir;
86878
        /**
86879
         * Emits when a new date is selected.
86880
         */
86881
        this.selectedChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
86882
        /**
86883
         * Emits when any date is selected.
86884
         */
86885
        this._userSelection = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
86886
        /**
86887
         * Emits when any date is activated.
86888
         */
86889
        this.activeDateChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
86890
        if (!this._dateAdapter) {
86891
            throw createMissingDateImplError('DateAdapter');
86892
        }
86893
        if (!this._dateFormats) {
86894
            throw createMissingDateImplError('MAT_DATE_FORMATS');
86895
        }
86896
        var /** @type {?} */ firstDayOfWeek = this._dateAdapter.getFirstDayOfWeek();
86897
        var /** @type {?} */ narrowWeekdays = this._dateAdapter.getDayOfWeekNames('narrow');
86898
        var /** @type {?} */ longWeekdays = this._dateAdapter.getDayOfWeekNames('long');
86899
        // Rotate the labels for days of the week based on the configured first day of the week.
86900
        var /** @type {?} */ weekdays = longWeekdays.map(function (long, i) {
86901
            return { long: long, narrow: narrowWeekdays[i] };
86902
        });
86903
        this._weekdays = weekdays.slice(firstDayOfWeek).concat(weekdays.slice(0, firstDayOfWeek));
86904
        this._activeDate = this._dateAdapter.today();
86905
    }
86906
    Object.defineProperty(MatMonthView.prototype, "activeDate", {
86907
        get: /**
86908
         * The date to display in this month view (everything other than the month and year is ignored).
86909
         * @return {?}
86910
         */
86911
        function () { return this._activeDate; },
86912
        set: /**
86913
         * @param {?} value
86914
         * @return {?}
86915
         */
86916
        function (value) {
86917
            var /** @type {?} */ oldActiveDate = this._activeDate;
86918
            var /** @type {?} */ validDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value)) || this._dateAdapter.today();
86919
            this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);
86920
            if (!this._hasSameMonthAndYear(oldActiveDate, this._activeDate)) {
86921
                this._init();
86922
            }
86923
        },
86924
        enumerable: true,
86925
        configurable: true
86926
    });
86927
    Object.defineProperty(MatMonthView.prototype, "selected", {
86928
        get: /**
86929
         * The currently selected date.
86930
         * @return {?}
86931
         */
86932
        function () { return this._selected; },
86933
        set: /**
86934
         * @param {?} value
86935
         * @return {?}
86936
         */
86937
        function (value) {
86938
            this._selected = this._getValidDateOrNull(this._dateAdapter.deserialize(value));
86939
            this._selectedDate = this._getDateInCurrentMonth(this._selected);
86940
        },
86941
        enumerable: true,
86942
        configurable: true
86943
    });
86944
    Object.defineProperty(MatMonthView.prototype, "minDate", {
86945
        get: /**
86946
         * The minimum selectable date.
86947
         * @return {?}
86948
         */
86949
        function () { return this._minDate; },
86950
        set: /**
86951
         * @param {?} value
86952
         * @return {?}
86953
         */
86954
        function (value) {
86955
            this._minDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value));
86956
        },
86957
        enumerable: true,
86958
        configurable: true
86959
    });
86960
    Object.defineProperty(MatMonthView.prototype, "maxDate", {
86961
        get: /**
86962
         * The maximum selectable date.
86963
         * @return {?}
86964
         */
86965
        function () { return this._maxDate; },
86966
        set: /**
86967
         * @param {?} value
86968
         * @return {?}
86969
         */
86970
        function (value) {
86971
            this._maxDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value));
86972
        },
86973
        enumerable: true,
86974
        configurable: true
86975
    });
86976
    /**
86977
     * @return {?}
86978
     */
86979
    MatMonthView.prototype.ngAfterContentInit = /**
86980
     * @return {?}
86981
     */
86982
    function () {
86983
        this._init();
86984
    };
86985
    /** Handles when a new date is selected. */
86986
    /**
86987
     * Handles when a new date is selected.
86988
     * @param {?} date
86989
     * @return {?}
86990
     */
86991
    MatMonthView.prototype._dateSelected = /**
86992
     * Handles when a new date is selected.
86993
     * @param {?} date
86994
     * @return {?}
86995
     */
86996
    function (date) {
86997
        if (this._selectedDate != date) {
86998
            var /** @type {?} */ selectedYear = this._dateAdapter.getYear(this.activeDate);
86999
            var /** @type {?} */ selectedMonth = this._dateAdapter.getMonth(this.activeDate);
87000
            var /** @type {?} */ selectedDate = this._dateAdapter.createDate(selectedYear, selectedMonth, date);
87001
            this.selectedChange.emit(selectedDate);
87002
        }
87003
        this._userSelection.emit();
87004
    };
87005
    /** Handles keydown events on the calendar body when calendar is in month view. */
87006
    /**
87007
     * Handles keydown events on the calendar body when calendar is in month view.
87008
     * @param {?} event
87009
     * @return {?}
87010
     */
87011
    MatMonthView.prototype._handleCalendarBodyKeydown = /**
87012
     * Handles keydown events on the calendar body when calendar is in month view.
87013
     * @param {?} event
87014
     * @return {?}
87015
     */
87016
    function (event) {
87017
        // TODO(mmalerba): We currently allow keyboard navigation to disabled dates, but just prevent
87018
        // disabled ones from being selected. This may not be ideal, we should look into whether
87019
        // navigation should skip over disabled dates, and if so, how to implement that efficiently.
87020
        var /** @type {?} */ oldActiveDate = this._activeDate;
87021
        var /** @type {?} */ isRtl = this._isRtl();
87022
        switch (event.keyCode) {
87023
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["LEFT_ARROW"]:
87024
                this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, isRtl ? 1 : -1);
87025
                break;
87026
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["RIGHT_ARROW"]:
87027
                this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, isRtl ? -1 : 1);
87028
                break;
87029
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["UP_ARROW"]:
87030
                this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, -7);
87031
                break;
87032
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["DOWN_ARROW"]:
87033
                this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, 7);
87034
                break;
87035
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["HOME"]:
87036
                this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, 1 - this._dateAdapter.getDate(this._activeDate));
87037
                break;
87038
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["END"]:
87039
                this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, (this._dateAdapter.getNumDaysInMonth(this._activeDate) -
87040
                    this._dateAdapter.getDate(this._activeDate)));
87041
                break;
87042
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["PAGE_UP"]:
87043
                this.activeDate = event.altKey ?
87044
                    this._dateAdapter.addCalendarYears(this._activeDate, -1) :
87045
                    this._dateAdapter.addCalendarMonths(this._activeDate, -1);
87046
                break;
87047
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["PAGE_DOWN"]:
87048
                this.activeDate = event.altKey ?
87049
                    this._dateAdapter.addCalendarYears(this._activeDate, 1) :
87050
                    this._dateAdapter.addCalendarMonths(this._activeDate, 1);
87051
                break;
87052
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["ENTER"]:
87053
                if (!this.dateFilter || this.dateFilter(this._activeDate)) {
87054
                    this._dateSelected(this._dateAdapter.getDate(this._activeDate));
87055
                    this._userSelection.emit();
87056
                    // Prevent unexpected default actions such as form submission.
87057
                    event.preventDefault();
87058
                }
87059
                return;
87060
            default:
87061
                // Don't prevent default or focus active cell on keys that we don't explicitly handle.
87062
                return;
87063
        }
87064
        if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {
87065
            this.activeDateChange.emit(this.activeDate);
87066
        }
87067
        this._focusActiveCell();
87068
        // Prevent unexpected default actions such as form submission.
87069
        event.preventDefault();
87070
    };
87071
    /** Initializes this month view. */
87072
    /**
87073
     * Initializes this month view.
87074
     * @return {?}
87075
     */
87076
    MatMonthView.prototype._init = /**
87077
     * Initializes this month view.
87078
     * @return {?}
87079
     */
87080
    function () {
87081
        this._selectedDate = this._getDateInCurrentMonth(this.selected);
87082
        this._todayDate = this._getDateInCurrentMonth(this._dateAdapter.today());
87083
        this._monthLabel =
87084
            this._dateAdapter.getMonthNames('short')[this._dateAdapter.getMonth(this.activeDate)]
87085
                .toLocaleUpperCase();
87086
        var /** @type {?} */ firstOfMonth = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), this._dateAdapter.getMonth(this.activeDate), 1);
87087
        this._firstWeekOffset =
87088
            (DAYS_PER_WEEK + this._dateAdapter.getDayOfWeek(firstOfMonth) -
87089
                this._dateAdapter.getFirstDayOfWeek()) % DAYS_PER_WEEK;
87090
        this._createWeekCells();
87091
        this._changeDetectorRef.markForCheck();
87092
    };
87093
    /** Focuses the active cell after the microtask queue is empty. */
87094
    /**
87095
     * Focuses the active cell after the microtask queue is empty.
87096
     * @return {?}
87097
     */
87098
    MatMonthView.prototype._focusActiveCell = /**
87099
     * Focuses the active cell after the microtask queue is empty.
87100
     * @return {?}
87101
     */
87102
    function () {
87103
        this._matCalendarBody._focusActiveCell();
87104
    };
87105
    /**
87106
     * Creates MatCalendarCells for the dates in this month.
87107
     * @return {?}
87108
     */
87109
    MatMonthView.prototype._createWeekCells = /**
87110
     * Creates MatCalendarCells for the dates in this month.
87111
     * @return {?}
87112
     */
87113
    function () {
87114
        var /** @type {?} */ daysInMonth = this._dateAdapter.getNumDaysInMonth(this.activeDate);
87115
        var /** @type {?} */ dateNames = this._dateAdapter.getDateNames();
87116
        this._weeks = [[]];
87117
        for (var /** @type {?} */ i = 0, /** @type {?} */ cell = this._firstWeekOffset; i < daysInMonth; i++, cell++) {
87118
            if (cell == DAYS_PER_WEEK) {
87119
                this._weeks.push([]);
87120
                cell = 0;
87121
            }
87122
            var /** @type {?} */ date = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), this._dateAdapter.getMonth(this.activeDate), i + 1);
87123
            var /** @type {?} */ enabled = this._shouldEnableDate(date);
87124
            var /** @type {?} */ ariaLabel = this._dateAdapter.format(date, this._dateFormats.display.dateA11yLabel);
87125
            this._weeks[this._weeks.length - 1]
87126
                .push(new MatCalendarCell(i + 1, dateNames[i], ariaLabel, enabled));
87127
        }
87128
    };
87129
    /**
87130
     * Date filter for the month
87131
     * @param {?} date
87132
     * @return {?}
87133
     */
87134
    MatMonthView.prototype._shouldEnableDate = /**
87135
     * Date filter for the month
87136
     * @param {?} date
87137
     * @return {?}
87138
     */
87139
    function (date) {
87140
        return !!date &&
87141
            (!this.dateFilter || this.dateFilter(date)) &&
87142
            (!this.minDate || this._dateAdapter.compareDate(date, this.minDate) >= 0) &&
87143
            (!this.maxDate || this._dateAdapter.compareDate(date, this.maxDate) <= 0);
87144
    };
87145
    /**
87146
     * Gets the date in this month that the given Date falls on.
87147
     * Returns null if the given Date is in another month.
87148
     * @param {?} date
87149
     * @return {?}
87150
     */
87151
    MatMonthView.prototype._getDateInCurrentMonth = /**
87152
     * Gets the date in this month that the given Date falls on.
87153
     * Returns null if the given Date is in another month.
87154
     * @param {?} date
87155
     * @return {?}
87156
     */
87157
    function (date) {
87158
        return date && this._hasSameMonthAndYear(date, this.activeDate) ?
87159
            this._dateAdapter.getDate(date) : null;
87160
    };
87161
    /**
87162
     * Checks whether the 2 dates are non-null and fall within the same month of the same year.
87163
     * @param {?} d1
87164
     * @param {?} d2
87165
     * @return {?}
87166
     */
87167
    MatMonthView.prototype._hasSameMonthAndYear = /**
87168
     * Checks whether the 2 dates are non-null and fall within the same month of the same year.
87169
     * @param {?} d1
87170
     * @param {?} d2
87171
     * @return {?}
87172
     */
87173
    function (d1, d2) {
87174
        return !!(d1 && d2 && this._dateAdapter.getMonth(d1) == this._dateAdapter.getMonth(d2) &&
87175
            this._dateAdapter.getYear(d1) == this._dateAdapter.getYear(d2));
87176
    };
87177
    /**
87178
     * @param {?} obj The object to check.
87179
     * @return {?} The given object if it is both a date instance and valid, otherwise null.
87180
     */
87181
    MatMonthView.prototype._getValidDateOrNull = /**
87182
     * @param {?} obj The object to check.
87183
     * @return {?} The given object if it is both a date instance and valid, otherwise null.
87184
     */
87185
    function (obj) {
87186
        return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj)) ? obj : null;
87187
    };
87188
    /**
87189
     * Determines whether the user has the RTL layout direction.
87190
     * @return {?}
87191
     */
87192
    MatMonthView.prototype._isRtl = /**
87193
     * Determines whether the user has the RTL layout direction.
87194
     * @return {?}
87195
     */
87196
    function () {
87197
        return this._dir && this._dir.value === 'rtl';
87198
    };
87199
    MatMonthView.decorators = [
87200
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-month-view',
87201
                    template: "<table class=\"mat-calendar-table\"><thead class=\"mat-calendar-table-header\"><tr><th *ngFor=\"let day of _weekdays\" [attr.aria-label]=\"day.long\">{{day.narrow}}</th></tr><tr><th class=\"mat-calendar-table-header-divider\" colspan=\"7\" aria-hidden=\"true\"></th></tr></thead><tbody mat-calendar-body [label]=\"_monthLabel\" [rows]=\"_weeks\" [todayValue]=\"_todayDate\" [selectedValue]=\"_selectedDate\" [labelMinRequiredCells]=\"3\" [activeCell]=\"_dateAdapter.getDate(activeDate) - 1\" (selectedValueChange)=\"_dateSelected($event)\" (keydown)=\"_handleCalendarBodyKeydown($event)\"></tbody></table>",
87202
                    exportAs: 'matMonthView',
87203
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
87204
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush
87205
                },] },
87206
    ];
87207
    /** @nocollapse */
87208
    MatMonthView.ctorParameters = function () { return [
87209
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"], },
87210
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_material_core__WEBPACK_IMPORTED_MODULE_4__["MAT_DATE_FORMATS"],] },] },
87211
        { type: _angular_material_core__WEBPACK_IMPORTED_MODULE_4__["DateAdapter"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
87212
        { type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_5__["Directionality"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
87213
    ]; };
87214
    MatMonthView.propDecorators = {
87215
        "activeDate": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
87216
        "selected": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
87217
        "minDate": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
87218
        "maxDate": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
87219
        "dateFilter": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
87220
        "selectedChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
87221
        "_userSelection": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
87222
        "activeDateChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
87223
        "_matCalendarBody": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: [MatCalendarBody,] },],
87224
    };
87225
    return MatMonthView;
87226
}());
87227
 
87228
/**
87229
 * @fileoverview added by tsickle
87230
 * @suppress {checkTypes} checked by tsc
87231
 */
87232
var /** @type {?} */ yearsPerPage = 24;
87233
var /** @type {?} */ yearsPerRow = 4;
87234
/**
87235
 * An internal component used to display a year selector in the datepicker.
87236
 * \@docs-private
87237
 * @template D
87238
 */
87239
var MatMultiYearView = /** @class */ (function () {
87240
    function MatMultiYearView(_changeDetectorRef, _dateAdapter, _dir) {
87241
        this._changeDetectorRef = _changeDetectorRef;
87242
        this._dateAdapter = _dateAdapter;
87243
        this._dir = _dir;
87244
        /**
87245
         * Emits when a new year is selected.
87246
         */
87247
        this.selectedChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
87248
        /**
87249
         * Emits the selected year. This doesn't imply a change on the selected date
87250
         */
87251
        this.yearSelected = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
87252
        /**
87253
         * Emits when any date is activated.
87254
         */
87255
        this.activeDateChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
87256
        if (!this._dateAdapter) {
87257
            throw createMissingDateImplError('DateAdapter');
87258
        }
87259
        this._activeDate = this._dateAdapter.today();
87260
    }
87261
    Object.defineProperty(MatMultiYearView.prototype, "activeDate", {
87262
        get: /**
87263
         * The date to display in this multi-year view (everything other than the year is ignored).
87264
         * @return {?}
87265
         */
87266
        function () { return this._activeDate; },
87267
        set: /**
87268
         * @param {?} value
87269
         * @return {?}
87270
         */
87271
        function (value) {
87272
            var /** @type {?} */ oldActiveDate = this._activeDate;
87273
            var /** @type {?} */ validDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value)) || this._dateAdapter.today();
87274
            this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);
87275
            if (Math.floor(this._dateAdapter.getYear(oldActiveDate) / yearsPerPage) !=
87276
                Math.floor(this._dateAdapter.getYear(this._activeDate) / yearsPerPage)) {
87277
                this._init();
87278
            }
87279
        },
87280
        enumerable: true,
87281
        configurable: true
87282
    });
87283
    Object.defineProperty(MatMultiYearView.prototype, "selected", {
87284
        get: /**
87285
         * The currently selected date.
87286
         * @return {?}
87287
         */
87288
        function () { return this._selected; },
87289
        set: /**
87290
         * @param {?} value
87291
         * @return {?}
87292
         */
87293
        function (value) {
87294
            this._selected = this._getValidDateOrNull(this._dateAdapter.deserialize(value));
87295
            this._selectedYear = this._selected && this._dateAdapter.getYear(this._selected);
87296
        },
87297
        enumerable: true,
87298
        configurable: true
87299
    });
87300
    Object.defineProperty(MatMultiYearView.prototype, "minDate", {
87301
        get: /**
87302
         * The minimum selectable date.
87303
         * @return {?}
87304
         */
87305
        function () { return this._minDate; },
87306
        set: /**
87307
         * @param {?} value
87308
         * @return {?}
87309
         */
87310
        function (value) {
87311
            this._minDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value));
87312
        },
87313
        enumerable: true,
87314
        configurable: true
87315
    });
87316
    Object.defineProperty(MatMultiYearView.prototype, "maxDate", {
87317
        get: /**
87318
         * The maximum selectable date.
87319
         * @return {?}
87320
         */
87321
        function () { return this._maxDate; },
87322
        set: /**
87323
         * @param {?} value
87324
         * @return {?}
87325
         */
87326
        function (value) {
87327
            this._maxDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value));
87328
        },
87329
        enumerable: true,
87330
        configurable: true
87331
    });
87332
    /**
87333
     * @return {?}
87334
     */
87335
    MatMultiYearView.prototype.ngAfterContentInit = /**
87336
     * @return {?}
87337
     */
87338
    function () {
87339
        this._init();
87340
    };
87341
    /** Initializes this multi-year view. */
87342
    /**
87343
     * Initializes this multi-year view.
87344
     * @return {?}
87345
     */
87346
    MatMultiYearView.prototype._init = /**
87347
     * Initializes this multi-year view.
87348
     * @return {?}
87349
     */
87350
    function () {
87351
        var _this = this;
87352
        this._todayYear = this._dateAdapter.getYear(this._dateAdapter.today());
87353
        var /** @type {?} */ activeYear = this._dateAdapter.getYear(this._activeDate);
87354
        var /** @type {?} */ activeOffset = activeYear % yearsPerPage;
87355
        this._years = [];
87356
        for (var /** @type {?} */ i = 0, /** @type {?} */ row = []; i < yearsPerPage; i++) {
87357
            row.push(activeYear - activeOffset + i);
87358
            if (row.length == yearsPerRow) {
87359
                this._years.push(row.map(function (year) { return _this._createCellForYear(year); }));
87360
                row = [];
87361
            }
87362
        }
87363
        this._changeDetectorRef.markForCheck();
87364
    };
87365
    /** Handles when a new year is selected. */
87366
    /**
87367
     * Handles when a new year is selected.
87368
     * @param {?} year
87369
     * @return {?}
87370
     */
87371
    MatMultiYearView.prototype._yearSelected = /**
87372
     * Handles when a new year is selected.
87373
     * @param {?} year
87374
     * @return {?}
87375
     */
87376
    function (year) {
87377
        this.yearSelected.emit(this._dateAdapter.createDate(year, 0, 1));
87378
        var /** @type {?} */ month = this._dateAdapter.getMonth(this.activeDate);
87379
        var /** @type {?} */ daysInMonth = this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(year, month, 1));
87380
        this.selectedChange.emit(this._dateAdapter.createDate(year, month, Math.min(this._dateAdapter.getDate(this.activeDate), daysInMonth)));
87381
    };
87382
    /** Handles keydown events on the calendar body when calendar is in multi-year view. */
87383
    /**
87384
     * Handles keydown events on the calendar body when calendar is in multi-year view.
87385
     * @param {?} event
87386
     * @return {?}
87387
     */
87388
    MatMultiYearView.prototype._handleCalendarBodyKeydown = /**
87389
     * Handles keydown events on the calendar body when calendar is in multi-year view.
87390
     * @param {?} event
87391
     * @return {?}
87392
     */
87393
    function (event) {
87394
        // TODO(mmalerba): We currently allow keyboard navigation to disabled dates, but just prevent
87395
        // disabled ones from being selected. This may not be ideal, we should look into whether
87396
        // navigation should skip over disabled dates, and if so, how to implement that efficiently.
87397
        var /** @type {?} */ oldActiveDate = this._activeDate;
87398
        var /** @type {?} */ isRtl = this._isRtl();
87399
        switch (event.keyCode) {
87400
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["LEFT_ARROW"]:
87401
                this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, isRtl ? 1 : -1);
87402
                break;
87403
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["RIGHT_ARROW"]:
87404
                this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, isRtl ? -1 : 1);
87405
                break;
87406
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["UP_ARROW"]:
87407
                this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, -yearsPerRow);
87408
                break;
87409
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["DOWN_ARROW"]:
87410
                this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, yearsPerRow);
87411
                break;
87412
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["HOME"]:
87413
                this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, -this._dateAdapter.getYear(this._activeDate) % yearsPerPage);
87414
                break;
87415
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["END"]:
87416
                this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, yearsPerPage - this._dateAdapter.getYear(this._activeDate) % yearsPerPage - 1);
87417
                break;
87418
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["PAGE_UP"]:
87419
                this.activeDate =
87420
                    this._dateAdapter.addCalendarYears(this._activeDate, event.altKey ? -yearsPerPage * 10 : -yearsPerPage);
87421
                break;
87422
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["PAGE_DOWN"]:
87423
                this.activeDate =
87424
                    this._dateAdapter.addCalendarYears(this._activeDate, event.altKey ? yearsPerPage * 10 : yearsPerPage);
87425
                break;
87426
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["ENTER"]:
87427
                this._yearSelected(this._dateAdapter.getYear(this._activeDate));
87428
                break;
87429
            default:
87430
                // Don't prevent default or focus active cell on keys that we don't explicitly handle.
87431
                return;
87432
        }
87433
        if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {
87434
            this.activeDateChange.emit(this.activeDate);
87435
        }
87436
        this._focusActiveCell();
87437
        // Prevent unexpected default actions such as form submission.
87438
        event.preventDefault();
87439
    };
87440
    /**
87441
     * @return {?}
87442
     */
87443
    MatMultiYearView.prototype._getActiveCell = /**
87444
     * @return {?}
87445
     */
87446
    function () {
87447
        return this._dateAdapter.getYear(this.activeDate) % yearsPerPage;
87448
    };
87449
    /** Focuses the active cell after the microtask queue is empty. */
87450
    /**
87451
     * Focuses the active cell after the microtask queue is empty.
87452
     * @return {?}
87453
     */
87454
    MatMultiYearView.prototype._focusActiveCell = /**
87455
     * Focuses the active cell after the microtask queue is empty.
87456
     * @return {?}
87457
     */
87458
    function () {
87459
        this._matCalendarBody._focusActiveCell();
87460
    };
87461
    /**
87462
     * Creates an MatCalendarCell for the given year.
87463
     * @param {?} year
87464
     * @return {?}
87465
     */
87466
    MatMultiYearView.prototype._createCellForYear = /**
87467
     * Creates an MatCalendarCell for the given year.
87468
     * @param {?} year
87469
     * @return {?}
87470
     */
87471
    function (year) {
87472
        var /** @type {?} */ yearName = this._dateAdapter.getYearName(this._dateAdapter.createDate(year, 0, 1));
87473
        return new MatCalendarCell(year, yearName, yearName, this._shouldEnableYear(year));
87474
    };
87475
    /**
87476
     * Whether the given year is enabled.
87477
     * @param {?} year
87478
     * @return {?}
87479
     */
87480
    MatMultiYearView.prototype._shouldEnableYear = /**
87481
     * Whether the given year is enabled.
87482
     * @param {?} year
87483
     * @return {?}
87484
     */
87485
    function (year) {
87486
        // disable if the year is greater than maxDate lower than minDate
87487
        if (year === undefined || year === null ||
87488
            (this.maxDate && year > this._dateAdapter.getYear(this.maxDate)) ||
87489
            (this.minDate && year < this._dateAdapter.getYear(this.minDate))) {
87490
            return false;
87491
        }
87492
        // enable if it reaches here and there's no filter defined
87493
        if (!this.dateFilter) {
87494
            return true;
87495
        }
87496
        var /** @type {?} */ firstOfYear = this._dateAdapter.createDate(year, 0, 1);
87497
        // If any date in the year is enabled count the year as enabled.
87498
        for (var /** @type {?} */ date = firstOfYear; this._dateAdapter.getYear(date) == year; date = this._dateAdapter.addCalendarDays(date, 1)) {
87499
            if (this.dateFilter(date)) {
87500
                return true;
87501
            }
87502
        }
87503
        return false;
87504
    };
87505
    /**
87506
     * @param {?} obj The object to check.
87507
     * @return {?} The given object if it is both a date instance and valid, otherwise null.
87508
     */
87509
    MatMultiYearView.prototype._getValidDateOrNull = /**
87510
     * @param {?} obj The object to check.
87511
     * @return {?} The given object if it is both a date instance and valid, otherwise null.
87512
     */
87513
    function (obj) {
87514
        return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj)) ? obj : null;
87515
    };
87516
    /**
87517
     * Determines whether the user has the RTL layout direction.
87518
     * @return {?}
87519
     */
87520
    MatMultiYearView.prototype._isRtl = /**
87521
     * Determines whether the user has the RTL layout direction.
87522
     * @return {?}
87523
     */
87524
    function () {
87525
        return this._dir && this._dir.value === 'rtl';
87526
    };
87527
    MatMultiYearView.decorators = [
87528
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-multi-year-view',
87529
                    template: "<table class=\"mat-calendar-table\"><thead class=\"mat-calendar-table-header\"><tr><th class=\"mat-calendar-table-header-divider\" colspan=\"4\"></th></tr></thead><tbody mat-calendar-body allowDisabledSelection=\"true\" [rows]=\"_years\" [todayValue]=\"_todayYear\" [selectedValue]=\"_selectedYear\" [numCols]=\"4\" [cellAspectRatio]=\"4 / 7\" [activeCell]=\"_getActiveCell()\" (selectedValueChange)=\"_yearSelected($event)\" (keydown)=\"_handleCalendarBodyKeydown($event)\"></tbody></table>",
87530
                    exportAs: 'matMultiYearView',
87531
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
87532
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush
87533
                },] },
87534
    ];
87535
    /** @nocollapse */
87536
    MatMultiYearView.ctorParameters = function () { return [
87537
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"], },
87538
        { type: _angular_material_core__WEBPACK_IMPORTED_MODULE_4__["DateAdapter"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
87539
        { type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_5__["Directionality"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
87540
    ]; };
87541
    MatMultiYearView.propDecorators = {
87542
        "activeDate": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
87543
        "selected": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
87544
        "minDate": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
87545
        "maxDate": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
87546
        "dateFilter": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
87547
        "selectedChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
87548
        "yearSelected": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
87549
        "activeDateChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
87550
        "_matCalendarBody": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: [MatCalendarBody,] },],
87551
    };
87552
    return MatMultiYearView;
87553
}());
87554
 
87555
/**
87556
 * @fileoverview added by tsickle
87557
 * @suppress {checkTypes} checked by tsc
87558
 */
87559
/**
87560
 * An internal component used to display a single year in the datepicker.
87561
 * \@docs-private
87562
 * @template D
87563
 */
87564
var MatYearView = /** @class */ (function () {
87565
    function MatYearView(_changeDetectorRef, _dateFormats, _dateAdapter, _dir) {
87566
        this._changeDetectorRef = _changeDetectorRef;
87567
        this._dateFormats = _dateFormats;
87568
        this._dateAdapter = _dateAdapter;
87569
        this._dir = _dir;
87570
        /**
87571
         * Emits when a new month is selected.
87572
         */
87573
        this.selectedChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
87574
        /**
87575
         * Emits the selected month. This doesn't imply a change on the selected date
87576
         */
87577
        this.monthSelected = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
87578
        /**
87579
         * Emits when any date is activated.
87580
         */
87581
        this.activeDateChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
87582
        if (!this._dateAdapter) {
87583
            throw createMissingDateImplError('DateAdapter');
87584
        }
87585
        if (!this._dateFormats) {
87586
            throw createMissingDateImplError('MAT_DATE_FORMATS');
87587
        }
87588
        this._activeDate = this._dateAdapter.today();
87589
    }
87590
    Object.defineProperty(MatYearView.prototype, "activeDate", {
87591
        get: /**
87592
         * The date to display in this year view (everything other than the year is ignored).
87593
         * @return {?}
87594
         */
87595
        function () { return this._activeDate; },
87596
        set: /**
87597
         * @param {?} value
87598
         * @return {?}
87599
         */
87600
        function (value) {
87601
            var /** @type {?} */ oldActiveDate = this._activeDate;
87602
            var /** @type {?} */ validDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value)) || this._dateAdapter.today();
87603
            this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);
87604
            if (this._dateAdapter.getYear(oldActiveDate) !== this._dateAdapter.getYear(this._activeDate)) {
87605
                this._init();
87606
            }
87607
        },
87608
        enumerable: true,
87609
        configurable: true
87610
    });
87611
    Object.defineProperty(MatYearView.prototype, "selected", {
87612
        get: /**
87613
         * The currently selected date.
87614
         * @return {?}
87615
         */
87616
        function () { return this._selected; },
87617
        set: /**
87618
         * @param {?} value
87619
         * @return {?}
87620
         */
87621
        function (value) {
87622
            this._selected = this._getValidDateOrNull(this._dateAdapter.deserialize(value));
87623
            this._selectedMonth = this._getMonthInCurrentYear(this._selected);
87624
        },
87625
        enumerable: true,
87626
        configurable: true
87627
    });
87628
    Object.defineProperty(MatYearView.prototype, "minDate", {
87629
        get: /**
87630
         * The minimum selectable date.
87631
         * @return {?}
87632
         */
87633
        function () { return this._minDate; },
87634
        set: /**
87635
         * @param {?} value
87636
         * @return {?}
87637
         */
87638
        function (value) {
87639
            this._minDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value));
87640
        },
87641
        enumerable: true,
87642
        configurable: true
87643
    });
87644
    Object.defineProperty(MatYearView.prototype, "maxDate", {
87645
        get: /**
87646
         * The maximum selectable date.
87647
         * @return {?}
87648
         */
87649
        function () { return this._maxDate; },
87650
        set: /**
87651
         * @param {?} value
87652
         * @return {?}
87653
         */
87654
        function (value) {
87655
            this._maxDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value));
87656
        },
87657
        enumerable: true,
87658
        configurable: true
87659
    });
87660
    /**
87661
     * @return {?}
87662
     */
87663
    MatYearView.prototype.ngAfterContentInit = /**
87664
     * @return {?}
87665
     */
87666
    function () {
87667
        this._init();
87668
    };
87669
    /** Handles when a new month is selected. */
87670
    /**
87671
     * Handles when a new month is selected.
87672
     * @param {?} month
87673
     * @return {?}
87674
     */
87675
    MatYearView.prototype._monthSelected = /**
87676
     * Handles when a new month is selected.
87677
     * @param {?} month
87678
     * @return {?}
87679
     */
87680
    function (month) {
87681
        var /** @type {?} */ normalizedDate = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), month, 1);
87682
        this.monthSelected.emit(normalizedDate);
87683
        var /** @type {?} */ daysInMonth = this._dateAdapter.getNumDaysInMonth(normalizedDate);
87684
        this.selectedChange.emit(this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), month, Math.min(this._dateAdapter.getDate(this.activeDate), daysInMonth)));
87685
    };
87686
    /** Handles keydown events on the calendar body when calendar is in year view. */
87687
    /**
87688
     * Handles keydown events on the calendar body when calendar is in year view.
87689
     * @param {?} event
87690
     * @return {?}
87691
     */
87692
    MatYearView.prototype._handleCalendarBodyKeydown = /**
87693
     * Handles keydown events on the calendar body when calendar is in year view.
87694
     * @param {?} event
87695
     * @return {?}
87696
     */
87697
    function (event) {
87698
        // TODO(mmalerba): We currently allow keyboard navigation to disabled dates, but just prevent
87699
        // disabled ones from being selected. This may not be ideal, we should look into whether
87700
        // navigation should skip over disabled dates, and if so, how to implement that efficiently.
87701
        var /** @type {?} */ oldActiveDate = this._activeDate;
87702
        var /** @type {?} */ isRtl = this._isRtl();
87703
        switch (event.keyCode) {
87704
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["LEFT_ARROW"]:
87705
                this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, isRtl ? 1 : -1);
87706
                break;
87707
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["RIGHT_ARROW"]:
87708
                this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, isRtl ? -1 : 1);
87709
                break;
87710
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["UP_ARROW"]:
87711
                this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, -4);
87712
                break;
87713
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["DOWN_ARROW"]:
87714
                this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, 4);
87715
                break;
87716
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["HOME"]:
87717
                this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, -this._dateAdapter.getMonth(this._activeDate));
87718
                break;
87719
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["END"]:
87720
                this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, 11 - this._dateAdapter.getMonth(this._activeDate));
87721
                break;
87722
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["PAGE_UP"]:
87723
                this.activeDate =
87724
                    this._dateAdapter.addCalendarYears(this._activeDate, event.altKey ? -10 : -1);
87725
                break;
87726
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["PAGE_DOWN"]:
87727
                this.activeDate =
87728
                    this._dateAdapter.addCalendarYears(this._activeDate, event.altKey ? 10 : 1);
87729
                break;
87730
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["ENTER"]:
87731
                this._monthSelected(this._dateAdapter.getMonth(this._activeDate));
87732
                break;
87733
            default:
87734
                // Don't prevent default or focus active cell on keys that we don't explicitly handle.
87735
                return;
87736
        }
87737
        if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {
87738
            this.activeDateChange.emit(this.activeDate);
87739
        }
87740
        this._focusActiveCell();
87741
        // Prevent unexpected default actions such as form submission.
87742
        event.preventDefault();
87743
    };
87744
    /** Initializes this year view. */
87745
    /**
87746
     * Initializes this year view.
87747
     * @return {?}
87748
     */
87749
    MatYearView.prototype._init = /**
87750
     * Initializes this year view.
87751
     * @return {?}
87752
     */
87753
    function () {
87754
        var _this = this;
87755
        this._selectedMonth = this._getMonthInCurrentYear(this.selected);
87756
        this._todayMonth = this._getMonthInCurrentYear(this._dateAdapter.today());
87757
        this._yearLabel = this._dateAdapter.getYearName(this.activeDate);
87758
        var /** @type {?} */ monthNames = this._dateAdapter.getMonthNames('short');
87759
        // First row of months only contains 5 elements so we can fit the year label on the same row.
87760
        this._months = [[0, 1, 2, 3], [4, 5, 6, 7], [8, 9, 10, 11]].map(function (row) {
87761
            return row.map(function (month) { return _this._createCellForMonth(month, monthNames[month]); });
87762
        });
87763
        this._changeDetectorRef.markForCheck();
87764
    };
87765
    /** Focuses the active cell after the microtask queue is empty. */
87766
    /**
87767
     * Focuses the active cell after the microtask queue is empty.
87768
     * @return {?}
87769
     */
87770
    MatYearView.prototype._focusActiveCell = /**
87771
     * Focuses the active cell after the microtask queue is empty.
87772
     * @return {?}
87773
     */
87774
    function () {
87775
        this._matCalendarBody._focusActiveCell();
87776
    };
87777
    /**
87778
     * Gets the month in this year that the given Date falls on.
87779
     * Returns null if the given Date is in another year.
87780
     * @param {?} date
87781
     * @return {?}
87782
     */
87783
    MatYearView.prototype._getMonthInCurrentYear = /**
87784
     * Gets the month in this year that the given Date falls on.
87785
     * Returns null if the given Date is in another year.
87786
     * @param {?} date
87787
     * @return {?}
87788
     */
87789
    function (date) {
87790
        return date && this._dateAdapter.getYear(date) == this._dateAdapter.getYear(this.activeDate) ?
87791
            this._dateAdapter.getMonth(date) : null;
87792
    };
87793
    /**
87794
     * Creates an MatCalendarCell for the given month.
87795
     * @param {?} month
87796
     * @param {?} monthName
87797
     * @return {?}
87798
     */
87799
    MatYearView.prototype._createCellForMonth = /**
87800
     * Creates an MatCalendarCell for the given month.
87801
     * @param {?} month
87802
     * @param {?} monthName
87803
     * @return {?}
87804
     */
87805
    function (month, monthName) {
87806
        var /** @type {?} */ ariaLabel = this._dateAdapter.format(this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), month, 1), this._dateFormats.display.monthYearA11yLabel);
87807
        return new MatCalendarCell(month, monthName.toLocaleUpperCase(), ariaLabel, this._shouldEnableMonth(month));
87808
    };
87809
    /**
87810
     * Whether the given month is enabled.
87811
     * @param {?} month
87812
     * @return {?}
87813
     */
87814
    MatYearView.prototype._shouldEnableMonth = /**
87815
     * Whether the given month is enabled.
87816
     * @param {?} month
87817
     * @return {?}
87818
     */
87819
    function (month) {
87820
        var /** @type {?} */ activeYear = this._dateAdapter.getYear(this.activeDate);
87821
        if (month === undefined || month === null ||
87822
            this._isYearAndMonthAfterMaxDate(activeYear, month) ||
87823
            this._isYearAndMonthBeforeMinDate(activeYear, month)) {
87824
            return false;
87825
        }
87826
        if (!this.dateFilter) {
87827
            return true;
87828
        }
87829
        var /** @type {?} */ firstOfMonth = this._dateAdapter.createDate(activeYear, month, 1);
87830
        // If any date in the month is enabled count the month as enabled.
87831
        for (var /** @type {?} */ date = firstOfMonth; this._dateAdapter.getMonth(date) == month; date = this._dateAdapter.addCalendarDays(date, 1)) {
87832
            if (this.dateFilter(date)) {
87833
                return true;
87834
            }
87835
        }
87836
        return false;
87837
    };
87838
    /**
87839
     * Tests whether the combination month/year is after this.maxDate, considering
87840
     * just the month and year of this.maxDate
87841
     * @param {?} year
87842
     * @param {?} month
87843
     * @return {?}
87844
     */
87845
    MatYearView.prototype._isYearAndMonthAfterMaxDate = /**
87846
     * Tests whether the combination month/year is after this.maxDate, considering
87847
     * just the month and year of this.maxDate
87848
     * @param {?} year
87849
     * @param {?} month
87850
     * @return {?}
87851
     */
87852
    function (year, month) {
87853
        if (this.maxDate) {
87854
            var /** @type {?} */ maxYear = this._dateAdapter.getYear(this.maxDate);
87855
            var /** @type {?} */ maxMonth = this._dateAdapter.getMonth(this.maxDate);
87856
            return year > maxYear || (year === maxYear && month > maxMonth);
87857
        }
87858
        return false;
87859
    };
87860
    /**
87861
     * Tests whether the combination month/year is before this.minDate, considering
87862
     * just the month and year of this.minDate
87863
     * @param {?} year
87864
     * @param {?} month
87865
     * @return {?}
87866
     */
87867
    MatYearView.prototype._isYearAndMonthBeforeMinDate = /**
87868
     * Tests whether the combination month/year is before this.minDate, considering
87869
     * just the month and year of this.minDate
87870
     * @param {?} year
87871
     * @param {?} month
87872
     * @return {?}
87873
     */
87874
    function (year, month) {
87875
        if (this.minDate) {
87876
            var /** @type {?} */ minYear = this._dateAdapter.getYear(this.minDate);
87877
            var /** @type {?} */ minMonth = this._dateAdapter.getMonth(this.minDate);
87878
            return year < minYear || (year === minYear && month < minMonth);
87879
        }
87880
        return false;
87881
    };
87882
    /**
87883
     * @param {?} obj The object to check.
87884
     * @return {?} The given object if it is both a date instance and valid, otherwise null.
87885
     */
87886
    MatYearView.prototype._getValidDateOrNull = /**
87887
     * @param {?} obj The object to check.
87888
     * @return {?} The given object if it is both a date instance and valid, otherwise null.
87889
     */
87890
    function (obj) {
87891
        return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj)) ? obj : null;
87892
    };
87893
    /**
87894
     * Determines whether the user has the RTL layout direction.
87895
     * @return {?}
87896
     */
87897
    MatYearView.prototype._isRtl = /**
87898
     * Determines whether the user has the RTL layout direction.
87899
     * @return {?}
87900
     */
87901
    function () {
87902
        return this._dir && this._dir.value === 'rtl';
87903
    };
87904
    MatYearView.decorators = [
87905
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-year-view',
87906
                    template: "<table class=\"mat-calendar-table\"><thead class=\"mat-calendar-table-header\"><tr><th class=\"mat-calendar-table-header-divider\" colspan=\"4\"></th></tr></thead><tbody mat-calendar-body allowDisabledSelection=\"true\" [label]=\"_yearLabel\" [rows]=\"_months\" [todayValue]=\"_todayMonth\" [selectedValue]=\"_selectedMonth\" [labelMinRequiredCells]=\"2\" [numCols]=\"4\" [cellAspectRatio]=\"4 / 7\" [activeCell]=\"_dateAdapter.getMonth(activeDate)\" (selectedValueChange)=\"_monthSelected($event)\" (keydown)=\"_handleCalendarBodyKeydown($event)\"></tbody></table>",
87907
                    exportAs: 'matYearView',
87908
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
87909
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush
87910
                },] },
87911
    ];
87912
    /** @nocollapse */
87913
    MatYearView.ctorParameters = function () { return [
87914
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"], },
87915
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_material_core__WEBPACK_IMPORTED_MODULE_4__["MAT_DATE_FORMATS"],] },] },
87916
        { type: _angular_material_core__WEBPACK_IMPORTED_MODULE_4__["DateAdapter"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
87917
        { type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_5__["Directionality"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
87918
    ]; };
87919
    MatYearView.propDecorators = {
87920
        "activeDate": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
87921
        "selected": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
87922
        "minDate": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
87923
        "maxDate": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
87924
        "dateFilter": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
87925
        "selectedChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
87926
        "monthSelected": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
87927
        "activeDateChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
87928
        "_matCalendarBody": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: [MatCalendarBody,] },],
87929
    };
87930
    return MatYearView;
87931
}());
87932
 
87933
/**
87934
 * @fileoverview added by tsickle
87935
 * @suppress {checkTypes} checked by tsc
87936
 */
87937
/**
87938
 * Default header for MatCalendar
87939
 * @template D
87940
 */
87941
var MatCalendarHeader = /** @class */ (function () {
87942
    function MatCalendarHeader(_intl, calendar, _dateAdapter, _dateFormats, changeDetectorRef) {
87943
        this._intl = _intl;
87944
        this.calendar = calendar;
87945
        this._dateAdapter = _dateAdapter;
87946
        this._dateFormats = _dateFormats;
87947
        this.calendar.stateChanges.subscribe(function () { return changeDetectorRef.markForCheck(); });
87948
    }
87949
    Object.defineProperty(MatCalendarHeader.prototype, "periodButtonText", {
87950
        /** The label for the current calendar view. */
87951
        get: /**
87952
         * The label for the current calendar view.
87953
         * @return {?}
87954
         */
87955
        function () {
87956
            if (this.calendar.currentView == 'month') {
87957
                return this._dateAdapter
87958
                    .format(this.calendar.activeDate, this._dateFormats.display.monthYearLabel)
87959
                    .toLocaleUpperCase();
87960
            }
87961
            if (this.calendar.currentView == 'year') {
87962
                return this._dateAdapter.getYearName(this.calendar.activeDate);
87963
            }
87964
            var /** @type {?} */ activeYear = this._dateAdapter.getYear(this.calendar.activeDate);
87965
            var /** @type {?} */ firstYearInView = this._dateAdapter.getYearName(this._dateAdapter.createDate(activeYear - activeYear % 24, 0, 1));
87966
            var /** @type {?} */ lastYearInView = this._dateAdapter.getYearName(this._dateAdapter.createDate(activeYear + yearsPerPage - 1 - activeYear % 24, 0, 1));
87967
            return firstYearInView + " \u2013 " + lastYearInView;
87968
        },
87969
        enumerable: true,
87970
        configurable: true
87971
    });
87972
    Object.defineProperty(MatCalendarHeader.prototype, "periodButtonLabel", {
87973
        get: /**
87974
         * @return {?}
87975
         */
87976
        function () {
87977
            return this.calendar.currentView == 'month' ?
87978
                this._intl.switchToMultiYearViewLabel : this._intl.switchToMonthViewLabel;
87979
        },
87980
        enumerable: true,
87981
        configurable: true
87982
    });
87983
    Object.defineProperty(MatCalendarHeader.prototype, "prevButtonLabel", {
87984
        /** The label for the the previous button. */
87985
        get: /**
87986
         * The label for the the previous button.
87987
         * @return {?}
87988
         */
87989
        function () {
87990
            return {
87991
                'month': this._intl.prevMonthLabel,
87992
                'year': this._intl.prevYearLabel,
87993
                'multi-year': this._intl.prevMultiYearLabel
87994
            }[this.calendar.currentView];
87995
        },
87996
        enumerable: true,
87997
        configurable: true
87998
    });
87999
    Object.defineProperty(MatCalendarHeader.prototype, "nextButtonLabel", {
88000
        /** The label for the the next button. */
88001
        get: /**
88002
         * The label for the the next button.
88003
         * @return {?}
88004
         */
88005
        function () {
88006
            return {
88007
                'month': this._intl.nextMonthLabel,
88008
                'year': this._intl.nextYearLabel,
88009
                'multi-year': this._intl.nextMultiYearLabel
88010
            }[this.calendar.currentView];
88011
        },
88012
        enumerable: true,
88013
        configurable: true
88014
    });
88015
    /** Handles user clicks on the period label. */
88016
    /**
88017
     * Handles user clicks on the period label.
88018
     * @return {?}
88019
     */
88020
    MatCalendarHeader.prototype.currentPeriodClicked = /**
88021
     * Handles user clicks on the period label.
88022
     * @return {?}
88023
     */
88024
    function () {
88025
        this.calendar.currentView = this.calendar.currentView == 'month' ? 'multi-year' : 'month';
88026
    };
88027
    /** Handles user clicks on the previous button. */
88028
    /**
88029
     * Handles user clicks on the previous button.
88030
     * @return {?}
88031
     */
88032
    MatCalendarHeader.prototype.previousClicked = /**
88033
     * Handles user clicks on the previous button.
88034
     * @return {?}
88035
     */
88036
    function () {
88037
        this.calendar.activeDate = this.calendar.currentView == 'month' ?
88038
            this._dateAdapter.addCalendarMonths(this.calendar.activeDate, -1) :
88039
            this._dateAdapter.addCalendarYears(this.calendar.activeDate, this.calendar.currentView == 'year' ? -1 : -yearsPerPage);
88040
    };
88041
    /** Handles user clicks on the next button. */
88042
    /**
88043
     * Handles user clicks on the next button.
88044
     * @return {?}
88045
     */
88046
    MatCalendarHeader.prototype.nextClicked = /**
88047
     * Handles user clicks on the next button.
88048
     * @return {?}
88049
     */
88050
    function () {
88051
        this.calendar.activeDate = this.calendar.currentView == 'month' ?
88052
            this._dateAdapter.addCalendarMonths(this.calendar.activeDate, 1) :
88053
            this._dateAdapter.addCalendarYears(this.calendar.activeDate, this.calendar.currentView == 'year' ? 1 : yearsPerPage);
88054
    };
88055
    /** Whether the previous period button is enabled. */
88056
    /**
88057
     * Whether the previous period button is enabled.
88058
     * @return {?}
88059
     */
88060
    MatCalendarHeader.prototype.previousEnabled = /**
88061
     * Whether the previous period button is enabled.
88062
     * @return {?}
88063
     */
88064
    function () {
88065
        if (!this.calendar.minDate) {
88066
            return true;
88067
        }
88068
        return !this.calendar.minDate ||
88069
            !this._isSameView(this.calendar.activeDate, this.calendar.minDate);
88070
    };
88071
    /** Whether the next period button is enabled. */
88072
    /**
88073
     * Whether the next period button is enabled.
88074
     * @return {?}
88075
     */
88076
    MatCalendarHeader.prototype.nextEnabled = /**
88077
     * Whether the next period button is enabled.
88078
     * @return {?}
88079
     */
88080
    function () {
88081
        return !this.calendar.maxDate ||
88082
            !this._isSameView(this.calendar.activeDate, this.calendar.maxDate);
88083
    };
88084
    /**
88085
     * Whether the two dates represent the same view in the current view mode (month or year).
88086
     * @param {?} date1
88087
     * @param {?} date2
88088
     * @return {?}
88089
     */
88090
    MatCalendarHeader.prototype._isSameView = /**
88091
     * Whether the two dates represent the same view in the current view mode (month or year).
88092
     * @param {?} date1
88093
     * @param {?} date2
88094
     * @return {?}
88095
     */
88096
    function (date1, date2) {
88097
        if (this.calendar.currentView == 'month') {
88098
            return this._dateAdapter.getYear(date1) == this._dateAdapter.getYear(date2) &&
88099
                this._dateAdapter.getMonth(date1) == this._dateAdapter.getMonth(date2);
88100
        }
88101
        if (this.calendar.currentView == 'year') {
88102
            return this._dateAdapter.getYear(date1) == this._dateAdapter.getYear(date2);
88103
        }
88104
        // Otherwise we are in 'multi-year' view.
88105
        return Math.floor(this._dateAdapter.getYear(date1) / yearsPerPage) ==
88106
            Math.floor(this._dateAdapter.getYear(date2) / yearsPerPage);
88107
    };
88108
    MatCalendarHeader.decorators = [
88109
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-calendar-header',
88110
                    template: "<div class=\"mat-calendar-header\"><div class=\"mat-calendar-controls\"><button mat-button type=\"button\" class=\"mat-calendar-period-button\" (click)=\"currentPeriodClicked()\" [attr.aria-label]=\"periodButtonLabel\" cdkAriaLive=\"polite\">{{periodButtonText}}<div class=\"mat-calendar-arrow\" [class.mat-calendar-invert]=\"calendar.currentView != 'month'\"></div></button><div class=\"mat-calendar-spacer\"></div><button mat-icon-button type=\"button\" class=\"mat-calendar-previous-button\" [disabled]=\"!previousEnabled()\" (click)=\"previousClicked()\" [attr.aria-label]=\"prevButtonLabel\"></button> <button mat-icon-button type=\"button\" class=\"mat-calendar-next-button\" [disabled]=\"!nextEnabled()\" (click)=\"nextClicked()\" [attr.aria-label]=\"nextButtonLabel\"></button></div></div>",
88111
                    exportAs: 'matCalendarHeader',
88112
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
88113
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
88114
                },] },
88115
    ];
88116
    /** @nocollapse */
88117
    MatCalendarHeader.ctorParameters = function () { return [
88118
        { type: MatDatepickerIntl, },
88119
        { type: MatCalendar, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () { return MatCalendar; }),] },] },
88120
        { type: _angular_material_core__WEBPACK_IMPORTED_MODULE_4__["DateAdapter"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
88121
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_material_core__WEBPACK_IMPORTED_MODULE_4__["MAT_DATE_FORMATS"],] },] },
88122
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"], },
88123
    ]; };
88124
    return MatCalendarHeader;
88125
}());
88126
/**
88127
 * A calendar that is used as part of the datepicker.
88128
 * \@docs-private
88129
 * @template D
88130
 */
88131
var MatCalendar = /** @class */ (function () {
88132
    function MatCalendar(_intl, _dateAdapter, _dateFormats, _changeDetectorRef) {
88133
        var _this = this;
88134
        this._dateAdapter = _dateAdapter;
88135
        this._dateFormats = _dateFormats;
88136
        this._changeDetectorRef = _changeDetectorRef;
88137
        /**
88138
         * Used for scheduling that focus should be moved to the active cell on the next tick.
88139
         * We need to schedule it, rather than do it immediately, because we have to wait
88140
         * for Angular to re-evaluate the view children.
88141
         */
88142
        this._moveFocusOnNextTick = false;
88143
        /**
88144
         * Whether the calendar should be started in month or year view.
88145
         */
88146
        this.startView = 'month';
88147
        /**
88148
         * Emits when the currently selected date changes.
88149
         */
88150
        this.selectedChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
88151
        /**
88152
         * Emits the year chosen in multiyear view.
88153
         * This doesn't imply a change on the selected date.
88154
         */
88155
        this.yearSelected = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
88156
        /**
88157
         * Emits the month chosen in year view.
88158
         * This doesn't imply a change on the selected date.
88159
         */
88160
        this.monthSelected = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
88161
        /**
88162
         * Emits when any date is selected.
88163
         */
88164
        this._userSelection = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
88165
        /**
88166
         * Emits whenever there is a state change that the header may need to respond to.
88167
         */
88168
        this.stateChanges = new rxjs__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
88169
        if (!this._dateAdapter) {
88170
            throw createMissingDateImplError('DateAdapter');
88171
        }
88172
        if (!this._dateFormats) {
88173
            throw createMissingDateImplError('MAT_DATE_FORMATS');
88174
        }
88175
        this._intlChanges = _intl.changes.subscribe(function () {
88176
            _changeDetectorRef.markForCheck();
88177
            _this.stateChanges.next();
88178
        });
88179
    }
88180
    Object.defineProperty(MatCalendar.prototype, "startAt", {
88181
        get: /**
88182
         * A date representing the period (month or year) to start the calendar in.
88183
         * @return {?}
88184
         */
88185
        function () { return this._startAt; },
88186
        set: /**
88187
         * @param {?} value
88188
         * @return {?}
88189
         */
88190
        function (value) {
88191
            this._startAt = this._getValidDateOrNull(this._dateAdapter.deserialize(value));
88192
        },
88193
        enumerable: true,
88194
        configurable: true
88195
    });
88196
    Object.defineProperty(MatCalendar.prototype, "selected", {
88197
        get: /**
88198
         * The currently selected date.
88199
         * @return {?}
88200
         */
88201
        function () { return this._selected; },
88202
        set: /**
88203
         * @param {?} value
88204
         * @return {?}
88205
         */
88206
        function (value) {
88207
            this._selected = this._getValidDateOrNull(this._dateAdapter.deserialize(value));
88208
        },
88209
        enumerable: true,
88210
        configurable: true
88211
    });
88212
    Object.defineProperty(MatCalendar.prototype, "minDate", {
88213
        get: /**
88214
         * The minimum selectable date.
88215
         * @return {?}
88216
         */
88217
        function () { return this._minDate; },
88218
        set: /**
88219
         * @param {?} value
88220
         * @return {?}
88221
         */
88222
        function (value) {
88223
            this._minDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value));
88224
        },
88225
        enumerable: true,
88226
        configurable: true
88227
    });
88228
    Object.defineProperty(MatCalendar.prototype, "maxDate", {
88229
        get: /**
88230
         * The maximum selectable date.
88231
         * @return {?}
88232
         */
88233
        function () { return this._maxDate; },
88234
        set: /**
88235
         * @param {?} value
88236
         * @return {?}
88237
         */
88238
        function (value) {
88239
            this._maxDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value));
88240
        },
88241
        enumerable: true,
88242
        configurable: true
88243
    });
88244
    Object.defineProperty(MatCalendar.prototype, "activeDate", {
88245
        /**
88246
         * The current active date. This determines which time period is shown and which date is
88247
         * highlighted when using keyboard navigation.
88248
         */
88249
        get: /**
88250
         * The current active date. This determines which time period is shown and which date is
88251
         * highlighted when using keyboard navigation.
88252
         * @return {?}
88253
         */
88254
        function () { return this._clampedActiveDate; },
88255
        set: /**
88256
         * @param {?} value
88257
         * @return {?}
88258
         */
88259
        function (value) {
88260
            this._clampedActiveDate = this._dateAdapter.clampDate(value, this.minDate, this.maxDate);
88261
            this.stateChanges.next();
88262
        },
88263
        enumerable: true,
88264
        configurable: true
88265
    });
88266
    Object.defineProperty(MatCalendar.prototype, "currentView", {
88267
        /** Whether the calendar is in month view. */
88268
        get: /**
88269
         * Whether the calendar is in month view.
88270
         * @return {?}
88271
         */
88272
        function () { return this._currentView; },
88273
        set: /**
88274
         * @param {?} value
88275
         * @return {?}
88276
         */
88277
        function (value) {
88278
            this._currentView = value;
88279
            this._moveFocusOnNextTick = true;
88280
        },
88281
        enumerable: true,
88282
        configurable: true
88283
    });
88284
    /**
88285
     * @return {?}
88286
     */
88287
    MatCalendar.prototype.ngAfterContentInit = /**
88288
     * @return {?}
88289
     */
88290
    function () {
88291
        this._calendarHeaderPortal = new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_6__["ComponentPortal"](this.headerComponent || MatCalendarHeader);
88292
        this.activeDate = this.startAt || this._dateAdapter.today();
88293
        // Assign to the private property since we don't want to move focus on init.
88294
        this._currentView = this.startView;
88295
    };
88296
    /**
88297
     * @return {?}
88298
     */
88299
    MatCalendar.prototype.ngAfterViewChecked = /**
88300
     * @return {?}
88301
     */
88302
    function () {
88303
        if (this._moveFocusOnNextTick) {
88304
            this._moveFocusOnNextTick = false;
88305
            this.focusActiveCell();
88306
        }
88307
    };
88308
    /**
88309
     * @return {?}
88310
     */
88311
    MatCalendar.prototype.ngOnDestroy = /**
88312
     * @return {?}
88313
     */
88314
    function () {
88315
        this._intlChanges.unsubscribe();
88316
        this.stateChanges.complete();
88317
    };
88318
    /**
88319
     * @param {?} changes
88320
     * @return {?}
88321
     */
88322
    MatCalendar.prototype.ngOnChanges = /**
88323
     * @param {?} changes
88324
     * @return {?}
88325
     */
88326
    function (changes) {
88327
        var /** @type {?} */ change = changes["minDate"] || changes["maxDate"] || changes["dateFilter"];
88328
        if (change && !change.firstChange) {
88329
            var /** @type {?} */ view = this._getCurrentViewComponent();
88330
            if (view) {
88331
                // We need to `detectChanges` manually here, because the `minDate`, `maxDate` etc. are
88332
                // passed down to the view via data bindings which won't be up-to-date when we call `_init`.
88333
                this._changeDetectorRef.detectChanges();
88334
                view._init();
88335
            }
88336
        }
88337
        this.stateChanges.next();
88338
    };
88339
    /**
88340
     * @return {?}
88341
     */
88342
    MatCalendar.prototype.focusActiveCell = /**
88343
     * @return {?}
88344
     */
88345
    function () {
88346
        this._getCurrentViewComponent()._focusActiveCell();
88347
    };
88348
    /** Handles date selection in the month view. */
88349
    /**
88350
     * Handles date selection in the month view.
88351
     * @param {?} date
88352
     * @return {?}
88353
     */
88354
    MatCalendar.prototype._dateSelected = /**
88355
     * Handles date selection in the month view.
88356
     * @param {?} date
88357
     * @return {?}
88358
     */
88359
    function (date) {
88360
        if (!this._dateAdapter.sameDate(date, this.selected)) {
88361
            this.selectedChange.emit(date);
88362
        }
88363
    };
88364
    /** Handles year selection in the multiyear view. */
88365
    /**
88366
     * Handles year selection in the multiyear view.
88367
     * @param {?} normalizedYear
88368
     * @return {?}
88369
     */
88370
    MatCalendar.prototype._yearSelectedInMultiYearView = /**
88371
     * Handles year selection in the multiyear view.
88372
     * @param {?} normalizedYear
88373
     * @return {?}
88374
     */
88375
    function (normalizedYear) {
88376
        this.yearSelected.emit(normalizedYear);
88377
    };
88378
    /** Handles month selection in the year view. */
88379
    /**
88380
     * Handles month selection in the year view.
88381
     * @param {?} normalizedMonth
88382
     * @return {?}
88383
     */
88384
    MatCalendar.prototype._monthSelectedInYearView = /**
88385
     * Handles month selection in the year view.
88386
     * @param {?} normalizedMonth
88387
     * @return {?}
88388
     */
88389
    function (normalizedMonth) {
88390
        this.monthSelected.emit(normalizedMonth);
88391
    };
88392
    /**
88393
     * @return {?}
88394
     */
88395
    MatCalendar.prototype._userSelected = /**
88396
     * @return {?}
88397
     */
88398
    function () {
88399
        this._userSelection.emit();
88400
    };
88401
    /** Handles year/month selection in the multi-year/year views. */
88402
    /**
88403
     * Handles year/month selection in the multi-year/year views.
88404
     * @param {?} date
88405
     * @param {?} view
88406
     * @return {?}
88407
     */
88408
    MatCalendar.prototype._goToDateInView = /**
88409
     * Handles year/month selection in the multi-year/year views.
88410
     * @param {?} date
88411
     * @param {?} view
88412
     * @return {?}
88413
     */
88414
    function (date, view) {
88415
        this.activeDate = date;
88416
        this.currentView = view;
88417
    };
88418
    /**
88419
     * @param {?} obj The object to check.
88420
     * @return {?} The given object if it is both a date instance and valid, otherwise null.
88421
     */
88422
    MatCalendar.prototype._getValidDateOrNull = /**
88423
     * @param {?} obj The object to check.
88424
     * @return {?} The given object if it is both a date instance and valid, otherwise null.
88425
     */
88426
    function (obj) {
88427
        return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj)) ? obj : null;
88428
    };
88429
    /**
88430
     * Returns the component instance that corresponds to the current calendar view.
88431
     * @return {?}
88432
     */
88433
    MatCalendar.prototype._getCurrentViewComponent = /**
88434
     * Returns the component instance that corresponds to the current calendar view.
88435
     * @return {?}
88436
     */
88437
    function () {
88438
        return this.monthView || this.yearView || this.multiYearView;
88439
    };
88440
    MatCalendar.decorators = [
88441
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-calendar',
88442
                    template: "<ng-template [cdkPortalOutlet]=\"_calendarHeaderPortal\"></ng-template><div class=\"mat-calendar-content\" [ngSwitch]=\"currentView\" cdkMonitorSubtreeFocus tabindex=\"-1\"><mat-month-view *ngSwitchCase=\"'month'\" [(activeDate)]=\"activeDate\" [selected]=\"selected\" [dateFilter]=\"dateFilter\" [maxDate]=\"maxDate\" [minDate]=\"minDate\" (selectedChange)=\"_dateSelected($event)\" (_userSelection)=\"_userSelected()\"></mat-month-view><mat-year-view *ngSwitchCase=\"'year'\" [(activeDate)]=\"activeDate\" [selected]=\"selected\" [dateFilter]=\"dateFilter\" [maxDate]=\"maxDate\" [minDate]=\"minDate\" (monthSelected)=\"_monthSelectedInYearView($event)\" (selectedChange)=\"_goToDateInView($event, 'month')\"></mat-year-view><mat-multi-year-view *ngSwitchCase=\"'multi-year'\" [(activeDate)]=\"activeDate\" [selected]=\"selected\" [dateFilter]=\"dateFilter\" [maxDate]=\"maxDate\" [minDate]=\"minDate\" (yearSelected)=\"_yearSelectedInMultiYearView($event)\" (selectedChange)=\"_goToDateInView($event, 'year')\"></mat-multi-year-view></div>",
88443
                    styles: [".mat-calendar{display:block}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:0}.mat-calendar-controls{display:flex;margin:5% calc(33% / 7 - 16px)}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0}.mat-calendar-arrow{display:inline-block;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top-width:5px;border-top-style:solid;margin:0 0 0 5px;vertical-align:middle}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}.mat-calendar-next-button,.mat-calendar-previous-button{position:relative}.mat-calendar-next-button::after,.mat-calendar-previous-button::after{top:0;left:0;right:0;bottom:0;position:absolute;content:'';margin:15.5px;border:0 solid currentColor;border-top-width:2px}[dir=rtl] .mat-calendar-next-button,[dir=rtl] .mat-calendar-previous-button{transform:rotate(180deg)}.mat-calendar-previous-button::after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.mat-calendar-next-button::after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:'';position:absolute;top:0;left:-8px;right:-8px;height:1px}"],
88444
                    host: {
88445
                        'class': 'mat-calendar',
88446
                    },
88447
                    exportAs: 'matCalendar',
88448
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
88449
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
88450
                },] },
88451
    ];
88452
    /** @nocollapse */
88453
    MatCalendar.ctorParameters = function () { return [
88454
        { type: MatDatepickerIntl, },
88455
        { type: _angular_material_core__WEBPACK_IMPORTED_MODULE_4__["DateAdapter"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
88456
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_material_core__WEBPACK_IMPORTED_MODULE_4__["MAT_DATE_FORMATS"],] },] },
88457
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"], },
88458
    ]; };
88459
    MatCalendar.propDecorators = {
88460
        "headerComponent": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
88461
        "startAt": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
88462
        "startView": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
88463
        "selected": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
88464
        "minDate": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
88465
        "maxDate": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
88466
        "dateFilter": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
88467
        "selectedChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
88468
        "yearSelected": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
88469
        "monthSelected": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
88470
        "_userSelection": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
88471
        "monthView": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: [MatMonthView,] },],
88472
        "yearView": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: [MatYearView,] },],
88473
        "multiYearView": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: [MatMultiYearView,] },],
88474
    };
88475
    return MatCalendar;
88476
}());
88477
 
88478
/**
88479
 * @fileoverview added by tsickle
88480
 * @suppress {checkTypes} checked by tsc
88481
 */
88482
/**
88483
 * Animations used by the Material datepicker.
88484
 */
88485
var /** @type {?} */ matDatepickerAnimations = {
88486
    /** Transforms the height of the datepicker's calendar. */
88487
    transformPanel: Object(_angular_animations__WEBPACK_IMPORTED_MODULE_7__["trigger"])('transformPanel', [
88488
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_7__["state"])('void', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_7__["style"])({ opacity: 0, transform: 'scale(1, 0)' })),
88489
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_7__["state"])('enter', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_7__["style"])({ opacity: 1, transform: 'scale(1, 1)' })),
88490
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_7__["transition"])('void => enter', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_7__["group"])([
88491
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_7__["query"])('@fadeInCalendar', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_7__["animateChild"])()),
88492
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_7__["animate"])('400ms cubic-bezier(0.25, 0.8, 0.25, 1)')
88493
        ])),
88494
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_7__["transition"])('* => void', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_7__["animate"])('100ms linear', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_7__["style"])({ opacity: 0 })))
88495
    ]),
88496
    /** Fades in the content of the calendar. */
88497
    fadeInCalendar: Object(_angular_animations__WEBPACK_IMPORTED_MODULE_7__["trigger"])('fadeInCalendar', [
88498
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_7__["state"])('void', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_7__["style"])({ opacity: 0 })),
88499
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_7__["state"])('enter', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_7__["style"])({ opacity: 1 })),
88500
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_7__["transition"])('void => *', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_7__["animate"])('400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)'))
88501
    ])
88502
};
88503
 
88504
/**
88505
 * @fileoverview added by tsickle
88506
 * @suppress {checkTypes} checked by tsc
88507
 */
88508
/**
88509
 * Used to generate a unique ID for each datepicker instance.
88510
 */
88511
var /** @type {?} */ datepickerUid = 0;
88512
/**
88513
 * Injection token that determines the scroll handling while the calendar is open.
88514
 */
88515
var /** @type {?} */ MAT_DATEPICKER_SCROLL_STRATEGY = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('mat-datepicker-scroll-strategy');
88516
/**
88517
 * \@docs-private
88518
 * @param {?} overlay
88519
 * @return {?}
88520
 */
88521
function MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY(overlay) {
88522
    return function () { return overlay.scrollStrategies.reposition(); };
88523
}
88524
/**
88525
 * \@docs-private
88526
 */
88527
var /** @type {?} */ MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER = {
88528
    provide: MAT_DATEPICKER_SCROLL_STRATEGY,
88529
    deps: [_angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_10__["Overlay"]],
88530
    useFactory: MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY,
88531
};
88532
/**
88533
 * \@docs-private
88534
 */
88535
var  /**
88536
 * \@docs-private
88537
 */
88538
MatDatepickerContentBase = /** @class */ (function () {
88539
    function MatDatepickerContentBase(_elementRef) {
88540
        this._elementRef = _elementRef;
88541
    }
88542
    return MatDatepickerContentBase;
88543
}());
88544
var /** @type {?} */ _MatDatepickerContentMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_4__["mixinColor"])(MatDatepickerContentBase);
88545
/**
88546
 * Component used as the content for the datepicker dialog and popup. We use this instead of using
88547
 * MatCalendar directly as the content so we can control the initial focus. This also gives us a
88548
 * place to put additional features of the popup that are not part of the calendar itself in the
88549
 * future. (e.g. confirmation buttons).
88550
 * \@docs-private
88551
 * @template D
88552
 */
88553
var MatDatepickerContent = /** @class */ (function (_super) {
88554
    Object(tslib__WEBPACK_IMPORTED_MODULE_8__["__extends"])(MatDatepickerContent, _super);
88555
    function MatDatepickerContent(elementRef) {
88556
        return _super.call(this, elementRef) || this;
88557
    }
88558
    /**
88559
     * @return {?}
88560
     */
88561
    MatDatepickerContent.prototype.ngAfterViewInit = /**
88562
     * @return {?}
88563
     */
88564
    function () {
88565
        this._calendar.focusActiveCell();
88566
    };
88567
    MatDatepickerContent.decorators = [
88568
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-datepicker-content',
88569
                    template: "<mat-calendar cdkTrapFocus [id]=\"datepicker.id\" [ngClass]=\"datepicker.panelClass\" [startAt]=\"datepicker.startAt\" [startView]=\"datepicker.startView\" [minDate]=\"datepicker._minDate\" [maxDate]=\"datepicker._maxDate\" [dateFilter]=\"datepicker._dateFilter\" [headerComponent]=\"datepicker.calendarHeaderComponent\" [selected]=\"datepicker._selected\" [@fadeInCalendar]=\"'enter'\" (selectedChange)=\"datepicker._select($event)\" (yearSelected)=\"datepicker._selectYear($event)\" (monthSelected)=\"datepicker._selectMonth($event)\" (_userSelection)=\"datepicker.close()\"></mat-calendar>",
88570
                    styles: [".mat-datepicker-content{box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);display:block;border-radius:2px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content-touch{box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12);display:block;max-height:80vh;overflow:auto;margin:-24px}.mat-datepicker-content-touch .mat-calendar{min-width:250px;min-height:312px;max-width:750px;max-height:788px}@media all and (orientation:landscape){.mat-datepicker-content-touch .mat-calendar{width:64vh;height:80vh}}@media all and (orientation:portrait){.mat-datepicker-content-touch .mat-calendar{width:80vw;height:100vw}}"],
88571
                    host: {
88572
                        'class': 'mat-datepicker-content',
88573
                        '[@transformPanel]': '"enter"',
88574
                        '[class.mat-datepicker-content-touch]': 'datepicker.touchUi',
88575
                    },
88576
                    animations: [
88577
                        matDatepickerAnimations.transformPanel,
88578
                        matDatepickerAnimations.fadeInCalendar,
88579
                    ],
88580
                    exportAs: 'matDatepickerContent',
88581
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
88582
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
88583
                    inputs: ['color'],
88584
                },] },
88585
    ];
88586
    /** @nocollapse */
88587
    MatDatepickerContent.ctorParameters = function () { return [
88588
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
88589
    ]; };
88590
    MatDatepickerContent.propDecorators = {
88591
        "_calendar": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: [MatCalendar,] },],
88592
    };
88593
    return MatDatepickerContent;
88594
}(_MatDatepickerContentMixinBase));
88595
/**
88596
 * Component responsible for managing the datepicker popup/dialog.
88597
 * @template D
88598
 */
88599
var MatDatepicker = /** @class */ (function () {
88600
    function MatDatepicker(_dialog, _overlay, _ngZone, _viewContainerRef, _scrollStrategy, _dateAdapter, _dir, _document) {
88601
        this._dialog = _dialog;
88602
        this._overlay = _overlay;
88603
        this._ngZone = _ngZone;
88604
        this._viewContainerRef = _viewContainerRef;
88605
        this._scrollStrategy = _scrollStrategy;
88606
        this._dateAdapter = _dateAdapter;
88607
        this._dir = _dir;
88608
        this._document = _document;
88609
        /**
88610
         * The view that the calendar should start in.
88611
         */
88612
        this.startView = 'month';
88613
        this._touchUi = false;
88614
        /**
88615
         * Emits selected year in multiyear view.
88616
         * This doesn't imply a change on the selected date.
88617
         */
88618
        this.yearSelected = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
88619
        /**
88620
         * Emits selected month in year view.
88621
         * This doesn't imply a change on the selected date.
88622
         */
88623
        this.monthSelected = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
88624
        /**
88625
         * Emits when the datepicker has been opened.
88626
         */
88627
        this.openedStream = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
88628
        /**
88629
         * Emits when the datepicker has been closed.
88630
         */
88631
        this.closedStream = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
88632
        this._opened = false;
88633
        /**
88634
         * The id for the datepicker calendar.
88635
         */
88636
        this.id = "mat-datepicker-" + datepickerUid++;
88637
        this._validSelected = null;
88638
        /**
88639
         * The element that was focused before the datepicker was opened.
88640
         */
88641
        this._focusedElementBeforeOpen = null;
88642
        /**
88643
         * Subscription to value changes in the associated input element.
88644
         */
88645
        this._inputSubscription = rxjs__WEBPACK_IMPORTED_MODULE_1__["Subscription"].EMPTY;
88646
        /**
88647
         * Emits when the datepicker is disabled.
88648
         */
88649
        this._disabledChange = new rxjs__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
88650
        /**
88651
         * Emits new selected date when selected date changes.
88652
         */
88653
        this._selectedChanged = new rxjs__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
88654
        if (!this._dateAdapter) {
88655
            throw createMissingDateImplError('DateAdapter');
88656
        }
88657
    }
88658
    Object.defineProperty(MatDatepicker.prototype, "startAt", {
88659
        get: /**
88660
         * The date to open the calendar to initially.
88661
         * @return {?}
88662
         */
88663
        function () {
88664
            // If an explicit startAt is set we start there, otherwise we start at whatever the currently
88665
            // selected value is.
88666
            return this._startAt || (this._datepickerInput ? this._datepickerInput.value : null);
88667
        },
88668
        set: /**
88669
         * @param {?} value
88670
         * @return {?}
88671
         */
88672
        function (value) {
88673
            this._startAt = this._getValidDateOrNull(this._dateAdapter.deserialize(value));
88674
        },
88675
        enumerable: true,
88676
        configurable: true
88677
    });
88678
    Object.defineProperty(MatDatepicker.prototype, "color", {
88679
        get: /**
88680
         * Color palette to use on the datepicker's calendar.
88681
         * @return {?}
88682
         */
88683
        function () {
88684
            return this._color ||
88685
                (this._datepickerInput ? this._datepickerInput._getThemePalette() : undefined);
88686
        },
88687
        set: /**
88688
         * @param {?} value
88689
         * @return {?}
88690
         */
88691
        function (value) {
88692
            this._color = value;
88693
        },
88694
        enumerable: true,
88695
        configurable: true
88696
    });
88697
    Object.defineProperty(MatDatepicker.prototype, "touchUi", {
88698
        get: /**
88699
         * Whether the calendar UI is in touch mode. In touch mode the calendar opens in a dialog rather
88700
         * than a popup and elements have more padding to allow for bigger touch targets.
88701
         * @return {?}
88702
         */
88703
        function () { return this._touchUi; },
88704
        set: /**
88705
         * @param {?} value
88706
         * @return {?}
88707
         */
88708
        function (value) {
88709
            this._touchUi = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_9__["coerceBooleanProperty"])(value);
88710
        },
88711
        enumerable: true,
88712
        configurable: true
88713
    });
88714
    Object.defineProperty(MatDatepicker.prototype, "disabled", {
88715
        get: /**
88716
         * Whether the datepicker pop-up should be disabled.
88717
         * @return {?}
88718
         */
88719
        function () {
88720
            return this._disabled === undefined && this._datepickerInput ?
88721
                this._datepickerInput.disabled : !!this._disabled;
88722
        },
88723
        set: /**
88724
         * @param {?} value
88725
         * @return {?}
88726
         */
88727
        function (value) {
88728
            var /** @type {?} */ newValue = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_9__["coerceBooleanProperty"])(value);
88729
            if (newValue !== this._disabled) {
88730
                this._disabled = newValue;
88731
                this._disabledChange.next(newValue);
88732
            }
88733
        },
88734
        enumerable: true,
88735
        configurable: true
88736
    });
88737
    Object.defineProperty(MatDatepicker.prototype, "opened", {
88738
        get: /**
88739
         * Whether the calendar is open.
88740
         * @return {?}
88741
         */
88742
        function () { return this._opened; },
88743
        set: /**
88744
         * @param {?} value
88745
         * @return {?}
88746
         */
88747
        function (value) { value ? this.open() : this.close(); },
88748
        enumerable: true,
88749
        configurable: true
88750
    });
88751
    Object.defineProperty(MatDatepicker.prototype, "_selected", {
88752
        /** The currently selected date. */
88753
        get: /**
88754
         * The currently selected date.
88755
         * @return {?}
88756
         */
88757
        function () { return this._validSelected; },
88758
        set: /**
88759
         * @param {?} value
88760
         * @return {?}
88761
         */
88762
        function (value) { this._validSelected = value; },
88763
        enumerable: true,
88764
        configurable: true
88765
    });
88766
    Object.defineProperty(MatDatepicker.prototype, "_minDate", {
88767
        /** The minimum selectable date. */
88768
        get: /**
88769
         * The minimum selectable date.
88770
         * @return {?}
88771
         */
88772
        function () {
88773
            return this._datepickerInput && this._datepickerInput.min;
88774
        },
88775
        enumerable: true,
88776
        configurable: true
88777
    });
88778
    Object.defineProperty(MatDatepicker.prototype, "_maxDate", {
88779
        /** The maximum selectable date. */
88780
        get: /**
88781
         * The maximum selectable date.
88782
         * @return {?}
88783
         */
88784
        function () {
88785
            return this._datepickerInput && this._datepickerInput.max;
88786
        },
88787
        enumerable: true,
88788
        configurable: true
88789
    });
88790
    Object.defineProperty(MatDatepicker.prototype, "_dateFilter", {
88791
        get: /**
88792
         * @return {?}
88793
         */
88794
        function () {
88795
            return this._datepickerInput && this._datepickerInput._dateFilter;
88796
        },
88797
        enumerable: true,
88798
        configurable: true
88799
    });
88800
    /**
88801
     * @return {?}
88802
     */
88803
    MatDatepicker.prototype.ngOnDestroy = /**
88804
     * @return {?}
88805
     */
88806
    function () {
88807
        this.close();
88808
        this._inputSubscription.unsubscribe();
88809
        this._disabledChange.complete();
88810
        if (this._popupRef) {
88811
            this._popupRef.dispose();
88812
            this._popupComponentRef = null;
88813
        }
88814
    };
88815
    /** Selects the given date */
88816
    /**
88817
     * Selects the given date
88818
     * @param {?} date
88819
     * @return {?}
88820
     */
88821
    MatDatepicker.prototype._select = /**
88822
     * Selects the given date
88823
     * @param {?} date
88824
     * @return {?}
88825
     */
88826
    function (date) {
88827
        var /** @type {?} */ oldValue = this._selected;
88828
        this._selected = date;
88829
        if (!this._dateAdapter.sameDate(oldValue, this._selected)) {
88830
            this._selectedChanged.next(date);
88831
        }
88832
    };
88833
    /** Emits the selected year in multiyear view */
88834
    /**
88835
     * Emits the selected year in multiyear view
88836
     * @param {?} normalizedYear
88837
     * @return {?}
88838
     */
88839
    MatDatepicker.prototype._selectYear = /**
88840
     * Emits the selected year in multiyear view
88841
     * @param {?} normalizedYear
88842
     * @return {?}
88843
     */
88844
    function (normalizedYear) {
88845
        this.yearSelected.emit(normalizedYear);
88846
    };
88847
    /** Emits selected month in year view */
88848
    /**
88849
     * Emits selected month in year view
88850
     * @param {?} normalizedMonth
88851
     * @return {?}
88852
     */
88853
    MatDatepicker.prototype._selectMonth = /**
88854
     * Emits selected month in year view
88855
     * @param {?} normalizedMonth
88856
     * @return {?}
88857
     */
88858
    function (normalizedMonth) {
88859
        this.monthSelected.emit(normalizedMonth);
88860
    };
88861
    /**
88862
     * Register an input with this datepicker.
88863
     * @param input The datepicker input to register with this datepicker.
88864
     */
88865
    /**
88866
     * Register an input with this datepicker.
88867
     * @param {?} input The datepicker input to register with this datepicker.
88868
     * @return {?}
88869
     */
88870
    MatDatepicker.prototype._registerInput = /**
88871
     * Register an input with this datepicker.
88872
     * @param {?} input The datepicker input to register with this datepicker.
88873
     * @return {?}
88874
     */
88875
    function (input) {
88876
        var _this = this;
88877
        if (this._datepickerInput) {
88878
            throw Error('A MatDatepicker can only be associated with a single input.');
88879
        }
88880
        this._datepickerInput = input;
88881
        this._inputSubscription =
88882
            this._datepickerInput._valueChange.subscribe(function (value) { return _this._selected = value; });
88883
    };
88884
    /** Open the calendar. */
88885
    /**
88886
     * Open the calendar.
88887
     * @return {?}
88888
     */
88889
    MatDatepicker.prototype.open = /**
88890
     * Open the calendar.
88891
     * @return {?}
88892
     */
88893
    function () {
88894
        if (this._opened || this.disabled) {
88895
            return;
88896
        }
88897
        if (!this._datepickerInput) {
88898
            throw Error('Attempted to open an MatDatepicker with no associated input.');
88899
        }
88900
        if (this._document) {
88901
            this._focusedElementBeforeOpen = this._document.activeElement;
88902
        }
88903
        this.touchUi ? this._openAsDialog() : this._openAsPopup();
88904
        this._opened = true;
88905
        this.openedStream.emit();
88906
    };
88907
    /** Close the calendar. */
88908
    /**
88909
     * Close the calendar.
88910
     * @return {?}
88911
     */
88912
    MatDatepicker.prototype.close = /**
88913
     * Close the calendar.
88914
     * @return {?}
88915
     */
88916
    function () {
88917
        var _this = this;
88918
        if (!this._opened) {
88919
            return;
88920
        }
88921
        if (this._popupRef && this._popupRef.hasAttached()) {
88922
            this._popupRef.detach();
88923
        }
88924
        if (this._dialogRef) {
88925
            this._dialogRef.close();
88926
            this._dialogRef = null;
88927
        }
88928
        if (this._calendarPortal && this._calendarPortal.isAttached) {
88929
            this._calendarPortal.detach();
88930
        }
88931
        var /** @type {?} */ completeClose = function () {
88932
            // The `_opened` could've been reset already if
88933
            // we got two events in quick succession.
88934
            if (_this._opened) {
88935
                _this._opened = false;
88936
                _this.closedStream.emit();
88937
                _this._focusedElementBeforeOpen = null;
88938
            }
88939
        };
88940
        if (this._focusedElementBeforeOpen &&
88941
            typeof this._focusedElementBeforeOpen.focus === 'function') {
88942
            // Because IE moves focus asynchronously, we can't count on it being restored before we've
88943
            // marked the datepicker as closed. If the event fires out of sequence and the element that
88944
            // we're refocusing opens the datepicker on focus, the user could be stuck with not being
88945
            // able to close the calendar at all. We work around it by making the logic, that marks
88946
            // the datepicker as closed, async as well.
88947
            this._focusedElementBeforeOpen.focus();
88948
            setTimeout(completeClose);
88949
        }
88950
        else {
88951
            completeClose();
88952
        }
88953
    };
88954
    /**
88955
     * Open the calendar as a dialog.
88956
     * @return {?}
88957
     */
88958
    MatDatepicker.prototype._openAsDialog = /**
88959
     * Open the calendar as a dialog.
88960
     * @return {?}
88961
     */
88962
    function () {
88963
        var _this = this;
88964
        this._dialogRef = this._dialog.open(MatDatepickerContent, {
88965
            direction: this._dir ? this._dir.value : 'ltr',
88966
            viewContainerRef: this._viewContainerRef,
88967
            panelClass: 'mat-datepicker-dialog',
88968
        });
88969
        this._dialogRef.afterClosed().subscribe(function () { return _this.close(); });
88970
        this._dialogRef.componentInstance.datepicker = this;
88971
        this._setColor();
88972
    };
88973
    /**
88974
     * Open the calendar as a popup.
88975
     * @return {?}
88976
     */
88977
    MatDatepicker.prototype._openAsPopup = /**
88978
     * Open the calendar as a popup.
88979
     * @return {?}
88980
     */
88981
    function () {
88982
        var _this = this;
88983
        if (!this._calendarPortal) {
88984
            this._calendarPortal = new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_6__["ComponentPortal"](MatDatepickerContent, this._viewContainerRef);
88985
        }
88986
        if (!this._popupRef) {
88987
            this._createPopup();
88988
        }
88989
        if (!this._popupRef.hasAttached()) {
88990
            this._popupComponentRef = this._popupRef.attach(this._calendarPortal);
88991
            this._popupComponentRef.instance.datepicker = this;
88992
            this._setColor();
88993
            // Update the position once the calendar has rendered.
88994
            this._ngZone.onStable.asObservable().pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["take"])(1)).subscribe(function () {
88995
                _this._popupRef.updatePosition();
88996
            });
88997
        }
88998
    };
88999
    /**
89000
     * Create the popup.
89001
     * @return {?}
89002
     */
89003
    MatDatepicker.prototype._createPopup = /**
89004
     * Create the popup.
89005
     * @return {?}
89006
     */
89007
    function () {
89008
        var _this = this;
89009
        var /** @type {?} */ overlayConfig = new _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_10__["OverlayConfig"]({
89010
            positionStrategy: this._createPopupPositionStrategy(),
89011
            hasBackdrop: true,
89012
            backdropClass: 'mat-overlay-transparent-backdrop',
89013
            direction: this._dir,
89014
            scrollStrategy: this._scrollStrategy(),
89015
            panelClass: 'mat-datepicker-popup',
89016
        });
89017
        this._popupRef = this._overlay.create(overlayConfig);
89018
        this._popupRef.overlayElement.setAttribute('role', 'dialog');
89019
        Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["merge"])(this._popupRef.backdropClick(), this._popupRef.detachments(), this._popupRef.keydownEvents().pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["filter"])(function (event) {
89020
            // Closing on alt + up is only valid when there's an input associated with the datepicker.
89021
            return event.keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["ESCAPE"] ||
89022
                (_this._datepickerInput && event.altKey && event.keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["UP_ARROW"]);
89023
        }))).subscribe(function () { return _this.close(); });
89024
    };
89025
    /**
89026
     * Create the popup PositionStrategy.
89027
     * @return {?}
89028
     */
89029
    MatDatepicker.prototype._createPopupPositionStrategy = /**
89030
     * Create the popup PositionStrategy.
89031
     * @return {?}
89032
     */
89033
    function () {
89034
        return this._overlay.position()
89035
            .flexibleConnectedTo(this._datepickerInput.getConnectedOverlayOrigin())
89036
            .withTransformOriginOn('.mat-datepicker-content')
89037
            .withFlexibleDimensions(false)
89038
            .withViewportMargin(8)
89039
            .withPush(false)
89040
            .withPositions([
89041
            {
89042
                originX: 'start',
89043
                originY: 'bottom',
89044
                overlayX: 'start',
89045
                overlayY: 'top'
89046
            },
89047
            {
89048
                originX: 'start',
89049
                originY: 'top',
89050
                overlayX: 'start',
89051
                overlayY: 'bottom'
89052
            },
89053
            {
89054
                originX: 'end',
89055
                originY: 'bottom',
89056
                overlayX: 'end',
89057
                overlayY: 'top'
89058
            },
89059
            {
89060
                originX: 'end',
89061
                originY: 'top',
89062
                overlayX: 'end',
89063
                overlayY: 'bottom'
89064
            }
89065
        ]);
89066
    };
89067
    /**
89068
     * @param {?} obj The object to check.
89069
     * @return {?} The given object if it is both a date instance and valid, otherwise null.
89070
     */
89071
    MatDatepicker.prototype._getValidDateOrNull = /**
89072
     * @param {?} obj The object to check.
89073
     * @return {?} The given object if it is both a date instance and valid, otherwise null.
89074
     */
89075
    function (obj) {
89076
        return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj)) ? obj : null;
89077
    };
89078
    /**
89079
     * Passes the current theme color along to the calendar overlay.
89080
     * @return {?}
89081
     */
89082
    MatDatepicker.prototype._setColor = /**
89083
     * Passes the current theme color along to the calendar overlay.
89084
     * @return {?}
89085
     */
89086
    function () {
89087
        var /** @type {?} */ color = this.color;
89088
        if (this._popupComponentRef) {
89089
            this._popupComponentRef.instance.color = color;
89090
        }
89091
        if (this._dialogRef) {
89092
            this._dialogRef.componentInstance.color = color;
89093
        }
89094
    };
89095
    MatDatepicker.decorators = [
89096
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-datepicker',
89097
                    template: '',
89098
                    exportAs: 'matDatepicker',
89099
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
89100
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
89101
                },] },
89102
    ];
89103
    /** @nocollapse */
89104
    MatDatepicker.ctorParameters = function () { return [
89105
        { type: _angular_material_dialog__WEBPACK_IMPORTED_MODULE_12__["MatDialog"], },
89106
        { type: _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_10__["Overlay"], },
89107
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], },
89108
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
89109
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [MAT_DATEPICKER_SCROLL_STRATEGY,] },] },
89110
        { type: _angular_material_core__WEBPACK_IMPORTED_MODULE_4__["DateAdapter"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
89111
        { type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_5__["Directionality"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
89112
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_11__["DOCUMENT"],] },] },
89113
    ]; };
89114
    MatDatepicker.propDecorators = {
89115
        "calendarHeaderComponent": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
89116
        "startAt": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
89117
        "startView": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
89118
        "color": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
89119
        "touchUi": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
89120
        "disabled": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
89121
        "yearSelected": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
89122
        "monthSelected": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
89123
        "panelClass": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
89124
        "openedStream": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"], args: ['opened',] },],
89125
        "closedStream": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"], args: ['closed',] },],
89126
        "opened": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
89127
    };
89128
    return MatDatepicker;
89129
}());
89130
 
89131
/**
89132
 * @fileoverview added by tsickle
89133
 * @suppress {checkTypes} checked by tsc
89134
 */
89135
var /** @type {?} */ MAT_DATEPICKER_VALUE_ACCESSOR = {
89136
    provide: _angular_forms__WEBPACK_IMPORTED_MODULE_13__["NG_VALUE_ACCESSOR"],
89137
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () { return MatDatepickerInput; }),
89138
    multi: true
89139
};
89140
var /** @type {?} */ MAT_DATEPICKER_VALIDATORS = {
89141
    provide: _angular_forms__WEBPACK_IMPORTED_MODULE_13__["NG_VALIDATORS"],
89142
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () { return MatDatepickerInput; }),
89143
    multi: true
89144
};
89145
/**
89146
 * An event used for datepicker input and change events. We don't always have access to a native
89147
 * input or change event because the event may have been triggered by the user clicking on the
89148
 * calendar popup. For consistency, we always use MatDatepickerInputEvent instead.
89149
 * @template D
89150
 */
89151
var  /**
89152
 * An event used for datepicker input and change events. We don't always have access to a native
89153
 * input or change event because the event may have been triggered by the user clicking on the
89154
 * calendar popup. For consistency, we always use MatDatepickerInputEvent instead.
89155
 * @template D
89156
 */
89157
MatDatepickerInputEvent = /** @class */ (function () {
89158
    function MatDatepickerInputEvent(target, targetElement) {
89159
        this.target = target;
89160
        this.targetElement = targetElement;
89161
        this.value = this.target.value;
89162
    }
89163
    return MatDatepickerInputEvent;
89164
}());
89165
/**
89166
 * Directive used to connect an input to a MatDatepicker.
89167
 * @template D
89168
 */
89169
var MatDatepickerInput = /** @class */ (function () {
89170
    function MatDatepickerInput(_elementRef, _dateAdapter, _dateFormats, _formField) {
89171
        var _this = this;
89172
        this._elementRef = _elementRef;
89173
        this._dateAdapter = _dateAdapter;
89174
        this._dateFormats = _dateFormats;
89175
        this._formField = _formField;
89176
        /**
89177
         * Emits when a `change` event is fired on this `<input>`.
89178
         */
89179
        this.dateChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
89180
        /**
89181
         * Emits when an `input` event is fired on this `<input>`.
89182
         */
89183
        this.dateInput = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
89184
        /**
89185
         * Emits when the value changes (either due to user input or programmatic change).
89186
         */
89187
        this._valueChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
89188
        /**
89189
         * Emits when the disabled state has changed
89190
         */
89191
        this._disabledChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
89192
        this._onTouched = function () { };
89193
        this._cvaOnChange = function () { };
89194
        this._validatorOnChange = function () { };
89195
        this._datepickerSubscription = rxjs__WEBPACK_IMPORTED_MODULE_1__["Subscription"].EMPTY;
89196
        this._localeSubscription = rxjs__WEBPACK_IMPORTED_MODULE_1__["Subscription"].EMPTY;
89197
        /**
89198
         * The form control validator for whether the input parses.
89199
         */
89200
        this._parseValidator = function () {
89201
            return _this._lastValueValid ?
89202
                null : { 'matDatepickerParse': { 'text': _this._elementRef.nativeElement.value } };
89203
        };
89204
        /**
89205
         * The form control validator for the min date.
89206
         */
89207
        this._minValidator = function (control) {
89208
            var /** @type {?} */ controlValue = _this._getValidDateOrNull(_this._dateAdapter.deserialize(control.value));
89209
            return (!_this.min || !controlValue ||
89210
                _this._dateAdapter.compareDate(_this.min, controlValue) <= 0) ?
89211
                null : { 'matDatepickerMin': { 'min': _this.min, 'actual': controlValue } };
89212
        };
89213
        /**
89214
         * The form control validator for the max date.
89215
         */
89216
        this._maxValidator = function (control) {
89217
            var /** @type {?} */ controlValue = _this._getValidDateOrNull(_this._dateAdapter.deserialize(control.value));
89218
            return (!_this.max || !controlValue ||
89219
                _this._dateAdapter.compareDate(_this.max, controlValue) >= 0) ?
89220
                null : { 'matDatepickerMax': { 'max': _this.max, 'actual': controlValue } };
89221
        };
89222
        /**
89223
         * The form control validator for the date filter.
89224
         */
89225
        this._filterValidator = function (control) {
89226
            var /** @type {?} */ controlValue = _this._getValidDateOrNull(_this._dateAdapter.deserialize(control.value));
89227
            return !_this._dateFilter || !controlValue || _this._dateFilter(controlValue) ?
89228
                null : { 'matDatepickerFilter': true };
89229
        };
89230
        /**
89231
         * The combined form control validator for this input.
89232
         */
89233
        this._validator = _angular_forms__WEBPACK_IMPORTED_MODULE_13__["Validators"].compose([this._parseValidator, this._minValidator, this._maxValidator, this._filterValidator]);
89234
        /**
89235
         * Whether the last value set on the input was valid.
89236
         */
89237
        this._lastValueValid = false;
89238
        if (!this._dateAdapter) {
89239
            throw createMissingDateImplError('DateAdapter');
89240
        }
89241
        if (!this._dateFormats) {
89242
            throw createMissingDateImplError('MAT_DATE_FORMATS');
89243
        }
89244
        // Update the displayed date when the locale changes.
89245
        this._localeSubscription = _dateAdapter.localeChanges.subscribe(function () {
89246
            _this.value = _this.value;
89247
        });
89248
    }
89249
    Object.defineProperty(MatDatepickerInput.prototype, "matDatepicker", {
89250
        set: /**
89251
         * The datepicker that this input is associated with.
89252
         * @param {?} value
89253
         * @return {?}
89254
         */
89255
        function (value) {
89256
            var _this = this;
89257
            if (!value) {
89258
                return;
89259
            }
89260
            this._datepicker = value;
89261
            this._datepicker._registerInput(this);
89262
            this._datepickerSubscription.unsubscribe();
89263
            this._datepickerSubscription = this._datepicker._selectedChanged.subscribe(function (selected) {
89264
                _this.value = selected;
89265
                _this._cvaOnChange(selected);
89266
                _this._onTouched();
89267
                _this.dateInput.emit(new MatDatepickerInputEvent(_this, _this._elementRef.nativeElement));
89268
                _this.dateChange.emit(new MatDatepickerInputEvent(_this, _this._elementRef.nativeElement));
89269
            });
89270
        },
89271
        enumerable: true,
89272
        configurable: true
89273
    });
89274
    Object.defineProperty(MatDatepickerInput.prototype, "matDatepickerFilter", {
89275
        set: /**
89276
         * Function that can be used to filter out dates within the datepicker.
89277
         * @param {?} value
89278
         * @return {?}
89279
         */
89280
        function (value) {
89281
            this._dateFilter = value;
89282
            this._validatorOnChange();
89283
        },
89284
        enumerable: true,
89285
        configurable: true
89286
    });
89287
    Object.defineProperty(MatDatepickerInput.prototype, "value", {
89288
        get: /**
89289
         * The value of the input.
89290
         * @return {?}
89291
         */
89292
        function () { return this._value; },
89293
        set: /**
89294
         * @param {?} value
89295
         * @return {?}
89296
         */
89297
        function (value) {
89298
            value = this._dateAdapter.deserialize(value);
89299
            this._lastValueValid = !value || this._dateAdapter.isValid(value);
89300
            value = this._getValidDateOrNull(value);
89301
            var /** @type {?} */ oldDate = this.value;
89302
            this._value = value;
89303
            this._formatValue(value);
89304
            if (!this._dateAdapter.sameDate(oldDate, value)) {
89305
                this._valueChange.emit(value);
89306
            }
89307
        },
89308
        enumerable: true,
89309
        configurable: true
89310
    });
89311
    Object.defineProperty(MatDatepickerInput.prototype, "min", {
89312
        get: /**
89313
         * The minimum valid date.
89314
         * @return {?}
89315
         */
89316
        function () { return this._min; },
89317
        set: /**
89318
         * @param {?} value
89319
         * @return {?}
89320
         */
89321
        function (value) {
89322
            this._min = this._getValidDateOrNull(this._dateAdapter.deserialize(value));
89323
            this._validatorOnChange();
89324
        },
89325
        enumerable: true,
89326
        configurable: true
89327
    });
89328
    Object.defineProperty(MatDatepickerInput.prototype, "max", {
89329
        get: /**
89330
         * The maximum valid date.
89331
         * @return {?}
89332
         */
89333
        function () { return this._max; },
89334
        set: /**
89335
         * @param {?} value
89336
         * @return {?}
89337
         */
89338
        function (value) {
89339
            this._max = this._getValidDateOrNull(this._dateAdapter.deserialize(value));
89340
            this._validatorOnChange();
89341
        },
89342
        enumerable: true,
89343
        configurable: true
89344
    });
89345
    Object.defineProperty(MatDatepickerInput.prototype, "disabled", {
89346
        get: /**
89347
         * Whether the datepicker-input is disabled.
89348
         * @return {?}
89349
         */
89350
        function () { return !!this._disabled; },
89351
        set: /**
89352
         * @param {?} value
89353
         * @return {?}
89354
         */
89355
        function (value) {
89356
            var /** @type {?} */ newValue = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_9__["coerceBooleanProperty"])(value);
89357
            var /** @type {?} */ element = this._elementRef.nativeElement;
89358
            if (this._disabled !== newValue) {
89359
                this._disabled = newValue;
89360
                this._disabledChange.emit(newValue);
89361
            }
89362
            // We need to null check the `blur` method, because it's undefined during SSR.
89363
            if (newValue && element.blur) {
89364
                // Normally, native input elements automatically blur if they turn disabled. This behavior
89365
                // is problematic, because it would mean that it triggers another change detection cycle,
89366
                // which then causes a changed after checked error if the input element was focused before.
89367
                element.blur();
89368
            }
89369
        },
89370
        enumerable: true,
89371
        configurable: true
89372
    });
89373
    /**
89374
     * @return {?}
89375
     */
89376
    MatDatepickerInput.prototype.ngOnDestroy = /**
89377
     * @return {?}
89378
     */
89379
    function () {
89380
        this._datepickerSubscription.unsubscribe();
89381
        this._localeSubscription.unsubscribe();
89382
        this._valueChange.complete();
89383
        this._disabledChange.complete();
89384
    };
89385
    /** @docs-private */
89386
    /**
89387
     * \@docs-private
89388
     * @param {?} fn
89389
     * @return {?}
89390
     */
89391
    MatDatepickerInput.prototype.registerOnValidatorChange = /**
89392
     * \@docs-private
89393
     * @param {?} fn
89394
     * @return {?}
89395
     */
89396
    function (fn) {
89397
        this._validatorOnChange = fn;
89398
    };
89399
    /** @docs-private */
89400
    /**
89401
     * \@docs-private
89402
     * @param {?} c
89403
     * @return {?}
89404
     */
89405
    MatDatepickerInput.prototype.validate = /**
89406
     * \@docs-private
89407
     * @param {?} c
89408
     * @return {?}
89409
     */
89410
    function (c) {
89411
        return this._validator ? this._validator(c) : null;
89412
    };
89413
    /**
89414
     * @deprecated
89415
     * @breaking-change 7.0.0 Use `getConnectedOverlayOrigin` instead
89416
     */
89417
    /**
89418
     * @deprecated
89419
     * \@breaking-change 7.0.0 Use `getConnectedOverlayOrigin` instead
89420
     * @return {?}
89421
     */
89422
    MatDatepickerInput.prototype.getPopupConnectionElementRef = /**
89423
     * @deprecated
89424
     * \@breaking-change 7.0.0 Use `getConnectedOverlayOrigin` instead
89425
     * @return {?}
89426
     */
89427
    function () {
89428
        return this.getConnectedOverlayOrigin();
89429
    };
89430
    /**
89431
     * Gets the element that the datepicker popup should be connected to.
89432
     * @return The element to connect the popup to.
89433
     */
89434
    /**
89435
     * Gets the element that the datepicker popup should be connected to.
89436
     * @return {?} The element to connect the popup to.
89437
     */
89438
    MatDatepickerInput.prototype.getConnectedOverlayOrigin = /**
89439
     * Gets the element that the datepicker popup should be connected to.
89440
     * @return {?} The element to connect the popup to.
89441
     */
89442
    function () {
89443
        return this._formField ? this._formField.getConnectedOverlayOrigin() : this._elementRef;
89444
    };
89445
    // Implemented as part of ControlValueAccessor.
89446
    /**
89447
     * @param {?} value
89448
     * @return {?}
89449
     */
89450
    MatDatepickerInput.prototype.writeValue = /**
89451
     * @param {?} value
89452
     * @return {?}
89453
     */
89454
    function (value) {
89455
        this.value = value;
89456
    };
89457
    // Implemented as part of ControlValueAccessor.
89458
    /**
89459
     * @param {?} fn
89460
     * @return {?}
89461
     */
89462
    MatDatepickerInput.prototype.registerOnChange = /**
89463
     * @param {?} fn
89464
     * @return {?}
89465
     */
89466
    function (fn) {
89467
        this._cvaOnChange = fn;
89468
    };
89469
    // Implemented as part of ControlValueAccessor.
89470
    /**
89471
     * @param {?} fn
89472
     * @return {?}
89473
     */
89474
    MatDatepickerInput.prototype.registerOnTouched = /**
89475
     * @param {?} fn
89476
     * @return {?}
89477
     */
89478
    function (fn) {
89479
        this._onTouched = fn;
89480
    };
89481
    // Implemented as part of ControlValueAccessor.
89482
    /**
89483
     * @param {?} isDisabled
89484
     * @return {?}
89485
     */
89486
    MatDatepickerInput.prototype.setDisabledState = /**
89487
     * @param {?} isDisabled
89488
     * @return {?}
89489
     */
89490
    function (isDisabled) {
89491
        this.disabled = isDisabled;
89492
    };
89493
    /**
89494
     * @param {?} event
89495
     * @return {?}
89496
     */
89497
    MatDatepickerInput.prototype._onKeydown = /**
89498
     * @param {?} event
89499
     * @return {?}
89500
     */
89501
    function (event) {
89502
        if (this._datepicker && event.altKey && event.keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_3__["DOWN_ARROW"]) {
89503
            this._datepicker.open();
89504
            event.preventDefault();
89505
        }
89506
    };
89507
    /**
89508
     * @param {?} value
89509
     * @return {?}
89510
     */
89511
    MatDatepickerInput.prototype._onInput = /**
89512
     * @param {?} value
89513
     * @return {?}
89514
     */
89515
    function (value) {
89516
        var /** @type {?} */ date = this._dateAdapter.parse(value, this._dateFormats.parse.dateInput);
89517
        this._lastValueValid = !date || this._dateAdapter.isValid(date);
89518
        date = this._getValidDateOrNull(date);
89519
        if (!this._dateAdapter.sameDate(date, this._value)) {
89520
            this._value = date;
89521
            this._cvaOnChange(date);
89522
            this._valueChange.emit(date);
89523
            this.dateInput.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));
89524
        }
89525
    };
89526
    /**
89527
     * @return {?}
89528
     */
89529
    MatDatepickerInput.prototype._onChange = /**
89530
     * @return {?}
89531
     */
89532
    function () {
89533
        this.dateChange.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));
89534
    };
89535
    /** Returns the palette used by the input's form field, if any. */
89536
    /**
89537
     * Returns the palette used by the input's form field, if any.
89538
     * @return {?}
89539
     */
89540
    MatDatepickerInput.prototype._getThemePalette = /**
89541
     * Returns the palette used by the input's form field, if any.
89542
     * @return {?}
89543
     */
89544
    function () {
89545
        return this._formField ? this._formField.color : undefined;
89546
    };
89547
    /** Handles blur events on the input. */
89548
    /**
89549
     * Handles blur events on the input.
89550
     * @return {?}
89551
     */
89552
    MatDatepickerInput.prototype._onBlur = /**
89553
     * Handles blur events on the input.
89554
     * @return {?}
89555
     */
89556
    function () {
89557
        // Reformat the input only if we have a valid value.
89558
        if (this.value) {
89559
            this._formatValue(this.value);
89560
        }
89561
        this._onTouched();
89562
    };
89563
    /**
89564
     * Formats a value and sets it on the input element.
89565
     * @param {?} value
89566
     * @return {?}
89567
     */
89568
    MatDatepickerInput.prototype._formatValue = /**
89569
     * Formats a value and sets it on the input element.
89570
     * @param {?} value
89571
     * @return {?}
89572
     */
89573
    function (value) {
89574
        this._elementRef.nativeElement.value =
89575
            value ? this._dateAdapter.format(value, this._dateFormats.display.dateInput) : '';
89576
    };
89577
    /**
89578
     * @param {?} obj The object to check.
89579
     * @return {?} The given object if it is both a date instance and valid, otherwise null.
89580
     */
89581
    MatDatepickerInput.prototype._getValidDateOrNull = /**
89582
     * @param {?} obj The object to check.
89583
     * @return {?} The given object if it is both a date instance and valid, otherwise null.
89584
     */
89585
    function (obj) {
89586
        return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj)) ? obj : null;
89587
    };
89588
    MatDatepickerInput.decorators = [
89589
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
89590
                    selector: 'input[matDatepicker]',
89591
                    providers: [
89592
                        MAT_DATEPICKER_VALUE_ACCESSOR,
89593
                        MAT_DATEPICKER_VALIDATORS,
89594
                        { provide: _angular_material_input__WEBPACK_IMPORTED_MODULE_15__["MAT_INPUT_VALUE_ACCESSOR"], useExisting: MatDatepickerInput },
89595
                    ],
89596
                    host: {
89597
                        '[attr.aria-haspopup]': 'true',
89598
                        '[attr.aria-owns]': '(_datepicker?.opened && _datepicker.id) || null',
89599
                        '[attr.min]': 'min ? _dateAdapter.toIso8601(min) : null',
89600
                        '[attr.max]': 'max ? _dateAdapter.toIso8601(max) : null',
89601
                        '[disabled]': 'disabled',
89602
                        '(input)': '_onInput($event.target.value)',
89603
                        '(change)': '_onChange()',
89604
                        '(blur)': '_onBlur()',
89605
                        '(keydown)': '_onKeydown($event)',
89606
                    },
89607
                    exportAs: 'matDatepickerInput',
89608
                },] },
89609
    ];
89610
    /** @nocollapse */
89611
    MatDatepickerInput.ctorParameters = function () { return [
89612
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
89613
        { type: _angular_material_core__WEBPACK_IMPORTED_MODULE_4__["DateAdapter"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
89614
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_material_core__WEBPACK_IMPORTED_MODULE_4__["MAT_DATE_FORMATS"],] },] },
89615
        { type: _angular_material_form_field__WEBPACK_IMPORTED_MODULE_14__["MatFormField"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
89616
    ]; };
89617
    MatDatepickerInput.propDecorators = {
89618
        "matDatepicker": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
89619
        "matDatepickerFilter": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
89620
        "value": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
89621
        "min": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
89622
        "max": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
89623
        "disabled": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
89624
        "dateChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
89625
        "dateInput": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
89626
    };
89627
    return MatDatepickerInput;
89628
}());
89629
 
89630
/**
89631
 * @fileoverview added by tsickle
89632
 * @suppress {checkTypes} checked by tsc
89633
 */
89634
/**
89635
 * Can be used to override the icon of a `matDatepickerToggle`.
89636
 */
89637
var MatDatepickerToggleIcon = /** @class */ (function () {
89638
    function MatDatepickerToggleIcon() {
89639
    }
89640
    MatDatepickerToggleIcon.decorators = [
89641
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
89642
                    selector: '[matDatepickerToggleIcon]'
89643
                },] },
89644
    ];
89645
    return MatDatepickerToggleIcon;
89646
}());
89647
/**
89648
 * @template D
89649
 */
89650
var MatDatepickerToggle = /** @class */ (function () {
89651
    function MatDatepickerToggle(_intl, _changeDetectorRef) {
89652
        this._intl = _intl;
89653
        this._changeDetectorRef = _changeDetectorRef;
89654
        this._stateChanges = rxjs__WEBPACK_IMPORTED_MODULE_1__["Subscription"].EMPTY;
89655
    }
89656
    Object.defineProperty(MatDatepickerToggle.prototype, "disabled", {
89657
        get: /**
89658
         * Whether the toggle button is disabled.
89659
         * @return {?}
89660
         */
89661
        function () {
89662
            return this._disabled === undefined ? this.datepicker.disabled : !!this._disabled;
89663
        },
89664
        set: /**
89665
         * @param {?} value
89666
         * @return {?}
89667
         */
89668
        function (value) {
89669
            this._disabled = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_9__["coerceBooleanProperty"])(value);
89670
        },
89671
        enumerable: true,
89672
        configurable: true
89673
    });
89674
    /**
89675
     * @param {?} changes
89676
     * @return {?}
89677
     */
89678
    MatDatepickerToggle.prototype.ngOnChanges = /**
89679
     * @param {?} changes
89680
     * @return {?}
89681
     */
89682
    function (changes) {
89683
        if (changes["datepicker"]) {
89684
            this._watchStateChanges();
89685
        }
89686
    };
89687
    /**
89688
     * @return {?}
89689
     */
89690
    MatDatepickerToggle.prototype.ngOnDestroy = /**
89691
     * @return {?}
89692
     */
89693
    function () {
89694
        this._stateChanges.unsubscribe();
89695
    };
89696
    /**
89697
     * @return {?}
89698
     */
89699
    MatDatepickerToggle.prototype.ngAfterContentInit = /**
89700
     * @return {?}
89701
     */
89702
    function () {
89703
        this._watchStateChanges();
89704
    };
89705
    /**
89706
     * @param {?} event
89707
     * @return {?}
89708
     */
89709
    MatDatepickerToggle.prototype._open = /**
89710
     * @param {?} event
89711
     * @return {?}
89712
     */
89713
    function (event) {
89714
        if (this.datepicker && !this.disabled) {
89715
            this.datepicker.open();
89716
            event.stopPropagation();
89717
        }
89718
    };
89719
    /**
89720
     * @return {?}
89721
     */
89722
    MatDatepickerToggle.prototype._watchStateChanges = /**
89723
     * @return {?}
89724
     */
89725
    function () {
89726
        var _this = this;
89727
        var /** @type {?} */ datepickerDisabled = this.datepicker ? this.datepicker._disabledChange : Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["of"])();
89728
        var /** @type {?} */ inputDisabled = this.datepicker && this.datepicker._datepickerInput ?
89729
            this.datepicker._datepickerInput._disabledChange : Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["of"])();
89730
        var /** @type {?} */ datepickerToggled = this.datepicker ?
89731
            Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["merge"])(this.datepicker.openedStream, this.datepicker.closedStream) :
89732
            Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["of"])();
89733
        this._stateChanges.unsubscribe();
89734
        this._stateChanges = Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["merge"])(this._intl.changes, datepickerDisabled, inputDisabled, datepickerToggled).subscribe(function () { return _this._changeDetectorRef.markForCheck(); });
89735
    };
89736
    MatDatepickerToggle.decorators = [
89737
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-datepicker-toggle',
89738
                    template: "<button mat-icon-button type=\"button\" aria-haspopup=\"true\" [attr.aria-label]=\"_intl.openCalendarLabel\" [disabled]=\"disabled\" (click)=\"_open($event)\"><svg *ngIf=\"!_customIcon\" class=\"mat-datepicker-toggle-default-icon\" viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" fill=\"currentColor\" focusable=\"false\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\"/></svg><ng-content select=\"[matDatepickerToggleIcon]\"></ng-content></button>",
89739
                    styles: [".mat-form-field-appearance-legacy .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-datepicker-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-datepicker-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-datepicker-toggle-default-icon{margin:auto}"],
89740
                    host: {
89741
                        'class': 'mat-datepicker-toggle',
89742
                        '[class.mat-datepicker-toggle-active]': 'datepicker && datepicker.opened',
89743
                        '[class.mat-accent]': 'datepicker && datepicker.color === "accent"',
89744
                        '[class.mat-warn]': 'datepicker && datepicker.color === "warn"',
89745
                    },
89746
                    exportAs: 'matDatepickerToggle',
89747
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
89748
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
89749
                },] },
89750
    ];
89751
    /** @nocollapse */
89752
    MatDatepickerToggle.ctorParameters = function () { return [
89753
        { type: MatDatepickerIntl, },
89754
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"], },
89755
    ]; };
89756
    MatDatepickerToggle.propDecorators = {
89757
        "datepicker": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['for',] },],
89758
        "disabled": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
89759
        "_customIcon": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"], args: [MatDatepickerToggleIcon,] },],
89760
    };
89761
    return MatDatepickerToggle;
89762
}());
89763
 
89764
/**
89765
 * @fileoverview added by tsickle
89766
 * @suppress {checkTypes} checked by tsc
89767
 */
89768
var MatDatepickerModule = /** @class */ (function () {
89769
    function MatDatepickerModule() {
89770
    }
89771
    MatDatepickerModule.decorators = [
89772
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
89773
                    imports: [
89774
                        _angular_common__WEBPACK_IMPORTED_MODULE_11__["CommonModule"],
89775
                        _angular_material_button__WEBPACK_IMPORTED_MODULE_17__["MatButtonModule"],
89776
                        _angular_material_dialog__WEBPACK_IMPORTED_MODULE_12__["MatDialogModule"],
89777
                        _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_10__["OverlayModule"],
89778
                        _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_16__["A11yModule"],
89779
                        _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_6__["PortalModule"],
89780
                    ],
89781
                    exports: [
89782
                        MatCalendar,
89783
                        MatCalendarBody,
89784
                        MatDatepicker,
89785
                        MatDatepickerContent,
89786
                        MatDatepickerInput,
89787
                        MatDatepickerToggle,
89788
                        MatDatepickerToggleIcon,
89789
                        MatMonthView,
89790
                        MatYearView,
89791
                        MatMultiYearView,
89792
                        MatCalendarHeader,
89793
                    ],
89794
                    declarations: [
89795
                        MatCalendar,
89796
                        MatCalendarBody,
89797
                        MatDatepicker,
89798
                        MatDatepickerContent,
89799
                        MatDatepickerInput,
89800
                        MatDatepickerToggle,
89801
                        MatDatepickerToggleIcon,
89802
                        MatMonthView,
89803
                        MatYearView,
89804
                        MatMultiYearView,
89805
                        MatCalendarHeader,
89806
                    ],
89807
                    providers: [
89808
                        MatDatepickerIntl,
89809
                        MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER,
89810
                    ],
89811
                    entryComponents: [
89812
                        MatDatepickerContent,
89813
                        MatCalendarHeader,
89814
                    ]
89815
                },] },
89816
    ];
89817
    return MatDatepickerModule;
89818
}());
89819
 
89820
/**
89821
 * @fileoverview added by tsickle
89822
 * @suppress {checkTypes} checked by tsc
89823
 */
89824
 
89825
/**
89826
 * @fileoverview added by tsickle
89827
 * @suppress {checkTypes} checked by tsc
89828
 */
89829
 
89830
 
89831
//# sourceMappingURL=datepicker.es5.js.map
89832
 
89833
 
89834
/***/ }),
89835
 
89836
/***/ "./node_modules/@angular/material/esm5/dialog.es5.js":
89837
/*!***********************************************************!*\
89838
  !*** ./node_modules/@angular/material/esm5/dialog.es5.js ***!
89839
  \***********************************************************/
89840
/*! exports provided: MatDialogModule, MAT_DIALOG_DATA, MAT_DIALOG_DEFAULT_OPTIONS, MAT_DIALOG_SCROLL_STRATEGY, MAT_DIALOG_SCROLL_STRATEGY_FACTORY, MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY, MAT_DIALOG_SCROLL_STRATEGY_PROVIDER, MatDialog, throwMatDialogContentAlreadyAttachedError, MatDialogContainer, MatDialogClose, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogConfig, MatDialogRef, matDialogAnimations */
89841
/***/ (function(module, __webpack_exports__, __webpack_require__) {
89842
 
89843
"use strict";
89844
__webpack_require__.r(__webpack_exports__);
89845
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatDialogModule", function() { return MatDialogModule; });
89846
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_DIALOG_DATA", function() { return MAT_DIALOG_DATA; });
89847
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_DIALOG_DEFAULT_OPTIONS", function() { return MAT_DIALOG_DEFAULT_OPTIONS; });
89848
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_DIALOG_SCROLL_STRATEGY", function() { return MAT_DIALOG_SCROLL_STRATEGY; });
89849
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_DIALOG_SCROLL_STRATEGY_FACTORY", function() { return MAT_DIALOG_SCROLL_STRATEGY_FACTORY; });
89850
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY", function() { return MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY; });
89851
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_DIALOG_SCROLL_STRATEGY_PROVIDER", function() { return MAT_DIALOG_SCROLL_STRATEGY_PROVIDER; });
89852
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatDialog", function() { return MatDialog; });
89853
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throwMatDialogContentAlreadyAttachedError", function() { return throwMatDialogContentAlreadyAttachedError; });
89854
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatDialogContainer", function() { return MatDialogContainer; });
89855
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatDialogClose", function() { return MatDialogClose; });
89856
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatDialogTitle", function() { return MatDialogTitle; });
89857
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatDialogContent", function() { return MatDialogContent; });
89858
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatDialogActions", function() { return MatDialogActions; });
89859
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatDialogConfig", function() { return MatDialogConfig; });
89860
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatDialogRef", function() { return MatDialogRef; });
89861
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matDialogAnimations", function() { return matDialogAnimations; });
89862
/* harmony import */ var _angular_animations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/animations */ "./node_modules/@angular/animations/fesm5/animations.js");
89863
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
89864
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
89865
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
89866
/* harmony import */ var _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/cdk/portal */ "./node_modules/@angular/cdk/esm5/portal.es5.js");
89867
/* harmony import */ var _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/cdk/a11y */ "./node_modules/@angular/cdk/esm5/a11y.es5.js");
89868
/* harmony import */ var _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/cdk/keycodes */ "./node_modules/@angular/cdk/esm5/keycodes.es5.js");
89869
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
89870
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
89871
/* harmony import */ var _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/cdk/bidi */ "./node_modules/@angular/cdk/esm5/bidi.es5.js");
89872
/* harmony import */ var _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/cdk/overlay */ "./node_modules/@angular/cdk/esm5/overlay.es5.js");
89873
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
89874
/**
89875
 * @license
89876
 * Copyright Google LLC All Rights Reserved.
89877
 *
89878
 * Use of this source code is governed by an MIT-style license that can be
89879
 * found in the LICENSE file at https://angular.io/license
89880
 */
89881
 
89882
 
89883
 
89884
 
89885
 
89886
 
89887
 
89888
 
89889
 
89890
 
89891
 
89892
 
89893
 
89894
/**
89895
 * @fileoverview added by tsickle
89896
 * @suppress {checkTypes} checked by tsc
89897
 */
89898
/**
89899
 * Configuration for opening a modal dialog with the MatDialog service.
89900
 * @template D
89901
 */
89902
var  /**
89903
 * Configuration for opening a modal dialog with the MatDialog service.
89904
 * @template D
89905
 */
89906
MatDialogConfig = /** @class */ (function () {
89907
    function MatDialogConfig() {
89908
        /**
89909
         * The ARIA role of the dialog element.
89910
         */
89911
        this.role = 'dialog';
89912
        /**
89913
         * Custom class for the overlay pane.
89914
         */
89915
        this.panelClass = '';
89916
        /**
89917
         * Whether the dialog has a backdrop.
89918
         */
89919
        this.hasBackdrop = true;
89920
        /**
89921
         * Custom class for the backdrop,
89922
         */
89923
        this.backdropClass = '';
89924
        /**
89925
         * Whether the user can use escape or clicking on the backdrop to close the modal.
89926
         */
89927
        this.disableClose = false;
89928
        /**
89929
         * Width of the dialog.
89930
         */
89931
        this.width = '';
89932
        /**
89933
         * Height of the dialog.
89934
         */
89935
        this.height = '';
89936
        /**
89937
         * Max-width of the dialog. If a number is provided, pixel units are assumed. Defaults to 80vw
89938
         */
89939
        this.maxWidth = '80vw';
89940
        /**
89941
         * Data being injected into the child component.
89942
         */
89943
        this.data = null;
89944
        /**
89945
         * ID of the element that describes the dialog.
89946
         */
89947
        this.ariaDescribedBy = null;
89948
        /**
89949
         * Aria label to assign to the dialog element
89950
         */
89951
        this.ariaLabel = null;
89952
        /**
89953
         * Whether the dialog should focus the first focusable element on open.
89954
         */
89955
        this.autoFocus = true;
89956
        /**
89957
         * Whether the dialog should close when the user goes backwards/forwards in history.
89958
         */
89959
        this.closeOnNavigation = true;
89960
    }
89961
    return MatDialogConfig;
89962
}());
89963
 
89964
/**
89965
 * @fileoverview added by tsickle
89966
 * @suppress {checkTypes} checked by tsc
89967
 */
89968
/**
89969
 * Animations used by MatDialog.
89970
 */
89971
var /** @type {?} */ matDialogAnimations = {
89972
    /** Animation that slides the dialog in and out of view and fades the opacity. */
89973
    slideDialog: Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["trigger"])('slideDialog', [
89974
        // Note: The `enter` animation doesn't transition to something like `translate3d(0, 0, 0)
89975
        // scale(1)`, because for some reason specifying the transform explicitly, causes IE both
89976
        // to blur the dialog content and decimate the animation performance. Leaving it as `none`
89977
        // solves both issues.
89978
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('enter', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({ transform: 'none', opacity: 1 })),
89979
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('void', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({ transform: 'translate3d(0, 25%, 0) scale(0.9)', opacity: 0 })),
89980
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('exit', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({ transform: 'translate3d(0, 25%, 0)', opacity: 0 })),
89981
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["transition"])('* => *', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["animate"])('400ms cubic-bezier(0.25, 0.8, 0.25, 1)')),
89982
    ])
89983
};
89984
 
89985
/**
89986
 * @fileoverview added by tsickle
89987
 * @suppress {checkTypes} checked by tsc
89988
 */
89989
/**
89990
 * Throws an exception for the case when a ComponentPortal is
89991
 * attached to a DomPortalOutlet without an origin.
89992
 * \@docs-private
89993
 * @return {?}
89994
 */
89995
function throwMatDialogContentAlreadyAttachedError() {
89996
    throw Error('Attempting to attach dialog content after content is already attached');
89997
}
89998
/**
89999
 * Internal component that wraps user-provided dialog content.
90000
 * Animation is based on https://material.io/guidelines/motion/choreography.html.
90001
 * \@docs-private
90002
 */
90003
var MatDialogContainer = /** @class */ (function (_super) {
90004
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(MatDialogContainer, _super);
90005
    function MatDialogContainer(_elementRef, _focusTrapFactory, _changeDetectorRef, _document, _config) {
90006
        var _this = _super.call(this) || this;
90007
        _this._elementRef = _elementRef;
90008
        _this._focusTrapFactory = _focusTrapFactory;
90009
        _this._changeDetectorRef = _changeDetectorRef;
90010
        _this._document = _document;
90011
        _this._config = _config;
90012
        /**
90013
         * Element that was focused before the dialog was opened. Save this to restore upon close.
90014
         */
90015
        _this._elementFocusedBeforeDialogWasOpened = null;
90016
        /**
90017
         * State of the dialog animation.
90018
         */
90019
        _this._state = 'enter';
90020
        /**
90021
         * Emits when an animation state changes.
90022
         */
90023
        _this._animationStateChanged = new _angular_core__WEBPACK_IMPORTED_MODULE_2__["EventEmitter"]();
90024
        /**
90025
         * ID of the element that should be considered as the dialog's label.
90026
         */
90027
        _this._ariaLabelledBy = null;
90028
        return _this;
90029
    }
90030
    /**
90031
     * Attach a ComponentPortal as content to this dialog container.
90032
     * @param portal Portal to be attached as the dialog content.
90033
     */
90034
    /**
90035
     * Attach a ComponentPortal as content to this dialog container.
90036
     * @template T
90037
     * @param {?} portal Portal to be attached as the dialog content.
90038
     * @return {?}
90039
     */
90040
    MatDialogContainer.prototype.attachComponentPortal = /**
90041
     * Attach a ComponentPortal as content to this dialog container.
90042
     * @template T
90043
     * @param {?} portal Portal to be attached as the dialog content.
90044
     * @return {?}
90045
     */
90046
    function (portal) {
90047
        if (this._portalOutlet.hasAttached()) {
90048
            throwMatDialogContentAlreadyAttachedError();
90049
        }
90050
        this._savePreviouslyFocusedElement();
90051
        return this._portalOutlet.attachComponentPortal(portal);
90052
    };
90053
    /**
90054
     * Attach a TemplatePortal as content to this dialog container.
90055
     * @param portal Portal to be attached as the dialog content.
90056
     */
90057
    /**
90058
     * Attach a TemplatePortal as content to this dialog container.
90059
     * @template C
90060
     * @param {?} portal Portal to be attached as the dialog content.
90061
     * @return {?}
90062
     */
90063
    MatDialogContainer.prototype.attachTemplatePortal = /**
90064
     * Attach a TemplatePortal as content to this dialog container.
90065
     * @template C
90066
     * @param {?} portal Portal to be attached as the dialog content.
90067
     * @return {?}
90068
     */
90069
    function (portal) {
90070
        if (this._portalOutlet.hasAttached()) {
90071
            throwMatDialogContentAlreadyAttachedError();
90072
        }
90073
        this._savePreviouslyFocusedElement();
90074
        return this._portalOutlet.attachTemplatePortal(portal);
90075
    };
90076
    /**
90077
     * Moves the focus inside the focus trap.
90078
     * @return {?}
90079
     */
90080
    MatDialogContainer.prototype._trapFocus = /**
90081
     * Moves the focus inside the focus trap.
90082
     * @return {?}
90083
     */
90084
    function () {
90085
        if (!this._focusTrap) {
90086
            this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);
90087
        }
90088
        // If were to attempt to focus immediately, then the content of the dialog would not yet be
90089
        // ready in instances where change detection has to run first. To deal with this, we simply
90090
        // wait for the microtask queue to be empty.
90091
        if (this._config.autoFocus) {
90092
            this._focusTrap.focusInitialElementWhenReady();
90093
        }
90094
    };
90095
    /**
90096
     * Restores focus to the element that was focused before the dialog opened.
90097
     * @return {?}
90098
     */
90099
    MatDialogContainer.prototype._restoreFocus = /**
90100
     * Restores focus to the element that was focused before the dialog opened.
90101
     * @return {?}
90102
     */
90103
    function () {
90104
        var /** @type {?} */ toFocus = this._elementFocusedBeforeDialogWasOpened;
90105
        // We need the extra check, because IE can set the `activeElement` to null in some cases.
90106
        if (toFocus && typeof toFocus.focus === 'function') {
90107
            toFocus.focus();
90108
        }
90109
        if (this._focusTrap) {
90110
            this._focusTrap.destroy();
90111
        }
90112
    };
90113
    /**
90114
     * Saves a reference to the element that was focused before the dialog was opened.
90115
     * @return {?}
90116
     */
90117
    MatDialogContainer.prototype._savePreviouslyFocusedElement = /**
90118
     * Saves a reference to the element that was focused before the dialog was opened.
90119
     * @return {?}
90120
     */
90121
    function () {
90122
        var _this = this;
90123
        if (this._document) {
90124
            this._elementFocusedBeforeDialogWasOpened = /** @type {?} */ (this._document.activeElement);
90125
            // Note that there is no focus method when rendering on the server.
90126
            if (this._elementRef.nativeElement.focus) {
90127
                // Move focus onto the dialog immediately in order to prevent the user from accidentally
90128
                // opening multiple dialogs at the same time. Needs to be async, because the element
90129
                // may not be focusable immediately.
90130
                Promise.resolve().then(function () { return _this._elementRef.nativeElement.focus(); });
90131
            }
90132
        }
90133
    };
90134
    /** Callback, invoked whenever an animation on the host completes. */
90135
    /**
90136
     * Callback, invoked whenever an animation on the host completes.
90137
     * @param {?} event
90138
     * @return {?}
90139
     */
90140
    MatDialogContainer.prototype._onAnimationDone = /**
90141
     * Callback, invoked whenever an animation on the host completes.
90142
     * @param {?} event
90143
     * @return {?}
90144
     */
90145
    function (event) {
90146
        if (event.toState === 'enter') {
90147
            this._trapFocus();
90148
        }
90149
        else if (event.toState === 'exit') {
90150
            this._restoreFocus();
90151
        }
90152
        this._animationStateChanged.emit(event);
90153
    };
90154
    /** Callback, invoked when an animation on the host starts. */
90155
    /**
90156
     * Callback, invoked when an animation on the host starts.
90157
     * @param {?} event
90158
     * @return {?}
90159
     */
90160
    MatDialogContainer.prototype._onAnimationStart = /**
90161
     * Callback, invoked when an animation on the host starts.
90162
     * @param {?} event
90163
     * @return {?}
90164
     */
90165
    function (event) {
90166
        this._animationStateChanged.emit(event);
90167
    };
90168
    /** Starts the dialog exit animation. */
90169
    /**
90170
     * Starts the dialog exit animation.
90171
     * @return {?}
90172
     */
90173
    MatDialogContainer.prototype._startExitAnimation = /**
90174
     * Starts the dialog exit animation.
90175
     * @return {?}
90176
     */
90177
    function () {
90178
        this._state = 'exit';
90179
        // Mark the container for check so it can react if the
90180
        // view container is using OnPush change detection.
90181
        this._changeDetectorRef.markForCheck();
90182
    };
90183
    MatDialogContainer.decorators = [
90184
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Component"], args: [{selector: 'mat-dialog-container',
90185
                    template: "<ng-template cdkPortalOutlet></ng-template>",
90186
                    styles: [".mat-dialog-container{box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);display:block;padding:24px;border-radius:2px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}@media screen and (-ms-high-contrast:active){.mat-dialog-container{outline:solid 1px}}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:12px 0;display:flex;flex-wrap:wrap;margin-bottom:-24px}.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions .mat-button+.mat-button,.mat-dialog-actions .mat-button+.mat-raised-button,.mat-dialog-actions .mat-raised-button+.mat-button,.mat-dialog-actions .mat-raised-button+.mat-raised-button{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button+.mat-button,[dir=rtl] .mat-dialog-actions .mat-button+.mat-raised-button,[dir=rtl] .mat-dialog-actions .mat-raised-button+.mat-button,[dir=rtl] .mat-dialog-actions .mat-raised-button+.mat-raised-button{margin-left:0;margin-right:8px}"],
90187
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ViewEncapsulation"].None,
90188
                    // Using OnPush for dialogs caused some G3 sync issues. Disabled until we can track them down.
90189
                    // tslint:disable-next-line:validate-decorators
90190
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ChangeDetectionStrategy"].Default,
90191
                    animations: [matDialogAnimations.slideDialog],
90192
                    host: {
90193
                        'class': 'mat-dialog-container',
90194
                        'tabindex': '-1',
90195
                        'aria-modal': 'true',
90196
                        '[attr.id]': '_id',
90197
                        '[attr.role]': '_config.role',
90198
                        '[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledBy',
90199
                        '[attr.aria-label]': '_config.ariaLabel',
90200
                        '[attr.aria-describedby]': '_config.ariaDescribedBy || null',
90201
                        '[@slideDialog]': '_state',
90202
                        '(@slideDialog.start)': '_onAnimationStart($event)',
90203
                        '(@slideDialog.done)': '_onAnimationDone($event)',
90204
                    },
90205
                },] },
90206
    ];
90207
    /** @nocollapse */
90208
    MatDialogContainer.ctorParameters = function () { return [
90209
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ElementRef"], },
90210
        { type: _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_5__["FocusTrapFactory"], },
90211
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ChangeDetectorRef"], },
90212
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"],] },] },
90213
        { type: MatDialogConfig, },
90214
    ]; };
90215
    MatDialogContainer.propDecorators = {
90216
        "_portalOutlet": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ViewChild"], args: [_angular_cdk_portal__WEBPACK_IMPORTED_MODULE_4__["CdkPortalOutlet"],] },],
90217
    };
90218
    return MatDialogContainer;
90219
}(_angular_cdk_portal__WEBPACK_IMPORTED_MODULE_4__["BasePortalOutlet"]));
90220
 
90221
/**
90222
 * @fileoverview added by tsickle
90223
 * @suppress {checkTypes} checked by tsc
90224
 */
90225
// TODO(jelbourn): resizing
90226
// Counter for unique dialog ids.
90227
var /** @type {?} */ uniqueId = 0;
90228
/**
90229
 * Reference to a dialog opened via the MatDialog service.
90230
 * @template T, R
90231
 */
90232
var  /**
90233
 * Reference to a dialog opened via the MatDialog service.
90234
 * @template T, R
90235
 */
90236
MatDialogRef = /** @class */ (function () {
90237
    function MatDialogRef(_overlayRef, _containerInstance, location, id) {
90238
        if (id === void 0) { id = "mat-dialog-" + uniqueId++; }
90239
        var _this = this;
90240
        this._overlayRef = _overlayRef;
90241
        this._containerInstance = _containerInstance;
90242
        this.id = id;
90243
        /**
90244
         * Whether the user is allowed to close the dialog.
90245
         */
90246
        this.disableClose = this._containerInstance._config.disableClose;
90247
        /**
90248
         * Subject for notifying the user that the dialog has finished opening.
90249
         */
90250
        this._afterOpen = new rxjs__WEBPACK_IMPORTED_MODULE_7__["Subject"]();
90251
        /**
90252
         * Subject for notifying the user that the dialog has finished closing.
90253
         */
90254
        this._afterClosed = new rxjs__WEBPACK_IMPORTED_MODULE_7__["Subject"]();
90255
        /**
90256
         * Subject for notifying the user that the dialog has started closing.
90257
         */
90258
        this._beforeClose = new rxjs__WEBPACK_IMPORTED_MODULE_7__["Subject"]();
90259
        /**
90260
         * Subscription to changes in the user's location.
90261
         */
90262
        this._locationChanges = rxjs__WEBPACK_IMPORTED_MODULE_7__["Subscription"].EMPTY;
90263
        // Pass the id along to the container.
90264
        _containerInstance._id = id;
90265
        // Emit when opening animation completes
90266
        _containerInstance._animationStateChanged.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_8__["filter"])(function (event) { return event.phaseName === 'done' && event.toState === 'enter'; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_8__["take"])(1))
90267
            .subscribe(function () {
90268
            _this._afterOpen.next();
90269
            _this._afterOpen.complete();
90270
        });
90271
        // Dispose overlay when closing animation is complete
90272
        _containerInstance._animationStateChanged.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_8__["filter"])(function (event) { return event.phaseName === 'done' && event.toState === 'exit'; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_8__["take"])(1)).subscribe(function () { return _this._overlayRef.dispose(); });
90273
        _overlayRef.detachments().subscribe(function () {
90274
            _this._beforeClose.next(_this._result);
90275
            _this._beforeClose.complete();
90276
            _this._locationChanges.unsubscribe();
90277
            _this._afterClosed.next(_this._result);
90278
            _this._afterClosed.complete();
90279
            _this.componentInstance = /** @type {?} */ ((null));
90280
            _this._overlayRef.dispose();
90281
        });
90282
        _overlayRef.keydownEvents()
90283
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_8__["filter"])(function (event) { return event.keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["ESCAPE"] && !_this.disableClose; }))
90284
            .subscribe(function () { return _this.close(); });
90285
        if (location) {
90286
            // Close the dialog when the user goes forwards/backwards in history or when the location
90287
            // hash changes. Note that this usually doesn't include clicking on links (unless the user
90288
            // is using the `HashLocationStrategy`).
90289
            this._locationChanges = location.subscribe(function () {
90290
                if (_this._containerInstance._config.closeOnNavigation) {
90291
                    _this.close();
90292
                }
90293
            });
90294
        }
90295
    }
90296
    /**
90297
     * Close the dialog.
90298
     * @param dialogResult Optional result to return to the dialog opener.
90299
     */
90300
    /**
90301
     * Close the dialog.
90302
     * @param {?=} dialogResult Optional result to return to the dialog opener.
90303
     * @return {?}
90304
     */
90305
    MatDialogRef.prototype.close = /**
90306
     * Close the dialog.
90307
     * @param {?=} dialogResult Optional result to return to the dialog opener.
90308
     * @return {?}
90309
     */
90310
    function (dialogResult) {
90311
        var _this = this;
90312
        this._result = dialogResult;
90313
        // Transition the backdrop in parallel to the dialog.
90314
        this._containerInstance._animationStateChanged.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_8__["filter"])(function (event) { return event.phaseName === 'start'; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_8__["take"])(1))
90315
            .subscribe(function () {
90316
            _this._beforeClose.next(dialogResult);
90317
            _this._beforeClose.complete();
90318
            _this._overlayRef.detachBackdrop();
90319
        });
90320
        this._containerInstance._startExitAnimation();
90321
    };
90322
    /**
90323
     * Gets an observable that is notified when the dialog is finished opening.
90324
     */
90325
    /**
90326
     * Gets an observable that is notified when the dialog is finished opening.
90327
     * @return {?}
90328
     */
90329
    MatDialogRef.prototype.afterOpen = /**
90330
     * Gets an observable that is notified when the dialog is finished opening.
90331
     * @return {?}
90332
     */
90333
    function () {
90334
        return this._afterOpen.asObservable();
90335
    };
90336
    /**
90337
     * Gets an observable that is notified when the dialog is finished closing.
90338
     */
90339
    /**
90340
     * Gets an observable that is notified when the dialog is finished closing.
90341
     * @return {?}
90342
     */
90343
    MatDialogRef.prototype.afterClosed = /**
90344
     * Gets an observable that is notified when the dialog is finished closing.
90345
     * @return {?}
90346
     */
90347
    function () {
90348
        return this._afterClosed.asObservable();
90349
    };
90350
    /**
90351
     * Gets an observable that is notified when the dialog has started closing.
90352
     */
90353
    /**
90354
     * Gets an observable that is notified when the dialog has started closing.
90355
     * @return {?}
90356
     */
90357
    MatDialogRef.prototype.beforeClose = /**
90358
     * Gets an observable that is notified when the dialog has started closing.
90359
     * @return {?}
90360
     */
90361
    function () {
90362
        return this._beforeClose.asObservable();
90363
    };
90364
    /**
90365
     * Gets an observable that emits when the overlay's backdrop has been clicked.
90366
     */
90367
    /**
90368
     * Gets an observable that emits when the overlay's backdrop has been clicked.
90369
     * @return {?}
90370
     */
90371
    MatDialogRef.prototype.backdropClick = /**
90372
     * Gets an observable that emits when the overlay's backdrop has been clicked.
90373
     * @return {?}
90374
     */
90375
    function () {
90376
        return this._overlayRef.backdropClick();
90377
    };
90378
    /**
90379
     * Gets an observable that emits when keydown events are targeted on the overlay.
90380
     */
90381
    /**
90382
     * Gets an observable that emits when keydown events are targeted on the overlay.
90383
     * @return {?}
90384
     */
90385
    MatDialogRef.prototype.keydownEvents = /**
90386
     * Gets an observable that emits when keydown events are targeted on the overlay.
90387
     * @return {?}
90388
     */
90389
    function () {
90390
        return this._overlayRef.keydownEvents();
90391
    };
90392
    /**
90393
     * Updates the dialog's position.
90394
     * @param position New dialog position.
90395
     */
90396
    /**
90397
     * Updates the dialog's position.
90398
     * @param {?=} position New dialog position.
90399
     * @return {?}
90400
     */
90401
    MatDialogRef.prototype.updatePosition = /**
90402
     * Updates the dialog's position.
90403
     * @param {?=} position New dialog position.
90404
     * @return {?}
90405
     */
90406
    function (position) {
90407
        var /** @type {?} */ strategy = this._getPositionStrategy();
90408
        if (position && (position.left || position.right)) {
90409
            position.left ? strategy.left(position.left) : strategy.right(position.right);
90410
        }
90411
        else {
90412
            strategy.centerHorizontally();
90413
        }
90414
        if (position && (position.top || position.bottom)) {
90415
            position.top ? strategy.top(position.top) : strategy.bottom(position.bottom);
90416
        }
90417
        else {
90418
            strategy.centerVertically();
90419
        }
90420
        this._overlayRef.updatePosition();
90421
        return this;
90422
    };
90423
    /**
90424
     * Updates the dialog's width and height.
90425
     * @param width New width of the dialog.
90426
     * @param height New height of the dialog.
90427
     */
90428
    /**
90429
     * Updates the dialog's width and height.
90430
     * @param {?=} width New width of the dialog.
90431
     * @param {?=} height New height of the dialog.
90432
     * @return {?}
90433
     */
90434
    MatDialogRef.prototype.updateSize = /**
90435
     * Updates the dialog's width and height.
90436
     * @param {?=} width New width of the dialog.
90437
     * @param {?=} height New height of the dialog.
90438
     * @return {?}
90439
     */
90440
    function (width, height) {
90441
        if (width === void 0) { width = ''; }
90442
        if (height === void 0) { height = ''; }
90443
        this._getPositionStrategy().width(width).height(height);
90444
        this._overlayRef.updatePosition();
90445
        return this;
90446
    };
90447
    /**
90448
     * Fetches the position strategy object from the overlay ref.
90449
     * @return {?}
90450
     */
90451
    MatDialogRef.prototype._getPositionStrategy = /**
90452
     * Fetches the position strategy object from the overlay ref.
90453
     * @return {?}
90454
     */
90455
    function () {
90456
        return /** @type {?} */ (this._overlayRef.getConfig().positionStrategy);
90457
    };
90458
    return MatDialogRef;
90459
}());
90460
 
90461
/**
90462
 * @fileoverview added by tsickle
90463
 * @suppress {checkTypes} checked by tsc
90464
 */
90465
/**
90466
 * Injection token that can be used to access the data that was passed in to a dialog.
90467
 */
90468
var /** @type {?} */ MAT_DIALOG_DATA = new _angular_core__WEBPACK_IMPORTED_MODULE_2__["InjectionToken"]('MatDialogData');
90469
/**
90470
 * Injection token that can be used to specify default dialog options.
90471
 */
90472
var /** @type {?} */ MAT_DIALOG_DEFAULT_OPTIONS = new _angular_core__WEBPACK_IMPORTED_MODULE_2__["InjectionToken"]('mat-dialog-default-options');
90473
/**
90474
 * Injection token that determines the scroll handling while the dialog is open.
90475
 */
90476
var /** @type {?} */ MAT_DIALOG_SCROLL_STRATEGY = new _angular_core__WEBPACK_IMPORTED_MODULE_2__["InjectionToken"]('mat-dialog-scroll-strategy');
90477
/**
90478
 * \@docs-private
90479
 * @param {?} overlay
90480
 * @return {?}
90481
 */
90482
function MAT_DIALOG_SCROLL_STRATEGY_FACTORY(overlay) {
90483
    return function () { return overlay.scrollStrategies.block(); };
90484
}
90485
/**
90486
 * \@docs-private
90487
 * @param {?} overlay
90488
 * @return {?}
90489
 */
90490
function MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {
90491
    return function () { return overlay.scrollStrategies.block(); };
90492
}
90493
/**
90494
 * \@docs-private
90495
 */
90496
var /** @type {?} */ MAT_DIALOG_SCROLL_STRATEGY_PROVIDER = {
90497
    provide: MAT_DIALOG_SCROLL_STRATEGY,
90498
    deps: [_angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_10__["Overlay"]],
90499
    useFactory: MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY,
90500
};
90501
/**
90502
 * Service to open Material Design modal dialogs.
90503
 */
90504
var MatDialog = /** @class */ (function () {
90505
    function MatDialog(_overlay, _injector, _location, _defaultOptions, _scrollStrategy, _parentDialog, _overlayContainer) {
90506
        var _this = this;
90507
        this._overlay = _overlay;
90508
        this._injector = _injector;
90509
        this._location = _location;
90510
        this._defaultOptions = _defaultOptions;
90511
        this._scrollStrategy = _scrollStrategy;
90512
        this._parentDialog = _parentDialog;
90513
        this._overlayContainer = _overlayContainer;
90514
        this._openDialogsAtThisLevel = [];
90515
        this._afterAllClosedAtThisLevel = new rxjs__WEBPACK_IMPORTED_MODULE_7__["Subject"]();
90516
        this._afterOpenAtThisLevel = new rxjs__WEBPACK_IMPORTED_MODULE_7__["Subject"]();
90517
        this._ariaHiddenElements = new Map();
90518
        /**
90519
         * Stream that emits when all open dialog have finished closing.
90520
         * Will emit on subscribe if there are no open dialogs to begin with.
90521
         */
90522
        this.afterAllClosed = Object(rxjs__WEBPACK_IMPORTED_MODULE_7__["defer"])(function () {
90523
            return _this.openDialogs.length ?
90524
                _this._afterAllClosed :
90525
                _this._afterAllClosed.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_8__["startWith"])(undefined));
90526
        });
90527
    }
90528
    Object.defineProperty(MatDialog.prototype, "openDialogs", {
90529
        /** Keeps track of the currently-open dialogs. */
90530
        get: /**
90531
         * Keeps track of the currently-open dialogs.
90532
         * @return {?}
90533
         */
90534
        function () {
90535
            return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;
90536
        },
90537
        enumerable: true,
90538
        configurable: true
90539
    });
90540
    Object.defineProperty(MatDialog.prototype, "afterOpen", {
90541
        /** Stream that emits when a dialog has been opened. */
90542
        get: /**
90543
         * Stream that emits when a dialog has been opened.
90544
         * @return {?}
90545
         */
90546
        function () {
90547
            return this._parentDialog ? this._parentDialog.afterOpen : this._afterOpenAtThisLevel;
90548
        },
90549
        enumerable: true,
90550
        configurable: true
90551
    });
90552
    Object.defineProperty(MatDialog.prototype, "_afterAllClosed", {
90553
        get: /**
90554
         * @return {?}
90555
         */
90556
        function () {
90557
            var /** @type {?} */ parent = this._parentDialog;
90558
            return parent ? parent._afterAllClosed : this._afterAllClosedAtThisLevel;
90559
        },
90560
        enumerable: true,
90561
        configurable: true
90562
    });
90563
    /**
90564
     * Opens a modal dialog containing the given component.
90565
     * @param componentOrTemplateRef Type of the component to load into the dialog,
90566
     *     or a TemplateRef to instantiate as the dialog content.
90567
     * @param config Extra configuration options.
90568
     * @returns Reference to the newly-opened dialog.
90569
     */
90570
    /**
90571
     * Opens a modal dialog containing the given component.
90572
     * @template T, D, R
90573
     * @param {?} componentOrTemplateRef Type of the component to load into the dialog,
90574
     *     or a TemplateRef to instantiate as the dialog content.
90575
     * @param {?=} config Extra configuration options.
90576
     * @return {?} Reference to the newly-opened dialog.
90577
     */
90578
    MatDialog.prototype.open = /**
90579
     * Opens a modal dialog containing the given component.
90580
     * @template T, D, R
90581
     * @param {?} componentOrTemplateRef Type of the component to load into the dialog,
90582
     *     or a TemplateRef to instantiate as the dialog content.
90583
     * @param {?=} config Extra configuration options.
90584
     * @return {?} Reference to the newly-opened dialog.
90585
     */
90586
    function (componentOrTemplateRef, config) {
90587
        var _this = this;
90588
        config = _applyConfigDefaults(config, this._defaultOptions || new MatDialogConfig());
90589
        if (config.id && this.getDialogById(config.id)) {
90590
            throw Error("Dialog with id \"" + config.id + "\" exists already. The dialog id must be unique.");
90591
        }
90592
        var /** @type {?} */ overlayRef = this._createOverlay(config);
90593
        var /** @type {?} */ dialogContainer = this._attachDialogContainer(overlayRef, config);
90594
        var /** @type {?} */ dialogRef = this._attachDialogContent(componentOrTemplateRef, dialogContainer, overlayRef, config);
90595
        // If this is the first dialog that we're opening, hide all the non-overlay content.
90596
        if (!this.openDialogs.length) {
90597
            this._hideNonDialogContentFromAssistiveTechnology();
90598
        }
90599
        this.openDialogs.push(dialogRef);
90600
        dialogRef.afterClosed().subscribe(function () { return _this._removeOpenDialog(dialogRef); });
90601
        this.afterOpen.next(dialogRef);
90602
        return dialogRef;
90603
    };
90604
    /**
90605
     * Closes all of the currently-open dialogs.
90606
     */
90607
    /**
90608
     * Closes all of the currently-open dialogs.
90609
     * @return {?}
90610
     */
90611
    MatDialog.prototype.closeAll = /**
90612
     * Closes all of the currently-open dialogs.
90613
     * @return {?}
90614
     */
90615
    function () {
90616
        var /** @type {?} */ i = this.openDialogs.length;
90617
        while (i--) {
90618
            // The `_openDialogs` property isn't updated after close until the rxjs subscription
90619
            // runs on the next microtask, in addition to modifying the array as we're going
90620
            // through it. We loop through all of them and call close without assuming that
90621
            // they'll be removed from the list instantaneously.
90622
            this.openDialogs[i].close();
90623
        }
90624
    };
90625
    /**
90626
     * Finds an open dialog by its id.
90627
     * @param id ID to use when looking up the dialog.
90628
     */
90629
    /**
90630
     * Finds an open dialog by its id.
90631
     * @param {?} id ID to use when looking up the dialog.
90632
     * @return {?}
90633
     */
90634
    MatDialog.prototype.getDialogById = /**
90635
     * Finds an open dialog by its id.
90636
     * @param {?} id ID to use when looking up the dialog.
90637
     * @return {?}
90638
     */
90639
    function (id) {
90640
        return this.openDialogs.find(function (dialog) { return dialog.id === id; });
90641
    };
90642
    /**
90643
     * Creates the overlay into which the dialog will be loaded.
90644
     * @param {?} config The dialog configuration.
90645
     * @return {?} A promise resolving to the OverlayRef for the created overlay.
90646
     */
90647
    MatDialog.prototype._createOverlay = /**
90648
     * Creates the overlay into which the dialog will be loaded.
90649
     * @param {?} config The dialog configuration.
90650
     * @return {?} A promise resolving to the OverlayRef for the created overlay.
90651
     */
90652
    function (config) {
90653
        var /** @type {?} */ overlayConfig = this._getOverlayConfig(config);
90654
        return this._overlay.create(overlayConfig);
90655
    };
90656
    /**
90657
     * Creates an overlay config from a dialog config.
90658
     * @param {?} dialogConfig The dialog configuration.
90659
     * @return {?} The overlay configuration.
90660
     */
90661
    MatDialog.prototype._getOverlayConfig = /**
90662
     * Creates an overlay config from a dialog config.
90663
     * @param {?} dialogConfig The dialog configuration.
90664
     * @return {?} The overlay configuration.
90665
     */
90666
    function (dialogConfig) {
90667
        var /** @type {?} */ state$$1 = new _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_10__["OverlayConfig"]({
90668
            positionStrategy: this._overlay.position().global(),
90669
            scrollStrategy: dialogConfig.scrollStrategy || this._scrollStrategy(),
90670
            panelClass: dialogConfig.panelClass,
90671
            hasBackdrop: dialogConfig.hasBackdrop,
90672
            direction: dialogConfig.direction,
90673
            minWidth: dialogConfig.minWidth,
90674
            minHeight: dialogConfig.minHeight,
90675
            maxWidth: dialogConfig.maxWidth,
90676
            maxHeight: dialogConfig.maxHeight
90677
        });
90678
        if (dialogConfig.backdropClass) {
90679
            state$$1.backdropClass = dialogConfig.backdropClass;
90680
        }
90681
        return state$$1;
90682
    };
90683
    /**
90684
     * Attaches an MatDialogContainer to a dialog's already-created overlay.
90685
     * @param {?} overlay Reference to the dialog's underlying overlay.
90686
     * @param {?} config The dialog configuration.
90687
     * @return {?} A promise resolving to a ComponentRef for the attached container.
90688
     */
90689
    MatDialog.prototype._attachDialogContainer = /**
90690
     * Attaches an MatDialogContainer to a dialog's already-created overlay.
90691
     * @param {?} overlay Reference to the dialog's underlying overlay.
90692
     * @param {?} config The dialog configuration.
90693
     * @return {?} A promise resolving to a ComponentRef for the attached container.
90694
     */
90695
    function (overlay, config) {
90696
        var /** @type {?} */ userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
90697
        var /** @type {?} */ injector = new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_4__["PortalInjector"](userInjector || this._injector, new WeakMap([
90698
            [MatDialogConfig, config]
90699
        ]));
90700
        var /** @type {?} */ containerPortal = new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_4__["ComponentPortal"](MatDialogContainer, config.viewContainerRef, injector);
90701
        var /** @type {?} */ containerRef = overlay.attach(containerPortal);
90702
        return containerRef.instance;
90703
    };
90704
    /**
90705
     * Attaches the user-provided component to the already-created MatDialogContainer.
90706
     * @template T, R
90707
     * @param {?} componentOrTemplateRef The type of component being loaded into the dialog,
90708
     *     or a TemplateRef to instantiate as the content.
90709
     * @param {?} dialogContainer Reference to the wrapping MatDialogContainer.
90710
     * @param {?} overlayRef Reference to the overlay in which the dialog resides.
90711
     * @param {?} config The dialog configuration.
90712
     * @return {?} A promise resolving to the MatDialogRef that should be returned to the user.
90713
     */
90714
    MatDialog.prototype._attachDialogContent = /**
90715
     * Attaches the user-provided component to the already-created MatDialogContainer.
90716
     * @template T, R
90717
     * @param {?} componentOrTemplateRef The type of component being loaded into the dialog,
90718
     *     or a TemplateRef to instantiate as the content.
90719
     * @param {?} dialogContainer Reference to the wrapping MatDialogContainer.
90720
     * @param {?} overlayRef Reference to the overlay in which the dialog resides.
90721
     * @param {?} config The dialog configuration.
90722
     * @return {?} A promise resolving to the MatDialogRef that should be returned to the user.
90723
     */
90724
    function (componentOrTemplateRef, dialogContainer, overlayRef, config) {
90725
        // Create a reference to the dialog we're creating in order to give the user a handle
90726
        // to modify and close it.
90727
        var /** @type {?} */ dialogRef = new MatDialogRef(overlayRef, dialogContainer, this._location, config.id);
90728
        // When the dialog backdrop is clicked, we want to close it.
90729
        if (config.hasBackdrop) {
90730
            overlayRef.backdropClick().subscribe(function () {
90731
                if (!dialogRef.disableClose) {
90732
                    dialogRef.close();
90733
                }
90734
            });
90735
        }
90736
        if (componentOrTemplateRef instanceof _angular_core__WEBPACK_IMPORTED_MODULE_2__["TemplateRef"]) {
90737
            dialogContainer.attachTemplatePortal(new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_4__["TemplatePortal"](componentOrTemplateRef, /** @type {?} */ ((null)), /** @type {?} */ ({ $implicit: config.data, dialogRef: dialogRef })));
90738
        }
90739
        else {
90740
            var /** @type {?} */ injector = this._createInjector(config, dialogRef, dialogContainer);
90741
            var /** @type {?} */ contentRef = dialogContainer.attachComponentPortal(new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_4__["ComponentPortal"](componentOrTemplateRef, undefined, injector));
90742
            dialogRef.componentInstance = contentRef.instance;
90743
        }
90744
        dialogRef
90745
            .updateSize(config.width, config.height)
90746
            .updatePosition(config.position);
90747
        return dialogRef;
90748
    };
90749
    /**
90750
     * Creates a custom injector to be used inside the dialog. This allows a component loaded inside
90751
     * of a dialog to close itself and, optionally, to return a value.
90752
     * @template T
90753
     * @param {?} config Config object that is used to construct the dialog.
90754
     * @param {?} dialogRef Reference to the dialog.
90755
     * @param {?} dialogContainer
90756
     * @return {?} The custom injector that can be used inside the dialog.
90757
     */
90758
    MatDialog.prototype._createInjector = /**
90759
     * Creates a custom injector to be used inside the dialog. This allows a component loaded inside
90760
     * of a dialog to close itself and, optionally, to return a value.
90761
     * @template T
90762
     * @param {?} config Config object that is used to construct the dialog.
90763
     * @param {?} dialogRef Reference to the dialog.
90764
     * @param {?} dialogContainer
90765
     * @return {?} The custom injector that can be used inside the dialog.
90766
     */
90767
    function (config, dialogRef, dialogContainer) {
90768
        var /** @type {?} */ userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
90769
        // The MatDialogContainer is injected in the portal as the MatDialogContainer and the dialog's
90770
        // content are created out of the same ViewContainerRef and as such, are siblings for injector
90771
        // purposes. To allow the hierarchy that is expected, the MatDialogContainer is explicitly
90772
        // added to the injection tokens.
90773
        var /** @type {?} */ injectionTokens = new WeakMap([
90774
            [MatDialogContainer, dialogContainer],
90775
            [MAT_DIALOG_DATA, config.data],
90776
            [MatDialogRef, dialogRef]
90777
        ]);
90778
        if (config.direction &&
90779
            (!userInjector || !userInjector.get(_angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_9__["Directionality"], null))) {
90780
            injectionTokens.set(_angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_9__["Directionality"], {
90781
                value: config.direction,
90782
                change: Object(rxjs__WEBPACK_IMPORTED_MODULE_7__["of"])()
90783
            });
90784
        }
90785
        return new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_4__["PortalInjector"](userInjector || this._injector, injectionTokens);
90786
    };
90787
    /**
90788
     * Removes a dialog from the array of open dialogs.
90789
     * @param {?} dialogRef Dialog to be removed.
90790
     * @return {?}
90791
     */
90792
    MatDialog.prototype._removeOpenDialog = /**
90793
     * Removes a dialog from the array of open dialogs.
90794
     * @param {?} dialogRef Dialog to be removed.
90795
     * @return {?}
90796
     */
90797
    function (dialogRef) {
90798
        var /** @type {?} */ index = this.openDialogs.indexOf(dialogRef);
90799
        if (index > -1) {
90800
            this.openDialogs.splice(index, 1);
90801
            // If all the dialogs were closed, remove/restore the `aria-hidden`
90802
            // to a the siblings and emit to the `afterAllClosed` stream.
90803
            if (!this.openDialogs.length) {
90804
                this._ariaHiddenElements.forEach(function (previousValue, element) {
90805
                    if (previousValue) {
90806
                        element.setAttribute('aria-hidden', previousValue);
90807
                    }
90808
                    else {
90809
                        element.removeAttribute('aria-hidden');
90810
                    }
90811
                });
90812
                this._ariaHiddenElements.clear();
90813
                this._afterAllClosed.next();
90814
            }
90815
        }
90816
    };
90817
    /**
90818
     * Hides all of the content that isn't an overlay from assistive technology.
90819
     * @return {?}
90820
     */
90821
    MatDialog.prototype._hideNonDialogContentFromAssistiveTechnology = /**
90822
     * Hides all of the content that isn't an overlay from assistive technology.
90823
     * @return {?}
90824
     */
90825
    function () {
90826
        var /** @type {?} */ overlayContainer = this._overlayContainer.getContainerElement();
90827
        // Ensure that the overlay container is attached to the DOM.
90828
        if (overlayContainer.parentElement) {
90829
            var /** @type {?} */ siblings = overlayContainer.parentElement.children;
90830
            for (var /** @type {?} */ i = siblings.length - 1; i > -1; i--) {
90831
                var /** @type {?} */ sibling = siblings[i];
90832
                if (sibling !== overlayContainer &&
90833
                    sibling.nodeName !== 'SCRIPT' &&
90834
                    sibling.nodeName !== 'STYLE' &&
90835
                    !sibling.hasAttribute('aria-live')) {
90836
                    this._ariaHiddenElements.set(sibling, sibling.getAttribute('aria-hidden'));
90837
                    sibling.setAttribute('aria-hidden', 'true');
90838
                }
90839
            }
90840
        }
90841
    };
90842
    MatDialog.decorators = [
90843
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Injectable"] },
90844
    ];
90845
    /** @nocollapse */
90846
    MatDialog.ctorParameters = function () { return [
90847
        { type: _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_10__["Overlay"], },
90848
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Injector"], },
90849
        { type: _angular_common__WEBPACK_IMPORTED_MODULE_3__["Location"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Optional"] },] },
90850
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Inject"], args: [MAT_DIALOG_DEFAULT_OPTIONS,] },] },
90851
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Inject"], args: [MAT_DIALOG_SCROLL_STRATEGY,] },] },
90852
        { type: MatDialog, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["SkipSelf"] },] },
90853
        { type: _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_10__["OverlayContainer"], },
90854
    ]; };
90855
    return MatDialog;
90856
}());
90857
/**
90858
 * Applies default options to the dialog config.
90859
 * @param {?=} config Config to be modified.
90860
 * @param {?=} defaultOptions Default options provided.
90861
 * @return {?} The new configuration object.
90862
 */
90863
function _applyConfigDefaults(config, defaultOptions) {
90864
    return Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__assign"])({}, defaultOptions, config);
90865
}
90866
 
90867
/**
90868
 * @fileoverview added by tsickle
90869
 * @suppress {checkTypes} checked by tsc
90870
 */
90871
/**
90872
 * Counter used to generate unique IDs for dialog elements.
90873
 */
90874
var /** @type {?} */ dialogElementUid = 0;
90875
/**
90876
 * Button that will close the current dialog.
90877
 */
90878
var MatDialogClose = /** @class */ (function () {
90879
    function MatDialogClose(dialogRef, _elementRef, _dialog) {
90880
        this.dialogRef = dialogRef;
90881
        this._elementRef = _elementRef;
90882
        this._dialog = _dialog;
90883
        /**
90884
         * Screenreader label for the button.
90885
         */
90886
        this.ariaLabel = 'Close dialog';
90887
    }
90888
    /**
90889
     * @return {?}
90890
     */
90891
    MatDialogClose.prototype.ngOnInit = /**
90892
     * @return {?}
90893
     */
90894
    function () {
90895
        if (!this.dialogRef) {
90896
            // When this directive is included in a dialog via TemplateRef (rather than being
90897
            // in a Component), the DialogRef isn't available via injection because embedded
90898
            // views cannot be given a custom injector. Instead, we look up the DialogRef by
90899
            // ID. This must occur in `onInit`, as the ID binding for the dialog container won't
90900
            // be resolved at constructor time.
90901
            this.dialogRef = /** @type {?} */ ((getClosestDialog(this._elementRef, this._dialog.openDialogs)));
90902
        }
90903
    };
90904
    /**
90905
     * @param {?} changes
90906
     * @return {?}
90907
     */
90908
    MatDialogClose.prototype.ngOnChanges = /**
90909
     * @param {?} changes
90910
     * @return {?}
90911
     */
90912
    function (changes) {
90913
        var /** @type {?} */ proxiedChange = changes["_matDialogClose"] || changes["_matDialogCloseResult"];
90914
        if (proxiedChange) {
90915
            this.dialogResult = proxiedChange.currentValue;
90916
        }
90917
    };
90918
    MatDialogClose.decorators = [
90919
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Directive"], args: [{
90920
                    selector: "button[mat-dialog-close], button[matDialogClose]",
90921
                    exportAs: 'matDialogClose',
90922
                    host: {
90923
                        '(click)': 'dialogRef.close(dialogResult)',
90924
                        '[attr.aria-label]': 'ariaLabel',
90925
                        'type': 'button',
90926
                    }
90927
                },] },
90928
    ];
90929
    /** @nocollapse */
90930
    MatDialogClose.ctorParameters = function () { return [
90931
        { type: MatDialogRef, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Optional"] },] },
90932
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ElementRef"], },
90933
        { type: MatDialog, },
90934
    ]; };
90935
    MatDialogClose.propDecorators = {
90936
        "ariaLabel": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"], args: ['aria-label',] },],
90937
        "dialogResult": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"], args: ['mat-dialog-close',] },],
90938
        "_matDialogClose": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"], args: ['matDialogClose',] },],
90939
    };
90940
    return MatDialogClose;
90941
}());
90942
/**
90943
 * Title of a dialog element. Stays fixed to the top of the dialog when scrolling.
90944
 */
90945
var MatDialogTitle = /** @class */ (function () {
90946
    function MatDialogTitle(_dialogRef, _elementRef, _dialog) {
90947
        this._dialogRef = _dialogRef;
90948
        this._elementRef = _elementRef;
90949
        this._dialog = _dialog;
90950
        this.id = "mat-dialog-title-" + dialogElementUid++;
90951
    }
90952
    /**
90953
     * @return {?}
90954
     */
90955
    MatDialogTitle.prototype.ngOnInit = /**
90956
     * @return {?}
90957
     */
90958
    function () {
90959
        var _this = this;
90960
        if (!this._dialogRef) {
90961
            this._dialogRef = /** @type {?} */ ((getClosestDialog(this._elementRef, this._dialog.openDialogs)));
90962
        }
90963
        if (this._dialogRef) {
90964
            Promise.resolve().then(function () {
90965
                var /** @type {?} */ container = _this._dialogRef._containerInstance;
90966
                if (container && !container._ariaLabelledBy) {
90967
                    container._ariaLabelledBy = _this.id;
90968
                }
90969
            });
90970
        }
90971
    };
90972
    MatDialogTitle.decorators = [
90973
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Directive"], args: [{
90974
                    selector: '[mat-dialog-title], [matDialogTitle]',
90975
                    exportAs: 'matDialogTitle',
90976
                    host: {
90977
                        'class': 'mat-dialog-title',
90978
                        '[id]': 'id',
90979
                    },
90980
                },] },
90981
    ];
90982
    /** @nocollapse */
90983
    MatDialogTitle.ctorParameters = function () { return [
90984
        { type: MatDialogRef, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Optional"] },] },
90985
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ElementRef"], },
90986
        { type: MatDialog, },
90987
    ]; };
90988
    MatDialogTitle.propDecorators = {
90989
        "id": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"] },],
90990
    };
90991
    return MatDialogTitle;
90992
}());
90993
/**
90994
 * Scrollable content container of a dialog.
90995
 */
90996
var MatDialogContent = /** @class */ (function () {
90997
    function MatDialogContent() {
90998
    }
90999
    MatDialogContent.decorators = [
91000
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Directive"], args: [{
91001
                    selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]",
91002
                    host: { 'class': 'mat-dialog-content' }
91003
                },] },
91004
    ];
91005
    return MatDialogContent;
91006
}());
91007
/**
91008
 * Container for the bottom action buttons in a dialog.
91009
 * Stays fixed to the bottom when scrolling.
91010
 */
91011
var MatDialogActions = /** @class */ (function () {
91012
    function MatDialogActions() {
91013
    }
91014
    MatDialogActions.decorators = [
91015
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Directive"], args: [{
91016
                    selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]",
91017
                    host: { 'class': 'mat-dialog-actions' }
91018
                },] },
91019
    ];
91020
    return MatDialogActions;
91021
}());
91022
/**
91023
 * Finds the closest MatDialogRef to an element by looking at the DOM.
91024
 * @param {?} element Element relative to which to look for a dialog.
91025
 * @param {?} openDialogs References to the currently-open dialogs.
91026
 * @return {?}
91027
 */
91028
function getClosestDialog(element, openDialogs) {
91029
    var /** @type {?} */ parent = element.nativeElement.parentElement;
91030
    while (parent && !parent.classList.contains('mat-dialog-container')) {
91031
        parent = parent.parentElement;
91032
    }
91033
    return parent ? openDialogs.find(function (dialog) { return dialog.id === /** @type {?} */ ((parent)).id; }) : null;
91034
}
91035
 
91036
/**
91037
 * @fileoverview added by tsickle
91038
 * @suppress {checkTypes} checked by tsc
91039
 */
91040
var MatDialogModule = /** @class */ (function () {
91041
    function MatDialogModule() {
91042
    }
91043
    MatDialogModule.decorators = [
91044
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["NgModule"], args: [{
91045
                    imports: [
91046
                        _angular_common__WEBPACK_IMPORTED_MODULE_3__["CommonModule"],
91047
                        _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_10__["OverlayModule"],
91048
                        _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_4__["PortalModule"],
91049
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_11__["MatCommonModule"],
91050
                    ],
91051
                    exports: [
91052
                        MatDialogContainer,
91053
                        MatDialogClose,
91054
                        MatDialogTitle,
91055
                        MatDialogContent,
91056
                        MatDialogActions,
91057
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_11__["MatCommonModule"],
91058
                    ],
91059
                    declarations: [
91060
                        MatDialogContainer,
91061
                        MatDialogClose,
91062
                        MatDialogTitle,
91063
                        MatDialogActions,
91064
                        MatDialogContent,
91065
                    ],
91066
                    providers: [
91067
                        MatDialog,
91068
                        MAT_DIALOG_SCROLL_STRATEGY_PROVIDER,
91069
                    ],
91070
                    entryComponents: [MatDialogContainer],
91071
                },] },
91072
    ];
91073
    return MatDialogModule;
91074
}());
91075
 
91076
/**
91077
 * @fileoverview added by tsickle
91078
 * @suppress {checkTypes} checked by tsc
91079
 */
91080
 
91081
/**
91082
 * @fileoverview added by tsickle
91083
 * @suppress {checkTypes} checked by tsc
91084
 */
91085
 
91086
 
91087
//# sourceMappingURL=dialog.es5.js.map
91088
 
91089
 
91090
/***/ }),
91091
 
91092
/***/ "./node_modules/@angular/material/esm5/divider.es5.js":
91093
/*!************************************************************!*\
91094
  !*** ./node_modules/@angular/material/esm5/divider.es5.js ***!
91095
  \************************************************************/
91096
/*! exports provided: MatDivider, MatDividerModule */
91097
/***/ (function(module, __webpack_exports__, __webpack_require__) {
91098
 
91099
"use strict";
91100
__webpack_require__.r(__webpack_exports__);
91101
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatDivider", function() { return MatDivider; });
91102
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatDividerModule", function() { return MatDividerModule; });
91103
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
91104
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
91105
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
91106
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
91107
/**
91108
 * @license
91109
 * Copyright Google LLC All Rights Reserved.
91110
 *
91111
 * Use of this source code is governed by an MIT-style license that can be
91112
 * found in the LICENSE file at https://angular.io/license
91113
 */
91114
 
91115
 
91116
 
91117
 
91118
 
91119
/**
91120
 * @fileoverview added by tsickle
91121
 * @suppress {checkTypes} checked by tsc
91122
 */
91123
var MatDivider = /** @class */ (function () {
91124
    function MatDivider() {
91125
        this._vertical = false;
91126
        this._inset = false;
91127
    }
91128
    Object.defineProperty(MatDivider.prototype, "vertical", {
91129
        get: /**
91130
         * Whether the divider is vertically aligned.
91131
         * @return {?}
91132
         */
91133
        function () { return this._vertical; },
91134
        set: /**
91135
         * @param {?} value
91136
         * @return {?}
91137
         */
91138
        function (value) { this._vertical = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceBooleanProperty"])(value); },
91139
        enumerable: true,
91140
        configurable: true
91141
    });
91142
    Object.defineProperty(MatDivider.prototype, "inset", {
91143
        get: /**
91144
         * Whether the divider is an inset divider.
91145
         * @return {?}
91146
         */
91147
        function () { return this._inset; },
91148
        set: /**
91149
         * @param {?} value
91150
         * @return {?}
91151
         */
91152
        function (value) { this._inset = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__["coerceBooleanProperty"])(value); },
91153
        enumerable: true,
91154
        configurable: true
91155
    });
91156
    MatDivider.decorators = [
91157
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-divider',
91158
                    host: {
91159
                        'role': 'separator',
91160
                        '[attr.aria-orientation]': 'vertical ? "vertical" : "horizontal"',
91161
                        '[class.mat-divider-vertical]': 'vertical',
91162
                        '[class.mat-divider-horizontal]': '!vertical',
91163
                        '[class.mat-divider-inset]': 'inset',
91164
                        'class': 'mat-divider'
91165
                    },
91166
                    template: '',
91167
                    styles: [".mat-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mat-divider.mat-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}"],
91168
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
91169
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
91170
                },] },
91171
    ];
91172
    /** @nocollapse */
91173
    MatDivider.propDecorators = {
91174
        "vertical": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
91175
        "inset": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
91176
    };
91177
    return MatDivider;
91178
}());
91179
 
91180
/**
91181
 * @fileoverview added by tsickle
91182
 * @suppress {checkTypes} checked by tsc
91183
 */
91184
var MatDividerModule = /** @class */ (function () {
91185
    function MatDividerModule() {
91186
    }
91187
    MatDividerModule.decorators = [
91188
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
91189
                    imports: [_angular_material_core__WEBPACK_IMPORTED_MODULE_3__["MatCommonModule"], _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"]],
91190
                    exports: [MatDivider, _angular_material_core__WEBPACK_IMPORTED_MODULE_3__["MatCommonModule"]],
91191
                    declarations: [MatDivider],
91192
                },] },
91193
    ];
91194
    return MatDividerModule;
91195
}());
91196
 
91197
/**
91198
 * @fileoverview added by tsickle
91199
 * @suppress {checkTypes} checked by tsc
91200
 */
91201
 
91202
/**
91203
 * @fileoverview added by tsickle
91204
 * @suppress {checkTypes} checked by tsc
91205
 */
91206
 
91207
 
91208
//# sourceMappingURL=divider.es5.js.map
91209
 
91210
 
91211
/***/ }),
91212
 
91213
/***/ "./node_modules/@angular/material/esm5/expansion.es5.js":
91214
/*!**************************************************************!*\
91215
  !*** ./node_modules/@angular/material/esm5/expansion.es5.js ***!
91216
  \**************************************************************/
91217
/*! exports provided: MatExpansionModule, MatAccordion, MatExpansionPanel, MatExpansionPanelActionRow, MatExpansionPanelHeader, MatExpansionPanelDescription, MatExpansionPanelTitle, MatExpansionPanelContent, EXPANSION_PANEL_ANIMATION_TIMING, matExpansionAnimations */
91218
/***/ (function(module, __webpack_exports__, __webpack_require__) {
91219
 
91220
"use strict";
91221
__webpack_require__.r(__webpack_exports__);
91222
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatExpansionModule", function() { return MatExpansionModule; });
91223
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatAccordion", function() { return MatAccordion; });
91224
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatExpansionPanel", function() { return MatExpansionPanel; });
91225
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatExpansionPanelActionRow", function() { return MatExpansionPanelActionRow; });
91226
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatExpansionPanelHeader", function() { return MatExpansionPanelHeader; });
91227
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatExpansionPanelDescription", function() { return MatExpansionPanelDescription; });
91228
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatExpansionPanelTitle", function() { return MatExpansionPanelTitle; });
91229
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatExpansionPanelContent", function() { return MatExpansionPanelContent; });
91230
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EXPANSION_PANEL_ANIMATION_TIMING", function() { return EXPANSION_PANEL_ANIMATION_TIMING; });
91231
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matExpansionAnimations", function() { return matExpansionAnimations; });
91232
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
91233
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
91234
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
91235
/* harmony import */ var _angular_cdk_accordion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/accordion */ "./node_modules/@angular/cdk/esm5/accordion.es5.js");
91236
/* harmony import */ var _angular_animations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/animations */ "./node_modules/@angular/animations/fesm5/animations.js");
91237
/* harmony import */ var _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/cdk/collections */ "./node_modules/@angular/cdk/esm5/collections.es5.js");
91238
/* harmony import */ var _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/cdk/portal */ "./node_modules/@angular/cdk/esm5/portal.es5.js");
91239
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
91240
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
91241
/* harmony import */ var _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/cdk/a11y */ "./node_modules/@angular/cdk/esm5/a11y.es5.js");
91242
/* harmony import */ var _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/cdk/keycodes */ "./node_modules/@angular/cdk/esm5/keycodes.es5.js");
91243
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
91244
/**
91245
 * @license
91246
 * Copyright Google LLC All Rights Reserved.
91247
 *
91248
 * Use of this source code is governed by an MIT-style license that can be
91249
 * found in the LICENSE file at https://angular.io/license
91250
 */
91251
 
91252
 
91253
 
91254
 
91255
 
91256
 
91257
 
91258
 
91259
 
91260
 
91261
 
91262
 
91263
 
91264
/**
91265
 * @fileoverview added by tsickle
91266
 * @suppress {checkTypes} checked by tsc
91267
 */
91268
/**
91269
 * Directive for a Material Design Accordion.
91270
 */
91271
var MatAccordion = /** @class */ (function (_super) {
91272
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatAccordion, _super);
91273
    function MatAccordion() {
91274
        var _this = _super !== null && _super.apply(this, arguments) || this;
91275
        _this._hideToggle = false;
91276
        /**
91277
         * The display mode used for all expansion panels in the accordion. Currently two display
91278
         * modes exist:
91279
         *  default - a gutter-like spacing is placed around any expanded panel, placing the expanded
91280
         *     panel at a different elevation from the rest of the accordion.
91281
         *  flat - no spacing is placed around expanded panels, showing all panels at the same
91282
         *     elevation.
91283
         */
91284
        _this.displayMode = 'default';
91285
        return _this;
91286
    }
91287
    Object.defineProperty(MatAccordion.prototype, "hideToggle", {
91288
        get: /**
91289
         * Whether the expansion indicator should be hidden.
91290
         * @return {?}
91291
         */
91292
        function () { return this._hideToggle; },
91293
        set: /**
91294
         * @param {?} show
91295
         * @return {?}
91296
         */
91297
        function (show) { this._hideToggle = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__["coerceBooleanProperty"])(show); },
91298
        enumerable: true,
91299
        configurable: true
91300
    });
91301
    MatAccordion.decorators = [
91302
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
91303
                    selector: 'mat-accordion',
91304
                    exportAs: 'matAccordion',
91305
                    host: {
91306
                        class: 'mat-accordion'
91307
                    }
91308
                },] },
91309
    ];
91310
    /** @nocollapse */
91311
    MatAccordion.propDecorators = {
91312
        "hideToggle": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
91313
        "displayMode": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
91314
    };
91315
    return MatAccordion;
91316
}(_angular_cdk_accordion__WEBPACK_IMPORTED_MODULE_3__["CdkAccordion"]));
91317
 
91318
/**
91319
 * @fileoverview added by tsickle
91320
 * @suppress {checkTypes} checked by tsc
91321
 */
91322
/**
91323
 * Time and timing curve for expansion panel animations.
91324
 */
91325
var /** @type {?} */ EXPANSION_PANEL_ANIMATION_TIMING = '225ms cubic-bezier(0.4,0.0,0.2,1)';
91326
/**
91327
 * Animations used by the Material expansion panel.
91328
 */
91329
var /** @type {?} */ matExpansionAnimations = {
91330
    /** Animation that rotates the indicator arrow. */
91331
    indicatorRotate: Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["trigger"])('indicatorRotate', [
91332
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["state"])('collapsed', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["style"])({ transform: 'rotate(0deg)' })),
91333
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["state"])('expanded', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["style"])({ transform: 'rotate(180deg)' })),
91334
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["transition"])('expanded <=> collapsed', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["animate"])(EXPANSION_PANEL_ANIMATION_TIMING)),
91335
    ]),
91336
    /** Animation that expands and collapses the panel header height. */
91337
    expansionHeaderHeight: Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["trigger"])('expansionHeight', [
91338
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["state"])('collapsed', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["style"])({
91339
            height: '{{collapsedHeight}}',
91340
        }), {
91341
            params: { collapsedHeight: '48px' },
91342
        }),
91343
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["state"])('expanded', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["style"])({
91344
            height: '{{expandedHeight}}'
91345
        }), {
91346
            params: { expandedHeight: '64px' }
91347
        }),
91348
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["transition"])('expanded <=> collapsed', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["group"])([
91349
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["query"])('@indicatorRotate', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["animateChild"])(), { optional: true }),
91350
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["animate"])(EXPANSION_PANEL_ANIMATION_TIMING),
91351
        ])),
91352
    ]),
91353
    /** Animation that expands and collapses the panel content. */
91354
    bodyExpansion: Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["trigger"])('bodyExpansion', [
91355
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["state"])('collapsed', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["style"])({ height: '0px', visibility: 'hidden' })),
91356
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["state"])('expanded', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["style"])({ height: '*', visibility: 'visible' })),
91357
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["transition"])('expanded <=> collapsed', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["animate"])(EXPANSION_PANEL_ANIMATION_TIMING)),
91358
    ])
91359
};
91360
 
91361
/**
91362
 * @fileoverview added by tsickle
91363
 * @suppress {checkTypes} checked by tsc
91364
 */
91365
/**
91366
 * Expansion panel content that will be rendered lazily
91367
 * after the panel is opened for the first time.
91368
 */
91369
var MatExpansionPanelContent = /** @class */ (function () {
91370
    function MatExpansionPanelContent(_template) {
91371
        this._template = _template;
91372
    }
91373
    MatExpansionPanelContent.decorators = [
91374
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
91375
                    selector: 'ng-template[matExpansionPanelContent]'
91376
                },] },
91377
    ];
91378
    /** @nocollapse */
91379
    MatExpansionPanelContent.ctorParameters = function () { return [
91380
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["TemplateRef"], },
91381
    ]; };
91382
    return MatExpansionPanelContent;
91383
}());
91384
 
91385
/**
91386
 * @fileoverview added by tsickle
91387
 * @suppress {checkTypes} checked by tsc
91388
 */
91389
/**
91390
 * Counter for generating unique element ids.
91391
 */
91392
var /** @type {?} */ uniqueId = 0;
91393
var ɵ0 = undefined;
91394
/**
91395
 * `<mat-expansion-panel>`
91396
 *
91397
 * This component can be used as a single element to show expandable content, or as one of
91398
 * multiple children of an element with the MatAccordion directive attached.
91399
 */
91400
var MatExpansionPanel = /** @class */ (function (_super) {
91401
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatExpansionPanel, _super);
91402
    function MatExpansionPanel(accordion, _changeDetectorRef, _uniqueSelectionDispatcher, _viewContainerRef) {
91403
        var _this = _super.call(this, accordion, _changeDetectorRef, _uniqueSelectionDispatcher) || this;
91404
        _this._viewContainerRef = _viewContainerRef;
91405
        _this._hideToggle = false;
91406
        /**
91407
         * Stream that emits for changes in `\@Input` properties.
91408
         */
91409
        _this._inputChanges = new rxjs__WEBPACK_IMPORTED_MODULE_7__["Subject"]();
91410
        /**
91411
         * ID for the associated header element. Used for a11y labelling.
91412
         */
91413
        _this._headerId = "mat-expansion-panel-header-" + uniqueId++;
91414
        _this.accordion = accordion;
91415
        return _this;
91416
    }
91417
    Object.defineProperty(MatExpansionPanel.prototype, "hideToggle", {
91418
        get: /**
91419
         * Whether the toggle indicator should be hidden.
91420
         * @return {?}
91421
         */
91422
        function () { return this._hideToggle; },
91423
        set: /**
91424
         * @param {?} value
91425
         * @return {?}
91426
         */
91427
        function (value) {
91428
            this._hideToggle = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__["coerceBooleanProperty"])(value);
91429
        },
91430
        enumerable: true,
91431
        configurable: true
91432
    });
91433
    /** Whether the expansion indicator should be hidden. */
91434
    /**
91435
     * Whether the expansion indicator should be hidden.
91436
     * @return {?}
91437
     */
91438
    MatExpansionPanel.prototype._getHideToggle = /**
91439
     * Whether the expansion indicator should be hidden.
91440
     * @return {?}
91441
     */
91442
    function () {
91443
        if (this.accordion) {
91444
            return this.accordion.hideToggle;
91445
        }
91446
        return this.hideToggle;
91447
    };
91448
    /** Determines whether the expansion panel should have spacing between it and its siblings. */
91449
    /**
91450
     * Determines whether the expansion panel should have spacing between it and its siblings.
91451
     * @return {?}
91452
     */
91453
    MatExpansionPanel.prototype._hasSpacing = /**
91454
     * Determines whether the expansion panel should have spacing between it and its siblings.
91455
     * @return {?}
91456
     */
91457
    function () {
91458
        if (this.accordion) {
91459
            return (this.expanded ? this.accordion.displayMode : this._getExpandedState()) === 'default';
91460
        }
91461
        return false;
91462
    };
91463
    /** Gets the expanded state string. */
91464
    /**
91465
     * Gets the expanded state string.
91466
     * @return {?}
91467
     */
91468
    MatExpansionPanel.prototype._getExpandedState = /**
91469
     * Gets the expanded state string.
91470
     * @return {?}
91471
     */
91472
    function () {
91473
        return this.expanded ? 'expanded' : 'collapsed';
91474
    };
91475
    /**
91476
     * @return {?}
91477
     */
91478
    MatExpansionPanel.prototype.ngAfterContentInit = /**
91479
     * @return {?}
91480
     */
91481
    function () {
91482
        var _this = this;
91483
        if (this._lazyContent) {
91484
            // Render the content as soon as the panel becomes open.
91485
            this.opened.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_8__["startWith"])(/** @type {?} */ ((null))), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_8__["filter"])(function () { return _this.expanded && !_this._portal; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_8__["take"])(1)).subscribe(function () {
91486
                _this._portal = new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_6__["TemplatePortal"](_this._lazyContent._template, _this._viewContainerRef);
91487
            });
91488
        }
91489
    };
91490
    /**
91491
     * @param {?} changes
91492
     * @return {?}
91493
     */
91494
    MatExpansionPanel.prototype.ngOnChanges = /**
91495
     * @param {?} changes
91496
     * @return {?}
91497
     */
91498
    function (changes) {
91499
        this._inputChanges.next(changes);
91500
    };
91501
    /**
91502
     * @return {?}
91503
     */
91504
    MatExpansionPanel.prototype.ngOnDestroy = /**
91505
     * @return {?}
91506
     */
91507
    function () {
91508
        _super.prototype.ngOnDestroy.call(this);
91509
        this._inputChanges.complete();
91510
    };
91511
    /**
91512
     * @param {?} event
91513
     * @return {?}
91514
     */
91515
    MatExpansionPanel.prototype._bodyAnimation = /**
91516
     * @param {?} event
91517
     * @return {?}
91518
     */
91519
    function (event) {
91520
        var /** @type {?} */ classList = event.element.classList;
91521
        var /** @type {?} */ cssClass = 'mat-expanded';
91522
        var phaseName = event.phaseName, toState = event.toState;
91523
        // Toggle the body's `overflow: hidden` class when closing starts or when expansion ends in
91524
        // order to prevent the cases where switching too early would cause the animation to jump.
91525
        // Note that we do it directly on the DOM element to avoid the slight delay that comes
91526
        // with doing it via change detection.
91527
        if (phaseName === 'done' && toState === 'expanded') {
91528
            classList.add(cssClass);
91529
        }
91530
        else if (phaseName === 'start' && toState === 'collapsed') {
91531
            classList.remove(cssClass);
91532
        }
91533
    };
91534
    MatExpansionPanel.decorators = [
91535
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"], args: [{styles: [".mat-expansion-panel{transition:box-shadow 280ms cubic-bezier(.4,0,.2,1);box-sizing:content-box;display:block;margin:0;transition:margin 225ms cubic-bezier(.4,0,.2,1)}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}@media screen and (-ms-high-contrast:active){.mat-expansion-panel{outline:solid 1px}}.mat-expansion-panel-content{overflow:hidden}.mat-expansion-panel-content.mat-expanded{overflow:visible}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px}.mat-action-row button.mat-button{margin-left:8px}[dir=rtl] .mat-action-row button.mat-button{margin-left:0;margin-right:8px}"],
91536
                    selector: 'mat-expansion-panel',
91537
                    exportAs: 'matExpansionPanel',
91538
                    template: "<ng-content select=\"mat-expansion-panel-header\"></ng-content><div class=\"mat-expansion-panel-content\" role=\"region\" [@bodyExpansion]=\"_getExpandedState()\" (@bodyExpansion.done)=\"_bodyAnimation($event)\" (@bodyExpansion.start)=\"_bodyAnimation($event)\" [attr.aria-labelledby]=\"_headerId\" [id]=\"id\" #body><div class=\"mat-expansion-panel-body\"><ng-content></ng-content><ng-template [cdkPortalOutlet]=\"_portal\"></ng-template></div><ng-content select=\"mat-action-row\"></ng-content></div>",
91539
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
91540
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
91541
                    inputs: ['disabled', 'expanded'],
91542
                    outputs: ['opened', 'closed', 'expandedChange'],
91543
                    animations: [matExpansionAnimations.bodyExpansion],
91544
                    providers: [
91545
                        // Provide MatAccordion as undefined to prevent nested expansion panels from registering
91546
                        // to the same accordion.
91547
                        { provide: MatAccordion, useValue: ɵ0 },
91548
                    ],
91549
                    host: {
91550
                        'class': 'mat-expansion-panel',
91551
                        '[class.mat-expanded]': 'expanded',
91552
                        '[class.mat-expansion-panel-spacing]': '_hasSpacing()',
91553
                    }
91554
                },] },
91555
    ];
91556
    /** @nocollapse */
91557
    MatExpansionPanel.ctorParameters = function () { return [
91558
        { type: MatAccordion, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"] },] },
91559
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"], },
91560
        { type: _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_5__["UniqueSelectionDispatcher"], },
91561
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"], },
91562
    ]; };
91563
    MatExpansionPanel.propDecorators = {
91564
        "hideToggle": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
91565
        "_lazyContent": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChild"], args: [MatExpansionPanelContent,] },],
91566
    };
91567
    return MatExpansionPanel;
91568
}(_angular_cdk_accordion__WEBPACK_IMPORTED_MODULE_3__["CdkAccordionItem"]));
91569
var MatExpansionPanelActionRow = /** @class */ (function () {
91570
    function MatExpansionPanelActionRow() {
91571
    }
91572
    MatExpansionPanelActionRow.decorators = [
91573
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
91574
                    selector: 'mat-action-row',
91575
                    host: {
91576
                        class: 'mat-action-row'
91577
                    }
91578
                },] },
91579
    ];
91580
    return MatExpansionPanelActionRow;
91581
}());
91582
 
91583
/**
91584
 * @fileoverview added by tsickle
91585
 * @suppress {checkTypes} checked by tsc
91586
 */
91587
/**
91588
 * `<mat-expansion-panel-header>`
91589
 *
91590
 * This component corresponds to the header element of an `<mat-expansion-panel>`.
91591
 */
91592
var MatExpansionPanelHeader = /** @class */ (function () {
91593
    function MatExpansionPanelHeader(panel, _element, _focusMonitor, _changeDetectorRef) {
91594
        var _this = this;
91595
        this.panel = panel;
91596
        this._element = _element;
91597
        this._focusMonitor = _focusMonitor;
91598
        this._changeDetectorRef = _changeDetectorRef;
91599
        this._parentChangeSubscription = rxjs__WEBPACK_IMPORTED_MODULE_7__["Subscription"].EMPTY;
91600
        // Since the toggle state depends on an @Input on the panel, we
91601
        // need to  subscribe and trigger change detection manually.
91602
        this._parentChangeSubscription = Object(rxjs__WEBPACK_IMPORTED_MODULE_7__["merge"])(panel.opened, panel.closed, panel._inputChanges.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_8__["filter"])(function (changes) { return !!(changes["hideToggle"] || changes["disabled"]); })))
91603
            .subscribe(function () { return _this._changeDetectorRef.markForCheck(); });
91604
        _focusMonitor.monitor(_element.nativeElement);
91605
    }
91606
    /** Toggles the expanded state of the panel. */
91607
    /**
91608
     * Toggles the expanded state of the panel.
91609
     * @return {?}
91610
     */
91611
    MatExpansionPanelHeader.prototype._toggle = /**
91612
     * Toggles the expanded state of the panel.
91613
     * @return {?}
91614
     */
91615
    function () {
91616
        this.panel.toggle();
91617
    };
91618
    /** Gets whether the panel is expanded. */
91619
    /**
91620
     * Gets whether the panel is expanded.
91621
     * @return {?}
91622
     */
91623
    MatExpansionPanelHeader.prototype._isExpanded = /**
91624
     * Gets whether the panel is expanded.
91625
     * @return {?}
91626
     */
91627
    function () {
91628
        return this.panel.expanded;
91629
    };
91630
    /** Gets the expanded state string of the panel. */
91631
    /**
91632
     * Gets the expanded state string of the panel.
91633
     * @return {?}
91634
     */
91635
    MatExpansionPanelHeader.prototype._getExpandedState = /**
91636
     * Gets the expanded state string of the panel.
91637
     * @return {?}
91638
     */
91639
    function () {
91640
        return this.panel._getExpandedState();
91641
    };
91642
    /** Gets the panel id. */
91643
    /**
91644
     * Gets the panel id.
91645
     * @return {?}
91646
     */
91647
    MatExpansionPanelHeader.prototype._getPanelId = /**
91648
     * Gets the panel id.
91649
     * @return {?}
91650
     */
91651
    function () {
91652
        return this.panel.id;
91653
    };
91654
    /** Gets whether the expand indicator should be shown. */
91655
    /**
91656
     * Gets whether the expand indicator should be shown.
91657
     * @return {?}
91658
     */
91659
    MatExpansionPanelHeader.prototype._showToggle = /**
91660
     * Gets whether the expand indicator should be shown.
91661
     * @return {?}
91662
     */
91663
    function () {
91664
        return !this.panel.hideToggle && !this.panel.disabled;
91665
    };
91666
    /** Handle keydown event calling to toggle() if appropriate. */
91667
    /**
91668
     * Handle keydown event calling to toggle() if appropriate.
91669
     * @param {?} event
91670
     * @return {?}
91671
     */
91672
    MatExpansionPanelHeader.prototype._keydown = /**
91673
     * Handle keydown event calling to toggle() if appropriate.
91674
     * @param {?} event
91675
     * @return {?}
91676
     */
91677
    function (event) {
91678
        switch (event.keyCode) {
91679
            // Toggle for space and enter keys.
91680
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_10__["SPACE"]:
91681
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_10__["ENTER"]:
91682
                event.preventDefault();
91683
                this._toggle();
91684
                break;
91685
            default:
91686
                return;
91687
        }
91688
    };
91689
    /**
91690
     * @return {?}
91691
     */
91692
    MatExpansionPanelHeader.prototype.ngOnDestroy = /**
91693
     * @return {?}
91694
     */
91695
    function () {
91696
        this._parentChangeSubscription.unsubscribe();
91697
        this._focusMonitor.stopMonitoring(this._element.nativeElement);
91698
    };
91699
    MatExpansionPanelHeader.decorators = [
91700
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"], args: [{selector: 'mat-expansion-panel-header',
91701
                    styles: [".mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:0}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-expansion-panel-header-description,.mat-expansion-panel-header-title{display:flex;flex-grow:1;margin-right:16px}[dir=rtl] .mat-expansion-panel-header-description,[dir=rtl] .mat-expansion-panel-header-title{margin-right:0;margin-left:16px}.mat-expansion-panel-header-description{flex-grow:2}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:'';display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle}"],
91702
                    template: "<span class=\"mat-content\"><ng-content select=\"mat-panel-title\"></ng-content><ng-content select=\"mat-panel-description\"></ng-content><ng-content></ng-content></span><span [@indicatorRotate]=\"_getExpandedState()\" *ngIf=\"_showToggle()\" class=\"mat-expansion-indicator\"></span>",
91703
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
91704
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
91705
                    animations: [
91706
                        matExpansionAnimations.indicatorRotate,
91707
                        matExpansionAnimations.expansionHeaderHeight
91708
                    ],
91709
                    host: {
91710
                        'class': 'mat-expansion-panel-header',
91711
                        'role': 'button',
91712
                        '[attr.id]': 'panel._headerId',
91713
                        '[attr.tabindex]': 'panel.disabled ? -1 : 0',
91714
                        '[attr.aria-controls]': '_getPanelId()',
91715
                        '[attr.aria-expanded]': '_isExpanded()',
91716
                        '[attr.aria-disabled]': 'panel.disabled',
91717
                        '[class.mat-expanded]': '_isExpanded()',
91718
                        '(click)': '_toggle()',
91719
                        '(keydown)': '_keydown($event)',
91720
                        '[@expansionHeight]': "{\n        value: _getExpandedState(),\n        params: {\n          collapsedHeight: collapsedHeight,\n          expandedHeight: expandedHeight\n        }\n    }",
91721
                    },
91722
                },] },
91723
    ];
91724
    /** @nocollapse */
91725
    MatExpansionPanelHeader.ctorParameters = function () { return [
91726
        { type: MatExpansionPanel, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Host"] },] },
91727
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
91728
        { type: _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_9__["FocusMonitor"], },
91729
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"], },
91730
    ]; };
91731
    MatExpansionPanelHeader.propDecorators = {
91732
        "expandedHeight": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
91733
        "collapsedHeight": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
91734
    };
91735
    return MatExpansionPanelHeader;
91736
}());
91737
/**
91738
 * `<mat-panel-description>`
91739
 *
91740
 * This directive is to be used inside of the MatExpansionPanelHeader component.
91741
 */
91742
var MatExpansionPanelDescription = /** @class */ (function () {
91743
    function MatExpansionPanelDescription() {
91744
    }
91745
    MatExpansionPanelDescription.decorators = [
91746
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
91747
                    selector: 'mat-panel-description',
91748
                    host: {
91749
                        class: 'mat-expansion-panel-header-description'
91750
                    }
91751
                },] },
91752
    ];
91753
    return MatExpansionPanelDescription;
91754
}());
91755
/**
91756
 * `<mat-panel-title>`
91757
 *
91758
 * This directive is to be used inside of the MatExpansionPanelHeader component.
91759
 */
91760
var MatExpansionPanelTitle = /** @class */ (function () {
91761
    function MatExpansionPanelTitle() {
91762
    }
91763
    MatExpansionPanelTitle.decorators = [
91764
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
91765
                    selector: 'mat-panel-title',
91766
                    host: {
91767
                        class: 'mat-expansion-panel-header-title'
91768
                    }
91769
                },] },
91770
    ];
91771
    return MatExpansionPanelTitle;
91772
}());
91773
 
91774
/**
91775
 * @fileoverview added by tsickle
91776
 * @suppress {checkTypes} checked by tsc
91777
 */
91778
var MatExpansionModule = /** @class */ (function () {
91779
    function MatExpansionModule() {
91780
    }
91781
    MatExpansionModule.decorators = [
91782
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{
91783
                    imports: [_angular_common__WEBPACK_IMPORTED_MODULE_11__["CommonModule"], _angular_cdk_accordion__WEBPACK_IMPORTED_MODULE_3__["CdkAccordionModule"], _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_6__["PortalModule"]],
91784
                    exports: [
91785
                        MatAccordion,
91786
                        MatExpansionPanel,
91787
                        MatExpansionPanelActionRow,
91788
                        MatExpansionPanelHeader,
91789
                        MatExpansionPanelTitle,
91790
                        MatExpansionPanelDescription,
91791
                        MatExpansionPanelContent,
91792
                    ],
91793
                    declarations: [
91794
                        MatAccordion,
91795
                        MatExpansionPanel,
91796
                        MatExpansionPanelActionRow,
91797
                        MatExpansionPanelHeader,
91798
                        MatExpansionPanelTitle,
91799
                        MatExpansionPanelDescription,
91800
                        MatExpansionPanelContent,
91801
                    ],
91802
                },] },
91803
    ];
91804
    return MatExpansionModule;
91805
}());
91806
 
91807
/**
91808
 * @fileoverview added by tsickle
91809
 * @suppress {checkTypes} checked by tsc
91810
 */
91811
 
91812
/**
91813
 * @fileoverview added by tsickle
91814
 * @suppress {checkTypes} checked by tsc
91815
 */
91816
 
91817
 
91818
//# sourceMappingURL=expansion.es5.js.map
91819
 
91820
 
91821
/***/ }),
91822
 
91823
/***/ "./node_modules/@angular/material/esm5/form-field.es5.js":
91824
/*!***************************************************************!*\
91825
  !*** ./node_modules/@angular/material/esm5/form-field.es5.js ***!
91826
  \***************************************************************/
91827
/*! exports provided: MatFormFieldModule, MatError, MatFormFieldBase, _MatFormFieldMixinBase, MAT_FORM_FIELD_DEFAULT_OPTIONS, MatFormField, MatFormFieldControl, getMatFormFieldPlaceholderConflictError, getMatFormFieldDuplicatedHintError, getMatFormFieldMissingControlError, MatHint, MatPlaceholder, MatPrefix, MatSuffix, MatLabel, matFormFieldAnimations */
91828
/***/ (function(module, __webpack_exports__, __webpack_require__) {
91829
 
91830
"use strict";
91831
__webpack_require__.r(__webpack_exports__);
91832
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatFormFieldModule", function() { return MatFormFieldModule; });
91833
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatError", function() { return MatError; });
91834
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatFormFieldBase", function() { return MatFormFieldBase; });
91835
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatFormFieldMixinBase", function() { return _MatFormFieldMixinBase; });
91836
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_FORM_FIELD_DEFAULT_OPTIONS", function() { return MAT_FORM_FIELD_DEFAULT_OPTIONS; });
91837
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatFormField", function() { return MatFormField; });
91838
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatFormFieldControl", function() { return MatFormFieldControl; });
91839
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMatFormFieldPlaceholderConflictError", function() { return getMatFormFieldPlaceholderConflictError; });
91840
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMatFormFieldDuplicatedHintError", function() { return getMatFormFieldDuplicatedHintError; });
91841
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMatFormFieldMissingControlError", function() { return getMatFormFieldMissingControlError; });
91842
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatHint", function() { return MatHint; });
91843
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatPlaceholder", function() { return MatPlaceholder; });
91844
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatPrefix", function() { return MatPrefix; });
91845
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSuffix", function() { return MatSuffix; });
91846
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatLabel", function() { return MatLabel; });
91847
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matFormFieldAnimations", function() { return matFormFieldAnimations; });
91848
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
91849
/* harmony import */ var _angular_animations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/animations */ "./node_modules/@angular/animations/fesm5/animations.js");
91850
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
91851
/* harmony import */ var _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/bidi */ "./node_modules/@angular/cdk/esm5/bidi.es5.js");
91852
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
91853
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
91854
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
91855
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
91856
/* harmony import */ var _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/cdk/platform */ "./node_modules/@angular/cdk/esm5/platform.es5.js");
91857
/* harmony import */ var _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/platform-browser/animations */ "./node_modules/@angular/platform-browser/fesm5/animations.js");
91858
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
91859
/**
91860
 * @license
91861
 * Copyright Google LLC All Rights Reserved.
91862
 *
91863
 * Use of this source code is governed by an MIT-style license that can be
91864
 * found in the LICENSE file at https://angular.io/license
91865
 */
91866
 
91867
 
91868
 
91869
 
91870
 
91871
 
91872
 
91873
 
91874
 
91875
 
91876
 
91877
 
91878
/**
91879
 * @fileoverview added by tsickle
91880
 * @suppress {checkTypes} checked by tsc
91881
 */
91882
var /** @type {?} */ nextUniqueId = 0;
91883
/**
91884
 * Single error message to be shown underneath the form field.
91885
 */
91886
var MatError = /** @class */ (function () {
91887
    function MatError() {
91888
        this.id = "mat-error-" + nextUniqueId++;
91889
    }
91890
    MatError.decorators = [
91891
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
91892
                    selector: 'mat-error',
91893
                    host: {
91894
                        'class': 'mat-error',
91895
                        'role': 'alert',
91896
                        '[attr.id]': 'id',
91897
                    }
91898
                },] },
91899
    ];
91900
    /** @nocollapse */
91901
    MatError.propDecorators = {
91902
        "id": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
91903
    };
91904
    return MatError;
91905
}());
91906
 
91907
/**
91908
 * @fileoverview added by tsickle
91909
 * @suppress {checkTypes} checked by tsc
91910
 */
91911
/**
91912
 * Animations used by the MatFormField.
91913
 */
91914
var /** @type {?} */ matFormFieldAnimations = {
91915
    /** Animation that transitions the form field's error and hint messages. */
91916
    transitionMessages: Object(_angular_animations__WEBPACK_IMPORTED_MODULE_1__["trigger"])('transitionMessages', [
91917
        // TODO(mmalerba): Use angular animations for label animation as well.
91918
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_1__["state"])('enter', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_1__["style"])({ opacity: 1, transform: 'translateY(0%)' })),
91919
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_1__["transition"])('void => enter', [
91920
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_1__["style"])({ opacity: 0, transform: 'translateY(-100%)' }),
91921
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_1__["animate"])('300ms cubic-bezier(0.55, 0, 0.55, 0.2)'),
91922
        ]),
91923
    ])
91924
};
91925
 
91926
/**
91927
 * @fileoverview added by tsickle
91928
 * @suppress {checkTypes} checked by tsc
91929
 */
91930
 
91931
/**
91932
 * An interface which allows a control to work inside of a `MatFormField`.
91933
 * @abstract
91934
 * @template T
91935
 */
91936
var  /**
91937
 * An interface which allows a control to work inside of a `MatFormField`.
91938
 * @abstract
91939
 * @template T
91940
 */
91941
MatFormFieldControl = /** @class */ (function () {
91942
    function MatFormFieldControl() {
91943
    }
91944
    return MatFormFieldControl;
91945
}());
91946
 
91947
/**
91948
 * @fileoverview added by tsickle
91949
 * @suppress {checkTypes} checked by tsc
91950
 */
91951
 
91952
/**
91953
 * \@docs-private
91954
 * @return {?}
91955
 */
91956
function getMatFormFieldPlaceholderConflictError() {
91957
    return Error('Placeholder attribute and child element were both specified.');
91958
}
91959
/**
91960
 * \@docs-private
91961
 * @param {?} align
91962
 * @return {?}
91963
 */
91964
function getMatFormFieldDuplicatedHintError(align) {
91965
    return Error("A hint was already declared for 'align=\"" + align + "\"'.");
91966
}
91967
/**
91968
 * \@docs-private
91969
 * @return {?}
91970
 */
91971
function getMatFormFieldMissingControlError() {
91972
    return Error('mat-form-field must contain a MatFormFieldControl.');
91973
}
91974
 
91975
/**
91976
 * @fileoverview added by tsickle
91977
 * @suppress {checkTypes} checked by tsc
91978
 */
91979
var /** @type {?} */ nextUniqueId$1 = 0;
91980
/**
91981
 * Hint text to be shown underneath the form field control.
91982
 */
91983
var MatHint = /** @class */ (function () {
91984
    function MatHint() {
91985
        /**
91986
         * Whether to align the hint label at the start or end of the line.
91987
         */
91988
        this.align = 'start';
91989
        /**
91990
         * Unique ID for the hint. Used for the aria-describedby on the form field control.
91991
         */
91992
        this.id = "mat-hint-" + nextUniqueId$1++;
91993
    }
91994
    MatHint.decorators = [
91995
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
91996
                    selector: 'mat-hint',
91997
                    host: {
91998
                        'class': 'mat-hint',
91999
                        '[class.mat-right]': 'align == "end"',
92000
                        '[attr.id]': 'id',
92001
                        // Remove align attribute to prevent it from interfering with layout.
92002
                        '[attr.align]': 'null',
92003
                    }
92004
                },] },
92005
    ];
92006
    /** @nocollapse */
92007
    MatHint.propDecorators = {
92008
        "align": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
92009
        "id": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
92010
    };
92011
    return MatHint;
92012
}());
92013
 
92014
/**
92015
 * @fileoverview added by tsickle
92016
 * @suppress {checkTypes} checked by tsc
92017
 */
92018
/**
92019
 * The floating label for a `mat-form-field`.
92020
 */
92021
var MatLabel = /** @class */ (function () {
92022
    function MatLabel() {
92023
    }
92024
    MatLabel.decorators = [
92025
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
92026
                    selector: 'mat-label'
92027
                },] },
92028
    ];
92029
    return MatLabel;
92030
}());
92031
 
92032
/**
92033
 * @fileoverview added by tsickle
92034
 * @suppress {checkTypes} checked by tsc
92035
 */
92036
/**
92037
 * The placeholder text for an `MatFormField`.
92038
 * @deprecated Use `<mat-label>` to specify the label and the `placeholder` attribute to specify the
92039
 *     placeholder.
92040
 * \@breaking-change 8.0.0
92041
 */
92042
var MatPlaceholder = /** @class */ (function () {
92043
    function MatPlaceholder() {
92044
    }
92045
    MatPlaceholder.decorators = [
92046
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
92047
                    selector: 'mat-placeholder'
92048
                },] },
92049
    ];
92050
    return MatPlaceholder;
92051
}());
92052
 
92053
/**
92054
 * @fileoverview added by tsickle
92055
 * @suppress {checkTypes} checked by tsc
92056
 */
92057
/**
92058
 * Prefix to be placed the the front of the form field.
92059
 */
92060
var MatPrefix = /** @class */ (function () {
92061
    function MatPrefix() {
92062
    }
92063
    MatPrefix.decorators = [
92064
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
92065
                    selector: '[matPrefix]',
92066
                },] },
92067
    ];
92068
    return MatPrefix;
92069
}());
92070
 
92071
/**
92072
 * @fileoverview added by tsickle
92073
 * @suppress {checkTypes} checked by tsc
92074
 */
92075
/**
92076
 * Suffix to be placed at the end of the form field.
92077
 */
92078
var MatSuffix = /** @class */ (function () {
92079
    function MatSuffix() {
92080
    }
92081
    MatSuffix.decorators = [
92082
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
92083
                    selector: '[matSuffix]',
92084
                },] },
92085
    ];
92086
    return MatSuffix;
92087
}());
92088
 
92089
/**
92090
 * @fileoverview added by tsickle
92091
 * @suppress {checkTypes} checked by tsc
92092
 */
92093
var /** @type {?} */ nextUniqueId$2 = 0;
92094
var /** @type {?} */ floatingLabelScale = 0.75;
92095
var /** @type {?} */ outlineGapPadding = 5;
92096
/**
92097
 * Boilerplate for applying mixins to MatFormField.
92098
 * \@docs-private
92099
 */
92100
var  /**
92101
 * Boilerplate for applying mixins to MatFormField.
92102
 * \@docs-private
92103
 */
92104
MatFormFieldBase = /** @class */ (function () {
92105
    function MatFormFieldBase(_elementRef) {
92106
        this._elementRef = _elementRef;
92107
    }
92108
    return MatFormFieldBase;
92109
}());
92110
/**
92111
 * Base class to which we're applying the form field mixins.
92112
 * \@docs-private
92113
 */
92114
var /** @type {?} */ _MatFormFieldMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_5__["mixinColor"])(MatFormFieldBase, 'primary');
92115
/**
92116
 * Injection token that can be used to configure the
92117
 * default options for all form field within an app.
92118
 */
92119
var /** @type {?} */ MAT_FORM_FIELD_DEFAULT_OPTIONS = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('MAT_FORM_FIELD_DEFAULT_OPTIONS');
92120
/**
92121
 * Container for form controls that applies Material Design styling and behavior.
92122
 */
92123
var MatFormField = /** @class */ (function (_super) {
92124
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(MatFormField, _super);
92125
    function MatFormField(_elementRef, _changeDetectorRef, labelOptions, _dir, _defaultOptions, _platform, _ngZone, _animationMode) {
92126
        var _this = _super.call(this, _elementRef) || this;
92127
        _this._elementRef = _elementRef;
92128
        _this._changeDetectorRef = _changeDetectorRef;
92129
        _this._dir = _dir;
92130
        _this._defaultOptions = _defaultOptions;
92131
        _this._platform = _platform;
92132
        _this._ngZone = _ngZone;
92133
        /**
92134
         * Override for the logic that disables the label animation in certain cases.
92135
         */
92136
        _this._showAlwaysAnimate = false;
92137
        /**
92138
         * State of the mat-hint and mat-error animations.
92139
         */
92140
        _this._subscriptAnimationState = '';
92141
        _this._hintLabel = '';
92142
        // Unique id for the hint label.
92143
        _this._hintLabelId = "mat-hint-" + nextUniqueId$2++;
92144
        // Unique id for the internal form field label.
92145
        _this._labelId = "mat-form-field-label-" + nextUniqueId$2++;
92146
        _this._outlineGapWidth = 0;
92147
        _this._outlineGapStart = 0;
92148
        _this._initialGapCalculated = false;
92149
        _this._labelOptions = labelOptions ? labelOptions : {};
92150
        _this.floatLabel = _this._labelOptions.float || 'auto';
92151
        _this._animationsEnabled = _animationMode !== 'NoopAnimations';
92152
        return _this;
92153
    }
92154
    Object.defineProperty(MatFormField.prototype, "appearance", {
92155
        get: /**
92156
         * The form-field appearance style.
92157
         * @return {?}
92158
         */
92159
        function () {
92160
            return this._appearance || this._defaultOptions && this._defaultOptions.appearance || 'legacy';
92161
        },
92162
        set: /**
92163
         * @param {?} value
92164
         * @return {?}
92165
         */
92166
        function (value) {
92167
            // If we're switching to `outline` from another appearance, we have to recalculate the gap.
92168
            if (value !== this._appearance && value === 'outline') {
92169
                this._initialGapCalculated = false;
92170
            }
92171
            this._appearance = value;
92172
        },
92173
        enumerable: true,
92174
        configurable: true
92175
    });
92176
    Object.defineProperty(MatFormField.prototype, "hideRequiredMarker", {
92177
        get: /**
92178
         * Whether the required marker should be hidden.
92179
         * @return {?}
92180
         */
92181
        function () { return this._hideRequiredMarker; },
92182
        set: /**
92183
         * @param {?} value
92184
         * @return {?}
92185
         */
92186
        function (value) {
92187
            this._hideRequiredMarker = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_4__["coerceBooleanProperty"])(value);
92188
        },
92189
        enumerable: true,
92190
        configurable: true
92191
    });
92192
    Object.defineProperty(MatFormField.prototype, "_shouldAlwaysFloat", {
92193
        /** Whether the floating label should always float or not. */
92194
        get: /**
92195
         * Whether the floating label should always float or not.
92196
         * @return {?}
92197
         */
92198
        function () {
92199
            return this.floatLabel === 'always' && !this._showAlwaysAnimate;
92200
        },
92201
        enumerable: true,
92202
        configurable: true
92203
    });
92204
    Object.defineProperty(MatFormField.prototype, "_canLabelFloat", {
92205
        /** Whether the label can float or not. */
92206
        get: /**
92207
         * Whether the label can float or not.
92208
         * @return {?}
92209
         */
92210
        function () { return this.floatLabel !== 'never'; },
92211
        enumerable: true,
92212
        configurable: true
92213
    });
92214
    Object.defineProperty(MatFormField.prototype, "hintLabel", {
92215
        get: /**
92216
         * Text for the form field hint.
92217
         * @return {?}
92218
         */
92219
        function () { return this._hintLabel; },
92220
        set: /**
92221
         * @param {?} value
92222
         * @return {?}
92223
         */
92224
        function (value) {
92225
            this._hintLabel = value;
92226
            this._processHints();
92227
        },
92228
        enumerable: true,
92229
        configurable: true
92230
    });
92231
    Object.defineProperty(MatFormField.prototype, "floatLabel", {
92232
        get: /**
92233
         * Whether the label should always float, never float or float as the user types.
92234
         *
92235
         * Note: only the legacy appearance supports the `never` option. `never` was originally added as a
92236
         * way to make the floating label emulate the behavior of a standard input placeholder. However
92237
         * the form field now supports both floating labels and placeholders. Therefore in the non-legacy
92238
         * appearances the `never` option has been disabled in favor of just using the placeholder.
92239
         * @return {?}
92240
         */
92241
        function () {
92242
            return this.appearance !== 'legacy' && this._floatLabel === 'never' ? 'auto' : this._floatLabel;
92243
        },
92244
        set: /**
92245
         * @param {?} value
92246
         * @return {?}
92247
         */
92248
        function (value) {
92249
            if (value !== this._floatLabel) {
92250
                this._floatLabel = value || this._labelOptions.float || 'auto';
92251
                this._changeDetectorRef.markForCheck();
92252
            }
92253
        },
92254
        enumerable: true,
92255
        configurable: true
92256
    });
92257
    /**
92258
     * Gets an ElementRef for the element that a overlay attached to the form-field should be
92259
     * positioned relative to.
92260
     */
92261
    /**
92262
     * Gets an ElementRef for the element that a overlay attached to the form-field should be
92263
     * positioned relative to.
92264
     * @return {?}
92265
     */
92266
    MatFormField.prototype.getConnectedOverlayOrigin = /**
92267
     * Gets an ElementRef for the element that a overlay attached to the form-field should be
92268
     * positioned relative to.
92269
     * @return {?}
92270
     */
92271
    function () {
92272
        return this._connectionContainerRef || this._elementRef;
92273
    };
92274
    /**
92275
     * @return {?}
92276
     */
92277
    MatFormField.prototype.ngAfterContentInit = /**
92278
     * @return {?}
92279
     */
92280
    function () {
92281
        var _this = this;
92282
        this._validateControlChild();
92283
        if (this._control.controlType) {
92284
            this._elementRef.nativeElement.classList
92285
                .add("mat-form-field-type-" + this._control.controlType);
92286
        }
92287
        // Subscribe to changes in the child control state in order to update the form field UI.
92288
        this._control.stateChanges.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_7__["startWith"])(/** @type {?} */ ((null)))).subscribe(function () {
92289
            _this._validatePlaceholders();
92290
            _this._syncDescribedByIds();
92291
            _this._changeDetectorRef.markForCheck();
92292
        });
92293
        // Run change detection if the value, prefix, or suffix changes.
92294
        var /** @type {?} */ valueChanges = this._control.ngControl && this._control.ngControl.valueChanges || rxjs__WEBPACK_IMPORTED_MODULE_6__["EMPTY"];
92295
        Object(rxjs__WEBPACK_IMPORTED_MODULE_6__["merge"])(valueChanges, this._prefixChildren.changes, this._suffixChildren.changes)
92296
            .subscribe(function () { return _this._changeDetectorRef.markForCheck(); });
92297
        // Re-validate when the number of hints changes.
92298
        this._hintChildren.changes.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_7__["startWith"])(null)).subscribe(function () {
92299
            _this._processHints();
92300
            _this._changeDetectorRef.markForCheck();
92301
        });
92302
        // Update the aria-described by when the number of errors changes.
92303
        this._errorChildren.changes.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_7__["startWith"])(null)).subscribe(function () {
92304
            _this._syncDescribedByIds();
92305
            _this._changeDetectorRef.markForCheck();
92306
        });
92307
    };
92308
    /**
92309
     * @return {?}
92310
     */
92311
    MatFormField.prototype.ngAfterContentChecked = /**
92312
     * @return {?}
92313
     */
92314
    function () {
92315
        var _this = this;
92316
        this._validateControlChild();
92317
        if (!this._initialGapCalculated) {
92318
            // @breaking-change 7.0.0 Remove this check and else block once _ngZone is required.
92319
            if (this._ngZone) {
92320
                // It's important that we run this outside the `_ngZone`, because the `Promise.resolve`
92321
                // can kick us into an infinite change detection loop, if the `_initialGapCalculated`
92322
                // wasn't flipped on for some reason.
92323
                this._ngZone.runOutsideAngular(function () {
92324
                    Promise.resolve().then(function () { return _this.updateOutlineGap(); });
92325
                });
92326
            }
92327
            else {
92328
                Promise.resolve().then(function () { return _this.updateOutlineGap(); });
92329
            }
92330
        }
92331
    };
92332
    /**
92333
     * @return {?}
92334
     */
92335
    MatFormField.prototype.ngAfterViewInit = /**
92336
     * @return {?}
92337
     */
92338
    function () {
92339
        // Avoid animations on load.
92340
        this._subscriptAnimationState = 'enter';
92341
        this._changeDetectorRef.detectChanges();
92342
    };
92343
    /** Determines whether a class from the NgControl should be forwarded to the host element. */
92344
    /**
92345
     * Determines whether a class from the NgControl should be forwarded to the host element.
92346
     * @param {?} prop
92347
     * @return {?}
92348
     */
92349
    MatFormField.prototype._shouldForward = /**
92350
     * Determines whether a class from the NgControl should be forwarded to the host element.
92351
     * @param {?} prop
92352
     * @return {?}
92353
     */
92354
    function (prop) {
92355
        var /** @type {?} */ ngControl = this._control ? this._control.ngControl : null;
92356
        return ngControl && ngControl[prop];
92357
    };
92358
    /**
92359
     * @return {?}
92360
     */
92361
    MatFormField.prototype._hasPlaceholder = /**
92362
     * @return {?}
92363
     */
92364
    function () {
92365
        return !!(this._control && this._control.placeholder || this._placeholderChild);
92366
    };
92367
    /**
92368
     * @return {?}
92369
     */
92370
    MatFormField.prototype._hasLabel = /**
92371
     * @return {?}
92372
     */
92373
    function () {
92374
        return !!this._labelChild;
92375
    };
92376
    /**
92377
     * @return {?}
92378
     */
92379
    MatFormField.prototype._shouldLabelFloat = /**
92380
     * @return {?}
92381
     */
92382
    function () {
92383
        return this._canLabelFloat && (this._control.shouldLabelFloat || this._shouldAlwaysFloat);
92384
    };
92385
    /**
92386
     * @return {?}
92387
     */
92388
    MatFormField.prototype._hideControlPlaceholder = /**
92389
     * @return {?}
92390
     */
92391
    function () {
92392
        // In the legacy appearance the placeholder is promoted to a label if no label is given.
92393
        return this.appearance === 'legacy' && !this._hasLabel() ||
92394
            this._hasLabel() && !this._shouldLabelFloat();
92395
    };
92396
    /**
92397
     * @return {?}
92398
     */
92399
    MatFormField.prototype._hasFloatingLabel = /**
92400
     * @return {?}
92401
     */
92402
    function () {
92403
        // In the legacy appearance the placeholder is promoted to a label if no label is given.
92404
        return this._hasLabel() || this.appearance === 'legacy' && this._hasPlaceholder();
92405
    };
92406
    /** Determines whether to display hints or errors. */
92407
    /**
92408
     * Determines whether to display hints or errors.
92409
     * @return {?}
92410
     */
92411
    MatFormField.prototype._getDisplayedMessages = /**
92412
     * Determines whether to display hints or errors.
92413
     * @return {?}
92414
     */
92415
    function () {
92416
        return (this._errorChildren && this._errorChildren.length > 0 &&
92417
            this._control.errorState) ? 'error' : 'hint';
92418
    };
92419
    /** Animates the placeholder up and locks it in position. */
92420
    /**
92421
     * Animates the placeholder up and locks it in position.
92422
     * @return {?}
92423
     */
92424
    MatFormField.prototype._animateAndLockLabel = /**
92425
     * Animates the placeholder up and locks it in position.
92426
     * @return {?}
92427
     */
92428
    function () {
92429
        var _this = this;
92430
        if (this._hasFloatingLabel() && this._canLabelFloat) {
92431
            // If animations are disabled, we shouldn't go in here,
92432
            // because the `transitionend` will never fire.
92433
            if (this._animationsEnabled) {
92434
                this._showAlwaysAnimate = true;
92435
                Object(rxjs__WEBPACK_IMPORTED_MODULE_6__["fromEvent"])(this._label.nativeElement, 'transitionend').pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_7__["take"])(1)).subscribe(function () {
92436
                    _this._showAlwaysAnimate = false;
92437
                });
92438
            }
92439
            this.floatLabel = 'always';
92440
            this._changeDetectorRef.markForCheck();
92441
        }
92442
    };
92443
    /**
92444
     * Ensure that there is only one placeholder (either `placeholder` attribute on the child control
92445
     * or child element with the `mat-placeholder` directive).
92446
     * @return {?}
92447
     */
92448
    MatFormField.prototype._validatePlaceholders = /**
92449
     * Ensure that there is only one placeholder (either `placeholder` attribute on the child control
92450
     * or child element with the `mat-placeholder` directive).
92451
     * @return {?}
92452
     */
92453
    function () {
92454
        if (this._control.placeholder && this._placeholderChild) {
92455
            throw getMatFormFieldPlaceholderConflictError();
92456
        }
92457
    };
92458
    /**
92459
     * Does any extra processing that is required when handling the hints.
92460
     * @return {?}
92461
     */
92462
    MatFormField.prototype._processHints = /**
92463
     * Does any extra processing that is required when handling the hints.
92464
     * @return {?}
92465
     */
92466
    function () {
92467
        this._validateHints();
92468
        this._syncDescribedByIds();
92469
    };
92470
    /**
92471
     * Ensure that there is a maximum of one of each `<mat-hint>` alignment specified, with the
92472
     * attribute being considered as `align="start"`.
92473
     * @return {?}
92474
     */
92475
    MatFormField.prototype._validateHints = /**
92476
     * Ensure that there is a maximum of one of each `<mat-hint>` alignment specified, with the
92477
     * attribute being considered as `align="start"`.
92478
     * @return {?}
92479
     */
92480
    function () {
92481
        var _this = this;
92482
        if (this._hintChildren) {
92483
            var /** @type {?} */ startHint_1;
92484
            var /** @type {?} */ endHint_1;
92485
            this._hintChildren.forEach(function (hint) {
92486
                if (hint.align === 'start') {
92487
                    if (startHint_1 || _this.hintLabel) {
92488
                        throw getMatFormFieldDuplicatedHintError('start');
92489
                    }
92490
                    startHint_1 = hint;
92491
                }
92492
                else if (hint.align === 'end') {
92493
                    if (endHint_1) {
92494
                        throw getMatFormFieldDuplicatedHintError('end');
92495
                    }
92496
                    endHint_1 = hint;
92497
                }
92498
            });
92499
        }
92500
    };
92501
    /**
92502
     * Sets the list of element IDs that describe the child control. This allows the control to update
92503
     * its `aria-describedby` attribute accordingly.
92504
     * @return {?}
92505
     */
92506
    MatFormField.prototype._syncDescribedByIds = /**
92507
     * Sets the list of element IDs that describe the child control. This allows the control to update
92508
     * its `aria-describedby` attribute accordingly.
92509
     * @return {?}
92510
     */
92511
    function () {
92512
        if (this._control) {
92513
            var /** @type {?} */ ids = [];
92514
            if (this._getDisplayedMessages() === 'hint') {
92515
                var /** @type {?} */ startHint = this._hintChildren ?
92516
                    this._hintChildren.find(function (hint) { return hint.align === 'start'; }) : null;
92517
                var /** @type {?} */ endHint = this._hintChildren ?
92518
                    this._hintChildren.find(function (hint) { return hint.align === 'end'; }) : null;
92519
                if (startHint) {
92520
                    ids.push(startHint.id);
92521
                }
92522
                else if (this._hintLabel) {
92523
                    ids.push(this._hintLabelId);
92524
                }
92525
                if (endHint) {
92526
                    ids.push(endHint.id);
92527
                }
92528
            }
92529
            else if (this._errorChildren) {
92530
                ids = this._errorChildren.map(function (error) { return error.id; });
92531
            }
92532
            this._control.setDescribedByIds(ids);
92533
        }
92534
    };
92535
    /** Throws an error if the form field's control is missing. */
92536
    /**
92537
     * Throws an error if the form field's control is missing.
92538
     * @return {?}
92539
     */
92540
    MatFormField.prototype._validateControlChild = /**
92541
     * Throws an error if the form field's control is missing.
92542
     * @return {?}
92543
     */
92544
    function () {
92545
        if (!this._control) {
92546
            throw getMatFormFieldMissingControlError();
92547
        }
92548
    };
92549
    /**
92550
     * Updates the width and position of the gap in the outline. Only relevant for the outline
92551
     * appearance.
92552
     */
92553
    /**
92554
     * Updates the width and position of the gap in the outline. Only relevant for the outline
92555
     * appearance.
92556
     * @return {?}
92557
     */
92558
    MatFormField.prototype.updateOutlineGap = /**
92559
     * Updates the width and position of the gap in the outline. Only relevant for the outline
92560
     * appearance.
92561
     * @return {?}
92562
     */
92563
    function () {
92564
        if (this.appearance === 'outline' && this._label && this._label.nativeElement.children.length) {
92565
            if (this._platform && !this._platform.isBrowser) {
92566
                // getBoundingClientRect isn't available on the server.
92567
                this._initialGapCalculated = true;
92568
                return;
92569
            }
92570
            if (!document.documentElement.contains(this._elementRef.nativeElement)) {
92571
                return;
92572
            }
92573
            var /** @type {?} */ containerStart = this._getStartEnd(this._connectionContainerRef.nativeElement.getBoundingClientRect());
92574
            var /** @type {?} */ labelStart = this._getStartEnd(this._label.nativeElement.children[0].getBoundingClientRect());
92575
            var /** @type {?} */ labelWidth = 0;
92576
            for (var _i = 0, _a = this._label.nativeElement.children; _i < _a.length; _i++) {
92577
                var child = _a[_i];
92578
                labelWidth += child.offsetWidth;
92579
            }
92580
            this._outlineGapStart = labelStart - containerStart - outlineGapPadding;
92581
            this._outlineGapWidth = labelWidth * floatingLabelScale + outlineGapPadding * 2;
92582
        }
92583
        else {
92584
            this._outlineGapStart = 0;
92585
            this._outlineGapWidth = 0;
92586
        }
92587
        this._initialGapCalculated = true;
92588
        this._changeDetectorRef.markForCheck();
92589
    };
92590
    /**
92591
     * Gets the start end of the rect considering the current directionality.
92592
     * @param {?} rect
92593
     * @return {?}
92594
     */
92595
    MatFormField.prototype._getStartEnd = /**
92596
     * Gets the start end of the rect considering the current directionality.
92597
     * @param {?} rect
92598
     * @return {?}
92599
     */
92600
    function (rect) {
92601
        return this._dir && this._dir.value === 'rtl' ? rect.right : rect.left;
92602
    };
92603
    MatFormField.decorators = [
92604
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-form-field',
92605
                    exportAs: 'matFormField',
92606
                    template: "<div class=\"mat-form-field-wrapper\"><div class=\"mat-form-field-flex\" #connectionContainer (click)=\"_control.onContainerClick && _control.onContainerClick($event)\"><ng-container *ngIf=\"appearance == 'outline'\"><div class=\"mat-form-field-outline\"><div class=\"mat-form-field-outline-start\" [style.width.px]=\"_outlineGapStart\"></div><div class=\"mat-form-field-outline-gap\" [style.width.px]=\"_outlineGapWidth\"></div><div class=\"mat-form-field-outline-end\"></div></div><div class=\"mat-form-field-outline mat-form-field-outline-thick\"><div class=\"mat-form-field-outline-start\" [style.width.px]=\"_outlineGapStart\"></div><div class=\"mat-form-field-outline-gap\" [style.width.px]=\"_outlineGapWidth\"></div><div class=\"mat-form-field-outline-end\"></div></div></ng-container><div class=\"mat-form-field-prefix\" *ngIf=\"_prefixChildren.length\"><ng-content select=\"[matPrefix]\"></ng-content></div><div class=\"mat-form-field-infix\" #inputContainer><ng-content></ng-content><span class=\"mat-form-field-label-wrapper\"><label class=\"mat-form-field-label\" [id]=\"_labelId\" [attr.for]=\"_control.id\" [attr.aria-owns]=\"_control.id\" [class.mat-empty]=\"_control.empty && !_shouldAlwaysFloat\" [class.mat-form-field-empty]=\"_control.empty && !_shouldAlwaysFloat\" [class.mat-accent]=\"color == 'accent'\" [class.mat-warn]=\"color == 'warn'\" #label *ngIf=\"_hasFloatingLabel()\" [ngSwitch]=\"_hasLabel()\"><ng-container *ngSwitchCase=\"false\"><ng-content select=\"mat-placeholder\"></ng-content>{{_control.placeholder}}</ng-container><ng-content select=\"mat-label\" *ngSwitchCase=\"true\"></ng-content><span class=\"mat-placeholder-required mat-form-field-required-marker\" aria-hidden=\"true\" *ngIf=\"!hideRequiredMarker && _control.required && !_control.disabled\">&nbsp;*</span></label></span></div><div class=\"mat-form-field-suffix\" *ngIf=\"_suffixChildren.length\"><ng-content select=\"[matSuffix]\"></ng-content></div></div><div class=\"mat-form-field-underline\" #underline *ngIf=\"appearance != 'outline'\"><span class=\"mat-form-field-ripple\" [class.mat-accent]=\"color == 'accent'\" [class.mat-warn]=\"color == 'warn'\"></span></div><div class=\"mat-form-field-subscript-wrapper\" [ngSwitch]=\"_getDisplayedMessages()\"><div *ngSwitchCase=\"'error'\" [@transitionMessages]=\"_subscriptAnimationState\"><ng-content select=\"mat-error\"></ng-content></div><div class=\"mat-form-field-hint-wrapper\" *ngSwitchCase=\"'hint'\" [@transitionMessages]=\"_subscriptAnimationState\"><div *ngIf=\"hintLabel\" [id]=\"_hintLabelId\" class=\"mat-hint\">{{hintLabel}}</div><ng-content select=\"mat-hint:not([align='end'])\"></ng-content><div class=\"mat-form-field-hint-spacer\"></div><ng-content select=\"mat-hint[align='end']\"></ng-content></div></div></div>",
92607
                    // MatInput is a directive and can't have styles, so we need to include its styles here.
92608
                    // The MatInput styles are fairly minimal so it shouldn't be a big deal for people who
92609
                    // aren't using MatInput.
92610
                    styles: [".mat-form-field{display:inline-block;position:relative;text-align:left}[dir=rtl] .mat-form-field{text-align:right}.mat-form-field-wrapper{position:relative}.mat-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-form-field-prefix,.mat-form-field-suffix{white-space:nowrap;flex:none;position:relative}.mat-form-field-infix{display:block;position:relative;flex:auto;min-width:0;width:180px}@media screen and (-ms-high-contrast:active){.mat-form-field-infix{border-image:linear-gradient(transparent,transparent)}}.mat-form-field-label-wrapper{position:absolute;left:0;box-sizing:content-box;width:100%;height:100%;overflow:hidden;pointer-events:none}.mat-form-field-label{position:absolute;left:0;font:inherit;pointer-events:none;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transform-origin:0 0;transition:transform .4s cubic-bezier(.25,.8,.25,1),color .4s cubic-bezier(.25,.8,.25,1),width .4s cubic-bezier(.25,.8,.25,1);display:none}[dir=rtl] .mat-form-field-label{transform-origin:100% 0;left:auto;right:0}.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label,.mat-form-field-empty.mat-form-field-label{display:block}.mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:block;transition:none}.mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-can-float .mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:block}.mat-form-field-label:not(.mat-form-field-empty){transition:none}.mat-form-field-underline{position:absolute;width:100%;pointer-events:none;transform:scaleY(1.0001)}.mat-form-field-ripple{position:absolute;left:0;width:100%;transform-origin:50%;transform:scaleX(.5);opacity:0;transition:background-color .3s cubic-bezier(.55,0,.55,.2)}.mat-form-field.mat-focused .mat-form-field-ripple,.mat-form-field.mat-form-field-invalid .mat-form-field-ripple{opacity:1;transform:scaleX(1);transition:transform .3s cubic-bezier(.25,.8,.25,1),opacity .1s cubic-bezier(.25,.8,.25,1),background-color .3s cubic-bezier(.25,.8,.25,1)}.mat-form-field-subscript-wrapper{position:absolute;box-sizing:border-box;width:100%;overflow:hidden}.mat-form-field-label-wrapper .mat-icon,.mat-form-field-subscript-wrapper .mat-icon{width:1em;height:1em;font-size:inherit;vertical-align:baseline}.mat-form-field-hint-wrapper{display:flex}.mat-form-field-hint-spacer{flex:1 0 1em}.mat-error{display:block}.mat-form-field._mat-animation-noopable .mat-form-field-label,.mat-form-field._mat-animation-noopable .mat-form-field-ripple{transition:none} .mat-form-field-appearance-fill .mat-form-field-flex{border-radius:4px 4px 0 0;padding:.75em .75em 0 .75em}@media screen and (-ms-high-contrast:active){.mat-form-field-appearance-fill .mat-form-field-flex{outline:solid 1px}}.mat-form-field-appearance-fill .mat-form-field-underline::before{content:'';display:block;position:absolute;bottom:0;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-ripple{bottom:0;height:2px}@media screen and (-ms-high-contrast:active){.mat-form-field-appearance-fill .mat-form-field-ripple{height:0;border-top:solid 2px}}.mat-form-field-appearance-fill:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity .6s cubic-bezier(.25,.8,.25,1)}.mat-form-field-appearance-fill._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}.mat-form-field-appearance-fill .mat-form-field-subscript-wrapper{padding:0 1em} .mat-form-field-appearance-legacy .mat-form-field-label{transform:perspective(100px);-ms-transform:none}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon{width:1em}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button{font:inherit;vertical-align:baseline}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button .mat-icon{font-size:inherit}.mat-form-field-appearance-legacy .mat-form-field-underline{height:1px}@media screen and (-ms-high-contrast:active){.mat-form-field-appearance-legacy .mat-form-field-underline{height:0;border-top:solid 1px}}.mat-form-field-appearance-legacy .mat-form-field-ripple{top:0;height:2px}@media screen and (-ms-high-contrast:active){.mat-form-field-appearance-legacy .mat-form-field-ripple{height:0;border-top:solid 2px}}.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}@media screen and (-ms-high-contrast:active){.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}}.mat-form-field-appearance-legacy.mat-form-field-invalid:not(.mat-focused) .mat-form-field-ripple{height:1px} .mat-form-field-appearance-outline .mat-form-field-wrapper{margin:.25em 0}.mat-form-field-appearance-outline .mat-form-field-flex{padding:0 .75em 0 .75em;margin-top:-.25em;position:relative}.mat-form-field-appearance-outline .mat-form-field-prefix,.mat-form-field-appearance-outline .mat-form-field-suffix{top:.25em}.mat-form-field-appearance-outline .mat-form-field-outline{display:flex;position:absolute;top:.25em;left:0;right:0;bottom:0;pointer-events:none}.mat-form-field-appearance-outline .mat-form-field-outline-end,.mat-form-field-appearance-outline .mat-form-field-outline-start{border:1px solid currentColor;min-width:5px}.mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:5px 0 0 5px;border-right-style:none}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-start{border-right-style:solid;border-left-style:none;border-radius:0 5px 5px 0}.mat-form-field-appearance-outline .mat-form-field-outline-end{border-radius:0 5px 5px 0;border-left-style:none;flex-grow:1}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-end{border-left-style:solid;border-right-style:none;border-radius:5px 0 0 5px}.mat-form-field-appearance-outline .mat-form-field-outline-gap{border-radius:.000001px;border:1px solid currentColor;border-left-style:none;border-right-style:none}.mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-outline-gap{border-top-color:transparent}.mat-form-field-appearance-outline .mat-form-field-outline-thick{opacity:0}.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-end,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-gap,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-start{border-width:2px;transition:border-color .3s cubic-bezier(.25,.8,.25,1)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline{opacity:0;transition:opacity .1s cubic-bezier(.25,.8,.25,1)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline{opacity:0;transition:opacity .6s cubic-bezier(.25,.8,.25,1)}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline .mat-form-field-subscript-wrapper{padding:0 1em}.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-end,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-gap,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-start,.mat-form-field-appearance-outline._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-outline{transition:none} .mat-form-field-appearance-standard .mat-form-field-flex{padding-top:.75em}.mat-form-field-appearance-standard .mat-form-field-underline{height:1px}@media screen and (-ms-high-contrast:active){.mat-form-field-appearance-standard .mat-form-field-underline{height:0;border-top:solid 1px}}.mat-form-field-appearance-standard .mat-form-field-ripple{bottom:0;height:2px}@media screen and (-ms-high-contrast:active){.mat-form-field-appearance-standard .mat-form-field-ripple{height:0;border-top:2px}}.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}@media screen and (-ms-high-contrast:active){.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}}.mat-form-field-appearance-standard:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity .6s cubic-bezier(.25,.8,.25,1)}.mat-form-field-appearance-standard._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none} .mat-input-element{font:inherit;background:0 0;color:currentColor;border:none;outline:0;padding:0;margin:0;width:100%;max-width:100%;vertical-align:bottom;text-align:inherit}.mat-input-element:-moz-ui-invalid{box-shadow:none}.mat-input-element::-ms-clear,.mat-input-element::-ms-reveal{display:none}.mat-input-element,.mat-input-element::-webkit-search-cancel-button,.mat-input-element::-webkit-search-decoration,.mat-input-element::-webkit-search-results-button,.mat-input-element::-webkit-search-results-decoration{-webkit-appearance:none}.mat-input-element::-webkit-caps-lock-indicator,.mat-input-element::-webkit-contacts-auto-fill-button,.mat-input-element::-webkit-credentials-auto-fill-button{visibility:hidden}.mat-input-element[type=date]::after,.mat-input-element[type=datetime-local]::after,.mat-input-element[type=datetime]::after,.mat-input-element[type=month]::after,.mat-input-element[type=time]::after,.mat-input-element[type=week]::after{content:' ';white-space:pre;width:1px}.mat-input-element::placeholder{transition:color .4s .133s cubic-bezier(.25,.8,.25,1)}.mat-input-element::-moz-placeholder{transition:color .4s .133s cubic-bezier(.25,.8,.25,1)}.mat-input-element::-webkit-input-placeholder{transition:color .4s .133s cubic-bezier(.25,.8,.25,1)}.mat-input-element:-ms-input-placeholder{transition:color .4s .133s cubic-bezier(.25,.8,.25,1)}.mat-form-field-hide-placeholder .mat-input-element::placeholder{color:transparent!important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{color:transparent!important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{color:transparent!important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{color:transparent!important;-webkit-text-fill-color:transparent;transition:none}textarea.mat-input-element{resize:vertical;overflow:auto}textarea.mat-input-element.cdk-textarea-autosize{resize:none}textarea.mat-input-element{padding:2px 0;margin:-2px 0}"],
92611
                    animations: [matFormFieldAnimations.transitionMessages],
92612
                    host: {
92613
                        'class': 'mat-form-field',
92614
                        '[class.mat-form-field-appearance-standard]': 'appearance == "standard"',
92615
                        '[class.mat-form-field-appearance-fill]': 'appearance == "fill"',
92616
                        '[class.mat-form-field-appearance-outline]': 'appearance == "outline"',
92617
                        '[class.mat-form-field-appearance-legacy]': 'appearance == "legacy"',
92618
                        '[class.mat-form-field-invalid]': '_control.errorState',
92619
                        '[class.mat-form-field-can-float]': '_canLabelFloat',
92620
                        '[class.mat-form-field-should-float]': '_shouldLabelFloat()',
92621
                        '[class.mat-form-field-hide-placeholder]': '_hideControlPlaceholder()',
92622
                        '[class.mat-form-field-disabled]': '_control.disabled',
92623
                        '[class.mat-form-field-autofilled]': '_control.autofilled',
92624
                        '[class.mat-focused]': '_control.focused',
92625
                        '[class.mat-accent]': 'color == "accent"',
92626
                        '[class.mat-warn]': 'color == "warn"',
92627
                        '[class.ng-untouched]': '_shouldForward("untouched")',
92628
                        '[class.ng-touched]': '_shouldForward("touched")',
92629
                        '[class.ng-pristine]': '_shouldForward("pristine")',
92630
                        '[class.ng-dirty]': '_shouldForward("dirty")',
92631
                        '[class.ng-valid]': '_shouldForward("valid")',
92632
                        '[class.ng-invalid]': '_shouldForward("invalid")',
92633
                        '[class.ng-pending]': '_shouldForward("pending")',
92634
                        '[class._mat-animation-noopable]': '!_animationsEnabled',
92635
                    },
92636
                    inputs: ['color'],
92637
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
92638
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
92639
                },] },
92640
    ];
92641
    /** @nocollapse */
92642
    MatFormField.ctorParameters = function () { return [
92643
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
92644
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"], },
92645
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_material_core__WEBPACK_IMPORTED_MODULE_5__["MAT_LABEL_GLOBAL_OPTIONS"],] },] },
92646
        { type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_3__["Directionality"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
92647
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [MAT_FORM_FIELD_DEFAULT_OPTIONS,] },] },
92648
        { type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_8__["Platform"], },
92649
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], },
92650
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_9__["ANIMATION_MODULE_TYPE"],] },] },
92651
    ]; };
92652
    MatFormField.propDecorators = {
92653
        "appearance": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
92654
        "hideRequiredMarker": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
92655
        "hintLabel": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
92656
        "floatLabel": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
92657
        "underlineRef": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: ['underline',] },],
92658
        "_connectionContainerRef": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: ['connectionContainer',] },],
92659
        "_inputContainerRef": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: ['inputContainer',] },],
92660
        "_label": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: ['label',] },],
92661
        "_control": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"], args: [MatFormFieldControl,] },],
92662
        "_placeholderChild": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"], args: [MatPlaceholder,] },],
92663
        "_labelChild": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"], args: [MatLabel,] },],
92664
        "_errorChildren": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"], args: [MatError,] },],
92665
        "_hintChildren": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"], args: [MatHint,] },],
92666
        "_prefixChildren": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"], args: [MatPrefix,] },],
92667
        "_suffixChildren": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"], args: [MatSuffix,] },],
92668
    };
92669
    return MatFormField;
92670
}(_MatFormFieldMixinBase));
92671
 
92672
/**
92673
 * @fileoverview added by tsickle
92674
 * @suppress {checkTypes} checked by tsc
92675
 */
92676
var MatFormFieldModule = /** @class */ (function () {
92677
    function MatFormFieldModule() {
92678
    }
92679
    MatFormFieldModule.decorators = [
92680
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
92681
                    declarations: [
92682
                        MatError,
92683
                        MatFormField,
92684
                        MatHint,
92685
                        MatLabel,
92686
                        MatPlaceholder,
92687
                        MatPrefix,
92688
                        MatSuffix,
92689
                    ],
92690
                    imports: [_angular_common__WEBPACK_IMPORTED_MODULE_10__["CommonModule"]],
92691
                    exports: [
92692
                        MatError,
92693
                        MatFormField,
92694
                        MatHint,
92695
                        MatLabel,
92696
                        MatPlaceholder,
92697
                        MatPrefix,
92698
                        MatSuffix,
92699
                    ],
92700
                },] },
92701
    ];
92702
    return MatFormFieldModule;
92703
}());
92704
 
92705
/**
92706
 * @fileoverview added by tsickle
92707
 * @suppress {checkTypes} checked by tsc
92708
 */
92709
 
92710
/**
92711
 * @fileoverview added by tsickle
92712
 * @suppress {checkTypes} checked by tsc
92713
 */
92714
 
92715
 
92716
//# sourceMappingURL=form-field.es5.js.map
92717
 
92718
 
92719
/***/ }),
92720
 
92721
/***/ "./node_modules/@angular/material/esm5/grid-list.es5.js":
92722
/*!**************************************************************!*\
92723
  !*** ./node_modules/@angular/material/esm5/grid-list.es5.js ***!
92724
  \**************************************************************/
92725
/*! exports provided: MatGridListModule, MatGridList, MatGridTile, MatGridTileText, MatGridAvatarCssMatStyler, MatGridTileHeaderCssMatStyler, MatGridTileFooterCssMatStyler */
92726
/***/ (function(module, __webpack_exports__, __webpack_require__) {
92727
 
92728
"use strict";
92729
__webpack_require__.r(__webpack_exports__);
92730
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatGridListModule", function() { return MatGridListModule; });
92731
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatGridList", function() { return MatGridList; });
92732
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatGridTile", function() { return MatGridTile; });
92733
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatGridTileText", function() { return MatGridTileText; });
92734
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatGridAvatarCssMatStyler", function() { return MatGridAvatarCssMatStyler; });
92735
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatGridTileHeaderCssMatStyler", function() { return MatGridTileHeaderCssMatStyler; });
92736
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatGridTileFooterCssMatStyler", function() { return MatGridTileFooterCssMatStyler; });
92737
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
92738
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
92739
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
92740
/* harmony import */ var _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/bidi */ "./node_modules/@angular/cdk/esm5/bidi.es5.js");
92741
/**
92742
 * @license
92743
 * Copyright Google LLC All Rights Reserved.
92744
 *
92745
 * Use of this source code is governed by an MIT-style license that can be
92746
 * found in the LICENSE file at https://angular.io/license
92747
 */
92748
 
92749
 
92750
 
92751
 
92752
 
92753
/**
92754
 * @fileoverview added by tsickle
92755
 * @suppress {checkTypes} checked by tsc
92756
 */
92757
 
92758
/**
92759
 * Converts values into strings. Falsy values become empty strings.
92760
 * \@docs-private
92761
 * @param {?} value
92762
 * @return {?}
92763
 */
92764
function coerceToString(value) {
92765
    return "" + (value || '');
92766
}
92767
/**
92768
 * Converts a value that might be a string into a number.
92769
 * \@docs-private
92770
 * @param {?} value
92771
 * @return {?}
92772
 */
92773
function coerceToNumber(value) {
92774
    return typeof value === 'string' ? parseInt(value, 10) : value;
92775
}
92776
 
92777
/**
92778
 * @fileoverview added by tsickle
92779
 * @suppress {checkTypes} checked by tsc
92780
 */
92781
var MatGridTile = /** @class */ (function () {
92782
    function MatGridTile(_element) {
92783
        this._element = _element;
92784
        this._rowspan = 1;
92785
        this._colspan = 1;
92786
    }
92787
    Object.defineProperty(MatGridTile.prototype, "rowspan", {
92788
        get: /**
92789
         * Amount of rows that the grid tile takes up.
92790
         * @return {?}
92791
         */
92792
        function () { return this._rowspan; },
92793
        set: /**
92794
         * @param {?} value
92795
         * @return {?}
92796
         */
92797
        function (value) { this._rowspan = coerceToNumber(value); },
92798
        enumerable: true,
92799
        configurable: true
92800
    });
92801
    Object.defineProperty(MatGridTile.prototype, "colspan", {
92802
        get: /**
92803
         * Amount of columns that the grid tile takes up.
92804
         * @return {?}
92805
         */
92806
        function () { return this._colspan; },
92807
        set: /**
92808
         * @param {?} value
92809
         * @return {?}
92810
         */
92811
        function (value) { this._colspan = coerceToNumber(value); },
92812
        enumerable: true,
92813
        configurable: true
92814
    });
92815
    /**
92816
     * Sets the style of the grid-tile element.  Needs to be set manually to avoid
92817
     * "Changed after checked" errors that would occur with HostBinding.
92818
     */
92819
    /**
92820
     * Sets the style of the grid-tile element.  Needs to be set manually to avoid
92821
     * "Changed after checked" errors that would occur with HostBinding.
92822
     * @param {?} property
92823
     * @param {?} value
92824
     * @return {?}
92825
     */
92826
    MatGridTile.prototype._setStyle = /**
92827
     * Sets the style of the grid-tile element.  Needs to be set manually to avoid
92828
     * "Changed after checked" errors that would occur with HostBinding.
92829
     * @param {?} property
92830
     * @param {?} value
92831
     * @return {?}
92832
     */
92833
    function (property, value) {
92834
        this._element.nativeElement.style[property] = value;
92835
    };
92836
    MatGridTile.decorators = [
92837
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-grid-tile',
92838
                    exportAs: 'matGridTile',
92839
                    host: {
92840
                        'class': 'mat-grid-tile',
92841
                    },
92842
                    template: "<figure class=\"mat-figure\"><ng-content></ng-content></figure>",
92843
                    styles: [".mat-grid-list{display:block;position:relative}.mat-grid-tile{display:block;position:absolute;overflow:hidden}.mat-grid-tile .mat-figure{top:0;left:0;right:0;bottom:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}.mat-grid-tile .mat-grid-tile-footer,.mat-grid-tile .mat-grid-tile-header{display:flex;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.38);overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.mat-grid-tile .mat-grid-tile-footer>*,.mat-grid-tile .mat-grid-tile-header>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-grid-tile .mat-grid-tile-footer.mat-2-line,.mat-grid-tile .mat-grid-tile-header.mat-2-line{height:68px}.mat-grid-tile .mat-grid-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden}.mat-grid-tile .mat-grid-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-grid-tile .mat-grid-list-text:empty{display:none}.mat-grid-tile .mat-grid-tile-header{top:0}.mat-grid-tile .mat-grid-tile-footer{bottom:0}.mat-grid-tile .mat-grid-avatar{padding-right:16px}[dir=rtl] .mat-grid-tile .mat-grid-avatar{padding-right:0;padding-left:16px}.mat-grid-tile .mat-grid-avatar:empty{display:none}"],
92844
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
92845
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
92846
                },] },
92847
    ];
92848
    /** @nocollapse */
92849
    MatGridTile.ctorParameters = function () { return [
92850
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
92851
    ]; };
92852
    MatGridTile.propDecorators = {
92853
        "rowspan": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
92854
        "colspan": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
92855
    };
92856
    return MatGridTile;
92857
}());
92858
var MatGridTileText = /** @class */ (function () {
92859
    function MatGridTileText(_element) {
92860
        this._element = _element;
92861
    }
92862
    /**
92863
     * @return {?}
92864
     */
92865
    MatGridTileText.prototype.ngAfterContentInit = /**
92866
     * @return {?}
92867
     */
92868
    function () {
92869
        this._lineSetter = new _angular_material_core__WEBPACK_IMPORTED_MODULE_1__["MatLineSetter"](this._lines, this._element);
92870
    };
92871
    MatGridTileText.decorators = [
92872
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-grid-tile-header, mat-grid-tile-footer',
92873
                    template: "<ng-content select=\"[mat-grid-avatar], [matGridAvatar]\"></ng-content><div class=\"mat-grid-list-text\"><ng-content select=\"[mat-line], [matLine]\"></ng-content></div><ng-content></ng-content>",
92874
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
92875
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
92876
                },] },
92877
    ];
92878
    /** @nocollapse */
92879
    MatGridTileText.ctorParameters = function () { return [
92880
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
92881
    ]; };
92882
    MatGridTileText.propDecorators = {
92883
        "_lines": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"], args: [_angular_material_core__WEBPACK_IMPORTED_MODULE_1__["MatLine"],] },],
92884
    };
92885
    return MatGridTileText;
92886
}());
92887
/**
92888
 * Directive whose purpose is to add the mat- CSS styling to this selector.
92889
 * \@docs-private
92890
 */
92891
var MatGridAvatarCssMatStyler = /** @class */ (function () {
92892
    function MatGridAvatarCssMatStyler() {
92893
    }
92894
    MatGridAvatarCssMatStyler.decorators = [
92895
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
92896
                    selector: '[mat-grid-avatar], [matGridAvatar]',
92897
                    host: { 'class': 'mat-grid-avatar' }
92898
                },] },
92899
    ];
92900
    return MatGridAvatarCssMatStyler;
92901
}());
92902
/**
92903
 * Directive whose purpose is to add the mat- CSS styling to this selector.
92904
 * \@docs-private
92905
 */
92906
var MatGridTileHeaderCssMatStyler = /** @class */ (function () {
92907
    function MatGridTileHeaderCssMatStyler() {
92908
    }
92909
    MatGridTileHeaderCssMatStyler.decorators = [
92910
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
92911
                    selector: 'mat-grid-tile-header',
92912
                    host: { 'class': 'mat-grid-tile-header' }
92913
                },] },
92914
    ];
92915
    return MatGridTileHeaderCssMatStyler;
92916
}());
92917
/**
92918
 * Directive whose purpose is to add the mat- CSS styling to this selector.
92919
 * \@docs-private
92920
 */
92921
var MatGridTileFooterCssMatStyler = /** @class */ (function () {
92922
    function MatGridTileFooterCssMatStyler() {
92923
    }
92924
    MatGridTileFooterCssMatStyler.decorators = [
92925
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
92926
                    selector: 'mat-grid-tile-footer',
92927
                    host: { 'class': 'mat-grid-tile-footer' }
92928
                },] },
92929
    ];
92930
    return MatGridTileFooterCssMatStyler;
92931
}());
92932
 
92933
/**
92934
 * @fileoverview added by tsickle
92935
 * @suppress {checkTypes} checked by tsc
92936
 */
92937
 
92938
/**
92939
 * Class for determining, from a list of tiles, the (row, col) position of each of those tiles
92940
 * in the grid. This is necessary (rather than just rendering the tiles in normal document flow)
92941
 * because the tiles can have a rowspan.
92942
 *
92943
 * The positioning algorithm greedily places each tile as soon as it encounters a gap in the grid
92944
 * large enough to accommodate it so that the tiles still render in the same order in which they
92945
 * are given.
92946
 *
92947
 * The basis of the algorithm is the use of an array to track the already placed tiles. Each
92948
 * element of the array corresponds to a column, and the value indicates how many cells in that
92949
 * column are already occupied; zero indicates an empty cell. Moving "down" to the next row
92950
 * decrements each value in the tracking array (indicating that the column is one cell closer to
92951
 * being free).
92952
 *
92953
 * \@docs-private
92954
 */
92955
var /**
92956
 * Class for determining, from a list of tiles, the (row, col) position of each of those tiles
92957
 * in the grid. This is necessary (rather than just rendering the tiles in normal document flow)
92958
 * because the tiles can have a rowspan.
92959
 *
92960
 * The positioning algorithm greedily places each tile as soon as it encounters a gap in the grid
92961
 * large enough to accommodate it so that the tiles still render in the same order in which they
92962
 * are given.
92963
 *
92964
 * The basis of the algorithm is the use of an array to track the already placed tiles. Each
92965
 * element of the array corresponds to a column, and the value indicates how many cells in that
92966
 * column are already occupied; zero indicates an empty cell. Moving "down" to the next row
92967
 * decrements each value in the tracking array (indicating that the column is one cell closer to
92968
 * being free).
92969
 *
92970
 * \@docs-private
92971
 */
92972
TileCoordinator = /** @class */ (function () {
92973
    function TileCoordinator(numColumns, tiles) {
92974
        var _this = this;
92975
        /**
92976
         * Index at which the search for the next gap will start.
92977
         */
92978
        this.columnIndex = 0;
92979
        /**
92980
         * The current row index.
92981
         */
92982
        this.rowIndex = 0;
92983
        this.tracker = new Array(numColumns);
92984
        this.tracker.fill(0, 0, this.tracker.length);
92985
        this.positions = tiles.map(function (tile) { return _this._trackTile(tile); });
92986
    }
92987
    Object.defineProperty(TileCoordinator.prototype, "rowCount", {
92988
        /** Gets the total number of rows occupied by tiles */
92989
        get: /**
92990
         * Gets the total number of rows occupied by tiles
92991
         * @return {?}
92992
         */
92993
        function () { return this.rowIndex + 1; },
92994
        enumerable: true,
92995
        configurable: true
92996
    });
92997
    Object.defineProperty(TileCoordinator.prototype, "rowspan", {
92998
        /**
92999
         * Gets the total span of rows occupied by tiles.
93000
         * Ex: A list with 1 row that contains a tile with rowspan 2 will have a total rowspan of 2.
93001
         */
93002
        get: /**
93003
         * Gets the total span of rows occupied by tiles.
93004
         * Ex: A list with 1 row that contains a tile with rowspan 2 will have a total rowspan of 2.
93005
         * @return {?}
93006
         */
93007
        function () {
93008
            var /** @type {?} */ lastRowMax = Math.max.apply(Math, this.tracker);
93009
            // if any of the tiles has a rowspan that pushes it beyond the total row count,
93010
            // add the difference to the rowcount
93011
            return lastRowMax > 1 ? this.rowCount + lastRowMax - 1 : this.rowCount;
93012
        },
93013
        enumerable: true,
93014
        configurable: true
93015
    });
93016
    /**
93017
     * Calculates the row and col position of a tile.
93018
     * @param {?} tile
93019
     * @return {?}
93020
     */
93021
    TileCoordinator.prototype._trackTile = /**
93022
     * Calculates the row and col position of a tile.
93023
     * @param {?} tile
93024
     * @return {?}
93025
     */
93026
    function (tile) {
93027
        // Find a gap large enough for this tile.
93028
        var /** @type {?} */ gapStartIndex = this._findMatchingGap(tile.colspan);
93029
        // Place tile in the resulting gap.
93030
        this._markTilePosition(gapStartIndex, tile);
93031
        // The next time we look for a gap, the search will start at columnIndex, which should be
93032
        // immediately after the tile that has just been placed.
93033
        this.columnIndex = gapStartIndex + tile.colspan;
93034
        return new TilePosition(this.rowIndex, gapStartIndex);
93035
    };
93036
    /**
93037
     * Finds the next available space large enough to fit the tile.
93038
     * @param {?} tileCols
93039
     * @return {?}
93040
     */
93041
    TileCoordinator.prototype._findMatchingGap = /**
93042
     * Finds the next available space large enough to fit the tile.
93043
     * @param {?} tileCols
93044
     * @return {?}
93045
     */
93046
    function (tileCols) {
93047
        if (tileCols > this.tracker.length) {
93048
            throw Error("mat-grid-list: tile with colspan " + tileCols + " is wider than " +
93049
                ("grid with cols=\"" + this.tracker.length + "\"."));
93050
        }
93051
        // Start index is inclusive, end index is exclusive.
93052
        var /** @type {?} */ gapStartIndex = -1;
93053
        var /** @type {?} */ gapEndIndex = -1;
93054
        // Look for a gap large enough to fit the given tile. Empty spaces are marked with a zero.
93055
        do {
93056
            // If we've reached the end of the row, go to the next row.
93057
            if (this.columnIndex + tileCols > this.tracker.length) {
93058
                this._nextRow();
93059
                continue;
93060
            }
93061
            gapStartIndex = this.tracker.indexOf(0, this.columnIndex);
93062
            // If there are no more empty spaces in this row at all, move on to the next row.
93063
            if (gapStartIndex == -1) {
93064
                this._nextRow();
93065
                continue;
93066
            }
93067
            gapEndIndex = this._findGapEndIndex(gapStartIndex);
93068
            // If a gap large enough isn't found, we want to start looking immediately after the current
93069
            // gap on the next iteration.
93070
            this.columnIndex = gapStartIndex + 1;
93071
            // Continue iterating until we find a gap wide enough for this tile.
93072
        } while (gapEndIndex - gapStartIndex < tileCols);
93073
        // If we still didn't manage to find a gap, ensure that the index is
93074
        // at least zero so the tile doesn't get pulled out of the grid.
93075
        return Math.max(gapStartIndex, 0);
93076
    };
93077
    /**
93078
     * Move "down" to the next row.
93079
     * @return {?}
93080
     */
93081
    TileCoordinator.prototype._nextRow = /**
93082
     * Move "down" to the next row.
93083
     * @return {?}
93084
     */
93085
    function () {
93086
        this.columnIndex = 0;
93087
        this.rowIndex++;
93088
        // Decrement all spaces by one to reflect moving down one row.
93089
        for (var /** @type {?} */ i = 0; i < this.tracker.length; i++) {
93090
            this.tracker[i] = Math.max(0, this.tracker[i] - 1);
93091
        }
93092
    };
93093
    /**
93094
     * Finds the end index (exclusive) of a gap given the index from which to start looking.
93095
     * The gap ends when a non-zero value is found.
93096
     * @param {?} gapStartIndex
93097
     * @return {?}
93098
     */
93099
    TileCoordinator.prototype._findGapEndIndex = /**
93100
     * Finds the end index (exclusive) of a gap given the index from which to start looking.
93101
     * The gap ends when a non-zero value is found.
93102
     * @param {?} gapStartIndex
93103
     * @return {?}
93104
     */
93105
    function (gapStartIndex) {
93106
        for (var /** @type {?} */ i = gapStartIndex + 1; i < this.tracker.length; i++) {
93107
            if (this.tracker[i] != 0) {
93108
                return i;
93109
            }
93110
        }
93111
        // The gap ends with the end of the row.
93112
        return this.tracker.length;
93113
    };
93114
    /**
93115
     * Update the tile tracker to account for the given tile in the given space.
93116
     * @param {?} start
93117
     * @param {?} tile
93118
     * @return {?}
93119
     */
93120
    TileCoordinator.prototype._markTilePosition = /**
93121
     * Update the tile tracker to account for the given tile in the given space.
93122
     * @param {?} start
93123
     * @param {?} tile
93124
     * @return {?}
93125
     */
93126
    function (start, tile) {
93127
        for (var /** @type {?} */ i = 0; i < tile.colspan; i++) {
93128
            this.tracker[start + i] = tile.rowspan;
93129
        }
93130
    };
93131
    return TileCoordinator;
93132
}());
93133
/**
93134
 * Simple data structure for tile position (row, col).
93135
 * \@docs-private
93136
 */
93137
var /**
93138
 * Simple data structure for tile position (row, col).
93139
 * \@docs-private
93140
 */
93141
TilePosition = /** @class */ (function () {
93142
    function TilePosition(row, col) {
93143
        this.row = row;
93144
        this.col = col;
93145
    }
93146
    return TilePosition;
93147
}());
93148
 
93149
/**
93150
 * @fileoverview added by tsickle
93151
 * @suppress {checkTypes} checked by tsc
93152
 */
93153
/**
93154
 * Sets the style properties for an individual tile, given the position calculated by the
93155
 * Tile Coordinator.
93156
 * \@docs-private
93157
 * @abstract
93158
 */
93159
var /**
93160
 * Sets the style properties for an individual tile, given the position calculated by the
93161
 * Tile Coordinator.
93162
 * \@docs-private
93163
 * @abstract
93164
 */
93165
TileStyler = /** @class */ (function () {
93166
    function TileStyler() {
93167
        this._rows = 0;
93168
        this._rowspan = 0;
93169
    }
93170
    /**
93171
     * Adds grid-list layout info once it is available. Cannot be processed in the constructor
93172
     * because these properties haven't been calculated by that point.
93173
     *
93174
     * @param gutterSize Size of the grid's gutter.
93175
     * @param tracker Instance of the TileCoordinator.
93176
     * @param cols Amount of columns in the grid.
93177
     * @param direction Layout direction of the grid.
93178
     */
93179
    /**
93180
     * Adds grid-list layout info once it is available. Cannot be processed in the constructor
93181
     * because these properties haven't been calculated by that point.
93182
     *
93183
     * @param {?} gutterSize Size of the grid's gutter.
93184
     * @param {?} tracker Instance of the TileCoordinator.
93185
     * @param {?} cols Amount of columns in the grid.
93186
     * @param {?} direction Layout direction of the grid.
93187
     * @return {?}
93188
     */
93189
    TileStyler.prototype.init = /**
93190
     * Adds grid-list layout info once it is available. Cannot be processed in the constructor
93191
     * because these properties haven't been calculated by that point.
93192
     *
93193
     * @param {?} gutterSize Size of the grid's gutter.
93194
     * @param {?} tracker Instance of the TileCoordinator.
93195
     * @param {?} cols Amount of columns in the grid.
93196
     * @param {?} direction Layout direction of the grid.
93197
     * @return {?}
93198
     */
93199
    function (gutterSize, tracker, cols, direction) {
93200
        this._gutterSize = normalizeUnits(gutterSize);
93201
        this._rows = tracker.rowCount;
93202
        this._rowspan = tracker.rowspan;
93203
        this._cols = cols;
93204
        this._direction = direction;
93205
    };
93206
    /**
93207
     * Computes the amount of space a single 1x1 tile would take up (width or height).
93208
     * Used as a basis for other calculations.
93209
     * @param sizePercent Percent of the total grid-list space that one 1x1 tile would take up.
93210
     * @param gutterFraction Fraction of the gutter size taken up by one 1x1 tile.
93211
     * @return The size of a 1x1 tile as an expression that can be evaluated via CSS calc().
93212
     */
93213
    /**
93214
     * Computes the amount of space a single 1x1 tile would take up (width or height).
93215
     * Used as a basis for other calculations.
93216
     * @param {?} sizePercent Percent of the total grid-list space that one 1x1 tile would take up.
93217
     * @param {?} gutterFraction Fraction of the gutter size taken up by one 1x1 tile.
93218
     * @return {?} The size of a 1x1 tile as an expression that can be evaluated via CSS calc().
93219
     */
93220
    TileStyler.prototype.getBaseTileSize = /**
93221
     * Computes the amount of space a single 1x1 tile would take up (width or height).
93222
     * Used as a basis for other calculations.
93223
     * @param {?} sizePercent Percent of the total grid-list space that one 1x1 tile would take up.
93224
     * @param {?} gutterFraction Fraction of the gutter size taken up by one 1x1 tile.
93225
     * @return {?} The size of a 1x1 tile as an expression that can be evaluated via CSS calc().
93226
     */
93227
    function (sizePercent, gutterFraction) {
93228
        // Take the base size percent (as would be if evenly dividing the size between cells),
93229
        // and then subtracting the size of one gutter. However, since there are no gutters on the
93230
        // edges, each tile only uses a fraction (gutterShare = numGutters / numCells) of the gutter
93231
        // size. (Imagine having one gutter per tile, and then breaking up the extra gutter on the
93232
        // edge evenly among the cells).
93233
        return "(" + sizePercent + "% - (" + this._gutterSize + " * " + gutterFraction + "))";
93234
    };
93235
    /**
93236
     * Gets The horizontal or vertical position of a tile, e.g., the 'top' or 'left' property value.
93237
     * @param offset Number of tiles that have already been rendered in the row/column.
93238
     * @param baseSize Base size of a 1x1 tile (as computed in getBaseTileSize).
93239
     * @return Position of the tile as a CSS calc() expression.
93240
     */
93241
    /**
93242
     * Gets The horizontal or vertical position of a tile, e.g., the 'top' or 'left' property value.
93243
     * @param {?} baseSize Base size of a 1x1 tile (as computed in getBaseTileSize).
93244
     * @param {?} offset Number of tiles that have already been rendered in the row/column.
93245
     * @return {?} Position of the tile as a CSS calc() expression.
93246
     */
93247
    TileStyler.prototype.getTilePosition = /**
93248
     * Gets The horizontal or vertical position of a tile, e.g., the 'top' or 'left' property value.
93249
     * @param {?} baseSize Base size of a 1x1 tile (as computed in getBaseTileSize).
93250
     * @param {?} offset Number of tiles that have already been rendered in the row/column.
93251
     * @return {?} Position of the tile as a CSS calc() expression.
93252
     */
93253
    function (baseSize, offset) {
93254
        // The position comes the size of a 1x1 tile plus gutter for each previous tile in the
93255
        // row/column (offset).
93256
        return offset === 0 ? '0' : calc("(" + baseSize + " + " + this._gutterSize + ") * " + offset);
93257
    };
93258
    /**
93259
     * Gets the actual size of a tile, e.g., width or height, taking rowspan or colspan into account.
93260
     * @param baseSize Base size of a 1x1 tile (as computed in getBaseTileSize).
93261
     * @param span The tile's rowspan or colspan.
93262
     * @return Size of the tile as a CSS calc() expression.
93263
     */
93264
    /**
93265
     * Gets the actual size of a tile, e.g., width or height, taking rowspan or colspan into account.
93266
     * @param {?} baseSize Base size of a 1x1 tile (as computed in getBaseTileSize).
93267
     * @param {?} span The tile's rowspan or colspan.
93268
     * @return {?} Size of the tile as a CSS calc() expression.
93269
     */
93270
    TileStyler.prototype.getTileSize = /**
93271
     * Gets the actual size of a tile, e.g., width or height, taking rowspan or colspan into account.
93272
     * @param {?} baseSize Base size of a 1x1 tile (as computed in getBaseTileSize).
93273
     * @param {?} span The tile's rowspan or colspan.
93274
     * @return {?} Size of the tile as a CSS calc() expression.
93275
     */
93276
    function (baseSize, span) {
93277
        return "(" + baseSize + " * " + span + ") + (" + (span - 1) + " * " + this._gutterSize + ")";
93278
    };
93279
    /**
93280
     * Sets the style properties to be applied to a tile for the given row and column index.
93281
     * @param tile Tile to which to apply the styling.
93282
     * @param rowIndex Index of the tile's row.
93283
     * @param colIndex Index of the tile's column.
93284
     */
93285
    /**
93286
     * Sets the style properties to be applied to a tile for the given row and column index.
93287
     * @param {?} tile Tile to which to apply the styling.
93288
     * @param {?} rowIndex Index of the tile's row.
93289
     * @param {?} colIndex Index of the tile's column.
93290
     * @return {?}
93291
     */
93292
    TileStyler.prototype.setStyle = /**
93293
     * Sets the style properties to be applied to a tile for the given row and column index.
93294
     * @param {?} tile Tile to which to apply the styling.
93295
     * @param {?} rowIndex Index of the tile's row.
93296
     * @param {?} colIndex Index of the tile's column.
93297
     * @return {?}
93298
     */
93299
    function (tile, rowIndex, colIndex) {
93300
        // Percent of the available horizontal space that one column takes up.
93301
        var /** @type {?} */ percentWidthPerTile = 100 / this._cols;
93302
        // Fraction of the vertical gutter size that each column takes up.
93303
        // For example, if there are 5 columns, each column uses 4/5 = 0.8 times the gutter width.
93304
        var /** @type {?} */ gutterWidthFractionPerTile = (this._cols - 1) / this._cols;
93305
        this.setColStyles(tile, colIndex, percentWidthPerTile, gutterWidthFractionPerTile);
93306
        this.setRowStyles(tile, rowIndex, percentWidthPerTile, gutterWidthFractionPerTile);
93307
    };
93308
    /** Sets the horizontal placement of the tile in the list. */
93309
    /**
93310
     * Sets the horizontal placement of the tile in the list.
93311
     * @param {?} tile
93312
     * @param {?} colIndex
93313
     * @param {?} percentWidth
93314
     * @param {?} gutterWidth
93315
     * @return {?}
93316
     */
93317
    TileStyler.prototype.setColStyles = /**
93318
     * Sets the horizontal placement of the tile in the list.
93319
     * @param {?} tile
93320
     * @param {?} colIndex
93321
     * @param {?} percentWidth
93322
     * @param {?} gutterWidth
93323
     * @return {?}
93324
     */
93325
    function (tile, colIndex, percentWidth, gutterWidth) {
93326
        // Base horizontal size of a column.
93327
        var /** @type {?} */ baseTileWidth = this.getBaseTileSize(percentWidth, gutterWidth);
93328
        // The width and horizontal position of each tile is always calculated the same way, but the
93329
        // height and vertical position depends on the rowMode.
93330
        var /** @type {?} */ side = this._direction === 'rtl' ? 'right' : 'left';
93331
        tile._setStyle(side, this.getTilePosition(baseTileWidth, colIndex));
93332
        tile._setStyle('width', calc(this.getTileSize(baseTileWidth, tile.colspan)));
93333
    };
93334
    /**
93335
     * Calculates the total size taken up by gutters across one axis of a list.
93336
     */
93337
    /**
93338
     * Calculates the total size taken up by gutters across one axis of a list.
93339
     * @return {?}
93340
     */
93341
    TileStyler.prototype.getGutterSpan = /**
93342
     * Calculates the total size taken up by gutters across one axis of a list.
93343
     * @return {?}
93344
     */
93345
    function () {
93346
        return this._gutterSize + " * (" + this._rowspan + " - 1)";
93347
    };
93348
    /**
93349
     * Calculates the total size taken up by tiles across one axis of a list.
93350
     * @param tileHeight Height of the tile.
93351
     */
93352
    /**
93353
     * Calculates the total size taken up by tiles across one axis of a list.
93354
     * @param {?} tileHeight Height of the tile.
93355
     * @return {?}
93356
     */
93357
    TileStyler.prototype.getTileSpan = /**
93358
     * Calculates the total size taken up by tiles across one axis of a list.
93359
     * @param {?} tileHeight Height of the tile.
93360
     * @return {?}
93361
     */
93362
    function (tileHeight) {
93363
        return this._rowspan + " * " + this.getTileSize(tileHeight, 1);
93364
    };
93365
    /**
93366
     * Calculates the computed height and returns the correct style property to set.
93367
     * This method can be implemented by each type of TileStyler.
93368
     * @docs-private
93369
     */
93370
    /**
93371
     * Calculates the computed height and returns the correct style property to set.
93372
     * This method can be implemented by each type of TileStyler.
93373
     * \@docs-private
93374
     * @return {?}
93375
     */
93376
    TileStyler.prototype.getComputedHeight = /**
93377
     * Calculates the computed height and returns the correct style property to set.
93378
     * This method can be implemented by each type of TileStyler.
93379
     * \@docs-private
93380
     * @return {?}
93381
     */
93382
    function () { return null; };
93383
    return TileStyler;
93384
}());
93385
/**
93386
 * This type of styler is instantiated when the user passes in a fixed row height.
93387
 * Example `<mat-grid-list cols="3" rowHeight="100px">`
93388
 * \@docs-private
93389
 */
93390
var /**
93391
 * This type of styler is instantiated when the user passes in a fixed row height.
93392
 * Example `<mat-grid-list cols="3" rowHeight="100px">`
93393
 * \@docs-private
93394
 */
93395
FixedTileStyler = /** @class */ (function (_super) {
93396
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(FixedTileStyler, _super);
93397
    function FixedTileStyler(fixedRowHeight) {
93398
        var _this = _super.call(this) || this;
93399
        _this.fixedRowHeight = fixedRowHeight;
93400
        return _this;
93401
    }
93402
    /**
93403
     * @param {?} gutterSize
93404
     * @param {?} tracker
93405
     * @param {?} cols
93406
     * @param {?} direction
93407
     * @return {?}
93408
     */
93409
    FixedTileStyler.prototype.init = /**
93410
     * @param {?} gutterSize
93411
     * @param {?} tracker
93412
     * @param {?} cols
93413
     * @param {?} direction
93414
     * @return {?}
93415
     */
93416
    function (gutterSize, tracker, cols, direction) {
93417
        _super.prototype.init.call(this, gutterSize, tracker, cols, direction);
93418
        this.fixedRowHeight = normalizeUnits(this.fixedRowHeight);
93419
    };
93420
    /**
93421
     * @param {?} tile
93422
     * @param {?} rowIndex
93423
     * @return {?}
93424
     */
93425
    FixedTileStyler.prototype.setRowStyles = /**
93426
     * @param {?} tile
93427
     * @param {?} rowIndex
93428
     * @return {?}
93429
     */
93430
    function (tile, rowIndex) {
93431
        tile._setStyle('top', this.getTilePosition(this.fixedRowHeight, rowIndex));
93432
        tile._setStyle('height', calc(this.getTileSize(this.fixedRowHeight, tile.rowspan)));
93433
    };
93434
    /**
93435
     * @return {?}
93436
     */
93437
    FixedTileStyler.prototype.getComputedHeight = /**
93438
     * @return {?}
93439
     */
93440
    function () {
93441
        return [
93442
            'height', calc(this.getTileSpan(this.fixedRowHeight) + " + " + this.getGutterSpan())
93443
        ];
93444
    };
93445
    /**
93446
     * @param {?} list
93447
     * @return {?}
93448
     */
93449
    FixedTileStyler.prototype.reset = /**
93450
     * @param {?} list
93451
     * @return {?}
93452
     */
93453
    function (list) {
93454
        list._setListStyle(['height', null]);
93455
        list._tiles.forEach(function (tile) {
93456
            tile._setStyle('top', null);
93457
            tile._setStyle('height', null);
93458
        });
93459
    };
93460
    return FixedTileStyler;
93461
}(TileStyler));
93462
/**
93463
 * This type of styler is instantiated when the user passes in a width:height ratio
93464
 * for the row height.  Example `<mat-grid-list cols="3" rowHeight="3:1">`
93465
 * \@docs-private
93466
 */
93467
var /**
93468
 * This type of styler is instantiated when the user passes in a width:height ratio
93469
 * for the row height.  Example `<mat-grid-list cols="3" rowHeight="3:1">`
93470
 * \@docs-private
93471
 */
93472
RatioTileStyler = /** @class */ (function (_super) {
93473
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(RatioTileStyler, _super);
93474
    function RatioTileStyler(value) {
93475
        var _this = _super.call(this) || this;
93476
        _this._parseRatio(value);
93477
        return _this;
93478
    }
93479
    /**
93480
     * @param {?} tile
93481
     * @param {?} rowIndex
93482
     * @param {?} percentWidth
93483
     * @param {?} gutterWidth
93484
     * @return {?}
93485
     */
93486
    RatioTileStyler.prototype.setRowStyles = /**
93487
     * @param {?} tile
93488
     * @param {?} rowIndex
93489
     * @param {?} percentWidth
93490
     * @param {?} gutterWidth
93491
     * @return {?}
93492
     */
93493
    function (tile, rowIndex, percentWidth, gutterWidth) {
93494
        var /** @type {?} */ percentHeightPerTile = percentWidth / this.rowHeightRatio;
93495
        this.baseTileHeight = this.getBaseTileSize(percentHeightPerTile, gutterWidth);
93496
        // Use padding-top and margin-top to maintain the given aspect ratio, as
93497
        // a percentage-based value for these properties is applied versus the *width* of the
93498
        // containing block. See http://www.w3.org/TR/CSS2/box.html#margin-properties
93499
        tile._setStyle('marginTop', this.getTilePosition(this.baseTileHeight, rowIndex));
93500
        tile._setStyle('paddingTop', calc(this.getTileSize(this.baseTileHeight, tile.rowspan)));
93501
    };
93502
    /**
93503
     * @return {?}
93504
     */
93505
    RatioTileStyler.prototype.getComputedHeight = /**
93506
     * @return {?}
93507
     */
93508
    function () {
93509
        return [
93510
            'paddingBottom', calc(this.getTileSpan(this.baseTileHeight) + " + " + this.getGutterSpan())
93511
        ];
93512
    };
93513
    /**
93514
     * @param {?} list
93515
     * @return {?}
93516
     */
93517
    RatioTileStyler.prototype.reset = /**
93518
     * @param {?} list
93519
     * @return {?}
93520
     */
93521
    function (list) {
93522
        list._setListStyle(['paddingBottom', null]);
93523
        list._tiles.forEach(function (tile) {
93524
            tile._setStyle('marginTop', null);
93525
            tile._setStyle('paddingTop', null);
93526
        });
93527
    };
93528
    /**
93529
     * @param {?} value
93530
     * @return {?}
93531
     */
93532
    RatioTileStyler.prototype._parseRatio = /**
93533
     * @param {?} value
93534
     * @return {?}
93535
     */
93536
    function (value) {
93537
        var /** @type {?} */ ratioParts = value.split(':');
93538
        if (ratioParts.length !== 2) {
93539
            throw Error("mat-grid-list: invalid ratio given for row-height: \"" + value + "\"");
93540
        }
93541
        this.rowHeightRatio = parseFloat(ratioParts[0]) / parseFloat(ratioParts[1]);
93542
    };
93543
    return RatioTileStyler;
93544
}(TileStyler));
93545
/**
93546
 * This type of styler is instantiated when the user selects a "fit" row height mode.
93547
 * In other words, the row height will reflect the total height of the container divided
93548
 * by the number of rows.  Example `<mat-grid-list cols="3" rowHeight="fit">`
93549
 *
93550
 * \@docs-private
93551
 */
93552
var /**
93553
 * This type of styler is instantiated when the user selects a "fit" row height mode.
93554
 * In other words, the row height will reflect the total height of the container divided
93555
 * by the number of rows.  Example `<mat-grid-list cols="3" rowHeight="fit">`
93556
 *
93557
 * \@docs-private
93558
 */
93559
FitTileStyler = /** @class */ (function (_super) {
93560
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(FitTileStyler, _super);
93561
    function FitTileStyler() {
93562
        return _super !== null && _super.apply(this, arguments) || this;
93563
    }
93564
    /**
93565
     * @param {?} tile
93566
     * @param {?} rowIndex
93567
     * @return {?}
93568
     */
93569
    FitTileStyler.prototype.setRowStyles = /**
93570
     * @param {?} tile
93571
     * @param {?} rowIndex
93572
     * @return {?}
93573
     */
93574
    function (tile, rowIndex) {
93575
        // Percent of the available vertical space that one row takes up.
93576
        var /** @type {?} */ percentHeightPerTile = 100 / this._rowspan;
93577
        // Fraction of the horizontal gutter size that each column takes up.
93578
        var /** @type {?} */ gutterHeightPerTile = (this._rows - 1) / this._rows;
93579
        // Base vertical size of a column.
93580
        var /** @type {?} */ baseTileHeight = this.getBaseTileSize(percentHeightPerTile, gutterHeightPerTile);
93581
        tile._setStyle('top', this.getTilePosition(baseTileHeight, rowIndex));
93582
        tile._setStyle('height', calc(this.getTileSize(baseTileHeight, tile.rowspan)));
93583
    };
93584
    /**
93585
     * @param {?} list
93586
     * @return {?}
93587
     */
93588
    FitTileStyler.prototype.reset = /**
93589
     * @param {?} list
93590
     * @return {?}
93591
     */
93592
    function (list) {
93593
        list._tiles.forEach(function (tile) {
93594
            tile._setStyle('top', null);
93595
            tile._setStyle('height', null);
93596
        });
93597
    };
93598
    return FitTileStyler;
93599
}(TileStyler));
93600
/**
93601
 * Wraps a CSS string in a calc function
93602
 * @param {?} exp
93603
 * @return {?}
93604
 */
93605
function calc(exp) { return "calc(" + exp + ")"; }
93606
/**
93607
 * Appends pixels to a CSS string if no units are given.
93608
 * @param {?} value
93609
 * @return {?}
93610
 */
93611
function normalizeUnits(value) {
93612
    return (value.match(/px|em|rem/)) ? value : value + 'px';
93613
}
93614
 
93615
/**
93616
 * @fileoverview added by tsickle
93617
 * @suppress {checkTypes} checked by tsc
93618
 */
93619
// TODO(kara): Conditional (responsive) column count / row size.
93620
// TODO(kara): Re-layout on window resize / media change (debounced).
93621
// TODO(kara): gridTileHeader and gridTileFooter.
93622
var /** @type {?} */ MAT_FIT_MODE = 'fit';
93623
var MatGridList = /** @class */ (function () {
93624
    function MatGridList(_element, _dir) {
93625
        this._element = _element;
93626
        this._dir = _dir;
93627
        /**
93628
         * The amount of space between tiles. This will be something like '5px' or '2em'.
93629
         */
93630
        this._gutter = '1px';
93631
    }
93632
    Object.defineProperty(MatGridList.prototype, "cols", {
93633
        get: /**
93634
         * Amount of columns in the grid list.
93635
         * @return {?}
93636
         */
93637
        function () { return this._cols; },
93638
        set: /**
93639
         * @param {?} value
93640
         * @return {?}
93641
         */
93642
        function (value) { this._cols = coerceToNumber(value); },
93643
        enumerable: true,
93644
        configurable: true
93645
    });
93646
    Object.defineProperty(MatGridList.prototype, "gutterSize", {
93647
        get: /**
93648
         * Size of the grid list's gutter in pixels.
93649
         * @return {?}
93650
         */
93651
        function () { return this._gutter; },
93652
        set: /**
93653
         * @param {?} value
93654
         * @return {?}
93655
         */
93656
        function (value) { this._gutter = coerceToString(value); },
93657
        enumerable: true,
93658
        configurable: true
93659
    });
93660
    Object.defineProperty(MatGridList.prototype, "rowHeight", {
93661
        set: /**
93662
         * Set internal representation of row height from the user-provided value.
93663
         * @param {?} value
93664
         * @return {?}
93665
         */
93666
        function (value) {
93667
            var /** @type {?} */ newValue = coerceToString(value);
93668
            if (newValue !== this._rowHeight) {
93669
                this._rowHeight = newValue;
93670
                this._setTileStyler(this._rowHeight);
93671
            }
93672
        },
93673
        enumerable: true,
93674
        configurable: true
93675
    });
93676
    /**
93677
     * @return {?}
93678
     */
93679
    MatGridList.prototype.ngOnInit = /**
93680
     * @return {?}
93681
     */
93682
    function () {
93683
        this._checkCols();
93684
        this._checkRowHeight();
93685
    };
93686
    /**
93687
     * The layout calculation is fairly cheap if nothing changes, so there's little cost
93688
     * to run it frequently.
93689
     */
93690
    /**
93691
     * The layout calculation is fairly cheap if nothing changes, so there's little cost
93692
     * to run it frequently.
93693
     * @return {?}
93694
     */
93695
    MatGridList.prototype.ngAfterContentChecked = /**
93696
     * The layout calculation is fairly cheap if nothing changes, so there's little cost
93697
     * to run it frequently.
93698
     * @return {?}
93699
     */
93700
    function () {
93701
        this._layoutTiles();
93702
    };
93703
    /**
93704
     * Throw a friendly error if cols property is missing
93705
     * @return {?}
93706
     */
93707
    MatGridList.prototype._checkCols = /**
93708
     * Throw a friendly error if cols property is missing
93709
     * @return {?}
93710
     */
93711
    function () {
93712
        if (!this.cols) {
93713
            throw Error("mat-grid-list: must pass in number of columns. " +
93714
                "Example: <mat-grid-list cols=\"3\">");
93715
        }
93716
    };
93717
    /**
93718
     * Default to equal width:height if rowHeight property is missing
93719
     * @return {?}
93720
     */
93721
    MatGridList.prototype._checkRowHeight = /**
93722
     * Default to equal width:height if rowHeight property is missing
93723
     * @return {?}
93724
     */
93725
    function () {
93726
        if (!this._rowHeight) {
93727
            this._setTileStyler('1:1');
93728
        }
93729
    };
93730
    /**
93731
     * Creates correct Tile Styler subtype based on rowHeight passed in by user
93732
     * @param {?} rowHeight
93733
     * @return {?}
93734
     */
93735
    MatGridList.prototype._setTileStyler = /**
93736
     * Creates correct Tile Styler subtype based on rowHeight passed in by user
93737
     * @param {?} rowHeight
93738
     * @return {?}
93739
     */
93740
    function (rowHeight) {
93741
        if (this._tileStyler) {
93742
            this._tileStyler.reset(this);
93743
        }
93744
        if (rowHeight === MAT_FIT_MODE) {
93745
            this._tileStyler = new FitTileStyler();
93746
        }
93747
        else if (rowHeight && rowHeight.indexOf(':') > -1) {
93748
            this._tileStyler = new RatioTileStyler(rowHeight);
93749
        }
93750
        else {
93751
            this._tileStyler = new FixedTileStyler(rowHeight);
93752
        }
93753
    };
93754
    /**
93755
     * Computes and applies the size and position for all children grid tiles.
93756
     * @return {?}
93757
     */
93758
    MatGridList.prototype._layoutTiles = /**
93759
     * Computes and applies the size and position for all children grid tiles.
93760
     * @return {?}
93761
     */
93762
    function () {
93763
        var _this = this;
93764
        var /** @type {?} */ tracker = new TileCoordinator(this.cols, this._tiles);
93765
        var /** @type {?} */ direction = this._dir ? this._dir.value : 'ltr';
93766
        this._tileStyler.init(this.gutterSize, tracker, this.cols, direction);
93767
        this._tiles.forEach(function (tile, index) {
93768
            var /** @type {?} */ pos = tracker.positions[index];
93769
            _this._tileStyler.setStyle(tile, pos.row, pos.col);
93770
        });
93771
        this._setListStyle(this._tileStyler.getComputedHeight());
93772
    };
93773
    /** Sets style on the main grid-list element, given the style name and value. */
93774
    /**
93775
     * Sets style on the main grid-list element, given the style name and value.
93776
     * @param {?} style
93777
     * @return {?}
93778
     */
93779
    MatGridList.prototype._setListStyle = /**
93780
     * Sets style on the main grid-list element, given the style name and value.
93781
     * @param {?} style
93782
     * @return {?}
93783
     */
93784
    function (style) {
93785
        if (style) {
93786
            this._element.nativeElement.style[style[0]] = style[1];
93787
        }
93788
    };
93789
    MatGridList.decorators = [
93790
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-grid-list',
93791
                    exportAs: 'matGridList',
93792
                    template: "<div><ng-content></ng-content></div>",
93793
                    styles: [".mat-grid-list{display:block;position:relative}.mat-grid-tile{display:block;position:absolute;overflow:hidden}.mat-grid-tile .mat-figure{top:0;left:0;right:0;bottom:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}.mat-grid-tile .mat-grid-tile-footer,.mat-grid-tile .mat-grid-tile-header{display:flex;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.38);overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.mat-grid-tile .mat-grid-tile-footer>*,.mat-grid-tile .mat-grid-tile-header>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-grid-tile .mat-grid-tile-footer.mat-2-line,.mat-grid-tile .mat-grid-tile-header.mat-2-line{height:68px}.mat-grid-tile .mat-grid-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden}.mat-grid-tile .mat-grid-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-grid-tile .mat-grid-list-text:empty{display:none}.mat-grid-tile .mat-grid-tile-header{top:0}.mat-grid-tile .mat-grid-tile-footer{bottom:0}.mat-grid-tile .mat-grid-avatar{padding-right:16px}[dir=rtl] .mat-grid-tile .mat-grid-avatar{padding-right:0;padding-left:16px}.mat-grid-tile .mat-grid-avatar:empty{display:none}"],
93794
                    host: {
93795
                        'class': 'mat-grid-list',
93796
                    },
93797
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
93798
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
93799
                },] },
93800
    ];
93801
    /** @nocollapse */
93802
    MatGridList.ctorParameters = function () { return [
93803
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
93804
        { type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_3__["Directionality"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
93805
    ]; };
93806
    MatGridList.propDecorators = {
93807
        "_tiles": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"], args: [MatGridTile,] },],
93808
        "cols": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
93809
        "gutterSize": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
93810
        "rowHeight": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
93811
    };
93812
    return MatGridList;
93813
}());
93814
 
93815
/**
93816
 * @fileoverview added by tsickle
93817
 * @suppress {checkTypes} checked by tsc
93818
 */
93819
var MatGridListModule = /** @class */ (function () {
93820
    function MatGridListModule() {
93821
    }
93822
    MatGridListModule.decorators = [
93823
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
93824
                    imports: [_angular_material_core__WEBPACK_IMPORTED_MODULE_1__["MatLineModule"], _angular_material_core__WEBPACK_IMPORTED_MODULE_1__["MatCommonModule"]],
93825
                    exports: [
93826
                        MatGridList,
93827
                        MatGridTile,
93828
                        MatGridTileText,
93829
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_1__["MatLineModule"],
93830
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_1__["MatCommonModule"],
93831
                        MatGridTileHeaderCssMatStyler,
93832
                        MatGridTileFooterCssMatStyler,
93833
                        MatGridAvatarCssMatStyler
93834
                    ],
93835
                    declarations: [
93836
                        MatGridList,
93837
                        MatGridTile,
93838
                        MatGridTileText,
93839
                        MatGridTileHeaderCssMatStyler,
93840
                        MatGridTileFooterCssMatStyler,
93841
                        MatGridAvatarCssMatStyler
93842
                    ],
93843
                },] },
93844
    ];
93845
    return MatGridListModule;
93846
}());
93847
 
93848
/**
93849
 * @fileoverview added by tsickle
93850
 * @suppress {checkTypes} checked by tsc
93851
 */
93852
 
93853
/**
93854
 * @fileoverview added by tsickle
93855
 * @suppress {checkTypes} checked by tsc
93856
 */
93857
 
93858
 
93859
//# sourceMappingURL=grid-list.es5.js.map
93860
 
93861
 
93862
/***/ }),
93863
 
93864
/***/ "./node_modules/@angular/material/esm5/icon.es5.js":
93865
/*!*********************************************************!*\
93866
  !*** ./node_modules/@angular/material/esm5/icon.es5.js ***!
93867
  \*********************************************************/
93868
/*! exports provided: MatIconModule, MatIconBase, _MatIconMixinBase, MatIcon, getMatIconNameNotFoundError, getMatIconNoHttpProviderError, getMatIconFailedToSanitizeUrlError, getMatIconFailedToSanitizeLiteralError, MatIconRegistry, ICON_REGISTRY_PROVIDER_FACTORY, ICON_REGISTRY_PROVIDER */
93869
/***/ (function(module, __webpack_exports__, __webpack_require__) {
93870
 
93871
"use strict";
93872
__webpack_require__.r(__webpack_exports__);
93873
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatIconModule", function() { return MatIconModule; });
93874
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatIconBase", function() { return MatIconBase; });
93875
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatIconMixinBase", function() { return _MatIconMixinBase; });
93876
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatIcon", function() { return MatIcon; });
93877
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMatIconNameNotFoundError", function() { return getMatIconNameNotFoundError; });
93878
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMatIconNoHttpProviderError", function() { return getMatIconNoHttpProviderError; });
93879
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMatIconFailedToSanitizeUrlError", function() { return getMatIconFailedToSanitizeUrlError; });
93880
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMatIconFailedToSanitizeLiteralError", function() { return getMatIconFailedToSanitizeLiteralError; });
93881
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatIconRegistry", function() { return MatIconRegistry; });
93882
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ICON_REGISTRY_PROVIDER_FACTORY", function() { return ICON_REGISTRY_PROVIDER_FACTORY; });
93883
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ICON_REGISTRY_PROVIDER", function() { return ICON_REGISTRY_PROVIDER; });
93884
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
93885
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
93886
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
93887
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js");
93888
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
93889
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
93890
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
93891
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
93892
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
93893
/**
93894
 * @license
93895
 * Copyright Google LLC All Rights Reserved.
93896
 *
93897
 * Use of this source code is governed by an MIT-style license that can be
93898
 * found in the LICENSE file at https://angular.io/license
93899
 */
93900
 
93901
 
93902
 
93903
 
93904
 
93905
 
93906
 
93907
 
93908
 
93909
 
93910
/**
93911
 * @fileoverview added by tsickle
93912
 * @suppress {checkTypes} checked by tsc
93913
 */
93914
/**
93915
 * Returns an exception to be thrown in the case when attempting to
93916
 * load an icon with a name that cannot be found.
93917
 * \@docs-private
93918
 * @param {?} iconName
93919
 * @return {?}
93920
 */
93921
function getMatIconNameNotFoundError(iconName) {
93922
    return Error("Unable to find icon with the name \"" + iconName + "\"");
93923
}
93924
/**
93925
 * Returns an exception to be thrown when the consumer attempts to use
93926
 * `<mat-icon>` without including \@angular/http.
93927
 * \@docs-private
93928
 * @return {?}
93929
 */
93930
function getMatIconNoHttpProviderError() {
93931
    return Error('Could not find HttpClient provider for use with Angular Material icons. ' +
93932
        'Please include the HttpClientModule from @angular/common/http in your ' +
93933
        'app imports.');
93934
}
93935
/**
93936
 * Returns an exception to be thrown when a URL couldn't be sanitized.
93937
 * \@docs-private
93938
 * @param {?} url URL that was attempted to be sanitized.
93939
 * @return {?}
93940
 */
93941
function getMatIconFailedToSanitizeUrlError(url) {
93942
    return Error("The URL provided to MatIconRegistry was not trusted as a resource URL " +
93943
        ("via Angular's DomSanitizer. Attempted URL was \"" + url + "\"."));
93944
}
93945
/**
93946
 * Returns an exception to be thrown when a HTML string couldn't be sanitized.
93947
 * \@docs-private
93948
 * @param {?} literal HTML that was attempted to be sanitized.
93949
 * @return {?}
93950
 */
93951
function getMatIconFailedToSanitizeLiteralError(literal) {
93952
    return Error("The literal provided to MatIconRegistry was not trusted as safe HTML by " +
93953
        ("Angular's DomSanitizer. Attempted literal was \"" + literal + "\"."));
93954
}
93955
/**
93956
 * Configuration for an icon, including the URL and possibly the cached SVG element.
93957
 * \@docs-private
93958
 */
93959
var /**
93960
 * Configuration for an icon, including the URL and possibly the cached SVG element.
93961
 * \@docs-private
93962
 */
93963
SvgIconConfig = /** @class */ (function () {
93964
    function SvgIconConfig(data) {
93965
        // Note that we can't use `instanceof SVGElement` here,
93966
        // because it'll break during server-side rendering.
93967
        if (!!(/** @type {?} */ (data)).nodeName) {
93968
            this.svgElement = /** @type {?} */ (data);
93969
        }
93970
        else {
93971
            this.url = /** @type {?} */ (data);
93972
        }
93973
    }
93974
    return SvgIconConfig;
93975
}());
93976
/**
93977
 * Service to register and display icons used by the `<mat-icon>` component.
93978
 * - Registers icon URLs by namespace and name.
93979
 * - Registers icon set URLs by namespace.
93980
 * - Registers aliases for CSS classes, for use with icon fonts.
93981
 * - Loads icons from URLs and extracts individual icons from icon sets.
93982
 */
93983
var MatIconRegistry = /** @class */ (function () {
93984
    function MatIconRegistry(_httpClient, _sanitizer, document) {
93985
        this._httpClient = _httpClient;
93986
        this._sanitizer = _sanitizer;
93987
        /**
93988
         * URLs and cached SVG elements for individual icons. Keys are of the format "[namespace]:[icon]".
93989
         */
93990
        this._svgIconConfigs = new Map();
93991
        /**
93992
         * SvgIconConfig objects and cached SVG elements for icon sets, keyed by namespace.
93993
         * Multiple icon sets can be registered under the same namespace.
93994
         */
93995
        this._iconSetConfigs = new Map();
93996
        /**
93997
         * Cache for icons loaded by direct URLs.
93998
         */
93999
        this._cachedIconsByUrl = new Map();
94000
        /**
94001
         * In-progress icon fetches. Used to coalesce multiple requests to the same URL.
94002
         */
94003
        this._inProgressUrlFetches = new Map();
94004
        /**
94005
         * Map from font identifiers to their CSS class names. Used for icon fonts.
94006
         */
94007
        this._fontCssClassesByAlias = new Map();
94008
        /**
94009
         * The CSS class to apply when an `<mat-icon>` component has no icon name, url, or font specified.
94010
         * The default 'material-icons' value assumes that the material icon font has been loaded as
94011
         * described at http://google.github.io/material-design-icons/#icon-font-for-the-web
94012
         */
94013
        this._defaultFontSetClass = 'material-icons';
94014
        this._document = document;
94015
    }
94016
    /**
94017
     * Registers an icon by URL in the default namespace.
94018
     * @param iconName Name under which the icon should be registered.
94019
     * @param url
94020
     */
94021
    /**
94022
     * Registers an icon by URL in the default namespace.
94023
     * @param {?} iconName Name under which the icon should be registered.
94024
     * @param {?} url
94025
     * @return {?}
94026
     */
94027
    MatIconRegistry.prototype.addSvgIcon = /**
94028
     * Registers an icon by URL in the default namespace.
94029
     * @param {?} iconName Name under which the icon should be registered.
94030
     * @param {?} url
94031
     * @return {?}
94032
     */
94033
    function (iconName, url) {
94034
        return this.addSvgIconInNamespace('', iconName, url);
94035
    };
94036
    /**
94037
     * Registers an icon using an HTML string in the default namespace.
94038
     * @param iconName Name under which the icon should be registered.
94039
     * @param literal SVG source of the icon.
94040
     */
94041
    /**
94042
     * Registers an icon using an HTML string in the default namespace.
94043
     * @param {?} iconName Name under which the icon should be registered.
94044
     * @param {?} literal SVG source of the icon.
94045
     * @return {?}
94046
     */
94047
    MatIconRegistry.prototype.addSvgIconLiteral = /**
94048
     * Registers an icon using an HTML string in the default namespace.
94049
     * @param {?} iconName Name under which the icon should be registered.
94050
     * @param {?} literal SVG source of the icon.
94051
     * @return {?}
94052
     */
94053
    function (iconName, literal) {
94054
        return this.addSvgIconLiteralInNamespace('', iconName, literal);
94055
    };
94056
    /**
94057
     * Registers an icon by URL in the specified namespace.
94058
     * @param namespace Namespace in which the icon should be registered.
94059
     * @param iconName Name under which the icon should be registered.
94060
     * @param url
94061
     */
94062
    /**
94063
     * Registers an icon by URL in the specified namespace.
94064
     * @param {?} namespace Namespace in which the icon should be registered.
94065
     * @param {?} iconName Name under which the icon should be registered.
94066
     * @param {?} url
94067
     * @return {?}
94068
     */
94069
    MatIconRegistry.prototype.addSvgIconInNamespace = /**
94070
     * Registers an icon by URL in the specified namespace.
94071
     * @param {?} namespace Namespace in which the icon should be registered.
94072
     * @param {?} iconName Name under which the icon should be registered.
94073
     * @param {?} url
94074
     * @return {?}
94075
     */
94076
    function (namespace, iconName, url) {
94077
        return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(url));
94078
    };
94079
    /**
94080
     * Registers an icon using an HTML string in the specified namespace.
94081
     * @param namespace Namespace in which the icon should be registered.
94082
     * @param iconName Name under which the icon should be registered.
94083
     * @param literal SVG source of the icon.
94084
     */
94085
    /**
94086
     * Registers an icon using an HTML string in the specified namespace.
94087
     * @param {?} namespace Namespace in which the icon should be registered.
94088
     * @param {?} iconName Name under which the icon should be registered.
94089
     * @param {?} literal SVG source of the icon.
94090
     * @return {?}
94091
     */
94092
    MatIconRegistry.prototype.addSvgIconLiteralInNamespace = /**
94093
     * Registers an icon using an HTML string in the specified namespace.
94094
     * @param {?} namespace Namespace in which the icon should be registered.
94095
     * @param {?} iconName Name under which the icon should be registered.
94096
     * @param {?} literal SVG source of the icon.
94097
     * @return {?}
94098
     */
94099
    function (namespace, iconName, literal) {
94100
        var /** @type {?} */ sanitizedLiteral = this._sanitizer.sanitize(_angular_core__WEBPACK_IMPORTED_MODULE_2__["SecurityContext"].HTML, literal);
94101
        if (!sanitizedLiteral) {
94102
            throw getMatIconFailedToSanitizeLiteralError(literal);
94103
        }
94104
        var /** @type {?} */ svgElement = this._createSvgElementForSingleIcon(sanitizedLiteral);
94105
        return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(svgElement));
94106
    };
94107
    /**
94108
     * Registers an icon set by URL in the default namespace.
94109
     * @param url
94110
     */
94111
    /**
94112
     * Registers an icon set by URL in the default namespace.
94113
     * @param {?} url
94114
     * @return {?}
94115
     */
94116
    MatIconRegistry.prototype.addSvgIconSet = /**
94117
     * Registers an icon set by URL in the default namespace.
94118
     * @param {?} url
94119
     * @return {?}
94120
     */
94121
    function (url) {
94122
        return this.addSvgIconSetInNamespace('', url);
94123
    };
94124
    /**
94125
     * Registers an icon set using an HTML string in the default namespace.
94126
     * @param literal SVG source of the icon set.
94127
     */
94128
    /**
94129
     * Registers an icon set using an HTML string in the default namespace.
94130
     * @param {?} literal SVG source of the icon set.
94131
     * @return {?}
94132
     */
94133
    MatIconRegistry.prototype.addSvgIconSetLiteral = /**
94134
     * Registers an icon set using an HTML string in the default namespace.
94135
     * @param {?} literal SVG source of the icon set.
94136
     * @return {?}
94137
     */
94138
    function (literal) {
94139
        return this.addSvgIconSetLiteralInNamespace('', literal);
94140
    };
94141
    /**
94142
     * Registers an icon set by URL in the specified namespace.
94143
     * @param namespace Namespace in which to register the icon set.
94144
     * @param url
94145
     */
94146
    /**
94147
     * Registers an icon set by URL in the specified namespace.
94148
     * @param {?} namespace Namespace in which to register the icon set.
94149
     * @param {?} url
94150
     * @return {?}
94151
     */
94152
    MatIconRegistry.prototype.addSvgIconSetInNamespace = /**
94153
     * Registers an icon set by URL in the specified namespace.
94154
     * @param {?} namespace Namespace in which to register the icon set.
94155
     * @param {?} url
94156
     * @return {?}
94157
     */
94158
    function (namespace, url) {
94159
        return this._addSvgIconSetConfig(namespace, new SvgIconConfig(url));
94160
    };
94161
    /**
94162
     * Registers an icon set using an HTML string in the specified namespace.
94163
     * @param namespace Namespace in which to register the icon set.
94164
     * @param literal SVG source of the icon set.
94165
     */
94166
    /**
94167
     * Registers an icon set using an HTML string in the specified namespace.
94168
     * @param {?} namespace Namespace in which to register the icon set.
94169
     * @param {?} literal SVG source of the icon set.
94170
     * @return {?}
94171
     */
94172
    MatIconRegistry.prototype.addSvgIconSetLiteralInNamespace = /**
94173
     * Registers an icon set using an HTML string in the specified namespace.
94174
     * @param {?} namespace Namespace in which to register the icon set.
94175
     * @param {?} literal SVG source of the icon set.
94176
     * @return {?}
94177
     */
94178
    function (namespace, literal) {
94179
        var /** @type {?} */ sanitizedLiteral = this._sanitizer.sanitize(_angular_core__WEBPACK_IMPORTED_MODULE_2__["SecurityContext"].HTML, literal);
94180
        if (!sanitizedLiteral) {
94181
            throw getMatIconFailedToSanitizeLiteralError(literal);
94182
        }
94183
        var /** @type {?} */ svgElement = this._svgElementFromString(sanitizedLiteral);
94184
        return this._addSvgIconSetConfig(namespace, new SvgIconConfig(svgElement));
94185
    };
94186
    /**
94187
     * Defines an alias for a CSS class name to be used for icon fonts. Creating an matIcon
94188
     * component with the alias as the fontSet input will cause the class name to be applied
94189
     * to the `<mat-icon>` element.
94190
     *
94191
     * @param alias Alias for the font.
94192
     * @param className Class name override to be used instead of the alias.
94193
     */
94194
    /**
94195
     * Defines an alias for a CSS class name to be used for icon fonts. Creating an matIcon
94196
     * component with the alias as the fontSet input will cause the class name to be applied
94197
     * to the `<mat-icon>` element.
94198
     *
94199
     * @param {?} alias Alias for the font.
94200
     * @param {?=} className Class name override to be used instead of the alias.
94201
     * @return {?}
94202
     */
94203
    MatIconRegistry.prototype.registerFontClassAlias = /**
94204
     * Defines an alias for a CSS class name to be used for icon fonts. Creating an matIcon
94205
     * component with the alias as the fontSet input will cause the class name to be applied
94206
     * to the `<mat-icon>` element.
94207
     *
94208
     * @param {?} alias Alias for the font.
94209
     * @param {?=} className Class name override to be used instead of the alias.
94210
     * @return {?}
94211
     */
94212
    function (alias, className) {
94213
        if (className === void 0) { className = alias; }
94214
        this._fontCssClassesByAlias.set(alias, className);
94215
        return this;
94216
    };
94217
    /**
94218
     * Returns the CSS class name associated with the alias by a previous call to
94219
     * registerFontClassAlias. If no CSS class has been associated, returns the alias unmodified.
94220
     */
94221
    /**
94222
     * Returns the CSS class name associated with the alias by a previous call to
94223
     * registerFontClassAlias. If no CSS class has been associated, returns the alias unmodified.
94224
     * @param {?} alias
94225
     * @return {?}
94226
     */
94227
    MatIconRegistry.prototype.classNameForFontAlias = /**
94228
     * Returns the CSS class name associated with the alias by a previous call to
94229
     * registerFontClassAlias. If no CSS class has been associated, returns the alias unmodified.
94230
     * @param {?} alias
94231
     * @return {?}
94232
     */
94233
    function (alias) {
94234
        return this._fontCssClassesByAlias.get(alias) || alias;
94235
    };
94236
    /**
94237
     * Sets the CSS class name to be used for icon fonts when an `<mat-icon>` component does not
94238
     * have a fontSet input value, and is not loading an icon by name or URL.
94239
     *
94240
     * @param className
94241
     */
94242
    /**
94243
     * Sets the CSS class name to be used for icon fonts when an `<mat-icon>` component does not
94244
     * have a fontSet input value, and is not loading an icon by name or URL.
94245
     *
94246
     * @param {?} className
94247
     * @return {?}
94248
     */
94249
    MatIconRegistry.prototype.setDefaultFontSetClass = /**
94250
     * Sets the CSS class name to be used for icon fonts when an `<mat-icon>` component does not
94251
     * have a fontSet input value, and is not loading an icon by name or URL.
94252
     *
94253
     * @param {?} className
94254
     * @return {?}
94255
     */
94256
    function (className) {
94257
        this._defaultFontSetClass = className;
94258
        return this;
94259
    };
94260
    /**
94261
     * Returns the CSS class name to be used for icon fonts when an `<mat-icon>` component does not
94262
     * have a fontSet input value, and is not loading an icon by name or URL.
94263
     */
94264
    /**
94265
     * Returns the CSS class name to be used for icon fonts when an `<mat-icon>` component does not
94266
     * have a fontSet input value, and is not loading an icon by name or URL.
94267
     * @return {?}
94268
     */
94269
    MatIconRegistry.prototype.getDefaultFontSetClass = /**
94270
     * Returns the CSS class name to be used for icon fonts when an `<mat-icon>` component does not
94271
     * have a fontSet input value, and is not loading an icon by name or URL.
94272
     * @return {?}
94273
     */
94274
    function () {
94275
        return this._defaultFontSetClass;
94276
    };
94277
    /**
94278
     * Returns an Observable that produces the icon (as an `<svg>` DOM element) from the given URL.
94279
     * The response from the URL may be cached so this will not always cause an HTTP request, but
94280
     * the produced element will always be a new copy of the originally fetched icon. (That is,
94281
     * it will not contain any modifications made to elements previously returned).
94282
     *
94283
     * @param safeUrl URL from which to fetch the SVG icon.
94284
     */
94285
    /**
94286
     * Returns an Observable that produces the icon (as an `<svg>` DOM element) from the given URL.
94287
     * The response from the URL may be cached so this will not always cause an HTTP request, but
94288
     * the produced element will always be a new copy of the originally fetched icon. (That is,
94289
     * it will not contain any modifications made to elements previously returned).
94290
     *
94291
     * @param {?} safeUrl URL from which to fetch the SVG icon.
94292
     * @return {?}
94293
     */
94294
    MatIconRegistry.prototype.getSvgIconFromUrl = /**
94295
     * Returns an Observable that produces the icon (as an `<svg>` DOM element) from the given URL.
94296
     * The response from the URL may be cached so this will not always cause an HTTP request, but
94297
     * the produced element will always be a new copy of the originally fetched icon. (That is,
94298
     * it will not contain any modifications made to elements previously returned).
94299
     *
94300
     * @param {?} safeUrl URL from which to fetch the SVG icon.
94301
     * @return {?}
94302
     */
94303
    function (safeUrl) {
94304
        var _this = this;
94305
        var /** @type {?} */ url = this._sanitizer.sanitize(_angular_core__WEBPACK_IMPORTED_MODULE_2__["SecurityContext"].RESOURCE_URL, safeUrl);
94306
        if (!url) {
94307
            throw getMatIconFailedToSanitizeUrlError(safeUrl);
94308
        }
94309
        var /** @type {?} */ cachedIcon = this._cachedIconsByUrl.get(url);
94310
        if (cachedIcon) {
94311
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_4__["of"])(cloneSvg(cachedIcon));
94312
        }
94313
        return this._loadSvgIconFromConfig(new SvgIconConfig(safeUrl)).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["tap"])(function (svg) { return _this._cachedIconsByUrl.set(/** @type {?} */ ((url)), svg); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["map"])(function (svg) { return cloneSvg(svg); }));
94314
    };
94315
    /**
94316
     * Returns an Observable that produces the icon (as an `<svg>` DOM element) with the given name
94317
     * and namespace. The icon must have been previously registered with addIcon or addIconSet;
94318
     * if not, the Observable will throw an error.
94319
     *
94320
     * @param name Name of the icon to be retrieved.
94321
     * @param namespace Namespace in which to look for the icon.
94322
     */
94323
    /**
94324
     * Returns an Observable that produces the icon (as an `<svg>` DOM element) with the given name
94325
     * and namespace. The icon must have been previously registered with addIcon or addIconSet;
94326
     * if not, the Observable will throw an error.
94327
     *
94328
     * @param {?} name Name of the icon to be retrieved.
94329
     * @param {?=} namespace Namespace in which to look for the icon.
94330
     * @return {?}
94331
     */
94332
    MatIconRegistry.prototype.getNamedSvgIcon = /**
94333
     * Returns an Observable that produces the icon (as an `<svg>` DOM element) with the given name
94334
     * and namespace. The icon must have been previously registered with addIcon or addIconSet;
94335
     * if not, the Observable will throw an error.
94336
     *
94337
     * @param {?} name Name of the icon to be retrieved.
94338
     * @param {?=} namespace Namespace in which to look for the icon.
94339
     * @return {?}
94340
     */
94341
    function (name, namespace) {
94342
        if (namespace === void 0) { namespace = ''; }
94343
        // Return (copy of) cached icon if possible.
94344
        var /** @type {?} */ key = iconKey(namespace, name);
94345
        var /** @type {?} */ config = this._svgIconConfigs.get(key);
94346
        if (config) {
94347
            return this._getSvgFromConfig(config);
94348
        }
94349
        // See if we have any icon sets registered for the namespace.
94350
        var /** @type {?} */ iconSetConfigs = this._iconSetConfigs.get(namespace);
94351
        if (iconSetConfigs) {
94352
            return this._getSvgFromIconSetConfigs(name, iconSetConfigs);
94353
        }
94354
        return Object(rxjs__WEBPACK_IMPORTED_MODULE_4__["throwError"])(getMatIconNameNotFoundError(key));
94355
    };
94356
    /**
94357
     * Returns the cached icon for a SvgIconConfig if available, or fetches it from its URL if not.
94358
     * @param {?} config
94359
     * @return {?}
94360
     */
94361
    MatIconRegistry.prototype._getSvgFromConfig = /**
94362
     * Returns the cached icon for a SvgIconConfig if available, or fetches it from its URL if not.
94363
     * @param {?} config
94364
     * @return {?}
94365
     */
94366
    function (config) {
94367
        if (config.svgElement) {
94368
            // We already have the SVG element for this icon, return a copy.
94369
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_4__["of"])(cloneSvg(config.svgElement));
94370
        }
94371
        else {
94372
            // Fetch the icon from the config's URL, cache it, and return a copy.
94373
            return this._loadSvgIconFromConfig(config).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["tap"])(function (svg) { return config.svgElement = svg; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["map"])(function (svg) { return cloneSvg(svg); }));
94374
        }
94375
    };
94376
    /**
94377
     * Attempts to find an icon with the specified name in any of the SVG icon sets.
94378
     * First searches the available cached icons for a nested element with a matching name, and
94379
     * if found copies the element to a new `<svg>` element. If not found, fetches all icon sets
94380
     * that have not been cached, and searches again after all fetches are completed.
94381
     * The returned Observable produces the SVG element if possible, and throws
94382
     * an error if no icon with the specified name can be found.
94383
     * @param {?} name
94384
     * @param {?} iconSetConfigs
94385
     * @return {?}
94386
     */
94387
    MatIconRegistry.prototype._getSvgFromIconSetConfigs = /**
94388
     * Attempts to find an icon with the specified name in any of the SVG icon sets.
94389
     * First searches the available cached icons for a nested element with a matching name, and
94390
     * if found copies the element to a new `<svg>` element. If not found, fetches all icon sets
94391
     * that have not been cached, and searches again after all fetches are completed.
94392
     * The returned Observable produces the SVG element if possible, and throws
94393
     * an error if no icon with the specified name can be found.
94394
     * @param {?} name
94395
     * @param {?} iconSetConfigs
94396
     * @return {?}
94397
     */
94398
    function (name, iconSetConfigs) {
94399
        var _this = this;
94400
        // For all the icon set SVG elements we've fetched, see if any contain an icon with the
94401
        // requested name.
94402
        var /** @type {?} */ namedIcon = this._extractIconWithNameFromAnySet(name, iconSetConfigs);
94403
        if (namedIcon) {
94404
            // We could cache namedIcon in _svgIconConfigs, but since we have to make a copy every
94405
            // time anyway, there's probably not much advantage compared to just always extracting
94406
            // it from the icon set.
94407
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_4__["of"])(namedIcon);
94408
        }
94409
        // Not found in any cached icon sets. If there are icon sets with URLs that we haven't
94410
        // fetched, fetch them now and look for iconName in the results.
94411
        var /** @type {?} */ iconSetFetchRequests = iconSetConfigs
94412
            .filter(function (iconSetConfig) { return !iconSetConfig.svgElement; })
94413
            .map(function (iconSetConfig) {
94414
            return _this._loadSvgIconSetFromConfig(iconSetConfig).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(function (err) {
94415
                var /** @type {?} */ url = _this._sanitizer.sanitize(_angular_core__WEBPACK_IMPORTED_MODULE_2__["SecurityContext"].RESOURCE_URL, iconSetConfig.url);
94416
                // Swallow errors fetching individual URLs so the
94417
                // combined Observable won't necessarily fail.
94418
                console.error("Loading icon set URL: " + url + " failed: " + err.message);
94419
                return Object(rxjs__WEBPACK_IMPORTED_MODULE_4__["of"])(null);
94420
            }));
94421
        });
94422
        // Fetch all the icon set URLs. When the requests complete, every IconSet should have a
94423
        // cached SVG element (unless the request failed), and we can check again for the icon.
94424
        return Object(rxjs__WEBPACK_IMPORTED_MODULE_4__["forkJoin"])(iconSetFetchRequests).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["map"])(function () {
94425
            var /** @type {?} */ foundIcon = _this._extractIconWithNameFromAnySet(name, iconSetConfigs);
94426
            if (!foundIcon) {
94427
                throw getMatIconNameNotFoundError(name);
94428
            }
94429
            return foundIcon;
94430
        }));
94431
    };
94432
    /**
94433
     * Searches the cached SVG elements for the given icon sets for a nested icon element whose "id"
94434
     * tag matches the specified name. If found, copies the nested element to a new SVG element and
94435
     * returns it. Returns null if no matching element is found.
94436
     * @param {?} iconName
94437
     * @param {?} iconSetConfigs
94438
     * @return {?}
94439
     */
94440
    MatIconRegistry.prototype._extractIconWithNameFromAnySet = /**
94441
     * Searches the cached SVG elements for the given icon sets for a nested icon element whose "id"
94442
     * tag matches the specified name. If found, copies the nested element to a new SVG element and
94443
     * returns it. Returns null if no matching element is found.
94444
     * @param {?} iconName
94445
     * @param {?} iconSetConfigs
94446
     * @return {?}
94447
     */
94448
    function (iconName, iconSetConfigs) {
94449
        // Iterate backwards, so icon sets added later have precedence.
94450
        for (var /** @type {?} */ i = iconSetConfigs.length - 1; i >= 0; i--) {
94451
            var /** @type {?} */ config = iconSetConfigs[i];
94452
            if (config.svgElement) {
94453
                var /** @type {?} */ foundIcon = this._extractSvgIconFromSet(config.svgElement, iconName);
94454
                if (foundIcon) {
94455
                    return foundIcon;
94456
                }
94457
            }
94458
        }
94459
        return null;
94460
    };
94461
    /**
94462
     * Loads the content of the icon URL specified in the SvgIconConfig and creates an SVG element
94463
     * from it.
94464
     * @param {?} config
94465
     * @return {?}
94466
     */
94467
    MatIconRegistry.prototype._loadSvgIconFromConfig = /**
94468
     * Loads the content of the icon URL specified in the SvgIconConfig and creates an SVG element
94469
     * from it.
94470
     * @param {?} config
94471
     * @return {?}
94472
     */
94473
    function (config) {
94474
        var _this = this;
94475
        return this._fetchUrl(config.url)
94476
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["map"])(function (svgText) { return _this._createSvgElementForSingleIcon(svgText); }));
94477
    };
94478
    /**
94479
     * Loads the content of the icon set URL specified in the SvgIconConfig and creates an SVG element
94480
     * from it.
94481
     * @param {?} config
94482
     * @return {?}
94483
     */
94484
    MatIconRegistry.prototype._loadSvgIconSetFromConfig = /**
94485
     * Loads the content of the icon set URL specified in the SvgIconConfig and creates an SVG element
94486
     * from it.
94487
     * @param {?} config
94488
     * @return {?}
94489
     */
94490
    function (config) {
94491
        var _this = this;
94492
        // If the SVG for this icon set has already been parsed, do nothing.
94493
        if (config.svgElement) {
94494
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_4__["of"])(config.svgElement);
94495
        }
94496
        return this._fetchUrl(config.url).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["map"])(function (svgText) {
94497
            // It is possible that the icon set was parsed and cached by an earlier request, so parsing
94498
            // only needs to occur if the cache is yet unset.
94499
            if (!config.svgElement) {
94500
                config.svgElement = _this._svgElementFromString(svgText);
94501
            }
94502
            return config.svgElement;
94503
        }));
94504
    };
94505
    /**
94506
     * Creates a DOM element from the given SVG string, and adds default attributes.
94507
     * @param {?} responseText
94508
     * @return {?}
94509
     */
94510
    MatIconRegistry.prototype._createSvgElementForSingleIcon = /**
94511
     * Creates a DOM element from the given SVG string, and adds default attributes.
94512
     * @param {?} responseText
94513
     * @return {?}
94514
     */
94515
    function (responseText) {
94516
        var /** @type {?} */ svg = this._svgElementFromString(responseText);
94517
        this._setSvgAttributes(svg);
94518
        return svg;
94519
    };
94520
    /**
94521
     * Searches the cached element of the given SvgIconConfig for a nested icon element whose "id"
94522
     * tag matches the specified name. If found, copies the nested element to a new SVG element and
94523
     * returns it. Returns null if no matching element is found.
94524
     * @param {?} iconSet
94525
     * @param {?} iconName
94526
     * @return {?}
94527
     */
94528
    MatIconRegistry.prototype._extractSvgIconFromSet = /**
94529
     * Searches the cached element of the given SvgIconConfig for a nested icon element whose "id"
94530
     * tag matches the specified name. If found, copies the nested element to a new SVG element and
94531
     * returns it. Returns null if no matching element is found.
94532
     * @param {?} iconSet
94533
     * @param {?} iconName
94534
     * @return {?}
94535
     */
94536
    function (iconSet, iconName) {
94537
        var /** @type {?} */ iconSource = iconSet.querySelector('#' + iconName);
94538
        if (!iconSource) {
94539
            return null;
94540
        }
94541
        // Clone the element and remove the ID to prevent multiple elements from being added
94542
        // to the page with the same ID.
94543
        var /** @type {?} */ iconElement = /** @type {?} */ (iconSource.cloneNode(true));
94544
        iconElement.removeAttribute('id');
94545
        // If the icon node is itself an <svg> node, clone and return it directly. If not, set it as
94546
        // the content of a new <svg> node.
94547
        if (iconElement.nodeName.toLowerCase() === 'svg') {
94548
            return this._setSvgAttributes(/** @type {?} */ (iconElement));
94549
        }
94550
        // If the node is a <symbol>, it won't be rendered so we have to convert it into <svg>. Note
94551
        // that the same could be achieved by referring to it via <use href="#id">, however the <use>
94552
        // tag is problematic on Firefox, because it needs to include the current page path.
94553
        if (iconElement.nodeName.toLowerCase() === 'symbol') {
94554
            return this._setSvgAttributes(this._toSvgElement(iconElement));
94555
        }
94556
        // createElement('SVG') doesn't work as expected; the DOM ends up with
94557
        // the correct nodes, but the SVG content doesn't render. Instead we
94558
        // have to create an empty SVG node using innerHTML and append its content.
94559
        // Elements created using DOMParser.parseFromString have the same problem.
94560
        // http://stackoverflow.com/questions/23003278/svg-innerhtml-in-firefox-can-not-display
94561
        var /** @type {?} */ svg = this._svgElementFromString('<svg></svg>');
94562
        // Clone the node so we don't remove it from the parent icon set element.
94563
        svg.appendChild(iconElement);
94564
        return this._setSvgAttributes(svg);
94565
    };
94566
    /**
94567
     * Creates a DOM element from the given SVG string.
94568
     * @param {?} str
94569
     * @return {?}
94570
     */
94571
    MatIconRegistry.prototype._svgElementFromString = /**
94572
     * Creates a DOM element from the given SVG string.
94573
     * @param {?} str
94574
     * @return {?}
94575
     */
94576
    function (str) {
94577
        var /** @type {?} */ div = this._document.createElement('DIV');
94578
        div.innerHTML = str;
94579
        var /** @type {?} */ svg = /** @type {?} */ (div.querySelector('svg'));
94580
        if (!svg) {
94581
            throw Error('<svg> tag not found');
94582
        }
94583
        return svg;
94584
    };
94585
    /**
94586
     * Converts an element into an SVG node by cloning all of its children.
94587
     * @param {?} element
94588
     * @return {?}
94589
     */
94590
    MatIconRegistry.prototype._toSvgElement = /**
94591
     * Converts an element into an SVG node by cloning all of its children.
94592
     * @param {?} element
94593
     * @return {?}
94594
     */
94595
    function (element) {
94596
        var /** @type {?} */ svg = this._svgElementFromString('<svg></svg>');
94597
        for (var /** @type {?} */ i = 0; i < element.childNodes.length; i++) {
94598
            if (element.childNodes[i].nodeType === this._document.ELEMENT_NODE) {
94599
                svg.appendChild(element.childNodes[i].cloneNode(true));
94600
            }
94601
        }
94602
        return svg;
94603
    };
94604
    /**
94605
     * Sets the default attributes for an SVG element to be used as an icon.
94606
     * @param {?} svg
94607
     * @return {?}
94608
     */
94609
    MatIconRegistry.prototype._setSvgAttributes = /**
94610
     * Sets the default attributes for an SVG element to be used as an icon.
94611
     * @param {?} svg
94612
     * @return {?}
94613
     */
94614
    function (svg) {
94615
        svg.setAttribute('fit', '');
94616
        svg.setAttribute('height', '100%');
94617
        svg.setAttribute('width', '100%');
94618
        svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');
94619
        svg.setAttribute('focusable', 'false'); // Disable IE11 default behavior to make SVGs focusable.
94620
        return svg;
94621
    };
94622
    /**
94623
     * Returns an Observable which produces the string contents of the given URL. Results may be
94624
     * cached, so future calls with the same URL may not cause another HTTP request.
94625
     * @param {?} safeUrl
94626
     * @return {?}
94627
     */
94628
    MatIconRegistry.prototype._fetchUrl = /**
94629
     * Returns an Observable which produces the string contents of the given URL. Results may be
94630
     * cached, so future calls with the same URL may not cause another HTTP request.
94631
     * @param {?} safeUrl
94632
     * @return {?}
94633
     */
94634
    function (safeUrl) {
94635
        var _this = this;
94636
        if (!this._httpClient) {
94637
            throw getMatIconNoHttpProviderError();
94638
        }
94639
        if (safeUrl == null) {
94640
            throw Error("Cannot fetch icon from URL \"" + safeUrl + "\".");
94641
        }
94642
        var /** @type {?} */ url = this._sanitizer.sanitize(_angular_core__WEBPACK_IMPORTED_MODULE_2__["SecurityContext"].RESOURCE_URL, safeUrl);
94643
        if (!url) {
94644
            throw getMatIconFailedToSanitizeUrlError(safeUrl);
94645
        }
94646
        // Store in-progress fetches to avoid sending a duplicate request for a URL when there is
94647
        // already a request in progress for that URL. It's necessary to call share() on the
94648
        // Observable returned by http.get() so that multiple subscribers don't cause multiple XHRs.
94649
        var /** @type {?} */ inProgressFetch = this._inProgressUrlFetches.get(url);
94650
        if (inProgressFetch) {
94651
            return inProgressFetch;
94652
        }
94653
        // TODO(jelbourn): for some reason, the `finalize` operator "loses" the generic type on the
94654
        // Observable. Figure out why and fix it.
94655
        var /** @type {?} */ req = this._httpClient.get(url, { responseType: 'text' }).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["finalize"])(function () { return _this._inProgressUrlFetches.delete(url); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["share"])());
94656
        this._inProgressUrlFetches.set(url, req);
94657
        return req;
94658
    };
94659
    /**
94660
     * Registers an icon config by name in the specified namespace.
94661
     * @param {?} namespace Namespace in which to register the icon config.
94662
     * @param {?} iconName Name under which to register the config.
94663
     * @param {?} config Config to be registered.
94664
     * @return {?}
94665
     */
94666
    MatIconRegistry.prototype._addSvgIconConfig = /**
94667
     * Registers an icon config by name in the specified namespace.
94668
     * @param {?} namespace Namespace in which to register the icon config.
94669
     * @param {?} iconName Name under which to register the config.
94670
     * @param {?} config Config to be registered.
94671
     * @return {?}
94672
     */
94673
    function (namespace, iconName, config) {
94674
        this._svgIconConfigs.set(iconKey(namespace, iconName), config);
94675
        return this;
94676
    };
94677
    /**
94678
     * Registers an icon set config in the specified namespace.
94679
     * @param {?} namespace Namespace in which to register the icon config.
94680
     * @param {?} config Config to be registered.
94681
     * @return {?}
94682
     */
94683
    MatIconRegistry.prototype._addSvgIconSetConfig = /**
94684
     * Registers an icon set config in the specified namespace.
94685
     * @param {?} namespace Namespace in which to register the icon config.
94686
     * @param {?} config Config to be registered.
94687
     * @return {?}
94688
     */
94689
    function (namespace, config) {
94690
        var /** @type {?} */ configNamespace = this._iconSetConfigs.get(namespace);
94691
        if (configNamespace) {
94692
            configNamespace.push(config);
94693
        }
94694
        else {
94695
            this._iconSetConfigs.set(namespace, [config]);
94696
        }
94697
        return this;
94698
    };
94699
    MatIconRegistry.decorators = [
94700
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Injectable"], args: [{ providedIn: 'root' },] },
94701
    ];
94702
    /** @nocollapse */
94703
    MatIconRegistry.ctorParameters = function () { return [
94704
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Optional"] },] },
94705
        { type: _angular_platform_browser__WEBPACK_IMPORTED_MODULE_3__["DomSanitizer"], },
94706
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"],] },] },
94707
    ]; };
94708
    /** @nocollapse */ MatIconRegistry.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["defineInjectable"])({ factory: function MatIconRegistry_Factory() { return new MatIconRegistry(Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["inject"])(_angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"], 8), Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["inject"])(_angular_platform_browser__WEBPACK_IMPORTED_MODULE_3__["DomSanitizer"]), Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["inject"])(_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"], 8)); }, token: MatIconRegistry, providedIn: "root" });
94709
    return MatIconRegistry;
94710
}());
94711
/**
94712
 * \@docs-private
94713
 * @param {?} parentRegistry
94714
 * @param {?} httpClient
94715
 * @param {?} sanitizer
94716
 * @param {?=} document
94717
 * @return {?}
94718
 */
94719
function ICON_REGISTRY_PROVIDER_FACTORY(parentRegistry, httpClient, sanitizer, document) {
94720
    return parentRegistry || new MatIconRegistry(httpClient, sanitizer, document);
94721
}
94722
/**
94723
 * \@docs-private
94724
 */
94725
var /** @type {?} */ ICON_REGISTRY_PROVIDER = {
94726
    // If there is already an MatIconRegistry available, use that. Otherwise, provide a new one.
94727
    provide: MatIconRegistry,
94728
    deps: [
94729
        [new _angular_core__WEBPACK_IMPORTED_MODULE_2__["Optional"](), new _angular_core__WEBPACK_IMPORTED_MODULE_2__["SkipSelf"](), MatIconRegistry],
94730
        [new _angular_core__WEBPACK_IMPORTED_MODULE_2__["Optional"](), _angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"]],
94731
        _angular_platform_browser__WEBPACK_IMPORTED_MODULE_3__["DomSanitizer"],
94732
        [new _angular_core__WEBPACK_IMPORTED_MODULE_2__["Optional"](), /** @type {?} */ (_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"])],
94733
    ],
94734
    useFactory: ICON_REGISTRY_PROVIDER_FACTORY,
94735
};
94736
/**
94737
 * Clones an SVGElement while preserving type information.
94738
 * @param {?} svg
94739
 * @return {?}
94740
 */
94741
function cloneSvg(svg) {
94742
    return /** @type {?} */ (svg.cloneNode(true));
94743
}
94744
/**
94745
 * Returns the cache key to use for an icon namespace and name.
94746
 * @param {?} namespace
94747
 * @param {?} name
94748
 * @return {?}
94749
 */
94750
function iconKey(namespace, name) {
94751
    return namespace + ':' + name;
94752
}
94753
 
94754
/**
94755
 * @fileoverview added by tsickle
94756
 * @suppress {checkTypes} checked by tsc
94757
 */
94758
/**
94759
 * \@docs-private
94760
 */
94761
var  /**
94762
 * \@docs-private
94763
 */
94764
MatIconBase = /** @class */ (function () {
94765
    function MatIconBase(_elementRef) {
94766
        this._elementRef = _elementRef;
94767
    }
94768
    return MatIconBase;
94769
}());
94770
var /** @type {?} */ _MatIconMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_7__["mixinColor"])(MatIconBase);
94771
/**
94772
 * Component to display an icon. It can be used in the following ways:
94773
 *
94774
 * - Specify the svgIcon input to load an SVG icon from a URL previously registered with the
94775
 *   addSvgIcon, addSvgIconInNamespace, addSvgIconSet, or addSvgIconSetInNamespace methods of
94776
 *   MatIconRegistry. If the svgIcon value contains a colon it is assumed to be in the format
94777
 *   "[namespace]:[name]", if not the value will be the name of an icon in the default namespace.
94778
 *   Examples:
94779
 *     `<mat-icon svgIcon="left-arrow"></mat-icon>
94780
 *     <mat-icon svgIcon="animals:cat"></mat-icon>`
94781
 *
94782
 * - Use a font ligature as an icon by putting the ligature text in the content of the `<mat-icon>`
94783
 *   component. By default the Material icons font is used as described at
94784
 *   http://google.github.io/material-design-icons/#icon-font-for-the-web. You can specify an
94785
 *   alternate font by setting the fontSet input to either the CSS class to apply to use the
94786
 *   desired font, or to an alias previously registered with MatIconRegistry.registerFontClassAlias.
94787
 *   Examples:
94788
 *     `<mat-icon>home</mat-icon>
94789
 *     <mat-icon fontSet="myfont">sun</mat-icon>`
94790
 *
94791
 * - Specify a font glyph to be included via CSS rules by setting the fontSet input to specify the
94792
 *   font, and the fontIcon input to specify the icon. Typically the fontIcon will specify a
94793
 *   CSS class which causes the glyph to be displayed via a :before selector, as in
94794
 *   https://fortawesome.github.io/Font-Awesome/examples/
94795
 *   Example:
94796
 *     `<mat-icon fontSet="fa" fontIcon="alarm"></mat-icon>`
94797
 */
94798
var MatIcon = /** @class */ (function (_super) {
94799
    Object(tslib__WEBPACK_IMPORTED_MODULE_6__["__extends"])(MatIcon, _super);
94800
    function MatIcon(elementRef, _iconRegistry, ariaHidden) {
94801
        var _this = _super.call(this, elementRef) || this;
94802
        _this._iconRegistry = _iconRegistry;
94803
        _this._inline = false;
94804
        // If the user has not explicitly set aria-hidden, mark the icon as hidden, as this is
94805
        // the right thing to do for the majority of icon use-cases.
94806
        if (!ariaHidden) {
94807
            elementRef.nativeElement.setAttribute('aria-hidden', 'true');
94808
        }
94809
        return _this;
94810
    }
94811
    Object.defineProperty(MatIcon.prototype, "inline", {
94812
        get: /**
94813
         * Whether the icon should be inlined, automatically sizing the icon to match the font size of
94814
         * the element the icon is contained in.
94815
         * @return {?}
94816
         */
94817
        function () {
94818
            return this._inline;
94819
        },
94820
        set: /**
94821
         * @param {?} inline
94822
         * @return {?}
94823
         */
94824
        function (inline) {
94825
            this._inline = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_8__["coerceBooleanProperty"])(inline);
94826
        },
94827
        enumerable: true,
94828
        configurable: true
94829
    });
94830
    Object.defineProperty(MatIcon.prototype, "fontSet", {
94831
        get: /**
94832
         * Font set that the icon is a part of.
94833
         * @return {?}
94834
         */
94835
        function () { return this._fontSet; },
94836
        set: /**
94837
         * @param {?} value
94838
         * @return {?}
94839
         */
94840
        function (value) {
94841
            this._fontSet = this._cleanupFontValue(value);
94842
        },
94843
        enumerable: true,
94844
        configurable: true
94845
    });
94846
    Object.defineProperty(MatIcon.prototype, "fontIcon", {
94847
        get: /**
94848
         * Name of an icon within a font set.
94849
         * @return {?}
94850
         */
94851
        function () { return this._fontIcon; },
94852
        set: /**
94853
         * @param {?} value
94854
         * @return {?}
94855
         */
94856
        function (value) {
94857
            this._fontIcon = this._cleanupFontValue(value);
94858
        },
94859
        enumerable: true,
94860
        configurable: true
94861
    });
94862
    /**
94863
     * Splits an svgIcon binding value into its icon set and icon name components.
94864
     * Returns a 2-element array of [(icon set), (icon name)].
94865
     * The separator for the two fields is ':'. If there is no separator, an empty
94866
     * string is returned for the icon set and the entire value is returned for
94867
     * the icon name. If the argument is falsy, returns an array of two empty strings.
94868
     * Throws an error if the name contains two or more ':' separators.
94869
     * Examples:
94870
     *   `'social:cake' -> ['social', 'cake']
94871
     *   'penguin' -> ['', 'penguin']
94872
     *   null -> ['', '']
94873
     *   'a:b:c' -> (throws Error)`
94874
     * @param {?} iconName
94875
     * @return {?}
94876
     */
94877
    MatIcon.prototype._splitIconName = /**
94878
     * Splits an svgIcon binding value into its icon set and icon name components.
94879
     * Returns a 2-element array of [(icon set), (icon name)].
94880
     * The separator for the two fields is ':'. If there is no separator, an empty
94881
     * string is returned for the icon set and the entire value is returned for
94882
     * the icon name. If the argument is falsy, returns an array of two empty strings.
94883
     * Throws an error if the name contains two or more ':' separators.
94884
     * Examples:
94885
     *   `'social:cake' -> ['social', 'cake']
94886
     *   'penguin' -> ['', 'penguin']
94887
     *   null -> ['', '']
94888
     *   'a:b:c' -> (throws Error)`
94889
     * @param {?} iconName
94890
     * @return {?}
94891
     */
94892
    function (iconName) {
94893
        if (!iconName) {
94894
            return ['', ''];
94895
        }
94896
        var /** @type {?} */ parts = iconName.split(':');
94897
        switch (parts.length) {
94898
            case 1: return ['', parts[0]]; // Use default namespace.
94899
            case 2: return /** @type {?} */ (parts);
94900
            default: throw Error("Invalid icon name: \"" + iconName + "\"");
94901
        }
94902
    };
94903
    /**
94904
     * @param {?} changes
94905
     * @return {?}
94906
     */
94907
    MatIcon.prototype.ngOnChanges = /**
94908
     * @param {?} changes
94909
     * @return {?}
94910
     */
94911
    function (changes) {
94912
        var _this = this;
94913
        // Only update the inline SVG icon if the inputs changed, to avoid unnecessary DOM operations.
94914
        if (changes["svgIcon"]) {
94915
            if (this.svgIcon) {
94916
                var _a = this._splitIconName(this.svgIcon), namespace = _a[0], iconName = _a[1];
94917
                this._iconRegistry.getNamedSvgIcon(iconName, namespace).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["take"])(1)).subscribe(function (svg) { return _this._setSvgElement(svg); }, function (err) { return console.log("Error retrieving icon: " + err.message); });
94918
            }
94919
            else {
94920
                this._clearSvgElement();
94921
            }
94922
        }
94923
        if (this._usingFontIcon()) {
94924
            this._updateFontIconClasses();
94925
        }
94926
    };
94927
    /**
94928
     * @return {?}
94929
     */
94930
    MatIcon.prototype.ngOnInit = /**
94931
     * @return {?}
94932
     */
94933
    function () {
94934
        // Update font classes because ngOnChanges won't be called if none of the inputs are present,
94935
        // e.g. <mat-icon>arrow</mat-icon> In this case we need to add a CSS class for the default font.
94936
        if (this._usingFontIcon()) {
94937
            this._updateFontIconClasses();
94938
        }
94939
    };
94940
    /**
94941
     * @return {?}
94942
     */
94943
    MatIcon.prototype._usingFontIcon = /**
94944
     * @return {?}
94945
     */
94946
    function () {
94947
        return !this.svgIcon;
94948
    };
94949
    /**
94950
     * @param {?} svg
94951
     * @return {?}
94952
     */
94953
    MatIcon.prototype._setSvgElement = /**
94954
     * @param {?} svg
94955
     * @return {?}
94956
     */
94957
    function (svg) {
94958
        this._clearSvgElement();
94959
        // Workaround for IE11 and Edge ignoring `style` tags inside dynamically-created SVGs.
94960
        // See: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10898469/
94961
        // Do this before inserting the element into the DOM, in order to avoid a style recalculation.
94962
        var /** @type {?} */ styleTags = /** @type {?} */ (svg.querySelectorAll('style'));
94963
        for (var /** @type {?} */ i = 0; i < styleTags.length; i++) {
94964
            styleTags[i].textContent += ' ';
94965
        }
94966
        this._elementRef.nativeElement.appendChild(svg);
94967
    };
94968
    /**
94969
     * @return {?}
94970
     */
94971
    MatIcon.prototype._clearSvgElement = /**
94972
     * @return {?}
94973
     */
94974
    function () {
94975
        var /** @type {?} */ layoutElement = this._elementRef.nativeElement;
94976
        var /** @type {?} */ childCount = layoutElement.childNodes.length;
94977
        // Remove existing non-element child nodes and SVGs, and add the new SVG element. Note that
94978
        // we can't use innerHTML, because IE will throw if the element has a data binding.
94979
        while (childCount--) {
94980
            var /** @type {?} */ child = layoutElement.childNodes[childCount];
94981
            // 1 corresponds to Node.ELEMENT_NODE. We remove all non-element nodes in order to get rid
94982
            // of any loose text nodes, as well as any SVG elements in order to remove any old icons.
94983
            if (child.nodeType !== 1 || child.nodeName.toLowerCase() === 'svg') {
94984
                layoutElement.removeChild(child);
94985
            }
94986
        }
94987
    };
94988
    /**
94989
     * @return {?}
94990
     */
94991
    MatIcon.prototype._updateFontIconClasses = /**
94992
     * @return {?}
94993
     */
94994
    function () {
94995
        if (!this._usingFontIcon()) {
94996
            return;
94997
        }
94998
        var /** @type {?} */ elem = this._elementRef.nativeElement;
94999
        var /** @type {?} */ fontSetClass = this.fontSet ?
95000
            this._iconRegistry.classNameForFontAlias(this.fontSet) :
95001
            this._iconRegistry.getDefaultFontSetClass();
95002
        if (fontSetClass != this._previousFontSetClass) {
95003
            if (this._previousFontSetClass) {
95004
                elem.classList.remove(this._previousFontSetClass);
95005
            }
95006
            if (fontSetClass) {
95007
                elem.classList.add(fontSetClass);
95008
            }
95009
            this._previousFontSetClass = fontSetClass;
95010
        }
95011
        if (this.fontIcon != this._previousFontIconClass) {
95012
            if (this._previousFontIconClass) {
95013
                elem.classList.remove(this._previousFontIconClass);
95014
            }
95015
            if (this.fontIcon) {
95016
                elem.classList.add(this.fontIcon);
95017
            }
95018
            this._previousFontIconClass = this.fontIcon;
95019
        }
95020
    };
95021
    /**
95022
     * Cleans up a value to be used as a fontIcon or fontSet.
95023
     * Since the value ends up being assigned as a CSS class, we
95024
     * have to trim the value and omit space-separated values.
95025
     * @param {?} value
95026
     * @return {?}
95027
     */
95028
    MatIcon.prototype._cleanupFontValue = /**
95029
     * Cleans up a value to be used as a fontIcon or fontSet.
95030
     * Since the value ends up being assigned as a CSS class, we
95031
     * have to trim the value and omit space-separated values.
95032
     * @param {?} value
95033
     * @return {?}
95034
     */
95035
    function (value) {
95036
        return typeof value === 'string' ? value.trim().split(' ')[0] : value;
95037
    };
95038
    MatIcon.decorators = [
95039
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Component"], args: [{template: '<ng-content></ng-content>',
95040
                    selector: 'mat-icon',
95041
                    exportAs: 'matIcon',
95042
                    styles: [".mat-icon{background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1,1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],
95043
                    inputs: ['color'],
95044
                    host: {
95045
                        'role': 'img',
95046
                        'class': 'mat-icon',
95047
                        '[class.mat-icon-inline]': 'inline',
95048
                    },
95049
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ViewEncapsulation"].None,
95050
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ChangeDetectionStrategy"].OnPush,
95051
                },] },
95052
    ];
95053
    /** @nocollapse */
95054
    MatIcon.ctorParameters = function () { return [
95055
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ElementRef"], },
95056
        { type: MatIconRegistry, },
95057
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Attribute"], args: ['aria-hidden',] },] },
95058
    ]; };
95059
    MatIcon.propDecorators = {
95060
        "inline": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"] },],
95061
        "svgIcon": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"] },],
95062
        "fontSet": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"] },],
95063
        "fontIcon": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"] },],
95064
    };
95065
    return MatIcon;
95066
}(_MatIconMixinBase));
95067
 
95068
/**
95069
 * @fileoverview added by tsickle
95070
 * @suppress {checkTypes} checked by tsc
95071
 */
95072
var MatIconModule = /** @class */ (function () {
95073
    function MatIconModule() {
95074
    }
95075
    MatIconModule.decorators = [
95076
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["NgModule"], args: [{
95077
                    imports: [_angular_material_core__WEBPACK_IMPORTED_MODULE_7__["MatCommonModule"]],
95078
                    exports: [MatIcon, _angular_material_core__WEBPACK_IMPORTED_MODULE_7__["MatCommonModule"]],
95079
                    declarations: [MatIcon],
95080
                },] },
95081
    ];
95082
    return MatIconModule;
95083
}());
95084
 
95085
/**
95086
 * @fileoverview added by tsickle
95087
 * @suppress {checkTypes} checked by tsc
95088
 */
95089
 
95090
/**
95091
 * @fileoverview added by tsickle
95092
 * @suppress {checkTypes} checked by tsc
95093
 */
95094
 
95095
 
95096
//# sourceMappingURL=icon.es5.js.map
95097
 
95098
 
95099
/***/ }),
95100
 
95101
/***/ "./node_modules/@angular/material/esm5/input.es5.js":
95102
/*!**********************************************************!*\
95103
  !*** ./node_modules/@angular/material/esm5/input.es5.js ***!
95104
  \**********************************************************/
95105
/*! exports provided: MatTextareaAutosize, MatInputBase, _MatInputMixinBase, MatInput, getMatInputUnsupportedTypeError, MatInputModule, MAT_INPUT_VALUE_ACCESSOR */
95106
/***/ (function(module, __webpack_exports__, __webpack_require__) {
95107
 
95108
"use strict";
95109
__webpack_require__.r(__webpack_exports__);
95110
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTextareaAutosize", function() { return MatTextareaAutosize; });
95111
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatInputBase", function() { return MatInputBase; });
95112
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatInputMixinBase", function() { return _MatInputMixinBase; });
95113
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatInput", function() { return MatInput; });
95114
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMatInputUnsupportedTypeError", function() { return getMatInputUnsupportedTypeError; });
95115
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatInputModule", function() { return MatInputModule; });
95116
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_INPUT_VALUE_ACCESSOR", function() { return MAT_INPUT_VALUE_ACCESSOR; });
95117
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
95118
/* harmony import */ var _angular_cdk_text_field__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/cdk/text-field */ "./node_modules/@angular/cdk/esm5/text-field.es5.js");
95119
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
95120
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
95121
/* harmony import */ var _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/cdk/platform */ "./node_modules/@angular/cdk/esm5/platform.es5.js");
95122
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
95123
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
95124
/* harmony import */ var _angular_material_form_field__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/material/form-field */ "./node_modules/@angular/material/esm5/form-field.es5.js");
95125
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
95126
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
95127
/**
95128
 * @license
95129
 * Copyright Google LLC All Rights Reserved.
95130
 *
95131
 * Use of this source code is governed by an MIT-style license that can be
95132
 * found in the LICENSE file at https://angular.io/license
95133
 */
95134
 
95135
 
95136
 
95137
 
95138
 
95139
 
95140
 
95141
 
95142
 
95143
 
95144
 
95145
/**
95146
 * @fileoverview added by tsickle
95147
 * @suppress {checkTypes} checked by tsc
95148
 */
95149
/**
95150
 * Directive to automatically resize a textarea to fit its content.
95151
 * @deprecated Use `cdkTextareaAutosize` from `\@angular/cdk/text-field` instead.
95152
 * \@breaking-change 7.0.0
95153
 */
95154
var MatTextareaAutosize = /** @class */ (function (_super) {
95155
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatTextareaAutosize, _super);
95156
    function MatTextareaAutosize() {
95157
        return _super !== null && _super.apply(this, arguments) || this;
95158
    }
95159
    Object.defineProperty(MatTextareaAutosize.prototype, "matAutosizeMinRows", {
95160
        get: /**
95161
         * @return {?}
95162
         */
95163
        function () { return this.minRows; },
95164
        set: /**
95165
         * @param {?} value
95166
         * @return {?}
95167
         */
95168
        function (value) { this.minRows = value; },
95169
        enumerable: true,
95170
        configurable: true
95171
    });
95172
    Object.defineProperty(MatTextareaAutosize.prototype, "matAutosizeMaxRows", {
95173
        get: /**
95174
         * @return {?}
95175
         */
95176
        function () { return this.maxRows; },
95177
        set: /**
95178
         * @param {?} value
95179
         * @return {?}
95180
         */
95181
        function (value) { this.maxRows = value; },
95182
        enumerable: true,
95183
        configurable: true
95184
    });
95185
    Object.defineProperty(MatTextareaAutosize.prototype, "matAutosize", {
95186
        get: /**
95187
         * @return {?}
95188
         */
95189
        function () { return this.enabled; },
95190
        set: /**
95191
         * @param {?} value
95192
         * @return {?}
95193
         */
95194
        function (value) { this.enabled = value; },
95195
        enumerable: true,
95196
        configurable: true
95197
    });
95198
    Object.defineProperty(MatTextareaAutosize.prototype, "matTextareaAutosize", {
95199
        get: /**
95200
         * @return {?}
95201
         */
95202
        function () { return this.enabled; },
95203
        set: /**
95204
         * @param {?} value
95205
         * @return {?}
95206
         */
95207
        function (value) { this.enabled = value; },
95208
        enumerable: true,
95209
        configurable: true
95210
    });
95211
    MatTextareaAutosize.decorators = [
95212
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Directive"], args: [{
95213
                    selector: 'textarea[mat-autosize], textarea[matTextareaAutosize]',
95214
                    exportAs: 'matTextareaAutosize',
95215
                    inputs: ['cdkAutosizeMinRows', 'cdkAutosizeMaxRows'],
95216
                    host: {
95217
                        'class': 'cdk-textarea-autosize mat-autosize',
95218
                        // Textarea elements that have the directive applied should have a single row by default.
95219
                        // Browsers normally show two rows by default and therefore this limits the minRows binding.
95220
                        'rows': '1',
95221
                        '(input)': '_noopInputHandler()',
95222
                    },
95223
                },] },
95224
    ];
95225
    /** @nocollapse */
95226
    MatTextareaAutosize.propDecorators = {
95227
        "matAutosizeMinRows": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"] },],
95228
        "matAutosizeMaxRows": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"] },],
95229
        "matAutosize": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"], args: ['mat-autosize',] },],
95230
        "matTextareaAutosize": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"] },],
95231
    };
95232
    return MatTextareaAutosize;
95233
}(_angular_cdk_text_field__WEBPACK_IMPORTED_MODULE_1__["CdkTextareaAutosize"]));
95234
 
95235
/**
95236
 * @fileoverview added by tsickle
95237
 * @suppress {checkTypes} checked by tsc
95238
 */
95239
 
95240
/**
95241
 * \@docs-private
95242
 * @param {?} type
95243
 * @return {?}
95244
 */
95245
function getMatInputUnsupportedTypeError(type) {
95246
    return Error("Input type \"" + type + "\" isn't supported by matInput.");
95247
}
95248
 
95249
/**
95250
 * @fileoverview added by tsickle
95251
 * @suppress {checkTypes} checked by tsc
95252
 */
95253
/**
95254
 * This token is used to inject the object whose value should be set into `MatInput`. If none is
95255
 * provided, the native `HTMLInputElement` is used. Directives like `MatDatepickerInput` can provide
95256
 * themselves for this token, in order to make `MatInput` delegate the getting and setting of the
95257
 * value to them.
95258
 */
95259
var /** @type {?} */ MAT_INPUT_VALUE_ACCESSOR = new _angular_core__WEBPACK_IMPORTED_MODULE_2__["InjectionToken"]('MAT_INPUT_VALUE_ACCESSOR');
95260
 
95261
/**
95262
 * @fileoverview added by tsickle
95263
 * @suppress {checkTypes} checked by tsc
95264
 */
95265
// Invalid input type. Using one of these will throw an MatInputUnsupportedTypeError.
95266
var /** @type {?} */ MAT_INPUT_INVALID_TYPES = [
95267
    'button',
95268
    'checkbox',
95269
    'file',
95270
    'hidden',
95271
    'image',
95272
    'radio',
95273
    'range',
95274
    'reset',
95275
    'submit'
95276
];
95277
var /** @type {?} */ nextUniqueId = 0;
95278
/**
95279
 * \@docs-private
95280
 */
95281
var  /**
95282
 * \@docs-private
95283
 */
95284
MatInputBase = /** @class */ (function () {
95285
    function MatInputBase(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, ngControl) {
95286
        this._defaultErrorStateMatcher = _defaultErrorStateMatcher;
95287
        this._parentForm = _parentForm;
95288
        this._parentFormGroup = _parentFormGroup;
95289
        this.ngControl = ngControl;
95290
    }
95291
    return MatInputBase;
95292
}());
95293
var /** @type {?} */ _MatInputMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_6__["mixinErrorState"])(MatInputBase);
95294
/**
95295
 * Directive that allows a native input to work inside a `MatFormField`.
95296
 */
95297
var MatInput = /** @class */ (function (_super) {
95298
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatInput, _super);
95299
    function MatInput(_elementRef, _platform, /** @docs-private */
95300
    ngControl, _parentForm, _parentFormGroup, _defaultErrorStateMatcher, inputValueAccessor, _autofillMonitor, ngZone) {
95301
        var _this = _super.call(this, _defaultErrorStateMatcher, _parentForm, _parentFormGroup, ngControl) || this;
95302
        _this._elementRef = _elementRef;
95303
        _this._platform = _platform;
95304
        _this.ngControl = ngControl;
95305
        _this._autofillMonitor = _autofillMonitor;
95306
        _this._uid = "mat-input-" + nextUniqueId++;
95307
        /**
95308
         * Whether the component is being rendered on the server.
95309
         */
95310
        _this._isServer = false;
95311
        /**
95312
         * Implemented as part of MatFormFieldControl.
95313
         * \@docs-private
95314
         */
95315
        _this.focused = false;
95316
        /**
95317
         * Implemented as part of MatFormFieldControl.
95318
         * \@docs-private
95319
         */
95320
        _this.stateChanges = new rxjs__WEBPACK_IMPORTED_MODULE_8__["Subject"]();
95321
        /**
95322
         * Implemented as part of MatFormFieldControl.
95323
         * \@docs-private
95324
         */
95325
        _this.controlType = 'mat-input';
95326
        /**
95327
         * Implemented as part of MatFormFieldControl.
95328
         * \@docs-private
95329
         */
95330
        _this.autofilled = false;
95331
        _this._disabled = false;
95332
        _this._required = false;
95333
        _this._type = 'text';
95334
        _this._readonly = false;
95335
        _this._neverEmptyInputTypes = [
95336
            'date',
95337
            'datetime',
95338
            'datetime-local',
95339
            'month',
95340
            'time',
95341
            'week'
95342
        ].filter(function (t) { return Object(_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_4__["getSupportedInputTypes"])().has(t); });
95343
        // If no input value accessor was explicitly specified, use the element as the input value
95344
        // accessor.
95345
        // If no input value accessor was explicitly specified, use the element as the input value
95346
        // accessor.
95347
        _this._inputValueAccessor = inputValueAccessor || _this._elementRef.nativeElement;
95348
        _this._previousNativeValue = _this.value;
95349
        // Force setter to be called in case id was not specified.
95350
        // Force setter to be called in case id was not specified.
95351
        _this.id = _this.id;
95352
        // On some versions of iOS the caret gets stuck in the wrong place when holding down the delete
95353
        // key. In order to get around this we need to "jiggle" the caret loose. Since this bug only
95354
        // exists on iOS, we only bother to install the listener on iOS.
95355
        if (_platform.IOS) {
95356
            ngZone.runOutsideAngular(function () {
95357
                _elementRef.nativeElement.addEventListener('keyup', function (event) {
95358
                    var /** @type {?} */ el = /** @type {?} */ (event.target);
95359
                    if (!el.value && !el.selectionStart && !el.selectionEnd) {
95360
                        // Note: Just setting `0, 0` doesn't fix the issue. Setting
95361
                        // `1, 1` fixes it for the first time that you type text and
95362
                        // then hold delete. Toggling to `1, 1` and then back to
95363
                        // `0, 0` seems to completely fix it.
95364
                        el.setSelectionRange(1, 1);
95365
                        el.setSelectionRange(0, 0);
95366
                    }
95367
                });
95368
            });
95369
        }
95370
        _this._isServer = !_this._platform.isBrowser;
95371
        return _this;
95372
    }
95373
    Object.defineProperty(MatInput.prototype, "disabled", {
95374
        get: /**
95375
         * Implemented as part of MatFormFieldControl.
95376
         * \@docs-private
95377
         * @return {?}
95378
         */
95379
        function () {
95380
            if (this.ngControl && this.ngControl.disabled !== null) {
95381
                return this.ngControl.disabled;
95382
            }
95383
            return this._disabled;
95384
        },
95385
        set: /**
95386
         * @param {?} value
95387
         * @return {?}
95388
         */
95389
        function (value) {
95390
            this._disabled = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceBooleanProperty"])(value);
95391
            // Browsers may not fire the blur event if the input is disabled too quickly.
95392
            // Reset from here to ensure that the element doesn't become stuck.
95393
            if (this.focused) {
95394
                this.focused = false;
95395
                this.stateChanges.next();
95396
            }
95397
        },
95398
        enumerable: true,
95399
        configurable: true
95400
    });
95401
    Object.defineProperty(MatInput.prototype, "id", {
95402
        get: /**
95403
         * Implemented as part of MatFormFieldControl.
95404
         * \@docs-private
95405
         * @return {?}
95406
         */
95407
        function () { return this._id; },
95408
        set: /**
95409
         * @param {?} value
95410
         * @return {?}
95411
         */
95412
        function (value) { this._id = value || this._uid; },
95413
        enumerable: true,
95414
        configurable: true
95415
    });
95416
    Object.defineProperty(MatInput.prototype, "required", {
95417
        get: /**
95418
         * Implemented as part of MatFormFieldControl.
95419
         * \@docs-private
95420
         * @return {?}
95421
         */
95422
        function () { return this._required; },
95423
        set: /**
95424
         * @param {?} value
95425
         * @return {?}
95426
         */
95427
        function (value) { this._required = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceBooleanProperty"])(value); },
95428
        enumerable: true,
95429
        configurable: true
95430
    });
95431
    Object.defineProperty(MatInput.prototype, "type", {
95432
        get: /**
95433
         * Input type of the element.
95434
         * @return {?}
95435
         */
95436
        function () { return this._type; },
95437
        set: /**
95438
         * @param {?} value
95439
         * @return {?}
95440
         */
95441
        function (value) {
95442
            this._type = value || 'text';
95443
            this._validateType();
95444
            // When using Angular inputs, developers are no longer able to set the properties on the native
95445
            // input element. To ensure that bindings for `type` work, we need to sync the setter
95446
            // with the native property. Textarea elements don't support the type property or attribute.
95447
            if (!this._isTextarea() && Object(_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_4__["getSupportedInputTypes"])().has(this._type)) {
95448
                this._elementRef.nativeElement.type = this._type;
95449
            }
95450
        },
95451
        enumerable: true,
95452
        configurable: true
95453
    });
95454
    Object.defineProperty(MatInput.prototype, "value", {
95455
        get: /**
95456
         * Implemented as part of MatFormFieldControl.
95457
         * \@docs-private
95458
         * @return {?}
95459
         */
95460
        function () { return this._inputValueAccessor.value; },
95461
        set: /**
95462
         * @param {?} value
95463
         * @return {?}
95464
         */
95465
        function (value) {
95466
            if (value !== this.value) {
95467
                this._inputValueAccessor.value = value;
95468
                this.stateChanges.next();
95469
            }
95470
        },
95471
        enumerable: true,
95472
        configurable: true
95473
    });
95474
    Object.defineProperty(MatInput.prototype, "readonly", {
95475
        get: /**
95476
         * Whether the element is readonly.
95477
         * @return {?}
95478
         */
95479
        function () { return this._readonly; },
95480
        set: /**
95481
         * @param {?} value
95482
         * @return {?}
95483
         */
95484
        function (value) { this._readonly = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceBooleanProperty"])(value); },
95485
        enumerable: true,
95486
        configurable: true
95487
    });
95488
    /**
95489
     * @return {?}
95490
     */
95491
    MatInput.prototype.ngOnInit = /**
95492
     * @return {?}
95493
     */
95494
    function () {
95495
        var _this = this;
95496
        this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(function (event) {
95497
            _this.autofilled = event.isAutofilled;
95498
            _this.stateChanges.next();
95499
        });
95500
    };
95501
    /**
95502
     * @return {?}
95503
     */
95504
    MatInput.prototype.ngOnChanges = /**
95505
     * @return {?}
95506
     */
95507
    function () {
95508
        this.stateChanges.next();
95509
    };
95510
    /**
95511
     * @return {?}
95512
     */
95513
    MatInput.prototype.ngOnDestroy = /**
95514
     * @return {?}
95515
     */
95516
    function () {
95517
        this.stateChanges.complete();
95518
        this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement);
95519
    };
95520
    /**
95521
     * @return {?}
95522
     */
95523
    MatInput.prototype.ngDoCheck = /**
95524
     * @return {?}
95525
     */
95526
    function () {
95527
        if (this.ngControl) {
95528
            // We need to re-evaluate this on every change detection cycle, because there are some
95529
            // error triggers that we can't subscribe to (e.g. parent form submissions). This means
95530
            // that whatever logic is in here has to be super lean or we risk destroying the performance.
95531
            this.updateErrorState();
95532
        }
95533
        // We need to dirty-check the native element's value, because there are some cases where
95534
        // we won't be notified when it changes (e.g. the consumer isn't using forms or they're
95535
        // updating the value using `emitEvent: false`).
95536
        this._dirtyCheckNativeValue();
95537
    };
95538
    /** Focuses the input. */
95539
    /**
95540
     * Focuses the input.
95541
     * @return {?}
95542
     */
95543
    MatInput.prototype.focus = /**
95544
     * Focuses the input.
95545
     * @return {?}
95546
     */
95547
    function () { this._elementRef.nativeElement.focus(); };
95548
    /** Callback for the cases where the focused state of the input changes. */
95549
    /**
95550
     * Callback for the cases where the focused state of the input changes.
95551
     * @param {?} isFocused
95552
     * @return {?}
95553
     */
95554
    MatInput.prototype._focusChanged = /**
95555
     * Callback for the cases where the focused state of the input changes.
95556
     * @param {?} isFocused
95557
     * @return {?}
95558
     */
95559
    function (isFocused) {
95560
        if (isFocused !== this.focused && !this.readonly) {
95561
            this.focused = isFocused;
95562
            this.stateChanges.next();
95563
        }
95564
    };
95565
    /**
95566
     * @return {?}
95567
     */
95568
    MatInput.prototype._onInput = /**
95569
     * @return {?}
95570
     */
95571
    function () {
95572
        // This is a noop function and is used to let Angular know whenever the value changes.
95573
        // Angular will run a new change detection each time the `input` event has been dispatched.
95574
        // It's necessary that Angular recognizes the value change, because when floatingLabel
95575
        // is set to false and Angular forms aren't used, the placeholder won't recognize the
95576
        // value changes and will not disappear.
95577
        // Listening to the input event wouldn't be necessary when the input is using the
95578
        // FormsModule or ReactiveFormsModule, because Angular forms also listens to input events.
95579
    };
95580
    /** Does some manual dirty checking on the native input `value` property. */
95581
    /**
95582
     * Does some manual dirty checking on the native input `value` property.
95583
     * @return {?}
95584
     */
95585
    MatInput.prototype._dirtyCheckNativeValue = /**
95586
     * Does some manual dirty checking on the native input `value` property.
95587
     * @return {?}
95588
     */
95589
    function () {
95590
        var /** @type {?} */ newValue = this.value;
95591
        if (this._previousNativeValue !== newValue) {
95592
            this._previousNativeValue = newValue;
95593
            this.stateChanges.next();
95594
        }
95595
    };
95596
    /** Make sure the input is a supported type. */
95597
    /**
95598
     * Make sure the input is a supported type.
95599
     * @return {?}
95600
     */
95601
    MatInput.prototype._validateType = /**
95602
     * Make sure the input is a supported type.
95603
     * @return {?}
95604
     */
95605
    function () {
95606
        if (MAT_INPUT_INVALID_TYPES.indexOf(this._type) > -1) {
95607
            throw getMatInputUnsupportedTypeError(this._type);
95608
        }
95609
    };
95610
    /** Checks whether the input type is one of the types that are never empty. */
95611
    /**
95612
     * Checks whether the input type is one of the types that are never empty.
95613
     * @return {?}
95614
     */
95615
    MatInput.prototype._isNeverEmpty = /**
95616
     * Checks whether the input type is one of the types that are never empty.
95617
     * @return {?}
95618
     */
95619
    function () {
95620
        return this._neverEmptyInputTypes.indexOf(this._type) > -1;
95621
    };
95622
    /** Checks whether the input is invalid based on the native validation. */
95623
    /**
95624
     * Checks whether the input is invalid based on the native validation.
95625
     * @return {?}
95626
     */
95627
    MatInput.prototype._isBadInput = /**
95628
     * Checks whether the input is invalid based on the native validation.
95629
     * @return {?}
95630
     */
95631
    function () {
95632
        // The `validity` property won't be present on platform-server.
95633
        var /** @type {?} */ validity = (/** @type {?} */ (this._elementRef.nativeElement)).validity;
95634
        return validity && validity.badInput;
95635
    };
95636
    /** Determines if the component host is a textarea. */
95637
    /**
95638
     * Determines if the component host is a textarea.
95639
     * @return {?}
95640
     */
95641
    MatInput.prototype._isTextarea = /**
95642
     * Determines if the component host is a textarea.
95643
     * @return {?}
95644
     */
95645
    function () {
95646
        return this._elementRef.nativeElement.nodeName.toLowerCase() === 'textarea';
95647
    };
95648
    Object.defineProperty(MatInput.prototype, "empty", {
95649
        /**
95650
         * Implemented as part of MatFormFieldControl.
95651
         * @docs-private
95652
         */
95653
        get: /**
95654
         * Implemented as part of MatFormFieldControl.
95655
         * \@docs-private
95656
         * @return {?}
95657
         */
95658
        function () {
95659
            return !this._isNeverEmpty() && !this._elementRef.nativeElement.value && !this._isBadInput() &&
95660
                !this.autofilled;
95661
        },
95662
        enumerable: true,
95663
        configurable: true
95664
    });
95665
    Object.defineProperty(MatInput.prototype, "shouldLabelFloat", {
95666
        /**
95667
         * Implemented as part of MatFormFieldControl.
95668
         * @docs-private
95669
         */
95670
        get: /**
95671
         * Implemented as part of MatFormFieldControl.
95672
         * \@docs-private
95673
         * @return {?}
95674
         */
95675
        function () { return this.focused || !this.empty; },
95676
        enumerable: true,
95677
        configurable: true
95678
    });
95679
    /**
95680
     * Implemented as part of MatFormFieldControl.
95681
     * @docs-private
95682
     */
95683
    /**
95684
     * Implemented as part of MatFormFieldControl.
95685
     * \@docs-private
95686
     * @param {?} ids
95687
     * @return {?}
95688
     */
95689
    MatInput.prototype.setDescribedByIds = /**
95690
     * Implemented as part of MatFormFieldControl.
95691
     * \@docs-private
95692
     * @param {?} ids
95693
     * @return {?}
95694
     */
95695
    function (ids) { this._ariaDescribedby = ids.join(' '); };
95696
    /**
95697
     * Implemented as part of MatFormFieldControl.
95698
     * @docs-private
95699
     */
95700
    /**
95701
     * Implemented as part of MatFormFieldControl.
95702
     * \@docs-private
95703
     * @return {?}
95704
     */
95705
    MatInput.prototype.onContainerClick = /**
95706
     * Implemented as part of MatFormFieldControl.
95707
     * \@docs-private
95708
     * @return {?}
95709
     */
95710
    function () { this.focus(); };
95711
    MatInput.decorators = [
95712
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Directive"], args: [{
95713
                    selector: "input[matInput], textarea[matInput]",
95714
                    exportAs: 'matInput',
95715
                    host: {
95716
                        /**
95717
                             * @breaking-change 7.0.0 remove .mat-form-field-autofill-control in favor of AutofillMonitor.
95718
                             */
95719
                        'class': 'mat-input-element mat-form-field-autofill-control',
95720
                        '[class.mat-input-server]': '_isServer',
95721
                        // Native input properties that are overwritten by Angular inputs need to be synced with
95722
                        // the native input element. Otherwise property bindings for those don't work.
95723
                        '[attr.id]': 'id',
95724
                        '[attr.placeholder]': 'placeholder',
95725
                        '[disabled]': 'disabled',
95726
                        '[required]': 'required',
95727
                        '[readonly]': 'readonly',
95728
                        '[attr.aria-describedby]': '_ariaDescribedby || null',
95729
                        '[attr.aria-invalid]': 'errorState',
95730
                        '[attr.aria-required]': 'required.toString()',
95731
                        '(blur)': '_focusChanged(false)',
95732
                        '(focus)': '_focusChanged(true)',
95733
                        '(input)': '_onInput()',
95734
                    },
95735
                    providers: [{ provide: _angular_material_form_field__WEBPACK_IMPORTED_MODULE_7__["MatFormFieldControl"], useExisting: MatInput }],
95736
                },] },
95737
    ];
95738
    /** @nocollapse */
95739
    MatInput.ctorParameters = function () { return [
95740
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ElementRef"], },
95741
        { type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_4__["Platform"], },
95742
        { type: _angular_forms__WEBPACK_IMPORTED_MODULE_5__["NgControl"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Self"] },] },
95743
        { type: _angular_forms__WEBPACK_IMPORTED_MODULE_5__["NgForm"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Optional"] },] },
95744
        { type: _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormGroupDirective"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Optional"] },] },
95745
        { type: _angular_material_core__WEBPACK_IMPORTED_MODULE_6__["ErrorStateMatcher"], },
95746
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Self"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Inject"], args: [MAT_INPUT_VALUE_ACCESSOR,] },] },
95747
        { type: _angular_cdk_text_field__WEBPACK_IMPORTED_MODULE_1__["AutofillMonitor"], },
95748
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["NgZone"], },
95749
    ]; };
95750
    MatInput.propDecorators = {
95751
        "disabled": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"] },],
95752
        "id": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"] },],
95753
        "placeholder": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"] },],
95754
        "required": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"] },],
95755
        "type": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"] },],
95756
        "errorStateMatcher": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"] },],
95757
        "value": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"] },],
95758
        "readonly": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"] },],
95759
    };
95760
    return MatInput;
95761
}(_MatInputMixinBase));
95762
 
95763
/**
95764
 * @fileoverview added by tsickle
95765
 * @suppress {checkTypes} checked by tsc
95766
 */
95767
var MatInputModule = /** @class */ (function () {
95768
    function MatInputModule() {
95769
    }
95770
    MatInputModule.decorators = [
95771
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_2__["NgModule"], args: [{
95772
                    declarations: [MatInput, MatTextareaAutosize],
95773
                    imports: [
95774
                        _angular_common__WEBPACK_IMPORTED_MODULE_9__["CommonModule"],
95775
                        _angular_cdk_text_field__WEBPACK_IMPORTED_MODULE_1__["TextFieldModule"],
95776
                        _angular_material_form_field__WEBPACK_IMPORTED_MODULE_7__["MatFormFieldModule"],
95777
                    ],
95778
                    exports: [
95779
                        _angular_cdk_text_field__WEBPACK_IMPORTED_MODULE_1__["TextFieldModule"],
95780
                        _angular_material_form_field__WEBPACK_IMPORTED_MODULE_7__["MatFormFieldModule"],
95781
                        MatInput,
95782
                        MatTextareaAutosize,
95783
                    ],
95784
                    providers: [_angular_material_core__WEBPACK_IMPORTED_MODULE_6__["ErrorStateMatcher"]],
95785
                },] },
95786
    ];
95787
    return MatInputModule;
95788
}());
95789
 
95790
/**
95791
 * @fileoverview added by tsickle
95792
 * @suppress {checkTypes} checked by tsc
95793
 */
95794
 
95795
/**
95796
 * @fileoverview added by tsickle
95797
 * @suppress {checkTypes} checked by tsc
95798
 */
95799
 
95800
 
95801
//# sourceMappingURL=input.es5.js.map
95802
 
95803
 
95804
/***/ }),
95805
 
95806
/***/ "./node_modules/@angular/material/esm5/list.es5.js":
95807
/*!*********************************************************!*\
95808
  !*** ./node_modules/@angular/material/esm5/list.es5.js ***!
95809
  \*********************************************************/
95810
/*! exports provided: MatListModule, MatListBase, _MatListMixinBase, MatListItemBase, _MatListItemMixinBase, MatNavList, MatList, MatListAvatarCssMatStyler, MatListIconCssMatStyler, MatListSubheaderCssMatStyler, MatListItem, MatSelectionListBase, _MatSelectionListMixinBase, MatListOptionBase, _MatListOptionMixinBase, MAT_SELECTION_LIST_VALUE_ACCESSOR, MatSelectionListChange, MatListOption, MatSelectionList */
95811
/***/ (function(module, __webpack_exports__, __webpack_require__) {
95812
 
95813
"use strict";
95814
__webpack_require__.r(__webpack_exports__);
95815
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatListModule", function() { return MatListModule; });
95816
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatListBase", function() { return MatListBase; });
95817
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatListMixinBase", function() { return _MatListMixinBase; });
95818
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatListItemBase", function() { return MatListItemBase; });
95819
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatListItemMixinBase", function() { return _MatListItemMixinBase; });
95820
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatNavList", function() { return MatNavList; });
95821
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatList", function() { return MatList; });
95822
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatListAvatarCssMatStyler", function() { return MatListAvatarCssMatStyler; });
95823
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatListIconCssMatStyler", function() { return MatListIconCssMatStyler; });
95824
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatListSubheaderCssMatStyler", function() { return MatListSubheaderCssMatStyler; });
95825
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatListItem", function() { return MatListItem; });
95826
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSelectionListBase", function() { return MatSelectionListBase; });
95827
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatSelectionListMixinBase", function() { return _MatSelectionListMixinBase; });
95828
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatListOptionBase", function() { return MatListOptionBase; });
95829
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatListOptionMixinBase", function() { return _MatListOptionMixinBase; });
95830
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_SELECTION_LIST_VALUE_ACCESSOR", function() { return MAT_SELECTION_LIST_VALUE_ACCESSOR; });
95831
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSelectionListChange", function() { return MatSelectionListChange; });
95832
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatListOption", function() { return MatListOption; });
95833
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSelectionList", function() { return MatSelectionList; });
95834
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
95835
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
95836
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
95837
/* harmony import */ var _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/a11y */ "./node_modules/@angular/cdk/esm5/a11y.es5.js");
95838
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
95839
/* harmony import */ var _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/cdk/collections */ "./node_modules/@angular/cdk/esm5/collections.es5.js");
95840
/* harmony import */ var _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/cdk/keycodes */ "./node_modules/@angular/cdk/esm5/keycodes.es5.js");
95841
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
95842
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
95843
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
95844
/* harmony import */ var _angular_material_divider__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/material/divider */ "./node_modules/@angular/material/esm5/divider.es5.js");
95845
/**
95846
 * @license
95847
 * Copyright Google LLC All Rights Reserved.
95848
 *
95849
 * Use of this source code is governed by an MIT-style license that can be
95850
 * found in the LICENSE file at https://angular.io/license
95851
 */
95852
 
95853
 
95854
 
95855
 
95856
 
95857
 
95858
 
95859
 
95860
 
95861
 
95862
 
95863
 
95864
/**
95865
 * @fileoverview added by tsickle
95866
 * @suppress {checkTypes} checked by tsc
95867
 */
95868
/**
95869
 * \@docs-private
95870
 */
95871
var  /**
95872
 * \@docs-private
95873
 */
95874
MatListBase = /** @class */ (function () {
95875
    function MatListBase() {
95876
    }
95877
    return MatListBase;
95878
}());
95879
var /** @type {?} */ _MatListMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_2__["mixinDisableRipple"])(MatListBase);
95880
/**
95881
 * \@docs-private
95882
 */
95883
var  /**
95884
 * \@docs-private
95885
 */
95886
MatListItemBase = /** @class */ (function () {
95887
    function MatListItemBase() {
95888
    }
95889
    return MatListItemBase;
95890
}());
95891
var /** @type {?} */ _MatListItemMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_2__["mixinDisableRipple"])(MatListItemBase);
95892
var MatNavList = /** @class */ (function (_super) {
95893
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatNavList, _super);
95894
    function MatNavList() {
95895
        return _super !== null && _super.apply(this, arguments) || this;
95896
    }
95897
    MatNavList.decorators = [
95898
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"], args: [{selector: 'mat-nav-list',
95899
                    exportAs: 'matNavList',
95900
                    host: {
95901
                        'role': 'navigation',
95902
                        'class': 'mat-nav-list'
95903
                    },
95904
                    template: "<ng-content></ng-content>",
95905
                    styles: [".mat-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mat-divider.mat-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}.mat-subheader{display:flex;box-sizing:border-box;padding:16px;align-items:center}.mat-list .mat-subheader,.mat-nav-list .mat-subheader,.mat-selection-list .mat-subheader{margin:0}.mat-list,.mat-nav-list,.mat-selection-list{padding-top:8px;display:block;-webkit-tap-highlight-color:transparent}.mat-list .mat-subheader,.mat-nav-list .mat-subheader,.mat-selection-list .mat-subheader{height:48px;line-height:16px}.mat-list .mat-subheader:first-child,.mat-nav-list .mat-subheader:first-child,.mat-selection-list .mat-subheader:first-child{margin-top:-8px}.mat-list .mat-list-item,.mat-list .mat-list-option,.mat-nav-list .mat-list-item,.mat-nav-list .mat-list-option,.mat-selection-list .mat-list-item,.mat-selection-list .mat-list-option{display:block;height:48px;-webkit-tap-highlight-color:transparent}.mat-list .mat-list-item .mat-list-item-content,.mat-list .mat-list-option .mat-list-item-content,.mat-nav-list .mat-list-item .mat-list-item-content,.mat-nav-list .mat-list-option .mat-list-item-content,.mat-selection-list .mat-list-item .mat-list-item-content,.mat-selection-list .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list .mat-list-item .mat-list-item-content-reverse,.mat-list .mat-list-option .mat-list-item-content-reverse,.mat-nav-list .mat-list-item .mat-list-item-content-reverse,.mat-nav-list .mat-list-option .mat-list-item-content-reverse,.mat-selection-list .mat-list-item .mat-list-item-content-reverse,.mat-selection-list .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list .mat-list-item .mat-list-item-ripple,.mat-list .mat-list-option .mat-list-item-ripple,.mat-nav-list .mat-list-item .mat-list-item-ripple,.mat-nav-list .mat-list-option .mat-list-item-ripple,.mat-selection-list .mat-list-item .mat-list-item-ripple,.mat-selection-list .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list .mat-list-item.mat-list-item-with-avatar,.mat-list .mat-list-option.mat-list-item-with-avatar,.mat-nav-list .mat-list-item.mat-list-item-with-avatar,.mat-nav-list .mat-list-option.mat-list-item-with-avatar,.mat-selection-list .mat-list-item.mat-list-item-with-avatar,.mat-selection-list .mat-list-option.mat-list-item-with-avatar{height:56px}.mat-list .mat-list-item.mat-2-line,.mat-list .mat-list-option.mat-2-line,.mat-nav-list .mat-list-item.mat-2-line,.mat-nav-list .mat-list-option.mat-2-line,.mat-selection-list .mat-list-item.mat-2-line,.mat-selection-list .mat-list-option.mat-2-line{height:72px}.mat-list .mat-list-item.mat-3-line,.mat-list .mat-list-option.mat-3-line,.mat-nav-list .mat-list-item.mat-3-line,.mat-nav-list .mat-list-option.mat-3-line,.mat-selection-list .mat-list-item.mat-3-line,.mat-selection-list .mat-list-option.mat-3-line{height:88px}.mat-list .mat-list-item.mat-multi-line,.mat-list .mat-list-option.mat-multi-line,.mat-nav-list .mat-list-item.mat-multi-line,.mat-nav-list .mat-list-option.mat-multi-line,.mat-selection-list .mat-list-item.mat-multi-line,.mat-selection-list .mat-list-option.mat-multi-line{height:auto}.mat-list .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list .mat-list-option.mat-multi-line .mat-list-item-content,.mat-nav-list .mat-list-item.mat-multi-line .mat-list-item-content,.mat-nav-list .mat-list-option.mat-multi-line .mat-list-item-content,.mat-selection-list .mat-list-item.mat-multi-line .mat-list-item-content,.mat-selection-list .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list .mat-list-item .mat-list-text,.mat-list .mat-list-option .mat-list-text,.mat-nav-list .mat-list-item .mat-list-text,.mat-nav-list .mat-list-option .mat-list-text,.mat-selection-list .mat-list-item .mat-list-text,.mat-selection-list .mat-list-option .mat-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden;padding:0}.mat-list .mat-list-item .mat-list-text>*,.mat-list .mat-list-option .mat-list-text>*,.mat-nav-list .mat-list-item .mat-list-text>*,.mat-nav-list .mat-list-option .mat-list-text>*,.mat-selection-list .mat-list-item .mat-list-text>*,.mat-selection-list .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-list .mat-list-item .mat-list-text:empty,.mat-list .mat-list-option .mat-list-text:empty,.mat-nav-list .mat-list-item .mat-list-text:empty,.mat-nav-list .mat-list-option .mat-list-text:empty,.mat-selection-list .mat-list-item .mat-list-text:empty,.mat-selection-list .mat-list-option .mat-list-text:empty{display:none}.mat-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text,.mat-nav-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-nav-list .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-nav-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-nav-list .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text,.mat-selection-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-selection-list .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-selection-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-selection-list .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:0;padding-left:16px}[dir=rtl] .mat-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-nav-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-nav-list .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-nav-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-nav-list .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-selection-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-selection-list .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-selection-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-selection-list .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:0}.mat-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-nav-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-nav-list .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-nav-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-nav-list .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-selection-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-selection-list .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-selection-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-selection-list .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-left:0;padding-right:16px}[dir=rtl] .mat-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-nav-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-nav-list .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-nav-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-nav-list .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-selection-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-selection-list .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-selection-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-selection-list .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:0;padding-left:16px}.mat-list .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-nav-list .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-nav-list .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-nav-list .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-nav-list .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-selection-list .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-selection-list .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-selection-list .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-selection-list .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:16px;padding-left:16px}.mat-list .mat-list-item .mat-list-avatar,.mat-list .mat-list-option .mat-list-avatar,.mat-nav-list .mat-list-item .mat-list-avatar,.mat-nav-list .mat-list-option .mat-list-avatar,.mat-selection-list .mat-list-item .mat-list-avatar,.mat-selection-list .mat-list-option .mat-list-avatar{flex-shrink:0;width:40px;height:40px;border-radius:50%}.mat-list .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list .mat-list-option .mat-list-avatar~.mat-divider-inset,.mat-nav-list .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-nav-list .mat-list-option .mat-list-avatar~.mat-divider-inset,.mat-selection-list .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-selection-list .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:72px;width:calc(100% - 72px)}[dir=rtl] .mat-list .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list .mat-list-option .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-nav-list .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-nav-list .mat-list-option .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-selection-list .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-selection-list .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:72px}.mat-list .mat-list-item .mat-list-icon,.mat-list .mat-list-option .mat-list-icon,.mat-nav-list .mat-list-item .mat-list-icon,.mat-nav-list .mat-list-option .mat-list-icon,.mat-selection-list .mat-list-item .mat-list-icon,.mat-selection-list .mat-list-option .mat-list-icon{flex-shrink:0;width:24px;height:24px;font-size:24px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list .mat-list-option .mat-list-icon~.mat-divider-inset,.mat-nav-list .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-nav-list .mat-list-option .mat-list-icon~.mat-divider-inset,.mat-selection-list .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-selection-list .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:64px;width:calc(100% - 64px)}[dir=rtl] .mat-list .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list .mat-list-option .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-nav-list .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-nav-list .mat-list-option .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-selection-list .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-selection-list .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:64px}.mat-list .mat-list-item .mat-divider,.mat-list .mat-list-option .mat-divider,.mat-nav-list .mat-list-item .mat-divider,.mat-nav-list .mat-list-option .mat-divider,.mat-selection-list .mat-list-item .mat-divider,.mat-selection-list .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list .mat-list-item .mat-divider,[dir=rtl] .mat-list .mat-list-option .mat-divider,[dir=rtl] .mat-nav-list .mat-list-item .mat-divider,[dir=rtl] .mat-nav-list .mat-list-option .mat-divider,[dir=rtl] .mat-selection-list .mat-list-item .mat-divider,[dir=rtl] .mat-selection-list .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list .mat-list-item .mat-divider.mat-divider-inset,.mat-list .mat-list-option .mat-divider.mat-divider-inset,.mat-nav-list .mat-list-item .mat-divider.mat-divider-inset,.mat-nav-list .mat-list-option .mat-divider.mat-divider-inset,.mat-selection-list .mat-list-item .mat-divider.mat-divider-inset,.mat-selection-list .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-list[dense],.mat-nav-list[dense],.mat-selection-list[dense]{padding-top:4px;display:block}.mat-list[dense] .mat-subheader,.mat-nav-list[dense] .mat-subheader,.mat-selection-list[dense] .mat-subheader{height:40px;line-height:8px}.mat-list[dense] .mat-subheader:first-child,.mat-nav-list[dense] .mat-subheader:first-child,.mat-selection-list[dense] .mat-subheader:first-child{margin-top:-4px}.mat-list[dense] .mat-list-item,.mat-list[dense] .mat-list-option,.mat-nav-list[dense] .mat-list-item,.mat-nav-list[dense] .mat-list-option,.mat-selection-list[dense] .mat-list-item,.mat-selection-list[dense] .mat-list-option{display:block;height:40px;-webkit-tap-highlight-color:transparent}.mat-list[dense] .mat-list-item .mat-list-item-content,.mat-list[dense] .mat-list-option .mat-list-item-content,.mat-nav-list[dense] .mat-list-item .mat-list-item-content,.mat-nav-list[dense] .mat-list-option .mat-list-item-content,.mat-selection-list[dense] .mat-list-item .mat-list-item-content,.mat-selection-list[dense] .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list[dense] .mat-list-item .mat-list-item-content-reverse,.mat-list[dense] .mat-list-option .mat-list-item-content-reverse,.mat-nav-list[dense] .mat-list-item .mat-list-item-content-reverse,.mat-nav-list[dense] .mat-list-option .mat-list-item-content-reverse,.mat-selection-list[dense] .mat-list-item .mat-list-item-content-reverse,.mat-selection-list[dense] .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list[dense] .mat-list-item .mat-list-item-ripple,.mat-list[dense] .mat-list-option .mat-list-item-ripple,.mat-nav-list[dense] .mat-list-item .mat-list-item-ripple,.mat-nav-list[dense] .mat-list-option .mat-list-item-ripple,.mat-selection-list[dense] .mat-list-item .mat-list-item-ripple,.mat-selection-list[dense] .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list[dense] .mat-list-item.mat-list-item-with-avatar,.mat-list[dense] .mat-list-option.mat-list-item-with-avatar,.mat-nav-list[dense] .mat-list-item.mat-list-item-with-avatar,.mat-nav-list[dense] .mat-list-option.mat-list-item-with-avatar,.mat-selection-list[dense] .mat-list-item.mat-list-item-with-avatar,.mat-selection-list[dense] .mat-list-option.mat-list-item-with-avatar{height:48px}.mat-list[dense] .mat-list-item.mat-2-line,.mat-list[dense] .mat-list-option.mat-2-line,.mat-nav-list[dense] .mat-list-item.mat-2-line,.mat-nav-list[dense] .mat-list-option.mat-2-line,.mat-selection-list[dense] .mat-list-item.mat-2-line,.mat-selection-list[dense] .mat-list-option.mat-2-line{height:60px}.mat-list[dense] .mat-list-item.mat-3-line,.mat-list[dense] .mat-list-option.mat-3-line,.mat-nav-list[dense] .mat-list-item.mat-3-line,.mat-nav-list[dense] .mat-list-option.mat-3-line,.mat-selection-list[dense] .mat-list-item.mat-3-line,.mat-selection-list[dense] .mat-list-option.mat-3-line{height:76px}.mat-list[dense] .mat-list-item.mat-multi-line,.mat-list[dense] .mat-list-option.mat-multi-line,.mat-nav-list[dense] .mat-list-item.mat-multi-line,.mat-nav-list[dense] .mat-list-option.mat-multi-line,.mat-selection-list[dense] .mat-list-item.mat-multi-line,.mat-selection-list[dense] .mat-list-option.mat-multi-line{height:auto}.mat-list[dense] .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list[dense] .mat-list-option.mat-multi-line .mat-list-item-content,.mat-nav-list[dense] .mat-list-item.mat-multi-line .mat-list-item-content,.mat-nav-list[dense] .mat-list-option.mat-multi-line .mat-list-item-content,.mat-selection-list[dense] .mat-list-item.mat-multi-line .mat-list-item-content,.mat-selection-list[dense] .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list[dense] .mat-list-item .mat-list-text,.mat-list[dense] .mat-list-option .mat-list-text,.mat-nav-list[dense] .mat-list-item .mat-list-text,.mat-nav-list[dense] .mat-list-option .mat-list-text,.mat-selection-list[dense] .mat-list-item .mat-list-text,.mat-selection-list[dense] .mat-list-option .mat-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden;padding:0}.mat-list[dense] .mat-list-item .mat-list-text>*,.mat-list[dense] .mat-list-option .mat-list-text>*,.mat-nav-list[dense] .mat-list-item .mat-list-text>*,.mat-nav-list[dense] .mat-list-option .mat-list-text>*,.mat-selection-list[dense] .mat-list-item .mat-list-text>*,.mat-selection-list[dense] .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-list[dense] .mat-list-item .mat-list-text:empty,.mat-list[dense] .mat-list-option .mat-list-text:empty,.mat-nav-list[dense] .mat-list-item .mat-list-text:empty,.mat-nav-list[dense] .mat-list-option .mat-list-text:empty,.mat-selection-list[dense] .mat-list-item .mat-list-text:empty,.mat-selection-list[dense] .mat-list-option .mat-list-text:empty{display:none}.mat-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text,.mat-nav-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-nav-list[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-nav-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-nav-list[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text,.mat-selection-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-selection-list[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-selection-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-selection-list[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:0;padding-left:16px}[dir=rtl] .mat-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-nav-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-nav-list[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-nav-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-nav-list[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-selection-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-selection-list[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-selection-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-selection-list[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:0}.mat-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-nav-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-nav-list[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-nav-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-nav-list[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-selection-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-selection-list[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-selection-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-selection-list[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-left:0;padding-right:16px}[dir=rtl] .mat-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-nav-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-nav-list[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-nav-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-nav-list[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-selection-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-selection-list[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-selection-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-selection-list[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:0;padding-left:16px}.mat-list[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-nav-list[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-nav-list[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-nav-list[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-nav-list[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-selection-list[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-selection-list[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-selection-list[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-selection-list[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:16px;padding-left:16px}.mat-list[dense] .mat-list-item .mat-list-avatar,.mat-list[dense] .mat-list-option .mat-list-avatar,.mat-nav-list[dense] .mat-list-item .mat-list-avatar,.mat-nav-list[dense] .mat-list-option .mat-list-avatar,.mat-selection-list[dense] .mat-list-item .mat-list-avatar,.mat-selection-list[dense] .mat-list-option .mat-list-avatar{flex-shrink:0;width:36px;height:36px;border-radius:50%}.mat-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset,.mat-nav-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-nav-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset,.mat-selection-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-selection-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:68px;width:calc(100% - 68px)}[dir=rtl] .mat-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-nav-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-nav-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-selection-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-selection-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:68px}.mat-list[dense] .mat-list-item .mat-list-icon,.mat-list[dense] .mat-list-option .mat-list-icon,.mat-nav-list[dense] .mat-list-item .mat-list-icon,.mat-nav-list[dense] .mat-list-option .mat-list-icon,.mat-selection-list[dense] .mat-list-item .mat-list-icon,.mat-selection-list[dense] .mat-list-option .mat-list-icon{flex-shrink:0;width:20px;height:20px;font-size:20px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset,.mat-nav-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-nav-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset,.mat-selection-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-selection-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:60px;width:calc(100% - 60px)}[dir=rtl] .mat-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-nav-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-nav-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-selection-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-selection-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:60px}.mat-list[dense] .mat-list-item .mat-divider,.mat-list[dense] .mat-list-option .mat-divider,.mat-nav-list[dense] .mat-list-item .mat-divider,.mat-nav-list[dense] .mat-list-option .mat-divider,.mat-selection-list[dense] .mat-list-item .mat-divider,.mat-selection-list[dense] .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list[dense] .mat-list-item .mat-divider,[dir=rtl] .mat-list[dense] .mat-list-option .mat-divider,[dir=rtl] .mat-nav-list[dense] .mat-list-item .mat-divider,[dir=rtl] .mat-nav-list[dense] .mat-list-option .mat-divider,[dir=rtl] .mat-selection-list[dense] .mat-list-item .mat-divider,[dir=rtl] .mat-selection-list[dense] .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list[dense] .mat-list-item .mat-divider.mat-divider-inset,.mat-list[dense] .mat-list-option .mat-divider.mat-divider-inset,.mat-nav-list[dense] .mat-list-item .mat-divider.mat-divider-inset,.mat-nav-list[dense] .mat-list-option .mat-divider.mat-divider-inset,.mat-selection-list[dense] .mat-list-item .mat-divider.mat-divider-inset,.mat-selection-list[dense] .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-nav-list a{text-decoration:none;color:inherit}.mat-nav-list .mat-list-item{cursor:pointer;outline:0}.mat-list-option:not(.mat-list-item-disabled){cursor:pointer;outline:0}@media (hover:none){.mat-list-option:hover,.mat-nav-list .mat-list-item:hover{background:0 0}}"],
95906
                    inputs: ['disableRipple'],
95907
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
95908
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
95909
                },] },
95910
    ];
95911
    return MatNavList;
95912
}(_MatListMixinBase));
95913
var MatList = /** @class */ (function (_super) {
95914
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatList, _super);
95915
    function MatList() {
95916
        return _super !== null && _super.apply(this, arguments) || this;
95917
    }
95918
    MatList.decorators = [
95919
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"], args: [{selector: 'mat-list',
95920
                    exportAs: 'matList',
95921
                    template: "<ng-content></ng-content>",
95922
                    host: { 'class': 'mat-list' },
95923
                    styles: [".mat-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mat-divider.mat-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}.mat-subheader{display:flex;box-sizing:border-box;padding:16px;align-items:center}.mat-list .mat-subheader,.mat-nav-list .mat-subheader,.mat-selection-list .mat-subheader{margin:0}.mat-list,.mat-nav-list,.mat-selection-list{padding-top:8px;display:block;-webkit-tap-highlight-color:transparent}.mat-list .mat-subheader,.mat-nav-list .mat-subheader,.mat-selection-list .mat-subheader{height:48px;line-height:16px}.mat-list .mat-subheader:first-child,.mat-nav-list .mat-subheader:first-child,.mat-selection-list .mat-subheader:first-child{margin-top:-8px}.mat-list .mat-list-item,.mat-list .mat-list-option,.mat-nav-list .mat-list-item,.mat-nav-list .mat-list-option,.mat-selection-list .mat-list-item,.mat-selection-list .mat-list-option{display:block;height:48px;-webkit-tap-highlight-color:transparent}.mat-list .mat-list-item .mat-list-item-content,.mat-list .mat-list-option .mat-list-item-content,.mat-nav-list .mat-list-item .mat-list-item-content,.mat-nav-list .mat-list-option .mat-list-item-content,.mat-selection-list .mat-list-item .mat-list-item-content,.mat-selection-list .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list .mat-list-item .mat-list-item-content-reverse,.mat-list .mat-list-option .mat-list-item-content-reverse,.mat-nav-list .mat-list-item .mat-list-item-content-reverse,.mat-nav-list .mat-list-option .mat-list-item-content-reverse,.mat-selection-list .mat-list-item .mat-list-item-content-reverse,.mat-selection-list .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list .mat-list-item .mat-list-item-ripple,.mat-list .mat-list-option .mat-list-item-ripple,.mat-nav-list .mat-list-item .mat-list-item-ripple,.mat-nav-list .mat-list-option .mat-list-item-ripple,.mat-selection-list .mat-list-item .mat-list-item-ripple,.mat-selection-list .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list .mat-list-item.mat-list-item-with-avatar,.mat-list .mat-list-option.mat-list-item-with-avatar,.mat-nav-list .mat-list-item.mat-list-item-with-avatar,.mat-nav-list .mat-list-option.mat-list-item-with-avatar,.mat-selection-list .mat-list-item.mat-list-item-with-avatar,.mat-selection-list .mat-list-option.mat-list-item-with-avatar{height:56px}.mat-list .mat-list-item.mat-2-line,.mat-list .mat-list-option.mat-2-line,.mat-nav-list .mat-list-item.mat-2-line,.mat-nav-list .mat-list-option.mat-2-line,.mat-selection-list .mat-list-item.mat-2-line,.mat-selection-list .mat-list-option.mat-2-line{height:72px}.mat-list .mat-list-item.mat-3-line,.mat-list .mat-list-option.mat-3-line,.mat-nav-list .mat-list-item.mat-3-line,.mat-nav-list .mat-list-option.mat-3-line,.mat-selection-list .mat-list-item.mat-3-line,.mat-selection-list .mat-list-option.mat-3-line{height:88px}.mat-list .mat-list-item.mat-multi-line,.mat-list .mat-list-option.mat-multi-line,.mat-nav-list .mat-list-item.mat-multi-line,.mat-nav-list .mat-list-option.mat-multi-line,.mat-selection-list .mat-list-item.mat-multi-line,.mat-selection-list .mat-list-option.mat-multi-line{height:auto}.mat-list .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list .mat-list-option.mat-multi-line .mat-list-item-content,.mat-nav-list .mat-list-item.mat-multi-line .mat-list-item-content,.mat-nav-list .mat-list-option.mat-multi-line .mat-list-item-content,.mat-selection-list .mat-list-item.mat-multi-line .mat-list-item-content,.mat-selection-list .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list .mat-list-item .mat-list-text,.mat-list .mat-list-option .mat-list-text,.mat-nav-list .mat-list-item .mat-list-text,.mat-nav-list .mat-list-option .mat-list-text,.mat-selection-list .mat-list-item .mat-list-text,.mat-selection-list .mat-list-option .mat-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden;padding:0}.mat-list .mat-list-item .mat-list-text>*,.mat-list .mat-list-option .mat-list-text>*,.mat-nav-list .mat-list-item .mat-list-text>*,.mat-nav-list .mat-list-option .mat-list-text>*,.mat-selection-list .mat-list-item .mat-list-text>*,.mat-selection-list .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-list .mat-list-item .mat-list-text:empty,.mat-list .mat-list-option .mat-list-text:empty,.mat-nav-list .mat-list-item .mat-list-text:empty,.mat-nav-list .mat-list-option .mat-list-text:empty,.mat-selection-list .mat-list-item .mat-list-text:empty,.mat-selection-list .mat-list-option .mat-list-text:empty{display:none}.mat-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text,.mat-nav-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-nav-list .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-nav-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-nav-list .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text,.mat-selection-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-selection-list .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-selection-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-selection-list .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:0;padding-left:16px}[dir=rtl] .mat-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-nav-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-nav-list .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-nav-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-nav-list .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-selection-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-selection-list .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-selection-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-selection-list .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:0}.mat-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-nav-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-nav-list .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-nav-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-nav-list .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-selection-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-selection-list .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-selection-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-selection-list .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-left:0;padding-right:16px}[dir=rtl] .mat-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-nav-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-nav-list .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-nav-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-nav-list .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-selection-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-selection-list .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-selection-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-selection-list .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:0;padding-left:16px}.mat-list .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-nav-list .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-nav-list .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-nav-list .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-nav-list .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-selection-list .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-selection-list .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-selection-list .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-selection-list .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:16px;padding-left:16px}.mat-list .mat-list-item .mat-list-avatar,.mat-list .mat-list-option .mat-list-avatar,.mat-nav-list .mat-list-item .mat-list-avatar,.mat-nav-list .mat-list-option .mat-list-avatar,.mat-selection-list .mat-list-item .mat-list-avatar,.mat-selection-list .mat-list-option .mat-list-avatar{flex-shrink:0;width:40px;height:40px;border-radius:50%}.mat-list .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list .mat-list-option .mat-list-avatar~.mat-divider-inset,.mat-nav-list .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-nav-list .mat-list-option .mat-list-avatar~.mat-divider-inset,.mat-selection-list .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-selection-list .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:72px;width:calc(100% - 72px)}[dir=rtl] .mat-list .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list .mat-list-option .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-nav-list .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-nav-list .mat-list-option .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-selection-list .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-selection-list .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:72px}.mat-list .mat-list-item .mat-list-icon,.mat-list .mat-list-option .mat-list-icon,.mat-nav-list .mat-list-item .mat-list-icon,.mat-nav-list .mat-list-option .mat-list-icon,.mat-selection-list .mat-list-item .mat-list-icon,.mat-selection-list .mat-list-option .mat-list-icon{flex-shrink:0;width:24px;height:24px;font-size:24px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list .mat-list-option .mat-list-icon~.mat-divider-inset,.mat-nav-list .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-nav-list .mat-list-option .mat-list-icon~.mat-divider-inset,.mat-selection-list .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-selection-list .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:64px;width:calc(100% - 64px)}[dir=rtl] .mat-list .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list .mat-list-option .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-nav-list .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-nav-list .mat-list-option .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-selection-list .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-selection-list .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:64px}.mat-list .mat-list-item .mat-divider,.mat-list .mat-list-option .mat-divider,.mat-nav-list .mat-list-item .mat-divider,.mat-nav-list .mat-list-option .mat-divider,.mat-selection-list .mat-list-item .mat-divider,.mat-selection-list .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list .mat-list-item .mat-divider,[dir=rtl] .mat-list .mat-list-option .mat-divider,[dir=rtl] .mat-nav-list .mat-list-item .mat-divider,[dir=rtl] .mat-nav-list .mat-list-option .mat-divider,[dir=rtl] .mat-selection-list .mat-list-item .mat-divider,[dir=rtl] .mat-selection-list .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list .mat-list-item .mat-divider.mat-divider-inset,.mat-list .mat-list-option .mat-divider.mat-divider-inset,.mat-nav-list .mat-list-item .mat-divider.mat-divider-inset,.mat-nav-list .mat-list-option .mat-divider.mat-divider-inset,.mat-selection-list .mat-list-item .mat-divider.mat-divider-inset,.mat-selection-list .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-list[dense],.mat-nav-list[dense],.mat-selection-list[dense]{padding-top:4px;display:block}.mat-list[dense] .mat-subheader,.mat-nav-list[dense] .mat-subheader,.mat-selection-list[dense] .mat-subheader{height:40px;line-height:8px}.mat-list[dense] .mat-subheader:first-child,.mat-nav-list[dense] .mat-subheader:first-child,.mat-selection-list[dense] .mat-subheader:first-child{margin-top:-4px}.mat-list[dense] .mat-list-item,.mat-list[dense] .mat-list-option,.mat-nav-list[dense] .mat-list-item,.mat-nav-list[dense] .mat-list-option,.mat-selection-list[dense] .mat-list-item,.mat-selection-list[dense] .mat-list-option{display:block;height:40px;-webkit-tap-highlight-color:transparent}.mat-list[dense] .mat-list-item .mat-list-item-content,.mat-list[dense] .mat-list-option .mat-list-item-content,.mat-nav-list[dense] .mat-list-item .mat-list-item-content,.mat-nav-list[dense] .mat-list-option .mat-list-item-content,.mat-selection-list[dense] .mat-list-item .mat-list-item-content,.mat-selection-list[dense] .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list[dense] .mat-list-item .mat-list-item-content-reverse,.mat-list[dense] .mat-list-option .mat-list-item-content-reverse,.mat-nav-list[dense] .mat-list-item .mat-list-item-content-reverse,.mat-nav-list[dense] .mat-list-option .mat-list-item-content-reverse,.mat-selection-list[dense] .mat-list-item .mat-list-item-content-reverse,.mat-selection-list[dense] .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list[dense] .mat-list-item .mat-list-item-ripple,.mat-list[dense] .mat-list-option .mat-list-item-ripple,.mat-nav-list[dense] .mat-list-item .mat-list-item-ripple,.mat-nav-list[dense] .mat-list-option .mat-list-item-ripple,.mat-selection-list[dense] .mat-list-item .mat-list-item-ripple,.mat-selection-list[dense] .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list[dense] .mat-list-item.mat-list-item-with-avatar,.mat-list[dense] .mat-list-option.mat-list-item-with-avatar,.mat-nav-list[dense] .mat-list-item.mat-list-item-with-avatar,.mat-nav-list[dense] .mat-list-option.mat-list-item-with-avatar,.mat-selection-list[dense] .mat-list-item.mat-list-item-with-avatar,.mat-selection-list[dense] .mat-list-option.mat-list-item-with-avatar{height:48px}.mat-list[dense] .mat-list-item.mat-2-line,.mat-list[dense] .mat-list-option.mat-2-line,.mat-nav-list[dense] .mat-list-item.mat-2-line,.mat-nav-list[dense] .mat-list-option.mat-2-line,.mat-selection-list[dense] .mat-list-item.mat-2-line,.mat-selection-list[dense] .mat-list-option.mat-2-line{height:60px}.mat-list[dense] .mat-list-item.mat-3-line,.mat-list[dense] .mat-list-option.mat-3-line,.mat-nav-list[dense] .mat-list-item.mat-3-line,.mat-nav-list[dense] .mat-list-option.mat-3-line,.mat-selection-list[dense] .mat-list-item.mat-3-line,.mat-selection-list[dense] .mat-list-option.mat-3-line{height:76px}.mat-list[dense] .mat-list-item.mat-multi-line,.mat-list[dense] .mat-list-option.mat-multi-line,.mat-nav-list[dense] .mat-list-item.mat-multi-line,.mat-nav-list[dense] .mat-list-option.mat-multi-line,.mat-selection-list[dense] .mat-list-item.mat-multi-line,.mat-selection-list[dense] .mat-list-option.mat-multi-line{height:auto}.mat-list[dense] .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list[dense] .mat-list-option.mat-multi-line .mat-list-item-content,.mat-nav-list[dense] .mat-list-item.mat-multi-line .mat-list-item-content,.mat-nav-list[dense] .mat-list-option.mat-multi-line .mat-list-item-content,.mat-selection-list[dense] .mat-list-item.mat-multi-line .mat-list-item-content,.mat-selection-list[dense] .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list[dense] .mat-list-item .mat-list-text,.mat-list[dense] .mat-list-option .mat-list-text,.mat-nav-list[dense] .mat-list-item .mat-list-text,.mat-nav-list[dense] .mat-list-option .mat-list-text,.mat-selection-list[dense] .mat-list-item .mat-list-text,.mat-selection-list[dense] .mat-list-option .mat-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden;padding:0}.mat-list[dense] .mat-list-item .mat-list-text>*,.mat-list[dense] .mat-list-option .mat-list-text>*,.mat-nav-list[dense] .mat-list-item .mat-list-text>*,.mat-nav-list[dense] .mat-list-option .mat-list-text>*,.mat-selection-list[dense] .mat-list-item .mat-list-text>*,.mat-selection-list[dense] .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-list[dense] .mat-list-item .mat-list-text:empty,.mat-list[dense] .mat-list-option .mat-list-text:empty,.mat-nav-list[dense] .mat-list-item .mat-list-text:empty,.mat-nav-list[dense] .mat-list-option .mat-list-text:empty,.mat-selection-list[dense] .mat-list-item .mat-list-text:empty,.mat-selection-list[dense] .mat-list-option .mat-list-text:empty{display:none}.mat-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text,.mat-nav-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-nav-list[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-nav-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-nav-list[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text,.mat-selection-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-selection-list[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-selection-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-selection-list[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:0;padding-left:16px}[dir=rtl] .mat-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-nav-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-nav-list[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-nav-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-nav-list[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-selection-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-selection-list[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-selection-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-selection-list[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:0}.mat-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-nav-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-nav-list[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-nav-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-nav-list[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-selection-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-selection-list[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-selection-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-selection-list[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-left:0;padding-right:16px}[dir=rtl] .mat-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-nav-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-nav-list[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-nav-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-nav-list[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-selection-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-selection-list[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-selection-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-selection-list[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:0;padding-left:16px}.mat-list[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-nav-list[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-nav-list[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-nav-list[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-nav-list[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-selection-list[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-selection-list[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-selection-list[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-selection-list[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:16px;padding-left:16px}.mat-list[dense] .mat-list-item .mat-list-avatar,.mat-list[dense] .mat-list-option .mat-list-avatar,.mat-nav-list[dense] .mat-list-item .mat-list-avatar,.mat-nav-list[dense] .mat-list-option .mat-list-avatar,.mat-selection-list[dense] .mat-list-item .mat-list-avatar,.mat-selection-list[dense] .mat-list-option .mat-list-avatar{flex-shrink:0;width:36px;height:36px;border-radius:50%}.mat-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset,.mat-nav-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-nav-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset,.mat-selection-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-selection-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:68px;width:calc(100% - 68px)}[dir=rtl] .mat-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-nav-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-nav-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-selection-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-selection-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:68px}.mat-list[dense] .mat-list-item .mat-list-icon,.mat-list[dense] .mat-list-option .mat-list-icon,.mat-nav-list[dense] .mat-list-item .mat-list-icon,.mat-nav-list[dense] .mat-list-option .mat-list-icon,.mat-selection-list[dense] .mat-list-item .mat-list-icon,.mat-selection-list[dense] .mat-list-option .mat-list-icon{flex-shrink:0;width:20px;height:20px;font-size:20px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset,.mat-nav-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-nav-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset,.mat-selection-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-selection-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:60px;width:calc(100% - 60px)}[dir=rtl] .mat-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-nav-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-nav-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-selection-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-selection-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:60px}.mat-list[dense] .mat-list-item .mat-divider,.mat-list[dense] .mat-list-option .mat-divider,.mat-nav-list[dense] .mat-list-item .mat-divider,.mat-nav-list[dense] .mat-list-option .mat-divider,.mat-selection-list[dense] .mat-list-item .mat-divider,.mat-selection-list[dense] .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list[dense] .mat-list-item .mat-divider,[dir=rtl] .mat-list[dense] .mat-list-option .mat-divider,[dir=rtl] .mat-nav-list[dense] .mat-list-item .mat-divider,[dir=rtl] .mat-nav-list[dense] .mat-list-option .mat-divider,[dir=rtl] .mat-selection-list[dense] .mat-list-item .mat-divider,[dir=rtl] .mat-selection-list[dense] .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list[dense] .mat-list-item .mat-divider.mat-divider-inset,.mat-list[dense] .mat-list-option .mat-divider.mat-divider-inset,.mat-nav-list[dense] .mat-list-item .mat-divider.mat-divider-inset,.mat-nav-list[dense] .mat-list-option .mat-divider.mat-divider-inset,.mat-selection-list[dense] .mat-list-item .mat-divider.mat-divider-inset,.mat-selection-list[dense] .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-nav-list a{text-decoration:none;color:inherit}.mat-nav-list .mat-list-item{cursor:pointer;outline:0}.mat-list-option:not(.mat-list-item-disabled){cursor:pointer;outline:0}@media (hover:none){.mat-list-option:hover,.mat-nav-list .mat-list-item:hover{background:0 0}}"],
95924
                    inputs: ['disableRipple'],
95925
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
95926
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
95927
                },] },
95928
    ];
95929
    return MatList;
95930
}(_MatListMixinBase));
95931
/**
95932
 * Directive whose purpose is to add the mat- CSS styling to this selector.
95933
 * \@docs-private
95934
 */
95935
var MatListAvatarCssMatStyler = /** @class */ (function () {
95936
    function MatListAvatarCssMatStyler() {
95937
    }
95938
    MatListAvatarCssMatStyler.decorators = [
95939
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
95940
                    selector: '[mat-list-avatar], [matListAvatar]',
95941
                    host: { 'class': 'mat-list-avatar' }
95942
                },] },
95943
    ];
95944
    return MatListAvatarCssMatStyler;
95945
}());
95946
/**
95947
 * Directive whose purpose is to add the mat- CSS styling to this selector.
95948
 * \@docs-private
95949
 */
95950
var MatListIconCssMatStyler = /** @class */ (function () {
95951
    function MatListIconCssMatStyler() {
95952
    }
95953
    MatListIconCssMatStyler.decorators = [
95954
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
95955
                    selector: '[mat-list-icon], [matListIcon]',
95956
                    host: { 'class': 'mat-list-icon' }
95957
                },] },
95958
    ];
95959
    return MatListIconCssMatStyler;
95960
}());
95961
/**
95962
 * Directive whose purpose is to add the mat- CSS styling to this selector.
95963
 * \@docs-private
95964
 */
95965
var MatListSubheaderCssMatStyler = /** @class */ (function () {
95966
    function MatListSubheaderCssMatStyler() {
95967
    }
95968
    MatListSubheaderCssMatStyler.decorators = [
95969
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
95970
                    selector: '[mat-subheader], [matSubheader]',
95971
                    host: { 'class': 'mat-subheader' }
95972
                },] },
95973
    ];
95974
    return MatListSubheaderCssMatStyler;
95975
}());
95976
/**
95977
 * An item within a Material Design list.
95978
 */
95979
var MatListItem = /** @class */ (function (_super) {
95980
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatListItem, _super);
95981
    function MatListItem(_element, _navList) {
95982
        var _this = _super.call(this) || this;
95983
        _this._element = _element;
95984
        _this._navList = _navList;
95985
        _this._isNavList = false;
95986
        _this._isNavList = !!_navList;
95987
        return _this;
95988
    }
95989
    /**
95990
     * @return {?}
95991
     */
95992
    MatListItem.prototype.ngAfterContentInit = /**
95993
     * @return {?}
95994
     */
95995
    function () {
95996
        // TODO: consider turning the setter into a function, it doesn't do anything as a class.
95997
        // tslint:disable-next-line:no-unused-expression
95998
        new _angular_material_core__WEBPACK_IMPORTED_MODULE_2__["MatLineSetter"](this._lines, this._element);
95999
    };
96000
    /** Whether this list item should show a ripple effect when clicked. */
96001
    /**
96002
     * Whether this list item should show a ripple effect when clicked.
96003
     * @return {?}
96004
     */
96005
    MatListItem.prototype._isRippleDisabled = /**
96006
     * Whether this list item should show a ripple effect when clicked.
96007
     * @return {?}
96008
     */
96009
    function () {
96010
        return !this._isNavList || this.disableRipple || this._navList.disableRipple;
96011
    };
96012
    /**
96013
     * @return {?}
96014
     */
96015
    MatListItem.prototype._handleFocus = /**
96016
     * @return {?}
96017
     */
96018
    function () {
96019
        this._element.nativeElement.classList.add('mat-list-item-focus');
96020
    };
96021
    /**
96022
     * @return {?}
96023
     */
96024
    MatListItem.prototype._handleBlur = /**
96025
     * @return {?}
96026
     */
96027
    function () {
96028
        this._element.nativeElement.classList.remove('mat-list-item-focus');
96029
    };
96030
    /** Retrieves the DOM element of the component host. */
96031
    /**
96032
     * Retrieves the DOM element of the component host.
96033
     * @return {?}
96034
     */
96035
    MatListItem.prototype._getHostElement = /**
96036
     * Retrieves the DOM element of the component host.
96037
     * @return {?}
96038
     */
96039
    function () {
96040
        return this._element.nativeElement;
96041
    };
96042
    MatListItem.decorators = [
96043
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"], args: [{selector: 'mat-list-item, a[mat-list-item]',
96044
                    exportAs: 'matListItem',
96045
                    host: {
96046
                        'class': 'mat-list-item',
96047
                        // @breaking-change 7.0.0 Remove `mat-list-item-avatar` in favor of `mat-list-item-with-avatar`.
96048
                        '[class.mat-list-item-avatar]': '_avatar || _icon',
96049
                        '[class.mat-list-item-with-avatar]': '_avatar || _icon',
96050
                        '(focus)': '_handleFocus()',
96051
                        '(blur)': '_handleBlur()',
96052
                    },
96053
                    inputs: ['disableRipple'],
96054
                    template: "<div class=\"mat-list-item-content\"><div class=\"mat-list-item-ripple\" mat-ripple [matRippleTrigger]=\"_getHostElement()\" [matRippleDisabled]=\"_isRippleDisabled()\"></div><ng-content select=\"[mat-list-avatar], [mat-list-icon], [matListAvatar], [matListIcon]\"></ng-content><div class=\"mat-list-text\"><ng-content select=\"[mat-line], [matLine]\"></ng-content></div><ng-content></ng-content></div>",
96055
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
96056
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
96057
                },] },
96058
    ];
96059
    /** @nocollapse */
96060
    MatListItem.ctorParameters = function () { return [
96061
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
96062
        { type: MatNavList, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] },] },
96063
    ]; };
96064
    MatListItem.propDecorators = {
96065
        "_lines": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChildren"], args: [_angular_material_core__WEBPACK_IMPORTED_MODULE_2__["MatLine"],] },],
96066
        "_avatar": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChild"], args: [MatListAvatarCssMatStyler,] },],
96067
        "_icon": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChild"], args: [MatListIconCssMatStyler,] },],
96068
    };
96069
    return MatListItem;
96070
}(_MatListItemMixinBase));
96071
 
96072
/**
96073
 * @fileoverview added by tsickle
96074
 * @suppress {checkTypes} checked by tsc
96075
 */
96076
/**
96077
 * \@docs-private
96078
 */
96079
var  /**
96080
 * \@docs-private
96081
 */
96082
MatSelectionListBase = /** @class */ (function () {
96083
    function MatSelectionListBase() {
96084
    }
96085
    return MatSelectionListBase;
96086
}());
96087
var /** @type {?} */ _MatSelectionListMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_2__["mixinDisableRipple"])(MatSelectionListBase);
96088
/**
96089
 * \@docs-private
96090
 */
96091
var  /**
96092
 * \@docs-private
96093
 */
96094
MatListOptionBase = /** @class */ (function () {
96095
    function MatListOptionBase() {
96096
    }
96097
    return MatListOptionBase;
96098
}());
96099
var /** @type {?} */ _MatListOptionMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_2__["mixinDisableRipple"])(MatListOptionBase);
96100
/**
96101
 * \@docs-private
96102
 */
96103
var /** @type {?} */ MAT_SELECTION_LIST_VALUE_ACCESSOR = {
96104
    provide: _angular_forms__WEBPACK_IMPORTED_MODULE_7__["NG_VALUE_ACCESSOR"],
96105
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(function () { return MatSelectionList; }),
96106
    multi: true
96107
};
96108
/**
96109
 * Change event that is being fired whenever the selected state of an option changes.
96110
 */
96111
var  /**
96112
 * Change event that is being fired whenever the selected state of an option changes.
96113
 */
96114
MatSelectionListChange = /** @class */ (function () {
96115
    function MatSelectionListChange(source, option) {
96116
        this.source = source;
96117
        this.option = option;
96118
    }
96119
    return MatSelectionListChange;
96120
}());
96121
/**
96122
 * Component for list-options of selection-list. Each list-option can automatically
96123
 * generate a checkbox and can put current item into the selectionModel of selection-list
96124
 * if the current item is selected.
96125
 */
96126
var MatListOption = /** @class */ (function (_super) {
96127
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatListOption, _super);
96128
    function MatListOption(_element, _changeDetector, /** @docs-private */
96129
    selectionList) {
96130
        var _this = _super.call(this) || this;
96131
        _this._element = _element;
96132
        _this._changeDetector = _changeDetector;
96133
        _this.selectionList = selectionList;
96134
        _this._selected = false;
96135
        _this._disabled = false;
96136
        /**
96137
         * Whether the option has focus.
96138
         */
96139
        _this._hasFocus = false;
96140
        /**
96141
         * Whether the label should appear before or after the checkbox. Defaults to 'after'
96142
         */
96143
        _this.checkboxPosition = 'after';
96144
        return _this;
96145
    }
96146
    Object.defineProperty(MatListOption.prototype, "disabled", {
96147
        get: /**
96148
         * Whether the option is disabled.
96149
         * @return {?}
96150
         */
96151
        function () { return this._disabled || (this.selectionList && this.selectionList.disabled); },
96152
        set: /**
96153
         * @param {?} value
96154
         * @return {?}
96155
         */
96156
        function (value) {
96157
            var /** @type {?} */ newValue = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_4__["coerceBooleanProperty"])(value);
96158
            if (newValue !== this._disabled) {
96159
                this._disabled = newValue;
96160
                this._changeDetector.markForCheck();
96161
            }
96162
        },
96163
        enumerable: true,
96164
        configurable: true
96165
    });
96166
    Object.defineProperty(MatListOption.prototype, "selected", {
96167
        get: /**
96168
         * Whether the option is selected.
96169
         * @return {?}
96170
         */
96171
        function () { return this.selectionList.selectedOptions.isSelected(this); },
96172
        set: /**
96173
         * @param {?} value
96174
         * @return {?}
96175
         */
96176
        function (value) {
96177
            var /** @type {?} */ isSelected = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_4__["coerceBooleanProperty"])(value);
96178
            if (isSelected !== this._selected) {
96179
                this._setSelected(isSelected);
96180
                this.selectionList._reportValueChange();
96181
            }
96182
        },
96183
        enumerable: true,
96184
        configurable: true
96185
    });
96186
    /**
96187
     * @return {?}
96188
     */
96189
    MatListOption.prototype.ngOnInit = /**
96190
     * @return {?}
96191
     */
96192
    function () {
96193
        var _this = this;
96194
        // List options that are selected at initialization can't be reported properly to the form
96195
        // control. This is because it takes some time until the selection-list knows about all
96196
        // available options. Also it can happen that the ControlValueAccessor has an initial value
96197
        // that should be used instead. Deferring the value change report to the next tick ensures
96198
        // that the form control value is not being overwritten.
96199
        var /** @type {?} */ wasSelected = this._selected;
96200
        Promise.resolve().then(function () {
96201
            if (_this._selected || wasSelected) {
96202
                _this.selected = true;
96203
                _this._changeDetector.markForCheck();
96204
            }
96205
        });
96206
    };
96207
    /**
96208
     * @return {?}
96209
     */
96210
    MatListOption.prototype.ngAfterContentInit = /**
96211
     * @return {?}
96212
     */
96213
    function () {
96214
        // TODO: consider turning the setter into a function, it doesn't do anything as a class.
96215
        // tslint:disable-next-line:no-unused-expression
96216
        new _angular_material_core__WEBPACK_IMPORTED_MODULE_2__["MatLineSetter"](this._lines, this._element);
96217
    };
96218
    /**
96219
     * @return {?}
96220
     */
96221
    MatListOption.prototype.ngOnDestroy = /**
96222
     * @return {?}
96223
     */
96224
    function () {
96225
        var _this = this;
96226
        if (this.selected) {
96227
            // We have to delay this until the next tick in order
96228
            // to avoid changed after checked errors.
96229
            Promise.resolve().then(function () { return _this.selected = false; });
96230
        }
96231
        this.selectionList._removeOptionFromList(this);
96232
    };
96233
    /** Toggles the selection state of the option. */
96234
    /**
96235
     * Toggles the selection state of the option.
96236
     * @return {?}
96237
     */
96238
    MatListOption.prototype.toggle = /**
96239
     * Toggles the selection state of the option.
96240
     * @return {?}
96241
     */
96242
    function () {
96243
        this.selected = !this.selected;
96244
    };
96245
    /** Allows for programmatic focusing of the option. */
96246
    /**
96247
     * Allows for programmatic focusing of the option.
96248
     * @return {?}
96249
     */
96250
    MatListOption.prototype.focus = /**
96251
     * Allows for programmatic focusing of the option.
96252
     * @return {?}
96253
     */
96254
    function () {
96255
        this._element.nativeElement.focus();
96256
    };
96257
    /**
96258
     * Returns the list item's text label. Implemented as a part of the FocusKeyManager.
96259
     * @docs-private
96260
     */
96261
    /**
96262
     * Returns the list item's text label. Implemented as a part of the FocusKeyManager.
96263
     * \@docs-private
96264
     * @return {?}
96265
     */
96266
    MatListOption.prototype.getLabel = /**
96267
     * Returns the list item's text label. Implemented as a part of the FocusKeyManager.
96268
     * \@docs-private
96269
     * @return {?}
96270
     */
96271
    function () {
96272
        return this._text ? this._text.nativeElement.textContent : '';
96273
    };
96274
    /** Whether this list item should show a ripple effect when clicked. */
96275
    /**
96276
     * Whether this list item should show a ripple effect when clicked.
96277
     * @return {?}
96278
     */
96279
    MatListOption.prototype._isRippleDisabled = /**
96280
     * Whether this list item should show a ripple effect when clicked.
96281
     * @return {?}
96282
     */
96283
    function () {
96284
        return this.disabled || this.disableRipple || this.selectionList.disableRipple;
96285
    };
96286
    /**
96287
     * @return {?}
96288
     */
96289
    MatListOption.prototype._handleClick = /**
96290
     * @return {?}
96291
     */
96292
    function () {
96293
        if (!this.disabled) {
96294
            this.toggle();
96295
            // Emit a change event if the selected state of the option changed through user interaction.
96296
            this.selectionList._emitChangeEvent(this);
96297
        }
96298
    };
96299
    /**
96300
     * @return {?}
96301
     */
96302
    MatListOption.prototype._handleFocus = /**
96303
     * @return {?}
96304
     */
96305
    function () {
96306
        this._hasFocus = true;
96307
        this.selectionList._setFocusedOption(this);
96308
    };
96309
    /**
96310
     * @return {?}
96311
     */
96312
    MatListOption.prototype._handleBlur = /**
96313
     * @return {?}
96314
     */
96315
    function () {
96316
        this._hasFocus = false;
96317
        this.selectionList._onTouched();
96318
    };
96319
    /** Retrieves the DOM element of the component host. */
96320
    /**
96321
     * Retrieves the DOM element of the component host.
96322
     * @return {?}
96323
     */
96324
    MatListOption.prototype._getHostElement = /**
96325
     * Retrieves the DOM element of the component host.
96326
     * @return {?}
96327
     */
96328
    function () {
96329
        return this._element.nativeElement;
96330
    };
96331
    /** Sets the selected state of the option. Returns whether the value has changed. */
96332
    /**
96333
     * Sets the selected state of the option. Returns whether the value has changed.
96334
     * @param {?} selected
96335
     * @return {?}
96336
     */
96337
    MatListOption.prototype._setSelected = /**
96338
     * Sets the selected state of the option. Returns whether the value has changed.
96339
     * @param {?} selected
96340
     * @return {?}
96341
     */
96342
    function (selected) {
96343
        if (selected === this._selected) {
96344
            return false;
96345
        }
96346
        this._selected = selected;
96347
        if (selected) {
96348
            this.selectionList.selectedOptions.select(this);
96349
        }
96350
        else {
96351
            this.selectionList.selectedOptions.deselect(this);
96352
        }
96353
        this._changeDetector.markForCheck();
96354
        return true;
96355
    };
96356
    /**
96357
     * Notifies Angular that the option needs to be checked in the next change detection run. Mainly
96358
     * used to trigger an update of the list option if the disabled state of the selection list
96359
     * changed.
96360
     */
96361
    /**
96362
     * Notifies Angular that the option needs to be checked in the next change detection run. Mainly
96363
     * used to trigger an update of the list option if the disabled state of the selection list
96364
     * changed.
96365
     * @return {?}
96366
     */
96367
    MatListOption.prototype._markForCheck = /**
96368
     * Notifies Angular that the option needs to be checked in the next change detection run. Mainly
96369
     * used to trigger an update of the list option if the disabled state of the selection list
96370
     * changed.
96371
     * @return {?}
96372
     */
96373
    function () {
96374
        this._changeDetector.markForCheck();
96375
    };
96376
    MatListOption.decorators = [
96377
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"], args: [{selector: 'mat-list-option',
96378
                    exportAs: 'matListOption',
96379
                    inputs: ['disableRipple'],
96380
                    host: {
96381
                        'role': 'option',
96382
                        'class': 'mat-list-item mat-list-option',
96383
                        '(focus)': '_handleFocus()',
96384
                        '(blur)': '_handleBlur()',
96385
                        '(click)': '_handleClick()',
96386
                        'tabindex': '-1',
96387
                        '[class.mat-list-item-disabled]': 'disabled',
96388
                        '[class.mat-list-item-focus]': '_hasFocus',
96389
                        '[class.mat-list-item-with-avatar]': '_avatar',
96390
                        '[attr.aria-selected]': 'selected.toString()',
96391
                        '[attr.aria-disabled]': 'disabled.toString()',
96392
                    },
96393
                    template: "<div class=\"mat-list-item-content\" [class.mat-list-item-content-reverse]=\"checkboxPosition == 'after'\"><div mat-ripple class=\"mat-list-item-ripple\" [matRippleTrigger]=\"_getHostElement()\" [matRippleDisabled]=\"_isRippleDisabled()\"></div><mat-pseudo-checkbox [state]=\"selected ? 'checked' : 'unchecked'\" [disabled]=\"disabled\"></mat-pseudo-checkbox><div class=\"mat-list-text\" #text><ng-content></ng-content></div><ng-content select=\"[mat-list-avatar], [mat-list-icon], [matListAvatar], [matListIcon]\"></ng-content></div>",
96394
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
96395
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
96396
                },] },
96397
    ];
96398
    /** @nocollapse */
96399
    MatListOption.ctorParameters = function () { return [
96400
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
96401
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"], },
96402
        { type: MatSelectionList, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(function () { return MatSelectionList; }),] },] },
96403
    ]; };
96404
    MatListOption.propDecorators = {
96405
        "_avatar": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChild"], args: [MatListAvatarCssMatStyler,] },],
96406
        "_lines": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChildren"], args: [_angular_material_core__WEBPACK_IMPORTED_MODULE_2__["MatLine"],] },],
96407
        "_text": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"], args: ['text',] },],
96408
        "checkboxPosition": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
96409
        "value": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
96410
        "disabled": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
96411
        "selected": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
96412
    };
96413
    return MatListOption;
96414
}(_MatListOptionMixinBase));
96415
/**
96416
 * Material Design list component where each item is a selectable option. Behaves as a listbox.
96417
 */
96418
var MatSelectionList = /** @class */ (function (_super) {
96419
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatSelectionList, _super);
96420
    function MatSelectionList(_element, tabIndex) {
96421
        var _this = _super.call(this) || this;
96422
        _this._element = _element;
96423
        /**
96424
         * Emits a change event whenever the selected state of an option changes.
96425
         */
96426
        _this.selectionChange = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
96427
        /**
96428
         * Tabindex of the selection list.
96429
         */
96430
        _this.tabIndex = 0;
96431
        _this._disabled = false;
96432
        /**
96433
         * The currently selected options.
96434
         */
96435
        _this.selectedOptions = new _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_5__["SelectionModel"](true);
96436
        /**
96437
         * View to model callback that should be called whenever the selected options change.
96438
         */
96439
        _this._onChange = function (_) { };
96440
        /**
96441
         * Subscription to sync value changes in the SelectionModel back to the SelectionList.
96442
         */
96443
        _this._modelChanges = rxjs__WEBPACK_IMPORTED_MODULE_8__["Subscription"].EMPTY;
96444
        /**
96445
         * View to model callback that should be called if the list or its options lost focus.
96446
         */
96447
        _this._onTouched = function () { };
96448
        _this.tabIndex = parseInt(tabIndex) || 0;
96449
        return _this;
96450
    }
96451
    Object.defineProperty(MatSelectionList.prototype, "disabled", {
96452
        get: /**
96453
         * Whether the selection list is disabled.
96454
         * @return {?}
96455
         */
96456
        function () { return this._disabled; },
96457
        set: /**
96458
         * @param {?} value
96459
         * @return {?}
96460
         */
96461
        function (value) {
96462
            this._disabled = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_4__["coerceBooleanProperty"])(value);
96463
            // The `MatSelectionList` and `MatListOption` are using the `OnPush` change detection
96464
            // strategy. Therefore the options will not check for any changes if the `MatSelectionList`
96465
            // changed its state. Since we know that a change to `disabled` property of the list affects
96466
            // the state of the options, we manually mark each option for check.
96467
            if (this.options) {
96468
                this.options.forEach(function (option) { return option._markForCheck(); });
96469
            }
96470
        },
96471
        enumerable: true,
96472
        configurable: true
96473
    });
96474
    /**
96475
     * @return {?}
96476
     */
96477
    MatSelectionList.prototype.ngAfterContentInit = /**
96478
     * @return {?}
96479
     */
96480
    function () {
96481
        this._keyManager = new _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_3__["FocusKeyManager"](this.options)
96482
            .withWrap()
96483
            .withTypeAhead()
96484
            .skipPredicate(function () { return false; });
96485
        if (this._tempValues) {
96486
            this._setOptionsFromValues(this._tempValues);
96487
            this._tempValues = null;
96488
        }
96489
        // Sync external changes to the model back to the options.
96490
        this._modelChanges = /** @type {?} */ ((this.selectedOptions.onChange)).subscribe(function (event) {
96491
            if (event.added) {
96492
                for (var _i = 0, _a = event.added; _i < _a.length; _i++) {
96493
                    var item = _a[_i];
96494
                    item.selected = true;
96495
                }
96496
            }
96497
            if (event.removed) {
96498
                for (var _b = 0, _c = event.removed; _b < _c.length; _b++) {
96499
                    var item = _c[_b];
96500
                    item.selected = false;
96501
                }
96502
            }
96503
        });
96504
    };
96505
    /**
96506
     * @return {?}
96507
     */
96508
    MatSelectionList.prototype.ngOnDestroy = /**
96509
     * @return {?}
96510
     */
96511
    function () {
96512
        this._modelChanges.unsubscribe();
96513
    };
96514
    /** Focuses the last active list option. */
96515
    /**
96516
     * Focuses the last active list option.
96517
     * @return {?}
96518
     */
96519
    MatSelectionList.prototype.focus = /**
96520
     * Focuses the last active list option.
96521
     * @return {?}
96522
     */
96523
    function () {
96524
        this._element.nativeElement.focus();
96525
    };
96526
    /** Selects all of the options. */
96527
    /**
96528
     * Selects all of the options.
96529
     * @return {?}
96530
     */
96531
    MatSelectionList.prototype.selectAll = /**
96532
     * Selects all of the options.
96533
     * @return {?}
96534
     */
96535
    function () {
96536
        this._setAllOptionsSelected(true);
96537
    };
96538
    /** Deselects all of the options. */
96539
    /**
96540
     * Deselects all of the options.
96541
     * @return {?}
96542
     */
96543
    MatSelectionList.prototype.deselectAll = /**
96544
     * Deselects all of the options.
96545
     * @return {?}
96546
     */
96547
    function () {
96548
        this._setAllOptionsSelected(false);
96549
    };
96550
    /** Sets the focused option of the selection-list. */
96551
    /**
96552
     * Sets the focused option of the selection-list.
96553
     * @param {?} option
96554
     * @return {?}
96555
     */
96556
    MatSelectionList.prototype._setFocusedOption = /**
96557
     * Sets the focused option of the selection-list.
96558
     * @param {?} option
96559
     * @return {?}
96560
     */
96561
    function (option) {
96562
        this._keyManager.updateActiveItemIndex(this._getOptionIndex(option));
96563
    };
96564
    /** Removes an option from the selection list and updates the active item. */
96565
    /**
96566
     * Removes an option from the selection list and updates the active item.
96567
     * @param {?} option
96568
     * @return {?}
96569
     */
96570
    MatSelectionList.prototype._removeOptionFromList = /**
96571
     * Removes an option from the selection list and updates the active item.
96572
     * @param {?} option
96573
     * @return {?}
96574
     */
96575
    function (option) {
96576
        if (option._hasFocus) {
96577
            var /** @type {?} */ optionIndex = this._getOptionIndex(option);
96578
            // Check whether the option is the last item
96579
            if (optionIndex > 0) {
96580
                this._keyManager.setPreviousItemActive();
96581
            }
96582
            else if (optionIndex === 0 && this.options.length > 1) {
96583
                this._keyManager.setNextItemActive();
96584
            }
96585
        }
96586
    };
96587
    /** Passes relevant key presses to our key manager. */
96588
    /**
96589
     * Passes relevant key presses to our key manager.
96590
     * @param {?} event
96591
     * @return {?}
96592
     */
96593
    MatSelectionList.prototype._keydown = /**
96594
     * Passes relevant key presses to our key manager.
96595
     * @param {?} event
96596
     * @return {?}
96597
     */
96598
    function (event) {
96599
        var /** @type {?} */ keyCode = event.keyCode;
96600
        var /** @type {?} */ manager = this._keyManager;
96601
        var /** @type {?} */ previousFocusIndex = manager.activeItemIndex;
96602
        switch (keyCode) {
96603
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["SPACE"]:
96604
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["ENTER"]:
96605
                if (!this.disabled) {
96606
                    this._toggleSelectOnFocusedOption();
96607
                    // Always prevent space from scrolling the page since the list has focus
96608
                    event.preventDefault();
96609
                }
96610
                break;
96611
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["HOME"]:
96612
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["END"]:
96613
                keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["HOME"] ? manager.setFirstItemActive() : manager.setLastItemActive();
96614
                event.preventDefault();
96615
                break;
96616
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["A"]:
96617
                if (event.ctrlKey) {
96618
                    this.options.find(function (option) { return !option.selected; }) ? this.selectAll() : this.deselectAll();
96619
                    event.preventDefault();
96620
                }
96621
                break;
96622
            default:
96623
                manager.onKeydown(event);
96624
        }
96625
        if ((keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["UP_ARROW"] || keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["DOWN_ARROW"]) && event.shiftKey &&
96626
            manager.activeItemIndex !== previousFocusIndex) {
96627
            this._toggleSelectOnFocusedOption();
96628
        }
96629
    };
96630
    /** Reports a value change to the ControlValueAccessor */
96631
    /**
96632
     * Reports a value change to the ControlValueAccessor
96633
     * @return {?}
96634
     */
96635
    MatSelectionList.prototype._reportValueChange = /**
96636
     * Reports a value change to the ControlValueAccessor
96637
     * @return {?}
96638
     */
96639
    function () {
96640
        if (this.options) {
96641
            this._onChange(this._getSelectedOptionValues());
96642
        }
96643
    };
96644
    /** Emits a change event if the selected state of an option changed. */
96645
    /**
96646
     * Emits a change event if the selected state of an option changed.
96647
     * @param {?} option
96648
     * @return {?}
96649
     */
96650
    MatSelectionList.prototype._emitChangeEvent = /**
96651
     * Emits a change event if the selected state of an option changed.
96652
     * @param {?} option
96653
     * @return {?}
96654
     */
96655
    function (option) {
96656
        this.selectionChange.emit(new MatSelectionListChange(this, option));
96657
    };
96658
    /** Implemented as part of ControlValueAccessor. */
96659
    /**
96660
     * Implemented as part of ControlValueAccessor.
96661
     * @param {?} values
96662
     * @return {?}
96663
     */
96664
    MatSelectionList.prototype.writeValue = /**
96665
     * Implemented as part of ControlValueAccessor.
96666
     * @param {?} values
96667
     * @return {?}
96668
     */
96669
    function (values) {
96670
        if (this.options) {
96671
            this._setOptionsFromValues(values || []);
96672
        }
96673
        else {
96674
            this._tempValues = values;
96675
        }
96676
    };
96677
    /** Implemented as a part of ControlValueAccessor. */
96678
    /**
96679
     * Implemented as a part of ControlValueAccessor.
96680
     * @param {?} isDisabled
96681
     * @return {?}
96682
     */
96683
    MatSelectionList.prototype.setDisabledState = /**
96684
     * Implemented as a part of ControlValueAccessor.
96685
     * @param {?} isDisabled
96686
     * @return {?}
96687
     */
96688
    function (isDisabled) {
96689
        this.disabled = isDisabled;
96690
    };
96691
    /** Implemented as part of ControlValueAccessor. */
96692
    /**
96693
     * Implemented as part of ControlValueAccessor.
96694
     * @param {?} fn
96695
     * @return {?}
96696
     */
96697
    MatSelectionList.prototype.registerOnChange = /**
96698
     * Implemented as part of ControlValueAccessor.
96699
     * @param {?} fn
96700
     * @return {?}
96701
     */
96702
    function (fn) {
96703
        this._onChange = fn;
96704
    };
96705
    /** Implemented as part of ControlValueAccessor. */
96706
    /**
96707
     * Implemented as part of ControlValueAccessor.
96708
     * @param {?} fn
96709
     * @return {?}
96710
     */
96711
    MatSelectionList.prototype.registerOnTouched = /**
96712
     * Implemented as part of ControlValueAccessor.
96713
     * @param {?} fn
96714
     * @return {?}
96715
     */
96716
    function (fn) {
96717
        this._onTouched = fn;
96718
    };
96719
    /**
96720
     * Sets the selected options based on the specified values.
96721
     * @param {?} values
96722
     * @return {?}
96723
     */
96724
    MatSelectionList.prototype._setOptionsFromValues = /**
96725
     * Sets the selected options based on the specified values.
96726
     * @param {?} values
96727
     * @return {?}
96728
     */
96729
    function (values) {
96730
        var _this = this;
96731
        this.options.forEach(function (option) { return option._setSelected(false); });
96732
        values
96733
            .map(function (value) {
96734
            return _this.options.find(function (option) {
96735
                return _this.compareWith ? _this.compareWith(option.value, value) : option.value === value;
96736
            });
96737
        })
96738
            .filter(Boolean)
96739
            .forEach(function (option) { return ((option))._setSelected(true); });
96740
    };
96741
    /**
96742
     * Returns the values of the selected options.
96743
     * @return {?}
96744
     */
96745
    MatSelectionList.prototype._getSelectedOptionValues = /**
96746
     * Returns the values of the selected options.
96747
     * @return {?}
96748
     */
96749
    function () {
96750
        return this.options.filter(function (option) { return option.selected; }).map(function (option) { return option.value; });
96751
    };
96752
    /**
96753
     * Toggles the selected state of the currently focused option.
96754
     * @return {?}
96755
     */
96756
    MatSelectionList.prototype._toggleSelectOnFocusedOption = /**
96757
     * Toggles the selected state of the currently focused option.
96758
     * @return {?}
96759
     */
96760
    function () {
96761
        var /** @type {?} */ focusedIndex = this._keyManager.activeItemIndex;
96762
        if (focusedIndex != null && this._isValidIndex(focusedIndex)) {
96763
            var /** @type {?} */ focusedOption = this.options.toArray()[focusedIndex];
96764
            if (focusedOption) {
96765
                focusedOption.toggle();
96766
                // Emit a change event because the focused option changed its state through user
96767
                // interaction.
96768
                this._emitChangeEvent(focusedOption);
96769
            }
96770
        }
96771
    };
96772
    /**
96773
     * Sets the selected state on all of the options
96774
     * and emits an event if anything changed.
96775
     * @param {?} isSelected
96776
     * @return {?}
96777
     */
96778
    MatSelectionList.prototype._setAllOptionsSelected = /**
96779
     * Sets the selected state on all of the options
96780
     * and emits an event if anything changed.
96781
     * @param {?} isSelected
96782
     * @return {?}
96783
     */
96784
    function (isSelected) {
96785
        // Keep track of whether anything changed, because we only want to
96786
        // emit the changed event when something actually changed.
96787
        var /** @type {?} */ hasChanged = false;
96788
        this.options.forEach(function (option) {
96789
            if (option._setSelected(isSelected)) {
96790
                hasChanged = true;
96791
            }
96792
        });
96793
        if (hasChanged) {
96794
            this._reportValueChange();
96795
        }
96796
    };
96797
    /**
96798
     * Utility to ensure all indexes are valid.
96799
     * @param {?} index The index to be checked.
96800
     * @return {?} True if the index is valid for our list of options.
96801
     */
96802
    MatSelectionList.prototype._isValidIndex = /**
96803
     * Utility to ensure all indexes are valid.
96804
     * @param {?} index The index to be checked.
96805
     * @return {?} True if the index is valid for our list of options.
96806
     */
96807
    function (index) {
96808
        return index >= 0 && index < this.options.length;
96809
    };
96810
    /**
96811
     * Returns the index of the specified list option.
96812
     * @param {?} option
96813
     * @return {?}
96814
     */
96815
    MatSelectionList.prototype._getOptionIndex = /**
96816
     * Returns the index of the specified list option.
96817
     * @param {?} option
96818
     * @return {?}
96819
     */
96820
    function (option) {
96821
        return this.options.toArray().indexOf(option);
96822
    };
96823
    MatSelectionList.decorators = [
96824
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"], args: [{selector: 'mat-selection-list',
96825
                    exportAs: 'matSelectionList',
96826
                    inputs: ['disabled', 'disableRipple', 'tabIndex'],
96827
                    host: {
96828
                        'role': 'listbox',
96829
                        '[tabIndex]': 'tabIndex',
96830
                        'class': 'mat-selection-list',
96831
                        '(focus)': 'focus()',
96832
                        '(blur)': '_onTouched()',
96833
                        '(keydown)': '_keydown($event)',
96834
                        '[attr.aria-disabled]': 'disabled.toString()',
96835
                    },
96836
                    template: '<ng-content></ng-content>',
96837
                    styles: [".mat-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mat-divider.mat-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}.mat-subheader{display:flex;box-sizing:border-box;padding:16px;align-items:center}.mat-list .mat-subheader,.mat-nav-list .mat-subheader,.mat-selection-list .mat-subheader{margin:0}.mat-list,.mat-nav-list,.mat-selection-list{padding-top:8px;display:block;-webkit-tap-highlight-color:transparent}.mat-list .mat-subheader,.mat-nav-list .mat-subheader,.mat-selection-list .mat-subheader{height:48px;line-height:16px}.mat-list .mat-subheader:first-child,.mat-nav-list .mat-subheader:first-child,.mat-selection-list .mat-subheader:first-child{margin-top:-8px}.mat-list .mat-list-item,.mat-list .mat-list-option,.mat-nav-list .mat-list-item,.mat-nav-list .mat-list-option,.mat-selection-list .mat-list-item,.mat-selection-list .mat-list-option{display:block;height:48px;-webkit-tap-highlight-color:transparent}.mat-list .mat-list-item .mat-list-item-content,.mat-list .mat-list-option .mat-list-item-content,.mat-nav-list .mat-list-item .mat-list-item-content,.mat-nav-list .mat-list-option .mat-list-item-content,.mat-selection-list .mat-list-item .mat-list-item-content,.mat-selection-list .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list .mat-list-item .mat-list-item-content-reverse,.mat-list .mat-list-option .mat-list-item-content-reverse,.mat-nav-list .mat-list-item .mat-list-item-content-reverse,.mat-nav-list .mat-list-option .mat-list-item-content-reverse,.mat-selection-list .mat-list-item .mat-list-item-content-reverse,.mat-selection-list .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list .mat-list-item .mat-list-item-ripple,.mat-list .mat-list-option .mat-list-item-ripple,.mat-nav-list .mat-list-item .mat-list-item-ripple,.mat-nav-list .mat-list-option .mat-list-item-ripple,.mat-selection-list .mat-list-item .mat-list-item-ripple,.mat-selection-list .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list .mat-list-item.mat-list-item-with-avatar,.mat-list .mat-list-option.mat-list-item-with-avatar,.mat-nav-list .mat-list-item.mat-list-item-with-avatar,.mat-nav-list .mat-list-option.mat-list-item-with-avatar,.mat-selection-list .mat-list-item.mat-list-item-with-avatar,.mat-selection-list .mat-list-option.mat-list-item-with-avatar{height:56px}.mat-list .mat-list-item.mat-2-line,.mat-list .mat-list-option.mat-2-line,.mat-nav-list .mat-list-item.mat-2-line,.mat-nav-list .mat-list-option.mat-2-line,.mat-selection-list .mat-list-item.mat-2-line,.mat-selection-list .mat-list-option.mat-2-line{height:72px}.mat-list .mat-list-item.mat-3-line,.mat-list .mat-list-option.mat-3-line,.mat-nav-list .mat-list-item.mat-3-line,.mat-nav-list .mat-list-option.mat-3-line,.mat-selection-list .mat-list-item.mat-3-line,.mat-selection-list .mat-list-option.mat-3-line{height:88px}.mat-list .mat-list-item.mat-multi-line,.mat-list .mat-list-option.mat-multi-line,.mat-nav-list .mat-list-item.mat-multi-line,.mat-nav-list .mat-list-option.mat-multi-line,.mat-selection-list .mat-list-item.mat-multi-line,.mat-selection-list .mat-list-option.mat-multi-line{height:auto}.mat-list .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list .mat-list-option.mat-multi-line .mat-list-item-content,.mat-nav-list .mat-list-item.mat-multi-line .mat-list-item-content,.mat-nav-list .mat-list-option.mat-multi-line .mat-list-item-content,.mat-selection-list .mat-list-item.mat-multi-line .mat-list-item-content,.mat-selection-list .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list .mat-list-item .mat-list-text,.mat-list .mat-list-option .mat-list-text,.mat-nav-list .mat-list-item .mat-list-text,.mat-nav-list .mat-list-option .mat-list-text,.mat-selection-list .mat-list-item .mat-list-text,.mat-selection-list .mat-list-option .mat-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden;padding:0}.mat-list .mat-list-item .mat-list-text>*,.mat-list .mat-list-option .mat-list-text>*,.mat-nav-list .mat-list-item .mat-list-text>*,.mat-nav-list .mat-list-option .mat-list-text>*,.mat-selection-list .mat-list-item .mat-list-text>*,.mat-selection-list .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-list .mat-list-item .mat-list-text:empty,.mat-list .mat-list-option .mat-list-text:empty,.mat-nav-list .mat-list-item .mat-list-text:empty,.mat-nav-list .mat-list-option .mat-list-text:empty,.mat-selection-list .mat-list-item .mat-list-text:empty,.mat-selection-list .mat-list-option .mat-list-text:empty{display:none}.mat-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text,.mat-nav-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-nav-list .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-nav-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-nav-list .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text,.mat-selection-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-selection-list .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-selection-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-selection-list .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:0;padding-left:16px}[dir=rtl] .mat-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-nav-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-nav-list .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-nav-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-nav-list .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-selection-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-selection-list .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-selection-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-selection-list .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:0}.mat-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-nav-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-nav-list .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-nav-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-nav-list .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-selection-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-selection-list .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-selection-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-selection-list .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-left:0;padding-right:16px}[dir=rtl] .mat-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-nav-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-nav-list .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-nav-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-nav-list .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-selection-list .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-selection-list .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-selection-list .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-selection-list .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:0;padding-left:16px}.mat-list .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-nav-list .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-nav-list .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-nav-list .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-nav-list .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-selection-list .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-selection-list .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-selection-list .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-selection-list .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:16px;padding-left:16px}.mat-list .mat-list-item .mat-list-avatar,.mat-list .mat-list-option .mat-list-avatar,.mat-nav-list .mat-list-item .mat-list-avatar,.mat-nav-list .mat-list-option .mat-list-avatar,.mat-selection-list .mat-list-item .mat-list-avatar,.mat-selection-list .mat-list-option .mat-list-avatar{flex-shrink:0;width:40px;height:40px;border-radius:50%}.mat-list .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list .mat-list-option .mat-list-avatar~.mat-divider-inset,.mat-nav-list .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-nav-list .mat-list-option .mat-list-avatar~.mat-divider-inset,.mat-selection-list .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-selection-list .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:72px;width:calc(100% - 72px)}[dir=rtl] .mat-list .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list .mat-list-option .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-nav-list .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-nav-list .mat-list-option .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-selection-list .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-selection-list .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:72px}.mat-list .mat-list-item .mat-list-icon,.mat-list .mat-list-option .mat-list-icon,.mat-nav-list .mat-list-item .mat-list-icon,.mat-nav-list .mat-list-option .mat-list-icon,.mat-selection-list .mat-list-item .mat-list-icon,.mat-selection-list .mat-list-option .mat-list-icon{flex-shrink:0;width:24px;height:24px;font-size:24px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list .mat-list-option .mat-list-icon~.mat-divider-inset,.mat-nav-list .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-nav-list .mat-list-option .mat-list-icon~.mat-divider-inset,.mat-selection-list .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-selection-list .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:64px;width:calc(100% - 64px)}[dir=rtl] .mat-list .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list .mat-list-option .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-nav-list .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-nav-list .mat-list-option .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-selection-list .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-selection-list .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:64px}.mat-list .mat-list-item .mat-divider,.mat-list .mat-list-option .mat-divider,.mat-nav-list .mat-list-item .mat-divider,.mat-nav-list .mat-list-option .mat-divider,.mat-selection-list .mat-list-item .mat-divider,.mat-selection-list .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list .mat-list-item .mat-divider,[dir=rtl] .mat-list .mat-list-option .mat-divider,[dir=rtl] .mat-nav-list .mat-list-item .mat-divider,[dir=rtl] .mat-nav-list .mat-list-option .mat-divider,[dir=rtl] .mat-selection-list .mat-list-item .mat-divider,[dir=rtl] .mat-selection-list .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list .mat-list-item .mat-divider.mat-divider-inset,.mat-list .mat-list-option .mat-divider.mat-divider-inset,.mat-nav-list .mat-list-item .mat-divider.mat-divider-inset,.mat-nav-list .mat-list-option .mat-divider.mat-divider-inset,.mat-selection-list .mat-list-item .mat-divider.mat-divider-inset,.mat-selection-list .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-list[dense],.mat-nav-list[dense],.mat-selection-list[dense]{padding-top:4px;display:block}.mat-list[dense] .mat-subheader,.mat-nav-list[dense] .mat-subheader,.mat-selection-list[dense] .mat-subheader{height:40px;line-height:8px}.mat-list[dense] .mat-subheader:first-child,.mat-nav-list[dense] .mat-subheader:first-child,.mat-selection-list[dense] .mat-subheader:first-child{margin-top:-4px}.mat-list[dense] .mat-list-item,.mat-list[dense] .mat-list-option,.mat-nav-list[dense] .mat-list-item,.mat-nav-list[dense] .mat-list-option,.mat-selection-list[dense] .mat-list-item,.mat-selection-list[dense] .mat-list-option{display:block;height:40px;-webkit-tap-highlight-color:transparent}.mat-list[dense] .mat-list-item .mat-list-item-content,.mat-list[dense] .mat-list-option .mat-list-item-content,.mat-nav-list[dense] .mat-list-item .mat-list-item-content,.mat-nav-list[dense] .mat-list-option .mat-list-item-content,.mat-selection-list[dense] .mat-list-item .mat-list-item-content,.mat-selection-list[dense] .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list[dense] .mat-list-item .mat-list-item-content-reverse,.mat-list[dense] .mat-list-option .mat-list-item-content-reverse,.mat-nav-list[dense] .mat-list-item .mat-list-item-content-reverse,.mat-nav-list[dense] .mat-list-option .mat-list-item-content-reverse,.mat-selection-list[dense] .mat-list-item .mat-list-item-content-reverse,.mat-selection-list[dense] .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list[dense] .mat-list-item .mat-list-item-ripple,.mat-list[dense] .mat-list-option .mat-list-item-ripple,.mat-nav-list[dense] .mat-list-item .mat-list-item-ripple,.mat-nav-list[dense] .mat-list-option .mat-list-item-ripple,.mat-selection-list[dense] .mat-list-item .mat-list-item-ripple,.mat-selection-list[dense] .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list[dense] .mat-list-item.mat-list-item-with-avatar,.mat-list[dense] .mat-list-option.mat-list-item-with-avatar,.mat-nav-list[dense] .mat-list-item.mat-list-item-with-avatar,.mat-nav-list[dense] .mat-list-option.mat-list-item-with-avatar,.mat-selection-list[dense] .mat-list-item.mat-list-item-with-avatar,.mat-selection-list[dense] .mat-list-option.mat-list-item-with-avatar{height:48px}.mat-list[dense] .mat-list-item.mat-2-line,.mat-list[dense] .mat-list-option.mat-2-line,.mat-nav-list[dense] .mat-list-item.mat-2-line,.mat-nav-list[dense] .mat-list-option.mat-2-line,.mat-selection-list[dense] .mat-list-item.mat-2-line,.mat-selection-list[dense] .mat-list-option.mat-2-line{height:60px}.mat-list[dense] .mat-list-item.mat-3-line,.mat-list[dense] .mat-list-option.mat-3-line,.mat-nav-list[dense] .mat-list-item.mat-3-line,.mat-nav-list[dense] .mat-list-option.mat-3-line,.mat-selection-list[dense] .mat-list-item.mat-3-line,.mat-selection-list[dense] .mat-list-option.mat-3-line{height:76px}.mat-list[dense] .mat-list-item.mat-multi-line,.mat-list[dense] .mat-list-option.mat-multi-line,.mat-nav-list[dense] .mat-list-item.mat-multi-line,.mat-nav-list[dense] .mat-list-option.mat-multi-line,.mat-selection-list[dense] .mat-list-item.mat-multi-line,.mat-selection-list[dense] .mat-list-option.mat-multi-line{height:auto}.mat-list[dense] .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list[dense] .mat-list-option.mat-multi-line .mat-list-item-content,.mat-nav-list[dense] .mat-list-item.mat-multi-line .mat-list-item-content,.mat-nav-list[dense] .mat-list-option.mat-multi-line .mat-list-item-content,.mat-selection-list[dense] .mat-list-item.mat-multi-line .mat-list-item-content,.mat-selection-list[dense] .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list[dense] .mat-list-item .mat-list-text,.mat-list[dense] .mat-list-option .mat-list-text,.mat-nav-list[dense] .mat-list-item .mat-list-text,.mat-nav-list[dense] .mat-list-option .mat-list-text,.mat-selection-list[dense] .mat-list-item .mat-list-text,.mat-selection-list[dense] .mat-list-option .mat-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden;padding:0}.mat-list[dense] .mat-list-item .mat-list-text>*,.mat-list[dense] .mat-list-option .mat-list-text>*,.mat-nav-list[dense] .mat-list-item .mat-list-text>*,.mat-nav-list[dense] .mat-list-option .mat-list-text>*,.mat-selection-list[dense] .mat-list-item .mat-list-text>*,.mat-selection-list[dense] .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-list[dense] .mat-list-item .mat-list-text:empty,.mat-list[dense] .mat-list-option .mat-list-text:empty,.mat-nav-list[dense] .mat-list-item .mat-list-text:empty,.mat-nav-list[dense] .mat-list-option .mat-list-text:empty,.mat-selection-list[dense] .mat-list-item .mat-list-text:empty,.mat-selection-list[dense] .mat-list-option .mat-list-text:empty{display:none}.mat-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text,.mat-nav-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-nav-list[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-nav-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-nav-list[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text,.mat-selection-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-selection-list[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-selection-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-selection-list[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:0;padding-left:16px}[dir=rtl] .mat-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-nav-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-nav-list[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-nav-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-nav-list[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-selection-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-selection-list[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-selection-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-selection-list[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:0}.mat-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-nav-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-nav-list[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-nav-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-nav-list[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-selection-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-selection-list[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-selection-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-selection-list[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-left:0;padding-right:16px}[dir=rtl] .mat-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-nav-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-nav-list[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-nav-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-nav-list[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-selection-list[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-selection-list[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-selection-list[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-selection-list[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:0;padding-left:16px}.mat-list[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-nav-list[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-nav-list[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-nav-list[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-nav-list[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-selection-list[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-selection-list[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-selection-list[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-selection-list[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:16px;padding-left:16px}.mat-list[dense] .mat-list-item .mat-list-avatar,.mat-list[dense] .mat-list-option .mat-list-avatar,.mat-nav-list[dense] .mat-list-item .mat-list-avatar,.mat-nav-list[dense] .mat-list-option .mat-list-avatar,.mat-selection-list[dense] .mat-list-item .mat-list-avatar,.mat-selection-list[dense] .mat-list-option .mat-list-avatar{flex-shrink:0;width:36px;height:36px;border-radius:50%}.mat-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset,.mat-nav-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-nav-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset,.mat-selection-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-selection-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:68px;width:calc(100% - 68px)}[dir=rtl] .mat-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-nav-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-nav-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-selection-list[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-selection-list[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:68px}.mat-list[dense] .mat-list-item .mat-list-icon,.mat-list[dense] .mat-list-option .mat-list-icon,.mat-nav-list[dense] .mat-list-item .mat-list-icon,.mat-nav-list[dense] .mat-list-option .mat-list-icon,.mat-selection-list[dense] .mat-list-item .mat-list-icon,.mat-selection-list[dense] .mat-list-option .mat-list-icon{flex-shrink:0;width:20px;height:20px;font-size:20px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset,.mat-nav-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-nav-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset,.mat-selection-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-selection-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:60px;width:calc(100% - 60px)}[dir=rtl] .mat-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-nav-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-nav-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-selection-list[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-selection-list[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:60px}.mat-list[dense] .mat-list-item .mat-divider,.mat-list[dense] .mat-list-option .mat-divider,.mat-nav-list[dense] .mat-list-item .mat-divider,.mat-nav-list[dense] .mat-list-option .mat-divider,.mat-selection-list[dense] .mat-list-item .mat-divider,.mat-selection-list[dense] .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list[dense] .mat-list-item .mat-divider,[dir=rtl] .mat-list[dense] .mat-list-option .mat-divider,[dir=rtl] .mat-nav-list[dense] .mat-list-item .mat-divider,[dir=rtl] .mat-nav-list[dense] .mat-list-option .mat-divider,[dir=rtl] .mat-selection-list[dense] .mat-list-item .mat-divider,[dir=rtl] .mat-selection-list[dense] .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list[dense] .mat-list-item .mat-divider.mat-divider-inset,.mat-list[dense] .mat-list-option .mat-divider.mat-divider-inset,.mat-nav-list[dense] .mat-list-item .mat-divider.mat-divider-inset,.mat-nav-list[dense] .mat-list-option .mat-divider.mat-divider-inset,.mat-selection-list[dense] .mat-list-item .mat-divider.mat-divider-inset,.mat-selection-list[dense] .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-nav-list a{text-decoration:none;color:inherit}.mat-nav-list .mat-list-item{cursor:pointer;outline:0}.mat-list-option:not(.mat-list-item-disabled){cursor:pointer;outline:0}@media (hover:none){.mat-list-option:hover,.mat-nav-list .mat-list-item:hover{background:0 0}}"],
96838
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
96839
                    providers: [MAT_SELECTION_LIST_VALUE_ACCESSOR],
96840
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush
96841
                },] },
96842
    ];
96843
    /** @nocollapse */
96844
    MatSelectionList.ctorParameters = function () { return [
96845
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
96846
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Attribute"], args: ['tabindex',] },] },
96847
    ]; };
96848
    MatSelectionList.propDecorators = {
96849
        "options": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChildren"], args: [MatListOption,] },],
96850
        "selectionChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"] },],
96851
        "tabIndex": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
96852
        "compareWith": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
96853
        "disabled": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
96854
    };
96855
    return MatSelectionList;
96856
}(_MatSelectionListMixinBase));
96857
 
96858
/**
96859
 * @fileoverview added by tsickle
96860
 * @suppress {checkTypes} checked by tsc
96861
 */
96862
var MatListModule = /** @class */ (function () {
96863
    function MatListModule() {
96864
    }
96865
    MatListModule.decorators = [
96866
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{
96867
                    imports: [_angular_material_core__WEBPACK_IMPORTED_MODULE_2__["MatLineModule"], _angular_material_core__WEBPACK_IMPORTED_MODULE_2__["MatRippleModule"], _angular_material_core__WEBPACK_IMPORTED_MODULE_2__["MatCommonModule"], _angular_material_core__WEBPACK_IMPORTED_MODULE_2__["MatPseudoCheckboxModule"], _angular_common__WEBPACK_IMPORTED_MODULE_9__["CommonModule"]],
96868
                    exports: [
96869
                        MatList,
96870
                        MatNavList,
96871
                        MatListItem,
96872
                        MatListAvatarCssMatStyler,
96873
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_2__["MatLineModule"],
96874
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_2__["MatCommonModule"],
96875
                        MatListIconCssMatStyler,
96876
                        MatListSubheaderCssMatStyler,
96877
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_2__["MatPseudoCheckboxModule"],
96878
                        MatSelectionList,
96879
                        MatListOption,
96880
                        _angular_material_divider__WEBPACK_IMPORTED_MODULE_10__["MatDividerModule"]
96881
                    ],
96882
                    declarations: [
96883
                        MatList,
96884
                        MatNavList,
96885
                        MatListItem,
96886
                        MatListAvatarCssMatStyler,
96887
                        MatListIconCssMatStyler,
96888
                        MatListSubheaderCssMatStyler,
96889
                        MatSelectionList,
96890
                        MatListOption
96891
                    ],
96892
                },] },
96893
    ];
96894
    return MatListModule;
96895
}());
96896
 
96897
/**
96898
 * @fileoverview added by tsickle
96899
 * @suppress {checkTypes} checked by tsc
96900
 */
96901
 
96902
/**
96903
 * @fileoverview added by tsickle
96904
 * @suppress {checkTypes} checked by tsc
96905
 */
96906
 
96907
 
96908
//# sourceMappingURL=list.es5.js.map
96909
 
96910
 
96911
/***/ }),
96912
 
96913
/***/ "./node_modules/@angular/material/esm5/material.es5.js":
96914
/*!*************************************************************!*\
96915
  !*** ./node_modules/@angular/material/esm5/material.es5.js ***!
96916
  \*************************************************************/
96917
/*! exports provided: ɵa29, MatAutocompleteSelectedEvent, MatAutocompleteBase, _MatAutocompleteMixinBase, MAT_AUTOCOMPLETE_DEFAULT_OPTIONS, MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY, MatAutocomplete, MatAutocompleteModule, AUTOCOMPLETE_OPTION_HEIGHT, AUTOCOMPLETE_PANEL_HEIGHT, MAT_AUTOCOMPLETE_SCROLL_STRATEGY, MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY, MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER, MAT_AUTOCOMPLETE_VALUE_ACCESSOR, getMatAutocompleteMissingPanelError, MatAutocompleteTrigger, MatBadgeModule, MatBadge, MatBottomSheetModule, MatBottomSheet, MAT_BOTTOM_SHEET_DATA, MatBottomSheetConfig, MatBottomSheetContainer, matBottomSheetAnimations, MatBottomSheetRef, MatButtonModule, MatButtonBase, _MatButtonMixinBase, MatButton, MatAnchor, MatButtonToggleGroupBase, _MatButtonToggleGroupMixinBase, MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR, MatButtonToggleGroupMultiple, MatButtonToggleChange, MatButtonToggleGroup, MatButtonToggleBase, _MatButtonToggleMixinBase, MatButtonToggle, MatButtonToggleModule, MatCardContent, MatCardTitle, MatCardSubtitle, MatCardActions, MatCardFooter, MatCardImage, MatCardSmImage, MatCardMdImage, MatCardLgImage, MatCardXlImage, MatCardAvatar, MatCard, MatCardHeader, MatCardTitleGroup, MatCardModule, MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR, TransitionCheckState, MatCheckboxChange, MatCheckboxBase, _MatCheckboxMixinBase, MatCheckbox, MAT_CHECKBOX_CLICK_ACTION, MatCheckboxModule, MAT_CHECKBOX_REQUIRED_VALIDATOR, MatCheckboxRequiredValidator, MatChipsModule, MatChipListBase, _MatChipListMixinBase, MatChipListChange, MatChipList, MatChipSelectionChange, MatChipBase, _MatChipMixinBase, MatChipAvatar, MatChipTrailingIcon, MatChip, MatChipRemove, MatChipInput, MAT_CHIPS_DEFAULT_OPTIONS, ɵa1, AnimationCurves, AnimationDurations, MatCommonModule, MATERIAL_SANITY_CHECKS, mixinDisabled, mixinColor, mixinDisableRipple, mixinTabIndex, mixinErrorState, mixinInitialized, NativeDateModule, MatNativeDateModule, MAT_DATE_LOCALE, MAT_DATE_LOCALE_FACTORY, MAT_DATE_LOCALE_PROVIDER, DateAdapter, MAT_DATE_FORMATS, NativeDateAdapter, MAT_NATIVE_DATE_FORMATS, ShowOnDirtyErrorStateMatcher, ErrorStateMatcher, MAT_HAMMER_OPTIONS, GestureConfig, MatLine, MatLineSetter, MatLineModule, MatOptionModule, MatOptionSelectionChange, MAT_OPTION_PARENT_COMPONENT, MatOption, _countGroupLabelsBeforeOption, _getOptionScrollPosition, MatOptgroupBase, _MatOptgroupMixinBase, MatOptgroup, MAT_LABEL_GLOBAL_OPTIONS, MatRippleModule, MAT_RIPPLE_GLOBAL_OPTIONS, MatRipple, RippleState, RippleRef, defaultRippleAnimationConfig, RippleRenderer, MatPseudoCheckboxModule, MatPseudoCheckbox, JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC, ɵa34, MatDatepickerModule, MatCalendarHeader, MatCalendar, MatCalendarCell, MatCalendarBody, MAT_DATEPICKER_SCROLL_STRATEGY, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER, MatDatepickerContentBase, _MatDatepickerContentMixinBase, MatDatepickerContent, MatDatepicker, matDatepickerAnimations, MAT_DATEPICKER_VALUE_ACCESSOR, MAT_DATEPICKER_VALIDATORS, MatDatepickerInputEvent, MatDatepickerInput, MatDatepickerIntl, MatDatepickerToggleIcon, MatDatepickerToggle, MatMonthView, MatYearView, MatDialogModule, MAT_DIALOG_DATA, MAT_DIALOG_DEFAULT_OPTIONS, MAT_DIALOG_SCROLL_STRATEGY, MAT_DIALOG_SCROLL_STRATEGY_FACTORY, MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY, MAT_DIALOG_SCROLL_STRATEGY_PROVIDER, MatDialog, throwMatDialogContentAlreadyAttachedError, MatDialogContainer, MatDialogClose, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogConfig, MatDialogRef, matDialogAnimations, MatDivider, MatDividerModule, MatExpansionModule, MatAccordion, MatExpansionPanel, MatExpansionPanelActionRow, MatExpansionPanelHeader, MatExpansionPanelDescription, MatExpansionPanelTitle, MatExpansionPanelContent, EXPANSION_PANEL_ANIMATION_TIMING, matExpansionAnimations, MatFormFieldModule, MatError, MatFormFieldBase, _MatFormFieldMixinBase, MAT_FORM_FIELD_DEFAULT_OPTIONS, MatFormField, MatFormFieldControl, getMatFormFieldPlaceholderConflictError, getMatFormFieldDuplicatedHintError, getMatFormFieldMissingControlError, MatHint, MatPlaceholder, MatPrefix, MatSuffix, MatLabel, matFormFieldAnimations, MatGridListModule, MatGridList, MatGridTile, MatGridTileText, MatGridAvatarCssMatStyler, MatGridTileHeaderCssMatStyler, MatGridTileFooterCssMatStyler, MatIconModule, MatIconBase, _MatIconMixinBase, MatIcon, getMatIconNameNotFoundError, getMatIconNoHttpProviderError, getMatIconFailedToSanitizeUrlError, getMatIconFailedToSanitizeLiteralError, MatIconRegistry, ICON_REGISTRY_PROVIDER_FACTORY, ICON_REGISTRY_PROVIDER, MatTextareaAutosize, MatInputBase, _MatInputMixinBase, MatInput, getMatInputUnsupportedTypeError, MatInputModule, MAT_INPUT_VALUE_ACCESSOR, MatListModule, MatListBase, _MatListMixinBase, MatListItemBase, _MatListItemMixinBase, MatNavList, MatList, MatListAvatarCssMatStyler, MatListIconCssMatStyler, MatListSubheaderCssMatStyler, MatListItem, MatSelectionListBase, _MatSelectionListMixinBase, MatListOptionBase, _MatListOptionMixinBase, MAT_SELECTION_LIST_VALUE_ACCESSOR, MatSelectionListChange, MatListOption, MatSelectionList, ɵa23, ɵb23, ɵc23, ɵf23, ɵd23, ɵe23, MAT_MENU_SCROLL_STRATEGY, MatMenuModule, MatMenu, MAT_MENU_DEFAULT_OPTIONS, MatMenuItem, MatMenuTrigger, matMenuAnimations, fadeInItems, transformMenu, MatMenuContent, MatPaginatorModule, PageEvent, MatPaginatorBase, _MatPaginatorBase, MatPaginator, MatPaginatorIntl, MAT_PAGINATOR_INTL_PROVIDER_FACTORY, MAT_PAGINATOR_INTL_PROVIDER, MatProgressBarModule, MatProgressBarBase, _MatProgressBarMixinBase, MatProgressBar, MatProgressSpinnerModule, MatProgressSpinnerBase, _MatProgressSpinnerMixinBase, MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS, MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY, MatProgressSpinner, MatSpinner, MatRadioModule, MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR, MatRadioChange, MatRadioGroupBase, _MatRadioGroupMixinBase, MatRadioGroup, MatRadioButtonBase, _MatRadioButtonMixinBase, MatRadioButton, MatSelectModule, SELECT_PANEL_MAX_HEIGHT, SELECT_PANEL_PADDING_X, SELECT_PANEL_INDENT_PADDING_X, SELECT_ITEM_HEIGHT_EM, SELECT_MULTIPLE_PANEL_PADDING_X, SELECT_PANEL_VIEWPORT_PADDING, MAT_SELECT_SCROLL_STRATEGY, MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY, MAT_SELECT_SCROLL_STRATEGY_PROVIDER, MatSelectChange, MatSelectBase, _MatSelectMixinBase, MatSelectTrigger, MatSelect, matSelectAnimations, transformPanel, fadeInContent, MatSidenavModule, throwMatDuplicatedDrawerError, MAT_DRAWER_DEFAULT_AUTOSIZE, MAT_DRAWER_DEFAULT_AUTOSIZE_FACTORY, MatDrawerContent, MatDrawer, MatDrawerContainer, MatSidenavContent, MatSidenav, MatSidenavContainer, matDrawerAnimations, MatSlideToggleModule, MAT_SLIDE_TOGGLE_VALUE_ACCESSOR, MatSlideToggleChange, MatSlideToggleBase, _MatSlideToggleMixinBase, MatSlideToggle, MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS, MatSliderModule, MAT_SLIDER_VALUE_ACCESSOR, MatSliderChange, MatSliderBase, _MatSliderMixinBase, MatSlider, MatSnackBarModule, MAT_SNACK_BAR_DEFAULT_OPTIONS, MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY, MatSnackBar, MatSnackBarContainer, MAT_SNACK_BAR_DATA, MatSnackBarConfig, MatSnackBarRef, SimpleSnackBar, matSnackBarAnimations, MatSortModule, MatSortHeaderBase, _MatSortHeaderMixinBase, MatSortHeader, MatSortHeaderIntl, MAT_SORT_HEADER_INTL_PROVIDER_FACTORY, MAT_SORT_HEADER_INTL_PROVIDER, MatSortBase, _MatSortMixinBase, MatSort, matSortAnimations, MatStepperModule, MatStepLabel, MatStep, MatStepper, MatHorizontalStepper, MatVerticalStepper, MatStepperNext, MatStepperPrevious, MatStepHeader, MatStepperIntl, matStepperAnimations, MatStepperIcon, MatTableModule, MatCellDef, MatHeaderCellDef, MatFooterCellDef, MatColumnDef, MatHeaderCell, MatFooterCell, MatCell, MatTable, MatHeaderRowDef, MatFooterRowDef, MatRowDef, MatHeaderRow, MatFooterRow, MatRow, MatTableDataSource, ɵa24, ɵf24, ɵg24, ɵb24, ɵc24, ɵd24, ɵe24, ɵj24, ɵh24, ɵk24, ɵi24, MatInkBar, _MAT_INK_BAR_POSITIONER, MatTabBody, MatTabBodyPortal, MatTabHeader, MatTabLabelWrapper, MatTab, MatTabLabel, MatTabNav, MatTabLink, MatTabContent, MatTabsModule, MatTabChangeEvent, MatTabGroupBase, _MatTabGroupMixinBase, MatTabGroup, matTabsAnimations, MatToolbarModule, MatToolbarBase, _MatToolbarMixinBase, MatToolbarRow, MatToolbar, throwToolbarMixedModesError, MatTooltipModule, SCROLL_THROTTLE_MS, TOOLTIP_PANEL_CLASS, getMatTooltipInvalidPositionError, MAT_TOOLTIP_SCROLL_STRATEGY, MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY, MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER, MAT_TOOLTIP_DEFAULT_OPTIONS, MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY, MatTooltip, TooltipComponent, matTooltipAnimations, _MatTreeNodeMixinBase, _MatNestedTreeNodeMixinBase, MatTreeNode, MatTreeNodeDef, MatNestedTreeNode, MatTreeNodePadding, MatTree, MatTreeModule, MatTreeNodeToggle, MatTreeNodeOutlet, MatTreeFlattener, MatTreeFlatDataSource, MatTreeNestedDataSource, VERSION */
96918
/***/ (function(module, __webpack_exports__, __webpack_require__) {
96919
 
96920
"use strict";
96921
__webpack_require__.r(__webpack_exports__);
96922
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; });
96923
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
96924
/* harmony import */ var _angular_material_autocomplete__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/material/autocomplete */ "./node_modules/@angular/material/esm5/autocomplete.es5.js");
96925
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ɵa29", function() { return _angular_material_autocomplete__WEBPACK_IMPORTED_MODULE_1__["ɵa29"]; });
96926
 
96927
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatAutocompleteSelectedEvent", function() { return _angular_material_autocomplete__WEBPACK_IMPORTED_MODULE_1__["MatAutocompleteSelectedEvent"]; });
96928
 
96929
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatAutocompleteBase", function() { return _angular_material_autocomplete__WEBPACK_IMPORTED_MODULE_1__["MatAutocompleteBase"]; });
96930
 
96931
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatAutocompleteMixinBase", function() { return _angular_material_autocomplete__WEBPACK_IMPORTED_MODULE_1__["_MatAutocompleteMixinBase"]; });
96932
 
96933
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_AUTOCOMPLETE_DEFAULT_OPTIONS", function() { return _angular_material_autocomplete__WEBPACK_IMPORTED_MODULE_1__["MAT_AUTOCOMPLETE_DEFAULT_OPTIONS"]; });
96934
 
96935
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY", function() { return _angular_material_autocomplete__WEBPACK_IMPORTED_MODULE_1__["MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY"]; });
96936
 
96937
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatAutocomplete", function() { return _angular_material_autocomplete__WEBPACK_IMPORTED_MODULE_1__["MatAutocomplete"]; });
96938
 
96939
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatAutocompleteModule", function() { return _angular_material_autocomplete__WEBPACK_IMPORTED_MODULE_1__["MatAutocompleteModule"]; });
96940
 
96941
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AUTOCOMPLETE_OPTION_HEIGHT", function() { return _angular_material_autocomplete__WEBPACK_IMPORTED_MODULE_1__["AUTOCOMPLETE_OPTION_HEIGHT"]; });
96942
 
96943
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AUTOCOMPLETE_PANEL_HEIGHT", function() { return _angular_material_autocomplete__WEBPACK_IMPORTED_MODULE_1__["AUTOCOMPLETE_PANEL_HEIGHT"]; });
96944
 
96945
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_AUTOCOMPLETE_SCROLL_STRATEGY", function() { return _angular_material_autocomplete__WEBPACK_IMPORTED_MODULE_1__["MAT_AUTOCOMPLETE_SCROLL_STRATEGY"]; });
96946
 
96947
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY", function() { return _angular_material_autocomplete__WEBPACK_IMPORTED_MODULE_1__["MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY"]; });
96948
 
96949
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER", function() { return _angular_material_autocomplete__WEBPACK_IMPORTED_MODULE_1__["MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER"]; });
96950
 
96951
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_AUTOCOMPLETE_VALUE_ACCESSOR", function() { return _angular_material_autocomplete__WEBPACK_IMPORTED_MODULE_1__["MAT_AUTOCOMPLETE_VALUE_ACCESSOR"]; });
96952
 
96953
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMatAutocompleteMissingPanelError", function() { return _angular_material_autocomplete__WEBPACK_IMPORTED_MODULE_1__["getMatAutocompleteMissingPanelError"]; });
96954
 
96955
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatAutocompleteTrigger", function() { return _angular_material_autocomplete__WEBPACK_IMPORTED_MODULE_1__["MatAutocompleteTrigger"]; });
96956
 
96957
/* harmony import */ var _angular_material_badge__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/material/badge */ "./node_modules/@angular/material/esm5/badge.es5.js");
96958
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatBadgeModule", function() { return _angular_material_badge__WEBPACK_IMPORTED_MODULE_2__["MatBadgeModule"]; });
96959
 
96960
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatBadge", function() { return _angular_material_badge__WEBPACK_IMPORTED_MODULE_2__["MatBadge"]; });
96961
 
96962
/* harmony import */ var _angular_material_bottom_sheet__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/material/bottom-sheet */ "./node_modules/@angular/material/esm5/bottom-sheet.es5.js");
96963
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatBottomSheetModule", function() { return _angular_material_bottom_sheet__WEBPACK_IMPORTED_MODULE_3__["MatBottomSheetModule"]; });
96964
 
96965
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatBottomSheet", function() { return _angular_material_bottom_sheet__WEBPACK_IMPORTED_MODULE_3__["MatBottomSheet"]; });
96966
 
96967
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_BOTTOM_SHEET_DATA", function() { return _angular_material_bottom_sheet__WEBPACK_IMPORTED_MODULE_3__["MAT_BOTTOM_SHEET_DATA"]; });
96968
 
96969
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatBottomSheetConfig", function() { return _angular_material_bottom_sheet__WEBPACK_IMPORTED_MODULE_3__["MatBottomSheetConfig"]; });
96970
 
96971
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatBottomSheetContainer", function() { return _angular_material_bottom_sheet__WEBPACK_IMPORTED_MODULE_3__["MatBottomSheetContainer"]; });
96972
 
96973
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matBottomSheetAnimations", function() { return _angular_material_bottom_sheet__WEBPACK_IMPORTED_MODULE_3__["matBottomSheetAnimations"]; });
96974
 
96975
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatBottomSheetRef", function() { return _angular_material_bottom_sheet__WEBPACK_IMPORTED_MODULE_3__["MatBottomSheetRef"]; });
96976
 
96977
/* harmony import */ var _angular_material_button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/material/button */ "./node_modules/@angular/material/esm5/button.es5.js");
96978
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatButtonModule", function() { return _angular_material_button__WEBPACK_IMPORTED_MODULE_4__["MatButtonModule"]; });
96979
 
96980
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatButtonBase", function() { return _angular_material_button__WEBPACK_IMPORTED_MODULE_4__["MatButtonBase"]; });
96981
 
96982
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatButtonMixinBase", function() { return _angular_material_button__WEBPACK_IMPORTED_MODULE_4__["_MatButtonMixinBase"]; });
96983
 
96984
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatButton", function() { return _angular_material_button__WEBPACK_IMPORTED_MODULE_4__["MatButton"]; });
96985
 
96986
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatAnchor", function() { return _angular_material_button__WEBPACK_IMPORTED_MODULE_4__["MatAnchor"]; });
96987
 
96988
/* harmony import */ var _angular_material_button_toggle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/material/button-toggle */ "./node_modules/@angular/material/esm5/button-toggle.es5.js");
96989
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatButtonToggleGroupBase", function() { return _angular_material_button_toggle__WEBPACK_IMPORTED_MODULE_5__["MatButtonToggleGroupBase"]; });
96990
 
96991
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatButtonToggleGroupMixinBase", function() { return _angular_material_button_toggle__WEBPACK_IMPORTED_MODULE_5__["_MatButtonToggleGroupMixinBase"]; });
96992
 
96993
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR", function() { return _angular_material_button_toggle__WEBPACK_IMPORTED_MODULE_5__["MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR"]; });
96994
 
96995
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatButtonToggleGroupMultiple", function() { return _angular_material_button_toggle__WEBPACK_IMPORTED_MODULE_5__["MatButtonToggleGroupMultiple"]; });
96996
 
96997
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatButtonToggleChange", function() { return _angular_material_button_toggle__WEBPACK_IMPORTED_MODULE_5__["MatButtonToggleChange"]; });
96998
 
96999
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatButtonToggleGroup", function() { return _angular_material_button_toggle__WEBPACK_IMPORTED_MODULE_5__["MatButtonToggleGroup"]; });
97000
 
97001
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatButtonToggleBase", function() { return _angular_material_button_toggle__WEBPACK_IMPORTED_MODULE_5__["MatButtonToggleBase"]; });
97002
 
97003
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatButtonToggleMixinBase", function() { return _angular_material_button_toggle__WEBPACK_IMPORTED_MODULE_5__["_MatButtonToggleMixinBase"]; });
97004
 
97005
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatButtonToggle", function() { return _angular_material_button_toggle__WEBPACK_IMPORTED_MODULE_5__["MatButtonToggle"]; });
97006
 
97007
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatButtonToggleModule", function() { return _angular_material_button_toggle__WEBPACK_IMPORTED_MODULE_5__["MatButtonToggleModule"]; });
97008
 
97009
/* harmony import */ var _angular_material_card__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/material/card */ "./node_modules/@angular/material/esm5/card.es5.js");
97010
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCardContent", function() { return _angular_material_card__WEBPACK_IMPORTED_MODULE_6__["MatCardContent"]; });
97011
 
97012
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCardTitle", function() { return _angular_material_card__WEBPACK_IMPORTED_MODULE_6__["MatCardTitle"]; });
97013
 
97014
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCardSubtitle", function() { return _angular_material_card__WEBPACK_IMPORTED_MODULE_6__["MatCardSubtitle"]; });
97015
 
97016
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCardActions", function() { return _angular_material_card__WEBPACK_IMPORTED_MODULE_6__["MatCardActions"]; });
97017
 
97018
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCardFooter", function() { return _angular_material_card__WEBPACK_IMPORTED_MODULE_6__["MatCardFooter"]; });
97019
 
97020
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCardImage", function() { return _angular_material_card__WEBPACK_IMPORTED_MODULE_6__["MatCardImage"]; });
97021
 
97022
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCardSmImage", function() { return _angular_material_card__WEBPACK_IMPORTED_MODULE_6__["MatCardSmImage"]; });
97023
 
97024
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCardMdImage", function() { return _angular_material_card__WEBPACK_IMPORTED_MODULE_6__["MatCardMdImage"]; });
97025
 
97026
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCardLgImage", function() { return _angular_material_card__WEBPACK_IMPORTED_MODULE_6__["MatCardLgImage"]; });
97027
 
97028
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCardXlImage", function() { return _angular_material_card__WEBPACK_IMPORTED_MODULE_6__["MatCardXlImage"]; });
97029
 
97030
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCardAvatar", function() { return _angular_material_card__WEBPACK_IMPORTED_MODULE_6__["MatCardAvatar"]; });
97031
 
97032
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCard", function() { return _angular_material_card__WEBPACK_IMPORTED_MODULE_6__["MatCard"]; });
97033
 
97034
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCardHeader", function() { return _angular_material_card__WEBPACK_IMPORTED_MODULE_6__["MatCardHeader"]; });
97035
 
97036
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCardTitleGroup", function() { return _angular_material_card__WEBPACK_IMPORTED_MODULE_6__["MatCardTitleGroup"]; });
97037
 
97038
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCardModule", function() { return _angular_material_card__WEBPACK_IMPORTED_MODULE_6__["MatCardModule"]; });
97039
 
97040
/* harmony import */ var _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/material/checkbox */ "./node_modules/@angular/material/esm5/checkbox.es5.js");
97041
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR", function() { return _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_7__["MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR"]; });
97042
 
97043
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TransitionCheckState", function() { return _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_7__["TransitionCheckState"]; });
97044
 
97045
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCheckboxChange", function() { return _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_7__["MatCheckboxChange"]; });
97046
 
97047
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCheckboxBase", function() { return _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_7__["MatCheckboxBase"]; });
97048
 
97049
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatCheckboxMixinBase", function() { return _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_7__["_MatCheckboxMixinBase"]; });
97050
 
97051
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCheckbox", function() { return _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_7__["MatCheckbox"]; });
97052
 
97053
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_CHECKBOX_CLICK_ACTION", function() { return _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_7__["MAT_CHECKBOX_CLICK_ACTION"]; });
97054
 
97055
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCheckboxModule", function() { return _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_7__["MatCheckboxModule"]; });
97056
 
97057
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_CHECKBOX_REQUIRED_VALIDATOR", function() { return _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_7__["MAT_CHECKBOX_REQUIRED_VALIDATOR"]; });
97058
 
97059
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCheckboxRequiredValidator", function() { return _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_7__["MatCheckboxRequiredValidator"]; });
97060
 
97061
/* harmony import */ var _angular_material_chips__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/material/chips */ "./node_modules/@angular/material/esm5/chips.es5.js");
97062
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatChipsModule", function() { return _angular_material_chips__WEBPACK_IMPORTED_MODULE_8__["MatChipsModule"]; });
97063
 
97064
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatChipListBase", function() { return _angular_material_chips__WEBPACK_IMPORTED_MODULE_8__["MatChipListBase"]; });
97065
 
97066
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatChipListMixinBase", function() { return _angular_material_chips__WEBPACK_IMPORTED_MODULE_8__["_MatChipListMixinBase"]; });
97067
 
97068
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatChipListChange", function() { return _angular_material_chips__WEBPACK_IMPORTED_MODULE_8__["MatChipListChange"]; });
97069
 
97070
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatChipList", function() { return _angular_material_chips__WEBPACK_IMPORTED_MODULE_8__["MatChipList"]; });
97071
 
97072
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatChipSelectionChange", function() { return _angular_material_chips__WEBPACK_IMPORTED_MODULE_8__["MatChipSelectionChange"]; });
97073
 
97074
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatChipBase", function() { return _angular_material_chips__WEBPACK_IMPORTED_MODULE_8__["MatChipBase"]; });
97075
 
97076
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatChipMixinBase", function() { return _angular_material_chips__WEBPACK_IMPORTED_MODULE_8__["_MatChipMixinBase"]; });
97077
 
97078
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatChipAvatar", function() { return _angular_material_chips__WEBPACK_IMPORTED_MODULE_8__["MatChipAvatar"]; });
97079
 
97080
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatChipTrailingIcon", function() { return _angular_material_chips__WEBPACK_IMPORTED_MODULE_8__["MatChipTrailingIcon"]; });
97081
 
97082
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatChip", function() { return _angular_material_chips__WEBPACK_IMPORTED_MODULE_8__["MatChip"]; });
97083
 
97084
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatChipRemove", function() { return _angular_material_chips__WEBPACK_IMPORTED_MODULE_8__["MatChipRemove"]; });
97085
 
97086
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatChipInput", function() { return _angular_material_chips__WEBPACK_IMPORTED_MODULE_8__["MatChipInput"]; });
97087
 
97088
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_CHIPS_DEFAULT_OPTIONS", function() { return _angular_material_chips__WEBPACK_IMPORTED_MODULE_8__["MAT_CHIPS_DEFAULT_OPTIONS"]; });
97089
 
97090
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
97091
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ɵa1", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["ɵa1"]; });
97092
 
97093
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationCurves", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["AnimationCurves"]; });
97094
 
97095
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationDurations", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["AnimationDurations"]; });
97096
 
97097
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCommonModule", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["MatCommonModule"]; });
97098
 
97099
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MATERIAL_SANITY_CHECKS", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["MATERIAL_SANITY_CHECKS"]; });
97100
 
97101
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mixinDisabled", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["mixinDisabled"]; });
97102
 
97103
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mixinColor", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["mixinColor"]; });
97104
 
97105
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mixinDisableRipple", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["mixinDisableRipple"]; });
97106
 
97107
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mixinTabIndex", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["mixinTabIndex"]; });
97108
 
97109
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mixinErrorState", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["mixinErrorState"]; });
97110
 
97111
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mixinInitialized", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["mixinInitialized"]; });
97112
 
97113
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NativeDateModule", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["NativeDateModule"]; });
97114
 
97115
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatNativeDateModule", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["MatNativeDateModule"]; });
97116
 
97117
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_DATE_LOCALE", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["MAT_DATE_LOCALE"]; });
97118
 
97119
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_DATE_LOCALE_FACTORY", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["MAT_DATE_LOCALE_FACTORY"]; });
97120
 
97121
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_DATE_LOCALE_PROVIDER", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["MAT_DATE_LOCALE_PROVIDER"]; });
97122
 
97123
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DateAdapter", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["DateAdapter"]; });
97124
 
97125
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_DATE_FORMATS", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["MAT_DATE_FORMATS"]; });
97126
 
97127
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NativeDateAdapter", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["NativeDateAdapter"]; });
97128
 
97129
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_NATIVE_DATE_FORMATS", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["MAT_NATIVE_DATE_FORMATS"]; });
97130
 
97131
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ShowOnDirtyErrorStateMatcher", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["ShowOnDirtyErrorStateMatcher"]; });
97132
 
97133
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ErrorStateMatcher", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["ErrorStateMatcher"]; });
97134
 
97135
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_HAMMER_OPTIONS", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["MAT_HAMMER_OPTIONS"]; });
97136
 
97137
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GestureConfig", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["GestureConfig"]; });
97138
 
97139
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatLine", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["MatLine"]; });
97140
 
97141
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatLineSetter", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["MatLineSetter"]; });
97142
 
97143
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatLineModule", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["MatLineModule"]; });
97144
 
97145
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatOptionModule", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["MatOptionModule"]; });
97146
 
97147
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatOptionSelectionChange", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["MatOptionSelectionChange"]; });
97148
 
97149
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_OPTION_PARENT_COMPONENT", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["MAT_OPTION_PARENT_COMPONENT"]; });
97150
 
97151
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatOption", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["MatOption"]; });
97152
 
97153
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_countGroupLabelsBeforeOption", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["_countGroupLabelsBeforeOption"]; });
97154
 
97155
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_getOptionScrollPosition", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["_getOptionScrollPosition"]; });
97156
 
97157
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatOptgroupBase", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["MatOptgroupBase"]; });
97158
 
97159
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatOptgroupMixinBase", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["_MatOptgroupMixinBase"]; });
97160
 
97161
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatOptgroup", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["MatOptgroup"]; });
97162
 
97163
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_LABEL_GLOBAL_OPTIONS", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["MAT_LABEL_GLOBAL_OPTIONS"]; });
97164
 
97165
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatRippleModule", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["MatRippleModule"]; });
97166
 
97167
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_RIPPLE_GLOBAL_OPTIONS", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["MAT_RIPPLE_GLOBAL_OPTIONS"]; });
97168
 
97169
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatRipple", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["MatRipple"]; });
97170
 
97171
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RippleState", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["RippleState"]; });
97172
 
97173
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RippleRef", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["RippleRef"]; });
97174
 
97175
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultRippleAnimationConfig", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["defaultRippleAnimationConfig"]; });
97176
 
97177
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RippleRenderer", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["RippleRenderer"]; });
97178
 
97179
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatPseudoCheckboxModule", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["MatPseudoCheckboxModule"]; });
97180
 
97181
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatPseudoCheckbox", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["MatPseudoCheckbox"]; });
97182
 
97183
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JAN", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["JAN"]; });
97184
 
97185
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FEB", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["FEB"]; });
97186
 
97187
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAR", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["MAR"]; });
97188
 
97189
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "APR", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["APR"]; });
97190
 
97191
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAY", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["MAY"]; });
97192
 
97193
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JUN", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["JUN"]; });
97194
 
97195
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "JUL", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["JUL"]; });
97196
 
97197
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AUG", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["AUG"]; });
97198
 
97199
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SEP", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["SEP"]; });
97200
 
97201
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "OCT", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["OCT"]; });
97202
 
97203
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NOV", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["NOV"]; });
97204
 
97205
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DEC", function() { return _angular_material_core__WEBPACK_IMPORTED_MODULE_9__["DEC"]; });
97206
 
97207
/* harmony import */ var _angular_material_datepicker__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/material/datepicker */ "./node_modules/@angular/material/esm5/datepicker.es5.js");
97208
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ɵa34", function() { return _angular_material_datepicker__WEBPACK_IMPORTED_MODULE_10__["ɵa34"]; });
97209
 
97210
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatDatepickerModule", function() { return _angular_material_datepicker__WEBPACK_IMPORTED_MODULE_10__["MatDatepickerModule"]; });
97211
 
97212
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCalendarHeader", function() { return _angular_material_datepicker__WEBPACK_IMPORTED_MODULE_10__["MatCalendarHeader"]; });
97213
 
97214
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCalendar", function() { return _angular_material_datepicker__WEBPACK_IMPORTED_MODULE_10__["MatCalendar"]; });
97215
 
97216
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCalendarCell", function() { return _angular_material_datepicker__WEBPACK_IMPORTED_MODULE_10__["MatCalendarCell"]; });
97217
 
97218
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCalendarBody", function() { return _angular_material_datepicker__WEBPACK_IMPORTED_MODULE_10__["MatCalendarBody"]; });
97219
 
97220
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_DATEPICKER_SCROLL_STRATEGY", function() { return _angular_material_datepicker__WEBPACK_IMPORTED_MODULE_10__["MAT_DATEPICKER_SCROLL_STRATEGY"]; });
97221
 
97222
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY", function() { return _angular_material_datepicker__WEBPACK_IMPORTED_MODULE_10__["MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY"]; });
97223
 
97224
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER", function() { return _angular_material_datepicker__WEBPACK_IMPORTED_MODULE_10__["MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER"]; });
97225
 
97226
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatDatepickerContentBase", function() { return _angular_material_datepicker__WEBPACK_IMPORTED_MODULE_10__["MatDatepickerContentBase"]; });
97227
 
97228
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatDatepickerContentMixinBase", function() { return _angular_material_datepicker__WEBPACK_IMPORTED_MODULE_10__["_MatDatepickerContentMixinBase"]; });
97229
 
97230
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatDatepickerContent", function() { return _angular_material_datepicker__WEBPACK_IMPORTED_MODULE_10__["MatDatepickerContent"]; });
97231
 
97232
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatDatepicker", function() { return _angular_material_datepicker__WEBPACK_IMPORTED_MODULE_10__["MatDatepicker"]; });
97233
 
97234
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matDatepickerAnimations", function() { return _angular_material_datepicker__WEBPACK_IMPORTED_MODULE_10__["matDatepickerAnimations"]; });
97235
 
97236
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_DATEPICKER_VALUE_ACCESSOR", function() { return _angular_material_datepicker__WEBPACK_IMPORTED_MODULE_10__["MAT_DATEPICKER_VALUE_ACCESSOR"]; });
97237
 
97238
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_DATEPICKER_VALIDATORS", function() { return _angular_material_datepicker__WEBPACK_IMPORTED_MODULE_10__["MAT_DATEPICKER_VALIDATORS"]; });
97239
 
97240
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatDatepickerInputEvent", function() { return _angular_material_datepicker__WEBPACK_IMPORTED_MODULE_10__["MatDatepickerInputEvent"]; });
97241
 
97242
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatDatepickerInput", function() { return _angular_material_datepicker__WEBPACK_IMPORTED_MODULE_10__["MatDatepickerInput"]; });
97243
 
97244
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatDatepickerIntl", function() { return _angular_material_datepicker__WEBPACK_IMPORTED_MODULE_10__["MatDatepickerIntl"]; });
97245
 
97246
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatDatepickerToggleIcon", function() { return _angular_material_datepicker__WEBPACK_IMPORTED_MODULE_10__["MatDatepickerToggleIcon"]; });
97247
 
97248
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatDatepickerToggle", function() { return _angular_material_datepicker__WEBPACK_IMPORTED_MODULE_10__["MatDatepickerToggle"]; });
97249
 
97250
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatMonthView", function() { return _angular_material_datepicker__WEBPACK_IMPORTED_MODULE_10__["MatMonthView"]; });
97251
 
97252
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatYearView", function() { return _angular_material_datepicker__WEBPACK_IMPORTED_MODULE_10__["MatYearView"]; });
97253
 
97254
/* harmony import */ var _angular_material_dialog__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/material/dialog */ "./node_modules/@angular/material/esm5/dialog.es5.js");
97255
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatDialogModule", function() { return _angular_material_dialog__WEBPACK_IMPORTED_MODULE_11__["MatDialogModule"]; });
97256
 
97257
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_DIALOG_DATA", function() { return _angular_material_dialog__WEBPACK_IMPORTED_MODULE_11__["MAT_DIALOG_DATA"]; });
97258
 
97259
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_DIALOG_DEFAULT_OPTIONS", function() { return _angular_material_dialog__WEBPACK_IMPORTED_MODULE_11__["MAT_DIALOG_DEFAULT_OPTIONS"]; });
97260
 
97261
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_DIALOG_SCROLL_STRATEGY", function() { return _angular_material_dialog__WEBPACK_IMPORTED_MODULE_11__["MAT_DIALOG_SCROLL_STRATEGY"]; });
97262
 
97263
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_DIALOG_SCROLL_STRATEGY_FACTORY", function() { return _angular_material_dialog__WEBPACK_IMPORTED_MODULE_11__["MAT_DIALOG_SCROLL_STRATEGY_FACTORY"]; });
97264
 
97265
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY", function() { return _angular_material_dialog__WEBPACK_IMPORTED_MODULE_11__["MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY"]; });
97266
 
97267
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_DIALOG_SCROLL_STRATEGY_PROVIDER", function() { return _angular_material_dialog__WEBPACK_IMPORTED_MODULE_11__["MAT_DIALOG_SCROLL_STRATEGY_PROVIDER"]; });
97268
 
97269
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatDialog", function() { return _angular_material_dialog__WEBPACK_IMPORTED_MODULE_11__["MatDialog"]; });
97270
 
97271
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwMatDialogContentAlreadyAttachedError", function() { return _angular_material_dialog__WEBPACK_IMPORTED_MODULE_11__["throwMatDialogContentAlreadyAttachedError"]; });
97272
 
97273
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatDialogContainer", function() { return _angular_material_dialog__WEBPACK_IMPORTED_MODULE_11__["MatDialogContainer"]; });
97274
 
97275
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatDialogClose", function() { return _angular_material_dialog__WEBPACK_IMPORTED_MODULE_11__["MatDialogClose"]; });
97276
 
97277
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatDialogTitle", function() { return _angular_material_dialog__WEBPACK_IMPORTED_MODULE_11__["MatDialogTitle"]; });
97278
 
97279
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatDialogContent", function() { return _angular_material_dialog__WEBPACK_IMPORTED_MODULE_11__["MatDialogContent"]; });
97280
 
97281
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatDialogActions", function() { return _angular_material_dialog__WEBPACK_IMPORTED_MODULE_11__["MatDialogActions"]; });
97282
 
97283
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatDialogConfig", function() { return _angular_material_dialog__WEBPACK_IMPORTED_MODULE_11__["MatDialogConfig"]; });
97284
 
97285
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatDialogRef", function() { return _angular_material_dialog__WEBPACK_IMPORTED_MODULE_11__["MatDialogRef"]; });
97286
 
97287
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matDialogAnimations", function() { return _angular_material_dialog__WEBPACK_IMPORTED_MODULE_11__["matDialogAnimations"]; });
97288
 
97289
/* harmony import */ var _angular_material_divider__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/material/divider */ "./node_modules/@angular/material/esm5/divider.es5.js");
97290
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatDivider", function() { return _angular_material_divider__WEBPACK_IMPORTED_MODULE_12__["MatDivider"]; });
97291
 
97292
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatDividerModule", function() { return _angular_material_divider__WEBPACK_IMPORTED_MODULE_12__["MatDividerModule"]; });
97293
 
97294
/* harmony import */ var _angular_material_expansion__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @angular/material/expansion */ "./node_modules/@angular/material/esm5/expansion.es5.js");
97295
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatExpansionModule", function() { return _angular_material_expansion__WEBPACK_IMPORTED_MODULE_13__["MatExpansionModule"]; });
97296
 
97297
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatAccordion", function() { return _angular_material_expansion__WEBPACK_IMPORTED_MODULE_13__["MatAccordion"]; });
97298
 
97299
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatExpansionPanel", function() { return _angular_material_expansion__WEBPACK_IMPORTED_MODULE_13__["MatExpansionPanel"]; });
97300
 
97301
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatExpansionPanelActionRow", function() { return _angular_material_expansion__WEBPACK_IMPORTED_MODULE_13__["MatExpansionPanelActionRow"]; });
97302
 
97303
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatExpansionPanelHeader", function() { return _angular_material_expansion__WEBPACK_IMPORTED_MODULE_13__["MatExpansionPanelHeader"]; });
97304
 
97305
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatExpansionPanelDescription", function() { return _angular_material_expansion__WEBPACK_IMPORTED_MODULE_13__["MatExpansionPanelDescription"]; });
97306
 
97307
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatExpansionPanelTitle", function() { return _angular_material_expansion__WEBPACK_IMPORTED_MODULE_13__["MatExpansionPanelTitle"]; });
97308
 
97309
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatExpansionPanelContent", function() { return _angular_material_expansion__WEBPACK_IMPORTED_MODULE_13__["MatExpansionPanelContent"]; });
97310
 
97311
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EXPANSION_PANEL_ANIMATION_TIMING", function() { return _angular_material_expansion__WEBPACK_IMPORTED_MODULE_13__["EXPANSION_PANEL_ANIMATION_TIMING"]; });
97312
 
97313
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matExpansionAnimations", function() { return _angular_material_expansion__WEBPACK_IMPORTED_MODULE_13__["matExpansionAnimations"]; });
97314
 
97315
/* harmony import */ var _angular_material_form_field__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @angular/material/form-field */ "./node_modules/@angular/material/esm5/form-field.es5.js");
97316
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatFormFieldModule", function() { return _angular_material_form_field__WEBPACK_IMPORTED_MODULE_14__["MatFormFieldModule"]; });
97317
 
97318
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatError", function() { return _angular_material_form_field__WEBPACK_IMPORTED_MODULE_14__["MatError"]; });
97319
 
97320
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatFormFieldBase", function() { return _angular_material_form_field__WEBPACK_IMPORTED_MODULE_14__["MatFormFieldBase"]; });
97321
 
97322
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatFormFieldMixinBase", function() { return _angular_material_form_field__WEBPACK_IMPORTED_MODULE_14__["_MatFormFieldMixinBase"]; });
97323
 
97324
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_FORM_FIELD_DEFAULT_OPTIONS", function() { return _angular_material_form_field__WEBPACK_IMPORTED_MODULE_14__["MAT_FORM_FIELD_DEFAULT_OPTIONS"]; });
97325
 
97326
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatFormField", function() { return _angular_material_form_field__WEBPACK_IMPORTED_MODULE_14__["MatFormField"]; });
97327
 
97328
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatFormFieldControl", function() { return _angular_material_form_field__WEBPACK_IMPORTED_MODULE_14__["MatFormFieldControl"]; });
97329
 
97330
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMatFormFieldPlaceholderConflictError", function() { return _angular_material_form_field__WEBPACK_IMPORTED_MODULE_14__["getMatFormFieldPlaceholderConflictError"]; });
97331
 
97332
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMatFormFieldDuplicatedHintError", function() { return _angular_material_form_field__WEBPACK_IMPORTED_MODULE_14__["getMatFormFieldDuplicatedHintError"]; });
97333
 
97334
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMatFormFieldMissingControlError", function() { return _angular_material_form_field__WEBPACK_IMPORTED_MODULE_14__["getMatFormFieldMissingControlError"]; });
97335
 
97336
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatHint", function() { return _angular_material_form_field__WEBPACK_IMPORTED_MODULE_14__["MatHint"]; });
97337
 
97338
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatPlaceholder", function() { return _angular_material_form_field__WEBPACK_IMPORTED_MODULE_14__["MatPlaceholder"]; });
97339
 
97340
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatPrefix", function() { return _angular_material_form_field__WEBPACK_IMPORTED_MODULE_14__["MatPrefix"]; });
97341
 
97342
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSuffix", function() { return _angular_material_form_field__WEBPACK_IMPORTED_MODULE_14__["MatSuffix"]; });
97343
 
97344
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatLabel", function() { return _angular_material_form_field__WEBPACK_IMPORTED_MODULE_14__["MatLabel"]; });
97345
 
97346
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matFormFieldAnimations", function() { return _angular_material_form_field__WEBPACK_IMPORTED_MODULE_14__["matFormFieldAnimations"]; });
97347
 
97348
/* harmony import */ var _angular_material_grid_list__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @angular/material/grid-list */ "./node_modules/@angular/material/esm5/grid-list.es5.js");
97349
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatGridListModule", function() { return _angular_material_grid_list__WEBPACK_IMPORTED_MODULE_15__["MatGridListModule"]; });
97350
 
97351
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatGridList", function() { return _angular_material_grid_list__WEBPACK_IMPORTED_MODULE_15__["MatGridList"]; });
97352
 
97353
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatGridTile", function() { return _angular_material_grid_list__WEBPACK_IMPORTED_MODULE_15__["MatGridTile"]; });
97354
 
97355
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatGridTileText", function() { return _angular_material_grid_list__WEBPACK_IMPORTED_MODULE_15__["MatGridTileText"]; });
97356
 
97357
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatGridAvatarCssMatStyler", function() { return _angular_material_grid_list__WEBPACK_IMPORTED_MODULE_15__["MatGridAvatarCssMatStyler"]; });
97358
 
97359
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatGridTileHeaderCssMatStyler", function() { return _angular_material_grid_list__WEBPACK_IMPORTED_MODULE_15__["MatGridTileHeaderCssMatStyler"]; });
97360
 
97361
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatGridTileFooterCssMatStyler", function() { return _angular_material_grid_list__WEBPACK_IMPORTED_MODULE_15__["MatGridTileFooterCssMatStyler"]; });
97362
 
97363
/* harmony import */ var _angular_material_icon__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @angular/material/icon */ "./node_modules/@angular/material/esm5/icon.es5.js");
97364
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatIconModule", function() { return _angular_material_icon__WEBPACK_IMPORTED_MODULE_16__["MatIconModule"]; });
97365
 
97366
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatIconBase", function() { return _angular_material_icon__WEBPACK_IMPORTED_MODULE_16__["MatIconBase"]; });
97367
 
97368
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatIconMixinBase", function() { return _angular_material_icon__WEBPACK_IMPORTED_MODULE_16__["_MatIconMixinBase"]; });
97369
 
97370
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatIcon", function() { return _angular_material_icon__WEBPACK_IMPORTED_MODULE_16__["MatIcon"]; });
97371
 
97372
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMatIconNameNotFoundError", function() { return _angular_material_icon__WEBPACK_IMPORTED_MODULE_16__["getMatIconNameNotFoundError"]; });
97373
 
97374
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMatIconNoHttpProviderError", function() { return _angular_material_icon__WEBPACK_IMPORTED_MODULE_16__["getMatIconNoHttpProviderError"]; });
97375
 
97376
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMatIconFailedToSanitizeUrlError", function() { return _angular_material_icon__WEBPACK_IMPORTED_MODULE_16__["getMatIconFailedToSanitizeUrlError"]; });
97377
 
97378
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMatIconFailedToSanitizeLiteralError", function() { return _angular_material_icon__WEBPACK_IMPORTED_MODULE_16__["getMatIconFailedToSanitizeLiteralError"]; });
97379
 
97380
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatIconRegistry", function() { return _angular_material_icon__WEBPACK_IMPORTED_MODULE_16__["MatIconRegistry"]; });
97381
 
97382
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ICON_REGISTRY_PROVIDER_FACTORY", function() { return _angular_material_icon__WEBPACK_IMPORTED_MODULE_16__["ICON_REGISTRY_PROVIDER_FACTORY"]; });
97383
 
97384
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ICON_REGISTRY_PROVIDER", function() { return _angular_material_icon__WEBPACK_IMPORTED_MODULE_16__["ICON_REGISTRY_PROVIDER"]; });
97385
 
97386
/* harmony import */ var _angular_material_input__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @angular/material/input */ "./node_modules/@angular/material/esm5/input.es5.js");
97387
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTextareaAutosize", function() { return _angular_material_input__WEBPACK_IMPORTED_MODULE_17__["MatTextareaAutosize"]; });
97388
 
97389
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatInputBase", function() { return _angular_material_input__WEBPACK_IMPORTED_MODULE_17__["MatInputBase"]; });
97390
 
97391
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatInputMixinBase", function() { return _angular_material_input__WEBPACK_IMPORTED_MODULE_17__["_MatInputMixinBase"]; });
97392
 
97393
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatInput", function() { return _angular_material_input__WEBPACK_IMPORTED_MODULE_17__["MatInput"]; });
97394
 
97395
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMatInputUnsupportedTypeError", function() { return _angular_material_input__WEBPACK_IMPORTED_MODULE_17__["getMatInputUnsupportedTypeError"]; });
97396
 
97397
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatInputModule", function() { return _angular_material_input__WEBPACK_IMPORTED_MODULE_17__["MatInputModule"]; });
97398
 
97399
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_INPUT_VALUE_ACCESSOR", function() { return _angular_material_input__WEBPACK_IMPORTED_MODULE_17__["MAT_INPUT_VALUE_ACCESSOR"]; });
97400
 
97401
/* harmony import */ var _angular_material_list__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @angular/material/list */ "./node_modules/@angular/material/esm5/list.es5.js");
97402
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatListModule", function() { return _angular_material_list__WEBPACK_IMPORTED_MODULE_18__["MatListModule"]; });
97403
 
97404
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatListBase", function() { return _angular_material_list__WEBPACK_IMPORTED_MODULE_18__["MatListBase"]; });
97405
 
97406
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatListMixinBase", function() { return _angular_material_list__WEBPACK_IMPORTED_MODULE_18__["_MatListMixinBase"]; });
97407
 
97408
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatListItemBase", function() { return _angular_material_list__WEBPACK_IMPORTED_MODULE_18__["MatListItemBase"]; });
97409
 
97410
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatListItemMixinBase", function() { return _angular_material_list__WEBPACK_IMPORTED_MODULE_18__["_MatListItemMixinBase"]; });
97411
 
97412
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatNavList", function() { return _angular_material_list__WEBPACK_IMPORTED_MODULE_18__["MatNavList"]; });
97413
 
97414
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatList", function() { return _angular_material_list__WEBPACK_IMPORTED_MODULE_18__["MatList"]; });
97415
 
97416
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatListAvatarCssMatStyler", function() { return _angular_material_list__WEBPACK_IMPORTED_MODULE_18__["MatListAvatarCssMatStyler"]; });
97417
 
97418
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatListIconCssMatStyler", function() { return _angular_material_list__WEBPACK_IMPORTED_MODULE_18__["MatListIconCssMatStyler"]; });
97419
 
97420
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatListSubheaderCssMatStyler", function() { return _angular_material_list__WEBPACK_IMPORTED_MODULE_18__["MatListSubheaderCssMatStyler"]; });
97421
 
97422
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatListItem", function() { return _angular_material_list__WEBPACK_IMPORTED_MODULE_18__["MatListItem"]; });
97423
 
97424
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSelectionListBase", function() { return _angular_material_list__WEBPACK_IMPORTED_MODULE_18__["MatSelectionListBase"]; });
97425
 
97426
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatSelectionListMixinBase", function() { return _angular_material_list__WEBPACK_IMPORTED_MODULE_18__["_MatSelectionListMixinBase"]; });
97427
 
97428
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatListOptionBase", function() { return _angular_material_list__WEBPACK_IMPORTED_MODULE_18__["MatListOptionBase"]; });
97429
 
97430
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatListOptionMixinBase", function() { return _angular_material_list__WEBPACK_IMPORTED_MODULE_18__["_MatListOptionMixinBase"]; });
97431
 
97432
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_SELECTION_LIST_VALUE_ACCESSOR", function() { return _angular_material_list__WEBPACK_IMPORTED_MODULE_18__["MAT_SELECTION_LIST_VALUE_ACCESSOR"]; });
97433
 
97434
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSelectionListChange", function() { return _angular_material_list__WEBPACK_IMPORTED_MODULE_18__["MatSelectionListChange"]; });
97435
 
97436
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatListOption", function() { return _angular_material_list__WEBPACK_IMPORTED_MODULE_18__["MatListOption"]; });
97437
 
97438
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSelectionList", function() { return _angular_material_list__WEBPACK_IMPORTED_MODULE_18__["MatSelectionList"]; });
97439
 
97440
/* harmony import */ var _angular_material_menu__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @angular/material/menu */ "./node_modules/@angular/material/esm5/menu.es5.js");
97441
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ɵa23", function() { return _angular_material_menu__WEBPACK_IMPORTED_MODULE_19__["ɵa23"]; });
97442
 
97443
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ɵb23", function() { return _angular_material_menu__WEBPACK_IMPORTED_MODULE_19__["ɵb23"]; });
97444
 
97445
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ɵc23", function() { return _angular_material_menu__WEBPACK_IMPORTED_MODULE_19__["ɵc23"]; });
97446
 
97447
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ɵf23", function() { return _angular_material_menu__WEBPACK_IMPORTED_MODULE_19__["ɵf23"]; });
97448
 
97449
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ɵd23", function() { return _angular_material_menu__WEBPACK_IMPORTED_MODULE_19__["ɵd23"]; });
97450
 
97451
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ɵe23", function() { return _angular_material_menu__WEBPACK_IMPORTED_MODULE_19__["ɵe23"]; });
97452
 
97453
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_MENU_SCROLL_STRATEGY", function() { return _angular_material_menu__WEBPACK_IMPORTED_MODULE_19__["MAT_MENU_SCROLL_STRATEGY"]; });
97454
 
97455
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatMenuModule", function() { return _angular_material_menu__WEBPACK_IMPORTED_MODULE_19__["MatMenuModule"]; });
97456
 
97457
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatMenu", function() { return _angular_material_menu__WEBPACK_IMPORTED_MODULE_19__["MatMenu"]; });
97458
 
97459
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_MENU_DEFAULT_OPTIONS", function() { return _angular_material_menu__WEBPACK_IMPORTED_MODULE_19__["MAT_MENU_DEFAULT_OPTIONS"]; });
97460
 
97461
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatMenuItem", function() { return _angular_material_menu__WEBPACK_IMPORTED_MODULE_19__["MatMenuItem"]; });
97462
 
97463
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatMenuTrigger", function() { return _angular_material_menu__WEBPACK_IMPORTED_MODULE_19__["MatMenuTrigger"]; });
97464
 
97465
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matMenuAnimations", function() { return _angular_material_menu__WEBPACK_IMPORTED_MODULE_19__["matMenuAnimations"]; });
97466
 
97467
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fadeInItems", function() { return _angular_material_menu__WEBPACK_IMPORTED_MODULE_19__["fadeInItems"]; });
97468
 
97469
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transformMenu", function() { return _angular_material_menu__WEBPACK_IMPORTED_MODULE_19__["transformMenu"]; });
97470
 
97471
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatMenuContent", function() { return _angular_material_menu__WEBPACK_IMPORTED_MODULE_19__["MatMenuContent"]; });
97472
 
97473
/* harmony import */ var _angular_material_paginator__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @angular/material/paginator */ "./node_modules/@angular/material/esm5/paginator.es5.js");
97474
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatPaginatorModule", function() { return _angular_material_paginator__WEBPACK_IMPORTED_MODULE_20__["MatPaginatorModule"]; });
97475
 
97476
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PageEvent", function() { return _angular_material_paginator__WEBPACK_IMPORTED_MODULE_20__["PageEvent"]; });
97477
 
97478
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatPaginatorBase", function() { return _angular_material_paginator__WEBPACK_IMPORTED_MODULE_20__["MatPaginatorBase"]; });
97479
 
97480
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatPaginatorBase", function() { return _angular_material_paginator__WEBPACK_IMPORTED_MODULE_20__["_MatPaginatorBase"]; });
97481
 
97482
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatPaginator", function() { return _angular_material_paginator__WEBPACK_IMPORTED_MODULE_20__["MatPaginator"]; });
97483
 
97484
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatPaginatorIntl", function() { return _angular_material_paginator__WEBPACK_IMPORTED_MODULE_20__["MatPaginatorIntl"]; });
97485
 
97486
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_PAGINATOR_INTL_PROVIDER_FACTORY", function() { return _angular_material_paginator__WEBPACK_IMPORTED_MODULE_20__["MAT_PAGINATOR_INTL_PROVIDER_FACTORY"]; });
97487
 
97488
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_PAGINATOR_INTL_PROVIDER", function() { return _angular_material_paginator__WEBPACK_IMPORTED_MODULE_20__["MAT_PAGINATOR_INTL_PROVIDER"]; });
97489
 
97490
/* harmony import */ var _angular_material_progress_bar__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @angular/material/progress-bar */ "./node_modules/@angular/material/esm5/progress-bar.es5.js");
97491
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatProgressBarModule", function() { return _angular_material_progress_bar__WEBPACK_IMPORTED_MODULE_21__["MatProgressBarModule"]; });
97492
 
97493
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatProgressBarBase", function() { return _angular_material_progress_bar__WEBPACK_IMPORTED_MODULE_21__["MatProgressBarBase"]; });
97494
 
97495
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatProgressBarMixinBase", function() { return _angular_material_progress_bar__WEBPACK_IMPORTED_MODULE_21__["_MatProgressBarMixinBase"]; });
97496
 
97497
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatProgressBar", function() { return _angular_material_progress_bar__WEBPACK_IMPORTED_MODULE_21__["MatProgressBar"]; });
97498
 
97499
/* harmony import */ var _angular_material_progress_spinner__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @angular/material/progress-spinner */ "./node_modules/@angular/material/esm5/progress-spinner.es5.js");
97500
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatProgressSpinnerModule", function() { return _angular_material_progress_spinner__WEBPACK_IMPORTED_MODULE_22__["MatProgressSpinnerModule"]; });
97501
 
97502
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatProgressSpinnerBase", function() { return _angular_material_progress_spinner__WEBPACK_IMPORTED_MODULE_22__["MatProgressSpinnerBase"]; });
97503
 
97504
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatProgressSpinnerMixinBase", function() { return _angular_material_progress_spinner__WEBPACK_IMPORTED_MODULE_22__["_MatProgressSpinnerMixinBase"]; });
97505
 
97506
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS", function() { return _angular_material_progress_spinner__WEBPACK_IMPORTED_MODULE_22__["MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS"]; });
97507
 
97508
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY", function() { return _angular_material_progress_spinner__WEBPACK_IMPORTED_MODULE_22__["MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY"]; });
97509
 
97510
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatProgressSpinner", function() { return _angular_material_progress_spinner__WEBPACK_IMPORTED_MODULE_22__["MatProgressSpinner"]; });
97511
 
97512
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSpinner", function() { return _angular_material_progress_spinner__WEBPACK_IMPORTED_MODULE_22__["MatSpinner"]; });
97513
 
97514
/* harmony import */ var _angular_material_radio__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @angular/material/radio */ "./node_modules/@angular/material/esm5/radio.es5.js");
97515
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatRadioModule", function() { return _angular_material_radio__WEBPACK_IMPORTED_MODULE_23__["MatRadioModule"]; });
97516
 
97517
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR", function() { return _angular_material_radio__WEBPACK_IMPORTED_MODULE_23__["MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR"]; });
97518
 
97519
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatRadioChange", function() { return _angular_material_radio__WEBPACK_IMPORTED_MODULE_23__["MatRadioChange"]; });
97520
 
97521
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatRadioGroupBase", function() { return _angular_material_radio__WEBPACK_IMPORTED_MODULE_23__["MatRadioGroupBase"]; });
97522
 
97523
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatRadioGroupMixinBase", function() { return _angular_material_radio__WEBPACK_IMPORTED_MODULE_23__["_MatRadioGroupMixinBase"]; });
97524
 
97525
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatRadioGroup", function() { return _angular_material_radio__WEBPACK_IMPORTED_MODULE_23__["MatRadioGroup"]; });
97526
 
97527
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatRadioButtonBase", function() { return _angular_material_radio__WEBPACK_IMPORTED_MODULE_23__["MatRadioButtonBase"]; });
97528
 
97529
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatRadioButtonMixinBase", function() { return _angular_material_radio__WEBPACK_IMPORTED_MODULE_23__["_MatRadioButtonMixinBase"]; });
97530
 
97531
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatRadioButton", function() { return _angular_material_radio__WEBPACK_IMPORTED_MODULE_23__["MatRadioButton"]; });
97532
 
97533
/* harmony import */ var _angular_material_select__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @angular/material/select */ "./node_modules/@angular/material/esm5/select.es5.js");
97534
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSelectModule", function() { return _angular_material_select__WEBPACK_IMPORTED_MODULE_24__["MatSelectModule"]; });
97535
 
97536
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SELECT_PANEL_MAX_HEIGHT", function() { return _angular_material_select__WEBPACK_IMPORTED_MODULE_24__["SELECT_PANEL_MAX_HEIGHT"]; });
97537
 
97538
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SELECT_PANEL_PADDING_X", function() { return _angular_material_select__WEBPACK_IMPORTED_MODULE_24__["SELECT_PANEL_PADDING_X"]; });
97539
 
97540
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SELECT_PANEL_INDENT_PADDING_X", function() { return _angular_material_select__WEBPACK_IMPORTED_MODULE_24__["SELECT_PANEL_INDENT_PADDING_X"]; });
97541
 
97542
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SELECT_ITEM_HEIGHT_EM", function() { return _angular_material_select__WEBPACK_IMPORTED_MODULE_24__["SELECT_ITEM_HEIGHT_EM"]; });
97543
 
97544
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SELECT_MULTIPLE_PANEL_PADDING_X", function() { return _angular_material_select__WEBPACK_IMPORTED_MODULE_24__["SELECT_MULTIPLE_PANEL_PADDING_X"]; });
97545
 
97546
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SELECT_PANEL_VIEWPORT_PADDING", function() { return _angular_material_select__WEBPACK_IMPORTED_MODULE_24__["SELECT_PANEL_VIEWPORT_PADDING"]; });
97547
 
97548
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_SELECT_SCROLL_STRATEGY", function() { return _angular_material_select__WEBPACK_IMPORTED_MODULE_24__["MAT_SELECT_SCROLL_STRATEGY"]; });
97549
 
97550
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY", function() { return _angular_material_select__WEBPACK_IMPORTED_MODULE_24__["MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY"]; });
97551
 
97552
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_SELECT_SCROLL_STRATEGY_PROVIDER", function() { return _angular_material_select__WEBPACK_IMPORTED_MODULE_24__["MAT_SELECT_SCROLL_STRATEGY_PROVIDER"]; });
97553
 
97554
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSelectChange", function() { return _angular_material_select__WEBPACK_IMPORTED_MODULE_24__["MatSelectChange"]; });
97555
 
97556
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSelectBase", function() { return _angular_material_select__WEBPACK_IMPORTED_MODULE_24__["MatSelectBase"]; });
97557
 
97558
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatSelectMixinBase", function() { return _angular_material_select__WEBPACK_IMPORTED_MODULE_24__["_MatSelectMixinBase"]; });
97559
 
97560
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSelectTrigger", function() { return _angular_material_select__WEBPACK_IMPORTED_MODULE_24__["MatSelectTrigger"]; });
97561
 
97562
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSelect", function() { return _angular_material_select__WEBPACK_IMPORTED_MODULE_24__["MatSelect"]; });
97563
 
97564
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matSelectAnimations", function() { return _angular_material_select__WEBPACK_IMPORTED_MODULE_24__["matSelectAnimations"]; });
97565
 
97566
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transformPanel", function() { return _angular_material_select__WEBPACK_IMPORTED_MODULE_24__["transformPanel"]; });
97567
 
97568
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fadeInContent", function() { return _angular_material_select__WEBPACK_IMPORTED_MODULE_24__["fadeInContent"]; });
97569
 
97570
/* harmony import */ var _angular_material_sidenav__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @angular/material/sidenav */ "./node_modules/@angular/material/esm5/sidenav.es5.js");
97571
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSidenavModule", function() { return _angular_material_sidenav__WEBPACK_IMPORTED_MODULE_25__["MatSidenavModule"]; });
97572
 
97573
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwMatDuplicatedDrawerError", function() { return _angular_material_sidenav__WEBPACK_IMPORTED_MODULE_25__["throwMatDuplicatedDrawerError"]; });
97574
 
97575
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_DRAWER_DEFAULT_AUTOSIZE", function() { return _angular_material_sidenav__WEBPACK_IMPORTED_MODULE_25__["MAT_DRAWER_DEFAULT_AUTOSIZE"]; });
97576
 
97577
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_DRAWER_DEFAULT_AUTOSIZE_FACTORY", function() { return _angular_material_sidenav__WEBPACK_IMPORTED_MODULE_25__["MAT_DRAWER_DEFAULT_AUTOSIZE_FACTORY"]; });
97578
 
97579
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatDrawerContent", function() { return _angular_material_sidenav__WEBPACK_IMPORTED_MODULE_25__["MatDrawerContent"]; });
97580
 
97581
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatDrawer", function() { return _angular_material_sidenav__WEBPACK_IMPORTED_MODULE_25__["MatDrawer"]; });
97582
 
97583
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatDrawerContainer", function() { return _angular_material_sidenav__WEBPACK_IMPORTED_MODULE_25__["MatDrawerContainer"]; });
97584
 
97585
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSidenavContent", function() { return _angular_material_sidenav__WEBPACK_IMPORTED_MODULE_25__["MatSidenavContent"]; });
97586
 
97587
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSidenav", function() { return _angular_material_sidenav__WEBPACK_IMPORTED_MODULE_25__["MatSidenav"]; });
97588
 
97589
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSidenavContainer", function() { return _angular_material_sidenav__WEBPACK_IMPORTED_MODULE_25__["MatSidenavContainer"]; });
97590
 
97591
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matDrawerAnimations", function() { return _angular_material_sidenav__WEBPACK_IMPORTED_MODULE_25__["matDrawerAnimations"]; });
97592
 
97593
/* harmony import */ var _angular_material_slide_toggle__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @angular/material/slide-toggle */ "./node_modules/@angular/material/esm5/slide-toggle.es5.js");
97594
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSlideToggleModule", function() { return _angular_material_slide_toggle__WEBPACK_IMPORTED_MODULE_26__["MatSlideToggleModule"]; });
97595
 
97596
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_SLIDE_TOGGLE_VALUE_ACCESSOR", function() { return _angular_material_slide_toggle__WEBPACK_IMPORTED_MODULE_26__["MAT_SLIDE_TOGGLE_VALUE_ACCESSOR"]; });
97597
 
97598
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSlideToggleChange", function() { return _angular_material_slide_toggle__WEBPACK_IMPORTED_MODULE_26__["MatSlideToggleChange"]; });
97599
 
97600
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSlideToggleBase", function() { return _angular_material_slide_toggle__WEBPACK_IMPORTED_MODULE_26__["MatSlideToggleBase"]; });
97601
 
97602
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatSlideToggleMixinBase", function() { return _angular_material_slide_toggle__WEBPACK_IMPORTED_MODULE_26__["_MatSlideToggleMixinBase"]; });
97603
 
97604
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSlideToggle", function() { return _angular_material_slide_toggle__WEBPACK_IMPORTED_MODULE_26__["MatSlideToggle"]; });
97605
 
97606
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS", function() { return _angular_material_slide_toggle__WEBPACK_IMPORTED_MODULE_26__["MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS"]; });
97607
 
97608
/* harmony import */ var _angular_material_slider__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @angular/material/slider */ "./node_modules/@angular/material/esm5/slider.es5.js");
97609
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSliderModule", function() { return _angular_material_slider__WEBPACK_IMPORTED_MODULE_27__["MatSliderModule"]; });
97610
 
97611
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_SLIDER_VALUE_ACCESSOR", function() { return _angular_material_slider__WEBPACK_IMPORTED_MODULE_27__["MAT_SLIDER_VALUE_ACCESSOR"]; });
97612
 
97613
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSliderChange", function() { return _angular_material_slider__WEBPACK_IMPORTED_MODULE_27__["MatSliderChange"]; });
97614
 
97615
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSliderBase", function() { return _angular_material_slider__WEBPACK_IMPORTED_MODULE_27__["MatSliderBase"]; });
97616
 
97617
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatSliderMixinBase", function() { return _angular_material_slider__WEBPACK_IMPORTED_MODULE_27__["_MatSliderMixinBase"]; });
97618
 
97619
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSlider", function() { return _angular_material_slider__WEBPACK_IMPORTED_MODULE_27__["MatSlider"]; });
97620
 
97621
/* harmony import */ var _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @angular/material/snack-bar */ "./node_modules/@angular/material/esm5/snack-bar.es5.js");
97622
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSnackBarModule", function() { return _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_28__["MatSnackBarModule"]; });
97623
 
97624
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_SNACK_BAR_DEFAULT_OPTIONS", function() { return _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_28__["MAT_SNACK_BAR_DEFAULT_OPTIONS"]; });
97625
 
97626
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY", function() { return _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_28__["MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY"]; });
97627
 
97628
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSnackBar", function() { return _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_28__["MatSnackBar"]; });
97629
 
97630
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSnackBarContainer", function() { return _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_28__["MatSnackBarContainer"]; });
97631
 
97632
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_SNACK_BAR_DATA", function() { return _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_28__["MAT_SNACK_BAR_DATA"]; });
97633
 
97634
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSnackBarConfig", function() { return _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_28__["MatSnackBarConfig"]; });
97635
 
97636
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSnackBarRef", function() { return _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_28__["MatSnackBarRef"]; });
97637
 
97638
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SimpleSnackBar", function() { return _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_28__["SimpleSnackBar"]; });
97639
 
97640
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matSnackBarAnimations", function() { return _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_28__["matSnackBarAnimations"]; });
97641
 
97642
/* harmony import */ var _angular_material_sort__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @angular/material/sort */ "./node_modules/@angular/material/esm5/sort.es5.js");
97643
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSortModule", function() { return _angular_material_sort__WEBPACK_IMPORTED_MODULE_29__["MatSortModule"]; });
97644
 
97645
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSortHeaderBase", function() { return _angular_material_sort__WEBPACK_IMPORTED_MODULE_29__["MatSortHeaderBase"]; });
97646
 
97647
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatSortHeaderMixinBase", function() { return _angular_material_sort__WEBPACK_IMPORTED_MODULE_29__["_MatSortHeaderMixinBase"]; });
97648
 
97649
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSortHeader", function() { return _angular_material_sort__WEBPACK_IMPORTED_MODULE_29__["MatSortHeader"]; });
97650
 
97651
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSortHeaderIntl", function() { return _angular_material_sort__WEBPACK_IMPORTED_MODULE_29__["MatSortHeaderIntl"]; });
97652
 
97653
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_SORT_HEADER_INTL_PROVIDER_FACTORY", function() { return _angular_material_sort__WEBPACK_IMPORTED_MODULE_29__["MAT_SORT_HEADER_INTL_PROVIDER_FACTORY"]; });
97654
 
97655
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_SORT_HEADER_INTL_PROVIDER", function() { return _angular_material_sort__WEBPACK_IMPORTED_MODULE_29__["MAT_SORT_HEADER_INTL_PROVIDER"]; });
97656
 
97657
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSortBase", function() { return _angular_material_sort__WEBPACK_IMPORTED_MODULE_29__["MatSortBase"]; });
97658
 
97659
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatSortMixinBase", function() { return _angular_material_sort__WEBPACK_IMPORTED_MODULE_29__["_MatSortMixinBase"]; });
97660
 
97661
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatSort", function() { return _angular_material_sort__WEBPACK_IMPORTED_MODULE_29__["MatSort"]; });
97662
 
97663
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matSortAnimations", function() { return _angular_material_sort__WEBPACK_IMPORTED_MODULE_29__["matSortAnimations"]; });
97664
 
97665
/* harmony import */ var _angular_material_stepper__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @angular/material/stepper */ "./node_modules/@angular/material/esm5/stepper.es5.js");
97666
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatStepperModule", function() { return _angular_material_stepper__WEBPACK_IMPORTED_MODULE_30__["MatStepperModule"]; });
97667
 
97668
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatStepLabel", function() { return _angular_material_stepper__WEBPACK_IMPORTED_MODULE_30__["MatStepLabel"]; });
97669
 
97670
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatStep", function() { return _angular_material_stepper__WEBPACK_IMPORTED_MODULE_30__["MatStep"]; });
97671
 
97672
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatStepper", function() { return _angular_material_stepper__WEBPACK_IMPORTED_MODULE_30__["MatStepper"]; });
97673
 
97674
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatHorizontalStepper", function() { return _angular_material_stepper__WEBPACK_IMPORTED_MODULE_30__["MatHorizontalStepper"]; });
97675
 
97676
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatVerticalStepper", function() { return _angular_material_stepper__WEBPACK_IMPORTED_MODULE_30__["MatVerticalStepper"]; });
97677
 
97678
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatStepperNext", function() { return _angular_material_stepper__WEBPACK_IMPORTED_MODULE_30__["MatStepperNext"]; });
97679
 
97680
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatStepperPrevious", function() { return _angular_material_stepper__WEBPACK_IMPORTED_MODULE_30__["MatStepperPrevious"]; });
97681
 
97682
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatStepHeader", function() { return _angular_material_stepper__WEBPACK_IMPORTED_MODULE_30__["MatStepHeader"]; });
97683
 
97684
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatStepperIntl", function() { return _angular_material_stepper__WEBPACK_IMPORTED_MODULE_30__["MatStepperIntl"]; });
97685
 
97686
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matStepperAnimations", function() { return _angular_material_stepper__WEBPACK_IMPORTED_MODULE_30__["matStepperAnimations"]; });
97687
 
97688
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatStepperIcon", function() { return _angular_material_stepper__WEBPACK_IMPORTED_MODULE_30__["MatStepperIcon"]; });
97689
 
97690
/* harmony import */ var _angular_material_table__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @angular/material/table */ "./node_modules/@angular/material/esm5/table.es5.js");
97691
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTableModule", function() { return _angular_material_table__WEBPACK_IMPORTED_MODULE_31__["MatTableModule"]; });
97692
 
97693
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCellDef", function() { return _angular_material_table__WEBPACK_IMPORTED_MODULE_31__["MatCellDef"]; });
97694
 
97695
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatHeaderCellDef", function() { return _angular_material_table__WEBPACK_IMPORTED_MODULE_31__["MatHeaderCellDef"]; });
97696
 
97697
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatFooterCellDef", function() { return _angular_material_table__WEBPACK_IMPORTED_MODULE_31__["MatFooterCellDef"]; });
97698
 
97699
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatColumnDef", function() { return _angular_material_table__WEBPACK_IMPORTED_MODULE_31__["MatColumnDef"]; });
97700
 
97701
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatHeaderCell", function() { return _angular_material_table__WEBPACK_IMPORTED_MODULE_31__["MatHeaderCell"]; });
97702
 
97703
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatFooterCell", function() { return _angular_material_table__WEBPACK_IMPORTED_MODULE_31__["MatFooterCell"]; });
97704
 
97705
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatCell", function() { return _angular_material_table__WEBPACK_IMPORTED_MODULE_31__["MatCell"]; });
97706
 
97707
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTable", function() { return _angular_material_table__WEBPACK_IMPORTED_MODULE_31__["MatTable"]; });
97708
 
97709
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatHeaderRowDef", function() { return _angular_material_table__WEBPACK_IMPORTED_MODULE_31__["MatHeaderRowDef"]; });
97710
 
97711
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatFooterRowDef", function() { return _angular_material_table__WEBPACK_IMPORTED_MODULE_31__["MatFooterRowDef"]; });
97712
 
97713
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatRowDef", function() { return _angular_material_table__WEBPACK_IMPORTED_MODULE_31__["MatRowDef"]; });
97714
 
97715
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatHeaderRow", function() { return _angular_material_table__WEBPACK_IMPORTED_MODULE_31__["MatHeaderRow"]; });
97716
 
97717
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatFooterRow", function() { return _angular_material_table__WEBPACK_IMPORTED_MODULE_31__["MatFooterRow"]; });
97718
 
97719
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatRow", function() { return _angular_material_table__WEBPACK_IMPORTED_MODULE_31__["MatRow"]; });
97720
 
97721
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTableDataSource", function() { return _angular_material_table__WEBPACK_IMPORTED_MODULE_31__["MatTableDataSource"]; });
97722
 
97723
/* harmony import */ var _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! @angular/material/tabs */ "./node_modules/@angular/material/esm5/tabs.es5.js");
97724
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ɵa24", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["ɵa24"]; });
97725
 
97726
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ɵf24", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["ɵf24"]; });
97727
 
97728
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ɵg24", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["ɵg24"]; });
97729
 
97730
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ɵb24", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["ɵb24"]; });
97731
 
97732
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ɵc24", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["ɵc24"]; });
97733
 
97734
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ɵd24", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["ɵd24"]; });
97735
 
97736
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ɵe24", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["ɵe24"]; });
97737
 
97738
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ɵj24", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["ɵj24"]; });
97739
 
97740
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ɵh24", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["ɵh24"]; });
97741
 
97742
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ɵk24", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["ɵk24"]; });
97743
 
97744
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ɵi24", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["ɵi24"]; });
97745
 
97746
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatInkBar", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["MatInkBar"]; });
97747
 
97748
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MAT_INK_BAR_POSITIONER", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["_MAT_INK_BAR_POSITIONER"]; });
97749
 
97750
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTabBody", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["MatTabBody"]; });
97751
 
97752
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTabBodyPortal", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["MatTabBodyPortal"]; });
97753
 
97754
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTabHeader", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["MatTabHeader"]; });
97755
 
97756
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTabLabelWrapper", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["MatTabLabelWrapper"]; });
97757
 
97758
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTab", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["MatTab"]; });
97759
 
97760
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTabLabel", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["MatTabLabel"]; });
97761
 
97762
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTabNav", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["MatTabNav"]; });
97763
 
97764
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTabLink", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["MatTabLink"]; });
97765
 
97766
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTabContent", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["MatTabContent"]; });
97767
 
97768
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTabsModule", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["MatTabsModule"]; });
97769
 
97770
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTabChangeEvent", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["MatTabChangeEvent"]; });
97771
 
97772
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTabGroupBase", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["MatTabGroupBase"]; });
97773
 
97774
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatTabGroupMixinBase", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["_MatTabGroupMixinBase"]; });
97775
 
97776
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTabGroup", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["MatTabGroup"]; });
97777
 
97778
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matTabsAnimations", function() { return _angular_material_tabs__WEBPACK_IMPORTED_MODULE_32__["matTabsAnimations"]; });
97779
 
97780
/* harmony import */ var _angular_material_toolbar__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! @angular/material/toolbar */ "./node_modules/@angular/material/esm5/toolbar.es5.js");
97781
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatToolbarModule", function() { return _angular_material_toolbar__WEBPACK_IMPORTED_MODULE_33__["MatToolbarModule"]; });
97782
 
97783
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatToolbarBase", function() { return _angular_material_toolbar__WEBPACK_IMPORTED_MODULE_33__["MatToolbarBase"]; });
97784
 
97785
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatToolbarMixinBase", function() { return _angular_material_toolbar__WEBPACK_IMPORTED_MODULE_33__["_MatToolbarMixinBase"]; });
97786
 
97787
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatToolbarRow", function() { return _angular_material_toolbar__WEBPACK_IMPORTED_MODULE_33__["MatToolbarRow"]; });
97788
 
97789
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatToolbar", function() { return _angular_material_toolbar__WEBPACK_IMPORTED_MODULE_33__["MatToolbar"]; });
97790
 
97791
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwToolbarMixedModesError", function() { return _angular_material_toolbar__WEBPACK_IMPORTED_MODULE_33__["throwToolbarMixedModesError"]; });
97792
 
97793
/* harmony import */ var _angular_material_tooltip__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! @angular/material/tooltip */ "./node_modules/@angular/material/esm5/tooltip.es5.js");
97794
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTooltipModule", function() { return _angular_material_tooltip__WEBPACK_IMPORTED_MODULE_34__["MatTooltipModule"]; });
97795
 
97796
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SCROLL_THROTTLE_MS", function() { return _angular_material_tooltip__WEBPACK_IMPORTED_MODULE_34__["SCROLL_THROTTLE_MS"]; });
97797
 
97798
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TOOLTIP_PANEL_CLASS", function() { return _angular_material_tooltip__WEBPACK_IMPORTED_MODULE_34__["TOOLTIP_PANEL_CLASS"]; });
97799
 
97800
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMatTooltipInvalidPositionError", function() { return _angular_material_tooltip__WEBPACK_IMPORTED_MODULE_34__["getMatTooltipInvalidPositionError"]; });
97801
 
97802
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_TOOLTIP_SCROLL_STRATEGY", function() { return _angular_material_tooltip__WEBPACK_IMPORTED_MODULE_34__["MAT_TOOLTIP_SCROLL_STRATEGY"]; });
97803
 
97804
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY", function() { return _angular_material_tooltip__WEBPACK_IMPORTED_MODULE_34__["MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY"]; });
97805
 
97806
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER", function() { return _angular_material_tooltip__WEBPACK_IMPORTED_MODULE_34__["MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER"]; });
97807
 
97808
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_TOOLTIP_DEFAULT_OPTIONS", function() { return _angular_material_tooltip__WEBPACK_IMPORTED_MODULE_34__["MAT_TOOLTIP_DEFAULT_OPTIONS"]; });
97809
 
97810
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY", function() { return _angular_material_tooltip__WEBPACK_IMPORTED_MODULE_34__["MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY"]; });
97811
 
97812
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTooltip", function() { return _angular_material_tooltip__WEBPACK_IMPORTED_MODULE_34__["MatTooltip"]; });
97813
 
97814
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TooltipComponent", function() { return _angular_material_tooltip__WEBPACK_IMPORTED_MODULE_34__["TooltipComponent"]; });
97815
 
97816
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matTooltipAnimations", function() { return _angular_material_tooltip__WEBPACK_IMPORTED_MODULE_34__["matTooltipAnimations"]; });
97817
 
97818
/* harmony import */ var _angular_material_tree__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! @angular/material/tree */ "./node_modules/@angular/material/esm5/tree.es5.js");
97819
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatTreeNodeMixinBase", function() { return _angular_material_tree__WEBPACK_IMPORTED_MODULE_35__["_MatTreeNodeMixinBase"]; });
97820
 
97821
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_MatNestedTreeNodeMixinBase", function() { return _angular_material_tree__WEBPACK_IMPORTED_MODULE_35__["_MatNestedTreeNodeMixinBase"]; });
97822
 
97823
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTreeNode", function() { return _angular_material_tree__WEBPACK_IMPORTED_MODULE_35__["MatTreeNode"]; });
97824
 
97825
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTreeNodeDef", function() { return _angular_material_tree__WEBPACK_IMPORTED_MODULE_35__["MatTreeNodeDef"]; });
97826
 
97827
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatNestedTreeNode", function() { return _angular_material_tree__WEBPACK_IMPORTED_MODULE_35__["MatNestedTreeNode"]; });
97828
 
97829
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTreeNodePadding", function() { return _angular_material_tree__WEBPACK_IMPORTED_MODULE_35__["MatTreeNodePadding"]; });
97830
 
97831
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTree", function() { return _angular_material_tree__WEBPACK_IMPORTED_MODULE_35__["MatTree"]; });
97832
 
97833
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTreeModule", function() { return _angular_material_tree__WEBPACK_IMPORTED_MODULE_35__["MatTreeModule"]; });
97834
 
97835
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTreeNodeToggle", function() { return _angular_material_tree__WEBPACK_IMPORTED_MODULE_35__["MatTreeNodeToggle"]; });
97836
 
97837
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTreeNodeOutlet", function() { return _angular_material_tree__WEBPACK_IMPORTED_MODULE_35__["MatTreeNodeOutlet"]; });
97838
 
97839
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTreeFlattener", function() { return _angular_material_tree__WEBPACK_IMPORTED_MODULE_35__["MatTreeFlattener"]; });
97840
 
97841
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTreeFlatDataSource", function() { return _angular_material_tree__WEBPACK_IMPORTED_MODULE_35__["MatTreeFlatDataSource"]; });
97842
 
97843
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatTreeNestedDataSource", function() { return _angular_material_tree__WEBPACK_IMPORTED_MODULE_35__["MatTreeNestedDataSource"]; });
97844
 
97845
/**
97846
 * @license
97847
 * Copyright Google LLC All Rights Reserved.
97848
 *
97849
 * Use of this source code is governed by an MIT-style license that can be
97850
 * found in the LICENSE file at https://angular.io/license
97851
 */
97852
 
97853
 
97854
 
97855
 
97856
 
97857
 
97858
 
97859
 
97860
 
97861
 
97862
 
97863
 
97864
 
97865
 
97866
 
97867
 
97868
 
97869
 
97870
 
97871
 
97872
 
97873
 
97874
 
97875
 
97876
 
97877
 
97878
 
97879
 
97880
 
97881
 
97882
 
97883
 
97884
 
97885
 
97886
 
97887
 
97888
 
97889
/**
97890
 * @fileoverview added by tsickle
97891
 * @suppress {checkTypes} checked by tsc
97892
 */
97893
/**
97894
 * Current version of Angular Material.
97895
 */
97896
var /** @type {?} */ VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["Version"]('6.4.5');
97897
 
97898
/**
97899
 * @fileoverview added by tsickle
97900
 * @suppress {checkTypes} checked by tsc
97901
 */
97902
 
97903
/**
97904
 * @fileoverview added by tsickle
97905
 * @suppress {checkTypes} checked by tsc
97906
 */
97907
 
97908
 
97909
//# sourceMappingURL=material.es5.js.map
97910
 
97911
 
97912
/***/ }),
97913
 
97914
/***/ "./node_modules/@angular/material/esm5/menu.es5.js":
97915
/*!*********************************************************!*\
97916
  !*** ./node_modules/@angular/material/esm5/menu.es5.js ***!
97917
  \*********************************************************/
97918
/*! exports provided: MAT_MENU_SCROLL_STRATEGY, MatMenuModule, MatMenu, MAT_MENU_DEFAULT_OPTIONS, MatMenuItem, MatMenuTrigger, matMenuAnimations, fadeInItems, transformMenu, MatMenuContent, ɵa23, ɵb23, ɵc23, ɵf23, ɵd23, ɵe23 */
97919
/***/ (function(module, __webpack_exports__, __webpack_require__) {
97920
 
97921
"use strict";
97922
__webpack_require__.r(__webpack_exports__);
97923
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_MENU_SCROLL_STRATEGY", function() { return MAT_MENU_SCROLL_STRATEGY; });
97924
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatMenuModule", function() { return MatMenuModule; });
97925
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatMenu", function() { return MatMenu; });
97926
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_MENU_DEFAULT_OPTIONS", function() { return MAT_MENU_DEFAULT_OPTIONS; });
97927
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatMenuItem", function() { return MatMenuItem; });
97928
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatMenuTrigger", function() { return MatMenuTrigger; });
97929
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matMenuAnimations", function() { return matMenuAnimations; });
97930
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fadeInItems", function() { return fadeInItems; });
97931
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transformMenu", function() { return transformMenu; });
97932
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatMenuContent", function() { return MatMenuContent; });
97933
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵa23", function() { return MAT_MENU_DEFAULT_OPTIONS_FACTORY; });
97934
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵb23", function() { return MatMenuItemBase; });
97935
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵc23", function() { return _MatMenuItemMixinBase; });
97936
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵf23", function() { return MAT_MENU_PANEL; });
97937
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵd23", function() { return MAT_MENU_SCROLL_STRATEGY_FACTORY; });
97938
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵe23", function() { return MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER; });
97939
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
97940
/* harmony import */ var _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/cdk/portal */ "./node_modules/@angular/cdk/esm5/portal.es5.js");
97941
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
97942
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
97943
/* harmony import */ var _angular_animations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/animations */ "./node_modules/@angular/animations/fesm5/animations.js");
97944
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
97945
/* harmony import */ var _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/cdk/a11y */ "./node_modules/@angular/cdk/esm5/a11y.es5.js");
97946
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
97947
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
97948
/* harmony import */ var _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/cdk/keycodes */ "./node_modules/@angular/cdk/esm5/keycodes.es5.js");
97949
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
97950
/* harmony import */ var _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/cdk/bidi */ "./node_modules/@angular/cdk/esm5/bidi.es5.js");
97951
/* harmony import */ var _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/cdk/overlay */ "./node_modules/@angular/cdk/esm5/overlay.es5.js");
97952
/**
97953
 * @license
97954
 * Copyright Google LLC All Rights Reserved.
97955
 *
97956
 * Use of this source code is governed by an MIT-style license that can be
97957
 * found in the LICENSE file at https://angular.io/license
97958
 */
97959
 
97960
 
97961
 
97962
 
97963
 
97964
 
97965
 
97966
 
97967
 
97968
 
97969
 
97970
 
97971
 
97972
 
97973
/**
97974
 * @fileoverview added by tsickle
97975
 * @suppress {checkTypes} checked by tsc
97976
 */
97977
/**
97978
 * Menu content that will be rendered lazily once the menu is opened.
97979
 */
97980
var MatMenuContent = /** @class */ (function () {
97981
    function MatMenuContent(_template, _componentFactoryResolver, _appRef, _injector, _viewContainerRef, _document) {
97982
        this._template = _template;
97983
        this._componentFactoryResolver = _componentFactoryResolver;
97984
        this._appRef = _appRef;
97985
        this._injector = _injector;
97986
        this._viewContainerRef = _viewContainerRef;
97987
        this._document = _document;
97988
        /**
97989
         * Emits when the menu content has been attached.
97990
         */
97991
        this._attached = new rxjs__WEBPACK_IMPORTED_MODULE_3__["Subject"]();
97992
    }
97993
    /**
97994
     * Attaches the content with a particular context.
97995
     * @docs-private
97996
     */
97997
    /**
97998
     * Attaches the content with a particular context.
97999
     * \@docs-private
98000
     * @param {?=} context
98001
     * @return {?}
98002
     */
98003
    MatMenuContent.prototype.attach = /**
98004
     * Attaches the content with a particular context.
98005
     * \@docs-private
98006
     * @param {?=} context
98007
     * @return {?}
98008
     */
98009
    function (context) {
98010
        if (context === void 0) { context = {}; }
98011
        if (!this._portal) {
98012
            this._portal = new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_1__["TemplatePortal"](this._template, this._viewContainerRef);
98013
        }
98014
        this.detach();
98015
        if (!this._outlet) {
98016
            this._outlet = new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_1__["DomPortalOutlet"](this._document.createElement('div'), this._componentFactoryResolver, this._appRef, this._injector);
98017
        }
98018
        var /** @type {?} */ element = this._template.elementRef.nativeElement; /** @type {?} */
98019
        ((
98020
        // Because we support opening the same menu from different triggers (which in turn have their
98021
        // own `OverlayRef` panel), we have to re-insert the host element every time, otherwise we
98022
        // risk it staying attached to a pane that's no longer in the DOM.
98023
        element.parentNode)).insertBefore(this._outlet.outletElement, element);
98024
        this._portal.attach(this._outlet, context);
98025
        this._attached.next();
98026
    };
98027
    /**
98028
     * Detaches the content.
98029
     * @docs-private
98030
     */
98031
    /**
98032
     * Detaches the content.
98033
     * \@docs-private
98034
     * @return {?}
98035
     */
98036
    MatMenuContent.prototype.detach = /**
98037
     * Detaches the content.
98038
     * \@docs-private
98039
     * @return {?}
98040
     */
98041
    function () {
98042
        if (this._portal.isAttached) {
98043
            this._portal.detach();
98044
        }
98045
    };
98046
    /**
98047
     * @return {?}
98048
     */
98049
    MatMenuContent.prototype.ngOnDestroy = /**
98050
     * @return {?}
98051
     */
98052
    function () {
98053
        if (this._outlet) {
98054
            this._outlet.dispose();
98055
        }
98056
    };
98057
    MatMenuContent.decorators = [
98058
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
98059
                    selector: 'ng-template[matMenuContent]'
98060
                },] },
98061
    ];
98062
    /** @nocollapse */
98063
    MatMenuContent.ctorParameters = function () { return [
98064
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"], },
98065
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ComponentFactoryResolver"], },
98066
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ApplicationRef"], },
98067
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"], },
98068
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
98069
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_2__["DOCUMENT"],] },] },
98070
    ]; };
98071
    return MatMenuContent;
98072
}());
98073
 
98074
/**
98075
 * @fileoverview added by tsickle
98076
 * @suppress {checkTypes} checked by tsc
98077
 */
98078
/**
98079
 * Animations used by the mat-menu component.
98080
 * Animation duration and timing values are based on:
98081
 * https://material.io/guidelines/components/menus.html#menus-usage
98082
 */
98083
var /** @type {?} */ matMenuAnimations = {
98084
    /**
98085
       * This animation controls the menu panel's entry and exit from the page.
98086
       *
98087
       * When the menu panel is added to the DOM, it scales in and fades in its border.
98088
       *
98089
       * When the menu panel is removed from the DOM, it simply fades out after a brief
98090
       * delay to display the ripple.
98091
       */
98092
    transformMenu: Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["trigger"])('transformMenu', [
98093
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["state"])('void', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["style"])({
98094
            opacity: 0,
98095
            // This starts off from 0.01, instead of 0, because there's an issue in the Angular animations
98096
            // as of 4.2, which causes the animation to be skipped if it starts from 0.
98097
            transform: 'scale(0.01, 0.01)'
98098
        })),
98099
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["transition"])('void => enter', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["sequence"])([
98100
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["query"])('.mat-menu-content', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["style"])({ opacity: 0 })),
98101
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["animate"])('100ms linear', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["style"])({ opacity: 1, transform: 'scale(1, 0.5)' })),
98102
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["group"])([
98103
                Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["query"])('.mat-menu-content', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["animate"])('400ms cubic-bezier(0.55, 0, 0.55, 0.2)', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["style"])({ opacity: 1 }))),
98104
                Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["animate"])('300ms cubic-bezier(0.25, 0.8, 0.25, 1)', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["style"])({ transform: 'scale(1, 1)' })),
98105
            ])
98106
        ])),
98107
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["transition"])('* => void', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["animate"])('150ms 50ms linear', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["style"])({ opacity: 0 })))
98108
    ]),
98109
    /**
98110
       * This animation fades in the background color and content of the menu panel
98111
       * after its containing element is scaled in.
98112
       */
98113
    fadeInItems: Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["trigger"])('fadeInItems', [
98114
        // TODO(crisbeto): this is inside the `transformMenu`
98115
        // now. Remove next time we do breaking changes.
98116
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["state"])('showing', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["style"])({ opacity: 1 })),
98117
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["transition"])('void => *', [
98118
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["style"])({ opacity: 0 }),
98119
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_4__["animate"])('400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)')
98120
        ])
98121
    ])
98122
};
98123
/**
98124
 * @deprecated
98125
 * \@breaking-change 7.0.0
98126
 */
98127
var /** @type {?} */ fadeInItems = matMenuAnimations.fadeInItems;
98128
/**
98129
 * @deprecated
98130
 * \@breaking-change 7.0.0
98131
 */
98132
var /** @type {?} */ transformMenu = matMenuAnimations.transformMenu;
98133
 
98134
/**
98135
 * @fileoverview added by tsickle
98136
 * @suppress {checkTypes} checked by tsc
98137
 */
98138
 
98139
/**
98140
 * Throws an exception for the case when menu trigger doesn't have a valid mat-menu instance
98141
 * \@docs-private
98142
 * @return {?}
98143
 */
98144
function throwMatMenuMissingError() {
98145
    throw Error("mat-menu-trigger: must pass in an mat-menu instance.\n\n    Example:\n      <mat-menu #menu=\"matMenu\"></mat-menu>\n      <button [matMenuTriggerFor]=\"menu\"></button>");
98146
}
98147
/**
98148
 * Throws an exception for the case when menu's x-position value isn't valid.
98149
 * In other words, it doesn't match 'before' or 'after'.
98150
 * \@docs-private
98151
 * @return {?}
98152
 */
98153
function throwMatMenuInvalidPositionX() {
98154
    throw Error("x-position value must be either 'before' or after'.\n      Example: <mat-menu x-position=\"before\" #menu=\"matMenu\"></mat-menu>");
98155
}
98156
/**
98157
 * Throws an exception for the case when menu's y-position value isn't valid.
98158
 * In other words, it doesn't match 'above' or 'below'.
98159
 * \@docs-private
98160
 * @return {?}
98161
 */
98162
function throwMatMenuInvalidPositionY() {
98163
    throw Error("y-position value must be either 'above' or below'.\n      Example: <mat-menu y-position=\"above\" #menu=\"matMenu\"></mat-menu>");
98164
}
98165
 
98166
/**
98167
 * @fileoverview added by tsickle
98168
 * @suppress {checkTypes} checked by tsc
98169
 */
98170
/**
98171
 * Injection token used to provide the parent menu to menu-specific components.
98172
 * \@docs-private
98173
 */
98174
var /** @type {?} */ MAT_MENU_PANEL = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('MAT_MENU_PANEL');
98175
 
98176
/**
98177
 * @fileoverview added by tsickle
98178
 * @suppress {checkTypes} checked by tsc
98179
 */
98180
/**
98181
 * \@docs-private
98182
 */
98183
var  /**
98184
 * \@docs-private
98185
 */
98186
MatMenuItemBase = /** @class */ (function () {
98187
    function MatMenuItemBase() {
98188
    }
98189
    return MatMenuItemBase;
98190
}());
98191
var /** @type {?} */ _MatMenuItemMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_7__["mixinDisableRipple"])(Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_7__["mixinDisabled"])(MatMenuItemBase));
98192
/**
98193
 * This directive is intended to be used inside an mat-menu tag.
98194
 * It exists mostly to set the role attribute.
98195
 */
98196
var MatMenuItem = /** @class */ (function (_super) {
98197
    Object(tslib__WEBPACK_IMPORTED_MODULE_5__["__extends"])(MatMenuItem, _super);
98198
    function MatMenuItem(_elementRef, document, _focusMonitor, _parentMenu) {
98199
        var _this =
98200
        // @breaking-change 7.0.0 make `_focusMonitor` and `document` required params.
98201
        _super.call(this) || this;
98202
        _this._elementRef = _elementRef;
98203
        _this._focusMonitor = _focusMonitor;
98204
        _this._parentMenu = _parentMenu;
98205
        /**
98206
         * Stream that emits when the menu item is hovered.
98207
         */
98208
        _this._hovered = new rxjs__WEBPACK_IMPORTED_MODULE_3__["Subject"]();
98209
        /**
98210
         * Whether the menu item is highlighted.
98211
         */
98212
        _this._highlighted = false;
98213
        /**
98214
         * Whether the menu item acts as a trigger for a sub-menu.
98215
         */
98216
        _this._triggersSubmenu = false;
98217
        if (_focusMonitor) {
98218
            // Start monitoring the element so it gets the appropriate focused classes. We want
98219
            // to show the focus style for menu items only when the focus was not caused by a
98220
            // mouse or touch interaction.
98221
            _focusMonitor.monitor(_this._getHostElement(), false);
98222
        }
98223
        if (_parentMenu && _parentMenu.addItem) {
98224
            _parentMenu.addItem(_this);
98225
        }
98226
        _this._document = document;
98227
        return _this;
98228
    }
98229
    /** Focuses the menu item. */
98230
    /**
98231
     * Focuses the menu item.
98232
     * @param {?=} origin
98233
     * @return {?}
98234
     */
98235
    MatMenuItem.prototype.focus = /**
98236
     * Focuses the menu item.
98237
     * @param {?=} origin
98238
     * @return {?}
98239
     */
98240
    function (origin) {
98241
        if (origin === void 0) { origin = 'program'; }
98242
        if (this._focusMonitor) {
98243
            this._focusMonitor.focusVia(this._getHostElement(), origin);
98244
        }
98245
        else {
98246
            this._getHostElement().focus();
98247
        }
98248
    };
98249
    /**
98250
     * @return {?}
98251
     */
98252
    MatMenuItem.prototype.ngOnDestroy = /**
98253
     * @return {?}
98254
     */
98255
    function () {
98256
        if (this._focusMonitor) {
98257
            this._focusMonitor.stopMonitoring(this._getHostElement());
98258
        }
98259
        if (this._parentMenu && this._parentMenu.removeItem) {
98260
            this._parentMenu.removeItem(this);
98261
        }
98262
        this._hovered.complete();
98263
    };
98264
    /** Used to set the `tabindex`. */
98265
    /**
98266
     * Used to set the `tabindex`.
98267
     * @return {?}
98268
     */
98269
    MatMenuItem.prototype._getTabIndex = /**
98270
     * Used to set the `tabindex`.
98271
     * @return {?}
98272
     */
98273
    function () {
98274
        return this.disabled ? '-1' : '0';
98275
    };
98276
    /** Returns the host DOM element. */
98277
    /**
98278
     * Returns the host DOM element.
98279
     * @return {?}
98280
     */
98281
    MatMenuItem.prototype._getHostElement = /**
98282
     * Returns the host DOM element.
98283
     * @return {?}
98284
     */
98285
    function () {
98286
        return this._elementRef.nativeElement;
98287
    };
98288
    /** Prevents the default element actions if it is disabled. */
98289
    /**
98290
     * Prevents the default element actions if it is disabled.
98291
     * @param {?} event
98292
     * @return {?}
98293
     */
98294
    MatMenuItem.prototype._checkDisabled = /**
98295
     * Prevents the default element actions if it is disabled.
98296
     * @param {?} event
98297
     * @return {?}
98298
     */
98299
    function (event) {
98300
        if (this.disabled) {
98301
            event.preventDefault();
98302
            event.stopPropagation();
98303
        }
98304
    };
98305
    /** Emits to the hover stream. */
98306
    /**
98307
     * Emits to the hover stream.
98308
     * @return {?}
98309
     */
98310
    MatMenuItem.prototype._handleMouseEnter = /**
98311
     * Emits to the hover stream.
98312
     * @return {?}
98313
     */
98314
    function () {
98315
        this._hovered.next(this);
98316
    };
98317
    /** Gets the label to be used when determining whether the option should be focused. */
98318
    /**
98319
     * Gets the label to be used when determining whether the option should be focused.
98320
     * @return {?}
98321
     */
98322
    MatMenuItem.prototype.getLabel = /**
98323
     * Gets the label to be used when determining whether the option should be focused.
98324
     * @return {?}
98325
     */
98326
    function () {
98327
        var /** @type {?} */ element = this._elementRef.nativeElement;
98328
        var /** @type {?} */ textNodeType = this._document ? this._document.TEXT_NODE : 3;
98329
        var /** @type {?} */ output = '';
98330
        if (element.childNodes) {
98331
            var /** @type {?} */ length_1 = element.childNodes.length;
98332
            // Go through all the top-level text nodes and extract their text.
98333
            // We skip anything that's not a text node to prevent the text from
98334
            // being thrown off by something like an icon.
98335
            for (var /** @type {?} */ i = 0; i < length_1; i++) {
98336
                if (element.childNodes[i].nodeType === textNodeType) {
98337
                    output += element.childNodes[i].textContent;
98338
                }
98339
            }
98340
        }
98341
        return output.trim();
98342
    };
98343
    MatMenuItem.decorators = [
98344
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: '[mat-menu-item]',
98345
                    exportAs: 'matMenuItem',
98346
                    inputs: ['disabled', 'disableRipple'],
98347
                    host: {
98348
                        'role': 'menuitem',
98349
                        'class': 'mat-menu-item',
98350
                        '[class.mat-menu-item-highlighted]': '_highlighted',
98351
                        '[class.mat-menu-item-submenu-trigger]': '_triggersSubmenu',
98352
                        '[attr.tabindex]': '_getTabIndex()',
98353
                        '[attr.aria-disabled]': 'disabled.toString()',
98354
                        '[attr.disabled]': 'disabled || null',
98355
                        '(click)': '_checkDisabled($event)',
98356
                        '(mouseenter)': '_handleMouseEnter()',
98357
                    },
98358
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
98359
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
98360
                    template: "<ng-content></ng-content><div class=\"mat-menu-ripple\" matRipple [matRippleDisabled]=\"disableRipple || disabled\" [matRippleTrigger]=\"_getHostElement()\"></div>",
98361
                },] },
98362
    ];
98363
    /** @nocollapse */
98364
    MatMenuItem.ctorParameters = function () { return [
98365
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
98366
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_2__["DOCUMENT"],] },] },
98367
        { type: _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_6__["FocusMonitor"], },
98368
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [MAT_MENU_PANEL,] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
98369
    ]; };
98370
    return MatMenuItem;
98371
}(_MatMenuItemMixinBase));
98372
 
98373
/**
98374
 * @fileoverview added by tsickle
98375
 * @suppress {checkTypes} checked by tsc
98376
 */
98377
/**
98378
 * Injection token to be used to override the default options for `mat-menu`.
98379
 */
98380
var /** @type {?} */ MAT_MENU_DEFAULT_OPTIONS = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('mat-menu-default-options', {
98381
    providedIn: 'root',
98382
    factory: MAT_MENU_DEFAULT_OPTIONS_FACTORY
98383
});
98384
/**
98385
 * \@docs-private
98386
 * @return {?}
98387
 */
98388
function MAT_MENU_DEFAULT_OPTIONS_FACTORY() {
98389
    return {
98390
        overlapTrigger: true,
98391
        xPosition: 'after',
98392
        yPosition: 'below',
98393
        backdropClass: 'cdk-overlay-transparent-backdrop',
98394
    };
98395
}
98396
/**
98397
 * Start elevation for the menu panel.
98398
 * \@docs-private
98399
 */
98400
var /** @type {?} */ MAT_MENU_BASE_ELEVATION = 2;
98401
var MatMenu = /** @class */ (function () {
98402
    function MatMenu(_elementRef, _ngZone, _defaultOptions) {
98403
        this._elementRef = _elementRef;
98404
        this._ngZone = _ngZone;
98405
        this._defaultOptions = _defaultOptions;
98406
        this._xPosition = this._defaultOptions.xPosition;
98407
        this._yPosition = this._defaultOptions.yPosition;
98408
        /**
98409
         * Menu items inside the current menu.
98410
         */
98411
        this._items = [];
98412
        /**
98413
         * Emits whenever the amount of menu items changes.
98414
         */
98415
        this._itemChanges = new rxjs__WEBPACK_IMPORTED_MODULE_3__["Subject"]();
98416
        /**
98417
         * Subscription to tab events on the menu panel
98418
         */
98419
        this._tabSubscription = rxjs__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
98420
        /**
98421
         * Config object to be passed into the menu's ngClass
98422
         */
98423
        this._classList = {};
98424
        /**
98425
         * Current state of the panel animation.
98426
         */
98427
        this._panelAnimationState = 'void';
98428
        /**
98429
         * Emits whenever an animation on the menu completes.
98430
         */
98431
        this._animationDone = new rxjs__WEBPACK_IMPORTED_MODULE_3__["Subject"]();
98432
        /**
98433
         * Class to be added to the backdrop element.
98434
         */
98435
        this.backdropClass = this._defaultOptions.backdropClass;
98436
        this._overlapTrigger = this._defaultOptions.overlapTrigger;
98437
        this._hasBackdrop = this._defaultOptions.hasBackdrop;
98438
        /**
98439
         * Event emitted when the menu is closed.
98440
         */
98441
        this.closed = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
98442
        /**
98443
         * Event emitted when the menu is closed.
98444
         * @deprecated Switch to `closed` instead
98445
         * \@breaking-change 7.0.0
98446
         */
98447
        this.close = this.closed;
98448
    }
98449
    Object.defineProperty(MatMenu.prototype, "xPosition", {
98450
        get: /**
98451
         * Position of the menu in the X axis.
98452
         * @return {?}
98453
         */
98454
        function () { return this._xPosition; },
98455
        set: /**
98456
         * @param {?} value
98457
         * @return {?}
98458
         */
98459
        function (value) {
98460
            if (value !== 'before' && value !== 'after') {
98461
                throwMatMenuInvalidPositionX();
98462
            }
98463
            this._xPosition = value;
98464
            this.setPositionClasses();
98465
        },
98466
        enumerable: true,
98467
        configurable: true
98468
    });
98469
    Object.defineProperty(MatMenu.prototype, "yPosition", {
98470
        get: /**
98471
         * Position of the menu in the Y axis.
98472
         * @return {?}
98473
         */
98474
        function () { return this._yPosition; },
98475
        set: /**
98476
         * @param {?} value
98477
         * @return {?}
98478
         */
98479
        function (value) {
98480
            if (value !== 'above' && value !== 'below') {
98481
                throwMatMenuInvalidPositionY();
98482
            }
98483
            this._yPosition = value;
98484
            this.setPositionClasses();
98485
        },
98486
        enumerable: true,
98487
        configurable: true
98488
    });
98489
    Object.defineProperty(MatMenu.prototype, "overlapTrigger", {
98490
        get: /**
98491
         * Whether the menu should overlap its trigger.
98492
         * @return {?}
98493
         */
98494
        function () { return this._overlapTrigger; },
98495
        set: /**
98496
         * @param {?} value
98497
         * @return {?}
98498
         */
98499
        function (value) {
98500
            this._overlapTrigger = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_8__["coerceBooleanProperty"])(value);
98501
        },
98502
        enumerable: true,
98503
        configurable: true
98504
    });
98505
    Object.defineProperty(MatMenu.prototype, "hasBackdrop", {
98506
        get: /**
98507
         * Whether the menu has a backdrop.
98508
         * @return {?}
98509
         */
98510
        function () { return this._hasBackdrop; },
98511
        set: /**
98512
         * @param {?} value
98513
         * @return {?}
98514
         */
98515
        function (value) {
98516
            this._hasBackdrop = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_8__["coerceBooleanProperty"])(value);
98517
        },
98518
        enumerable: true,
98519
        configurable: true
98520
    });
98521
    Object.defineProperty(MatMenu.prototype, "panelClass", {
98522
        set: /**
98523
         * This method takes classes set on the host mat-menu element and applies them on the
98524
         * menu template that displays in the overlay container.  Otherwise, it's difficult
98525
         * to style the containing menu from outside the component.
98526
         * @param {?} classes list of class names
98527
         * @return {?}
98528
         */
98529
        function (classes) {
98530
            if (classes && classes.length) {
98531
                this._classList = classes.split(' ').reduce(function (obj, className) {
98532
                    obj[className] = true;
98533
                    return obj;
98534
                }, {});
98535
                this._elementRef.nativeElement.className = '';
98536
            }
98537
        },
98538
        enumerable: true,
98539
        configurable: true
98540
    });
98541
    Object.defineProperty(MatMenu.prototype, "classList", {
98542
        get: /**
98543
         * This method takes classes set on the host mat-menu element and applies them on the
98544
         * menu template that displays in the overlay container.  Otherwise, it's difficult
98545
         * to style the containing menu from outside the component.
98546
         * @deprecated Use `panelClass` instead.
98547
         * \@breaking-change 7.0.0
98548
         * @return {?}
98549
         */
98550
        function () { return this.panelClass; },
98551
        set: /**
98552
         * @param {?} classes
98553
         * @return {?}
98554
         */
98555
        function (classes) { this.panelClass = classes; },
98556
        enumerable: true,
98557
        configurable: true
98558
    });
98559
    /**
98560
     * @return {?}
98561
     */
98562
    MatMenu.prototype.ngOnInit = /**
98563
     * @return {?}
98564
     */
98565
    function () {
98566
        this.setPositionClasses();
98567
    };
98568
    /**
98569
     * @return {?}
98570
     */
98571
    MatMenu.prototype.ngAfterContentInit = /**
98572
     * @return {?}
98573
     */
98574
    function () {
98575
        var _this = this;
98576
        this._keyManager = new _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_6__["FocusKeyManager"](this._items).withWrap().withTypeAhead();
98577
        this._tabSubscription = this._keyManager.tabOut.subscribe(function () { return _this.closed.emit('tab'); });
98578
    };
98579
    /**
98580
     * @return {?}
98581
     */
98582
    MatMenu.prototype.ngOnDestroy = /**
98583
     * @return {?}
98584
     */
98585
    function () {
98586
        this._tabSubscription.unsubscribe();
98587
        this.closed.complete();
98588
    };
98589
    /** Stream that emits whenever the hovered menu item changes. */
98590
    /**
98591
     * Stream that emits whenever the hovered menu item changes.
98592
     * @return {?}
98593
     */
98594
    MatMenu.prototype._hovered = /**
98595
     * Stream that emits whenever the hovered menu item changes.
98596
     * @return {?}
98597
     */
98598
    function () {
98599
        return this._itemChanges.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["startWith"])(this._items), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["switchMap"])(function (items) { return rxjs__WEBPACK_IMPORTED_MODULE_3__["merge"].apply(void 0, items.map(function (item) { return item._hovered; })); }));
98600
    };
98601
    /** Handle a keyboard event from the menu, delegating to the appropriate action. */
98602
    /**
98603
     * Handle a keyboard event from the menu, delegating to the appropriate action.
98604
     * @param {?} event
98605
     * @return {?}
98606
     */
98607
    MatMenu.prototype._handleKeydown = /**
98608
     * Handle a keyboard event from the menu, delegating to the appropriate action.
98609
     * @param {?} event
98610
     * @return {?}
98611
     */
98612
    function (event) {
98613
        var /** @type {?} */ keyCode = event.keyCode;
98614
        switch (keyCode) {
98615
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__["ESCAPE"]:
98616
                this.closed.emit('keydown');
98617
                event.stopPropagation();
98618
                break;
98619
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__["LEFT_ARROW"]:
98620
                if (this.parentMenu && this.direction === 'ltr') {
98621
                    this.closed.emit('keydown');
98622
                }
98623
                break;
98624
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__["RIGHT_ARROW"]:
98625
                if (this.parentMenu && this.direction === 'rtl') {
98626
                    this.closed.emit('keydown');
98627
                }
98628
                break;
98629
            default:
98630
                if (keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__["UP_ARROW"] || keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__["DOWN_ARROW"]) {
98631
                    this._keyManager.setFocusOrigin('keyboard');
98632
                }
98633
                this._keyManager.onKeydown(event);
98634
        }
98635
    };
98636
    /**
98637
     * Focus the first item in the menu.
98638
     * @param origin Action from which the focus originated. Used to set the correct styling.
98639
     */
98640
    /**
98641
     * Focus the first item in the menu.
98642
     * @param {?=} origin Action from which the focus originated. Used to set the correct styling.
98643
     * @return {?}
98644
     */
98645
    MatMenu.prototype.focusFirstItem = /**
98646
     * Focus the first item in the menu.
98647
     * @param {?=} origin Action from which the focus originated. Used to set the correct styling.
98648
     * @return {?}
98649
     */
98650
    function (origin) {
98651
        var _this = this;
98652
        if (origin === void 0) { origin = 'program'; }
98653
        // When the content is rendered lazily, it takes a bit before the items are inside the DOM.
98654
        if (this.lazyContent) {
98655
            this._ngZone.onStable.asObservable()
98656
                .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["take"])(1))
98657
                .subscribe(function () { return _this._keyManager.setFocusOrigin(origin).setFirstItemActive(); });
98658
        }
98659
        else {
98660
            this._keyManager.setFocusOrigin(origin).setFirstItemActive();
98661
        }
98662
    };
98663
    /**
98664
     * Resets the active item in the menu. This is used when the menu is opened, allowing
98665
     * the user to start from the first option when pressing the down arrow.
98666
     */
98667
    /**
98668
     * Resets the active item in the menu. This is used when the menu is opened, allowing
98669
     * the user to start from the first option when pressing the down arrow.
98670
     * @return {?}
98671
     */
98672
    MatMenu.prototype.resetActiveItem = /**
98673
     * Resets the active item in the menu. This is used when the menu is opened, allowing
98674
     * the user to start from the first option when pressing the down arrow.
98675
     * @return {?}
98676
     */
98677
    function () {
98678
        this._keyManager.setActiveItem(-1);
98679
    };
98680
    /**
98681
     * Sets the menu panel elevation.
98682
     * @param depth Number of parent menus that come before the menu.
98683
     */
98684
    /**
98685
     * Sets the menu panel elevation.
98686
     * @param {?} depth Number of parent menus that come before the menu.
98687
     * @return {?}
98688
     */
98689
    MatMenu.prototype.setElevation = /**
98690
     * Sets the menu panel elevation.
98691
     * @param {?} depth Number of parent menus that come before the menu.
98692
     * @return {?}
98693
     */
98694
    function (depth) {
98695
        // The elevation starts at the base and increases by one for each level.
98696
        var /** @type {?} */ newElevation = "mat-elevation-z" + (MAT_MENU_BASE_ELEVATION + depth);
98697
        var /** @type {?} */ customElevation = Object.keys(this._classList).find(function (c) { return c.startsWith('mat-elevation-z'); });
98698
        if (!customElevation || customElevation === this._previousElevation) {
98699
            if (this._previousElevation) {
98700
                this._classList[this._previousElevation] = false;
98701
            }
98702
            this._classList[newElevation] = true;
98703
            this._previousElevation = newElevation;
98704
        }
98705
    };
98706
    /**
98707
     * Registers a menu item with the menu.
98708
     * @docs-private
98709
     */
98710
    /**
98711
     * Registers a menu item with the menu.
98712
     * \@docs-private
98713
     * @param {?} item
98714
     * @return {?}
98715
     */
98716
    MatMenu.prototype.addItem = /**
98717
     * Registers a menu item with the menu.
98718
     * \@docs-private
98719
     * @param {?} item
98720
     * @return {?}
98721
     */
98722
    function (item) {
98723
        // We register the items through this method, rather than picking them up through
98724
        // `ContentChildren`, because we need the items to be picked up by their closest
98725
        // `mat-menu` ancestor. If we used `@ContentChildren(MatMenuItem, {descendants: true})`,
98726
        // all descendant items will bleed into the top-level menu in the case where the consumer
98727
        // has `mat-menu` instances nested inside each other.
98728
        if (this._items.indexOf(item) === -1) {
98729
            this._items.push(item);
98730
            this._itemChanges.next(this._items);
98731
        }
98732
    };
98733
    /**
98734
     * Removes an item from the menu.
98735
     * @docs-private
98736
     */
98737
    /**
98738
     * Removes an item from the menu.
98739
     * \@docs-private
98740
     * @param {?} item
98741
     * @return {?}
98742
     */
98743
    MatMenu.prototype.removeItem = /**
98744
     * Removes an item from the menu.
98745
     * \@docs-private
98746
     * @param {?} item
98747
     * @return {?}
98748
     */
98749
    function (item) {
98750
        var /** @type {?} */ index = this._items.indexOf(item);
98751
        if (this._items.indexOf(item) > -1) {
98752
            this._items.splice(index, 1);
98753
            this._itemChanges.next(this._items);
98754
        }
98755
    };
98756
    /**
98757
     * Adds classes to the menu panel based on its position. Can be used by
98758
     * consumers to add specific styling based on the position.
98759
     * @param posX Position of the menu along the x axis.
98760
     * @param posY Position of the menu along the y axis.
98761
     * @docs-private
98762
     */
98763
    /**
98764
     * Adds classes to the menu panel based on its position. Can be used by
98765
     * consumers to add specific styling based on the position.
98766
     * \@docs-private
98767
     * @param {?=} posX Position of the menu along the x axis.
98768
     * @param {?=} posY Position of the menu along the y axis.
98769
     * @return {?}
98770
     */
98771
    MatMenu.prototype.setPositionClasses = /**
98772
     * Adds classes to the menu panel based on its position. Can be used by
98773
     * consumers to add specific styling based on the position.
98774
     * \@docs-private
98775
     * @param {?=} posX Position of the menu along the x axis.
98776
     * @param {?=} posY Position of the menu along the y axis.
98777
     * @return {?}
98778
     */
98779
    function (posX, posY) {
98780
        if (posX === void 0) { posX = this.xPosition; }
98781
        if (posY === void 0) { posY = this.yPosition; }
98782
        var /** @type {?} */ classes = this._classList;
98783
        classes['mat-menu-before'] = posX === 'before';
98784
        classes['mat-menu-after'] = posX === 'after';
98785
        classes['mat-menu-above'] = posY === 'above';
98786
        classes['mat-menu-below'] = posY === 'below';
98787
    };
98788
    /** Starts the enter animation. */
98789
    /**
98790
     * Starts the enter animation.
98791
     * @return {?}
98792
     */
98793
    MatMenu.prototype._startAnimation = /**
98794
     * Starts the enter animation.
98795
     * @return {?}
98796
     */
98797
    function () {
98798
        // @breaking-change 7.0.0 Combine with _resetAnimation.
98799
        this._panelAnimationState = 'enter';
98800
    };
98801
    /** Resets the panel animation to its initial state. */
98802
    /**
98803
     * Resets the panel animation to its initial state.
98804
     * @return {?}
98805
     */
98806
    MatMenu.prototype._resetAnimation = /**
98807
     * Resets the panel animation to its initial state.
98808
     * @return {?}
98809
     */
98810
    function () {
98811
        // @breaking-change 7.0.0 Combine with _startAnimation.
98812
        this._panelAnimationState = 'void';
98813
    };
98814
    /** Callback that is invoked when the panel animation completes. */
98815
    /**
98816
     * Callback that is invoked when the panel animation completes.
98817
     * @param {?} event
98818
     * @return {?}
98819
     */
98820
    MatMenu.prototype._onAnimationDone = /**
98821
     * Callback that is invoked when the panel animation completes.
98822
     * @param {?} event
98823
     * @return {?}
98824
     */
98825
    function (event) {
98826
        this._animationDone.next(event);
98827
        this._isAnimating = false;
98828
        // Scroll the content element to the top once the animation is done. This is necessary, because
98829
        // we move focus to the first item while it's still being animated, which can throw the browser
98830
        // off when it determines the scroll position. Alternatively we can move focus when the
98831
        // animation is done, however moving focus asynchronously will interrupt screen readers
98832
        // which are in the process of reading out the menu already. We take the `element` from
98833
        // the `event` since we can't use a `ViewChild` to access the pane.
98834
        if (event.toState === 'enter' && this._keyManager.activeItemIndex === 0) {
98835
            event.element.scrollTop = 0;
98836
        }
98837
    };
98838
    MatMenu.decorators = [
98839
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-menu',
98840
                    template: "<ng-template><div class=\"mat-menu-panel\" [ngClass]=\"_classList\" (keydown)=\"_handleKeydown($event)\" (click)=\"closed.emit('click')\" [@transformMenu]=\"_panelAnimationState\" (@transformMenu.start)=\"_isAnimating = true\" (@transformMenu.done)=\"_onAnimationDone($event)\" tabindex=\"-1\" role=\"menu\"><div class=\"mat-menu-content\"><ng-content></ng-content></div></div></ng-template>",
98841
                    styles: [".mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:2px;outline:0}.mat-menu-panel:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}@media screen and (-ms-high-contrast:active){.mat-menu-panel{outline:solid 1px}}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}@media screen and (-ms-high-contrast:active){.mat-menu-item-highlighted,.mat-menu-item.cdk-keyboard-focused,.mat-menu-item.cdk-program-focused{outline:dotted 1px}}.mat-menu-item-submenu-trigger{padding-right:32px}.mat-menu-item-submenu-trigger::after{width:0;height:0;border-style:solid;border-width:5px 0 5px 5px;border-color:transparent transparent transparent currentColor;content:'';display:inline-block;position:absolute;top:50%;right:16px;transform:translateY(-50%)}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}[dir=rtl] .mat-menu-item-submenu-trigger::after{right:auto;left:16px;transform:rotateY(180deg) translateY(-50%)}.mat-menu-panel.ng-animating .mat-menu-item-submenu-trigger{pointer-events:none}button.mat-menu-item{width:100%}.mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}"],
98842
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
98843
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
98844
                    exportAs: 'matMenu',
98845
                    animations: [
98846
                        matMenuAnimations.transformMenu,
98847
                        matMenuAnimations.fadeInItems
98848
                    ],
98849
                    providers: [
98850
                        { provide: MAT_MENU_PANEL, useExisting: MatMenu }
98851
                    ]
98852
                },] },
98853
    ];
98854
    /** @nocollapse */
98855
    MatMenu.ctorParameters = function () { return [
98856
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
98857
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], },
98858
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [MAT_MENU_DEFAULT_OPTIONS,] },] },
98859
    ]; };
98860
    MatMenu.propDecorators = {
98861
        "backdropClass": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
98862
        "xPosition": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
98863
        "yPosition": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
98864
        "templateRef": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"],] },],
98865
        "items": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"], args: [MatMenuItem,] },],
98866
        "lazyContent": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"], args: [MatMenuContent,] },],
98867
        "overlapTrigger": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
98868
        "hasBackdrop": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
98869
        "panelClass": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['class',] },],
98870
        "classList": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
98871
        "closed": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
98872
        "close": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
98873
    };
98874
    return MatMenu;
98875
}());
98876
 
98877
/**
98878
 * @fileoverview added by tsickle
98879
 * @suppress {checkTypes} checked by tsc
98880
 */
98881
/**
98882
 * Injection token that determines the scroll handling while the menu is open.
98883
 */
98884
var /** @type {?} */ MAT_MENU_SCROLL_STRATEGY = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('mat-menu-scroll-strategy');
98885
/**
98886
 * \@docs-private
98887
 * @param {?} overlay
98888
 * @return {?}
98889
 */
98890
function MAT_MENU_SCROLL_STRATEGY_FACTORY(overlay) {
98891
    return function () { return overlay.scrollStrategies.reposition(); };
98892
}
98893
/**
98894
 * \@docs-private
98895
 */
98896
var /** @type {?} */ MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER = {
98897
    provide: MAT_MENU_SCROLL_STRATEGY,
98898
    deps: [_angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_12__["Overlay"]],
98899
    useFactory: MAT_MENU_SCROLL_STRATEGY_FACTORY,
98900
};
98901
/**
98902
 * Default top padding of the menu panel.
98903
 */
98904
var /** @type {?} */ MENU_PANEL_TOP_PADDING = 8;
98905
/**
98906
 * This directive is intended to be used in conjunction with an mat-menu tag.  It is
98907
 * responsible for toggling the display of the provided menu instance.
98908
 */
98909
var MatMenuTrigger = /** @class */ (function () {
98910
    function MatMenuTrigger(_overlay, _element, _viewContainerRef, _scrollStrategy, _parentMenu, _menuItemInstance, _dir, _focusMonitor) {
98911
        this._overlay = _overlay;
98912
        this._element = _element;
98913
        this._viewContainerRef = _viewContainerRef;
98914
        this._scrollStrategy = _scrollStrategy;
98915
        this._parentMenu = _parentMenu;
98916
        this._menuItemInstance = _menuItemInstance;
98917
        this._dir = _dir;
98918
        this._focusMonitor = _focusMonitor;
98919
        this._overlayRef = null;
98920
        this._menuOpen = false;
98921
        this._closeSubscription = rxjs__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
98922
        this._hoverSubscription = rxjs__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
98923
        this._openedByMouse = false;
98924
        /**
98925
         * Event emitted when the associated menu is opened.
98926
         */
98927
        this.menuOpened = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
98928
        /**
98929
         * Event emitted when the associated menu is opened.
98930
         * @deprecated Switch to `menuOpened` instead
98931
         * \@breaking-change 7.0.0
98932
         */
98933
        this.onMenuOpen = this.menuOpened;
98934
        /**
98935
         * Event emitted when the associated menu is closed.
98936
         */
98937
        this.menuClosed = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
98938
        /**
98939
         * Event emitted when the associated menu is closed.
98940
         * @deprecated Switch to `menuClosed` instead
98941
         * \@breaking-change 7.0.0
98942
         */
98943
        this.onMenuClose = this.menuClosed;
98944
        if (_menuItemInstance) {
98945
            _menuItemInstance._triggersSubmenu = this.triggersSubmenu();
98946
        }
98947
    }
98948
    Object.defineProperty(MatMenuTrigger.prototype, "_deprecatedMatMenuTriggerFor", {
98949
        get: /**
98950
         * @deprecated
98951
         * \@breaking-change 7.0.0
98952
         * @return {?}
98953
         */
98954
        function () {
98955
            return this.menu;
98956
        },
98957
        set: /**
98958
         * @param {?} v
98959
         * @return {?}
98960
         */
98961
        function (v) {
98962
            this.menu = v;
98963
        },
98964
        enumerable: true,
98965
        configurable: true
98966
    });
98967
    /**
98968
     * @return {?}
98969
     */
98970
    MatMenuTrigger.prototype.ngAfterContentInit = /**
98971
     * @return {?}
98972
     */
98973
    function () {
98974
        var _this = this;
98975
        this._checkMenu();
98976
        this.menu.close.subscribe(function (reason) {
98977
            _this._destroyMenu();
98978
            // If a click closed the menu, we should close the entire chain of nested menus.
98979
            if ((reason === 'click' || reason === 'tab') && _this._parentMenu) {
98980
                _this._parentMenu.closed.emit(reason);
98981
            }
98982
        });
98983
        this._handleHover();
98984
    };
98985
    /**
98986
     * @return {?}
98987
     */
98988
    MatMenuTrigger.prototype.ngOnDestroy = /**
98989
     * @return {?}
98990
     */
98991
    function () {
98992
        if (this._overlayRef) {
98993
            this._overlayRef.dispose();
98994
            this._overlayRef = null;
98995
        }
98996
        this._cleanUpSubscriptions();
98997
    };
98998
    Object.defineProperty(MatMenuTrigger.prototype, "menuOpen", {
98999
        /** Whether the menu is open. */
99000
        get: /**
99001
         * Whether the menu is open.
99002
         * @return {?}
99003
         */
99004
        function () {
99005
            return this._menuOpen;
99006
        },
99007
        enumerable: true,
99008
        configurable: true
99009
    });
99010
    Object.defineProperty(MatMenuTrigger.prototype, "dir", {
99011
        /** The text direction of the containing app. */
99012
        get: /**
99013
         * The text direction of the containing app.
99014
         * @return {?}
99015
         */
99016
        function () {
99017
            return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';
99018
        },
99019
        enumerable: true,
99020
        configurable: true
99021
    });
99022
    /** Whether the menu triggers a sub-menu or a top-level one. */
99023
    /**
99024
     * Whether the menu triggers a sub-menu or a top-level one.
99025
     * @return {?}
99026
     */
99027
    MatMenuTrigger.prototype.triggersSubmenu = /**
99028
     * Whether the menu triggers a sub-menu or a top-level one.
99029
     * @return {?}
99030
     */
99031
    function () {
99032
        return !!(this._menuItemInstance && this._parentMenu);
99033
    };
99034
    /** Toggles the menu between the open and closed states. */
99035
    /**
99036
     * Toggles the menu between the open and closed states.
99037
     * @return {?}
99038
     */
99039
    MatMenuTrigger.prototype.toggleMenu = /**
99040
     * Toggles the menu between the open and closed states.
99041
     * @return {?}
99042
     */
99043
    function () {
99044
        return this._menuOpen ? this.closeMenu() : this.openMenu();
99045
    };
99046
    /** Opens the menu. */
99047
    /**
99048
     * Opens the menu.
99049
     * @return {?}
99050
     */
99051
    MatMenuTrigger.prototype.openMenu = /**
99052
     * Opens the menu.
99053
     * @return {?}
99054
     */
99055
    function () {
99056
        var _this = this;
99057
        if (this._menuOpen) {
99058
            return;
99059
        }
99060
        var /** @type {?} */ overlayRef = this._createOverlay();
99061
        this._setPosition(/** @type {?} */ (overlayRef.getConfig().positionStrategy));
99062
        overlayRef.attach(this._portal);
99063
        if (this.menu.lazyContent) {
99064
            this.menu.lazyContent.attach(this.menuData);
99065
        }
99066
        this._closeSubscription = this._menuClosingActions().subscribe(function () { return _this.closeMenu(); });
99067
        this._initMenu();
99068
        if (this.menu instanceof MatMenu) {
99069
            this.menu._startAnimation();
99070
        }
99071
    };
99072
    /** Closes the menu. */
99073
    /**
99074
     * Closes the menu.
99075
     * @return {?}
99076
     */
99077
    MatMenuTrigger.prototype.closeMenu = /**
99078
     * Closes the menu.
99079
     * @return {?}
99080
     */
99081
    function () {
99082
        this.menu.close.emit();
99083
    };
99084
    /**
99085
     * Focuses the menu trigger.
99086
     * @param origin Source of the menu trigger's focus.
99087
     */
99088
    /**
99089
     * Focuses the menu trigger.
99090
     * @param {?=} origin Source of the menu trigger's focus.
99091
     * @return {?}
99092
     */
99093
    MatMenuTrigger.prototype.focus = /**
99094
     * Focuses the menu trigger.
99095
     * @param {?=} origin Source of the menu trigger's focus.
99096
     * @return {?}
99097
     */
99098
    function (origin) {
99099
        if (origin === void 0) { origin = 'program'; }
99100
        if (this._focusMonitor) {
99101
            this._focusMonitor.focusVia(this._element.nativeElement, origin);
99102
        }
99103
        else {
99104
            this._element.nativeElement.focus();
99105
        }
99106
    };
99107
    /**
99108
     * Closes the menu and does the necessary cleanup.
99109
     * @return {?}
99110
     */
99111
    MatMenuTrigger.prototype._destroyMenu = /**
99112
     * Closes the menu and does the necessary cleanup.
99113
     * @return {?}
99114
     */
99115
    function () {
99116
        var _this = this;
99117
        if (!this._overlayRef || !this.menuOpen) {
99118
            return;
99119
        }
99120
        var /** @type {?} */ menu = this.menu;
99121
        this._closeSubscription.unsubscribe();
99122
        this._overlayRef.detach();
99123
        if (menu instanceof MatMenu) {
99124
            menu._resetAnimation();
99125
            if (menu.lazyContent) {
99126
                // Wait for the exit animation to finish before detaching the content.
99127
                menu._animationDone
99128
                    .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["filter"])(function (event) { return event.toState === 'void'; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["take"])(1),
99129
                // Interrupt if the content got re-attached.
99130
                Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["takeUntil"])(menu.lazyContent._attached))
99131
                    .subscribe(function () { return ((menu.lazyContent)).detach(); }, undefined, function () {
99132
                    // No matter whether the content got re-attached, reset the menu.
99133
                    // No matter whether the content got re-attached, reset the menu.
99134
                    _this._resetMenu();
99135
                });
99136
            }
99137
            else {
99138
                this._resetMenu();
99139
            }
99140
        }
99141
        else {
99142
            this._resetMenu();
99143
            if (menu.lazyContent) {
99144
                menu.lazyContent.detach();
99145
            }
99146
        }
99147
    };
99148
    /**
99149
     * This method sets the menu state to open and focuses the first item if
99150
     * the menu was opened via the keyboard.
99151
     * @return {?}
99152
     */
99153
    MatMenuTrigger.prototype._initMenu = /**
99154
     * This method sets the menu state to open and focuses the first item if
99155
     * the menu was opened via the keyboard.
99156
     * @return {?}
99157
     */
99158
    function () {
99159
        this.menu.parentMenu = this.triggersSubmenu() ? this._parentMenu : undefined;
99160
        this.menu.direction = this.dir;
99161
        this._setMenuElevation();
99162
        this._setIsMenuOpen(true);
99163
        this.menu.focusFirstItem(this._openedByMouse ? 'mouse' : 'program');
99164
    };
99165
    /**
99166
     * Updates the menu elevation based on the amount of parent menus that it has.
99167
     * @return {?}
99168
     */
99169
    MatMenuTrigger.prototype._setMenuElevation = /**
99170
     * Updates the menu elevation based on the amount of parent menus that it has.
99171
     * @return {?}
99172
     */
99173
    function () {
99174
        if (this.menu.setElevation) {
99175
            var /** @type {?} */ depth = 0;
99176
            var /** @type {?} */ parentMenu = this.menu.parentMenu;
99177
            while (parentMenu) {
99178
                depth++;
99179
                parentMenu = parentMenu.parentMenu;
99180
            }
99181
            this.menu.setElevation(depth);
99182
        }
99183
    };
99184
    /**
99185
     * This method resets the menu when it's closed, most importantly restoring
99186
     * focus to the menu trigger if the menu was opened via the keyboard.
99187
     * @return {?}
99188
     */
99189
    MatMenuTrigger.prototype._resetMenu = /**
99190
     * This method resets the menu when it's closed, most importantly restoring
99191
     * focus to the menu trigger if the menu was opened via the keyboard.
99192
     * @return {?}
99193
     */
99194
    function () {
99195
        this._setIsMenuOpen(false);
99196
        // We should reset focus if the user is navigating using a keyboard or
99197
        // if we have a top-level trigger which might cause focus to be lost
99198
        // when clicking on the backdrop.
99199
        if (!this._openedByMouse) {
99200
            // Note that the focus style will show up both for `program` and
99201
            // `keyboard` so we don't have to specify which one it is.
99202
            this.focus();
99203
        }
99204
        else if (!this.triggersSubmenu()) {
99205
            this.focus('mouse');
99206
        }
99207
        this._openedByMouse = false;
99208
    };
99209
    /**
99210
     * @param {?} isOpen
99211
     * @return {?}
99212
     */
99213
    MatMenuTrigger.prototype._setIsMenuOpen = /**
99214
     * @param {?} isOpen
99215
     * @return {?}
99216
     */
99217
    function (isOpen) {
99218
        this._menuOpen = isOpen;
99219
        this._menuOpen ? this.menuOpened.emit() : this.menuClosed.emit();
99220
        if (this.triggersSubmenu()) {
99221
            this._menuItemInstance._highlighted = isOpen;
99222
        }
99223
    };
99224
    /**
99225
     * This method checks that a valid instance of MatMenu has been passed into
99226
     * matMenuTriggerFor. If not, an exception is thrown.
99227
     * @return {?}
99228
     */
99229
    MatMenuTrigger.prototype._checkMenu = /**
99230
     * This method checks that a valid instance of MatMenu has been passed into
99231
     * matMenuTriggerFor. If not, an exception is thrown.
99232
     * @return {?}
99233
     */
99234
    function () {
99235
        if (!this.menu) {
99236
            throwMatMenuMissingError();
99237
        }
99238
    };
99239
    /**
99240
     * This method creates the overlay from the provided menu's template and saves its
99241
     * OverlayRef so that it can be attached to the DOM when openMenu is called.
99242
     * @return {?}
99243
     */
99244
    MatMenuTrigger.prototype._createOverlay = /**
99245
     * This method creates the overlay from the provided menu's template and saves its
99246
     * OverlayRef so that it can be attached to the DOM when openMenu is called.
99247
     * @return {?}
99248
     */
99249
    function () {
99250
        if (!this._overlayRef) {
99251
            this._portal = new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_1__["TemplatePortal"](this.menu.templateRef, this._viewContainerRef);
99252
            var /** @type {?} */ config = this._getOverlayConfig();
99253
            this._subscribeToPositions(/** @type {?} */ (config.positionStrategy));
99254
            this._overlayRef = this._overlay.create(config);
99255
        }
99256
        return this._overlayRef;
99257
    };
99258
    /**
99259
     * This method builds the configuration object needed to create the overlay, the OverlayState.
99260
     * @return {?} OverlayConfig
99261
     */
99262
    MatMenuTrigger.prototype._getOverlayConfig = /**
99263
     * This method builds the configuration object needed to create the overlay, the OverlayState.
99264
     * @return {?} OverlayConfig
99265
     */
99266
    function () {
99267
        return new _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_12__["OverlayConfig"]({
99268
            positionStrategy: this._overlay.position()
99269
                .flexibleConnectedTo(this._element)
99270
                .withTransformOriginOn('.mat-menu-panel'),
99271
            hasBackdrop: this.menu.hasBackdrop == null ? !this.triggersSubmenu() : this.menu.hasBackdrop,
99272
            backdropClass: this.menu.backdropClass || 'cdk-overlay-transparent-backdrop',
99273
            scrollStrategy: this._scrollStrategy(),
99274
            direction: this._dir
99275
        });
99276
    };
99277
    /**
99278
     * Listens to changes in the position of the overlay and sets the correct classes
99279
     * on the menu based on the new position. This ensures the animation origin is always
99280
     * correct, even if a fallback position is used for the overlay.
99281
     * @param {?} position
99282
     * @return {?}
99283
     */
99284
    MatMenuTrigger.prototype._subscribeToPositions = /**
99285
     * Listens to changes in the position of the overlay and sets the correct classes
99286
     * on the menu based on the new position. This ensures the animation origin is always
99287
     * correct, even if a fallback position is used for the overlay.
99288
     * @param {?} position
99289
     * @return {?}
99290
     */
99291
    function (position) {
99292
        var _this = this;
99293
        if (this.menu.setPositionClasses) {
99294
            position.positionChanges.subscribe(function (change) {
99295
                var /** @type {?} */ posX = change.connectionPair.overlayX === 'start' ? 'after' : 'before';
99296
                var /** @type {?} */ posY = change.connectionPair.overlayY === 'top' ? 'below' : 'above'; /** @type {?} */
99297
                ((_this.menu.setPositionClasses))(posX, posY);
99298
            });
99299
        }
99300
    };
99301
    /**
99302
     * Sets the appropriate positions on a position strategy
99303
     * so the overlay connects with the trigger correctly.
99304
     * @param {?} positionStrategy Strategy whose position to update.
99305
     * @return {?}
99306
     */
99307
    MatMenuTrigger.prototype._setPosition = /**
99308
     * Sets the appropriate positions on a position strategy
99309
     * so the overlay connects with the trigger correctly.
99310
     * @param {?} positionStrategy Strategy whose position to update.
99311
     * @return {?}
99312
     */
99313
    function (positionStrategy) {
99314
        var _a = this.menu.xPosition === 'before' ? ['end', 'start'] : ['start', 'end'], originX = _a[0], originFallbackX = _a[1];
99315
        var _b = this.menu.yPosition === 'above' ? ['bottom', 'top'] : ['top', 'bottom'], overlayY = _b[0], overlayFallbackY = _b[1];
99316
        var _c = [overlayY, overlayFallbackY], originY = _c[0], originFallbackY = _c[1];
99317
        var _d = [originX, originFallbackX], overlayX = _d[0], overlayFallbackX = _d[1];
99318
        var /** @type {?} */ offsetY = 0;
99319
        if (this.triggersSubmenu()) {
99320
            // When the menu is a sub-menu, it should always align itself
99321
            // to the edges of the trigger, instead of overlapping it.
99322
            overlayFallbackX = originX = this.menu.xPosition === 'before' ? 'start' : 'end';
99323
            originFallbackX = overlayX = originX === 'end' ? 'start' : 'end';
99324
            offsetY = overlayY === 'bottom' ? MENU_PANEL_TOP_PADDING : -MENU_PANEL_TOP_PADDING;
99325
        }
99326
        else if (!this.menu.overlapTrigger) {
99327
            originY = overlayY === 'top' ? 'bottom' : 'top';
99328
            originFallbackY = overlayFallbackY === 'top' ? 'bottom' : 'top';
99329
        }
99330
        positionStrategy.withPositions([
99331
            { originX: originX, originY: originY, overlayX: overlayX, overlayY: overlayY, offsetY: offsetY },
99332
            { originX: originFallbackX, originY: originY, overlayX: overlayFallbackX, overlayY: overlayY, offsetY: offsetY },
99333
            {
99334
                originX: originX,
99335
                originY: originFallbackY,
99336
                overlayX: overlayX,
99337
                overlayY: overlayFallbackY,
99338
                offsetY: -offsetY
99339
            },
99340
            {
99341
                originX: originFallbackX,
99342
                originY: originFallbackY,
99343
                overlayX: overlayFallbackX,
99344
                overlayY: overlayFallbackY,
99345
                offsetY: -offsetY
99346
            }
99347
        ]);
99348
    };
99349
    /**
99350
     * Cleans up the active subscriptions.
99351
     * @return {?}
99352
     */
99353
    MatMenuTrigger.prototype._cleanUpSubscriptions = /**
99354
     * Cleans up the active subscriptions.
99355
     * @return {?}
99356
     */
99357
    function () {
99358
        this._closeSubscription.unsubscribe();
99359
        this._hoverSubscription.unsubscribe();
99360
    };
99361
    /**
99362
     * Returns a stream that emits whenever an action that should close the menu occurs.
99363
     * @return {?}
99364
     */
99365
    MatMenuTrigger.prototype._menuClosingActions = /**
99366
     * Returns a stream that emits whenever an action that should close the menu occurs.
99367
     * @return {?}
99368
     */
99369
    function () {
99370
        var _this = this;
99371
        var /** @type {?} */ backdrop = /** @type {?} */ ((this._overlayRef)).backdropClick();
99372
        var /** @type {?} */ detachments = /** @type {?} */ ((this._overlayRef)).detachments();
99373
        var /** @type {?} */ parentClose = this._parentMenu ? this._parentMenu.closed : Object(rxjs__WEBPACK_IMPORTED_MODULE_3__["of"])();
99374
        var /** @type {?} */ hover = this._parentMenu ? this._parentMenu._hovered().pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["filter"])(function (active) { return active !== _this._menuItemInstance; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["filter"])(function () { return _this._menuOpen; })) : Object(rxjs__WEBPACK_IMPORTED_MODULE_3__["of"])();
99375
        return Object(rxjs__WEBPACK_IMPORTED_MODULE_3__["merge"])(backdrop, parentClose, hover, detachments);
99376
    };
99377
    /** Handles mouse presses on the trigger. */
99378
    /**
99379
     * Handles mouse presses on the trigger.
99380
     * @param {?} event
99381
     * @return {?}
99382
     */
99383
    MatMenuTrigger.prototype._handleMousedown = /**
99384
     * Handles mouse presses on the trigger.
99385
     * @param {?} event
99386
     * @return {?}
99387
     */
99388
    function (event) {
99389
        if (!Object(_angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_6__["isFakeMousedownFromScreenReader"])(event)) {
99390
            this._openedByMouse = true;
99391
            // Since clicking on the trigger won't close the menu if it opens a sub-menu,
99392
            // we should prevent focus from moving onto it via click to avoid the
99393
            // highlight from lingering on the menu item.
99394
            if (this.triggersSubmenu()) {
99395
                event.preventDefault();
99396
            }
99397
        }
99398
    };
99399
    /** Handles key presses on the trigger. */
99400
    /**
99401
     * Handles key presses on the trigger.
99402
     * @param {?} event
99403
     * @return {?}
99404
     */
99405
    MatMenuTrigger.prototype._handleKeydown = /**
99406
     * Handles key presses on the trigger.
99407
     * @param {?} event
99408
     * @return {?}
99409
     */
99410
    function (event) {
99411
        var /** @type {?} */ keyCode = event.keyCode;
99412
        if (this.triggersSubmenu() && ((keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__["RIGHT_ARROW"] && this.dir === 'ltr') ||
99413
            (keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__["LEFT_ARROW"] && this.dir === 'rtl'))) {
99414
            this.openMenu();
99415
        }
99416
    };
99417
    /** Handles click events on the trigger. */
99418
    /**
99419
     * Handles click events on the trigger.
99420
     * @param {?} event
99421
     * @return {?}
99422
     */
99423
    MatMenuTrigger.prototype._handleClick = /**
99424
     * Handles click events on the trigger.
99425
     * @param {?} event
99426
     * @return {?}
99427
     */
99428
    function (event) {
99429
        if (this.triggersSubmenu()) {
99430
            // Stop event propagation to avoid closing the parent menu.
99431
            event.stopPropagation();
99432
            this.openMenu();
99433
        }
99434
        else {
99435
            this.toggleMenu();
99436
        }
99437
    };
99438
    /**
99439
     * Handles the cases where the user hovers over the trigger.
99440
     * @return {?}
99441
     */
99442
    MatMenuTrigger.prototype._handleHover = /**
99443
     * Handles the cases where the user hovers over the trigger.
99444
     * @return {?}
99445
     */
99446
    function () {
99447
        var _this = this;
99448
        // Subscribe to changes in the hovered item in order to toggle the panel.
99449
        if (!this.triggersSubmenu()) {
99450
            return;
99451
        }
99452
        this._hoverSubscription = this._parentMenu._hovered()
99453
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["filter"])(function (active) { return active === _this._menuItemInstance && !active.disabled; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["delay"])(0, rxjs__WEBPACK_IMPORTED_MODULE_3__["asapScheduler"]))
99454
            .subscribe(function () {
99455
            _this._openedByMouse = true;
99456
            // If the same menu is used between multiple triggers, it might still be animating
99457
            // while the new trigger tries to re-open it. Wait for the animation to finish
99458
            // before doing so. Also interrupt if the user moves to another item.
99459
            if (_this.menu instanceof MatMenu && _this.menu._isAnimating) {
99460
                _this.menu._animationDone
99461
                    .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["take"])(1), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["takeUntil"])(_this._parentMenu._hovered()))
99462
                    .subscribe(function () { return _this.openMenu(); });
99463
            }
99464
            else {
99465
                _this.openMenu();
99466
            }
99467
        });
99468
    };
99469
    MatMenuTrigger.decorators = [
99470
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
99471
                    selector: "[mat-menu-trigger-for], [matMenuTriggerFor]",
99472
                    host: {
99473
                        'aria-haspopup': 'true',
99474
                        '[attr.aria-expanded]': 'menuOpen || null',
99475
                        '(mousedown)': '_handleMousedown($event)',
99476
                        '(keydown)': '_handleKeydown($event)',
99477
                        '(click)': '_handleClick($event)',
99478
                    },
99479
                    exportAs: 'matMenuTrigger'
99480
                },] },
99481
    ];
99482
    /** @nocollapse */
99483
    MatMenuTrigger.ctorParameters = function () { return [
99484
        { type: _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_12__["Overlay"], },
99485
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
99486
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
99487
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [MAT_MENU_SCROLL_STRATEGY,] },] },
99488
        { type: MatMenu, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
99489
        { type: MatMenuItem, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"] },] },
99490
        { type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_11__["Directionality"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
99491
        { type: _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_6__["FocusMonitor"], },
99492
    ]; };
99493
    MatMenuTrigger.propDecorators = {
99494
        "_deprecatedMatMenuTriggerFor": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['mat-menu-trigger-for',] },],
99495
        "menu": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['matMenuTriggerFor',] },],
99496
        "menuData": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['matMenuTriggerData',] },],
99497
        "menuOpened": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
99498
        "onMenuOpen": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
99499
        "menuClosed": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
99500
        "onMenuClose": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
99501
    };
99502
    return MatMenuTrigger;
99503
}());
99504
 
99505
/**
99506
 * @fileoverview added by tsickle
99507
 * @suppress {checkTypes} checked by tsc
99508
 */
99509
var MatMenuModule = /** @class */ (function () {
99510
    function MatMenuModule() {
99511
    }
99512
    MatMenuModule.decorators = [
99513
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
99514
                    imports: [
99515
                        _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"],
99516
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_7__["MatCommonModule"],
99517
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_7__["MatRippleModule"],
99518
                        _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_12__["OverlayModule"],
99519
                    ],
99520
                    exports: [MatMenu, MatMenuItem, MatMenuTrigger, MatMenuContent, _angular_material_core__WEBPACK_IMPORTED_MODULE_7__["MatCommonModule"]],
99521
                    declarations: [MatMenu, MatMenuItem, MatMenuTrigger, MatMenuContent],
99522
                    providers: [MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER]
99523
                },] },
99524
    ];
99525
    return MatMenuModule;
99526
}());
99527
 
99528
/**
99529
 * @fileoverview added by tsickle
99530
 * @suppress {checkTypes} checked by tsc
99531
 */
99532
 
99533
/**
99534
 * @fileoverview added by tsickle
99535
 * @suppress {checkTypes} checked by tsc
99536
 */
99537
 
99538
/**
99539
 * @fileoverview added by tsickle
99540
 * @suppress {checkTypes} checked by tsc
99541
 */
99542
 
99543
 
99544
//# sourceMappingURL=menu.es5.js.map
99545
 
99546
 
99547
/***/ }),
99548
 
99549
/***/ "./node_modules/@angular/material/esm5/paginator.es5.js":
99550
/*!**************************************************************!*\
99551
  !*** ./node_modules/@angular/material/esm5/paginator.es5.js ***!
99552
  \**************************************************************/
99553
/*! exports provided: MatPaginatorModule, PageEvent, MatPaginatorBase, _MatPaginatorBase, MatPaginator, MatPaginatorIntl, MAT_PAGINATOR_INTL_PROVIDER_FACTORY, MAT_PAGINATOR_INTL_PROVIDER */
99554
/***/ (function(module, __webpack_exports__, __webpack_require__) {
99555
 
99556
"use strict";
99557
__webpack_require__.r(__webpack_exports__);
99558
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatPaginatorModule", function() { return MatPaginatorModule; });
99559
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PageEvent", function() { return PageEvent; });
99560
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatPaginatorBase", function() { return MatPaginatorBase; });
99561
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatPaginatorBase", function() { return _MatPaginatorBase; });
99562
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatPaginator", function() { return MatPaginator; });
99563
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatPaginatorIntl", function() { return MatPaginatorIntl; });
99564
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_PAGINATOR_INTL_PROVIDER_FACTORY", function() { return MAT_PAGINATOR_INTL_PROVIDER_FACTORY; });
99565
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_PAGINATOR_INTL_PROVIDER", function() { return MAT_PAGINATOR_INTL_PROVIDER; });
99566
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
99567
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
99568
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
99569
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
99570
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
99571
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
99572
/* harmony import */ var _angular_material_button__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/material/button */ "./node_modules/@angular/material/esm5/button.es5.js");
99573
/* harmony import */ var _angular_material_select__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/material/select */ "./node_modules/@angular/material/esm5/select.es5.js");
99574
/* harmony import */ var _angular_material_tooltip__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/material/tooltip */ "./node_modules/@angular/material/esm5/tooltip.es5.js");
99575
/**
99576
 * @license
99577
 * Copyright Google LLC All Rights Reserved.
99578
 *
99579
 * Use of this source code is governed by an MIT-style license that can be
99580
 * found in the LICENSE file at https://angular.io/license
99581
 */
99582
 
99583
 
99584
 
99585
 
99586
 
99587
 
99588
 
99589
 
99590
 
99591
 
99592
/**
99593
 * @fileoverview added by tsickle
99594
 * @suppress {checkTypes} checked by tsc
99595
 */
99596
/**
99597
 * To modify the labels and text displayed, create a new instance of MatPaginatorIntl and
99598
 * include it in a custom provider
99599
 */
99600
var MatPaginatorIntl = /** @class */ (function () {
99601
    function MatPaginatorIntl() {
99602
        /**
99603
         * Stream that emits whenever the labels here are changed. Use this to notify
99604
         * components if the labels have changed after initialization.
99605
         */
99606
        this.changes = new rxjs__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
99607
        /**
99608
         * A label for the page size selector.
99609
         */
99610
        this.itemsPerPageLabel = 'Items per page:';
99611
        /**
99612
         * A label for the button that increments the current page.
99613
         */
99614
        this.nextPageLabel = 'Next page';
99615
        /**
99616
         * A label for the button that decrements the current page.
99617
         */
99618
        this.previousPageLabel = 'Previous page';
99619
        /**
99620
         * A label for the button that moves to the first page.
99621
         */
99622
        this.firstPageLabel = 'First page';
99623
        /**
99624
         * A label for the button that moves to the last page.
99625
         */
99626
        this.lastPageLabel = 'Last page';
99627
        /**
99628
         * A label for the range of items within the current page and the length of the whole list.
99629
         */
99630
        this.getRangeLabel = function (page, pageSize, length) {
99631
            if (length == 0 || pageSize == 0) {
99632
                return "0 of " + length;
99633
            }
99634
            length = Math.max(length, 0);
99635
            var /** @type {?} */ startIndex = page * pageSize;
99636
            // If the start index exceeds the list length, do not try and fix the end index to the end.
99637
            var /** @type {?} */ endIndex = startIndex < length ?
99638
                Math.min(startIndex + pageSize, length) :
99639
                startIndex + pageSize;
99640
            return startIndex + 1 + " - " + endIndex + " of " + length;
99641
        };
99642
    }
99643
    MatPaginatorIntl.decorators = [
99644
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"], args: [{ providedIn: 'root' },] },
99645
    ];
99646
    /** @nocollapse */ MatPaginatorIntl.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["defineInjectable"])({ factory: function MatPaginatorIntl_Factory() { return new MatPaginatorIntl(); }, token: MatPaginatorIntl, providedIn: "root" });
99647
    return MatPaginatorIntl;
99648
}());
99649
/**
99650
 * \@docs-private
99651
 * @param {?} parentIntl
99652
 * @return {?}
99653
 */
99654
function MAT_PAGINATOR_INTL_PROVIDER_FACTORY(parentIntl) {
99655
    return parentIntl || new MatPaginatorIntl();
99656
}
99657
/**
99658
 * \@docs-private
99659
 */
99660
var /** @type {?} */ MAT_PAGINATOR_INTL_PROVIDER = {
99661
    // If there is already an MatPaginatorIntl available, use that. Otherwise, provide a new one.
99662
    provide: MatPaginatorIntl,
99663
    deps: [[new _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"](), new _angular_core__WEBPACK_IMPORTED_MODULE_0__["SkipSelf"](), MatPaginatorIntl]],
99664
    useFactory: MAT_PAGINATOR_INTL_PROVIDER_FACTORY
99665
};
99666
 
99667
/**
99668
 * @fileoverview added by tsickle
99669
 * @suppress {checkTypes} checked by tsc
99670
 */
99671
/**
99672
 * The default page size if there is no page size and there are no provided page size options.
99673
 */
99674
var /** @type {?} */ DEFAULT_PAGE_SIZE = 50;
99675
/**
99676
 * Change event object that is emitted when the user selects a
99677
 * different page size or navigates to another page.
99678
 */
99679
var  /**
99680
 * Change event object that is emitted when the user selects a
99681
 * different page size or navigates to another page.
99682
 */
99683
PageEvent = /** @class */ (function () {
99684
    function PageEvent() {
99685
    }
99686
    return PageEvent;
99687
}());
99688
/**
99689
 * \@docs-private
99690
 */
99691
var  /**
99692
 * \@docs-private
99693
 */
99694
MatPaginatorBase = /** @class */ (function () {
99695
    function MatPaginatorBase() {
99696
    }
99697
    return MatPaginatorBase;
99698
}());
99699
var /** @type {?} */ _MatPaginatorBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_4__["mixinInitialized"])(MatPaginatorBase);
99700
/**
99701
 * Component to provide navigation between paged information. Displays the size of the current
99702
 * page, user-selectable options to change that size, what items are being shown, and
99703
 * navigational button to go to the previous or next page.
99704
 */
99705
var MatPaginator = /** @class */ (function (_super) {
99706
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(MatPaginator, _super);
99707
    function MatPaginator(_intl, _changeDetectorRef) {
99708
        var _this = _super.call(this) || this;
99709
        _this._intl = _intl;
99710
        _this._changeDetectorRef = _changeDetectorRef;
99711
        _this._pageIndex = 0;
99712
        _this._length = 0;
99713
        _this._pageSizeOptions = [];
99714
        _this._hidePageSize = false;
99715
        _this._showFirstLastButtons = false;
99716
        /**
99717
         * Event emitted when the paginator changes the page size or page index.
99718
         */
99719
        _this.page = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
99720
        _this._intlChanges = _intl.changes.subscribe(function () { return _this._changeDetectorRef.markForCheck(); });
99721
        return _this;
99722
    }
99723
    Object.defineProperty(MatPaginator.prototype, "pageIndex", {
99724
        get: /**
99725
         * The zero-based page index of the displayed list of items. Defaulted to 0.
99726
         * @return {?}
99727
         */
99728
        function () { return this._pageIndex; },
99729
        set: /**
99730
         * @param {?} value
99731
         * @return {?}
99732
         */
99733
        function (value) {
99734
            this._pageIndex = Math.max(Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceNumberProperty"])(value), 0);
99735
            this._changeDetectorRef.markForCheck();
99736
        },
99737
        enumerable: true,
99738
        configurable: true
99739
    });
99740
    Object.defineProperty(MatPaginator.prototype, "length", {
99741
        get: /**
99742
         * The length of the total number of items that are being paginated. Defaulted to 0.
99743
         * @return {?}
99744
         */
99745
        function () { return this._length; },
99746
        set: /**
99747
         * @param {?} value
99748
         * @return {?}
99749
         */
99750
        function (value) {
99751
            this._length = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceNumberProperty"])(value);
99752
            this._changeDetectorRef.markForCheck();
99753
        },
99754
        enumerable: true,
99755
        configurable: true
99756
    });
99757
    Object.defineProperty(MatPaginator.prototype, "pageSize", {
99758
        get: /**
99759
         * Number of items to display on a page. By default set to 50.
99760
         * @return {?}
99761
         */
99762
        function () { return this._pageSize; },
99763
        set: /**
99764
         * @param {?} value
99765
         * @return {?}
99766
         */
99767
        function (value) {
99768
            this._pageSize = Math.max(Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceNumberProperty"])(value), 0);
99769
            this._updateDisplayedPageSizeOptions();
99770
        },
99771
        enumerable: true,
99772
        configurable: true
99773
    });
99774
    Object.defineProperty(MatPaginator.prototype, "pageSizeOptions", {
99775
        get: /**
99776
         * The set of provided page size options to display to the user.
99777
         * @return {?}
99778
         */
99779
        function () { return this._pageSizeOptions; },
99780
        set: /**
99781
         * @param {?} value
99782
         * @return {?}
99783
         */
99784
        function (value) {
99785
            this._pageSizeOptions = (value || []).map(function (p) { return Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceNumberProperty"])(p); });
99786
            this._updateDisplayedPageSizeOptions();
99787
        },
99788
        enumerable: true,
99789
        configurable: true
99790
    });
99791
    Object.defineProperty(MatPaginator.prototype, "hidePageSize", {
99792
        get: /**
99793
         * Whether to hide the page size selection UI from the user.
99794
         * @return {?}
99795
         */
99796
        function () { return this._hidePageSize; },
99797
        set: /**
99798
         * @param {?} value
99799
         * @return {?}
99800
         */
99801
        function (value) {
99802
            this._hidePageSize = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceBooleanProperty"])(value);
99803
        },
99804
        enumerable: true,
99805
        configurable: true
99806
    });
99807
    Object.defineProperty(MatPaginator.prototype, "showFirstLastButtons", {
99808
        get: /**
99809
         * Whether to show the first/last buttons UI to the user.
99810
         * @return {?}
99811
         */
99812
        function () { return this._showFirstLastButtons; },
99813
        set: /**
99814
         * @param {?} value
99815
         * @return {?}
99816
         */
99817
        function (value) {
99818
            this._showFirstLastButtons = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceBooleanProperty"])(value);
99819
        },
99820
        enumerable: true,
99821
        configurable: true
99822
    });
99823
    /**
99824
     * @return {?}
99825
     */
99826
    MatPaginator.prototype.ngOnInit = /**
99827
     * @return {?}
99828
     */
99829
    function () {
99830
        this._initialized = true;
99831
        this._updateDisplayedPageSizeOptions();
99832
        this._markInitialized();
99833
    };
99834
    /**
99835
     * @return {?}
99836
     */
99837
    MatPaginator.prototype.ngOnDestroy = /**
99838
     * @return {?}
99839
     */
99840
    function () {
99841
        this._intlChanges.unsubscribe();
99842
    };
99843
    /** Advances to the next page if it exists. */
99844
    /**
99845
     * Advances to the next page if it exists.
99846
     * @return {?}
99847
     */
99848
    MatPaginator.prototype.nextPage = /**
99849
     * Advances to the next page if it exists.
99850
     * @return {?}
99851
     */
99852
    function () {
99853
        if (!this.hasNextPage()) {
99854
            return;
99855
        }
99856
        var /** @type {?} */ previousPageIndex = this.pageIndex;
99857
        this.pageIndex++;
99858
        this._emitPageEvent(previousPageIndex);
99859
    };
99860
    /** Move back to the previous page if it exists. */
99861
    /**
99862
     * Move back to the previous page if it exists.
99863
     * @return {?}
99864
     */
99865
    MatPaginator.prototype.previousPage = /**
99866
     * Move back to the previous page if it exists.
99867
     * @return {?}
99868
     */
99869
    function () {
99870
        if (!this.hasPreviousPage()) {
99871
            return;
99872
        }
99873
        var /** @type {?} */ previousPageIndex = this.pageIndex;
99874
        this.pageIndex--;
99875
        this._emitPageEvent(previousPageIndex);
99876
    };
99877
    /** Move to the first page if not already there. */
99878
    /**
99879
     * Move to the first page if not already there.
99880
     * @return {?}
99881
     */
99882
    MatPaginator.prototype.firstPage = /**
99883
     * Move to the first page if not already there.
99884
     * @return {?}
99885
     */
99886
    function () {
99887
        // hasPreviousPage being false implies at the start
99888
        if (!this.hasPreviousPage()) {
99889
            return;
99890
        }
99891
        var /** @type {?} */ previousPageIndex = this.pageIndex;
99892
        this.pageIndex = 0;
99893
        this._emitPageEvent(previousPageIndex);
99894
    };
99895
    /** Move to the last page if not already there. */
99896
    /**
99897
     * Move to the last page if not already there.
99898
     * @return {?}
99899
     */
99900
    MatPaginator.prototype.lastPage = /**
99901
     * Move to the last page if not already there.
99902
     * @return {?}
99903
     */
99904
    function () {
99905
        // hasNextPage being false implies at the end
99906
        if (!this.hasNextPage()) {
99907
            return;
99908
        }
99909
        var /** @type {?} */ previousPageIndex = this.pageIndex;
99910
        this.pageIndex = this.getNumberOfPages();
99911
        this._emitPageEvent(previousPageIndex);
99912
    };
99913
    /** Whether there is a previous page. */
99914
    /**
99915
     * Whether there is a previous page.
99916
     * @return {?}
99917
     */
99918
    MatPaginator.prototype.hasPreviousPage = /**
99919
     * Whether there is a previous page.
99920
     * @return {?}
99921
     */
99922
    function () {
99923
        return this.pageIndex >= 1 && this.pageSize != 0;
99924
    };
99925
    /** Whether there is a next page. */
99926
    /**
99927
     * Whether there is a next page.
99928
     * @return {?}
99929
     */
99930
    MatPaginator.prototype.hasNextPage = /**
99931
     * Whether there is a next page.
99932
     * @return {?}
99933
     */
99934
    function () {
99935
        var /** @type {?} */ numberOfPages = this.getNumberOfPages();
99936
        return this.pageIndex < numberOfPages && this.pageSize != 0;
99937
    };
99938
    /** Calculate the number of pages */
99939
    /**
99940
     * Calculate the number of pages
99941
     * @return {?}
99942
     */
99943
    MatPaginator.prototype.getNumberOfPages = /**
99944
     * Calculate the number of pages
99945
     * @return {?}
99946
     */
99947
    function () {
99948
        return Math.ceil(this.length / this.pageSize) - 1;
99949
    };
99950
    /**
99951
     * Changes the page size so that the first item displayed on the page will still be
99952
     * displayed using the new page size.
99953
     *
99954
     * For example, if the page size is 10 and on the second page (items indexed 10-19) then
99955
     * switching so that the page size is 5 will set the third page as the current page so
99956
     * that the 10th item will still be displayed.
99957
     */
99958
    /**
99959
     * Changes the page size so that the first item displayed on the page will still be
99960
     * displayed using the new page size.
99961
     *
99962
     * For example, if the page size is 10 and on the second page (items indexed 10-19) then
99963
     * switching so that the page size is 5 will set the third page as the current page so
99964
     * that the 10th item will still be displayed.
99965
     * @param {?} pageSize
99966
     * @return {?}
99967
     */
99968
    MatPaginator.prototype._changePageSize = /**
99969
     * Changes the page size so that the first item displayed on the page will still be
99970
     * displayed using the new page size.
99971
     *
99972
     * For example, if the page size is 10 and on the second page (items indexed 10-19) then
99973
     * switching so that the page size is 5 will set the third page as the current page so
99974
     * that the 10th item will still be displayed.
99975
     * @param {?} pageSize
99976
     * @return {?}
99977
     */
99978
    function (pageSize) {
99979
        // Current page needs to be updated to reflect the new page size. Navigate to the page
99980
        // containing the previous page's first item.
99981
        var /** @type {?} */ startIndex = this.pageIndex * this.pageSize;
99982
        var /** @type {?} */ previousPageIndex = this.pageIndex;
99983
        this.pageIndex = Math.floor(startIndex / pageSize) || 0;
99984
        this.pageSize = pageSize;
99985
        this._emitPageEvent(previousPageIndex);
99986
    };
99987
    /**
99988
     * Updates the list of page size options to display to the user. Includes making sure that
99989
     * the page size is an option and that the list is sorted.
99990
     * @return {?}
99991
     */
99992
    MatPaginator.prototype._updateDisplayedPageSizeOptions = /**
99993
     * Updates the list of page size options to display to the user. Includes making sure that
99994
     * the page size is an option and that the list is sorted.
99995
     * @return {?}
99996
     */
99997
    function () {
99998
        if (!this._initialized) {
99999
            return;
100000
        }
100001
        // If no page size is provided, use the first page size option or the default page size.
100002
        if (!this.pageSize) {
100003
            this._pageSize = this.pageSizeOptions.length != 0 ?
100004
                this.pageSizeOptions[0] :
100005
                DEFAULT_PAGE_SIZE;
100006
        }
100007
        this._displayedPageSizeOptions = this.pageSizeOptions.slice();
100008
        if (this._displayedPageSizeOptions.indexOf(this.pageSize) === -1) {
100009
            this._displayedPageSizeOptions.push(this.pageSize);
100010
        }
100011
        // Sort the numbers using a number-specific sort function.
100012
        this._displayedPageSizeOptions.sort(function (a, b) { return a - b; });
100013
        this._changeDetectorRef.markForCheck();
100014
    };
100015
    /**
100016
     * Emits an event notifying that a change of the paginator's properties has been triggered.
100017
     * @param {?} previousPageIndex
100018
     * @return {?}
100019
     */
100020
    MatPaginator.prototype._emitPageEvent = /**
100021
     * Emits an event notifying that a change of the paginator's properties has been triggered.
100022
     * @param {?} previousPageIndex
100023
     * @return {?}
100024
     */
100025
    function (previousPageIndex) {
100026
        this.page.emit({
100027
            previousPageIndex: previousPageIndex,
100028
            pageIndex: this.pageIndex,
100029
            pageSize: this.pageSize,
100030
            length: this.length
100031
        });
100032
    };
100033
    MatPaginator.decorators = [
100034
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-paginator',
100035
                    exportAs: 'matPaginator',
100036
                    template: "<div class=\"mat-paginator-container\"><div class=\"mat-paginator-page-size\" *ngIf=\"!hidePageSize\"><div class=\"mat-paginator-page-size-label\">{{_intl.itemsPerPageLabel}}</div><mat-form-field *ngIf=\"_displayedPageSizeOptions.length > 1\" class=\"mat-paginator-page-size-select\"><mat-select [value]=\"pageSize\" [aria-label]=\"_intl.itemsPerPageLabel\" (selectionChange)=\"_changePageSize($event.value)\"><mat-option *ngFor=\"let pageSizeOption of _displayedPageSizeOptions\" [value]=\"pageSizeOption\">{{pageSizeOption}}</mat-option></mat-select></mat-form-field><div *ngIf=\"_displayedPageSizeOptions.length <= 1\">{{pageSize}}</div></div><div class=\"mat-paginator-range-actions\"><div class=\"mat-paginator-range-label\">{{_intl.getRangeLabel(pageIndex, pageSize, length)}}</div><button mat-icon-button type=\"button\" class=\"mat-paginator-navigation-first\" (click)=\"firstPage()\" [attr.aria-label]=\"_intl.firstPageLabel\" [matTooltip]=\"_intl.firstPageLabel\" [matTooltipDisabled]=\"!hasPreviousPage()\" [matTooltipPosition]=\"'above'\" [disabled]=\"!hasPreviousPage()\" *ngIf=\"showFirstLastButtons\"><svg class=\"mat-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\"><path d=\"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z\"/></svg></button> <button mat-icon-button type=\"button\" class=\"mat-paginator-navigation-previous\" (click)=\"previousPage()\" [attr.aria-label]=\"_intl.previousPageLabel\" [matTooltip]=\"_intl.previousPageLabel\" [matTooltipDisabled]=\"!hasPreviousPage()\" [matTooltipPosition]=\"'above'\" [disabled]=\"!hasPreviousPage()\"><svg class=\"mat-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\"><path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"/></svg></button> <button mat-icon-button type=\"button\" class=\"mat-paginator-navigation-next\" (click)=\"nextPage()\" [attr.aria-label]=\"_intl.nextPageLabel\" [matTooltip]=\"_intl.nextPageLabel\" [matTooltipDisabled]=\"!hasNextPage()\" [matTooltipPosition]=\"'above'\" [disabled]=\"!hasNextPage()\"><svg class=\"mat-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\"><path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"/></svg></button> <button mat-icon-button type=\"button\" class=\"mat-paginator-navigation-last\" (click)=\"lastPage()\" [attr.aria-label]=\"_intl.lastPageLabel\" [matTooltip]=\"_intl.lastPageLabel\" [matTooltipDisabled]=\"!hasNextPage()\" [matTooltipPosition]=\"'above'\" [disabled]=\"!hasNextPage()\" *ngIf=\"showFirstLastButtons\"><svg class=\"mat-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\"><path d=\"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z\"/></svg></button></div></div>",
100037
                    styles: [".mat-paginator{display:block}.mat-paginator-container{display:flex;align-items:center;justify-content:flex-end;min-height:56px;padding:0 8px;flex-wrap:wrap-reverse}.mat-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-paginator-page-size{margin-right:0;margin-left:8px}.mat-paginator-page-size-label{margin:0 4px}.mat-paginator-page-size-select{margin:6px 4px 0 4px;width:56px}.mat-paginator-page-size-select.mat-form-field-appearance-outline{width:64px}.mat-paginator-page-size-select.mat-form-field-appearance-fill{width:64px}.mat-paginator-range-label{margin:0 32px 0 24px}.mat-paginator-range-actions{display:flex;align-items:center;min-height:48px}.mat-paginator-icon{width:28px;fill:currentColor}[dir=rtl] .mat-paginator-icon{transform:rotate(180deg)}"],
100038
                    host: {
100039
                        'class': 'mat-paginator',
100040
                    },
100041
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
100042
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
100043
                },] },
100044
    ];
100045
    /** @nocollapse */
100046
    MatPaginator.ctorParameters = function () { return [
100047
        { type: MatPaginatorIntl, },
100048
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"], },
100049
    ]; };
100050
    MatPaginator.propDecorators = {
100051
        "pageIndex": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
100052
        "length": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
100053
        "pageSize": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
100054
        "pageSizeOptions": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
100055
        "hidePageSize": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
100056
        "showFirstLastButtons": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
100057
        "page": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
100058
    };
100059
    return MatPaginator;
100060
}(_MatPaginatorBase));
100061
 
100062
/**
100063
 * @fileoverview added by tsickle
100064
 * @suppress {checkTypes} checked by tsc
100065
 */
100066
var MatPaginatorModule = /** @class */ (function () {
100067
    function MatPaginatorModule() {
100068
    }
100069
    MatPaginatorModule.decorators = [
100070
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
100071
                    imports: [
100072
                        _angular_common__WEBPACK_IMPORTED_MODULE_5__["CommonModule"],
100073
                        _angular_material_button__WEBPACK_IMPORTED_MODULE_6__["MatButtonModule"],
100074
                        _angular_material_select__WEBPACK_IMPORTED_MODULE_7__["MatSelectModule"],
100075
                        _angular_material_tooltip__WEBPACK_IMPORTED_MODULE_8__["MatTooltipModule"],
100076
                    ],
100077
                    exports: [MatPaginator],
100078
                    declarations: [MatPaginator],
100079
                    providers: [MAT_PAGINATOR_INTL_PROVIDER],
100080
                },] },
100081
    ];
100082
    return MatPaginatorModule;
100083
}());
100084
 
100085
/**
100086
 * @fileoverview added by tsickle
100087
 * @suppress {checkTypes} checked by tsc
100088
 */
100089
 
100090
/**
100091
 * @fileoverview added by tsickle
100092
 * @suppress {checkTypes} checked by tsc
100093
 */
100094
 
100095
 
100096
//# sourceMappingURL=paginator.es5.js.map
100097
 
100098
 
100099
/***/ }),
100100
 
100101
/***/ "./node_modules/@angular/material/esm5/progress-bar.es5.js":
100102
/*!*****************************************************************!*\
100103
  !*** ./node_modules/@angular/material/esm5/progress-bar.es5.js ***!
100104
  \*****************************************************************/
100105
/*! exports provided: MatProgressBarModule, MatProgressBarBase, _MatProgressBarMixinBase, MatProgressBar */
100106
/***/ (function(module, __webpack_exports__, __webpack_require__) {
100107
 
100108
"use strict";
100109
__webpack_require__.r(__webpack_exports__);
100110
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatProgressBarModule", function() { return MatProgressBarModule; });
100111
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatProgressBarBase", function() { return MatProgressBarBase; });
100112
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatProgressBarMixinBase", function() { return _MatProgressBarMixinBase; });
100113
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatProgressBar", function() { return MatProgressBar; });
100114
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
100115
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
100116
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
100117
/* harmony import */ var _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/platform-browser/animations */ "./node_modules/@angular/platform-browser/fesm5/animations.js");
100118
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
100119
/**
100120
 * @license
100121
 * Copyright Google LLC All Rights Reserved.
100122
 *
100123
 * Use of this source code is governed by an MIT-style license that can be
100124
 * found in the LICENSE file at https://angular.io/license
100125
 */
100126
 
100127
 
100128
 
100129
 
100130
 
100131
 
100132
/**
100133
 * @fileoverview added by tsickle
100134
 * @suppress {checkTypes} checked by tsc
100135
 */
100136
/**
100137
 * \@docs-private
100138
 */
100139
var  /**
100140
 * \@docs-private
100141
 */
100142
MatProgressBarBase = /** @class */ (function () {
100143
    function MatProgressBarBase(_elementRef) {
100144
        this._elementRef = _elementRef;
100145
    }
100146
    return MatProgressBarBase;
100147
}());
100148
var /** @type {?} */ _MatProgressBarMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_4__["mixinColor"])(MatProgressBarBase, 'primary');
100149
/**
100150
 * Counter used to generate unique IDs for progress bars.
100151
 */
100152
var /** @type {?} */ progressbarId = 0;
100153
/**
100154
 * `<mat-progress-bar>` component.
100155
 */
100156
var MatProgressBar = /** @class */ (function (_super) {
100157
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatProgressBar, _super);
100158
    function MatProgressBar(_elementRef, _animationMode, /**
100159
                   * @deprecated `location` parameter to be made required.
100160
                   * @breaking-change 8.0.0
100161
                   */
100162
    location) {
100163
        var _this = _super.call(this, _elementRef) || this;
100164
        _this._elementRef = _elementRef;
100165
        _this._animationMode = _animationMode;
100166
        _this._value = 0;
100167
        _this._bufferValue = 0;
100168
        /**
100169
         * Mode of the progress bar.
100170
         *
100171
         * Input must be one of these values: determinate, indeterminate, buffer, query, defaults to
100172
         * 'determinate'.
100173
         * Mirrored to mode attribute.
100174
         */
100175
        _this.mode = 'determinate';
100176
        /**
100177
         * ID of the progress bar.
100178
         */
100179
        _this.progressbarId = "mat-progress-bar-" + progressbarId++;
100180
        // We need to prefix the SVG reference with the current path, otherwise they won't work
100181
        // in Safari if the page has a `<base>` tag. Note that we need quotes inside the `url()`,
100182
        // because named route URLs can contain parentheses (see #12338).
100183
        // We need to prefix the SVG reference with the current path, otherwise they won't work
100184
        // in Safari if the page has a `<base>` tag. Note that we need quotes inside the `url()`,
100185
        // because named route URLs can contain parentheses (see #12338).
100186
        _this._rectangleFillValue = "url('" + (location ? location.path() : '') + "#" + _this.progressbarId + "')";
100187
        return _this;
100188
    }
100189
    Object.defineProperty(MatProgressBar.prototype, "value", {
100190
        get: /**
100191
         * Value of the progress bar. Defaults to zero. Mirrored to aria-valuenow.
100192
         * @return {?}
100193
         */
100194
        function () { return this._value; },
100195
        set: /**
100196
         * @param {?} v
100197
         * @return {?}
100198
         */
100199
        function (v) { this._value = clamp(v || 0); },
100200
        enumerable: true,
100201
        configurable: true
100202
    });
100203
    Object.defineProperty(MatProgressBar.prototype, "bufferValue", {
100204
        get: /**
100205
         * Buffer value of the progress bar. Defaults to zero.
100206
         * @return {?}
100207
         */
100208
        function () { return this._bufferValue; },
100209
        set: /**
100210
         * @param {?} v
100211
         * @return {?}
100212
         */
100213
        function (v) { this._bufferValue = clamp(v || 0); },
100214
        enumerable: true,
100215
        configurable: true
100216
    });
100217
    /** Gets the current transform value for the progress bar's primary indicator. */
100218
    /**
100219
     * Gets the current transform value for the progress bar's primary indicator.
100220
     * @return {?}
100221
     */
100222
    MatProgressBar.prototype._primaryTransform = /**
100223
     * Gets the current transform value for the progress bar's primary indicator.
100224
     * @return {?}
100225
     */
100226
    function () {
100227
        var /** @type {?} */ scale = this.value / 100;
100228
        return { transform: "scaleX(" + scale + ")" };
100229
    };
100230
    /**
100231
     * Gets the current transform value for the progress bar's buffer indicator. Only used if the
100232
     * progress mode is set to buffer, otherwise returns an undefined, causing no transformation.
100233
     */
100234
    /**
100235
     * Gets the current transform value for the progress bar's buffer indicator. Only used if the
100236
     * progress mode is set to buffer, otherwise returns an undefined, causing no transformation.
100237
     * @return {?}
100238
     */
100239
    MatProgressBar.prototype._bufferTransform = /**
100240
     * Gets the current transform value for the progress bar's buffer indicator. Only used if the
100241
     * progress mode is set to buffer, otherwise returns an undefined, causing no transformation.
100242
     * @return {?}
100243
     */
100244
    function () {
100245
        if (this.mode === 'buffer') {
100246
            var /** @type {?} */ scale = this.bufferValue / 100;
100247
            return { transform: "scaleX(" + scale + ")" };
100248
        }
100249
    };
100250
    MatProgressBar.decorators = [
100251
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"], args: [{selector: 'mat-progress-bar',
100252
                    exportAs: 'matProgressBar',
100253
                    host: {
100254
                        'role': 'progressbar',
100255
                        'aria-valuemin': '0',
100256
                        'aria-valuemax': '100',
100257
                        '[attr.aria-valuenow]': 'value',
100258
                        '[attr.mode]': 'mode',
100259
                        'class': 'mat-progress-bar',
100260
                        '[class._mat-animation-noopable]': "_animationMode === 'NoopAnimations'",
100261
                    },
100262
                    inputs: ['color'],
100263
                    template: "<svg width=\"100%\" height=\"5\" focusable=\"false\" class=\"mat-progress-bar-background mat-progress-bar-element\"><defs><pattern [id]=\"progressbarId\" x=\"5\" y=\"0\" width=\"10\" height=\"5\" patternUnits=\"userSpaceOnUse\"><circle cx=\"2.5\" cy=\"2.5\" r=\"2.5\"/></pattern></defs><rect [attr.fill]=\"_rectangleFillValue\" width=\"100%\" height=\"100%\"/></svg><div class=\"mat-progress-bar-buffer mat-progress-bar-element\" [ngStyle]=\"_bufferTransform()\"></div><div class=\"mat-progress-bar-primary mat-progress-bar-fill mat-progress-bar-element\" [ngStyle]=\"_primaryTransform()\"></div><div class=\"mat-progress-bar-secondary mat-progress-bar-fill mat-progress-bar-element\"></div>",
100264
                    styles: [".mat-progress-bar{display:block;height:5px;overflow:hidden;position:relative;transition:opacity 250ms linear;width:100%}._mat-animation-noopable.mat-progress-bar{transition:none;animation:none}.mat-progress-bar .mat-progress-bar-element,.mat-progress-bar .mat-progress-bar-fill::after{height:100%;position:absolute;width:100%}.mat-progress-bar .mat-progress-bar-background{width:calc(100% + 10px)}@media screen and (-ms-high-contrast:active){.mat-progress-bar .mat-progress-bar-background{display:none}}.mat-progress-bar .mat-progress-bar-buffer{transform-origin:top left;transition:transform 250ms ease}._mat-animation-noopable.mat-progress-bar .mat-progress-bar-buffer{transition:none;animation:none}@media screen and (-ms-high-contrast:active){.mat-progress-bar .mat-progress-bar-buffer{border-top:solid 5px;opacity:.5}}.mat-progress-bar .mat-progress-bar-secondary{display:none}.mat-progress-bar .mat-progress-bar-fill{animation:none;transform-origin:top left;transition:transform 250ms ease}._mat-animation-noopable.mat-progress-bar .mat-progress-bar-fill{transition:none;animation:none}@media screen and (-ms-high-contrast:active){.mat-progress-bar .mat-progress-bar-fill{border-top:solid 5px}}.mat-progress-bar .mat-progress-bar-fill::after{animation:none;content:'';display:inline-block;left:0}._mat-animation-noopable.mat-progress-bar .mat-progress-bar-fill::after{transition:none;animation:none}.mat-progress-bar[dir=rtl],[dir=rtl] .mat-progress-bar{transform:rotateY(180deg)}.mat-progress-bar[mode=query]{transform:rotateZ(180deg)}.mat-progress-bar[mode=query][dir=rtl],[dir=rtl] .mat-progress-bar[mode=query]{transform:rotateZ(180deg) rotateY(180deg)}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-fill,.mat-progress-bar[mode=query] .mat-progress-bar-fill{transition:none}._mat-animation-noopable.mat-progress-bar[mode=indeterminate] .mat-progress-bar-fill,.mat-progress-bar[mode=query] .mat-progress-bar-fill{transition:none;animation:none}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-primary,.mat-progress-bar[mode=query] .mat-progress-bar-primary{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-primary-indeterminate-translate 2s infinite linear;left:-145.166611%}._mat-animation-noopable.mat-progress-bar[mode=indeterminate] .mat-progress-bar-primary,.mat-progress-bar[mode=query] .mat-progress-bar-primary{transition:none;animation:none}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-primary.mat-progress-bar-fill::after,.mat-progress-bar[mode=query] .mat-progress-bar-primary.mat-progress-bar-fill::after{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-primary-indeterminate-scale 2s infinite linear}._mat-animation-noopable.mat-progress-bar[mode=indeterminate] .mat-progress-bar-primary.mat-progress-bar-fill::after,.mat-progress-bar[mode=query] .mat-progress-bar-primary.mat-progress-bar-fill::after{transition:none;animation:none}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-secondary,.mat-progress-bar[mode=query] .mat-progress-bar-secondary{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-secondary-indeterminate-translate 2s infinite linear;left:-54.888891%;display:block}._mat-animation-noopable.mat-progress-bar[mode=indeterminate] .mat-progress-bar-secondary,.mat-progress-bar[mode=query] .mat-progress-bar-secondary{transition:none;animation:none}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-secondary.mat-progress-bar-fill::after,.mat-progress-bar[mode=query] .mat-progress-bar-secondary.mat-progress-bar-fill::after{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-secondary-indeterminate-scale 2s infinite linear}._mat-animation-noopable.mat-progress-bar[mode=indeterminate] .mat-progress-bar-secondary.mat-progress-bar-fill::after,.mat-progress-bar[mode=query] .mat-progress-bar-secondary.mat-progress-bar-fill::after{transition:none;animation:none}.mat-progress-bar[mode=buffer] .mat-progress-bar-background{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-background-scroll 250ms infinite linear;display:block}._mat-animation-noopable.mat-progress-bar[mode=buffer] .mat-progress-bar-background{transition:none;animation:none}@keyframes mat-progress-bar-primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(.5,0,.70173,.49582);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(.30244,.38135,.55,.95635);transform:translateX(83.67142%)}100%{transform:translateX(200.61106%)}}@keyframes mat-progress-bar-primary-indeterminate-scale{0%{transform:scaleX(.08)}36.65%{animation-timing-function:cubic-bezier(.33473,.12482,.78584,1);transform:scaleX(.08)}69.15%{animation-timing-function:cubic-bezier(.06,.11,.6,1);transform:scaleX(.66148)}100%{transform:scaleX(.08)}}@keyframes mat-progress-bar-secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(.15,0,.51506,.40969);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(.31033,.28406,.8,.73371);transform:translateX(37.65191%)}48.35%{animation-timing-function:cubic-bezier(.4,.62704,.6,.90203);transform:translateX(84.38617%)}100%{transform:translateX(160.27778%)}}@keyframes mat-progress-bar-secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(.15,0,.51506,.40969);transform:scaleX(.08)}19.15%{animation-timing-function:cubic-bezier(.31033,.28406,.8,.73371);transform:scaleX(.4571)}44.15%{animation-timing-function:cubic-bezier(.4,.62704,.6,.90203);transform:scaleX(.72796)}100%{transform:scaleX(.08)}}@keyframes mat-progress-bar-background-scroll{to{transform:translateX(-10px)}}"],
100265
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
100266
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
100267
                },] },
100268
    ];
100269
    /** @nocollapse */
100270
    MatProgressBar.ctorParameters = function () { return [
100271
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
100272
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_3__["ANIMATION_MODULE_TYPE"],] },] },
100273
        { type: _angular_common__WEBPACK_IMPORTED_MODULE_2__["Location"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] },] },
100274
    ]; };
100275
    MatProgressBar.propDecorators = {
100276
        "value": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
100277
        "bufferValue": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
100278
        "mode": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
100279
    };
100280
    return MatProgressBar;
100281
}(_MatProgressBarMixinBase));
100282
/**
100283
 * Clamps a value to be between two numbers, by default 0 and 100.
100284
 * @param {?} v
100285
 * @param {?=} min
100286
 * @param {?=} max
100287
 * @return {?}
100288
 */
100289
function clamp(v, min, max) {
100290
    if (min === void 0) { min = 0; }
100291
    if (max === void 0) { max = 100; }
100292
    return Math.max(min, Math.min(max, v));
100293
}
100294
 
100295
/**
100296
 * @fileoverview added by tsickle
100297
 * @suppress {checkTypes} checked by tsc
100298
 */
100299
var MatProgressBarModule = /** @class */ (function () {
100300
    function MatProgressBarModule() {
100301
    }
100302
    MatProgressBarModule.decorators = [
100303
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{
100304
                    imports: [_angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"], _angular_material_core__WEBPACK_IMPORTED_MODULE_4__["MatCommonModule"]],
100305
                    exports: [MatProgressBar, _angular_material_core__WEBPACK_IMPORTED_MODULE_4__["MatCommonModule"]],
100306
                    declarations: [MatProgressBar],
100307
                },] },
100308
    ];
100309
    return MatProgressBarModule;
100310
}());
100311
 
100312
/**
100313
 * @fileoverview added by tsickle
100314
 * @suppress {checkTypes} checked by tsc
100315
 */
100316
 
100317
/**
100318
 * @fileoverview added by tsickle
100319
 * @suppress {checkTypes} checked by tsc
100320
 */
100321
 
100322
 
100323
//# sourceMappingURL=progress-bar.es5.js.map
100324
 
100325
 
100326
/***/ }),
100327
 
100328
/***/ "./node_modules/@angular/material/esm5/progress-spinner.es5.js":
100329
/*!*********************************************************************!*\
100330
  !*** ./node_modules/@angular/material/esm5/progress-spinner.es5.js ***!
100331
  \*********************************************************************/
100332
/*! exports provided: MatProgressSpinnerModule, MatProgressSpinnerBase, _MatProgressSpinnerMixinBase, MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS, MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY, MatProgressSpinner, MatSpinner */
100333
/***/ (function(module, __webpack_exports__, __webpack_require__) {
100334
 
100335
"use strict";
100336
__webpack_require__.r(__webpack_exports__);
100337
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatProgressSpinnerModule", function() { return MatProgressSpinnerModule; });
100338
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatProgressSpinnerBase", function() { return MatProgressSpinnerBase; });
100339
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatProgressSpinnerMixinBase", function() { return _MatProgressSpinnerMixinBase; });
100340
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS", function() { return MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS; });
100341
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY", function() { return MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY; });
100342
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatProgressSpinner", function() { return MatProgressSpinner; });
100343
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSpinner", function() { return MatSpinner; });
100344
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
100345
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
100346
/* harmony import */ var _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/platform-browser/animations */ "./node_modules/@angular/platform-browser/fesm5/animations.js");
100347
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
100348
/* harmony import */ var _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/cdk/platform */ "./node_modules/@angular/cdk/esm5/platform.es5.js");
100349
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
100350
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
100351
/**
100352
 * @license
100353
 * Copyright Google LLC All Rights Reserved.
100354
 *
100355
 * Use of this source code is governed by an MIT-style license that can be
100356
 * found in the LICENSE file at https://angular.io/license
100357
 */
100358
 
100359
 
100360
 
100361
 
100362
 
100363
 
100364
 
100365
 
100366
/**
100367
 * @fileoverview added by tsickle
100368
 * @suppress {checkTypes} checked by tsc
100369
 */
100370
/**
100371
 * Base reference size of the spinner.
100372
 * \@docs-private
100373
 */
100374
var /** @type {?} */ BASE_SIZE = 100;
100375
/**
100376
 * Base reference stroke width of the spinner.
100377
 * \@docs-private
100378
 */
100379
var /** @type {?} */ BASE_STROKE_WIDTH = 10;
100380
/**
100381
 * \@docs-private
100382
 */
100383
var  /**
100384
 * \@docs-private
100385
 */
100386
MatProgressSpinnerBase = /** @class */ (function () {
100387
    function MatProgressSpinnerBase(_elementRef) {
100388
        this._elementRef = _elementRef;
100389
    }
100390
    return MatProgressSpinnerBase;
100391
}());
100392
var /** @type {?} */ _MatProgressSpinnerMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_3__["mixinColor"])(MatProgressSpinnerBase, 'primary');
100393
/**
100394
 * Injection token to be used to override the default options for `mat-progress-spinner`.
100395
 */
100396
var /** @type {?} */ MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('mat-progress-spinner-default-options', {
100397
    providedIn: 'root',
100398
    factory: MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY,
100399
});
100400
/**
100401
 * \@docs-private
100402
 * @return {?}
100403
 */
100404
function MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY() {
100405
    return { diameter: BASE_SIZE };
100406
}
100407
// .0001 percentage difference is necessary in order to avoid unwanted animation frames
100408
// for example because the animation duration is 4 seconds, .1% accounts to 4ms
100409
// which are enough to see the flicker described in
100410
// https://github.com/angular/material2/issues/8984
100411
var /** @type {?} */ INDETERMINATE_ANIMATION_TEMPLATE = "\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n    0%      { stroke-dashoffset: START_VALUE;  transform: rotate(0); }\n    12.5%   { stroke-dashoffset: END_VALUE;    transform: rotate(0); }\n    12.5001%  { stroke-dashoffset: END_VALUE;    transform: rotateX(180deg) rotate(72.5deg); }\n    25%     { stroke-dashoffset: START_VALUE;  transform: rotateX(180deg) rotate(72.5deg); }\n\n    25.0001%   { stroke-dashoffset: START_VALUE;  transform: rotate(270deg); }\n    37.5%   { stroke-dashoffset: END_VALUE;    transform: rotate(270deg); }\n    37.5001%  { stroke-dashoffset: END_VALUE;    transform: rotateX(180deg) rotate(161.5deg); }\n    50%     { stroke-dashoffset: START_VALUE;  transform: rotateX(180deg) rotate(161.5deg); }\n\n    50.0001%  { stroke-dashoffset: START_VALUE;  transform: rotate(180deg); }\n    62.5%   { stroke-dashoffset: END_VALUE;    transform: rotate(180deg); }\n    62.5001%  { stroke-dashoffset: END_VALUE;    transform: rotateX(180deg) rotate(251.5deg); }\n    75%     { stroke-dashoffset: START_VALUE;  transform: rotateX(180deg) rotate(251.5deg); }\n\n    75.0001%  { stroke-dashoffset: START_VALUE;  transform: rotate(90deg); }\n    87.5%   { stroke-dashoffset: END_VALUE;    transform: rotate(90deg); }\n    87.5001%  { stroke-dashoffset: END_VALUE;    transform: rotateX(180deg) rotate(341.5deg); }\n    100%    { stroke-dashoffset: START_VALUE;  transform: rotateX(180deg) rotate(341.5deg); }\n  }\n";
100412
/**
100413
 * `<mat-progress-spinner>` component.
100414
 */
100415
var MatProgressSpinner = /** @class */ (function (_super) {
100416
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatProgressSpinner, _super);
100417
    function MatProgressSpinner(_elementRef, platform, _document,
100418
    // @breaking-change 7.0.0 animationMode and defaults parameters to be made required.
100419
    animationMode, defaults) {
100420
        var _this = _super.call(this, _elementRef) || this;
100421
        _this._elementRef = _elementRef;
100422
        _this._document = _document;
100423
        _this.animationMode = animationMode;
100424
        _this.defaults = defaults;
100425
        _this._value = 0;
100426
        _this._fallbackAnimation = false;
100427
        /**
100428
         * Whether the _mat-animation-noopable class should be applied, disabling animations.
100429
         */
100430
        _this._noopAnimations = _this.animationMode === 'NoopAnimations' && (!!_this.defaults && !_this.defaults._forceAnimations);
100431
        _this._diameter = BASE_SIZE;
100432
        /**
100433
         * Mode of the progress circle
100434
         */
100435
        _this.mode = 'determinate';
100436
        _this._fallbackAnimation = platform.EDGE || platform.TRIDENT;
100437
        if (defaults) {
100438
            if (defaults.diameter) {
100439
                _this.diameter = defaults.diameter;
100440
            }
100441
            if (defaults.strokeWidth) {
100442
                _this.strokeWidth = defaults.strokeWidth;
100443
            }
100444
        }
100445
        // On IE and Edge, we can't animate the `stroke-dashoffset`
100446
        // reliably so we fall back to a non-spec animation.
100447
        var /** @type {?} */ animationClass = "mat-progress-spinner-indeterminate" + (_this._fallbackAnimation ? '-fallback' : '') + "-animation";
100448
        _elementRef.nativeElement.classList.add(animationClass);
100449
        return _this;
100450
    }
100451
    Object.defineProperty(MatProgressSpinner.prototype, "diameter", {
100452
        get: /**
100453
         * The diameter of the progress spinner (will set width and height of svg).
100454
         * @return {?}
100455
         */
100456
        function () { return this._diameter; },
100457
        set: /**
100458
         * @param {?} size
100459
         * @return {?}
100460
         */
100461
        function (size) {
100462
            this._diameter = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_6__["coerceNumberProperty"])(size);
100463
            if (!this._fallbackAnimation && !MatProgressSpinner.diameters.has(this._diameter)) {
100464
                this._attachStyleNode();
100465
            }
100466
        },
100467
        enumerable: true,
100468
        configurable: true
100469
    });
100470
    Object.defineProperty(MatProgressSpinner.prototype, "strokeWidth", {
100471
        get: /**
100472
         * Stroke width of the progress spinner.
100473
         * @return {?}
100474
         */
100475
        function () {
100476
            return this._strokeWidth || this.diameter / 10;
100477
        },
100478
        set: /**
100479
         * @param {?} value
100480
         * @return {?}
100481
         */
100482
        function (value) {
100483
            this._strokeWidth = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_6__["coerceNumberProperty"])(value);
100484
        },
100485
        enumerable: true,
100486
        configurable: true
100487
    });
100488
    Object.defineProperty(MatProgressSpinner.prototype, "value", {
100489
        get: /**
100490
         * Value of the progress circle.
100491
         * @return {?}
100492
         */
100493
        function () {
100494
            return this.mode === 'determinate' ? this._value : 0;
100495
        },
100496
        set: /**
100497
         * @param {?} newValue
100498
         * @return {?}
100499
         */
100500
        function (newValue) {
100501
            this._value = Math.max(0, Math.min(100, Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_6__["coerceNumberProperty"])(newValue)));
100502
        },
100503
        enumerable: true,
100504
        configurable: true
100505
    });
100506
    Object.defineProperty(MatProgressSpinner.prototype, "_circleRadius", {
100507
        /** The radius of the spinner, adjusted for stroke width. */
100508
        get: /**
100509
         * The radius of the spinner, adjusted for stroke width.
100510
         * @return {?}
100511
         */
100512
        function () {
100513
            return (this.diameter - BASE_STROKE_WIDTH) / 2;
100514
        },
100515
        enumerable: true,
100516
        configurable: true
100517
    });
100518
    Object.defineProperty(MatProgressSpinner.prototype, "_viewBox", {
100519
        /** The view box of the spinner's svg element. */
100520
        get: /**
100521
         * The view box of the spinner's svg element.
100522
         * @return {?}
100523
         */
100524
        function () {
100525
            var /** @type {?} */ viewBox = this._circleRadius * 2 + this.strokeWidth;
100526
            return "0 0 " + viewBox + " " + viewBox;
100527
        },
100528
        enumerable: true,
100529
        configurable: true
100530
    });
100531
    Object.defineProperty(MatProgressSpinner.prototype, "_strokeCircumference", {
100532
        /** The stroke circumference of the svg circle. */
100533
        get: /**
100534
         * The stroke circumference of the svg circle.
100535
         * @return {?}
100536
         */
100537
        function () {
100538
            return 2 * Math.PI * this._circleRadius;
100539
        },
100540
        enumerable: true,
100541
        configurable: true
100542
    });
100543
    Object.defineProperty(MatProgressSpinner.prototype, "_strokeDashOffset", {
100544
        /** The dash offset of the svg circle. */
100545
        get: /**
100546
         * The dash offset of the svg circle.
100547
         * @return {?}
100548
         */
100549
        function () {
100550
            if (this.mode === 'determinate') {
100551
                return this._strokeCircumference * (100 - this._value) / 100;
100552
            }
100553
            // In fallback mode set the circle to 80% and rotate it with CSS.
100554
            if (this._fallbackAnimation && this.mode === 'indeterminate') {
100555
                return this._strokeCircumference * 0.2;
100556
            }
100557
            return null;
100558
        },
100559
        enumerable: true,
100560
        configurable: true
100561
    });
100562
    Object.defineProperty(MatProgressSpinner.prototype, "_circleStrokeWidth", {
100563
        /** Stroke width of the circle in percent. */
100564
        get: /**
100565
         * Stroke width of the circle in percent.
100566
         * @return {?}
100567
         */
100568
        function () {
100569
            return this.strokeWidth / this.diameter * 100;
100570
        },
100571
        enumerable: true,
100572
        configurable: true
100573
    });
100574
    /**
100575
     * Dynamically generates a style tag containing the correct animation for this diameter.
100576
     * @return {?}
100577
     */
100578
    MatProgressSpinner.prototype._attachStyleNode = /**
100579
     * Dynamically generates a style tag containing the correct animation for this diameter.
100580
     * @return {?}
100581
     */
100582
    function () {
100583
        var /** @type {?} */ styleTag = MatProgressSpinner.styleTag;
100584
        if (!styleTag) {
100585
            styleTag = this._document.createElement('style');
100586
            this._document.head.appendChild(styleTag);
100587
            MatProgressSpinner.styleTag = styleTag;
100588
        }
100589
        if (styleTag && styleTag.sheet) {
100590
            (/** @type {?} */ (styleTag.sheet)).insertRule(this._getAnimationText(), 0);
100591
        }
100592
        MatProgressSpinner.diameters.add(this.diameter);
100593
    };
100594
    /**
100595
     * Generates animation styles adjusted for the spinner's diameter.
100596
     * @return {?}
100597
     */
100598
    MatProgressSpinner.prototype._getAnimationText = /**
100599
     * Generates animation styles adjusted for the spinner's diameter.
100600
     * @return {?}
100601
     */
100602
    function () {
100603
        return INDETERMINATE_ANIMATION_TEMPLATE
100604
            .replace(/START_VALUE/g, "" + 0.95 * this._strokeCircumference)
100605
            .replace(/END_VALUE/g, "" + 0.2 * this._strokeCircumference)
100606
            .replace(/DIAMETER/g, "" + this.diameter);
100607
    };
100608
    /**
100609
     * Tracks diameters of existing instances to de-dupe generated styles (default d = 100)
100610
     */
100611
    MatProgressSpinner.diameters = new Set([BASE_SIZE]);
100612
    /**
100613
     * Used for storing all of the generated keyframe animations.
100614
     * \@dynamic
100615
     */
100616
    MatProgressSpinner.styleTag = null;
100617
    MatProgressSpinner.decorators = [
100618
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"], args: [{selector: 'mat-progress-spinner',
100619
                    exportAs: 'matProgressSpinner',
100620
                    host: {
100621
                        'role': 'progressbar',
100622
                        'class': 'mat-progress-spinner',
100623
                        '[class._mat-animation-noopable]': "_noopAnimations",
100624
                        '[style.width.px]': 'diameter',
100625
                        '[style.height.px]': 'diameter',
100626
                        '[attr.aria-valuemin]': 'mode === "determinate" ? 0 : null',
100627
                        '[attr.aria-valuemax]': 'mode === "determinate" ? 100 : null',
100628
                        '[attr.aria-valuenow]': 'value',
100629
                        '[attr.mode]': 'mode',
100630
                    },
100631
                    inputs: ['color'],
100632
                    template: "<svg [style.width.px]=\"diameter\" [style.height.px]=\"diameter\" [attr.viewBox]=\"_viewBox\" preserveAspectRatio=\"xMidYMid meet\" focusable=\"false\" [ngSwitch]=\"mode === 'indeterminate'\"><circle *ngSwitchCase=\"true\" cx=\"50%\" cy=\"50%\" [attr.r]=\"_circleRadius\" [style.animation-name]=\"'mat-progress-spinner-stroke-rotate-' + diameter\" [style.stroke-dashoffset.px]=\"_strokeDashOffset\" [style.stroke-dasharray.px]=\"_strokeCircumference\" [style.stroke-width.%]=\"_circleStrokeWidth\"></circle><circle *ngSwitchCase=\"false\" cx=\"50%\" cy=\"50%\" [attr.r]=\"_circleRadius\" [style.stroke-dashoffset.px]=\"_strokeDashOffset\" [style.stroke-dasharray.px]=\"_strokeCircumference\" [style.stroke-width.%]=\"_circleStrokeWidth\"></circle></svg>",
100633
                    styles: [".mat-progress-spinner{display:block;position:relative}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:transparent;transform-origin:center;transition:stroke-dashoffset 225ms linear}._mat-animation-noopable.mat-progress-spinner circle{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate]{animation:mat-progress-spinner-linear-rotate 2s linear infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate]{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition-property:stroke;animation-duration:4s;animation-timing-function:cubic-bezier(.35,0,.25,1);animation-iteration-count:infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate]{animation:mat-progress-spinner-stroke-rotate-fallback 10s cubic-bezier(.87,.03,.33,1) infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate]{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition-property:stroke}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition:none;animation:none}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.60617px;transform:rotate(0)}12.5%{stroke-dashoffset:56.54867px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.60617px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.54867px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.60617px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.54867px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.60617px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.54867px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(341.5deg)}}@keyframes mat-progress-spinner-stroke-rotate-fallback{0%{transform:rotate(0)}25%{transform:rotate(1170deg)}50%{transform:rotate(2340deg)}75%{transform:rotate(3510deg)}100%{transform:rotate(4680deg)}}"],
100634
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
100635
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
100636
                },] },
100637
    ];
100638
    /** @nocollapse */
100639
    MatProgressSpinner.ctorParameters = function () { return [
100640
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
100641
        { type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_4__["Platform"], },
100642
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_5__["DOCUMENT"],] },] },
100643
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_2__["ANIMATION_MODULE_TYPE"],] },] },
100644
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS,] },] },
100645
    ]; };
100646
    MatProgressSpinner.propDecorators = {
100647
        "diameter": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
100648
        "strokeWidth": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
100649
        "mode": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
100650
        "value": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
100651
    };
100652
    return MatProgressSpinner;
100653
}(_MatProgressSpinnerMixinBase));
100654
/**
100655
 * `<mat-spinner>` component.
100656
 *
100657
 * This is a component definition to be used as a convenience reference to create an
100658
 * indeterminate `<mat-progress-spinner>` instance.
100659
 */
100660
var MatSpinner = /** @class */ (function (_super) {
100661
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatSpinner, _super);
100662
    function MatSpinner(elementRef, platform, document,
100663
    // @breaking-changes 7.0.0 animationMode and defaults parameters to be made required.
100664
    animationMode, defaults) {
100665
        var _this = _super.call(this, elementRef, platform, document, animationMode, defaults) || this;
100666
        _this.mode = 'indeterminate';
100667
        return _this;
100668
    }
100669
    MatSpinner.decorators = [
100670
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"], args: [{selector: 'mat-spinner',
100671
                    host: {
100672
                        'role': 'progressbar',
100673
                        'mode': 'indeterminate',
100674
                        'class': 'mat-spinner mat-progress-spinner',
100675
                        '[class._mat-animation-noopable]': "_noopAnimations",
100676
                        '[style.width.px]': 'diameter',
100677
                        '[style.height.px]': 'diameter',
100678
                    },
100679
                    inputs: ['color'],
100680
                    template: "<svg [style.width.px]=\"diameter\" [style.height.px]=\"diameter\" [attr.viewBox]=\"_viewBox\" preserveAspectRatio=\"xMidYMid meet\" focusable=\"false\" [ngSwitch]=\"mode === 'indeterminate'\"><circle *ngSwitchCase=\"true\" cx=\"50%\" cy=\"50%\" [attr.r]=\"_circleRadius\" [style.animation-name]=\"'mat-progress-spinner-stroke-rotate-' + diameter\" [style.stroke-dashoffset.px]=\"_strokeDashOffset\" [style.stroke-dasharray.px]=\"_strokeCircumference\" [style.stroke-width.%]=\"_circleStrokeWidth\"></circle><circle *ngSwitchCase=\"false\" cx=\"50%\" cy=\"50%\" [attr.r]=\"_circleRadius\" [style.stroke-dashoffset.px]=\"_strokeDashOffset\" [style.stroke-dasharray.px]=\"_strokeCircumference\" [style.stroke-width.%]=\"_circleStrokeWidth\"></circle></svg>",
100681
                    styles: [".mat-progress-spinner{display:block;position:relative}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:transparent;transform-origin:center;transition:stroke-dashoffset 225ms linear}._mat-animation-noopable.mat-progress-spinner circle{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate]{animation:mat-progress-spinner-linear-rotate 2s linear infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate]{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition-property:stroke;animation-duration:4s;animation-timing-function:cubic-bezier(.35,0,.25,1);animation-iteration-count:infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate]{animation:mat-progress-spinner-stroke-rotate-fallback 10s cubic-bezier(.87,.03,.33,1) infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate]{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition-property:stroke}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition:none;animation:none}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.60617px;transform:rotate(0)}12.5%{stroke-dashoffset:56.54867px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.60617px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.54867px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.60617px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.54867px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.60617px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.54867px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.54867px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.60617px;transform:rotateX(180deg) rotate(341.5deg)}}@keyframes mat-progress-spinner-stroke-rotate-fallback{0%{transform:rotate(0)}25%{transform:rotate(1170deg)}50%{transform:rotate(2340deg)}75%{transform:rotate(3510deg)}100%{transform:rotate(4680deg)}}"],
100682
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
100683
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
100684
                },] },
100685
    ];
100686
    /** @nocollapse */
100687
    MatSpinner.ctorParameters = function () { return [
100688
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
100689
        { type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_4__["Platform"], },
100690
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_5__["DOCUMENT"],] },] },
100691
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_2__["ANIMATION_MODULE_TYPE"],] },] },
100692
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS,] },] },
100693
    ]; };
100694
    return MatSpinner;
100695
}(MatProgressSpinner));
100696
 
100697
/**
100698
 * @fileoverview added by tsickle
100699
 * @suppress {checkTypes} checked by tsc
100700
 */
100701
var MatProgressSpinnerModule = /** @class */ (function () {
100702
    function MatProgressSpinnerModule() {
100703
    }
100704
    MatProgressSpinnerModule.decorators = [
100705
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{
100706
                    imports: [_angular_material_core__WEBPACK_IMPORTED_MODULE_3__["MatCommonModule"], _angular_common__WEBPACK_IMPORTED_MODULE_5__["CommonModule"]],
100707
                    exports: [
100708
                        MatProgressSpinner,
100709
                        MatSpinner,
100710
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_3__["MatCommonModule"]
100711
                    ],
100712
                    declarations: [
100713
                        MatProgressSpinner,
100714
                        MatSpinner
100715
                    ],
100716
                },] },
100717
    ];
100718
    return MatProgressSpinnerModule;
100719
}());
100720
 
100721
/**
100722
 * @fileoverview added by tsickle
100723
 * @suppress {checkTypes} checked by tsc
100724
 */
100725
 
100726
/**
100727
 * @fileoverview added by tsickle
100728
 * @suppress {checkTypes} checked by tsc
100729
 */
100730
 
100731
 
100732
//# sourceMappingURL=progress-spinner.es5.js.map
100733
 
100734
 
100735
/***/ }),
100736
 
100737
/***/ "./node_modules/@angular/material/esm5/radio.es5.js":
100738
/*!**********************************************************!*\
100739
  !*** ./node_modules/@angular/material/esm5/radio.es5.js ***!
100740
  \**********************************************************/
100741
/*! exports provided: MatRadioModule, MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR, MatRadioChange, MatRadioGroupBase, _MatRadioGroupMixinBase, MatRadioGroup, MatRadioButtonBase, _MatRadioButtonMixinBase, MatRadioButton */
100742
/***/ (function(module, __webpack_exports__, __webpack_require__) {
100743
 
100744
"use strict";
100745
__webpack_require__.r(__webpack_exports__);
100746
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatRadioModule", function() { return MatRadioModule; });
100747
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR", function() { return MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR; });
100748
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatRadioChange", function() { return MatRadioChange; });
100749
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatRadioGroupBase", function() { return MatRadioGroupBase; });
100750
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatRadioGroupMixinBase", function() { return _MatRadioGroupMixinBase; });
100751
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatRadioGroup", function() { return MatRadioGroup; });
100752
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatRadioButtonBase", function() { return MatRadioButtonBase; });
100753
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatRadioButtonMixinBase", function() { return _MatRadioButtonMixinBase; });
100754
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatRadioButton", function() { return MatRadioButton; });
100755
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
100756
/* harmony import */ var _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/cdk/a11y */ "./node_modules/@angular/cdk/esm5/a11y.es5.js");
100757
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
100758
/* harmony import */ var _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/collections */ "./node_modules/@angular/cdk/esm5/collections.es5.js");
100759
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
100760
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
100761
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
100762
/* harmony import */ var _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/platform-browser/animations */ "./node_modules/@angular/platform-browser/fesm5/animations.js");
100763
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
100764
/**
100765
 * @license
100766
 * Copyright Google LLC All Rights Reserved.
100767
 *
100768
 * Use of this source code is governed by an MIT-style license that can be
100769
 * found in the LICENSE file at https://angular.io/license
100770
 */
100771
 
100772
 
100773
 
100774
 
100775
 
100776
 
100777
 
100778
 
100779
 
100780
 
100781
/**
100782
 * @fileoverview added by tsickle
100783
 * @suppress {checkTypes} checked by tsc
100784
 */
100785
// Increasing integer for generating unique ids for radio components.
100786
var /** @type {?} */ nextUniqueId = 0;
100787
/**
100788
 * Provider Expression that allows mat-radio-group to register as a ControlValueAccessor. This
100789
 * allows it to support [(ngModel)] and ngControl.
100790
 * \@docs-private
100791
 */
100792
var /** @type {?} */ MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR = {
100793
    provide: _angular_forms__WEBPACK_IMPORTED_MODULE_5__["NG_VALUE_ACCESSOR"],
100794
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_4__["forwardRef"])(function () { return MatRadioGroup; }),
100795
    multi: true
100796
};
100797
/**
100798
 * Change event object emitted by MatRadio and MatRadioGroup.
100799
 */
100800
var  /**
100801
 * Change event object emitted by MatRadio and MatRadioGroup.
100802
 */
100803
MatRadioChange = /** @class */ (function () {
100804
    function MatRadioChange(source, value) {
100805
        this.source = source;
100806
        this.value = value;
100807
    }
100808
    return MatRadioChange;
100809
}());
100810
/**
100811
 * \@docs-private
100812
 */
100813
var  /**
100814
 * \@docs-private
100815
 */
100816
MatRadioGroupBase = /** @class */ (function () {
100817
    function MatRadioGroupBase() {
100818
    }
100819
    return MatRadioGroupBase;
100820
}());
100821
var /** @type {?} */ _MatRadioGroupMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_6__["mixinDisabled"])(MatRadioGroupBase);
100822
/**
100823
 * A group of radio buttons. May contain one or more `<mat-radio-button>` elements.
100824
 */
100825
var MatRadioGroup = /** @class */ (function (_super) {
100826
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatRadioGroup, _super);
100827
    function MatRadioGroup(_changeDetector) {
100828
        var _this = _super.call(this) || this;
100829
        _this._changeDetector = _changeDetector;
100830
        /**
100831
         * Selected value for the radio group.
100832
         */
100833
        _this._value = null;
100834
        /**
100835
         * The HTML name attribute applied to radio buttons in this group.
100836
         */
100837
        _this._name = "mat-radio-group-" + nextUniqueId++;
100838
        /**
100839
         * The currently selected radio button. Should match value.
100840
         */
100841
        _this._selected = null;
100842
        /**
100843
         * Whether the `value` has been set to its initial value.
100844
         */
100845
        _this._isInitialized = false;
100846
        /**
100847
         * Whether the labels should appear after or before the radio-buttons. Defaults to 'after'
100848
         */
100849
        _this._labelPosition = 'after';
100850
        /**
100851
         * Whether the radio group is disabled.
100852
         */
100853
        _this._disabled = false;
100854
        /**
100855
         * Whether the radio group is required.
100856
         */
100857
        _this._required = false;
100858
        /**
100859
         * The method to be called in order to update ngModel
100860
         */
100861
        _this._controlValueAccessorChangeFn = function () { };
100862
        /**
100863
         * onTouch function registered via registerOnTouch (ControlValueAccessor).
100864
         * \@docs-private
100865
         */
100866
        _this.onTouched = function () { };
100867
        /**
100868
         * Event emitted when the group value changes.
100869
         * Change events are only emitted when the value changes due to user interaction with
100870
         * a radio button (the same behavior as `<input type-"radio">`).
100871
         */
100872
        _this.change = new _angular_core__WEBPACK_IMPORTED_MODULE_4__["EventEmitter"]();
100873
        return _this;
100874
    }
100875
    Object.defineProperty(MatRadioGroup.prototype, "name", {
100876
        get: /**
100877
         * Name of the radio button group. All radio buttons inside this group will use this name.
100878
         * @return {?}
100879
         */
100880
        function () { return this._name; },
100881
        set: /**
100882
         * @param {?} value
100883
         * @return {?}
100884
         */
100885
        function (value) {
100886
            this._name = value;
100887
            this._updateRadioButtonNames();
100888
        },
100889
        enumerable: true,
100890
        configurable: true
100891
    });
100892
    Object.defineProperty(MatRadioGroup.prototype, "labelPosition", {
100893
        get: /**
100894
         * Whether the labels should appear after or before the radio-buttons. Defaults to 'after'
100895
         * @return {?}
100896
         */
100897
        function () {
100898
            return this._labelPosition;
100899
        },
100900
        set: /**
100901
         * @param {?} v
100902
         * @return {?}
100903
         */
100904
        function (v) {
100905
            this._labelPosition = v === 'before' ? 'before' : 'after';
100906
            this._markRadiosForCheck();
100907
        },
100908
        enumerable: true,
100909
        configurable: true
100910
    });
100911
    Object.defineProperty(MatRadioGroup.prototype, "value", {
100912
        get: /**
100913
         * Value for the radio-group. Should equal the value of the selected radio button if there is
100914
         * a corresponding radio button with a matching value. If there is not such a corresponding
100915
         * radio button, this value persists to be applied in case a new radio button is added with a
100916
         * matching value.
100917
         * @return {?}
100918
         */
100919
        function () { return this._value; },
100920
        set: /**
100921
         * @param {?} newValue
100922
         * @return {?}
100923
         */
100924
        function (newValue) {
100925
            if (this._value !== newValue) {
100926
                // Set this before proceeding to ensure no circular loop occurs with selection.
100927
                this._value = newValue;
100928
                this._updateSelectedRadioFromValue();
100929
                this._checkSelectedRadioButton();
100930
            }
100931
        },
100932
        enumerable: true,
100933
        configurable: true
100934
    });
100935
    /**
100936
     * @return {?}
100937
     */
100938
    MatRadioGroup.prototype._checkSelectedRadioButton = /**
100939
     * @return {?}
100940
     */
100941
    function () {
100942
        if (this._selected && !this._selected.checked) {
100943
            this._selected.checked = true;
100944
        }
100945
    };
100946
    Object.defineProperty(MatRadioGroup.prototype, "selected", {
100947
        get: /**
100948
         * The currently selected radio button. If set to a new radio button, the radio group value
100949
         * will be updated to match the new selected button.
100950
         * @return {?}
100951
         */
100952
        function () { return this._selected; },
100953
        set: /**
100954
         * @param {?} selected
100955
         * @return {?}
100956
         */
100957
        function (selected) {
100958
            this._selected = selected;
100959
            this.value = selected ? selected.value : null;
100960
            this._checkSelectedRadioButton();
100961
        },
100962
        enumerable: true,
100963
        configurable: true
100964
    });
100965
    Object.defineProperty(MatRadioGroup.prototype, "disabled", {
100966
        get: /**
100967
         * Whether the radio group is disabled
100968
         * @return {?}
100969
         */
100970
        function () { return this._disabled; },
100971
        set: /**
100972
         * @param {?} value
100973
         * @return {?}
100974
         */
100975
        function (value) {
100976
            this._disabled = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__["coerceBooleanProperty"])(value);
100977
            this._markRadiosForCheck();
100978
        },
100979
        enumerable: true,
100980
        configurable: true
100981
    });
100982
    Object.defineProperty(MatRadioGroup.prototype, "required", {
100983
        get: /**
100984
         * Whether the radio group is required
100985
         * @return {?}
100986
         */
100987
        function () { return this._required; },
100988
        set: /**
100989
         * @param {?} value
100990
         * @return {?}
100991
         */
100992
        function (value) {
100993
            this._required = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__["coerceBooleanProperty"])(value);
100994
            this._markRadiosForCheck();
100995
        },
100996
        enumerable: true,
100997
        configurable: true
100998
    });
100999
    /**
101000
     * Initialize properties once content children are available.
101001
     * This allows us to propagate relevant attributes to associated buttons.
101002
     */
101003
    /**
101004
     * Initialize properties once content children are available.
101005
     * This allows us to propagate relevant attributes to associated buttons.
101006
     * @return {?}
101007
     */
101008
    MatRadioGroup.prototype.ngAfterContentInit = /**
101009
     * Initialize properties once content children are available.
101010
     * This allows us to propagate relevant attributes to associated buttons.
101011
     * @return {?}
101012
     */
101013
    function () {
101014
        // Mark this component as initialized in AfterContentInit because the initial value can
101015
        // possibly be set by NgModel on MatRadioGroup, and it is possible that the OnInit of the
101016
        // NgModel occurs *after* the OnInit of the MatRadioGroup.
101017
        this._isInitialized = true;
101018
    };
101019
    /**
101020
     * Mark this group as being "touched" (for ngModel). Meant to be called by the contained
101021
     * radio buttons upon their blur.
101022
     */
101023
    /**
101024
     * Mark this group as being "touched" (for ngModel). Meant to be called by the contained
101025
     * radio buttons upon their blur.
101026
     * @return {?}
101027
     */
101028
    MatRadioGroup.prototype._touch = /**
101029
     * Mark this group as being "touched" (for ngModel). Meant to be called by the contained
101030
     * radio buttons upon their blur.
101031
     * @return {?}
101032
     */
101033
    function () {
101034
        if (this.onTouched) {
101035
            this.onTouched();
101036
        }
101037
    };
101038
    /**
101039
     * @return {?}
101040
     */
101041
    MatRadioGroup.prototype._updateRadioButtonNames = /**
101042
     * @return {?}
101043
     */
101044
    function () {
101045
        var _this = this;
101046
        if (this._radios) {
101047
            this._radios.forEach(function (radio) {
101048
                radio.name = _this.name;
101049
            });
101050
        }
101051
    };
101052
    /**
101053
     * Updates the `selected` radio button from the internal _value state.
101054
     * @return {?}
101055
     */
101056
    MatRadioGroup.prototype._updateSelectedRadioFromValue = /**
101057
     * Updates the `selected` radio button from the internal _value state.
101058
     * @return {?}
101059
     */
101060
    function () {
101061
        var _this = this;
101062
        // If the value already matches the selected radio, do nothing.
101063
        var /** @type {?} */ isAlreadySelected = this._selected !== null && this._selected.value === this._value;
101064
        if (this._radios && !isAlreadySelected) {
101065
            this._selected = null;
101066
            this._radios.forEach(function (radio) {
101067
                radio.checked = _this.value === radio.value;
101068
                if (radio.checked) {
101069
                    _this._selected = radio;
101070
                }
101071
            });
101072
        }
101073
    };
101074
    /** Dispatch change event with current selection and group value. */
101075
    /**
101076
     * Dispatch change event with current selection and group value.
101077
     * @return {?}
101078
     */
101079
    MatRadioGroup.prototype._emitChangeEvent = /**
101080
     * Dispatch change event with current selection and group value.
101081
     * @return {?}
101082
     */
101083
    function () {
101084
        if (this._isInitialized) {
101085
            this.change.emit(new MatRadioChange(/** @type {?} */ ((this._selected)), this._value));
101086
        }
101087
    };
101088
    /**
101089
     * @return {?}
101090
     */
101091
    MatRadioGroup.prototype._markRadiosForCheck = /**
101092
     * @return {?}
101093
     */
101094
    function () {
101095
        if (this._radios) {
101096
            this._radios.forEach(function (radio) { return radio._markForCheck(); });
101097
        }
101098
    };
101099
    /**
101100
     * Sets the model value. Implemented as part of ControlValueAccessor.
101101
     * @param value
101102
     */
101103
    /**
101104
     * Sets the model value. Implemented as part of ControlValueAccessor.
101105
     * @param {?} value
101106
     * @return {?}
101107
     */
101108
    MatRadioGroup.prototype.writeValue = /**
101109
     * Sets the model value. Implemented as part of ControlValueAccessor.
101110
     * @param {?} value
101111
     * @return {?}
101112
     */
101113
    function (value) {
101114
        this.value = value;
101115
        this._changeDetector.markForCheck();
101116
    };
101117
    /**
101118
     * Registers a callback to be triggered when the model value changes.
101119
     * Implemented as part of ControlValueAccessor.
101120
     * @param fn Callback to be registered.
101121
     */
101122
    /**
101123
     * Registers a callback to be triggered when the model value changes.
101124
     * Implemented as part of ControlValueAccessor.
101125
     * @param {?} fn Callback to be registered.
101126
     * @return {?}
101127
     */
101128
    MatRadioGroup.prototype.registerOnChange = /**
101129
     * Registers a callback to be triggered when the model value changes.
101130
     * Implemented as part of ControlValueAccessor.
101131
     * @param {?} fn Callback to be registered.
101132
     * @return {?}
101133
     */
101134
    function (fn) {
101135
        this._controlValueAccessorChangeFn = fn;
101136
    };
101137
    /**
101138
     * Registers a callback to be triggered when the control is touched.
101139
     * Implemented as part of ControlValueAccessor.
101140
     * @param fn Callback to be registered.
101141
     */
101142
    /**
101143
     * Registers a callback to be triggered when the control is touched.
101144
     * Implemented as part of ControlValueAccessor.
101145
     * @param {?} fn Callback to be registered.
101146
     * @return {?}
101147
     */
101148
    MatRadioGroup.prototype.registerOnTouched = /**
101149
     * Registers a callback to be triggered when the control is touched.
101150
     * Implemented as part of ControlValueAccessor.
101151
     * @param {?} fn Callback to be registered.
101152
     * @return {?}
101153
     */
101154
    function (fn) {
101155
        this.onTouched = fn;
101156
    };
101157
    /**
101158
     * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.
101159
     * @param isDisabled Whether the control should be disabled.
101160
     */
101161
    /**
101162
     * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.
101163
     * @param {?} isDisabled Whether the control should be disabled.
101164
     * @return {?}
101165
     */
101166
    MatRadioGroup.prototype.setDisabledState = /**
101167
     * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.
101168
     * @param {?} isDisabled Whether the control should be disabled.
101169
     * @return {?}
101170
     */
101171
    function (isDisabled) {
101172
        this.disabled = isDisabled;
101173
        this._changeDetector.markForCheck();
101174
    };
101175
    MatRadioGroup.decorators = [
101176
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Directive"], args: [{
101177
                    selector: 'mat-radio-group',
101178
                    exportAs: 'matRadioGroup',
101179
                    providers: [MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR],
101180
                    host: {
101181
                        'role': 'radiogroup',
101182
                        'class': 'mat-radio-group',
101183
                    },
101184
                    inputs: ['disabled'],
101185
                },] },
101186
    ];
101187
    /** @nocollapse */
101188
    MatRadioGroup.ctorParameters = function () { return [
101189
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ChangeDetectorRef"], },
101190
    ]; };
101191
    MatRadioGroup.propDecorators = {
101192
        "change": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Output"] },],
101193
        "_radios": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ContentChildren"], args: [Object(_angular_core__WEBPACK_IMPORTED_MODULE_4__["forwardRef"])(function () { return MatRadioButton; }), { descendants: true },] },],
101194
        "name": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
101195
        "labelPosition": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
101196
        "value": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
101197
        "selected": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
101198
        "disabled": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
101199
        "required": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
101200
    };
101201
    return MatRadioGroup;
101202
}(_MatRadioGroupMixinBase));
101203
/**
101204
 * \@docs-private
101205
 */
101206
var  /**
101207
 * \@docs-private
101208
 */
101209
MatRadioButtonBase = /** @class */ (function () {
101210
    function MatRadioButtonBase(_elementRef) {
101211
        this._elementRef = _elementRef;
101212
    }
101213
    return MatRadioButtonBase;
101214
}());
101215
// As per Material design specifications the selection control radio should use the accent color
101216
// palette by default. https://material.io/guidelines/components/selection-controls.html
101217
var /** @type {?} */ _MatRadioButtonMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_6__["mixinColor"])(Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_6__["mixinDisableRipple"])(Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_6__["mixinTabIndex"])(MatRadioButtonBase)), 'accent');
101218
/**
101219
 * A Material design radio-button. Typically placed inside of `<mat-radio-group>` elements.
101220
 */
101221
var MatRadioButton = /** @class */ (function (_super) {
101222
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatRadioButton, _super);
101223
    function MatRadioButton(radioGroup, elementRef, _changeDetector, _focusMonitor, _radioDispatcher, _animationMode) {
101224
        var _this = _super.call(this, elementRef) || this;
101225
        _this._changeDetector = _changeDetector;
101226
        _this._focusMonitor = _focusMonitor;
101227
        _this._radioDispatcher = _radioDispatcher;
101228
        _this._animationMode = _animationMode;
101229
        _this._uniqueId = "mat-radio-" + ++nextUniqueId;
101230
        /**
101231
         * The unique ID for the radio button.
101232
         */
101233
        _this.id = _this._uniqueId;
101234
        /**
101235
         * Event emitted when the checked state of this radio button changes.
101236
         * Change events are only emitted when the value changes due to user interaction with
101237
         * the radio button (the same behavior as `<input type-"radio">`).
101238
         */
101239
        _this.change = new _angular_core__WEBPACK_IMPORTED_MODULE_4__["EventEmitter"]();
101240
        /**
101241
         * Whether this radio is checked.
101242
         */
101243
        _this._checked = false;
101244
        /**
101245
         * Value assigned to this radio.
101246
         */
101247
        _this._value = null;
101248
        /**
101249
         * Unregister function for _radioDispatcher
101250
         */
101251
        _this._removeUniqueSelectionListener = function () { };
101252
        // Assertions. Ideally these should be stripped out by the compiler.
101253
        // TODO(jelbourn): Assert that there's no name binding AND a parent radio group.
101254
        // Assertions. Ideally these should be stripped out by the compiler.
101255
        // TODO(jelbourn): Assert that there's no name binding AND a parent radio group.
101256
        _this.radioGroup = radioGroup;
101257
        _this._removeUniqueSelectionListener =
101258
            _radioDispatcher.listen(function (id, name) {
101259
                if (id !== _this.id && name === _this.name) {
101260
                    _this.checked = false;
101261
                }
101262
            });
101263
        return _this;
101264
    }
101265
    Object.defineProperty(MatRadioButton.prototype, "checked", {
101266
        get: /**
101267
         * Whether this radio button is checked.
101268
         * @return {?}
101269
         */
101270
        function () { return this._checked; },
101271
        set: /**
101272
         * @param {?} value
101273
         * @return {?}
101274
         */
101275
        function (value) {
101276
            var /** @type {?} */ newCheckedState = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__["coerceBooleanProperty"])(value);
101277
            if (this._checked !== newCheckedState) {
101278
                this._checked = newCheckedState;
101279
                if (newCheckedState && this.radioGroup && this.radioGroup.value !== this.value) {
101280
                    this.radioGroup.selected = this;
101281
                }
101282
                else if (!newCheckedState && this.radioGroup && this.radioGroup.value === this.value) {
101283
                    // When unchecking the selected radio button, update the selected radio
101284
                    // property on the group.
101285
                    this.radioGroup.selected = null;
101286
                }
101287
                if (newCheckedState) {
101288
                    // Notify all radio buttons with the same name to un-check.
101289
                    this._radioDispatcher.notify(this.id, this.name);
101290
                }
101291
                this._changeDetector.markForCheck();
101292
            }
101293
        },
101294
        enumerable: true,
101295
        configurable: true
101296
    });
101297
    Object.defineProperty(MatRadioButton.prototype, "value", {
101298
        get: /**
101299
         * The value of this radio button.
101300
         * @return {?}
101301
         */
101302
        function () { return this._value; },
101303
        set: /**
101304
         * @param {?} value
101305
         * @return {?}
101306
         */
101307
        function (value) {
101308
            if (this._value !== value) {
101309
                this._value = value;
101310
                if (this.radioGroup !== null) {
101311
                    if (!this.checked) {
101312
                        // Update checked when the value changed to match the radio group's value
101313
                        this.checked = this.radioGroup.value === value;
101314
                    }
101315
                    if (this.checked) {
101316
                        this.radioGroup.selected = this;
101317
                    }
101318
                }
101319
            }
101320
        },
101321
        enumerable: true,
101322
        configurable: true
101323
    });
101324
    Object.defineProperty(MatRadioButton.prototype, "labelPosition", {
101325
        get: /**
101326
         * Whether the label should appear after or before the radio button. Defaults to 'after'
101327
         * @return {?}
101328
         */
101329
        function () {
101330
            return this._labelPosition || (this.radioGroup && this.radioGroup.labelPosition) || 'after';
101331
        },
101332
        set: /**
101333
         * @param {?} value
101334
         * @return {?}
101335
         */
101336
        function (value) {
101337
            this._labelPosition = value;
101338
        },
101339
        enumerable: true,
101340
        configurable: true
101341
    });
101342
    Object.defineProperty(MatRadioButton.prototype, "disabled", {
101343
        get: /**
101344
         * Whether the radio button is disabled.
101345
         * @return {?}
101346
         */
101347
        function () {
101348
            return this._disabled || (this.radioGroup !== null && this.radioGroup.disabled);
101349
        },
101350
        set: /**
101351
         * @param {?} value
101352
         * @return {?}
101353
         */
101354
        function (value) {
101355
            var /** @type {?} */ newDisabledState = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__["coerceBooleanProperty"])(value);
101356
            if (this._disabled !== newDisabledState) {
101357
                this._disabled = newDisabledState;
101358
                this._changeDetector.markForCheck();
101359
            }
101360
        },
101361
        enumerable: true,
101362
        configurable: true
101363
    });
101364
    Object.defineProperty(MatRadioButton.prototype, "required", {
101365
        get: /**
101366
         * Whether the radio button is required.
101367
         * @return {?}
101368
         */
101369
        function () {
101370
            return this._required || (this.radioGroup && this.radioGroup.required);
101371
        },
101372
        set: /**
101373
         * @param {?} value
101374
         * @return {?}
101375
         */
101376
        function (value) {
101377
            this._required = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__["coerceBooleanProperty"])(value);
101378
        },
101379
        enumerable: true,
101380
        configurable: true
101381
    });
101382
    Object.defineProperty(MatRadioButton.prototype, "inputId", {
101383
        /** ID of the native input element inside `<mat-radio-button>` */
101384
        get: /**
101385
         * ID of the native input element inside `<mat-radio-button>`
101386
         * @return {?}
101387
         */
101388
        function () { return (this.id || this._uniqueId) + "-input"; },
101389
        enumerable: true,
101390
        configurable: true
101391
    });
101392
    /** Focuses the radio button. */
101393
    /**
101394
     * Focuses the radio button.
101395
     * @return {?}
101396
     */
101397
    MatRadioButton.prototype.focus = /**
101398
     * Focuses the radio button.
101399
     * @return {?}
101400
     */
101401
    function () {
101402
        this._focusMonitor.focusVia(this._inputElement.nativeElement, 'keyboard');
101403
    };
101404
    /**
101405
     * Marks the radio button as needing checking for change detection.
101406
     * This method is exposed because the parent radio group will directly
101407
     * update bound properties of the radio button.
101408
     */
101409
    /**
101410
     * Marks the radio button as needing checking for change detection.
101411
     * This method is exposed because the parent radio group will directly
101412
     * update bound properties of the radio button.
101413
     * @return {?}
101414
     */
101415
    MatRadioButton.prototype._markForCheck = /**
101416
     * Marks the radio button as needing checking for change detection.
101417
     * This method is exposed because the parent radio group will directly
101418
     * update bound properties of the radio button.
101419
     * @return {?}
101420
     */
101421
    function () {
101422
        // When group value changes, the button will not be notified. Use `markForCheck` to explicit
101423
        // update radio button's status
101424
        this._changeDetector.markForCheck();
101425
    };
101426
    /**
101427
     * @return {?}
101428
     */
101429
    MatRadioButton.prototype.ngOnInit = /**
101430
     * @return {?}
101431
     */
101432
    function () {
101433
        if (this.radioGroup) {
101434
            // If the radio is inside a radio group, determine if it should be checked
101435
            this.checked = this.radioGroup.value === this._value;
101436
            // Copy name from parent radio group
101437
            this.name = this.radioGroup.name;
101438
        }
101439
    };
101440
    /**
101441
     * @return {?}
101442
     */
101443
    MatRadioButton.prototype.ngAfterViewInit = /**
101444
     * @return {?}
101445
     */
101446
    function () {
101447
        var _this = this;
101448
        this._focusMonitor
101449
            .monitor(this._inputElement.nativeElement)
101450
            .subscribe(function (focusOrigin) { return _this._onInputFocusChange(focusOrigin); });
101451
    };
101452
    /**
101453
     * @return {?}
101454
     */
101455
    MatRadioButton.prototype.ngOnDestroy = /**
101456
     * @return {?}
101457
     */
101458
    function () {
101459
        this._focusMonitor.stopMonitoring(this._inputElement.nativeElement);
101460
        this._removeUniqueSelectionListener();
101461
    };
101462
    /**
101463
     * Dispatch change event with current value.
101464
     * @return {?}
101465
     */
101466
    MatRadioButton.prototype._emitChangeEvent = /**
101467
     * Dispatch change event with current value.
101468
     * @return {?}
101469
     */
101470
    function () {
101471
        this.change.emit(new MatRadioChange(this, this._value));
101472
    };
101473
    /**
101474
     * @return {?}
101475
     */
101476
    MatRadioButton.prototype._isRippleDisabled = /**
101477
     * @return {?}
101478
     */
101479
    function () {
101480
        return this.disableRipple || this.disabled;
101481
    };
101482
    /**
101483
     * @param {?} event
101484
     * @return {?}
101485
     */
101486
    MatRadioButton.prototype._onInputClick = /**
101487
     * @param {?} event
101488
     * @return {?}
101489
     */
101490
    function (event) {
101491
        // We have to stop propagation for click events on the visual hidden input element.
101492
        // By default, when a user clicks on a label element, a generated click event will be
101493
        // dispatched on the associated input element. Since we are using a label element as our
101494
        // root container, the click event on the `radio-button` will be executed twice.
101495
        // The real click event will bubble up, and the generated click event also tries to bubble up.
101496
        // This will lead to multiple click events.
101497
        // Preventing bubbling for the second event will solve that issue.
101498
        event.stopPropagation();
101499
    };
101500
    /**
101501
     * Triggered when the radio button received a click or the input recognized any change.
101502
     * Clicking on a label element, will trigger a change event on the associated input.
101503
     */
101504
    /**
101505
     * Triggered when the radio button received a click or the input recognized any change.
101506
     * Clicking on a label element, will trigger a change event on the associated input.
101507
     * @param {?} event
101508
     * @return {?}
101509
     */
101510
    MatRadioButton.prototype._onInputChange = /**
101511
     * Triggered when the radio button received a click or the input recognized any change.
101512
     * Clicking on a label element, will trigger a change event on the associated input.
101513
     * @param {?} event
101514
     * @return {?}
101515
     */
101516
    function (event) {
101517
        // We always have to stop propagation on the change event.
101518
        // Otherwise the change event, from the input element, will bubble up and
101519
        // emit its event object to the `change` output.
101520
        event.stopPropagation();
101521
        var /** @type {?} */ groupValueChanged = this.radioGroup && this.value !== this.radioGroup.value;
101522
        this.checked = true;
101523
        this._emitChangeEvent();
101524
        if (this.radioGroup) {
101525
            this.radioGroup._controlValueAccessorChangeFn(this.value);
101526
            this.radioGroup._touch();
101527
            if (groupValueChanged) {
101528
                this.radioGroup._emitChangeEvent();
101529
            }
101530
        }
101531
    };
101532
    /**
101533
     * Function is called whenever the focus changes for the input element.
101534
     * @param {?} focusOrigin
101535
     * @return {?}
101536
     */
101537
    MatRadioButton.prototype._onInputFocusChange = /**
101538
     * Function is called whenever the focus changes for the input element.
101539
     * @param {?} focusOrigin
101540
     * @return {?}
101541
     */
101542
    function (focusOrigin) {
101543
        // TODO(paul): support `program`. See https://github.com/angular/material2/issues/9889
101544
        if (!this._focusRipple && focusOrigin === 'keyboard') {
101545
            this._focusRipple = this._ripple.launch(0, 0, { persistent: true });
101546
        }
101547
        else if (!focusOrigin) {
101548
            if (this.radioGroup) {
101549
                this.radioGroup._touch();
101550
            }
101551
            if (this._focusRipple) {
101552
                this._focusRipple.fadeOut();
101553
                this._focusRipple = null;
101554
            }
101555
        }
101556
    };
101557
    MatRadioButton.decorators = [
101558
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"], args: [{selector: 'mat-radio-button',
101559
                    template: "<label [attr.for]=\"inputId\" class=\"mat-radio-label\" #label><div class=\"mat-radio-container\"><div class=\"mat-radio-outer-circle\"></div><div class=\"mat-radio-inner-circle\"></div><div mat-ripple class=\"mat-radio-ripple\" [matRippleTrigger]=\"label\" [matRippleDisabled]=\"_isRippleDisabled()\" [matRippleCentered]=\"true\" [matRippleRadius]=\"23\" [matRippleAnimation]=\"{enterDuration: 150}\"></div></div><input #input class=\"mat-radio-input cdk-visually-hidden\" type=\"radio\" [id]=\"inputId\" [checked]=\"checked\" [disabled]=\"disabled\" [tabIndex]=\"tabIndex\" [attr.name]=\"name\" [required]=\"required\" [attr.aria-label]=\"ariaLabel\" [attr.aria-labelledby]=\"ariaLabelledby\" [attr.aria-describedby]=\"ariaDescribedby\" (change)=\"_onInputChange($event)\" (click)=\"_onInputClick($event)\"><div class=\"mat-radio-label-content\" [class.mat-radio-label-before]=\"labelPosition == 'before'\"><span style=\"display:none\">&nbsp;</span><ng-content></ng-content></div></label>",
101560
                    styles: [".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:transparent}.mat-radio-label{cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;height:20px;left:0;position:absolute;top:0;transition:transform ease 280ms,background-color ease 280ms;width:20px;transform:scale(.001)}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-checked .mat-radio-inner-circle{transform:scale(.5)}@media screen and (-ms-high-contrast:active){.mat-radio-checked .mat-radio-inner-circle{border:solid 10px}}.mat-radio-label-content{display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-ripple{position:absolute;left:calc(50% - 25px);top:calc(50% - 25px);height:50px;width:50px;z-index:1;pointer-events:none}"],
101561
                    inputs: ['color', 'disableRipple', 'tabIndex'],
101562
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewEncapsulation"].None,
101563
                    exportAs: 'matRadioButton',
101564
                    host: {
101565
                        'class': 'mat-radio-button',
101566
                        '[class.mat-radio-checked]': 'checked',
101567
                        '[class.mat-radio-disabled]': 'disabled',
101568
                        '[class._mat-animation-noopable]': '_animationMode === "NoopAnimations"',
101569
                        '[attr.id]': 'id',
101570
                        // Note: under normal conditions focus shouldn't land on this element, however it may be
101571
                        // programmatically set, for example inside of a focus trap, in this case we want to forward
101572
                        // the focus to the native element.
101573
                        '(focus)': '_inputElement.nativeElement.focus()',
101574
                    },
101575
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ChangeDetectionStrategy"].OnPush,
101576
                },] },
101577
    ];
101578
    /** @nocollapse */
101579
    MatRadioButton.ctorParameters = function () { return [
101580
        { type: MatRadioGroup, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Optional"] },] },
101581
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ElementRef"], },
101582
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ChangeDetectorRef"], },
101583
        { type: _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_1__["FocusMonitor"], },
101584
        { type: _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_3__["UniqueSelectionDispatcher"], },
101585
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Inject"], args: [_angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_7__["ANIMATION_MODULE_TYPE"],] },] },
101586
    ]; };
101587
    MatRadioButton.propDecorators = {
101588
        "id": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
101589
        "name": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
101590
        "ariaLabel": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"], args: ['aria-label',] },],
101591
        "ariaLabelledby": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"], args: ['aria-labelledby',] },],
101592
        "ariaDescribedby": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"], args: ['aria-describedby',] },],
101593
        "checked": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
101594
        "value": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
101595
        "labelPosition": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
101596
        "disabled": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
101597
        "required": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"] },],
101598
        "change": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Output"] },],
101599
        "_ripple": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: [_angular_material_core__WEBPACK_IMPORTED_MODULE_6__["MatRipple"],] },],
101600
        "_inputElement": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["ViewChild"], args: ['input',] },],
101601
    };
101602
    return MatRadioButton;
101603
}(_MatRadioButtonMixinBase));
101604
 
101605
/**
101606
 * @fileoverview added by tsickle
101607
 * @suppress {checkTypes} checked by tsc
101608
 */
101609
var MatRadioModule = /** @class */ (function () {
101610
    function MatRadioModule() {
101611
    }
101612
    MatRadioModule.decorators = [
101613
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["NgModule"], args: [{
101614
                    imports: [_angular_common__WEBPACK_IMPORTED_MODULE_8__["CommonModule"], _angular_material_core__WEBPACK_IMPORTED_MODULE_6__["MatRippleModule"], _angular_material_core__WEBPACK_IMPORTED_MODULE_6__["MatCommonModule"]],
101615
                    exports: [MatRadioGroup, MatRadioButton, _angular_material_core__WEBPACK_IMPORTED_MODULE_6__["MatCommonModule"]],
101616
                    declarations: [MatRadioGroup, MatRadioButton],
101617
                },] },
101618
    ];
101619
    return MatRadioModule;
101620
}());
101621
 
101622
/**
101623
 * @fileoverview added by tsickle
101624
 * @suppress {checkTypes} checked by tsc
101625
 */
101626
 
101627
/**
101628
 * @fileoverview added by tsickle
101629
 * @suppress {checkTypes} checked by tsc
101630
 */
101631
 
101632
 
101633
//# sourceMappingURL=radio.es5.js.map
101634
 
101635
 
101636
/***/ }),
101637
 
101638
/***/ "./node_modules/@angular/material/esm5/select.es5.js":
101639
/*!***********************************************************!*\
101640
  !*** ./node_modules/@angular/material/esm5/select.es5.js ***!
101641
  \***********************************************************/
101642
/*! exports provided: MatSelectModule, SELECT_PANEL_MAX_HEIGHT, SELECT_PANEL_PADDING_X, SELECT_PANEL_INDENT_PADDING_X, SELECT_ITEM_HEIGHT_EM, SELECT_MULTIPLE_PANEL_PADDING_X, SELECT_PANEL_VIEWPORT_PADDING, MAT_SELECT_SCROLL_STRATEGY, MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY, MAT_SELECT_SCROLL_STRATEGY_PROVIDER, MatSelectChange, MatSelectBase, _MatSelectMixinBase, MatSelectTrigger, MatSelect, matSelectAnimations, transformPanel, fadeInContent */
101643
/***/ (function(module, __webpack_exports__, __webpack_require__) {
101644
 
101645
"use strict";
101646
__webpack_require__.r(__webpack_exports__);
101647
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSelectModule", function() { return MatSelectModule; });
101648
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SELECT_PANEL_MAX_HEIGHT", function() { return SELECT_PANEL_MAX_HEIGHT; });
101649
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SELECT_PANEL_PADDING_X", function() { return SELECT_PANEL_PADDING_X; });
101650
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SELECT_PANEL_INDENT_PADDING_X", function() { return SELECT_PANEL_INDENT_PADDING_X; });
101651
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SELECT_ITEM_HEIGHT_EM", function() { return SELECT_ITEM_HEIGHT_EM; });
101652
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SELECT_MULTIPLE_PANEL_PADDING_X", function() { return SELECT_MULTIPLE_PANEL_PADDING_X; });
101653
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SELECT_PANEL_VIEWPORT_PADDING", function() { return SELECT_PANEL_VIEWPORT_PADDING; });
101654
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_SELECT_SCROLL_STRATEGY", function() { return MAT_SELECT_SCROLL_STRATEGY; });
101655
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY", function() { return MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY; });
101656
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_SELECT_SCROLL_STRATEGY_PROVIDER", function() { return MAT_SELECT_SCROLL_STRATEGY_PROVIDER; });
101657
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSelectChange", function() { return MatSelectChange; });
101658
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSelectBase", function() { return MatSelectBase; });
101659
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatSelectMixinBase", function() { return _MatSelectMixinBase; });
101660
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSelectTrigger", function() { return MatSelectTrigger; });
101661
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSelect", function() { return MatSelect; });
101662
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matSelectAnimations", function() { return matSelectAnimations; });
101663
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transformPanel", function() { return transformPanel; });
101664
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fadeInContent", function() { return fadeInContent; });
101665
/* harmony import */ var _angular_animations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/animations */ "./node_modules/@angular/animations/fesm5/animations.js");
101666
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
101667
/* harmony import */ var _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/cdk/a11y */ "./node_modules/@angular/cdk/esm5/a11y.es5.js");
101668
/* harmony import */ var _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/bidi */ "./node_modules/@angular/cdk/esm5/bidi.es5.js");
101669
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
101670
/* harmony import */ var _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/cdk/collections */ "./node_modules/@angular/cdk/esm5/collections.es5.js");
101671
/* harmony import */ var _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/cdk/keycodes */ "./node_modules/@angular/cdk/esm5/keycodes.es5.js");
101672
/* harmony import */ var _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/cdk/overlay */ "./node_modules/@angular/cdk/esm5/overlay.es5.js");
101673
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
101674
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
101675
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
101676
/* harmony import */ var _angular_material_form_field__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/material/form-field */ "./node_modules/@angular/material/esm5/form-field.es5.js");
101677
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
101678
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
101679
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
101680
/**
101681
 * @license
101682
 * Copyright Google LLC All Rights Reserved.
101683
 *
101684
 * Use of this source code is governed by an MIT-style license that can be
101685
 * found in the LICENSE file at https://angular.io/license
101686
 */
101687
 
101688
 
101689
 
101690
 
101691
 
101692
 
101693
 
101694
 
101695
 
101696
 
101697
 
101698
 
101699
 
101700
 
101701
 
101702
 
101703
/**
101704
 * @fileoverview added by tsickle
101705
 * @suppress {checkTypes} checked by tsc
101706
 */
101707
/**
101708
 * The following are all the animations for the mat-select component, with each
101709
 * const containing the metadata for one animation.
101710
 *
101711
 * The values below match the implementation of the AngularJS Material mat-select animation.
101712
 */
101713
var /** @type {?} */ matSelectAnimations = {
101714
    /**
101715
       * This animation transforms the select's overlay panel on and off the page.
101716
       *
101717
       * When the panel is attached to the DOM, it expands its width by the amount of padding, scales it
101718
       * up to 100% on the Y axis, fades in its border, and translates slightly up and to the
101719
       * side to ensure the option text correctly overlaps the trigger text.
101720
       *
101721
       * When the panel is removed from the DOM, it simply fades out linearly.
101722
       */
101723
    transformPanel: Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["trigger"])('transformPanel', [
101724
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('void', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({
101725
            transform: 'scaleY(0)',
101726
            minWidth: '100%',
101727
            opacity: 0
101728
        })),
101729
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('showing', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({
101730
            opacity: 1,
101731
            minWidth: 'calc(100% + 32px)',
101732
            // 32px = 2 * 16px padding
101733
            transform: 'scaleY(1)'
101734
        })),
101735
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('showing-multiple', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({
101736
            opacity: 1,
101737
            minWidth: 'calc(100% + 64px)',
101738
            // 64px = 48px padding on the left + 16px padding on the right
101739
            transform: 'scaleY(1)'
101740
        })),
101741
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["transition"])('void => *', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["group"])([
101742
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["query"])('@fadeInContent', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["animateChild"])()),
101743
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["animate"])('150ms cubic-bezier(0.25, 0.8, 0.25, 1)')
101744
        ])),
101745
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["transition"])('* => void', [
101746
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["animate"])('250ms 100ms linear', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({ opacity: 0 }))
101747
        ])
101748
    ]),
101749
    /**
101750
       * This animation fades in the background color and text content of the
101751
       * select's options. It is time delayed to occur 100ms after the overlay
101752
       * panel has transformed in.
101753
       */
101754
    fadeInContent: Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["trigger"])('fadeInContent', [
101755
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('showing', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({ opacity: 1 })),
101756
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["transition"])('void => showing', [
101757
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({ opacity: 0 }),
101758
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["animate"])('150ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)')
101759
        ])
101760
    ])
101761
};
101762
/**
101763
 * @deprecated
101764
 * \@breaking-change 7.0.0
101765
 */
101766
var /** @type {?} */ transformPanel = matSelectAnimations.transformPanel;
101767
/**
101768
 * @deprecated
101769
 * \@breaking-change 7.0.0
101770
 */
101771
var /** @type {?} */ fadeInContent = matSelectAnimations.fadeInContent;
101772
 
101773
/**
101774
 * @fileoverview added by tsickle
101775
 * @suppress {checkTypes} checked by tsc
101776
 */
101777
 
101778
/**
101779
 * Returns an exception to be thrown when attempting to change a select's `multiple` option
101780
 * after initialization.
101781
 * \@docs-private
101782
 * @return {?}
101783
 */
101784
function getMatSelectDynamicMultipleError() {
101785
    return Error('Cannot change `multiple` mode of select after initialization.');
101786
}
101787
/**
101788
 * Returns an exception to be thrown when attempting to assign a non-array value to a select
101789
 * in `multiple` mode. Note that `undefined` and `null` are still valid values to allow for
101790
 * resetting the value.
101791
 * \@docs-private
101792
 * @return {?}
101793
 */
101794
function getMatSelectNonArrayValueError() {
101795
    return Error('Value must be an array in multiple-selection mode.');
101796
}
101797
/**
101798
 * Returns an exception to be thrown when assigning a non-function value to the comparator
101799
 * used to determine if a value corresponds to an option. Note that whether the function
101800
 * actually takes two values and returns a boolean is not checked.
101801
 * @return {?}
101802
 */
101803
function getMatSelectNonFunctionValueError() {
101804
    return Error('`compareWith` must be a function.');
101805
}
101806
 
101807
/**
101808
 * @fileoverview added by tsickle
101809
 * @suppress {checkTypes} checked by tsc
101810
 */
101811
var /** @type {?} */ nextUniqueId = 0;
101812
/**
101813
 * The max height of the select's overlay panel
101814
 */
101815
var /** @type {?} */ SELECT_PANEL_MAX_HEIGHT = 256;
101816
/**
101817
 * The panel's padding on the x-axis
101818
 */
101819
var /** @type {?} */ SELECT_PANEL_PADDING_X = 16;
101820
/**
101821
 * The panel's x axis padding if it is indented (e.g. there is an option group).
101822
 */
101823
var /** @type {?} */ SELECT_PANEL_INDENT_PADDING_X = SELECT_PANEL_PADDING_X * 2;
101824
/**
101825
 * The height of the select items in `em` units.
101826
 */
101827
var /** @type {?} */ SELECT_ITEM_HEIGHT_EM = 3;
101828
/**
101829
 * Distance between the panel edge and the option text in
101830
 * multi-selection mode.
101831
 *
101832
 * (SELECT_PANEL_PADDING_X * 1.5) + 20 = 44
101833
 * The padding is multiplied by 1.5 because the checkbox's margin is half the padding.
101834
 * The checkbox width is 20px.
101835
 */
101836
var /** @type {?} */ SELECT_MULTIPLE_PANEL_PADDING_X = SELECT_PANEL_PADDING_X * 1.5 + 20;
101837
/**
101838
 * The select panel will only "fit" inside the viewport if it is positioned at
101839
 * this value or more away from the viewport boundary.
101840
 */
101841
var /** @type {?} */ SELECT_PANEL_VIEWPORT_PADDING = 8;
101842
/**
101843
 * Injection token that determines the scroll handling while a select is open.
101844
 */
101845
var /** @type {?} */ MAT_SELECT_SCROLL_STRATEGY = new _angular_core__WEBPACK_IMPORTED_MODULE_8__["InjectionToken"]('mat-select-scroll-strategy');
101846
/**
101847
 * \@docs-private
101848
 * @param {?} overlay
101849
 * @return {?}
101850
 */
101851
function MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {
101852
    return function () { return overlay.scrollStrategies.reposition(); };
101853
}
101854
/**
101855
 * \@docs-private
101856
 */
101857
var /** @type {?} */ MAT_SELECT_SCROLL_STRATEGY_PROVIDER = {
101858
    provide: MAT_SELECT_SCROLL_STRATEGY,
101859
    deps: [_angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_7__["Overlay"]],
101860
    useFactory: MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY,
101861
};
101862
/**
101863
 * Change event object that is emitted when the select value has changed.
101864
 */
101865
var  /**
101866
 * Change event object that is emitted when the select value has changed.
101867
 */
101868
MatSelectChange = /** @class */ (function () {
101869
    function MatSelectChange(source, value) {
101870
        this.source = source;
101871
        this.value = value;
101872
    }
101873
    return MatSelectChange;
101874
}());
101875
/**
101876
 * \@docs-private
101877
 */
101878
var  /**
101879
 * \@docs-private
101880
 */
101881
MatSelectBase = /** @class */ (function () {
101882
    function MatSelectBase(_elementRef, _defaultErrorStateMatcher, _parentForm, _parentFormGroup, ngControl) {
101883
        this._elementRef = _elementRef;
101884
        this._defaultErrorStateMatcher = _defaultErrorStateMatcher;
101885
        this._parentForm = _parentForm;
101886
        this._parentFormGroup = _parentFormGroup;
101887
        this.ngControl = ngControl;
101888
    }
101889
    return MatSelectBase;
101890
}());
101891
var /** @type {?} */ _MatSelectMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_10__["mixinDisableRipple"])(Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_10__["mixinTabIndex"])(Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_10__["mixinDisabled"])(Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_10__["mixinErrorState"])(MatSelectBase))));
101892
/**
101893
 * Allows the user to customize the trigger that is displayed when the select has a value.
101894
 */
101895
var MatSelectTrigger = /** @class */ (function () {
101896
    function MatSelectTrigger() {
101897
    }
101898
    MatSelectTrigger.decorators = [
101899
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Directive"], args: [{
101900
                    selector: 'mat-select-trigger'
101901
                },] },
101902
    ];
101903
    return MatSelectTrigger;
101904
}());
101905
var MatSelect = /** @class */ (function (_super) {
101906
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(MatSelect, _super);
101907
    function MatSelect(_viewportRuler, _changeDetectorRef, _ngZone, _defaultErrorStateMatcher, elementRef, _dir, _parentForm, _parentFormGroup, _parentFormField, ngControl, tabIndex, _scrollStrategyFactory) {
101908
        var _this = _super.call(this, elementRef, _defaultErrorStateMatcher, _parentForm, _parentFormGroup, ngControl) || this;
101909
        _this._viewportRuler = _viewportRuler;
101910
        _this._changeDetectorRef = _changeDetectorRef;
101911
        _this._ngZone = _ngZone;
101912
        _this._dir = _dir;
101913
        _this._parentFormField = _parentFormField;
101914
        _this.ngControl = ngControl;
101915
        _this._scrollStrategyFactory = _scrollStrategyFactory;
101916
        /**
101917
         * Whether or not the overlay panel is open.
101918
         */
101919
        _this._panelOpen = false;
101920
        /**
101921
         * Whether filling out the select is required in the form.
101922
         */
101923
        _this._required = false;
101924
        /**
101925
         * The scroll position of the overlay panel, calculated to center the selected option.
101926
         */
101927
        _this._scrollTop = 0;
101928
        /**
101929
         * Whether the component is in multiple selection mode.
101930
         */
101931
        _this._multiple = false;
101932
        /**
101933
         * Comparison function to specify which option is displayed. Defaults to object equality.
101934
         */
101935
        _this._compareWith = function (o1, o2) { return o1 === o2; };
101936
        /**
101937
         * Unique id for this input.
101938
         */
101939
        _this._uid = "mat-select-" + nextUniqueId++;
101940
        /**
101941
         * Emits whenever the component is destroyed.
101942
         */
101943
        _this._destroy = new rxjs__WEBPACK_IMPORTED_MODULE_12__["Subject"]();
101944
        /**
101945
         * The cached font-size of the trigger element.
101946
         */
101947
        _this._triggerFontSize = 0;
101948
        /**
101949
         * `View -> model callback called when value changes`
101950
         */
101951
        _this._onChange = function () { };
101952
        /**
101953
         * `View -> model callback called when select has been touched`
101954
         */
101955
        _this._onTouched = function () { };
101956
        /**
101957
         * The IDs of child options to be passed to the aria-owns attribute.
101958
         */
101959
        _this._optionIds = '';
101960
        /**
101961
         * The value of the select panel's transform-origin property.
101962
         */
101963
        _this._transformOrigin = 'top';
101964
        /**
101965
         * Whether the panel's animation is done.
101966
         */
101967
        _this._panelDoneAnimating = false;
101968
        /**
101969
         * Emits when the panel element is finished transforming in.
101970
         */
101971
        _this._panelDoneAnimatingStream = new rxjs__WEBPACK_IMPORTED_MODULE_12__["Subject"]();
101972
        /**
101973
         * Strategy that will be used to handle scrolling while the select panel is open.
101974
         */
101975
        _this._scrollStrategy = _this._scrollStrategyFactory();
101976
        /**
101977
         * The y-offset of the overlay panel in relation to the trigger's top start corner.
101978
         * This must be adjusted to align the selected option text over the trigger text.
101979
         * when the panel opens. Will change based on the y-position of the selected option.
101980
         */
101981
        _this._offsetY = 0;
101982
        /**
101983
         * This position config ensures that the top "start" corner of the overlay
101984
         * is aligned with with the top "start" of the origin by default (overlapping
101985
         * the trigger completely). If the panel cannot fit below the trigger, it
101986
         * will fall back to a position above the trigger.
101987
         */
101988
        _this._positions = [
101989
            {
101990
                originX: 'start',
101991
                originY: 'top',
101992
                overlayX: 'start',
101993
                overlayY: 'top',
101994
            },
101995
            {
101996
                originX: 'start',
101997
                originY: 'bottom',
101998
                overlayX: 'start',
101999
                overlayY: 'bottom',
102000
            },
102001
        ];
102002
        /**
102003
         * Whether the component is disabling centering of the active option over the trigger.
102004
         */
102005
        _this._disableOptionCentering = false;
102006
        _this._focused = false;
102007
        /**
102008
         * A name for this control that can be used by `mat-form-field`.
102009
         */
102010
        _this.controlType = 'mat-select';
102011
        /**
102012
         * Aria label of the select. If not specified, the placeholder will be used as label.
102013
         */
102014
        _this.ariaLabel = '';
102015
        /**
102016
         * Combined stream of all of the child options' change events.
102017
         */
102018
        _this.optionSelectionChanges = Object(rxjs__WEBPACK_IMPORTED_MODULE_12__["defer"])(function () {
102019
            if (_this.options) {
102020
                return rxjs__WEBPACK_IMPORTED_MODULE_12__["merge"].apply(void 0, _this.options.map(function (option) { return option.onSelectionChange; }));
102021
            }
102022
            return _this._ngZone.onStable
102023
                .asObservable()
102024
                .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_13__["take"])(1), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_13__["switchMap"])(function () { return _this.optionSelectionChanges; }));
102025
        });
102026
        /**
102027
         * Event emitted when the select panel has been toggled.
102028
         */
102029
        _this.openedChange = new _angular_core__WEBPACK_IMPORTED_MODULE_8__["EventEmitter"]();
102030
        /**
102031
         * Event emitted when the select has been opened.
102032
         */
102033
        _this._openedStream = _this.openedChange.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_13__["filter"])(function (o) { return o; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_13__["map"])(function () { }));
102034
        /**
102035
         * Event emitted when the select has been closed.
102036
         */
102037
        _this._closedStream = _this.openedChange.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_13__["filter"])(function (o) { return !o; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_13__["map"])(function () { }));
102038
        /**
102039
         * Event emitted when the selected value has been changed by the user.
102040
         */
102041
        _this.selectionChange = new _angular_core__WEBPACK_IMPORTED_MODULE_8__["EventEmitter"]();
102042
        /**
102043
         * Event that emits whenever the raw value of the select changes. This is here primarily
102044
         * to facilitate the two-way binding for the `value` input.
102045
         * \@docs-private
102046
         */
102047
        _this.valueChange = new _angular_core__WEBPACK_IMPORTED_MODULE_8__["EventEmitter"]();
102048
        if (_this.ngControl) {
102049
            // Note: we provide the value accessor through here, instead of
102050
            // the `providers` to avoid running into a circular import.
102051
            // Note: we provide the value accessor through here, instead of
102052
            // the `providers` to avoid running into a circular import.
102053
            _this.ngControl.valueAccessor = _this;
102054
        }
102055
        _this.tabIndex = parseInt(tabIndex) || 0;
102056
        // Force setter to be called in case id was not specified.
102057
        // Force setter to be called in case id was not specified.
102058
        _this.id = _this.id;
102059
        return _this;
102060
    }
102061
    Object.defineProperty(MatSelect.prototype, "focused", {
102062
        /** Whether the select is focused. */
102063
        get: /**
102064
         * Whether the select is focused.
102065
         * @return {?}
102066
         */
102067
        function () {
102068
            return this._focused || this._panelOpen;
102069
        },
102070
        /**
102071
         * @deprecated Setter to be removed as this property is intended to be readonly.
102072
         * @breaking-change 8.0.0
102073
         */
102074
        set: /**
102075
         * @deprecated Setter to be removed as this property is intended to be readonly.
102076
         * \@breaking-change 8.0.0
102077
         * @param {?} value
102078
         * @return {?}
102079
         */
102080
        function (value) {
102081
            this._focused = value;
102082
        },
102083
        enumerable: true,
102084
        configurable: true
102085
    });
102086
    Object.defineProperty(MatSelect.prototype, "placeholder", {
102087
        get: /**
102088
         * Placeholder to be shown if no value has been selected.
102089
         * @return {?}
102090
         */
102091
        function () { return this._placeholder; },
102092
        set: /**
102093
         * @param {?} value
102094
         * @return {?}
102095
         */
102096
        function (value) {
102097
            this._placeholder = value;
102098
            this.stateChanges.next();
102099
        },
102100
        enumerable: true,
102101
        configurable: true
102102
    });
102103
    Object.defineProperty(MatSelect.prototype, "required", {
102104
        get: /**
102105
         * Whether the component is required.
102106
         * @return {?}
102107
         */
102108
        function () { return this._required; },
102109
        set: /**
102110
         * @param {?} value
102111
         * @return {?}
102112
         */
102113
        function (value) {
102114
            this._required = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_4__["coerceBooleanProperty"])(value);
102115
            this.stateChanges.next();
102116
        },
102117
        enumerable: true,
102118
        configurable: true
102119
    });
102120
    Object.defineProperty(MatSelect.prototype, "multiple", {
102121
        get: /**
102122
         * Whether the user should be allowed to select multiple options.
102123
         * @return {?}
102124
         */
102125
        function () { return this._multiple; },
102126
        set: /**
102127
         * @param {?} value
102128
         * @return {?}
102129
         */
102130
        function (value) {
102131
            if (this._selectionModel) {
102132
                throw getMatSelectDynamicMultipleError();
102133
            }
102134
            this._multiple = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_4__["coerceBooleanProperty"])(value);
102135
        },
102136
        enumerable: true,
102137
        configurable: true
102138
    });
102139
    Object.defineProperty(MatSelect.prototype, "disableOptionCentering", {
102140
        get: /**
102141
         * Whether to center the active option over the trigger.
102142
         * @return {?}
102143
         */
102144
        function () { return this._disableOptionCentering; },
102145
        set: /**
102146
         * @param {?} value
102147
         * @return {?}
102148
         */
102149
        function (value) {
102150
            this._disableOptionCentering = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_4__["coerceBooleanProperty"])(value);
102151
        },
102152
        enumerable: true,
102153
        configurable: true
102154
    });
102155
    Object.defineProperty(MatSelect.prototype, "compareWith", {
102156
        get: /**
102157
         * A function to compare the option values with the selected values. The first argument
102158
         * is a value from an option. The second is a value from the selection. A boolean
102159
         * should be returned.
102160
         * @return {?}
102161
         */
102162
        function () { return this._compareWith; },
102163
        set: /**
102164
         * @param {?} fn
102165
         * @return {?}
102166
         */
102167
        function (fn) {
102168
            if (typeof fn !== 'function') {
102169
                throw getMatSelectNonFunctionValueError();
102170
            }
102171
            this._compareWith = fn;
102172
            if (this._selectionModel) {
102173
                // A different comparator means the selection could change.
102174
                this._initializeSelection();
102175
            }
102176
        },
102177
        enumerable: true,
102178
        configurable: true
102179
    });
102180
    Object.defineProperty(MatSelect.prototype, "value", {
102181
        get: /**
102182
         * Value of the select control.
102183
         * @return {?}
102184
         */
102185
        function () { return this._value; },
102186
        set: /**
102187
         * @param {?} newValue
102188
         * @return {?}
102189
         */
102190
        function (newValue) {
102191
            if (newValue !== this._value) {
102192
                this.writeValue(newValue);
102193
                this._value = newValue;
102194
            }
102195
        },
102196
        enumerable: true,
102197
        configurable: true
102198
    });
102199
    Object.defineProperty(MatSelect.prototype, "id", {
102200
        get: /**
102201
         * Unique id of the element.
102202
         * @return {?}
102203
         */
102204
        function () { return this._id; },
102205
        set: /**
102206
         * @param {?} value
102207
         * @return {?}
102208
         */
102209
        function (value) {
102210
            this._id = value || this._uid;
102211
            this.stateChanges.next();
102212
        },
102213
        enumerable: true,
102214
        configurable: true
102215
    });
102216
    /**
102217
     * @return {?}
102218
     */
102219
    MatSelect.prototype.ngOnInit = /**
102220
     * @return {?}
102221
     */
102222
    function () {
102223
        var _this = this;
102224
        this._selectionModel = new _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_5__["SelectionModel"](this.multiple);
102225
        this.stateChanges.next();
102226
        // We need `distinctUntilChanged` here, because some browsers will
102227
        // fire the animation end event twice for the same animation. See:
102228
        // https://github.com/angular/angular/issues/24084
102229
        this._panelDoneAnimatingStream
102230
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_13__["distinctUntilChanged"])(), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_13__["takeUntil"])(this._destroy))
102231
            .subscribe(function () {
102232
            if (_this.panelOpen) {
102233
                _this._scrollTop = 0;
102234
                _this.openedChange.emit(true);
102235
            }
102236
            else {
102237
                _this.openedChange.emit(false);
102238
                _this._panelDoneAnimating = false;
102239
                _this.overlayDir.offsetX = 0;
102240
                _this._changeDetectorRef.markForCheck();
102241
            }
102242
        });
102243
    };
102244
    /**
102245
     * @return {?}
102246
     */
102247
    MatSelect.prototype.ngAfterContentInit = /**
102248
     * @return {?}
102249
     */
102250
    function () {
102251
        var _this = this;
102252
        this._initKeyManager(); /** @type {?} */
102253
        ((this._selectionModel.onChange)).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_13__["takeUntil"])(this._destroy)).subscribe(function (event) {
102254
            event.added.forEach(function (option) { return option.select(); });
102255
            event.removed.forEach(function (option) { return option.deselect(); });
102256
        });
102257
        this.options.changes.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_13__["startWith"])(null), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_13__["takeUntil"])(this._destroy)).subscribe(function () {
102258
            _this._resetOptions();
102259
            _this._initializeSelection();
102260
        });
102261
    };
102262
    /**
102263
     * @return {?}
102264
     */
102265
    MatSelect.prototype.ngDoCheck = /**
102266
     * @return {?}
102267
     */
102268
    function () {
102269
        if (this.ngControl) {
102270
            this.updateErrorState();
102271
        }
102272
    };
102273
    /**
102274
     * @param {?} changes
102275
     * @return {?}
102276
     */
102277
    MatSelect.prototype.ngOnChanges = /**
102278
     * @param {?} changes
102279
     * @return {?}
102280
     */
102281
    function (changes) {
102282
        // Updating the disabled state is handled by `mixinDisabled`, but we need to additionally let
102283
        // the parent form field know to run change detection when the disabled state changes.
102284
        if (changes["disabled"]) {
102285
            this.stateChanges.next();
102286
        }
102287
    };
102288
    /**
102289
     * @return {?}
102290
     */
102291
    MatSelect.prototype.ngOnDestroy = /**
102292
     * @return {?}
102293
     */
102294
    function () {
102295
        this._destroy.next();
102296
        this._destroy.complete();
102297
        this.stateChanges.complete();
102298
    };
102299
    /** Toggles the overlay panel open or closed. */
102300
    /**
102301
     * Toggles the overlay panel open or closed.
102302
     * @return {?}
102303
     */
102304
    MatSelect.prototype.toggle = /**
102305
     * Toggles the overlay panel open or closed.
102306
     * @return {?}
102307
     */
102308
    function () {
102309
        this.panelOpen ? this.close() : this.open();
102310
    };
102311
    /** Opens the overlay panel. */
102312
    /**
102313
     * Opens the overlay panel.
102314
     * @return {?}
102315
     */
102316
    MatSelect.prototype.open = /**
102317
     * Opens the overlay panel.
102318
     * @return {?}
102319
     */
102320
    function () {
102321
        var _this = this;
102322
        if (this.disabled || !this.options || !this.options.length || this._panelOpen) {
102323
            return;
102324
        }
102325
        this._triggerRect = this.trigger.nativeElement.getBoundingClientRect();
102326
        // Note: The computed font-size will be a string pixel value (e.g. "16px").
102327
        // `parseInt` ignores the trailing 'px' and converts this to a number.
102328
        this._triggerFontSize = parseInt(getComputedStyle(this.trigger.nativeElement)['font-size']);
102329
        this._panelOpen = true;
102330
        this._keyManager.withHorizontalOrientation(null);
102331
        this._calculateOverlayPosition();
102332
        this._highlightCorrectOption();
102333
        this._changeDetectorRef.markForCheck();
102334
        // Set the font size on the panel element once it exists.
102335
        this._ngZone.onStable.asObservable().pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_13__["take"])(1)).subscribe(function () {
102336
            if (_this._triggerFontSize && _this.overlayDir.overlayRef &&
102337
                _this.overlayDir.overlayRef.overlayElement) {
102338
                _this.overlayDir.overlayRef.overlayElement.style.fontSize = _this._triggerFontSize + "px";
102339
            }
102340
        });
102341
    };
102342
    /** Closes the overlay panel and focuses the host element. */
102343
    /**
102344
     * Closes the overlay panel and focuses the host element.
102345
     * @return {?}
102346
     */
102347
    MatSelect.prototype.close = /**
102348
     * Closes the overlay panel and focuses the host element.
102349
     * @return {?}
102350
     */
102351
    function () {
102352
        if (this._panelOpen) {
102353
            this._panelOpen = false;
102354
            this._keyManager.withHorizontalOrientation(this._isRtl() ? 'rtl' : 'ltr');
102355
            this._changeDetectorRef.markForCheck();
102356
            this._onTouched();
102357
        }
102358
    };
102359
    /**
102360
     * Sets the select's value. Part of the ControlValueAccessor interface
102361
     * required to integrate with Angular's core forms API.
102362
     *
102363
     * @param value New value to be written to the model.
102364
     */
102365
    /**
102366
     * Sets the select's value. Part of the ControlValueAccessor interface
102367
     * required to integrate with Angular's core forms API.
102368
     *
102369
     * @param {?} value New value to be written to the model.
102370
     * @return {?}
102371
     */
102372
    MatSelect.prototype.writeValue = /**
102373
     * Sets the select's value. Part of the ControlValueAccessor interface
102374
     * required to integrate with Angular's core forms API.
102375
     *
102376
     * @param {?} value New value to be written to the model.
102377
     * @return {?}
102378
     */
102379
    function (value) {
102380
        if (this.options) {
102381
            this._setSelectionByValue(value);
102382
        }
102383
    };
102384
    /**
102385
     * Saves a callback function to be invoked when the select's value
102386
     * changes from user input. Part of the ControlValueAccessor interface
102387
     * required to integrate with Angular's core forms API.
102388
     *
102389
     * @param fn Callback to be triggered when the value changes.
102390
     */
102391
    /**
102392
     * Saves a callback function to be invoked when the select's value
102393
     * changes from user input. Part of the ControlValueAccessor interface
102394
     * required to integrate with Angular's core forms API.
102395
     *
102396
     * @param {?} fn Callback to be triggered when the value changes.
102397
     * @return {?}
102398
     */
102399
    MatSelect.prototype.registerOnChange = /**
102400
     * Saves a callback function to be invoked when the select's value
102401
     * changes from user input. Part of the ControlValueAccessor interface
102402
     * required to integrate with Angular's core forms API.
102403
     *
102404
     * @param {?} fn Callback to be triggered when the value changes.
102405
     * @return {?}
102406
     */
102407
    function (fn) {
102408
        this._onChange = fn;
102409
    };
102410
    /**
102411
     * Saves a callback function to be invoked when the select is blurred
102412
     * by the user. Part of the ControlValueAccessor interface required
102413
     * to integrate with Angular's core forms API.
102414
     *
102415
     * @param fn Callback to be triggered when the component has been touched.
102416
     */
102417
    /**
102418
     * Saves a callback function to be invoked when the select is blurred
102419
     * by the user. Part of the ControlValueAccessor interface required
102420
     * to integrate with Angular's core forms API.
102421
     *
102422
     * @param {?} fn Callback to be triggered when the component has been touched.
102423
     * @return {?}
102424
     */
102425
    MatSelect.prototype.registerOnTouched = /**
102426
     * Saves a callback function to be invoked when the select is blurred
102427
     * by the user. Part of the ControlValueAccessor interface required
102428
     * to integrate with Angular's core forms API.
102429
     *
102430
     * @param {?} fn Callback to be triggered when the component has been touched.
102431
     * @return {?}
102432
     */
102433
    function (fn) {
102434
        this._onTouched = fn;
102435
    };
102436
    /**
102437
     * Disables the select. Part of the ControlValueAccessor interface required
102438
     * to integrate with Angular's core forms API.
102439
     *
102440
     * @param isDisabled Sets whether the component is disabled.
102441
     */
102442
    /**
102443
     * Disables the select. Part of the ControlValueAccessor interface required
102444
     * to integrate with Angular's core forms API.
102445
     *
102446
     * @param {?} isDisabled Sets whether the component is disabled.
102447
     * @return {?}
102448
     */
102449
    MatSelect.prototype.setDisabledState = /**
102450
     * Disables the select. Part of the ControlValueAccessor interface required
102451
     * to integrate with Angular's core forms API.
102452
     *
102453
     * @param {?} isDisabled Sets whether the component is disabled.
102454
     * @return {?}
102455
     */
102456
    function (isDisabled) {
102457
        this.disabled = isDisabled;
102458
        this._changeDetectorRef.markForCheck();
102459
        this.stateChanges.next();
102460
    };
102461
    Object.defineProperty(MatSelect.prototype, "panelOpen", {
102462
        /** Whether or not the overlay panel is open. */
102463
        get: /**
102464
         * Whether or not the overlay panel is open.
102465
         * @return {?}
102466
         */
102467
        function () {
102468
            return this._panelOpen;
102469
        },
102470
        enumerable: true,
102471
        configurable: true
102472
    });
102473
    Object.defineProperty(MatSelect.prototype, "selected", {
102474
        /** The currently selected option. */
102475
        get: /**
102476
         * The currently selected option.
102477
         * @return {?}
102478
         */
102479
        function () {
102480
            return this.multiple ? this._selectionModel.selected : this._selectionModel.selected[0];
102481
        },
102482
        enumerable: true,
102483
        configurable: true
102484
    });
102485
    Object.defineProperty(MatSelect.prototype, "triggerValue", {
102486
        /** The value displayed in the trigger. */
102487
        get: /**
102488
         * The value displayed in the trigger.
102489
         * @return {?}
102490
         */
102491
        function () {
102492
            if (this.empty) {
102493
                return '';
102494
            }
102495
            if (this._multiple) {
102496
                var /** @type {?} */ selectedOptions = this._selectionModel.selected.map(function (option) { return option.viewValue; });
102497
                if (this._isRtl()) {
102498
                    selectedOptions.reverse();
102499
                }
102500
                // TODO(crisbeto): delimiter should be configurable for proper localization.
102501
                return selectedOptions.join(', ');
102502
            }
102503
            return this._selectionModel.selected[0].viewValue;
102504
        },
102505
        enumerable: true,
102506
        configurable: true
102507
    });
102508
    /** Whether the element is in RTL mode. */
102509
    /**
102510
     * Whether the element is in RTL mode.
102511
     * @return {?}
102512
     */
102513
    MatSelect.prototype._isRtl = /**
102514
     * Whether the element is in RTL mode.
102515
     * @return {?}
102516
     */
102517
    function () {
102518
        return this._dir ? this._dir.value === 'rtl' : false;
102519
    };
102520
    /** Handles all keydown events on the select. */
102521
    /**
102522
     * Handles all keydown events on the select.
102523
     * @param {?} event
102524
     * @return {?}
102525
     */
102526
    MatSelect.prototype._handleKeydown = /**
102527
     * Handles all keydown events on the select.
102528
     * @param {?} event
102529
     * @return {?}
102530
     */
102531
    function (event) {
102532
        if (!this.disabled) {
102533
            this.panelOpen ? this._handleOpenKeydown(event) : this._handleClosedKeydown(event);
102534
        }
102535
    };
102536
    /**
102537
     * Handles keyboard events while the select is closed.
102538
     * @param {?} event
102539
     * @return {?}
102540
     */
102541
    MatSelect.prototype._handleClosedKeydown = /**
102542
     * Handles keyboard events while the select is closed.
102543
     * @param {?} event
102544
     * @return {?}
102545
     */
102546
    function (event) {
102547
        var /** @type {?} */ keyCode = event.keyCode;
102548
        var /** @type {?} */ isArrowKey = keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["DOWN_ARROW"] || keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["UP_ARROW"] ||
102549
            keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["LEFT_ARROW"] || keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["RIGHT_ARROW"];
102550
        var /** @type {?} */ isOpenKey = keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["ENTER"] || keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["SPACE"];
102551
        // Open the select on ALT + arrow key to match the native <select>
102552
        if (isOpenKey || ((this.multiple || event.altKey) && isArrowKey)) {
102553
            event.preventDefault(); // prevents the page from scrolling down when pressing space
102554
            this.open();
102555
        }
102556
        else if (!this.multiple) {
102557
            this._keyManager.onKeydown(event);
102558
        }
102559
    };
102560
    /**
102561
     * Handles keyboard events when the selected is open.
102562
     * @param {?} event
102563
     * @return {?}
102564
     */
102565
    MatSelect.prototype._handleOpenKeydown = /**
102566
     * Handles keyboard events when the selected is open.
102567
     * @param {?} event
102568
     * @return {?}
102569
     */
102570
    function (event) {
102571
        var /** @type {?} */ keyCode = event.keyCode;
102572
        var /** @type {?} */ isArrowKey = keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["DOWN_ARROW"] || keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["UP_ARROW"];
102573
        var /** @type {?} */ manager = this._keyManager;
102574
        if (keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["HOME"] || keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["END"]) {
102575
            event.preventDefault();
102576
            keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["HOME"] ? manager.setFirstItemActive() : manager.setLastItemActive();
102577
        }
102578
        else if (isArrowKey && event.altKey) {
102579
            // Close the select on ALT + arrow key to match the native <select>
102580
            event.preventDefault();
102581
            this.close();
102582
        }
102583
        else if ((keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["ENTER"] || keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["SPACE"]) && manager.activeItem) {
102584
            event.preventDefault();
102585
            manager.activeItem._selectViaInteraction();
102586
        }
102587
        else if (this._multiple && keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_6__["A"] && event.ctrlKey) {
102588
            event.preventDefault();
102589
            var /** @type {?} */ hasDeselectedOptions_1 = this.options.some(function (option) { return !option.selected; });
102590
            this.options.forEach(function (option) { return hasDeselectedOptions_1 ? option.select() : option.deselect(); });
102591
        }
102592
        else {
102593
            var /** @type {?} */ previouslyFocusedIndex = manager.activeItemIndex;
102594
            manager.onKeydown(event);
102595
            if (this._multiple && isArrowKey && event.shiftKey && manager.activeItem &&
102596
                manager.activeItemIndex !== previouslyFocusedIndex) {
102597
                manager.activeItem._selectViaInteraction();
102598
            }
102599
        }
102600
    };
102601
    /**
102602
     * When the panel content is done fading in, the _panelDoneAnimating property is
102603
     * set so the proper class can be added to the panel.
102604
     */
102605
    /**
102606
     * When the panel content is done fading in, the _panelDoneAnimating property is
102607
     * set so the proper class can be added to the panel.
102608
     * @return {?}
102609
     */
102610
    MatSelect.prototype._onFadeInDone = /**
102611
     * When the panel content is done fading in, the _panelDoneAnimating property is
102612
     * set so the proper class can be added to the panel.
102613
     * @return {?}
102614
     */
102615
    function () {
102616
        this._panelDoneAnimating = this.panelOpen;
102617
        this._changeDetectorRef.markForCheck();
102618
    };
102619
    /**
102620
     * @return {?}
102621
     */
102622
    MatSelect.prototype._onFocus = /**
102623
     * @return {?}
102624
     */
102625
    function () {
102626
        if (!this.disabled) {
102627
            this._focused = true;
102628
            this.stateChanges.next();
102629
        }
102630
    };
102631
    /**
102632
     * Calls the touched callback only if the panel is closed. Otherwise, the trigger will
102633
     * "blur" to the panel when it opens, causing a false positive.
102634
     */
102635
    /**
102636
     * Calls the touched callback only if the panel is closed. Otherwise, the trigger will
102637
     * "blur" to the panel when it opens, causing a false positive.
102638
     * @return {?}
102639
     */
102640
    MatSelect.prototype._onBlur = /**
102641
     * Calls the touched callback only if the panel is closed. Otherwise, the trigger will
102642
     * "blur" to the panel when it opens, causing a false positive.
102643
     * @return {?}
102644
     */
102645
    function () {
102646
        this._focused = false;
102647
        if (!this.disabled && !this.panelOpen) {
102648
            this._onTouched();
102649
            this._changeDetectorRef.markForCheck();
102650
            this.stateChanges.next();
102651
        }
102652
    };
102653
    /**
102654
     * Callback that is invoked when the overlay panel has been attached.
102655
     */
102656
    /**
102657
     * Callback that is invoked when the overlay panel has been attached.
102658
     * @return {?}
102659
     */
102660
    MatSelect.prototype._onAttached = /**
102661
     * Callback that is invoked when the overlay panel has been attached.
102662
     * @return {?}
102663
     */
102664
    function () {
102665
        var _this = this;
102666
        this.overlayDir.positionChange.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_13__["take"])(1)).subscribe(function () {
102667
            _this._changeDetectorRef.detectChanges();
102668
            _this._calculateOverlayOffsetX();
102669
            _this.panel.nativeElement.scrollTop = _this._scrollTop;
102670
        });
102671
    };
102672
    /** Returns the theme to be used on the panel. */
102673
    /**
102674
     * Returns the theme to be used on the panel.
102675
     * @return {?}
102676
     */
102677
    MatSelect.prototype._getPanelTheme = /**
102678
     * Returns the theme to be used on the panel.
102679
     * @return {?}
102680
     */
102681
    function () {
102682
        return this._parentFormField ? "mat-" + this._parentFormField.color : '';
102683
    };
102684
    Object.defineProperty(MatSelect.prototype, "empty", {
102685
        /** Whether the select has a value. */
102686
        get: /**
102687
         * Whether the select has a value.
102688
         * @return {?}
102689
         */
102690
        function () {
102691
            return !this._selectionModel || this._selectionModel.isEmpty();
102692
        },
102693
        enumerable: true,
102694
        configurable: true
102695
    });
102696
    /**
102697
     * @return {?}
102698
     */
102699
    MatSelect.prototype._initializeSelection = /**
102700
     * @return {?}
102701
     */
102702
    function () {
102703
        var _this = this;
102704
        // Defer setting the value in order to avoid the "Expression
102705
        // has changed after it was checked" errors from Angular.
102706
        Promise.resolve().then(function () {
102707
            _this._setSelectionByValue(_this.ngControl ? _this.ngControl.value : _this._value);
102708
        });
102709
    };
102710
    /**
102711
     * Sets the selected option based on a value. If no option can be
102712
     * found with the designated value, the select trigger is cleared.
102713
     * @param {?} value
102714
     * @return {?}
102715
     */
102716
    MatSelect.prototype._setSelectionByValue = /**
102717
     * Sets the selected option based on a value. If no option can be
102718
     * found with the designated value, the select trigger is cleared.
102719
     * @param {?} value
102720
     * @return {?}
102721
     */
102722
    function (value) {
102723
        var _this = this;
102724
        if (this.multiple && value) {
102725
            if (!Array.isArray(value)) {
102726
                throw getMatSelectNonArrayValueError();
102727
            }
102728
            this._selectionModel.clear();
102729
            value.forEach(function (currentValue) { return _this._selectValue(currentValue); });
102730
            this._sortValues();
102731
        }
102732
        else {
102733
            this._selectionModel.clear();
102734
            var /** @type {?} */ correspondingOption = this._selectValue(value);
102735
            // Shift focus to the active item. Note that we shouldn't do this in multiple
102736
            // mode, because we don't know what option the user interacted with last.
102737
            if (correspondingOption) {
102738
                this._keyManager.setActiveItem(correspondingOption);
102739
            }
102740
        }
102741
        this._changeDetectorRef.markForCheck();
102742
    };
102743
    /**
102744
     * Finds and selects and option based on its value.
102745
     * @param {?} value
102746
     * @return {?} Option that has the corresponding value.
102747
     */
102748
    MatSelect.prototype._selectValue = /**
102749
     * Finds and selects and option based on its value.
102750
     * @param {?} value
102751
     * @return {?} Option that has the corresponding value.
102752
     */
102753
    function (value) {
102754
        var _this = this;
102755
        var /** @type {?} */ correspondingOption = this.options.find(function (option) {
102756
            try {
102757
                // Treat null as a special reset value.
102758
                return option.value != null && _this._compareWith(option.value, value);
102759
            }
102760
            catch (/** @type {?} */ error) {
102761
                if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_8__["isDevMode"])()) {
102762
                    // Notify developers of errors in their comparator.
102763
                    console.warn(error);
102764
                }
102765
                return false;
102766
            }
102767
        });
102768
        if (correspondingOption) {
102769
            this._selectionModel.select(correspondingOption);
102770
        }
102771
        return correspondingOption;
102772
    };
102773
    /**
102774
     * Sets up a key manager to listen to keyboard events on the overlay panel.
102775
     * @return {?}
102776
     */
102777
    MatSelect.prototype._initKeyManager = /**
102778
     * Sets up a key manager to listen to keyboard events on the overlay panel.
102779
     * @return {?}
102780
     */
102781
    function () {
102782
        var _this = this;
102783
        this._keyManager = new _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_2__["ActiveDescendantKeyManager"](this.options)
102784
            .withTypeAhead()
102785
            .withVerticalOrientation()
102786
            .withHorizontalOrientation(this._isRtl() ? 'rtl' : 'ltr');
102787
        this._keyManager.tabOut.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_13__["takeUntil"])(this._destroy)).subscribe(function () {
102788
            // Restore focus to the trigger before closing. Ensures that the focus
102789
            // position won't be lost if the user got focus into the overlay.
102790
            // Restore focus to the trigger before closing. Ensures that the focus
102791
            // position won't be lost if the user got focus into the overlay.
102792
            _this.focus();
102793
            _this.close();
102794
        });
102795
        this._keyManager.change.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_13__["takeUntil"])(this._destroy)).subscribe(function () {
102796
            if (_this._panelOpen && _this.panel) {
102797
                _this._scrollActiveOptionIntoView();
102798
            }
102799
            else if (!_this._panelOpen && !_this.multiple && _this._keyManager.activeItem) {
102800
                _this._keyManager.activeItem._selectViaInteraction();
102801
            }
102802
        });
102803
    };
102804
    /**
102805
     * Drops current option subscriptions and IDs and resets from scratch.
102806
     * @return {?}
102807
     */
102808
    MatSelect.prototype._resetOptions = /**
102809
     * Drops current option subscriptions and IDs and resets from scratch.
102810
     * @return {?}
102811
     */
102812
    function () {
102813
        var _this = this;
102814
        var /** @type {?} */ changedOrDestroyed = Object(rxjs__WEBPACK_IMPORTED_MODULE_12__["merge"])(this.options.changes, this._destroy);
102815
        this.optionSelectionChanges.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_13__["takeUntil"])(changedOrDestroyed)).subscribe(function (event) {
102816
            _this._onSelect(event.source, event.isUserInput);
102817
            if (event.isUserInput && !_this.multiple && _this._panelOpen) {
102818
                _this.close();
102819
                _this.focus();
102820
            }
102821
        });
102822
        // Listen to changes in the internal state of the options and react accordingly.
102823
        // Handles cases like the labels of the selected options changing.
102824
        rxjs__WEBPACK_IMPORTED_MODULE_12__["merge"].apply(void 0, this.options.map(function (option) { return option._stateChanges; })).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_13__["takeUntil"])(changedOrDestroyed))
102825
            .subscribe(function () {
102826
            _this._changeDetectorRef.markForCheck();
102827
            _this.stateChanges.next();
102828
        });
102829
        this._setOptionIds();
102830
    };
102831
    /**
102832
     * Invoked when an option is clicked.
102833
     * @param {?} option
102834
     * @param {?} isUserInput
102835
     * @return {?}
102836
     */
102837
    MatSelect.prototype._onSelect = /**
102838
     * Invoked when an option is clicked.
102839
     * @param {?} option
102840
     * @param {?} isUserInput
102841
     * @return {?}
102842
     */
102843
    function (option, isUserInput) {
102844
        var /** @type {?} */ wasSelected = this._selectionModel.isSelected(option);
102845
        if (option.value == null && !this._multiple) {
102846
            option.deselect();
102847
            this._selectionModel.clear();
102848
            this._propagateChanges(option.value);
102849
        }
102850
        else {
102851
            option.selected ? this._selectionModel.select(option) : this._selectionModel.deselect(option);
102852
            if (isUserInput) {
102853
                this._keyManager.setActiveItem(option);
102854
            }
102855
            if (this.multiple) {
102856
                this._sortValues();
102857
                if (isUserInput) {
102858
                    // In case the user selected the option with their mouse, we
102859
                    // want to restore focus back to the trigger, in order to
102860
                    // prevent the select keyboard controls from clashing with
102861
                    // the ones from `mat-option`.
102862
                    this.focus();
102863
                }
102864
            }
102865
        }
102866
        if (wasSelected !== this._selectionModel.isSelected(option)) {
102867
            this._propagateChanges();
102868
        }
102869
        this.stateChanges.next();
102870
    };
102871
    /**
102872
     * Sorts the selected values in the selected based on their order in the panel.
102873
     * @return {?}
102874
     */
102875
    MatSelect.prototype._sortValues = /**
102876
     * Sorts the selected values in the selected based on their order in the panel.
102877
     * @return {?}
102878
     */
102879
    function () {
102880
        if (this.multiple) {
102881
            var /** @type {?} */ options_1 = this.options.toArray();
102882
            this._selectionModel.sort(function (a, b) { return options_1.indexOf(a) - options_1.indexOf(b); });
102883
            this.stateChanges.next();
102884
        }
102885
    };
102886
    /**
102887
     * Emits change event to set the model value.
102888
     * @param {?=} fallbackValue
102889
     * @return {?}
102890
     */
102891
    MatSelect.prototype._propagateChanges = /**
102892
     * Emits change event to set the model value.
102893
     * @param {?=} fallbackValue
102894
     * @return {?}
102895
     */
102896
    function (fallbackValue) {
102897
        var /** @type {?} */ valueToEmit = null;
102898
        if (this.multiple) {
102899
            valueToEmit = (/** @type {?} */ (this.selected)).map(function (option) { return option.value; });
102900
        }
102901
        else {
102902
            valueToEmit = this.selected ? (/** @type {?} */ (this.selected)).value : fallbackValue;
102903
        }
102904
        this._value = valueToEmit;
102905
        this.valueChange.emit(valueToEmit);
102906
        this._onChange(valueToEmit);
102907
        this.selectionChange.emit(new MatSelectChange(this, valueToEmit));
102908
        this._changeDetectorRef.markForCheck();
102909
    };
102910
    /**
102911
     * Records option IDs to pass to the aria-owns property.
102912
     * @return {?}
102913
     */
102914
    MatSelect.prototype._setOptionIds = /**
102915
     * Records option IDs to pass to the aria-owns property.
102916
     * @return {?}
102917
     */
102918
    function () {
102919
        this._optionIds = this.options.map(function (option) { return option.id; }).join(' ');
102920
    };
102921
    /**
102922
     * Highlights the selected item. If no option is selected, it will highlight
102923
     * the first item instead.
102924
     * @return {?}
102925
     */
102926
    MatSelect.prototype._highlightCorrectOption = /**
102927
     * Highlights the selected item. If no option is selected, it will highlight
102928
     * the first item instead.
102929
     * @return {?}
102930
     */
102931
    function () {
102932
        if (this._keyManager) {
102933
            if (this.empty) {
102934
                this._keyManager.setFirstItemActive();
102935
            }
102936
            else {
102937
                this._keyManager.setActiveItem(this._selectionModel.selected[0]);
102938
            }
102939
        }
102940
    };
102941
    /**
102942
     * Scrolls the active option into view.
102943
     * @return {?}
102944
     */
102945
    MatSelect.prototype._scrollActiveOptionIntoView = /**
102946
     * Scrolls the active option into view.
102947
     * @return {?}
102948
     */
102949
    function () {
102950
        var /** @type {?} */ activeOptionIndex = this._keyManager.activeItemIndex || 0;
102951
        var /** @type {?} */ labelCount = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_10__["_countGroupLabelsBeforeOption"])(activeOptionIndex, this.options, this.optionGroups);
102952
        this.panel.nativeElement.scrollTop = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_10__["_getOptionScrollPosition"])(activeOptionIndex + labelCount, this._getItemHeight(), this.panel.nativeElement.scrollTop, SELECT_PANEL_MAX_HEIGHT);
102953
    };
102954
    /** Focuses the select element. */
102955
    /**
102956
     * Focuses the select element.
102957
     * @return {?}
102958
     */
102959
    MatSelect.prototype.focus = /**
102960
     * Focuses the select element.
102961
     * @return {?}
102962
     */
102963
    function () {
102964
        this._elementRef.nativeElement.focus();
102965
    };
102966
    /**
102967
     * Gets the index of the provided option in the option list.
102968
     * @param {?} option
102969
     * @return {?}
102970
     */
102971
    MatSelect.prototype._getOptionIndex = /**
102972
     * Gets the index of the provided option in the option list.
102973
     * @param {?} option
102974
     * @return {?}
102975
     */
102976
    function (option) {
102977
        return this.options.reduce(function (result, current, index) {
102978
            return result === undefined ? (option === current ? index : undefined) : result;
102979
        }, undefined);
102980
    };
102981
    /**
102982
     * Calculates the scroll position and x- and y-offsets of the overlay panel.
102983
     * @return {?}
102984
     */
102985
    MatSelect.prototype._calculateOverlayPosition = /**
102986
     * Calculates the scroll position and x- and y-offsets of the overlay panel.
102987
     * @return {?}
102988
     */
102989
    function () {
102990
        var /** @type {?} */ itemHeight = this._getItemHeight();
102991
        var /** @type {?} */ items = this._getItemCount();
102992
        var /** @type {?} */ panelHeight = Math.min(items * itemHeight, SELECT_PANEL_MAX_HEIGHT);
102993
        var /** @type {?} */ scrollContainerHeight = items * itemHeight;
102994
        // The farthest the panel can be scrolled before it hits the bottom
102995
        var /** @type {?} */ maxScroll = scrollContainerHeight - panelHeight;
102996
        // If no value is selected we open the popup to the first item.
102997
        var /** @type {?} */ selectedOptionOffset = this.empty ? 0 : /** @type {?} */ ((this._getOptionIndex(this._selectionModel.selected[0])));
102998
        selectedOptionOffset += Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_10__["_countGroupLabelsBeforeOption"])(selectedOptionOffset, this.options, this.optionGroups);
102999
        // We must maintain a scroll buffer so the selected option will be scrolled to the
103000
        // center of the overlay panel rather than the top.
103001
        var /** @type {?} */ scrollBuffer = panelHeight / 2;
103002
        this._scrollTop = this._calculateOverlayScroll(selectedOptionOffset, scrollBuffer, maxScroll);
103003
        this._offsetY = this._calculateOverlayOffsetY(selectedOptionOffset, scrollBuffer, maxScroll);
103004
        this._checkOverlayWithinViewport(maxScroll);
103005
    };
103006
    /**
103007
     * Calculates the scroll position of the select's overlay panel.
103008
     *
103009
     * Attempts to center the selected option in the panel. If the option is
103010
     * too high or too low in the panel to be scrolled to the center, it clamps the
103011
     * scroll position to the min or max scroll positions respectively.
103012
     */
103013
    /**
103014
     * Calculates the scroll position of the select's overlay panel.
103015
     *
103016
     * Attempts to center the selected option in the panel. If the option is
103017
     * too high or too low in the panel to be scrolled to the center, it clamps the
103018
     * scroll position to the min or max scroll positions respectively.
103019
     * @param {?} selectedIndex
103020
     * @param {?} scrollBuffer
103021
     * @param {?} maxScroll
103022
     * @return {?}
103023
     */
103024
    MatSelect.prototype._calculateOverlayScroll = /**
103025
     * Calculates the scroll position of the select's overlay panel.
103026
     *
103027
     * Attempts to center the selected option in the panel. If the option is
103028
     * too high or too low in the panel to be scrolled to the center, it clamps the
103029
     * scroll position to the min or max scroll positions respectively.
103030
     * @param {?} selectedIndex
103031
     * @param {?} scrollBuffer
103032
     * @param {?} maxScroll
103033
     * @return {?}
103034
     */
103035
    function (selectedIndex, scrollBuffer, maxScroll) {
103036
        var /** @type {?} */ itemHeight = this._getItemHeight();
103037
        var /** @type {?} */ optionOffsetFromScrollTop = itemHeight * selectedIndex;
103038
        var /** @type {?} */ halfOptionHeight = itemHeight / 2;
103039
        // Starts at the optionOffsetFromScrollTop, which scrolls the option to the top of the
103040
        // scroll container, then subtracts the scroll buffer to scroll the option down to
103041
        // the center of the overlay panel. Half the option height must be re-added to the
103042
        // scrollTop so the option is centered based on its middle, not its top edge.
103043
        var /** @type {?} */ optimalScrollPosition = optionOffsetFromScrollTop - scrollBuffer + halfOptionHeight;
103044
        return Math.min(Math.max(0, optimalScrollPosition), maxScroll);
103045
    };
103046
    /** Returns the aria-label of the select component. */
103047
    /**
103048
     * Returns the aria-label of the select component.
103049
     * @return {?}
103050
     */
103051
    MatSelect.prototype._getAriaLabel = /**
103052
     * Returns the aria-label of the select component.
103053
     * @return {?}
103054
     */
103055
    function () {
103056
        // If an ariaLabelledby value has been set by the consumer, the select should not overwrite the
103057
        // `aria-labelledby` value by setting the ariaLabel to the placeholder.
103058
        return this.ariaLabelledby ? null : this.ariaLabel || this.placeholder;
103059
    };
103060
    /** Returns the aria-labelledby of the select component. */
103061
    /**
103062
     * Returns the aria-labelledby of the select component.
103063
     * @return {?}
103064
     */
103065
    MatSelect.prototype._getAriaLabelledby = /**
103066
     * Returns the aria-labelledby of the select component.
103067
     * @return {?}
103068
     */
103069
    function () {
103070
        if (this.ariaLabelledby) {
103071
            return this.ariaLabelledby;
103072
        }
103073
        // Note: we use `_getAriaLabel` here, because we want to check whether there's a
103074
        // computed label. `this.ariaLabel` is only the user-specified label.
103075
        if (!this._parentFormField || this._getAriaLabel()) {
103076
            return null;
103077
        }
103078
        return this._parentFormField._labelId || null;
103079
    };
103080
    /** Determines the `aria-activedescendant` to be set on the host. */
103081
    /**
103082
     * Determines the `aria-activedescendant` to be set on the host.
103083
     * @return {?}
103084
     */
103085
    MatSelect.prototype._getAriaActiveDescendant = /**
103086
     * Determines the `aria-activedescendant` to be set on the host.
103087
     * @return {?}
103088
     */
103089
    function () {
103090
        if (this.panelOpen && this._keyManager && this._keyManager.activeItem) {
103091
            return this._keyManager.activeItem.id;
103092
        }
103093
        return null;
103094
    };
103095
    /**
103096
     * Sets the x-offset of the overlay panel in relation to the trigger's top start corner.
103097
     * This must be adjusted to align the selected option text over the trigger text when
103098
     * the panel opens. Will change based on LTR or RTL text direction. Note that the offset
103099
     * can't be calculated until the panel has been attached, because we need to know the
103100
     * content width in order to constrain the panel within the viewport.
103101
     * @return {?}
103102
     */
103103
    MatSelect.prototype._calculateOverlayOffsetX = /**
103104
     * Sets the x-offset of the overlay panel in relation to the trigger's top start corner.
103105
     * This must be adjusted to align the selected option text over the trigger text when
103106
     * the panel opens. Will change based on LTR or RTL text direction. Note that the offset
103107
     * can't be calculated until the panel has been attached, because we need to know the
103108
     * content width in order to constrain the panel within the viewport.
103109
     * @return {?}
103110
     */
103111
    function () {
103112
        var /** @type {?} */ overlayRect = this.overlayDir.overlayRef.overlayElement.getBoundingClientRect();
103113
        var /** @type {?} */ viewportSize = this._viewportRuler.getViewportSize();
103114
        var /** @type {?} */ isRtl = this._isRtl();
103115
        var /** @type {?} */ paddingWidth = this.multiple ? SELECT_MULTIPLE_PANEL_PADDING_X + SELECT_PANEL_PADDING_X :
103116
            SELECT_PANEL_PADDING_X * 2;
103117
        var /** @type {?} */ offsetX;
103118
        // Adjust the offset, depending on the option padding.
103119
        if (this.multiple) {
103120
            offsetX = SELECT_MULTIPLE_PANEL_PADDING_X;
103121
        }
103122
        else {
103123
            var /** @type {?} */ selected = this._selectionModel.selected[0] || this.options.first;
103124
            offsetX = selected && selected.group ? SELECT_PANEL_INDENT_PADDING_X : SELECT_PANEL_PADDING_X;
103125
        }
103126
        // Invert the offset in LTR.
103127
        if (!isRtl) {
103128
            offsetX *= -1;
103129
        }
103130
        // Determine how much the select overflows on each side.
103131
        var /** @type {?} */ leftOverflow = 0 - (overlayRect.left + offsetX - (isRtl ? paddingWidth : 0));
103132
        var /** @type {?} */ rightOverflow = overlayRect.right + offsetX - viewportSize.width
103133
            + (isRtl ? 0 : paddingWidth);
103134
        // If the element overflows on either side, reduce the offset to allow it to fit.
103135
        if (leftOverflow > 0) {
103136
            offsetX += leftOverflow + SELECT_PANEL_VIEWPORT_PADDING;
103137
        }
103138
        else if (rightOverflow > 0) {
103139
            offsetX -= rightOverflow + SELECT_PANEL_VIEWPORT_PADDING;
103140
        }
103141
        // Set the offset directly in order to avoid having to go through change detection and
103142
        // potentially triggering "changed after it was checked" errors. Round the value to avoid
103143
        // blurry content in some browsers.
103144
        this.overlayDir.offsetX = Math.round(offsetX);
103145
        this.overlayDir.overlayRef.updatePosition();
103146
    };
103147
    /**
103148
     * Calculates the y-offset of the select's overlay panel in relation to the
103149
     * top start corner of the trigger. It has to be adjusted in order for the
103150
     * selected option to be aligned over the trigger when the panel opens.
103151
     * @param {?} selectedIndex
103152
     * @param {?} scrollBuffer
103153
     * @param {?} maxScroll
103154
     * @return {?}
103155
     */
103156
    MatSelect.prototype._calculateOverlayOffsetY = /**
103157
     * Calculates the y-offset of the select's overlay panel in relation to the
103158
     * top start corner of the trigger. It has to be adjusted in order for the
103159
     * selected option to be aligned over the trigger when the panel opens.
103160
     * @param {?} selectedIndex
103161
     * @param {?} scrollBuffer
103162
     * @param {?} maxScroll
103163
     * @return {?}
103164
     */
103165
    function (selectedIndex, scrollBuffer, maxScroll) {
103166
        var /** @type {?} */ itemHeight = this._getItemHeight();
103167
        var /** @type {?} */ optionHeightAdjustment = (itemHeight - this._triggerRect.height) / 2;
103168
        var /** @type {?} */ maxOptionsDisplayed = Math.floor(SELECT_PANEL_MAX_HEIGHT / itemHeight);
103169
        var /** @type {?} */ optionOffsetFromPanelTop;
103170
        // Disable offset if requested by user by returning 0 as value to offset
103171
        if (this._disableOptionCentering) {
103172
            return 0;
103173
        }
103174
        if (this._scrollTop === 0) {
103175
            optionOffsetFromPanelTop = selectedIndex * itemHeight;
103176
        }
103177
        else if (this._scrollTop === maxScroll) {
103178
            var /** @type {?} */ firstDisplayedIndex = this._getItemCount() - maxOptionsDisplayed;
103179
            var /** @type {?} */ selectedDisplayIndex = selectedIndex - firstDisplayedIndex;
103180
            // The first item is partially out of the viewport. Therefore we need to calculate what
103181
            // portion of it is shown in the viewport and account for it in our offset.
103182
            var /** @type {?} */ partialItemHeight = itemHeight - (this._getItemCount() * itemHeight - SELECT_PANEL_MAX_HEIGHT) % itemHeight;
103183
            // Because the panel height is longer than the height of the options alone,
103184
            // there is always extra padding at the top or bottom of the panel. When
103185
            // scrolled to the very bottom, this padding is at the top of the panel and
103186
            // must be added to the offset.
103187
            optionOffsetFromPanelTop = selectedDisplayIndex * itemHeight + partialItemHeight;
103188
        }
103189
        else {
103190
            // If the option was scrolled to the middle of the panel using a scroll buffer,
103191
            // its offset will be the scroll buffer minus the half height that was added to
103192
            // center it.
103193
            optionOffsetFromPanelTop = scrollBuffer - itemHeight / 2;
103194
        }
103195
        // The final offset is the option's offset from the top, adjusted for the height difference,
103196
        // multiplied by -1 to ensure that the overlay moves in the correct direction up the page.
103197
        // The value is rounded to prevent some browsers from blurring the content.
103198
        return Math.round(optionOffsetFromPanelTop * -1 - optionHeightAdjustment);
103199
    };
103200
    /**
103201
     * Checks that the attempted overlay position will fit within the viewport.
103202
     * If it will not fit, tries to adjust the scroll position and the associated
103203
     * y-offset so the panel can open fully on-screen. If it still won't fit,
103204
     * sets the offset back to 0 to allow the fallback position to take over.
103205
     * @param {?} maxScroll
103206
     * @return {?}
103207
     */
103208
    MatSelect.prototype._checkOverlayWithinViewport = /**
103209
     * Checks that the attempted overlay position will fit within the viewport.
103210
     * If it will not fit, tries to adjust the scroll position and the associated
103211
     * y-offset so the panel can open fully on-screen. If it still won't fit,
103212
     * sets the offset back to 0 to allow the fallback position to take over.
103213
     * @param {?} maxScroll
103214
     * @return {?}
103215
     */
103216
    function (maxScroll) {
103217
        var /** @type {?} */ itemHeight = this._getItemHeight();
103218
        var /** @type {?} */ viewportSize = this._viewportRuler.getViewportSize();
103219
        var /** @type {?} */ topSpaceAvailable = this._triggerRect.top - SELECT_PANEL_VIEWPORT_PADDING;
103220
        var /** @type {?} */ bottomSpaceAvailable = viewportSize.height - this._triggerRect.bottom - SELECT_PANEL_VIEWPORT_PADDING;
103221
        var /** @type {?} */ panelHeightTop = Math.abs(this._offsetY);
103222
        var /** @type {?} */ totalPanelHeight = Math.min(this._getItemCount() * itemHeight, SELECT_PANEL_MAX_HEIGHT);
103223
        var /** @type {?} */ panelHeightBottom = totalPanelHeight - panelHeightTop - this._triggerRect.height;
103224
        if (panelHeightBottom > bottomSpaceAvailable) {
103225
            this._adjustPanelUp(panelHeightBottom, bottomSpaceAvailable);
103226
        }
103227
        else if (panelHeightTop > topSpaceAvailable) {
103228
            this._adjustPanelDown(panelHeightTop, topSpaceAvailable, maxScroll);
103229
        }
103230
        else {
103231
            this._transformOrigin = this._getOriginBasedOnOption();
103232
        }
103233
    };
103234
    /**
103235
     * Adjusts the overlay panel up to fit in the viewport.
103236
     * @param {?} panelHeightBottom
103237
     * @param {?} bottomSpaceAvailable
103238
     * @return {?}
103239
     */
103240
    MatSelect.prototype._adjustPanelUp = /**
103241
     * Adjusts the overlay panel up to fit in the viewport.
103242
     * @param {?} panelHeightBottom
103243
     * @param {?} bottomSpaceAvailable
103244
     * @return {?}
103245
     */
103246
    function (panelHeightBottom, bottomSpaceAvailable) {
103247
        // Browsers ignore fractional scroll offsets, so we need to round.
103248
        var /** @type {?} */ distanceBelowViewport = Math.round(panelHeightBottom - bottomSpaceAvailable);
103249
        // Scrolls the panel up by the distance it was extending past the boundary, then
103250
        // adjusts the offset by that amount to move the panel up into the viewport.
103251
        this._scrollTop -= distanceBelowViewport;
103252
        this._offsetY -= distanceBelowViewport;
103253
        this._transformOrigin = this._getOriginBasedOnOption();
103254
        // If the panel is scrolled to the very top, it won't be able to fit the panel
103255
        // by scrolling, so set the offset to 0 to allow the fallback position to take
103256
        // effect.
103257
        if (this._scrollTop <= 0) {
103258
            this._scrollTop = 0;
103259
            this._offsetY = 0;
103260
            this._transformOrigin = "50% bottom 0px";
103261
        }
103262
    };
103263
    /**
103264
     * Adjusts the overlay panel down to fit in the viewport.
103265
     * @param {?} panelHeightTop
103266
     * @param {?} topSpaceAvailable
103267
     * @param {?} maxScroll
103268
     * @return {?}
103269
     */
103270
    MatSelect.prototype._adjustPanelDown = /**
103271
     * Adjusts the overlay panel down to fit in the viewport.
103272
     * @param {?} panelHeightTop
103273
     * @param {?} topSpaceAvailable
103274
     * @param {?} maxScroll
103275
     * @return {?}
103276
     */
103277
    function (panelHeightTop, topSpaceAvailable, maxScroll) {
103278
        // Browsers ignore fractional scroll offsets, so we need to round.
103279
        var /** @type {?} */ distanceAboveViewport = Math.round(panelHeightTop - topSpaceAvailable);
103280
        // Scrolls the panel down by the distance it was extending past the boundary, then
103281
        // adjusts the offset by that amount to move the panel down into the viewport.
103282
        this._scrollTop += distanceAboveViewport;
103283
        this._offsetY += distanceAboveViewport;
103284
        this._transformOrigin = this._getOriginBasedOnOption();
103285
        // If the panel is scrolled to the very bottom, it won't be able to fit the
103286
        // panel by scrolling, so set the offset to 0 to allow the fallback position
103287
        // to take effect.
103288
        if (this._scrollTop >= maxScroll) {
103289
            this._scrollTop = maxScroll;
103290
            this._offsetY = 0;
103291
            this._transformOrigin = "50% top 0px";
103292
            return;
103293
        }
103294
    };
103295
    /**
103296
     * Sets the transform origin point based on the selected option.
103297
     * @return {?}
103298
     */
103299
    MatSelect.prototype._getOriginBasedOnOption = /**
103300
     * Sets the transform origin point based on the selected option.
103301
     * @return {?}
103302
     */
103303
    function () {
103304
        var /** @type {?} */ itemHeight = this._getItemHeight();
103305
        var /** @type {?} */ optionHeightAdjustment = (itemHeight - this._triggerRect.height) / 2;
103306
        var /** @type {?} */ originY = Math.abs(this._offsetY) - optionHeightAdjustment + itemHeight / 2;
103307
        return "50% " + originY + "px 0px";
103308
    };
103309
    /**
103310
     * Calculates the amount of items in the select. This includes options and group labels.
103311
     * @return {?}
103312
     */
103313
    MatSelect.prototype._getItemCount = /**
103314
     * Calculates the amount of items in the select. This includes options and group labels.
103315
     * @return {?}
103316
     */
103317
    function () {
103318
        return this.options.length + this.optionGroups.length;
103319
    };
103320
    /**
103321
     * Calculates the height of the select's options.
103322
     * @return {?}
103323
     */
103324
    MatSelect.prototype._getItemHeight = /**
103325
     * Calculates the height of the select's options.
103326
     * @return {?}
103327
     */
103328
    function () {
103329
        return this._triggerFontSize * SELECT_ITEM_HEIGHT_EM;
103330
    };
103331
    /**
103332
     * Implemented as part of MatFormFieldControl.
103333
     * @docs-private
103334
     */
103335
    /**
103336
     * Implemented as part of MatFormFieldControl.
103337
     * \@docs-private
103338
     * @param {?} ids
103339
     * @return {?}
103340
     */
103341
    MatSelect.prototype.setDescribedByIds = /**
103342
     * Implemented as part of MatFormFieldControl.
103343
     * \@docs-private
103344
     * @param {?} ids
103345
     * @return {?}
103346
     */
103347
    function (ids) {
103348
        this._ariaDescribedby = ids.join(' ');
103349
    };
103350
    /**
103351
     * Implemented as part of MatFormFieldControl.
103352
     * @docs-private
103353
     */
103354
    /**
103355
     * Implemented as part of MatFormFieldControl.
103356
     * \@docs-private
103357
     * @return {?}
103358
     */
103359
    MatSelect.prototype.onContainerClick = /**
103360
     * Implemented as part of MatFormFieldControl.
103361
     * \@docs-private
103362
     * @return {?}
103363
     */
103364
    function () {
103365
        this.focus();
103366
        this.open();
103367
    };
103368
    Object.defineProperty(MatSelect.prototype, "shouldLabelFloat", {
103369
        /**
103370
         * Implemented as part of MatFormFieldControl.
103371
         * @docs-private
103372
         */
103373
        get: /**
103374
         * Implemented as part of MatFormFieldControl.
103375
         * \@docs-private
103376
         * @return {?}
103377
         */
103378
        function () {
103379
            return this._panelOpen || !this.empty;
103380
        },
103381
        enumerable: true,
103382
        configurable: true
103383
    });
103384
    MatSelect.decorators = [
103385
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Component"], args: [{selector: 'mat-select',
103386
                    exportAs: 'matSelect',
103387
                    template: "<div cdk-overlay-origin class=\"mat-select-trigger\" aria-hidden=\"true\" (click)=\"toggle()\" #origin=\"cdkOverlayOrigin\" #trigger><div class=\"mat-select-value\" [ngSwitch]=\"empty\"><span class=\"mat-select-placeholder\" *ngSwitchCase=\"true\">{{placeholder || '\u00A0'}}</span> <span class=\"mat-select-value-text\" *ngSwitchCase=\"false\" [ngSwitch]=\"!!customTrigger\"><span *ngSwitchDefault>{{triggerValue || '\u00A0'}}</span><ng-content select=\"mat-select-trigger\" *ngSwitchCase=\"true\"></ng-content></span></div><div class=\"mat-select-arrow-wrapper\"><div class=\"mat-select-arrow\"></div></div></div><ng-template cdk-connected-overlay cdkConnectedOverlayLockPosition cdkConnectedOverlayHasBackdrop cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\" [cdkConnectedOverlayScrollStrategy]=\"_scrollStrategy\" [cdkConnectedOverlayOrigin]=\"origin\" [cdkConnectedOverlayOpen]=\"panelOpen\" [cdkConnectedOverlayPositions]=\"_positions\" [cdkConnectedOverlayMinWidth]=\"_triggerRect?.width\" [cdkConnectedOverlayOffsetY]=\"_offsetY\" (backdropClick)=\"close()\" (attach)=\"_onAttached()\" (detach)=\"close()\"><div #panel class=\"mat-select-panel {{ _getPanelTheme() }}\" [ngClass]=\"panelClass\" [@transformPanel]=\"multiple ? 'showing-multiple' : 'showing'\" (@transformPanel.done)=\"_panelDoneAnimatingStream.next($event.toState)\" [style.transformOrigin]=\"_transformOrigin\" [class.mat-select-panel-done-animating]=\"_panelDoneAnimating\" [style.font-size.px]=\"_triggerFontSize\" (keydown)=\"_handleKeydown($event)\"><div class=\"mat-select-content\" [@fadeInContent]=\"'showing'\" (@fadeInContent.done)=\"_onFadeInDone()\"><ng-content></ng-content></div></div></ng-template>",
103388
                    styles: [".mat-select{display:inline-block;width:100%;outline:0}.mat-select-trigger{display:inline-table;cursor:pointer;position:relative;box-sizing:border-box}.mat-select-disabled .mat-select-trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-select-value{display:table-cell;max-width:0;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-select-arrow-wrapper{display:table-cell;vertical-align:middle}.mat-form-field-appearance-fill .mat-select-arrow-wrapper,.mat-form-field-appearance-standard .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-outline .mat-select-arrow-wrapper{transform:translateY(-25%)}.mat-select-arrow{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;margin:0 4px}.mat-select-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:100%}.mat-select-panel:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}@media screen and (-ms-high-contrast:active){.mat-select-panel{outline:solid 1px}}.mat-select-panel .mat-optgroup-label,.mat-select-panel .mat-option{font-size:inherit;line-height:3em;height:3em}.mat-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-form-field-flex{cursor:pointer}.mat-form-field-type-mat-select .mat-form-field-label{width:calc(100% - 18px)}.mat-select-placeholder{transition:color .4s .133s cubic-bezier(.25,.8,.25,1)}._mat-animation-noopable .mat-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-select-placeholder{color:transparent;-webkit-text-fill-color:transparent;transition:none;display:block}"],
103389
                    inputs: ['disabled', 'disableRipple', 'tabIndex'],
103390
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ViewEncapsulation"].None,
103391
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ChangeDetectionStrategy"].OnPush,
103392
                    host: {
103393
                        'role': 'listbox',
103394
                        '[attr.id]': 'id',
103395
                        '[attr.tabindex]': 'tabIndex',
103396
                        '[attr.aria-label]': '_getAriaLabel()',
103397
                        '[attr.aria-labelledby]': '_getAriaLabelledby()',
103398
                        '[attr.aria-required]': 'required.toString()',
103399
                        '[attr.aria-disabled]': 'disabled.toString()',
103400
                        '[attr.aria-invalid]': 'errorState',
103401
                        '[attr.aria-owns]': 'panelOpen ? _optionIds : null',
103402
                        '[attr.aria-multiselectable]': 'multiple',
103403
                        '[attr.aria-describedby]': '_ariaDescribedby || null',
103404
                        '[attr.aria-activedescendant]': '_getAriaActiveDescendant()',
103405
                        '[class.mat-select-disabled]': 'disabled',
103406
                        '[class.mat-select-invalid]': 'errorState',
103407
                        '[class.mat-select-required]': 'required',
103408
                        'class': 'mat-select',
103409
                        '(keydown)': '_handleKeydown($event)',
103410
                        '(focus)': '_onFocus()',
103411
                        '(blur)': '_onBlur()',
103412
                    },
103413
                    animations: [
103414
                        matSelectAnimations.transformPanel,
103415
                        matSelectAnimations.fadeInContent
103416
                    ],
103417
                    providers: [
103418
                        { provide: _angular_material_form_field__WEBPACK_IMPORTED_MODULE_11__["MatFormFieldControl"], useExisting: MatSelect },
103419
                        { provide: _angular_material_core__WEBPACK_IMPORTED_MODULE_10__["MAT_OPTION_PARENT_COMPONENT"], useExisting: MatSelect }
103420
                    ],
103421
                },] },
103422
    ];
103423
    /** @nocollapse */
103424
    MatSelect.ctorParameters = function () { return [
103425
        { type: _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_7__["ViewportRuler"], },
103426
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ChangeDetectorRef"], },
103427
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["NgZone"], },
103428
        { type: _angular_material_core__WEBPACK_IMPORTED_MODULE_10__["ErrorStateMatcher"], },
103429
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ElementRef"], },
103430
        { type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_3__["Directionality"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Optional"] },] },
103431
        { type: _angular_forms__WEBPACK_IMPORTED_MODULE_9__["NgForm"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Optional"] },] },
103432
        { type: _angular_forms__WEBPACK_IMPORTED_MODULE_9__["FormGroupDirective"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Optional"] },] },
103433
        { type: _angular_material_form_field__WEBPACK_IMPORTED_MODULE_11__["MatFormField"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Optional"] },] },
103434
        { type: _angular_forms__WEBPACK_IMPORTED_MODULE_9__["NgControl"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Self"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Optional"] },] },
103435
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Attribute"], args: ['tabindex',] },] },
103436
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Inject"], args: [MAT_SELECT_SCROLL_STRATEGY,] },] },
103437
    ]; };
103438
    MatSelect.propDecorators = {
103439
        "trigger": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ViewChild"], args: ['trigger',] },],
103440
        "panel": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ViewChild"], args: ['panel',] },],
103441
        "overlayDir": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ViewChild"], args: [_angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_7__["CdkConnectedOverlay"],] },],
103442
        "options": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ContentChildren"], args: [_angular_material_core__WEBPACK_IMPORTED_MODULE_10__["MatOption"], { descendants: true },] },],
103443
        "optionGroups": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ContentChildren"], args: [_angular_material_core__WEBPACK_IMPORTED_MODULE_10__["MatOptgroup"],] },],
103444
        "panelClass": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Input"] },],
103445
        "customTrigger": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ContentChild"], args: [MatSelectTrigger,] },],
103446
        "placeholder": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Input"] },],
103447
        "required": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Input"] },],
103448
        "multiple": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Input"] },],
103449
        "disableOptionCentering": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Input"] },],
103450
        "compareWith": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Input"] },],
103451
        "value": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Input"] },],
103452
        "ariaLabel": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Input"], args: ['aria-label',] },],
103453
        "ariaLabelledby": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Input"], args: ['aria-labelledby',] },],
103454
        "errorStateMatcher": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Input"] },],
103455
        "id": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Input"] },],
103456
        "openedChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Output"] },],
103457
        "_openedStream": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Output"], args: ['opened',] },],
103458
        "_closedStream": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Output"], args: ['closed',] },],
103459
        "selectionChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Output"] },],
103460
        "valueChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Output"] },],
103461
    };
103462
    return MatSelect;
103463
}(_MatSelectMixinBase));
103464
 
103465
/**
103466
 * @fileoverview added by tsickle
103467
 * @suppress {checkTypes} checked by tsc
103468
 */
103469
var MatSelectModule = /** @class */ (function () {
103470
    function MatSelectModule() {
103471
    }
103472
    MatSelectModule.decorators = [
103473
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["NgModule"], args: [{
103474
                    imports: [
103475
                        _angular_common__WEBPACK_IMPORTED_MODULE_14__["CommonModule"],
103476
                        _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_7__["OverlayModule"],
103477
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_10__["MatOptionModule"],
103478
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_10__["MatCommonModule"],
103479
                    ],
103480
                    exports: [_angular_material_form_field__WEBPACK_IMPORTED_MODULE_11__["MatFormFieldModule"], MatSelect, MatSelectTrigger, _angular_material_core__WEBPACK_IMPORTED_MODULE_10__["MatOptionModule"], _angular_material_core__WEBPACK_IMPORTED_MODULE_10__["MatCommonModule"]],
103481
                    declarations: [MatSelect, MatSelectTrigger],
103482
                    providers: [MAT_SELECT_SCROLL_STRATEGY_PROVIDER]
103483
                },] },
103484
    ];
103485
    return MatSelectModule;
103486
}());
103487
 
103488
/**
103489
 * @fileoverview added by tsickle
103490
 * @suppress {checkTypes} checked by tsc
103491
 */
103492
 
103493
/**
103494
 * @fileoverview added by tsickle
103495
 * @suppress {checkTypes} checked by tsc
103496
 */
103497
 
103498
 
103499
//# sourceMappingURL=select.es5.js.map
103500
 
103501
 
103502
/***/ }),
103503
 
103504
/***/ "./node_modules/@angular/material/esm5/sidenav.es5.js":
103505
/*!************************************************************!*\
103506
  !*** ./node_modules/@angular/material/esm5/sidenav.es5.js ***!
103507
  \************************************************************/
103508
/*! exports provided: MatSidenavModule, throwMatDuplicatedDrawerError, MAT_DRAWER_DEFAULT_AUTOSIZE, MAT_DRAWER_DEFAULT_AUTOSIZE_FACTORY, MatDrawerContent, MatDrawer, MatDrawerContainer, MatSidenavContent, MatSidenav, MatSidenavContainer, matDrawerAnimations */
103509
/***/ (function(module, __webpack_exports__, __webpack_require__) {
103510
 
103511
"use strict";
103512
__webpack_require__.r(__webpack_exports__);
103513
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSidenavModule", function() { return MatSidenavModule; });
103514
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throwMatDuplicatedDrawerError", function() { return throwMatDuplicatedDrawerError; });
103515
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_DRAWER_DEFAULT_AUTOSIZE", function() { return MAT_DRAWER_DEFAULT_AUTOSIZE; });
103516
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_DRAWER_DEFAULT_AUTOSIZE_FACTORY", function() { return MAT_DRAWER_DEFAULT_AUTOSIZE_FACTORY; });
103517
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatDrawerContent", function() { return MatDrawerContent; });
103518
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatDrawer", function() { return MatDrawer; });
103519
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatDrawerContainer", function() { return MatDrawerContainer; });
103520
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSidenavContent", function() { return MatSidenavContent; });
103521
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSidenav", function() { return MatSidenav; });
103522
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSidenavContainer", function() { return MatSidenavContainer; });
103523
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matDrawerAnimations", function() { return matDrawerAnimations; });
103524
/* harmony import */ var _angular_animations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/animations */ "./node_modules/@angular/animations/fesm5/animations.js");
103525
/* harmony import */ var _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/cdk/a11y */ "./node_modules/@angular/cdk/esm5/a11y.es5.js");
103526
/* harmony import */ var _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/cdk/bidi */ "./node_modules/@angular/cdk/esm5/bidi.es5.js");
103527
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
103528
/* harmony import */ var _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/cdk/keycodes */ "./node_modules/@angular/cdk/esm5/keycodes.es5.js");
103529
/* harmony import */ var _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/cdk/platform */ "./node_modules/@angular/cdk/esm5/platform.es5.js");
103530
/* harmony import */ var _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/cdk/scrolling */ "./node_modules/@angular/cdk/esm5/scrolling.es5.js");
103531
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
103532
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
103533
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
103534
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
103535
/* harmony import */ var _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/platform-browser/animations */ "./node_modules/@angular/platform-browser/fesm5/animations.js");
103536
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
103537
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
103538
/**
103539
 * @license
103540
 * Copyright Google LLC All Rights Reserved.
103541
 *
103542
 * Use of this source code is governed by an MIT-style license that can be
103543
 * found in the LICENSE file at https://angular.io/license
103544
 */
103545
 
103546
 
103547
 
103548
 
103549
 
103550
 
103551
 
103552
 
103553
 
103554
 
103555
 
103556
 
103557
 
103558
 
103559
 
103560
/**
103561
 * @fileoverview added by tsickle
103562
 * @suppress {checkTypes} checked by tsc
103563
 */
103564
/**
103565
 * Animations used by the Material drawers.
103566
 */
103567
var /** @type {?} */ matDrawerAnimations = {
103568
    /** Animation that slides a drawer in and out. */
103569
    transformDrawer: Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["trigger"])('transform', [
103570
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('open, open-instant', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({
103571
            'transform': 'translate3d(0, 0, 0)',
103572
            'visibility': 'visible',
103573
        })),
103574
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('void', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({
103575
            // Avoids the shadow showing up when closed in SSR.
103576
            'box-shadow': 'none',
103577
            'visibility': 'hidden',
103578
        })),
103579
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["transition"])('void => open-instant', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["animate"])('0ms')),
103580
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["transition"])('void <=> open, open-instant => void', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["animate"])('400ms cubic-bezier(0.25, 0.8, 0.25, 1)'))
103581
    ])
103582
};
103583
 
103584
/**
103585
 * @fileoverview added by tsickle
103586
 * @suppress {checkTypes} checked by tsc
103587
 */
103588
/**
103589
 * Throws an exception when two MatDrawer are matching the same position.
103590
 * @param {?} position
103591
 * @return {?}
103592
 */
103593
function throwMatDuplicatedDrawerError(position) {
103594
    throw Error("A drawer was already declared for 'position=\"" + position + "\"'");
103595
}
103596
/**
103597
 * Configures whether drawers should use auto sizing by default.
103598
 */
103599
var /** @type {?} */ MAT_DRAWER_DEFAULT_AUTOSIZE = new _angular_core__WEBPACK_IMPORTED_MODULE_8__["InjectionToken"]('MAT_DRAWER_DEFAULT_AUTOSIZE', {
103600
    providedIn: 'root',
103601
    factory: MAT_DRAWER_DEFAULT_AUTOSIZE_FACTORY,
103602
});
103603
/**
103604
 * \@docs-private
103605
 * @return {?}
103606
 */
103607
function MAT_DRAWER_DEFAULT_AUTOSIZE_FACTORY() {
103608
    return false;
103609
}
103610
var MatDrawerContent = /** @class */ (function () {
103611
    function MatDrawerContent(_changeDetectorRef, _container) {
103612
        this._changeDetectorRef = _changeDetectorRef;
103613
        this._container = _container;
103614
    }
103615
    /**
103616
     * @return {?}
103617
     */
103618
    MatDrawerContent.prototype.ngAfterContentInit = /**
103619
     * @return {?}
103620
     */
103621
    function () {
103622
        var _this = this;
103623
        this._container._contentMarginChanges.subscribe(function () {
103624
            _this._changeDetectorRef.markForCheck();
103625
        });
103626
    };
103627
    MatDrawerContent.decorators = [
103628
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Component"], args: [{selector: 'mat-drawer-content',
103629
                    template: '<ng-content></ng-content>',
103630
                    host: {
103631
                        'class': 'mat-drawer-content',
103632
                        '[style.margin-left.px]': '_container._contentMargins.left',
103633
                        '[style.margin-right.px]': '_container._contentMargins.right',
103634
                    },
103635
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ChangeDetectionStrategy"].OnPush,
103636
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ViewEncapsulation"].None,
103637
                },] },
103638
    ];
103639
    /** @nocollapse */
103640
    MatDrawerContent.ctorParameters = function () { return [
103641
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ChangeDetectorRef"], },
103642
        { type: MatDrawerContainer, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Inject"], args: [Object(_angular_core__WEBPACK_IMPORTED_MODULE_8__["forwardRef"])(function () { return MatDrawerContainer; }),] },] },
103643
    ]; };
103644
    return MatDrawerContent;
103645
}());
103646
/**
103647
 * This component corresponds to a drawer that can be opened on the drawer container.
103648
 */
103649
var MatDrawer = /** @class */ (function () {
103650
    function MatDrawer(_elementRef, _focusTrapFactory, _focusMonitor, _platform, _ngZone, _doc) {
103651
        var _this = this;
103652
        this._elementRef = _elementRef;
103653
        this._focusTrapFactory = _focusTrapFactory;
103654
        this._focusMonitor = _focusMonitor;
103655
        this._platform = _platform;
103656
        this._ngZone = _ngZone;
103657
        this._doc = _doc;
103658
        this._elementFocusedBeforeDrawerWasOpened = null;
103659
        /**
103660
         * Whether the drawer is initialized. Used for disabling the initial animation.
103661
         */
103662
        this._enableAnimations = false;
103663
        this._position = 'start';
103664
        this._mode = 'over';
103665
        this._disableClose = false;
103666
        this._autoFocus = true;
103667
        /**
103668
         * Emits whenever the drawer has started animating.
103669
         */
103670
        this._animationStarted = new _angular_core__WEBPACK_IMPORTED_MODULE_8__["EventEmitter"]();
103671
        /**
103672
         * Current state of the sidenav animation.
103673
         */
103674
        this._animationState = 'void';
103675
        /**
103676
         * Event emitted when the drawer open state is changed.
103677
         */
103678
        this.openedChange =
103679
        // Note this has to be async in order to avoid some issues with two-bindings (see #8872).
103680
        new _angular_core__WEBPACK_IMPORTED_MODULE_8__["EventEmitter"](/* isAsync */ /* isAsync */ true);
103681
        /**
103682
         * Event emitted when the drawer's position changes.
103683
         */
103684
        this.onPositionChanged = new _angular_core__WEBPACK_IMPORTED_MODULE_8__["EventEmitter"]();
103685
        /**
103686
         * An observable that emits when the drawer mode changes. This is used by the drawer container to
103687
         * to know when to when the mode changes so it can adapt the margins on the content.
103688
         */
103689
        this._modeChanged = new rxjs__WEBPACK_IMPORTED_MODULE_9__["Subject"]();
103690
        this._opened = false;
103691
        this.openedChange.subscribe(function (opened) {
103692
            if (opened) {
103693
                if (_this._doc) {
103694
                    _this._elementFocusedBeforeDrawerWasOpened = /** @type {?} */ (_this._doc.activeElement);
103695
                }
103696
                if (_this._isFocusTrapEnabled && _this._focusTrap) {
103697
                    _this._trapFocus();
103698
                }
103699
            }
103700
            else {
103701
                _this._restoreFocus();
103702
            }
103703
        });
103704
        /**
103705
             * Listen to `keydown` events outside the zone so that change detection is not run every
103706
             * time a key is pressed. Instead we re-enter the zone only if the `ESC` key is pressed
103707
             * and we don't have close disabled.
103708
             */
103709
        this._ngZone.runOutsideAngular(function () {
103710
            Object(rxjs__WEBPACK_IMPORTED_MODULE_9__["fromEvent"])(_this._elementRef.nativeElement, 'keydown').pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["filter"])(function (event) { return event.keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_4__["ESCAPE"] && !_this.disableClose; })).subscribe(function (event) {
103711
                return _this._ngZone.run(function () {
103712
                    _this.close();
103713
                    event.stopPropagation();
103714
                });
103715
            });
103716
        });
103717
    }
103718
    Object.defineProperty(MatDrawer.prototype, "position", {
103719
        get: /**
103720
         * The side that the drawer is attached to.
103721
         * @return {?}
103722
         */
103723
        function () { return this._position; },
103724
        set: /**
103725
         * @param {?} value
103726
         * @return {?}
103727
         */
103728
        function (value) {
103729
            // Make sure we have a valid value.
103730
            value = value === 'end' ? 'end' : 'start';
103731
            if (value != this._position) {
103732
                this._position = value;
103733
                this.onPositionChanged.emit();
103734
            }
103735
        },
103736
        enumerable: true,
103737
        configurable: true
103738
    });
103739
    Object.defineProperty(MatDrawer.prototype, "mode", {
103740
        get: /**
103741
         * Mode of the drawer; one of 'over', 'push' or 'side'.
103742
         * @return {?}
103743
         */
103744
        function () { return this._mode; },
103745
        set: /**
103746
         * @param {?} value
103747
         * @return {?}
103748
         */
103749
        function (value) {
103750
            this._mode = value;
103751
            this._modeChanged.next();
103752
        },
103753
        enumerable: true,
103754
        configurable: true
103755
    });
103756
    Object.defineProperty(MatDrawer.prototype, "disableClose", {
103757
        get: /**
103758
         * Whether the drawer can be closed with the escape key or by clicking on the backdrop.
103759
         * @return {?}
103760
         */
103761
        function () { return this._disableClose; },
103762
        set: /**
103763
         * @param {?} value
103764
         * @return {?}
103765
         */
103766
        function (value) { this._disableClose = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceBooleanProperty"])(value); },
103767
        enumerable: true,
103768
        configurable: true
103769
    });
103770
    Object.defineProperty(MatDrawer.prototype, "autoFocus", {
103771
        get: /**
103772
         * Whether the drawer should focus the first focusable element automatically when opened.
103773
         * @return {?}
103774
         */
103775
        function () { return this._autoFocus; },
103776
        set: /**
103777
         * @param {?} value
103778
         * @return {?}
103779
         */
103780
        function (value) { this._autoFocus = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceBooleanProperty"])(value); },
103781
        enumerable: true,
103782
        configurable: true
103783
    });
103784
    Object.defineProperty(MatDrawer.prototype, "_openedStream", {
103785
        get: /**
103786
         * Event emitted when the drawer has been opened.
103787
         * @return {?}
103788
         */
103789
        function () {
103790
            return this.openedChange.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["filter"])(function (o) { return o; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["map"])(function () { }));
103791
        },
103792
        enumerable: true,
103793
        configurable: true
103794
    });
103795
    Object.defineProperty(MatDrawer.prototype, "openedStart", {
103796
        get: /**
103797
         * Event emitted when the drawer has started opening.
103798
         * @return {?}
103799
         */
103800
        function () {
103801
            return this._animationStarted.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["filter"])(function (e) { return e.fromState !== e.toState && e.toState.indexOf('open') === 0; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["map"])(function () { }));
103802
        },
103803
        enumerable: true,
103804
        configurable: true
103805
    });
103806
    Object.defineProperty(MatDrawer.prototype, "_closedStream", {
103807
        get: /**
103808
         * Event emitted when the drawer has been closed.
103809
         * @return {?}
103810
         */
103811
        function () {
103812
            return this.openedChange.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["filter"])(function (o) { return !o; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["map"])(function () { }));
103813
        },
103814
        enumerable: true,
103815
        configurable: true
103816
    });
103817
    Object.defineProperty(MatDrawer.prototype, "closedStart", {
103818
        get: /**
103819
         * Event emitted when the drawer has started closing.
103820
         * @return {?}
103821
         */
103822
        function () {
103823
            return this._animationStarted.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["filter"])(function (e) { return e.fromState !== e.toState && e.toState === 'void'; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["map"])(function () { }));
103824
        },
103825
        enumerable: true,
103826
        configurable: true
103827
    });
103828
    Object.defineProperty(MatDrawer.prototype, "_isFocusTrapEnabled", {
103829
        get: /**
103830
         * @return {?}
103831
         */
103832
        function () {
103833
            // The focus trap is only enabled when the drawer is open in any mode other than side.
103834
            return this.opened && this.mode !== 'side';
103835
        },
103836
        enumerable: true,
103837
        configurable: true
103838
    });
103839
    /**
103840
     * Traps focus inside the drawer.
103841
     * @return {?}
103842
     */
103843
    MatDrawer.prototype._trapFocus = /**
103844
     * Traps focus inside the drawer.
103845
     * @return {?}
103846
     */
103847
    function () {
103848
        var _this = this;
103849
        if (!this.autoFocus) {
103850
            return;
103851
        }
103852
        this._focusTrap.focusInitialElementWhenReady().then(function (hasMovedFocus) {
103853
            // If there were no focusable elements, focus the sidenav itself so the keyboard navigation
103854
            // still works. We need to check that `focus` is a function due to Universal.
103855
            if (!hasMovedFocus && typeof _this._elementRef.nativeElement.focus === 'function') {
103856
                _this._elementRef.nativeElement.focus();
103857
            }
103858
        });
103859
    };
103860
    /**
103861
     * If focus is currently inside the drawer, restores it to where it was before the drawer
103862
     * opened.
103863
     * @return {?}
103864
     */
103865
    MatDrawer.prototype._restoreFocus = /**
103866
     * If focus is currently inside the drawer, restores it to where it was before the drawer
103867
     * opened.
103868
     * @return {?}
103869
     */
103870
    function () {
103871
        if (!this.autoFocus) {
103872
            return;
103873
        }
103874
        var /** @type {?} */ activeEl = this._doc && this._doc.activeElement;
103875
        if (activeEl && this._elementRef.nativeElement.contains(activeEl)) {
103876
            if (this._elementFocusedBeforeDrawerWasOpened instanceof HTMLElement) {
103877
                this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened, this._openedVia);
103878
            }
103879
            else {
103880
                this._elementRef.nativeElement.blur();
103881
            }
103882
        }
103883
        this._elementFocusedBeforeDrawerWasOpened = null;
103884
        this._openedVia = null;
103885
    };
103886
    /**
103887
     * @return {?}
103888
     */
103889
    MatDrawer.prototype.ngAfterContentInit = /**
103890
     * @return {?}
103891
     */
103892
    function () {
103893
        this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);
103894
        this._focusTrap.enabled = this._isFocusTrapEnabled;
103895
    };
103896
    /**
103897
     * @return {?}
103898
     */
103899
    MatDrawer.prototype.ngAfterContentChecked = /**
103900
     * @return {?}
103901
     */
103902
    function () {
103903
        // Enable the animations after the lifecycle hooks have run, in order to avoid animating
103904
        // drawers that are open by default. When we're on the server, we shouldn't enable the
103905
        // animations, because we don't want the drawer to animate the first time the user sees
103906
        // the page.
103907
        if (this._platform.isBrowser) {
103908
            this._enableAnimations = true;
103909
        }
103910
    };
103911
    /**
103912
     * @return {?}
103913
     */
103914
    MatDrawer.prototype.ngOnDestroy = /**
103915
     * @return {?}
103916
     */
103917
    function () {
103918
        if (this._focusTrap) {
103919
            this._focusTrap.destroy();
103920
        }
103921
    };
103922
    Object.defineProperty(MatDrawer.prototype, "opened", {
103923
        get: /**
103924
         * Whether the drawer is opened. We overload this because we trigger an event when it
103925
         * starts or end.
103926
         * @return {?}
103927
         */
103928
        function () { return this._opened; },
103929
        set: /**
103930
         * @param {?} value
103931
         * @return {?}
103932
         */
103933
        function (value) { this.toggle(Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceBooleanProperty"])(value)); },
103934
        enumerable: true,
103935
        configurable: true
103936
    });
103937
    /**
103938
     * Open the drawer.
103939
     * @param openedVia Whether the drawer was opened by a key press, mouse click or programmatically.
103940
     * Used for focus management after the sidenav is closed.
103941
     */
103942
    /**
103943
     * Open the drawer.
103944
     * @param {?=} openedVia Whether the drawer was opened by a key press, mouse click or programmatically.
103945
     * Used for focus management after the sidenav is closed.
103946
     * @return {?}
103947
     */
103948
    MatDrawer.prototype.open = /**
103949
     * Open the drawer.
103950
     * @param {?=} openedVia Whether the drawer was opened by a key press, mouse click or programmatically.
103951
     * Used for focus management after the sidenav is closed.
103952
     * @return {?}
103953
     */
103954
    function (openedVia) {
103955
        return this.toggle(true, openedVia);
103956
    };
103957
    /** Close the drawer. */
103958
    /**
103959
     * Close the drawer.
103960
     * @return {?}
103961
     */
103962
    MatDrawer.prototype.close = /**
103963
     * Close the drawer.
103964
     * @return {?}
103965
     */
103966
    function () {
103967
        return this.toggle(false);
103968
    };
103969
    /**
103970
     * Toggle this drawer.
103971
     * @param isOpen Whether the drawer should be open.
103972
     * @param openedVia Whether the drawer was opened by a key press, mouse click or programmatically.
103973
     * Used for focus management after the sidenav is closed.
103974
     */
103975
    /**
103976
     * Toggle this drawer.
103977
     * @param {?=} isOpen Whether the drawer should be open.
103978
     * @param {?=} openedVia Whether the drawer was opened by a key press, mouse click or programmatically.
103979
     * Used for focus management after the sidenav is closed.
103980
     * @return {?}
103981
     */
103982
    MatDrawer.prototype.toggle = /**
103983
     * Toggle this drawer.
103984
     * @param {?=} isOpen Whether the drawer should be open.
103985
     * @param {?=} openedVia Whether the drawer was opened by a key press, mouse click or programmatically.
103986
     * Used for focus management after the sidenav is closed.
103987
     * @return {?}
103988
     */
103989
    function (isOpen, openedVia) {
103990
        var _this = this;
103991
        if (isOpen === void 0) { isOpen = !this.opened; }
103992
        if (openedVia === void 0) { openedVia = 'program'; }
103993
        this._opened = isOpen;
103994
        if (isOpen) {
103995
            this._animationState = this._enableAnimations ? 'open' : 'open-instant';
103996
            this._openedVia = openedVia;
103997
        }
103998
        else {
103999
            this._animationState = 'void';
104000
            this._restoreFocus();
104001
        }
104002
        if (this._focusTrap) {
104003
            this._focusTrap.enabled = this._isFocusTrapEnabled;
104004
        }
104005
        return new Promise(function (resolve) {
104006
            _this.openedChange.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["take"])(1)).subscribe(function (open) { return resolve(open ? 'open' : 'close'); });
104007
        });
104008
    };
104009
    /**
104010
     * @param {?} event
104011
     * @return {?}
104012
     */
104013
    MatDrawer.prototype._onAnimationStart = /**
104014
     * @param {?} event
104015
     * @return {?}
104016
     */
104017
    function (event) {
104018
        this._animationStarted.emit(event);
104019
    };
104020
    /**
104021
     * @param {?} event
104022
     * @return {?}
104023
     */
104024
    MatDrawer.prototype._onAnimationEnd = /**
104025
     * @param {?} event
104026
     * @return {?}
104027
     */
104028
    function (event) {
104029
        var fromState = event.fromState, toState = event.toState;
104030
        if ((toState.indexOf('open') === 0 && fromState === 'void') ||
104031
            (toState === 'void' && fromState.indexOf('open') === 0)) {
104032
            this.openedChange.emit(this._opened);
104033
        }
104034
    };
104035
    Object.defineProperty(MatDrawer.prototype, "_width", {
104036
        get: /**
104037
         * @return {?}
104038
         */
104039
        function () {
104040
            return this._elementRef.nativeElement ? (this._elementRef.nativeElement.offsetWidth || 0) : 0;
104041
        },
104042
        enumerable: true,
104043
        configurable: true
104044
    });
104045
    MatDrawer.decorators = [
104046
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Component"], args: [{selector: 'mat-drawer',
104047
                    exportAs: 'matDrawer',
104048
                    template: '<ng-content></ng-content>',
104049
                    animations: [matDrawerAnimations.transformDrawer],
104050
                    host: {
104051
                        'class': 'mat-drawer',
104052
                        '[@transform]': '_animationState',
104053
                        '(@transform.start)': '_onAnimationStart($event)',
104054
                        '(@transform.done)': '_onAnimationEnd($event)',
104055
                        // must prevent the browser from aligning text based on value
104056
                        '[attr.align]': 'null',
104057
                        '[class.mat-drawer-end]': 'position === "end"',
104058
                        '[class.mat-drawer-over]': 'mode === "over"',
104059
                        '[class.mat-drawer-push]': 'mode === "push"',
104060
                        '[class.mat-drawer-side]': 'mode === "side"',
104061
                        'tabIndex': '-1',
104062
                    },
104063
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ChangeDetectionStrategy"].OnPush,
104064
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ViewEncapsulation"].None,
104065
                },] },
104066
    ];
104067
    /** @nocollapse */
104068
    MatDrawer.ctorParameters = function () { return [
104069
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ElementRef"], },
104070
        { type: _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_1__["FocusTrapFactory"], },
104071
        { type: _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_1__["FocusMonitor"], },
104072
        { type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_5__["Platform"], },
104073
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["NgZone"], },
104074
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_7__["DOCUMENT"],] },] },
104075
    ]; };
104076
    MatDrawer.propDecorators = {
104077
        "position": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Input"] },],
104078
        "mode": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Input"] },],
104079
        "disableClose": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Input"] },],
104080
        "autoFocus": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Input"] },],
104081
        "openedChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Output"] },],
104082
        "_openedStream": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Output"], args: ['opened',] },],
104083
        "openedStart": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Output"] },],
104084
        "_closedStream": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Output"], args: ['closed',] },],
104085
        "closedStart": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Output"] },],
104086
        "onPositionChanged": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Output"], args: ['positionChanged',] },],
104087
        "opened": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Input"] },],
104088
    };
104089
    return MatDrawer;
104090
}());
104091
/**
104092
 * `<mat-drawer-container>` component.
104093
 *
104094
 * This is the parent component to one or two `<mat-drawer>`s that validates the state internally
104095
 * and coordinates the backdrop and content styling.
104096
 */
104097
var MatDrawerContainer = /** @class */ (function () {
104098
    function MatDrawerContainer(_dir, _element, _ngZone, _changeDetectorRef, defaultAutosize, _animationMode) {
104099
        if (defaultAutosize === void 0) { defaultAutosize = false; }
104100
        var _this = this;
104101
        this._dir = _dir;
104102
        this._element = _element;
104103
        this._ngZone = _ngZone;
104104
        this._changeDetectorRef = _changeDetectorRef;
104105
        this._animationMode = _animationMode;
104106
        /**
104107
         * Event emitted when the drawer backdrop is clicked.
104108
         */
104109
        this.backdropClick = new _angular_core__WEBPACK_IMPORTED_MODULE_8__["EventEmitter"]();
104110
        /**
104111
         * Emits when the component is destroyed.
104112
         */
104113
        this._destroyed = new rxjs__WEBPACK_IMPORTED_MODULE_9__["Subject"]();
104114
        /**
104115
         * Emits on every ngDoCheck. Used for debouncing reflows.
104116
         */
104117
        this._doCheckSubject = new rxjs__WEBPACK_IMPORTED_MODULE_9__["Subject"]();
104118
        /**
104119
         * Margins to be applied to the content. These are used to push / shrink the drawer content when a
104120
         * drawer is open. We use margin rather than transform even for push mode because transform breaks
104121
         * fixed position elements inside of the transformed element.
104122
         */
104123
        this._contentMargins = { left: null, right: null };
104124
        this._contentMarginChanges = new rxjs__WEBPACK_IMPORTED_MODULE_9__["Subject"]();
104125
        // If a `Dir` directive exists up the tree, listen direction changes
104126
        // and update the left/right properties to point to the proper start/end.
104127
        if (_dir) {
104128
            _dir.change.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["takeUntil"])(this._destroyed)).subscribe(function () {
104129
                _this._validateDrawers();
104130
                _this._updateContentMargins();
104131
            });
104132
        }
104133
        this._autosize = defaultAutosize;
104134
    }
104135
    Object.defineProperty(MatDrawerContainer.prototype, "start", {
104136
        /** The drawer child with the `start` position. */
104137
        get: /**
104138
         * The drawer child with the `start` position.
104139
         * @return {?}
104140
         */
104141
        function () { return this._start; },
104142
        enumerable: true,
104143
        configurable: true
104144
    });
104145
    Object.defineProperty(MatDrawerContainer.prototype, "end", {
104146
        /** The drawer child with the `end` position. */
104147
        get: /**
104148
         * The drawer child with the `end` position.
104149
         * @return {?}
104150
         */
104151
        function () { return this._end; },
104152
        enumerable: true,
104153
        configurable: true
104154
    });
104155
    Object.defineProperty(MatDrawerContainer.prototype, "autosize", {
104156
        get: /**
104157
         * Whether to automatically resize the container whenever
104158
         * the size of any of its drawers changes.
104159
         *
104160
         * **Use at your own risk!** Enabling this option can cause layout thrashing by measuring
104161
         * the drawers on every change detection cycle. Can be configured globally via the
104162
         * `MAT_DRAWER_DEFAULT_AUTOSIZE` token.
104163
         * @return {?}
104164
         */
104165
        function () { return this._autosize; },
104166
        set: /**
104167
         * @param {?} value
104168
         * @return {?}
104169
         */
104170
        function (value) { this._autosize = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceBooleanProperty"])(value); },
104171
        enumerable: true,
104172
        configurable: true
104173
    });
104174
    Object.defineProperty(MatDrawerContainer.prototype, "hasBackdrop", {
104175
        get: /**
104176
         * Whether the drawer container should have a backdrop while one of the sidenavs is open.
104177
         * If explicitly set to `true`, the backdrop will be enabled for drawers in the `side`
104178
         * mode as well.
104179
         * @return {?}
104180
         */
104181
        function () {
104182
            if (this._backdropOverride == null) {
104183
                return !this._start || this._start.mode !== 'side' || !this._end || this._end.mode !== 'side';
104184
            }
104185
            return this._backdropOverride;
104186
        },
104187
        set: /**
104188
         * @param {?} value
104189
         * @return {?}
104190
         */
104191
        function (value) {
104192
            this._backdropOverride = value == null ? null : Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceBooleanProperty"])(value);
104193
        },
104194
        enumerable: true,
104195
        configurable: true
104196
    });
104197
    /**
104198
     * @return {?}
104199
     */
104200
    MatDrawerContainer.prototype.ngAfterContentInit = /**
104201
     * @return {?}
104202
     */
104203
    function () {
104204
        var _this = this;
104205
        this._drawers.changes.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["startWith"])(null)).subscribe(function () {
104206
            _this._validateDrawers();
104207
            _this._drawers.forEach(function (drawer) {
104208
                _this._watchDrawerToggle(drawer);
104209
                _this._watchDrawerPosition(drawer);
104210
                _this._watchDrawerMode(drawer);
104211
            });
104212
            if (!_this._drawers.length ||
104213
                _this._isDrawerOpen(_this._start) ||
104214
                _this._isDrawerOpen(_this._end)) {
104215
                _this._updateContentMargins();
104216
            }
104217
            _this._changeDetectorRef.markForCheck();
104218
        });
104219
        this._doCheckSubject.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["debounceTime"])(10), // Arbitrary debounce time, less than a frame at 60fps
104220
        // Arbitrary debounce time, less than a frame at 60fps
104221
        Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["takeUntil"])(this._destroyed)).subscribe(function () { return _this._updateContentMargins(); });
104222
    };
104223
    /**
104224
     * @return {?}
104225
     */
104226
    MatDrawerContainer.prototype.ngOnDestroy = /**
104227
     * @return {?}
104228
     */
104229
    function () {
104230
        this._doCheckSubject.complete();
104231
        this._destroyed.next();
104232
        this._destroyed.complete();
104233
    };
104234
    /** Calls `open` of both start and end drawers */
104235
    /**
104236
     * Calls `open` of both start and end drawers
104237
     * @return {?}
104238
     */
104239
    MatDrawerContainer.prototype.open = /**
104240
     * Calls `open` of both start and end drawers
104241
     * @return {?}
104242
     */
104243
    function () {
104244
        this._drawers.forEach(function (drawer) { return drawer.open(); });
104245
    };
104246
    /** Calls `close` of both start and end drawers */
104247
    /**
104248
     * Calls `close` of both start and end drawers
104249
     * @return {?}
104250
     */
104251
    MatDrawerContainer.prototype.close = /**
104252
     * Calls `close` of both start and end drawers
104253
     * @return {?}
104254
     */
104255
    function () {
104256
        this._drawers.forEach(function (drawer) { return drawer.close(); });
104257
    };
104258
    /**
104259
     * @return {?}
104260
     */
104261
    MatDrawerContainer.prototype.ngDoCheck = /**
104262
     * @return {?}
104263
     */
104264
    function () {
104265
        var _this = this;
104266
        // If users opted into autosizing, do a check every change detection cycle.
104267
        if (this._autosize && this._isPushed()) {
104268
            // Run outside the NgZone, otherwise the debouncer will throw us into an infinite loop.
104269
            this._ngZone.runOutsideAngular(function () { return _this._doCheckSubject.next(); });
104270
        }
104271
    };
104272
    /**
104273
     * Subscribes to drawer events in order to set a class on the main container element when the
104274
     * drawer is open and the backdrop is visible. This ensures any overflow on the container element
104275
     * is properly hidden.
104276
     * @param {?} drawer
104277
     * @return {?}
104278
     */
104279
    MatDrawerContainer.prototype._watchDrawerToggle = /**
104280
     * Subscribes to drawer events in order to set a class on the main container element when the
104281
     * drawer is open and the backdrop is visible. This ensures any overflow on the container element
104282
     * is properly hidden.
104283
     * @param {?} drawer
104284
     * @return {?}
104285
     */
104286
    function (drawer) {
104287
        var _this = this;
104288
        drawer._animationStarted.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["takeUntil"])(this._drawers.changes), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["filter"])(function (event) { return event.fromState !== event.toState; }))
104289
            .subscribe(function (event) {
104290
            // Set the transition class on the container so that the animations occur. This should not
104291
            // be set initially because animations should only be triggered via a change in state.
104292
            if (event.toState !== 'open-instant' && _this._animationMode !== 'NoopAnimations') {
104293
                _this._element.nativeElement.classList.add('mat-drawer-transition');
104294
            }
104295
            _this._updateContentMargins();
104296
            _this._changeDetectorRef.markForCheck();
104297
        });
104298
        if (drawer.mode !== 'side') {
104299
            drawer.openedChange.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["takeUntil"])(this._drawers.changes)).subscribe(function () {
104300
                return _this._setContainerClass(drawer.opened);
104301
            });
104302
        }
104303
    };
104304
    /**
104305
     * Subscribes to drawer onPositionChanged event in order to
104306
     * re-validate drawers when the position changes.
104307
     * @param {?} drawer
104308
     * @return {?}
104309
     */
104310
    MatDrawerContainer.prototype._watchDrawerPosition = /**
104311
     * Subscribes to drawer onPositionChanged event in order to
104312
     * re-validate drawers when the position changes.
104313
     * @param {?} drawer
104314
     * @return {?}
104315
     */
104316
    function (drawer) {
104317
        var _this = this;
104318
        if (!drawer) {
104319
            return;
104320
        }
104321
        // NOTE: We need to wait for the microtask queue to be empty before validating,
104322
        // since both drawers may be swapping positions at the same time.
104323
        drawer.onPositionChanged.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["takeUntil"])(this._drawers.changes)).subscribe(function () {
104324
            _this._ngZone.onMicrotaskEmpty.asObservable().pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["take"])(1)).subscribe(function () {
104325
                _this._validateDrawers();
104326
            });
104327
        });
104328
    };
104329
    /**
104330
     * Subscribes to changes in drawer mode so we can run change detection.
104331
     * @param {?} drawer
104332
     * @return {?}
104333
     */
104334
    MatDrawerContainer.prototype._watchDrawerMode = /**
104335
     * Subscribes to changes in drawer mode so we can run change detection.
104336
     * @param {?} drawer
104337
     * @return {?}
104338
     */
104339
    function (drawer) {
104340
        var _this = this;
104341
        if (drawer) {
104342
            drawer._modeChanged.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["takeUntil"])(Object(rxjs__WEBPACK_IMPORTED_MODULE_9__["merge"])(this._drawers.changes, this._destroyed)))
104343
                .subscribe(function () {
104344
                _this._updateContentMargins();
104345
                _this._changeDetectorRef.markForCheck();
104346
            });
104347
        }
104348
    };
104349
    /**
104350
     * Toggles the 'mat-drawer-opened' class on the main 'mat-drawer-container' element.
104351
     * @param {?} isAdd
104352
     * @return {?}
104353
     */
104354
    MatDrawerContainer.prototype._setContainerClass = /**
104355
     * Toggles the 'mat-drawer-opened' class on the main 'mat-drawer-container' element.
104356
     * @param {?} isAdd
104357
     * @return {?}
104358
     */
104359
    function (isAdd) {
104360
        if (isAdd) {
104361
            this._element.nativeElement.classList.add('mat-drawer-opened');
104362
        }
104363
        else {
104364
            this._element.nativeElement.classList.remove('mat-drawer-opened');
104365
        }
104366
    };
104367
    /**
104368
     * Validate the state of the drawer children components.
104369
     * @return {?}
104370
     */
104371
    MatDrawerContainer.prototype._validateDrawers = /**
104372
     * Validate the state of the drawer children components.
104373
     * @return {?}
104374
     */
104375
    function () {
104376
        var _this = this;
104377
        this._start = this._end = null;
104378
        // Ensure that we have at most one start and one end drawer.
104379
        this._drawers.forEach(function (drawer) {
104380
            if (drawer.position == 'end') {
104381
                if (_this._end != null) {
104382
                    throwMatDuplicatedDrawerError('end');
104383
                }
104384
                _this._end = drawer;
104385
            }
104386
            else {
104387
                if (_this._start != null) {
104388
                    throwMatDuplicatedDrawerError('start');
104389
                }
104390
                _this._start = drawer;
104391
            }
104392
        });
104393
        this._right = this._left = null;
104394
        // Detect if we're LTR or RTL.
104395
        if (this._dir && this._dir.value === 'rtl') {
104396
            this._left = this._end;
104397
            this._right = this._start;
104398
        }
104399
        else {
104400
            this._left = this._start;
104401
            this._right = this._end;
104402
        }
104403
    };
104404
    /**
104405
     * Whether the container is being pushed to the side by one of the drawers.
104406
     * @return {?}
104407
     */
104408
    MatDrawerContainer.prototype._isPushed = /**
104409
     * Whether the container is being pushed to the side by one of the drawers.
104410
     * @return {?}
104411
     */
104412
    function () {
104413
        return (this._isDrawerOpen(this._start) && this._start.mode != 'over') ||
104414
            (this._isDrawerOpen(this._end) && this._end.mode != 'over');
104415
    };
104416
    /**
104417
     * @return {?}
104418
     */
104419
    MatDrawerContainer.prototype._onBackdropClicked = /**
104420
     * @return {?}
104421
     */
104422
    function () {
104423
        this.backdropClick.emit();
104424
        this._closeModalDrawer();
104425
    };
104426
    /**
104427
     * @return {?}
104428
     */
104429
    MatDrawerContainer.prototype._closeModalDrawer = /**
104430
     * @return {?}
104431
     */
104432
    function () {
104433
        var _this = this;
104434
        // Close all open drawers where closing is not disabled and the mode is not `side`.
104435
        [this._start, this._end]
104436
            .filter(function (drawer) { return drawer && !drawer.disableClose && _this._canHaveBackdrop(drawer); })
104437
            .forEach(function (drawer) { return ((drawer)).close(); });
104438
    };
104439
    /**
104440
     * @return {?}
104441
     */
104442
    MatDrawerContainer.prototype._isShowingBackdrop = /**
104443
     * @return {?}
104444
     */
104445
    function () {
104446
        return (this._isDrawerOpen(this._start) && this._canHaveBackdrop(this._start)) ||
104447
            (this._isDrawerOpen(this._end) && this._canHaveBackdrop(this._end));
104448
    };
104449
    /**
104450
     * @param {?} drawer
104451
     * @return {?}
104452
     */
104453
    MatDrawerContainer.prototype._canHaveBackdrop = /**
104454
     * @param {?} drawer
104455
     * @return {?}
104456
     */
104457
    function (drawer) {
104458
        return drawer.mode !== 'side' || !!this._backdropOverride;
104459
    };
104460
    /**
104461
     * @param {?} drawer
104462
     * @return {?}
104463
     */
104464
    MatDrawerContainer.prototype._isDrawerOpen = /**
104465
     * @param {?} drawer
104466
     * @return {?}
104467
     */
104468
    function (drawer) {
104469
        return drawer != null && drawer.opened;
104470
    };
104471
    /**
104472
     * Recalculates and updates the inline styles for the content. Note that this should be used
104473
     * sparingly, because it causes a reflow.
104474
     * @return {?}
104475
     */
104476
    MatDrawerContainer.prototype._updateContentMargins = /**
104477
     * Recalculates and updates the inline styles for the content. Note that this should be used
104478
     * sparingly, because it causes a reflow.
104479
     * @return {?}
104480
     */
104481
    function () {
104482
        var _this = this;
104483
        // 1. For drawers in `over` mode, they don't affect the content.
104484
        // 2. For drawers in `side` mode they should shrink the content. We do this by adding to the
104485
        //    left margin (for left drawer) or right margin (for right the drawer).
104486
        // 3. For drawers in `push` mode the should shift the content without resizing it. We do this by
104487
        //    adding to the left or right margin and simultaneously subtracting the same amount of
104488
        //    margin from the other side.
104489
        var /** @type {?} */ left = 0;
104490
        var /** @type {?} */ right = 0;
104491
        if (this._left && this._left.opened) {
104492
            if (this._left.mode == 'side') {
104493
                left += this._left._width;
104494
            }
104495
            else if (this._left.mode == 'push') {
104496
                var /** @type {?} */ width = this._left._width;
104497
                left += width;
104498
                right -= width;
104499
            }
104500
        }
104501
        if (this._right && this._right.opened) {
104502
            if (this._right.mode == 'side') {
104503
                right += this._right._width;
104504
            }
104505
            else if (this._right.mode == 'push') {
104506
                var /** @type {?} */ width = this._right._width;
104507
                right += width;
104508
                left -= width;
104509
            }
104510
        }
104511
        // If either `right` or `left` is zero, don't set a style to the element. This
104512
        // allows users to specify a custom size via CSS class in SSR scenarios where the
104513
        // measured widths will always be zero. Note that we reset to `null` here, rather
104514
        // than below, in order to ensure that the types in the `if` below are consistent.
104515
        left = left || /** @type {?} */ ((null));
104516
        right = right || /** @type {?} */ ((null));
104517
        if (left !== this._contentMargins.left || right !== this._contentMargins.right) {
104518
            this._contentMargins = { left: left, right: right };
104519
            // Pull back into the NgZone since in some cases we could be outside. We need to be careful
104520
            // to do it only when something changed, otherwise we can end up hitting the zone too often.
104521
            this._ngZone.run(function () { return _this._contentMarginChanges.next(_this._contentMargins); });
104522
        }
104523
    };
104524
    MatDrawerContainer.decorators = [
104525
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Component"], args: [{selector: 'mat-drawer-container',
104526
                    exportAs: 'matDrawerContainer',
104527
                    template: "<div class=\"mat-drawer-backdrop\" (click)=\"_onBackdropClicked()\" *ngIf=\"hasBackdrop\" [class.mat-drawer-shown]=\"_isShowingBackdrop()\"></div><ng-content select=\"mat-drawer\"></ng-content><ng-content select=\"mat-drawer-content\"></ng-content><mat-drawer-content *ngIf=\"!_content\" cdkScrollable><ng-content></ng-content></mat-drawer-content>",
104528
                    styles: [".mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-opened{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:background-color,visibility}@media screen and (-ms-high-contrast:active){.mat-drawer-backdrop{opacity:.5}}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%,0,0)}@media screen and (-ms-high-contrast:active){.mat-drawer,[dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}}@media screen and (-ms-high-contrast:active){.mat-drawer.mat-drawer-end,[dir=rtl] .mat-drawer{border-left:solid 1px currentColor;border-right:none}}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%,0,0)}[dir=rtl] .mat-drawer{transform:translate3d(100%,0,0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%,0,0)}.mat-drawer:not(.mat-drawer-side){box-shadow:0 8px 10px -5px rgba(0,0,0,.2),0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12)}.mat-sidenav-fixed{position:fixed}"],
104529
                    host: {
104530
                        'class': 'mat-drawer-container',
104531
                        '[class.mat-drawer-container-explicit-backdrop]': '_backdropOverride',
104532
                    },
104533
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ChangeDetectionStrategy"].OnPush,
104534
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ViewEncapsulation"].None,
104535
                },] },
104536
    ];
104537
    /** @nocollapse */
104538
    MatDrawerContainer.ctorParameters = function () { return [
104539
        { type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_2__["Directionality"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Optional"] },] },
104540
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ElementRef"], },
104541
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["NgZone"], },
104542
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ChangeDetectorRef"], },
104543
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Inject"], args: [MAT_DRAWER_DEFAULT_AUTOSIZE,] },] },
104544
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Inject"], args: [_angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_11__["ANIMATION_MODULE_TYPE"],] },] },
104545
    ]; };
104546
    MatDrawerContainer.propDecorators = {
104547
        "_drawers": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ContentChildren"], args: [MatDrawer,] },],
104548
        "_content": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ContentChild"], args: [MatDrawerContent,] },],
104549
        "autosize": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Input"] },],
104550
        "hasBackdrop": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Input"] },],
104551
        "backdropClick": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Output"] },],
104552
        "scrollable": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ViewChild"], args: [_angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_6__["CdkScrollable"],] },],
104553
    };
104554
    return MatDrawerContainer;
104555
}());
104556
 
104557
/**
104558
 * @fileoverview added by tsickle
104559
 * @suppress {checkTypes} checked by tsc
104560
 */
104561
var MatSidenavContent = /** @class */ (function (_super) {
104562
    Object(tslib__WEBPACK_IMPORTED_MODULE_12__["__extends"])(MatSidenavContent, _super);
104563
    function MatSidenavContent(changeDetectorRef, container) {
104564
        return _super.call(this, changeDetectorRef, container) || this;
104565
    }
104566
    MatSidenavContent.decorators = [
104567
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Component"], args: [{selector: 'mat-sidenav-content',
104568
                    template: '<ng-content></ng-content>',
104569
                    host: {
104570
                        'class': 'mat-drawer-content mat-sidenav-content',
104571
                        '[style.margin-left.px]': '_container._contentMargins.left',
104572
                        '[style.margin-right.px]': '_container._contentMargins.right',
104573
                    },
104574
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ChangeDetectionStrategy"].OnPush,
104575
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ViewEncapsulation"].None,
104576
                },] },
104577
    ];
104578
    /** @nocollapse */
104579
    MatSidenavContent.ctorParameters = function () { return [
104580
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ChangeDetectorRef"], },
104581
        { type: MatSidenavContainer, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Inject"], args: [Object(_angular_core__WEBPACK_IMPORTED_MODULE_8__["forwardRef"])(function () { return MatSidenavContainer; }),] },] },
104582
    ]; };
104583
    return MatSidenavContent;
104584
}(MatDrawerContent));
104585
var MatSidenav = /** @class */ (function (_super) {
104586
    Object(tslib__WEBPACK_IMPORTED_MODULE_12__["__extends"])(MatSidenav, _super);
104587
    function MatSidenav() {
104588
        var _this = _super !== null && _super.apply(this, arguments) || this;
104589
        _this._fixedInViewport = false;
104590
        _this._fixedTopGap = 0;
104591
        _this._fixedBottomGap = 0;
104592
        return _this;
104593
    }
104594
    Object.defineProperty(MatSidenav.prototype, "fixedInViewport", {
104595
        get: /**
104596
         * Whether the sidenav is fixed in the viewport.
104597
         * @return {?}
104598
         */
104599
        function () { return this._fixedInViewport; },
104600
        set: /**
104601
         * @param {?} value
104602
         * @return {?}
104603
         */
104604
        function (value) { this._fixedInViewport = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceBooleanProperty"])(value); },
104605
        enumerable: true,
104606
        configurable: true
104607
    });
104608
    Object.defineProperty(MatSidenav.prototype, "fixedTopGap", {
104609
        get: /**
104610
         * The gap between the top of the sidenav and the top of the viewport when the sidenav is in fixed
104611
         * mode.
104612
         * @return {?}
104613
         */
104614
        function () { return this._fixedTopGap; },
104615
        set: /**
104616
         * @param {?} value
104617
         * @return {?}
104618
         */
104619
        function (value) { this._fixedTopGap = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceNumberProperty"])(value); },
104620
        enumerable: true,
104621
        configurable: true
104622
    });
104623
    Object.defineProperty(MatSidenav.prototype, "fixedBottomGap", {
104624
        get: /**
104625
         * The gap between the bottom of the sidenav and the bottom of the viewport when the sidenav is in
104626
         * fixed mode.
104627
         * @return {?}
104628
         */
104629
        function () { return this._fixedBottomGap; },
104630
        set: /**
104631
         * @param {?} value
104632
         * @return {?}
104633
         */
104634
        function (value) { this._fixedBottomGap = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceNumberProperty"])(value); },
104635
        enumerable: true,
104636
        configurable: true
104637
    });
104638
    MatSidenav.decorators = [
104639
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Component"], args: [{selector: 'mat-sidenav',
104640
                    exportAs: 'matSidenav',
104641
                    template: '<ng-content></ng-content>',
104642
                    animations: [matDrawerAnimations.transformDrawer],
104643
                    host: {
104644
                        'class': 'mat-drawer mat-sidenav',
104645
                        'tabIndex': '-1',
104646
                        '[@transform]': '_animationState',
104647
                        '(@transform.start)': '_onAnimationStart($event)',
104648
                        '(@transform.done)': '_onAnimationEnd($event)',
104649
                        // must prevent the browser from aligning text based on value
104650
                        '[attr.align]': 'null',
104651
                        '[class.mat-drawer-end]': 'position === "end"',
104652
                        '[class.mat-drawer-over]': 'mode === "over"',
104653
                        '[class.mat-drawer-push]': 'mode === "push"',
104654
                        '[class.mat-drawer-side]': 'mode === "side"',
104655
                        '[class.mat-sidenav-fixed]': 'fixedInViewport',
104656
                        '[style.top.px]': 'fixedInViewport ? fixedTopGap : null',
104657
                        '[style.bottom.px]': 'fixedInViewport ? fixedBottomGap : null',
104658
                    },
104659
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ChangeDetectionStrategy"].OnPush,
104660
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ViewEncapsulation"].None,
104661
                },] },
104662
    ];
104663
    /** @nocollapse */
104664
    MatSidenav.propDecorators = {
104665
        "fixedInViewport": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Input"] },],
104666
        "fixedTopGap": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Input"] },],
104667
        "fixedBottomGap": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Input"] },],
104668
    };
104669
    return MatSidenav;
104670
}(MatDrawer));
104671
var MatSidenavContainer = /** @class */ (function (_super) {
104672
    Object(tslib__WEBPACK_IMPORTED_MODULE_12__["__extends"])(MatSidenavContainer, _super);
104673
    function MatSidenavContainer() {
104674
        return _super !== null && _super.apply(this, arguments) || this;
104675
    }
104676
    MatSidenavContainer.decorators = [
104677
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["Component"], args: [{selector: 'mat-sidenav-container',
104678
                    exportAs: 'matSidenavContainer',
104679
                    template: "<div class=\"mat-drawer-backdrop\" (click)=\"_onBackdropClicked()\" *ngIf=\"hasBackdrop\" [class.mat-drawer-shown]=\"_isShowingBackdrop()\"></div><ng-content select=\"mat-sidenav\"></ng-content><ng-content select=\"mat-sidenav-content\"></ng-content><mat-sidenav-content *ngIf=\"!_content\" cdkScrollable><ng-content></ng-content></mat-sidenav-content>",
104680
                    styles: [".mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-opened{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:background-color,visibility}@media screen and (-ms-high-contrast:active){.mat-drawer-backdrop{opacity:.5}}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%,0,0)}@media screen and (-ms-high-contrast:active){.mat-drawer,[dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}}@media screen and (-ms-high-contrast:active){.mat-drawer.mat-drawer-end,[dir=rtl] .mat-drawer{border-left:solid 1px currentColor;border-right:none}}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%,0,0)}[dir=rtl] .mat-drawer{transform:translate3d(100%,0,0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%,0,0)}.mat-drawer:not(.mat-drawer-side){box-shadow:0 8px 10px -5px rgba(0,0,0,.2),0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12)}.mat-sidenav-fixed{position:fixed}"],
104681
                    host: {
104682
                        'class': 'mat-drawer-container mat-sidenav-container',
104683
                        '[class.mat-drawer-container-explicit-backdrop]': '_backdropOverride',
104684
                    },
104685
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ChangeDetectionStrategy"].OnPush,
104686
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ViewEncapsulation"].None,
104687
                },] },
104688
    ];
104689
    /** @nocollapse */
104690
    MatSidenavContainer.propDecorators = {
104691
        "_drawers": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ContentChildren"], args: [MatSidenav,] },],
104692
        "_content": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["ContentChild"], args: [MatSidenavContent,] },],
104693
    };
104694
    return MatSidenavContainer;
104695
}(MatDrawerContainer));
104696
 
104697
/**
104698
 * @fileoverview added by tsickle
104699
 * @suppress {checkTypes} checked by tsc
104700
 */
104701
var MatSidenavModule = /** @class */ (function () {
104702
    function MatSidenavModule() {
104703
    }
104704
    MatSidenavModule.decorators = [
104705
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_8__["NgModule"], args: [{
104706
                    imports: [
104707
                        _angular_common__WEBPACK_IMPORTED_MODULE_7__["CommonModule"],
104708
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_13__["MatCommonModule"],
104709
                        _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_6__["ScrollDispatchModule"],
104710
                        _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_5__["PlatformModule"],
104711
                    ],
104712
                    exports: [
104713
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_13__["MatCommonModule"],
104714
                        MatDrawer,
104715
                        MatDrawerContainer,
104716
                        MatDrawerContent,
104717
                        MatSidenav,
104718
                        MatSidenavContainer,
104719
                        MatSidenavContent,
104720
                    ],
104721
                    declarations: [
104722
                        MatDrawer,
104723
                        MatDrawerContainer,
104724
                        MatDrawerContent,
104725
                        MatSidenav,
104726
                        MatSidenavContainer,
104727
                        MatSidenavContent,
104728
                    ],
104729
                },] },
104730
    ];
104731
    return MatSidenavModule;
104732
}());
104733
 
104734
/**
104735
 * @fileoverview added by tsickle
104736
 * @suppress {checkTypes} checked by tsc
104737
 */
104738
 
104739
/**
104740
 * @fileoverview added by tsickle
104741
 * @suppress {checkTypes} checked by tsc
104742
 */
104743
 
104744
 
104745
//# sourceMappingURL=sidenav.es5.js.map
104746
 
104747
 
104748
/***/ }),
104749
 
104750
/***/ "./node_modules/@angular/material/esm5/slide-toggle.es5.js":
104751
/*!*****************************************************************!*\
104752
  !*** ./node_modules/@angular/material/esm5/slide-toggle.es5.js ***!
104753
  \*****************************************************************/
104754
/*! exports provided: MatSlideToggleModule, MAT_SLIDE_TOGGLE_VALUE_ACCESSOR, MatSlideToggleChange, MatSlideToggleBase, _MatSlideToggleMixinBase, MatSlideToggle, MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS */
104755
/***/ (function(module, __webpack_exports__, __webpack_require__) {
104756
 
104757
"use strict";
104758
__webpack_require__.r(__webpack_exports__);
104759
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSlideToggleModule", function() { return MatSlideToggleModule; });
104760
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_SLIDE_TOGGLE_VALUE_ACCESSOR", function() { return MAT_SLIDE_TOGGLE_VALUE_ACCESSOR; });
104761
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSlideToggleChange", function() { return MatSlideToggleChange; });
104762
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSlideToggleBase", function() { return MatSlideToggleBase; });
104763
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatSlideToggleMixinBase", function() { return _MatSlideToggleMixinBase; });
104764
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSlideToggle", function() { return MatSlideToggle; });
104765
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS", function() { return MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS; });
104766
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
104767
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
104768
/* harmony import */ var _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/cdk/a11y */ "./node_modules/@angular/cdk/esm5/a11y.es5.js");
104769
/* harmony import */ var _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/bidi */ "./node_modules/@angular/cdk/esm5/bidi.es5.js");
104770
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
104771
/* harmony import */ var _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/cdk/platform */ "./node_modules/@angular/cdk/esm5/platform.es5.js");
104772
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
104773
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
104774
/* harmony import */ var _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/platform-browser/animations */ "./node_modules/@angular/platform-browser/fesm5/animations.js");
104775
/* harmony import */ var _angular_cdk_observers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/cdk/observers */ "./node_modules/@angular/cdk/esm5/observers.es5.js");
104776
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js");
104777
/**
104778
 * @license
104779
 * Copyright Google LLC All Rights Reserved.
104780
 *
104781
 * Use of this source code is governed by an MIT-style license that can be
104782
 * found in the LICENSE file at https://angular.io/license
104783
 */
104784
 
104785
 
104786
 
104787
 
104788
 
104789
 
104790
 
104791
 
104792
 
104793
 
104794
 
104795
 
104796
/**
104797
 * @fileoverview added by tsickle
104798
 * @suppress {checkTypes} checked by tsc
104799
 */
104800
/**
104801
 * Injection token to be used to override the default options for `mat-slide-toggle`.
104802
 */
104803
var /** @type {?} */ MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('mat-slide-toggle-default-options', {
104804
    providedIn: 'root',
104805
    factory: function () { return ({ disableToggleValue: false, disableDragValue: false }); }
104806
});
104807
 
104808
/**
104809
 * @fileoverview added by tsickle
104810
 * @suppress {checkTypes} checked by tsc
104811
 */
104812
// Increasing integer for generating unique ids for slide-toggle components.
104813
var /** @type {?} */ nextUniqueId = 0;
104814
var /** @type {?} */ MAT_SLIDE_TOGGLE_VALUE_ACCESSOR = {
104815
    provide: _angular_forms__WEBPACK_IMPORTED_MODULE_6__["NG_VALUE_ACCESSOR"],
104816
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () { return MatSlideToggle; }),
104817
    multi: true
104818
};
104819
/**
104820
 * Change event object emitted by a MatSlideToggle.
104821
 */
104822
var  /**
104823
 * Change event object emitted by a MatSlideToggle.
104824
 */
104825
MatSlideToggleChange = /** @class */ (function () {
104826
    function MatSlideToggleChange(source, checked) {
104827
        this.source = source;
104828
        this.checked = checked;
104829
    }
104830
    return MatSlideToggleChange;
104831
}());
104832
/**
104833
 * \@docs-private
104834
 */
104835
var  /**
104836
 * \@docs-private
104837
 */
104838
MatSlideToggleBase = /** @class */ (function () {
104839
    function MatSlideToggleBase(_elementRef) {
104840
        this._elementRef = _elementRef;
104841
    }
104842
    return MatSlideToggleBase;
104843
}());
104844
var /** @type {?} */ _MatSlideToggleMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_7__["mixinTabIndex"])(Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_7__["mixinColor"])(Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_7__["mixinDisableRipple"])(Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_7__["mixinDisabled"])(MatSlideToggleBase)), 'accent'));
104845
/**
104846
 * Represents a slidable "switch" toggle that can be moved between on and off.
104847
 */
104848
var MatSlideToggle = /** @class */ (function (_super) {
104849
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(MatSlideToggle, _super);
104850
    function MatSlideToggle(elementRef, /**
104851
                   * @deprecated The `_platform` parameter to be removed.
104852
                   * @breaking-change 7.0.0
104853
                   */
104854
    /**
104855
     * @deprecated The `_platform` parameter to be removed.
104856
     * @breaking-change 7.0.0
104857
     */
104858
    _platform, _focusMonitor, _changeDetectorRef, tabIndex, _ngZone, defaults, _animationMode, _dir) {
104859
        var _this = _super.call(this, elementRef) || this;
104860
        _this._focusMonitor = _focusMonitor;
104861
        _this._changeDetectorRef = _changeDetectorRef;
104862
        _this._ngZone = _ngZone;
104863
        _this.defaults = defaults;
104864
        _this._animationMode = _animationMode;
104865
        _this._dir = _dir;
104866
        _this.onChange = function (_) { };
104867
        _this.onTouched = function () { };
104868
        _this._uniqueId = "mat-slide-toggle-" + ++nextUniqueId;
104869
        _this._required = false;
104870
        _this._checked = false;
104871
        /**
104872
         * Whether the thumb is currently being dragged.
104873
         */
104874
        _this._dragging = false;
104875
        /**
104876
         * Name value will be applied to the input element if present
104877
         */
104878
        _this.name = null;
104879
        /**
104880
         * A unique id for the slide-toggle input. If none is supplied, it will be auto-generated.
104881
         */
104882
        _this.id = _this._uniqueId;
104883
        /**
104884
         * Whether the label should appear after or before the slide-toggle. Defaults to 'after'
104885
         */
104886
        _this.labelPosition = 'after';
104887
        /**
104888
         * Used to set the aria-label attribute on the underlying input element.
104889
         */
104890
        _this.ariaLabel = null;
104891
        /**
104892
         * Used to set the aria-labelledby attribute on the underlying input element.
104893
         */
104894
        _this.ariaLabelledby = null;
104895
        /**
104896
         * An event will be dispatched each time the slide-toggle changes its value.
104897
         */
104898
        _this.change = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
104899
        /**
104900
         * An event will be dispatched each time the slide-toggle input is toggled.
104901
         * This event always fire when user toggle the slide toggle, but does not mean the slide toggle's
104902
         * value is changed. The event does not fire when user drag to change the slide toggle value.
104903
         */
104904
        _this.toggleChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
104905
        /**
104906
         * An event will be dispatched each time the slide-toggle is dragged.
104907
         * This event always fire when user drag the slide toggle to make a change that greater than 50%.
104908
         * It does not mean the slide toggle's value is changed. The event does not fire when user toggle
104909
         * the slide toggle to change the slide toggle's value.
104910
         */
104911
        _this.dragChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
104912
        _this.tabIndex = parseInt(tabIndex) || 0;
104913
        return _this;
104914
    }
104915
    Object.defineProperty(MatSlideToggle.prototype, "required", {
104916
        get: /**
104917
         * Whether the slide-toggle is required.
104918
         * @return {?}
104919
         */
104920
        function () { return this._required; },
104921
        set: /**
104922
         * @param {?} value
104923
         * @return {?}
104924
         */
104925
        function (value) { this._required = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_4__["coerceBooleanProperty"])(value); },
104926
        enumerable: true,
104927
        configurable: true
104928
    });
104929
    Object.defineProperty(MatSlideToggle.prototype, "checked", {
104930
        get: /**
104931
         * Whether the slide-toggle element is checked or not
104932
         * @return {?}
104933
         */
104934
        function () { return this._checked; },
104935
        set: /**
104936
         * @param {?} value
104937
         * @return {?}
104938
         */
104939
        function (value) {
104940
            this._checked = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_4__["coerceBooleanProperty"])(value);
104941
            this._changeDetectorRef.markForCheck();
104942
        },
104943
        enumerable: true,
104944
        configurable: true
104945
    });
104946
    Object.defineProperty(MatSlideToggle.prototype, "inputId", {
104947
        /** Returns the unique id for the visual hidden input. */
104948
        get: /**
104949
         * Returns the unique id for the visual hidden input.
104950
         * @return {?}
104951
         */
104952
        function () { return (this.id || this._uniqueId) + "-input"; },
104953
        enumerable: true,
104954
        configurable: true
104955
    });
104956
    /**
104957
     * @return {?}
104958
     */
104959
    MatSlideToggle.prototype.ngAfterContentInit = /**
104960
     * @return {?}
104961
     */
104962
    function () {
104963
        var _this = this;
104964
        this._focusMonitor
104965
            .monitor(this._inputElement.nativeElement)
104966
            .subscribe(function (focusOrigin) { return _this._onInputFocusChange(focusOrigin); });
104967
    };
104968
    /**
104969
     * @return {?}
104970
     */
104971
    MatSlideToggle.prototype.ngOnDestroy = /**
104972
     * @return {?}
104973
     */
104974
    function () {
104975
        this._focusMonitor.stopMonitoring(this._inputElement.nativeElement);
104976
    };
104977
    /** Method being called whenever the underlying input emits a change event. */
104978
    /**
104979
     * Method being called whenever the underlying input emits a change event.
104980
     * @param {?} event
104981
     * @return {?}
104982
     */
104983
    MatSlideToggle.prototype._onChangeEvent = /**
104984
     * Method being called whenever the underlying input emits a change event.
104985
     * @param {?} event
104986
     * @return {?}
104987
     */
104988
    function (event) {
104989
        // We always have to stop propagation on the change event.
104990
        // Otherwise the change event, from the input element, will bubble up and
104991
        // emit its event object to the component's `change` output.
104992
        event.stopPropagation();
104993
        if (!this._dragging) {
104994
            this.toggleChange.emit();
104995
        }
104996
        // Releasing the pointer over the `<label>` element while dragging triggers another
104997
        // click event on the `<label>` element. This means that the checked state of the underlying
104998
        // input changed unintentionally and needs to be changed back. Or when the slide toggle's config
104999
        // disabled toggle change event by setting `disableToggleValue: true`, the slide toggle's value
105000
        // does not change, and the checked state of the underlying input needs to be changed back.
105001
        if (this._dragging || this.defaults.disableToggleValue) {
105002
            this._inputElement.nativeElement.checked = this.checked;
105003
            return;
105004
        }
105005
        // Sync the value from the underlying input element with the component instance.
105006
        this.checked = this._inputElement.nativeElement.checked;
105007
        // Emit our custom change event only if the underlying input emitted one. This ensures that
105008
        // there is no change event, when the checked state changes programmatically.
105009
        this._emitChangeEvent();
105010
    };
105011
    /** Method being called whenever the slide-toggle has been clicked. */
105012
    /**
105013
     * Method being called whenever the slide-toggle has been clicked.
105014
     * @param {?} event
105015
     * @return {?}
105016
     */
105017
    MatSlideToggle.prototype._onInputClick = /**
105018
     * Method being called whenever the slide-toggle has been clicked.
105019
     * @param {?} event
105020
     * @return {?}
105021
     */
105022
    function (event) {
105023
        // We have to stop propagation for click events on the visual hidden input element.
105024
        // By default, when a user clicks on a label element, a generated click event will be
105025
        // dispatched on the associated input element. Since we are using a label element as our
105026
        // root container, the click event on the `slide-toggle` will be executed twice.
105027
        // The real click event will bubble up, and the generated click event also tries to bubble up.
105028
        // This will lead to multiple click events.
105029
        // Preventing bubbling for the second event will solve that issue.
105030
        event.stopPropagation();
105031
    };
105032
    /** Implemented as part of ControlValueAccessor. */
105033
    /**
105034
     * Implemented as part of ControlValueAccessor.
105035
     * @param {?} value
105036
     * @return {?}
105037
     */
105038
    MatSlideToggle.prototype.writeValue = /**
105039
     * Implemented as part of ControlValueAccessor.
105040
     * @param {?} value
105041
     * @return {?}
105042
     */
105043
    function (value) {
105044
        this.checked = !!value;
105045
    };
105046
    /** Implemented as part of ControlValueAccessor. */
105047
    /**
105048
     * Implemented as part of ControlValueAccessor.
105049
     * @param {?} fn
105050
     * @return {?}
105051
     */
105052
    MatSlideToggle.prototype.registerOnChange = /**
105053
     * Implemented as part of ControlValueAccessor.
105054
     * @param {?} fn
105055
     * @return {?}
105056
     */
105057
    function (fn) {
105058
        this.onChange = fn;
105059
    };
105060
    /** Implemented as part of ControlValueAccessor. */
105061
    /**
105062
     * Implemented as part of ControlValueAccessor.
105063
     * @param {?} fn
105064
     * @return {?}
105065
     */
105066
    MatSlideToggle.prototype.registerOnTouched = /**
105067
     * Implemented as part of ControlValueAccessor.
105068
     * @param {?} fn
105069
     * @return {?}
105070
     */
105071
    function (fn) {
105072
        this.onTouched = fn;
105073
    };
105074
    /** Implemented as a part of ControlValueAccessor. */
105075
    /**
105076
     * Implemented as a part of ControlValueAccessor.
105077
     * @param {?} isDisabled
105078
     * @return {?}
105079
     */
105080
    MatSlideToggle.prototype.setDisabledState = /**
105081
     * Implemented as a part of ControlValueAccessor.
105082
     * @param {?} isDisabled
105083
     * @return {?}
105084
     */
105085
    function (isDisabled) {
105086
        this.disabled = isDisabled;
105087
        this._changeDetectorRef.markForCheck();
105088
    };
105089
    /** Focuses the slide-toggle. */
105090
    /**
105091
     * Focuses the slide-toggle.
105092
     * @return {?}
105093
     */
105094
    MatSlideToggle.prototype.focus = /**
105095
     * Focuses the slide-toggle.
105096
     * @return {?}
105097
     */
105098
    function () {
105099
        this._focusMonitor.focusVia(this._inputElement.nativeElement, 'keyboard');
105100
    };
105101
    /** Toggles the checked state of the slide-toggle. */
105102
    /**
105103
     * Toggles the checked state of the slide-toggle.
105104
     * @return {?}
105105
     */
105106
    MatSlideToggle.prototype.toggle = /**
105107
     * Toggles the checked state of the slide-toggle.
105108
     * @return {?}
105109
     */
105110
    function () {
105111
        this.checked = !this.checked;
105112
        this.onChange(this.checked);
105113
    };
105114
    /**
105115
     * Function is called whenever the focus changes for the input element.
105116
     * @param {?} focusOrigin
105117
     * @return {?}
105118
     */
105119
    MatSlideToggle.prototype._onInputFocusChange = /**
105120
     * Function is called whenever the focus changes for the input element.
105121
     * @param {?} focusOrigin
105122
     * @return {?}
105123
     */
105124
    function (focusOrigin) {
105125
        var _this = this;
105126
        // TODO(paul): support `program`. See https://github.com/angular/material2/issues/9889
105127
        if (!this._focusRipple && focusOrigin === 'keyboard') {
105128
            // For keyboard focus show a persistent ripple as focus indicator.
105129
            this._focusRipple = this._ripple.launch(0, 0, { persistent: true });
105130
        }
105131
        else if (!focusOrigin) {
105132
            // When a focused element becomes disabled, the browser *immediately* fires a blur event.
105133
            // Angular does not expect events to be raised during change detection, so any state change
105134
            // (such as a form control's 'ng-touched') will cause a changed-after-checked error.
105135
            // See https://github.com/angular/angular/issues/17793. To work around this, we defer telling
105136
            // the form control it has been touched until the next tick.
105137
            Promise.resolve().then(function () { return _this.onTouched(); });
105138
            // Fade out and clear the focus ripple if one is currently present.
105139
            if (this._focusRipple) {
105140
                this._focusRipple.fadeOut();
105141
                this._focusRipple = null;
105142
            }
105143
        }
105144
    };
105145
    /**
105146
     * Emits a change event on the `change` output. Also notifies the FormControl about the change.
105147
     * @return {?}
105148
     */
105149
    MatSlideToggle.prototype._emitChangeEvent = /**
105150
     * Emits a change event on the `change` output. Also notifies the FormControl about the change.
105151
     * @return {?}
105152
     */
105153
    function () {
105154
        this.onChange(this.checked);
105155
        this.change.emit(new MatSlideToggleChange(this, this.checked));
105156
    };
105157
    /**
105158
     * Retrieves the percentage of thumb from the moved distance. Percentage as fraction of 100.
105159
     * @param {?} distance
105160
     * @return {?}
105161
     */
105162
    MatSlideToggle.prototype._getDragPercentage = /**
105163
     * Retrieves the percentage of thumb from the moved distance. Percentage as fraction of 100.
105164
     * @param {?} distance
105165
     * @return {?}
105166
     */
105167
    function (distance) {
105168
        var /** @type {?} */ percentage = (distance / this._thumbBarWidth) * 100;
105169
        // When the toggle was initially checked, then we have to start the drag at the end.
105170
        if (this._previousChecked) {
105171
            percentage += 100;
105172
        }
105173
        return Math.max(0, Math.min(percentage, 100));
105174
    };
105175
    /**
105176
     * @return {?}
105177
     */
105178
    MatSlideToggle.prototype._onDragStart = /**
105179
     * @return {?}
105180
     */
105181
    function () {
105182
        if (!this.disabled && !this._dragging) {
105183
            var /** @type {?} */ thumbEl = this._thumbEl.nativeElement;
105184
            this._thumbBarWidth = this._thumbBarEl.nativeElement.clientWidth - thumbEl.clientWidth;
105185
            thumbEl.classList.add('mat-dragging');
105186
            this._previousChecked = this.checked;
105187
            this._dragging = true;
105188
        }
105189
    };
105190
    /**
105191
     * @param {?} event
105192
     * @return {?}
105193
     */
105194
    MatSlideToggle.prototype._onDrag = /**
105195
     * @param {?} event
105196
     * @return {?}
105197
     */
105198
    function (event) {
105199
        if (this._dragging) {
105200
            var /** @type {?} */ direction = this._dir && this._dir.value === 'rtl' ? -1 : 1;
105201
            this._dragPercentage = this._getDragPercentage(event.deltaX * direction);
105202
            // Calculate the moved distance based on the thumb bar width.
105203
            var /** @type {?} */ dragX = (this._dragPercentage / 100) * this._thumbBarWidth * direction;
105204
            this._thumbEl.nativeElement.style.transform = "translate3d(" + dragX + "px, 0, 0)";
105205
        }
105206
    };
105207
    /**
105208
     * @return {?}
105209
     */
105210
    MatSlideToggle.prototype._onDragEnd = /**
105211
     * @return {?}
105212
     */
105213
    function () {
105214
        var _this = this;
105215
        if (this._dragging) {
105216
            var /** @type {?} */ newCheckedValue = this._dragPercentage > 50;
105217
            if (newCheckedValue !== this.checked) {
105218
                this.dragChange.emit();
105219
                if (!this.defaults.disableDragValue) {
105220
                    this.checked = newCheckedValue;
105221
                    this._emitChangeEvent();
105222
                }
105223
            }
105224
            // The drag should be stopped outside of the current event handler, otherwise the
105225
            // click event will be fired before it and will revert the drag change.
105226
            this._ngZone.runOutsideAngular(function () {
105227
                return setTimeout(function () {
105228
                    if (_this._dragging) {
105229
                        _this._dragging = false;
105230
                        _this._thumbEl.nativeElement.classList.remove('mat-dragging');
105231
                        // Reset the transform because the component will take care
105232
                        // of the thumb position after drag.
105233
                        // Reset the transform because the component will take care
105234
                        // of the thumb position after drag.
105235
                        _this._thumbEl.nativeElement.style.transform = '';
105236
                    }
105237
                });
105238
            });
105239
        }
105240
    };
105241
    /** Method being called whenever the label text changes. */
105242
    /**
105243
     * Method being called whenever the label text changes.
105244
     * @return {?}
105245
     */
105246
    MatSlideToggle.prototype._onLabelTextChange = /**
105247
     * Method being called whenever the label text changes.
105248
     * @return {?}
105249
     */
105250
    function () {
105251
        // This method is getting called whenever the label of the slide-toggle changes.
105252
        // Since the slide-toggle uses the OnPush strategy we need to notify it about the change
105253
        // that has been recognized by the cdkObserveContent directive.
105254
        this._changeDetectorRef.markForCheck();
105255
    };
105256
    MatSlideToggle.decorators = [
105257
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-slide-toggle',
105258
                    exportAs: 'matSlideToggle',
105259
                    host: {
105260
                        'class': 'mat-slide-toggle',
105261
                        '[id]': 'id',
105262
                        '[class.mat-checked]': 'checked',
105263
                        '[class.mat-disabled]': 'disabled',
105264
                        '[class.mat-slide-toggle-label-before]': 'labelPosition == "before"',
105265
                        '[class._mat-animation-noopable]': '_animationMode === "NoopAnimations"',
105266
                    },
105267
                    template: "<label class=\"mat-slide-toggle-label\" #label><div #toggleBar class=\"mat-slide-toggle-bar\" [class.mat-slide-toggle-bar-no-side-margin]=\"!labelContent.textContent || !labelContent.textContent.trim()\"><input #input class=\"mat-slide-toggle-input cdk-visually-hidden\" type=\"checkbox\" [id]=\"inputId\" [required]=\"required\" [tabIndex]=\"tabIndex\" [checked]=\"checked\" [disabled]=\"disabled\" [attr.name]=\"name\" [attr.aria-label]=\"ariaLabel\" [attr.aria-labelledby]=\"ariaLabelledby\" (change)=\"_onChangeEvent($event)\" (click)=\"_onInputClick($event)\"><div class=\"mat-slide-toggle-thumb-container\" #thumbContainer (slidestart)=\"_onDragStart()\" (slide)=\"_onDrag($event)\" (slideend)=\"_onDragEnd()\"><div class=\"mat-slide-toggle-thumb\"></div><div class=\"mat-slide-toggle-ripple\" mat-ripple [matRippleTrigger]=\"label\" [matRippleDisabled]=\"disableRipple || disabled\" [matRippleCentered]=\"true\" [matRippleRadius]=\"23\" [matRippleAnimation]=\"{enterDuration: 150}\"></div></div></div><span class=\"mat-slide-toggle-content\" #labelContent (cdkObserveContent)=\"_onLabelTextChange()\"><ng-content></ng-content></span></label>",
105268
                    styles: [".mat-slide-toggle{display:inline-block;height:24px;max-width:100%;line-height:24px;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:0}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(16px,0,0)}[dir=rtl] .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(-16px,0,0)}.mat-slide-toggle.mat-disabled .mat-slide-toggle-label,.mat-slide-toggle.mat-disabled .mat-slide-toggle-thumb-container{cursor:default}.mat-slide-toggle-label{display:flex;flex:1;flex-direction:row;align-items:center;height:inherit;cursor:pointer}.mat-slide-toggle-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-slide-toggle-label-before .mat-slide-toggle-label{order:1}.mat-slide-toggle-label-before .mat-slide-toggle-bar{order:2}.mat-slide-toggle-bar,[dir=rtl] .mat-slide-toggle-label-before .mat-slide-toggle-bar{margin-right:8px;margin-left:0}.mat-slide-toggle-label-before .mat-slide-toggle-bar,[dir=rtl] .mat-slide-toggle-bar{margin-left:8px;margin-right:0}.mat-slide-toggle-bar-no-side-margin{margin-left:0;margin-right:0}.mat-slide-toggle-thumb-container{position:absolute;z-index:1;width:20px;height:20px;top:-3px;left:0;transform:translate3d(0,0,0);transition:all 80ms linear;transition-property:transform;cursor:-webkit-grab;cursor:grab}.mat-slide-toggle-thumb-container.mat-dragging,.mat-slide-toggle-thumb-container:active{cursor:-webkit-grabbing;cursor:grabbing;transition-duration:0s}._mat-animation-noopable .mat-slide-toggle-thumb-container{transition:none}[dir=rtl] .mat-slide-toggle-thumb-container{left:auto;right:0}.mat-slide-toggle-thumb{height:20px;width:20px;border-radius:50%;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12)}.mat-slide-toggle-bar{position:relative;width:36px;height:14px;flex-shrink:0;border-radius:8px}.mat-slide-toggle-input{bottom:0;left:10px}[dir=rtl] .mat-slide-toggle-input{left:auto;right:10px}.mat-slide-toggle-bar,.mat-slide-toggle-thumb{transition:all 80ms linear;transition-property:background-color;transition-delay:50ms}._mat-animation-noopable .mat-slide-toggle-bar,._mat-animation-noopable .mat-slide-toggle-thumb{transition:none}.mat-slide-toggle-ripple{position:absolute;top:calc(50% - 23px);left:calc(50% - 23px);height:46px;width:46px;z-index:1;pointer-events:none}@media screen and (-ms-high-contrast:active){.mat-slide-toggle-thumb{background:#fff;border:1px solid #000}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb{background:#000;border:1px solid #fff}.mat-slide-toggle-bar{background:#fff}}@media screen and (-ms-high-contrast:black-on-white){.mat-slide-toggle-bar{border:1px solid #000}}"],
105269
                    providers: [MAT_SLIDE_TOGGLE_VALUE_ACCESSOR],
105270
                    inputs: ['disabled', 'disableRipple', 'color', 'tabIndex'],
105271
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
105272
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
105273
                },] },
105274
    ];
105275
    /** @nocollapse */
105276
    MatSlideToggle.ctorParameters = function () { return [
105277
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
105278
        { type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_5__["Platform"], },
105279
        { type: _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_2__["FocusMonitor"], },
105280
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"], },
105281
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Attribute"], args: ['tabindex',] },] },
105282
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], },
105283
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS,] },] },
105284
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_8__["ANIMATION_MODULE_TYPE"],] },] },
105285
        { type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_3__["Directionality"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
105286
    ]; };
105287
    MatSlideToggle.propDecorators = {
105288
        "_thumbEl": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: ['thumbContainer',] },],
105289
        "_thumbBarEl": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: ['toggleBar',] },],
105290
        "name": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
105291
        "id": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
105292
        "labelPosition": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
105293
        "ariaLabel": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['aria-label',] },],
105294
        "ariaLabelledby": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['aria-labelledby',] },],
105295
        "required": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
105296
        "checked": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
105297
        "change": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
105298
        "toggleChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
105299
        "dragChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
105300
        "_inputElement": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: ['input',] },],
105301
        "_ripple": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: [_angular_material_core__WEBPACK_IMPORTED_MODULE_7__["MatRipple"],] },],
105302
    };
105303
    return MatSlideToggle;
105304
}(_MatSlideToggleMixinBase));
105305
 
105306
/**
105307
 * @fileoverview added by tsickle
105308
 * @suppress {checkTypes} checked by tsc
105309
 */
105310
var MatSlideToggleModule = /** @class */ (function () {
105311
    function MatSlideToggleModule() {
105312
    }
105313
    MatSlideToggleModule.decorators = [
105314
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
105315
                    imports: [_angular_material_core__WEBPACK_IMPORTED_MODULE_7__["MatRippleModule"], _angular_material_core__WEBPACK_IMPORTED_MODULE_7__["MatCommonModule"], _angular_cdk_observers__WEBPACK_IMPORTED_MODULE_9__["ObserversModule"]],
105316
                    exports: [MatSlideToggle, _angular_material_core__WEBPACK_IMPORTED_MODULE_7__["MatCommonModule"]],
105317
                    declarations: [MatSlideToggle],
105318
                    providers: [
105319
                        { provide: _angular_platform_browser__WEBPACK_IMPORTED_MODULE_10__["HAMMER_GESTURE_CONFIG"], useClass: _angular_material_core__WEBPACK_IMPORTED_MODULE_7__["GestureConfig"] }
105320
                    ],
105321
                },] },
105322
    ];
105323
    return MatSlideToggleModule;
105324
}());
105325
 
105326
/**
105327
 * @fileoverview added by tsickle
105328
 * @suppress {checkTypes} checked by tsc
105329
 */
105330
 
105331
/**
105332
 * @fileoverview added by tsickle
105333
 * @suppress {checkTypes} checked by tsc
105334
 */
105335
 
105336
 
105337
//# sourceMappingURL=slide-toggle.es5.js.map
105338
 
105339
 
105340
/***/ }),
105341
 
105342
/***/ "./node_modules/@angular/material/esm5/slider.es5.js":
105343
/*!***********************************************************!*\
105344
  !*** ./node_modules/@angular/material/esm5/slider.es5.js ***!
105345
  \***********************************************************/
105346
/*! exports provided: MatSliderModule, MAT_SLIDER_VALUE_ACCESSOR, MatSliderChange, MatSliderBase, _MatSliderMixinBase, MatSlider */
105347
/***/ (function(module, __webpack_exports__, __webpack_require__) {
105348
 
105349
"use strict";
105350
__webpack_require__.r(__webpack_exports__);
105351
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSliderModule", function() { return MatSliderModule; });
105352
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_SLIDER_VALUE_ACCESSOR", function() { return MAT_SLIDER_VALUE_ACCESSOR; });
105353
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSliderChange", function() { return MatSliderChange; });
105354
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSliderBase", function() { return MatSliderBase; });
105355
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatSliderMixinBase", function() { return _MatSliderMixinBase; });
105356
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSlider", function() { return MatSlider; });
105357
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
105358
/* harmony import */ var _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/cdk/a11y */ "./node_modules/@angular/cdk/esm5/a11y.es5.js");
105359
/* harmony import */ var _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/cdk/bidi */ "./node_modules/@angular/cdk/esm5/bidi.es5.js");
105360
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
105361
/* harmony import */ var _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/cdk/keycodes */ "./node_modules/@angular/cdk/esm5/keycodes.es5.js");
105362
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
105363
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
105364
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
105365
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
105366
/* harmony import */ var _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/platform-browser/animations */ "./node_modules/@angular/platform-browser/fesm5/animations.js");
105367
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
105368
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js");
105369
/**
105370
 * @license
105371
 * Copyright Google LLC All Rights Reserved.
105372
 *
105373
 * Use of this source code is governed by an MIT-style license that can be
105374
 * found in the LICENSE file at https://angular.io/license
105375
 */
105376
 
105377
 
105378
 
105379
 
105380
 
105381
 
105382
 
105383
 
105384
 
105385
 
105386
 
105387
 
105388
 
105389
/**
105390
 * @fileoverview added by tsickle
105391
 * @suppress {checkTypes} checked by tsc
105392
 */
105393
/**
105394
 * Visually, a 30px separation between tick marks looks best. This is very subjective but it is
105395
 * the default separation we chose.
105396
 */
105397
var /** @type {?} */ MIN_AUTO_TICK_SEPARATION = 30;
105398
/**
105399
 * The thumb gap size for a disabled slider.
105400
 */
105401
var /** @type {?} */ DISABLED_THUMB_GAP = 7;
105402
/**
105403
 * The thumb gap size for a non-active slider at its minimum value.
105404
 */
105405
var /** @type {?} */ MIN_VALUE_NONACTIVE_THUMB_GAP = 7;
105406
/**
105407
 * The thumb gap size for an active slider at its minimum value.
105408
 */
105409
var /** @type {?} */ MIN_VALUE_ACTIVE_THUMB_GAP = 10;
105410
/**
105411
 * Provider Expression that allows mat-slider to register as a ControlValueAccessor.
105412
 * This allows it to support [(ngModel)] and [formControl].
105413
 */
105414
var /** @type {?} */ MAT_SLIDER_VALUE_ACCESSOR = {
105415
    provide: _angular_forms__WEBPACK_IMPORTED_MODULE_6__["NG_VALUE_ACCESSOR"],
105416
    useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_5__["forwardRef"])(function () { return MatSlider; }),
105417
    multi: true
105418
};
105419
/**
105420
 * A simple change event emitted by the MatSlider component.
105421
 */
105422
var  /**
105423
 * A simple change event emitted by the MatSlider component.
105424
 */
105425
MatSliderChange = /** @class */ (function () {
105426
    function MatSliderChange() {
105427
    }
105428
    return MatSliderChange;
105429
}());
105430
/**
105431
 * \@docs-private
105432
 */
105433
var  /**
105434
 * \@docs-private
105435
 */
105436
MatSliderBase = /** @class */ (function () {
105437
    function MatSliderBase(_elementRef) {
105438
        this._elementRef = _elementRef;
105439
    }
105440
    return MatSliderBase;
105441
}());
105442
var /** @type {?} */ _MatSliderMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_7__["mixinTabIndex"])(Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_7__["mixinColor"])(Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_7__["mixinDisabled"])(MatSliderBase), 'accent'));
105443
/**
105444
 * Allows users to select from a range of values by moving the slider thumb. It is similar in
105445
 * behavior to the native `<input type="range">` element.
105446
 */
105447
var MatSlider = /** @class */ (function (_super) {
105448
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatSlider, _super);
105449
    function MatSlider(elementRef, _focusMonitor, _changeDetectorRef, _dir, tabIndex,
105450
    // @breaking-change 7.0.0 `_animationMode` parameter to be made required.
105451
    _animationMode) {
105452
        var _this = _super.call(this, elementRef) || this;
105453
        _this._focusMonitor = _focusMonitor;
105454
        _this._changeDetectorRef = _changeDetectorRef;
105455
        _this._dir = _dir;
105456
        _this._animationMode = _animationMode;
105457
        _this._invert = false;
105458
        _this._max = 100;
105459
        _this._min = 0;
105460
        _this._step = 1;
105461
        _this._thumbLabel = false;
105462
        _this._tickInterval = 0;
105463
        _this._value = null;
105464
        _this._vertical = false;
105465
        /**
105466
         * Event emitted when the slider value has changed.
105467
         */
105468
        _this.change = new _angular_core__WEBPACK_IMPORTED_MODULE_5__["EventEmitter"]();
105469
        /**
105470
         * Event emitted when the slider thumb moves.
105471
         */
105472
        _this.input = new _angular_core__WEBPACK_IMPORTED_MODULE_5__["EventEmitter"]();
105473
        /**
105474
         * Emits when the raw value of the slider changes. This is here primarily
105475
         * to facilitate the two-way binding for the `value` input.
105476
         * \@docs-private
105477
         */
105478
        _this.valueChange = new _angular_core__WEBPACK_IMPORTED_MODULE_5__["EventEmitter"]();
105479
        /**
105480
         * onTouch function registered via registerOnTouch (ControlValueAccessor).
105481
         */
105482
        _this.onTouched = function () { };
105483
        _this._percent = 0;
105484
        /**
105485
         * Whether or not the thumb is sliding.
105486
         * Used to determine if there should be a transition for the thumb and fill track.
105487
         */
105488
        _this._isSliding = false;
105489
        /**
105490
         * Whether or not the slider is active (clicked or sliding).
105491
         * Used to shrink and grow the thumb as according to the Material Design spec.
105492
         */
105493
        _this._isActive = false;
105494
        /**
105495
         * The size of a tick interval as a percentage of the size of the track.
105496
         */
105497
        _this._tickIntervalPercent = 0;
105498
        /**
105499
         * The dimensions of the slider.
105500
         */
105501
        _this._sliderDimensions = null;
105502
        _this._controlValueAccessorChangeFn = function () { };
105503
        /**
105504
         * Subscription to the Directionality change EventEmitter.
105505
         */
105506
        _this._dirChangeSubscription = rxjs__WEBPACK_IMPORTED_MODULE_8__["Subscription"].EMPTY;
105507
        _this.tabIndex = parseInt(tabIndex) || 0;
105508
        return _this;
105509
    }
105510
    Object.defineProperty(MatSlider.prototype, "invert", {
105511
        get: /**
105512
         * Whether the slider is inverted.
105513
         * @return {?}
105514
         */
105515
        function () { return this._invert; },
105516
        set: /**
105517
         * @param {?} value
105518
         * @return {?}
105519
         */
105520
        function (value) {
105521
            this._invert = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceBooleanProperty"])(value);
105522
        },
105523
        enumerable: true,
105524
        configurable: true
105525
    });
105526
    Object.defineProperty(MatSlider.prototype, "max", {
105527
        get: /**
105528
         * The maximum value that the slider can have.
105529
         * @return {?}
105530
         */
105531
        function () { return this._max; },
105532
        set: /**
105533
         * @param {?} v
105534
         * @return {?}
105535
         */
105536
        function (v) {
105537
            this._max = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceNumberProperty"])(v, this._max);
105538
            this._percent = this._calculatePercentage(this._value);
105539
            // Since this also modifies the percentage, we need to let the change detection know.
105540
            this._changeDetectorRef.markForCheck();
105541
        },
105542
        enumerable: true,
105543
        configurable: true
105544
    });
105545
    Object.defineProperty(MatSlider.prototype, "min", {
105546
        get: /**
105547
         * The minimum value that the slider can have.
105548
         * @return {?}
105549
         */
105550
        function () { return this._min; },
105551
        set: /**
105552
         * @param {?} v
105553
         * @return {?}
105554
         */
105555
        function (v) {
105556
            this._min = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceNumberProperty"])(v, this._min);
105557
            // If the value wasn't explicitly set by the user, set it to the min.
105558
            if (this._value === null) {
105559
                this.value = this._min;
105560
            }
105561
            this._percent = this._calculatePercentage(this._value);
105562
            // Since this also modifies the percentage, we need to let the change detection know.
105563
            this._changeDetectorRef.markForCheck();
105564
        },
105565
        enumerable: true,
105566
        configurable: true
105567
    });
105568
    Object.defineProperty(MatSlider.prototype, "step", {
105569
        get: /**
105570
         * The values at which the thumb will snap.
105571
         * @return {?}
105572
         */
105573
        function () { return this._step; },
105574
        set: /**
105575
         * @param {?} v
105576
         * @return {?}
105577
         */
105578
        function (v) {
105579
            this._step = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceNumberProperty"])(v, this._step);
105580
            if (this._step % 1 !== 0) {
105581
                this._roundToDecimal = /** @type {?} */ ((this._step.toString().split('.').pop())).length;
105582
            }
105583
            // Since this could modify the label, we need to notify the change detection.
105584
            this._changeDetectorRef.markForCheck();
105585
        },
105586
        enumerable: true,
105587
        configurable: true
105588
    });
105589
    Object.defineProperty(MatSlider.prototype, "thumbLabel", {
105590
        get: /**
105591
         * Whether or not to show the thumb label.
105592
         * @return {?}
105593
         */
105594
        function () { return this._thumbLabel; },
105595
        set: /**
105596
         * @param {?} value
105597
         * @return {?}
105598
         */
105599
        function (value) { this._thumbLabel = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceBooleanProperty"])(value); },
105600
        enumerable: true,
105601
        configurable: true
105602
    });
105603
    Object.defineProperty(MatSlider.prototype, "tickInterval", {
105604
        get: /**
105605
         * How often to show ticks. Relative to the step so that a tick always appears on a step.
105606
         * Ex: Tick interval of 4 with a step of 3 will draw a tick every 4 steps (every 12 values).
105607
         * @return {?}
105608
         */
105609
        function () { return this._tickInterval; },
105610
        set: /**
105611
         * @param {?} value
105612
         * @return {?}
105613
         */
105614
        function (value) {
105615
            if (value === 'auto') {
105616
                this._tickInterval = 'auto';
105617
            }
105618
            else if (typeof value === 'number' || typeof value === 'string') {
105619
                this._tickInterval = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceNumberProperty"])(value, /** @type {?} */ (this._tickInterval));
105620
            }
105621
            else {
105622
                this._tickInterval = 0;
105623
            }
105624
        },
105625
        enumerable: true,
105626
        configurable: true
105627
    });
105628
    Object.defineProperty(MatSlider.prototype, "value", {
105629
        get: /**
105630
         * Value of the slider.
105631
         * @return {?}
105632
         */
105633
        function () {
105634
            // If the value needs to be read and it is still uninitialized, initialize it to the min.
105635
            if (this._value === null) {
105636
                this.value = this._min;
105637
            }
105638
            return this._value;
105639
        },
105640
        set: /**
105641
         * @param {?} v
105642
         * @return {?}
105643
         */
105644
        function (v) {
105645
            if (v !== this._value) {
105646
                var /** @type {?} */ value = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceNumberProperty"])(v);
105647
                // While incrementing by a decimal we can end up with values like 33.300000000000004.
105648
                // Truncate it to ensure that it matches the label and to make it easier to work with.
105649
                if (this._roundToDecimal) {
105650
                    value = parseFloat(value.toFixed(this._roundToDecimal));
105651
                }
105652
                this._value = value;
105653
                this._percent = this._calculatePercentage(this._value);
105654
                // Since this also modifies the percentage, we need to let the change detection know.
105655
                this._changeDetectorRef.markForCheck();
105656
            }
105657
        },
105658
        enumerable: true,
105659
        configurable: true
105660
    });
105661
    Object.defineProperty(MatSlider.prototype, "vertical", {
105662
        get: /**
105663
         * Whether the slider is vertical.
105664
         * @return {?}
105665
         */
105666
        function () { return this._vertical; },
105667
        set: /**
105668
         * @param {?} value
105669
         * @return {?}
105670
         */
105671
        function (value) {
105672
            this._vertical = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__["coerceBooleanProperty"])(value);
105673
        },
105674
        enumerable: true,
105675
        configurable: true
105676
    });
105677
    Object.defineProperty(MatSlider.prototype, "displayValue", {
105678
        /** The value to be used for display purposes. */
105679
        get: /**
105680
         * The value to be used for display purposes.
105681
         * @return {?}
105682
         */
105683
        function () {
105684
            if (this.displayWith) {
105685
                return this.displayWith(this.value);
105686
            }
105687
            // Note that this could be improved further by rounding something like 0.999 to 1 or
105688
            // 0.899 to 0.9, however it is very performance sensitive, because it gets called on
105689
            // every change detection cycle.
105690
            if (this._roundToDecimal && this.value && this.value % 1 !== 0) {
105691
                return this.value.toFixed(this._roundToDecimal);
105692
            }
105693
            return this.value || 0;
105694
        },
105695
        enumerable: true,
105696
        configurable: true
105697
    });
105698
    /** set focus to the host element */
105699
    /**
105700
     * set focus to the host element
105701
     * @return {?}
105702
     */
105703
    MatSlider.prototype.focus = /**
105704
     * set focus to the host element
105705
     * @return {?}
105706
     */
105707
    function () {
105708
        this._focusHostElement();
105709
    };
105710
    /** blur the host element */
105711
    /**
105712
     * blur the host element
105713
     * @return {?}
105714
     */
105715
    MatSlider.prototype.blur = /**
105716
     * blur the host element
105717
     * @return {?}
105718
     */
105719
    function () {
105720
        this._blurHostElement();
105721
    };
105722
    Object.defineProperty(MatSlider.prototype, "percent", {
105723
        /** The percentage of the slider that coincides with the value. */
105724
        get: /**
105725
         * The percentage of the slider that coincides with the value.
105726
         * @return {?}
105727
         */
105728
        function () { return this._clamp(this._percent); },
105729
        enumerable: true,
105730
        configurable: true
105731
    });
105732
    Object.defineProperty(MatSlider.prototype, "_invertAxis", {
105733
        /**
105734
         * Whether the axis of the slider is inverted.
105735
         * (i.e. whether moving the thumb in the positive x or y direction decreases the slider's value).
105736
         */
105737
        get: /**
105738
         * Whether the axis of the slider is inverted.
105739
         * (i.e. whether moving the thumb in the positive x or y direction decreases the slider's value).
105740
         * @return {?}
105741
         */
105742
        function () {
105743
            // Standard non-inverted mode for a vertical slider should be dragging the thumb from bottom to
105744
            // top. However from a y-axis standpoint this is inverted.
105745
            return this.vertical ? !this.invert : this.invert;
105746
        },
105747
        enumerable: true,
105748
        configurable: true
105749
    });
105750
    Object.defineProperty(MatSlider.prototype, "_isMinValue", {
105751
        /** Whether the slider is at its minimum value. */
105752
        get: /**
105753
         * Whether the slider is at its minimum value.
105754
         * @return {?}
105755
         */
105756
        function () {
105757
            return this.percent === 0;
105758
        },
105759
        enumerable: true,
105760
        configurable: true
105761
    });
105762
    Object.defineProperty(MatSlider.prototype, "_thumbGap", {
105763
        /**
105764
         * The amount of space to leave between the slider thumb and the track fill & track background
105765
         * elements.
105766
         */
105767
        get: /**
105768
         * The amount of space to leave between the slider thumb and the track fill & track background
105769
         * elements.
105770
         * @return {?}
105771
         */
105772
        function () {
105773
            if (this.disabled) {
105774
                return DISABLED_THUMB_GAP;
105775
            }
105776
            if (this._isMinValue && !this.thumbLabel) {
105777
                return this._isActive ? MIN_VALUE_ACTIVE_THUMB_GAP : MIN_VALUE_NONACTIVE_THUMB_GAP;
105778
            }
105779
            return 0;
105780
        },
105781
        enumerable: true,
105782
        configurable: true
105783
    });
105784
    Object.defineProperty(MatSlider.prototype, "_trackBackgroundStyles", {
105785
        /** CSS styles for the track background element. */
105786
        get: /**
105787
         * CSS styles for the track background element.
105788
         * @return {?}
105789
         */
105790
        function () {
105791
            var /** @type {?} */ axis = this.vertical ? 'Y' : 'X';
105792
            var /** @type {?} */ scale = this.vertical ? "1, " + (1 - this.percent) + ", 1" : 1 - this.percent + ", 1, 1";
105793
            var /** @type {?} */ sign = this._invertMouseCoords ? '-' : '';
105794
            return {
105795
                // scale3d avoids some rendering issues in Chrome. See #12071.
105796
                transform: "translate" + axis + "(" + sign + this._thumbGap + "px) scale3d(" + scale + ")"
105797
            };
105798
        },
105799
        enumerable: true,
105800
        configurable: true
105801
    });
105802
    Object.defineProperty(MatSlider.prototype, "_trackFillStyles", {
105803
        /** CSS styles for the track fill element. */
105804
        get: /**
105805
         * CSS styles for the track fill element.
105806
         * @return {?}
105807
         */
105808
        function () {
105809
            var /** @type {?} */ axis = this.vertical ? 'Y' : 'X';
105810
            var /** @type {?} */ scale = this.vertical ? "1, " + this.percent + ", 1" : this.percent + ", 1, 1";
105811
            var /** @type {?} */ sign = this._invertMouseCoords ? '' : '-';
105812
            return {
105813
                // scale3d avoids some rendering issues in Chrome. See #12071.
105814
                transform: "translate" + axis + "(" + sign + this._thumbGap + "px) scale3d(" + scale + ")"
105815
            };
105816
        },
105817
        enumerable: true,
105818
        configurable: true
105819
    });
105820
    Object.defineProperty(MatSlider.prototype, "_ticksContainerStyles", {
105821
        /** CSS styles for the ticks container element. */
105822
        get: /**
105823
         * CSS styles for the ticks container element.
105824
         * @return {?}
105825
         */
105826
        function () {
105827
            var /** @type {?} */ axis = this.vertical ? 'Y' : 'X';
105828
            // For a horizontal slider in RTL languages we push the ticks container off the left edge
105829
            // instead of the right edge to avoid causing a horizontal scrollbar to appear.
105830
            var /** @type {?} */ sign = !this.vertical && this._direction == 'rtl' ? '' : '-';
105831
            var /** @type {?} */ offset = this._tickIntervalPercent / 2 * 100;
105832
            return {
105833
                'transform': "translate" + axis + "(" + sign + offset + "%)"
105834
            };
105835
        },
105836
        enumerable: true,
105837
        configurable: true
105838
    });
105839
    Object.defineProperty(MatSlider.prototype, "_ticksStyles", {
105840
        /** CSS styles for the ticks element. */
105841
        get: /**
105842
         * CSS styles for the ticks element.
105843
         * @return {?}
105844
         */
105845
        function () {
105846
            var /** @type {?} */ tickSize = this._tickIntervalPercent * 100;
105847
            var /** @type {?} */ backgroundSize = this.vertical ? "2px " + tickSize + "%" : tickSize + "% 2px";
105848
            var /** @type {?} */ axis = this.vertical ? 'Y' : 'X';
105849
            // Depending on the direction we pushed the ticks container, push the ticks the opposite
105850
            // direction to re-center them but clip off the end edge. In RTL languages we need to flip the
105851
            // ticks 180 degrees so we're really cutting off the end edge abd not the start.
105852
            var /** @type {?} */ sign = !this.vertical && this._direction == 'rtl' ? '-' : '';
105853
            var /** @type {?} */ rotate = !this.vertical && this._direction == 'rtl' ? ' rotate(180deg)' : '';
105854
            var /** @type {?} */ styles = {
105855
                'backgroundSize': backgroundSize,
105856
                // Without translateZ ticks sometimes jitter as the slider moves on Chrome & Firefox.
105857
                'transform': "translateZ(0) translate" + axis + "(" + sign + tickSize / 2 + "%)" + rotate
105858
            };
105859
            if (this._isMinValue && this._thumbGap) {
105860
                var /** @type {?} */ side = this.vertical ?
105861
                    (this._invertAxis ? 'Bottom' : 'Top') :
105862
                    (this._invertAxis ? 'Right' : 'Left');
105863
                styles["padding" + side] = this._thumbGap + "px";
105864
            }
105865
            return styles;
105866
        },
105867
        enumerable: true,
105868
        configurable: true
105869
    });
105870
    Object.defineProperty(MatSlider.prototype, "_thumbContainerStyles", {
105871
        get: /**
105872
         * @return {?}
105873
         */
105874
        function () {
105875
            var /** @type {?} */ axis = this.vertical ? 'Y' : 'X';
105876
            // For a horizontal slider in RTL languages we push the thumb container off the left edge
105877
            // instead of the right edge to avoid causing a horizontal scrollbar to appear.
105878
            var /** @type {?} */ invertOffset = (this._direction == 'rtl' && !this.vertical) ? !this._invertAxis : this._invertAxis;
105879
            var /** @type {?} */ offset = (invertOffset ? this.percent : 1 - this.percent) * 100;
105880
            return {
105881
                'transform': "translate" + axis + "(-" + offset + "%)"
105882
            };
105883
        },
105884
        enumerable: true,
105885
        configurable: true
105886
    });
105887
    Object.defineProperty(MatSlider.prototype, "_invertMouseCoords", {
105888
        get: /**
105889
         * Whether mouse events should be converted to a slider position by calculating their distance
105890
         * from the right or bottom edge of the slider as opposed to the top or left.
105891
         * @return {?}
105892
         */
105893
        function () {
105894
            return (this._direction == 'rtl' && !this.vertical) ? !this._invertAxis : this._invertAxis;
105895
        },
105896
        enumerable: true,
105897
        configurable: true
105898
    });
105899
    Object.defineProperty(MatSlider.prototype, "_direction", {
105900
        get: /**
105901
         * The language direction for this slider element.
105902
         * @return {?}
105903
         */
105904
        function () {
105905
            return (this._dir && this._dir.value == 'rtl') ? 'rtl' : 'ltr';
105906
        },
105907
        enumerable: true,
105908
        configurable: true
105909
    });
105910
    /**
105911
     * @return {?}
105912
     */
105913
    MatSlider.prototype.ngOnInit = /**
105914
     * @return {?}
105915
     */
105916
    function () {
105917
        var _this = this;
105918
        this._focusMonitor
105919
            .monitor(this._elementRef.nativeElement, true)
105920
            .subscribe(function (origin) {
105921
            _this._isActive = !!origin && origin !== 'keyboard';
105922
            _this._changeDetectorRef.detectChanges();
105923
        });
105924
        if (this._dir) {
105925
            this._dirChangeSubscription = this._dir.change.subscribe(function () {
105926
                _this._changeDetectorRef.markForCheck();
105927
            });
105928
        }
105929
    };
105930
    /**
105931
     * @return {?}
105932
     */
105933
    MatSlider.prototype.ngOnDestroy = /**
105934
     * @return {?}
105935
     */
105936
    function () {
105937
        this._focusMonitor.stopMonitoring(this._elementRef.nativeElement);
105938
        this._dirChangeSubscription.unsubscribe();
105939
    };
105940
    /**
105941
     * @return {?}
105942
     */
105943
    MatSlider.prototype._onMouseenter = /**
105944
     * @return {?}
105945
     */
105946
    function () {
105947
        if (this.disabled) {
105948
            return;
105949
        }
105950
        // We save the dimensions of the slider here so we can use them to update the spacing of the
105951
        // ticks and determine where on the slider click and slide events happen.
105952
        this._sliderDimensions = this._getSliderDimensions();
105953
        this._updateTickIntervalPercent();
105954
    };
105955
    /**
105956
     * @param {?} event
105957
     * @return {?}
105958
     */
105959
    MatSlider.prototype._onClick = /**
105960
     * @param {?} event
105961
     * @return {?}
105962
     */
105963
    function (event) {
105964
        if (this.disabled) {
105965
            return;
105966
        }
105967
        var /** @type {?} */ oldValue = this.value;
105968
        this._isSliding = false;
105969
        this._focusHostElement();
105970
        this._updateValueFromPosition({ x: event.clientX, y: event.clientY });
105971
        // Emit a change and input event if the value changed.
105972
        if (oldValue != this.value) {
105973
            this._emitInputEvent();
105974
            this._emitChangeEvent();
105975
        }
105976
    };
105977
    /**
105978
     * @param {?} event
105979
     * @return {?}
105980
     */
105981
    MatSlider.prototype._onSlide = /**
105982
     * @param {?} event
105983
     * @return {?}
105984
     */
105985
    function (event) {
105986
        if (this.disabled) {
105987
            return;
105988
        }
105989
        // The slide start event sometimes fails to fire on iOS, so if we're not already in the sliding
105990
        // state, call the slide start handler manually.
105991
        if (!this._isSliding) {
105992
            this._onSlideStart(null);
105993
        }
105994
        // Prevent the slide from selecting anything else.
105995
        event.preventDefault();
105996
        var /** @type {?} */ oldValue = this.value;
105997
        this._updateValueFromPosition({ x: event.center.x, y: event.center.y });
105998
        // Native range elements always emit `input` events when the value changed while sliding.
105999
        if (oldValue != this.value) {
106000
            this._emitInputEvent();
106001
        }
106002
    };
106003
    /**
106004
     * @param {?} event
106005
     * @return {?}
106006
     */
106007
    MatSlider.prototype._onSlideStart = /**
106008
     * @param {?} event
106009
     * @return {?}
106010
     */
106011
    function (event) {
106012
        if (this.disabled || this._isSliding) {
106013
            return;
106014
        }
106015
        // Simulate mouseenter in case this is a mobile device.
106016
        this._onMouseenter();
106017
        this._isSliding = true;
106018
        this._focusHostElement();
106019
        this._valueOnSlideStart = this.value;
106020
        if (event) {
106021
            this._updateValueFromPosition({ x: event.center.x, y: event.center.y });
106022
            event.preventDefault();
106023
        }
106024
    };
106025
    /**
106026
     * @return {?}
106027
     */
106028
    MatSlider.prototype._onSlideEnd = /**
106029
     * @return {?}
106030
     */
106031
    function () {
106032
        this._isSliding = false;
106033
        if (this._valueOnSlideStart != this.value && !this.disabled) {
106034
            this._emitChangeEvent();
106035
        }
106036
        this._valueOnSlideStart = null;
106037
    };
106038
    /**
106039
     * @return {?}
106040
     */
106041
    MatSlider.prototype._onFocus = /**
106042
     * @return {?}
106043
     */
106044
    function () {
106045
        // We save the dimensions of the slider here so we can use them to update the spacing of the
106046
        // ticks and determine where on the slider click and slide events happen.
106047
        this._sliderDimensions = this._getSliderDimensions();
106048
        this._updateTickIntervalPercent();
106049
    };
106050
    /**
106051
     * @return {?}
106052
     */
106053
    MatSlider.prototype._onBlur = /**
106054
     * @return {?}
106055
     */
106056
    function () {
106057
        this.onTouched();
106058
    };
106059
    /**
106060
     * @param {?} event
106061
     * @return {?}
106062
     */
106063
    MatSlider.prototype._onKeydown = /**
106064
     * @param {?} event
106065
     * @return {?}
106066
     */
106067
    function (event) {
106068
        if (this.disabled) {
106069
            return;
106070
        }
106071
        var /** @type {?} */ oldValue = this.value;
106072
        switch (event.keyCode) {
106073
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_4__["PAGE_UP"]:
106074
                this._increment(10);
106075
                break;
106076
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_4__["PAGE_DOWN"]:
106077
                this._increment(-10);
106078
                break;
106079
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_4__["END"]:
106080
                this.value = this.max;
106081
                break;
106082
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_4__["HOME"]:
106083
                this.value = this.min;
106084
                break;
106085
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_4__["LEFT_ARROW"]:
106086
                // NOTE: For a sighted user it would make more sense that when they press an arrow key on an
106087
                // inverted slider the thumb moves in that direction. However for a blind user, nothing
106088
                // about the slider indicates that it is inverted. They will expect left to be decrement,
106089
                // regardless of how it appears on the screen. For speakers ofRTL languages, they probably
106090
                // expect left to mean increment. Therefore we flip the meaning of the side arrow keys for
106091
                // RTL. For inverted sliders we prefer a good a11y experience to having it "look right" for
106092
                // sighted users, therefore we do not swap the meaning.
106093
                this._increment(this._direction == 'rtl' ? 1 : -1);
106094
                break;
106095
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_4__["UP_ARROW"]:
106096
                this._increment(1);
106097
                break;
106098
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_4__["RIGHT_ARROW"]:
106099
                // See comment on LEFT_ARROW about the conditions under which we flip the meaning.
106100
                this._increment(this._direction == 'rtl' ? -1 : 1);
106101
                break;
106102
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_4__["DOWN_ARROW"]:
106103
                this._increment(-1);
106104
                break;
106105
            default:
106106
                // Return if the key is not one that we explicitly handle to avoid calling preventDefault on
106107
                // it.
106108
                return;
106109
        }
106110
        if (oldValue != this.value) {
106111
            this._emitInputEvent();
106112
            this._emitChangeEvent();
106113
        }
106114
        this._isSliding = true;
106115
        event.preventDefault();
106116
    };
106117
    /**
106118
     * @return {?}
106119
     */
106120
    MatSlider.prototype._onKeyup = /**
106121
     * @return {?}
106122
     */
106123
    function () {
106124
        this._isSliding = false;
106125
    };
106126
    /**
106127
     * Increments the slider by the given number of steps (negative number decrements).
106128
     * @param {?} numSteps
106129
     * @return {?}
106130
     */
106131
    MatSlider.prototype._increment = /**
106132
     * Increments the slider by the given number of steps (negative number decrements).
106133
     * @param {?} numSteps
106134
     * @return {?}
106135
     */
106136
    function (numSteps) {
106137
        this.value = this._clamp((this.value || 0) + this.step * numSteps, this.min, this.max);
106138
    };
106139
    /**
106140
     * Calculate the new value from the new physical location. The value will always be snapped.
106141
     * @param {?} pos
106142
     * @return {?}
106143
     */
106144
    MatSlider.prototype._updateValueFromPosition = /**
106145
     * Calculate the new value from the new physical location. The value will always be snapped.
106146
     * @param {?} pos
106147
     * @return {?}
106148
     */
106149
    function (pos) {
106150
        if (!this._sliderDimensions) {
106151
            return;
106152
        }
106153
        var /** @type {?} */ offset = this.vertical ? this._sliderDimensions.top : this._sliderDimensions.left;
106154
        var /** @type {?} */ size = this.vertical ? this._sliderDimensions.height : this._sliderDimensions.width;
106155
        var /** @type {?} */ posComponent = this.vertical ? pos.y : pos.x;
106156
        // The exact value is calculated from the event and used to find the closest snap value.
106157
        var /** @type {?} */ percent = this._clamp((posComponent - offset) / size);
106158
        if (this._invertMouseCoords) {
106159
            percent = 1 - percent;
106160
        }
106161
        // Since the steps may not divide cleanly into the max value, if the user
106162
        // slid to 0 or 100 percent, we jump to the min/max value. This approach
106163
        // is slightly more intuitive than using `Math.ceil` below, because it
106164
        // follows the user's pointer closer.
106165
        if (percent === 0) {
106166
            this.value = this.min;
106167
        }
106168
        else if (percent === 1) {
106169
            this.value = this.max;
106170
        }
106171
        else {
106172
            var /** @type {?} */ exactValue = this._calculateValue(percent);
106173
            // This calculation finds the closest step by finding the closest
106174
            // whole number divisible by the step relative to the min.
106175
            var /** @type {?} */ closestValue = Math.round((exactValue - this.min) / this.step) * this.step + this.min;
106176
            // The value needs to snap to the min and max.
106177
            this.value = this._clamp(closestValue, this.min, this.max);
106178
        }
106179
    };
106180
    /**
106181
     * Emits a change event if the current value is different from the last emitted value.
106182
     * @return {?}
106183
     */
106184
    MatSlider.prototype._emitChangeEvent = /**
106185
     * Emits a change event if the current value is different from the last emitted value.
106186
     * @return {?}
106187
     */
106188
    function () {
106189
        this._controlValueAccessorChangeFn(this.value);
106190
        this.valueChange.emit(this.value);
106191
        this.change.emit(this._createChangeEvent());
106192
    };
106193
    /**
106194
     * Emits an input event when the current value is different from the last emitted value.
106195
     * @return {?}
106196
     */
106197
    MatSlider.prototype._emitInputEvent = /**
106198
     * Emits an input event when the current value is different from the last emitted value.
106199
     * @return {?}
106200
     */
106201
    function () {
106202
        this.input.emit(this._createChangeEvent());
106203
    };
106204
    /**
106205
     * Updates the amount of space between ticks as a percentage of the width of the slider.
106206
     * @return {?}
106207
     */
106208
    MatSlider.prototype._updateTickIntervalPercent = /**
106209
     * Updates the amount of space between ticks as a percentage of the width of the slider.
106210
     * @return {?}
106211
     */
106212
    function () {
106213
        if (!this.tickInterval || !this._sliderDimensions) {
106214
            return;
106215
        }
106216
        if (this.tickInterval == 'auto') {
106217
            var /** @type {?} */ trackSize = this.vertical ? this._sliderDimensions.height : this._sliderDimensions.width;
106218
            var /** @type {?} */ pixelsPerStep = trackSize * this.step / (this.max - this.min);
106219
            var /** @type {?} */ stepsPerTick = Math.ceil(MIN_AUTO_TICK_SEPARATION / pixelsPerStep);
106220
            var /** @type {?} */ pixelsPerTick = stepsPerTick * this.step;
106221
            this._tickIntervalPercent = pixelsPerTick / trackSize;
106222
        }
106223
        else {
106224
            this._tickIntervalPercent = this.tickInterval * this.step / (this.max - this.min);
106225
        }
106226
    };
106227
    /**
106228
     * Creates a slider change object from the specified value.
106229
     * @param {?=} value
106230
     * @return {?}
106231
     */
106232
    MatSlider.prototype._createChangeEvent = /**
106233
     * Creates a slider change object from the specified value.
106234
     * @param {?=} value
106235
     * @return {?}
106236
     */
106237
    function (value) {
106238
        if (value === void 0) { value = this.value; }
106239
        var /** @type {?} */ event = new MatSliderChange();
106240
        event.source = this;
106241
        event.value = value;
106242
        return event;
106243
    };
106244
    /**
106245
     * Calculates the percentage of the slider that a value is.
106246
     * @param {?} value
106247
     * @return {?}
106248
     */
106249
    MatSlider.prototype._calculatePercentage = /**
106250
     * Calculates the percentage of the slider that a value is.
106251
     * @param {?} value
106252
     * @return {?}
106253
     */
106254
    function (value) {
106255
        return ((value || 0) - this.min) / (this.max - this.min);
106256
    };
106257
    /**
106258
     * Calculates the value a percentage of the slider corresponds to.
106259
     * @param {?} percentage
106260
     * @return {?}
106261
     */
106262
    MatSlider.prototype._calculateValue = /**
106263
     * Calculates the value a percentage of the slider corresponds to.
106264
     * @param {?} percentage
106265
     * @return {?}
106266
     */
106267
    function (percentage) {
106268
        return this.min + percentage * (this.max - this.min);
106269
    };
106270
    /**
106271
     * Return a number between two numbers.
106272
     * @param {?} value
106273
     * @param {?=} min
106274
     * @param {?=} max
106275
     * @return {?}
106276
     */
106277
    MatSlider.prototype._clamp = /**
106278
     * Return a number between two numbers.
106279
     * @param {?} value
106280
     * @param {?=} min
106281
     * @param {?=} max
106282
     * @return {?}
106283
     */
106284
    function (value, min, max) {
106285
        if (min === void 0) { min = 0; }
106286
        if (max === void 0) { max = 1; }
106287
        return Math.max(min, Math.min(value, max));
106288
    };
106289
    /**
106290
     * Get the bounding client rect of the slider track element.
106291
     * The track is used rather than the native element to ignore the extra space that the thumb can
106292
     * take up.
106293
     * @return {?}
106294
     */
106295
    MatSlider.prototype._getSliderDimensions = /**
106296
     * Get the bounding client rect of the slider track element.
106297
     * The track is used rather than the native element to ignore the extra space that the thumb can
106298
     * take up.
106299
     * @return {?}
106300
     */
106301
    function () {
106302
        return this._sliderWrapper ? this._sliderWrapper.nativeElement.getBoundingClientRect() : null;
106303
    };
106304
    /**
106305
     * Focuses the native element.
106306
     * Currently only used to allow a blur event to fire but will be used with keyboard input later.
106307
     * @return {?}
106308
     */
106309
    MatSlider.prototype._focusHostElement = /**
106310
     * Focuses the native element.
106311
     * Currently only used to allow a blur event to fire but will be used with keyboard input later.
106312
     * @return {?}
106313
     */
106314
    function () {
106315
        this._elementRef.nativeElement.focus();
106316
    };
106317
    /**
106318
     * Blurs the native element.
106319
     * @return {?}
106320
     */
106321
    MatSlider.prototype._blurHostElement = /**
106322
     * Blurs the native element.
106323
     * @return {?}
106324
     */
106325
    function () {
106326
        this._elementRef.nativeElement.blur();
106327
    };
106328
    /**
106329
     * Sets the model value. Implemented as part of ControlValueAccessor.
106330
     * @param value
106331
     */
106332
    /**
106333
     * Sets the model value. Implemented as part of ControlValueAccessor.
106334
     * @param {?} value
106335
     * @return {?}
106336
     */
106337
    MatSlider.prototype.writeValue = /**
106338
     * Sets the model value. Implemented as part of ControlValueAccessor.
106339
     * @param {?} value
106340
     * @return {?}
106341
     */
106342
    function (value) {
106343
        this.value = value;
106344
    };
106345
    /**
106346
     * Registers a callback to be triggered when the value has changed.
106347
     * Implemented as part of ControlValueAccessor.
106348
     * @param fn Callback to be registered.
106349
     */
106350
    /**
106351
     * Registers a callback to be triggered when the value has changed.
106352
     * Implemented as part of ControlValueAccessor.
106353
     * @param {?} fn Callback to be registered.
106354
     * @return {?}
106355
     */
106356
    MatSlider.prototype.registerOnChange = /**
106357
     * Registers a callback to be triggered when the value has changed.
106358
     * Implemented as part of ControlValueAccessor.
106359
     * @param {?} fn Callback to be registered.
106360
     * @return {?}
106361
     */
106362
    function (fn) {
106363
        this._controlValueAccessorChangeFn = fn;
106364
    };
106365
    /**
106366
     * Registers a callback to be triggered when the component is touched.
106367
     * Implemented as part of ControlValueAccessor.
106368
     * @param fn Callback to be registered.
106369
     */
106370
    /**
106371
     * Registers a callback to be triggered when the component is touched.
106372
     * Implemented as part of ControlValueAccessor.
106373
     * @param {?} fn Callback to be registered.
106374
     * @return {?}
106375
     */
106376
    MatSlider.prototype.registerOnTouched = /**
106377
     * Registers a callback to be triggered when the component is touched.
106378
     * Implemented as part of ControlValueAccessor.
106379
     * @param {?} fn Callback to be registered.
106380
     * @return {?}
106381
     */
106382
    function (fn) {
106383
        this.onTouched = fn;
106384
    };
106385
    /**
106386
     * Sets whether the component should be disabled.
106387
     * Implemented as part of ControlValueAccessor.
106388
     * @param isDisabled
106389
     */
106390
    /**
106391
     * Sets whether the component should be disabled.
106392
     * Implemented as part of ControlValueAccessor.
106393
     * @param {?} isDisabled
106394
     * @return {?}
106395
     */
106396
    MatSlider.prototype.setDisabledState = /**
106397
     * Sets whether the component should be disabled.
106398
     * Implemented as part of ControlValueAccessor.
106399
     * @param {?} isDisabled
106400
     * @return {?}
106401
     */
106402
    function (isDisabled) {
106403
        this.disabled = isDisabled;
106404
    };
106405
    MatSlider.decorators = [
106406
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["Component"], args: [{selector: 'mat-slider',
106407
                    exportAs: 'matSlider',
106408
                    providers: [MAT_SLIDER_VALUE_ACCESSOR],
106409
                    host: {
106410
                        '(focus)': '_onFocus()',
106411
                        '(blur)': '_onBlur()',
106412
                        '(click)': '_onClick($event)',
106413
                        '(keydown)': '_onKeydown($event)',
106414
                        '(keyup)': '_onKeyup()',
106415
                        '(mouseenter)': '_onMouseenter()',
106416
                        '(slide)': '_onSlide($event)',
106417
                        '(slideend)': '_onSlideEnd()',
106418
                        '(slidestart)': '_onSlideStart($event)',
106419
                        'class': 'mat-slider',
106420
                        'role': 'slider',
106421
                        '[tabIndex]': 'tabIndex',
106422
                        '[attr.aria-disabled]': 'disabled',
106423
                        '[attr.aria-valuemax]': 'max',
106424
                        '[attr.aria-valuemin]': 'min',
106425
                        '[attr.aria-valuenow]': 'value',
106426
                        '[attr.aria-orientation]': 'vertical ? "vertical" : "horizontal"',
106427
                        '[class.mat-slider-disabled]': 'disabled',
106428
                        '[class.mat-slider-has-ticks]': 'tickInterval',
106429
                        '[class.mat-slider-horizontal]': '!vertical',
106430
                        '[class.mat-slider-axis-inverted]': '_invertAxis',
106431
                        '[class.mat-slider-sliding]': '_isSliding',
106432
                        '[class.mat-slider-thumb-label-showing]': 'thumbLabel',
106433
                        '[class.mat-slider-vertical]': 'vertical',
106434
                        '[class.mat-slider-min-value]': '_isMinValue',
106435
                        '[class.mat-slider-hide-last-tick]': 'disabled || _isMinValue && _thumbGap && _invertAxis',
106436
                        '[class._mat-animation-noopable]': '_animationMode === "NoopAnimations"',
106437
                    },
106438
                    template: "<div class=\"mat-slider-wrapper\" #sliderWrapper><div class=\"mat-slider-track-wrapper\"><div class=\"mat-slider-track-background\" [ngStyle]=\"_trackBackgroundStyles\"></div><div class=\"mat-slider-track-fill\" [ngStyle]=\"_trackFillStyles\"></div></div><div class=\"mat-slider-ticks-container\" [ngStyle]=\"_ticksContainerStyles\"><div class=\"mat-slider-ticks\" [ngStyle]=\"_ticksStyles\"></div></div><div class=\"mat-slider-thumb-container\" [ngStyle]=\"_thumbContainerStyles\"><div class=\"mat-slider-focus-ring\"></div><div class=\"mat-slider-thumb\"></div><div class=\"mat-slider-thumb-label\"><span class=\"mat-slider-thumb-label-text\">{{displayValue}}</span></div></div></div>",
106439
                    styles: [".mat-slider{display:inline-block;position:relative;box-sizing:border-box;padding:8px;outline:0;vertical-align:middle}.mat-slider-wrapper{position:absolute}.mat-slider-track-wrapper{position:absolute;top:0;left:0;overflow:hidden}.mat-slider-track-fill{position:absolute;transform-origin:0 0;transition:transform .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-track-background{position:absolute;transform-origin:100% 100%;transition:transform .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-ticks-container{position:absolute;left:0;top:0;overflow:hidden}.mat-slider-ticks{background-repeat:repeat;background-clip:content-box;box-sizing:border-box;opacity:0;transition:opacity .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-thumb-container{position:absolute;z-index:1;transition:transform .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-focus-ring{position:absolute;width:30px;height:30px;border-radius:50%;transform:scale(0);opacity:0;transition:transform .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1),opacity .4s cubic-bezier(.25,.8,.25,1)}.cdk-keyboard-focused .mat-slider-focus-ring,.cdk-program-focused .mat-slider-focus-ring{transform:scale(1);opacity:1}.mat-slider:not(.mat-slider-disabled) .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled) .mat-slider-thumb-label{cursor:-webkit-grab;cursor:grab}.mat-slider-sliding:not(.mat-slider-disabled) .mat-slider-thumb,.mat-slider-sliding:not(.mat-slider-disabled) .mat-slider-thumb-label,.mat-slider:not(.mat-slider-disabled) .mat-slider-thumb-label:active,.mat-slider:not(.mat-slider-disabled) .mat-slider-thumb:active{cursor:-webkit-grabbing;cursor:grabbing}.mat-slider-thumb{position:absolute;right:-10px;bottom:-10px;box-sizing:border-box;width:20px;height:20px;border:3px solid transparent;border-radius:50%;transform:scale(.7);transition:transform .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1),border-color .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-thumb-label{display:none;align-items:center;justify-content:center;position:absolute;width:28px;height:28px;border-radius:50%;transition:transform .4s cubic-bezier(.25,.8,.25,1),border-radius .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-thumb-label-text{z-index:1;opacity:0;transition:opacity .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-sliding .mat-slider-thumb-container,.mat-slider-sliding .mat-slider-track-background,.mat-slider-sliding .mat-slider-track-fill{transition-duration:0s}.mat-slider-has-ticks .mat-slider-wrapper::after{content:'';position:absolute;border-width:0;border-style:solid;opacity:0;transition:opacity .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after,.mat-slider-has-ticks:hover:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after{opacity:1}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-disabled) .mat-slider-ticks,.mat-slider-has-ticks:hover:not(.mat-slider-disabled) .mat-slider-ticks{opacity:1}.mat-slider-thumb-label-showing .mat-slider-focus-ring{transform:scale(0);opacity:0}.mat-slider-thumb-label-showing .mat-slider-thumb-label{display:flex}.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:100% 100%}.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:0 0}.mat-slider:not(.mat-slider-disabled).cdk-focused.mat-slider-thumb-label-showing .mat-slider-thumb{transform:scale(0)}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label{border-radius:50% 50% 0}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label-text{opacity:1}.mat-slider:not(.mat-slider-disabled).cdk-mouse-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-program-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-touch-focused .mat-slider-thumb{border-width:2px;transform:scale(1)}.mat-slider-disabled .mat-slider-focus-ring{transform:scale(0);opacity:0}.mat-slider-disabled .mat-slider-thumb{border-width:4px;transform:scale(.5)}.mat-slider-disabled .mat-slider-thumb-label{display:none}.mat-slider-horizontal{height:48px;min-width:128px}.mat-slider-horizontal .mat-slider-wrapper{height:2px;top:23px;left:8px;right:8px}.mat-slider-horizontal .mat-slider-wrapper::after{height:2px;border-left-width:2px;right:0;top:0}.mat-slider-horizontal .mat-slider-track-wrapper{height:2px;width:100%}.mat-slider-horizontal .mat-slider-track-fill{height:2px;width:100%;transform:scaleX(0)}.mat-slider-horizontal .mat-slider-track-background{height:2px;width:100%;transform:scaleX(1)}.mat-slider-horizontal .mat-slider-ticks-container{height:2px;width:100%}@media screen and (-ms-high-contrast:active){.mat-slider-horizontal .mat-slider-ticks-container{height:0;outline:solid 2px;top:1px}}.mat-slider-horizontal .mat-slider-ticks{height:2px;width:100%}.mat-slider-horizontal .mat-slider-thumb-container{width:100%;height:0;top:50%}.mat-slider-horizontal .mat-slider-focus-ring{top:-15px;right:-15px}.mat-slider-horizontal .mat-slider-thumb-label{right:-14px;top:-40px;transform:translateY(26px) scale(.01) rotate(45deg)}.mat-slider-horizontal .mat-slider-thumb-label-text{transform:rotate(-45deg)}.mat-slider-horizontal.cdk-focused .mat-slider-thumb-label{transform:rotate(45deg)}.mat-slider-vertical{width:48px;min-height:128px}.mat-slider-vertical .mat-slider-wrapper{width:2px;top:8px;bottom:8px;left:23px}.mat-slider-vertical .mat-slider-wrapper::after{width:2px;border-top-width:2px;bottom:0;left:0}.mat-slider-vertical .mat-slider-track-wrapper{height:100%;width:2px}.mat-slider-vertical .mat-slider-track-fill{height:100%;width:2px;transform:scaleY(0)}.mat-slider-vertical .mat-slider-track-background{height:100%;width:2px;transform:scaleY(1)}.mat-slider-vertical .mat-slider-ticks-container{width:2px;height:100%}@media screen and (-ms-high-contrast:active){.mat-slider-vertical .mat-slider-ticks-container{width:0;outline:solid 2px;left:1px}}.mat-slider-vertical .mat-slider-focus-ring{bottom:-15px;left:-15px}.mat-slider-vertical .mat-slider-ticks{width:2px;height:100%}.mat-slider-vertical .mat-slider-thumb-container{height:100%;width:0;left:50%}.mat-slider-vertical .mat-slider-thumb{-webkit-backface-visibility:hidden;backface-visibility:hidden}.mat-slider-vertical .mat-slider-thumb-label{bottom:-14px;left:-40px;transform:translateX(26px) scale(.01) rotate(-45deg)}.mat-slider-vertical .mat-slider-thumb-label-text{transform:rotate(45deg)}.mat-slider-vertical.cdk-focused .mat-slider-thumb-label{transform:rotate(-45deg)}[dir=rtl] .mat-slider-wrapper::after{left:0;right:auto}[dir=rtl] .mat-slider-horizontal .mat-slider-track-fill{transform-origin:100% 100%}[dir=rtl] .mat-slider-horizontal .mat-slider-track-background{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:100% 100%}.mat-slider._mat-animation-noopable .mat-slider-focus-ring,.mat-slider._mat-animation-noopable .mat-slider-has-ticks .mat-slider-wrapper::after,.mat-slider._mat-animation-noopable .mat-slider-thumb,.mat-slider._mat-animation-noopable .mat-slider-thumb-container,.mat-slider._mat-animation-noopable .mat-slider-thumb-label,.mat-slider._mat-animation-noopable .mat-slider-thumb-label-text,.mat-slider._mat-animation-noopable .mat-slider-ticks,.mat-slider._mat-animation-noopable .mat-slider-track-background,.mat-slider._mat-animation-noopable .mat-slider-track-fill{transition:none}"],
106440
                    inputs: ['disabled', 'color', 'tabIndex'],
106441
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_5__["ViewEncapsulation"].None,
106442
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_5__["ChangeDetectionStrategy"].OnPush,
106443
                },] },
106444
    ];
106445
    /** @nocollapse */
106446
    MatSlider.ctorParameters = function () { return [
106447
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["ElementRef"], },
106448
        { type: _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_1__["FocusMonitor"], },
106449
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["ChangeDetectorRef"], },
106450
        { type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_2__["Directionality"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["Optional"] },] },
106451
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["Attribute"], args: ['tabindex',] },] },
106452
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["Inject"], args: [_angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_9__["ANIMATION_MODULE_TYPE"],] },] },
106453
    ]; };
106454
    MatSlider.propDecorators = {
106455
        "invert": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["Input"] },],
106456
        "max": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["Input"] },],
106457
        "min": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["Input"] },],
106458
        "step": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["Input"] },],
106459
        "thumbLabel": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["Input"] },],
106460
        "tickInterval": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["Input"] },],
106461
        "value": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["Input"] },],
106462
        "displayWith": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["Input"] },],
106463
        "vertical": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["Input"] },],
106464
        "change": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["Output"] },],
106465
        "input": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["Output"] },],
106466
        "valueChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["Output"] },],
106467
        "_sliderWrapper": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["ViewChild"], args: ['sliderWrapper',] },],
106468
    };
106469
    return MatSlider;
106470
}(_MatSliderMixinBase));
106471
 
106472
/**
106473
 * @fileoverview added by tsickle
106474
 * @suppress {checkTypes} checked by tsc
106475
 */
106476
var MatSliderModule = /** @class */ (function () {
106477
    function MatSliderModule() {
106478
    }
106479
    MatSliderModule.decorators = [
106480
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_5__["NgModule"], args: [{
106481
                    imports: [_angular_common__WEBPACK_IMPORTED_MODULE_10__["CommonModule"], _angular_material_core__WEBPACK_IMPORTED_MODULE_7__["MatCommonModule"]],
106482
                    exports: [MatSlider, _angular_material_core__WEBPACK_IMPORTED_MODULE_7__["MatCommonModule"]],
106483
                    declarations: [MatSlider],
106484
                    providers: [{ provide: _angular_platform_browser__WEBPACK_IMPORTED_MODULE_11__["HAMMER_GESTURE_CONFIG"], useClass: _angular_material_core__WEBPACK_IMPORTED_MODULE_7__["GestureConfig"] }]
106485
                },] },
106486
    ];
106487
    return MatSliderModule;
106488
}());
106489
 
106490
/**
106491
 * @fileoverview added by tsickle
106492
 * @suppress {checkTypes} checked by tsc
106493
 */
106494
 
106495
/**
106496
 * @fileoverview added by tsickle
106497
 * @suppress {checkTypes} checked by tsc
106498
 */
106499
 
106500
 
106501
//# sourceMappingURL=slider.es5.js.map
106502
 
106503
 
106504
/***/ }),
106505
 
106506
/***/ "./node_modules/@angular/material/esm5/snack-bar.es5.js":
106507
/*!**************************************************************!*\
106508
  !*** ./node_modules/@angular/material/esm5/snack-bar.es5.js ***!
106509
  \**************************************************************/
106510
/*! exports provided: MatSnackBarModule, MAT_SNACK_BAR_DEFAULT_OPTIONS, MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY, MatSnackBar, MatSnackBarContainer, MAT_SNACK_BAR_DATA, MatSnackBarConfig, MatSnackBarRef, SimpleSnackBar, matSnackBarAnimations */
106511
/***/ (function(module, __webpack_exports__, __webpack_require__) {
106512
 
106513
"use strict";
106514
__webpack_require__.r(__webpack_exports__);
106515
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSnackBarModule", function() { return MatSnackBarModule; });
106516
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_SNACK_BAR_DEFAULT_OPTIONS", function() { return MAT_SNACK_BAR_DEFAULT_OPTIONS; });
106517
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY", function() { return MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY; });
106518
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSnackBar", function() { return MatSnackBar; });
106519
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSnackBarContainer", function() { return MatSnackBarContainer; });
106520
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_SNACK_BAR_DATA", function() { return MAT_SNACK_BAR_DATA; });
106521
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSnackBarConfig", function() { return MatSnackBarConfig; });
106522
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSnackBarRef", function() { return MatSnackBarRef; });
106523
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleSnackBar", function() { return SimpleSnackBar; });
106524
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matSnackBarAnimations", function() { return matSnackBarAnimations; });
106525
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
106526
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
106527
/* harmony import */ var _angular_animations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/animations */ "./node_modules/@angular/animations/fesm5/animations.js");
106528
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
106529
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
106530
/* harmony import */ var _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/cdk/portal */ "./node_modules/@angular/cdk/esm5/portal.es5.js");
106531
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
106532
/* harmony import */ var _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/cdk/overlay */ "./node_modules/@angular/cdk/esm5/overlay.es5.js");
106533
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
106534
/* harmony import */ var _angular_material_button__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/material/button */ "./node_modules/@angular/material/esm5/button.es5.js");
106535
/* harmony import */ var _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/cdk/a11y */ "./node_modules/@angular/cdk/esm5/a11y.es5.js");
106536
/* harmony import */ var _angular_cdk_layout__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/cdk/layout */ "./node_modules/@angular/cdk/esm5/layout.es5.js");
106537
/**
106538
 * @license
106539
 * Copyright Google LLC All Rights Reserved.
106540
 *
106541
 * Use of this source code is governed by an MIT-style license that can be
106542
 * found in the LICENSE file at https://angular.io/license
106543
 */
106544
 
106545
 
106546
 
106547
 
106548
 
106549
 
106550
 
106551
 
106552
 
106553
 
106554
 
106555
 
106556
 
106557
/**
106558
 * @fileoverview added by tsickle
106559
 * @suppress {checkTypes} checked by tsc
106560
 */
106561
/**
106562
 * Reference to a snack bar dispatched from the snack bar service.
106563
 * @template T
106564
 */
106565
var  /**
106566
 * Reference to a snack bar dispatched from the snack bar service.
106567
 * @template T
106568
 */
106569
MatSnackBarRef = /** @class */ (function () {
106570
    function MatSnackBarRef(containerInstance, _overlayRef) {
106571
        var _this = this;
106572
        this._overlayRef = _overlayRef;
106573
        /**
106574
         * Subject for notifying the user that the snack bar has been dismissed.
106575
         */
106576
        this._afterDismissed = new rxjs__WEBPACK_IMPORTED_MODULE_0__["Subject"]();
106577
        /**
106578
         * Subject for notifying the user that the snack bar has opened and appeared.
106579
         */
106580
        this._afterOpened = new rxjs__WEBPACK_IMPORTED_MODULE_0__["Subject"]();
106581
        /**
106582
         * Subject for notifying the user that the snack bar action was called.
106583
         */
106584
        this._onAction = new rxjs__WEBPACK_IMPORTED_MODULE_0__["Subject"]();
106585
        /**
106586
         * Whether the snack bar was dismissed using the action button.
106587
         */
106588
        this._dismissedByAction = false;
106589
        this.containerInstance = containerInstance;
106590
        // Dismiss snackbar on action.
106591
        this.onAction().subscribe(function () { return _this.dismiss(); });
106592
        containerInstance._onExit.subscribe(function () { return _this._finishDismiss(); });
106593
    }
106594
    /** Dismisses the snack bar. */
106595
    /**
106596
     * Dismisses the snack bar.
106597
     * @return {?}
106598
     */
106599
    MatSnackBarRef.prototype.dismiss = /**
106600
     * Dismisses the snack bar.
106601
     * @return {?}
106602
     */
106603
    function () {
106604
        if (!this._afterDismissed.closed) {
106605
            this.containerInstance.exit();
106606
        }
106607
        clearTimeout(this._durationTimeoutId);
106608
    };
106609
    /** Marks the snackbar action clicked. */
106610
    /**
106611
     * Marks the snackbar action clicked.
106612
     * @return {?}
106613
     */
106614
    MatSnackBarRef.prototype.dismissWithAction = /**
106615
     * Marks the snackbar action clicked.
106616
     * @return {?}
106617
     */
106618
    function () {
106619
        if (!this._onAction.closed) {
106620
            this._dismissedByAction = true;
106621
            this._onAction.next();
106622
            this._onAction.complete();
106623
        }
106624
    };
106625
    /**
106626
     * Marks the snackbar action clicked.
106627
     * @deprecated Use `dismissWithAction` instead.
106628
     * @breaking-change 7.0.0
106629
     */
106630
    /**
106631
     * Marks the snackbar action clicked.
106632
     * @deprecated Use `dismissWithAction` instead.
106633
     * \@breaking-change 7.0.0
106634
     * @return {?}
106635
     */
106636
    MatSnackBarRef.prototype.closeWithAction = /**
106637
     * Marks the snackbar action clicked.
106638
     * @deprecated Use `dismissWithAction` instead.
106639
     * \@breaking-change 7.0.0
106640
     * @return {?}
106641
     */
106642
    function () {
106643
        this.dismissWithAction();
106644
    };
106645
    /** Dismisses the snack bar after some duration */
106646
    /**
106647
     * Dismisses the snack bar after some duration
106648
     * @param {?} duration
106649
     * @return {?}
106650
     */
106651
    MatSnackBarRef.prototype._dismissAfter = /**
106652
     * Dismisses the snack bar after some duration
106653
     * @param {?} duration
106654
     * @return {?}
106655
     */
106656
    function (duration) {
106657
        var _this = this;
106658
        this._durationTimeoutId = setTimeout(function () { return _this.dismiss(); }, duration);
106659
    };
106660
    /** Marks the snackbar as opened */
106661
    /**
106662
     * Marks the snackbar as opened
106663
     * @return {?}
106664
     */
106665
    MatSnackBarRef.prototype._open = /**
106666
     * Marks the snackbar as opened
106667
     * @return {?}
106668
     */
106669
    function () {
106670
        if (!this._afterOpened.closed) {
106671
            this._afterOpened.next();
106672
            this._afterOpened.complete();
106673
        }
106674
    };
106675
    /**
106676
     * Cleans up the DOM after closing.
106677
     * @return {?}
106678
     */
106679
    MatSnackBarRef.prototype._finishDismiss = /**
106680
     * Cleans up the DOM after closing.
106681
     * @return {?}
106682
     */
106683
    function () {
106684
        this._overlayRef.dispose();
106685
        if (!this._onAction.closed) {
106686
            this._onAction.complete();
106687
        }
106688
        this._afterDismissed.next({ dismissedByAction: this._dismissedByAction });
106689
        this._afterDismissed.complete();
106690
        this._dismissedByAction = false;
106691
    };
106692
    /** Gets an observable that is notified when the snack bar is finished closing. */
106693
    /**
106694
     * Gets an observable that is notified when the snack bar is finished closing.
106695
     * @return {?}
106696
     */
106697
    MatSnackBarRef.prototype.afterDismissed = /**
106698
     * Gets an observable that is notified when the snack bar is finished closing.
106699
     * @return {?}
106700
     */
106701
    function () {
106702
        return this._afterDismissed.asObservable();
106703
    };
106704
    /** Gets an observable that is notified when the snack bar has opened and appeared. */
106705
    /**
106706
     * Gets an observable that is notified when the snack bar has opened and appeared.
106707
     * @return {?}
106708
     */
106709
    MatSnackBarRef.prototype.afterOpened = /**
106710
     * Gets an observable that is notified when the snack bar has opened and appeared.
106711
     * @return {?}
106712
     */
106713
    function () {
106714
        return this.containerInstance._onEnter;
106715
    };
106716
    /** Gets an observable that is notified when the snack bar action is called. */
106717
    /**
106718
     * Gets an observable that is notified when the snack bar action is called.
106719
     * @return {?}
106720
     */
106721
    MatSnackBarRef.prototype.onAction = /**
106722
     * Gets an observable that is notified when the snack bar action is called.
106723
     * @return {?}
106724
     */
106725
    function () {
106726
        return this._onAction.asObservable();
106727
    };
106728
    return MatSnackBarRef;
106729
}());
106730
 
106731
/**
106732
 * @fileoverview added by tsickle
106733
 * @suppress {checkTypes} checked by tsc
106734
 */
106735
/**
106736
 * Injection token that can be used to access the data that was passed in to a snack bar.
106737
 */
106738
var /** @type {?} */ MAT_SNACK_BAR_DATA = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('MatSnackBarData');
106739
/**
106740
 * Configuration used when opening a snack-bar.
106741
 * @template D
106742
 */
106743
var  /**
106744
 * Configuration used when opening a snack-bar.
106745
 * @template D
106746
 */
106747
MatSnackBarConfig = /** @class */ (function () {
106748
    function MatSnackBarConfig() {
106749
        /**
106750
         * The politeness level for the MatAriaLiveAnnouncer announcement.
106751
         */
106752
        this.politeness = 'assertive';
106753
        /**
106754
         * Message to be announced by the LiveAnnouncer. When opening a snackbar without a custom
106755
         * component or template, the announcement message will default to the specified message.
106756
         */
106757
        this.announcementMessage = '';
106758
        /**
106759
         * The length of time in milliseconds to wait before automatically dismissing the snack bar.
106760
         */
106761
        this.duration = 0;
106762
        /**
106763
         * Data being injected into the child component.
106764
         */
106765
        this.data = null;
106766
        /**
106767
         * The horizontal position to place the snack bar.
106768
         */
106769
        this.horizontalPosition = 'center';
106770
        /**
106771
         * The vertical position to place the snack bar.
106772
         */
106773
        this.verticalPosition = 'bottom';
106774
    }
106775
    return MatSnackBarConfig;
106776
}());
106777
 
106778
/**
106779
 * @fileoverview added by tsickle
106780
 * @suppress {checkTypes} checked by tsc
106781
 */
106782
/**
106783
 * Animations used by the Material snack bar.
106784
 */
106785
var /** @type {?} */ matSnackBarAnimations = {
106786
    /** Animation that slides the dialog in and out of view and fades the opacity. */
106787
    contentFade: Object(_angular_animations__WEBPACK_IMPORTED_MODULE_2__["trigger"])('contentFade', [
106788
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_2__["transition"])(':enter', [
106789
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_2__["style"])({ opacity: '0' }),
106790
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_2__["animate"])(_angular_material_core__WEBPACK_IMPORTED_MODULE_3__["AnimationDurations"].COMPLEX + " " + _angular_material_core__WEBPACK_IMPORTED_MODULE_3__["AnimationCurves"].STANDARD_CURVE)
106791
        ])
106792
    ]),
106793
    /** Animation that shows and hides a snack bar. */
106794
    snackBarState: Object(_angular_animations__WEBPACK_IMPORTED_MODULE_2__["trigger"])('state', [
106795
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_2__["state"])('visible-top, visible-bottom', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_2__["style"])({ transform: 'translateY(0%)' })),
106796
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_2__["transition"])('visible-top => hidden-top, visible-bottom => hidden-bottom', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_2__["animate"])(_angular_material_core__WEBPACK_IMPORTED_MODULE_3__["AnimationDurations"].EXITING + " " + _angular_material_core__WEBPACK_IMPORTED_MODULE_3__["AnimationCurves"].ACCELERATION_CURVE)),
106797
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_2__["transition"])('void => visible-top, void => visible-bottom', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_2__["animate"])(_angular_material_core__WEBPACK_IMPORTED_MODULE_3__["AnimationDurations"].ENTERING + " " + _angular_material_core__WEBPACK_IMPORTED_MODULE_3__["AnimationCurves"].DECELERATION_CURVE)),
106798
    ])
106799
};
106800
 
106801
/**
106802
 * @fileoverview added by tsickle
106803
 * @suppress {checkTypes} checked by tsc
106804
 */
106805
/**
106806
 * A component used to open as the default snack bar, matching material spec.
106807
 * This should only be used internally by the snack bar service.
106808
 */
106809
var SimpleSnackBar = /** @class */ (function () {
106810
    function SimpleSnackBar(snackBarRef, data) {
106811
        this.snackBarRef = snackBarRef;
106812
        this.data = data;
106813
    }
106814
    /** Performs the action on the snack bar. */
106815
    /**
106816
     * Performs the action on the snack bar.
106817
     * @return {?}
106818
     */
106819
    SimpleSnackBar.prototype.action = /**
106820
     * Performs the action on the snack bar.
106821
     * @return {?}
106822
     */
106823
    function () {
106824
        this.snackBarRef.dismissWithAction();
106825
    };
106826
    Object.defineProperty(SimpleSnackBar.prototype, "hasAction", {
106827
        /** If the action button should be shown. */
106828
        get: /**
106829
         * If the action button should be shown.
106830
         * @return {?}
106831
         */
106832
        function () {
106833
            return !!this.data.action;
106834
        },
106835
        enumerable: true,
106836
        configurable: true
106837
    });
106838
    SimpleSnackBar.decorators = [
106839
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"], args: [{selector: 'simple-snack-bar',
106840
                    template: "<span>{{data.message}}</span><div class=\"mat-simple-snackbar-action\" *ngIf=\"hasAction\"><button mat-button (click)=\"action()\">{{data.action}}</button></div>",
106841
                    styles: [".mat-simple-snackbar{display:flex;justify-content:space-between;line-height:20px;opacity:1}.mat-simple-snackbar-action{display:flex;flex-direction:column;flex-shrink:0;justify-content:space-around;margin:-8px 0 -8px 8px}.mat-simple-snackbar-action button{flex:1;max-height:36px}[dir=rtl] .mat-simple-snackbar-action{margin-left:0;margin-right:8px}"],
106842
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
106843
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
106844
                    animations: [matSnackBarAnimations.contentFade],
106845
                    host: {
106846
                        '[@contentFade]': '',
106847
                        'class': 'mat-simple-snackbar',
106848
                    }
106849
                },] },
106850
    ];
106851
    /** @nocollapse */
106852
    SimpleSnackBar.ctorParameters = function () { return [
106853
        { type: MatSnackBarRef, },
106854
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [MAT_SNACK_BAR_DATA,] },] },
106855
    ]; };
106856
    return SimpleSnackBar;
106857
}());
106858
 
106859
/**
106860
 * @fileoverview added by tsickle
106861
 * @suppress {checkTypes} checked by tsc
106862
 */
106863
/**
106864
 * Internal component that wraps user-provided snack bar content.
106865
 * \@docs-private
106866
 */
106867
var MatSnackBarContainer = /** @class */ (function (_super) {
106868
    Object(tslib__WEBPACK_IMPORTED_MODULE_4__["__extends"])(MatSnackBarContainer, _super);
106869
    function MatSnackBarContainer(_ngZone, _elementRef, _changeDetectorRef, snackBarConfig) {
106870
        var _this = _super.call(this) || this;
106871
        _this._ngZone = _ngZone;
106872
        _this._elementRef = _elementRef;
106873
        _this._changeDetectorRef = _changeDetectorRef;
106874
        _this.snackBarConfig = snackBarConfig;
106875
        /**
106876
         * Whether the component has been destroyed.
106877
         */
106878
        _this._destroyed = false;
106879
        /**
106880
         * Subject for notifying that the snack bar has exited from view.
106881
         */
106882
        _this._onExit = new rxjs__WEBPACK_IMPORTED_MODULE_0__["Subject"]();
106883
        /**
106884
         * Subject for notifying that the snack bar has finished entering the view.
106885
         */
106886
        _this._onEnter = new rxjs__WEBPACK_IMPORTED_MODULE_0__["Subject"]();
106887
        /**
106888
         * The state of the snack bar animations.
106889
         */
106890
        _this._animationState = 'void';
106891
        return _this;
106892
    }
106893
    /** Attach a component portal as content to this snack bar container. */
106894
    /**
106895
     * Attach a component portal as content to this snack bar container.
106896
     * @template T
106897
     * @param {?} portal
106898
     * @return {?}
106899
     */
106900
    MatSnackBarContainer.prototype.attachComponentPortal = /**
106901
     * Attach a component portal as content to this snack bar container.
106902
     * @template T
106903
     * @param {?} portal
106904
     * @return {?}
106905
     */
106906
    function (portal) {
106907
        this._assertNotAttached();
106908
        this._applySnackBarClasses();
106909
        return this._portalOutlet.attachComponentPortal(portal);
106910
    };
106911
    /** Attach a template portal as content to this snack bar container. */
106912
    /**
106913
     * Attach a template portal as content to this snack bar container.
106914
     * @template C
106915
     * @param {?} portal
106916
     * @return {?}
106917
     */
106918
    MatSnackBarContainer.prototype.attachTemplatePortal = /**
106919
     * Attach a template portal as content to this snack bar container.
106920
     * @template C
106921
     * @param {?} portal
106922
     * @return {?}
106923
     */
106924
    function (portal) {
106925
        this._assertNotAttached();
106926
        this._applySnackBarClasses();
106927
        return this._portalOutlet.attachTemplatePortal(portal);
106928
    };
106929
    /** Handle end of animations, updating the state of the snackbar. */
106930
    /**
106931
     * Handle end of animations, updating the state of the snackbar.
106932
     * @param {?} event
106933
     * @return {?}
106934
     */
106935
    MatSnackBarContainer.prototype.onAnimationEnd = /**
106936
     * Handle end of animations, updating the state of the snackbar.
106937
     * @param {?} event
106938
     * @return {?}
106939
     */
106940
    function (event) {
106941
        var fromState = event.fromState, toState = event.toState;
106942
        if ((toState === 'void' && fromState !== 'void') || toState.startsWith('hidden')) {
106943
            this._completeExit();
106944
        }
106945
        if (toState.startsWith('visible')) {
106946
            // Note: we shouldn't use `this` inside the zone callback,
106947
            // because it can cause a memory leak.
106948
            var /** @type {?} */ onEnter_1 = this._onEnter;
106949
            this._ngZone.run(function () {
106950
                onEnter_1.next();
106951
                onEnter_1.complete();
106952
            });
106953
        }
106954
    };
106955
    /** Begin animation of snack bar entrance into view. */
106956
    /**
106957
     * Begin animation of snack bar entrance into view.
106958
     * @return {?}
106959
     */
106960
    MatSnackBarContainer.prototype.enter = /**
106961
     * Begin animation of snack bar entrance into view.
106962
     * @return {?}
106963
     */
106964
    function () {
106965
        if (!this._destroyed) {
106966
            this._animationState = "visible-" + this.snackBarConfig.verticalPosition;
106967
            this._changeDetectorRef.detectChanges();
106968
        }
106969
    };
106970
    /** Begin animation of the snack bar exiting from view. */
106971
    /**
106972
     * Begin animation of the snack bar exiting from view.
106973
     * @return {?}
106974
     */
106975
    MatSnackBarContainer.prototype.exit = /**
106976
     * Begin animation of the snack bar exiting from view.
106977
     * @return {?}
106978
     */
106979
    function () {
106980
        this._animationState = "hidden-" + this.snackBarConfig.verticalPosition;
106981
        return this._onExit;
106982
    };
106983
    /** Makes sure the exit callbacks have been invoked when the element is destroyed. */
106984
    /**
106985
     * Makes sure the exit callbacks have been invoked when the element is destroyed.
106986
     * @return {?}
106987
     */
106988
    MatSnackBarContainer.prototype.ngOnDestroy = /**
106989
     * Makes sure the exit callbacks have been invoked when the element is destroyed.
106990
     * @return {?}
106991
     */
106992
    function () {
106993
        this._destroyed = true;
106994
        this._completeExit();
106995
    };
106996
    /**
106997
     * Waits for the zone to settle before removing the element. Helps prevent
106998
     * errors where we end up removing an element which is in the middle of an animation.
106999
     * @return {?}
107000
     */
107001
    MatSnackBarContainer.prototype._completeExit = /**
107002
     * Waits for the zone to settle before removing the element. Helps prevent
107003
     * errors where we end up removing an element which is in the middle of an animation.
107004
     * @return {?}
107005
     */
107006
    function () {
107007
        var _this = this;
107008
        this._ngZone.onMicrotaskEmpty.asObservable().pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_6__["take"])(1)).subscribe(function () {
107009
            _this._onExit.next();
107010
            _this._onExit.complete();
107011
        });
107012
    };
107013
    /**
107014
     * Applies the various positioning and user-configured CSS classes to the snack bar.
107015
     * @return {?}
107016
     */
107017
    MatSnackBarContainer.prototype._applySnackBarClasses = /**
107018
     * Applies the various positioning and user-configured CSS classes to the snack bar.
107019
     * @return {?}
107020
     */
107021
    function () {
107022
        var /** @type {?} */ element = this._elementRef.nativeElement;
107023
        var /** @type {?} */ panelClasses = this.snackBarConfig.panelClass;
107024
        if (panelClasses) {
107025
            if (Array.isArray(panelClasses)) {
107026
                // Note that we can't use a spread here, because IE doesn't support multiple arguments.
107027
                panelClasses.forEach(function (cssClass) { return element.classList.add(cssClass); });
107028
            }
107029
            else {
107030
                element.classList.add(panelClasses);
107031
            }
107032
        }
107033
        if (this.snackBarConfig.horizontalPosition === 'center') {
107034
            element.classList.add('mat-snack-bar-center');
107035
        }
107036
        if (this.snackBarConfig.verticalPosition === 'top') {
107037
            element.classList.add('mat-snack-bar-top');
107038
        }
107039
    };
107040
    /**
107041
     * Asserts that no content is already attached to the container.
107042
     * @return {?}
107043
     */
107044
    MatSnackBarContainer.prototype._assertNotAttached = /**
107045
     * Asserts that no content is already attached to the container.
107046
     * @return {?}
107047
     */
107048
    function () {
107049
        if (this._portalOutlet.hasAttached()) {
107050
            throw Error('Attempting to attach snack bar content after content is already attached');
107051
        }
107052
    };
107053
    MatSnackBarContainer.decorators = [
107054
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"], args: [{selector: 'snack-bar-container',
107055
                    template: "<ng-template cdkPortalOutlet></ng-template>",
107056
                    styles: [".mat-snack-bar-container{border-radius:2px;box-sizing:border-box;display:block;margin:24px;max-width:568px;min-width:288px;padding:14px 24px;transform:translateY(100%) translateY(24px)}.mat-snack-bar-container.mat-snack-bar-center{margin:0;transform:translateY(100%)}.mat-snack-bar-container.mat-snack-bar-top{transform:translateY(-100%) translateY(-24px)}.mat-snack-bar-container.mat-snack-bar-top.mat-snack-bar-center{transform:translateY(-100%)}@media screen and (-ms-high-contrast:active){.mat-snack-bar-container{border:solid 1px}}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:0;max-width:inherit;width:100%}"],
107057
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
107058
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
107059
                    animations: [matSnackBarAnimations.snackBarState],
107060
                    host: {
107061
                        'role': 'alert',
107062
                        'class': 'mat-snack-bar-container',
107063
                        '[@state]': '_animationState',
107064
                        '(@state.done)': 'onAnimationEnd($event)'
107065
                    },
107066
                },] },
107067
    ];
107068
    /** @nocollapse */
107069
    MatSnackBarContainer.ctorParameters = function () { return [
107070
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"], },
107071
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
107072
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"], },
107073
        { type: MatSnackBarConfig, },
107074
    ]; };
107075
    MatSnackBarContainer.propDecorators = {
107076
        "_portalOutlet": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"], args: [_angular_cdk_portal__WEBPACK_IMPORTED_MODULE_5__["CdkPortalOutlet"],] },],
107077
    };
107078
    return MatSnackBarContainer;
107079
}(_angular_cdk_portal__WEBPACK_IMPORTED_MODULE_5__["BasePortalOutlet"]));
107080
 
107081
/**
107082
 * @fileoverview added by tsickle
107083
 * @suppress {checkTypes} checked by tsc
107084
 */
107085
var MatSnackBarModule = /** @class */ (function () {
107086
    function MatSnackBarModule() {
107087
    }
107088
    MatSnackBarModule.decorators = [
107089
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{
107090
                    imports: [
107091
                        _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_7__["OverlayModule"],
107092
                        _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_5__["PortalModule"],
107093
                        _angular_common__WEBPACK_IMPORTED_MODULE_8__["CommonModule"],
107094
                        _angular_material_button__WEBPACK_IMPORTED_MODULE_9__["MatButtonModule"],
107095
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_3__["MatCommonModule"],
107096
                    ],
107097
                    exports: [MatSnackBarContainer, _angular_material_core__WEBPACK_IMPORTED_MODULE_3__["MatCommonModule"]],
107098
                    declarations: [MatSnackBarContainer, SimpleSnackBar],
107099
                    entryComponents: [MatSnackBarContainer, SimpleSnackBar],
107100
                },] },
107101
    ];
107102
    return MatSnackBarModule;
107103
}());
107104
 
107105
/**
107106
 * @fileoverview added by tsickle
107107
 * @suppress {checkTypes} checked by tsc
107108
 */
107109
/**
107110
 * Injection token that can be used to specify default snack bar.
107111
 */
107112
var /** @type {?} */ MAT_SNACK_BAR_DEFAULT_OPTIONS = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('mat-snack-bar-default-options', {
107113
    providedIn: 'root',
107114
    factory: MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY,
107115
});
107116
/**
107117
 * \@docs-private
107118
 * @return {?}
107119
 */
107120
function MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY() {
107121
    return new MatSnackBarConfig();
107122
}
107123
/**
107124
 * Service to dispatch Material Design snack bar messages.
107125
 */
107126
var MatSnackBar = /** @class */ (function () {
107127
    function MatSnackBar(_overlay, _live, _injector, _breakpointObserver, _parentSnackBar, _defaultConfig) {
107128
        this._overlay = _overlay;
107129
        this._live = _live;
107130
        this._injector = _injector;
107131
        this._breakpointObserver = _breakpointObserver;
107132
        this._parentSnackBar = _parentSnackBar;
107133
        this._defaultConfig = _defaultConfig;
107134
        /**
107135
         * Reference to the current snack bar in the view *at this level* (in the Angular injector tree).
107136
         * If there is a parent snack-bar service, all operations should delegate to that parent
107137
         * via `_openedSnackBarRef`.
107138
         */
107139
        this._snackBarRefAtThisLevel = null;
107140
    }
107141
    Object.defineProperty(MatSnackBar.prototype, "_openedSnackBarRef", {
107142
        /** Reference to the currently opened snackbar at *any* level. */
107143
        get: /**
107144
         * Reference to the currently opened snackbar at *any* level.
107145
         * @return {?}
107146
         */
107147
        function () {
107148
            var /** @type {?} */ parent = this._parentSnackBar;
107149
            return parent ? parent._openedSnackBarRef : this._snackBarRefAtThisLevel;
107150
        },
107151
        set: /**
107152
         * @param {?} value
107153
         * @return {?}
107154
         */
107155
        function (value) {
107156
            if (this._parentSnackBar) {
107157
                this._parentSnackBar._openedSnackBarRef = value;
107158
            }
107159
            else {
107160
                this._snackBarRefAtThisLevel = value;
107161
            }
107162
        },
107163
        enumerable: true,
107164
        configurable: true
107165
    });
107166
    /**
107167
     * Creates and dispatches a snack bar with a custom component for the content, removing any
107168
     * currently opened snack bars.
107169
     *
107170
     * @param component Component to be instantiated.
107171
     * @param config Extra configuration for the snack bar.
107172
     */
107173
    /**
107174
     * Creates and dispatches a snack bar with a custom component for the content, removing any
107175
     * currently opened snack bars.
107176
     *
107177
     * @template T
107178
     * @param {?} component Component to be instantiated.
107179
     * @param {?=} config Extra configuration for the snack bar.
107180
     * @return {?}
107181
     */
107182
    MatSnackBar.prototype.openFromComponent = /**
107183
     * Creates and dispatches a snack bar with a custom component for the content, removing any
107184
     * currently opened snack bars.
107185
     *
107186
     * @template T
107187
     * @param {?} component Component to be instantiated.
107188
     * @param {?=} config Extra configuration for the snack bar.
107189
     * @return {?}
107190
     */
107191
    function (component, config) {
107192
        return /** @type {?} */ (this._attach(component, config));
107193
    };
107194
    /**
107195
     * Creates and dispatches a snack bar with a custom template for the content, removing any
107196
     * currently opened snack bars.
107197
     *
107198
     * @param template Template to be instantiated.
107199
     * @param config Extra configuration for the snack bar.
107200
     */
107201
    /**
107202
     * Creates and dispatches a snack bar with a custom template for the content, removing any
107203
     * currently opened snack bars.
107204
     *
107205
     * @param {?} template Template to be instantiated.
107206
     * @param {?=} config Extra configuration for the snack bar.
107207
     * @return {?}
107208
     */
107209
    MatSnackBar.prototype.openFromTemplate = /**
107210
     * Creates and dispatches a snack bar with a custom template for the content, removing any
107211
     * currently opened snack bars.
107212
     *
107213
     * @param {?} template Template to be instantiated.
107214
     * @param {?=} config Extra configuration for the snack bar.
107215
     * @return {?}
107216
     */
107217
    function (template, config) {
107218
        return this._attach(template, config);
107219
    };
107220
    /**
107221
     * Opens a snackbar with a message and an optional action.
107222
     * @param message The message to show in the snackbar.
107223
     * @param action The label for the snackbar action.
107224
     * @param config Additional configuration options for the snackbar.
107225
     */
107226
    /**
107227
     * Opens a snackbar with a message and an optional action.
107228
     * @param {?} message The message to show in the snackbar.
107229
     * @param {?=} action The label for the snackbar action.
107230
     * @param {?=} config Additional configuration options for the snackbar.
107231
     * @return {?}
107232
     */
107233
    MatSnackBar.prototype.open = /**
107234
     * Opens a snackbar with a message and an optional action.
107235
     * @param {?} message The message to show in the snackbar.
107236
     * @param {?=} action The label for the snackbar action.
107237
     * @param {?=} config Additional configuration options for the snackbar.
107238
     * @return {?}
107239
     */
107240
    function (message, action, config) {
107241
        if (action === void 0) { action = ''; }
107242
        var /** @type {?} */ _config = Object(tslib__WEBPACK_IMPORTED_MODULE_4__["__assign"])({}, this._defaultConfig, config);
107243
        // Since the user doesn't have access to the component, we can
107244
        // override the data to pass in our own message and action.
107245
        _config.data = { message: message, action: action };
107246
        if (!_config.announcementMessage) {
107247
            _config.announcementMessage = message;
107248
        }
107249
        return this.openFromComponent(SimpleSnackBar, _config);
107250
    };
107251
    /**
107252
     * Dismisses the currently-visible snack bar.
107253
     */
107254
    /**
107255
     * Dismisses the currently-visible snack bar.
107256
     * @return {?}
107257
     */
107258
    MatSnackBar.prototype.dismiss = /**
107259
     * Dismisses the currently-visible snack bar.
107260
     * @return {?}
107261
     */
107262
    function () {
107263
        if (this._openedSnackBarRef) {
107264
            this._openedSnackBarRef.dismiss();
107265
        }
107266
    };
107267
    /**
107268
     * Attaches the snack bar container component to the overlay.
107269
     * @param {?} overlayRef
107270
     * @param {?} config
107271
     * @return {?}
107272
     */
107273
    MatSnackBar.prototype._attachSnackBarContainer = /**
107274
     * Attaches the snack bar container component to the overlay.
107275
     * @param {?} overlayRef
107276
     * @param {?} config
107277
     * @return {?}
107278
     */
107279
    function (overlayRef, config) {
107280
        var /** @type {?} */ userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
107281
        var /** @type {?} */ injector = new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_5__["PortalInjector"](userInjector || this._injector, new WeakMap([
107282
            [MatSnackBarConfig, config]
107283
        ]));
107284
        var /** @type {?} */ containerPortal = new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_5__["ComponentPortal"](MatSnackBarContainer, config.viewContainerRef, injector);
107285
        var /** @type {?} */ containerRef = overlayRef.attach(containerPortal);
107286
        containerRef.instance.snackBarConfig = config;
107287
        return containerRef.instance;
107288
    };
107289
    /**
107290
     * Places a new component or a template as the content of the snack bar container.
107291
     * @template T
107292
     * @param {?} content
107293
     * @param {?=} userConfig
107294
     * @return {?}
107295
     */
107296
    MatSnackBar.prototype._attach = /**
107297
     * Places a new component or a template as the content of the snack bar container.
107298
     * @template T
107299
     * @param {?} content
107300
     * @param {?=} userConfig
107301
     * @return {?}
107302
     */
107303
    function (content, userConfig) {
107304
        var /** @type {?} */ config = Object(tslib__WEBPACK_IMPORTED_MODULE_4__["__assign"])({}, new MatSnackBarConfig(), this._defaultConfig, userConfig);
107305
        var /** @type {?} */ overlayRef = this._createOverlay(config);
107306
        var /** @type {?} */ container = this._attachSnackBarContainer(overlayRef, config);
107307
        var /** @type {?} */ snackBarRef = new MatSnackBarRef(container, overlayRef);
107308
        if (content instanceof _angular_core__WEBPACK_IMPORTED_MODULE_1__["TemplateRef"]) {
107309
            var /** @type {?} */ portal = new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_5__["TemplatePortal"](content, /** @type {?} */ ((null)), /** @type {?} */ ({
107310
                $implicit: config.data,
107311
                snackBarRef: snackBarRef
107312
            }));
107313
            snackBarRef.instance = container.attachTemplatePortal(portal);
107314
        }
107315
        else {
107316
            var /** @type {?} */ injector = this._createInjector(config, snackBarRef);
107317
            var /** @type {?} */ portal = new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_5__["ComponentPortal"](content, undefined, injector);
107318
            var /** @type {?} */ contentRef = container.attachComponentPortal(portal);
107319
            // We can't pass this via the injector, because the injector is created earlier.
107320
            snackBarRef.instance = contentRef.instance;
107321
        }
107322
        // Subscribe to the breakpoint observer and attach the mat-snack-bar-handset class as
107323
        // appropriate. This class is applied to the overlay element because the overlay must expand to
107324
        // fill the width of the screen for full width snackbars.
107325
        this._breakpointObserver.observe(_angular_cdk_layout__WEBPACK_IMPORTED_MODULE_11__["Breakpoints"].Handset).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_6__["takeUntil"])(overlayRef.detachments().pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_6__["take"])(1)))).subscribe(function (state$$1) {
107326
            if (state$$1.matches) {
107327
                overlayRef.overlayElement.classList.add('mat-snack-bar-handset');
107328
            }
107329
            else {
107330
                overlayRef.overlayElement.classList.remove('mat-snack-bar-handset');
107331
            }
107332
        });
107333
        this._animateSnackBar(snackBarRef, config);
107334
        this._openedSnackBarRef = snackBarRef;
107335
        return this._openedSnackBarRef;
107336
    };
107337
    /**
107338
     * Animates the old snack bar out and the new one in.
107339
     * @param {?} snackBarRef
107340
     * @param {?} config
107341
     * @return {?}
107342
     */
107343
    MatSnackBar.prototype._animateSnackBar = /**
107344
     * Animates the old snack bar out and the new one in.
107345
     * @param {?} snackBarRef
107346
     * @param {?} config
107347
     * @return {?}
107348
     */
107349
    function (snackBarRef, config) {
107350
        var _this = this;
107351
        // When the snackbar is dismissed, clear the reference to it.
107352
        snackBarRef.afterDismissed().subscribe(function () {
107353
            // Clear the snackbar ref if it hasn't already been replaced by a newer snackbar.
107354
            if (_this._openedSnackBarRef == snackBarRef) {
107355
                _this._openedSnackBarRef = null;
107356
            }
107357
        });
107358
        if (this._openedSnackBarRef) {
107359
            // If a snack bar is already in view, dismiss it and enter the
107360
            // new snack bar after exit animation is complete.
107361
            this._openedSnackBarRef.afterDismissed().subscribe(function () {
107362
                snackBarRef.containerInstance.enter();
107363
            });
107364
            this._openedSnackBarRef.dismiss();
107365
        }
107366
        else {
107367
            // If no snack bar is in view, enter the new snack bar.
107368
            snackBarRef.containerInstance.enter();
107369
        }
107370
        // If a dismiss timeout is provided, set up dismiss based on after the snackbar is opened.
107371
        if (config.duration && config.duration > 0) {
107372
            snackBarRef.afterOpened().subscribe(function () { return snackBarRef._dismissAfter(/** @type {?} */ ((config.duration))); });
107373
        }
107374
        if (config.announcementMessage) {
107375
            this._live.announce(config.announcementMessage, config.politeness);
107376
        }
107377
    };
107378
    /**
107379
     * Creates a new overlay and places it in the correct location.
107380
     * @param {?} config The user-specified snack bar config.
107381
     * @return {?}
107382
     */
107383
    MatSnackBar.prototype._createOverlay = /**
107384
     * Creates a new overlay and places it in the correct location.
107385
     * @param {?} config The user-specified snack bar config.
107386
     * @return {?}
107387
     */
107388
    function (config) {
107389
        var /** @type {?} */ overlayConfig = new _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_7__["OverlayConfig"]();
107390
        overlayConfig.direction = config.direction;
107391
        var /** @type {?} */ positionStrategy = this._overlay.position().global();
107392
        // Set horizontal position.
107393
        var /** @type {?} */ isRtl = config.direction === 'rtl';
107394
        var /** @type {?} */ isLeft = (config.horizontalPosition === 'left' ||
107395
            (config.horizontalPosition === 'start' && !isRtl) ||
107396
            (config.horizontalPosition === 'end' && isRtl));
107397
        var /** @type {?} */ isRight = !isLeft && config.horizontalPosition !== 'center';
107398
        if (isLeft) {
107399
            positionStrategy.left('0');
107400
        }
107401
        else if (isRight) {
107402
            positionStrategy.right('0');
107403
        }
107404
        else {
107405
            positionStrategy.centerHorizontally();
107406
        }
107407
        // Set horizontal position.
107408
        if (config.verticalPosition === 'top') {
107409
            positionStrategy.top('0');
107410
        }
107411
        else {
107412
            positionStrategy.bottom('0');
107413
        }
107414
        overlayConfig.positionStrategy = positionStrategy;
107415
        return this._overlay.create(overlayConfig);
107416
    };
107417
    /**
107418
     * Creates an injector to be used inside of a snack bar component.
107419
     * @template T
107420
     * @param {?} config Config that was used to create the snack bar.
107421
     * @param {?} snackBarRef Reference to the snack bar.
107422
     * @return {?}
107423
     */
107424
    MatSnackBar.prototype._createInjector = /**
107425
     * Creates an injector to be used inside of a snack bar component.
107426
     * @template T
107427
     * @param {?} config Config that was used to create the snack bar.
107428
     * @param {?} snackBarRef Reference to the snack bar.
107429
     * @return {?}
107430
     */
107431
    function (config, snackBarRef) {
107432
        var /** @type {?} */ userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
107433
        return new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_5__["PortalInjector"](userInjector || this._injector, new WeakMap([
107434
            [MatSnackBarRef, snackBarRef],
107435
            [MAT_SNACK_BAR_DATA, config.data]
107436
        ]));
107437
    };
107438
    MatSnackBar.decorators = [
107439
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"], args: [{ providedIn: MatSnackBarModule },] },
107440
    ];
107441
    /** @nocollapse */
107442
    MatSnackBar.ctorParameters = function () { return [
107443
        { type: _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_7__["Overlay"], },
107444
        { type: _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_10__["LiveAnnouncer"], },
107445
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"], },
107446
        { type: _angular_cdk_layout__WEBPACK_IMPORTED_MODULE_11__["BreakpointObserver"], },
107447
        { type: MatSnackBar, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"] },] },
107448
        { type: MatSnackBarConfig, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [MAT_SNACK_BAR_DEFAULT_OPTIONS,] },] },
107449
    ]; };
107450
    /** @nocollapse */ MatSnackBar.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["defineInjectable"])({ factory: function MatSnackBar_Factory() { return new MatSnackBar(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(_angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_7__["Overlay"]), Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(_angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_10__["LiveAnnouncer"]), Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_1__["INJECTOR"]), Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(_angular_cdk_layout__WEBPACK_IMPORTED_MODULE_11__["BreakpointObserver"]), Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(MatSnackBar, 12), Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(MAT_SNACK_BAR_DEFAULT_OPTIONS)); }, token: MatSnackBar, providedIn: MatSnackBarModule });
107451
    return MatSnackBar;
107452
}());
107453
 
107454
/**
107455
 * @fileoverview added by tsickle
107456
 * @suppress {checkTypes} checked by tsc
107457
 */
107458
 
107459
/**
107460
 * @fileoverview added by tsickle
107461
 * @suppress {checkTypes} checked by tsc
107462
 */
107463
 
107464
 
107465
//# sourceMappingURL=snack-bar.es5.js.map
107466
 
107467
 
107468
/***/ }),
107469
 
107470
/***/ "./node_modules/@angular/material/esm5/sort.es5.js":
107471
/*!*********************************************************!*\
107472
  !*** ./node_modules/@angular/material/esm5/sort.es5.js ***!
107473
  \*********************************************************/
107474
/*! exports provided: MatSortModule, MatSortHeaderBase, _MatSortHeaderMixinBase, MatSortHeader, MatSortHeaderIntl, MAT_SORT_HEADER_INTL_PROVIDER_FACTORY, MAT_SORT_HEADER_INTL_PROVIDER, MatSortBase, _MatSortMixinBase, MatSort, matSortAnimations */
107475
/***/ (function(module, __webpack_exports__, __webpack_require__) {
107476
 
107477
"use strict";
107478
__webpack_require__.r(__webpack_exports__);
107479
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSortModule", function() { return MatSortModule; });
107480
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSortHeaderBase", function() { return MatSortHeaderBase; });
107481
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatSortHeaderMixinBase", function() { return _MatSortHeaderMixinBase; });
107482
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSortHeader", function() { return MatSortHeader; });
107483
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSortHeaderIntl", function() { return MatSortHeaderIntl; });
107484
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_SORT_HEADER_INTL_PROVIDER_FACTORY", function() { return MAT_SORT_HEADER_INTL_PROVIDER_FACTORY; });
107485
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_SORT_HEADER_INTL_PROVIDER", function() { return MAT_SORT_HEADER_INTL_PROVIDER; });
107486
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSortBase", function() { return MatSortBase; });
107487
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatSortMixinBase", function() { return _MatSortMixinBase; });
107488
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatSort", function() { return MatSort; });
107489
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matSortAnimations", function() { return matSortAnimations; });
107490
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
107491
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
107492
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
107493
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
107494
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
107495
/* harmony import */ var _angular_animations__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/animations */ "./node_modules/@angular/animations/fesm5/animations.js");
107496
/* harmony import */ var _angular_cdk_table__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/cdk/table */ "./node_modules/@angular/cdk/esm5/table.es5.js");
107497
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
107498
/**
107499
 * @license
107500
 * Copyright Google LLC All Rights Reserved.
107501
 *
107502
 * Use of this source code is governed by an MIT-style license that can be
107503
 * found in the LICENSE file at https://angular.io/license
107504
 */
107505
 
107506
 
107507
 
107508
 
107509
 
107510
 
107511
 
107512
 
107513
 
107514
/**
107515
 * @fileoverview added by tsickle
107516
 * @suppress {checkTypes} checked by tsc
107517
 */
107518
 
107519
/**
107520
 * \@docs-private
107521
 * @param {?} id
107522
 * @return {?}
107523
 */
107524
function getSortDuplicateSortableIdError(id) {
107525
    return Error("Cannot have two MatSortables with the same id (" + id + ").");
107526
}
107527
/**
107528
 * \@docs-private
107529
 * @return {?}
107530
 */
107531
function getSortHeaderNotContainedWithinSortError() {
107532
    return Error("MatSortHeader must be placed within a parent element with the MatSort directive.");
107533
}
107534
/**
107535
 * \@docs-private
107536
 * @return {?}
107537
 */
107538
function getSortHeaderMissingIdError() {
107539
    return Error("MatSortHeader must be provided with a unique id.");
107540
}
107541
/**
107542
 * \@docs-private
107543
 * @param {?} direction
107544
 * @return {?}
107545
 */
107546
function getSortInvalidDirectionError(direction) {
107547
    return Error(direction + " is not a valid sort direction ('asc' or 'desc').");
107548
}
107549
 
107550
/**
107551
 * @fileoverview added by tsickle
107552
 * @suppress {checkTypes} checked by tsc
107553
 */
107554
/**
107555
 * \@docs-private
107556
 */
107557
var  /**
107558
 * \@docs-private
107559
 */
107560
MatSortBase = /** @class */ (function () {
107561
    function MatSortBase() {
107562
    }
107563
    return MatSortBase;
107564
}());
107565
var /** @type {?} */ _MatSortMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_3__["mixinInitialized"])(Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_3__["mixinDisabled"])(MatSortBase));
107566
/**
107567
 * Container for MatSortables to manage the sort state and provide default sort parameters.
107568
 */
107569
var MatSort = /** @class */ (function (_super) {
107570
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatSort, _super);
107571
    function MatSort() {
107572
        var _this = _super !== null && _super.apply(this, arguments) || this;
107573
        /**
107574
         * Collection of all registered sortables that this directive manages.
107575
         */
107576
        _this.sortables = new Map();
107577
        /**
107578
         * Used to notify any child components listening to state changes.
107579
         */
107580
        _this._stateChanges = new rxjs__WEBPACK_IMPORTED_MODULE_4__["Subject"]();
107581
        /**
107582
         * The direction to set when an MatSortable is initially sorted.
107583
         * May be overriden by the MatSortable's sort start.
107584
         */
107585
        _this.start = 'asc';
107586
        _this._direction = '';
107587
        /**
107588
         * Event emitted when the user changes either the active sort or sort direction.
107589
         */
107590
        _this.sortChange = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
107591
        return _this;
107592
    }
107593
    Object.defineProperty(MatSort.prototype, "direction", {
107594
        get: /**
107595
         * The sort direction of the currently active MatSortable.
107596
         * @return {?}
107597
         */
107598
        function () { return this._direction; },
107599
        set: /**
107600
         * @param {?} direction
107601
         * @return {?}
107602
         */
107603
        function (direction) {
107604
            if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["isDevMode"])() && direction && direction !== 'asc' && direction !== 'desc') {
107605
                throw getSortInvalidDirectionError(direction);
107606
            }
107607
            this._direction = direction;
107608
        },
107609
        enumerable: true,
107610
        configurable: true
107611
    });
107612
    Object.defineProperty(MatSort.prototype, "disableClear", {
107613
        get: /**
107614
         * Whether to disable the user from clearing the sort by finishing the sort direction cycle.
107615
         * May be overriden by the MatSortable's disable clear input.
107616
         * @return {?}
107617
         */
107618
        function () { return this._disableClear; },
107619
        set: /**
107620
         * @param {?} v
107621
         * @return {?}
107622
         */
107623
        function (v) { this._disableClear = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__["coerceBooleanProperty"])(v); },
107624
        enumerable: true,
107625
        configurable: true
107626
    });
107627
    /**
107628
     * Register function to be used by the contained MatSortables. Adds the MatSortable to the
107629
     * collection of MatSortables.
107630
     */
107631
    /**
107632
     * Register function to be used by the contained MatSortables. Adds the MatSortable to the
107633
     * collection of MatSortables.
107634
     * @param {?} sortable
107635
     * @return {?}
107636
     */
107637
    MatSort.prototype.register = /**
107638
     * Register function to be used by the contained MatSortables. Adds the MatSortable to the
107639
     * collection of MatSortables.
107640
     * @param {?} sortable
107641
     * @return {?}
107642
     */
107643
    function (sortable) {
107644
        if (!sortable.id) {
107645
            throw getSortHeaderMissingIdError();
107646
        }
107647
        if (this.sortables.has(sortable.id)) {
107648
            throw getSortDuplicateSortableIdError(sortable.id);
107649
        }
107650
        this.sortables.set(sortable.id, sortable);
107651
    };
107652
    /**
107653
     * Unregister function to be used by the contained MatSortables. Removes the MatSortable from the
107654
     * collection of contained MatSortables.
107655
     */
107656
    /**
107657
     * Unregister function to be used by the contained MatSortables. Removes the MatSortable from the
107658
     * collection of contained MatSortables.
107659
     * @param {?} sortable
107660
     * @return {?}
107661
     */
107662
    MatSort.prototype.deregister = /**
107663
     * Unregister function to be used by the contained MatSortables. Removes the MatSortable from the
107664
     * collection of contained MatSortables.
107665
     * @param {?} sortable
107666
     * @return {?}
107667
     */
107668
    function (sortable) {
107669
        this.sortables.delete(sortable.id);
107670
    };
107671
    /** Sets the active sort id and determines the new sort direction. */
107672
    /**
107673
     * Sets the active sort id and determines the new sort direction.
107674
     * @param {?} sortable
107675
     * @return {?}
107676
     */
107677
    MatSort.prototype.sort = /**
107678
     * Sets the active sort id and determines the new sort direction.
107679
     * @param {?} sortable
107680
     * @return {?}
107681
     */
107682
    function (sortable) {
107683
        if (this.active != sortable.id) {
107684
            this.active = sortable.id;
107685
            this.direction = sortable.start ? sortable.start : this.start;
107686
        }
107687
        else {
107688
            this.direction = this.getNextSortDirection(sortable);
107689
        }
107690
        this.sortChange.emit({ active: this.active, direction: this.direction });
107691
    };
107692
    /** Returns the next sort direction of the active sortable, checking for potential overrides. */
107693
    /**
107694
     * Returns the next sort direction of the active sortable, checking for potential overrides.
107695
     * @param {?} sortable
107696
     * @return {?}
107697
     */
107698
    MatSort.prototype.getNextSortDirection = /**
107699
     * Returns the next sort direction of the active sortable, checking for potential overrides.
107700
     * @param {?} sortable
107701
     * @return {?}
107702
     */
107703
    function (sortable) {
107704
        if (!sortable) {
107705
            return '';
107706
        }
107707
        // Get the sort direction cycle with the potential sortable overrides.
107708
        var /** @type {?} */ disableClear = sortable.disableClear != null ? sortable.disableClear : this.disableClear;
107709
        var /** @type {?} */ sortDirectionCycle = getSortDirectionCycle(sortable.start || this.start, disableClear);
107710
        // Get and return the next direction in the cycle
107711
        var /** @type {?} */ nextDirectionIndex = sortDirectionCycle.indexOf(this.direction) + 1;
107712
        if (nextDirectionIndex >= sortDirectionCycle.length) {
107713
            nextDirectionIndex = 0;
107714
        }
107715
        return sortDirectionCycle[nextDirectionIndex];
107716
    };
107717
    /**
107718
     * @return {?}
107719
     */
107720
    MatSort.prototype.ngOnInit = /**
107721
     * @return {?}
107722
     */
107723
    function () {
107724
        this._markInitialized();
107725
    };
107726
    /**
107727
     * @return {?}
107728
     */
107729
    MatSort.prototype.ngOnChanges = /**
107730
     * @return {?}
107731
     */
107732
    function () {
107733
        this._stateChanges.next();
107734
    };
107735
    /**
107736
     * @return {?}
107737
     */
107738
    MatSort.prototype.ngOnDestroy = /**
107739
     * @return {?}
107740
     */
107741
    function () {
107742
        this._stateChanges.complete();
107743
    };
107744
    MatSort.decorators = [
107745
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
107746
                    selector: '[matSort]',
107747
                    exportAs: 'matSort',
107748
                    inputs: ['disabled: matSortDisabled']
107749
                },] },
107750
    ];
107751
    /** @nocollapse */
107752
    MatSort.propDecorators = {
107753
        "active": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['matSortActive',] },],
107754
        "start": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['matSortStart',] },],
107755
        "direction": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['matSortDirection',] },],
107756
        "disableClear": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['matSortDisableClear',] },],
107757
        "sortChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"], args: ['matSortChange',] },],
107758
    };
107759
    return MatSort;
107760
}(_MatSortMixinBase));
107761
/**
107762
 * Returns the sort direction cycle to use given the provided parameters of order and clear.
107763
 * @param {?} start
107764
 * @param {?} disableClear
107765
 * @return {?}
107766
 */
107767
function getSortDirectionCycle(start, disableClear) {
107768
    var /** @type {?} */ sortOrder = ['asc', 'desc'];
107769
    if (start == 'desc') {
107770
        sortOrder.reverse();
107771
    }
107772
    if (!disableClear) {
107773
        sortOrder.push('');
107774
    }
107775
    return sortOrder;
107776
}
107777
 
107778
/**
107779
 * @fileoverview added by tsickle
107780
 * @suppress {checkTypes} checked by tsc
107781
 */
107782
var /** @type {?} */ SORT_ANIMATION_TRANSITION = _angular_material_core__WEBPACK_IMPORTED_MODULE_3__["AnimationDurations"].ENTERING + ' ' +
107783
    _angular_material_core__WEBPACK_IMPORTED_MODULE_3__["AnimationCurves"].STANDARD_CURVE;
107784
/**
107785
 * Animations used by MatSort.
107786
 */
107787
var /** @type {?} */ matSortAnimations = {
107788
    /** Animation that moves the sort indicator. */
107789
    indicator: Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["trigger"])('indicator', [
107790
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["state"])('active-asc, asc', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ transform: 'translateY(0px)' })),
107791
        // 10px is the height of the sort indicator, minus the width of the pointers
107792
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["state"])('active-desc, desc', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ transform: 'translateY(10px)' })),
107793
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["transition"])('active-asc <=> active-desc', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["animate"])(SORT_ANIMATION_TRANSITION))
107794
    ]),
107795
    /** Animation that rotates the left pointer of the indicator based on the sorting direction. */
107796
    leftPointer: Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["trigger"])('leftPointer', [
107797
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["state"])('active-asc, asc', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ transform: 'rotate(-45deg)' })),
107798
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["state"])('active-desc, desc', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ transform: 'rotate(45deg)' })),
107799
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["transition"])('active-asc <=> active-desc', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["animate"])(SORT_ANIMATION_TRANSITION))
107800
    ]),
107801
    /** Animation that rotates the right pointer of the indicator based on the sorting direction. */
107802
    rightPointer: Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["trigger"])('rightPointer', [
107803
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["state"])('active-asc, asc', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ transform: 'rotate(45deg)' })),
107804
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["state"])('active-desc, desc', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ transform: 'rotate(-45deg)' })),
107805
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["transition"])('active-asc <=> active-desc', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["animate"])(SORT_ANIMATION_TRANSITION))
107806
    ]),
107807
    /** Animation that controls the arrow opacity. */
107808
    arrowOpacity: Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["trigger"])('arrowOpacity', [
107809
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["state"])('desc-to-active, asc-to-active, active', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ opacity: 1 })),
107810
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["state"])('desc-to-hint, asc-to-hint, hint', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ opacity: .54 })),
107811
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["state"])('hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ opacity: 0 })),
107812
        // Transition between all states except for immediate transitions
107813
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["transition"])('* => asc, * => desc, * => active, * => hint, * => void', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["animate"])('0ms')),
107814
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["transition"])('* <=> *', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["animate"])(SORT_ANIMATION_TRANSITION)),
107815
    ]),
107816
    /**
107817
       * Animation for the translation of the arrow as a whole. States are separated into two
107818
       * groups: ones with animations and others that are immediate. Immediate states are asc, desc,
107819
       * peek, and active. The other states define a specific animation (source-to-destination)
107820
       * and are determined as a function of their prev user-perceived state and what the next state
107821
       * should be.
107822
       */
107823
    arrowPosition: Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["trigger"])('arrowPosition', [
107824
        // Hidden Above => Hint Center
107825
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["transition"])('* => desc-to-hint, * => desc-to-active', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["animate"])(SORT_ANIMATION_TRANSITION, Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["keyframes"])([
107826
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ transform: 'translateY(-25%)' }),
107827
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ transform: 'translateY(0)' })
107828
        ]))),
107829
        // Hint Center => Hidden Below
107830
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["transition"])('* => hint-to-desc, * => active-to-desc', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["animate"])(SORT_ANIMATION_TRANSITION, Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["keyframes"])([
107831
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ transform: 'translateY(0)' }),
107832
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ transform: 'translateY(25%)' })
107833
        ]))),
107834
        // Hidden Below => Hint Center
107835
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["transition"])('* => asc-to-hint, * => asc-to-active', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["animate"])(SORT_ANIMATION_TRANSITION, Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["keyframes"])([
107836
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ transform: 'translateY(25%)' }),
107837
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ transform: 'translateY(0)' })
107838
        ]))),
107839
        // Hint Center => Hidden Above
107840
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["transition"])('* => hint-to-asc, * => active-to-asc', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["animate"])(SORT_ANIMATION_TRANSITION, Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["keyframes"])([
107841
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ transform: 'translateY(0)' }),
107842
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ transform: 'translateY(-25%)' })
107843
        ]))),
107844
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["state"])('desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ transform: 'translateY(0)' })),
107845
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["state"])('hint-to-desc, active-to-desc, desc', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ transform: 'translateY(-25%)' })),
107846
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["state"])('hint-to-asc, active-to-asc, asc', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ transform: 'translateY(25%)' })),
107847
    ]),
107848
    /** Necessary trigger that calls animate on children animations. */
107849
    allowChildren: Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["trigger"])('allowChildren', [
107850
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["transition"])('* <=> *', [
107851
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["query"])('@*', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["animateChild"])(), { optional: true })
107852
        ])
107853
    ]),
107854
};
107855
 
107856
/**
107857
 * @fileoverview added by tsickle
107858
 * @suppress {checkTypes} checked by tsc
107859
 */
107860
/**
107861
 * To modify the labels and text displayed, create a new instance of MatSortHeaderIntl and
107862
 * include it in a custom provider.
107863
 */
107864
var MatSortHeaderIntl = /** @class */ (function () {
107865
    function MatSortHeaderIntl() {
107866
        /**
107867
         * Stream that emits whenever the labels here are changed. Use this to notify
107868
         * components if the labels have changed after initialization.
107869
         */
107870
        this.changes = new rxjs__WEBPACK_IMPORTED_MODULE_4__["Subject"]();
107871
        /**
107872
         * ARIA label for the sorting button.
107873
         */
107874
        this.sortButtonLabel = function (id) {
107875
            return "Change sorting for " + id;
107876
        };
107877
    }
107878
    MatSortHeaderIntl.decorators = [
107879
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"], args: [{ providedIn: 'root' },] },
107880
    ];
107881
    /** @nocollapse */ MatSortHeaderIntl.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["defineInjectable"])({ factory: function MatSortHeaderIntl_Factory() { return new MatSortHeaderIntl(); }, token: MatSortHeaderIntl, providedIn: "root" });
107882
    return MatSortHeaderIntl;
107883
}());
107884
/**
107885
 * \@docs-private
107886
 * @param {?} parentIntl
107887
 * @return {?}
107888
 */
107889
function MAT_SORT_HEADER_INTL_PROVIDER_FACTORY(parentIntl) {
107890
    return parentIntl || new MatSortHeaderIntl();
107891
}
107892
/**
107893
 * \@docs-private
107894
 */
107895
var /** @type {?} */ MAT_SORT_HEADER_INTL_PROVIDER = {
107896
    // If there is already an MatSortHeaderIntl available, use that. Otherwise, provide a new one.
107897
    provide: MatSortHeaderIntl,
107898
    deps: [[new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"](), new _angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"](), MatSortHeaderIntl]],
107899
    useFactory: MAT_SORT_HEADER_INTL_PROVIDER_FACTORY
107900
};
107901
 
107902
/**
107903
 * @fileoverview added by tsickle
107904
 * @suppress {checkTypes} checked by tsc
107905
 */
107906
/**
107907
 * \@docs-private
107908
 */
107909
var  /**
107910
 * \@docs-private
107911
 */
107912
MatSortHeaderBase = /** @class */ (function () {
107913
    function MatSortHeaderBase() {
107914
    }
107915
    return MatSortHeaderBase;
107916
}());
107917
var /** @type {?} */ _MatSortHeaderMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_3__["mixinDisabled"])(MatSortHeaderBase);
107918
/**
107919
 * Applies sorting behavior (click to change sort) and styles to an element, including an
107920
 * arrow to display the current sort direction.
107921
 *
107922
 * Must be provided with an id and contained within a parent MatSort directive.
107923
 *
107924
 * If used on header cells in a CdkTable, it will automatically default its id from its containing
107925
 * column definition.
107926
 */
107927
var MatSortHeader = /** @class */ (function (_super) {
107928
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatSortHeader, _super);
107929
    function MatSortHeader(_intl, changeDetectorRef, _sort, _cdkColumnDef) {
107930
        var _this = _super.call(this) || this;
107931
        _this._intl = _intl;
107932
        _this._sort = _sort;
107933
        _this._cdkColumnDef = _cdkColumnDef;
107934
        /**
107935
         * Flag set to true when the indicator should be displayed while the sort is not active. Used to
107936
         * provide an affordance that the header is sortable by showing on focus and hover.
107937
         */
107938
        _this._showIndicatorHint = false;
107939
        /**
107940
         * The direction the arrow should be facing according to the current state.
107941
         */
107942
        _this._arrowDirection = '';
107943
        /**
107944
         * Whether the view state animation should show the transition between the `from` and `to` states.
107945
         */
107946
        _this._disableViewStateAnimation = false;
107947
        /**
107948
         * Sets the position of the arrow that displays when sorted.
107949
         */
107950
        _this.arrowPosition = 'after';
107951
        if (!_sort) {
107952
            throw getSortHeaderNotContainedWithinSortError();
107953
        }
107954
        _this._rerenderSubscription = Object(rxjs__WEBPACK_IMPORTED_MODULE_4__["merge"])(_sort.sortChange, _sort._stateChanges, _intl.changes)
107955
            .subscribe(function () {
107956
            if (_this._isSorted()) {
107957
                _this._updateArrowDirection();
107958
            }
107959
            // If this header was recently active and now no longer sorted, animate away the arrow.
107960
            if (!_this._isSorted() && _this._viewState && _this._viewState.toState === 'active') {
107961
                _this._disableViewStateAnimation = false;
107962
                _this._setAnimationTransitionState({ fromState: 'active', toState: _this._arrowDirection });
107963
            }
107964
            changeDetectorRef.markForCheck();
107965
        });
107966
        return _this;
107967
    }
107968
    Object.defineProperty(MatSortHeader.prototype, "disableClear", {
107969
        get: /**
107970
         * Overrides the disable clear value of the containing MatSort for this MatSortable.
107971
         * @return {?}
107972
         */
107973
        function () { return this._disableClear; },
107974
        set: /**
107975
         * @param {?} v
107976
         * @return {?}
107977
         */
107978
        function (v) { this._disableClear = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__["coerceBooleanProperty"])(v); },
107979
        enumerable: true,
107980
        configurable: true
107981
    });
107982
    /**
107983
     * @return {?}
107984
     */
107985
    MatSortHeader.prototype.ngOnInit = /**
107986
     * @return {?}
107987
     */
107988
    function () {
107989
        if (!this.id && this._cdkColumnDef) {
107990
            this.id = this._cdkColumnDef.name;
107991
        }
107992
        // Initialize the direction of the arrow and set the view state to be immediately that state.
107993
        this._updateArrowDirection();
107994
        this._setAnimationTransitionState({ toState: this._isSorted() ? 'active' : this._arrowDirection });
107995
        this._sort.register(this);
107996
    };
107997
    /**
107998
     * @return {?}
107999
     */
108000
    MatSortHeader.prototype.ngOnDestroy = /**
108001
     * @return {?}
108002
     */
108003
    function () {
108004
        this._sort.deregister(this);
108005
        this._rerenderSubscription.unsubscribe();
108006
    };
108007
    /**
108008
     * Sets the "hint" state such that the arrow will be semi-transparently displayed as a hint to the
108009
     * user showing what the active sort will become. If set to false, the arrow will fade away.
108010
     */
108011
    /**
108012
     * Sets the "hint" state such that the arrow will be semi-transparently displayed as a hint to the
108013
     * user showing what the active sort will become. If set to false, the arrow will fade away.
108014
     * @param {?} visible
108015
     * @return {?}
108016
     */
108017
    MatSortHeader.prototype._setIndicatorHintVisible = /**
108018
     * Sets the "hint" state such that the arrow will be semi-transparently displayed as a hint to the
108019
     * user showing what the active sort will become. If set to false, the arrow will fade away.
108020
     * @param {?} visible
108021
     * @return {?}
108022
     */
108023
    function (visible) {
108024
        // No-op if the sort header is disabled - should not make the hint visible.
108025
        if (this._isDisabled() && visible) {
108026
            return;
108027
        }
108028
        this._showIndicatorHint = visible;
108029
        if (!this._isSorted()) {
108030
            this._updateArrowDirection();
108031
            if (this._showIndicatorHint) {
108032
                this._setAnimationTransitionState({ fromState: this._arrowDirection, toState: 'hint' });
108033
            }
108034
            else {
108035
                this._setAnimationTransitionState({ fromState: 'hint', toState: this._arrowDirection });
108036
            }
108037
        }
108038
    };
108039
    /**
108040
     * Sets the animation transition view state for the arrow's position and opacity. If the
108041
     * `disableViewStateAnimation` flag is set to true, the `fromState` will be ignored so that
108042
     * no animation appears.
108043
     */
108044
    /**
108045
     * Sets the animation transition view state for the arrow's position and opacity. If the
108046
     * `disableViewStateAnimation` flag is set to true, the `fromState` will be ignored so that
108047
     * no animation appears.
108048
     * @param {?} viewState
108049
     * @return {?}
108050
     */
108051
    MatSortHeader.prototype._setAnimationTransitionState = /**
108052
     * Sets the animation transition view state for the arrow's position and opacity. If the
108053
     * `disableViewStateAnimation` flag is set to true, the `fromState` will be ignored so that
108054
     * no animation appears.
108055
     * @param {?} viewState
108056
     * @return {?}
108057
     */
108058
    function (viewState) {
108059
        this._viewState = viewState;
108060
        // If the animation for arrow position state (opacity/translation) should be disabled,
108061
        // remove the fromState so that it jumps right to the toState.
108062
        if (this._disableViewStateAnimation) {
108063
            this._viewState = { toState: viewState.toState };
108064
        }
108065
    };
108066
    /** Triggers the sort on this sort header and removes the indicator hint. */
108067
    /**
108068
     * Triggers the sort on this sort header and removes the indicator hint.
108069
     * @return {?}
108070
     */
108071
    MatSortHeader.prototype._handleClick = /**
108072
     * Triggers the sort on this sort header and removes the indicator hint.
108073
     * @return {?}
108074
     */
108075
    function () {
108076
        if (this._isDisabled()) {
108077
            return;
108078
        }
108079
        this._sort.sort(this);
108080
        // Do not show the animation if the header was already shown in the right position.
108081
        if (this._viewState.toState === 'hint' || this._viewState.toState === 'active') {
108082
            this._disableViewStateAnimation = true;
108083
        }
108084
        // If the arrow is now sorted, animate the arrow into place. Otherwise, animate it away into
108085
        // the direction it is facing.
108086
        var /** @type {?} */ viewState = this._isSorted() ?
108087
            { fromState: this._arrowDirection, toState: 'active' } :
108088
            { fromState: 'active', toState: this._arrowDirection };
108089
        this._setAnimationTransitionState(viewState);
108090
        this._showIndicatorHint = false;
108091
    };
108092
    /** Whether this MatSortHeader is currently sorted in either ascending or descending order. */
108093
    /**
108094
     * Whether this MatSortHeader is currently sorted in either ascending or descending order.
108095
     * @return {?}
108096
     */
108097
    MatSortHeader.prototype._isSorted = /**
108098
     * Whether this MatSortHeader is currently sorted in either ascending or descending order.
108099
     * @return {?}
108100
     */
108101
    function () {
108102
        return this._sort.active == this.id &&
108103
            (this._sort.direction === 'asc' || this._sort.direction === 'desc');
108104
    };
108105
    /** Returns the animation state for the arrow direction (indicator and pointers). */
108106
    /**
108107
     * Returns the animation state for the arrow direction (indicator and pointers).
108108
     * @return {?}
108109
     */
108110
    MatSortHeader.prototype._getArrowDirectionState = /**
108111
     * Returns the animation state for the arrow direction (indicator and pointers).
108112
     * @return {?}
108113
     */
108114
    function () {
108115
        return "" + (this._isSorted() ? 'active-' : '') + this._arrowDirection;
108116
    };
108117
    /** Returns the arrow position state (opacity, translation). */
108118
    /**
108119
     * Returns the arrow position state (opacity, translation).
108120
     * @return {?}
108121
     */
108122
    MatSortHeader.prototype._getArrowViewState = /**
108123
     * Returns the arrow position state (opacity, translation).
108124
     * @return {?}
108125
     */
108126
    function () {
108127
        var /** @type {?} */ fromState = this._viewState.fromState;
108128
        return (fromState ? fromState + "-to-" : '') + this._viewState.toState;
108129
    };
108130
    /**
108131
     * Updates the direction the arrow should be pointing. If it is not sorted, the arrow should be
108132
     * facing the start direction. Otherwise if it is sorted, the arrow should point in the currently
108133
     * active sorted direction. The reason this is updated through a function is because the direction
108134
     * should only be changed at specific times - when deactivated but the hint is displayed and when
108135
     * the sort is active and the direction changes. Otherwise the arrow's direction should linger
108136
     * in cases such as the sort becoming deactivated but we want to animate the arrow away while
108137
     * preserving its direction, even though the next sort direction is actually different and should
108138
     * only be changed once the arrow displays again (hint or activation).
108139
     */
108140
    /**
108141
     * Updates the direction the arrow should be pointing. If it is not sorted, the arrow should be
108142
     * facing the start direction. Otherwise if it is sorted, the arrow should point in the currently
108143
     * active sorted direction. The reason this is updated through a function is because the direction
108144
     * should only be changed at specific times - when deactivated but the hint is displayed and when
108145
     * the sort is active and the direction changes. Otherwise the arrow's direction should linger
108146
     * in cases such as the sort becoming deactivated but we want to animate the arrow away while
108147
     * preserving its direction, even though the next sort direction is actually different and should
108148
     * only be changed once the arrow displays again (hint or activation).
108149
     * @return {?}
108150
     */
108151
    MatSortHeader.prototype._updateArrowDirection = /**
108152
     * Updates the direction the arrow should be pointing. If it is not sorted, the arrow should be
108153
     * facing the start direction. Otherwise if it is sorted, the arrow should point in the currently
108154
     * active sorted direction. The reason this is updated through a function is because the direction
108155
     * should only be changed at specific times - when deactivated but the hint is displayed and when
108156
     * the sort is active and the direction changes. Otherwise the arrow's direction should linger
108157
     * in cases such as the sort becoming deactivated but we want to animate the arrow away while
108158
     * preserving its direction, even though the next sort direction is actually different and should
108159
     * only be changed once the arrow displays again (hint or activation).
108160
     * @return {?}
108161
     */
108162
    function () {
108163
        this._arrowDirection = this._isSorted() ?
108164
            this._sort.direction :
108165
            (this.start || this._sort.start);
108166
    };
108167
    /**
108168
     * @return {?}
108169
     */
108170
    MatSortHeader.prototype._isDisabled = /**
108171
     * @return {?}
108172
     */
108173
    function () {
108174
        return this._sort.disabled || this.disabled;
108175
    };
108176
    /**
108177
     * Gets the aria-sort attribute that should be applied to this sort header. If this header
108178
     * is not sorted, returns null so that the attribute is removed from the host element. Aria spec
108179
     * says that the aria-sort property should only be present on one header at a time, so removing
108180
     * ensures this is true.
108181
     */
108182
    /**
108183
     * Gets the aria-sort attribute that should be applied to this sort header. If this header
108184
     * is not sorted, returns null so that the attribute is removed from the host element. Aria spec
108185
     * says that the aria-sort property should only be present on one header at a time, so removing
108186
     * ensures this is true.
108187
     * @return {?}
108188
     */
108189
    MatSortHeader.prototype._getAriaSortAttribute = /**
108190
     * Gets the aria-sort attribute that should be applied to this sort header. If this header
108191
     * is not sorted, returns null so that the attribute is removed from the host element. Aria spec
108192
     * says that the aria-sort property should only be present on one header at a time, so removing
108193
     * ensures this is true.
108194
     * @return {?}
108195
     */
108196
    function () {
108197
        if (!this._isSorted()) {
108198
            return null;
108199
        }
108200
        return this._sort.direction == 'asc' ? 'ascending' : 'descending';
108201
    };
108202
    MatSortHeader.decorators = [
108203
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"], args: [{selector: '[mat-sort-header]',
108204
                    exportAs: 'matSortHeader',
108205
                    template: "<div class=\"mat-sort-header-container\" [class.mat-sort-header-sorted]=\"_isSorted()\" [class.mat-sort-header-position-before]=\"arrowPosition == 'before'\"><button class=\"mat-sort-header-button\" type=\"button\" [attr.disabled]=\"_isDisabled() || null\" [attr.aria-label]=\"_intl.sortButtonLabel(id)\" (focus)=\"_setIndicatorHintVisible(true)\" (blur)=\"_setIndicatorHintVisible(false)\"><ng-content></ng-content></button><div class=\"mat-sort-header-arrow\" [@arrowOpacity]=\"_getArrowViewState()\" [@arrowPosition]=\"_getArrowViewState()\" [@allowChildren]=\"_getArrowDirectionState()\" (@arrowPosition.start)=\"_disableViewStateAnimation = true\" (@arrowPosition.done)=\"_disableViewStateAnimation = false\"><div class=\"mat-sort-header-stem\"></div><div class=\"mat-sort-header-indicator\" [@indicator]=\"_getArrowDirectionState()\"><div class=\"mat-sort-header-pointer-left\" [@leftPointer]=\"_getArrowDirectionState()\"></div><div class=\"mat-sort-header-pointer-right\" [@rightPointer]=\"_getArrowDirectionState()\"></div><div class=\"mat-sort-header-pointer-middle\"></div></div></div></div>",
108206
                    styles: [".mat-sort-header-container{display:flex;cursor:pointer;align-items:center}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-button{border:none;background:0 0;display:flex;align-items:center;padding:0;cursor:inherit;outline:0;font:inherit;color:currentColor}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}@media screen and (-ms-high-contrast:active){.mat-sort-header-stem{width:0;border-left:solid 2px}}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}@media screen and (-ms-high-contrast:active){.mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}@media screen and (-ms-high-contrast:active){.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}"],
108207
                    host: {
108208
                        '(click)': '_handleClick()',
108209
                        '(mouseenter)': '_setIndicatorHintVisible(true)',
108210
                        '(longpress)': '_setIndicatorHintVisible(true)',
108211
                        '(mouseleave)': '_setIndicatorHintVisible(false)',
108212
                        '[attr.aria-sort]': '_getAriaSortAttribute()',
108213
                        '[class.mat-sort-header-disabled]': '_isDisabled()',
108214
                    },
108215
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
108216
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
108217
                    inputs: ['disabled'],
108218
                    animations: [
108219
                        matSortAnimations.indicator,
108220
                        matSortAnimations.leftPointer,
108221
                        matSortAnimations.rightPointer,
108222
                        matSortAnimations.arrowOpacity,
108223
                        matSortAnimations.arrowPosition,
108224
                        matSortAnimations.allowChildren,
108225
                    ]
108226
                },] },
108227
    ];
108228
    /** @nocollapse */
108229
    MatSortHeader.ctorParameters = function () { return [
108230
        { type: MatSortHeaderIntl, },
108231
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"], },
108232
        { type: MatSort, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] },] },
108233
        { type: _angular_cdk_table__WEBPACK_IMPORTED_MODULE_6__["CdkColumnDef"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] },] },
108234
    ]; };
108235
    MatSortHeader.propDecorators = {
108236
        "id": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['mat-sort-header',] },],
108237
        "arrowPosition": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
108238
        "start": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
108239
        "disableClear": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
108240
    };
108241
    return MatSortHeader;
108242
}(_MatSortHeaderMixinBase));
108243
 
108244
/**
108245
 * @fileoverview added by tsickle
108246
 * @suppress {checkTypes} checked by tsc
108247
 */
108248
var MatSortModule = /** @class */ (function () {
108249
    function MatSortModule() {
108250
    }
108251
    MatSortModule.decorators = [
108252
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{
108253
                    imports: [_angular_common__WEBPACK_IMPORTED_MODULE_7__["CommonModule"]],
108254
                    exports: [MatSort, MatSortHeader],
108255
                    declarations: [MatSort, MatSortHeader],
108256
                    providers: [MAT_SORT_HEADER_INTL_PROVIDER]
108257
                },] },
108258
    ];
108259
    return MatSortModule;
108260
}());
108261
 
108262
/**
108263
 * @fileoverview added by tsickle
108264
 * @suppress {checkTypes} checked by tsc
108265
 */
108266
 
108267
/**
108268
 * @fileoverview added by tsickle
108269
 * @suppress {checkTypes} checked by tsc
108270
 */
108271
 
108272
 
108273
//# sourceMappingURL=sort.es5.js.map
108274
 
108275
 
108276
/***/ }),
108277
 
108278
/***/ "./node_modules/@angular/material/esm5/stepper.es5.js":
108279
/*!************************************************************!*\
108280
  !*** ./node_modules/@angular/material/esm5/stepper.es5.js ***!
108281
  \************************************************************/
108282
/*! exports provided: MatStepperModule, MatStepLabel, MatStep, MatStepper, MatHorizontalStepper, MatVerticalStepper, MatStepperNext, MatStepperPrevious, MatStepHeader, MatStepperIntl, matStepperAnimations, MatStepperIcon */
108283
/***/ (function(module, __webpack_exports__, __webpack_require__) {
108284
 
108285
"use strict";
108286
__webpack_require__.r(__webpack_exports__);
108287
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatStepperModule", function() { return MatStepperModule; });
108288
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatStepLabel", function() { return MatStepLabel; });
108289
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatStep", function() { return MatStep; });
108290
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatStepper", function() { return MatStepper; });
108291
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatHorizontalStepper", function() { return MatHorizontalStepper; });
108292
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatVerticalStepper", function() { return MatVerticalStepper; });
108293
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatStepperNext", function() { return MatStepperNext; });
108294
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatStepperPrevious", function() { return MatStepperPrevious; });
108295
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatStepHeader", function() { return MatStepHeader; });
108296
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatStepperIntl", function() { return MatStepperIntl; });
108297
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matStepperAnimations", function() { return matStepperAnimations; });
108298
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatStepperIcon", function() { return MatStepperIcon; });
108299
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
108300
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
108301
/* harmony import */ var _angular_cdk_stepper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/cdk/stepper */ "./node_modules/@angular/cdk/esm5/stepper.es5.js");
108302
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
108303
/* harmony import */ var _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/cdk/a11y */ "./node_modules/@angular/cdk/esm5/a11y.es5.js");
108304
/* harmony import */ var _angular_animations__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/animations */ "./node_modules/@angular/animations/fesm5/animations.js");
108305
/* harmony import */ var _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/cdk/bidi */ "./node_modules/@angular/cdk/esm5/bidi.es5.js");
108306
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
108307
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
108308
/* harmony import */ var _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/cdk/portal */ "./node_modules/@angular/cdk/esm5/portal.es5.js");
108309
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
108310
/* harmony import */ var _angular_material_button__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/material/button */ "./node_modules/@angular/material/esm5/button.es5.js");
108311
/* harmony import */ var _angular_material_icon__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/material/icon */ "./node_modules/@angular/material/esm5/icon.es5.js");
108312
/**
108313
 * @license
108314
 * Copyright Google LLC All Rights Reserved.
108315
 *
108316
 * Use of this source code is governed by an MIT-style license that can be
108317
 * found in the LICENSE file at https://angular.io/license
108318
 */
108319
 
108320
 
108321
 
108322
 
108323
 
108324
 
108325
 
108326
 
108327
 
108328
 
108329
 
108330
 
108331
 
108332
 
108333
/**
108334
 * @fileoverview added by tsickle
108335
 * @suppress {checkTypes} checked by tsc
108336
 */
108337
var MatStepLabel = /** @class */ (function (_super) {
108338
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatStepLabel, _super);
108339
    function MatStepLabel(template) {
108340
        return _super.call(this, template) || this;
108341
    }
108342
    MatStepLabel.decorators = [
108343
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
108344
                    selector: '[matStepLabel]',
108345
                },] },
108346
    ];
108347
    /** @nocollapse */
108348
    MatStepLabel.ctorParameters = function () { return [
108349
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["TemplateRef"], },
108350
    ]; };
108351
    return MatStepLabel;
108352
}(_angular_cdk_stepper__WEBPACK_IMPORTED_MODULE_2__["CdkStepLabel"]));
108353
 
108354
/**
108355
 * @fileoverview added by tsickle
108356
 * @suppress {checkTypes} checked by tsc
108357
 */
108358
/**
108359
 * Stepper data that is required for internationalization.
108360
 */
108361
var MatStepperIntl = /** @class */ (function () {
108362
    function MatStepperIntl() {
108363
        /**
108364
         * Stream that emits whenever the labels here are changed. Use this to notify
108365
         * components if the labels have changed after initialization.
108366
         */
108367
        this.changes = new rxjs__WEBPACK_IMPORTED_MODULE_3__["Subject"]();
108368
        /**
108369
         * Label that is rendered below optional steps.
108370
         */
108371
        this.optionalLabel = 'Optional';
108372
    }
108373
    MatStepperIntl.decorators = [
108374
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"], args: [{ providedIn: 'root' },] },
108375
    ];
108376
    /** @nocollapse */ MatStepperIntl.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["defineInjectable"])({ factory: function MatStepperIntl_Factory() { return new MatStepperIntl(); }, token: MatStepperIntl, providedIn: "root" });
108377
    return MatStepperIntl;
108378
}());
108379
 
108380
/**
108381
 * @fileoverview added by tsickle
108382
 * @suppress {checkTypes} checked by tsc
108383
 */
108384
var MatStepHeader = /** @class */ (function () {
108385
    function MatStepHeader(_intl, _focusMonitor, _element, changeDetectorRef) {
108386
        this._intl = _intl;
108387
        this._focusMonitor = _focusMonitor;
108388
        this._element = _element;
108389
        _focusMonitor.monitor(_element.nativeElement, true);
108390
        this._intlSubscription = _intl.changes.subscribe(function () { return changeDetectorRef.markForCheck(); });
108391
    }
108392
    /**
108393
     * @return {?}
108394
     */
108395
    MatStepHeader.prototype.ngOnDestroy = /**
108396
     * @return {?}
108397
     */
108398
    function () {
108399
        this._intlSubscription.unsubscribe();
108400
        this._focusMonitor.stopMonitoring(this._element.nativeElement);
108401
    };
108402
    /** Returns string label of given step if it is a text label. */
108403
    /**
108404
     * Returns string label of given step if it is a text label.
108405
     * @return {?}
108406
     */
108407
    MatStepHeader.prototype._stringLabel = /**
108408
     * Returns string label of given step if it is a text label.
108409
     * @return {?}
108410
     */
108411
    function () {
108412
        return this.label instanceof MatStepLabel ? null : this.label;
108413
    };
108414
    /** Returns MatStepLabel if the label of given step is a template label. */
108415
    /**
108416
     * Returns MatStepLabel if the label of given step is a template label.
108417
     * @return {?}
108418
     */
108419
    MatStepHeader.prototype._templateLabel = /**
108420
     * Returns MatStepLabel if the label of given step is a template label.
108421
     * @return {?}
108422
     */
108423
    function () {
108424
        return this.label instanceof MatStepLabel ? this.label : null;
108425
    };
108426
    /** Returns the host HTML element. */
108427
    /**
108428
     * Returns the host HTML element.
108429
     * @return {?}
108430
     */
108431
    MatStepHeader.prototype._getHostElement = /**
108432
     * Returns the host HTML element.
108433
     * @return {?}
108434
     */
108435
    function () {
108436
        return this._element.nativeElement;
108437
    };
108438
    /** Template context variables that are exposed to the `matStepperIcon` instances. */
108439
    /**
108440
     * Template context variables that are exposed to the `matStepperIcon` instances.
108441
     * @return {?}
108442
     */
108443
    MatStepHeader.prototype._getIconContext = /**
108444
     * Template context variables that are exposed to the `matStepperIcon` instances.
108445
     * @return {?}
108446
     */
108447
    function () {
108448
        return {
108449
            index: this.index,
108450
            active: this.active,
108451
            optional: this.optional
108452
        };
108453
    };
108454
    /**
108455
     * @return {?}
108456
     */
108457
    MatStepHeader.prototype.focus = /**
108458
     * @return {?}
108459
     */
108460
    function () {
108461
        this._getHostElement().focus();
108462
    };
108463
    MatStepHeader.decorators = [
108464
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"], args: [{selector: 'mat-step-header',
108465
                    template: "<div class=\"mat-step-header-ripple\" mat-ripple [matRippleTrigger]=\"_getHostElement()\"></div><div [class.mat-step-icon]=\"state !== 'number' || selected\" [class.mat-step-icon-not-touched]=\"state == 'number' && !selected\" [ngSwitch]=\"state\"><ng-container *ngSwitchCase=\"'number'\" [ngSwitch]=\"!!(iconOverrides && iconOverrides.number)\"><ng-container *ngSwitchCase=\"true\" [ngTemplateOutlet]=\"iconOverrides.number\" [ngTemplateOutletContext]=\"_getIconContext()\"></ng-container><span *ngSwitchDefault>{{index + 1}}</span></ng-container><ng-container *ngSwitchCase=\"'edit'\" [ngSwitch]=\"!!(iconOverrides && iconOverrides.edit)\"><ng-container *ngSwitchCase=\"true\" [ngTemplateOutlet]=\"iconOverrides.edit\" [ngTemplateOutletContext]=\"_getIconContext()\"></ng-container><mat-icon *ngSwitchDefault>create</mat-icon></ng-container><ng-container *ngSwitchCase=\"'done'\" [ngSwitch]=\"!!(iconOverrides && iconOverrides.done)\"><ng-container *ngSwitchCase=\"true\" [ngTemplateOutlet]=\"iconOverrides.done\" [ngTemplateOutletContext]=\"_getIconContext()\"></ng-container><mat-icon *ngSwitchDefault>done</mat-icon></ng-container></div><div class=\"mat-step-label\" [class.mat-step-label-active]=\"active\" [class.mat-step-label-selected]=\"selected\"><ng-container *ngIf=\"_templateLabel()\" [ngTemplateOutlet]=\"_templateLabel()!.template\"></ng-container><div class=\"mat-step-text-label\" *ngIf=\"_stringLabel()\">{{label}}</div><div class=\"mat-step-optional\" *ngIf=\"optional\">{{_intl.optionalLabel}}</div></div>",
108466
                    styles: [".mat-step-header{overflow:hidden;outline:0;cursor:pointer;position:relative;box-sizing:content-box;-webkit-tap-highlight-color:transparent}.mat-step-optional{font-size:12px}.mat-step-icon,.mat-step-icon-not-touched{border-radius:50%;height:24px;width:24px;align-items:center;justify-content:center;display:flex;flex-shrink:0}.mat-step-icon .mat-icon{font-size:16px;height:16px;width:16px}.mat-step-label{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:50px;vertical-align:middle}.mat-step-text-label{text-overflow:ellipsis;overflow:hidden}.mat-step-header-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}"],
108467
                    host: {
108468
                        'class': 'mat-step-header',
108469
                        'role': 'tab',
108470
                    },
108471
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
108472
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
108473
                },] },
108474
    ];
108475
    /** @nocollapse */
108476
    MatStepHeader.ctorParameters = function () { return [
108477
        { type: MatStepperIntl, },
108478
        { type: _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_4__["FocusMonitor"], },
108479
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
108480
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"], },
108481
    ]; };
108482
    MatStepHeader.propDecorators = {
108483
        "state": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
108484
        "label": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
108485
        "iconOverrides": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
108486
        "index": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
108487
        "selected": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
108488
        "active": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
108489
        "optional": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
108490
    };
108491
    return MatStepHeader;
108492
}());
108493
 
108494
/**
108495
 * @fileoverview added by tsickle
108496
 * @suppress {checkTypes} checked by tsc
108497
 */
108498
/**
108499
 * Animations used by the Material steppers.
108500
 */
108501
var /** @type {?} */ matStepperAnimations = {
108502
    /** Animation that transitions the step along the X axis in a horizontal stepper. */
108503
    horizontalStepTransition: Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["trigger"])('stepTransition', [
108504
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["state"])('previous', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ transform: 'translate3d(-100%, 0, 0)', visibility: 'hidden' })),
108505
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["state"])('current', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ transform: 'none', visibility: 'visible' })),
108506
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["state"])('next', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ transform: 'translate3d(100%, 0, 0)', visibility: 'hidden' })),
108507
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["transition"])('* => *', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["animate"])('500ms cubic-bezier(0.35, 0, 0.25, 1)'))
108508
    ]),
108509
    /** Animation that transitions the step along the Y axis in a vertical stepper. */
108510
    verticalStepTransition: Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["trigger"])('stepTransition', [
108511
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["state"])('previous', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ height: '0px', visibility: 'hidden' })),
108512
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["state"])('next', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ height: '0px', visibility: 'hidden' })),
108513
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["state"])('current', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ height: '*', visibility: 'visible' })),
108514
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["transition"])('* <=> current', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["animate"])('225ms cubic-bezier(0.4, 0.0, 0.2, 1)'))
108515
    ])
108516
};
108517
 
108518
/**
108519
 * @fileoverview added by tsickle
108520
 * @suppress {checkTypes} checked by tsc
108521
 */
108522
/**
108523
 * Template to be used to override the icons inside the step header.
108524
 */
108525
var MatStepperIcon = /** @class */ (function () {
108526
    function MatStepperIcon(templateRef) {
108527
        this.templateRef = templateRef;
108528
    }
108529
    MatStepperIcon.decorators = [
108530
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
108531
                    selector: 'ng-template[matStepperIcon]',
108532
                },] },
108533
    ];
108534
    /** @nocollapse */
108535
    MatStepperIcon.ctorParameters = function () { return [
108536
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["TemplateRef"], },
108537
    ]; };
108538
    MatStepperIcon.propDecorators = {
108539
        "name": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['matStepperIcon',] },],
108540
    };
108541
    return MatStepperIcon;
108542
}());
108543
 
108544
/**
108545
 * @fileoverview added by tsickle
108546
 * @suppress {checkTypes} checked by tsc
108547
 */
108548
var MatStep = /** @class */ (function (_super) {
108549
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatStep, _super);
108550
    function MatStep(stepper, _errorStateMatcher) {
108551
        var _this = _super.call(this, stepper) || this;
108552
        _this._errorStateMatcher = _errorStateMatcher;
108553
        return _this;
108554
    }
108555
    /** Custom error state matcher that additionally checks for validity of interacted form. */
108556
    /**
108557
     * Custom error state matcher that additionally checks for validity of interacted form.
108558
     * @param {?} control
108559
     * @param {?} form
108560
     * @return {?}
108561
     */
108562
    MatStep.prototype.isErrorState = /**
108563
     * Custom error state matcher that additionally checks for validity of interacted form.
108564
     * @param {?} control
108565
     * @param {?} form
108566
     * @return {?}
108567
     */
108568
    function (control, form) {
108569
        var /** @type {?} */ originalErrorState = this._errorStateMatcher.isErrorState(control, form);
108570
        // Custom error state checks for the validity of form that is not submitted or touched
108571
        // since user can trigger a form change by calling for another step without directly
108572
        // interacting with the current form.
108573
        var /** @type {?} */ customErrorState = !!(control && control.invalid && this.interacted);
108574
        return originalErrorState || customErrorState;
108575
    };
108576
    MatStep.decorators = [
108577
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"], args: [{selector: 'mat-step',
108578
                    template: "<ng-template><ng-content></ng-content></ng-template>",
108579
                    providers: [{ provide: _angular_material_core__WEBPACK_IMPORTED_MODULE_7__["ErrorStateMatcher"], useExisting: MatStep }],
108580
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
108581
                    exportAs: 'matStep',
108582
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
108583
                },] },
108584
    ];
108585
    /** @nocollapse */
108586
    MatStep.ctorParameters = function () { return [
108587
        { type: MatStepper, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(function () { return MatStepper; }),] },] },
108588
        { type: _angular_material_core__WEBPACK_IMPORTED_MODULE_7__["ErrorStateMatcher"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"] },] },
108589
    ]; };
108590
    MatStep.propDecorators = {
108591
        "stepLabel": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChild"], args: [MatStepLabel,] },],
108592
    };
108593
    return MatStep;
108594
}(_angular_cdk_stepper__WEBPACK_IMPORTED_MODULE_2__["CdkStep"]));
108595
var MatStepper = /** @class */ (function (_super) {
108596
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatStepper, _super);
108597
    function MatStepper() {
108598
        var _this = _super !== null && _super.apply(this, arguments) || this;
108599
        /**
108600
         * Event emitted when the current step is done transitioning in.
108601
         */
108602
        _this.animationDone = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
108603
        /**
108604
         * Consumer-specified template-refs to be used to override the header icons.
108605
         */
108606
        _this._iconOverrides = {};
108607
        return _this;
108608
    }
108609
    /**
108610
     * @return {?}
108611
     */
108612
    MatStepper.prototype.ngAfterContentInit = /**
108613
     * @return {?}
108614
     */
108615
    function () {
108616
        var _this = this;
108617
        var /** @type {?} */ icons = this._icons.toArray();
108618
        ['edit', 'done', 'number'].forEach(function (name) {
108619
            var /** @type {?} */ override = icons.find(function (icon) { return icon.name === name; });
108620
            if (override) {
108621
                _this._iconOverrides[name] = override.templateRef;
108622
            }
108623
        });
108624
        // Mark the component for change detection whenever the content children query changes
108625
        this._steps.changes.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_8__["takeUntil"])(this._destroyed)).subscribe(function () { return _this._stateChanged(); });
108626
    };
108627
    /**
108628
     * @param {?} event
108629
     * @return {?}
108630
     */
108631
    MatStepper.prototype._animationDone = /**
108632
     * @param {?} event
108633
     * @return {?}
108634
     */
108635
    function (event) {
108636
        if ((/** @type {?} */ (event.toState)) === 'current') {
108637
            this.animationDone.emit();
108638
        }
108639
    };
108640
    MatStepper.decorators = [
108641
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
108642
                    selector: '[matStepper]'
108643
                },] },
108644
    ];
108645
    /** @nocollapse */
108646
    MatStepper.propDecorators = {
108647
        "_stepHeader": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChildren"], args: [MatStepHeader,] },],
108648
        "_steps": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChildren"], args: [MatStep,] },],
108649
        "_icons": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChildren"], args: [MatStepperIcon,] },],
108650
        "animationDone": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"] },],
108651
    };
108652
    return MatStepper;
108653
}(_angular_cdk_stepper__WEBPACK_IMPORTED_MODULE_2__["CdkStepper"]));
108654
var MatHorizontalStepper = /** @class */ (function (_super) {
108655
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatHorizontalStepper, _super);
108656
    function MatHorizontalStepper() {
108657
        return _super !== null && _super.apply(this, arguments) || this;
108658
    }
108659
    MatHorizontalStepper.decorators = [
108660
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"], args: [{selector: 'mat-horizontal-stepper',
108661
                    exportAs: 'matHorizontalStepper',
108662
                    template: "<div class=\"mat-horizontal-stepper-header-container\"><ng-container *ngFor=\"let step of _steps; let i = index; let isLast = last\"><mat-step-header class=\"mat-horizontal-stepper-header\" (click)=\"step.select()\" (keydown)=\"_onKeydown($event)\" [tabIndex]=\"_getFocusIndex() === i ? 0 : -1\" [id]=\"_getStepLabelId(i)\" [attr.aria-posinset]=\"i + 1\" [attr.aria-setsize]=\"_steps.length\" [attr.aria-controls]=\"_getStepContentId(i)\" [attr.aria-selected]=\"selectedIndex == i\" [attr.aria-label]=\"step.ariaLabel || null\" [attr.aria-labelledby]=\"(!step.ariaLabel && step.ariaLabelledby) ? step.ariaLabelledby : null\" [index]=\"i\" [state]=\"_getIndicatorType(i)\" [label]=\"step.stepLabel || step.label\" [selected]=\"selectedIndex === i\" [active]=\"step.completed || selectedIndex === i || !linear\" [optional]=\"step.optional\" [iconOverrides]=\"_iconOverrides\"></mat-step-header><div *ngIf=\"!isLast\" class=\"mat-stepper-horizontal-line\"></div></ng-container></div><div class=\"mat-horizontal-content-container\"><div *ngFor=\"let step of _steps; let i = index\" class=\"mat-horizontal-stepper-content\" role=\"tabpanel\" [@stepTransition]=\"_getAnimationDirection(i)\" (@stepTransition.done)=\"_animationDone($event)\" [id]=\"_getStepContentId(i)\" [attr.aria-labelledby]=\"_getStepLabelId(i)\" [attr.aria-expanded]=\"selectedIndex === i\"><ng-container [ngTemplateOutlet]=\"step.content\"></ng-container></div></div>",
108663
                    styles: [".mat-stepper-horizontal,.mat-stepper-vertical{display:block}.mat-horizontal-stepper-header-container{white-space:nowrap;display:flex;align-items:center}.mat-stepper-horizontal-line{border-top-width:1px;border-top-style:solid;flex:auto;height:0;margin:0 -16px;min-width:32px}.mat-horizontal-stepper-header{display:flex;height:72px;overflow:hidden;align-items:center;padding:0 24px}.mat-horizontal-stepper-header .mat-step-icon,.mat-horizontal-stepper-header .mat-step-icon-not-touched{margin-right:8px;flex:none}[dir=rtl] .mat-horizontal-stepper-header .mat-step-icon,[dir=rtl] .mat-horizontal-stepper-header .mat-step-icon-not-touched{margin-right:0;margin-left:8px}.mat-vertical-stepper-header{display:flex;align-items:center;padding:24px;max-height:24px}.mat-vertical-stepper-header .mat-step-icon,.mat-vertical-stepper-header .mat-step-icon-not-touched{margin-right:12px}[dir=rtl] .mat-vertical-stepper-header .mat-step-icon,[dir=rtl] .mat-vertical-stepper-header .mat-step-icon-not-touched{margin-right:0;margin-left:12px}.mat-horizontal-stepper-content[aria-expanded=false]{height:0;overflow:hidden}.mat-horizontal-content-container{overflow:hidden;padding:0 24px 24px 24px}.mat-vertical-content-container{margin-left:36px;border:0;position:relative}[dir=rtl] .mat-vertical-content-container{margin-left:0;margin-right:36px}.mat-stepper-vertical-line::before{content:'';position:absolute;top:-16px;bottom:-16px;left:0;border-left-width:1px;border-left-style:solid}[dir=rtl] .mat-stepper-vertical-line::before{left:auto;right:0}.mat-vertical-stepper-content{overflow:hidden}.mat-vertical-content{padding:0 24px 24px 24px}.mat-step:last-child .mat-vertical-content-container{border:none}"],
108664
                    inputs: ['selectedIndex'],
108665
                    host: {
108666
                        'class': 'mat-stepper-horizontal',
108667
                        'aria-orientation': 'horizontal',
108668
                        'role': 'tablist',
108669
                    },
108670
                    animations: [matStepperAnimations.horizontalStepTransition],
108671
                    providers: [{ provide: MatStepper, useExisting: MatHorizontalStepper }],
108672
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
108673
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
108674
                },] },
108675
    ];
108676
    return MatHorizontalStepper;
108677
}(MatStepper));
108678
var MatVerticalStepper = /** @class */ (function (_super) {
108679
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatVerticalStepper, _super);
108680
    function MatVerticalStepper(dir, changeDetectorRef) {
108681
        var _this = _super.call(this, dir, changeDetectorRef) || this;
108682
        _this._orientation = 'vertical';
108683
        return _this;
108684
    }
108685
    MatVerticalStepper.decorators = [
108686
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"], args: [{selector: 'mat-vertical-stepper',
108687
                    exportAs: 'matVerticalStepper',
108688
                    template: "<div class=\"mat-step\" *ngFor=\"let step of _steps; let i = index; let isLast = last\"><mat-step-header class=\"mat-vertical-stepper-header\" (click)=\"step.select()\" (keydown)=\"_onKeydown($event)\" [tabIndex]=\"_getFocusIndex() == i ? 0 : -1\" [id]=\"_getStepLabelId(i)\" [attr.aria-posinset]=\"i + 1\" [attr.aria-setsize]=\"_steps.length\" [attr.aria-controls]=\"_getStepContentId(i)\" [attr.aria-selected]=\"selectedIndex === i\" [attr.aria-label]=\"step.ariaLabel || null\" [attr.aria-labelledby]=\"(!step.ariaLabel && step.ariaLabelledby) ? step.ariaLabelledby : null\" [index]=\"i\" [state]=\"_getIndicatorType(i)\" [label]=\"step.stepLabel || step.label\" [selected]=\"selectedIndex === i\" [active]=\"step.completed || selectedIndex === i || !linear\" [optional]=\"step.optional\" [iconOverrides]=\"_iconOverrides\"></mat-step-header><div class=\"mat-vertical-content-container\" [class.mat-stepper-vertical-line]=\"!isLast\"><div class=\"mat-vertical-stepper-content\" role=\"tabpanel\" [@stepTransition]=\"_getAnimationDirection(i)\" (@stepTransition.done)=\"_animationDone($event)\" [id]=\"_getStepContentId(i)\" [attr.aria-labelledby]=\"_getStepLabelId(i)\" [attr.aria-expanded]=\"selectedIndex === i\"><div class=\"mat-vertical-content\"><ng-container [ngTemplateOutlet]=\"step.content\"></ng-container></div></div></div></div>",
108689
                    styles: [".mat-stepper-horizontal,.mat-stepper-vertical{display:block}.mat-horizontal-stepper-header-container{white-space:nowrap;display:flex;align-items:center}.mat-stepper-horizontal-line{border-top-width:1px;border-top-style:solid;flex:auto;height:0;margin:0 -16px;min-width:32px}.mat-horizontal-stepper-header{display:flex;height:72px;overflow:hidden;align-items:center;padding:0 24px}.mat-horizontal-stepper-header .mat-step-icon,.mat-horizontal-stepper-header .mat-step-icon-not-touched{margin-right:8px;flex:none}[dir=rtl] .mat-horizontal-stepper-header .mat-step-icon,[dir=rtl] .mat-horizontal-stepper-header .mat-step-icon-not-touched{margin-right:0;margin-left:8px}.mat-vertical-stepper-header{display:flex;align-items:center;padding:24px;max-height:24px}.mat-vertical-stepper-header .mat-step-icon,.mat-vertical-stepper-header .mat-step-icon-not-touched{margin-right:12px}[dir=rtl] .mat-vertical-stepper-header .mat-step-icon,[dir=rtl] .mat-vertical-stepper-header .mat-step-icon-not-touched{margin-right:0;margin-left:12px}.mat-horizontal-stepper-content[aria-expanded=false]{height:0;overflow:hidden}.mat-horizontal-content-container{overflow:hidden;padding:0 24px 24px 24px}.mat-vertical-content-container{margin-left:36px;border:0;position:relative}[dir=rtl] .mat-vertical-content-container{margin-left:0;margin-right:36px}.mat-stepper-vertical-line::before{content:'';position:absolute;top:-16px;bottom:-16px;left:0;border-left-width:1px;border-left-style:solid}[dir=rtl] .mat-stepper-vertical-line::before{left:auto;right:0}.mat-vertical-stepper-content{overflow:hidden}.mat-vertical-content{padding:0 24px 24px 24px}.mat-step:last-child .mat-vertical-content-container{border:none}"],
108690
                    inputs: ['selectedIndex'],
108691
                    host: {
108692
                        'class': 'mat-stepper-vertical',
108693
                        'aria-orientation': 'vertical',
108694
                        'role': 'tablist',
108695
                    },
108696
                    animations: [matStepperAnimations.verticalStepTransition],
108697
                    providers: [{ provide: MatStepper, useExisting: MatVerticalStepper }],
108698
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
108699
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
108700
                },] },
108701
    ];
108702
    /** @nocollapse */
108703
    MatVerticalStepper.ctorParameters = function () { return [
108704
        { type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_6__["Directionality"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] },] },
108705
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"], },
108706
    ]; };
108707
    return MatVerticalStepper;
108708
}(MatStepper));
108709
 
108710
/**
108711
 * @fileoverview added by tsickle
108712
 * @suppress {checkTypes} checked by tsc
108713
 */
108714
/**
108715
 * Button that moves to the next step in a stepper workflow.
108716
 */
108717
var MatStepperNext = /** @class */ (function (_super) {
108718
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatStepperNext, _super);
108719
    function MatStepperNext() {
108720
        return _super !== null && _super.apply(this, arguments) || this;
108721
    }
108722
    MatStepperNext.decorators = [
108723
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
108724
                    selector: 'button[matStepperNext]',
108725
                    host: {
108726
                        '(click)': '_stepper.next()',
108727
                        '[type]': 'type',
108728
                    },
108729
                    inputs: ['type'],
108730
                    providers: [{ provide: _angular_cdk_stepper__WEBPACK_IMPORTED_MODULE_2__["CdkStepper"], useExisting: MatStepper }]
108731
                },] },
108732
    ];
108733
    return MatStepperNext;
108734
}(_angular_cdk_stepper__WEBPACK_IMPORTED_MODULE_2__["CdkStepperNext"]));
108735
/**
108736
 * Button that moves to the previous step in a stepper workflow.
108737
 */
108738
var MatStepperPrevious = /** @class */ (function (_super) {
108739
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatStepperPrevious, _super);
108740
    function MatStepperPrevious() {
108741
        return _super !== null && _super.apply(this, arguments) || this;
108742
    }
108743
    MatStepperPrevious.decorators = [
108744
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
108745
                    selector: 'button[matStepperPrevious]',
108746
                    host: {
108747
                        '(click)': '_stepper.previous()',
108748
                        '[type]': 'type',
108749
                    },
108750
                    inputs: ['type'],
108751
                    providers: [{ provide: _angular_cdk_stepper__WEBPACK_IMPORTED_MODULE_2__["CdkStepper"], useExisting: MatStepper }]
108752
                },] },
108753
    ];
108754
    return MatStepperPrevious;
108755
}(_angular_cdk_stepper__WEBPACK_IMPORTED_MODULE_2__["CdkStepperPrevious"]));
108756
 
108757
/**
108758
 * @fileoverview added by tsickle
108759
 * @suppress {checkTypes} checked by tsc
108760
 */
108761
var MatStepperModule = /** @class */ (function () {
108762
    function MatStepperModule() {
108763
    }
108764
    MatStepperModule.decorators = [
108765
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{
108766
                    imports: [
108767
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_7__["MatCommonModule"],
108768
                        _angular_common__WEBPACK_IMPORTED_MODULE_10__["CommonModule"],
108769
                        _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_9__["PortalModule"],
108770
                        _angular_material_button__WEBPACK_IMPORTED_MODULE_11__["MatButtonModule"],
108771
                        _angular_cdk_stepper__WEBPACK_IMPORTED_MODULE_2__["CdkStepperModule"],
108772
                        _angular_material_icon__WEBPACK_IMPORTED_MODULE_12__["MatIconModule"],
108773
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_7__["MatRippleModule"],
108774
                    ],
108775
                    exports: [
108776
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_7__["MatCommonModule"],
108777
                        MatHorizontalStepper,
108778
                        MatVerticalStepper,
108779
                        MatStep,
108780
                        MatStepLabel,
108781
                        MatStepper,
108782
                        MatStepperNext,
108783
                        MatStepperPrevious,
108784
                        MatStepHeader,
108785
                        MatStepperIcon,
108786
                    ],
108787
                    declarations: [
108788
                        MatHorizontalStepper,
108789
                        MatVerticalStepper,
108790
                        MatStep,
108791
                        MatStepLabel,
108792
                        MatStepper,
108793
                        MatStepperNext,
108794
                        MatStepperPrevious,
108795
                        MatStepHeader,
108796
                        MatStepperIcon,
108797
                    ],
108798
                    providers: [MatStepperIntl, _angular_material_core__WEBPACK_IMPORTED_MODULE_7__["ErrorStateMatcher"]],
108799
                },] },
108800
    ];
108801
    return MatStepperModule;
108802
}());
108803
 
108804
/**
108805
 * @fileoverview added by tsickle
108806
 * @suppress {checkTypes} checked by tsc
108807
 */
108808
 
108809
/**
108810
 * @fileoverview added by tsickle
108811
 * @suppress {checkTypes} checked by tsc
108812
 */
108813
 
108814
 
108815
//# sourceMappingURL=stepper.es5.js.map
108816
 
108817
 
108818
/***/ }),
108819
 
108820
/***/ "./node_modules/@angular/material/esm5/table.es5.js":
108821
/*!**********************************************************!*\
108822
  !*** ./node_modules/@angular/material/esm5/table.es5.js ***!
108823
  \**********************************************************/
108824
/*! exports provided: MatTableModule, MatCellDef, MatHeaderCellDef, MatFooterCellDef, MatColumnDef, MatHeaderCell, MatFooterCell, MatCell, MatTable, MatHeaderRowDef, MatFooterRowDef, MatRowDef, MatHeaderRow, MatFooterRow, MatRow, MatTableDataSource */
108825
/***/ (function(module, __webpack_exports__, __webpack_require__) {
108826
 
108827
"use strict";
108828
__webpack_require__.r(__webpack_exports__);
108829
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTableModule", function() { return MatTableModule; });
108830
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCellDef", function() { return MatCellDef; });
108831
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatHeaderCellDef", function() { return MatHeaderCellDef; });
108832
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatFooterCellDef", function() { return MatFooterCellDef; });
108833
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatColumnDef", function() { return MatColumnDef; });
108834
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatHeaderCell", function() { return MatHeaderCell; });
108835
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatFooterCell", function() { return MatFooterCell; });
108836
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatCell", function() { return MatCell; });
108837
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTable", function() { return MatTable; });
108838
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatHeaderRowDef", function() { return MatHeaderRowDef; });
108839
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatFooterRowDef", function() { return MatFooterRowDef; });
108840
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatRowDef", function() { return MatRowDef; });
108841
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatHeaderRow", function() { return MatHeaderRow; });
108842
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatFooterRow", function() { return MatFooterRow; });
108843
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatRow", function() { return MatRow; });
108844
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTableDataSource", function() { return MatTableDataSource; });
108845
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
108846
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
108847
/* harmony import */ var _angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/cdk/table */ "./node_modules/@angular/cdk/esm5/table.es5.js");
108848
/* harmony import */ var _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/bidi */ "./node_modules/@angular/cdk/esm5/bidi.es5.js");
108849
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
108850
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
108851
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
108852
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
108853
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
108854
/**
108855
 * @license
108856
 * Copyright Google LLC All Rights Reserved.
108857
 *
108858
 * Use of this source code is governed by an MIT-style license that can be
108859
 * found in the LICENSE file at https://angular.io/license
108860
 */
108861
 
108862
 
108863
 
108864
 
108865
 
108866
 
108867
 
108868
 
108869
 
108870
 
108871
/**
108872
 * @fileoverview added by tsickle
108873
 * @suppress {checkTypes} checked by tsc
108874
 */
108875
/**
108876
 * Wrapper for the CdkTable with Material design styles.
108877
 * @template T
108878
 */
108879
var MatTable = /** @class */ (function (_super) {
108880
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatTable, _super);
108881
    // TODO(andrewseguin): Remove this explicitly set constructor when the compiler knows how to
108882
    // properly build the es6 version of the class. Currently sets ctorParameters to empty due to a
108883
    // fixed bug.
108884
    // https://github.com/angular/tsickle/pull/760 - tsickle PR that fixed this
108885
    // https://github.com/angular/angular/pull/23531 - updates compiler-cli to fixed version
108886
    function MatTable(_differs, _changeDetectorRef, _elementRef, role, _dir) {
108887
        var _this = _super.call(this, _differs, _changeDetectorRef, _elementRef, role, _dir) || this;
108888
        _this._differs = _differs;
108889
        _this._changeDetectorRef = _changeDetectorRef;
108890
        _this._elementRef = _elementRef;
108891
        _this._dir = _dir;
108892
        /**
108893
         * Overrides the sticky CSS class set by the `CdkTable`.
108894
         */
108895
        _this.stickyCssClass = 'mat-table-sticky';
108896
        return _this;
108897
    }
108898
    MatTable.decorators = [
108899
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"], args: [{selector: 'mat-table, table[mat-table]',
108900
                    exportAs: 'matTable',
108901
                    template: _angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CDK_TABLE_TEMPLATE"],
108902
                    styles: ["mat-table{display:block}mat-header-row{min-height:56px}mat-footer-row,mat-row{min-height:48px}mat-footer-row,mat-header-row,mat-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-footer-row::after,mat-header-row::after,mat-row::after{display:inline-block;min-height:inherit;content:''}mat-cell:first-child,mat-footer-cell:first-child,mat-header-cell:first-child{padding-left:24px}[dir=rtl] mat-cell:first-child,[dir=rtl] mat-footer-cell:first-child,[dir=rtl] mat-header-cell:first-child{padding-left:0;padding-right:24px}mat-cell:last-child,mat-footer-cell:last-child,mat-header-cell:last-child{padding-right:24px}[dir=rtl] mat-cell:last-child,[dir=rtl] mat-footer-cell:last-child,[dir=rtl] mat-header-cell:last-child{padding-right:0;padding-left:24px}mat-cell,mat-footer-cell,mat-header-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}table.mat-table{border-spacing:0}tr.mat-header-row{height:56px}tr.mat-footer-row,tr.mat-row{height:48px}th.mat-header-cell{text-align:left}td.mat-cell,td.mat-footer-cell,th.mat-header-cell{padding:0;border-bottom-width:1px;border-bottom-style:solid}td.mat-cell:first-child,td.mat-footer-cell:first-child,th.mat-header-cell:first-child{padding-left:24px}td.mat-cell:last-child,td.mat-footer-cell:last-child,th.mat-header-cell:last-child{padding-right:24px}"],
108903
                    host: {
108904
                        'class': 'mat-table',
108905
                    },
108906
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
108907
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
108908
                },] },
108909
    ];
108910
    /** @nocollapse */
108911
    MatTable.ctorParameters = function () { return [
108912
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["IterableDiffers"], },
108913
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"], },
108914
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
108915
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Attribute"], args: ['role',] },] },
108916
        { type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_3__["Directionality"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] },] },
108917
    ]; };
108918
    return MatTable;
108919
}(_angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkTable"]));
108920
 
108921
/**
108922
 * @fileoverview added by tsickle
108923
 * @suppress {checkTypes} checked by tsc
108924
 */
108925
/**
108926
 * Cell definition for the mat-table.
108927
 * Captures the template of a column's data row cell as well as cell-specific properties.
108928
 */
108929
var MatCellDef = /** @class */ (function (_super) {
108930
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatCellDef, _super);
108931
    function MatCellDef() {
108932
        return _super !== null && _super.apply(this, arguments) || this;
108933
    }
108934
    MatCellDef.decorators = [
108935
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
108936
                    selector: '[matCellDef]',
108937
                    providers: [{ provide: _angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkCellDef"], useExisting: MatCellDef }]
108938
                },] },
108939
    ];
108940
    return MatCellDef;
108941
}(_angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkCellDef"]));
108942
/**
108943
 * Header cell definition for the mat-table.
108944
 * Captures the template of a column's header cell and as well as cell-specific properties.
108945
 */
108946
var MatHeaderCellDef = /** @class */ (function (_super) {
108947
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatHeaderCellDef, _super);
108948
    function MatHeaderCellDef() {
108949
        return _super !== null && _super.apply(this, arguments) || this;
108950
    }
108951
    MatHeaderCellDef.decorators = [
108952
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
108953
                    selector: '[matHeaderCellDef]',
108954
                    providers: [{ provide: _angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkHeaderCellDef"], useExisting: MatHeaderCellDef }]
108955
                },] },
108956
    ];
108957
    return MatHeaderCellDef;
108958
}(_angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkHeaderCellDef"]));
108959
/**
108960
 * Footer cell definition for the mat-table.
108961
 * Captures the template of a column's footer cell and as well as cell-specific properties.
108962
 */
108963
var MatFooterCellDef = /** @class */ (function (_super) {
108964
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatFooterCellDef, _super);
108965
    function MatFooterCellDef() {
108966
        return _super !== null && _super.apply(this, arguments) || this;
108967
    }
108968
    MatFooterCellDef.decorators = [
108969
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
108970
                    selector: '[matFooterCellDef]',
108971
                    providers: [{ provide: _angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkFooterCellDef"], useExisting: MatFooterCellDef }]
108972
                },] },
108973
    ];
108974
    return MatFooterCellDef;
108975
}(_angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkFooterCellDef"]));
108976
/**
108977
 * Column definition for the mat-table.
108978
 * Defines a set of cells available for a table column.
108979
 */
108980
var MatColumnDef = /** @class */ (function (_super) {
108981
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatColumnDef, _super);
108982
    function MatColumnDef() {
108983
        return _super !== null && _super.apply(this, arguments) || this;
108984
    }
108985
    MatColumnDef.decorators = [
108986
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
108987
                    selector: '[matColumnDef]',
108988
                    providers: [{ provide: _angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkColumnDef"], useExisting: MatColumnDef }],
108989
                },] },
108990
    ];
108991
    /** @nocollapse */
108992
    MatColumnDef.propDecorators = {
108993
        "name": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"], args: ['matColumnDef',] },],
108994
        "sticky": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
108995
        "stickyEnd": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] },],
108996
    };
108997
    return MatColumnDef;
108998
}(_angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkColumnDef"]));
108999
/**
109000
 * Header cell template container that adds the right classes and role.
109001
 */
109002
var MatHeaderCell = /** @class */ (function (_super) {
109003
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatHeaderCell, _super);
109004
    function MatHeaderCell(columnDef, elementRef) {
109005
        var _this = _super.call(this, columnDef, elementRef) || this;
109006
        elementRef.nativeElement.classList.add("mat-column-" + columnDef.cssClassFriendlyName);
109007
        return _this;
109008
    }
109009
    MatHeaderCell.decorators = [
109010
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
109011
                    selector: 'mat-header-cell, th[mat-header-cell]',
109012
                    host: {
109013
                        'class': 'mat-header-cell',
109014
                        'role': 'columnheader',
109015
                    },
109016
                },] },
109017
    ];
109018
    /** @nocollapse */
109019
    MatHeaderCell.ctorParameters = function () { return [
109020
        { type: _angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkColumnDef"], },
109021
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
109022
    ]; };
109023
    return MatHeaderCell;
109024
}(_angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkHeaderCell"]));
109025
/**
109026
 * Footer cell template container that adds the right classes and role.
109027
 */
109028
var MatFooterCell = /** @class */ (function (_super) {
109029
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatFooterCell, _super);
109030
    function MatFooterCell(columnDef, elementRef) {
109031
        var _this = _super.call(this, columnDef, elementRef) || this;
109032
        elementRef.nativeElement.classList.add("mat-column-" + columnDef.cssClassFriendlyName);
109033
        return _this;
109034
    }
109035
    MatFooterCell.decorators = [
109036
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
109037
                    selector: 'mat-footer-cell, td[mat-footer-cell]',
109038
                    host: {
109039
                        'class': 'mat-footer-cell',
109040
                        'role': 'gridcell',
109041
                    },
109042
                },] },
109043
    ];
109044
    /** @nocollapse */
109045
    MatFooterCell.ctorParameters = function () { return [
109046
        { type: _angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkColumnDef"], },
109047
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
109048
    ]; };
109049
    return MatFooterCell;
109050
}(_angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkFooterCell"]));
109051
/**
109052
 * Cell template container that adds the right classes and role.
109053
 */
109054
var MatCell = /** @class */ (function (_super) {
109055
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatCell, _super);
109056
    function MatCell(columnDef, elementRef) {
109057
        var _this = _super.call(this, columnDef, elementRef) || this;
109058
        elementRef.nativeElement.classList.add("mat-column-" + columnDef.cssClassFriendlyName);
109059
        return _this;
109060
    }
109061
    MatCell.decorators = [
109062
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
109063
                    selector: 'mat-cell, td[mat-cell]',
109064
                    host: {
109065
                        'class': 'mat-cell',
109066
                        'role': 'gridcell',
109067
                    },
109068
                },] },
109069
    ];
109070
    /** @nocollapse */
109071
    MatCell.ctorParameters = function () { return [
109072
        { type: _angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkColumnDef"], },
109073
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
109074
    ]; };
109075
    return MatCell;
109076
}(_angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkCell"]));
109077
 
109078
/**
109079
 * @fileoverview added by tsickle
109080
 * @suppress {checkTypes} checked by tsc
109081
 */
109082
/**
109083
 * Header row definition for the mat-table.
109084
 * Captures the header row's template and other header properties such as the columns to display.
109085
 */
109086
var MatHeaderRowDef = /** @class */ (function (_super) {
109087
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatHeaderRowDef, _super);
109088
    function MatHeaderRowDef() {
109089
        return _super !== null && _super.apply(this, arguments) || this;
109090
    }
109091
    MatHeaderRowDef.decorators = [
109092
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
109093
                    selector: '[matHeaderRowDef]',
109094
                    providers: [{ provide: _angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkHeaderRowDef"], useExisting: MatHeaderRowDef }],
109095
                    inputs: ['columns: matHeaderRowDef', 'sticky: matHeaderRowDefSticky'],
109096
                },] },
109097
    ];
109098
    return MatHeaderRowDef;
109099
}(_angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkHeaderRowDef"]));
109100
/**
109101
 * Footer row definition for the mat-table.
109102
 * Captures the footer row's template and other footer properties such as the columns to display.
109103
 */
109104
var MatFooterRowDef = /** @class */ (function (_super) {
109105
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatFooterRowDef, _super);
109106
    function MatFooterRowDef() {
109107
        return _super !== null && _super.apply(this, arguments) || this;
109108
    }
109109
    MatFooterRowDef.decorators = [
109110
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
109111
                    selector: '[matFooterRowDef]',
109112
                    providers: [{ provide: _angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkFooterRowDef"], useExisting: MatFooterRowDef }],
109113
                    inputs: ['columns: matFooterRowDef', 'sticky: matFooterRowDefSticky'],
109114
                },] },
109115
    ];
109116
    return MatFooterRowDef;
109117
}(_angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkFooterRowDef"]));
109118
/**
109119
 * Data row definition for the mat-table.
109120
 * Captures the footer row's template and other footer properties such as the columns to display and
109121
 * a when predicate that describes when this row should be used.
109122
 * @template T
109123
 */
109124
var MatRowDef = /** @class */ (function (_super) {
109125
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatRowDef, _super);
109126
    function MatRowDef() {
109127
        return _super !== null && _super.apply(this, arguments) || this;
109128
    }
109129
    MatRowDef.decorators = [
109130
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
109131
                    selector: '[matRowDef]',
109132
                    providers: [{ provide: _angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkRowDef"], useExisting: MatRowDef }],
109133
                    inputs: ['columns: matRowDefColumns', 'when: matRowDefWhen'],
109134
                },] },
109135
    ];
109136
    return MatRowDef;
109137
}(_angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkRowDef"]));
109138
/**
109139
 * Footer template container that contains the cell outlet. Adds the right class and role.
109140
 */
109141
var MatHeaderRow = /** @class */ (function (_super) {
109142
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatHeaderRow, _super);
109143
    function MatHeaderRow() {
109144
        return _super !== null && _super.apply(this, arguments) || this;
109145
    }
109146
    MatHeaderRow.decorators = [
109147
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"], args: [{selector: 'mat-header-row, tr[mat-header-row]',
109148
                    template: _angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CDK_ROW_TEMPLATE"],
109149
                    host: {
109150
                        'class': 'mat-header-row',
109151
                        'role': 'row',
109152
                    },
109153
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
109154
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
109155
                    exportAs: 'matHeaderRow',
109156
                    providers: [{ provide: _angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkHeaderRow"], useExisting: MatHeaderRow }],
109157
                },] },
109158
    ];
109159
    return MatHeaderRow;
109160
}(_angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkHeaderRow"]));
109161
/**
109162
 * Footer template container that contains the cell outlet. Adds the right class and role.
109163
 */
109164
var MatFooterRow = /** @class */ (function (_super) {
109165
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatFooterRow, _super);
109166
    function MatFooterRow() {
109167
        return _super !== null && _super.apply(this, arguments) || this;
109168
    }
109169
    MatFooterRow.decorators = [
109170
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"], args: [{selector: 'mat-footer-row, tr[mat-footer-row]',
109171
                    template: _angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CDK_ROW_TEMPLATE"],
109172
                    host: {
109173
                        'class': 'mat-footer-row',
109174
                        'role': 'row',
109175
                    },
109176
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
109177
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
109178
                    exportAs: 'matFooterRow',
109179
                    providers: [{ provide: _angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkFooterRow"], useExisting: MatFooterRow }],
109180
                },] },
109181
    ];
109182
    return MatFooterRow;
109183
}(_angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkFooterRow"]));
109184
/**
109185
 * Data row template container that contains the cell outlet. Adds the right class and role.
109186
 */
109187
var MatRow = /** @class */ (function (_super) {
109188
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatRow, _super);
109189
    function MatRow() {
109190
        return _super !== null && _super.apply(this, arguments) || this;
109191
    }
109192
    MatRow.decorators = [
109193
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"], args: [{selector: 'mat-row, tr[mat-row]',
109194
                    template: _angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CDK_ROW_TEMPLATE"],
109195
                    host: {
109196
                        'class': 'mat-row',
109197
                        'role': 'row',
109198
                    },
109199
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
109200
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
109201
                    exportAs: 'matRow',
109202
                    providers: [{ provide: _angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkRow"], useExisting: MatRow }],
109203
                },] },
109204
    ];
109205
    return MatRow;
109206
}(_angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkRow"]));
109207
 
109208
/**
109209
 * @fileoverview added by tsickle
109210
 * @suppress {checkTypes} checked by tsc
109211
 */
109212
var /** @type {?} */ EXPORTED_DECLARATIONS = [
109213
    MatTable,
109214
    MatHeaderCellDef,
109215
    MatHeaderRowDef,
109216
    MatColumnDef,
109217
    MatCellDef,
109218
    MatRowDef,
109219
    MatFooterCellDef,
109220
    MatFooterRowDef,
109221
    MatHeaderCell,
109222
    MatCell,
109223
    MatFooterCell,
109224
    MatHeaderRow,
109225
    MatRow,
109226
    MatFooterRow,
109227
];
109228
var MatTableModule = /** @class */ (function () {
109229
    function MatTableModule() {
109230
    }
109231
    MatTableModule.decorators = [
109232
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{
109233
                    imports: [_angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["CdkTableModule"], _angular_common__WEBPACK_IMPORTED_MODULE_4__["CommonModule"], _angular_material_core__WEBPACK_IMPORTED_MODULE_5__["MatCommonModule"]],
109234
                    exports: EXPORTED_DECLARATIONS,
109235
                    declarations: EXPORTED_DECLARATIONS,
109236
                },] },
109237
    ];
109238
    return MatTableModule;
109239
}());
109240
 
109241
/**
109242
 * @fileoverview added by tsickle
109243
 * @suppress {checkTypes} checked by tsc
109244
 */
109245
/**
109246
 * Corresponds to `Number.MAX_SAFE_INTEGER`. Moved out into a variable here due to
109247
 * flaky browser support and the value not being defined in Closure's typings.
109248
 */
109249
var /** @type {?} */ MAX_SAFE_INTEGER = 9007199254740991;
109250
/**
109251
 * Data source that accepts a client-side data array and includes native support of filtering,
109252
 * sorting (using MatSort), and pagination (using MatPaginator).
109253
 *
109254
 * Allows for sort customization by overriding sortingDataAccessor, which defines how data
109255
 * properties are accessed. Also allows for filter customization by overriding filterTermAccessor,
109256
 * which defines how row data is converted to a string for filter matching.
109257
 * @template T
109258
 */
109259
var  /**
109260
 * Data source that accepts a client-side data array and includes native support of filtering,
109261
 * sorting (using MatSort), and pagination (using MatPaginator).
109262
 *
109263
 * Allows for sort customization by overriding sortingDataAccessor, which defines how data
109264
 * properties are accessed. Also allows for filter customization by overriding filterTermAccessor,
109265
 * which defines how row data is converted to a string for filter matching.
109266
 * @template T
109267
 */
109268
MatTableDataSource = /** @class */ (function (_super) {
109269
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatTableDataSource, _super);
109270
    function MatTableDataSource(initialData) {
109271
        if (initialData === void 0) { initialData = []; }
109272
        var _this = _super.call(this) || this;
109273
        /**
109274
         * Stream emitting render data to the table (depends on ordered data changes).
109275
         */
109276
        _this._renderData = new rxjs__WEBPACK_IMPORTED_MODULE_7__["BehaviorSubject"]([]);
109277
        /**
109278
         * Stream that emits when a new filter string is set on the data source.
109279
         */
109280
        _this._filter = new rxjs__WEBPACK_IMPORTED_MODULE_7__["BehaviorSubject"]('');
109281
        /**
109282
         * Subscription to the changes that should trigger an update to the table's rendered rows, such
109283
         * as filtering, sorting, pagination, or base data changes.
109284
         */
109285
        _this._renderChangesSubscription = rxjs__WEBPACK_IMPORTED_MODULE_7__["Subscription"].EMPTY;
109286
        /**
109287
         * Data accessor function that is used for accessing data properties for sorting through
109288
         * the default sortData function.
109289
         * This default function assumes that the sort header IDs (which defaults to the column name)
109290
         * matches the data's properties (e.g. column Xyz represents data['Xyz']).
109291
         * May be set to a custom function for different behavior.
109292
         * @param data Data object that is being accessed.
109293
         * @param sortHeaderId The name of the column that represents the data.
109294
         */
109295
        _this.sortingDataAccessor = function (data, sortHeaderId) {
109296
            var /** @type {?} */ value = data[sortHeaderId];
109297
            if (Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_6__["_isNumberValue"])(value)) {
109298
                var /** @type {?} */ numberValue = Number(value);
109299
                // Numbers beyond `MAX_SAFE_INTEGER` can't be compared reliably so we
109300
                // leave them as strings. For more info: https://goo.gl/y5vbSg
109301
                return numberValue < MAX_SAFE_INTEGER ? numberValue : value;
109302
            }
109303
            return value;
109304
        };
109305
        /**
109306
         * Gets a sorted copy of the data array based on the state of the MatSort. Called
109307
         * after changes are made to the filtered data or when sort changes are emitted from MatSort.
109308
         * By default, the function retrieves the active sort and its direction and compares data
109309
         * by retrieving data using the sortingDataAccessor. May be overridden for a custom implementation
109310
         * of data ordering.
109311
         * @param data The array of data that should be sorted.
109312
         * @param sort The connected MatSort that holds the current sort state.
109313
         */
109314
        _this.sortData = function (data, sort) {
109315
            var /** @type {?} */ active = sort.active;
109316
            var /** @type {?} */ direction = sort.direction;
109317
            if (!active || direction == '') {
109318
                return data;
109319
            }
109320
            return data.sort(function (a, b) {
109321
                var /** @type {?} */ valueA = _this.sortingDataAccessor(a, active);
109322
                var /** @type {?} */ valueB = _this.sortingDataAccessor(b, active);
109323
                // If both valueA and valueB exist (truthy), then compare the two. Otherwise, check if
109324
                // one value exists while the other doesn't. In this case, existing value should come first.
109325
                // This avoids inconsistent results when comparing values to undefined/null.
109326
                // If neither value exists, return 0 (equal).
109327
                var /** @type {?} */ comparatorResult = 0;
109328
                if (valueA != null && valueB != null) {
109329
                    // Check if one value is greater than the other; if equal, comparatorResult should remain 0.
109330
                    if (valueA > valueB) {
109331
                        comparatorResult = 1;
109332
                    }
109333
                    else if (valueA < valueB) {
109334
                        comparatorResult = -1;
109335
                    }
109336
                }
109337
                else if (valueA != null) {
109338
                    comparatorResult = 1;
109339
                }
109340
                else if (valueB != null) {
109341
                    comparatorResult = -1;
109342
                }
109343
                return comparatorResult * (direction == 'asc' ? 1 : -1);
109344
            });
109345
        };
109346
        /**
109347
         * Checks if a data object matches the data source's filter string. By default, each data object
109348
         * is converted to a string of its properties and returns true if the filter has
109349
         * at least one occurrence in that string. By default, the filter string has its whitespace
109350
         * trimmed and the match is case-insensitive. May be overridden for a custom implementation of
109351
         * filter matching.
109352
         * @param data Data object used to check against the filter.
109353
         * @param filter Filter string that has been set on the data source.
109354
         * @return Whether the filter matches against the data
109355
         */
109356
        _this.filterPredicate = function (data, filter) {
109357
            // Transform the data into a lowercase string of all property values.
109358
            var /** @type {?} */ accumulator = function (currentTerm, key) { return currentTerm + data[key]; };
109359
            var /** @type {?} */ dataStr = Object.keys(data).reduce(accumulator, '').toLowerCase();
109360
            // Transform the filter by converting it to lowercase and removing whitespace.
109361
            var /** @type {?} */ transformedFilter = filter.trim().toLowerCase();
109362
            return dataStr.indexOf(transformedFilter) != -1;
109363
        };
109364
        _this._data = new rxjs__WEBPACK_IMPORTED_MODULE_7__["BehaviorSubject"](initialData);
109365
        _this._updateChangeSubscription();
109366
        return _this;
109367
    }
109368
    Object.defineProperty(MatTableDataSource.prototype, "data", {
109369
        /** Array of data that should be rendered by the table, where each object represents one row. */
109370
        get: /**
109371
         * Array of data that should be rendered by the table, where each object represents one row.
109372
         * @return {?}
109373
         */
109374
        function () { return this._data.value; },
109375
        set: /**
109376
         * @param {?} data
109377
         * @return {?}
109378
         */
109379
        function (data) { this._data.next(data); },
109380
        enumerable: true,
109381
        configurable: true
109382
    });
109383
    Object.defineProperty(MatTableDataSource.prototype, "filter", {
109384
        /**
109385
         * Filter term that should be used to filter out objects from the data array. To override how
109386
         * data objects match to this filter string, provide a custom function for filterPredicate.
109387
         */
109388
        get: /**
109389
         * Filter term that should be used to filter out objects from the data array. To override how
109390
         * data objects match to this filter string, provide a custom function for filterPredicate.
109391
         * @return {?}
109392
         */
109393
        function () { return this._filter.value; },
109394
        set: /**
109395
         * @param {?} filter
109396
         * @return {?}
109397
         */
109398
        function (filter) { this._filter.next(filter); },
109399
        enumerable: true,
109400
        configurable: true
109401
    });
109402
    Object.defineProperty(MatTableDataSource.prototype, "sort", {
109403
        /**
109404
         * Instance of the MatSort directive used by the table to control its sorting. Sort changes
109405
         * emitted by the MatSort will trigger an update to the table's rendered data.
109406
         */
109407
        get: /**
109408
         * Instance of the MatSort directive used by the table to control its sorting. Sort changes
109409
         * emitted by the MatSort will trigger an update to the table's rendered data.
109410
         * @return {?}
109411
         */
109412
        function () { return this._sort; },
109413
        set: /**
109414
         * @param {?} sort
109415
         * @return {?}
109416
         */
109417
        function (sort) {
109418
            this._sort = sort;
109419
            this._updateChangeSubscription();
109420
        },
109421
        enumerable: true,
109422
        configurable: true
109423
    });
109424
    Object.defineProperty(MatTableDataSource.prototype, "paginator", {
109425
        /**
109426
         * Instance of the MatPaginator component used by the table to control what page of the data is
109427
         * displayed. Page changes emitted by the MatPaginator will trigger an update to the
109428
         * table's rendered data.
109429
         *
109430
         * Note that the data source uses the paginator's properties to calculate which page of data
109431
         * should be displayed. If the paginator receives its properties as template inputs,
109432
         * e.g. `[pageLength]=100` or `[pageIndex]=1`, then be sure that the paginator's view has been
109433
         * initialized before assigning it to this data source.
109434
         */
109435
        get: /**
109436
         * Instance of the MatPaginator component used by the table to control what page of the data is
109437
         * displayed. Page changes emitted by the MatPaginator will trigger an update to the
109438
         * table's rendered data.
109439
         *
109440
         * Note that the data source uses the paginator's properties to calculate which page of data
109441
         * should be displayed. If the paginator receives its properties as template inputs,
109442
         * e.g. `[pageLength]=100` or `[pageIndex]=1`, then be sure that the paginator's view has been
109443
         * initialized before assigning it to this data source.
109444
         * @return {?}
109445
         */
109446
        function () { return this._paginator; },
109447
        set: /**
109448
         * @param {?} paginator
109449
         * @return {?}
109450
         */
109451
        function (paginator) {
109452
            this._paginator = paginator;
109453
            this._updateChangeSubscription();
109454
        },
109455
        enumerable: true,
109456
        configurable: true
109457
    });
109458
    /**
109459
     * Subscribe to changes that should trigger an update to the table's rendered rows. When the
109460
     * changes occur, process the current state of the filter, sort, and pagination along with
109461
     * the provided base data and send it to the table for rendering.
109462
     */
109463
    /**
109464
     * Subscribe to changes that should trigger an update to the table's rendered rows. When the
109465
     * changes occur, process the current state of the filter, sort, and pagination along with
109466
     * the provided base data and send it to the table for rendering.
109467
     * @return {?}
109468
     */
109469
    MatTableDataSource.prototype._updateChangeSubscription = /**
109470
     * Subscribe to changes that should trigger an update to the table's rendered rows. When the
109471
     * changes occur, process the current state of the filter, sort, and pagination along with
109472
     * the provided base data and send it to the table for rendering.
109473
     * @return {?}
109474
     */
109475
    function () {
109476
        var _this = this;
109477
        // Sorting and/or pagination should be watched if MatSort and/or MatPaginator are provided.
109478
        // The events should emit whenever the component emits a change or initializes, or if no
109479
        // component is provided, a stream with just a null event should be provided.
109480
        // The `sortChange` and `pageChange` acts as a signal to the combineLatests below so that the
109481
        // pipeline can progress to the next step. Note that the value from these streams are not used,
109482
        // they purely act as a signal to progress in the pipeline.
109483
        var /** @type {?} */ sortChange = this._sort ?
109484
            Object(rxjs__WEBPACK_IMPORTED_MODULE_7__["merge"])(this._sort.sortChange, this._sort.initialized) :
109485
            Object(rxjs__WEBPACK_IMPORTED_MODULE_7__["of"])(null);
109486
        var /** @type {?} */ pageChange = this._paginator ?
109487
            Object(rxjs__WEBPACK_IMPORTED_MODULE_7__["merge"])(this._paginator.page, this._paginator.initialized) :
109488
            Object(rxjs__WEBPACK_IMPORTED_MODULE_7__["of"])(null);
109489
        var /** @type {?} */ dataStream = this._data;
109490
        // Watch for base data or filter changes to provide a filtered set of data.
109491
        var /** @type {?} */ filteredData = Object(rxjs__WEBPACK_IMPORTED_MODULE_7__["combineLatest"])(dataStream, this._filter)
109492
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_8__["map"])(function (_a) {
109493
            var data = _a[0];
109494
            return _this._filterData(data);
109495
        }));
109496
        // Watch for filtered data or sort changes to provide an ordered set of data.
109497
        var /** @type {?} */ orderedData = Object(rxjs__WEBPACK_IMPORTED_MODULE_7__["combineLatest"])(filteredData, sortChange)
109498
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_8__["map"])(function (_a) {
109499
            var data = _a[0];
109500
            return _this._orderData(data);
109501
        }));
109502
        // Watch for ordered data or page changes to provide a paged set of data.
109503
        var /** @type {?} */ paginatedData = Object(rxjs__WEBPACK_IMPORTED_MODULE_7__["combineLatest"])(orderedData, pageChange)
109504
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_8__["map"])(function (_a) {
109505
            var data = _a[0];
109506
            return _this._pageData(data);
109507
        }));
109508
        // Watched for paged data changes and send the result to the table to render.
109509
        this._renderChangesSubscription.unsubscribe();
109510
        this._renderChangesSubscription = paginatedData.subscribe(function (data) { return _this._renderData.next(data); });
109511
    };
109512
    /**
109513
     * Returns a filtered data array where each filter object contains the filter string within
109514
     * the result of the filterTermAccessor function. If no filter is set, returns the data array
109515
     * as provided.
109516
     */
109517
    /**
109518
     * Returns a filtered data array where each filter object contains the filter string within
109519
     * the result of the filterTermAccessor function. If no filter is set, returns the data array
109520
     * as provided.
109521
     * @param {?} data
109522
     * @return {?}
109523
     */
109524
    MatTableDataSource.prototype._filterData = /**
109525
     * Returns a filtered data array where each filter object contains the filter string within
109526
     * the result of the filterTermAccessor function. If no filter is set, returns the data array
109527
     * as provided.
109528
     * @param {?} data
109529
     * @return {?}
109530
     */
109531
    function (data) {
109532
        var _this = this;
109533
        // If there is a filter string, filter out data that does not contain it.
109534
        // Each data object is converted to a string using the function defined by filterTermAccessor.
109535
        // May be overridden for customization.
109536
        this.filteredData =
109537
            !this.filter ? data : data.filter(function (obj) { return _this.filterPredicate(obj, _this.filter); });
109538
        if (this.paginator) {
109539
            this._updatePaginator(this.filteredData.length);
109540
        }
109541
        return this.filteredData;
109542
    };
109543
    /**
109544
     * Returns a sorted copy of the data if MatSort has a sort applied, otherwise just returns the
109545
     * data array as provided. Uses the default data accessor for data lookup, unless a
109546
     * sortDataAccessor function is defined.
109547
     */
109548
    /**
109549
     * Returns a sorted copy of the data if MatSort has a sort applied, otherwise just returns the
109550
     * data array as provided. Uses the default data accessor for data lookup, unless a
109551
     * sortDataAccessor function is defined.
109552
     * @param {?} data
109553
     * @return {?}
109554
     */
109555
    MatTableDataSource.prototype._orderData = /**
109556
     * Returns a sorted copy of the data if MatSort has a sort applied, otherwise just returns the
109557
     * data array as provided. Uses the default data accessor for data lookup, unless a
109558
     * sortDataAccessor function is defined.
109559
     * @param {?} data
109560
     * @return {?}
109561
     */
109562
    function (data) {
109563
        // If there is no active sort or direction, return the data without trying to sort.
109564
        if (!this.sort) {
109565
            return data;
109566
        }
109567
        return this.sortData(data.slice(), this.sort);
109568
    };
109569
    /**
109570
     * Returns a paged splice of the provided data array according to the provided MatPaginator's page
109571
     * index and length. If there is no paginator provided, returns the data array as provided.
109572
     */
109573
    /**
109574
     * Returns a paged splice of the provided data array according to the provided MatPaginator's page
109575
     * index and length. If there is no paginator provided, returns the data array as provided.
109576
     * @param {?} data
109577
     * @return {?}
109578
     */
109579
    MatTableDataSource.prototype._pageData = /**
109580
     * Returns a paged splice of the provided data array according to the provided MatPaginator's page
109581
     * index and length. If there is no paginator provided, returns the data array as provided.
109582
     * @param {?} data
109583
     * @return {?}
109584
     */
109585
    function (data) {
109586
        if (!this.paginator) {
109587
            return data;
109588
        }
109589
        var /** @type {?} */ startIndex = this.paginator.pageIndex * this.paginator.pageSize;
109590
        return data.slice().splice(startIndex, this.paginator.pageSize);
109591
    };
109592
    /**
109593
     * Updates the paginator to reflect the length of the filtered data, and makes sure that the page
109594
     * index does not exceed the paginator's last page. Values are changed in a resolved promise to
109595
     * guard against making property changes within a round of change detection.
109596
     */
109597
    /**
109598
     * Updates the paginator to reflect the length of the filtered data, and makes sure that the page
109599
     * index does not exceed the paginator's last page. Values are changed in a resolved promise to
109600
     * guard against making property changes within a round of change detection.
109601
     * @param {?} filteredDataLength
109602
     * @return {?}
109603
     */
109604
    MatTableDataSource.prototype._updatePaginator = /**
109605
     * Updates the paginator to reflect the length of the filtered data, and makes sure that the page
109606
     * index does not exceed the paginator's last page. Values are changed in a resolved promise to
109607
     * guard against making property changes within a round of change detection.
109608
     * @param {?} filteredDataLength
109609
     * @return {?}
109610
     */
109611
    function (filteredDataLength) {
109612
        var _this = this;
109613
        Promise.resolve().then(function () {
109614
            if (!_this.paginator) {
109615
                return;
109616
            }
109617
            _this.paginator.length = filteredDataLength;
109618
            // If the page index is set beyond the page, reduce it to the last page.
109619
            if (_this.paginator.pageIndex > 0) {
109620
                var /** @type {?} */ lastPageIndex = Math.ceil(_this.paginator.length / _this.paginator.pageSize) - 1 || 0;
109621
                _this.paginator.pageIndex = Math.min(_this.paginator.pageIndex, lastPageIndex);
109622
            }
109623
        });
109624
    };
109625
    /**
109626
     * Used by the MatTable. Called when it connects to the data source.
109627
     * @docs-private
109628
     */
109629
    /**
109630
     * Used by the MatTable. Called when it connects to the data source.
109631
     * \@docs-private
109632
     * @return {?}
109633
     */
109634
    MatTableDataSource.prototype.connect = /**
109635
     * Used by the MatTable. Called when it connects to the data source.
109636
     * \@docs-private
109637
     * @return {?}
109638
     */
109639
    function () { return this._renderData; };
109640
    /**
109641
     * Used by the MatTable. Called when it is destroyed. No-op.
109642
     * @docs-private
109643
     */
109644
    /**
109645
     * Used by the MatTable. Called when it is destroyed. No-op.
109646
     * \@docs-private
109647
     * @return {?}
109648
     */
109649
    MatTableDataSource.prototype.disconnect = /**
109650
     * Used by the MatTable. Called when it is destroyed. No-op.
109651
     * \@docs-private
109652
     * @return {?}
109653
     */
109654
    function () { };
109655
    return MatTableDataSource;
109656
}(_angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__["DataSource"]));
109657
 
109658
/**
109659
 * @fileoverview added by tsickle
109660
 * @suppress {checkTypes} checked by tsc
109661
 */
109662
 
109663
/**
109664
 * @fileoverview added by tsickle
109665
 * @suppress {checkTypes} checked by tsc
109666
 */
109667
 
109668
 
109669
//# sourceMappingURL=table.es5.js.map
109670
 
109671
 
109672
/***/ }),
109673
 
109674
/***/ "./node_modules/@angular/material/esm5/tabs.es5.js":
109675
/*!*********************************************************!*\
109676
  !*** ./node_modules/@angular/material/esm5/tabs.es5.js ***!
109677
  \*********************************************************/
109678
/*! exports provided: MatInkBar, _MAT_INK_BAR_POSITIONER, MatTabBody, MatTabBodyPortal, MatTabHeader, MatTabLabelWrapper, MatTab, MatTabLabel, MatTabNav, MatTabLink, MatTabContent, MatTabsModule, MatTabChangeEvent, MatTabGroupBase, _MatTabGroupMixinBase, MatTabGroup, matTabsAnimations, ɵa24, ɵf24, ɵg24, ɵb24, ɵc24, ɵd24, ɵe24, ɵj24, ɵh24, ɵk24, ɵi24 */
109679
/***/ (function(module, __webpack_exports__, __webpack_require__) {
109680
 
109681
"use strict";
109682
__webpack_require__.r(__webpack_exports__);
109683
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatInkBar", function() { return MatInkBar; });
109684
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MAT_INK_BAR_POSITIONER", function() { return _MAT_INK_BAR_POSITIONER; });
109685
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTabBody", function() { return MatTabBody; });
109686
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTabBodyPortal", function() { return MatTabBodyPortal; });
109687
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTabHeader", function() { return MatTabHeader; });
109688
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTabLabelWrapper", function() { return MatTabLabelWrapper; });
109689
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTab", function() { return MatTab; });
109690
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTabLabel", function() { return MatTabLabel; });
109691
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTabNav", function() { return MatTabNav; });
109692
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTabLink", function() { return MatTabLink; });
109693
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTabContent", function() { return MatTabContent; });
109694
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTabsModule", function() { return MatTabsModule; });
109695
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTabChangeEvent", function() { return MatTabChangeEvent; });
109696
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTabGroupBase", function() { return MatTabGroupBase; });
109697
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatTabGroupMixinBase", function() { return _MatTabGroupMixinBase; });
109698
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTabGroup", function() { return MatTabGroup; });
109699
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matTabsAnimations", function() { return matTabsAnimations; });
109700
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵa24", function() { return _MAT_INK_BAR_POSITIONER_FACTORY; });
109701
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵf24", function() { return MatTabBase; });
109702
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵg24", function() { return _MatTabMixinBase; });
109703
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵb24", function() { return MatTabHeaderBase; });
109704
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵc24", function() { return _MatTabHeaderMixinBase; });
109705
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵd24", function() { return MatTabLabelWrapperBase; });
109706
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵe24", function() { return _MatTabLabelWrapperMixinBase; });
109707
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵj24", function() { return MatTabLinkBase; });
109708
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵh24", function() { return MatTabNavBase; });
109709
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵk24", function() { return _MatTabLinkMixinBase; });
109710
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵi24", function() { return _MatTabNavMixinBase; });
109711
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
109712
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
109713
/* harmony import */ var _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/cdk/portal */ "./node_modules/@angular/cdk/esm5/portal.es5.js");
109714
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
109715
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
109716
/* harmony import */ var _angular_animations__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/animations */ "./node_modules/@angular/animations/fesm5/animations.js");
109717
/* harmony import */ var _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/cdk/bidi */ "./node_modules/@angular/cdk/esm5/bidi.es5.js");
109718
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
109719
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
109720
/* harmony import */ var _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/cdk/keycodes */ "./node_modules/@angular/cdk/esm5/keycodes.es5.js");
109721
/* harmony import */ var _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/cdk/scrolling */ "./node_modules/@angular/cdk/esm5/scrolling.es5.js");
109722
/* harmony import */ var _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/cdk/a11y */ "./node_modules/@angular/cdk/esm5/a11y.es5.js");
109723
/* harmony import */ var _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/cdk/platform */ "./node_modules/@angular/cdk/esm5/platform.es5.js");
109724
/* harmony import */ var _angular_cdk_observers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @angular/cdk/observers */ "./node_modules/@angular/cdk/esm5/observers.es5.js");
109725
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
109726
/**
109727
 * @license
109728
 * Copyright Google LLC All Rights Reserved.
109729
 *
109730
 * Use of this source code is governed by an MIT-style license that can be
109731
 * found in the LICENSE file at https://angular.io/license
109732
 */
109733
 
109734
 
109735
 
109736
 
109737
 
109738
 
109739
 
109740
 
109741
 
109742
 
109743
 
109744
 
109745
 
109746
 
109747
 
109748
 
109749
/**
109750
 * @fileoverview added by tsickle
109751
 * @suppress {checkTypes} checked by tsc
109752
 */
109753
/**
109754
 * Injection token for the MatInkBar's Positioner.
109755
 */
109756
var /** @type {?} */ _MAT_INK_BAR_POSITIONER = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('MatInkBarPositioner', {
109757
    providedIn: 'root',
109758
    factory: _MAT_INK_BAR_POSITIONER_FACTORY
109759
});
109760
/**
109761
 * The default positioner function for the MatInkBar.
109762
 * \@docs-private
109763
 * @return {?}
109764
 */
109765
function _MAT_INK_BAR_POSITIONER_FACTORY() {
109766
    var /** @type {?} */ method = function (element) {
109767
        return ({
109768
            left: element ? (element.offsetLeft || 0) + 'px' : '0',
109769
            width: element ? (element.offsetWidth || 0) + 'px' : '0',
109770
        });
109771
    };
109772
    return method;
109773
}
109774
/**
109775
 * The ink-bar is used to display and animate the line underneath the current active tab label.
109776
 * \@docs-private
109777
 */
109778
var MatInkBar = /** @class */ (function () {
109779
    function MatInkBar(_elementRef, _ngZone, _inkBarPositioner) {
109780
        this._elementRef = _elementRef;
109781
        this._ngZone = _ngZone;
109782
        this._inkBarPositioner = _inkBarPositioner;
109783
    }
109784
    /**
109785
     * Calculates the styles from the provided element in order to align the ink-bar to that element.
109786
     * Shows the ink bar if previously set as hidden.
109787
     * @param element
109788
     */
109789
    /**
109790
     * Calculates the styles from the provided element in order to align the ink-bar to that element.
109791
     * Shows the ink bar if previously set as hidden.
109792
     * @param {?} element
109793
     * @return {?}
109794
     */
109795
    MatInkBar.prototype.alignToElement = /**
109796
     * Calculates the styles from the provided element in order to align the ink-bar to that element.
109797
     * Shows the ink bar if previously set as hidden.
109798
     * @param {?} element
109799
     * @return {?}
109800
     */
109801
    function (element) {
109802
        var _this = this;
109803
        this.show();
109804
        if (typeof requestAnimationFrame !== 'undefined') {
109805
            this._ngZone.runOutsideAngular(function () {
109806
                requestAnimationFrame(function () { return _this._setStyles(element); });
109807
            });
109808
        }
109809
        else {
109810
            this._setStyles(element);
109811
        }
109812
    };
109813
    /** Shows the ink bar. */
109814
    /**
109815
     * Shows the ink bar.
109816
     * @return {?}
109817
     */
109818
    MatInkBar.prototype.show = /**
109819
     * Shows the ink bar.
109820
     * @return {?}
109821
     */
109822
    function () {
109823
        this._elementRef.nativeElement.style.visibility = 'visible';
109824
    };
109825
    /** Hides the ink bar. */
109826
    /**
109827
     * Hides the ink bar.
109828
     * @return {?}
109829
     */
109830
    MatInkBar.prototype.hide = /**
109831
     * Hides the ink bar.
109832
     * @return {?}
109833
     */
109834
    function () {
109835
        this._elementRef.nativeElement.style.visibility = 'hidden';
109836
    };
109837
    /**
109838
     * Sets the proper styles to the ink bar element.
109839
     * @param {?} element
109840
     * @return {?}
109841
     */
109842
    MatInkBar.prototype._setStyles = /**
109843
     * Sets the proper styles to the ink bar element.
109844
     * @param {?} element
109845
     * @return {?}
109846
     */
109847
    function (element) {
109848
        var /** @type {?} */ positions = this._inkBarPositioner(element);
109849
        var /** @type {?} */ inkBar = this._elementRef.nativeElement;
109850
        inkBar.style.left = positions.left;
109851
        inkBar.style.width = positions.width;
109852
    };
109853
    MatInkBar.decorators = [
109854
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
109855
                    selector: 'mat-ink-bar',
109856
                    host: {
109857
                        'class': 'mat-ink-bar',
109858
                    },
109859
                },] },
109860
    ];
109861
    /** @nocollapse */
109862
    MatInkBar.ctorParameters = function () { return [
109863
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
109864
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], },
109865
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_MAT_INK_BAR_POSITIONER,] },] },
109866
    ]; };
109867
    return MatInkBar;
109868
}());
109869
 
109870
/**
109871
 * @fileoverview added by tsickle
109872
 * @suppress {checkTypes} checked by tsc
109873
 */
109874
/**
109875
 * Used to flag tab labels for use with the portal directive
109876
 */
109877
var MatTabLabel = /** @class */ (function (_super) {
109878
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(MatTabLabel, _super);
109879
    function MatTabLabel(templateRef, viewContainerRef) {
109880
        return _super.call(this, templateRef, viewContainerRef) || this;
109881
    }
109882
    MatTabLabel.decorators = [
109883
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
109884
                    selector: '[mat-tab-label], [matTabLabel]',
109885
                },] },
109886
    ];
109887
    /** @nocollapse */
109888
    MatTabLabel.ctorParameters = function () { return [
109889
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"], },
109890
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
109891
    ]; };
109892
    return MatTabLabel;
109893
}(_angular_cdk_portal__WEBPACK_IMPORTED_MODULE_2__["CdkPortal"]));
109894
 
109895
/**
109896
 * @fileoverview added by tsickle
109897
 * @suppress {checkTypes} checked by tsc
109898
 */
109899
/**
109900
 * Decorates the `ng-template` tags and reads out the template from it.
109901
 */
109902
var MatTabContent = /** @class */ (function () {
109903
    function MatTabContent(template) {
109904
        this.template = template;
109905
    }
109906
    MatTabContent.decorators = [
109907
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[matTabContent]' },] },
109908
    ];
109909
    /** @nocollapse */
109910
    MatTabContent.ctorParameters = function () { return [
109911
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"], },
109912
    ]; };
109913
    return MatTabContent;
109914
}());
109915
 
109916
/**
109917
 * @fileoverview added by tsickle
109918
 * @suppress {checkTypes} checked by tsc
109919
 */
109920
/**
109921
 * \@docs-private
109922
 */
109923
var  /**
109924
 * \@docs-private
109925
 */
109926
MatTabBase = /** @class */ (function () {
109927
    function MatTabBase() {
109928
    }
109929
    return MatTabBase;
109930
}());
109931
var /** @type {?} */ _MatTabMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_3__["mixinDisabled"])(MatTabBase);
109932
var MatTab = /** @class */ (function (_super) {
109933
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(MatTab, _super);
109934
    function MatTab(_viewContainerRef) {
109935
        var _this = _super.call(this) || this;
109936
        _this._viewContainerRef = _viewContainerRef;
109937
        /**
109938
         * Plain text label for the tab, used when there is no template label.
109939
         */
109940
        _this.textLabel = '';
109941
        /**
109942
         * Portal that will be the hosted content of the tab
109943
         */
109944
        _this._contentPortal = null;
109945
        /**
109946
         * Emits whenever the label changes.
109947
         */
109948
        _this._labelChange = new rxjs__WEBPACK_IMPORTED_MODULE_4__["Subject"]();
109949
        /**
109950
         * Emits whenever the disable changes
109951
         */
109952
        _this._disableChange = new rxjs__WEBPACK_IMPORTED_MODULE_4__["Subject"]();
109953
        /**
109954
         * The relatively indexed position where 0 represents the center, negative is left, and positive
109955
         * represents the right.
109956
         */
109957
        _this.position = null;
109958
        /**
109959
         * The initial relatively index origin of the tab if it was created and selected after there
109960
         * was already a selected tab. Provides context of what position the tab should originate from.
109961
         */
109962
        _this.origin = null;
109963
        /**
109964
         * Whether the tab is currently active.
109965
         */
109966
        _this.isActive = false;
109967
        return _this;
109968
    }
109969
    Object.defineProperty(MatTab.prototype, "content", {
109970
        /** @docs-private */
109971
        get: /**
109972
         * \@docs-private
109973
         * @return {?}
109974
         */
109975
        function () {
109976
            return this._contentPortal;
109977
        },
109978
        enumerable: true,
109979
        configurable: true
109980
    });
109981
    /**
109982
     * @param {?} changes
109983
     * @return {?}
109984
     */
109985
    MatTab.prototype.ngOnChanges = /**
109986
     * @param {?} changes
109987
     * @return {?}
109988
     */
109989
    function (changes) {
109990
        if (changes.hasOwnProperty('textLabel')) {
109991
            this._labelChange.next();
109992
        }
109993
        if (changes.hasOwnProperty('disabled')) {
109994
            this._disableChange.next();
109995
        }
109996
    };
109997
    /**
109998
     * @return {?}
109999
     */
110000
    MatTab.prototype.ngOnDestroy = /**
110001
     * @return {?}
110002
     */
110003
    function () {
110004
        this._disableChange.complete();
110005
        this._labelChange.complete();
110006
    };
110007
    /**
110008
     * @return {?}
110009
     */
110010
    MatTab.prototype.ngOnInit = /**
110011
     * @return {?}
110012
     */
110013
    function () {
110014
        this._contentPortal = new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_2__["TemplatePortal"](this._explicitContent || this._implicitContent, this._viewContainerRef);
110015
    };
110016
    MatTab.decorators = [
110017
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-tab',
110018
                    template: "<ng-template><ng-content></ng-content></ng-template>",
110019
                    inputs: ['disabled'],
110020
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
110021
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
110022
                    exportAs: 'matTab',
110023
                },] },
110024
    ];
110025
    /** @nocollapse */
110026
    MatTab.ctorParameters = function () { return [
110027
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
110028
    ]; };
110029
    MatTab.propDecorators = {
110030
        "templateLabel": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"], args: [MatTabLabel,] },],
110031
        "_explicitContent": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"], args: [MatTabContent, { read: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"] },] },],
110032
        "_implicitContent": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"],] },],
110033
        "textLabel": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['label',] },],
110034
        "ariaLabel": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['aria-label',] },],
110035
        "ariaLabelledby": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['aria-labelledby',] },],
110036
    };
110037
    return MatTab;
110038
}(_MatTabMixinBase));
110039
 
110040
/**
110041
 * @fileoverview added by tsickle
110042
 * @suppress {checkTypes} checked by tsc
110043
 */
110044
/**
110045
 * Animations used by the Material tabs.
110046
 */
110047
var /** @type {?} */ matTabsAnimations = {
110048
    /** Animation translates a tab along the X axis. */
110049
    translateTab: Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["trigger"])('translateTab', [
110050
        // Note: transitions to `none` instead of 0, because some browsers might blur the content.
110051
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["state"])('center, void, left-origin-center, right-origin-center', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ transform: 'none' })),
110052
        // If the tab is either on the left or right, we additionally add a `min-height` of 1px
110053
        // in order to ensure that the element has a height before its state changes. This is
110054
        // necessary because Chrome does seem to skip the transition in RTL mode if the element does
110055
        // not have a static height and is not rendered. See related issue: #9465
110056
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["state"])('left', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ transform: 'translate3d(-100%, 0, 0)', minHeight: '1px' })),
110057
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["state"])('right', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ transform: 'translate3d(100%, 0, 0)', minHeight: '1px' })),
110058
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["transition"])('* => left, * => right, left => center, right => center', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["animate"])('500ms cubic-bezier(0.35, 0, 0.25, 1)')),
110059
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["transition"])('void => left-origin-center', [
110060
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ transform: 'translate3d(-100%, 0, 0)' }),
110061
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["animate"])('500ms cubic-bezier(0.35, 0, 0.25, 1)')
110062
        ]),
110063
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["transition"])('void => right-origin-center', [
110064
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["style"])({ transform: 'translate3d(100%, 0, 0)' }),
110065
            Object(_angular_animations__WEBPACK_IMPORTED_MODULE_5__["animate"])('500ms cubic-bezier(0.35, 0, 0.25, 1)')
110066
        ])
110067
    ])
110068
};
110069
 
110070
/**
110071
 * @fileoverview added by tsickle
110072
 * @suppress {checkTypes} checked by tsc
110073
 */
110074
/**
110075
 * The portal host directive for the contents of the tab.
110076
 * \@docs-private
110077
 */
110078
var MatTabBodyPortal = /** @class */ (function (_super) {
110079
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(MatTabBodyPortal, _super);
110080
    function MatTabBodyPortal(componentFactoryResolver, viewContainerRef, _host) {
110081
        var _this = _super.call(this, componentFactoryResolver, viewContainerRef) || this;
110082
        _this._host = _host;
110083
        /**
110084
         * Subscription to events for when the tab body begins centering.
110085
         */
110086
        _this._centeringSub = rxjs__WEBPACK_IMPORTED_MODULE_4__["Subscription"].EMPTY;
110087
        /**
110088
         * Subscription to events for when the tab body finishes leaving from center position.
110089
         */
110090
        _this._leavingSub = rxjs__WEBPACK_IMPORTED_MODULE_4__["Subscription"].EMPTY;
110091
        return _this;
110092
    }
110093
    /** Set initial visibility or set up subscription for changing visibility. */
110094
    /**
110095
     * Set initial visibility or set up subscription for changing visibility.
110096
     * @return {?}
110097
     */
110098
    MatTabBodyPortal.prototype.ngOnInit = /**
110099
     * Set initial visibility or set up subscription for changing visibility.
110100
     * @return {?}
110101
     */
110102
    function () {
110103
        var _this = this;
110104
        _super.prototype.ngOnInit.call(this);
110105
        this._centeringSub = this._host._beforeCentering
110106
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_7__["startWith"])(this._host._isCenterPosition(this._host._position)))
110107
            .subscribe(function (isCentering) {
110108
            if (isCentering && !_this.hasAttached()) {
110109
                _this.attach(_this._host._content);
110110
            }
110111
        });
110112
        this._leavingSub = this._host._afterLeavingCenter.subscribe(function () {
110113
            _this.detach();
110114
        });
110115
    };
110116
    /** Clean up centering subscription. */
110117
    /**
110118
     * Clean up centering subscription.
110119
     * @return {?}
110120
     */
110121
    MatTabBodyPortal.prototype.ngOnDestroy = /**
110122
     * Clean up centering subscription.
110123
     * @return {?}
110124
     */
110125
    function () {
110126
        _super.prototype.ngOnDestroy.call(this);
110127
        this._centeringSub.unsubscribe();
110128
        this._leavingSub.unsubscribe();
110129
    };
110130
    MatTabBodyPortal.decorators = [
110131
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
110132
                    selector: '[matTabBodyHost]'
110133
                },] },
110134
    ];
110135
    /** @nocollapse */
110136
    MatTabBodyPortal.ctorParameters = function () { return [
110137
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ComponentFactoryResolver"], },
110138
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
110139
        { type: MatTabBody, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () { return MatTabBody; }),] },] },
110140
    ]; };
110141
    return MatTabBodyPortal;
110142
}(_angular_cdk_portal__WEBPACK_IMPORTED_MODULE_2__["CdkPortalOutlet"]));
110143
/**
110144
 * Wrapper for the contents of a tab.
110145
 * \@docs-private
110146
 */
110147
var MatTabBody = /** @class */ (function () {
110148
    function MatTabBody(_elementRef, _dir, /**
110149
                   * @breaking-change 7.0.0 changeDetectorRef to be made required.
110150
                   */
110151
    /**
110152
     * @breaking-change 7.0.0 changeDetectorRef to be made required.
110153
     */
110154
    changeDetectorRef) {
110155
        var _this = this;
110156
        this._elementRef = _elementRef;
110157
        this._dir = _dir;
110158
        /**
110159
         * Subscription to the directionality change observable.
110160
         */
110161
        this._dirChangeSubscription = rxjs__WEBPACK_IMPORTED_MODULE_4__["Subscription"].EMPTY;
110162
        /**
110163
         * Event emitted when the tab begins to animate towards the center as the active tab.
110164
         */
110165
        this._onCentering = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
110166
        /**
110167
         * Event emitted before the centering of the tab begins.
110168
         */
110169
        this._beforeCentering = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
110170
        /**
110171
         * Event emitted before the centering of the tab begins.
110172
         */
110173
        this._afterLeavingCenter = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
110174
        /**
110175
         * Event emitted when the tab completes its animation towards the center.
110176
         */
110177
        this._onCentered = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"](true);
110178
        if (this._dir && changeDetectorRef) {
110179
            this._dirChangeSubscription = this._dir.change.subscribe(function (dir) {
110180
                _this._computePositionAnimationState(dir);
110181
                changeDetectorRef.markForCheck();
110182
            });
110183
        }
110184
    }
110185
    Object.defineProperty(MatTabBody.prototype, "position", {
110186
        set: /**
110187
         * The shifted index position of the tab body, where zero represents the active center tab.
110188
         * @param {?} position
110189
         * @return {?}
110190
         */
110191
        function (position) {
110192
            this._positionIndex = position;
110193
            this._computePositionAnimationState();
110194
        },
110195
        enumerable: true,
110196
        configurable: true
110197
    });
110198
    /**
110199
     * After initialized, check if the content is centered and has an origin. If so, set the
110200
     * special position states that transition the tab from the left or right before centering.
110201
     */
110202
    /**
110203
     * After initialized, check if the content is centered and has an origin. If so, set the
110204
     * special position states that transition the tab from the left or right before centering.
110205
     * @return {?}
110206
     */
110207
    MatTabBody.prototype.ngOnInit = /**
110208
     * After initialized, check if the content is centered and has an origin. If so, set the
110209
     * special position states that transition the tab from the left or right before centering.
110210
     * @return {?}
110211
     */
110212
    function () {
110213
        if (this._position == 'center' && this.origin != null) {
110214
            this._position = this._computePositionFromOrigin();
110215
        }
110216
    };
110217
    /**
110218
     * @return {?}
110219
     */
110220
    MatTabBody.prototype.ngOnDestroy = /**
110221
     * @return {?}
110222
     */
110223
    function () {
110224
        this._dirChangeSubscription.unsubscribe();
110225
    };
110226
    /**
110227
     * @param {?} e
110228
     * @return {?}
110229
     */
110230
    MatTabBody.prototype._onTranslateTabStarted = /**
110231
     * @param {?} e
110232
     * @return {?}
110233
     */
110234
    function (e) {
110235
        var /** @type {?} */ isCentering = this._isCenterPosition(e.toState);
110236
        this._beforeCentering.emit(isCentering);
110237
        if (isCentering) {
110238
            this._onCentering.emit(this._elementRef.nativeElement.clientHeight);
110239
        }
110240
    };
110241
    /**
110242
     * @param {?} e
110243
     * @return {?}
110244
     */
110245
    MatTabBody.prototype._onTranslateTabComplete = /**
110246
     * @param {?} e
110247
     * @return {?}
110248
     */
110249
    function (e) {
110250
        // If the transition to the center is complete, emit an event.
110251
        if (this._isCenterPosition(e.toState) && this._isCenterPosition(this._position)) {
110252
            this._onCentered.emit();
110253
        }
110254
        if (this._isCenterPosition(e.fromState) && !this._isCenterPosition(this._position)) {
110255
            this._afterLeavingCenter.emit();
110256
        }
110257
    };
110258
    /** The text direction of the containing app. */
110259
    /**
110260
     * The text direction of the containing app.
110261
     * @return {?}
110262
     */
110263
    MatTabBody.prototype._getLayoutDirection = /**
110264
     * The text direction of the containing app.
110265
     * @return {?}
110266
     */
110267
    function () {
110268
        return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';
110269
    };
110270
    /** Whether the provided position state is considered center, regardless of origin. */
110271
    /**
110272
     * Whether the provided position state is considered center, regardless of origin.
110273
     * @param {?} position
110274
     * @return {?}
110275
     */
110276
    MatTabBody.prototype._isCenterPosition = /**
110277
     * Whether the provided position state is considered center, regardless of origin.
110278
     * @param {?} position
110279
     * @return {?}
110280
     */
110281
    function (position) {
110282
        return position == 'center' ||
110283
            position == 'left-origin-center' ||
110284
            position == 'right-origin-center';
110285
    };
110286
    /**
110287
     * Computes the position state that will be used for the tab-body animation trigger.
110288
     * @param {?=} dir
110289
     * @return {?}
110290
     */
110291
    MatTabBody.prototype._computePositionAnimationState = /**
110292
     * Computes the position state that will be used for the tab-body animation trigger.
110293
     * @param {?=} dir
110294
     * @return {?}
110295
     */
110296
    function (dir) {
110297
        if (dir === void 0) { dir = this._getLayoutDirection(); }
110298
        if (this._positionIndex < 0) {
110299
            this._position = dir == 'ltr' ? 'left' : 'right';
110300
        }
110301
        else if (this._positionIndex > 0) {
110302
            this._position = dir == 'ltr' ? 'right' : 'left';
110303
        }
110304
        else {
110305
            this._position = 'center';
110306
        }
110307
    };
110308
    /**
110309
     * Computes the position state based on the specified origin position. This is used if the
110310
     * tab is becoming visible immediately after creation.
110311
     * @return {?}
110312
     */
110313
    MatTabBody.prototype._computePositionFromOrigin = /**
110314
     * Computes the position state based on the specified origin position. This is used if the
110315
     * tab is becoming visible immediately after creation.
110316
     * @return {?}
110317
     */
110318
    function () {
110319
        var /** @type {?} */ dir = this._getLayoutDirection();
110320
        if ((dir == 'ltr' && this.origin <= 0) || (dir == 'rtl' && this.origin > 0)) {
110321
            return 'left-origin-center';
110322
        }
110323
        return 'right-origin-center';
110324
    };
110325
    MatTabBody.decorators = [
110326
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-tab-body',
110327
                    template: "<div class=\"mat-tab-body-content\" #content [@translateTab]=\"_position\" (@translateTab.start)=\"_onTranslateTabStarted($event)\" (@translateTab.done)=\"_onTranslateTabComplete($event)\"><ng-template matTabBodyHost></ng-template></div>",
110328
                    styles: [".mat-tab-body-content{height:100%;overflow:auto}.mat-tab-group-dynamic-height .mat-tab-body-content{overflow:hidden}"],
110329
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
110330
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
110331
                    animations: [matTabsAnimations.translateTab],
110332
                    host: {
110333
                        'class': 'mat-tab-body',
110334
                    },
110335
                },] },
110336
    ];
110337
    /** @nocollapse */
110338
    MatTabBody.ctorParameters = function () { return [
110339
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
110340
        { type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_6__["Directionality"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
110341
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"], },
110342
    ]; };
110343
    MatTabBody.propDecorators = {
110344
        "_onCentering": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
110345
        "_beforeCentering": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
110346
        "_afterLeavingCenter": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
110347
        "_onCentered": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
110348
        "_portalHost": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: [_angular_cdk_portal__WEBPACK_IMPORTED_MODULE_2__["PortalHostDirective"],] },],
110349
        "_content": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['content',] },],
110350
        "origin": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
110351
        "position": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
110352
    };
110353
    return MatTabBody;
110354
}());
110355
 
110356
/**
110357
 * @fileoverview added by tsickle
110358
 * @suppress {checkTypes} checked by tsc
110359
 */
110360
/**
110361
 * \@docs-private
110362
 */
110363
var  /**
110364
 * \@docs-private
110365
 */
110366
MatTabLabelWrapperBase = /** @class */ (function () {
110367
    function MatTabLabelWrapperBase() {
110368
    }
110369
    return MatTabLabelWrapperBase;
110370
}());
110371
var /** @type {?} */ _MatTabLabelWrapperMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_3__["mixinDisabled"])(MatTabLabelWrapperBase);
110372
/**
110373
 * Used in the `mat-tab-group` view to display tab labels.
110374
 * \@docs-private
110375
 */
110376
var MatTabLabelWrapper = /** @class */ (function (_super) {
110377
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(MatTabLabelWrapper, _super);
110378
    function MatTabLabelWrapper(elementRef) {
110379
        var _this = _super.call(this) || this;
110380
        _this.elementRef = elementRef;
110381
        return _this;
110382
    }
110383
    /** Sets focus on the wrapper element */
110384
    /**
110385
     * Sets focus on the wrapper element
110386
     * @return {?}
110387
     */
110388
    MatTabLabelWrapper.prototype.focus = /**
110389
     * Sets focus on the wrapper element
110390
     * @return {?}
110391
     */
110392
    function () {
110393
        this.elementRef.nativeElement.focus();
110394
    };
110395
    /**
110396
     * @return {?}
110397
     */
110398
    MatTabLabelWrapper.prototype.getOffsetLeft = /**
110399
     * @return {?}
110400
     */
110401
    function () {
110402
        return this.elementRef.nativeElement.offsetLeft;
110403
    };
110404
    /**
110405
     * @return {?}
110406
     */
110407
    MatTabLabelWrapper.prototype.getOffsetWidth = /**
110408
     * @return {?}
110409
     */
110410
    function () {
110411
        return this.elementRef.nativeElement.offsetWidth;
110412
    };
110413
    MatTabLabelWrapper.decorators = [
110414
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
110415
                    selector: '[matTabLabelWrapper]',
110416
                    inputs: ['disabled'],
110417
                    host: {
110418
                        '[class.mat-tab-disabled]': 'disabled',
110419
                        '[attr.aria-disabled]': '!!disabled',
110420
                    }
110421
                },] },
110422
    ];
110423
    /** @nocollapse */
110424
    MatTabLabelWrapper.ctorParameters = function () { return [
110425
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
110426
    ]; };
110427
    return MatTabLabelWrapper;
110428
}(_MatTabLabelWrapperMixinBase));
110429
 
110430
/**
110431
 * @fileoverview added by tsickle
110432
 * @suppress {checkTypes} checked by tsc
110433
 */
110434
/**
110435
 * The distance in pixels that will be overshot when scrolling a tab label into view. This helps
110436
 * provide a small affordance to the label next to it.
110437
 */
110438
var /** @type {?} */ EXAGGERATED_OVERSCROLL = 60;
110439
/**
110440
 * \@docs-private
110441
 */
110442
var  /**
110443
 * \@docs-private
110444
 */
110445
MatTabHeaderBase = /** @class */ (function () {
110446
    function MatTabHeaderBase() {
110447
    }
110448
    return MatTabHeaderBase;
110449
}());
110450
var /** @type {?} */ _MatTabHeaderMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_3__["mixinDisableRipple"])(MatTabHeaderBase);
110451
/**
110452
 * The header of the tab group which displays a list of all the tabs in the tab group. Includes
110453
 * an ink bar that follows the currently selected tab. When the tabs list's width exceeds the
110454
 * width of the header container, then arrows will be displayed to allow the user to scroll
110455
 * left and right across the header.
110456
 * \@docs-private
110457
 */
110458
var MatTabHeader = /** @class */ (function (_super) {
110459
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(MatTabHeader, _super);
110460
    function MatTabHeader(_elementRef, _changeDetectorRef, _viewportRuler, _dir) {
110461
        var _this = _super.call(this) || this;
110462
        _this._elementRef = _elementRef;
110463
        _this._changeDetectorRef = _changeDetectorRef;
110464
        _this._viewportRuler = _viewportRuler;
110465
        _this._dir = _dir;
110466
        /**
110467
         * The distance in pixels that the tab labels should be translated to the left.
110468
         */
110469
        _this._scrollDistance = 0;
110470
        /**
110471
         * Whether the header should scroll to the selected index after the view has been checked.
110472
         */
110473
        _this._selectedIndexChanged = false;
110474
        /**
110475
         * Emits when the component is destroyed.
110476
         */
110477
        _this._destroyed = new rxjs__WEBPACK_IMPORTED_MODULE_4__["Subject"]();
110478
        /**
110479
         * Whether the controls for pagination should be displayed
110480
         */
110481
        _this._showPaginationControls = false;
110482
        /**
110483
         * Whether the tab list can be scrolled more towards the end of the tab label list.
110484
         */
110485
        _this._disableScrollAfter = true;
110486
        /**
110487
         * Whether the tab list can be scrolled more towards the beginning of the tab label list.
110488
         */
110489
        _this._disableScrollBefore = true;
110490
        _this._selectedIndex = 0;
110491
        /**
110492
         * Event emitted when the option is selected.
110493
         */
110494
        _this.selectFocusedIndex = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
110495
        /**
110496
         * Event emitted when a label is focused.
110497
         */
110498
        _this.indexFocused = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
110499
        return _this;
110500
    }
110501
    Object.defineProperty(MatTabHeader.prototype, "selectedIndex", {
110502
        get: /**
110503
         * The index of the active tab.
110504
         * @return {?}
110505
         */
110506
        function () { return this._selectedIndex; },
110507
        set: /**
110508
         * @param {?} value
110509
         * @return {?}
110510
         */
110511
        function (value) {
110512
            value = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_8__["coerceNumberProperty"])(value);
110513
            this._selectedIndexChanged = this._selectedIndex != value;
110514
            this._selectedIndex = value;
110515
            if (this._keyManager) {
110516
                this._keyManager.updateActiveItemIndex(value);
110517
            }
110518
        },
110519
        enumerable: true,
110520
        configurable: true
110521
    });
110522
    /**
110523
     * @return {?}
110524
     */
110525
    MatTabHeader.prototype.ngAfterContentChecked = /**
110526
     * @return {?}
110527
     */
110528
    function () {
110529
        // If the number of tab labels have changed, check if scrolling should be enabled
110530
        if (this._tabLabelCount != this._labelWrappers.length) {
110531
            this._updatePagination();
110532
            this._tabLabelCount = this._labelWrappers.length;
110533
            this._changeDetectorRef.markForCheck();
110534
        }
110535
        // If the selected index has changed, scroll to the label and check if the scrolling controls
110536
        // should be disabled.
110537
        if (this._selectedIndexChanged) {
110538
            this._scrollToLabel(this._selectedIndex);
110539
            this._checkScrollingControls();
110540
            this._alignInkBarToSelectedTab();
110541
            this._selectedIndexChanged = false;
110542
            this._changeDetectorRef.markForCheck();
110543
        }
110544
        // If the scroll distance has been changed (tab selected, focused, scroll controls activated),
110545
        // then translate the header to reflect this.
110546
        if (this._scrollDistanceChanged) {
110547
            this._updateTabScrollPosition();
110548
            this._scrollDistanceChanged = false;
110549
            this._changeDetectorRef.markForCheck();
110550
        }
110551
    };
110552
    /**
110553
     * @param {?} event
110554
     * @return {?}
110555
     */
110556
    MatTabHeader.prototype._handleKeydown = /**
110557
     * @param {?} event
110558
     * @return {?}
110559
     */
110560
    function (event) {
110561
        switch (event.keyCode) {
110562
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__["HOME"]:
110563
                this._keyManager.setFirstItemActive();
110564
                event.preventDefault();
110565
                break;
110566
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__["END"]:
110567
                this._keyManager.setLastItemActive();
110568
                event.preventDefault();
110569
                break;
110570
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__["ENTER"]:
110571
            case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__["SPACE"]:
110572
                this.selectFocusedIndex.emit(this.focusIndex);
110573
                event.preventDefault();
110574
                break;
110575
            default:
110576
                this._keyManager.onKeydown(event);
110577
        }
110578
    };
110579
    /**
110580
     * Aligns the ink bar to the selected tab on load.
110581
     */
110582
    /**
110583
     * Aligns the ink bar to the selected tab on load.
110584
     * @return {?}
110585
     */
110586
    MatTabHeader.prototype.ngAfterContentInit = /**
110587
     * Aligns the ink bar to the selected tab on load.
110588
     * @return {?}
110589
     */
110590
    function () {
110591
        var _this = this;
110592
        var /** @type {?} */ dirChange = this._dir ? this._dir.change : Object(rxjs__WEBPACK_IMPORTED_MODULE_4__["of"])(null);
110593
        var /** @type {?} */ resize = this._viewportRuler.change(150);
110594
        var /** @type {?} */ realign = function () {
110595
            _this._updatePagination();
110596
            _this._alignInkBarToSelectedTab();
110597
        };
110598
        this._keyManager = new _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_11__["FocusKeyManager"](this._labelWrappers)
110599
            .withHorizontalOrientation(this._getLayoutDirection())
110600
            .withWrap();
110601
        this._keyManager.updateActiveItem(0);
110602
        // Defer the first call in order to allow for slower browsers to lay out the elements.
110603
        // This helps in cases where the user lands directly on a page with paginated tabs.
110604
        typeof requestAnimationFrame !== 'undefined' ? requestAnimationFrame(realign) : realign();
110605
        // On dir change or window resize, realign the ink bar and update the orientation of
110606
        // the key manager if the direction has changed.
110607
        Object(rxjs__WEBPACK_IMPORTED_MODULE_4__["merge"])(dirChange, resize).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_7__["takeUntil"])(this._destroyed)).subscribe(function () {
110608
            realign();
110609
            _this._keyManager.withHorizontalOrientation(_this._getLayoutDirection());
110610
        });
110611
        // If there is a change in the focus key manager we need to emit the `indexFocused`
110612
        // event in order to provide a public event that notifies about focus changes. Also we realign
110613
        // the tabs container by scrolling the new focused tab into the visible section.
110614
        this._keyManager.change.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_7__["takeUntil"])(this._destroyed)).subscribe(function (newFocusIndex) {
110615
            _this.indexFocused.emit(newFocusIndex);
110616
            _this._setTabFocus(newFocusIndex);
110617
        });
110618
    };
110619
    /**
110620
     * @return {?}
110621
     */
110622
    MatTabHeader.prototype.ngOnDestroy = /**
110623
     * @return {?}
110624
     */
110625
    function () {
110626
        this._destroyed.next();
110627
        this._destroyed.complete();
110628
    };
110629
    /**
110630
     * Callback for when the MutationObserver detects that the content has changed.
110631
     */
110632
    /**
110633
     * Callback for when the MutationObserver detects that the content has changed.
110634
     * @return {?}
110635
     */
110636
    MatTabHeader.prototype._onContentChanges = /**
110637
     * Callback for when the MutationObserver detects that the content has changed.
110638
     * @return {?}
110639
     */
110640
    function () {
110641
        this._updatePagination();
110642
        this._alignInkBarToSelectedTab();
110643
        this._changeDetectorRef.markForCheck();
110644
    };
110645
    /**
110646
     * Updating the view whether pagination should be enabled or not
110647
     */
110648
    /**
110649
     * Updating the view whether pagination should be enabled or not
110650
     * @return {?}
110651
     */
110652
    MatTabHeader.prototype._updatePagination = /**
110653
     * Updating the view whether pagination should be enabled or not
110654
     * @return {?}
110655
     */
110656
    function () {
110657
        this._checkPaginationEnabled();
110658
        this._checkScrollingControls();
110659
        this._updateTabScrollPosition();
110660
    };
110661
    Object.defineProperty(MatTabHeader.prototype, "focusIndex", {
110662
        /** Tracks which element has focus; used for keyboard navigation */
110663
        get: /**
110664
         * Tracks which element has focus; used for keyboard navigation
110665
         * @return {?}
110666
         */
110667
        function () {
110668
            return this._keyManager ? /** @type {?} */ ((this._keyManager.activeItemIndex)) : 0;
110669
        },
110670
        /** When the focus index is set, we must manually send focus to the correct label */
110671
        set: /**
110672
         * When the focus index is set, we must manually send focus to the correct label
110673
         * @param {?} value
110674
         * @return {?}
110675
         */
110676
        function (value) {
110677
            if (!this._isValidIndex(value) || this.focusIndex === value || !this._keyManager) {
110678
                return;
110679
            }
110680
            this._keyManager.setActiveItem(value);
110681
        },
110682
        enumerable: true,
110683
        configurable: true
110684
    });
110685
    /**
110686
     * Determines if an index is valid.  If the tabs are not ready yet, we assume that the user is
110687
     * providing a valid index and return true.
110688
     */
110689
    /**
110690
     * Determines if an index is valid.  If the tabs are not ready yet, we assume that the user is
110691
     * providing a valid index and return true.
110692
     * @param {?} index
110693
     * @return {?}
110694
     */
110695
    MatTabHeader.prototype._isValidIndex = /**
110696
     * Determines if an index is valid.  If the tabs are not ready yet, we assume that the user is
110697
     * providing a valid index and return true.
110698
     * @param {?} index
110699
     * @return {?}
110700
     */
110701
    function (index) {
110702
        if (!this._labelWrappers) {
110703
            return true;
110704
        }
110705
        var /** @type {?} */ tab = this._labelWrappers ? this._labelWrappers.toArray()[index] : null;
110706
        return !!tab && !tab.disabled;
110707
    };
110708
    /**
110709
     * Sets focus on the HTML element for the label wrapper and scrolls it into the view if
110710
     * scrolling is enabled.
110711
     */
110712
    /**
110713
     * Sets focus on the HTML element for the label wrapper and scrolls it into the view if
110714
     * scrolling is enabled.
110715
     * @param {?} tabIndex
110716
     * @return {?}
110717
     */
110718
    MatTabHeader.prototype._setTabFocus = /**
110719
     * Sets focus on the HTML element for the label wrapper and scrolls it into the view if
110720
     * scrolling is enabled.
110721
     * @param {?} tabIndex
110722
     * @return {?}
110723
     */
110724
    function (tabIndex) {
110725
        if (this._showPaginationControls) {
110726
            this._scrollToLabel(tabIndex);
110727
        }
110728
        if (this._labelWrappers && this._labelWrappers.length) {
110729
            this._labelWrappers.toArray()[tabIndex].focus();
110730
            // Do not let the browser manage scrolling to focus the element, this will be handled
110731
            // by using translation. In LTR, the scroll left should be 0. In RTL, the scroll width
110732
            // should be the full width minus the offset width.
110733
            var /** @type {?} */ containerEl = this._tabListContainer.nativeElement;
110734
            var /** @type {?} */ dir = this._getLayoutDirection();
110735
            if (dir == 'ltr') {
110736
                containerEl.scrollLeft = 0;
110737
            }
110738
            else {
110739
                containerEl.scrollLeft = containerEl.scrollWidth - containerEl.offsetWidth;
110740
            }
110741
        }
110742
    };
110743
    /** The layout direction of the containing app. */
110744
    /**
110745
     * The layout direction of the containing app.
110746
     * @return {?}
110747
     */
110748
    MatTabHeader.prototype._getLayoutDirection = /**
110749
     * The layout direction of the containing app.
110750
     * @return {?}
110751
     */
110752
    function () {
110753
        return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';
110754
    };
110755
    /** Performs the CSS transformation on the tab list that will cause the list to scroll. */
110756
    /**
110757
     * Performs the CSS transformation on the tab list that will cause the list to scroll.
110758
     * @return {?}
110759
     */
110760
    MatTabHeader.prototype._updateTabScrollPosition = /**
110761
     * Performs the CSS transformation on the tab list that will cause the list to scroll.
110762
     * @return {?}
110763
     */
110764
    function () {
110765
        var /** @type {?} */ scrollDistance = this.scrollDistance;
110766
        var /** @type {?} */ translateX = this._getLayoutDirection() === 'ltr' ? -scrollDistance : scrollDistance;
110767
        // Don't use `translate3d` here because we don't want to create a new layer. A new layer
110768
        // seems to cause flickering and overflow in Internet Explorer. For example, the ink bar
110769
        // and ripples will exceed the boundaries of the visible tab bar.
110770
        // See: https://github.com/angular/material2/issues/10276
110771
        this._tabList.nativeElement.style.transform = "translateX(" + translateX + "px)";
110772
    };
110773
    Object.defineProperty(MatTabHeader.prototype, "scrollDistance", {
110774
        /** Sets the distance in pixels that the tab header should be transformed in the X-axis. */
110775
        get: /**
110776
         * Sets the distance in pixels that the tab header should be transformed in the X-axis.
110777
         * @return {?}
110778
         */
110779
        function () { return this._scrollDistance; },
110780
        set: /**
110781
         * @param {?} v
110782
         * @return {?}
110783
         */
110784
        function (v) {
110785
            this._scrollDistance = Math.max(0, Math.min(this._getMaxScrollDistance(), v));
110786
            // Mark that the scroll distance has changed so that after the view is checked, the CSS
110787
            // transformation can move the header.
110788
            this._scrollDistanceChanged = true;
110789
            this._checkScrollingControls();
110790
        },
110791
        enumerable: true,
110792
        configurable: true
110793
    });
110794
    /**
110795
     * Moves the tab list in the 'before' or 'after' direction (towards the beginning of the list or
110796
     * the end of the list, respectively). The distance to scroll is computed to be a third of the
110797
     * length of the tab list view window.
110798
     *
110799
     * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
110800
     * should be called sparingly.
110801
     */
110802
    /**
110803
     * Moves the tab list in the 'before' or 'after' direction (towards the beginning of the list or
110804
     * the end of the list, respectively). The distance to scroll is computed to be a third of the
110805
     * length of the tab list view window.
110806
     *
110807
     * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
110808
     * should be called sparingly.
110809
     * @param {?} scrollDir
110810
     * @return {?}
110811
     */
110812
    MatTabHeader.prototype._scrollHeader = /**
110813
     * Moves the tab list in the 'before' or 'after' direction (towards the beginning of the list or
110814
     * the end of the list, respectively). The distance to scroll is computed to be a third of the
110815
     * length of the tab list view window.
110816
     *
110817
     * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
110818
     * should be called sparingly.
110819
     * @param {?} scrollDir
110820
     * @return {?}
110821
     */
110822
    function (scrollDir) {
110823
        var /** @type {?} */ viewLength = this._tabListContainer.nativeElement.offsetWidth;
110824
        // Move the scroll distance one-third the length of the tab list's viewport.
110825
        this.scrollDistance += (scrollDir == 'before' ? -1 : 1) * viewLength / 3;
110826
    };
110827
    /**
110828
     * Moves the tab list such that the desired tab label (marked by index) is moved into view.
110829
     *
110830
     * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
110831
     * should be called sparingly.
110832
     */
110833
    /**
110834
     * Moves the tab list such that the desired tab label (marked by index) is moved into view.
110835
     *
110836
     * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
110837
     * should be called sparingly.
110838
     * @param {?} labelIndex
110839
     * @return {?}
110840
     */
110841
    MatTabHeader.prototype._scrollToLabel = /**
110842
     * Moves the tab list such that the desired tab label (marked by index) is moved into view.
110843
     *
110844
     * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
110845
     * should be called sparingly.
110846
     * @param {?} labelIndex
110847
     * @return {?}
110848
     */
110849
    function (labelIndex) {
110850
        var /** @type {?} */ selectedLabel = this._labelWrappers ? this._labelWrappers.toArray()[labelIndex] : null;
110851
        if (!selectedLabel) {
110852
            return;
110853
        }
110854
        // The view length is the visible width of the tab labels.
110855
        var /** @type {?} */ viewLength = this._tabListContainer.nativeElement.offsetWidth;
110856
        var /** @type {?} */ labelBeforePos, /** @type {?} */ labelAfterPos;
110857
        if (this._getLayoutDirection() == 'ltr') {
110858
            labelBeforePos = selectedLabel.getOffsetLeft();
110859
            labelAfterPos = labelBeforePos + selectedLabel.getOffsetWidth();
110860
        }
110861
        else {
110862
            labelAfterPos = this._tabList.nativeElement.offsetWidth - selectedLabel.getOffsetLeft();
110863
            labelBeforePos = labelAfterPos - selectedLabel.getOffsetWidth();
110864
        }
110865
        var /** @type {?} */ beforeVisiblePos = this.scrollDistance;
110866
        var /** @type {?} */ afterVisiblePos = this.scrollDistance + viewLength;
110867
        if (labelBeforePos < beforeVisiblePos) {
110868
            // Scroll header to move label to the before direction
110869
            this.scrollDistance -= beforeVisiblePos - labelBeforePos + EXAGGERATED_OVERSCROLL;
110870
        }
110871
        else if (labelAfterPos > afterVisiblePos) {
110872
            // Scroll header to move label to the after direction
110873
            this.scrollDistance += labelAfterPos - afterVisiblePos + EXAGGERATED_OVERSCROLL;
110874
        }
110875
    };
110876
    /**
110877
     * Evaluate whether the pagination controls should be displayed. If the scroll width of the
110878
     * tab list is wider than the size of the header container, then the pagination controls should
110879
     * be shown.
110880
     *
110881
     * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
110882
     * should be called sparingly.
110883
     */
110884
    /**
110885
     * Evaluate whether the pagination controls should be displayed. If the scroll width of the
110886
     * tab list is wider than the size of the header container, then the pagination controls should
110887
     * be shown.
110888
     *
110889
     * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
110890
     * should be called sparingly.
110891
     * @return {?}
110892
     */
110893
    MatTabHeader.prototype._checkPaginationEnabled = /**
110894
     * Evaluate whether the pagination controls should be displayed. If the scroll width of the
110895
     * tab list is wider than the size of the header container, then the pagination controls should
110896
     * be shown.
110897
     *
110898
     * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
110899
     * should be called sparingly.
110900
     * @return {?}
110901
     */
110902
    function () {
110903
        var /** @type {?} */ isEnabled = this._tabList.nativeElement.scrollWidth > this._elementRef.nativeElement.offsetWidth;
110904
        if (!isEnabled) {
110905
            this.scrollDistance = 0;
110906
        }
110907
        if (isEnabled !== this._showPaginationControls) {
110908
            this._changeDetectorRef.markForCheck();
110909
        }
110910
        this._showPaginationControls = isEnabled;
110911
    };
110912
    /**
110913
     * Evaluate whether the before and after controls should be enabled or disabled.
110914
     * If the header is at the beginning of the list (scroll distance is equal to 0) then disable the
110915
     * before button. If the header is at the end of the list (scroll distance is equal to the
110916
     * maximum distance we can scroll), then disable the after button.
110917
     *
110918
     * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
110919
     * should be called sparingly.
110920
     */
110921
    /**
110922
     * Evaluate whether the before and after controls should be enabled or disabled.
110923
     * If the header is at the beginning of the list (scroll distance is equal to 0) then disable the
110924
     * before button. If the header is at the end of the list (scroll distance is equal to the
110925
     * maximum distance we can scroll), then disable the after button.
110926
     *
110927
     * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
110928
     * should be called sparingly.
110929
     * @return {?}
110930
     */
110931
    MatTabHeader.prototype._checkScrollingControls = /**
110932
     * Evaluate whether the before and after controls should be enabled or disabled.
110933
     * If the header is at the beginning of the list (scroll distance is equal to 0) then disable the
110934
     * before button. If the header is at the end of the list (scroll distance is equal to the
110935
     * maximum distance we can scroll), then disable the after button.
110936
     *
110937
     * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
110938
     * should be called sparingly.
110939
     * @return {?}
110940
     */
110941
    function () {
110942
        // Check if the pagination arrows should be activated.
110943
        this._disableScrollBefore = this.scrollDistance == 0;
110944
        this._disableScrollAfter = this.scrollDistance == this._getMaxScrollDistance();
110945
        this._changeDetectorRef.markForCheck();
110946
    };
110947
    /**
110948
     * Determines what is the maximum length in pixels that can be set for the scroll distance. This
110949
     * is equal to the difference in width between the tab list container and tab header container.
110950
     *
110951
     * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
110952
     * should be called sparingly.
110953
     */
110954
    /**
110955
     * Determines what is the maximum length in pixels that can be set for the scroll distance. This
110956
     * is equal to the difference in width between the tab list container and tab header container.
110957
     *
110958
     * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
110959
     * should be called sparingly.
110960
     * @return {?}
110961
     */
110962
    MatTabHeader.prototype._getMaxScrollDistance = /**
110963
     * Determines what is the maximum length in pixels that can be set for the scroll distance. This
110964
     * is equal to the difference in width between the tab list container and tab header container.
110965
     *
110966
     * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
110967
     * should be called sparingly.
110968
     * @return {?}
110969
     */
110970
    function () {
110971
        var /** @type {?} */ lengthOfTabList = this._tabList.nativeElement.scrollWidth;
110972
        var /** @type {?} */ viewLength = this._tabListContainer.nativeElement.offsetWidth;
110973
        return (lengthOfTabList - viewLength) || 0;
110974
    };
110975
    /** Tells the ink-bar to align itself to the current label wrapper */
110976
    /**
110977
     * Tells the ink-bar to align itself to the current label wrapper
110978
     * @return {?}
110979
     */
110980
    MatTabHeader.prototype._alignInkBarToSelectedTab = /**
110981
     * Tells the ink-bar to align itself to the current label wrapper
110982
     * @return {?}
110983
     */
110984
    function () {
110985
        var /** @type {?} */ selectedLabelWrapper = this._labelWrappers && this._labelWrappers.length ?
110986
            this._labelWrappers.toArray()[this.selectedIndex].elementRef.nativeElement :
110987
            null;
110988
        this._inkBar.alignToElement(selectedLabelWrapper);
110989
    };
110990
    MatTabHeader.decorators = [
110991
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-tab-header',
110992
                    template: "<div class=\"mat-tab-header-pagination mat-tab-header-pagination-before mat-elevation-z4\" aria-hidden=\"true\" mat-ripple [matRippleDisabled]=\"_disableScrollBefore || disableRipple\" [class.mat-tab-header-pagination-disabled]=\"_disableScrollBefore\" (click)=\"_scrollHeader('before')\"><div class=\"mat-tab-header-pagination-chevron\"></div></div><div class=\"mat-tab-label-container\" #tabListContainer (keydown)=\"_handleKeydown($event)\"><div class=\"mat-tab-list\" #tabList role=\"tablist\" (cdkObserveContent)=\"_onContentChanges()\"><div class=\"mat-tab-labels\"><ng-content></ng-content></div><mat-ink-bar></mat-ink-bar></div></div><div class=\"mat-tab-header-pagination mat-tab-header-pagination-after mat-elevation-z4\" aria-hidden=\"true\" mat-ripple [matRippleDisabled]=\"_disableScrollAfter || disableRipple\" [class.mat-tab-header-pagination-disabled]=\"_disableScrollAfter\" (click)=\"_scrollHeader('after')\"><div class=\"mat-tab-header-pagination-chevron\"></div></div>",
110993
                    styles: [".mat-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-tab-label{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;position:relative}.mat-tab-label:focus{outline:0}.mat-tab-label:focus:not(.mat-tab-disabled){opacity:1}@media screen and (-ms-high-contrast:active){.mat-tab-label:focus{outline:dotted 2px}}.mat-tab-label.mat-tab-disabled{cursor:default}@media screen and (-ms-high-contrast:active){.mat-tab-label.mat-tab-disabled{opacity:.5}}.mat-tab-label .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}@media screen and (-ms-high-contrast:active){.mat-tab-label{opacity:1}}@media (max-width:599px){.mat-tab-label{min-width:72px}}.mat-ink-bar{position:absolute;bottom:0;height:2px;transition:.5s cubic-bezier(.35,0,.25,1)}.mat-tab-group-inverted-header .mat-ink-bar{bottom:auto;top:0}@media screen and (-ms-high-contrast:active){.mat-ink-bar{outline:solid 2px;height:0}}.mat-tab-header-pagination{position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2}.mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination{display:flex}.mat-tab-header-pagination-before,.mat-tab-header-rtl .mat-tab-header-pagination-after{padding-left:4px}.mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-tab-header-pagination-after,.mat-tab-header-rtl .mat-tab-header-pagination-before{padding-right:4px}.mat-tab-header-pagination-after .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-before .mat-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;content:'';height:8px;width:8px}.mat-tab-header-pagination-disabled{box-shadow:none;cursor:default}.mat-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mat-tab-list{flex-grow:1;position:relative;transition:transform .5s cubic-bezier(.35,0,.25,1)}.mat-tab-labels{display:flex}"],
110994
                    inputs: ['disableRipple'],
110995
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
110996
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
110997
                    host: {
110998
                        'class': 'mat-tab-header',
110999
                        '[class.mat-tab-header-pagination-controls-enabled]': '_showPaginationControls',
111000
                        '[class.mat-tab-header-rtl]': "_getLayoutDirection() == 'rtl'",
111001
                    },
111002
                },] },
111003
    ];
111004
    /** @nocollapse */
111005
    MatTabHeader.ctorParameters = function () { return [
111006
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
111007
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"], },
111008
        { type: _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_10__["ViewportRuler"], },
111009
        { type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_6__["Directionality"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
111010
    ]; };
111011
    MatTabHeader.propDecorators = {
111012
        "_labelWrappers": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"], args: [MatTabLabelWrapper,] },],
111013
        "_inkBar": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: [MatInkBar,] },],
111014
        "_tabListContainer": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: ['tabListContainer',] },],
111015
        "_tabList": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: ['tabList',] },],
111016
        "selectedIndex": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
111017
        "selectFocusedIndex": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
111018
        "indexFocused": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
111019
    };
111020
    return MatTabHeader;
111021
}(_MatTabHeaderMixinBase));
111022
 
111023
/**
111024
 * @fileoverview added by tsickle
111025
 * @suppress {checkTypes} checked by tsc
111026
 */
111027
/**
111028
 * Used to generate unique ID's for each tab component
111029
 */
111030
var /** @type {?} */ nextId = 0;
111031
/**
111032
 * A simple change event emitted on focus or selection changes.
111033
 */
111034
var  /**
111035
 * A simple change event emitted on focus or selection changes.
111036
 */
111037
MatTabChangeEvent = /** @class */ (function () {
111038
    function MatTabChangeEvent() {
111039
    }
111040
    return MatTabChangeEvent;
111041
}());
111042
/**
111043
 * \@docs-private
111044
 */
111045
var  /**
111046
 * \@docs-private
111047
 */
111048
MatTabGroupBase = /** @class */ (function () {
111049
    function MatTabGroupBase(_elementRef) {
111050
        this._elementRef = _elementRef;
111051
    }
111052
    return MatTabGroupBase;
111053
}());
111054
var /** @type {?} */ _MatTabGroupMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_3__["mixinColor"])(Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_3__["mixinDisableRipple"])(MatTabGroupBase), 'primary');
111055
/**
111056
 * Material design tab-group component.  Supports basic tab pairs (label + content) and includes
111057
 * animated ink-bar, keyboard navigation, and screen reader.
111058
 * See: https://material.io/design/components/tabs.html
111059
 */
111060
var MatTabGroup = /** @class */ (function (_super) {
111061
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(MatTabGroup, _super);
111062
    function MatTabGroup(elementRef, _changeDetectorRef) {
111063
        var _this = _super.call(this, elementRef) || this;
111064
        _this._changeDetectorRef = _changeDetectorRef;
111065
        /**
111066
         * The tab index that should be selected after the content has been checked.
111067
         */
111068
        _this._indexToSelect = 0;
111069
        /**
111070
         * Snapshot of the height of the tab body wrapper before another tab is activated.
111071
         */
111072
        _this._tabBodyWrapperHeight = 0;
111073
        /**
111074
         * Subscription to tabs being added/removed.
111075
         */
111076
        _this._tabsSubscription = rxjs__WEBPACK_IMPORTED_MODULE_4__["Subscription"].EMPTY;
111077
        /**
111078
         * Subscription to changes in the tab labels.
111079
         */
111080
        _this._tabLabelSubscription = rxjs__WEBPACK_IMPORTED_MODULE_4__["Subscription"].EMPTY;
111081
        _this._dynamicHeight = false;
111082
        _this._selectedIndex = null;
111083
        /**
111084
         * Position of the tab header.
111085
         */
111086
        _this.headerPosition = 'above';
111087
        /**
111088
         * Output to enable support for two-way binding on `[(selectedIndex)]`
111089
         */
111090
        _this.selectedIndexChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
111091
        /**
111092
         * Event emitted when focus has changed within a tab group.
111093
         */
111094
        _this.focusChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
111095
        /**
111096
         * Event emitted when the body animation has completed
111097
         */
111098
        _this.animationDone = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
111099
        /**
111100
         * Event emitted when the tab selection has changed.
111101
         */
111102
        _this.selectedTabChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"](true);
111103
        _this._groupId = nextId++;
111104
        return _this;
111105
    }
111106
    Object.defineProperty(MatTabGroup.prototype, "dynamicHeight", {
111107
        get: /**
111108
         * Whether the tab group should grow to the size of the active tab.
111109
         * @return {?}
111110
         */
111111
        function () { return this._dynamicHeight; },
111112
        set: /**
111113
         * @param {?} value
111114
         * @return {?}
111115
         */
111116
        function (value) { this._dynamicHeight = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_8__["coerceBooleanProperty"])(value); },
111117
        enumerable: true,
111118
        configurable: true
111119
    });
111120
    Object.defineProperty(MatTabGroup.prototype, "selectedIndex", {
111121
        get: /**
111122
         * The index of the active tab.
111123
         * @return {?}
111124
         */
111125
        function () { return this._selectedIndex; },
111126
        set: /**
111127
         * @param {?} value
111128
         * @return {?}
111129
         */
111130
        function (value) {
111131
            this._indexToSelect = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_8__["coerceNumberProperty"])(value, null);
111132
        },
111133
        enumerable: true,
111134
        configurable: true
111135
    });
111136
    Object.defineProperty(MatTabGroup.prototype, "backgroundColor", {
111137
        get: /**
111138
         * Background color of the tab group.
111139
         * @return {?}
111140
         */
111141
        function () { return this._backgroundColor; },
111142
        set: /**
111143
         * @param {?} value
111144
         * @return {?}
111145
         */
111146
        function (value) {
111147
            var /** @type {?} */ nativeElement = this._elementRef.nativeElement;
111148
            nativeElement.classList.remove("mat-background-" + this.backgroundColor);
111149
            if (value) {
111150
                nativeElement.classList.add("mat-background-" + value);
111151
            }
111152
            this._backgroundColor = value;
111153
        },
111154
        enumerable: true,
111155
        configurable: true
111156
    });
111157
    /**
111158
     * After the content is checked, this component knows what tabs have been defined
111159
     * and what the selected index should be. This is where we can know exactly what position
111160
     * each tab should be in according to the new selected index, and additionally we know how
111161
     * a new selected tab should transition in (from the left or right).
111162
     */
111163
    /**
111164
     * After the content is checked, this component knows what tabs have been defined
111165
     * and what the selected index should be. This is where we can know exactly what position
111166
     * each tab should be in according to the new selected index, and additionally we know how
111167
     * a new selected tab should transition in (from the left or right).
111168
     * @return {?}
111169
     */
111170
    MatTabGroup.prototype.ngAfterContentChecked = /**
111171
     * After the content is checked, this component knows what tabs have been defined
111172
     * and what the selected index should be. This is where we can know exactly what position
111173
     * each tab should be in according to the new selected index, and additionally we know how
111174
     * a new selected tab should transition in (from the left or right).
111175
     * @return {?}
111176
     */
111177
    function () {
111178
        var _this = this;
111179
        // Don't clamp the `indexToSelect` immediately in the setter because it can happen that
111180
        // the amount of tabs changes before the actual change detection runs.
111181
        var /** @type {?} */ indexToSelect = this._indexToSelect = this._clampTabIndex(this._indexToSelect);
111182
        // If there is a change in selected index, emit a change event. Should not trigger if
111183
        // the selected index has not yet been initialized.
111184
        if (this._selectedIndex != indexToSelect && this._selectedIndex != null) {
111185
            var /** @type {?} */ tabChangeEvent = this._createChangeEvent(indexToSelect);
111186
            this.selectedTabChange.emit(tabChangeEvent);
111187
            // Emitting this value after change detection has run
111188
            // since the checked content may contain this variable'
111189
            Promise.resolve().then(function () { return _this.selectedIndexChange.emit(indexToSelect); });
111190
        }
111191
        // Setup the position for each tab and optionally setup an origin on the next selected tab.
111192
        this._tabs.forEach(function (tab, index) {
111193
            tab.position = index - indexToSelect;
111194
            tab.isActive = index === indexToSelect;
111195
            // If there is already a selected tab, then set up an origin for the next selected tab
111196
            // if it doesn't have one already.
111197
            if (_this._selectedIndex != null && tab.position == 0 && !tab.origin) {
111198
                tab.origin = indexToSelect - _this._selectedIndex;
111199
            }
111200
        });
111201
        if (this._selectedIndex !== indexToSelect) {
111202
            this._selectedIndex = indexToSelect;
111203
            this._changeDetectorRef.markForCheck();
111204
        }
111205
    };
111206
    /**
111207
     * @return {?}
111208
     */
111209
    MatTabGroup.prototype.ngAfterContentInit = /**
111210
     * @return {?}
111211
     */
111212
    function () {
111213
        var _this = this;
111214
        this._subscribeToTabLabels();
111215
        // Subscribe to changes in the amount of tabs, in order to be
111216
        // able to re-render the content as new tabs are added or removed.
111217
        this._tabsSubscription = this._tabs.changes.subscribe(function () {
111218
            var /** @type {?} */ indexToSelect = _this._clampTabIndex(_this._indexToSelect);
111219
            // Maintain the previously-selected tab if a new tab is added or removed and there is no
111220
            // explicit change that selects a different tab.
111221
            if (indexToSelect === _this._selectedIndex) {
111222
                var /** @type {?} */ tabs = _this._tabs.toArray();
111223
                for (var /** @type {?} */ i = 0; i < tabs.length; i++) {
111224
                    if (tabs[i].isActive) {
111225
                        // Assign both to the `_indexToSelect` and `_selectedIndex` so we don't fire a changed
111226
                        // event, otherwise the consumer may end up in an infinite loop in some edge cases like
111227
                        // adding a tab within the `selectedIndexChange` event.
111228
                        // Assign both to the `_indexToSelect` and `_selectedIndex` so we don't fire a changed
111229
                        // event, otherwise the consumer may end up in an infinite loop in some edge cases like
111230
                        // adding a tab within the `selectedIndexChange` event.
111231
                        _this._indexToSelect = _this._selectedIndex = i;
111232
                        break;
111233
                    }
111234
                }
111235
            }
111236
            _this._subscribeToTabLabels();
111237
            _this._changeDetectorRef.markForCheck();
111238
        });
111239
    };
111240
    /**
111241
     * @return {?}
111242
     */
111243
    MatTabGroup.prototype.ngOnDestroy = /**
111244
     * @return {?}
111245
     */
111246
    function () {
111247
        this._tabsSubscription.unsubscribe();
111248
        this._tabLabelSubscription.unsubscribe();
111249
    };
111250
    /** Re-aligns the ink bar to the selected tab element. */
111251
    /**
111252
     * Re-aligns the ink bar to the selected tab element.
111253
     * @return {?}
111254
     */
111255
    MatTabGroup.prototype.realignInkBar = /**
111256
     * Re-aligns the ink bar to the selected tab element.
111257
     * @return {?}
111258
     */
111259
    function () {
111260
        if (this._tabHeader) {
111261
            this._tabHeader._alignInkBarToSelectedTab();
111262
        }
111263
    };
111264
    /**
111265
     * @param {?} index
111266
     * @return {?}
111267
     */
111268
    MatTabGroup.prototype._focusChanged = /**
111269
     * @param {?} index
111270
     * @return {?}
111271
     */
111272
    function (index) {
111273
        this.focusChange.emit(this._createChangeEvent(index));
111274
    };
111275
    /**
111276
     * @param {?} index
111277
     * @return {?}
111278
     */
111279
    MatTabGroup.prototype._createChangeEvent = /**
111280
     * @param {?} index
111281
     * @return {?}
111282
     */
111283
    function (index) {
111284
        var /** @type {?} */ event = new MatTabChangeEvent;
111285
        event.index = index;
111286
        if (this._tabs && this._tabs.length) {
111287
            event.tab = this._tabs.toArray()[index];
111288
        }
111289
        return event;
111290
    };
111291
    /**
111292
     * Subscribes to changes in the tab labels. This is needed, because the \@Input for the label is
111293
     * on the MatTab component, whereas the data binding is inside the MatTabGroup. In order for the
111294
     * binding to be updated, we need to subscribe to changes in it and trigger change detection
111295
     * manually.
111296
     * @return {?}
111297
     */
111298
    MatTabGroup.prototype._subscribeToTabLabels = /**
111299
     * Subscribes to changes in the tab labels. This is needed, because the \@Input for the label is
111300
     * on the MatTab component, whereas the data binding is inside the MatTabGroup. In order for the
111301
     * binding to be updated, we need to subscribe to changes in it and trigger change detection
111302
     * manually.
111303
     * @return {?}
111304
     */
111305
    function () {
111306
        var _this = this;
111307
        if (this._tabLabelSubscription) {
111308
            this._tabLabelSubscription.unsubscribe();
111309
        }
111310
        this._tabLabelSubscription = rxjs__WEBPACK_IMPORTED_MODULE_4__["merge"].apply(void 0, this._tabs.map(function (tab) { return tab._disableChange; }).concat(this._tabs.map(function (tab) { return tab._labelChange; }))).subscribe(function () {
111311
            _this._changeDetectorRef.markForCheck();
111312
        });
111313
    };
111314
    /**
111315
     * Clamps the given index to the bounds of 0 and the tabs length.
111316
     * @param {?} index
111317
     * @return {?}
111318
     */
111319
    MatTabGroup.prototype._clampTabIndex = /**
111320
     * Clamps the given index to the bounds of 0 and the tabs length.
111321
     * @param {?} index
111322
     * @return {?}
111323
     */
111324
    function (index) {
111325
        // Note the `|| 0`, which ensures that values like NaN can't get through
111326
        // and which would otherwise throw the component into an infinite loop
111327
        // (since Math.max(NaN, 0) === NaN).
111328
        return Math.min(this._tabs.length - 1, Math.max(index || 0, 0));
111329
    };
111330
    /** Returns a unique id for each tab label element */
111331
    /**
111332
     * Returns a unique id for each tab label element
111333
     * @param {?} i
111334
     * @return {?}
111335
     */
111336
    MatTabGroup.prototype._getTabLabelId = /**
111337
     * Returns a unique id for each tab label element
111338
     * @param {?} i
111339
     * @return {?}
111340
     */
111341
    function (i) {
111342
        return "mat-tab-label-" + this._groupId + "-" + i;
111343
    };
111344
    /** Returns a unique id for each tab content element */
111345
    /**
111346
     * Returns a unique id for each tab content element
111347
     * @param {?} i
111348
     * @return {?}
111349
     */
111350
    MatTabGroup.prototype._getTabContentId = /**
111351
     * Returns a unique id for each tab content element
111352
     * @param {?} i
111353
     * @return {?}
111354
     */
111355
    function (i) {
111356
        return "mat-tab-content-" + this._groupId + "-" + i;
111357
    };
111358
    /**
111359
     * Sets the height of the body wrapper to the height of the activating tab if dynamic
111360
     * height property is true.
111361
     */
111362
    /**
111363
     * Sets the height of the body wrapper to the height of the activating tab if dynamic
111364
     * height property is true.
111365
     * @param {?} tabHeight
111366
     * @return {?}
111367
     */
111368
    MatTabGroup.prototype._setTabBodyWrapperHeight = /**
111369
     * Sets the height of the body wrapper to the height of the activating tab if dynamic
111370
     * height property is true.
111371
     * @param {?} tabHeight
111372
     * @return {?}
111373
     */
111374
    function (tabHeight) {
111375
        if (!this._dynamicHeight || !this._tabBodyWrapperHeight) {
111376
            return;
111377
        }
111378
        var /** @type {?} */ wrapper = this._tabBodyWrapper.nativeElement;
111379
        wrapper.style.height = this._tabBodyWrapperHeight + 'px';
111380
        // This conditional forces the browser to paint the height so that
111381
        // the animation to the new height can have an origin.
111382
        if (this._tabBodyWrapper.nativeElement.offsetHeight) {
111383
            wrapper.style.height = tabHeight + 'px';
111384
        }
111385
    };
111386
    /** Removes the height of the tab body wrapper. */
111387
    /**
111388
     * Removes the height of the tab body wrapper.
111389
     * @return {?}
111390
     */
111391
    MatTabGroup.prototype._removeTabBodyWrapperHeight = /**
111392
     * Removes the height of the tab body wrapper.
111393
     * @return {?}
111394
     */
111395
    function () {
111396
        this._tabBodyWrapperHeight = this._tabBodyWrapper.nativeElement.clientHeight;
111397
        this._tabBodyWrapper.nativeElement.style.height = '';
111398
        this.animationDone.emit();
111399
    };
111400
    /** Handle click events, setting new selected index if appropriate. */
111401
    /**
111402
     * Handle click events, setting new selected index if appropriate.
111403
     * @param {?} tab
111404
     * @param {?} tabHeader
111405
     * @param {?} idx
111406
     * @return {?}
111407
     */
111408
    MatTabGroup.prototype._handleClick = /**
111409
     * Handle click events, setting new selected index if appropriate.
111410
     * @param {?} tab
111411
     * @param {?} tabHeader
111412
     * @param {?} idx
111413
     * @return {?}
111414
     */
111415
    function (tab, tabHeader, idx) {
111416
        if (!tab.disabled) {
111417
            this.selectedIndex = tabHeader.focusIndex = idx;
111418
        }
111419
    };
111420
    /** Retrieves the tabindex for the tab. */
111421
    /**
111422
     * Retrieves the tabindex for the tab.
111423
     * @param {?} tab
111424
     * @param {?} idx
111425
     * @return {?}
111426
     */
111427
    MatTabGroup.prototype._getTabIndex = /**
111428
     * Retrieves the tabindex for the tab.
111429
     * @param {?} tab
111430
     * @param {?} idx
111431
     * @return {?}
111432
     */
111433
    function (tab, idx) {
111434
        if (tab.disabled) {
111435
            return null;
111436
        }
111437
        return this.selectedIndex === idx ? 0 : -1;
111438
    };
111439
    MatTabGroup.decorators = [
111440
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-tab-group',
111441
                    exportAs: 'matTabGroup',
111442
                    template: "<mat-tab-header #tabHeader [selectedIndex]=\"selectedIndex\" [disableRipple]=\"disableRipple\" (indexFocused)=\"_focusChanged($event)\" (selectFocusedIndex)=\"selectedIndex = $event\"><div class=\"mat-tab-label\" role=\"tab\" matTabLabelWrapper mat-ripple cdkMonitorElementFocus *ngFor=\"let tab of _tabs; let i = index\" [id]=\"_getTabLabelId(i)\" [attr.tabIndex]=\"_getTabIndex(tab, i)\" [attr.aria-posinset]=\"i + 1\" [attr.aria-setsize]=\"_tabs.length\" [attr.aria-controls]=\"_getTabContentId(i)\" [attr.aria-selected]=\"selectedIndex == i\" [attr.aria-label]=\"tab.ariaLabel || null\" [attr.aria-labelledby]=\"(!tab.ariaLabel && tab.ariaLabelledby) ? tab.ariaLabelledby : null\" [class.mat-tab-label-active]=\"selectedIndex == i\" [disabled]=\"tab.disabled\" [matRippleDisabled]=\"tab.disabled || disableRipple\" (click)=\"_handleClick(tab, tabHeader, i)\"><div class=\"mat-tab-label-content\"><ng-template [ngIf]=\"tab.templateLabel\"><ng-template [cdkPortalOutlet]=\"tab.templateLabel\"></ng-template></ng-template><ng-template [ngIf]=\"!tab.templateLabel\">{{tab.textLabel}}</ng-template></div></div></mat-tab-header><div class=\"mat-tab-body-wrapper\" #tabBodyWrapper><mat-tab-body role=\"tabpanel\" *ngFor=\"let tab of _tabs; let i = index\" [id]=\"_getTabContentId(i)\" [attr.aria-labelledby]=\"_getTabLabelId(i)\" [class.mat-tab-body-active]=\"selectedIndex == i\" [content]=\"tab.content\" [position]=\"tab.position\" [origin]=\"tab.origin\" (_onCentered)=\"_removeTabBodyWrapperHeight()\" (_onCentering)=\"_setTabBodyWrapperHeight($event)\"></mat-tab-body></div>",
111443
                    styles: [".mat-tab-group{display:flex;flex-direction:column}.mat-tab-group.mat-tab-group-inverted-header{flex-direction:column-reverse}.mat-tab-label{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;position:relative}.mat-tab-label:focus{outline:0}.mat-tab-label:focus:not(.mat-tab-disabled){opacity:1}@media screen and (-ms-high-contrast:active){.mat-tab-label:focus{outline:dotted 2px}}.mat-tab-label.mat-tab-disabled{cursor:default}@media screen and (-ms-high-contrast:active){.mat-tab-label.mat-tab-disabled{opacity:.5}}.mat-tab-label .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}@media screen and (-ms-high-contrast:active){.mat-tab-label{opacity:1}}@media (max-width:599px){.mat-tab-label{padding:0 12px}}@media (max-width:959px){.mat-tab-label{padding:0 12px}}.mat-tab-group[mat-stretch-tabs] .mat-tab-label{flex-basis:0;flex-grow:1}.mat-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height .5s cubic-bezier(.35,0,.25,1)}.mat-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;flex-basis:100%}.mat-tab-body.mat-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-tab-group.mat-tab-group-dynamic-height .mat-tab-body.mat-tab-body-active{overflow-y:hidden}"],
111444
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
111445
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
111446
                    inputs: ['color', 'disableRipple'],
111447
                    host: {
111448
                        'class': 'mat-tab-group',
111449
                        '[class.mat-tab-group-dynamic-height]': 'dynamicHeight',
111450
                        '[class.mat-tab-group-inverted-header]': 'headerPosition === "below"',
111451
                    },
111452
                },] },
111453
    ];
111454
    /** @nocollapse */
111455
    MatTabGroup.ctorParameters = function () { return [
111456
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
111457
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"], },
111458
    ]; };
111459
    MatTabGroup.propDecorators = {
111460
        "_tabs": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"], args: [MatTab,] },],
111461
        "_tabBodyWrapper": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: ['tabBodyWrapper',] },],
111462
        "_tabHeader": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: ['tabHeader',] },],
111463
        "dynamicHeight": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
111464
        "selectedIndex": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
111465
        "headerPosition": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
111466
        "backgroundColor": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
111467
        "selectedIndexChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
111468
        "focusChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
111469
        "animationDone": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
111470
        "selectedTabChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
111471
    };
111472
    return MatTabGroup;
111473
}(_MatTabGroupMixinBase));
111474
 
111475
/**
111476
 * @fileoverview added by tsickle
111477
 * @suppress {checkTypes} checked by tsc
111478
 */
111479
/**
111480
 * \@docs-private
111481
 */
111482
var  /**
111483
 * \@docs-private
111484
 */
111485
MatTabNavBase = /** @class */ (function () {
111486
    function MatTabNavBase(_elementRef) {
111487
        this._elementRef = _elementRef;
111488
    }
111489
    return MatTabNavBase;
111490
}());
111491
var /** @type {?} */ _MatTabNavMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_3__["mixinDisableRipple"])(Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_3__["mixinColor"])(MatTabNavBase, 'primary'));
111492
/**
111493
 * Navigation component matching the styles of the tab group header.
111494
 * Provides anchored navigation with animated ink bar.
111495
 */
111496
var MatTabNav = /** @class */ (function (_super) {
111497
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(MatTabNav, _super);
111498
    function MatTabNav(elementRef, _dir, _ngZone, _changeDetectorRef, _viewportRuler) {
111499
        var _this = _super.call(this, elementRef) || this;
111500
        _this._dir = _dir;
111501
        _this._ngZone = _ngZone;
111502
        _this._changeDetectorRef = _changeDetectorRef;
111503
        _this._viewportRuler = _viewportRuler;
111504
        /**
111505
         * Subject that emits when the component has been destroyed.
111506
         */
111507
        _this._onDestroy = new rxjs__WEBPACK_IMPORTED_MODULE_4__["Subject"]();
111508
        return _this;
111509
    }
111510
    Object.defineProperty(MatTabNav.prototype, "backgroundColor", {
111511
        get: /**
111512
         * Background color of the tab nav.
111513
         * @return {?}
111514
         */
111515
        function () { return this._backgroundColor; },
111516
        set: /**
111517
         * @param {?} value
111518
         * @return {?}
111519
         */
111520
        function (value) {
111521
            var /** @type {?} */ nativeElement = this._elementRef.nativeElement;
111522
            nativeElement.classList.remove("mat-background-" + this.backgroundColor);
111523
            if (value) {
111524
                nativeElement.classList.add("mat-background-" + value);
111525
            }
111526
            this._backgroundColor = value;
111527
        },
111528
        enumerable: true,
111529
        configurable: true
111530
    });
111531
    /**
111532
     * Notifies the component that the active link has been changed.
111533
     * @breaking-change 7.0.0 `element` parameter to be removed.
111534
     */
111535
    /**
111536
     * Notifies the component that the active link has been changed.
111537
     * \@breaking-change 7.0.0 `element` parameter to be removed.
111538
     * @param {?} element
111539
     * @return {?}
111540
     */
111541
    MatTabNav.prototype.updateActiveLink = /**
111542
     * Notifies the component that the active link has been changed.
111543
     * \@breaking-change 7.0.0 `element` parameter to be removed.
111544
     * @param {?} element
111545
     * @return {?}
111546
     */
111547
    function (element) {
111548
        // Note: keeping the `element` for backwards-compat, but isn't being used for anything.
111549
        // @breaking-change 7.0.0
111550
        this._activeLinkChanged = !!element;
111551
        this._changeDetectorRef.markForCheck();
111552
    };
111553
    /**
111554
     * @return {?}
111555
     */
111556
    MatTabNav.prototype.ngAfterContentInit = /**
111557
     * @return {?}
111558
     */
111559
    function () {
111560
        var _this = this;
111561
        this._ngZone.runOutsideAngular(function () {
111562
            var /** @type {?} */ dirChange = _this._dir ? _this._dir.change : Object(rxjs__WEBPACK_IMPORTED_MODULE_4__["of"])(null);
111563
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_4__["merge"])(dirChange, _this._viewportRuler.change(10))
111564
                .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_7__["takeUntil"])(_this._onDestroy))
111565
                .subscribe(function () { return _this._alignInkBar(); });
111566
        });
111567
    };
111568
    /** Checks if the active link has been changed and, if so, will update the ink bar. */
111569
    /**
111570
     * Checks if the active link has been changed and, if so, will update the ink bar.
111571
     * @return {?}
111572
     */
111573
    MatTabNav.prototype.ngAfterContentChecked = /**
111574
     * Checks if the active link has been changed and, if so, will update the ink bar.
111575
     * @return {?}
111576
     */
111577
    function () {
111578
        if (this._activeLinkChanged) {
111579
            var /** @type {?} */ activeTab = this._tabLinks.find(function (tab) { return tab.active; });
111580
            this._activeLinkElement = activeTab ? activeTab._elementRef : null;
111581
            this._alignInkBar();
111582
            this._activeLinkChanged = false;
111583
        }
111584
    };
111585
    /**
111586
     * @return {?}
111587
     */
111588
    MatTabNav.prototype.ngOnDestroy = /**
111589
     * @return {?}
111590
     */
111591
    function () {
111592
        this._onDestroy.next();
111593
        this._onDestroy.complete();
111594
    };
111595
    /** Aligns the ink bar to the active link. */
111596
    /**
111597
     * Aligns the ink bar to the active link.
111598
     * @return {?}
111599
     */
111600
    MatTabNav.prototype._alignInkBar = /**
111601
     * Aligns the ink bar to the active link.
111602
     * @return {?}
111603
     */
111604
    function () {
111605
        if (this._activeLinkElement) {
111606
            this._inkBar.show();
111607
            this._inkBar.alignToElement(this._activeLinkElement.nativeElement);
111608
        }
111609
        else {
111610
            this._inkBar.hide();
111611
        }
111612
    };
111613
    MatTabNav.decorators = [
111614
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: '[mat-tab-nav-bar]',
111615
                    exportAs: 'matTabNavBar, matTabNav',
111616
                    inputs: ['color', 'disableRipple'],
111617
                    template: "<div class=\"mat-tab-links\" (cdkObserveContent)=\"_alignInkBar()\"><ng-content></ng-content><mat-ink-bar></mat-ink-bar></div>",
111618
                    styles: [".mat-tab-nav-bar{overflow:hidden;position:relative;flex-shrink:0}.mat-tab-links{position:relative;display:flex}.mat-tab-link{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;vertical-align:top;text-decoration:none;position:relative;overflow:hidden;-webkit-tap-highlight-color:transparent}.mat-tab-link:focus{outline:0}.mat-tab-link:focus:not(.mat-tab-disabled){opacity:1}@media screen and (-ms-high-contrast:active){.mat-tab-link:focus{outline:dotted 2px}}.mat-tab-link.mat-tab-disabled{cursor:default}@media screen and (-ms-high-contrast:active){.mat-tab-link.mat-tab-disabled{opacity:.5}}.mat-tab-link .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}@media screen and (-ms-high-contrast:active){.mat-tab-link{opacity:1}}[mat-stretch-tabs] .mat-tab-link{flex-basis:0;flex-grow:1}@media (max-width:599px){.mat-tab-link{min-width:72px}}.mat-ink-bar{position:absolute;bottom:0;height:2px;transition:.5s cubic-bezier(.35,0,.25,1)}.mat-tab-group-inverted-header .mat-ink-bar{bottom:auto;top:0}@media screen and (-ms-high-contrast:active){.mat-ink-bar{outline:solid 2px;height:0}}"],
111619
                    host: { 'class': 'mat-tab-nav-bar' },
111620
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
111621
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
111622
                },] },
111623
    ];
111624
    /** @nocollapse */
111625
    MatTabNav.ctorParameters = function () { return [
111626
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
111627
        { type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_6__["Directionality"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
111628
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], },
111629
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"], },
111630
        { type: _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_10__["ViewportRuler"], },
111631
    ]; };
111632
    MatTabNav.propDecorators = {
111633
        "_inkBar": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: [MatInkBar,] },],
111634
        "_tabLinks": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"], args: [Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () { return MatTabLink; }), { descendants: true },] },],
111635
        "backgroundColor": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
111636
    };
111637
    return MatTabNav;
111638
}(_MatTabNavMixinBase));
111639
var MatTabLinkBase = /** @class */ (function () {
111640
    function MatTabLinkBase() {
111641
    }
111642
    return MatTabLinkBase;
111643
}());
111644
var /** @type {?} */ _MatTabLinkMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_3__["mixinTabIndex"])(Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_3__["mixinDisableRipple"])(Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_3__["mixinDisabled"])(MatTabLinkBase)));
111645
/**
111646
 * Link inside of a `mat-tab-nav-bar`.
111647
 */
111648
var MatTabLink = /** @class */ (function (_super) {
111649
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(MatTabLink, _super);
111650
    function MatTabLink(_tabNavBar, _elementRef, ngZone, platform, globalOptions, tabIndex, _focusMonitor) {
111651
        var _this = _super.call(this) || this;
111652
        _this._tabNavBar = _tabNavBar;
111653
        _this._elementRef = _elementRef;
111654
        _this._focusMonitor = _focusMonitor;
111655
        /**
111656
         * Whether the tab link is active or not.
111657
         */
111658
        _this._isActive = false;
111659
        /**
111660
         * Whether the ripples are globally disabled through the RippleGlobalOptions
111661
         */
111662
        _this._ripplesGloballyDisabled = false;
111663
        /**
111664
         * Ripple configuration for ripples that are launched on pointer down.
111665
         * \@docs-private
111666
         */
111667
        _this.rippleConfig = {};
111668
        _this._tabLinkRipple = new _angular_material_core__WEBPACK_IMPORTED_MODULE_3__["RippleRenderer"](_this, ngZone, _elementRef, platform);
111669
        _this._tabLinkRipple.setupTriggerEvents(_elementRef.nativeElement);
111670
        _this.tabIndex = parseInt(tabIndex) || 0;
111671
        if (globalOptions) {
111672
            _this._ripplesGloballyDisabled = !!globalOptions.disabled;
111673
            // TODO(paul): Once the speedFactor is removed, we no longer need to copy each single option.
111674
            // TODO(paul): Once the speedFactor is removed, we no longer need to copy each single option.
111675
            _this.rippleConfig = {
111676
                terminateOnPointerUp: globalOptions.terminateOnPointerUp,
111677
                speedFactor: globalOptions.baseSpeedFactor,
111678
                animation: globalOptions.animation,
111679
            };
111680
        }
111681
        if (_focusMonitor) {
111682
            _focusMonitor.monitor(_elementRef.nativeElement);
111683
        }
111684
        return _this;
111685
    }
111686
    Object.defineProperty(MatTabLink.prototype, "active", {
111687
        get: /**
111688
         * Whether the link is active.
111689
         * @return {?}
111690
         */
111691
        function () { return this._isActive; },
111692
        set: /**
111693
         * @param {?} value
111694
         * @return {?}
111695
         */
111696
        function (value) {
111697
            if (value !== this._isActive) {
111698
                this._isActive = value;
111699
                this._tabNavBar.updateActiveLink(this._elementRef);
111700
            }
111701
        },
111702
        enumerable: true,
111703
        configurable: true
111704
    });
111705
    Object.defineProperty(MatTabLink.prototype, "rippleDisabled", {
111706
        /**
111707
         * Whether ripples are disabled on interaction
111708
         * @docs-private
111709
         */
111710
        get: /**
111711
         * Whether ripples are disabled on interaction
111712
         * \@docs-private
111713
         * @return {?}
111714
         */
111715
        function () {
111716
            return this.disabled || this.disableRipple || this._tabNavBar.disableRipple ||
111717
                this._ripplesGloballyDisabled;
111718
        },
111719
        enumerable: true,
111720
        configurable: true
111721
    });
111722
    /**
111723
     * @return {?}
111724
     */
111725
    MatTabLink.prototype.ngOnDestroy = /**
111726
     * @return {?}
111727
     */
111728
    function () {
111729
        this._tabLinkRipple._removeTriggerEvents();
111730
        if (this._focusMonitor) {
111731
            this._focusMonitor.stopMonitoring(this._elementRef.nativeElement);
111732
        }
111733
    };
111734
    /**
111735
     * Handles the click event, preventing default navigation if the tab link is disabled.
111736
     */
111737
    /**
111738
     * Handles the click event, preventing default navigation if the tab link is disabled.
111739
     * @param {?} event
111740
     * @return {?}
111741
     */
111742
    MatTabLink.prototype._handleClick = /**
111743
     * Handles the click event, preventing default navigation if the tab link is disabled.
111744
     * @param {?} event
111745
     * @return {?}
111746
     */
111747
    function (event) {
111748
        if (this.disabled) {
111749
            event.preventDefault();
111750
        }
111751
    };
111752
    MatTabLink.decorators = [
111753
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
111754
                    selector: '[mat-tab-link], [matTabLink]',
111755
                    exportAs: 'matTabLink',
111756
                    inputs: ['disabled', 'disableRipple', 'tabIndex'],
111757
                    host: {
111758
                        'class': 'mat-tab-link',
111759
                        '[attr.aria-current]': 'active',
111760
                        '[attr.aria-disabled]': 'disabled.toString()',
111761
                        '[attr.tabIndex]': 'tabIndex',
111762
                        '[class.mat-tab-disabled]': 'disabled',
111763
                        '[class.mat-tab-label-active]': 'active',
111764
                        '(click)': '_handleClick($event)'
111765
                    }
111766
                },] },
111767
    ];
111768
    /** @nocollapse */
111769
    MatTabLink.ctorParameters = function () { return [
111770
        { type: MatTabNav, },
111771
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
111772
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], },
111773
        { type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_12__["Platform"], },
111774
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_material_core__WEBPACK_IMPORTED_MODULE_3__["MAT_RIPPLE_GLOBAL_OPTIONS"],] },] },
111775
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Attribute"], args: ['tabindex',] },] },
111776
        { type: _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_11__["FocusMonitor"], },
111777
    ]; };
111778
    MatTabLink.propDecorators = {
111779
        "active": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
111780
    };
111781
    return MatTabLink;
111782
}(_MatTabLinkMixinBase));
111783
 
111784
/**
111785
 * @fileoverview added by tsickle
111786
 * @suppress {checkTypes} checked by tsc
111787
 */
111788
var MatTabsModule = /** @class */ (function () {
111789
    function MatTabsModule() {
111790
    }
111791
    MatTabsModule.decorators = [
111792
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
111793
                    imports: [
111794
                        _angular_common__WEBPACK_IMPORTED_MODULE_14__["CommonModule"],
111795
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_3__["MatCommonModule"],
111796
                        _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_2__["PortalModule"],
111797
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_3__["MatRippleModule"],
111798
                        _angular_cdk_observers__WEBPACK_IMPORTED_MODULE_13__["ObserversModule"],
111799
                        _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_11__["A11yModule"],
111800
                    ],
111801
                    // Don't export all components because some are only to be used internally.
111802
                    exports: [
111803
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_3__["MatCommonModule"],
111804
                        MatTabGroup,
111805
                        MatTabLabel,
111806
                        MatTab,
111807
                        MatTabNav,
111808
                        MatTabLink,
111809
                        MatTabContent,
111810
                    ],
111811
                    declarations: [
111812
                        MatTabGroup,
111813
                        MatTabLabel,
111814
                        MatTab,
111815
                        MatInkBar,
111816
                        MatTabLabelWrapper,
111817
                        MatTabNav,
111818
                        MatTabLink,
111819
                        MatTabBody,
111820
                        MatTabBodyPortal,
111821
                        MatTabHeader,
111822
                        MatTabContent,
111823
                    ],
111824
                },] },
111825
    ];
111826
    return MatTabsModule;
111827
}());
111828
 
111829
/**
111830
 * @fileoverview added by tsickle
111831
 * @suppress {checkTypes} checked by tsc
111832
 */
111833
 
111834
/**
111835
 * @fileoverview added by tsickle
111836
 * @suppress {checkTypes} checked by tsc
111837
 */
111838
 
111839
/**
111840
 * @fileoverview added by tsickle
111841
 * @suppress {checkTypes} checked by tsc
111842
 */
111843
 
111844
 
111845
//# sourceMappingURL=tabs.es5.js.map
111846
 
111847
 
111848
/***/ }),
111849
 
111850
/***/ "./node_modules/@angular/material/esm5/toolbar.es5.js":
111851
/*!************************************************************!*\
111852
  !*** ./node_modules/@angular/material/esm5/toolbar.es5.js ***!
111853
  \************************************************************/
111854
/*! exports provided: MatToolbarModule, MatToolbarBase, _MatToolbarMixinBase, MatToolbarRow, MatToolbar, throwToolbarMixedModesError */
111855
/***/ (function(module, __webpack_exports__, __webpack_require__) {
111856
 
111857
"use strict";
111858
__webpack_require__.r(__webpack_exports__);
111859
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatToolbarModule", function() { return MatToolbarModule; });
111860
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatToolbarBase", function() { return MatToolbarBase; });
111861
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatToolbarMixinBase", function() { return _MatToolbarMixinBase; });
111862
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatToolbarRow", function() { return MatToolbarRow; });
111863
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatToolbar", function() { return MatToolbar; });
111864
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throwToolbarMixedModesError", function() { return throwToolbarMixedModesError; });
111865
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
111866
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
111867
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
111868
/* harmony import */ var _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/platform */ "./node_modules/@angular/cdk/esm5/platform.es5.js");
111869
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
111870
/**
111871
 * @license
111872
 * Copyright Google LLC All Rights Reserved.
111873
 *
111874
 * Use of this source code is governed by an MIT-style license that can be
111875
 * found in the LICENSE file at https://angular.io/license
111876
 */
111877
 
111878
 
111879
 
111880
 
111881
 
111882
 
111883
/**
111884
 * @fileoverview added by tsickle
111885
 * @suppress {checkTypes} checked by tsc
111886
 */
111887
/**
111888
 * \@docs-private
111889
 */
111890
var  /**
111891
 * \@docs-private
111892
 */
111893
MatToolbarBase = /** @class */ (function () {
111894
    function MatToolbarBase(_elementRef) {
111895
        this._elementRef = _elementRef;
111896
    }
111897
    return MatToolbarBase;
111898
}());
111899
var /** @type {?} */ _MatToolbarMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_2__["mixinColor"])(MatToolbarBase);
111900
var MatToolbarRow = /** @class */ (function () {
111901
    function MatToolbarRow() {
111902
    }
111903
    MatToolbarRow.decorators = [
111904
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{
111905
                    selector: 'mat-toolbar-row',
111906
                    exportAs: 'matToolbarRow',
111907
                    host: { 'class': 'mat-toolbar-row' },
111908
                },] },
111909
    ];
111910
    return MatToolbarRow;
111911
}());
111912
var MatToolbar = /** @class */ (function (_super) {
111913
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MatToolbar, _super);
111914
    function MatToolbar(elementRef, _platform, document) {
111915
        var _this = _super.call(this, elementRef) || this;
111916
        _this._platform = _platform;
111917
        // TODO: make the document a required param when doing breaking changes.
111918
        // TODO: make the document a required param when doing breaking changes.
111919
        _this._document = document;
111920
        return _this;
111921
    }
111922
    /**
111923
     * @return {?}
111924
     */
111925
    MatToolbar.prototype.ngAfterViewInit = /**
111926
     * @return {?}
111927
     */
111928
    function () {
111929
        var _this = this;
111930
        if (!Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["isDevMode"])() || !this._platform.isBrowser) {
111931
            return;
111932
        }
111933
        this._checkToolbarMixedModes();
111934
        this._toolbarRows.changes.subscribe(function () { return _this._checkToolbarMixedModes(); });
111935
    };
111936
    /**
111937
     * Throws an exception when developers are attempting to combine the different toolbar row modes.
111938
     * @return {?}
111939
     */
111940
    MatToolbar.prototype._checkToolbarMixedModes = /**
111941
     * Throws an exception when developers are attempting to combine the different toolbar row modes.
111942
     * @return {?}
111943
     */
111944
    function () {
111945
        var _this = this;
111946
        if (!this._toolbarRows.length) {
111947
            return;
111948
        }
111949
        // Check if there are any other DOM nodes that can display content but aren't inside of
111950
        // a <mat-toolbar-row> element.
111951
        var /** @type {?} */ isCombinedUsage = [].slice.call(this._elementRef.nativeElement.childNodes)
111952
            .filter(function (node) { return !(node.classList && node.classList.contains('mat-toolbar-row')); })
111953
            .filter(function (node) { return node.nodeType !== (_this._document ? _this._document.COMMENT_NODE : 8); })
111954
            .some(function (node) { return node.textContent.trim(); });
111955
        if (isCombinedUsage) {
111956
            throwToolbarMixedModesError();
111957
        }
111958
    };
111959
    MatToolbar.decorators = [
111960
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"], args: [{selector: 'mat-toolbar',
111961
                    exportAs: 'matToolbar',
111962
                    template: "<ng-content></ng-content><ng-content select=\"mat-toolbar-row\"></ng-content>",
111963
                    styles: ["@media screen and (-ms-high-contrast:active){.mat-toolbar{outline:solid 1px}}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%}.mat-toolbar-multiple-rows{min-height:64px}.mat-toolbar-row,.mat-toolbar-single-row{height:64px}@media (max-width:599px){.mat-toolbar-multiple-rows{min-height:56px}.mat-toolbar-row,.mat-toolbar-single-row{height:56px}}"],
111964
                    inputs: ['color'],
111965
                    host: {
111966
                        'class': 'mat-toolbar',
111967
                        '[class.mat-toolbar-multiple-rows]': '_toolbarRows.length > 0',
111968
                        '[class.mat-toolbar-single-row]': '_toolbarRows.length === 0',
111969
                    },
111970
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush,
111971
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
111972
                },] },
111973
    ];
111974
    /** @nocollapse */
111975
    MatToolbar.ctorParameters = function () { return [
111976
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"], },
111977
        { type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_3__["Platform"], },
111978
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_4__["DOCUMENT"],] },] },
111979
    ]; };
111980
    MatToolbar.propDecorators = {
111981
        "_toolbarRows": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChildren"], args: [MatToolbarRow,] },],
111982
    };
111983
    return MatToolbar;
111984
}(_MatToolbarMixinBase));
111985
/**
111986
 * Throws an exception when attempting to combine the different toolbar row modes.
111987
 * \@docs-private
111988
 * @return {?}
111989
 */
111990
function throwToolbarMixedModesError() {
111991
    throw Error('MatToolbar: Attempting to combine different toolbar modes. ' +
111992
        'Either specify multiple `<mat-toolbar-row>` elements explicitly or just place content ' +
111993
        'inside of a `<mat-toolbar>` for a single row.');
111994
}
111995
 
111996
/**
111997
 * @fileoverview added by tsickle
111998
 * @suppress {checkTypes} checked by tsc
111999
 */
112000
var MatToolbarModule = /** @class */ (function () {
112001
    function MatToolbarModule() {
112002
    }
112003
    MatToolbarModule.decorators = [
112004
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{
112005
                    imports: [_angular_material_core__WEBPACK_IMPORTED_MODULE_2__["MatCommonModule"]],
112006
                    exports: [MatToolbar, MatToolbarRow, _angular_material_core__WEBPACK_IMPORTED_MODULE_2__["MatCommonModule"]],
112007
                    declarations: [MatToolbar, MatToolbarRow],
112008
                },] },
112009
    ];
112010
    return MatToolbarModule;
112011
}());
112012
 
112013
/**
112014
 * @fileoverview added by tsickle
112015
 * @suppress {checkTypes} checked by tsc
112016
 */
112017
 
112018
/**
112019
 * @fileoverview added by tsickle
112020
 * @suppress {checkTypes} checked by tsc
112021
 */
112022
 
112023
 
112024
//# sourceMappingURL=toolbar.es5.js.map
112025
 
112026
 
112027
/***/ }),
112028
 
112029
/***/ "./node_modules/@angular/material/esm5/tooltip.es5.js":
112030
/*!************************************************************!*\
112031
  !*** ./node_modules/@angular/material/esm5/tooltip.es5.js ***!
112032
  \************************************************************/
112033
/*! exports provided: MatTooltipModule, SCROLL_THROTTLE_MS, TOOLTIP_PANEL_CLASS, getMatTooltipInvalidPositionError, MAT_TOOLTIP_SCROLL_STRATEGY, MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY, MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER, MAT_TOOLTIP_DEFAULT_OPTIONS, MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY, MatTooltip, TooltipComponent, matTooltipAnimations */
112034
/***/ (function(module, __webpack_exports__, __webpack_require__) {
112035
 
112036
"use strict";
112037
__webpack_require__.r(__webpack_exports__);
112038
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTooltipModule", function() { return MatTooltipModule; });
112039
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCROLL_THROTTLE_MS", function() { return SCROLL_THROTTLE_MS; });
112040
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TOOLTIP_PANEL_CLASS", function() { return TOOLTIP_PANEL_CLASS; });
112041
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMatTooltipInvalidPositionError", function() { return getMatTooltipInvalidPositionError; });
112042
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_TOOLTIP_SCROLL_STRATEGY", function() { return MAT_TOOLTIP_SCROLL_STRATEGY; });
112043
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY", function() { return MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY; });
112044
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER", function() { return MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER; });
112045
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_TOOLTIP_DEFAULT_OPTIONS", function() { return MAT_TOOLTIP_DEFAULT_OPTIONS; });
112046
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY", function() { return MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY; });
112047
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTooltip", function() { return MatTooltip; });
112048
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TooltipComponent", function() { return TooltipComponent; });
112049
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matTooltipAnimations", function() { return matTooltipAnimations; });
112050
/* harmony import */ var _angular_animations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/animations */ "./node_modules/@angular/animations/fesm5/animations.js");
112051
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
112052
/* harmony import */ var _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/cdk/a11y */ "./node_modules/@angular/cdk/esm5/a11y.es5.js");
112053
/* harmony import */ var _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/bidi */ "./node_modules/@angular/cdk/esm5/bidi.es5.js");
112054
/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/cdk/coercion */ "./node_modules/@angular/cdk/esm5/coercion.es5.js");
112055
/* harmony import */ var _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/cdk/keycodes */ "./node_modules/@angular/cdk/esm5/keycodes.es5.js");
112056
/* harmony import */ var _angular_cdk_layout__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/cdk/layout */ "./node_modules/@angular/cdk/esm5/layout.es5.js");
112057
/* harmony import */ var _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/cdk/overlay */ "./node_modules/@angular/cdk/esm5/overlay.es5.js");
112058
/* harmony import */ var _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/cdk/platform */ "./node_modules/@angular/cdk/esm5/platform.es5.js");
112059
/* harmony import */ var _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/cdk/portal */ "./node_modules/@angular/cdk/esm5/portal.es5.js");
112060
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
112061
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
112062
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
112063
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
112064
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
112065
/**
112066
 * @license
112067
 * Copyright Google LLC All Rights Reserved.
112068
 *
112069
 * Use of this source code is governed by an MIT-style license that can be
112070
 * found in the LICENSE file at https://angular.io/license
112071
 */
112072
 
112073
 
112074
 
112075
 
112076
 
112077
 
112078
 
112079
 
112080
 
112081
 
112082
 
112083
 
112084
 
112085
 
112086
 
112087
 
112088
/**
112089
 * @fileoverview added by tsickle
112090
 * @suppress {checkTypes} checked by tsc
112091
 */
112092
/**
112093
 * Animations used by MatTooltip.
112094
 */
112095
var /** @type {?} */ matTooltipAnimations = {
112096
    /** Animation that transitions a tooltip in and out. */
112097
    tooltipState: Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["trigger"])('state', [
112098
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('initial, void, hidden', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({ transform: 'scale(0)' })),
112099
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["state"])('visible', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["style"])({ transform: 'scale(1)' })),
112100
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["transition"])('* => visible', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["animate"])('150ms cubic-bezier(0.0, 0.0, 0.2, 1)')),
112101
        Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["transition"])('* => hidden', Object(_angular_animations__WEBPACK_IMPORTED_MODULE_0__["animate"])('150ms cubic-bezier(0.4, 0.0, 1, 1)')),
112102
    ])
112103
};
112104
 
112105
/**
112106
 * @fileoverview added by tsickle
112107
 * @suppress {checkTypes} checked by tsc
112108
 */
112109
/**
112110
 * Time in ms to throttle repositioning after scroll events.
112111
 */
112112
var /** @type {?} */ SCROLL_THROTTLE_MS = 20;
112113
/**
112114
 * CSS class that will be attached to the overlay panel.
112115
 */
112116
var /** @type {?} */ TOOLTIP_PANEL_CLASS = 'mat-tooltip-panel';
112117
/**
112118
 * Creates an error to be thrown if the user supplied an invalid tooltip position.
112119
 * @param {?} position
112120
 * @return {?}
112121
 */
112122
function getMatTooltipInvalidPositionError(position) {
112123
    return Error("Tooltip position \"" + position + "\" is invalid.");
112124
}
112125
/**
112126
 * Injection token that determines the scroll handling while a tooltip is visible.
112127
 */
112128
var /** @type {?} */ MAT_TOOLTIP_SCROLL_STRATEGY = new _angular_core__WEBPACK_IMPORTED_MODULE_11__["InjectionToken"]('mat-tooltip-scroll-strategy');
112129
/**
112130
 * \@docs-private
112131
 * @param {?} overlay
112132
 * @return {?}
112133
 */
112134
function MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY(overlay) {
112135
    return function () { return overlay.scrollStrategies.reposition({ scrollThrottle: SCROLL_THROTTLE_MS }); };
112136
}
112137
/**
112138
 * \@docs-private
112139
 */
112140
var /** @type {?} */ MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER = {
112141
    provide: MAT_TOOLTIP_SCROLL_STRATEGY,
112142
    deps: [_angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_7__["Overlay"]],
112143
    useFactory: MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY,
112144
};
112145
/**
112146
 * Injection token to be used to override the default options for `matTooltip`.
112147
 */
112148
var /** @type {?} */ MAT_TOOLTIP_DEFAULT_OPTIONS = new _angular_core__WEBPACK_IMPORTED_MODULE_11__["InjectionToken"]('mat-tooltip-default-options', {
112149
    providedIn: 'root',
112150
    factory: MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY
112151
});
112152
/**
112153
 * @return {?}
112154
 */
112155
function MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY() {
112156
    return {
112157
        showDelay: 0,
112158
        hideDelay: 0,
112159
        touchendHideDelay: 1500,
112160
    };
112161
}
112162
/**
112163
 * Directive that attaches a material design tooltip to the host element. Animates the showing and
112164
 * hiding of a tooltip provided position (defaults to below the element).
112165
 *
112166
 * https://material.google.com/components/tooltips.html
112167
 */
112168
var MatTooltip = /** @class */ (function () {
112169
    function MatTooltip(_overlay, _elementRef, _scrollDispatcher, _viewContainerRef, _ngZone, _platform, _ariaDescriber, _focusMonitor, _scrollStrategy, _dir, _defaultOptions) {
112170
        var _this = this;
112171
        this._overlay = _overlay;
112172
        this._elementRef = _elementRef;
112173
        this._scrollDispatcher = _scrollDispatcher;
112174
        this._viewContainerRef = _viewContainerRef;
112175
        this._ngZone = _ngZone;
112176
        this._platform = _platform;
112177
        this._ariaDescriber = _ariaDescriber;
112178
        this._focusMonitor = _focusMonitor;
112179
        this._scrollStrategy = _scrollStrategy;
112180
        this._dir = _dir;
112181
        this._defaultOptions = _defaultOptions;
112182
        this._position = 'below';
112183
        this._disabled = false;
112184
        /**
112185
         * The default delay in ms before showing the tooltip after show is called
112186
         */
112187
        this.showDelay = this._defaultOptions.showDelay;
112188
        /**
112189
         * The default delay in ms before hiding the tooltip after hide is called
112190
         */
112191
        this.hideDelay = this._defaultOptions.hideDelay;
112192
        this._message = '';
112193
        this._manualListeners = new Map();
112194
        /**
112195
         * Emits when the component is destroyed.
112196
         */
112197
        this._destroyed = new rxjs__WEBPACK_IMPORTED_MODULE_12__["Subject"]();
112198
        var /** @type {?} */ element = _elementRef.nativeElement;
112199
        // The mouse events shouldn't be bound on iOS devices, because
112200
        // they can prevent the first tap from firing its click event.
112201
        if (!_platform.IOS) {
112202
            this._manualListeners.set('mouseenter', function () { return _this.show(); });
112203
            this._manualListeners.set('mouseleave', function () { return _this.hide(); });
112204
            this._manualListeners
112205
                .forEach(function (listener, event) { return _elementRef.nativeElement.addEventListener(event, listener); });
112206
        }
112207
        else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {
112208
            // When we bind a gesture event on an element (in this case `longpress`), HammerJS
112209
            // will add some inline styles by default, including `user-select: none`. This is
112210
            // problematic on iOS, because it will prevent users from typing in inputs. If
112211
            // we're on iOS and the tooltip is attached on an input or textarea, we clear
112212
            // the `user-select` to avoid these issues.
112213
            element.style.webkitUserSelect = element.style.userSelect = '';
112214
        }
112215
        // Hammer applies `-webkit-user-drag: none` on all elements by default,
112216
        // which breaks the native drag&drop. If the consumer explicitly made
112217
        // the element draggable, clear the `-webkit-user-drag`.
112218
        if (element.draggable && element.style['webkitUserDrag'] === 'none') {
112219
            element.style['webkitUserDrag'] = '';
112220
        }
112221
        _focusMonitor.monitor(element).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["takeUntil"])(this._destroyed)).subscribe(function (origin) {
112222
            // Note that the focus monitor runs outside the Angular zone.
112223
            if (!origin) {
112224
                _ngZone.run(function () { return _this.hide(0); });
112225
            }
112226
            else if (origin === 'keyboard') {
112227
                _ngZone.run(function () { return _this.show(); });
112228
            }
112229
        });
112230
    }
112231
    Object.defineProperty(MatTooltip.prototype, "position", {
112232
        get: /**
112233
         * Allows the user to define the position of the tooltip relative to the parent element
112234
         * @return {?}
112235
         */
112236
        function () { return this._position; },
112237
        set: /**
112238
         * @param {?} value
112239
         * @return {?}
112240
         */
112241
        function (value) {
112242
            if (value !== this._position) {
112243
                this._position = value;
112244
                if (this._overlayRef) {
112245
                    this._updatePosition();
112246
                    if (this._tooltipInstance) {
112247
                        /** @type {?} */ ((this._tooltipInstance)).show(0);
112248
                    }
112249
                    this._overlayRef.updatePosition();
112250
                }
112251
            }
112252
        },
112253
        enumerable: true,
112254
        configurable: true
112255
    });
112256
    Object.defineProperty(MatTooltip.prototype, "disabled", {
112257
        get: /**
112258
         * Disables the display of the tooltip.
112259
         * @return {?}
112260
         */
112261
        function () { return this._disabled; },
112262
        set: /**
112263
         * @param {?} value
112264
         * @return {?}
112265
         */
112266
        function (value) {
112267
            this._disabled = Object(_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_4__["coerceBooleanProperty"])(value);
112268
            // If tooltip is disabled, hide immediately.
112269
            if (this._disabled) {
112270
                this.hide(0);
112271
            }
112272
        },
112273
        enumerable: true,
112274
        configurable: true
112275
    });
112276
    Object.defineProperty(MatTooltip.prototype, "message", {
112277
        get: /**
112278
         * The message to be displayed in the tooltip
112279
         * @return {?}
112280
         */
112281
        function () { return this._message; },
112282
        set: /**
112283
         * @param {?} value
112284
         * @return {?}
112285
         */
112286
        function (value) {
112287
            this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this._message);
112288
            // If the message is not a string (e.g. number), convert it to a string and trim it.
112289
            this._message = value != null ? ("" + value).trim() : '';
112290
            if (!this._message && this._isTooltipVisible()) {
112291
                this.hide(0);
112292
            }
112293
            else {
112294
                this._updateTooltipMessage();
112295
                this._ariaDescriber.describe(this._elementRef.nativeElement, this.message);
112296
            }
112297
        },
112298
        enumerable: true,
112299
        configurable: true
112300
    });
112301
    Object.defineProperty(MatTooltip.prototype, "tooltipClass", {
112302
        get: /**
112303
         * Classes to be passed to the tooltip. Supports the same syntax as `ngClass`.
112304
         * @return {?}
112305
         */
112306
        function () { return this._tooltipClass; },
112307
        set: /**
112308
         * @param {?} value
112309
         * @return {?}
112310
         */
112311
        function (value) {
112312
            this._tooltipClass = value;
112313
            if (this._tooltipInstance) {
112314
                this._setTooltipClass(this._tooltipClass);
112315
            }
112316
        },
112317
        enumerable: true,
112318
        configurable: true
112319
    });
112320
    /**
112321
     * Dispose the tooltip when destroyed.
112322
     */
112323
    /**
112324
     * Dispose the tooltip when destroyed.
112325
     * @return {?}
112326
     */
112327
    MatTooltip.prototype.ngOnDestroy = /**
112328
     * Dispose the tooltip when destroyed.
112329
     * @return {?}
112330
     */
112331
    function () {
112332
        var _this = this;
112333
        if (this._overlayRef) {
112334
            this._overlayRef.dispose();
112335
            this._tooltipInstance = null;
112336
        }
112337
        // Clean up the event listeners set in the constructor
112338
        if (!this._platform.IOS) {
112339
            this._manualListeners.forEach(function (listener, event) {
112340
                return _this._elementRef.nativeElement.removeEventListener(event, listener);
112341
            });
112342
            this._manualListeners.clear();
112343
        }
112344
        this._destroyed.next();
112345
        this._destroyed.complete();
112346
        this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this.message);
112347
        this._focusMonitor.stopMonitoring(this._elementRef.nativeElement);
112348
    };
112349
    /** Shows the tooltip after the delay in ms, defaults to tooltip-delay-show or 0ms if no input */
112350
    /**
112351
     * Shows the tooltip after the delay in ms, defaults to tooltip-delay-show or 0ms if no input
112352
     * @param {?=} delay
112353
     * @return {?}
112354
     */
112355
    MatTooltip.prototype.show = /**
112356
     * Shows the tooltip after the delay in ms, defaults to tooltip-delay-show or 0ms if no input
112357
     * @param {?=} delay
112358
     * @return {?}
112359
     */
112360
    function (delay) {
112361
        var _this = this;
112362
        if (delay === void 0) { delay = this.showDelay; }
112363
        if (this.disabled || !this.message) {
112364
            return;
112365
        }
112366
        var /** @type {?} */ overlayRef = this._createOverlay();
112367
        this._detach();
112368
        this._portal = this._portal || new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_9__["ComponentPortal"](TooltipComponent, this._viewContainerRef);
112369
        this._tooltipInstance = overlayRef.attach(this._portal).instance;
112370
        this._tooltipInstance.afterHidden()
112371
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["takeUntil"])(this._destroyed))
112372
            .subscribe(function () { return _this._detach(); });
112373
        this._setTooltipClass(this._tooltipClass);
112374
        this._updateTooltipMessage(); /** @type {?} */
112375
        ((this._tooltipInstance)).show(delay);
112376
    };
112377
    /** Hides the tooltip after the delay in ms, defaults to tooltip-delay-hide or 0ms if no input */
112378
    /**
112379
     * Hides the tooltip after the delay in ms, defaults to tooltip-delay-hide or 0ms if no input
112380
     * @param {?=} delay
112381
     * @return {?}
112382
     */
112383
    MatTooltip.prototype.hide = /**
112384
     * Hides the tooltip after the delay in ms, defaults to tooltip-delay-hide or 0ms if no input
112385
     * @param {?=} delay
112386
     * @return {?}
112387
     */
112388
    function (delay) {
112389
        if (delay === void 0) { delay = this.hideDelay; }
112390
        if (this._tooltipInstance) {
112391
            this._tooltipInstance.hide(delay);
112392
        }
112393
    };
112394
    /** Shows/hides the tooltip */
112395
    /**
112396
     * Shows/hides the tooltip
112397
     * @return {?}
112398
     */
112399
    MatTooltip.prototype.toggle = /**
112400
     * Shows/hides the tooltip
112401
     * @return {?}
112402
     */
112403
    function () {
112404
        this._isTooltipVisible() ? this.hide() : this.show();
112405
    };
112406
    /** Returns true if the tooltip is currently visible to the user */
112407
    /**
112408
     * Returns true if the tooltip is currently visible to the user
112409
     * @return {?}
112410
     */
112411
    MatTooltip.prototype._isTooltipVisible = /**
112412
     * Returns true if the tooltip is currently visible to the user
112413
     * @return {?}
112414
     */
112415
    function () {
112416
        return !!this._tooltipInstance && this._tooltipInstance.isVisible();
112417
    };
112418
    /** Handles the keydown events on the host element. */
112419
    /**
112420
     * Handles the keydown events on the host element.
112421
     * @param {?} e
112422
     * @return {?}
112423
     */
112424
    MatTooltip.prototype._handleKeydown = /**
112425
     * Handles the keydown events on the host element.
112426
     * @param {?} e
112427
     * @return {?}
112428
     */
112429
    function (e) {
112430
        if (this._isTooltipVisible() && e.keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_5__["ESCAPE"]) {
112431
            e.stopPropagation();
112432
            this.hide(0);
112433
        }
112434
    };
112435
    /** Handles the touchend events on the host element. */
112436
    /**
112437
     * Handles the touchend events on the host element.
112438
     * @return {?}
112439
     */
112440
    MatTooltip.prototype._handleTouchend = /**
112441
     * Handles the touchend events on the host element.
112442
     * @return {?}
112443
     */
112444
    function () {
112445
        this.hide(this._defaultOptions.touchendHideDelay);
112446
    };
112447
    /**
112448
     * Create the overlay config and position strategy
112449
     * @return {?}
112450
     */
112451
    MatTooltip.prototype._createOverlay = /**
112452
     * Create the overlay config and position strategy
112453
     * @return {?}
112454
     */
112455
    function () {
112456
        var _this = this;
112457
        if (this._overlayRef) {
112458
            return this._overlayRef;
112459
        }
112460
        // Create connected position strategy that listens for scroll events to reposition.
112461
        var /** @type {?} */ strategy = this._overlay.position()
112462
            .flexibleConnectedTo(this._elementRef)
112463
            .withTransformOriginOn('.mat-tooltip')
112464
            .withFlexibleDimensions(false)
112465
            .withViewportMargin(8);
112466
        var /** @type {?} */ scrollableAncestors = this._scrollDispatcher
112467
            .getAncestorScrollContainers(this._elementRef);
112468
        strategy.withScrollableContainers(scrollableAncestors);
112469
        strategy.positionChanges.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["takeUntil"])(this._destroyed)).subscribe(function (change) {
112470
            if (_this._tooltipInstance) {
112471
                if (change.scrollableViewProperties.isOverlayClipped && _this._tooltipInstance.isVisible()) {
112472
                    // After position changes occur and the overlay is clipped by
112473
                    // a parent scrollable then close the tooltip.
112474
                    // After position changes occur and the overlay is clipped by
112475
                    // a parent scrollable then close the tooltip.
112476
                    _this._ngZone.run(function () { return _this.hide(0); });
112477
                }
112478
            }
112479
        });
112480
        this._overlayRef = this._overlay.create({
112481
            direction: this._dir,
112482
            positionStrategy: strategy,
112483
            panelClass: TOOLTIP_PANEL_CLASS,
112484
            scrollStrategy: this._scrollStrategy()
112485
        });
112486
        this._updatePosition();
112487
        this._overlayRef.detachments()
112488
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["takeUntil"])(this._destroyed))
112489
            .subscribe(function () { return _this._detach(); });
112490
        return this._overlayRef;
112491
    };
112492
    /**
112493
     * Detaches the currently-attached tooltip.
112494
     * @return {?}
112495
     */
112496
    MatTooltip.prototype._detach = /**
112497
     * Detaches the currently-attached tooltip.
112498
     * @return {?}
112499
     */
112500
    function () {
112501
        if (this._overlayRef && this._overlayRef.hasAttached()) {
112502
            this._overlayRef.detach();
112503
        }
112504
        this._tooltipInstance = null;
112505
    };
112506
    /**
112507
     * Updates the position of the current tooltip.
112508
     * @return {?}
112509
     */
112510
    MatTooltip.prototype._updatePosition = /**
112511
     * Updates the position of the current tooltip.
112512
     * @return {?}
112513
     */
112514
    function () {
112515
        var /** @type {?} */ position = /** @type {?} */ (((this._overlayRef)).getConfig().positionStrategy);
112516
        var /** @type {?} */ origin = this._getOrigin();
112517
        var /** @type {?} */ overlay = this._getOverlayPosition();
112518
        position.withPositions([
112519
            Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__assign"])({}, origin.main, overlay.main),
112520
            Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__assign"])({}, origin.fallback, overlay.fallback)
112521
        ]);
112522
    };
112523
    /**
112524
     * Returns the origin position and a fallback position based on the user's position preference.
112525
     * The fallback position is the inverse of the origin (e.g. `'below' -> 'above'`).
112526
     */
112527
    /**
112528
     * Returns the origin position and a fallback position based on the user's position preference.
112529
     * The fallback position is the inverse of the origin (e.g. `'below' -> 'above'`).
112530
     * @return {?}
112531
     */
112532
    MatTooltip.prototype._getOrigin = /**
112533
     * Returns the origin position and a fallback position based on the user's position preference.
112534
     * The fallback position is the inverse of the origin (e.g. `'below' -> 'above'`).
112535
     * @return {?}
112536
     */
112537
    function () {
112538
        var /** @type {?} */ isLtr = !this._dir || this._dir.value == 'ltr';
112539
        var /** @type {?} */ position = this.position;
112540
        var /** @type {?} */ originPosition;
112541
        if (position == 'above' || position == 'below') {
112542
            originPosition = { originX: 'center', originY: position == 'above' ? 'top' : 'bottom' };
112543
        }
112544
        else if (position == 'before' ||
112545
            (position == 'left' && isLtr) ||
112546
            (position == 'right' && !isLtr)) {
112547
            originPosition = { originX: 'start', originY: 'center' };
112548
        }
112549
        else if (position == 'after' ||
112550
            (position == 'right' && isLtr) ||
112551
            (position == 'left' && !isLtr)) {
112552
            originPosition = { originX: 'end', originY: 'center' };
112553
        }
112554
        else {
112555
            throw getMatTooltipInvalidPositionError(position);
112556
        }
112557
        var _a = this._invertPosition(originPosition.originX, originPosition.originY), x = _a.x, y = _a.y;
112558
        return {
112559
            main: originPosition,
112560
            fallback: { originX: x, originY: y }
112561
        };
112562
    };
112563
    /** Returns the overlay position and a fallback position based on the user's preference */
112564
    /**
112565
     * Returns the overlay position and a fallback position based on the user's preference
112566
     * @return {?}
112567
     */
112568
    MatTooltip.prototype._getOverlayPosition = /**
112569
     * Returns the overlay position and a fallback position based on the user's preference
112570
     * @return {?}
112571
     */
112572
    function () {
112573
        var /** @type {?} */ isLtr = !this._dir || this._dir.value == 'ltr';
112574
        var /** @type {?} */ position = this.position;
112575
        var /** @type {?} */ overlayPosition;
112576
        if (position == 'above') {
112577
            overlayPosition = { overlayX: 'center', overlayY: 'bottom' };
112578
        }
112579
        else if (position == 'below') {
112580
            overlayPosition = { overlayX: 'center', overlayY: 'top' };
112581
        }
112582
        else if (position == 'before' ||
112583
            (position == 'left' && isLtr) ||
112584
            (position == 'right' && !isLtr)) {
112585
            overlayPosition = { overlayX: 'end', overlayY: 'center' };
112586
        }
112587
        else if (position == 'after' ||
112588
            (position == 'right' && isLtr) ||
112589
            (position == 'left' && !isLtr)) {
112590
            overlayPosition = { overlayX: 'start', overlayY: 'center' };
112591
        }
112592
        else {
112593
            throw getMatTooltipInvalidPositionError(position);
112594
        }
112595
        var _a = this._invertPosition(overlayPosition.overlayX, overlayPosition.overlayY), x = _a.x, y = _a.y;
112596
        return {
112597
            main: overlayPosition,
112598
            fallback: { overlayX: x, overlayY: y }
112599
        };
112600
    };
112601
    /**
112602
     * Updates the tooltip message and repositions the overlay according to the new message length
112603
     * @return {?}
112604
     */
112605
    MatTooltip.prototype._updateTooltipMessage = /**
112606
     * Updates the tooltip message and repositions the overlay according to the new message length
112607
     * @return {?}
112608
     */
112609
    function () {
112610
        var _this = this;
112611
        // Must wait for the message to be painted to the tooltip so that the overlay can properly
112612
        // calculate the correct positioning based on the size of the text.
112613
        if (this._tooltipInstance) {
112614
            this._tooltipInstance.message = this.message;
112615
            this._tooltipInstance._markForCheck();
112616
            this._ngZone.onMicrotaskEmpty.asObservable().pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["take"])(1), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_10__["takeUntil"])(this._destroyed)).subscribe(function () {
112617
                if (_this._tooltipInstance) {
112618
                    /** @type {?} */ ((_this._overlayRef)).updatePosition();
112619
                }
112620
            });
112621
        }
112622
    };
112623
    /**
112624
     * Updates the tooltip class
112625
     * @param {?} tooltipClass
112626
     * @return {?}
112627
     */
112628
    MatTooltip.prototype._setTooltipClass = /**
112629
     * Updates the tooltip class
112630
     * @param {?} tooltipClass
112631
     * @return {?}
112632
     */
112633
    function (tooltipClass) {
112634
        if (this._tooltipInstance) {
112635
            this._tooltipInstance.tooltipClass = tooltipClass;
112636
            this._tooltipInstance._markForCheck();
112637
        }
112638
    };
112639
    /**
112640
     * Inverts an overlay position.
112641
     * @param {?} x
112642
     * @param {?} y
112643
     * @return {?}
112644
     */
112645
    MatTooltip.prototype._invertPosition = /**
112646
     * Inverts an overlay position.
112647
     * @param {?} x
112648
     * @param {?} y
112649
     * @return {?}
112650
     */
112651
    function (x, y) {
112652
        if (this.position === 'above' || this.position === 'below') {
112653
            if (y === 'top') {
112654
                y = 'bottom';
112655
            }
112656
            else if (y === 'bottom') {
112657
                y = 'top';
112658
            }
112659
        }
112660
        else {
112661
            if (x === 'end') {
112662
                x = 'start';
112663
            }
112664
            else if (x === 'start') {
112665
                x = 'end';
112666
            }
112667
        }
112668
        return { x: x, y: y };
112669
    };
112670
    MatTooltip.decorators = [
112671
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_11__["Directive"], args: [{
112672
                    selector: '[matTooltip]',
112673
                    exportAs: 'matTooltip',
112674
                    host: {
112675
                        '(longpress)': 'show()',
112676
                        '(keydown)': '_handleKeydown($event)',
112677
                        '(touchend)': '_handleTouchend()',
112678
                    },
112679
                },] },
112680
    ];
112681
    /** @nocollapse */
112682
    MatTooltip.ctorParameters = function () { return [
112683
        { type: _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_7__["Overlay"], },
112684
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_11__["ElementRef"], },
112685
        { type: _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_7__["ScrollDispatcher"], },
112686
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_11__["ViewContainerRef"], },
112687
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_11__["NgZone"], },
112688
        { type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_8__["Platform"], },
112689
        { type: _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_2__["AriaDescriber"], },
112690
        { type: _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_2__["FocusMonitor"], },
112691
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_11__["Inject"], args: [MAT_TOOLTIP_SCROLL_STRATEGY,] },] },
112692
        { type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_3__["Directionality"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_11__["Optional"] },] },
112693
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_11__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_11__["Inject"], args: [MAT_TOOLTIP_DEFAULT_OPTIONS,] },] },
112694
    ]; };
112695
    MatTooltip.propDecorators = {
112696
        "position": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_11__["Input"], args: ['matTooltipPosition',] },],
112697
        "disabled": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_11__["Input"], args: ['matTooltipDisabled',] },],
112698
        "showDelay": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_11__["Input"], args: ['matTooltipShowDelay',] },],
112699
        "hideDelay": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_11__["Input"], args: ['matTooltipHideDelay',] },],
112700
        "message": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_11__["Input"], args: ['matTooltip',] },],
112701
        "tooltipClass": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_11__["Input"], args: ['matTooltipClass',] },],
112702
    };
112703
    return MatTooltip;
112704
}());
112705
/**
112706
 * Internal component that wraps the tooltip's content.
112707
 * \@docs-private
112708
 */
112709
var TooltipComponent = /** @class */ (function () {
112710
    function TooltipComponent(_changeDetectorRef, _breakpointObserver) {
112711
        this._changeDetectorRef = _changeDetectorRef;
112712
        this._breakpointObserver = _breakpointObserver;
112713
        /**
112714
         * Property watched by the animation framework to show or hide the tooltip
112715
         */
112716
        this._visibility = 'initial';
112717
        /**
112718
         * Whether interactions on the page should close the tooltip
112719
         */
112720
        this._closeOnInteraction = false;
112721
        /**
112722
         * Subject for notifying that the tooltip has been hidden from the view
112723
         */
112724
        this._onHide = new rxjs__WEBPACK_IMPORTED_MODULE_12__["Subject"]();
112725
        /**
112726
         * Stream that emits whether the user has a handset-sized display.
112727
         */
112728
        this._isHandset = this._breakpointObserver.observe(_angular_cdk_layout__WEBPACK_IMPORTED_MODULE_6__["Breakpoints"].Handset);
112729
    }
112730
    /**
112731
     * Shows the tooltip with an animation originating from the provided origin
112732
     * @param delay Amount of milliseconds to the delay showing the tooltip.
112733
     */
112734
    /**
112735
     * Shows the tooltip with an animation originating from the provided origin
112736
     * @param {?} delay Amount of milliseconds to the delay showing the tooltip.
112737
     * @return {?}
112738
     */
112739
    TooltipComponent.prototype.show = /**
112740
     * Shows the tooltip with an animation originating from the provided origin
112741
     * @param {?} delay Amount of milliseconds to the delay showing the tooltip.
112742
     * @return {?}
112743
     */
112744
    function (delay) {
112745
        var _this = this;
112746
        // Cancel the delayed hide if it is scheduled
112747
        if (this._hideTimeoutId) {
112748
            clearTimeout(this._hideTimeoutId);
112749
        }
112750
        // Body interactions should cancel the tooltip if there is a delay in showing.
112751
        this._closeOnInteraction = true;
112752
        this._showTimeoutId = setTimeout(function () {
112753
            _this._visibility = 'visible';
112754
            // Mark for check so if any parent component has set the
112755
            // ChangeDetectionStrategy to OnPush it will be checked anyways
112756
            // Mark for check so if any parent component has set the
112757
            // ChangeDetectionStrategy to OnPush it will be checked anyways
112758
            _this._markForCheck();
112759
        }, delay);
112760
    };
112761
    /**
112762
     * Begins the animation to hide the tooltip after the provided delay in ms.
112763
     * @param delay Amount of milliseconds to delay showing the tooltip.
112764
     */
112765
    /**
112766
     * Begins the animation to hide the tooltip after the provided delay in ms.
112767
     * @param {?} delay Amount of milliseconds to delay showing the tooltip.
112768
     * @return {?}
112769
     */
112770
    TooltipComponent.prototype.hide = /**
112771
     * Begins the animation to hide the tooltip after the provided delay in ms.
112772
     * @param {?} delay Amount of milliseconds to delay showing the tooltip.
112773
     * @return {?}
112774
     */
112775
    function (delay) {
112776
        var _this = this;
112777
        // Cancel the delayed show if it is scheduled
112778
        if (this._showTimeoutId) {
112779
            clearTimeout(this._showTimeoutId);
112780
        }
112781
        this._hideTimeoutId = setTimeout(function () {
112782
            _this._visibility = 'hidden';
112783
            // Mark for check so if any parent component has set the
112784
            // ChangeDetectionStrategy to OnPush it will be checked anyways
112785
            // Mark for check so if any parent component has set the
112786
            // ChangeDetectionStrategy to OnPush it will be checked anyways
112787
            _this._markForCheck();
112788
        }, delay);
112789
    };
112790
    /** Returns an observable that notifies when the tooltip has been hidden from view. */
112791
    /**
112792
     * Returns an observable that notifies when the tooltip has been hidden from view.
112793
     * @return {?}
112794
     */
112795
    TooltipComponent.prototype.afterHidden = /**
112796
     * Returns an observable that notifies when the tooltip has been hidden from view.
112797
     * @return {?}
112798
     */
112799
    function () {
112800
        return this._onHide.asObservable();
112801
    };
112802
    /** Whether the tooltip is being displayed. */
112803
    /**
112804
     * Whether the tooltip is being displayed.
112805
     * @return {?}
112806
     */
112807
    TooltipComponent.prototype.isVisible = /**
112808
     * Whether the tooltip is being displayed.
112809
     * @return {?}
112810
     */
112811
    function () {
112812
        return this._visibility === 'visible';
112813
    };
112814
    /**
112815
     * @return {?}
112816
     */
112817
    TooltipComponent.prototype._animationStart = /**
112818
     * @return {?}
112819
     */
112820
    function () {
112821
        this._closeOnInteraction = false;
112822
    };
112823
    /**
112824
     * @param {?} event
112825
     * @return {?}
112826
     */
112827
    TooltipComponent.prototype._animationDone = /**
112828
     * @param {?} event
112829
     * @return {?}
112830
     */
112831
    function (event) {
112832
        var /** @type {?} */ toState = /** @type {?} */ (event.toState);
112833
        if (toState === 'hidden' && !this.isVisible()) {
112834
            this._onHide.next();
112835
        }
112836
        if (toState === 'visible' || toState === 'hidden') {
112837
            this._closeOnInteraction = true;
112838
        }
112839
    };
112840
    /**
112841
     * Interactions on the HTML body should close the tooltip immediately as defined in the
112842
     * material design spec.
112843
     * https://material.google.com/components/tooltips.html#tooltips-interaction
112844
     */
112845
    /**
112846
     * Interactions on the HTML body should close the tooltip immediately as defined in the
112847
     * material design spec.
112848
     * https://material.google.com/components/tooltips.html#tooltips-interaction
112849
     * @return {?}
112850
     */
112851
    TooltipComponent.prototype._handleBodyInteraction = /**
112852
     * Interactions on the HTML body should close the tooltip immediately as defined in the
112853
     * material design spec.
112854
     * https://material.google.com/components/tooltips.html#tooltips-interaction
112855
     * @return {?}
112856
     */
112857
    function () {
112858
        if (this._closeOnInteraction) {
112859
            this.hide(0);
112860
        }
112861
    };
112862
    /**
112863
     * Marks that the tooltip needs to be checked in the next change detection run.
112864
     * Mainly used for rendering the initial text before positioning a tooltip, which
112865
     * can be problematic in components with OnPush change detection.
112866
     */
112867
    /**
112868
     * Marks that the tooltip needs to be checked in the next change detection run.
112869
     * Mainly used for rendering the initial text before positioning a tooltip, which
112870
     * can be problematic in components with OnPush change detection.
112871
     * @return {?}
112872
     */
112873
    TooltipComponent.prototype._markForCheck = /**
112874
     * Marks that the tooltip needs to be checked in the next change detection run.
112875
     * Mainly used for rendering the initial text before positioning a tooltip, which
112876
     * can be problematic in components with OnPush change detection.
112877
     * @return {?}
112878
     */
112879
    function () {
112880
        this._changeDetectorRef.markForCheck();
112881
    };
112882
    TooltipComponent.decorators = [
112883
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_11__["Component"], args: [{selector: 'mat-tooltip-component',
112884
                    template: "<div class=\"mat-tooltip\" [ngClass]=\"tooltipClass\" [class.mat-tooltip-handset]=\"(_isHandset | async)!.matches\" [@state]=\"_visibility\" (@state.start)=\"_animationStart()\" (@state.done)=\"_animationDone($event)\">{{message}}</div>",
112885
                    styles: [".mat-tooltip-panel{pointer-events:none!important}.mat-tooltip{color:#fff;border-radius:2px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}@media screen and (-ms-high-contrast:active){.mat-tooltip{outline:solid 1px}}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}"],
112886
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_11__["ViewEncapsulation"].None,
112887
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_11__["ChangeDetectionStrategy"].OnPush,
112888
                    animations: [matTooltipAnimations.tooltipState],
112889
                    host: {
112890
                        // Forces the element to have a layout in IE and Edge. This fixes issues where the element
112891
                        // won't be rendered if the animations are disabled or there is no web animations polyfill.
112892
                        '[style.zoom]': '_visibility === "visible" ? 1 : null',
112893
                        '(body:click)': 'this._handleBodyInteraction()',
112894
                        'aria-hidden': 'true',
112895
                    }
112896
                },] },
112897
    ];
112898
    /** @nocollapse */
112899
    TooltipComponent.ctorParameters = function () { return [
112900
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_11__["ChangeDetectorRef"], },
112901
        { type: _angular_cdk_layout__WEBPACK_IMPORTED_MODULE_6__["BreakpointObserver"], },
112902
    ]; };
112903
    return TooltipComponent;
112904
}());
112905
 
112906
/**
112907
 * @fileoverview added by tsickle
112908
 * @suppress {checkTypes} checked by tsc
112909
 */
112910
var MatTooltipModule = /** @class */ (function () {
112911
    function MatTooltipModule() {
112912
    }
112913
    MatTooltipModule.decorators = [
112914
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_11__["NgModule"], args: [{
112915
                    imports: [
112916
                        _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_2__["A11yModule"],
112917
                        _angular_common__WEBPACK_IMPORTED_MODULE_13__["CommonModule"],
112918
                        _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_7__["OverlayModule"],
112919
                        _angular_material_core__WEBPACK_IMPORTED_MODULE_14__["MatCommonModule"],
112920
                    ],
112921
                    exports: [MatTooltip, TooltipComponent, _angular_material_core__WEBPACK_IMPORTED_MODULE_14__["MatCommonModule"]],
112922
                    declarations: [MatTooltip, TooltipComponent],
112923
                    entryComponents: [TooltipComponent],
112924
                    providers: [MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER]
112925
                },] },
112926
    ];
112927
    return MatTooltipModule;
112928
}());
112929
 
112930
/**
112931
 * @fileoverview added by tsickle
112932
 * @suppress {checkTypes} checked by tsc
112933
 */
112934
 
112935
/**
112936
 * @fileoverview added by tsickle
112937
 * @suppress {checkTypes} checked by tsc
112938
 */
112939
 
112940
 
112941
//# sourceMappingURL=tooltip.es5.js.map
112942
 
112943
 
112944
/***/ }),
112945
 
112946
/***/ "./node_modules/@angular/material/esm5/tree.es5.js":
112947
/*!*********************************************************!*\
112948
  !*** ./node_modules/@angular/material/esm5/tree.es5.js ***!
112949
  \*********************************************************/
112950
/*! exports provided: _MatTreeNodeMixinBase, _MatNestedTreeNodeMixinBase, MatTreeNode, MatTreeNodeDef, MatNestedTreeNode, MatTreeNodePadding, MatTree, MatTreeModule, MatTreeNodeToggle, MatTreeNodeOutlet, MatTreeFlattener, MatTreeFlatDataSource, MatTreeNestedDataSource */
112951
/***/ (function(module, __webpack_exports__, __webpack_require__) {
112952
 
112953
"use strict";
112954
__webpack_require__.r(__webpack_exports__);
112955
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatTreeNodeMixinBase", function() { return _MatTreeNodeMixinBase; });
112956
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_MatNestedTreeNodeMixinBase", function() { return _MatNestedTreeNodeMixinBase; });
112957
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTreeNode", function() { return MatTreeNode; });
112958
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTreeNodeDef", function() { return MatTreeNodeDef; });
112959
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatNestedTreeNode", function() { return MatNestedTreeNode; });
112960
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTreeNodePadding", function() { return MatTreeNodePadding; });
112961
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTree", function() { return MatTree; });
112962
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTreeModule", function() { return MatTreeModule; });
112963
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTreeNodeToggle", function() { return MatTreeNodeToggle; });
112964
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTreeNodeOutlet", function() { return MatTreeNodeOutlet; });
112965
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTreeFlattener", function() { return MatTreeFlattener; });
112966
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTreeFlatDataSource", function() { return MatTreeFlatDataSource; });
112967
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatTreeNestedDataSource", function() { return MatTreeNestedDataSource; });
112968
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
112969
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
112970
/* harmony import */ var _angular_cdk_tree__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/cdk/tree */ "./node_modules/@angular/cdk/esm5/tree.es5.js");
112971
/* harmony import */ var _angular_material_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/material/core */ "./node_modules/@angular/material/esm5/core.es5.js");
112972
/* harmony import */ var _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/cdk/bidi */ "./node_modules/@angular/cdk/esm5/bidi.es5.js");
112973
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
112974
/* harmony import */ var _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/cdk/collections */ "./node_modules/@angular/cdk/esm5/collections.es5.js");
112975
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
112976
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
112977
/**
112978
 * @license
112979
 * Copyright Google LLC All Rights Reserved.
112980
 *
112981
 * Use of this source code is governed by an MIT-style license that can be
112982
 * found in the LICENSE file at https://angular.io/license
112983
 */
112984
 
112985
 
112986
 
112987
 
112988
 
112989
 
112990
 
112991
 
112992
 
112993
 
112994
/**
112995
 * @fileoverview added by tsickle
112996
 * @suppress {checkTypes} checked by tsc
112997
 */
112998
/**
112999
 * Outlet for nested CdkNode. Put `[matTreeNodeOutlet]` on a tag to place children dataNodes
113000
 * inside the outlet.
113001
 */
113002
var MatTreeNodeOutlet = /** @class */ (function () {
113003
    function MatTreeNodeOutlet(viewContainer) {
113004
        this.viewContainer = viewContainer;
113005
    }
113006
    MatTreeNodeOutlet.decorators = [
113007
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
113008
                    selector: '[matTreeNodeOutlet]'
113009
                },] },
113010
    ];
113011
    /** @nocollapse */
113012
    MatTreeNodeOutlet.ctorParameters = function () { return [
113013
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], },
113014
    ]; };
113015
    return MatTreeNodeOutlet;
113016
}());
113017
 
113018
/**
113019
 * @fileoverview added by tsickle
113020
 * @suppress {checkTypes} checked by tsc
113021
 */
113022
var /** @type {?} */ _MatTreeNodeMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_3__["mixinTabIndex"])(Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_3__["mixinDisabled"])(_angular_cdk_tree__WEBPACK_IMPORTED_MODULE_2__["CdkTreeNode"]));
113023
var /** @type {?} */ _MatNestedTreeNodeMixinBase = Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_3__["mixinTabIndex"])(Object(_angular_material_core__WEBPACK_IMPORTED_MODULE_3__["mixinDisabled"])(_angular_cdk_tree__WEBPACK_IMPORTED_MODULE_2__["CdkNestedTreeNode"]));
113024
/**
113025
 * Wrapper for the CdkTree node with Material design styles.
113026
 * @template T
113027
 */
113028
var MatTreeNode = /** @class */ (function (_super) {
113029
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(MatTreeNode, _super);
113030
    function MatTreeNode(_elementRef, _tree, tabIndex) {
113031
        var _this = _super.call(this, _elementRef, _tree) || this;
113032
        _this._elementRef = _elementRef;
113033
        _this._tree = _tree;
113034
        _this.role = 'treeitem';
113035
        _this.tabIndex = Number(tabIndex) || 0;
113036
        return _this;
113037
    }
113038
    MatTreeNode.decorators = [
113039
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
113040
                    selector: 'mat-tree-node',
113041
                    exportAs: 'matTreeNode',
113042
                    inputs: ['disabled', 'tabIndex'],
113043
                    host: {
113044
                        '[attr.aria-expanded]': 'isExpanded',
113045
                        '[attr.aria-level]': 'role === "treeitem" ? level : null',
113046
                        '[attr.role]': 'role',
113047
                        'class': 'mat-tree-node'
113048
                    },
113049
                    providers: [{ provide: _angular_cdk_tree__WEBPACK_IMPORTED_MODULE_2__["CdkTreeNode"], useExisting: MatTreeNode }]
113050
                },] },
113051
    ];
113052
    /** @nocollapse */
113053
    MatTreeNode.ctorParameters = function () { return [
113054
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
113055
        { type: _angular_cdk_tree__WEBPACK_IMPORTED_MODULE_2__["CdkTree"], },
113056
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Attribute"], args: ['tabindex',] },] },
113057
    ]; };
113058
    MatTreeNode.propDecorators = {
113059
        "role": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
113060
    };
113061
    return MatTreeNode;
113062
}(_MatTreeNodeMixinBase));
113063
/**
113064
 * Wrapper for the CdkTree node definition with Material design styles.
113065
 * @template T
113066
 */
113067
var MatTreeNodeDef = /** @class */ (function (_super) {
113068
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(MatTreeNodeDef, _super);
113069
    // TODO(andrewseguin): Remove this explicitly set constructor when the compiler knows how to
113070
    // properly build the es6 version of the class. Currently sets ctorParameters to empty due to a
113071
    // fixed bug.
113072
    // https://github.com/angular/tsickle/pull/760 - tsickle PR that fixed this
113073
    // https://github.com/angular/angular/pull/23531 - updates compiler-cli to fixed version
113074
    function MatTreeNodeDef(template) {
113075
        return _super.call(this, template) || this;
113076
    }
113077
    MatTreeNodeDef.decorators = [
113078
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
113079
                    selector: '[matTreeNodeDef]',
113080
                    inputs: [
113081
                        'when: matTreeNodeDefWhen'
113082
                    ],
113083
                    providers: [{ provide: _angular_cdk_tree__WEBPACK_IMPORTED_MODULE_2__["CdkTreeNodeDef"], useExisting: MatTreeNodeDef }]
113084
                },] },
113085
    ];
113086
    /** @nocollapse */
113087
    MatTreeNodeDef.ctorParameters = function () { return [
113088
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"], },
113089
    ]; };
113090
    MatTreeNodeDef.propDecorators = {
113091
        "data": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['matTreeNode',] },],
113092
    };
113093
    return MatTreeNodeDef;
113094
}(_angular_cdk_tree__WEBPACK_IMPORTED_MODULE_2__["CdkTreeNodeDef"]));
113095
/**
113096
 * Wrapper for the CdkTree nested node with Material design styles.
113097
 * @template T
113098
 */
113099
var MatNestedTreeNode = /** @class */ (function (_super) {
113100
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(MatNestedTreeNode, _super);
113101
    function MatNestedTreeNode(_elementRef, _tree, _differs, tabIndex) {
113102
        var _this = _super.call(this, _elementRef, _tree, _differs) || this;
113103
        _this._elementRef = _elementRef;
113104
        _this._tree = _tree;
113105
        _this._differs = _differs;
113106
        _this.tabIndex = Number(tabIndex) || 0;
113107
        return _this;
113108
    }
113109
    // This is a workaround for https://github.com/angular/angular/issues/23091
113110
    // In aot mode, the lifecycle hooks from parent class are not called.
113111
    // TODO(tinayuangao): Remove when the angular issue #23091 is fixed
113112
    /**
113113
     * @return {?}
113114
     */
113115
    MatNestedTreeNode.prototype.ngAfterContentInit = /**
113116
     * @return {?}
113117
     */
113118
    function () {
113119
        _super.prototype.ngAfterContentInit.call(this);
113120
    };
113121
    /**
113122
     * @return {?}
113123
     */
113124
    MatNestedTreeNode.prototype.ngOnDestroy = /**
113125
     * @return {?}
113126
     */
113127
    function () {
113128
        _super.prototype.ngOnDestroy.call(this);
113129
    };
113130
    MatNestedTreeNode.decorators = [
113131
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
113132
                    selector: 'mat-nested-tree-node',
113133
                    exportAs: 'matNestedTreeNode',
113134
                    host: {
113135
                        '[attr.aria-expanded]': 'isExpanded',
113136
                        '[attr.role]': 'role',
113137
                        'class': 'mat-nested-tree-node',
113138
                    },
113139
                    inputs: ['disabled', 'tabIndex'],
113140
                    providers: [
113141
                        { provide: _angular_cdk_tree__WEBPACK_IMPORTED_MODULE_2__["CdkNestedTreeNode"], useExisting: MatNestedTreeNode },
113142
                        { provide: _angular_cdk_tree__WEBPACK_IMPORTED_MODULE_2__["CdkTreeNode"], useExisting: MatNestedTreeNode }
113143
                    ]
113144
                },] },
113145
    ];
113146
    /** @nocollapse */
113147
    MatNestedTreeNode.ctorParameters = function () { return [
113148
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
113149
        { type: _angular_cdk_tree__WEBPACK_IMPORTED_MODULE_2__["CdkTree"], },
113150
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"], },
113151
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Attribute"], args: ['tabindex',] },] },
113152
    ]; };
113153
    MatNestedTreeNode.propDecorators = {
113154
        "node": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['matNestedTreeNode',] },],
113155
        "nodeOutlet": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"], args: [MatTreeNodeOutlet,] },],
113156
    };
113157
    return MatNestedTreeNode;
113158
}(_MatNestedTreeNodeMixinBase));
113159
 
113160
/**
113161
 * @fileoverview added by tsickle
113162
 * @suppress {checkTypes} checked by tsc
113163
 */
113164
/**
113165
 * Wrapper for the CdkTree padding with Material design styles.
113166
 * @template T
113167
 */
113168
var MatTreeNodePadding = /** @class */ (function (_super) {
113169
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(MatTreeNodePadding, _super);
113170
    // TODO(andrewseguin): Remove this explicitly set constructor when the compiler knows how to
113171
    // properly build the es6 version of the class. Currently sets ctorParameters to empty due to a
113172
    // fixed bug.
113173
    // https://github.com/angular/tsickle/pull/760 - tsickle PR that fixed this
113174
    // https://github.com/angular/angular/pull/23531 - updates compiler-cli to fixed version
113175
    function MatTreeNodePadding(_treeNode, _tree, _renderer, _element, _dir) {
113176
        return _super.call(this, _treeNode, _tree, _renderer, _element, _dir) || this;
113177
    }
113178
    MatTreeNodePadding.decorators = [
113179
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
113180
                    selector: '[matTreeNodePadding]',
113181
                    providers: [{ provide: _angular_cdk_tree__WEBPACK_IMPORTED_MODULE_2__["CdkTreeNodePadding"], useExisting: MatTreeNodePadding }]
113182
                },] },
113183
    ];
113184
    /** @nocollapse */
113185
    MatTreeNodePadding.ctorParameters = function () { return [
113186
        { type: _angular_cdk_tree__WEBPACK_IMPORTED_MODULE_2__["CdkTreeNode"], },
113187
        { type: _angular_cdk_tree__WEBPACK_IMPORTED_MODULE_2__["CdkTree"], },
113188
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"], },
113189
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
113190
        { type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_4__["Directionality"], decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] },] },
113191
    ]; };
113192
    MatTreeNodePadding.propDecorators = {
113193
        "level": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['matTreeNodePadding',] },],
113194
        "indent": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['matTreeNodePaddingIndent',] },],
113195
    };
113196
    return MatTreeNodePadding;
113197
}(_angular_cdk_tree__WEBPACK_IMPORTED_MODULE_2__["CdkTreeNodePadding"]));
113198
 
113199
/**
113200
 * @fileoverview added by tsickle
113201
 * @suppress {checkTypes} checked by tsc
113202
 */
113203
/**
113204
 * Wrapper for the CdkTable with Material design styles.
113205
 * @template T
113206
 */
113207
var MatTree = /** @class */ (function (_super) {
113208
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(MatTree, _super);
113209
    // TODO(andrewseguin): Remove this explicitly set constructor when the compiler knows how to
113210
    // properly build the es6 version of the class. Currently sets ctorParameters to empty due to a
113211
    // fixed bug.
113212
    // https://github.com/angular/tsickle/pull/760 - tsickle PR that fixed this
113213
    // https://github.com/angular/angular/pull/23531 - updates compiler-cli to fixed version
113214
    function MatTree(_differs, _changeDetectorRef) {
113215
        return _super.call(this, _differs, _changeDetectorRef) || this;
113216
    }
113217
    MatTree.decorators = [
113218
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{selector: 'mat-tree',
113219
                    exportAs: 'matTree',
113220
                    template: "<ng-container matTreeNodeOutlet></ng-container>",
113221
                    host: {
113222
                        'class': 'mat-tree',
113223
                        'role': 'tree',
113224
                    },
113225
                    styles: [".mat-tree{display:block}.mat-tree-node{display:flex;align-items:center;min-height:48px;flex:1;overflow:hidden;word-wrap:break-word}.mat-nested-tree-ndoe{border-bottom-width:0}"],
113226
                    encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
113227
                    changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
113228
                    providers: [{ provide: _angular_cdk_tree__WEBPACK_IMPORTED_MODULE_2__["CdkTree"], useExisting: MatTree }]
113229
                },] },
113230
    ];
113231
    /** @nocollapse */
113232
    MatTree.ctorParameters = function () { return [
113233
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"], },
113234
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"], },
113235
    ]; };
113236
    MatTree.propDecorators = {
113237
        "_nodeOutlet": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"], args: [MatTreeNodeOutlet,] },],
113238
    };
113239
    return MatTree;
113240
}(_angular_cdk_tree__WEBPACK_IMPORTED_MODULE_2__["CdkTree"]));
113241
 
113242
/**
113243
 * @fileoverview added by tsickle
113244
 * @suppress {checkTypes} checked by tsc
113245
 */
113246
/**
113247
 * Wrapper for the CdkTree's toggle with Material design styles.
113248
 * @template T
113249
 */
113250
var MatTreeNodeToggle = /** @class */ (function (_super) {
113251
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(MatTreeNodeToggle, _super);
113252
    // TODO(andrewseguin): Remove this explicitly set constructor when the compiler knows how to
113253
    // properly build the es6 version of the class. Currently sets ctorParameters to empty due to a
113254
    // fixed bug.
113255
    // https://github.com/angular/tsickle/pull/760 - tsickle PR that fixed this
113256
    // https://github.com/angular/angular/pull/23531 - updates compiler-cli to fixed version
113257
    function MatTreeNodeToggle(_tree, _treeNode) {
113258
        var _this = _super.call(this, _tree, _treeNode) || this;
113259
        _this.recursive = false;
113260
        return _this;
113261
    }
113262
    MatTreeNodeToggle.decorators = [
113263
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
113264
                    selector: '[matTreeNodeToggle]',
113265
                    host: {
113266
                        '(click)': '_toggle($event)',
113267
                    },
113268
                    providers: [{ provide: _angular_cdk_tree__WEBPACK_IMPORTED_MODULE_2__["CdkTreeNodeToggle"], useExisting: MatTreeNodeToggle }]
113269
                },] },
113270
    ];
113271
    /** @nocollapse */
113272
    MatTreeNodeToggle.ctorParameters = function () { return [
113273
        { type: _angular_cdk_tree__WEBPACK_IMPORTED_MODULE_2__["CdkTree"], },
113274
        { type: _angular_cdk_tree__WEBPACK_IMPORTED_MODULE_2__["CdkTreeNode"], },
113275
    ]; };
113276
    MatTreeNodeToggle.propDecorators = {
113277
        "recursive": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['matTreeNodeToggleRecursive',] },],
113278
    };
113279
    return MatTreeNodeToggle;
113280
}(_angular_cdk_tree__WEBPACK_IMPORTED_MODULE_2__["CdkTreeNodeToggle"]));
113281
 
113282
/**
113283
 * @fileoverview added by tsickle
113284
 * @suppress {checkTypes} checked by tsc
113285
 */
113286
var /** @type {?} */ MAT_TREE_DIRECTIVES = [
113287
    MatNestedTreeNode,
113288
    MatTreeNodeDef,
113289
    MatTreeNodePadding,
113290
    MatTreeNodeToggle,
113291
    MatTree,
113292
    MatTreeNode,
113293
    MatTreeNodeOutlet
113294
];
113295
var MatTreeModule = /** @class */ (function () {
113296
    function MatTreeModule() {
113297
    }
113298
    MatTreeModule.decorators = [
113299
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
113300
                    imports: [_angular_cdk_tree__WEBPACK_IMPORTED_MODULE_2__["CdkTreeModule"], _angular_common__WEBPACK_IMPORTED_MODULE_5__["CommonModule"], _angular_material_core__WEBPACK_IMPORTED_MODULE_3__["MatCommonModule"]],
113301
                    exports: MAT_TREE_DIRECTIVES,
113302
                    declarations: MAT_TREE_DIRECTIVES,
113303
                },] },
113304
    ];
113305
    return MatTreeModule;
113306
}());
113307
 
113308
/**
113309
 * @fileoverview added by tsickle
113310
 * @suppress {checkTypes} checked by tsc
113311
 */
113312
/**
113313
 * Tree flattener to convert a normal type of node to node with children & level information.
113314
 * Transform nested nodes of type `T` to flattened nodes of type `F`.
113315
 *
113316
 * For example, the input data of type `T` is nested, and contains its children data:
113317
 *   SomeNode: {
113318
 *     key: 'Fruits',
113319
 *     children: [
113320
 *       NodeOne: {
113321
 *         key: 'Apple',
113322
 *       },
113323
 *       NodeTwo: {
113324
 *        key: 'Pear',
113325
 *      }
113326
 *    ]
113327
 *  }
113328
 *  After flattener flatten the tree, the structure will become
113329
 *  SomeNode: {
113330
 *    key: 'Fruits',
113331
 *    expandable: true,
113332
 *    level: 1
113333
 *  },
113334
 *  NodeOne: {
113335
 *    key: 'Apple',
113336
 *    expandable: false,
113337
 *    level: 2
113338
 *  },
113339
 *  NodeTwo: {
113340
 *   key: 'Pear',
113341
 *   expandable: false,
113342
 *   level: 2
113343
 * }
113344
 * and the output flattened type is `F` with additional information.
113345
 * @template T, F
113346
 */
113347
var  /**
113348
 * Tree flattener to convert a normal type of node to node with children & level information.
113349
 * Transform nested nodes of type `T` to flattened nodes of type `F`.
113350
 *
113351
 * For example, the input data of type `T` is nested, and contains its children data:
113352
 *   SomeNode: {
113353
 *     key: 'Fruits',
113354
 *     children: [
113355
 *       NodeOne: {
113356
 *         key: 'Apple',
113357
 *       },
113358
 *       NodeTwo: {
113359
 *        key: 'Pear',
113360
 *      }
113361
 *    ]
113362
 *  }
113363
 *  After flattener flatten the tree, the structure will become
113364
 *  SomeNode: {
113365
 *    key: 'Fruits',
113366
 *    expandable: true,
113367
 *    level: 1
113368
 *  },
113369
 *  NodeOne: {
113370
 *    key: 'Apple',
113371
 *    expandable: false,
113372
 *    level: 2
113373
 *  },
113374
 *  NodeTwo: {
113375
 *   key: 'Pear',
113376
 *   expandable: false,
113377
 *   level: 2
113378
 * }
113379
 * and the output flattened type is `F` with additional information.
113380
 * @template T, F
113381
 */
113382
MatTreeFlattener = /** @class */ (function () {
113383
    function MatTreeFlattener(transformFunction, getLevel, isExpandable, getChildren) {
113384
        this.transformFunction = transformFunction;
113385
        this.getLevel = getLevel;
113386
        this.isExpandable = isExpandable;
113387
        this.getChildren = getChildren;
113388
    }
113389
    /**
113390
     * @param {?} node
113391
     * @param {?} level
113392
     * @param {?} resultNodes
113393
     * @param {?} parentMap
113394
     * @return {?}
113395
     */
113396
    MatTreeFlattener.prototype._flattenNode = /**
113397
     * @param {?} node
113398
     * @param {?} level
113399
     * @param {?} resultNodes
113400
     * @param {?} parentMap
113401
     * @return {?}
113402
     */
113403
    function (node, level, resultNodes, parentMap) {
113404
        var _this = this;
113405
        var /** @type {?} */ flatNode = this.transformFunction(node, level);
113406
        resultNodes.push(flatNode);
113407
        if (this.isExpandable(flatNode)) {
113408
            var /** @type {?} */ childrenNodes = this.getChildren(node);
113409
            if (Array.isArray(childrenNodes)) {
113410
                this._flattenChildren(childrenNodes, level, resultNodes, parentMap);
113411
            }
113412
            else {
113413
                childrenNodes.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_8__["take"])(1)).subscribe(function (children) {
113414
                    _this._flattenChildren(children, level, resultNodes, parentMap);
113415
                });
113416
            }
113417
        }
113418
        return resultNodes;
113419
    };
113420
    /**
113421
     * @param {?} children
113422
     * @param {?} level
113423
     * @param {?} resultNodes
113424
     * @param {?} parentMap
113425
     * @return {?}
113426
     */
113427
    MatTreeFlattener.prototype._flattenChildren = /**
113428
     * @param {?} children
113429
     * @param {?} level
113430
     * @param {?} resultNodes
113431
     * @param {?} parentMap
113432
     * @return {?}
113433
     */
113434
    function (children, level, resultNodes, parentMap) {
113435
        var _this = this;
113436
        children.forEach(function (child, index) {
113437
            var /** @type {?} */ childParentMap = parentMap.slice();
113438
            childParentMap.push(index != children.length - 1);
113439
            _this._flattenNode(child, level + 1, resultNodes, childParentMap);
113440
        });
113441
    };
113442
    /**
113443
     * Flatten a list of node type T to flattened version of node F.
113444
     * Please note that type T may be nested, and the length of `structuredData` may be different
113445
     * from that of returned list `F[]`.
113446
     */
113447
    /**
113448
     * Flatten a list of node type T to flattened version of node F.
113449
     * Please note that type T may be nested, and the length of `structuredData` may be different
113450
     * from that of returned list `F[]`.
113451
     * @param {?} structuredData
113452
     * @return {?}
113453
     */
113454
    MatTreeFlattener.prototype.flattenNodes = /**
113455
     * Flatten a list of node type T to flattened version of node F.
113456
     * Please note that type T may be nested, and the length of `structuredData` may be different
113457
     * from that of returned list `F[]`.
113458
     * @param {?} structuredData
113459
     * @return {?}
113460
     */
113461
    function (structuredData) {
113462
        var _this = this;
113463
        var /** @type {?} */ resultNodes = [];
113464
        structuredData.forEach(function (node) { return _this._flattenNode(node, 0, resultNodes, []); });
113465
        return resultNodes;
113466
    };
113467
    /**
113468
     * Expand flattened node with current expansion status.
113469
     * The returned list may have different length.
113470
     */
113471
    /**
113472
     * Expand flattened node with current expansion status.
113473
     * The returned list may have different length.
113474
     * @param {?} nodes
113475
     * @param {?} treeControl
113476
     * @return {?}
113477
     */
113478
    MatTreeFlattener.prototype.expandFlattenedNodes = /**
113479
     * Expand flattened node with current expansion status.
113480
     * The returned list may have different length.
113481
     * @param {?} nodes
113482
     * @param {?} treeControl
113483
     * @return {?}
113484
     */
113485
    function (nodes, treeControl) {
113486
        var _this = this;
113487
        var /** @type {?} */ results = [];
113488
        var /** @type {?} */ currentExpand = [];
113489
        currentExpand[0] = true;
113490
        nodes.forEach(function (node) {
113491
            var /** @type {?} */ expand = true;
113492
            for (var /** @type {?} */ i = 0; i <= _this.getLevel(node); i++) {
113493
                expand = expand && currentExpand[i];
113494
            }
113495
            if (expand) {
113496
                results.push(node);
113497
            }
113498
            if (_this.isExpandable(node)) {
113499
                currentExpand[_this.getLevel(node) + 1] = treeControl.isExpanded(node);
113500
            }
113501
        });
113502
        return results;
113503
    };
113504
    return MatTreeFlattener;
113505
}());
113506
/**
113507
 * Data source for flat tree.
113508
 * The data source need to handle expansion/collapsion of the tree node and change the data feed
113509
 * to `MatTree`.
113510
 * The nested tree nodes of type `T` are flattened through `MatTreeFlattener`, and converted
113511
 * to type `F` for `MatTree` to consume.
113512
 * @template T, F
113513
 */
113514
var  /**
113515
 * Data source for flat tree.
113516
 * The data source need to handle expansion/collapsion of the tree node and change the data feed
113517
 * to `MatTree`.
113518
 * The nested tree nodes of type `T` are flattened through `MatTreeFlattener`, and converted
113519
 * to type `F` for `MatTree` to consume.
113520
 * @template T, F
113521
 */
113522
MatTreeFlatDataSource = /** @class */ (function (_super) {
113523
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(MatTreeFlatDataSource, _super);
113524
    function MatTreeFlatDataSource(treeControl, treeFlattener, initialData) {
113525
        if (initialData === void 0) { initialData = []; }
113526
        var _this = _super.call(this) || this;
113527
        _this.treeControl = treeControl;
113528
        _this.treeFlattener = treeFlattener;
113529
        _this._flattenedData = new rxjs__WEBPACK_IMPORTED_MODULE_7__["BehaviorSubject"]([]);
113530
        _this._expandedData = new rxjs__WEBPACK_IMPORTED_MODULE_7__["BehaviorSubject"]([]);
113531
        _this._data = new rxjs__WEBPACK_IMPORTED_MODULE_7__["BehaviorSubject"](initialData);
113532
        return _this;
113533
    }
113534
    Object.defineProperty(MatTreeFlatDataSource.prototype, "data", {
113535
        get: /**
113536
         * @return {?}
113537
         */
113538
        function () { return this._data.value; },
113539
        set: /**
113540
         * @param {?} value
113541
         * @return {?}
113542
         */
113543
        function (value) {
113544
            this._data.next(value);
113545
            this._flattenedData.next(this.treeFlattener.flattenNodes(this.data));
113546
            this.treeControl.dataNodes = this._flattenedData.value;
113547
        },
113548
        enumerable: true,
113549
        configurable: true
113550
    });
113551
    /**
113552
     * @param {?} collectionViewer
113553
     * @return {?}
113554
     */
113555
    MatTreeFlatDataSource.prototype.connect = /**
113556
     * @param {?} collectionViewer
113557
     * @return {?}
113558
     */
113559
    function (collectionViewer) {
113560
        var _this = this;
113561
        var /** @type {?} */ changes = [
113562
            collectionViewer.viewChange,
113563
            /** @type {?} */ ((this.treeControl.expansionModel.onChange)),
113564
            this._flattenedData
113565
        ];
113566
        return rxjs__WEBPACK_IMPORTED_MODULE_7__["merge"].apply(void 0, changes).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_8__["map"])(function () {
113567
            _this._expandedData.next(_this.treeFlattener.expandFlattenedNodes(_this._flattenedData.value, _this.treeControl));
113568
            return _this._expandedData.value;
113569
        }));
113570
    };
113571
    /**
113572
     * @return {?}
113573
     */
113574
    MatTreeFlatDataSource.prototype.disconnect = /**
113575
     * @return {?}
113576
     */
113577
    function () {
113578
        // no op
113579
    };
113580
    return MatTreeFlatDataSource;
113581
}(_angular_cdk_collections__WEBPACK_IMPORTED_MODULE_6__["DataSource"]));
113582
 
113583
/**
113584
 * @fileoverview added by tsickle
113585
 * @suppress {checkTypes} checked by tsc
113586
 */
113587
/**
113588
 * Data source for nested tree.
113589
 *
113590
 * The data source for nested tree doesn't have to consider node flattener, or the way to expand
113591
 * or collapse. The expansion/collapsion will be handled by TreeControl and each non-leaf node.
113592
 * @template T
113593
 */
113594
var  /**
113595
 * Data source for nested tree.
113596
 *
113597
 * The data source for nested tree doesn't have to consider node flattener, or the way to expand
113598
 * or collapse. The expansion/collapsion will be handled by TreeControl and each non-leaf node.
113599
 * @template T
113600
 */
113601
MatTreeNestedDataSource = /** @class */ (function (_super) {
113602
    Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__extends"])(MatTreeNestedDataSource, _super);
113603
    function MatTreeNestedDataSource() {
113604
        var _this = _super !== null && _super.apply(this, arguments) || this;
113605
        _this._data = new rxjs__WEBPACK_IMPORTED_MODULE_7__["BehaviorSubject"]([]);
113606
        return _this;
113607
    }
113608
    Object.defineProperty(MatTreeNestedDataSource.prototype, "data", {
113609
        /**
113610
         * Data for the nested tree
113611
         */
113612
        get: /**
113613
         * Data for the nested tree
113614
         * @return {?}
113615
         */
113616
        function () { return this._data.value; },
113617
        set: /**
113618
         * @param {?} value
113619
         * @return {?}
113620
         */
113621
        function (value) { this._data.next(value); },
113622
        enumerable: true,
113623
        configurable: true
113624
    });
113625
    /**
113626
     * @param {?} collectionViewer
113627
     * @return {?}
113628
     */
113629
    MatTreeNestedDataSource.prototype.connect = /**
113630
     * @param {?} collectionViewer
113631
     * @return {?}
113632
     */
113633
    function (collectionViewer) {
113634
        var _this = this;
113635
        return rxjs__WEBPACK_IMPORTED_MODULE_7__["merge"].apply(void 0, [collectionViewer.viewChange, this._data]).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_8__["map"])(function () {
113636
            return _this.data;
113637
        }));
113638
    };
113639
    /**
113640
     * @return {?}
113641
     */
113642
    MatTreeNestedDataSource.prototype.disconnect = /**
113643
     * @return {?}
113644
     */
113645
    function () {
113646
        // no op
113647
    };
113648
    return MatTreeNestedDataSource;
113649
}(_angular_cdk_collections__WEBPACK_IMPORTED_MODULE_6__["DataSource"]));
113650
 
113651
/**
113652
 * @fileoverview added by tsickle
113653
 * @suppress {checkTypes} checked by tsc
113654
 */
113655
 
113656
/**
113657
 * @fileoverview added by tsickle
113658
 * @suppress {checkTypes} checked by tsc
113659
 */
113660
 
113661
 
113662
//# sourceMappingURL=tree.es5.js.map
113663
 
113664
 
113665
/***/ }),
113666
 
113667
/***/ "./node_modules/@angular/platform-browser-dynamic/fesm5/platform-browser-dynamic.js":
113668
/*!******************************************************************************************!*\
113669
  !*** ./node_modules/@angular/platform-browser-dynamic/fesm5/platform-browser-dynamic.js ***!
113670
  \******************************************************************************************/
113671
/*! exports provided: ɵangular_packages_platform_browser_dynamic_platform_browser_dynamic_a, RESOURCE_CACHE_PROVIDER, platformBrowserDynamic, VERSION, JitCompilerFactory, ɵCompilerImpl, ɵplatformCoreDynamic, ɵINTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS, ɵResourceLoaderImpl */
113672
/***/ (function(module, __webpack_exports__, __webpack_require__) {
113673
 
113674
"use strict";
113675
__webpack_require__.r(__webpack_exports__);
113676
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_dynamic_platform_browser_dynamic_a", function() { return CachedResourceLoader; });
113677
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RESOURCE_CACHE_PROVIDER", function() { return RESOURCE_CACHE_PROVIDER; });
113678
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "platformBrowserDynamic", function() { return platformBrowserDynamic; });
113679
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; });
113680
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JitCompilerFactory", function() { return JitCompilerFactory; });
113681
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵCompilerImpl", function() { return CompilerImpl; });
113682
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵplatformCoreDynamic", function() { return platformCoreDynamic; });
113683
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵINTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS", function() { return INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS; });
113684
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵResourceLoaderImpl", function() { return ResourceLoaderImpl; });
113685
/* harmony import */ var _angular_compiler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/compiler */ "./node_modules/@angular/compiler/fesm5/compiler.js");
113686
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
113687
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
113688
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
113689
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js");
113690
/**
113691
 * @license Angular v6.0.3
113692
 * (c) 2010-2018 Google, Inc. https://angular.io/
113693
 * License: MIT
113694
 */
113695
 
113696
 
113697
 
113698
 
113699
 
113700
 
113701
 
113702
/**
113703
 * @license
113704
 * Copyright Google Inc. All Rights Reserved.
113705
 *
113706
 * Use of this source code is governed by an MIT-style license that can be
113707
 * found in the LICENSE file at https://angular.io/license
113708
 */
113709
var MODULE_SUFFIX = '';
113710
var builtinExternalReferences = createBuiltinExternalReferencesMap();
113711
var JitReflector = /** @class */ (function () {
113712
    function JitReflector() {
113713
        this.builtinExternalReferences = new Map();
113714
        this.reflectionCapabilities = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵReflectionCapabilities"]();
113715
    }
113716
    JitReflector.prototype.componentModuleUrl = function (type, cmpMetadata) {
113717
        var moduleId = cmpMetadata.moduleId;
113718
        if (typeof moduleId === 'string') {
113719
            var scheme = Object(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["getUrlScheme"])(moduleId);
113720
            return scheme ? moduleId : "package:" + moduleId + MODULE_SUFFIX;
113721
        }
113722
        else if (moduleId !== null && moduleId !== void 0) {
113723
            throw Object(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["syntaxError"])("moduleId should be a string in \"" + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵstringify"])(type) + "\". See https://goo.gl/wIDDiL for more information.\n" +
113724
                "If you're using Webpack you should inline the template and the styles, see https://goo.gl/X2J8zc.");
113725
        }
113726
        return "./" + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵstringify"])(type);
113727
    };
113728
    JitReflector.prototype.parameters = function (typeOrFunc) {
113729
        return this.reflectionCapabilities.parameters(typeOrFunc);
113730
    };
113731
    JitReflector.prototype.tryAnnotations = function (typeOrFunc) { return this.annotations(typeOrFunc); };
113732
    JitReflector.prototype.annotations = function (typeOrFunc) {
113733
        return this.reflectionCapabilities.annotations(typeOrFunc);
113734
    };
113735
    JitReflector.prototype.shallowAnnotations = function (typeOrFunc) {
113736
        throw new Error('Not supported in JIT mode');
113737
    };
113738
    JitReflector.prototype.propMetadata = function (typeOrFunc) {
113739
        return this.reflectionCapabilities.propMetadata(typeOrFunc);
113740
    };
113741
    JitReflector.prototype.hasLifecycleHook = function (type, lcProperty) {
113742
        return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);
113743
    };
113744
    JitReflector.prototype.guards = function (type) { return this.reflectionCapabilities.guards(type); };
113745
    JitReflector.prototype.resolveExternalReference = function (ref) {
113746
        return builtinExternalReferences.get(ref) || ref.runtime;
113747
    };
113748
    return JitReflector;
113749
}());
113750
function createBuiltinExternalReferencesMap() {
113751
    var map = new Map();
113752
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ANALYZE_FOR_ENTRY_COMPONENTS, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ANALYZE_FOR_ENTRY_COMPONENTS"]);
113753
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ElementRef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]);
113754
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].NgModuleRef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleRef"]);
113755
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ViewContainerRef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"]);
113756
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ChangeDetectorRef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]);
113757
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].QueryList, _angular_core__WEBPACK_IMPORTED_MODULE_1__["QueryList"]);
113758
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].TemplateRef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["TemplateRef"]);
113759
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].CodegenComponentFactoryResolver, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵCodegenComponentFactoryResolver"]);
113760
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ComponentFactoryResolver, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]);
113761
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ComponentFactory, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactory"]);
113762
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ComponentRef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentRef"]);
113763
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].NgModuleFactory, _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactory"]);
113764
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].createModuleFactory, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵcmf"]);
113765
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].moduleDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵmod"]);
113766
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].moduleProviderDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵmpd"]);
113767
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].RegisterModuleFactoryFn, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵregisterModuleFactory"]);
113768
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].Injector, _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]);
113769
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ViewEncapsulation, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"]);
113770
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ChangeDetectionStrategy, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"]);
113771
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].SecurityContext, _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"]);
113772
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].LOCALE_ID, _angular_core__WEBPACK_IMPORTED_MODULE_1__["LOCALE_ID"]);
113773
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].TRANSLATIONS_FORMAT, _angular_core__WEBPACK_IMPORTED_MODULE_1__["TRANSLATIONS_FORMAT"]);
113774
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].inlineInterpolate, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵinlineInterpolate"]);
113775
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].interpolate, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵinterpolate"]);
113776
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].EMPTY_ARRAY, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵEMPTY_ARRAY"]);
113777
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].EMPTY_MAP, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵEMPTY_MAP"]);
113778
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].Renderer, _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer"]);
113779
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].viewDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵvid"]);
113780
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].elementDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵeld"]);
113781
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].anchorDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵand"]);
113782
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].textDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵted"]);
113783
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].directiveDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵdid"]);
113784
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].providerDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵprd"]);
113785
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].queryDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵqud"]);
113786
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].pureArrayDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵpad"]);
113787
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].pureObjectDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵpod"]);
113788
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].purePipeDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵppd"]);
113789
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].pipeDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵpid"]);
113790
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].nodeValue, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵnov"]);
113791
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].ngContentDef, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵncd"]);
113792
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].unwrapValue, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵunv"]);
113793
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].createRendererType2, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵcrt"]);
113794
    map.set(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Identifiers"].createComponentFactory, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵccf"]);
113795
    return map;
113796
}
113797
 
113798
/**
113799
 * @license
113800
 * Copyright Google Inc. All Rights Reserved.
113801
 *
113802
 * Use of this source code is governed by an MIT-style license that can be
113803
 * found in the LICENSE file at https://angular.io/license
113804
 */
113805
var ERROR_COLLECTOR_TOKEN = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('ErrorCollector');
113806
/**
113807
 * A default provider for {@link PACKAGE_ROOT_URL} that maps to '/'.
113808
 */
113809
var DEFAULT_PACKAGE_URL_PROVIDER = {
113810
    provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["PACKAGE_ROOT_URL"],
113811
    useValue: '/'
113812
};
113813
var _NO_RESOURCE_LOADER = {
113814
    get: function (url) {
113815
        throw new Error("No ResourceLoader implementation has been provided. Can't read the url \"" + url + "\"");
113816
    }
113817
};
113818
var baseHtmlParser = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('HtmlParser');
113819
var CompilerImpl = /** @class */ (function () {
113820
    function CompilerImpl(injector, _metadataResolver, templateParser, styleCompiler, viewCompiler, ngModuleCompiler, summaryResolver, compileReflector, compilerConfig, console) {
113821
        this._metadataResolver = _metadataResolver;
113822
        this._delegate = new _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["JitCompiler"](_metadataResolver, templateParser, styleCompiler, viewCompiler, ngModuleCompiler, summaryResolver, compileReflector, compilerConfig, console, this.getExtraNgModuleProviders.bind(this));
113823
        this.injector = injector;
113824
    }
113825
    CompilerImpl.prototype.getExtraNgModuleProviders = function () {
113826
        return [this._metadataResolver.getProviderMetadata(new _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ProviderMeta"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"], { useValue: this }))];
113827
    };
113828
    CompilerImpl.prototype.compileModuleSync = function (moduleType) {
113829
        return this._delegate.compileModuleSync(moduleType);
113830
    };
113831
    CompilerImpl.prototype.compileModuleAsync = function (moduleType) {
113832
        return this._delegate.compileModuleAsync(moduleType);
113833
    };
113834
    CompilerImpl.prototype.compileModuleAndAllComponentsSync = function (moduleType) {
113835
        var result = this._delegate.compileModuleAndAllComponentsSync(moduleType);
113836
        return {
113837
            ngModuleFactory: result.ngModuleFactory,
113838
            componentFactories: result.componentFactories,
113839
        };
113840
    };
113841
    CompilerImpl.prototype.compileModuleAndAllComponentsAsync = function (moduleType) {
113842
        return this._delegate.compileModuleAndAllComponentsAsync(moduleType)
113843
            .then(function (result) {
113844
            return ({
113845
                ngModuleFactory: result.ngModuleFactory,
113846
                componentFactories: result.componentFactories,
113847
            });
113848
        });
113849
    };
113850
    CompilerImpl.prototype.loadAotSummaries = function (summaries) { this._delegate.loadAotSummaries(summaries); };
113851
    CompilerImpl.prototype.hasAotSummary = function (ref) { return this._delegate.hasAotSummary(ref); };
113852
    CompilerImpl.prototype.getComponentFactory = function (component) {
113853
        return this._delegate.getComponentFactory(component);
113854
    };
113855
    CompilerImpl.prototype.clearCache = function () { this._delegate.clearCache(); };
113856
    CompilerImpl.prototype.clearCacheFor = function (type) { this._delegate.clearCacheFor(type); };
113857
    return CompilerImpl;
113858
}());
113859
/**
113860
 * A set of providers that provide `JitCompiler` and its dependencies to use for
113861
 * template compilation.
113862
 */
113863
var COMPILER_PROVIDERS = [
113864
    { provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompileReflector"], useValue: new JitReflector() },
113865
    { provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ResourceLoader"], useValue: _NO_RESOURCE_LOADER },
113866
    { provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["JitSummaryResolver"], deps: [] },
113867
    { provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["SummaryResolver"], useExisting: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["JitSummaryResolver"] },
113868
    { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"], deps: [] },
113869
    { provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Lexer"], deps: [] },
113870
    { provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Parser"], deps: [_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Lexer"]] },
113871
    {
113872
        provide: baseHtmlParser,
113873
        useClass: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["HtmlParser"],
113874
        deps: [],
113875
    },
113876
    {
113877
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["I18NHtmlParser"],
113878
        useFactory: function (parser, translations, format, config, console) {
113879
            translations = translations || '';
113880
            var missingTranslation = translations ? config.missingTranslation : _angular_core__WEBPACK_IMPORTED_MODULE_1__["MissingTranslationStrategy"].Ignore;
113881
            return new _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["I18NHtmlParser"](parser, translations, format, missingTranslation, console);
113882
        },
113883
        deps: [
113884
            baseHtmlParser,
113885
            [new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"](), new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["TRANSLATIONS"])],
113886
            [new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"](), new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["TRANSLATIONS_FORMAT"])],
113887
            [_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompilerConfig"]],
113888
            [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"]],
113889
        ]
113890
    },
113891
    {
113892
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["HtmlParser"],
113893
        useExisting: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["I18NHtmlParser"],
113894
    },
113895
    {
113896
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["TemplateParser"], deps: [_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompilerConfig"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompileReflector"],
113897
            _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["Parser"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ElementSchemaRegistry"],
113898
            _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["I18NHtmlParser"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"]]
113899
    },
113900
    { provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["DirectiveNormalizer"], deps: [_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ResourceLoader"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["UrlResolver"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["HtmlParser"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompilerConfig"]] },
113901
    { provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompileMetadataResolver"], deps: [_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompilerConfig"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["HtmlParser"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["NgModuleResolver"],
113902
            _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["DirectiveResolver"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["PipeResolver"],
113903
            _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["SummaryResolver"],
113904
            _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ElementSchemaRegistry"],
113905
            _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["DirectiveNormalizer"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"],
113906
            [_angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["StaticSymbolCache"]],
113907
            _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompileReflector"],
113908
            [_angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"], ERROR_COLLECTOR_TOKEN]] },
113909
    DEFAULT_PACKAGE_URL_PROVIDER,
113910
    { provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["StyleCompiler"], deps: [_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["UrlResolver"]] },
113911
    { provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ViewCompiler"], deps: [_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompileReflector"]] },
113912
    { provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["NgModuleCompiler"], deps: [_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompileReflector"]] },
113913
    { provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompilerConfig"], useValue: new _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompilerConfig"]() },
113914
    { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"], useClass: CompilerImpl, deps: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompileMetadataResolver"],
113915
            _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["TemplateParser"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["StyleCompiler"],
113916
            _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ViewCompiler"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["NgModuleCompiler"],
113917
            _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["SummaryResolver"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompileReflector"], _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompilerConfig"],
113918
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"]] },
113919
    { provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["DomElementSchemaRegistry"], deps: [] },
113920
    { provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ElementSchemaRegistry"], useExisting: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["DomElementSchemaRegistry"] },
113921
    { provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["UrlResolver"], deps: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["PACKAGE_ROOT_URL"]] },
113922
    { provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["DirectiveResolver"], deps: [_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompileReflector"]] },
113923
    { provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["PipeResolver"], deps: [_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompileReflector"]] },
113924
    { provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["NgModuleResolver"], deps: [_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompileReflector"]] },
113925
];
113926
/**
113927
 * @experimental
113928
 */
113929
var JitCompilerFactory = /** @class */ (function () {
113930
    /* @internal */
113931
    function JitCompilerFactory(defaultOptions) {
113932
        var compilerOptions = {
113933
            useJit: true,
113934
            defaultEncapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].Emulated,
113935
            missingTranslation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["MissingTranslationStrategy"].Warning,
113936
        };
113937
        this._defaultOptions = Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__spread"])([compilerOptions], defaultOptions);
113938
    }
113939
    JitCompilerFactory.prototype.createCompiler = function (options) {
113940
        if (options === void 0) { options = []; }
113941
        var opts = _mergeOptions(this._defaultOptions.concat(options));
113942
        var injector = _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"].create([
113943
            COMPILER_PROVIDERS, {
113944
                provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompilerConfig"],
113945
                useFactory: function () {
113946
                    return new _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompilerConfig"]({
113947
                        // let explicit values from the compiler options overwrite options
113948
                        // from the app providers
113949
                        useJit: opts.useJit,
113950
                        jitDevMode: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["isDevMode"])(),
113951
                        // let explicit values from the compiler options overwrite options
113952
                        // from the app providers
113953
                        defaultEncapsulation: opts.defaultEncapsulation,
113954
                        missingTranslation: opts.missingTranslation,
113955
                        preserveWhitespaces: opts.preserveWhitespaces,
113956
                    });
113957
                },
113958
                deps: []
113959
            },
113960
            (opts.providers)
113961
        ]);
113962
        return injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"]);
113963
    };
113964
    return JitCompilerFactory;
113965
}());
113966
function _mergeOptions(optionsArr) {
113967
    return {
113968
        useJit: _lastDefined(optionsArr.map(function (options) { return options.useJit; })),
113969
        defaultEncapsulation: _lastDefined(optionsArr.map(function (options) { return options.defaultEncapsulation; })),
113970
        providers: _mergeArrays(optionsArr.map(function (options) { return options.providers; })),
113971
        missingTranslation: _lastDefined(optionsArr.map(function (options) { return options.missingTranslation; })),
113972
        preserveWhitespaces: _lastDefined(optionsArr.map(function (options) { return options.preserveWhitespaces; })),
113973
    };
113974
}
113975
function _lastDefined(args) {
113976
    for (var i = args.length - 1; i >= 0; i--) {
113977
        if (args[i] !== undefined) {
113978
            return args[i];
113979
        }
113980
    }
113981
    return undefined;
113982
}
113983
function _mergeArrays(parts) {
113984
    var result = [];
113985
    parts.forEach(function (part) { return part && result.push.apply(result, Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__spread"])(part)); });
113986
    return result;
113987
}
113988
 
113989
/**
113990
 * @license
113991
 * Copyright Google Inc. All Rights Reserved.
113992
 *
113993
 * Use of this source code is governed by an MIT-style license that can be
113994
 * found in the LICENSE file at https://angular.io/license
113995
 */
113996
/**
113997
 * A platform that included corePlatform and the compiler.
113998
 *
113999
 * @experimental
114000
 */
114001
var platformCoreDynamic = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["createPlatformFactory"])(_angular_core__WEBPACK_IMPORTED_MODULE_1__["platformCore"], 'coreDynamic', [
114002
    { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["COMPILER_OPTIONS"], useValue: {}, multi: true },
114003
    { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["CompilerFactory"], useClass: JitCompilerFactory, deps: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["COMPILER_OPTIONS"]] },
114004
]);
114005
 
114006
var ResourceLoaderImpl = /** @class */ (function (_super) {
114007
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(ResourceLoaderImpl, _super);
114008
    function ResourceLoaderImpl() {
114009
        return _super !== null && _super.apply(this, arguments) || this;
114010
    }
114011
    ResourceLoaderImpl.prototype.get = function (url) {
114012
        var resolve;
114013
        var reject;
114014
        var promise = new Promise(function (res, rej) {
114015
            resolve = res;
114016
            reject = rej;
114017
        });
114018
        var xhr = new XMLHttpRequest();
114019
        xhr.open('GET', url, true);
114020
        xhr.responseType = 'text';
114021
        xhr.onload = function () {
114022
            // responseText is the old-school way of retrieving response (supported by IE8 & 9)
114023
            // response/responseType properties were introduced in ResourceLoader Level2 spec (supported
114024
            // by IE10)
114025
            var response = xhr.response || xhr.responseText;
114026
            // normalize IE9 bug (http://bugs.jquery.com/ticket/1450)
114027
            var status = xhr.status === 1223 ? 204 : xhr.status;
114028
            // fix status code when it is 0 (0 status is undocumented).
114029
            // Occurs when accessing file resources or on Android 4.1 stock browser
114030
            // while retrieving files from application cache.
114031
            if (status === 0) {
114032
                status = response ? 200 : 0;
114033
            }
114034
            if (200 <= status && status <= 300) {
114035
                resolve(response);
114036
            }
114037
            else {
114038
                reject("Failed to load " + url);
114039
            }
114040
        };
114041
        xhr.onerror = function () { reject("Failed to load " + url); };
114042
        xhr.send();
114043
        return promise;
114044
    };
114045
    ResourceLoaderImpl.decorators = [
114046
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }
114047
    ];
114048
    /** @nocollapse */
114049
    ResourceLoaderImpl.ctorParameters = function () { return []; };
114050
    return ResourceLoaderImpl;
114051
}(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ResourceLoader"]));
114052
 
114053
/**
114054
 * @license
114055
 * Copyright Google Inc. All Rights Reserved.
114056
 *
114057
 * Use of this source code is governed by an MIT-style license that can be
114058
 * found in the LICENSE file at https://angular.io/license
114059
 */
114060
var INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS = [
114061
    _angular_platform_browser__WEBPACK_IMPORTED_MODULE_4__["ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS"],
114062
    {
114063
        provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["COMPILER_OPTIONS"],
114064
        useValue: { providers: [{ provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ResourceLoader"], useClass: ResourceLoaderImpl, deps: [] }] },
114065
        multi: true
114066
    },
114067
    { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["PLATFORM_ID"], useValue: _angular_common__WEBPACK_IMPORTED_MODULE_3__["ɵPLATFORM_BROWSER_ID"] },
114068
];
114069
 
114070
/**
114071
 * @license
114072
 * Copyright Google Inc. All Rights Reserved.
114073
 *
114074
 * Use of this source code is governed by an MIT-style license that can be
114075
 * found in the LICENSE file at https://angular.io/license
114076
 */
114077
/**
114078
 * An implementation of ResourceLoader that uses a template cache to avoid doing an actual
114079
 * ResourceLoader.
114080
 *
114081
 * The template cache needs to be built and loaded into window.$templateCache
114082
 * via a separate mechanism.
114083
 */
114084
var CachedResourceLoader = /** @class */ (function (_super) {
114085
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(CachedResourceLoader, _super);
114086
    function CachedResourceLoader() {
114087
        var _this = _super.call(this) || this;
114088
        _this._cache = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"].$templateCache;
114089
        if (_this._cache == null) {
114090
            throw new Error('CachedResourceLoader: Template cache was not found in $templateCache.');
114091
        }
114092
        return _this;
114093
    }
114094
    CachedResourceLoader.prototype.get = function (url) {
114095
        if (this._cache.hasOwnProperty(url)) {
114096
            return Promise.resolve(this._cache[url]);
114097
        }
114098
        else {
114099
            return Promise.reject('CachedResourceLoader: Did not find cached template for ' + url);
114100
        }
114101
    };
114102
    return CachedResourceLoader;
114103
}(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ResourceLoader"]));
114104
 
114105
/**
114106
 * @license
114107
 * Copyright Google Inc. All Rights Reserved.
114108
 *
114109
 * Use of this source code is governed by an MIT-style license that can be
114110
 * found in the LICENSE file at https://angular.io/license
114111
 */
114112
 
114113
/**
114114
 * @license
114115
 * Copyright Google Inc. All Rights Reserved.
114116
 *
114117
 * Use of this source code is governed by an MIT-style license that can be
114118
 * found in the LICENSE file at https://angular.io/license
114119
 */
114120
var VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Version"]('6.0.3');
114121
 
114122
/**
114123
 * @license
114124
 * Copyright Google Inc. All Rights Reserved.
114125
 *
114126
 * Use of this source code is governed by an MIT-style license that can be
114127
 * found in the LICENSE file at https://angular.io/license
114128
 */
114129
/**
114130
 * @experimental
114131
 */
114132
var RESOURCE_CACHE_PROVIDER = [{ provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ResourceLoader"], useClass: CachedResourceLoader, deps: [] }];
114133
var platformBrowserDynamic = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["createPlatformFactory"])(platformCoreDynamic, 'browserDynamic', INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS);
114134
 
114135
/**
114136
 * @license
114137
 * Copyright Google Inc. All Rights Reserved.
114138
 *
114139
 * Use of this source code is governed by an MIT-style license that can be
114140
 * found in the LICENSE file at https://angular.io/license
114141
 */
114142
 
114143
// This file only reexports content of the `src` folder. Keep it that way.
114144
 
114145
/**
114146
 * @license
114147
 * Copyright Google Inc. All Rights Reserved.
114148
 *
114149
 * Use of this source code is governed by an MIT-style license that can be
114150
 * found in the LICENSE file at https://angular.io/license
114151
 */
114152
 
114153
/**
114154
 * Generated bundle index. Do not edit.
114155
 */
114156
 
114157
 
114158
//# sourceMappingURL=platform-browser-dynamic.js.map
114159
 
114160
 
114161
/***/ }),
114162
 
114163
/***/ "./node_modules/@angular/platform-browser/fesm5/animations.js":
114164
/*!********************************************************************!*\
114165
  !*** ./node_modules/@angular/platform-browser/fesm5/animations.js ***!
114166
  \********************************************************************/
114167
/*! exports provided: ɵangular_packages_platform_browser_animations_animations_g, ɵangular_packages_platform_browser_animations_animations_e, ɵangular_packages_platform_browser_animations_animations_f, ɵangular_packages_platform_browser_animations_animations_a, ɵangular_packages_platform_browser_animations_animations_c, ɵangular_packages_platform_browser_animations_animations_d, ɵangular_packages_platform_browser_animations_animations_b, BrowserAnimationsModule, NoopAnimationsModule, ANIMATION_MODULE_TYPE, ɵBrowserAnimationBuilder, ɵBrowserAnimationFactory, ɵAnimationRenderer, ɵAnimationRendererFactory */
114168
/***/ (function(module, __webpack_exports__, __webpack_require__) {
114169
 
114170
"use strict";
114171
__webpack_require__.r(__webpack_exports__);
114172
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_animations_animations_g", function() { return BaseAnimationRenderer; });
114173
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_animations_animations_e", function() { return BROWSER_ANIMATIONS_PROVIDERS; });
114174
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_animations_animations_f", function() { return BROWSER_NOOP_ANIMATIONS_PROVIDERS; });
114175
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_animations_animations_a", function() { return InjectableAnimationEngine; });
114176
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_animations_animations_c", function() { return instantiateDefaultStyleNormalizer; });
114177
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_animations_animations_d", function() { return instantiateRendererFactory; });
114178
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_animations_animations_b", function() { return instantiateSupportedAnimationDriver; });
114179
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BrowserAnimationsModule", function() { return BrowserAnimationsModule; });
114180
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NoopAnimationsModule", function() { return NoopAnimationsModule; });
114181
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ANIMATION_MODULE_TYPE", function() { return ANIMATION_MODULE_TYPE; });
114182
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵBrowserAnimationBuilder", function() { return BrowserAnimationBuilder; });
114183
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵBrowserAnimationFactory", function() { return BrowserAnimationFactory; });
114184
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵAnimationRenderer", function() { return AnimationRenderer; });
114185
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵAnimationRendererFactory", function() { return AnimationRendererFactory; });
114186
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
114187
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js");
114188
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
114189
/* harmony import */ var _angular_animations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/animations */ "./node_modules/@angular/animations/fesm5/animations.js");
114190
/* harmony import */ var _angular_animations_browser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/animations/browser */ "./node_modules/@angular/animations/fesm5/browser.js");
114191
/**
114192
 * @license Angular v6.0.3
114193
 * (c) 2010-2018 Google, Inc. https://angular.io/
114194
 * License: MIT
114195
 */
114196
 
114197
 
114198
 
114199
 
114200
 
114201
 
114202
 
114203
var BrowserAnimationBuilder = /** @class */ (function (_super) {
114204
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(BrowserAnimationBuilder, _super);
114205
    function BrowserAnimationBuilder(rootRenderer, doc) {
114206
        var _this = _super.call(this) || this;
114207
        _this._nextAnimationId = 0;
114208
        var typeData = {
114209
            id: '0',
114210
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
114211
            styles: [],
114212
            data: { animation: [] }
114213
        };
114214
        _this._renderer = rootRenderer.createRenderer(doc.body, typeData);
114215
        return _this;
114216
    }
114217
    BrowserAnimationBuilder.prototype.build = function (animation) {
114218
        var id = this._nextAnimationId.toString();
114219
        this._nextAnimationId++;
114220
        var entry = Array.isArray(animation) ? Object(_angular_animations__WEBPACK_IMPORTED_MODULE_3__["sequence"])(animation) : animation;
114221
        issueAnimationCommand(this._renderer, null, id, 'register', [entry]);
114222
        return new BrowserAnimationFactory(id, this._renderer);
114223
    };
114224
    BrowserAnimationBuilder.decorators = [
114225
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }
114226
    ];
114227
    /** @nocollapse */
114228
    BrowserAnimationBuilder.ctorParameters = function () { return [
114229
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["RendererFactory2"], },
114230
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_platform_browser__WEBPACK_IMPORTED_MODULE_1__["DOCUMENT"],] },] },
114231
    ]; };
114232
    return BrowserAnimationBuilder;
114233
}(_angular_animations__WEBPACK_IMPORTED_MODULE_3__["AnimationBuilder"]));
114234
var BrowserAnimationFactory = /** @class */ (function (_super) {
114235
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(BrowserAnimationFactory, _super);
114236
    function BrowserAnimationFactory(_id, _renderer) {
114237
        var _this = _super.call(this) || this;
114238
        _this._id = _id;
114239
        _this._renderer = _renderer;
114240
        return _this;
114241
    }
114242
    BrowserAnimationFactory.prototype.create = function (element, options) {
114243
        return new RendererAnimationPlayer(this._id, element, options || {}, this._renderer);
114244
    };
114245
    return BrowserAnimationFactory;
114246
}(_angular_animations__WEBPACK_IMPORTED_MODULE_3__["AnimationFactory"]));
114247
var RendererAnimationPlayer = /** @class */ (function () {
114248
    function RendererAnimationPlayer(id, element, options, _renderer) {
114249
        this.id = id;
114250
        this.element = element;
114251
        this._renderer = _renderer;
114252
        this.parentPlayer = null;
114253
        this._started = false;
114254
        this.totalTime = 0;
114255
        this._command('create', options);
114256
    }
114257
    RendererAnimationPlayer.prototype._listen = function (eventName, callback) {
114258
        return this._renderer.listen(this.element, "@@" + this.id + ":" + eventName, callback);
114259
    };
114260
    RendererAnimationPlayer.prototype._command = function (command) {
114261
        var args = [];
114262
        for (var _i = 1; _i < arguments.length; _i++) {
114263
            args[_i - 1] = arguments[_i];
114264
        }
114265
        return issueAnimationCommand(this._renderer, this.element, this.id, command, args);
114266
    };
114267
    RendererAnimationPlayer.prototype.onDone = function (fn) { this._listen('done', fn); };
114268
    RendererAnimationPlayer.prototype.onStart = function (fn) { this._listen('start', fn); };
114269
    RendererAnimationPlayer.prototype.onDestroy = function (fn) { this._listen('destroy', fn); };
114270
    RendererAnimationPlayer.prototype.init = function () { this._command('init'); };
114271
    RendererAnimationPlayer.prototype.hasStarted = function () { return this._started; };
114272
    RendererAnimationPlayer.prototype.play = function () {
114273
        this._command('play');
114274
        this._started = true;
114275
    };
114276
    RendererAnimationPlayer.prototype.pause = function () { this._command('pause'); };
114277
    RendererAnimationPlayer.prototype.restart = function () { this._command('restart'); };
114278
    RendererAnimationPlayer.prototype.finish = function () { this._command('finish'); };
114279
    RendererAnimationPlayer.prototype.destroy = function () { this._command('destroy'); };
114280
    RendererAnimationPlayer.prototype.reset = function () { this._command('reset'); };
114281
    RendererAnimationPlayer.prototype.setPosition = function (p) { this._command('setPosition', p); };
114282
    RendererAnimationPlayer.prototype.getPosition = function () { return 0; };
114283
    return RendererAnimationPlayer;
114284
}());
114285
function issueAnimationCommand(renderer, element, id, command, args) {
114286
    return renderer.setProperty(element, "@@" + id + ":" + command, args);
114287
}
114288
 
114289
var ANIMATION_PREFIX = '@';
114290
var DISABLE_ANIMATIONS_FLAG = '@.disabled';
114291
var AnimationRendererFactory = /** @class */ (function () {
114292
    function AnimationRendererFactory(delegate, engine, _zone) {
114293
        this.delegate = delegate;
114294
        this.engine = engine;
114295
        this._zone = _zone;
114296
        this._currentId = 0;
114297
        this._microtaskId = 1;
114298
        this._animationCallbacksBuffer = [];
114299
        this._rendererCache = new Map();
114300
        this._cdRecurDepth = 0;
114301
        this.promise = Promise.resolve(0);
114302
        engine.onRemovalComplete = function (element, delegate) {
114303
            // Note: if an component element has a leave animation, and the component
114304
            // a host leave animation, the view engine will call `removeChild` for the parent
114305
            // component renderer as well as for the child component renderer.
114306
            // Therefore, we need to check if we already removed the element.
114307
            if (delegate && delegate.parentNode(element)) {
114308
                delegate.removeChild(element.parentNode, element);
114309
            }
114310
        };
114311
    }
114312
    AnimationRendererFactory.prototype.createRenderer = function (hostElement, type) {
114313
        var _this = this;
114314
        var EMPTY_NAMESPACE_ID = '';
114315
        // cache the delegates to find out which cached delegate can
114316
        // be used by which cached renderer
114317
        var delegate = this.delegate.createRenderer(hostElement, type);
114318
        if (!hostElement || !type || !type.data || !type.data['animation']) {
114319
            var renderer = this._rendererCache.get(delegate);
114320
            if (!renderer) {
114321
                renderer = new BaseAnimationRenderer(EMPTY_NAMESPACE_ID, delegate, this.engine);
114322
                // only cache this result when the base renderer is used
114323
                this._rendererCache.set(delegate, renderer);
114324
            }
114325
            return renderer;
114326
        }
114327
        var componentId = type.id;
114328
        var namespaceId = type.id + '-' + this._currentId;
114329
        this._currentId++;
114330
        this.engine.register(namespaceId, hostElement);
114331
        var animationTriggers = type.data['animation'];
114332
        animationTriggers.forEach(function (trigger) {
114333
            return _this.engine.registerTrigger(componentId, namespaceId, hostElement, trigger.name, trigger);
114334
        });
114335
        return new AnimationRenderer(this, namespaceId, delegate, this.engine);
114336
    };
114337
    AnimationRendererFactory.prototype.begin = function () {
114338
        this._cdRecurDepth++;
114339
        if (this.delegate.begin) {
114340
            this.delegate.begin();
114341
        }
114342
    };
114343
    AnimationRendererFactory.prototype._scheduleCountTask = function () {
114344
        var _this = this;
114345
        // always use promise to schedule microtask instead of use Zone
114346
        this.promise.then(function () { _this._microtaskId++; });
114347
    };
114348
    /* @internal */
114349
    /* @internal */
114350
    AnimationRendererFactory.prototype.scheduleListenerCallback = /* @internal */
114351
    function (count, fn, data) {
114352
        var _this = this;
114353
        if (count >= 0 && count < this._microtaskId) {
114354
            this._zone.run(function () { return fn(data); });
114355
            return;
114356
        }
114357
        if (this._animationCallbacksBuffer.length == 0) {
114358
            Promise.resolve(null).then(function () {
114359
                _this._zone.run(function () {
114360
                    _this._animationCallbacksBuffer.forEach(function (tuple) {
114361
                        var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__read"])(tuple, 2), fn = _a[0], data = _a[1];
114362
                        fn(data);
114363
                    });
114364
                    _this._animationCallbacksBuffer = [];
114365
                });
114366
            });
114367
        }
114368
        this._animationCallbacksBuffer.push([fn, data]);
114369
    };
114370
    AnimationRendererFactory.prototype.end = function () {
114371
        var _this = this;
114372
        this._cdRecurDepth--;
114373
        // this is to prevent animations from running twice when an inner
114374
        // component does CD when a parent component insted has inserted it
114375
        if (this._cdRecurDepth == 0) {
114376
            this._zone.runOutsideAngular(function () {
114377
                _this._scheduleCountTask();
114378
                _this.engine.flush(_this._microtaskId);
114379
            });
114380
        }
114381
        if (this.delegate.end) {
114382
            this.delegate.end();
114383
        }
114384
    };
114385
    AnimationRendererFactory.prototype.whenRenderingDone = function () { return this.engine.whenRenderingDone(); };
114386
    AnimationRendererFactory.decorators = [
114387
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }
114388
    ];
114389
    /** @nocollapse */
114390
    AnimationRendererFactory.ctorParameters = function () { return [
114391
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["RendererFactory2"], },
114392
        { type: _angular_animations_browser__WEBPACK_IMPORTED_MODULE_4__["ɵAnimationEngine"], },
114393
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], },
114394
    ]; };
114395
    return AnimationRendererFactory;
114396
}());
114397
var BaseAnimationRenderer = /** @class */ (function () {
114398
    function BaseAnimationRenderer(namespaceId, delegate, engine) {
114399
        this.namespaceId = namespaceId;
114400
        this.delegate = delegate;
114401
        this.engine = engine;
114402
        this.destroyNode = this.delegate.destroyNode ? function (n) { return delegate.destroyNode(n); } : null;
114403
    }
114404
    Object.defineProperty(BaseAnimationRenderer.prototype, "data", {
114405
        get: function () { return this.delegate.data; },
114406
        enumerable: true,
114407
        configurable: true
114408
    });
114409
    BaseAnimationRenderer.prototype.destroy = function () {
114410
        this.engine.destroy(this.namespaceId, this.delegate);
114411
        this.delegate.destroy();
114412
    };
114413
    BaseAnimationRenderer.prototype.createElement = function (name, namespace) {
114414
        return this.delegate.createElement(name, namespace);
114415
    };
114416
    BaseAnimationRenderer.prototype.createComment = function (value) { return this.delegate.createComment(value); };
114417
    BaseAnimationRenderer.prototype.createText = function (value) { return this.delegate.createText(value); };
114418
    BaseAnimationRenderer.prototype.appendChild = function (parent, newChild) {
114419
        this.delegate.appendChild(parent, newChild);
114420
        this.engine.onInsert(this.namespaceId, newChild, parent, false);
114421
    };
114422
    BaseAnimationRenderer.prototype.insertBefore = function (parent, newChild, refChild) {
114423
        this.delegate.insertBefore(parent, newChild, refChild);
114424
        this.engine.onInsert(this.namespaceId, newChild, parent, true);
114425
    };
114426
    BaseAnimationRenderer.prototype.removeChild = function (parent, oldChild) {
114427
        this.engine.onRemove(this.namespaceId, oldChild, this.delegate);
114428
    };
114429
    BaseAnimationRenderer.prototype.selectRootElement = function (selectorOrNode) { return this.delegate.selectRootElement(selectorOrNode); };
114430
    BaseAnimationRenderer.prototype.parentNode = function (node) { return this.delegate.parentNode(node); };
114431
    BaseAnimationRenderer.prototype.nextSibling = function (node) { return this.delegate.nextSibling(node); };
114432
    BaseAnimationRenderer.prototype.setAttribute = function (el, name, value, namespace) {
114433
        this.delegate.setAttribute(el, name, value, namespace);
114434
    };
114435
    BaseAnimationRenderer.prototype.removeAttribute = function (el, name, namespace) {
114436
        this.delegate.removeAttribute(el, name, namespace);
114437
    };
114438
    BaseAnimationRenderer.prototype.addClass = function (el, name) { this.delegate.addClass(el, name); };
114439
    BaseAnimationRenderer.prototype.removeClass = function (el, name) { this.delegate.removeClass(el, name); };
114440
    BaseAnimationRenderer.prototype.setStyle = function (el, style, value, flags) {
114441
        this.delegate.setStyle(el, style, value, flags);
114442
    };
114443
    BaseAnimationRenderer.prototype.removeStyle = function (el, style, flags) {
114444
        this.delegate.removeStyle(el, style, flags);
114445
    };
114446
    BaseAnimationRenderer.prototype.setProperty = function (el, name, value) {
114447
        if (name.charAt(0) == ANIMATION_PREFIX && name == DISABLE_ANIMATIONS_FLAG) {
114448
            this.disableAnimations(el, !!value);
114449
        }
114450
        else {
114451
            this.delegate.setProperty(el, name, value);
114452
        }
114453
    };
114454
    BaseAnimationRenderer.prototype.setValue = function (node, value) { this.delegate.setValue(node, value); };
114455
    BaseAnimationRenderer.prototype.listen = function (target, eventName, callback) {
114456
        return this.delegate.listen(target, eventName, callback);
114457
    };
114458
    BaseAnimationRenderer.prototype.disableAnimations = function (element, value) {
114459
        this.engine.disableAnimations(element, value);
114460
    };
114461
    return BaseAnimationRenderer;
114462
}());
114463
var AnimationRenderer = /** @class */ (function (_super) {
114464
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(AnimationRenderer, _super);
114465
    function AnimationRenderer(factory, namespaceId, delegate, engine) {
114466
        var _this = _super.call(this, namespaceId, delegate, engine) || this;
114467
        _this.factory = factory;
114468
        _this.namespaceId = namespaceId;
114469
        return _this;
114470
    }
114471
    AnimationRenderer.prototype.setProperty = function (el, name, value) {
114472
        if (name.charAt(0) == ANIMATION_PREFIX) {
114473
            if (name.charAt(1) == '.' && name == DISABLE_ANIMATIONS_FLAG) {
114474
                value = value === undefined ? true : !!value;
114475
                this.disableAnimations(el, value);
114476
            }
114477
            else {
114478
                this.engine.process(this.namespaceId, el, name.substr(1), value);
114479
            }
114480
        }
114481
        else {
114482
            this.delegate.setProperty(el, name, value);
114483
        }
114484
    };
114485
    AnimationRenderer.prototype.listen = function (target, eventName, callback) {
114486
        var _this = this;
114487
        if (eventName.charAt(0) == ANIMATION_PREFIX) {
114488
            var element = resolveElementFromTarget(target);
114489
            var name_1 = eventName.substr(1);
114490
            var phase = '';
114491
            // @listener.phase is for trigger animation callbacks
114492
            // @@listener is for animation builder callbacks
114493
            if (name_1.charAt(0) != ANIMATION_PREFIX) {
114494
                _a = Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__read"])(parseTriggerCallbackName(name_1), 2), name_1 = _a[0], phase = _a[1];
114495
            }
114496
            return this.engine.listen(this.namespaceId, element, name_1, phase, function (event) {
114497
                var countId = event['_data'] || -1;
114498
                _this.factory.scheduleListenerCallback(countId, callback, event);
114499
            });
114500
        }
114501
        return this.delegate.listen(target, eventName, callback);
114502
        var _a;
114503
    };
114504
    return AnimationRenderer;
114505
}(BaseAnimationRenderer));
114506
function resolveElementFromTarget(target) {
114507
    switch (target) {
114508
        case 'body':
114509
            return document.body;
114510
        case 'document':
114511
            return document;
114512
        case 'window':
114513
            return window;
114514
        default:
114515
            return target;
114516
    }
114517
}
114518
function parseTriggerCallbackName(triggerName) {
114519
    var dotIndex = triggerName.indexOf('.');
114520
    var trigger = triggerName.substring(0, dotIndex);
114521
    var phase = triggerName.substr(dotIndex + 1);
114522
    return [trigger, phase];
114523
}
114524
 
114525
/**
114526
 * @license
114527
 * Copyright Google Inc. All Rights Reserved.
114528
 *
114529
 * Use of this source code is governed by an MIT-style license that can be
114530
 * found in the LICENSE file at https://angular.io/license
114531
 */
114532
var InjectableAnimationEngine = /** @class */ (function (_super) {
114533
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(InjectableAnimationEngine, _super);
114534
    function InjectableAnimationEngine(driver, normalizer) {
114535
        return _super.call(this, driver, normalizer) || this;
114536
    }
114537
    InjectableAnimationEngine.decorators = [
114538
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }
114539
    ];
114540
    /** @nocollapse */
114541
    InjectableAnimationEngine.ctorParameters = function () { return [
114542
        { type: _angular_animations_browser__WEBPACK_IMPORTED_MODULE_4__["AnimationDriver"], },
114543
        { type: _angular_animations_browser__WEBPACK_IMPORTED_MODULE_4__["ɵAnimationStyleNormalizer"], },
114544
    ]; };
114545
    return InjectableAnimationEngine;
114546
}(_angular_animations_browser__WEBPACK_IMPORTED_MODULE_4__["ɵAnimationEngine"]));
114547
function instantiateSupportedAnimationDriver() {
114548
    return Object(_angular_animations_browser__WEBPACK_IMPORTED_MODULE_4__["ɵsupportsWebAnimations"])() ? new _angular_animations_browser__WEBPACK_IMPORTED_MODULE_4__["ɵWebAnimationsDriver"]() : new _angular_animations_browser__WEBPACK_IMPORTED_MODULE_4__["ɵCssKeyframesDriver"]();
114549
}
114550
function instantiateDefaultStyleNormalizer() {
114551
    return new _angular_animations_browser__WEBPACK_IMPORTED_MODULE_4__["ɵWebAnimationsStyleNormalizer"]();
114552
}
114553
function instantiateRendererFactory(renderer, engine, zone) {
114554
    return new AnimationRendererFactory(renderer, engine, zone);
114555
}
114556
/**
114557
 * @experimental Animation support is experimental.
114558
 */
114559
var ANIMATION_MODULE_TYPE = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('AnimationModuleType');
114560
var SHARED_ANIMATION_PROVIDERS = [
114561
    { provide: _angular_animations__WEBPACK_IMPORTED_MODULE_3__["AnimationBuilder"], useClass: BrowserAnimationBuilder },
114562
    { provide: _angular_animations_browser__WEBPACK_IMPORTED_MODULE_4__["ɵAnimationStyleNormalizer"], useFactory: instantiateDefaultStyleNormalizer },
114563
    { provide: _angular_animations_browser__WEBPACK_IMPORTED_MODULE_4__["ɵAnimationEngine"], useClass: InjectableAnimationEngine }, {
114564
        provide: _angular_core__WEBPACK_IMPORTED_MODULE_0__["RendererFactory2"],
114565
        useFactory: instantiateRendererFactory,
114566
        deps: [_angular_platform_browser__WEBPACK_IMPORTED_MODULE_1__["ɵDomRendererFactory2"], _angular_animations_browser__WEBPACK_IMPORTED_MODULE_4__["ɵAnimationEngine"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"]]
114567
    }
114568
];
114569
/**
114570
 * Separate providers from the actual module so that we can do a local modification in Google3 to
114571
 * include them in the BrowserModule.
114572
 */
114573
var BROWSER_ANIMATIONS_PROVIDERS = Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__spread"])([
114574
    { provide: _angular_animations_browser__WEBPACK_IMPORTED_MODULE_4__["AnimationDriver"], useFactory: instantiateSupportedAnimationDriver },
114575
    { provide: ANIMATION_MODULE_TYPE, useValue: 'BrowserAnimations' }
114576
], SHARED_ANIMATION_PROVIDERS);
114577
/**
114578
 * Separate providers from the actual module so that we can do a local modification in Google3 to
114579
 * include them in the BrowserTestingModule.
114580
 */
114581
var BROWSER_NOOP_ANIMATIONS_PROVIDERS = Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__spread"])([
114582
    { provide: _angular_animations_browser__WEBPACK_IMPORTED_MODULE_4__["AnimationDriver"], useClass: _angular_animations_browser__WEBPACK_IMPORTED_MODULE_4__["ɵNoopAnimationDriver"] },
114583
    { provide: ANIMATION_MODULE_TYPE, useValue: 'NoopAnimations' }
114584
], SHARED_ANIMATION_PROVIDERS);
114585
 
114586
/**
114587
 * @experimental Animation support is experimental.
114588
 */
114589
var BrowserAnimationsModule = /** @class */ (function () {
114590
    function BrowserAnimationsModule() {
114591
    }
114592
    BrowserAnimationsModule.decorators = [
114593
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
114594
                    exports: [_angular_platform_browser__WEBPACK_IMPORTED_MODULE_1__["BrowserModule"]],
114595
                    providers: BROWSER_ANIMATIONS_PROVIDERS,
114596
                },] }
114597
    ];
114598
    /** @nocollapse */
114599
    BrowserAnimationsModule.ctorParameters = function () { return []; };
114600
    return BrowserAnimationsModule;
114601
}());
114602
/**
114603
 * @experimental Animation support is experimental.
114604
 */
114605
var NoopAnimationsModule = /** @class */ (function () {
114606
    function NoopAnimationsModule() {
114607
    }
114608
    NoopAnimationsModule.decorators = [
114609
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
114610
                    exports: [_angular_platform_browser__WEBPACK_IMPORTED_MODULE_1__["BrowserModule"]],
114611
                    providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS,
114612
                },] }
114613
    ];
114614
    /** @nocollapse */
114615
    NoopAnimationsModule.ctorParameters = function () { return []; };
114616
    return NoopAnimationsModule;
114617
}());
114618
 
114619
/**
114620
 * @license
114621
 * Copyright Google Inc. All Rights Reserved.
114622
 *
114623
 * Use of this source code is governed by an MIT-style license that can be
114624
 * found in the LICENSE file at https://angular.io/license
114625
 */
114626
 
114627
/**
114628
 * @license
114629
 * Copyright Google Inc. All Rights Reserved.
114630
 *
114631
 * Use of this source code is governed by an MIT-style license that can be
114632
 * found in the LICENSE file at https://angular.io/license
114633
 */
114634
 
114635
/**
114636
 * @license
114637
 * Copyright Google Inc. All Rights Reserved.
114638
 *
114639
 * Use of this source code is governed by an MIT-style license that can be
114640
 * found in the LICENSE file at https://angular.io/license
114641
 */
114642
 
114643
/**
114644
 * Generated bundle index. Do not edit.
114645
 */
114646
 
114647
 
114648
//# sourceMappingURL=animations.js.map
114649
 
114650
 
114651
/***/ }),
114652
 
114653
/***/ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js":
114654
/*!**************************************************************************!*\
114655
  !*** ./node_modules/@angular/platform-browser/fesm5/platform-browser.js ***!
114656
  \**************************************************************************/
114657
/*! exports provided: ɵangular_packages_platform_browser_platform_browser_b, ɵangular_packages_platform_browser_platform_browser_a, ɵangular_packages_platform_browser_platform_browser_i, ɵangular_packages_platform_browser_platform_browser_g, ɵangular_packages_platform_browser_platform_browser_f, ɵangular_packages_platform_browser_platform_browser_c, ɵangular_packages_platform_browser_platform_browser_h, ɵangular_packages_platform_browser_platform_browser_d, ɵangular_packages_platform_browser_platform_browser_e, BrowserModule, platformBrowser, Meta, Title, disableDebugTools, enableDebugTools, BrowserTransferStateModule, TransferState, makeStateKey, By, DOCUMENT, EVENT_MANAGER_PLUGINS, EventManager, HAMMER_GESTURE_CONFIG, HammerGestureConfig, DomSanitizer, VERSION, ɵBROWSER_SANITIZATION_PROVIDERS, ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS, ɵinitDomAdapter, ɵBrowserDomAdapter, ɵBrowserPlatformLocation, ɵTRANSITION_ID, ɵBrowserGetTestability, ɵescapeHtml, ɵELEMENT_PROBE_PROVIDERS, ɵDomAdapter, ɵgetDOM, ɵsetRootDomAdapter, ɵDomRendererFactory2, ɵNAMESPACE_URIS, ɵflattenStyles, ɵshimContentAttribute, ɵshimHostAttribute, ɵDomEventsPlugin, ɵHammerGesturesPlugin, ɵKeyEventsPlugin, ɵDomSharedStylesHost, ɵSharedStylesHost */
114658
/***/ (function(module, __webpack_exports__, __webpack_require__) {
114659
 
114660
"use strict";
114661
__webpack_require__.r(__webpack_exports__);
114662
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_b", function() { return _document; });
114663
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_a", function() { return errorHandler; });
114664
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_i", function() { return GenericBrowserDomAdapter; });
114665
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_g", function() { return SERVER_TRANSITION_PROVIDERS; });
114666
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_f", function() { return appInitializerFactory; });
114667
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_c", function() { return initTransferState; });
114668
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_h", function() { return _createNgProbe; });
114669
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_d", function() { return EventManagerPlugin; });
114670
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_e", function() { return DomSanitizerImpl; });
114671
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BrowserModule", function() { return BrowserModule; });
114672
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "platformBrowser", function() { return platformBrowser; });
114673
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Meta", function() { return Meta; });
114674
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Title", function() { return Title; });
114675
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "disableDebugTools", function() { return disableDebugTools; });
114676
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "enableDebugTools", function() { return enableDebugTools; });
114677
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BrowserTransferStateModule", function() { return BrowserTransferStateModule; });
114678
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TransferState", function() { return TransferState; });
114679
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeStateKey", function() { return makeStateKey; });
114680
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "By", function() { return By; });
114681
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DOCUMENT", function() { return DOCUMENT$1; });
114682
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EVENT_MANAGER_PLUGINS", function() { return EVENT_MANAGER_PLUGINS; });
114683
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EventManager", function() { return EventManager; });
114684
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HAMMER_GESTURE_CONFIG", function() { return HAMMER_GESTURE_CONFIG; });
114685
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HammerGestureConfig", function() { return HammerGestureConfig; });
114686
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DomSanitizer", function() { return DomSanitizer; });
114687
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; });
114688
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵBROWSER_SANITIZATION_PROVIDERS", function() { return BROWSER_SANITIZATION_PROVIDERS; });
114689
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS", function() { return INTERNAL_BROWSER_PLATFORM_PROVIDERS; });
114690
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinitDomAdapter", function() { return initDomAdapter; });
114691
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵBrowserDomAdapter", function() { return BrowserDomAdapter; });
114692
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵBrowserPlatformLocation", function() { return BrowserPlatformLocation; });
114693
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵTRANSITION_ID", function() { return TRANSITION_ID; });
114694
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵBrowserGetTestability", function() { return BrowserGetTestability; });
114695
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵescapeHtml", function() { return escapeHtml; });
114696
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵELEMENT_PROBE_PROVIDERS", function() { return ELEMENT_PROBE_PROVIDERS; });
114697
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵDomAdapter", function() { return DomAdapter; });
114698
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetDOM", function() { return getDOM; });
114699
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵsetRootDomAdapter", function() { return setRootDomAdapter; });
114700
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵDomRendererFactory2", function() { return DomRendererFactory2; });
114701
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNAMESPACE_URIS", function() { return NAMESPACE_URIS; });
114702
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵflattenStyles", function() { return flattenStyles; });
114703
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵshimContentAttribute", function() { return shimContentAttribute; });
114704
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵshimHostAttribute", function() { return shimHostAttribute; });
114705
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵDomEventsPlugin", function() { return DomEventsPlugin; });
114706
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵHammerGesturesPlugin", function() { return HammerGesturesPlugin; });
114707
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵKeyEventsPlugin", function() { return KeyEventsPlugin; });
114708
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵDomSharedStylesHost", function() { return DomSharedStylesHost; });
114709
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSharedStylesHost", function() { return SharedStylesHost; });
114710
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
114711
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
114712
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
114713
/**
114714
 * @license Angular v6.0.3
114715
 * (c) 2010-2018 Google, Inc. https://angular.io/
114716
 * License: MIT
114717
 */
114718
 
114719
 
114720
 
114721
 
114722
 
114723
/**
114724
 * @license
114725
 * Copyright Google Inc. All Rights Reserved.
114726
 *
114727
 * Use of this source code is governed by an MIT-style license that can be
114728
 * found in the LICENSE file at https://angular.io/license
114729
 */
114730
var _DOM = (null);
114731
function getDOM() {
114732
    return _DOM;
114733
}
114734
 
114735
function setRootDomAdapter(adapter) {
114736
    if (!_DOM) {
114737
        _DOM = adapter;
114738
    }
114739
}
114740
/* tslint:disable:requireParameterType */
114741
/**
114742
 * Provides DOM operations in an environment-agnostic way.
114743
 *
114744
 * @security Tread carefully! Interacting with the DOM directly is dangerous and
114745
 * can introduce XSS risks.
114746
 */
114747
var DomAdapter = /** @class */ (function () {
114748
    function DomAdapter() {
114749
        this.resourceLoaderType = null;
114750
    }
114751
    Object.defineProperty(DomAdapter.prototype, "attrToPropMap", {
114752
        /**
114753
         * Maps attribute names to their corresponding property names for cases
114754
         * where attribute name doesn't match property name.
114755
         */
114756
        get: /**
114757
           * Maps attribute names to their corresponding property names for cases
114758
           * where attribute name doesn't match property name.
114759
           */
114760
        function () { return this._attrToPropMap; },
114761
        set: function (value) { this._attrToPropMap = value; },
114762
        enumerable: true,
114763
        configurable: true
114764
    });
114765
    return DomAdapter;
114766
}());
114767
 
114768
/**
114769
 * @license
114770
 * Copyright Google Inc. All Rights Reserved.
114771
 *
114772
 * Use of this source code is governed by an MIT-style license that can be
114773
 * found in the LICENSE file at https://angular.io/license
114774
 */
114775
/**
114776
 * Provides DOM operations in any browser environment.
114777
 *
114778
 * @security Tread carefully! Interacting with the DOM directly is dangerous and
114779
 * can introduce XSS risks.
114780
 */
114781
var GenericBrowserDomAdapter = /** @class */ (function (_super) {
114782
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(GenericBrowserDomAdapter, _super);
114783
    function GenericBrowserDomAdapter() {
114784
        var _this = _super.call(this) || this;
114785
        _this._animationPrefix = null;
114786
        _this._transitionEnd = null;
114787
        try {
114788
            var element_1 = _this.createElement('div', document);
114789
            if (_this.getStyle(element_1, 'animationName') != null) {
114790
                _this._animationPrefix = '';
114791
            }
114792
            else {
114793
                var domPrefixes = ['Webkit', 'Moz', 'O', 'ms'];
114794
                for (var i = 0; i < domPrefixes.length; i++) {
114795
                    if (_this.getStyle(element_1, domPrefixes[i] + 'AnimationName') != null) {
114796
                        _this._animationPrefix = '-' + domPrefixes[i].toLowerCase() + '-';
114797
                        break;
114798
                    }
114799
                }
114800
            }
114801
            var transEndEventNames_1 = {
114802
                WebkitTransition: 'webkitTransitionEnd',
114803
                MozTransition: 'transitionend',
114804
                OTransition: 'oTransitionEnd otransitionend',
114805
                transition: 'transitionend'
114806
            };
114807
            Object.keys(transEndEventNames_1).forEach(function (key) {
114808
                if (_this.getStyle(element_1, key) != null) {
114809
                    _this._transitionEnd = transEndEventNames_1[key];
114810
                }
114811
            });
114812
        }
114813
        catch (e) {
114814
            _this._animationPrefix = null;
114815
            _this._transitionEnd = null;
114816
        }
114817
        return _this;
114818
    }
114819
    GenericBrowserDomAdapter.prototype.getDistributedNodes = function (el) { return el.getDistributedNodes(); };
114820
    GenericBrowserDomAdapter.prototype.resolveAndSetHref = function (el, baseUrl, href) {
114821
        el.href = href == null ? baseUrl : baseUrl + '/../' + href;
114822
    };
114823
    GenericBrowserDomAdapter.prototype.supportsDOMEvents = function () { return true; };
114824
    GenericBrowserDomAdapter.prototype.supportsNativeShadowDOM = function () {
114825
        return typeof document.body.createShadowRoot === 'function';
114826
    };
114827
    GenericBrowserDomAdapter.prototype.getAnimationPrefix = function () { return this._animationPrefix ? this._animationPrefix : ''; };
114828
    GenericBrowserDomAdapter.prototype.getTransitionEnd = function () { return this._transitionEnd ? this._transitionEnd : ''; };
114829
    GenericBrowserDomAdapter.prototype.supportsAnimation = function () {
114830
        return this._animationPrefix != null && this._transitionEnd != null;
114831
    };
114832
    return GenericBrowserDomAdapter;
114833
}(DomAdapter));
114834
 
114835
/**
114836
 * @license
114837
 * Copyright Google Inc. All Rights Reserved.
114838
 *
114839
 * Use of this source code is governed by an MIT-style license that can be
114840
 * found in the LICENSE file at https://angular.io/license
114841
 */
114842
var _attrToPropMap = {
114843
    'class': 'className',
114844
    'innerHtml': 'innerHTML',
114845
    'readonly': 'readOnly',
114846
    'tabindex': 'tabIndex',
114847
};
114848
var DOM_KEY_LOCATION_NUMPAD = 3;
114849
// Map to convert some key or keyIdentifier values to what will be returned by getEventKey
114850
var _keyMap = {
114851
    // The following values are here for cross-browser compatibility and to match the W3C standard
114852
    // cf http://www.w3.org/TR/DOM-Level-3-Events-key/
114853
    '\b': 'Backspace',
114854
    '\t': 'Tab',
114855
    '\x7F': 'Delete',
114856
    '\x1B': 'Escape',
114857
    'Del': 'Delete',
114858
    'Esc': 'Escape',
114859
    'Left': 'ArrowLeft',
114860
    'Right': 'ArrowRight',
114861
    'Up': 'ArrowUp',
114862
    'Down': 'ArrowDown',
114863
    'Menu': 'ContextMenu',
114864
    'Scroll': 'ScrollLock',
114865
    'Win': 'OS'
114866
};
114867
// There is a bug in Chrome for numeric keypad keys:
114868
// https://code.google.com/p/chromium/issues/detail?id=155654
114869
// 1, 2, 3 ... are reported as A, B, C ...
114870
var _chromeNumKeyPadMap = {
114871
    'A': '1',
114872
    'B': '2',
114873
    'C': '3',
114874
    'D': '4',
114875
    'E': '5',
114876
    'F': '6',
114877
    'G': '7',
114878
    'H': '8',
114879
    'I': '9',
114880
    'J': '*',
114881
    'K': '+',
114882
    'M': '-',
114883
    'N': '.',
114884
    'O': '/',
114885
    '\x60': '0',
114886
    '\x90': 'NumLock'
114887
};
114888
var nodeContains;
114889
if (_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['Node']) {
114890
    nodeContains = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['Node'].prototype.contains || function (node) {
114891
        return !!(this.compareDocumentPosition(node) & 16);
114892
    };
114893
}
114894
/**
114895
 * A `DomAdapter` powered by full browser DOM APIs.
114896
 *
114897
 * @security Tread carefully! Interacting with the DOM directly is dangerous and
114898
 * can introduce XSS risks.
114899
 */
114900
/* tslint:disable:requireParameterType no-console */
114901
var BrowserDomAdapter = /** @class */ (function (_super) {
114902
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(BrowserDomAdapter, _super);
114903
    function BrowserDomAdapter() {
114904
        return _super !== null && _super.apply(this, arguments) || this;
114905
    }
114906
    BrowserDomAdapter.prototype.parse = function (templateHtml) { throw new Error('parse not implemented'); };
114907
    BrowserDomAdapter.makeCurrent = function () { setRootDomAdapter(new BrowserDomAdapter()); };
114908
    BrowserDomAdapter.prototype.hasProperty = function (element, name) { return name in element; };
114909
    BrowserDomAdapter.prototype.setProperty = function (el, name, value) { el[name] = value; };
114910
    BrowserDomAdapter.prototype.getProperty = function (el, name) { return el[name]; };
114911
    BrowserDomAdapter.prototype.invoke = function (el, methodName, args) {
114912
        (_a = el)[methodName].apply(_a, Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__spread"])(args));
114913
        var _a;
114914
    };
114915
    // TODO(tbosch): move this into a separate environment class once we have it
114916
    // TODO(tbosch): move this into a separate environment class once we have it
114917
    BrowserDomAdapter.prototype.logError =
114918
    // TODO(tbosch): move this into a separate environment class once we have it
114919
    function (error) {
114920
        if (window.console) {
114921
            if (console.error) {
114922
                console.error(error);
114923
            }
114924
            else {
114925
                console.log(error);
114926
            }
114927
        }
114928
    };
114929
    BrowserDomAdapter.prototype.log = function (error) {
114930
        if (window.console) {
114931
            window.console.log && window.console.log(error);
114932
        }
114933
    };
114934
    BrowserDomAdapter.prototype.logGroup = function (error) {
114935
        if (window.console) {
114936
            window.console.group && window.console.group(error);
114937
        }
114938
    };
114939
    BrowserDomAdapter.prototype.logGroupEnd = function () {
114940
        if (window.console) {
114941
            window.console.groupEnd && window.console.groupEnd();
114942
        }
114943
    };
114944
    Object.defineProperty(BrowserDomAdapter.prototype, "attrToPropMap", {
114945
        get: function () { return _attrToPropMap; },
114946
        enumerable: true,
114947
        configurable: true
114948
    });
114949
    BrowserDomAdapter.prototype.contains = function (nodeA, nodeB) { return nodeContains.call(nodeA, nodeB); };
114950
    BrowserDomAdapter.prototype.querySelector = function (el, selector) { return el.querySelector(selector); };
114951
    BrowserDomAdapter.prototype.querySelectorAll = function (el, selector) { return el.querySelectorAll(selector); };
114952
    BrowserDomAdapter.prototype.on = function (el, evt, listener) { el.addEventListener(evt, listener, false); };
114953
    BrowserDomAdapter.prototype.onAndCancel = function (el, evt, listener) {
114954
        el.addEventListener(evt, listener, false);
114955
        // Needed to follow Dart's subscription semantic, until fix of
114956
        // https://code.google.com/p/dart/issues/detail?id=17406
114957
        return function () { el.removeEventListener(evt, listener, false); };
114958
    };
114959
    BrowserDomAdapter.prototype.dispatchEvent = function (el, evt) { el.dispatchEvent(evt); };
114960
    BrowserDomAdapter.prototype.createMouseEvent = function (eventType) {
114961
        var evt = this.getDefaultDocument().createEvent('MouseEvent');
114962
        evt.initEvent(eventType, true, true);
114963
        return evt;
114964
    };
114965
    BrowserDomAdapter.prototype.createEvent = function (eventType) {
114966
        var evt = this.getDefaultDocument().createEvent('Event');
114967
        evt.initEvent(eventType, true, true);
114968
        return evt;
114969
    };
114970
    BrowserDomAdapter.prototype.preventDefault = function (evt) {
114971
        evt.preventDefault();
114972
        evt.returnValue = false;
114973
    };
114974
    BrowserDomAdapter.prototype.isPrevented = function (evt) {
114975
        return evt.defaultPrevented || evt.returnValue != null && !evt.returnValue;
114976
    };
114977
    BrowserDomAdapter.prototype.getInnerHTML = function (el) { return el.innerHTML; };
114978
    BrowserDomAdapter.prototype.getTemplateContent = function (el) {
114979
        return 'content' in el && this.isTemplateElement(el) ? el.content : null;
114980
    };
114981
    BrowserDomAdapter.prototype.getOuterHTML = function (el) { return el.outerHTML; };
114982
    BrowserDomAdapter.prototype.nodeName = function (node) { return node.nodeName; };
114983
    BrowserDomAdapter.prototype.nodeValue = function (node) { return node.nodeValue; };
114984
    BrowserDomAdapter.prototype.type = function (node) { return node.type; };
114985
    BrowserDomAdapter.prototype.content = function (node) {
114986
        if (this.hasProperty(node, 'content')) {
114987
            return node.content;
114988
        }
114989
        else {
114990
            return node;
114991
        }
114992
    };
114993
    BrowserDomAdapter.prototype.firstChild = function (el) { return el.firstChild; };
114994
    BrowserDomAdapter.prototype.nextSibling = function (el) { return el.nextSibling; };
114995
    BrowserDomAdapter.prototype.parentElement = function (el) { return el.parentNode; };
114996
    BrowserDomAdapter.prototype.childNodes = function (el) { return el.childNodes; };
114997
    BrowserDomAdapter.prototype.childNodesAsList = function (el) {
114998
        var childNodes = el.childNodes;
114999
        var res = new Array(childNodes.length);
115000
        for (var i = 0; i < childNodes.length; i++) {
115001
            res[i] = childNodes[i];
115002
        }
115003
        return res;
115004
    };
115005
    BrowserDomAdapter.prototype.clearNodes = function (el) {
115006
        while (el.firstChild) {
115007
            el.removeChild(el.firstChild);
115008
        }
115009
    };
115010
    BrowserDomAdapter.prototype.appendChild = function (el, node) { el.appendChild(node); };
115011
    BrowserDomAdapter.prototype.removeChild = function (el, node) { el.removeChild(node); };
115012
    BrowserDomAdapter.prototype.replaceChild = function (el, newChild, oldChild) { el.replaceChild(newChild, oldChild); };
115013
    BrowserDomAdapter.prototype.remove = function (node) {
115014
        if (node.parentNode) {
115015
            node.parentNode.removeChild(node);
115016
        }
115017
        return node;
115018
    };
115019
    BrowserDomAdapter.prototype.insertBefore = function (parent, ref, node) { parent.insertBefore(node, ref); };
115020
    BrowserDomAdapter.prototype.insertAllBefore = function (parent, ref, nodes) {
115021
        nodes.forEach(function (n) { return parent.insertBefore(n, ref); });
115022
    };
115023
    BrowserDomAdapter.prototype.insertAfter = function (parent, ref, node) { parent.insertBefore(node, ref.nextSibling); };
115024
    BrowserDomAdapter.prototype.setInnerHTML = function (el, value) { el.innerHTML = value; };
115025
    BrowserDomAdapter.prototype.getText = function (el) { return el.textContent; };
115026
    BrowserDomAdapter.prototype.setText = function (el, value) { el.textContent = value; };
115027
    BrowserDomAdapter.prototype.getValue = function (el) { return el.value; };
115028
    BrowserDomAdapter.prototype.setValue = function (el, value) { el.value = value; };
115029
    BrowserDomAdapter.prototype.getChecked = function (el) { return el.checked; };
115030
    BrowserDomAdapter.prototype.setChecked = function (el, value) { el.checked = value; };
115031
    BrowserDomAdapter.prototype.createComment = function (text) { return this.getDefaultDocument().createComment(text); };
115032
    BrowserDomAdapter.prototype.createTemplate = function (html) {
115033
        var t = this.getDefaultDocument().createElement('template');
115034
        t.innerHTML = html;
115035
        return t;
115036
    };
115037
    BrowserDomAdapter.prototype.createElement = function (tagName, doc) {
115038
        doc = doc || this.getDefaultDocument();
115039
        return doc.createElement(tagName);
115040
    };
115041
    BrowserDomAdapter.prototype.createElementNS = function (ns, tagName, doc) {
115042
        doc = doc || this.getDefaultDocument();
115043
        return doc.createElementNS(ns, tagName);
115044
    };
115045
    BrowserDomAdapter.prototype.createTextNode = function (text, doc) {
115046
        doc = doc || this.getDefaultDocument();
115047
        return doc.createTextNode(text);
115048
    };
115049
    BrowserDomAdapter.prototype.createScriptTag = function (attrName, attrValue, doc) {
115050
        doc = doc || this.getDefaultDocument();
115051
        var el = doc.createElement('SCRIPT');
115052
        el.setAttribute(attrName, attrValue);
115053
        return el;
115054
    };
115055
    BrowserDomAdapter.prototype.createStyleElement = function (css, doc) {
115056
        doc = doc || this.getDefaultDocument();
115057
        var style = doc.createElement('style');
115058
        this.appendChild(style, this.createTextNode(css, doc));
115059
        return style;
115060
    };
115061
    BrowserDomAdapter.prototype.createShadowRoot = function (el) { return el.createShadowRoot(); };
115062
    BrowserDomAdapter.prototype.getShadowRoot = function (el) { return el.shadowRoot; };
115063
    BrowserDomAdapter.prototype.getHost = function (el) { return el.host; };
115064
    BrowserDomAdapter.prototype.clone = function (node) { return node.cloneNode(true); };
115065
    BrowserDomAdapter.prototype.getElementsByClassName = function (element, name) {
115066
        return element.getElementsByClassName(name);
115067
    };
115068
    BrowserDomAdapter.prototype.getElementsByTagName = function (element, name) {
115069
        return element.getElementsByTagName(name);
115070
    };
115071
    BrowserDomAdapter.prototype.classList = function (element) { return Array.prototype.slice.call(element.classList, 0); };
115072
    BrowserDomAdapter.prototype.addClass = function (element, className) { element.classList.add(className); };
115073
    BrowserDomAdapter.prototype.removeClass = function (element, className) { element.classList.remove(className); };
115074
    BrowserDomAdapter.prototype.hasClass = function (element, className) {
115075
        return element.classList.contains(className);
115076
    };
115077
    BrowserDomAdapter.prototype.setStyle = function (element, styleName, styleValue) {
115078
        element.style[styleName] = styleValue;
115079
    };
115080
    BrowserDomAdapter.prototype.removeStyle = function (element, stylename) {
115081
        // IE requires '' instead of null
115082
        // see https://github.com/angular/angular/issues/7916
115083
        element.style[stylename] = '';
115084
    };
115085
    BrowserDomAdapter.prototype.getStyle = function (element, stylename) { return element.style[stylename]; };
115086
    BrowserDomAdapter.prototype.hasStyle = function (element, styleName, styleValue) {
115087
        var value = this.getStyle(element, styleName) || '';
115088
        return styleValue ? value == styleValue : value.length > 0;
115089
    };
115090
    BrowserDomAdapter.prototype.tagName = function (element) { return element.tagName; };
115091
    BrowserDomAdapter.prototype.attributeMap = function (element) {
115092
        var res = new Map();
115093
        var elAttrs = element.attributes;
115094
        for (var i = 0; i < elAttrs.length; i++) {
115095
            var attrib = elAttrs.item(i);
115096
            res.set(attrib.name, attrib.value);
115097
        }
115098
        return res;
115099
    };
115100
    BrowserDomAdapter.prototype.hasAttribute = function (element, attribute) {
115101
        return element.hasAttribute(attribute);
115102
    };
115103
    BrowserDomAdapter.prototype.hasAttributeNS = function (element, ns, attribute) {
115104
        return element.hasAttributeNS(ns, attribute);
115105
    };
115106
    BrowserDomAdapter.prototype.getAttribute = function (element, attribute) {
115107
        return element.getAttribute(attribute);
115108
    };
115109
    BrowserDomAdapter.prototype.getAttributeNS = function (element, ns, name) {
115110
        return element.getAttributeNS(ns, name);
115111
    };
115112
    BrowserDomAdapter.prototype.setAttribute = function (element, name, value) { element.setAttribute(name, value); };
115113
    BrowserDomAdapter.prototype.setAttributeNS = function (element, ns, name, value) {
115114
        element.setAttributeNS(ns, name, value);
115115
    };
115116
    BrowserDomAdapter.prototype.removeAttribute = function (element, attribute) { element.removeAttribute(attribute); };
115117
    BrowserDomAdapter.prototype.removeAttributeNS = function (element, ns, name) {
115118
        element.removeAttributeNS(ns, name);
115119
    };
115120
    BrowserDomAdapter.prototype.templateAwareRoot = function (el) { return this.isTemplateElement(el) ? this.content(el) : el; };
115121
    BrowserDomAdapter.prototype.createHtmlDocument = function () {
115122
        return document.implementation.createHTMLDocument('fakeTitle');
115123
    };
115124
    BrowserDomAdapter.prototype.getDefaultDocument = function () { return document; };
115125
    BrowserDomAdapter.prototype.getBoundingClientRect = function (el) {
115126
        try {
115127
            return el.getBoundingClientRect();
115128
        }
115129
        catch (e) {
115130
            return { top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 };
115131
        }
115132
    };
115133
    BrowserDomAdapter.prototype.getTitle = function (doc) { return doc.title; };
115134
    BrowserDomAdapter.prototype.setTitle = function (doc, newTitle) { doc.title = newTitle || ''; };
115135
    BrowserDomAdapter.prototype.elementMatches = function (n, selector) {
115136
        if (this.isElementNode(n)) {
115137
            return n.matches && n.matches(selector) ||
115138
                n.msMatchesSelector && n.msMatchesSelector(selector) ||
115139
                n.webkitMatchesSelector && n.webkitMatchesSelector(selector);
115140
        }
115141
        return false;
115142
    };
115143
    BrowserDomAdapter.prototype.isTemplateElement = function (el) {
115144
        return this.isElementNode(el) && el.nodeName === 'TEMPLATE';
115145
    };
115146
    BrowserDomAdapter.prototype.isTextNode = function (node) { return node.nodeType === Node.TEXT_NODE; };
115147
    BrowserDomAdapter.prototype.isCommentNode = function (node) { return node.nodeType === Node.COMMENT_NODE; };
115148
    BrowserDomAdapter.prototype.isElementNode = function (node) { return node.nodeType === Node.ELEMENT_NODE; };
115149
    BrowserDomAdapter.prototype.hasShadowRoot = function (node) {
115150
        return node.shadowRoot != null && node instanceof HTMLElement;
115151
    };
115152
    BrowserDomAdapter.prototype.isShadowRoot = function (node) { return node instanceof DocumentFragment; };
115153
    BrowserDomAdapter.prototype.importIntoDoc = function (node) { return document.importNode(this.templateAwareRoot(node), true); };
115154
    BrowserDomAdapter.prototype.adoptNode = function (node) { return document.adoptNode(node); };
115155
    BrowserDomAdapter.prototype.getHref = function (el) { return el.getAttribute('href'); };
115156
    BrowserDomAdapter.prototype.getEventKey = function (event) {
115157
        var key = event.key;
115158
        if (key == null) {
115159
            key = event.keyIdentifier;
115160
            // keyIdentifier is defined in the old draft of DOM Level 3 Events implemented by Chrome and
115161
            // Safari cf
115162
            // http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071221/events.html#Events-KeyboardEvents-Interfaces
115163
            if (key == null) {
115164
                return 'Unidentified';
115165
            }
115166
            if (key.startsWith('U+')) {
115167
                key = String.fromCharCode(parseInt(key.substring(2), 16));
115168
                if (event.location === DOM_KEY_LOCATION_NUMPAD && _chromeNumKeyPadMap.hasOwnProperty(key)) {
115169
                    // There is a bug in Chrome for numeric keypad keys:
115170
                    // https://code.google.com/p/chromium/issues/detail?id=155654
115171
                    // 1, 2, 3 ... are reported as A, B, C ...
115172
                    key = _chromeNumKeyPadMap[key];
115173
                }
115174
            }
115175
        }
115176
        return _keyMap[key] || key;
115177
    };
115178
    BrowserDomAdapter.prototype.getGlobalEventTarget = function (doc, target) {
115179
        if (target === 'window') {
115180
            return window;
115181
        }
115182
        if (target === 'document') {
115183
            return doc;
115184
        }
115185
        if (target === 'body') {
115186
            return doc.body;
115187
        }
115188
        return null;
115189
    };
115190
    BrowserDomAdapter.prototype.getHistory = function () { return window.history; };
115191
    BrowserDomAdapter.prototype.getLocation = function () { return window.location; };
115192
    BrowserDomAdapter.prototype.getBaseHref = function (doc) {
115193
        var href = getBaseElementHref();
115194
        return href == null ? null : relativePath(href);
115195
    };
115196
    BrowserDomAdapter.prototype.resetBaseElement = function () { baseElement = null; };
115197
    BrowserDomAdapter.prototype.getUserAgent = function () { return window.navigator.userAgent; };
115198
    BrowserDomAdapter.prototype.setData = function (element, name, value) {
115199
        this.setAttribute(element, 'data-' + name, value);
115200
    };
115201
    BrowserDomAdapter.prototype.getData = function (element, name) {
115202
        return this.getAttribute(element, 'data-' + name);
115203
    };
115204
    BrowserDomAdapter.prototype.getComputedStyle = function (element) { return getComputedStyle(element); };
115205
    // TODO(tbosch): move this into a separate environment class once we have it
115206
    // TODO(tbosch): move this into a separate environment class once we have it
115207
    BrowserDomAdapter.prototype.supportsWebAnimation =
115208
    // TODO(tbosch): move this into a separate environment class once we have it
115209
    function () {
115210
        return typeof Element.prototype['animate'] === 'function';
115211
    };
115212
    BrowserDomAdapter.prototype.performanceNow = function () {
115213
        // performance.now() is not available in all browsers, see
115214
        // http://caniuse.com/#search=performance.now
115215
        return window.performance && window.performance.now ? window.performance.now() :
115216
            new Date().getTime();
115217
    };
115218
    BrowserDomAdapter.prototype.supportsCookies = function () { return true; };
115219
    BrowserDomAdapter.prototype.getCookie = function (name) { return Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵparseCookieValue"])(document.cookie, name); };
115220
    BrowserDomAdapter.prototype.setCookie = function (name, value) {
115221
        // document.cookie is magical, assigning into it assigns/overrides one cookie value, but does
115222
        // not clear other cookies.
115223
        document.cookie = encodeURIComponent(name) + '=' + encodeURIComponent(value);
115224
    };
115225
    return BrowserDomAdapter;
115226
}(GenericBrowserDomAdapter));
115227
var baseElement = null;
115228
function getBaseElementHref() {
115229
    if (!baseElement) {
115230
        baseElement = (document.querySelector('base'));
115231
        if (!baseElement) {
115232
            return null;
115233
        }
115234
    }
115235
    return baseElement.getAttribute('href');
115236
}
115237
// based on urlUtils.js in AngularJS 1
115238
var urlParsingNode;
115239
function relativePath(url) {
115240
    if (!urlParsingNode) {
115241
        urlParsingNode = document.createElement('a');
115242
    }
115243
    urlParsingNode.setAttribute('href', url);
115244
    return (urlParsingNode.pathname.charAt(0) === '/') ? urlParsingNode.pathname :
115245
        '/' + urlParsingNode.pathname;
115246
}
115247
 
115248
/**
115249
 * @license
115250
 * Copyright Google Inc. All Rights Reserved.
115251
 *
115252
 * Use of this source code is governed by an MIT-style license that can be
115253
 * found in the LICENSE file at https://angular.io/license
115254
 */
115255
/**
115256
 * A DI Token representing the main rendering context. In a browser this is the DOM Document.
115257
 *
115258
 * Note: Document might not be available in the Application Context when Application and Rendering
115259
 * Contexts are not the same (e.g. when running the application into a Web Worker).
115260
 *
115261
 * @deprecated import from `@angular/common` instead.
115262
 */
115263
var DOCUMENT$1 = _angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"];
115264
 
115265
/**
115266
 * @license
115267
 * Copyright Google Inc. All Rights Reserved.
115268
 *
115269
 * Use of this source code is governed by an MIT-style license that can be
115270
 * found in the LICENSE file at https://angular.io/license
115271
 */
115272
function supportsState() {
115273
    return !!window.history.pushState;
115274
}
115275
 
115276
/**
115277
 * @license
115278
 * Copyright Google Inc. All Rights Reserved.
115279
 *
115280
 * Use of this source code is governed by an MIT-style license that can be
115281
 * found in the LICENSE file at https://angular.io/license
115282
 */
115283
/**
115284
 * `PlatformLocation` encapsulates all of the direct calls to platform APIs.
115285
 * This class should not be used directly by an application developer. Instead, use
115286
 * {@link Location}.
115287
 */
115288
var BrowserPlatformLocation = /** @class */ (function (_super) {
115289
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(BrowserPlatformLocation, _super);
115290
    function BrowserPlatformLocation(_doc) {
115291
        var _this = _super.call(this) || this;
115292
        _this._doc = _doc;
115293
        _this._init();
115294
        return _this;
115295
    }
115296
    // This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it
115297
    /** @internal */
115298
    // This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it
115299
    /** @internal */
115300
    BrowserPlatformLocation.prototype._init =
115301
    // This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it
115302
    /** @internal */
115303
    function () {
115304
        this.location = getDOM().getLocation();
115305
        this._history = getDOM().getHistory();
115306
    };
115307
    BrowserPlatformLocation.prototype.getBaseHrefFromDOM = function () { return getDOM().getBaseHref(this._doc); };
115308
    BrowserPlatformLocation.prototype.onPopState = function (fn) {
115309
        getDOM().getGlobalEventTarget(this._doc, 'window').addEventListener('popstate', fn, false);
115310
    };
115311
    BrowserPlatformLocation.prototype.onHashChange = function (fn) {
115312
        getDOM().getGlobalEventTarget(this._doc, 'window').addEventListener('hashchange', fn, false);
115313
    };
115314
    Object.defineProperty(BrowserPlatformLocation.prototype, "pathname", {
115315
        get: function () { return this.location.pathname; },
115316
        set: function (newPath) { this.location.pathname = newPath; },
115317
        enumerable: true,
115318
        configurable: true
115319
    });
115320
    Object.defineProperty(BrowserPlatformLocation.prototype, "search", {
115321
        get: function () { return this.location.search; },
115322
        enumerable: true,
115323
        configurable: true
115324
    });
115325
    Object.defineProperty(BrowserPlatformLocation.prototype, "hash", {
115326
        get: function () { return this.location.hash; },
115327
        enumerable: true,
115328
        configurable: true
115329
    });
115330
    BrowserPlatformLocation.prototype.pushState = function (state, title, url) {
115331
        if (supportsState()) {
115332
            this._history.pushState(state, title, url);
115333
        }
115334
        else {
115335
            this.location.hash = url;
115336
        }
115337
    };
115338
    BrowserPlatformLocation.prototype.replaceState = function (state, title, url) {
115339
        if (supportsState()) {
115340
            this._history.replaceState(state, title, url);
115341
        }
115342
        else {
115343
            this.location.hash = url;
115344
        }
115345
    };
115346
    BrowserPlatformLocation.prototype.forward = function () { this._history.forward(); };
115347
    BrowserPlatformLocation.prototype.back = function () { this._history.back(); };
115348
    BrowserPlatformLocation.decorators = [
115349
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }
115350
    ];
115351
    /** @nocollapse */
115352
    BrowserPlatformLocation.ctorParameters = function () { return [
115353
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [DOCUMENT$1,] },] },
115354
    ]; };
115355
    return BrowserPlatformLocation;
115356
}(_angular_common__WEBPACK_IMPORTED_MODULE_0__["PlatformLocation"]));
115357
 
115358
/**
115359
 * @license
115360
 * Copyright Google Inc. All Rights Reserved.
115361
 *
115362
 * Use of this source code is governed by an MIT-style license that can be
115363
 * found in the LICENSE file at https://angular.io/license
115364
 */
115365
/**
115366
 * A service that can be used to get and add meta tags.
115367
 *
115368
 * @experimental
115369
 */
115370
var Meta = /** @class */ (function () {
115371
    function Meta(_doc) {
115372
        this._doc = _doc;
115373
        this._dom = getDOM();
115374
    }
115375
    Meta.prototype.addTag = function (tag, forceCreation) {
115376
        if (forceCreation === void 0) { forceCreation = false; }
115377
        if (!tag)
115378
            return null;
115379
        return this._getOrCreateElement(tag, forceCreation);
115380
    };
115381
    Meta.prototype.addTags = function (tags, forceCreation) {
115382
        var _this = this;
115383
        if (forceCreation === void 0) { forceCreation = false; }
115384
        if (!tags)
115385
            return [];
115386
        return tags.reduce(function (result, tag) {
115387
            if (tag) {
115388
                result.push(_this._getOrCreateElement(tag, forceCreation));
115389
            }
115390
            return result;
115391
        }, []);
115392
    };
115393
    Meta.prototype.getTag = function (attrSelector) {
115394
        if (!attrSelector)
115395
            return null;
115396
        return this._dom.querySelector(this._doc, "meta[" + attrSelector + "]") || null;
115397
    };
115398
    Meta.prototype.getTags = function (attrSelector) {
115399
        if (!attrSelector)
115400
            return [];
115401
        var list = this._dom.querySelectorAll(this._doc, "meta[" + attrSelector + "]");
115402
        return list ? [].slice.call(list) : [];
115403
    };
115404
    Meta.prototype.updateTag = function (tag, selector) {
115405
        if (!tag)
115406
            return null;
115407
        selector = selector || this._parseSelector(tag);
115408
        var meta = (this.getTag(selector));
115409
        if (meta) {
115410
            return this._setMetaElementAttributes(tag, meta);
115411
        }
115412
        return this._getOrCreateElement(tag, true);
115413
    };
115414
    Meta.prototype.removeTag = function (attrSelector) { this.removeTagElement((this.getTag(attrSelector))); };
115415
    Meta.prototype.removeTagElement = function (meta) {
115416
        if (meta) {
115417
            this._dom.remove(meta);
115418
        }
115419
    };
115420
    Meta.prototype._getOrCreateElement = function (meta, forceCreation) {
115421
        if (forceCreation === void 0) { forceCreation = false; }
115422
        if (!forceCreation) {
115423
            var selector = this._parseSelector(meta);
115424
            var elem = (this.getTag(selector));
115425
            // It's allowed to have multiple elements with the same name so it's not enough to
115426
            // just check that element with the same name already present on the page. We also need to
115427
            // check if element has tag attributes
115428
            if (elem && this._containsAttributes(meta, elem))
115429
                return elem;
115430
        }
115431
        var element = this._dom.createElement('meta');
115432
        this._setMetaElementAttributes(meta, element);
115433
        var head = this._dom.getElementsByTagName(this._doc, 'head')[0];
115434
        this._dom.appendChild(head, element);
115435
        return element;
115436
    };
115437
    Meta.prototype._setMetaElementAttributes = function (tag, el) {
115438
        var _this = this;
115439
        Object.keys(tag).forEach(function (prop) { return _this._dom.setAttribute(el, prop, tag[prop]); });
115440
        return el;
115441
    };
115442
    Meta.prototype._parseSelector = function (tag) {
115443
        var attr = tag.name ? 'name' : 'property';
115444
        return attr + "=\"" + tag[attr] + "\"";
115445
    };
115446
    Meta.prototype._containsAttributes = function (tag, elem) {
115447
        var _this = this;
115448
        return Object.keys(tag).every(function (key) { return _this._dom.getAttribute(elem, key) === tag[key]; });
115449
    };
115450
    Meta.decorators = [
115451
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }
115452
    ];
115453
    /** @nocollapse */
115454
    Meta.ctorParameters = function () { return [
115455
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [DOCUMENT$1,] },] },
115456
    ]; };
115457
    return Meta;
115458
}());
115459
 
115460
/**
115461
 * @license
115462
 * Copyright Google Inc. All Rights Reserved.
115463
 *
115464
 * Use of this source code is governed by an MIT-style license that can be
115465
 * found in the LICENSE file at https://angular.io/license
115466
 */
115467
/**
115468
 * An id that identifies a particular application being bootstrapped, that should
115469
 * match across the client/server boundary.
115470
 */
115471
var TRANSITION_ID = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('TRANSITION_ID');
115472
function appInitializerFactory(transitionId, document, injector) {
115473
    return function () {
115474
        // Wait for all application initializers to be completed before removing the styles set by
115475
        // the server.
115476
        injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationInitStatus"]).donePromise.then(function () {
115477
            var dom = getDOM();
115478
            var styles = Array.prototype.slice.apply(dom.querySelectorAll(document, "style[ng-transition]"));
115479
            styles.filter(function (el) { return dom.getAttribute(el, 'ng-transition') === transitionId; })
115480
                .forEach(function (el) { return dom.remove(el); });
115481
        });
115482
    };
115483
}
115484
var SERVER_TRANSITION_PROVIDERS = [
115485
    {
115486
        provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_INITIALIZER"],
115487
        useFactory: appInitializerFactory,
115488
        deps: [TRANSITION_ID, DOCUMENT$1, _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]],
115489
        multi: true
115490
    },
115491
];
115492
 
115493
/**
115494
 * @license
115495
 * Copyright Google Inc. All Rights Reserved.
115496
 *
115497
 * Use of this source code is governed by an MIT-style license that can be
115498
 * found in the LICENSE file at https://angular.io/license
115499
 */
115500
var BrowserGetTestability = /** @class */ (function () {
115501
    function BrowserGetTestability() {
115502
    }
115503
    BrowserGetTestability.init = function () { Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["setTestabilityGetter"])(new BrowserGetTestability()); };
115504
    BrowserGetTestability.prototype.addToWindow = function (registry) {
115505
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['getAngularTestability'] = function (elem, findInAncestors) {
115506
            if (findInAncestors === void 0) { findInAncestors = true; }
115507
            var testability = registry.findTestabilityInTree(elem, findInAncestors);
115508
            if (testability == null) {
115509
                throw new Error('Could not find testability for element.');
115510
            }
115511
            return testability;
115512
        };
115513
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['getAllAngularTestabilities'] = function () { return registry.getAllTestabilities(); };
115514
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['getAllAngularRootElements'] = function () { return registry.getAllRootElements(); };
115515
        var whenAllStable = function (callback /** TODO #9100 */) {
115516
            var testabilities = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['getAllAngularTestabilities']();
115517
            var count = testabilities.length;
115518
            var didWork = false;
115519
            var decrement = function (didWork_ /** TODO #9100 */) {
115520
                didWork = didWork || didWork_;
115521
                count--;
115522
                if (count == 0) {
115523
                    callback(didWork);
115524
                }
115525
            };
115526
            testabilities.forEach(function (testability /** TODO #9100 */) {
115527
                testability.whenStable(decrement);
115528
            });
115529
        };
115530
        if (!_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['frameworkStabilizers']) {
115531
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['frameworkStabilizers'] = [];
115532
        }
115533
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['frameworkStabilizers'].push(whenAllStable);
115534
    };
115535
    BrowserGetTestability.prototype.findTestabilityInTree = function (registry, elem, findInAncestors) {
115536
        if (elem == null) {
115537
            return null;
115538
        }
115539
        var t = registry.getTestability(elem);
115540
        if (t != null) {
115541
            return t;
115542
        }
115543
        else if (!findInAncestors) {
115544
            return null;
115545
        }
115546
        if (getDOM().isShadowRoot(elem)) {
115547
            return this.findTestabilityInTree(registry, getDOM().getHost(elem), true);
115548
        }
115549
        return this.findTestabilityInTree(registry, getDOM().parentElement(elem), true);
115550
    };
115551
    return BrowserGetTestability;
115552
}());
115553
 
115554
/**
115555
 * @license
115556
 * Copyright Google Inc. All Rights Reserved.
115557
 *
115558
 * Use of this source code is governed by an MIT-style license that can be
115559
 * found in the LICENSE file at https://angular.io/license
115560
 */
115561
/**
115562
 * A service that can be used to get and set the title of a current HTML document.
115563
 *
115564
 * Since an Angular application can't be bootstrapped on the entire HTML document (`<html>` tag)
115565
 * it is not possible to bind to the `text` property of the `HTMLTitleElement` elements
115566
 * (representing the `<title>` tag). Instead, this service can be used to set and get the current
115567
 * title value.
115568
 *
115569
 * @experimental
115570
 */
115571
var Title = /** @class */ (function () {
115572
    function Title(_doc) {
115573
        this._doc = _doc;
115574
    }
115575
    /**
115576
     * Get the title of the current HTML document.
115577
     */
115578
    /**
115579
       * Get the title of the current HTML document.
115580
       */
115581
    Title.prototype.getTitle = /**
115582
       * Get the title of the current HTML document.
115583
       */
115584
    function () { return getDOM().getTitle(this._doc); };
115585
    /**
115586
     * Set the title of the current HTML document.
115587
     * @param newTitle
115588
     */
115589
    /**
115590
       * Set the title of the current HTML document.
115591
       * @param newTitle
115592
       */
115593
    Title.prototype.setTitle = /**
115594
       * Set the title of the current HTML document.
115595
       * @param newTitle
115596
       */
115597
    function (newTitle) { getDOM().setTitle(this._doc, newTitle); };
115598
    Title.decorators = [
115599
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }
115600
    ];
115601
    /** @nocollapse */
115602
    Title.ctorParameters = function () { return [
115603
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [DOCUMENT$1,] },] },
115604
    ]; };
115605
    return Title;
115606
}());
115607
 
115608
/**
115609
 * @license
115610
 * Copyright Google Inc. All Rights Reserved.
115611
 *
115612
 * Use of this source code is governed by an MIT-style license that can be
115613
 * found in the LICENSE file at https://angular.io/license
115614
 */
115615
 
115616
 
115617
/**
115618
 * Exports the value under a given `name` in the global property `ng`. For example `ng.probe` if
115619
 * `name` is `'probe'`.
115620
 * @param name Name under which it will be exported. Keep in mind this will be a property of the
115621
 * global `ng` object.
115622
 * @param value The value to export.
115623
 */
115624
function exportNgVar(name, value) {
115625
    if (typeof COMPILED === 'undefined' || !COMPILED) {
115626
        // Note: we can't export `ng` when using closure enhanced optimization as:
115627
        // - closure declares globals itself for minified names, which sometimes clobber our `ng` global
115628
        // - we can't declare a closure extern as the namespace `ng` is already used within Google
115629
        //   for typings for angularJS (via `goog.provide('ng....')`).
115630
        var ng = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['ng'] = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['ng'] || {};
115631
        ng[name] = value;
115632
    }
115633
}
115634
 
115635
/**
115636
 * @license
115637
 * Copyright Google Inc. All Rights Reserved.
115638
 *
115639
 * Use of this source code is governed by an MIT-style license that can be
115640
 * found in the LICENSE file at https://angular.io/license
115641
 */
115642
var CORE_TOKENS = {
115643
    'ApplicationRef': _angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationRef"],
115644
    'NgZone': _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"],
115645
};
115646
var INSPECT_GLOBAL_NAME = 'probe';
115647
var CORE_TOKENS_GLOBAL_NAME = 'coreTokens';
115648
/**
115649
 * Returns a {@link DebugElement} for the given native DOM element, or
115650
 * null if the given native element does not have an Angular view associated
115651
 * with it.
115652
 */
115653
function inspectNativeElement(element) {
115654
    return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["getDebugNode"])(element);
115655
}
115656
function _createNgProbe(coreTokens) {
115657
    exportNgVar(INSPECT_GLOBAL_NAME, inspectNativeElement);
115658
    exportNgVar(CORE_TOKENS_GLOBAL_NAME, Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__assign"])({}, CORE_TOKENS, _ngProbeTokensToMap(coreTokens || [])));
115659
    return function () { return inspectNativeElement; };
115660
}
115661
function _ngProbeTokensToMap(tokens) {
115662
    return tokens.reduce(function (prev, t) { return (prev[t.name] = t.token, prev); }, {});
115663
}
115664
/**
115665
 * Providers which support debugging Angular applications (e.g. via `ng.probe`).
115666
 */
115667
var ELEMENT_PROBE_PROVIDERS = [
115668
    {
115669
        provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_INITIALIZER"],
115670
        useFactory: _createNgProbe,
115671
        deps: [
115672
            [_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgProbeToken"], new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]()],
115673
        ],
115674
        multi: true,
115675
    },
115676
];
115677
 
115678
/**
115679
 * @license
115680
 * Copyright Google Inc. All Rights Reserved.
115681
 *
115682
 * Use of this source code is governed by an MIT-style license that can be
115683
 * found in the LICENSE file at https://angular.io/license
115684
 */
115685
/**
115686
 * The injection token for the event-manager plug-in service.
115687
 */
115688
var EVENT_MANAGER_PLUGINS = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('EventManagerPlugins');
115689
/**
115690
 * An injectable service that provides event management for Angular
115691
 * through a browser plug-in.
115692
 */
115693
var EventManager = /** @class */ (function () {
115694
    /**
115695
     * Initializes an instance of the event-manager service.
115696
     */
115697
    function EventManager(plugins, _zone) {
115698
        var _this = this;
115699
        this._zone = _zone;
115700
        this._eventNameToPlugin = new Map();
115701
        plugins.forEach(function (p) { return p.manager = _this; });
115702
        this._plugins = plugins.slice().reverse();
115703
    }
115704
    /**
115705
     * Registers a handler for a specific element and event.
115706
     *
115707
     * @param element The HTML element to receive event notifications.
115708
     * @param eventName The name of the event to listen for.
115709
     * @param handler A function to call when the notification occurs. Receives the
115710
     * event object as an argument.
115711
     * @returns  A callback function that can be used to remove the handler.
115712
     */
115713
    /**
115714
       * Registers a handler for a specific element and event.
115715
       *
115716
       * @param element The HTML element to receive event notifications.
115717
       * @param eventName The name of the event to listen for.
115718
       * @param handler A function to call when the notification occurs. Receives the
115719
       * event object as an argument.
115720
       * @returns  A callback function that can be used to remove the handler.
115721
       */
115722
    EventManager.prototype.addEventListener = /**
115723
       * Registers a handler for a specific element and event.
115724
       *
115725
       * @param element The HTML element to receive event notifications.
115726
       * @param eventName The name of the event to listen for.
115727
       * @param handler A function to call when the notification occurs. Receives the
115728
       * event object as an argument.
115729
       * @returns  A callback function that can be used to remove the handler.
115730
       */
115731
    function (element, eventName, handler) {
115732
        var plugin = this._findPluginFor(eventName);
115733
        return plugin.addEventListener(element, eventName, handler);
115734
    };
115735
    /**
115736
     * Registers a global handler for an event in a target view.
115737
     *
115738
     * @param target A target for global event notifications. One of "window", "document", or "body".
115739
     * @param eventName The name of the event to listen for.
115740
     * @param handler A function to call when the notification occurs. Receives the
115741
     * event object as an argument.
115742
     * @returns A callback function that can be used to remove the handler.
115743
     */
115744
    /**
115745
       * Registers a global handler for an event in a target view.
115746
       *
115747
       * @param target A target for global event notifications. One of "window", "document", or "body".
115748
       * @param eventName The name of the event to listen for.
115749
       * @param handler A function to call when the notification occurs. Receives the
115750
       * event object as an argument.
115751
       * @returns A callback function that can be used to remove the handler.
115752
       */
115753
    EventManager.prototype.addGlobalEventListener = /**
115754
       * Registers a global handler for an event in a target view.
115755
       *
115756
       * @param target A target for global event notifications. One of "window", "document", or "body".
115757
       * @param eventName The name of the event to listen for.
115758
       * @param handler A function to call when the notification occurs. Receives the
115759
       * event object as an argument.
115760
       * @returns A callback function that can be used to remove the handler.
115761
       */
115762
    function (target, eventName, handler) {
115763
        var plugin = this._findPluginFor(eventName);
115764
        return plugin.addGlobalEventListener(target, eventName, handler);
115765
    };
115766
    /**
115767
     * Retrieves the compilation zone in which event listeners are registered.
115768
     */
115769
    /**
115770
       * Retrieves the compilation zone in which event listeners are registered.
115771
       */
115772
    EventManager.prototype.getZone = /**
115773
       * Retrieves the compilation zone in which event listeners are registered.
115774
       */
115775
    function () { return this._zone; };
115776
    /** @internal */
115777
    /** @internal */
115778
    EventManager.prototype._findPluginFor = /** @internal */
115779
    function (eventName) {
115780
        var plugin = this._eventNameToPlugin.get(eventName);
115781
        if (plugin) {
115782
            return plugin;
115783
        }
115784
        var plugins = this._plugins;
115785
        for (var i = 0; i < plugins.length; i++) {
115786
            var plugin_1 = plugins[i];
115787
            if (plugin_1.supports(eventName)) {
115788
                this._eventNameToPlugin.set(eventName, plugin_1);
115789
                return plugin_1;
115790
            }
115791
        }
115792
        throw new Error("No event manager plugin found for event " + eventName);
115793
    };
115794
    EventManager.decorators = [
115795
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }
115796
    ];
115797
    /** @nocollapse */
115798
    EventManager.ctorParameters = function () { return [
115799
        { type: Array, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [EVENT_MANAGER_PLUGINS,] },] },
115800
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"], },
115801
    ]; };
115802
    return EventManager;
115803
}());
115804
var EventManagerPlugin = /** @class */ (function () {
115805
    function EventManagerPlugin(_doc) {
115806
        this._doc = _doc;
115807
    }
115808
    EventManagerPlugin.prototype.addGlobalEventListener = function (element, eventName, handler) {
115809
        var target = getDOM().getGlobalEventTarget(this._doc, element);
115810
        if (!target) {
115811
            throw new Error("Unsupported event target " + target + " for event " + eventName);
115812
        }
115813
        return this.addEventListener(target, eventName, handler);
115814
    };
115815
    return EventManagerPlugin;
115816
}());
115817
 
115818
/**
115819
 * @license
115820
 * Copyright Google Inc. All Rights Reserved.
115821
 *
115822
 * Use of this source code is governed by an MIT-style license that can be
115823
 * found in the LICENSE file at https://angular.io/license
115824
 */
115825
var SharedStylesHost = /** @class */ (function () {
115826
    function SharedStylesHost() {
115827
        /** @internal */
115828
        this._stylesSet = new Set();
115829
    }
115830
    SharedStylesHost.prototype.addStyles = function (styles) {
115831
        var _this = this;
115832
        var additions = new Set();
115833
        styles.forEach(function (style) {
115834
            if (!_this._stylesSet.has(style)) {
115835
                _this._stylesSet.add(style);
115836
                additions.add(style);
115837
            }
115838
        });
115839
        this.onStylesAdded(additions);
115840
    };
115841
    SharedStylesHost.prototype.onStylesAdded = function (additions) { };
115842
    SharedStylesHost.prototype.getAllStyles = function () { return Array.from(this._stylesSet); };
115843
    SharedStylesHost.decorators = [
115844
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }
115845
    ];
115846
    /** @nocollapse */
115847
    SharedStylesHost.ctorParameters = function () { return []; };
115848
    return SharedStylesHost;
115849
}());
115850
var DomSharedStylesHost = /** @class */ (function (_super) {
115851
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(DomSharedStylesHost, _super);
115852
    function DomSharedStylesHost(_doc) {
115853
        var _this = _super.call(this) || this;
115854
        _this._doc = _doc;
115855
        _this._hostNodes = new Set();
115856
        _this._styleNodes = new Set();
115857
        _this._hostNodes.add(_doc.head);
115858
        return _this;
115859
    }
115860
    DomSharedStylesHost.prototype._addStylesToHost = function (styles, host) {
115861
        var _this = this;
115862
        styles.forEach(function (style) {
115863
            var styleEl = _this._doc.createElement('style');
115864
            styleEl.textContent = style;
115865
            _this._styleNodes.add(host.appendChild(styleEl));
115866
        });
115867
    };
115868
    DomSharedStylesHost.prototype.addHost = function (hostNode) {
115869
        this._addStylesToHost(this._stylesSet, hostNode);
115870
        this._hostNodes.add(hostNode);
115871
    };
115872
    DomSharedStylesHost.prototype.removeHost = function (hostNode) { this._hostNodes.delete(hostNode); };
115873
    DomSharedStylesHost.prototype.onStylesAdded = function (additions) {
115874
        var _this = this;
115875
        this._hostNodes.forEach(function (hostNode) { return _this._addStylesToHost(additions, hostNode); });
115876
    };
115877
    DomSharedStylesHost.prototype.ngOnDestroy = function () { this._styleNodes.forEach(function (styleNode) { return getDOM().remove(styleNode); }); };
115878
    DomSharedStylesHost.decorators = [
115879
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }
115880
    ];
115881
    /** @nocollapse */
115882
    DomSharedStylesHost.ctorParameters = function () { return [
115883
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [DOCUMENT$1,] },] },
115884
    ]; };
115885
    return DomSharedStylesHost;
115886
}(SharedStylesHost));
115887
 
115888
/**
115889
 * @license
115890
 * Copyright Google Inc. All Rights Reserved.
115891
 *
115892
 * Use of this source code is governed by an MIT-style license that can be
115893
 * found in the LICENSE file at https://angular.io/license
115894
 */
115895
var NAMESPACE_URIS = {
115896
    'svg': 'http://www.w3.org/2000/svg',
115897
    'xhtml': 'http://www.w3.org/1999/xhtml',
115898
    'xlink': 'http://www.w3.org/1999/xlink',
115899
    'xml': 'http://www.w3.org/XML/1998/namespace',
115900
    'xmlns': 'http://www.w3.org/2000/xmlns/',
115901
};
115902
var COMPONENT_REGEX = /%COMP%/g;
115903
var COMPONENT_VARIABLE = '%COMP%';
115904
var HOST_ATTR = "_nghost-" + COMPONENT_VARIABLE;
115905
var CONTENT_ATTR = "_ngcontent-" + COMPONENT_VARIABLE;
115906
function shimContentAttribute(componentShortId) {
115907
    return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId);
115908
}
115909
function shimHostAttribute(componentShortId) {
115910
    return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId);
115911
}
115912
function flattenStyles(compId, styles, target) {
115913
    for (var i = 0; i < styles.length; i++) {
115914
        var style = styles[i];
115915
        if (Array.isArray(style)) {
115916
            flattenStyles(compId, style, target);
115917
        }
115918
        else {
115919
            style = style.replace(COMPONENT_REGEX, compId);
115920
            target.push(style);
115921
        }
115922
    }
115923
    return target;
115924
}
115925
function decoratePreventDefault(eventHandler) {
115926
    return function (event) {
115927
        var allowDefaultBehavior = eventHandler(event);
115928
        if (allowDefaultBehavior === false) {
115929
            // TODO(tbosch): move preventDefault into event plugins...
115930
            event.preventDefault();
115931
            event.returnValue = false;
115932
        }
115933
    };
115934
}
115935
var DomRendererFactory2 = /** @class */ (function () {
115936
    function DomRendererFactory2(eventManager, sharedStylesHost) {
115937
        this.eventManager = eventManager;
115938
        this.sharedStylesHost = sharedStylesHost;
115939
        this.rendererByCompId = new Map();
115940
        this.defaultRenderer = new DefaultDomRenderer2(eventManager);
115941
    }
115942
    DomRendererFactory2.prototype.createRenderer = function (element, type) {
115943
        if (!element || !type) {
115944
            return this.defaultRenderer;
115945
        }
115946
        switch (type.encapsulation) {
115947
            case _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].Emulated: {
115948
                var renderer = this.rendererByCompId.get(type.id);
115949
                if (!renderer) {
115950
                    renderer =
115951
                        new EmulatedEncapsulationDomRenderer2(this.eventManager, this.sharedStylesHost, type);
115952
                    this.rendererByCompId.set(type.id, renderer);
115953
                }
115954
                renderer.applyToHost(element);
115955
                return renderer;
115956
            }
115957
            case _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].Native:
115958
                return new ShadowDomRenderer(this.eventManager, this.sharedStylesHost, element, type);
115959
            default: {
115960
                if (!this.rendererByCompId.has(type.id)) {
115961
                    var styles = flattenStyles(type.id, type.styles, []);
115962
                    this.sharedStylesHost.addStyles(styles);
115963
                    this.rendererByCompId.set(type.id, this.defaultRenderer);
115964
                }
115965
                return this.defaultRenderer;
115966
            }
115967
        }
115968
    };
115969
    DomRendererFactory2.prototype.begin = function () { };
115970
    DomRendererFactory2.prototype.end = function () { };
115971
    DomRendererFactory2.decorators = [
115972
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }
115973
    ];
115974
    /** @nocollapse */
115975
    DomRendererFactory2.ctorParameters = function () { return [
115976
        { type: EventManager, },
115977
        { type: DomSharedStylesHost, },
115978
    ]; };
115979
    return DomRendererFactory2;
115980
}());
115981
var DefaultDomRenderer2 = /** @class */ (function () {
115982
    function DefaultDomRenderer2(eventManager) {
115983
        this.eventManager = eventManager;
115984
        this.data = Object.create(null);
115985
    }
115986
    DefaultDomRenderer2.prototype.destroy = function () { };
115987
    DefaultDomRenderer2.prototype.createElement = function (name, namespace) {
115988
        if (namespace) {
115989
            return document.createElementNS(NAMESPACE_URIS[namespace], name);
115990
        }
115991
        return document.createElement(name);
115992
    };
115993
    DefaultDomRenderer2.prototype.createComment = function (value) { return document.createComment(value); };
115994
    DefaultDomRenderer2.prototype.createText = function (value) { return document.createTextNode(value); };
115995
    DefaultDomRenderer2.prototype.appendChild = function (parent, newChild) { parent.appendChild(newChild); };
115996
    DefaultDomRenderer2.prototype.insertBefore = function (parent, newChild, refChild) {
115997
        if (parent) {
115998
            parent.insertBefore(newChild, refChild);
115999
        }
116000
    };
116001
    DefaultDomRenderer2.prototype.removeChild = function (parent, oldChild) {
116002
        if (parent) {
116003
            parent.removeChild(oldChild);
116004
        }
116005
    };
116006
    DefaultDomRenderer2.prototype.selectRootElement = function (selectorOrNode) {
116007
        var el = typeof selectorOrNode === 'string' ? document.querySelector(selectorOrNode) :
116008
            selectorOrNode;
116009
        if (!el) {
116010
            throw new Error("The selector \"" + selectorOrNode + "\" did not match any elements");
116011
        }
116012
        el.textContent = '';
116013
        return el;
116014
    };
116015
    DefaultDomRenderer2.prototype.parentNode = function (node) { return node.parentNode; };
116016
    DefaultDomRenderer2.prototype.nextSibling = function (node) { return node.nextSibling; };
116017
    DefaultDomRenderer2.prototype.setAttribute = function (el, name, value, namespace) {
116018
        if (namespace) {
116019
            name = namespace + ":" + name;
116020
            var namespaceUri = NAMESPACE_URIS[namespace];
116021
            if (namespaceUri) {
116022
                el.setAttributeNS(namespaceUri, name, value);
116023
            }
116024
            else {
116025
                el.setAttribute(name, value);
116026
            }
116027
        }
116028
        else {
116029
            el.setAttribute(name, value);
116030
        }
116031
    };
116032
    DefaultDomRenderer2.prototype.removeAttribute = function (el, name, namespace) {
116033
        if (namespace) {
116034
            var namespaceUri = NAMESPACE_URIS[namespace];
116035
            if (namespaceUri) {
116036
                el.removeAttributeNS(namespaceUri, name);
116037
            }
116038
            else {
116039
                el.removeAttribute(namespace + ":" + name);
116040
            }
116041
        }
116042
        else {
116043
            el.removeAttribute(name);
116044
        }
116045
    };
116046
    DefaultDomRenderer2.prototype.addClass = function (el, name) { el.classList.add(name); };
116047
    DefaultDomRenderer2.prototype.removeClass = function (el, name) { el.classList.remove(name); };
116048
    DefaultDomRenderer2.prototype.setStyle = function (el, style, value, flags) {
116049
        if (flags & _angular_core__WEBPACK_IMPORTED_MODULE_1__["RendererStyleFlags2"].DashCase) {
116050
            el.style.setProperty(style, value, !!(flags & _angular_core__WEBPACK_IMPORTED_MODULE_1__["RendererStyleFlags2"].Important) ? 'important' : '');
116051
        }
116052
        else {
116053
            el.style[style] = value;
116054
        }
116055
    };
116056
    DefaultDomRenderer2.prototype.removeStyle = function (el, style, flags) {
116057
        if (flags & _angular_core__WEBPACK_IMPORTED_MODULE_1__["RendererStyleFlags2"].DashCase) {
116058
            el.style.removeProperty(style);
116059
        }
116060
        else {
116061
            // IE requires '' instead of null
116062
            // see https://github.com/angular/angular/issues/7916
116063
            el.style[style] = '';
116064
        }
116065
    };
116066
    DefaultDomRenderer2.prototype.setProperty = function (el, name, value) {
116067
        checkNoSyntheticProp(name, 'property');
116068
        el[name] = value;
116069
    };
116070
    DefaultDomRenderer2.prototype.setValue = function (node, value) { node.nodeValue = value; };
116071
    DefaultDomRenderer2.prototype.listen = function (target, event, callback) {
116072
        checkNoSyntheticProp(event, 'listener');
116073
        if (typeof target === 'string') {
116074
            return this.eventManager.addGlobalEventListener(target, event, decoratePreventDefault(callback));
116075
        }
116076
        return this.eventManager.addEventListener(target, event, decoratePreventDefault(callback));
116077
    };
116078
    return DefaultDomRenderer2;
116079
}());
116080
var AT_CHARCODE = '@'.charCodeAt(0);
116081
function checkNoSyntheticProp(name, nameKind) {
116082
    if (name.charCodeAt(0) === AT_CHARCODE) {
116083
        throw new Error("Found the synthetic " + nameKind + " " + name + ". Please include either \"BrowserAnimationsModule\" or \"NoopAnimationsModule\" in your application.");
116084
    }
116085
}
116086
var EmulatedEncapsulationDomRenderer2 = /** @class */ (function (_super) {
116087
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(EmulatedEncapsulationDomRenderer2, _super);
116088
    function EmulatedEncapsulationDomRenderer2(eventManager, sharedStylesHost, component) {
116089
        var _this = _super.call(this, eventManager) || this;
116090
        _this.component = component;
116091
        var styles = flattenStyles(component.id, component.styles, []);
116092
        sharedStylesHost.addStyles(styles);
116093
        _this.contentAttr = shimContentAttribute(component.id);
116094
        _this.hostAttr = shimHostAttribute(component.id);
116095
        return _this;
116096
    }
116097
    EmulatedEncapsulationDomRenderer2.prototype.applyToHost = function (element) { _super.prototype.setAttribute.call(this, element, this.hostAttr, ''); };
116098
    EmulatedEncapsulationDomRenderer2.prototype.createElement = function (parent, name) {
116099
        var el = _super.prototype.createElement.call(this, parent, name);
116100
        _super.prototype.setAttribute.call(this, el, this.contentAttr, '');
116101
        return el;
116102
    };
116103
    return EmulatedEncapsulationDomRenderer2;
116104
}(DefaultDomRenderer2));
116105
var ShadowDomRenderer = /** @class */ (function (_super) {
116106
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(ShadowDomRenderer, _super);
116107
    function ShadowDomRenderer(eventManager, sharedStylesHost, hostEl, component) {
116108
        var _this = _super.call(this, eventManager) || this;
116109
        _this.sharedStylesHost = sharedStylesHost;
116110
        _this.hostEl = hostEl;
116111
        _this.component = component;
116112
        _this.shadowRoot = hostEl.createShadowRoot();
116113
        _this.sharedStylesHost.addHost(_this.shadowRoot);
116114
        var styles = flattenStyles(component.id, component.styles, []);
116115
        for (var i = 0; i < styles.length; i++) {
116116
            var styleEl = document.createElement('style');
116117
            styleEl.textContent = styles[i];
116118
            _this.shadowRoot.appendChild(styleEl);
116119
        }
116120
        return _this;
116121
    }
116122
    ShadowDomRenderer.prototype.nodeOrShadowRoot = function (node) { return node === this.hostEl ? this.shadowRoot : node; };
116123
    ShadowDomRenderer.prototype.destroy = function () { this.sharedStylesHost.removeHost(this.shadowRoot); };
116124
    ShadowDomRenderer.prototype.appendChild = function (parent, newChild) {
116125
        return _super.prototype.appendChild.call(this, this.nodeOrShadowRoot(parent), newChild);
116126
    };
116127
    ShadowDomRenderer.prototype.insertBefore = function (parent, newChild, refChild) {
116128
        return _super.prototype.insertBefore.call(this, this.nodeOrShadowRoot(parent), newChild, refChild);
116129
    };
116130
    ShadowDomRenderer.prototype.removeChild = function (parent, oldChild) {
116131
        return _super.prototype.removeChild.call(this, this.nodeOrShadowRoot(parent), oldChild);
116132
    };
116133
    ShadowDomRenderer.prototype.parentNode = function (node) {
116134
        return this.nodeOrShadowRoot(_super.prototype.parentNode.call(this, this.nodeOrShadowRoot(node)));
116135
    };
116136
    return ShadowDomRenderer;
116137
}(DefaultDomRenderer2));
116138
 
116139
/**
116140
 * @license
116141
 * Copyright Google Inc. All Rights Reserved.
116142
 *
116143
 * Use of this source code is governed by an MIT-style license that can be
116144
 * found in the LICENSE file at https://angular.io/license
116145
 */
116146
var ɵ0 = function (v) {
116147
    return '__zone_symbol__' + v;
116148
};
116149
/**
116150
 * Detect if Zone is present. If it is then use simple zone aware 'addEventListener'
116151
 * since Angular can do much more
116152
 * efficient bookkeeping than Zone can, because we have additional information. This speeds up
116153
 * addEventListener by 3x.
116154
 */
116155
var __symbol__ = (typeof Zone !== 'undefined') && Zone['__symbol__'] || ɵ0;
116156
var ADD_EVENT_LISTENER = __symbol__('addEventListener');
116157
var REMOVE_EVENT_LISTENER = __symbol__('removeEventListener');
116158
var symbolNames = {};
116159
var FALSE = 'FALSE';
116160
var ANGULAR = 'ANGULAR';
116161
var NATIVE_ADD_LISTENER = 'addEventListener';
116162
var NATIVE_REMOVE_LISTENER = 'removeEventListener';
116163
// use the same symbol string which is used in zone.js
116164
var stopSymbol = '__zone_symbol__propagationStopped';
116165
var stopMethodSymbol = '__zone_symbol__stopImmediatePropagation';
116166
var blackListedEvents = (typeof Zone !== 'undefined') && Zone[__symbol__('BLACK_LISTED_EVENTS')];
116167
var blackListedMap;
116168
if (blackListedEvents) {
116169
    blackListedMap = {};
116170
    blackListedEvents.forEach(function (eventName) { blackListedMap[eventName] = eventName; });
116171
}
116172
var isBlackListedEvent = function (eventName) {
116173
    if (!blackListedMap) {
116174
        return false;
116175
    }
116176
    return blackListedMap.hasOwnProperty(eventName);
116177
};
116178
// a global listener to handle all dom event,
116179
// so we do not need to create a closure every time
116180
var globalListener = function (event) {
116181
    var symbolName = symbolNames[event.type];
116182
    if (!symbolName) {
116183
        return;
116184
    }
116185
    var taskDatas = this[symbolName];
116186
    if (!taskDatas) {
116187
        return;
116188
    }
116189
    var args = [event];
116190
    if (taskDatas.length === 1) {
116191
        // if taskDatas only have one element, just invoke it
116192
        var taskData = taskDatas[0];
116193
        if (taskData.zone !== Zone.current) {
116194
            // only use Zone.run when Zone.current not equals to stored zone
116195
            return taskData.zone.run(taskData.handler, this, args);
116196
        }
116197
        else {
116198
            return taskData.handler.apply(this, args);
116199
        }
116200
    }
116201
    else {
116202
        // copy tasks as a snapshot to avoid event handlers remove
116203
        // itself or others
116204
        var copiedTasks = taskDatas.slice();
116205
        for (var i = 0; i < copiedTasks.length; i++) {
116206
            // if other listener call event.stopImmediatePropagation
116207
            // just break
116208
            if (event[stopSymbol] === true) {
116209
                break;
116210
            }
116211
            var taskData = copiedTasks[i];
116212
            if (taskData.zone !== Zone.current) {
116213
                // only use Zone.run when Zone.current not equals to stored zone
116214
                taskData.zone.run(taskData.handler, this, args);
116215
            }
116216
            else {
116217
                taskData.handler.apply(this, args);
116218
            }
116219
        }
116220
    }
116221
};
116222
var DomEventsPlugin = /** @class */ (function (_super) {
116223
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(DomEventsPlugin, _super);
116224
    function DomEventsPlugin(doc, ngZone) {
116225
        var _this = _super.call(this, doc) || this;
116226
        _this.ngZone = ngZone;
116227
        _this.patchEvent();
116228
        return _this;
116229
    }
116230
    DomEventsPlugin.prototype.patchEvent = function () {
116231
        if (!Event || !Event.prototype) {
116232
            return;
116233
        }
116234
        if (Event.prototype[stopMethodSymbol]) {
116235
            // already patched by zone.js
116236
            return;
116237
        }
116238
        var delegate = Event.prototype[stopMethodSymbol] =
116239
            Event.prototype.stopImmediatePropagation;
116240
        Event.prototype.stopImmediatePropagation = function () {
116241
            if (this) {
116242
                this[stopSymbol] = true;
116243
            }
116244
            // should call native delegate in case
116245
            // in some environment part of the application
116246
            // will not use the patched Event
116247
            delegate && delegate.apply(this, arguments);
116248
        };
116249
    };
116250
    // This plugin should come last in the list of plugins, because it accepts all
116251
    // events.
116252
    // This plugin should come last in the list of plugins, because it accepts all
116253
    // events.
116254
    DomEventsPlugin.prototype.supports =
116255
    // This plugin should come last in the list of plugins, because it accepts all
116256
    // events.
116257
    function (eventName) { return true; };
116258
    DomEventsPlugin.prototype.addEventListener = function (element, eventName, handler) {
116259
        var _this = this;
116260
        /**
116261
             * This code is about to add a listener to the DOM. If Zone.js is present, than
116262
             * `addEventListener` has been patched. The patched code adds overhead in both
116263
             * memory and speed (3x slower) than native. For this reason if we detect that
116264
             * Zone.js is present we use a simple version of zone aware addEventListener instead.
116265
             * The result is faster registration and the zone will be restored.
116266
             * But ZoneSpec.onScheduleTask, ZoneSpec.onInvokeTask, ZoneSpec.onCancelTask
116267
             * will not be invoked
116268
             * We also do manual zone restoration in element.ts renderEventHandlerClosure method.
116269
             *
116270
             * NOTE: it is possible that the element is from different iframe, and so we
116271
             * have to check before we execute the method.
116272
             */
116273
        var zoneJsLoaded = element[ADD_EVENT_LISTENER];
116274
        var callback = handler;
116275
        // if zonejs is loaded and current zone is not ngZone
116276
        // we keep Zone.current on target for later restoration.
116277
        if (zoneJsLoaded && (!_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"].isInAngularZone() || isBlackListedEvent(eventName))) {
116278
            var symbolName = symbolNames[eventName];
116279
            if (!symbolName) {
116280
                symbolName = symbolNames[eventName] = __symbol__(ANGULAR + eventName + FALSE);
116281
            }
116282
            var taskDatas = element[symbolName];
116283
            var globalListenerRegistered = taskDatas && taskDatas.length > 0;
116284
            if (!taskDatas) {
116285
                taskDatas = element[symbolName] = [];
116286
            }
116287
            var zone = isBlackListedEvent(eventName) ? Zone.root : Zone.current;
116288
            if (taskDatas.length === 0) {
116289
                taskDatas.push({ zone: zone, handler: callback });
116290
            }
116291
            else {
116292
                var callbackRegistered = false;
116293
                for (var i = 0; i < taskDatas.length; i++) {
116294
                    if (taskDatas[i].handler === callback) {
116295
                        callbackRegistered = true;
116296
                        break;
116297
                    }
116298
                }
116299
                if (!callbackRegistered) {
116300
                    taskDatas.push({ zone: zone, handler: callback });
116301
                }
116302
            }
116303
            if (!globalListenerRegistered) {
116304
                element[ADD_EVENT_LISTENER](eventName, globalListener, false);
116305
            }
116306
        }
116307
        else {
116308
            element[NATIVE_ADD_LISTENER](eventName, callback, false);
116309
        }
116310
        return function () { return _this.removeEventListener(element, eventName, callback); };
116311
    };
116312
    DomEventsPlugin.prototype.removeEventListener = function (target, eventName, callback) {
116313
        var underlyingRemove = target[REMOVE_EVENT_LISTENER];
116314
        // zone.js not loaded, use native removeEventListener
116315
        if (!underlyingRemove) {
116316
            return target[NATIVE_REMOVE_LISTENER].apply(target, [eventName, callback, false]);
116317
        }
116318
        var symbolName = symbolNames[eventName];
116319
        var taskDatas = symbolName && target[symbolName];
116320
        if (!taskDatas) {
116321
            // addEventListener not using patched version
116322
            // just call native removeEventListener
116323
            return target[NATIVE_REMOVE_LISTENER].apply(target, [eventName, callback, false]);
116324
        }
116325
        // fix issue 20532, should be able to remove
116326
        // listener which was added inside of ngZone
116327
        var found = false;
116328
        for (var i = 0; i < taskDatas.length; i++) {
116329
            // remove listener from taskDatas if the callback equals
116330
            if (taskDatas[i].handler === callback) {
116331
                found = true;
116332
                taskDatas.splice(i, 1);
116333
                break;
116334
            }
116335
        }
116336
        if (found) {
116337
            if (taskDatas.length === 0) {
116338
                // all listeners are removed, we can remove the globalListener from target
116339
                underlyingRemove.apply(target, [eventName, globalListener, false]);
116340
            }
116341
        }
116342
        else {
116343
            // not found in taskDatas, the callback may be added inside of ngZone
116344
            // use native remove listener to remove the callback
116345
            target[NATIVE_REMOVE_LISTENER].apply(target, [eventName, callback, false]);
116346
        }
116347
    };
116348
    DomEventsPlugin.decorators = [
116349
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }
116350
    ];
116351
    /** @nocollapse */
116352
    DomEventsPlugin.ctorParameters = function () { return [
116353
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [DOCUMENT$1,] },] },
116354
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"], },
116355
    ]; };
116356
    return DomEventsPlugin;
116357
}(EventManagerPlugin));
116358
 
116359
/**
116360
 * @license
116361
 * Copyright Google Inc. All Rights Reserved.
116362
 *
116363
 * Use of this source code is governed by an MIT-style license that can be
116364
 * found in the LICENSE file at https://angular.io/license
116365
 */
116366
/**
116367
 * Supported HammerJS recognizer event names.
116368
 */
116369
var EVENT_NAMES = {
116370
    // pan
116371
    'pan': true,
116372
    'panstart': true,
116373
    'panmove': true,
116374
    'panend': true,
116375
    'pancancel': true,
116376
    'panleft': true,
116377
    'panright': true,
116378
    'panup': true,
116379
    'pandown': true,
116380
    // pinch
116381
    'pinch': true,
116382
    'pinchstart': true,
116383
    'pinchmove': true,
116384
    'pinchend': true,
116385
    'pinchcancel': true,
116386
    'pinchin': true,
116387
    'pinchout': true,
116388
    // press
116389
    'press': true,
116390
    'pressup': true,
116391
    // rotate
116392
    'rotate': true,
116393
    'rotatestart': true,
116394
    'rotatemove': true,
116395
    'rotateend': true,
116396
    'rotatecancel': true,
116397
    // swipe
116398
    'swipe': true,
116399
    'swipeleft': true,
116400
    'swiperight': true,
116401
    'swipeup': true,
116402
    'swipedown': true,
116403
    // tap
116404
    'tap': true,
116405
};
116406
/**
116407
 * DI token for providing [HammerJS](http://hammerjs.github.io/) support to Angular.
116408
 * @see `HammerGestureConfig`
116409
 *
116410
 * @experimental
116411
 */
116412
var HAMMER_GESTURE_CONFIG = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('HammerGestureConfig');
116413
/**
116414
 * An injectable [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)
116415
 * for gesture recognition. Configures specific event recognition.
116416
 * @experimental
116417
 */
116418
var HammerGestureConfig = /** @class */ (function () {
116419
    function HammerGestureConfig() {
116420
        /**
116421
           * A set of supported event names for gestures to be used in Angular.
116422
           * Angular supports all built-in recognizers, as listed in
116423
           * [HammerJS documentation](http://hammerjs.github.io/).
116424
           */
116425
        this.events = [];
116426
        /**
116427
          * Maps gesture event names to a set of configuration options
116428
          * that specify overrides to the default values for specific properties.
116429
          *
116430
          * The key is a supported event name to be configured,
116431
          * and the options object contains a set of properties, with override values
116432
          * to be applied to the named recognizer event.
116433
          * For example, to disable recognition of the rotate event, specify
116434
          *  `{"rotate": {"enable": false}}`.
116435
          *
116436
          * Properties that are not present take the HammerJS default values.
116437
          * For information about which properties are supported for which events,
116438
          * and their allowed and default values, see
116439
          * [HammerJS documentation](http://hammerjs.github.io/).
116440
          *
116441
          */
116442
        this.overrides = {};
116443
    }
116444
    /**
116445
     * Creates a [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)
116446
     * and attaches it to a given HTML element.
116447
     * @param element The element that will recognize gestures.
116448
     * @returns A HammerJS event-manager object.
116449
     */
116450
    /**
116451
       * Creates a [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)
116452
       * and attaches it to a given HTML element.
116453
       * @param element The element that will recognize gestures.
116454
       * @returns A HammerJS event-manager object.
116455
       */
116456
    HammerGestureConfig.prototype.buildHammer = /**
116457
       * Creates a [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)
116458
       * and attaches it to a given HTML element.
116459
       * @param element The element that will recognize gestures.
116460
       * @returns A HammerJS event-manager object.
116461
       */
116462
    function (element) {
116463
        var mc = new Hammer(element, this.options);
116464
        mc.get('pinch').set({ enable: true });
116465
        mc.get('rotate').set({ enable: true });
116466
        for (var eventName in this.overrides) {
116467
            mc.get(eventName).set(this.overrides[eventName]);
116468
        }
116469
        return mc;
116470
    };
116471
    HammerGestureConfig.decorators = [
116472
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }
116473
    ];
116474
    /** @nocollapse */
116475
    HammerGestureConfig.ctorParameters = function () { return []; };
116476
    return HammerGestureConfig;
116477
}());
116478
var HammerGesturesPlugin = /** @class */ (function (_super) {
116479
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(HammerGesturesPlugin, _super);
116480
    function HammerGesturesPlugin(doc, _config, console) {
116481
        var _this = _super.call(this, doc) || this;
116482
        _this._config = _config;
116483
        _this.console = console;
116484
        return _this;
116485
    }
116486
    HammerGesturesPlugin.prototype.supports = function (eventName) {
116487
        if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) {
116488
            return false;
116489
        }
116490
        if (!window.Hammer) {
116491
            this.console.warn("Hammer.js is not loaded, can not bind '" + eventName + "' event.");
116492
            return false;
116493
        }
116494
        return true;
116495
    };
116496
    HammerGesturesPlugin.prototype.addEventListener = function (element, eventName, handler) {
116497
        var _this = this;
116498
        var zone = this.manager.getZone();
116499
        eventName = eventName.toLowerCase();
116500
        return zone.runOutsideAngular(function () {
116501
            // Creating the manager bind events, must be done outside of angular
116502
            var mc = _this._config.buildHammer(element);
116503
            var callback = function (eventObj) {
116504
                zone.runGuarded(function () { handler(eventObj); });
116505
            };
116506
            mc.on(eventName, callback);
116507
            return function () { return mc.off(eventName, callback); };
116508
        });
116509
    };
116510
    HammerGesturesPlugin.prototype.isCustomEvent = function (eventName) { return this._config.events.indexOf(eventName) > -1; };
116511
    HammerGesturesPlugin.decorators = [
116512
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }
116513
    ];
116514
    /** @nocollapse */
116515
    HammerGesturesPlugin.ctorParameters = function () { return [
116516
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [DOCUMENT$1,] },] },
116517
        { type: HammerGestureConfig, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [HAMMER_GESTURE_CONFIG,] },] },
116518
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"], },
116519
    ]; };
116520
    return HammerGesturesPlugin;
116521
}(EventManagerPlugin));
116522
 
116523
/**
116524
 * @license
116525
 * Copyright Google Inc. All Rights Reserved.
116526
 *
116527
 * Use of this source code is governed by an MIT-style license that can be
116528
 * found in the LICENSE file at https://angular.io/license
116529
 */
116530
/**
116531
 * Defines supported modifiers for key events.
116532
 */
116533
var MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift'];
116534
var ɵ0$1 = function (event) { return event.altKey; };
116535
var ɵ1$1 = function (event) { return event.ctrlKey; };
116536
var ɵ2$1 = function (event) { return event.metaKey; };
116537
var ɵ3 = function (event) { return event.shiftKey; };
116538
/**
116539
 * Retrieves modifiers from key-event objects.
116540
 */
116541
var MODIFIER_KEY_GETTERS = {
116542
    'alt': ɵ0$1,
116543
    'control': ɵ1$1,
116544
    'meta': ɵ2$1,
116545
    'shift': ɵ3
116546
};
116547
/**
116548
 * @experimental
116549
 * A browser plug-in that provides support for handling of key events in Angular.
116550
 */
116551
var KeyEventsPlugin = /** @class */ (function (_super) {
116552
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(KeyEventsPlugin, _super);
116553
    /**
116554
     * Initializes an instance of the browser plug-in.
116555
     * @param doc The document in which key events will be detected.
116556
     */
116557
    function KeyEventsPlugin(doc) {
116558
        return _super.call(this, doc) || this;
116559
    }
116560
    /**
116561
      * Reports whether a named key event is supported.
116562
      * @param eventName The event name to query.
116563
      * @return True if the named key event is supported.
116564
     */
116565
    /**
116566
        * Reports whether a named key event is supported.
116567
        * @param eventName The event name to query.
116568
        * @return True if the named key event is supported.
116569
       */
116570
    KeyEventsPlugin.prototype.supports = /**
116571
        * Reports whether a named key event is supported.
116572
        * @param eventName The event name to query.
116573
        * @return True if the named key event is supported.
116574
       */
116575
    function (eventName) { return KeyEventsPlugin.parseEventName(eventName) != null; };
116576
    /**
116577
     * Registers a handler for a specific element and key event.
116578
     * @param element The HTML element to receive event notifications.
116579
     * @param eventName The name of the key event to listen for.
116580
     * @param handler A function to call when the notification occurs. Receives the
116581
     * event object as an argument.
116582
     * @returns The key event that was registered.
116583
    */
116584
    /**
116585
       * Registers a handler for a specific element and key event.
116586
       * @param element The HTML element to receive event notifications.
116587
       * @param eventName The name of the key event to listen for.
116588
       * @param handler A function to call when the notification occurs. Receives the
116589
       * event object as an argument.
116590
       * @returns The key event that was registered.
116591
      */
116592
    KeyEventsPlugin.prototype.addEventListener = /**
116593
       * Registers a handler for a specific element and key event.
116594
       * @param element The HTML element to receive event notifications.
116595
       * @param eventName The name of the key event to listen for.
116596
       * @param handler A function to call when the notification occurs. Receives the
116597
       * event object as an argument.
116598
       * @returns The key event that was registered.
116599
      */
116600
    function (element, eventName, handler) {
116601
        var parsedEvent = (KeyEventsPlugin.parseEventName(eventName));
116602
        var outsideHandler = KeyEventsPlugin.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone());
116603
        return this.manager.getZone().runOutsideAngular(function () {
116604
            return getDOM().onAndCancel(element, parsedEvent['domEventName'], outsideHandler);
116605
        });
116606
    };
116607
    KeyEventsPlugin.parseEventName = function (eventName) {
116608
        var parts = eventName.toLowerCase().split('.');
116609
        var domEventName = parts.shift();
116610
        if ((parts.length === 0) || !(domEventName === 'keydown' || domEventName === 'keyup')) {
116611
            return null;
116612
        }
116613
        var key = KeyEventsPlugin._normalizeKey((parts.pop()));
116614
        var fullKey = '';
116615
        MODIFIER_KEYS.forEach(function (modifierName) {
116616
            var index = parts.indexOf(modifierName);
116617
            if (index > -1) {
116618
                parts.splice(index, 1);
116619
                fullKey += modifierName + '.';
116620
            }
116621
        });
116622
        fullKey += key;
116623
        if (parts.length != 0 || key.length === 0) {
116624
            // returning null instead of throwing to let another plugin process the event
116625
            return null;
116626
        }
116627
        var result = {};
116628
        result['domEventName'] = domEventName;
116629
        result['fullKey'] = fullKey;
116630
        return result;
116631
    };
116632
    KeyEventsPlugin.getEventFullKey = function (event) {
116633
        var fullKey = '';
116634
        var key = getDOM().getEventKey(event);
116635
        key = key.toLowerCase();
116636
        if (key === ' ') {
116637
            key = 'space'; // for readability
116638
        }
116639
        else if (key === '.') {
116640
            key = 'dot'; // because '.' is used as a separator in event names
116641
        }
116642
        MODIFIER_KEYS.forEach(function (modifierName) {
116643
            if (modifierName != key) {
116644
                var modifierGetter = MODIFIER_KEY_GETTERS[modifierName];
116645
                if (modifierGetter(event)) {
116646
                    fullKey += modifierName + '.';
116647
                }
116648
            }
116649
        });
116650
        fullKey += key;
116651
        return fullKey;
116652
    };
116653
    /**
116654
     * Configures a handler callback for a key event.
116655
     * @param fullKey The event name that combines all simultaneous keystrokes.
116656
     * @param handler The function that responds to the key event.
116657
     * @param zone The zone in which the event occurred.
116658
     * @returns A callback function.
116659
     */
116660
    /**
116661
       * Configures a handler callback for a key event.
116662
       * @param fullKey The event name that combines all simultaneous keystrokes.
116663
       * @param handler The function that responds to the key event.
116664
       * @param zone The zone in which the event occurred.
116665
       * @returns A callback function.
116666
       */
116667
    KeyEventsPlugin.eventCallback = /**
116668
       * Configures a handler callback for a key event.
116669
       * @param fullKey The event name that combines all simultaneous keystrokes.
116670
       * @param handler The function that responds to the key event.
116671
       * @param zone The zone in which the event occurred.
116672
       * @returns A callback function.
116673
       */
116674
    function (fullKey, handler, zone) {
116675
        return function (event /** TODO #9100 */) {
116676
            if (KeyEventsPlugin.getEventFullKey(event) === fullKey) {
116677
                zone.runGuarded(function () { return handler(event); });
116678
            }
116679
        };
116680
    };
116681
    /** @internal */
116682
    /** @internal */
116683
    KeyEventsPlugin._normalizeKey = /** @internal */
116684
    function (keyName) {
116685
        // TODO: switch to a Map if the mapping grows too much
116686
        switch (keyName) {
116687
            case 'esc':
116688
                return 'escape';
116689
            default:
116690
                return keyName;
116691
        }
116692
    };
116693
    KeyEventsPlugin.decorators = [
116694
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }
116695
    ];
116696
    /** @nocollapse */
116697
    KeyEventsPlugin.ctorParameters = function () { return [
116698
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [DOCUMENT$1,] },] },
116699
    ]; };
116700
    return KeyEventsPlugin;
116701
}(EventManagerPlugin));
116702
 
116703
/**
116704
 * @license
116705
 * Copyright Google Inc. All Rights Reserved.
116706
 *
116707
 * Use of this source code is governed by an MIT-style license that can be
116708
 * found in the LICENSE file at https://angular.io/license
116709
 */
116710
/**
116711
 * DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing
116712
 * values to be safe to use in the different DOM contexts.
116713
 *
116714
 * For example, when binding a URL in an `<a [href]="someValue">` hyperlink, `someValue` will be
116715
 * sanitized so that an attacker cannot inject e.g. a `javascript:` URL that would execute code on
116716
 * the website.
116717
 *
116718
 * In specific situations, it might be necessary to disable sanitization, for example if the
116719
 * application genuinely needs to produce a `javascript:` style link with a dynamic value in it.
116720
 * Users can bypass security by constructing a value with one of the `bypassSecurityTrust...`
116721
 * methods, and then binding to that value from the template.
116722
 *
116723
 * These situations should be very rare, and extraordinary care must be taken to avoid creating a
116724
 * Cross Site Scripting (XSS) security bug!
116725
 *
116726
 * When using `bypassSecurityTrust...`, make sure to call the method as early as possible and as
116727
 * close as possible to the source of the value, to make it easy to verify no security bug is
116728
 * created by its use.
116729
 *
116730
 * It is not required (and not recommended) to bypass security if the value is safe, e.g. a URL that
116731
 * does not start with a suspicious protocol, or an HTML snippet that does not contain dangerous
116732
 * code. The sanitizer leaves safe values intact.
116733
 *
116734
 * @security Calling any of the `bypassSecurityTrust...` APIs disables Angular's built-in
116735
 * sanitization for the value passed in. Carefully check and audit all values and code paths going
116736
 * into this call. Make sure any user data is appropriately escaped for this security context.
116737
 * For more detail, see the [Security Guide](http://g.co/ng/security).
116738
 *
116739
 *
116740
 */
116741
var DomSanitizer = /** @class */ (function () {
116742
    function DomSanitizer() {
116743
    }
116744
    return DomSanitizer;
116745
}());
116746
var DomSanitizerImpl = /** @class */ (function (_super) {
116747
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(DomSanitizerImpl, _super);
116748
    function DomSanitizerImpl(_doc) {
116749
        var _this = _super.call(this) || this;
116750
        _this._doc = _doc;
116751
        return _this;
116752
    }
116753
    DomSanitizerImpl.prototype.sanitize = function (ctx, value) {
116754
        if (value == null)
116755
            return null;
116756
        switch (ctx) {
116757
            case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].NONE:
116758
                return value;
116759
            case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].HTML:
116760
                if (value instanceof SafeHtmlImpl)
116761
                    return value.changingThisBreaksApplicationSecurity;
116762
                this.checkNotSafeValue(value, 'HTML');
116763
                return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵ_sanitizeHtml"])(this._doc, String(value));
116764
            case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].STYLE:
116765
                if (value instanceof SafeStyleImpl)
116766
                    return value.changingThisBreaksApplicationSecurity;
116767
                this.checkNotSafeValue(value, 'Style');
116768
                return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵ_sanitizeStyle"])(value);
116769
            case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].SCRIPT:
116770
                if (value instanceof SafeScriptImpl)
116771
                    return value.changingThisBreaksApplicationSecurity;
116772
                this.checkNotSafeValue(value, 'Script');
116773
                throw new Error('unsafe value used in a script context');
116774
            case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].URL:
116775
                if (value instanceof SafeResourceUrlImpl || value instanceof SafeUrlImpl) {
116776
                    // Allow resource URLs in URL contexts, they are strictly more trusted.
116777
                    return value.changingThisBreaksApplicationSecurity;
116778
                }
116779
                this.checkNotSafeValue(value, 'URL');
116780
                return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵ_sanitizeUrl"])(String(value));
116781
            case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].RESOURCE_URL:
116782
                if (value instanceof SafeResourceUrlImpl) {
116783
                    return value.changingThisBreaksApplicationSecurity;
116784
                }
116785
                this.checkNotSafeValue(value, 'ResourceURL');
116786
                throw new Error('unsafe value used in a resource URL context (see http://g.co/ng/security#xss)');
116787
            default:
116788
                throw new Error("Unexpected SecurityContext " + ctx + " (see http://g.co/ng/security#xss)");
116789
        }
116790
    };
116791
    DomSanitizerImpl.prototype.checkNotSafeValue = function (value, expectedType) {
116792
        if (value instanceof SafeValueImpl) {
116793
            throw new Error("Required a safe " + expectedType + ", got a " + value.getTypeName() + " " +
116794
                "(see http://g.co/ng/security#xss)");
116795
        }
116796
    };
116797
    DomSanitizerImpl.prototype.bypassSecurityTrustHtml = function (value) { return new SafeHtmlImpl(value); };
116798
    DomSanitizerImpl.prototype.bypassSecurityTrustStyle = function (value) { return new SafeStyleImpl(value); };
116799
    DomSanitizerImpl.prototype.bypassSecurityTrustScript = function (value) { return new SafeScriptImpl(value); };
116800
    DomSanitizerImpl.prototype.bypassSecurityTrustUrl = function (value) { return new SafeUrlImpl(value); };
116801
    DomSanitizerImpl.prototype.bypassSecurityTrustResourceUrl = function (value) {
116802
        return new SafeResourceUrlImpl(value);
116803
    };
116804
    DomSanitizerImpl.decorators = [
116805
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }
116806
    ];
116807
    /** @nocollapse */
116808
    DomSanitizerImpl.ctorParameters = function () { return [
116809
        { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [DOCUMENT$1,] },] },
116810
    ]; };
116811
    return DomSanitizerImpl;
116812
}(DomSanitizer));
116813
var SafeValueImpl = /** @class */ (function () {
116814
    function SafeValueImpl(changingThisBreaksApplicationSecurity) {
116815
        // empty
116816
        this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity;
116817
    }
116818
    SafeValueImpl.prototype.toString = function () {
116819
        return "SafeValue must use [property]=binding: " + this.changingThisBreaksApplicationSecurity +
116820
            " (see http://g.co/ng/security#xss)";
116821
    };
116822
    return SafeValueImpl;
116823
}());
116824
var SafeHtmlImpl = /** @class */ (function (_super) {
116825
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(SafeHtmlImpl, _super);
116826
    function SafeHtmlImpl() {
116827
        return _super !== null && _super.apply(this, arguments) || this;
116828
    }
116829
    SafeHtmlImpl.prototype.getTypeName = function () { return 'HTML'; };
116830
    return SafeHtmlImpl;
116831
}(SafeValueImpl));
116832
var SafeStyleImpl = /** @class */ (function (_super) {
116833
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(SafeStyleImpl, _super);
116834
    function SafeStyleImpl() {
116835
        return _super !== null && _super.apply(this, arguments) || this;
116836
    }
116837
    SafeStyleImpl.prototype.getTypeName = function () { return 'Style'; };
116838
    return SafeStyleImpl;
116839
}(SafeValueImpl));
116840
var SafeScriptImpl = /** @class */ (function (_super) {
116841
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(SafeScriptImpl, _super);
116842
    function SafeScriptImpl() {
116843
        return _super !== null && _super.apply(this, arguments) || this;
116844
    }
116845
    SafeScriptImpl.prototype.getTypeName = function () { return 'Script'; };
116846
    return SafeScriptImpl;
116847
}(SafeValueImpl));
116848
var SafeUrlImpl = /** @class */ (function (_super) {
116849
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(SafeUrlImpl, _super);
116850
    function SafeUrlImpl() {
116851
        return _super !== null && _super.apply(this, arguments) || this;
116852
    }
116853
    SafeUrlImpl.prototype.getTypeName = function () { return 'URL'; };
116854
    return SafeUrlImpl;
116855
}(SafeValueImpl));
116856
var SafeResourceUrlImpl = /** @class */ (function (_super) {
116857
    Object(tslib__WEBPACK_IMPORTED_MODULE_2__["__extends"])(SafeResourceUrlImpl, _super);
116858
    function SafeResourceUrlImpl() {
116859
        return _super !== null && _super.apply(this, arguments) || this;
116860
    }
116861
    SafeResourceUrlImpl.prototype.getTypeName = function () { return 'ResourceURL'; };
116862
    return SafeResourceUrlImpl;
116863
}(SafeValueImpl));
116864
 
116865
/**
116866
 * @license
116867
 * Copyright Google Inc. All Rights Reserved.
116868
 *
116869
 * Use of this source code is governed by an MIT-style license that can be
116870
 * found in the LICENSE file at https://angular.io/license
116871
 */
116872
var INTERNAL_BROWSER_PLATFORM_PROVIDERS = [
116873
    { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["PLATFORM_ID"], useValue: _angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵPLATFORM_BROWSER_ID"] },
116874
    { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["PLATFORM_INITIALIZER"], useValue: initDomAdapter, multi: true },
116875
    { provide: _angular_common__WEBPACK_IMPORTED_MODULE_0__["PlatformLocation"], useClass: BrowserPlatformLocation, deps: [DOCUMENT$1] },
116876
    { provide: DOCUMENT$1, useFactory: _document, deps: [] },
116877
];
116878
/**
116879
 * @security Replacing built-in sanitization providers exposes the application to XSS risks.
116880
 * Attacker-controlled data introduced by an unsanitized provider could expose your
116881
 * application to XSS risks. For more detail, see the [Security Guide](http://g.co/ng/security).
116882
 * @experimental
116883
 */
116884
var BROWSER_SANITIZATION_PROVIDERS = [
116885
    { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Sanitizer"], useExisting: DomSanitizer },
116886
    { provide: DomSanitizer, useClass: DomSanitizerImpl, deps: [DOCUMENT$1] },
116887
];
116888
var platformBrowser = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["createPlatformFactory"])(_angular_core__WEBPACK_IMPORTED_MODULE_1__["platformCore"], 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS);
116889
function initDomAdapter() {
116890
    BrowserDomAdapter.makeCurrent();
116891
    BrowserGetTestability.init();
116892
}
116893
function errorHandler() {
116894
    return new _angular_core__WEBPACK_IMPORTED_MODULE_1__["ErrorHandler"]();
116895
}
116896
function _document() {
116897
    return document;
116898
}
116899
/**
116900
 * The ng module for the browser.
116901
 *
116902
 *
116903
 */
116904
var BrowserModule = /** @class */ (function () {
116905
    function BrowserModule(parentModule) {
116906
        if (parentModule) {
116907
            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.");
116908
        }
116909
    }
116910
    /**
116911
     * Configures a browser-based application to transition from a server-rendered app, if
116912
     * one is present on the page. The specified parameters must include an application id,
116913
     * which must match between the client and server applications.
116914
     *
116915
     * @experimental
116916
     */
116917
    /**
116918
       * Configures a browser-based application to transition from a server-rendered app, if
116919
       * one is present on the page. The specified parameters must include an application id,
116920
       * which must match between the client and server applications.
116921
       *
116922
       * @experimental
116923
       */
116924
    BrowserModule.withServerTransition = /**
116925
       * Configures a browser-based application to transition from a server-rendered app, if
116926
       * one is present on the page. The specified parameters must include an application id,
116927
       * which must match between the client and server applications.
116928
       *
116929
       * @experimental
116930
       */
116931
    function (params) {
116932
        return {
116933
            ngModule: BrowserModule,
116934
            providers: [
116935
                { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"], useValue: params.appId },
116936
                { provide: TRANSITION_ID, useExisting: _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"] },
116937
                SERVER_TRANSITION_PROVIDERS,
116938
            ],
116939
        };
116940
    };
116941
    BrowserModule.decorators = [
116942
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{
116943
                    providers: [
116944
                        BROWSER_SANITIZATION_PROVIDERS,
116945
                        { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵAPP_ROOT"], useValue: true },
116946
                        { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ErrorHandler"], useFactory: errorHandler, deps: [] },
116947
                        { provide: EVENT_MANAGER_PLUGINS, useClass: DomEventsPlugin, multi: true },
116948
                        { provide: EVENT_MANAGER_PLUGINS, useClass: KeyEventsPlugin, multi: true },
116949
                        { provide: EVENT_MANAGER_PLUGINS, useClass: HammerGesturesPlugin, multi: true },
116950
                        { provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig },
116951
                        DomRendererFactory2,
116952
                        { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["RendererFactory2"], useExisting: DomRendererFactory2 },
116953
                        { provide: SharedStylesHost, useExisting: DomSharedStylesHost },
116954
                        DomSharedStylesHost,
116955
                        _angular_core__WEBPACK_IMPORTED_MODULE_1__["Testability"],
116956
                        EventManager,
116957
                        ELEMENT_PROBE_PROVIDERS,
116958
                        Meta,
116959
                        Title,
116960
                    ],
116961
                    exports: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationModule"]]
116962
                },] }
116963
    ];
116964
    /** @nocollapse */
116965
    BrowserModule.ctorParameters = function () { return [
116966
        { type: BrowserModule, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"] },] },
116967
    ]; };
116968
    return BrowserModule;
116969
}());
116970
 
116971
/**
116972
 * @license
116973
 * Copyright Google Inc. All Rights Reserved.
116974
 *
116975
 * Use of this source code is governed by an MIT-style license that can be
116976
 * found in the LICENSE file at https://angular.io/license
116977
 */
116978
var win = typeof window !== 'undefined' && window || {};
116979
 
116980
/**
116981
 * @license
116982
 * Copyright Google Inc. All Rights Reserved.
116983
 *
116984
 * Use of this source code is governed by an MIT-style license that can be
116985
 * found in the LICENSE file at https://angular.io/license
116986
 */
116987
var ChangeDetectionPerfRecord = /** @class */ (function () {
116988
    function ChangeDetectionPerfRecord(msPerTick, numTicks) {
116989
        this.msPerTick = msPerTick;
116990
        this.numTicks = numTicks;
116991
    }
116992
    return ChangeDetectionPerfRecord;
116993
}());
116994
/**
116995
 * Entry point for all Angular profiling-related debug tools. This object
116996
 * corresponds to the `ng.profiler` in the dev console.
116997
 */
116998
var AngularProfiler = /** @class */ (function () {
116999
    function AngularProfiler(ref) {
117000
        this.appRef = ref.injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationRef"]);
117001
    }
117002
    // tslint:disable:no-console
117003
    /**
117004
     * Exercises change detection in a loop and then prints the average amount of
117005
     * time in milliseconds how long a single round of change detection takes for
117006
     * the current state of the UI. It runs a minimum of 5 rounds for a minimum
117007
     * of 500 milliseconds.
117008
     *
117009
     * Optionally, a user may pass a `config` parameter containing a map of
117010
     * options. Supported options are:
117011
     *
117012
     * `record` (boolean) - causes the profiler to record a CPU profile while
117013
     * it exercises the change detector. Example:
117014
     *
117015
     * ```
117016
     * ng.profiler.timeChangeDetection({record: true})
117017
     * ```
117018
     */
117019
    // tslint:disable:no-console
117020
    /**
117021
       * Exercises change detection in a loop and then prints the average amount of
117022
       * time in milliseconds how long a single round of change detection takes for
117023
       * the current state of the UI. It runs a minimum of 5 rounds for a minimum
117024
       * of 500 milliseconds.
117025
       *
117026
       * Optionally, a user may pass a `config` parameter containing a map of
117027
       * options. Supported options are:
117028
       *
117029
       * `record` (boolean) - causes the profiler to record a CPU profile while
117030
       * it exercises the change detector. Example:
117031
       *
117032
       * ```
117033
       * ng.profiler.timeChangeDetection({record: true})
117034
       * ```
117035
       */
117036
    AngularProfiler.prototype.timeChangeDetection =
117037
    // tslint:disable:no-console
117038
    /**
117039
       * Exercises change detection in a loop and then prints the average amount of
117040
       * time in milliseconds how long a single round of change detection takes for
117041
       * the current state of the UI. It runs a minimum of 5 rounds for a minimum
117042
       * of 500 milliseconds.
117043
       *
117044
       * Optionally, a user may pass a `config` parameter containing a map of
117045
       * options. Supported options are:
117046
       *
117047
       * `record` (boolean) - causes the profiler to record a CPU profile while
117048
       * it exercises the change detector. Example:
117049
       *
117050
       * ```
117051
       * ng.profiler.timeChangeDetection({record: true})
117052
       * ```
117053
       */
117054
    function (config) {
117055
        var record = config && config['record'];
117056
        var profileName = 'Change Detection';
117057
        // Profiler is not available in Android browsers, nor in IE 9 without dev tools opened
117058
        var isProfilerAvailable = win.console.profile != null;
117059
        if (record && isProfilerAvailable) {
117060
            win.console.profile(profileName);
117061
        }
117062
        var start = getDOM().performanceNow();
117063
        var numTicks = 0;
117064
        while (numTicks < 5 || (getDOM().performanceNow() - start) < 500) {
117065
            this.appRef.tick();
117066
            numTicks++;
117067
        }
117068
        var end = getDOM().performanceNow();
117069
        if (record && isProfilerAvailable) {
117070
            // need to cast to <any> because type checker thinks there's no argument
117071
            // while in fact there is:
117072
            //
117073
            // https://developer.mozilla.org/en-US/docs/Web/API/Console/profileEnd
117074
            // need to cast to <any> because type checker thinks there's no argument
117075
            // while in fact there is:
117076
            //
117077
            // https://developer.mozilla.org/en-US/docs/Web/API/Console/profileEnd
117078
            win.console.profileEnd(profileName);
117079
        }
117080
        var msPerTick = (end - start) / numTicks;
117081
        win.console.log("ran " + numTicks + " change detection cycles");
117082
        win.console.log(msPerTick.toFixed(2) + " ms per check");
117083
        return new ChangeDetectionPerfRecord(msPerTick, numTicks);
117084
    };
117085
    return AngularProfiler;
117086
}());
117087
 
117088
/**
117089
 * @license
117090
 * Copyright Google Inc. All Rights Reserved.
117091
 *
117092
 * Use of this source code is governed by an MIT-style license that can be
117093
 * found in the LICENSE file at https://angular.io/license
117094
 */
117095
var PROFILER_GLOBAL_NAME = 'profiler';
117096
/**
117097
 * Enabled Angular debug tools that are accessible via your browser's
117098
 * developer console.
117099
 *
117100
 * Usage:
117101
 *
117102
 * 1. Open developer console (e.g. in Chrome Ctrl + Shift + j)
117103
 * 1. Type `ng.` (usually the console will show auto-complete suggestion)
117104
 * 1. Try the change detection profiler `ng.profiler.timeChangeDetection()`
117105
 *    then hit Enter.
117106
 *
117107
 * @experimental All debugging apis are currently experimental.
117108
 */
117109
function enableDebugTools(ref) {
117110
    exportNgVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref));
117111
    return ref;
117112
}
117113
/**
117114
 * Disables Angular tools.
117115
 *
117116
 * @experimental All debugging apis are currently experimental.
117117
 */
117118
function disableDebugTools() {
117119
    exportNgVar(PROFILER_GLOBAL_NAME, null);
117120
}
117121
 
117122
/**
117123
 * @license
117124
 * Copyright Google Inc. All Rights Reserved.
117125
 *
117126
 * Use of this source code is governed by an MIT-style license that can be
117127
 * found in the LICENSE file at https://angular.io/license
117128
 */
117129
function escapeHtml(text) {
117130
    var escapedText = {
117131
        '&': '&a;',
117132
        '"': '&q;',
117133
        '\'': '&s;',
117134
        '<': '&l;',
117135
        '>': '&g;',
117136
    };
117137
    return text.replace(/[&"'<>]/g, function (s) { return escapedText[s]; });
117138
}
117139
function unescapeHtml(text) {
117140
    var unescapedText = {
117141
        '&a;': '&',
117142
        '&q;': '"',
117143
        '&s;': '\'',
117144
        '&l;': '<',
117145
        '&g;': '>',
117146
    };
117147
    return text.replace(/&[^;]+;/g, function (s) { return unescapedText[s]; });
117148
}
117149
/**
117150
 * Create a `StateKey<T>` that can be used to store value of type T with `TransferState`.
117151
 *
117152
 * Example:
117153
 *
117154
 * ```
117155
 * const COUNTER_KEY = makeStateKey<number>('counter');
117156
 * let value = 10;
117157
 *
117158
 * transferState.set(COUNTER_KEY, value);
117159
 * ```
117160
 *
117161
 * @experimental
117162
 */
117163
function makeStateKey(key) {
117164
    return key;
117165
}
117166
/**
117167
 * A key value store that is transferred from the application on the server side to the application
117168
 * on the client side.
117169
 *
117170
 * `TransferState` will be available as an injectable token. To use it import
117171
 * `ServerTransferStateModule` on the server and `BrowserTransferStateModule` on the client.
117172
 *
117173
 * The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only
117174
 * boolean, number, string, null and non-class objects will be serialized and deserialzied in a
117175
 * non-lossy manner.
117176
 *
117177
 * @experimental
117178
 */
117179
var TransferState = /** @class */ (function () {
117180
    function TransferState() {
117181
        this.store = {};
117182
        this.onSerializeCallbacks = {};
117183
    }
117184
    /** @internal */
117185
    /** @internal */
117186
    TransferState.init = /** @internal */
117187
    function (initState) {
117188
        var transferState = new TransferState();
117189
        transferState.store = initState;
117190
        return transferState;
117191
    };
117192
    /**
117193
     * Get the value corresponding to a key. Return `defaultValue` if key is not found.
117194
     */
117195
    /**
117196
       * Get the value corresponding to a key. Return `defaultValue` if key is not found.
117197
       */
117198
    TransferState.prototype.get = /**
117199
       * Get the value corresponding to a key. Return `defaultValue` if key is not found.
117200
       */
117201
    function (key, defaultValue) {
117202
        return this.store[key] !== undefined ? this.store[key] : defaultValue;
117203
    };
117204
    /**
117205
     * Set the value corresponding to a key.
117206
     */
117207
    /**
117208
       * Set the value corresponding to a key.
117209
       */
117210
    TransferState.prototype.set = /**
117211
       * Set the value corresponding to a key.
117212
       */
117213
    function (key, value) { this.store[key] = value; };
117214
    /**
117215
     * Remove a key from the store.
117216
     */
117217
    /**
117218
       * Remove a key from the store.
117219
       */
117220
    TransferState.prototype.remove = /**
117221
       * Remove a key from the store.
117222
       */
117223
    function (key) { delete this.store[key]; };
117224
    /**
117225
     * Test whether a key exists in the store.
117226
     */
117227
    /**
117228
       * Test whether a key exists in the store.
117229
       */
117230
    TransferState.prototype.hasKey = /**
117231
       * Test whether a key exists in the store.
117232
       */
117233
    function (key) { return this.store.hasOwnProperty(key); };
117234
    /**
117235
     * Register a callback to provide the value for a key when `toJson` is called.
117236
     */
117237
    /**
117238
       * Register a callback to provide the value for a key when `toJson` is called.
117239
       */
117240
    TransferState.prototype.onSerialize = /**
117241
       * Register a callback to provide the value for a key when `toJson` is called.
117242
       */
117243
    function (key, callback) {
117244
        this.onSerializeCallbacks[key] = callback;
117245
    };
117246
    /**
117247
     * Serialize the current state of the store to JSON.
117248
     */
117249
    /**
117250
       * Serialize the current state of the store to JSON.
117251
       */
117252
    TransferState.prototype.toJson = /**
117253
       * Serialize the current state of the store to JSON.
117254
       */
117255
    function () {
117256
        // Call the onSerialize callbacks and put those values into the store.
117257
        for (var key in this.onSerializeCallbacks) {
117258
            if (this.onSerializeCallbacks.hasOwnProperty(key)) {
117259
                try {
117260
                    this.store[key] = this.onSerializeCallbacks[key]();
117261
                }
117262
                catch (e) {
117263
                    console.warn('Exception in onSerialize callback: ', e);
117264
                }
117265
            }
117266
        }
117267
        return JSON.stringify(this.store);
117268
    };
117269
    TransferState.decorators = [
117270
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }
117271
    ];
117272
    /** @nocollapse */
117273
    TransferState.ctorParameters = function () { return []; };
117274
    return TransferState;
117275
}());
117276
function initTransferState(doc, appId) {
117277
    // Locate the script tag with the JSON data transferred from the server.
117278
    // The id of the script tag is set to the Angular appId + 'state'.
117279
    var script = doc.getElementById(appId + '-state');
117280
    var initialState = {};
117281
    if (script && script.textContent) {
117282
        try {
117283
            initialState = JSON.parse(unescapeHtml(script.textContent));
117284
        }
117285
        catch (e) {
117286
            console.warn('Exception while restoring TransferState for app ' + appId, e);
117287
        }
117288
    }
117289
    return TransferState.init(initialState);
117290
}
117291
/**
117292
 * NgModule to install on the client side while using the `TransferState` to transfer state from
117293
 * server to client.
117294
 *
117295
 * @experimental
117296
 */
117297
var BrowserTransferStateModule = /** @class */ (function () {
117298
    function BrowserTransferStateModule() {
117299
    }
117300
    BrowserTransferStateModule.decorators = [
117301
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{
117302
                    providers: [{ provide: TransferState, useFactory: initTransferState, deps: [DOCUMENT$1, _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"]] }],
117303
                },] }
117304
    ];
117305
    /** @nocollapse */
117306
    BrowserTransferStateModule.ctorParameters = function () { return []; };
117307
    return BrowserTransferStateModule;
117308
}());
117309
 
117310
/**
117311
 * @license
117312
 * Copyright Google Inc. All Rights Reserved.
117313
 *
117314
 * Use of this source code is governed by an MIT-style license that can be
117315
 * found in the LICENSE file at https://angular.io/license
117316
 */
117317
/**
117318
 * Predicates for use with {@link DebugElement}'s query functions.
117319
 *
117320
 * @experimental All debugging apis are currently experimental.
117321
 */
117322
var By = /** @class */ (function () {
117323
    function By() {
117324
    }
117325
    /**
117326
     * Match all elements.
117327
     *
117328
     * ## Example
117329
     *
117330
     * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}
117331
     */
117332
    /**
117333
       * Match all elements.
117334
       *
117335
       * ## Example
117336
       *
117337
       * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}
117338
       */
117339
    By.all = /**
117340
       * Match all elements.
117341
       *
117342
       * ## Example
117343
       *
117344
       * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}
117345
       */
117346
    function () { return function (debugElement) { return true; }; };
117347
    /**
117348
     * Match elements by the given CSS selector.
117349
     *
117350
     * ## Example
117351
     *
117352
     * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}
117353
     */
117354
    /**
117355
       * Match elements by the given CSS selector.
117356
       *
117357
       * ## Example
117358
       *
117359
       * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}
117360
       */
117361
    By.css = /**
117362
       * Match elements by the given CSS selector.
117363
       *
117364
       * ## Example
117365
       *
117366
       * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}
117367
       */
117368
    function (selector) {
117369
        return function (debugElement) {
117370
            return debugElement.nativeElement != null ?
117371
                getDOM().elementMatches(debugElement.nativeElement, selector) :
117372
                false;
117373
        };
117374
    };
117375
    /**
117376
     * Match elements that have the given directive present.
117377
     *
117378
     * ## Example
117379
     *
117380
     * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}
117381
     */
117382
    /**
117383
       * Match elements that have the given directive present.
117384
       *
117385
       * ## Example
117386
       *
117387
       * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}
117388
       */
117389
    By.directive = /**
117390
       * Match elements that have the given directive present.
117391
       *
117392
       * ## Example
117393
       *
117394
       * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}
117395
       */
117396
    function (type) {
117397
        return function (debugElement) { return debugElement.providerTokens.indexOf(type) !== -1; };
117398
    };
117399
    return By;
117400
}());
117401
 
117402
/**
117403
 * @license
117404
 * Copyright Google Inc. All Rights Reserved.
117405
 *
117406
 * Use of this source code is governed by an MIT-style license that can be
117407
 * found in the LICENSE file at https://angular.io/license
117408
 */
117409
 
117410
/**
117411
 * @license
117412
 * Copyright Google Inc. All Rights Reserved.
117413
 *
117414
 * Use of this source code is governed by an MIT-style license that can be
117415
 * found in the LICENSE file at https://angular.io/license
117416
 */
117417
var VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Version"]('6.0.3');
117418
 
117419
/**
117420
 * @license
117421
 * Copyright Google Inc. All Rights Reserved.
117422
 *
117423
 * Use of this source code is governed by an MIT-style license that can be
117424
 * found in the LICENSE file at https://angular.io/license
117425
 */
117426
 
117427
/**
117428
 * @license
117429
 * Copyright Google Inc. All Rights Reserved.
117430
 *
117431
 * Use of this source code is governed by an MIT-style license that can be
117432
 * found in the LICENSE file at https://angular.io/license
117433
 */
117434
 
117435
// This file only reexports content of the `src` folder. Keep it that way.
117436
 
117437
/**
117438
 * @license
117439
 * Copyright Google Inc. All Rights Reserved.
117440
 *
117441
 * Use of this source code is governed by an MIT-style license that can be
117442
 * found in the LICENSE file at https://angular.io/license
117443
 */
117444
 
117445
/**
117446
 * Generated bundle index. Do not edit.
117447
 */
117448
 
117449
 
117450
//# sourceMappingURL=platform-browser.js.map
117451
 
117452
 
117453
/***/ }),
117454
 
117455
/***/ "./node_modules/@asymmetrik/ngx-leaflet-draw/dist/index.js":
117456
/*!*****************************************************************!*\
117457
  !*** ./node_modules/@asymmetrik/ngx-leaflet-draw/dist/index.js ***!
117458
  \*****************************************************************/
117459
/*! exports provided: LeafletDrawModule, LeafletDrawDirective */
117460
/***/ (function(module, __webpack_exports__, __webpack_require__) {
117461
 
117462
"use strict";
117463
__webpack_require__.r(__webpack_exports__);
117464
/* harmony import */ var _leaflet_draw_leaflet_draw_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./leaflet-draw/leaflet-draw.module */ "./node_modules/@asymmetrik/ngx-leaflet-draw/dist/leaflet-draw/leaflet-draw.module.js");
117465
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LeafletDrawModule", function() { return _leaflet_draw_leaflet_draw_module__WEBPACK_IMPORTED_MODULE_0__["LeafletDrawModule"]; });
117466
 
117467
/* harmony import */ var _leaflet_draw_core_leaflet_draw_directive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./leaflet-draw/core/leaflet-draw.directive */ "./node_modules/@asymmetrik/ngx-leaflet-draw/dist/leaflet-draw/core/leaflet-draw.directive.js");
117468
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LeafletDrawDirective", function() { return _leaflet_draw_core_leaflet_draw_directive__WEBPACK_IMPORTED_MODULE_1__["LeafletDrawDirective"]; });
117469
 
117470
 
117471
 
117472
//# sourceMappingURL=index.js.map
117473
 
117474
/***/ }),
117475
 
117476
/***/ "./node_modules/@asymmetrik/ngx-leaflet-draw/dist/leaflet-draw/core/leaflet-draw.directive.js":
117477
/*!****************************************************************************************************!*\
117478
  !*** ./node_modules/@asymmetrik/ngx-leaflet-draw/dist/leaflet-draw/core/leaflet-draw.directive.js ***!
117479
  \****************************************************************************************************/
117480
/*! exports provided: LeafletDrawDirective */
117481
/***/ (function(module, __webpack_exports__, __webpack_require__) {
117482
 
117483
"use strict";
117484
__webpack_require__.r(__webpack_exports__);
117485
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LeafletDrawDirective", function() { return LeafletDrawDirective; });
117486
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
117487
/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! leaflet */ "./node_modules/leaflet/dist/leaflet-src.js");
117488
/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_1__);
117489
/* harmony import */ var leaflet_draw__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! leaflet-draw */ "./node_modules/leaflet-draw/dist/leaflet.draw.js");
117490
/* harmony import */ var leaflet_draw__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(leaflet_draw__WEBPACK_IMPORTED_MODULE_2__);
117491
/* harmony import */ var _asymmetrik_ngx_leaflet__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @asymmetrik/ngx-leaflet */ "./node_modules/@asymmetrik/ngx-leaflet/dist/index.js");
117492
 
117493
 
117494
 
117495
 
117496
var LeafletDrawDirective = /** @class */ (function () {
117497
    function LeafletDrawDirective(leafletDirective) {
117498
        this.drawOptions = null;
117499
        // Configure callback function for the map
117500
        this.drawReady = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
117501
        this.leafletDirective = new _asymmetrik_ngx_leaflet__WEBPACK_IMPORTED_MODULE_3__["LeafletDirectiveWrapper"](leafletDirective);
117502
    }
117503
    LeafletDrawDirective.prototype.ngOnInit = function () {
117504
        var _this = this;
117505
        this.leafletDirective.init();
117506
        // Initialize the draw options (in case they weren't provided)
117507
        this.drawOptions = this.initializeDrawOptions(this.drawOptions);
117508
        // Create the control
117509
        this.drawControl = new leaflet__WEBPACK_IMPORTED_MODULE_1__["Control"].Draw(this.drawOptions);
117510
        // Pull out the feature group for convenience
117511
        this.featureGroup = this.drawOptions.edit.featureGroup;
117512
        // Add the control to the map
117513
        this.leafletDirective.getMap().addControl(this.drawControl);
117514
        // Register the main handler for events coming from the draw plugin
117515
        this.leafletDirective.getMap().on(leaflet__WEBPACK_IMPORTED_MODULE_1__["Draw"].Event.CREATED, function (e) {
117516
            var layer = e.layer;
117517
            _this.featureGroup.addLayer(layer);
117518
        });
117519
        // Notify others that the draw control has been created
117520
        this.drawReady.emit(this.drawControl);
117521
    };
117522
    LeafletDrawDirective.prototype.ngOnDestroy = function () {
117523
        this.leafletDirective.getMap().removeControl(this.drawControl);
117524
    };
117525
    LeafletDrawDirective.prototype.ngOnChanges = function (changes) {
117526
        // No changes being handled currently
117527
    };
117528
    LeafletDrawDirective.prototype.getDrawControl = function () {
117529
        return this.drawControl;
117530
    };
117531
    LeafletDrawDirective.prototype.initializeDrawOptions = function (options) {
117532
        // Ensure the options have a featureGroup
117533
        if (null == options) {
117534
            options = {
117535
                edit: null
117536
            };
117537
        }
117538
        if (null == options.edit) {
117539
            options.edit = {
117540
                featureGroup: null
117541
            };
117542
        }
117543
        if (null == options.edit.featureGroup) {
117544
            // No feature group was provided, so we're going to add it ourselves
117545
            options.edit.featureGroup = leaflet__WEBPACK_IMPORTED_MODULE_1__["featureGroup"]();
117546
            this.leafletDirective.getMap().addLayer(options.edit.featureGroup);
117547
        }
117548
        return options;
117549
    };
117550
    LeafletDrawDirective.decorators = [
117551
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
117552
                    selector: '[leafletDraw]'
117553
                },] },
117554
    ];
117555
    /** @nocollapse */
117556
    LeafletDrawDirective.ctorParameters = function () { return [
117557
        { type: _asymmetrik_ngx_leaflet__WEBPACK_IMPORTED_MODULE_3__["LeafletDirective"], },
117558
    ]; };
117559
    LeafletDrawDirective.propDecorators = {
117560
        "drawOptions": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['leafletDrawOptions',] },],
117561
        "drawReady": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"], args: ['leafletDrawReady',] },],
117562
    };
117563
    return LeafletDrawDirective;
117564
}());
117565
 
117566
//# sourceMappingURL=leaflet-draw.directive.js.map
117567
 
117568
/***/ }),
117569
 
117570
/***/ "./node_modules/@asymmetrik/ngx-leaflet-draw/dist/leaflet-draw/leaflet-draw.module.js":
117571
/*!********************************************************************************************!*\
117572
  !*** ./node_modules/@asymmetrik/ngx-leaflet-draw/dist/leaflet-draw/leaflet-draw.module.js ***!
117573
  \********************************************************************************************/
117574
/*! exports provided: LeafletDrawModule */
117575
/***/ (function(module, __webpack_exports__, __webpack_require__) {
117576
 
117577
"use strict";
117578
__webpack_require__.r(__webpack_exports__);
117579
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LeafletDrawModule", function() { return LeafletDrawModule; });
117580
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
117581
/* harmony import */ var _asymmetrik_ngx_leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @asymmetrik/ngx-leaflet */ "./node_modules/@asymmetrik/ngx-leaflet/dist/index.js");
117582
/* harmony import */ var _core_leaflet_draw_directive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./core/leaflet-draw.directive */ "./node_modules/@asymmetrik/ngx-leaflet-draw/dist/leaflet-draw/core/leaflet-draw.directive.js");
117583
 
117584
 
117585
 
117586
var LeafletDrawModule = /** @class */ (function () {
117587
    function LeafletDrawModule() {
117588
    }
117589
    LeafletDrawModule.forRoot = function () {
117590
        return { ngModule: LeafletDrawModule, providers: [] };
117591
    };
117592
    LeafletDrawModule.decorators = [
117593
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
117594
                    imports: [
117595
                        _asymmetrik_ngx_leaflet__WEBPACK_IMPORTED_MODULE_1__["LeafletModule"]
117596
                    ],
117597
                    exports: [
117598
                        _core_leaflet_draw_directive__WEBPACK_IMPORTED_MODULE_2__["LeafletDrawDirective"]
117599
                    ],
117600
                    declarations: [
117601
                        _core_leaflet_draw_directive__WEBPACK_IMPORTED_MODULE_2__["LeafletDrawDirective"]
117602
                    ]
117603
                },] },
117604
    ];
117605
    return LeafletDrawModule;
117606
}());
117607
 
117608
//# sourceMappingURL=leaflet-draw.module.js.map
117609
 
117610
/***/ }),
117611
 
117612
/***/ "./node_modules/@asymmetrik/ngx-leaflet/dist/index.js":
117613
/*!************************************************************!*\
117614
  !*** ./node_modules/@asymmetrik/ngx-leaflet/dist/index.js ***!
117615
  \************************************************************/
117616
/*! exports provided: LeafletModule, LeafletDirective, LeafletDirectiveWrapper, LeafletTileLayerDefinition */
117617
/***/ (function(module, __webpack_exports__, __webpack_require__) {
117618
 
117619
"use strict";
117620
__webpack_require__.r(__webpack_exports__);
117621
/* harmony import */ var _leaflet_leaflet_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./leaflet/leaflet.module */ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/leaflet.module.js");
117622
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LeafletModule", function() { return _leaflet_leaflet_module__WEBPACK_IMPORTED_MODULE_0__["LeafletModule"]; });
117623
 
117624
/* harmony import */ var _leaflet_core_leaflet_directive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./leaflet/core/leaflet.directive */ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/core/leaflet.directive.js");
117625
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LeafletDirective", function() { return _leaflet_core_leaflet_directive__WEBPACK_IMPORTED_MODULE_1__["LeafletDirective"]; });
117626
 
117627
/* harmony import */ var _leaflet_core_leaflet_directive_wrapper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./leaflet/core/leaflet.directive.wrapper */ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/core/leaflet.directive.wrapper.js");
117628
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LeafletDirectiveWrapper", function() { return _leaflet_core_leaflet_directive_wrapper__WEBPACK_IMPORTED_MODULE_2__["LeafletDirectiveWrapper"]; });
117629
 
117630
/* harmony import */ var _leaflet_layers_leaflet_tile_layer_definition_model__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./leaflet/layers/leaflet-tile-layer-definition.model */ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/leaflet-tile-layer-definition.model.js");
117631
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LeafletTileLayerDefinition", function() { return _leaflet_layers_leaflet_tile_layer_definition_model__WEBPACK_IMPORTED_MODULE_3__["LeafletTileLayerDefinition"]; });
117632
 
117633
 
117634
 
117635
 
117636
 
117637
//# sourceMappingURL=index.js.map
117638
 
117639
/***/ }),
117640
 
117641
/***/ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/core/leaflet.directive.js":
117642
/*!*************************************************************************************!*\
117643
  !*** ./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/core/leaflet.directive.js ***!
117644
  \*************************************************************************************/
117645
/*! exports provided: LeafletDirective */
117646
/***/ (function(module, __webpack_exports__, __webpack_require__) {
117647
 
117648
"use strict";
117649
__webpack_require__.r(__webpack_exports__);
117650
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LeafletDirective", function() { return LeafletDirective; });
117651
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
117652
/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! leaflet */ "./node_modules/leaflet/dist/leaflet-src.js");
117653
/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_1__);
117654
/* harmony import */ var _leaflet_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./leaflet.util */ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/core/leaflet.util.js");
117655
 
117656
 
117657
 
117658
var LeafletDirective = /** @class */ (function () {
117659
    function LeafletDirective(element, zone) {
117660
        // Nothing here
117661
        this.element = element;
117662
        this.zone = zone;
117663
        this.DEFAULT_ZOOM = 1;
117664
        this.DEFAULT_CENTER = Object(leaflet__WEBPACK_IMPORTED_MODULE_1__["latLng"])(38.907192, -77.036871);
117665
        this.DEFAULT_FPZ_OPTIONS = {};
117666
        this.fitBoundsOptions = this.DEFAULT_FPZ_OPTIONS;
117667
        this.panOptions = this.DEFAULT_FPZ_OPTIONS;
117668
        this.zoomOptions = this.DEFAULT_FPZ_OPTIONS;
117669
        this.zoomPanOptions = this.DEFAULT_FPZ_OPTIONS;
117670
        // Default configuration
117671
        this.options = {};
117672
        // Configure callback function for the map
117673
        this.mapReady = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
117674
        this.zoomChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
117675
        this.centerChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
117676
        // Mouse Map Events
117677
        this.onClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
117678
        this.onDoubleClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
117679
        this.onMouseDown = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
117680
        this.onMouseUp = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
117681
        this.onMouseMove = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
117682
        this.onMouseOver = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
117683
        // Map Move Events
117684
        this.onMapMove = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
117685
        this.onMapMoveStart = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
117686
        this.onMapMoveEnd = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
117687
        // Map Zoom Events
117688
        this.onMapZoom = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
117689
        this.onMapZoomStart = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
117690
        this.onMapZoomEnd = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
117691
    }
117692
    LeafletDirective.prototype.ngOnInit = function () {
117693
        var _this = this;
117694
        // Create the map outside of angular so the various map events don't trigger change detection
117695
        this.zone.runOutsideAngular(function () {
117696
            // Create the map with some reasonable defaults
117697
            // Create the map with some reasonable defaults
117698
            _this.map = Object(leaflet__WEBPACK_IMPORTED_MODULE_1__["map"])(_this.element.nativeElement, _this.options);
117699
            _this.addMapEventListeners();
117700
        });
117701
        // Only setView if there is a center/zoom
117702
        if (null != this.center && null != this.zoom) {
117703
            this.setView(this.center, this.zoom);
117704
        }
117705
        // Set up all the initial settings
117706
        if (null != this.fitBounds) {
117707
            this.setFitBounds(this.fitBounds);
117708
        }
117709
        if (null != this.maxBounds) {
117710
            this.setMaxBounds(this.maxBounds);
117711
        }
117712
        if (null != this.minZoom) {
117713
            this.setMinZoom(this.minZoom);
117714
        }
117715
        if (null != this.maxZoom) {
117716
            this.setMaxZoom(this.maxZoom);
117717
        }
117718
        this.doResize();
117719
        // Fire map ready event
117720
        this.mapReady.emit(this.map);
117721
    };
117722
    LeafletDirective.prototype.ngOnChanges = function (changes) {
117723
        /*
117724
                 * The following code is to address an issue with our (basic) implementation of
117725
                 * zooming and panning. From our testing, it seems that a pan operation followed
117726
                 * by a zoom operation in the same thread will interfere with eachother. The zoom
117727
                 * operation interrupts/cancels the pan, resulting in a final center point that is
117728
                 * inaccurate. The solution seems to be to either separate them with a timeout or
117729
                  * to collapse them into a setView call.
117730
                 */
117731
        // Zooming and Panning
117732
        if (changes['zoom'] && changes['center'] && null != this.zoom && null != this.center) {
117733
            this.setView(changes['center'].currentValue, changes['zoom'].currentValue);
117734
        }
117735
        else if (changes['zoom']) {
117736
            this.setZoom(changes['zoom'].currentValue);
117737
        }
117738
        else if (changes['center']) {
117739
            this.setCenter(changes['center'].currentValue);
117740
        }
117741
        // Other options
117742
        if (changes['fitBounds']) {
117743
            this.setFitBounds(changes['fitBounds'].currentValue);
117744
        }
117745
        if (changes['maxBounds']) {
117746
            this.setMaxBounds(changes['maxBounds'].currentValue);
117747
        }
117748
        if (changes['minZoom']) {
117749
            this.setMinZoom(changes['minZoom'].currentValue);
117750
        }
117751
        if (changes['maxZoom']) {
117752
            this.setMaxZoom(changes['maxZoom'].currentValue);
117753
        }
117754
    };
117755
    LeafletDirective.prototype.getMap = function () {
117756
        return this.map;
117757
    };
117758
    LeafletDirective.prototype.onResize = function () {
117759
        this.delayResize();
117760
    };
117761
    LeafletDirective.prototype.addMapEventListeners = function () {
117762
        var _this = this;
117763
        // Add all the pass-through mouse event handlers
117764
        this.map.on('click', function (e) { return _leaflet_util__WEBPACK_IMPORTED_MODULE_2__["LeafletUtil"].handleEvent(_this.zone, _this.onClick, e); });
117765
        this.map.on('dblclick', function (e) { return _leaflet_util__WEBPACK_IMPORTED_MODULE_2__["LeafletUtil"].handleEvent(_this.zone, _this.onDoubleClick, e); });
117766
        this.map.on('mousedown', function (e) { return _leaflet_util__WEBPACK_IMPORTED_MODULE_2__["LeafletUtil"].handleEvent(_this.zone, _this.onMouseDown, e); });
117767
        this.map.on('mouseup', function (e) { return _leaflet_util__WEBPACK_IMPORTED_MODULE_2__["LeafletUtil"].handleEvent(_this.zone, _this.onMouseUp, e); });
117768
        this.map.on('mouseover', function (e) { return _leaflet_util__WEBPACK_IMPORTED_MODULE_2__["LeafletUtil"].handleEvent(_this.zone, _this.onMouseOver, e); });
117769
        this.map.on('mousemove', function (e) { return _leaflet_util__WEBPACK_IMPORTED_MODULE_2__["LeafletUtil"].handleEvent(_this.zone, _this.onMouseMove, e); });
117770
        this.map.on('zoomstart', function (e) { return _leaflet_util__WEBPACK_IMPORTED_MODULE_2__["LeafletUtil"].handleEvent(_this.zone, _this.onMapZoomStart, e); });
117771
        this.map.on('zoom', function (e) { return _leaflet_util__WEBPACK_IMPORTED_MODULE_2__["LeafletUtil"].handleEvent(_this.zone, _this.onMapZoom, e); });
117772
        this.map.on('zoomend', function (e) { return _leaflet_util__WEBPACK_IMPORTED_MODULE_2__["LeafletUtil"].handleEvent(_this.zone, _this.onMapZoomEnd, e); });
117773
        this.map.on('movestart', function (e) { return _leaflet_util__WEBPACK_IMPORTED_MODULE_2__["LeafletUtil"].handleEvent(_this.zone, _this.onMapMoveStart, e); });
117774
        this.map.on('move', function (e) { return _leaflet_util__WEBPACK_IMPORTED_MODULE_2__["LeafletUtil"].handleEvent(_this.zone, _this.onMapMove, e); });
117775
        this.map.on('moveend', function (e) { return _leaflet_util__WEBPACK_IMPORTED_MODULE_2__["LeafletUtil"].handleEvent(_this.zone, _this.onMapMoveEnd, e); });
117776
        // Update any things for which we provide output bindings
117777
        this.map.on('zoomend moveend', function () {
117778
            var zoom = _this.map.getZoom();
117779
            if (zoom !== _this.zoom) {
117780
                _this.zoom = zoom;
117781
                _leaflet_util__WEBPACK_IMPORTED_MODULE_2__["LeafletUtil"].handleEvent(_this.zone, _this.zoomChange, zoom);
117782
            }
117783
            var center = _this.map.getCenter();
117784
            if (null != center || null != _this.center) {
117785
                if (((null == center || null == _this.center) && center !== _this.center)
117786
                    || (center.lat !== _this.center.lat || center.lng !== _this.center.lng)) {
117787
                    _this.center = center;
117788
                    _leaflet_util__WEBPACK_IMPORTED_MODULE_2__["LeafletUtil"].handleEvent(_this.zone, _this.centerChange, center);
117789
                }
117790
            }
117791
        });
117792
    };
117793
    /**
117794
     * Resize the map to fit it's parent container
117795
     */
117796
    /**
117797
         * Resize the map to fit it's parent container
117798
         */
117799
    LeafletDirective.prototype.doResize = /**
117800
         * Resize the map to fit it's parent container
117801
         */
117802
    function () {
117803
        var _this = this;
117804
        // Run this outside of angular so the map events stay outside of angular
117805
        this.zone.runOutsideAngular(function () {
117806
            // Invalidate the map size to trigger it to update itself
117807
            // Invalidate the map size to trigger it to update itself
117808
            _this.map.invalidateSize({});
117809
        });
117810
    };
117811
    /**
117812
     * Manage a delayed resize of the component
117813
     */
117814
    /**
117815
         * Manage a delayed resize of the component
117816
         */
117817
    LeafletDirective.prototype.delayResize = /**
117818
         * Manage a delayed resize of the component
117819
         */
117820
    function () {
117821
        if (null != this.resizeTimer) {
117822
            clearTimeout(this.resizeTimer);
117823
        }
117824
        this.resizeTimer = setTimeout(this.doResize.bind(this), 200);
117825
    };
117826
    /**
117827
     * Set the view (center/zoom) all at once
117828
     * @param center The new center
117829
     * @param zoom The new zoom level
117830
     */
117831
    /**
117832
         * Set the view (center/zoom) all at once
117833
         * @param center The new center
117834
         * @param zoom The new zoom level
117835
         */
117836
    LeafletDirective.prototype.setView = /**
117837
         * Set the view (center/zoom) all at once
117838
         * @param center The new center
117839
         * @param zoom The new zoom level
117840
         */
117841
    function (center, zoom) {
117842
        if (this.map && null != center && null != zoom) {
117843
            this.map.setView(center, zoom, this.zoomPanOptions);
117844
        }
117845
    };
117846
    /**
117847
     * Set the map zoom level
117848
     * @param zoom the new zoom level for the map
117849
     */
117850
    /**
117851
         * Set the map zoom level
117852
         * @param zoom the new zoom level for the map
117853
         */
117854
    LeafletDirective.prototype.setZoom = /**
117855
         * Set the map zoom level
117856
         * @param zoom the new zoom level for the map
117857
         */
117858
    function (zoom) {
117859
        if (this.map && null != zoom) {
117860
            this.map.setZoom(zoom, this.zoomOptions);
117861
        }
117862
    };
117863
    /**
117864
     * Set the center of the map
117865
     * @param center the center point
117866
     */
117867
    /**
117868
         * Set the center of the map
117869
         * @param center the center point
117870
         */
117871
    LeafletDirective.prototype.setCenter = /**
117872
         * Set the center of the map
117873
         * @param center the center point
117874
         */
117875
    function (center) {
117876
        if (this.map && null != center) {
117877
            this.map.panTo(center, this.panOptions);
117878
        }
117879
    };
117880
    /**
117881
     * Fit the map to the bounds
117882
     * @param latLngBounds the boundary to set
117883
     */
117884
    /**
117885
         * Fit the map to the bounds
117886
         * @param latLngBounds the boundary to set
117887
         */
117888
    LeafletDirective.prototype.setFitBounds = /**
117889
         * Fit the map to the bounds
117890
         * @param latLngBounds the boundary to set
117891
         */
117892
    function (latLngBounds) {
117893
        if (this.map && null != latLngBounds) {
117894
            this.map.fitBounds(latLngBounds, this.fitBoundsOptions);
117895
        }
117896
    };
117897
    /**
117898
     * Set the map's max bounds
117899
     * @param latLngBounds the boundary to set
117900
     */
117901
    /**
117902
         * Set the map's max bounds
117903
         * @param latLngBounds the boundary to set
117904
         */
117905
    LeafletDirective.prototype.setMaxBounds = /**
117906
         * Set the map's max bounds
117907
         * @param latLngBounds the boundary to set
117908
         */
117909
    function (latLngBounds) {
117910
        if (this.map && null != latLngBounds) {
117911
            this.map.setMaxBounds(latLngBounds);
117912
        }
117913
    };
117914
    /**
117915
     * Set the map's min zoom
117916
     * @param number the new min zoom
117917
     */
117918
    /**
117919
         * Set the map's min zoom
117920
         * @param number the new min zoom
117921
         */
117922
    LeafletDirective.prototype.setMinZoom = /**
117923
         * Set the map's min zoom
117924
         * @param number the new min zoom
117925
         */
117926
    function (zoom) {
117927
        if (this.map && null != zoom) {
117928
            this.map.setMinZoom(zoom);
117929
        }
117930
    };
117931
    /**
117932
     * Set the map's min zoom
117933
     * @param number the new min zoom
117934
     */
117935
    /**
117936
         * Set the map's min zoom
117937
         * @param number the new min zoom
117938
         */
117939
    LeafletDirective.prototype.setMaxZoom = /**
117940
         * Set the map's min zoom
117941
         * @param number the new min zoom
117942
         */
117943
    function (zoom) {
117944
        if (this.map && null != zoom) {
117945
            this.map.setMaxZoom(zoom);
117946
        }
117947
    };
117948
    LeafletDirective.decorators = [
117949
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
117950
                    selector: '[leaflet]'
117951
                },] },
117952
    ];
117953
    /** @nocollapse */
117954
    LeafletDirective.ctorParameters = function () { return [
117955
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
117956
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], },
117957
    ]; };
117958
    LeafletDirective.propDecorators = {
117959
        "fitBoundsOptions": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['leafletFitBoundsOptions',] },],
117960
        "panOptions": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['leafletPanOptions',] },],
117961
        "zoomOptions": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['leafletZoomOptions',] },],
117962
        "zoomPanOptions": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['leafletZoomPanOptions',] },],
117963
        "options": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['leafletOptions',] },],
117964
        "mapReady": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"], args: ['leafletMapReady',] },],
117965
        "zoom": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['leafletZoom',] },],
117966
        "zoomChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"], args: ['leafletZoomChange',] },],
117967
        "center": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['leafletCenter',] },],
117968
        "centerChange": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"], args: ['leafletCenterChange',] },],
117969
        "fitBounds": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['leafletFitBounds',] },],
117970
        "maxBounds": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['leafletMaxBounds',] },],
117971
        "minZoom": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['leafletMinZoom',] },],
117972
        "maxZoom": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['leafletMaxZoom',] },],
117973
        "onClick": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"], args: ['leafletClick',] },],
117974
        "onDoubleClick": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"], args: ['leafletDoubleClick',] },],
117975
        "onMouseDown": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"], args: ['leafletMouseDown',] },],
117976
        "onMouseUp": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"], args: ['leafletMouseUp',] },],
117977
        "onMouseMove": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"], args: ['leafletMouseMove',] },],
117978
        "onMouseOver": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"], args: ['leafletMouseOver',] },],
117979
        "onMapMove": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"], args: ['leafletMapMove',] },],
117980
        "onMapMoveStart": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"], args: ['leafletMapMoveStart',] },],
117981
        "onMapMoveEnd": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"], args: ['leafletMapMoveEnd',] },],
117982
        "onMapZoom": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"], args: ['leafletMapZoom',] },],
117983
        "onMapZoomStart": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"], args: ['leafletMapZoomStart',] },],
117984
        "onMapZoomEnd": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"], args: ['leafletMapZoomEnd',] },],
117985
        "onResize": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"], args: ['window:resize', [],] },],
117986
    };
117987
    return LeafletDirective;
117988
}());
117989
 
117990
//# sourceMappingURL=leaflet.directive.js.map
117991
 
117992
/***/ }),
117993
 
117994
/***/ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/core/leaflet.directive.wrapper.js":
117995
/*!*********************************************************************************************!*\
117996
  !*** ./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/core/leaflet.directive.wrapper.js ***!
117997
  \*********************************************************************************************/
117998
/*! exports provided: LeafletDirectiveWrapper */
117999
/***/ (function(module, __webpack_exports__, __webpack_require__) {
118000
 
118001
"use strict";
118002
__webpack_require__.r(__webpack_exports__);
118003
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LeafletDirectiveWrapper", function() { return LeafletDirectiveWrapper; });
118004
var LeafletDirectiveWrapper = /** @class */ (function () {
118005
    function LeafletDirectiveWrapper(leafletDirective) {
118006
        this.leafletDirective = leafletDirective;
118007
    }
118008
    LeafletDirectiveWrapper.prototype.init = function () {
118009
        // Nothing for now
118010
    };
118011
    LeafletDirectiveWrapper.prototype.getMap = function () {
118012
        return this.leafletDirective.getMap();
118013
    };
118014
    return LeafletDirectiveWrapper;
118015
}());
118016
 
118017
//# sourceMappingURL=leaflet.directive.wrapper.js.map
118018
 
118019
/***/ }),
118020
 
118021
/***/ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/core/leaflet.util.js":
118022
/*!********************************************************************************!*\
118023
  !*** ./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/core/leaflet.util.js ***!
118024
  \********************************************************************************/
118025
/*! exports provided: LeafletUtil */
118026
/***/ (function(module, __webpack_exports__, __webpack_require__) {
118027
 
118028
"use strict";
118029
__webpack_require__.r(__webpack_exports__);
118030
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LeafletUtil", function() { return LeafletUtil; });
118031
var LeafletUtil = /** @class */ (function () {
118032
    function LeafletUtil() {
118033
    }
118034
    LeafletUtil.mapToArray = function (map) {
118035
        var toReturn = [];
118036
        for (var k in map) {
118037
            if (map.hasOwnProperty(k)) {
118038
                toReturn.push(map[k]);
118039
            }
118040
        }
118041
        return toReturn;
118042
    };
118043
    LeafletUtil.handleEvent = function (zone, eventEmitter, event) {
118044
        // Don't want to emit if there are no observers
118045
        if (0 < eventEmitter.observers.length) {
118046
            zone.run(function () {
118047
                eventEmitter.emit(event);
118048
            });
118049
        }
118050
    };
118051
    return LeafletUtil;
118052
}());
118053
 
118054
//# sourceMappingURL=leaflet.util.js.map
118055
 
118056
/***/ }),
118057
 
118058
/***/ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/base/leaflet-baselayers.directive.js":
118059
/*!*******************************************************************************************************!*\
118060
  !*** ./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/base/leaflet-baselayers.directive.js ***!
118061
  \*******************************************************************************************************/
118062
/*! exports provided: LeafletBaseLayersDirective */
118063
/***/ (function(module, __webpack_exports__, __webpack_require__) {
118064
 
118065
"use strict";
118066
__webpack_require__.r(__webpack_exports__);
118067
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LeafletBaseLayersDirective", function() { return LeafletBaseLayersDirective; });
118068
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
118069
/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! leaflet */ "./node_modules/leaflet/dist/leaflet-src.js");
118070
/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_1__);
118071
/* harmony import */ var _core_leaflet_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/leaflet.util */ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/core/leaflet.util.js");
118072
/* harmony import */ var _core_leaflet_directive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/leaflet.directive */ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/core/leaflet.directive.js");
118073
/* harmony import */ var _core_leaflet_directive_wrapper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/leaflet.directive.wrapper */ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/core/leaflet.directive.wrapper.js");
118074
/* harmony import */ var _control_leaflet_control_layers_wrapper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../control/leaflet-control-layers.wrapper */ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/control/leaflet-control-layers.wrapper.js");
118075
 
118076
 
118077
 
118078
 
118079
 
118080
 
118081
/**
118082
 * Baselayers directive
118083
 *
118084
 * This directive is provided as a convenient way to add baselayers to the map. The input accepts
118085
 * a key-value map of layer name -> layer. Mutable changed are detected. On changes, a differ is
118086
 * used to determine what changed so that layers are appropriately added or removed. This directive
118087
 * will also add the layers control so users can switch between available base layers.
118088
 *
118089
 * To specify which layer to show as the 'active' baselayer, you will want to add it to the map
118090
 * using the layers directive. Otherwise, the plugin will use the last one it sees.
118091
 */
118092
var LeafletBaseLayersDirective = /** @class */ (function () {
118093
    function LeafletBaseLayersDirective(leafletDirective, differs, zone) {
118094
        this.differs = differs;
118095
        this.zone = zone;
118096
        // Output for once the layers control is ready
118097
        this.layersControlReady = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
118098
        this.leafletDirective = new _core_leaflet_directive_wrapper__WEBPACK_IMPORTED_MODULE_4__["LeafletDirectiveWrapper"](leafletDirective);
118099
        this.controlLayers = new _control_leaflet_control_layers_wrapper__WEBPACK_IMPORTED_MODULE_5__["LeafletControlLayersWrapper"](this.zone, this.layersControlReady);
118100
        this.baseLayersDiffer = this.differs.find({}).create();
118101
    }
118102
    Object.defineProperty(LeafletBaseLayersDirective.prototype, "baseLayers", {
118103
        get: function () {
118104
            return this.baseLayersValue;
118105
        },
118106
        set:
118107
        // Set/get baseLayers
118108
        function (v) {
118109
            this.baseLayersValue = v;
118110
            this.updateBaseLayers();
118111
        },
118112
        enumerable: true,
118113
        configurable: true
118114
    });
118115
    LeafletBaseLayersDirective.prototype.ngOnDestroy = function () {
118116
        this.baseLayers = {};
118117
        this.controlLayers.getLayersControl().remove();
118118
    };
118119
    LeafletBaseLayersDirective.prototype.ngOnInit = function () {
118120
        var _this = this;
118121
        // Init the map
118122
        this.leafletDirective.init();
118123
        // Create the control outside angular to prevent events from triggering chnage detection
118124
        this.zone.runOutsideAngular(function () {
118125
            // Initially configure the controlLayers
118126
            // Initially configure the controlLayers
118127
            _this.controlLayers
118128
                .init({}, _this.layersControlOptions)
118129
                .addTo(_this.leafletDirective.getMap());
118130
        });
118131
        this.updateBaseLayers();
118132
    };
118133
    LeafletBaseLayersDirective.prototype.ngDoCheck = function () {
118134
        this.updateBaseLayers();
118135
    };
118136
    LeafletBaseLayersDirective.prototype.updateBaseLayers = function () {
118137
        var map = this.leafletDirective.getMap();
118138
        var layersControl = this.controlLayers.getLayersControl();
118139
        if (null != map && null != layersControl && null != this.baseLayersDiffer) {
118140
            var changes = this.baseLayersDiffer.diff(this.baseLayersValue);
118141
            var results = this.controlLayers.applyBaseLayerChanges(changes);
118142
            if (results.changed()) {
118143
                this.syncBaseLayer();
118144
            }
118145
        }
118146
    };
118147
    /**
118148
     * Check the current base layer and change it to the new one if necessary
118149
     */
118150
    /**
118151
         * Check the current base layer and change it to the new one if necessary
118152
         */
118153
    LeafletBaseLayersDirective.prototype.syncBaseLayer = /**
118154
         * Check the current base layer and change it to the new one if necessary
118155
         */
118156
    function () {
118157
        var _this = this;
118158
        var map = this.leafletDirective.getMap();
118159
        var layers = _core_leaflet_util__WEBPACK_IMPORTED_MODULE_2__["LeafletUtil"].mapToArray(this.baseLayers);
118160
        var foundLayer;
118161
        // Search all the layers in the map to see if we can find them in the baselayer array
118162
        map.eachLayer(function (l) {
118163
            foundLayer = layers.find(function (bl) { return (l === bl); });
118164
        });
118165
        // Did we find the layer?
118166
        if (null != foundLayer) {
118167
            // Yes - set the baselayer to the one we found
118168
            this.baseLayer = foundLayer;
118169
        }
118170
        else {
118171
            // No - set the baselayer to the first in the array and add it to the map
118172
            if (layers.length > 0) {
118173
                this.baseLayer = layers[0];
118174
                // Add layers outside of angular to prevent events from triggering change detection
118175
                this.zone.runOutsideAngular(function () {
118176
                    _this.baseLayer.addTo(map);
118177
                });
118178
            }
118179
        }
118180
    };
118181
    LeafletBaseLayersDirective.decorators = [
118182
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
118183
                    selector: '[leafletBaseLayers]'
118184
                },] },
118185
    ];
118186
    /** @nocollapse */
118187
    LeafletBaseLayersDirective.ctorParameters = function () { return [
118188
        { type: _core_leaflet_directive__WEBPACK_IMPORTED_MODULE_3__["LeafletDirective"], },
118189
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"], },
118190
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], },
118191
    ]; };
118192
    LeafletBaseLayersDirective.propDecorators = {
118193
        "baseLayers": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['leafletBaseLayers',] },],
118194
        "layersControlOptions": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['leafletLayersControlOptions',] },],
118195
        "layersControlReady": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"], args: ['leafletLayersControlReady',] },],
118196
    };
118197
    return LeafletBaseLayersDirective;
118198
}());
118199
 
118200
//# sourceMappingURL=leaflet-baselayers.directive.js.map
118201
 
118202
/***/ }),
118203
 
118204
/***/ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/control/leaflet-control-layers-changes.model.js":
118205
/*!******************************************************************************************************************!*\
118206
  !*** ./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/control/leaflet-control-layers-changes.model.js ***!
118207
  \******************************************************************************************************************/
118208
/*! exports provided: LeafletControlLayersChanges */
118209
/***/ (function(module, __webpack_exports__, __webpack_require__) {
118210
 
118211
"use strict";
118212
__webpack_require__.r(__webpack_exports__);
118213
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LeafletControlLayersChanges", function() { return LeafletControlLayersChanges; });
118214
var LeafletControlLayersChanges = /** @class */ (function () {
118215
    function LeafletControlLayersChanges() {
118216
        this.layersRemoved = 0;
118217
        this.layersChanged = 0;
118218
        this.layersAdded = 0;
118219
    }
118220
    LeafletControlLayersChanges.prototype.changed = function () {
118221
        return !(this.layersRemoved === 0 && this.layersChanged === 0 && this.layersAdded === 0);
118222
    };
118223
    return LeafletControlLayersChanges;
118224
}());
118225
 
118226
//# sourceMappingURL=leaflet-control-layers-changes.model.js.map
118227
 
118228
/***/ }),
118229
 
118230
/***/ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/control/leaflet-control-layers-config.model.js":
118231
/*!*****************************************************************************************************************!*\
118232
  !*** ./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/control/leaflet-control-layers-config.model.js ***!
118233
  \*****************************************************************************************************************/
118234
/*! exports provided: LeafletControlLayersConfig */
118235
/***/ (function(module, __webpack_exports__, __webpack_require__) {
118236
 
118237
"use strict";
118238
__webpack_require__.r(__webpack_exports__);
118239
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LeafletControlLayersConfig", function() { return LeafletControlLayersConfig; });
118240
var LeafletControlLayersConfig = /** @class */ (function () {
118241
    function LeafletControlLayersConfig() {
118242
        this.baseLayers = {};
118243
        this.overlays = {};
118244
    }
118245
    return LeafletControlLayersConfig;
118246
}());
118247
 
118248
//# sourceMappingURL=leaflet-control-layers-config.model.js.map
118249
 
118250
/***/ }),
118251
 
118252
/***/ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/control/leaflet-control-layers.directive.js":
118253
/*!**************************************************************************************************************!*\
118254
  !*** ./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/control/leaflet-control-layers.directive.js ***!
118255
  \**************************************************************************************************************/
118256
/*! exports provided: LeafletLayersControlDirective */
118257
/***/ (function(module, __webpack_exports__, __webpack_require__) {
118258
 
118259
"use strict";
118260
__webpack_require__.r(__webpack_exports__);
118261
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LeafletLayersControlDirective", function() { return LeafletLayersControlDirective; });
118262
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
118263
/* harmony import */ var _core_leaflet_directive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/leaflet.directive */ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/core/leaflet.directive.js");
118264
/* harmony import */ var _core_leaflet_directive_wrapper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/leaflet.directive.wrapper */ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/core/leaflet.directive.wrapper.js");
118265
/* harmony import */ var _leaflet_control_layers_wrapper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./leaflet-control-layers.wrapper */ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/control/leaflet-control-layers.wrapper.js");
118266
/* harmony import */ var _leaflet_control_layers_config_model__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./leaflet-control-layers-config.model */ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/control/leaflet-control-layers-config.model.js");
118267
 
118268
 
118269
 
118270
 
118271
 
118272
/**
118273
 * Layers Control
118274
 *
118275
 * This directive is used to configure the layers control. The input accepts an object with two
118276
 * key-value maps of layer name -> layer. Mutable changes are detected. On changes, a differ is
118277
 * used to determine what changed so that layers are appropriately added or removed.
118278
 *
118279
 * To specify which layer to show as the 'active' baselayer, you will want to add it to the map
118280
 * using the layers directive. Otherwise, the last one it sees will be used.
118281
 */
118282
var LeafletLayersControlDirective = /** @class */ (function () {
118283
    function LeafletLayersControlDirective(leafletDirective, differs, zone) {
118284
        this.differs = differs;
118285
        this.zone = zone;
118286
        this.layersControlReady = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
118287
        this.leafletDirective = new _core_leaflet_directive_wrapper__WEBPACK_IMPORTED_MODULE_2__["LeafletDirectiveWrapper"](leafletDirective);
118288
        this.controlLayers = new _leaflet_control_layers_wrapper__WEBPACK_IMPORTED_MODULE_3__["LeafletControlLayersWrapper"](this.zone, this.layersControlReady);
118289
        // Generate differs
118290
        this.baseLayersDiffer = this.differs.find({}).create();
118291
        this.overlaysDiffer = this.differs.find({}).create();
118292
    }
118293
    Object.defineProperty(LeafletLayersControlDirective.prototype, "layersControlConfig", {
118294
        get: function () {
118295
            return this.layersControlConfigValue;
118296
        },
118297
        set: function (v) {
118298
            // Validation/init stuff
118299
            if (null == v) {
118300
                v = new _leaflet_control_layers_config_model__WEBPACK_IMPORTED_MODULE_4__["LeafletControlLayersConfig"]();
118301
            }
118302
            if (null == v.baseLayers) {
118303
                v.baseLayers = {};
118304
            }
118305
            if (null == v.overlays) {
118306
                v.overlays = {};
118307
            }
118308
            // Store the value
118309
            this.layersControlConfigValue = v;
118310
            // Update the map
118311
            this.updateLayers();
118312
        },
118313
        enumerable: true,
118314
        configurable: true
118315
    });
118316
    LeafletLayersControlDirective.prototype.ngOnInit = function () {
118317
        var _this = this;
118318
        // Init the map
118319
        this.leafletDirective.init();
118320
        // Set up control outside of angular to avoid change detection when using the control
118321
        this.zone.runOutsideAngular(function () {
118322
            // Set up all the initial settings
118323
            // Set up all the initial settings
118324
            _this.controlLayers
118325
                .init({}, _this.layersControlOptions)
118326
                .addTo(_this.leafletDirective.getMap());
118327
        });
118328
        this.updateLayers();
118329
    };
118330
    LeafletLayersControlDirective.prototype.ngOnDestroy = function () {
118331
        this.layersControlConfig = { baseLayers: {}, overlays: {} };
118332
        this.controlLayers.getLayersControl().remove();
118333
    };
118334
    LeafletLayersControlDirective.prototype.ngDoCheck = function () {
118335
        this.updateLayers();
118336
    };
118337
    LeafletLayersControlDirective.prototype.updateLayers = function () {
118338
        var map = this.leafletDirective.getMap();
118339
        var layersControl = this.controlLayers.getLayersControl();
118340
        if (null != map && null != layersControl) {
118341
            // Run the baselayers differ
118342
            if (null != this.baseLayersDiffer && null != this.layersControlConfigValue.baseLayers) {
118343
                var changes = this.baseLayersDiffer.diff(this.layersControlConfigValue.baseLayers);
118344
                this.controlLayers.applyBaseLayerChanges(changes);
118345
            }
118346
            // Run the overlays differ
118347
            if (null != this.overlaysDiffer && null != this.layersControlConfigValue.overlays) {
118348
                var changes = this.overlaysDiffer.diff(this.layersControlConfigValue.overlays);
118349
                this.controlLayers.applyOverlayChanges(changes);
118350
            }
118351
        }
118352
    };
118353
    LeafletLayersControlDirective.decorators = [
118354
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
118355
                    selector: '[leafletLayersControl]'
118356
                },] },
118357
    ];
118358
    /** @nocollapse */
118359
    LeafletLayersControlDirective.ctorParameters = function () { return [
118360
        { type: _core_leaflet_directive__WEBPACK_IMPORTED_MODULE_1__["LeafletDirective"], },
118361
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"], },
118362
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], },
118363
    ]; };
118364
    LeafletLayersControlDirective.propDecorators = {
118365
        "layersControlConfig": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['leafletLayersControl',] },],
118366
        "layersControlOptions": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['leafletLayersControlOptions',] },],
118367
        "layersControlReady": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"], args: ['leafletLayersControlReady',] },],
118368
    };
118369
    return LeafletLayersControlDirective;
118370
}());
118371
 
118372
//# sourceMappingURL=leaflet-control-layers.directive.js.map
118373
 
118374
/***/ }),
118375
 
118376
/***/ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/control/leaflet-control-layers.wrapper.js":
118377
/*!************************************************************************************************************!*\
118378
  !*** ./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/control/leaflet-control-layers.wrapper.js ***!
118379
  \************************************************************************************************************/
118380
/*! exports provided: LeafletControlLayersWrapper */
118381
/***/ (function(module, __webpack_exports__, __webpack_require__) {
118382
 
118383
"use strict";
118384
__webpack_require__.r(__webpack_exports__);
118385
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LeafletControlLayersWrapper", function() { return LeafletControlLayersWrapper; });
118386
/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! leaflet */ "./node_modules/leaflet/dist/leaflet-src.js");
118387
/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_0__);
118388
/* harmony import */ var _leaflet_control_layers_changes_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./leaflet-control-layers-changes.model */ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/control/leaflet-control-layers-changes.model.js");
118389
 
118390
 
118391
var LeafletControlLayersWrapper = /** @class */ (function () {
118392
    function LeafletControlLayersWrapper(zone, layersControlReady) {
118393
        this.zone = zone;
118394
        this.layersControlReady = layersControlReady;
118395
    }
118396
    LeafletControlLayersWrapper.prototype.getLayersControl = function () {
118397
        return this.layersControl;
118398
    };
118399
    LeafletControlLayersWrapper.prototype.init = function (controlConfig, controlOptions) {
118400
        var _this = this;
118401
        var baseLayers = controlConfig.baseLayers || {};
118402
        var overlays = controlConfig.overlays || {};
118403
        // Create the control outside of angular to ensure events don't trigger change detection
118404
        this.zone.runOutsideAngular(function () {
118405
            _this.layersControl = leaflet__WEBPACK_IMPORTED_MODULE_0__["control"].layers(baseLayers, overlays, controlOptions);
118406
        });
118407
        this.layersControlReady.emit(this.layersControl);
118408
        return this.layersControl;
118409
    };
118410
    LeafletControlLayersWrapper.prototype.applyBaseLayerChanges = function (changes) {
118411
        var results = new _leaflet_control_layers_changes_model__WEBPACK_IMPORTED_MODULE_1__["LeafletControlLayersChanges"]();
118412
        if (null != this.layersControl) {
118413
            results = this.applyChanges(changes, this.layersControl.addBaseLayer);
118414
        }
118415
        return results;
118416
    };
118417
    LeafletControlLayersWrapper.prototype.applyOverlayChanges = function (changes) {
118418
        var results = new _leaflet_control_layers_changes_model__WEBPACK_IMPORTED_MODULE_1__["LeafletControlLayersChanges"]();
118419
        if (null != this.layersControl) {
118420
            results = this.applyChanges(changes, this.layersControl.addOverlay);
118421
        }
118422
        return results;
118423
    };
118424
    LeafletControlLayersWrapper.prototype.applyChanges = function (changes, addFn) {
118425
        var _this = this;
118426
        var results = new _leaflet_control_layers_changes_model__WEBPACK_IMPORTED_MODULE_1__["LeafletControlLayersChanges"]();
118427
        if (null != changes) {
118428
            // All layer management is outside angular to avoid layer events from triggering change detection
118429
            this.zone.runOutsideAngular(function () {
118430
                changes.forEachChangedItem(function (c) {
118431
                    _this.layersControl.removeLayer(c.previousValue);
118432
                    addFn.call(_this.layersControl, c.currentValue, c.key);
118433
                    results.layersChanged++;
118434
                });
118435
                changes.forEachRemovedItem(function (c) {
118436
                    _this.layersControl.removeLayer(c.previousValue);
118437
                    results.layersRemoved++;
118438
                });
118439
                changes.forEachAddedItem(function (c) {
118440
                    addFn.call(_this.layersControl, c.currentValue, c.key);
118441
                    results.layersAdded++;
118442
                });
118443
            });
118444
        }
118445
        return results;
118446
    };
118447
    return LeafletControlLayersWrapper;
118448
}());
118449
 
118450
//# sourceMappingURL=leaflet-control-layers.wrapper.js.map
118451
 
118452
/***/ }),
118453
 
118454
/***/ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/leaflet-layer.directive.js":
118455
/*!*********************************************************************************************!*\
118456
  !*** ./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/leaflet-layer.directive.js ***!
118457
  \*********************************************************************************************/
118458
/*! exports provided: LeafletLayerDirective */
118459
/***/ (function(module, __webpack_exports__, __webpack_require__) {
118460
 
118461
"use strict";
118462
__webpack_require__.r(__webpack_exports__);
118463
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LeafletLayerDirective", function() { return LeafletLayerDirective; });
118464
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
118465
/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! leaflet */ "./node_modules/leaflet/dist/leaflet-src.js");
118466
/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_1__);
118467
/* harmony import */ var _core_leaflet_directive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/leaflet.directive */ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/core/leaflet.directive.js");
118468
/* harmony import */ var _core_leaflet_directive_wrapper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/leaflet.directive.wrapper */ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/core/leaflet.directive.wrapper.js");
118469
/* harmony import */ var _core_leaflet_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/leaflet.util */ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/core/leaflet.util.js");
118470
 
118471
 
118472
 
118473
 
118474
 
118475
/**
118476
 * Layer directive
118477
 *
118478
 * This directive is used to directly control a single map layer. The purpose of this directive is to
118479
 * be used as part of a child structural directive of the map element.
118480
 *
118481
 */
118482
var LeafletLayerDirective = /** @class */ (function () {
118483
    function LeafletLayerDirective(leafletDirective, zone) {
118484
        this.zone = zone;
118485
        // Layer Events
118486
        this.onAdd = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
118487
        this.onRemove = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
118488
        this.leafletDirective = new _core_leaflet_directive_wrapper__WEBPACK_IMPORTED_MODULE_3__["LeafletDirectiveWrapper"](leafletDirective);
118489
    }
118490
    LeafletLayerDirective.prototype.ngOnInit = function () {
118491
        // Init the map
118492
        this.leafletDirective.init();
118493
    };
118494
    LeafletLayerDirective.prototype.ngOnDestroy = function () {
118495
        this.layer.remove();
118496
    };
118497
    LeafletLayerDirective.prototype.ngOnChanges = function (changes) {
118498
        var _this = this;
118499
        if (changes['layer']) {
118500
            // Update the layer
118501
            var p_1 = changes['layer'].previousValue;
118502
            var n_1 = changes['layer'].currentValue;
118503
            this.zone.runOutsideAngular(function () {
118504
                if (null != p_1) {
118505
                    p_1.remove();
118506
                }
118507
                if (null != n_1) {
118508
                    _this.addLayerEventListeners(n_1);
118509
                    _this.leafletDirective.getMap().addLayer(n_1);
118510
                }
118511
            });
118512
        }
118513
    };
118514
    LeafletLayerDirective.prototype.addLayerEventListeners = function (l) {
118515
        var _this = this;
118516
        l.on('add', function (e) { return _core_leaflet_util__WEBPACK_IMPORTED_MODULE_4__["LeafletUtil"].handleEvent(_this.zone, _this.onAdd, e); });
118517
        l.on('remove', function (e) { return _core_leaflet_util__WEBPACK_IMPORTED_MODULE_4__["LeafletUtil"].handleEvent(_this.zone, _this.onRemove, e); });
118518
    };
118519
    LeafletLayerDirective.decorators = [
118520
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
118521
                    selector: '[leafletLayer]'
118522
                },] },
118523
    ];
118524
    /** @nocollapse */
118525
    LeafletLayerDirective.ctorParameters = function () { return [
118526
        { type: _core_leaflet_directive__WEBPACK_IMPORTED_MODULE_2__["LeafletDirective"], },
118527
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], },
118528
    ]; };
118529
    LeafletLayerDirective.propDecorators = {
118530
        "layer": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['leafletLayer',] },],
118531
        "onAdd": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"], args: ['leafletLayerAdd',] },],
118532
        "onRemove": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"], args: ['leafletLayerRemove',] },],
118533
    };
118534
    return LeafletLayerDirective;
118535
}());
118536
 
118537
//# sourceMappingURL=leaflet-layer.directive.js.map
118538
 
118539
/***/ }),
118540
 
118541
/***/ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/leaflet-layers.directive.js":
118542
/*!**********************************************************************************************!*\
118543
  !*** ./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/leaflet-layers.directive.js ***!
118544
  \**********************************************************************************************/
118545
/*! exports provided: LeafletLayersDirective */
118546
/***/ (function(module, __webpack_exports__, __webpack_require__) {
118547
 
118548
"use strict";
118549
__webpack_require__.r(__webpack_exports__);
118550
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LeafletLayersDirective", function() { return LeafletLayersDirective; });
118551
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
118552
/* harmony import */ var _core_leaflet_directive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/leaflet.directive */ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/core/leaflet.directive.js");
118553
/* harmony import */ var _core_leaflet_directive_wrapper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/leaflet.directive.wrapper */ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/core/leaflet.directive.wrapper.js");
118554
 
118555
 
118556
 
118557
/**
118558
 * Layers directive
118559
 *
118560
 * This directive is used to directly control map layers. As changes are made to the input array of
118561
 * layers, the map is synched to the array. As layers are added or removed from the input array, they
118562
 * are also added or removed from the map. The input array is treated as immutable. To detect changes,
118563
 * you must change the array instance.
118564
 *
118565
 * Important Note: The input layers array is assumed to be immutable. This means you need to use an
118566
 * immutable array implementation or create a new copy of your array when you make changes, otherwise
118567
 * this directive won't detect the change. This is by design. It's for performance reasons. Change
118568
 * detection of mutable arrays requires diffing the state of the array on every DoCheck cycle, which
118569
 * is extremely expensive from a time complexity perspective.
118570
 *
118571
 */
118572
var LeafletLayersDirective = /** @class */ (function () {
118573
    function LeafletLayersDirective(leafletDirective, differs, zone) {
118574
        this.differs = differs;
118575
        this.zone = zone;
118576
        this.leafletDirective = new _core_leaflet_directive_wrapper__WEBPACK_IMPORTED_MODULE_2__["LeafletDirectiveWrapper"](leafletDirective);
118577
        this.layersDiffer = this.differs.find([]).create();
118578
    }
118579
    Object.defineProperty(LeafletLayersDirective.prototype, "layers", {
118580
        get: function () {
118581
            return this.layersValue;
118582
        },
118583
        set:
118584
        // Set/get the layers
118585
        function (v) {
118586
            this.layersValue = v;
118587
            // Now that we have a differ, do an immediate layer update
118588
            this.updateLayers();
118589
        },
118590
        enumerable: true,
118591
        configurable: true
118592
    });
118593
    LeafletLayersDirective.prototype.ngDoCheck = function () {
118594
        this.updateLayers();
118595
    };
118596
    LeafletLayersDirective.prototype.ngOnInit = function () {
118597
        // Init the map
118598
        this.leafletDirective.init();
118599
        // Update layers once the map is ready
118600
        this.updateLayers();
118601
    };
118602
    LeafletLayersDirective.prototype.ngOnDestroy = function () {
118603
        this.layers = [];
118604
    };
118605
    /**
118606
     * Update the state of the layers.
118607
     * We use an iterable differ to synchronize the map layers with the state of the bound layers array.
118608
     * This is important because it allows us to react to changes to the contents of the array as well
118609
     * as changes to the actual array instance.
118610
     */
118611
    /**
118612
         * Update the state of the layers.
118613
         * We use an iterable differ to synchronize the map layers with the state of the bound layers array.
118614
         * This is important because it allows us to react to changes to the contents of the array as well
118615
         * as changes to the actual array instance.
118616
         */
118617
    LeafletLayersDirective.prototype.updateLayers = /**
118618
         * Update the state of the layers.
118619
         * We use an iterable differ to synchronize the map layers with the state of the bound layers array.
118620
         * This is important because it allows us to react to changes to the contents of the array as well
118621
         * as changes to the actual array instance.
118622
         */
118623
    function () {
118624
        var map = this.leafletDirective.getMap();
118625
        if (null != map && null != this.layersDiffer) {
118626
            var changes_1 = this.layersDiffer.diff(this.layersValue);
118627
            if (null != changes_1) {
118628
                // Run outside angular to ensure layer events don't trigger change detection
118629
                this.zone.runOutsideAngular(function () {
118630
                    changes_1.forEachRemovedItem(function (c) {
118631
                        map.removeLayer(c.item);
118632
                    });
118633
                    changes_1.forEachAddedItem(function (c) {
118634
                        map.addLayer(c.item);
118635
                    });
118636
                });
118637
            }
118638
        }
118639
    };
118640
    LeafletLayersDirective.decorators = [
118641
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
118642
                    selector: '[leafletLayers]'
118643
                },] },
118644
    ];
118645
    /** @nocollapse */
118646
    LeafletLayersDirective.ctorParameters = function () { return [
118647
        { type: _core_leaflet_directive__WEBPACK_IMPORTED_MODULE_1__["LeafletDirective"], },
118648
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"], },
118649
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], },
118650
    ]; };
118651
    LeafletLayersDirective.propDecorators = {
118652
        "layers": [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['leafletLayers',] },],
118653
    };
118654
    return LeafletLayersDirective;
118655
}());
118656
 
118657
//# sourceMappingURL=leaflet-layers.directive.js.map
118658
 
118659
/***/ }),
118660
 
118661
/***/ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/leaflet-tile-layer-definition.model.js":
118662
/*!*********************************************************************************************************!*\
118663
  !*** ./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/leaflet-tile-layer-definition.model.js ***!
118664
  \*********************************************************************************************************/
118665
/*! exports provided: LeafletTileLayerDefinition */
118666
/***/ (function(module, __webpack_exports__, __webpack_require__) {
118667
 
118668
"use strict";
118669
__webpack_require__.r(__webpack_exports__);
118670
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LeafletTileLayerDefinition", function() { return LeafletTileLayerDefinition; });
118671
/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! leaflet */ "./node_modules/leaflet/dist/leaflet-src.js");
118672
/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_0__);
118673
 
118674
var LeafletTileLayerDefinition = /** @class */ (function () {
118675
    function LeafletTileLayerDefinition(type, url, options) {
118676
        this.type = type;
118677
        this.url = url;
118678
        this.options = options;
118679
    }
118680
    /**
118681
     * Creates a TileLayer from the provided definition. This is a convenience function
118682
     * to help with generating layers from objects.
118683
     *
118684
     * @param layerDef The layer to create
118685
     * @returns {TileLayer} The TileLayer that has been created
118686
     */
118687
    /**
118688
         * Creates a TileLayer from the provided definition. This is a convenience function
118689
         * to help with generating layers from objects.
118690
         *
118691
         * @param layerDef The layer to create
118692
         * @returns {TileLayer} The TileLayer that has been created
118693
         */
118694
    LeafletTileLayerDefinition.createTileLayer = /**
118695
         * Creates a TileLayer from the provided definition. This is a convenience function
118696
         * to help with generating layers from objects.
118697
         *
118698
         * @param layerDef The layer to create
118699
         * @returns {TileLayer} The TileLayer that has been created
118700
         */
118701
    function (layerDef) {
118702
        var layer;
118703
        switch (layerDef.type) {
118704
            case 'xyz':
118705
                layer = Object(leaflet__WEBPACK_IMPORTED_MODULE_0__["tileLayer"])(layerDef.url, layerDef.options);
118706
                break;
118707
            case 'wms':
118708
            default:
118709
                layer = leaflet__WEBPACK_IMPORTED_MODULE_0__["tileLayer"].wms(layerDef.url, layerDef.options);
118710
                break;
118711
        }
118712
        return layer;
118713
    };
118714
    /**
118715
     * Creates a TileLayer for each key in the incoming map. This is a convenience function
118716
     * for generating an associative array of layers from an associative array of objects
118717
     *
118718
     * @param layerDefs A map of key to tile layer definition
118719
     * @returns {{[p: string]: TileLayer}} A new map of key to TileLayer
118720
     */
118721
    /**
118722
         * Creates a TileLayer for each key in the incoming map. This is a convenience function
118723
         * for generating an associative array of layers from an associative array of objects
118724
         *
118725
         * @param layerDefs A map of key to tile layer definition
118726
         * @returns {{[p: string]: TileLayer}} A new map of key to TileLayer
118727
         */
118728
    LeafletTileLayerDefinition.createTileLayers = /**
118729
         * Creates a TileLayer for each key in the incoming map. This is a convenience function
118730
         * for generating an associative array of layers from an associative array of objects
118731
         *
118732
         * @param layerDefs A map of key to tile layer definition
118733
         * @returns {{[p: string]: TileLayer}} A new map of key to TileLayer
118734
         */
118735
    function (layerDefs) {
118736
        var layers = {};
118737
        for (var k in layerDefs) {
118738
            if (layerDefs.hasOwnProperty(k)) {
118739
                layers[k] = (LeafletTileLayerDefinition.createTileLayer(layerDefs[k]));
118740
            }
118741
        }
118742
        return layers;
118743
    };
118744
    /**
118745
     * Create a Tile Layer from the current state of this object
118746
     *
118747
     * @returns {TileLayer} A new TileLayer
118748
     */
118749
    /**
118750
         * Create a Tile Layer from the current state of this object
118751
         *
118752
         * @returns {TileLayer} A new TileLayer
118753
         */
118754
    LeafletTileLayerDefinition.prototype.createTileLayer = /**
118755
         * Create a Tile Layer from the current state of this object
118756
         *
118757
         * @returns {TileLayer} A new TileLayer
118758
         */
118759
    function () {
118760
        return LeafletTileLayerDefinition.createTileLayer(this);
118761
    };
118762
    return LeafletTileLayerDefinition;
118763
}());
118764
 
118765
//# sourceMappingURL=leaflet-tile-layer-definition.model.js.map
118766
 
118767
/***/ }),
118768
 
118769
/***/ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/leaflet.module.js":
118770
/*!*****************************************************************************!*\
118771
  !*** ./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/leaflet.module.js ***!
118772
  \*****************************************************************************/
118773
/*! exports provided: LeafletModule */
118774
/***/ (function(module, __webpack_exports__, __webpack_require__) {
118775
 
118776
"use strict";
118777
__webpack_require__.r(__webpack_exports__);
118778
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LeafletModule", function() { return LeafletModule; });
118779
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
118780
/* harmony import */ var _core_leaflet_directive__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./core/leaflet.directive */ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/core/leaflet.directive.js");
118781
/* harmony import */ var _layers_leaflet_layer_directive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./layers/leaflet-layer.directive */ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/leaflet-layer.directive.js");
118782
/* harmony import */ var _layers_leaflet_layers_directive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layers/leaflet-layers.directive */ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/leaflet-layers.directive.js");
118783
/* harmony import */ var _layers_control_leaflet_control_layers_directive__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./layers/control/leaflet-control-layers.directive */ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/control/leaflet-control-layers.directive.js");
118784
/* harmony import */ var _layers_base_leaflet_baselayers_directive__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./layers/base/leaflet-baselayers.directive */ "./node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/layers/base/leaflet-baselayers.directive.js");
118785
 
118786
 
118787
 
118788
 
118789
 
118790
 
118791
var LeafletModule = /** @class */ (function () {
118792
    function LeafletModule() {
118793
    }
118794
    LeafletModule.forRoot = function () {
118795
        return { ngModule: LeafletModule, providers: [] };
118796
    };
118797
    LeafletModule.decorators = [
118798
        { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
118799
                    exports: [
118800
                        _core_leaflet_directive__WEBPACK_IMPORTED_MODULE_1__["LeafletDirective"],
118801
                        _layers_leaflet_layer_directive__WEBPACK_IMPORTED_MODULE_2__["LeafletLayerDirective"],
118802
                        _layers_leaflet_layers_directive__WEBPACK_IMPORTED_MODULE_3__["LeafletLayersDirective"],
118803
                        _layers_control_leaflet_control_layers_directive__WEBPACK_IMPORTED_MODULE_4__["LeafletLayersControlDirective"],
118804
                        _layers_base_leaflet_baselayers_directive__WEBPACK_IMPORTED_MODULE_5__["LeafletBaseLayersDirective"]
118805
                    ],
118806
                    declarations: [
118807
                        _core_leaflet_directive__WEBPACK_IMPORTED_MODULE_1__["LeafletDirective"],
118808
                        _layers_leaflet_layer_directive__WEBPACK_IMPORTED_MODULE_2__["LeafletLayerDirective"],
118809
                        _layers_leaflet_layers_directive__WEBPACK_IMPORTED_MODULE_3__["LeafletLayersDirective"],
118810
                        _layers_control_leaflet_control_layers_directive__WEBPACK_IMPORTED_MODULE_4__["LeafletLayersControlDirective"],
118811
                        _layers_base_leaflet_baselayers_directive__WEBPACK_IMPORTED_MODULE_5__["LeafletBaseLayersDirective"]
118812
                    ]
118813
                },] },
118814
    ];
118815
    return LeafletModule;
118816
}());
118817
 
118818
//# sourceMappingURL=leaflet.module.js.map
118819
 
118820
/***/ }),
118821
 
118822
/***/ "./node_modules/leaflet-draw/dist/leaflet.draw.js":
118823
/*!********************************************************!*\
118824
  !*** ./node_modules/leaflet-draw/dist/leaflet.draw.js ***!
118825
  \********************************************************/
118826
/*! no static exports found */
118827
/***/ (function(module, exports) {
118828
 
118829
/*
118830
 Leaflet.draw 0.4.14, a plugin that adds drawing and editing tools to Leaflet powered maps.
118831
 (c) 2012-2017, Jacob Toye, Jon West, Smartrak, Leaflet
118832
 
118833
 https://github.com/Leaflet/Leaflet.draw
118834
 http://leafletjs.com
118835
 */
118836
!function(t,e,i){function o(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}L.drawVersion="0.4.14",L.Draw={},L.drawLocal={draw:{toolbar:{actions:{title:"Cancel drawing",text:"Cancel"},finish:{title:"Finish drawing",text:"Finish"},undo:{title:"Delete last point drawn",text:"Delete last point"},buttons:{polyline:"Draw a polyline",polygon:"Draw a polygon",rectangle:"Draw a rectangle",circle:"Draw a circle",marker:"Draw a marker",circlemarker:"Draw a circlemarker"}},handlers:{circle:{tooltip:{start:"Click and drag to draw circle."},radius:"Radius"},circlemarker:{tooltip:{start:"Click map to place circle marker."}},marker:{tooltip:{start:"Click map to place marker."}},polygon:{tooltip:{start:"Click to start drawing shape.",cont:"Click to continue drawing shape.",end:"Click first point to close this shape."}},polyline:{error:"<strong>Error:</strong> shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes",text:"Save"},cancel:{title:"Cancel editing, discards all changes",text:"Cancel"},clearAll:{title:"Clear all layers",text:"Clear All"}},buttons:{edit:"Edit layers",editDisabled:"No layers to edit",remove:"Delete layers",removeDisabled:"No layers to delete"}},handlers:{edit:{tooltip:{text:"Drag handles or markers to edit features.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove."}}}}},L.Draw.Event={},L.Draw.Event.CREATED="draw:created",L.Draw.Event.EDITED="draw:edited",L.Draw.Event.DELETED="draw:deleted",L.Draw.Event.DRAWSTART="draw:drawstart",L.Draw.Event.DRAWSTOP="draw:drawstop",L.Draw.Event.DRAWVERTEX="draw:drawvertex",L.Draw.Event.EDITSTART="draw:editstart",L.Draw.Event.EDITMOVE="draw:editmove",L.Draw.Event.EDITRESIZE="draw:editresize",L.Draw.Event.EDITVERTEX="draw:editvertex",L.Draw.Event.EDITSTOP="draw:editstop",L.Draw.Event.DELETESTART="draw:deletestart",L.Draw.Event.DELETESTOP="draw:deletestop",L.Draw.Event.TOOLBAROPENED="draw:toolbaropened",L.Draw.Event.TOOLBARCLOSED="draw:toolbarclosed",L.Draw.Event.MARKERCONTEXT="draw:markercontext",L.Draw=L.Draw||{},L.Draw.Feature=L.Handler.extend({initialize:function(t,e){this._map=t,this._container=t._container,this._overlayPane=t._panes.overlayPane,this._popupPane=t._panes.popupPane,e&&e.shapeOptions&&(e.shapeOptions=L.Util.extend({},this.options.shapeOptions,e.shapeOptions)),L.setOptions(this,e);var i=L.version.split(".");1===parseInt(i[0],10)&&parseInt(i[1],10)>=2?L.Draw.Feature.include(L.Evented.prototype):L.Draw.Feature.include(L.Mixin.Events)},enable:function(){this._enabled||(L.Handler.prototype.enable.call(this),this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DRAWSTART,{layerType:this.type}))},disable:function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DRAWSTOP,{layerType:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(L.DomUtil.disableTextSelection(),t.getContainer().focus(),this._tooltip=new L.Draw.Tooltip(this._map),L.DomEvent.on(this._container,"keyup",this._cancelDrawing,this))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},setOptions:function(t){L.setOptions(this,t)},_fireCreatedEvent:function(t){this._map.fire(L.Draw.Event.CREATED,{layer:t,layerType:this.type})},_cancelDrawing:function(t){27===t.keyCode&&(this._map.fire("draw:canceled",{layerType:this.type}),this.disable())}}),L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:"polyline"},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3,factor:1,maxPoints:0},initialize:function(t,e){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this.options.drawError.message=L.drawLocal.draw.handlers.polyline.error,e&&e.drawError&&(e.drawError=L.Util.extend({},this.options.drawError,e.drawError)),this.type=L.Draw.Polyline.TYPE,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mouseout",this._onMouseOut,this).on("mousemove",this._onMouseMove,this).on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("touchstart",this._onTouch,this).on("zoomend",this._onZoomEnd,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseout",this._onMouseOut,this).off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this).off("touchstart",this._onTouch,this).off("click",this._onTouch,this)},deleteLastVertex:function(){if(!(this._markers.length<=1)){var t=this._markers.pop(),e=this._poly,i=e.getLatLngs(),o=i.splice(-1,1)[0];this._poly.setLatLngs(i),this._markerGroup.removeLayer(t),e.getLatLngs().length<2&&this._map.removeLayer(e),this._vertexChanged(o,!1)}},addVertex:function(t){if(this._markers.length>=2&&!this.options.allowIntersection&&this._poly.newLatLngIntersects(t))return void this._showErrorTooltip();this._errorShown&&this._hideErrorTooltip(),this._markers.push(this._createMarker(t)),this._poly.addLatLng(t),2===this._poly.getLatLngs().length&&this._map.addLayer(this._poly),this._vertexChanged(t,!0)},completeShape:function(){this._markers.length<=1||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_finishShape:function(){var t=this._poly._defaultShape?this._poly._defaultShape():this._poly.getLatLngs(),e=this._poly.newLatLngIntersects(t[t.length-1]);if(!this.options.allowIntersection&&e||!this._shapeIsValid())return void this._showErrorTooltip();this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_shapeIsValid:function(){return!0},_onZoomEnd:function(){null!==this._markers&&this._updateGuide()},_onMouseMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent),i=this._map.layerPointToLatLng(e);this._currentLatLng=i,this._updateTooltip(i),this._updateGuide(e),this._mouseMarker.setLatLng(i),L.DomEvent.preventDefault(t.originalEvent)},_vertexChanged:function(t,e){this._map.fire(L.Draw.Event.DRAWVERTEX,{layers:this._markerGroup}),this._updateFinishHandler(),this._updateRunningMeasure(t,e),this._clearGuides(),this._updateTooltip()},_onMouseDown:function(t){if(!this._clickHandled&&!this._touchHandled&&!this._disableMarkers){this._onMouseMove(t),this._clickHandled=!0,this._disableNewMarkers();var e=t.originalEvent,i=e.clientX,o=e.clientY;this._startPoint.call(this,i,o)}},_startPoint:function(t,e){this._mouseDownOrigin=L.point(t,e)},_onMouseUp:function(t){var e=t.originalEvent,i=e.clientX,o=e.clientY;this._endPoint.call(this,i,o,t),this._clickHandled=null},_endPoint:function(e,i,o){if(this._mouseDownOrigin){var n=L.point(e,i).distanceTo(this._mouseDownOrigin),a=this._calculateFinishDistance(o.latlng);this.options.maxPoints>1&&this.options.maxPoints==this._markers.length+1?(this.addVertex(o.latlng),this._finishShape()):a<10&&L.Browser.touch?this._finishShape():Math.abs(n)<9*(t.devicePixelRatio||1)&&this.addVertex(o.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(t){var e,i,o=t.originalEvent;!o.touches||!o.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(e=o.touches[0].clientX,i=o.touches[0].clientY,this._disableNewMarkers(),this._touchHandled=!0,this._startPoint.call(this,e,i),this._endPoint.call(this,e,i,t),this._touchHandled=null),this._clickHandled=null},_onMouseOut:function(){this._tooltip&&this._tooltip._onMouseOut.call(this._tooltip)},_calculateFinishDistance:function(t){var e;if(this._markers.length>0){var i;if(this.type===L.Draw.Polyline.TYPE)i=this._markers[this._markers.length-1];else{if(this.type!==L.Draw.Polygon.TYPE)return 1/0;i=this._markers[0]}var o=this._map.latLngToContainerPoint(i.getLatLng()),n=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),a=this._map.latLngToContainerPoint(n.getLatLng());e=o.distanceTo(a)}else e=1/0;return e},_updateFinishHandler:function(){var t=this._markers.length;t>1&&this._markers[t-1].on("click",this._finishShape,this),t>2&&this._markers[t-2].off("click",this._finishShape,this)},_createMarker:function(t){var e=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(e),e},_updateGuide:function(t){var e=this._markers?this._markers.length:0;e>0&&(t=t||this._map.latLngToLayerPoint(this._currentLatLng),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[e-1].getLatLng()),t))},_updateTooltip:function(t){var e=this._getTooltipText();t&&this._tooltip.updatePosition(t),this._errorShown||this._tooltip.updateContent(e)},_drawGuide:function(t,e){var i,o,n,a=Math.floor(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))),s=this.options.guidelineDistance,r=this.options.maxGuideLineLength,l=a>r?a-r:s;for(this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));l<a;l+=this.options.guidelineDistance)i=l/a,o={x:Math.floor(t.x*(1-i)+i*e.x),y:Math.floor(t.y*(1-i)+i*e.y)},n=L.DomUtil.create("div","leaflet-draw-guide-dash",this._guidesContainer),n.style.backgroundColor=this._errorShown?this.options.drawError.color:this.options.shapeOptions.color,L.DomUtil.setPosition(n,o)},_updateGuideColor:function(t){if(this._guidesContainer)for(var e=0,i=this._guidesContainer.childNodes.length;e<i;e++)this._guidesContainer.childNodes[e].style.backgroundColor=t},_clearGuides:function(){if(this._guidesContainer)for(;this._guidesContainer.firstChild;)this._guidesContainer.removeChild(this._guidesContainer.firstChild)},_getTooltipText:function(){var t,e,i=this.options.showLength;return 0===this._markers.length?t={text:L.drawLocal.draw.handlers.polyline.tooltip.start}:(e=i?this._getMeasurementString():"",t=1===this._markers.length?{text:L.drawLocal.draw.handlers.polyline.tooltip.cont,subtext:e}:{text:L.drawLocal.draw.handlers.polyline.tooltip.end,subtext:e}),t},_updateRunningMeasure:function(t,e){var i,o,n=this._markers.length;1===this._markers.length?this._measurementRunningTotal=0:(i=n-(e?2:1),o=L.GeometryUtil.isVersion07x()?t.distanceTo(this._markers[i].getLatLng())*(this.options.factor||1):this._map.distance(t,this._markers[i].getLatLng())*(this.options.factor||1),this._measurementRunningTotal+=o*(e?1:-1))},_getMeasurementString:function(){var t,e=this._currentLatLng,i=this._markers[this._markers.length-1].getLatLng();return t=L.GeometryUtil.isVersion07x()?i&&e&&e.distanceTo?this._measurementRunningTotal+e.distanceTo(i)*(this.options.factor||1):this._measurementRunningTotal||0:i&&e?this._measurementRunningTotal+this._map.distance(e,i)*(this.options.factor||1):this._measurementRunningTotal||0,L.GeometryUtil.readableDistance(t,this.options.metric,this.options.feet,this.options.nautic,this.options.precision)},_showErrorTooltip:function(){this._errorShown=!0,this._tooltip.showAsError().updateContent({text:this.options.drawError.message}),this._updateGuideColor(this.options.drawError.color),this._poly.setStyle({color:this.options.drawError.color}),this._clearHideErrorTimeout(),this._hideErrorTimeout=setTimeout(L.Util.bind(this._hideErrorTooltip,this),this.options.drawError.timeout)},_hideErrorTooltip:function(){this._errorShown=!1,this._clearHideErrorTimeout(),this._tooltip.removeError().updateContent(this._getTooltipText()),this._updateGuideColor(this.options.shapeOptions.color),this._poly.setStyle({color:this.options.shapeOptions.color})},_clearHideErrorTimeout:function(){this._hideErrorTimeout&&(clearTimeout(this._hideErrorTimeout),this._hideErrorTimeout=null)},_disableNewMarkers:function(){this._disableMarkers=!0},_enableNewMarkers:function(){setTimeout(function(){this._disableMarkers=!1}.bind(this),50)},_cleanUpShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},_fireCreatedEvent:function(){var t=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.Polygon=L.Draw.Polyline.extend({statics:{TYPE:"polygon"},Poly:L.Polygon,options:{showArea:!1,showLength:!1,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},metric:!0,feet:!0,nautic:!1,precision:{}},initialize:function(t,e){L.Draw.Polyline.prototype.initialize.call(this,t,e),this.type=L.Draw.Polygon.TYPE},_updateFinishHandler:function(){var t=this._markers.length;1===t&&this._markers[0].on("click",this._finishShape,this),t>2&&(this._markers[t-1].on("dblclick",this._finishShape,this),t>3&&this._markers[t-2].off("dblclick",this._finishShape,this))},_getTooltipText:function(){var t,e;return 0===this._markers.length?t=L.drawLocal.draw.handlers.polygon.tooltip.start:this._markers.length<3?(t=L.drawLocal.draw.handlers.polygon.tooltip.cont,e=this._getMeasurementString()):(t=L.drawLocal.draw.handlers.polygon.tooltip.end,e=this._getMeasurementString()),{text:t,subtext:e}},_getMeasurementString:function(){var t=this._area,e="";return t||this.options.showLength?(this.options.showLength&&(e=L.Draw.Polyline.prototype._getMeasurementString.call(this)),t&&(e+="<br>"+L.GeometryUtil.readableArea(t,this.options.metric,this.options.precision)),e):null},_shapeIsValid:function(){return this._markers.length>=3},_vertexChanged:function(t,e){var i;!this.options.allowIntersection&&this.options.showArea&&(i=this._poly.getLatLngs(),this._area=L.GeometryUtil.geodesicArea(i)),L.Draw.Polyline.prototype._vertexChanged.call(this,t,e)},_cleanUpShape:function(){var t=this._markers.length;t>0&&(this._markers[0].off("click",this._finishShape,this),t>2&&this._markers[t-1].off("dblclick",this._finishShape,this))}}),L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:function(t,e){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._mapDraggable=this._map.dragging.enabled(),this._mapDraggable&&this._map.dragging.disable(),this._container.style.cursor="crosshair",this._tooltip.updateContent({text:this._initialLabelText}),this._map.on("mousedown",this._onMouseDown,this).on("mousemove",this._onMouseMove,this).on("touchstart",this._onMouseDown,this).on("touchmove",this._onMouseMove,this),e.addEventListener("touchstart",L.DomEvent.preventDefault,{passive:!1}))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._mapDraggable&&this._map.dragging.enable(),this._container.style.cursor="",this._map.off("mousedown",this._onMouseDown,this).off("mousemove",this._onMouseMove,this).off("touchstart",this._onMouseDown,this).off("touchmove",this._onMouseMove,this),L.DomEvent.off(e,"mouseup",this._onMouseUp,this),L.DomEvent.off(e,"touchend",this._onMouseUp,this),e.removeEventListener("touchstart",L.DomEvent.preventDefault),this._shape&&(this._map.removeLayer(this._shape),delete this._shape)),this._isDrawing=!1},_getTooltipText:function(){return{text:this._endLabelText}},_onMouseDown:function(t){this._isDrawing=!0,this._startLatLng=t.latlng,L.DomEvent.on(e,"mouseup",this._onMouseUp,this).on(e,"touchend",this._onMouseUp,this).preventDefault(t.originalEvent)},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._isDrawing&&(this._tooltip.updateContent(this._getTooltipText()),this._drawShape(e))},_onMouseUp:function(){this._shape&&this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()}}),L.Draw.Rectangle=L.Draw.SimpleShape.extend({statics:{TYPE:"rectangle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,showArea:!0,clickable:!0},metric:!0},initialize:function(t,e){this.type=L.Draw.Rectangle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.rectangle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},disable:function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},_onMouseUp:function(t){if(!this._shape&&!this._isCurrentlyTwoClickDrawing)return void(this._isCurrentlyTwoClickDrawing=!0);this._isCurrentlyTwoClickDrawing&&!o(t.target,"leaflet-pane")||L.Draw.SimpleShape.prototype._onMouseUp.call(this)},_drawShape:function(t){this._shape?this._shape.setBounds(new L.LatLngBounds(this._startLatLng,t)):(this._shape=new L.Rectangle(new L.LatLngBounds(this._startLatLng,t),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_getTooltipText:function(){var t,e,i,o=L.Draw.SimpleShape.prototype._getTooltipText.call(this),n=this._shape,a=this.options.showArea;return n&&(t=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),e=L.GeometryUtil.geodesicArea(t),i=a?L.GeometryUtil.readableArea(e,this.options.metric):""),{text:o.text,subtext:i}}}),L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:"marker"},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.Marker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.marker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._tooltip.updateContent({text:this._initialLabelText}),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onTouch,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._map.off("click",this._onClick,this).off("click",this._onTouch,this),this._marker&&(this._marker.off("click",this._onClick,this),this._map.removeLayer(this._marker),delete this._marker),this._mouseMarker.off("click",this._onClick,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mousemove",this._onMouseMove,this))},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._mouseMarker.setLatLng(e),this._marker?(e=this._mouseMarker.getLatLng(),this._marker.setLatLng(e)):(this._marker=this._createMarker(e),this._marker.on("click",this._onClick,this),this._map.on("click",this._onClick,this).addLayer(this._marker))},_createMarker:function(t){return new L.Marker(t,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},_onClick:function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_onTouch:function(t){this._onMouseMove(t),this._onClick()},_fireCreatedEvent:function(){var t=new L.Marker.Touch(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.CircleMarker=L.Draw.Marker.extend({statics:{TYPE:"circlemarker"},options:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.CircleMarker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circlemarker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},_fireCreatedEvent:function(){var t=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)},_createMarker:function(t){return new L.CircleMarker(t,this.options)}}),L.Draw.Circle=L.Draw.SimpleShape.extend({statics:{TYPE:"circle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showRadius:!0,metric:!0,feet:!0,nautic:!1},initialize:function(t,e){this.type=L.Draw.Circle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},_drawShape:function(t){if(L.GeometryUtil.isVersion07x())var e=this._startLatLng.distanceTo(t);else var e=this._map.distance(this._startLatLng,t);this._shape?this._shape.setRadius(e):(this._shape=new L.Circle(this._startLatLng,e,this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_onMouseMove:function(t){var e,i=t.latlng,o=this.options.showRadius,n=this.options.metric;if(this._tooltip.updatePosition(i),this._isDrawing){this._drawShape(i),e=this._shape.getRadius().toFixed(1);var a="";o&&(a=L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(e,n,this.options.feet,this.options.nautic)),this._tooltip.updateContent({text:this._endLabelText,subtext:a})}}}),L.Edit=L.Edit||{},L.Edit.Marker=L.Handler.extend({initialize:function(t,e){this._marker=t,L.setOptions(this,e)},addHooks:function(){var t=this._marker;t.dragging.enable(),t.on("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},removeHooks:function(){var t=this._marker;t.dragging.disable(),t.off("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},_onDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_toggleMarkerHighlight:function(){var t=this._marker._icon;t&&(t.style.display="none",L.DomUtil.hasClass(t,"leaflet-edit-marker-selected")?(L.DomUtil.removeClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,-4)):(L.DomUtil.addClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,4)),t.style.display="")},_offsetMarker:function(t,e){var i=parseInt(t.style.marginTop,10)-e,o=parseInt(t.style.marginLeft,10)-e;t.style.marginTop=i+"px",t.style.marginLeft=o+"px"}}),L.Marker.addInitHook(function(){L.Edit.Marker&&(this.editing=new L.Edit.Marker(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.Poly=L.Handler.extend({initialize:function(t){this.latlngs=[t._latlngs],t._holes&&(this.latlngs=this.latlngs.concat(t._holes)),this._poly=t,this._poly.on("revert-edited",this._updateLatLngs,this)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._poly._latlngs)?this._poly._latlngs:this._poly._latlngs[0]:this._poly._latlngs},_eachVertexHandler:function(t){for(var e=0;e<this._verticesHandlers.length;e++)t(this._verticesHandlers[e])},addHooks:function(){this._initHandlers(),this._eachVertexHandler(function(t){t.addHooks()})},removeHooks:function(){this._eachVertexHandler(function(t){t.removeHooks()})},updateMarkers:function(){this._eachVertexHandler(function(t){t.updateMarkers()})},_initHandlers:function(){this._verticesHandlers=[];for(var t=0;t<this.latlngs.length;t++)this._verticesHandlers.push(new L.Edit.PolyVerticesEdit(this._poly,this.latlngs[t],this._poly.options.poly))},_updateLatLngs:function(t){this.latlngs=[t.layer._latlngs],t.layer._holes&&(this.latlngs=this.latlngs.concat(t.layer._holes))}}),L.Edit.PolyVerticesEdit=L.Handler.extend({options:{icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),drawError:{color:"#b00b00",timeout:1e3}},initialize:function(t,e,i){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this._poly=t,i&&i.drawError&&(i.drawError=L.Util.extend({},this.options.drawError,i.drawError)),this._latlngs=e,L.setOptions(this,i)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]:this._latlngs},addHooks:function(){var t=this._poly,e=t._path;t instanceof L.Polygon||(t.options.fill=!1,t.options.editing&&(t.options.editing.fill=!1)),e&&t.options.editing.className&&(t.options.original.className&&t.options.original.className.split(" ").forEach(function(t){L.DomUtil.removeClass(e,t)}),t.options.editing.className.split(" ").forEach(function(t){L.DomUtil.addClass(e,t)})),t.setStyle(t.options.editing),this._poly._map&&(this._map=this._poly._map,this._markerGroup||this._initMarkers(),this._poly._map.addLayer(this._markerGroup))},removeHooks:function(){var t=this._poly,e=t._path;e&&t.options.editing.className&&(t.options.editing.className.split(" ").forEach(function(t){L.DomUtil.removeClass(e,t)}),t.options.original.className&&t.options.original.className.split(" ").forEach(function(t){L.DomUtil.addClass(e,t)})),t.setStyle(t.options.original),t._map&&(t._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers)},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._markers=[];var t,e,i,o,n=this._defaultShape();for(t=0,i=n.length;t<i;t++)o=this._createMarker(n[t],t),o.on("click",this._onMarkerClick,this),o.on("contextmenu",this._onContextMenu,this),this._markers.push(o);var a,s;for(t=0,e=i-1;t<i;e=t++)(0!==t||L.Polygon&&this._poly instanceof L.Polygon)&&(a=this._markers[e],s=this._markers[t],this._createMiddleMarker(a,s),this._updatePrevNext(a,s))},_createMarker:function(t,e){var i=new L.Marker.Touch(t,{draggable:!0,icon:this.options.icon});return i._origLatLng=t,i._index=e,i.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._fireEdit,this).on("touchmove",this._onTouchMove,this).on("touchend",this._fireEdit,this).on("MSPointerMove",this._onTouchMove,this).on("MSPointerUp",this._fireEdit,this),this._markerGroup.addLayer(i),i},_onMarkerDragStart:function(){this._poly.fire("editstart")},_spliceLatLngs:function(){var t=this._defaultShape(),e=[].splice.apply(t,arguments);return this._poly._convertLatLngs(t,!0),this._poly.redraw(),e},_removeMarker:function(t){var e=t._index;this._markerGroup.removeLayer(t),this._markers.splice(e,1),this._spliceLatLngs(e,1),this._updateIndexes(e,-1),t.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._fireEdit,this).off("touchmove",this._onMarkerDrag,this).off("touchend",this._fireEdit,this).off("click",this._onMarkerClick,this).off("MSPointerMove",this._onTouchMove,this).off("MSPointerUp",this._fireEdit,this)},_fireEdit:function(){this._poly.edited=!0,this._poly.fire("edit"),this._poly._map.fire(L.Draw.Event.EDITVERTEX,{layers:this._markerGroup,poly:this._poly})},_onMarkerDrag:function(t){var e=t.target,i=this._poly;if(L.extend(e._origLatLng,e._latlng),e._middleLeft&&e._middleLeft.setLatLng(this._getMiddleLatLng(e._prev,e)),e._middleRight&&e._middleRight.setLatLng(this._getMiddleLatLng(e,e._next)),i.options.poly){var o=i._map._editTooltip;if(!i.options.poly.allowIntersection&&i.intersects()){var n=i.options.color;i.setStyle({color:this.options.drawError.color}),0!==L.version.indexOf("0.7")&&e.dragging._draggable._onUp(t),this._onMarkerClick(t),o&&o.updateContent({text:L.drawLocal.draw.handlers.polyline.error}),setTimeout(function(){i.setStyle({color:n}),o&&o.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext})},1e3)}}this._poly._bounds._southWest=L.latLng(1/0,1/0),this._poly._bounds._northEast=L.latLng(-1/0,-1/0);var a=this._poly.getLatLngs();this._poly._convertLatLngs(a,!0),this._poly.redraw(),this._poly.fire("editdrag")},_onMarkerClick:function(t){var e=L.Polygon&&this._poly instanceof L.Polygon?4:3,i=t.target;this._defaultShape().length<e||(this._removeMarker(i),this._updatePrevNext(i._prev,i._next),i._middleLeft&&this._markerGroup.removeLayer(i._middleLeft),i._middleRight&&this._markerGroup.removeLayer(i._middleRight),i._prev&&i._next?this._createMiddleMarker(i._prev,i._next):i._prev?i._next||(i._prev._middleRight=null):i._next._middleLeft=null,this._fireEdit())},_onContextMenu:function(t){var e=t.target;this._poly;this._poly._map.fire(L.Draw.Event.MARKERCONTEXT,{marker:e,layers:this._markerGroup,poly:this._poly}),L.DomEvent.stopPropagation},_onTouchMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent.touches[0]),i=this._map.layerPointToLatLng(e),o=t.target;L.extend(o._origLatLng,i),o._middleLeft&&o._middleLeft.setLatLng(this._getMiddleLatLng(o._prev,o)),o._middleRight&&o._middleRight.setLatLng(this._getMiddleLatLng(o,o._next)),this._poly.redraw(),this.updateMarkers()},_updateIndexes:function(t,e){this._markerGroup.eachLayer(function(i){i._index>t&&(i._index+=e)})},_createMiddleMarker:function(t,e){var i,o,n,a=this._getMiddleLatLng(t,e),s=this._createMarker(a);s.setOpacity(.6),t._middleRight=e._middleLeft=s,o=function(){s.off("touchmove",o,this);var n=e._index;s._index=n,s.off("click",i,this).on("click",this._onMarkerClick,this),a.lat=s.getLatLng().lat,a.lng=s.getLatLng().lng,this._spliceLatLngs(n,0,a),this._markers.splice(n,0,s),s.setOpacity(1),this._updateIndexes(n,1),e._index++,this._updatePrevNext(t,s),this._updatePrevNext(s,e),this._poly.fire("editstart")},n=function(){s.off("dragstart",o,this),s.off("dragend",n,this),s.off("touchmove",o,this),this._createMiddleMarker(t,s),this._createMiddleMarker(s,e)},i=function(){o.call(this),n.call(this),this._fireEdit()},s.on("click",i,this).on("dragstart",o,this).on("dragend",n,this).on("touchmove",o,this),this._markerGroup.addLayer(s)},_updatePrevNext:function(t,e){t&&(t._next=e),e&&(e._prev=t)},_getMiddleLatLng:function(t,e){var i=this._poly._map,o=i.project(t.getLatLng()),n=i.project(e.getLatLng());return i.unproject(o._add(n)._divideBy(2))}}),L.Polyline.addInitHook(function(){this.editing||(L.Edit.Poly&&(this.editing=new L.Edit.Poly(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()}))}),L.Edit=L.Edit||{},L.Edit.SimpleShape=L.Handler.extend({options:{moveIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move"}),resizeIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize"}),touchMoveIcon:new L.DivIcon({
118837
iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon"}),touchResizeIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon"})},initialize:function(t,e){L.Browser.touch&&(this.options.moveIcon=this.options.touchMoveIcon,this.options.resizeIcon=this.options.touchResizeIcon),this._shape=t,L.Util.setOptions(this,e)},addHooks:function(){var t=this._shape;this._shape._map&&(this._map=this._shape._map,t.setStyle(t.options.editing),t._map&&(this._map=t._map,this._markerGroup||this._initMarkers(),this._map.addLayer(this._markerGroup)))},removeHooks:function(){var t=this._shape;if(t.setStyle(t.options.original),t._map){this._unbindMarker(this._moveMarker);for(var e=0,i=this._resizeMarkers.length;e<i;e++)this._unbindMarker(this._resizeMarkers[e]);this._resizeMarkers=null,this._map.removeLayer(this._markerGroup),delete this._markerGroup}this._map=null},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._createMoveMarker(),this._createResizeMarker()},_createMoveMarker:function(){},_createResizeMarker:function(){},_createMarker:function(t,e){var i=new L.Marker.Touch(t,{draggable:!0,icon:e,zIndexOffset:10});return this._bindMarker(i),this._markerGroup.addLayer(i),i},_bindMarker:function(t){t.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._onMarkerDragEnd,this).on("touchstart",this._onTouchStart,this).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onTouchEnd,this).on("MSPointerUp",this._onTouchEnd,this)},_unbindMarker:function(t){t.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._onMarkerDragEnd,this).off("touchstart",this._onTouchStart,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onTouchEnd,this).off("MSPointerUp",this._onTouchEnd,this)},_onMarkerDragStart:function(t){t.target.setOpacity(0),this._shape.fire("editstart")},_fireEdit:function(){this._shape.edited=!0,this._shape.fire("edit")},_onMarkerDrag:function(t){var e=t.target,i=e.getLatLng();e===this._moveMarker?this._move(i):this._resize(i),this._shape.redraw(),this._shape.fire("editdrag")},_onMarkerDragEnd:function(t){t.target.setOpacity(1),this._fireEdit()},_onTouchStart:function(t){if(L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,t),"function"==typeof this._getCorners){var e=this._getCorners(),i=t.target,o=i._cornerIndex;i.setOpacity(0),this._oppositeCorner=e[(o+2)%4],this._toggleCornerMarkers(0,o)}this._shape.fire("editstart")},_onTouchMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent.touches[0]),i=this._map.layerPointToLatLng(e);return t.target===this._moveMarker?this._move(i):this._resize(i),this._shape.redraw(),!1},_onTouchEnd:function(t){t.target.setOpacity(1),this.updateMarkers(),this._fireEdit()},_move:function(){},_resize:function(){}}),L.Edit=L.Edit||{},L.Edit.Rectangle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getBounds(),e=t.getCenter();this._moveMarker=this._createMarker(e,this.options.moveIcon)},_createResizeMarker:function(){var t=this._getCorners();this._resizeMarkers=[];for(var e=0,i=t.length;e<i;e++)this._resizeMarkers.push(this._createMarker(t[e],this.options.resizeIcon)),this._resizeMarkers[e]._cornerIndex=e},_onMarkerDragStart:function(t){L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,t);var e=this._getCorners(),i=t.target,o=i._cornerIndex;this._oppositeCorner=e[(o+2)%4],this._toggleCornerMarkers(0,o)},_onMarkerDragEnd:function(t){var e,i,o=t.target;o===this._moveMarker&&(e=this._shape.getBounds(),i=e.getCenter(),o.setLatLng(i)),this._toggleCornerMarkers(1),this._repositionCornerMarkers(),L.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this,t)},_move:function(t){for(var e,i=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),o=this._shape.getBounds(),n=o.getCenter(),a=[],s=0,r=i.length;s<r;s++)e=[i[s].lat-n.lat,i[s].lng-n.lng],a.push([t.lat+e[0],t.lng+e[1]]);this._shape.setLatLngs(a),this._repositionCornerMarkers(),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})},_resize:function(t){var e;this._shape.setBounds(L.latLngBounds(t,this._oppositeCorner)),e=this._shape.getBounds(),this._moveMarker.setLatLng(e.getCenter()),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})},_getCorners:function(){var t=this._shape.getBounds();return[t.getNorthWest(),t.getNorthEast(),t.getSouthEast(),t.getSouthWest()]},_toggleCornerMarkers:function(t){for(var e=0,i=this._resizeMarkers.length;e<i;e++)this._resizeMarkers[e].setOpacity(t)},_repositionCornerMarkers:function(){for(var t=this._getCorners(),e=0,i=this._resizeMarkers.length;e<i;e++)this._resizeMarkers[e].setLatLng(t[e])}}),L.Rectangle.addInitHook(function(){L.Edit.Rectangle&&(this.editing=new L.Edit.Rectangle(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.CircleMarker=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getLatLng();this._moveMarker=this._createMarker(t,this.options.moveIcon)},_createResizeMarker:function(){this._resizeMarkers=[]},_move:function(t){if(this._resizeMarkers.length){var e=this._getResizeMarkerPoint(t);this._resizeMarkers[0].setLatLng(e)}this._shape.setLatLng(t),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})}}),L.CircleMarker.addInitHook(function(){L.Edit.CircleMarker&&(this.editing=new L.Edit.CircleMarker(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})}),L.Edit=L.Edit||{},L.Edit.Circle=L.Edit.CircleMarker.extend({_createResizeMarker:function(){var t=this._shape.getLatLng(),e=this._getResizeMarkerPoint(t);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(e,this.options.resizeIcon))},_getResizeMarkerPoint:function(t){var e=this._shape._radius*Math.cos(Math.PI/4),i=this._map.project(t);return this._map.unproject([i.x+e,i.y-e])},_resize:function(t){var e=this._moveMarker.getLatLng();L.GeometryUtil.isVersion07x()?radius=e.distanceTo(t):radius=this._map.distance(e,t),this._shape.setRadius(radius),this._map._editTooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.subtext+"<br />"+L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(radius,!0,this.options.feet,this.options.nautic)}),this._shape.setRadius(radius),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})}}),L.Circle.addInitHook(function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})}),L.Map.mergeOptions({touchExtend:!0}),L.Map.TouchExtend=L.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},addHooks:function(){L.DomEvent.on(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.on(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.on(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.on(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.on(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.on(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.on(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.on(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.on(this._container,"touchleave",this._onTouchLeave,this))},removeHooks:function(){L.DomEvent.off(this._container,"touchstart",this._onTouchStart),L.DomEvent.off(this._container,"touchend",this._onTouchEnd),L.DomEvent.off(this._container,"touchmove",this._onTouchMove),this._detectIE()?(L.DomEvent.off(this._container,"MSPointerDowm",this._onTouchStart),L.DomEvent.off(this._container,"MSPointerUp",this._onTouchEnd),L.DomEvent.off(this._container,"MSPointerMove",this._onTouchMove),L.DomEvent.off(this._container,"MSPointerCancel",this._onTouchCancel)):(L.DomEvent.off(this._container,"touchcancel",this._onTouchCancel),L.DomEvent.off(this._container,"touchleave",this._onTouchLeave))},_touchEvent:function(t,e){var i={};if(void 0!==t.touches){if(!t.touches.length)return;i=t.touches[0]}else{if("touch"!==t.pointerType)return;if(i=t,!this._filterClick(t))return}var o=this._map.mouseEventToContainerPoint(i),n=this._map.mouseEventToLayerPoint(i),a=this._map.layerPointToLatLng(n);this._map.fire(e,{latlng:a,layerPoint:n,containerPoint:o,pageX:i.pageX,pageY:i.pageY,originalEvent:t})},_filterClick:function(t){var e=t.timeStamp||t.originalEvent.timeStamp,i=L.DomEvent._lastClick&&e-L.DomEvent._lastClick;return i&&i>100&&i<500||t.target._simulatedClick&&!t._simulated?(L.DomEvent.stop(t),!1):(L.DomEvent._lastClick=e,!0)},_onTouchStart:function(t){if(this._map._loaded){this._touchEvent(t,"touchstart")}},_onTouchEnd:function(t){if(this._map._loaded){this._touchEvent(t,"touchend")}},_onTouchCancel:function(t){if(this._map._loaded){var e="touchcancel";this._detectIE()&&(e="pointercancel"),this._touchEvent(t,e)}},_onTouchLeave:function(t){if(this._map._loaded){this._touchEvent(t,"touchleave")}},_onTouchMove:function(t){if(this._map._loaded){this._touchEvent(t,"touchmove")}},_detectIE:function(){var e=t.navigator.userAgent,i=e.indexOf("MSIE ");if(i>0)return parseInt(e.substring(i+5,e.indexOf(".",i)),10);if(e.indexOf("Trident/")>0){var o=e.indexOf("rv:");return parseInt(e.substring(o+3,e.indexOf(".",o)),10)}var n=e.indexOf("Edge/");return n>0&&parseInt(e.substring(n+5,e.indexOf(".",n)),10)}}),L.Map.addInitHook("addHandler","touchExtend",L.Map.TouchExtend),L.Marker.Touch=L.Marker.extend({_initInteraction:function(){return this.addInteractiveTarget?L.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},_initInteractionLegacy:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu","touchstart","touchend","touchmove"];this._detectIE?e.concat(["MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"]):e.concat(["touchcancel"]),L.DomUtil.addClass(t,"leaflet-clickable"),L.DomEvent.on(t,"click",this._onMouseClick,this),L.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var i=0;i<e.length;i++)L.DomEvent.on(t,e[i],this._fireMouseEvent,this);L.Handler.MarkerDrag&&(this.dragging=new L.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_detectIE:function(){var e=t.navigator.userAgent,i=e.indexOf("MSIE ");if(i>0)return parseInt(e.substring(i+5,e.indexOf(".",i)),10);if(e.indexOf("Trident/")>0){var o=e.indexOf("rv:");return parseInt(e.substring(o+3,e.indexOf(".",o)),10)}var n=e.indexOf("Edge/");return n>0&&parseInt(e.substring(n+5,e.indexOf(".",n)),10)}}),L.LatLngUtil={cloneLatLngs:function(t){for(var e=[],i=0,o=t.length;i<o;i++)Array.isArray(t[i])?e.push(L.LatLngUtil.cloneLatLngs(t[i])):e.push(this.cloneLatLng(t[i]));return e},cloneLatLng:function(t){return L.latLng(t.lat,t.lng)}},function(){var t={km:2,ha:2,m:0,mi:2,ac:2,yd:0,ft:0,nm:2};L.GeometryUtil=L.extend(L.GeometryUtil||{},{geodesicArea:function(t){var e,i,o=t.length,n=0,a=Math.PI/180;if(o>2){for(var s=0;s<o;s++)e=t[s],i=t[(s+1)%o],n+=(i.lng-e.lng)*a*(2+Math.sin(e.lat*a)+Math.sin(i.lat*a));n=6378137*n*6378137/2}return Math.abs(n)},formattedNumber:function(t,e){var i=parseFloat(t).toFixed(e),o=L.drawLocal.format&&L.drawLocal.format.numeric,n=o&&o.delimiters,a=n&&n.thousands,s=n&&n.decimal;if(a||s){var r=i.split(".");i=a?r[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+a):r[0],s=s||".",r.length>1&&(i=i+s+r[1])}return i},readableArea:function(e,i,o){var n,a,o=L.Util.extend({},t,o);return i?(a=["ha","m"],type=typeof i,"string"===type?a=[i]:"boolean"!==type&&(a=i),n=e>=1e6&&-1!==a.indexOf("km")?L.GeometryUtil.formattedNumber(1e-6*e,o.km)+" km²":e>=1e4&&-1!==a.indexOf("ha")?L.GeometryUtil.formattedNumber(1e-4*e,o.ha)+" ha":L.GeometryUtil.formattedNumber(e,o.m)+" m²"):(e/=.836127,n=e>=3097600?L.GeometryUtil.formattedNumber(e/3097600,o.mi)+" mi²":e>=4840?L.GeometryUtil.formattedNumber(e/4840,o.ac)+" acres":L.GeometryUtil.formattedNumber(e,o.yd)+" yd²"),n},readableDistance:function(e,i,o,n,a){var s,a=L.Util.extend({},t,a);switch(i?"string"==typeof i?i:"metric":o?"feet":n?"nauticalMile":"yards"){case"metric":s=e>1e3?L.GeometryUtil.formattedNumber(e/1e3,a.km)+" km":L.GeometryUtil.formattedNumber(e,a.m)+" m";break;case"feet":e*=3.28083,s=L.GeometryUtil.formattedNumber(e,a.ft)+" ft";break;case"nauticalMile":e*=.53996,s=L.GeometryUtil.formattedNumber(e/1e3,a.nm)+" nm";break;case"yards":default:e*=1.09361,s=e>1760?L.GeometryUtil.formattedNumber(e/1760,a.mi)+" miles":L.GeometryUtil.formattedNumber(e,a.yd)+" yd"}return s},isVersion07x:function(){var t=L.version.split(".");return 0===parseInt(t[0],10)&&7===parseInt(t[1],10)}})}(),L.Util.extend(L.LineUtil,{segmentsIntersect:function(t,e,i,o){return this._checkCounterclockwise(t,i,o)!==this._checkCounterclockwise(e,i,o)&&this._checkCounterclockwise(t,e,i)!==this._checkCounterclockwise(t,e,o)},_checkCounterclockwise:function(t,e,i){return(i.y-t.y)*(e.x-t.x)>(e.y-t.y)*(i.x-t.x)}}),L.Polyline.include({intersects:function(){var t,e,i,o=this._getProjectedPoints(),n=o?o.length:0;if(this._tooFewPointsForIntersection())return!1;for(t=n-1;t>=3;t--)if(e=o[t-1],i=o[t],this._lineSegmentsIntersectsRange(e,i,t-2))return!0;return!1},newLatLngIntersects:function(t,e){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(t),e)},newPointIntersects:function(t,e){var i=this._getProjectedPoints(),o=i?i.length:0,n=i?i[o-1]:null,a=o-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(n,t,a,e?1:0)},_tooFewPointsForIntersection:function(t){var e=this._getProjectedPoints(),i=e?e.length:0;return i+=t||0,!e||i<=3},_lineSegmentsIntersectsRange:function(t,e,i,o){var n,a,s=this._getProjectedPoints();o=o||0;for(var r=i;r>o;r--)if(n=s[r-1],a=s[r],L.LineUtil.segmentsIntersect(t,e,n,a))return!0;return!1},_getProjectedPoints:function(){if(!this._defaultShape)return this._originalPoints;for(var t=[],e=this._defaultShape(),i=0;i<e.length;i++)t.push(this._map.latLngToLayerPoint(e[i]));return t}}),L.Polygon.include({intersects:function(){var t,e,i,o,n=this._getProjectedPoints();return!this._tooFewPointsForIntersection()&&(!!L.Polyline.prototype.intersects.call(this)||(t=n.length,e=n[0],i=n[t-1],o=t-2,this._lineSegmentsIntersectsRange(i,e,o,1)))}}),L.Control.Draw=L.Control.extend({options:{position:"topleft",draw:{},edit:!1},initialize:function(t){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");L.Control.prototype.initialize.call(this,t);var e;this._toolbars={},L.DrawToolbar&&this.options.draw&&(e=new L.DrawToolbar(this.options.draw),this._toolbars[L.DrawToolbar.TYPE]=e,this._toolbars[L.DrawToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.EditToolbar&&this.options.edit&&(e=new L.EditToolbar(this.options.edit),this._toolbars[L.EditToolbar.TYPE]=e,this._toolbars[L.EditToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.toolbar=this},onAdd:function(t){var e,i=L.DomUtil.create("div","leaflet-draw"),o=!1;for(var n in this._toolbars)this._toolbars.hasOwnProperty(n)&&(e=this._toolbars[n].addToolbar(t))&&(o||(L.DomUtil.hasClass(e,"leaflet-draw-toolbar-top")||L.DomUtil.addClass(e.childNodes[0],"leaflet-draw-toolbar-top"),o=!0),i.appendChild(e));return i},onRemove:function(){for(var t in this._toolbars)this._toolbars.hasOwnProperty(t)&&this._toolbars[t].removeToolbar()},setDrawingOptions:function(t){for(var e in this._toolbars)this._toolbars[e]instanceof L.DrawToolbar&&this._toolbars[e].setOptions(t)},_toolbarEnabled:function(t){var e=t.target;for(var i in this._toolbars)this._toolbars[i]!==e&&this._toolbars[i].disable()}}),L.Map.mergeOptions({drawControlTooltips:!0,drawControl:!1}),L.Map.addInitHook(function(){this.options.drawControl&&(this.drawControl=new L.Control.Draw,this.addControl(this.drawControl))}),L.Toolbar=L.Class.extend({initialize:function(t){L.setOptions(this,t),this._modes={},this._actionButtons=[],this._activeMode=null;var e=L.version.split(".");1===parseInt(e[0],10)&&parseInt(e[1],10)>=2?L.Toolbar.include(L.Evented.prototype):L.Toolbar.include(L.Mixin.Events)},enabled:function(){return null!==this._activeMode},disable:function(){this.enabled()&&this._activeMode.handler.disable()},addToolbar:function(t){var e,i=L.DomUtil.create("div","leaflet-draw-section"),o=0,n=this._toolbarClass||"",a=this.getModeHandlers(t);for(this._toolbarContainer=L.DomUtil.create("div","leaflet-draw-toolbar leaflet-bar"),this._map=t,e=0;e<a.length;e++)a[e].enabled&&this._initModeHandler(a[e].handler,this._toolbarContainer,o++,n,a[e].title);if(o)return this._lastButtonIndex=--o,this._actionsContainer=L.DomUtil.create("ul","leaflet-draw-actions"),i.appendChild(this._toolbarContainer),i.appendChild(this._actionsContainer),i},removeToolbar:function(){for(var t in this._modes)this._modes.hasOwnProperty(t)&&(this._disposeButton(this._modes[t].button,this._modes[t].handler.enable,this._modes[t].handler),this._modes[t].handler.disable(),this._modes[t].handler.off("enabled",this._handlerActivated,this).off("disabled",this._handlerDeactivated,this));this._modes={};for(var e=0,i=this._actionButtons.length;e<i;e++)this._disposeButton(this._actionButtons[e].button,this._actionButtons[e].callback,this);this._actionButtons=[],this._actionsContainer=null},_initModeHandler:function(t,e,i,o,n){var a=t.type;this._modes[a]={},this._modes[a].handler=t,this._modes[a].button=this._createButton({type:a,title:n,className:o+"-"+a,container:e,callback:this._modes[a].handler.enable,context:this._modes[a].handler}),this._modes[a].buttonIndex=i,this._modes[a].handler.on("enabled",this._handlerActivated,this).on("disabled",this._handlerDeactivated,this)},_detectIOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!t.MSStream},_createButton:function(t){var e=L.DomUtil.create("a",t.className||"",t.container),i=L.DomUtil.create("span","sr-only",t.container);e.href="#",e.appendChild(i),t.title&&(e.title=t.title,i.innerHTML=t.title),t.text&&(e.innerHTML=t.text,i.innerHTML=t.text);var o=this._detectIOS()?"touchstart":"click";return L.DomEvent.on(e,"click",L.DomEvent.stopPropagation).on(e,"mousedown",L.DomEvent.stopPropagation).on(e,"dblclick",L.DomEvent.stopPropagation).on(e,"touchstart",L.DomEvent.stopPropagation).on(e,"click",L.DomEvent.preventDefault).on(e,o,t.callback,t.context),e},_disposeButton:function(t,e){var i=this._detectIOS()?"touchstart":"click";L.DomEvent.off(t,"click",L.DomEvent.stopPropagation).off(t,"mousedown",L.DomEvent.stopPropagation).off(t,"dblclick",L.DomEvent.stopPropagation).off(t,"touchstart",L.DomEvent.stopPropagation).off(t,"click",L.DomEvent.preventDefault).off(t,i,e)},_handlerActivated:function(t){this.disable(),this._activeMode=this._modes[t.handler],L.DomUtil.addClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._showActionsToolbar(),this.fire("enable")},_handlerDeactivated:function(){this._hideActionsToolbar(),L.DomUtil.removeClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._activeMode=null,this.fire("disable")},_createActions:function(t){var e,i,o,n,a=this._actionsContainer,s=this.getActions(t),r=s.length;for(i=0,o=this._actionButtons.length;i<o;i++)this._disposeButton(this._actionButtons[i].button,this._actionButtons[i].callback);for(this._actionButtons=[];a.firstChild;)a.removeChild(a.firstChild);for(var l=0;l<r;l++)"enabled"in s[l]&&!s[l].enabled||(e=L.DomUtil.create("li","",a),n=this._createButton({title:s[l].title,text:s[l].text,container:e,callback:s[l].callback,context:s[l].context}),this._actionButtons.push({button:n,callback:s[l].callback}))},_showActionsToolbar:function(){var t=this._activeMode.buttonIndex,e=this._lastButtonIndex,i=this._activeMode.button.offsetTop-1;this._createActions(this._activeMode.handler),this._actionsContainer.style.top=i+"px",0===t&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-top")),t===e&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-bottom")),this._actionsContainer.style.display="block",this._map.fire(L.Draw.Event.TOOLBAROPENED)},_hideActionsToolbar:function(){this._actionsContainer.style.display="none",L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-top"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-bottom"),this._map.fire(L.Draw.Event.TOOLBARCLOSED)}}),L.Draw=L.Draw||{},L.Draw.Tooltip=L.Class.extend({initialize:function(t){this._map=t,this._popupPane=t._panes.popupPane,this._visible=!1,this._container=t.options.drawControlTooltips?L.DomUtil.create("div","leaflet-draw-tooltip",this._popupPane):null,this._singleLineLabel=!1,this._map.on("mouseout",this._onMouseOut,this)},dispose:function(){this._map.off("mouseout",this._onMouseOut,this),this._container&&(this._popupPane.removeChild(this._container),this._container=null)},updateContent:function(t){return this._container?(t.subtext=t.subtext||"",0!==t.subtext.length||this._singleLineLabel?t.subtext.length>0&&this._singleLineLabel&&(L.DomUtil.removeClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!1):(L.DomUtil.addClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!0),this._container.innerHTML=(t.subtext.length>0?'<span class="leaflet-draw-tooltip-subtext">'+t.subtext+"</span><br />":"")+"<span>"+t.text+"</span>",t.text||t.subtext?(this._visible=!0,this._container.style.visibility="inherit"):(this._visible=!1,this._container.style.visibility="hidden"),this):this},updatePosition:function(t){var e=this._map.latLngToLayerPoint(t),i=this._container;return this._container&&(this._visible&&(i.style.visibility="inherit"),L.DomUtil.setPosition(i,e)),this},showAsError:function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},removeError:function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this},_onMouseOut:function(){this._container&&(this._container.style.visibility="hidden")}}),L.DrawToolbar=L.Toolbar.extend({statics:{TYPE:"draw"},options:{polyline:{},polygon:{},rectangle:{},circle:{},marker:{},circlemarker:{}},initialize:function(t){for(var e in this.options)this.options.hasOwnProperty(e)&&t[e]&&(t[e]=L.extend({},this.options[e],t[e]));this._toolbarClass="leaflet-draw-draw",L.Toolbar.prototype.initialize.call(this,t)},getModeHandlers:function(t){return[{enabled:this.options.polyline,handler:new L.Draw.Polyline(t,this.options.polyline),title:L.drawLocal.draw.toolbar.buttons.polyline},{enabled:this.options.polygon,handler:new L.Draw.Polygon(t,this.options.polygon),title:L.drawLocal.draw.toolbar.buttons.polygon},{enabled:this.options.rectangle,handler:new L.Draw.Rectangle(t,this.options.rectangle),title:L.drawLocal.draw.toolbar.buttons.rectangle},{enabled:this.options.circle,handler:new L.Draw.Circle(t,this.options.circle),title:L.drawLocal.draw.toolbar.buttons.circle},{enabled:this.options.marker,handler:new L.Draw.Marker(t,this.options.marker),title:L.drawLocal.draw.toolbar.buttons.marker},{enabled:this.options.circlemarker,handler:new L.Draw.CircleMarker(t,this.options.circlemarker),title:L.drawLocal.draw.toolbar.buttons.circlemarker}]},getActions:function(t){return[{enabled:t.completeShape,title:L.drawLocal.draw.toolbar.finish.title,text:L.drawLocal.draw.toolbar.finish.text,callback:t.completeShape,context:t},{enabled:t.deleteLastVertex,title:L.drawLocal.draw.toolbar.undo.title,text:L.drawLocal.draw.toolbar.undo.text,callback:t.deleteLastVertex,context:t},{title:L.drawLocal.draw.toolbar.actions.title,text:L.drawLocal.draw.toolbar.actions.text,callback:this.disable,context:this}]},setOptions:function(t){L.setOptions(this,t);for(var e in this._modes)this._modes.hasOwnProperty(e)&&t.hasOwnProperty(e)&&this._modes[e].handler.setOptions(t[e])}}),L.EditToolbar=L.Toolbar.extend({statics:{TYPE:"edit"},options:{edit:{selectedPathOptions:{dashArray:"10, 10",fill:!0,fillColor:"#fe57a1",fillOpacity:.1,maintainColor:!1}},remove:{},poly:null,featureGroup:null},initialize:function(t){t.edit&&(void 0===t.edit.selectedPathOptions&&(t.edit.selectedPathOptions=this.options.edit.selectedPathOptions),t.edit.selectedPathOptions=L.extend({},this.options.edit.selectedPathOptions,t.edit.selectedPathOptions)),t.remove&&(t.remove=L.extend({},this.options.remove,t.remove)),t.poly&&(t.poly=L.extend({},this.options.poly,t.poly)),this._toolbarClass="leaflet-draw-edit",L.Toolbar.prototype.initialize.call(this,t),this._selectedFeatureCount=0},getModeHandlers:function(t){var e=this.options.featureGroup;return[{enabled:this.options.edit,handler:new L.EditToolbar.Edit(t,{featureGroup:e,selectedPathOptions:this.options.edit.selectedPathOptions,poly:this.options.poly}),title:L.drawLocal.edit.toolbar.buttons.edit},{enabled:this.options.remove,handler:new L.EditToolbar.Delete(t,{featureGroup:e}),title:L.drawLocal.edit.toolbar.buttons.remove}]},getActions:function(t){var e=[{title:L.drawLocal.edit.toolbar.actions.save.title,text:L.drawLocal.edit.toolbar.actions.save.text,callback:this._save,context:this},{title:L.drawLocal.edit.toolbar.actions.cancel.title,text:L.drawLocal.edit.toolbar.actions.cancel.text,callback:this.disable,context:this}];return t.removeAllLayers&&e.push({title:L.drawLocal.edit.toolbar.actions.clearAll.title,text:L.drawLocal.edit.toolbar.actions.clearAll.text,callback:this._clearAllLayers,context:this}),e},addToolbar:function(t){var e=L.Toolbar.prototype.addToolbar.call(this,t);return this._checkDisabled(),this.options.featureGroup.on("layeradd layerremove",this._checkDisabled,this),e},removeToolbar:function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},disable:function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},_save:function(){this._activeMode.handler.save(),this._activeMode&&this._activeMode.handler.disable()},_clearAllLayers:function(){this._activeMode.handler.removeAllLayers(),this._activeMode&&this._activeMode.handler.disable()},_checkDisabled:function(){var t,e=this.options.featureGroup,i=0!==e.getLayers().length;this.options.edit&&(t=this._modes[L.EditToolbar.Edit.TYPE].button,i?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",i?L.drawLocal.edit.toolbar.buttons.edit:L.drawLocal.edit.toolbar.buttons.editDisabled)),this.options.remove&&(t=this._modes[L.EditToolbar.Delete.TYPE].button,i?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",i?L.drawLocal.edit.toolbar.buttons.remove:L.drawLocal.edit.toolbar.buttons.removeDisabled))}}),L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:"edit"},initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.setOptions(this,e),this._featureGroup=e.featureGroup,!(this._featureGroup instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this._uneditedLayerProps={},this.type=L.EditToolbar.Edit.TYPE;var i=L.version.split(".");1===parseInt(i[0],10)&&parseInt(i[1],10)>=2?L.EditToolbar.Edit.include(L.Evented.prototype):L.EditToolbar.Edit.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.EDITSTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._featureGroup.on("layeradd",this._enableLayerEdit,this).on("layerremove",this._disableLayerEdit,this))},disable:function(){this._enabled&&(this._featureGroup.off("layeradd",this._enableLayerEdit,this).off("layerremove",this._disableLayerEdit,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.EDITSTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._featureGroup.eachLayer(this._enableLayerEdit,this),this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}),t._editTooltip=this._tooltip,this._updateTooltip(),this._map.on("mousemove",this._onMouseMove,this).on("touchmove",this._onMouseMove,this).on("MSPointerMove",this._onMouseMove,this).on(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},removeHooks:function(){this._map&&(this._featureGroup.eachLayer(this._disableLayerEdit,this),this._uneditedLayerProps={},this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this).off("touchmove",this._onMouseMove,this).off("MSPointerMove",this._onMouseMove,this).off(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},revertLayers:function(){this._featureGroup.eachLayer(function(t){this._revertLayer(t)},this)},save:function(){var t=new L.LayerGroup;this._featureGroup.eachLayer(function(e){e.edited&&(t.addLayer(e),e.edited=!1)}),this._map.fire(L.Draw.Event.EDITED,{layers:t})},_backupLayer:function(t){var e=L.Util.stamp(t);this._uneditedLayerProps[e]||(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?this._uneditedLayerProps[e]={latlngs:L.LatLngUtil.cloneLatLngs(t.getLatLngs())}:t instanceof L.Circle?this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng()),radius:t.getRadius()}:(t instanceof L.Marker||t instanceof L.CircleMarker)&&(this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng())}))},_getTooltipText:function(){return{text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}},_updateTooltip:function(){this._tooltip.updateContent(this._getTooltipText())},_revertLayer:function(t){var e=L.Util.stamp(t);t.edited=!1,this._uneditedLayerProps.hasOwnProperty(e)&&(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?t.setLatLngs(this._uneditedLayerProps[e].latlngs):t instanceof L.Circle?(t.setLatLng(this._uneditedLayerProps[e].latlng),t.setRadius(this._uneditedLayerProps[e].radius)):(t instanceof L.Marker||t instanceof L.CircleMarker)&&t.setLatLng(this._uneditedLayerProps[e].latlng),t.fire("revert-edited",{layer:t}))},_enableLayerEdit:function(t){var e,i,o=t.layer||t.target||t;this._backupLayer(o),this.options.poly&&(i=L.Util.extend({},this.options.poly),o.options.poly=i),this.options.selectedPathOptions&&(e=L.Util.extend({},this.options.selectedPathOptions),e.maintainColor&&(e.color=o.options.color,e.fillColor=o.options.fillColor),o.options.original=L.extend({},o.options),o.options.editing=e),o instanceof L.Marker?(o.editing&&o.editing.enable(),o.dragging.enable(),o.on("dragend",this._onMarkerDragEnd).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onMarkerDragEnd,this).on("MSPointerUp",this._onMarkerDragEnd,this)):o.editing.enable()},_disableLayerEdit:function(t){var e=t.layer||t.target||t;e.edited=!1,e.editing&&e.editing.disable(),delete e.options.editing,delete e.options.original,
118838
this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e):(e.setStyle(e.options.previousOptions),delete e.options.previousOptions)),e instanceof L.Marker?(e.dragging.disable(),e.off("dragend",this._onMarkerDragEnd,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onMarkerDragEnd,this).off("MSPointerUp",this._onMarkerDragEnd,this)):e.editing.disable()},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_onMarkerDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_onTouchMove:function(t){var e=t.originalEvent.changedTouches[0],i=this._map.mouseEventToLayerPoint(e),o=this._map.layerPointToLatLng(i);t.target.setLatLng(o)},_hasAvailableLayers:function(){return 0!==this._featureGroup.getLayers().length}}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.Util.setOptions(this,e),this._deletableLayers=this.options.featureGroup,!(this._deletableLayers instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this.type=L.EditToolbar.Delete.TYPE;var i=L.version.split(".");1===parseInt(i[0],10)&&parseInt(i[1],10)>=2?L.EditToolbar.Delete.include(L.Evented.prototype):L.EditToolbar.Delete.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DELETESTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._deletableLayers.on("layeradd",this._enableLayerDelete,this).on("layerremove",this._disableLayerDelete,this))},disable:function(){this._enabled&&(this._deletableLayers.off("layeradd",this._enableLayerDelete,this).off("layerremove",this._disableLayerDelete,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DELETESTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._deletableLayers.eachLayer(this._enableLayerDelete,this),this._deletedLayers=new L.LayerGroup,this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.remove.tooltip.text}),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){this._map&&(this._deletableLayers.eachLayer(this._disableLayerDelete,this),this._deletedLayers=null,this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},revertLayers:function(){this._deletedLayers.eachLayer(function(t){this._deletableLayers.addLayer(t),t.fire("revert-deleted",{layer:t})},this)},save:function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},removeAllLayers:function(){this._deletableLayers.eachLayer(function(t){this._removeLayer({layer:t})},this),this.save()},_enableLayerDelete:function(t){(t.layer||t.target||t).on("click",this._removeLayer,this)},_disableLayerDelete:function(t){var e=t.layer||t.target||t;e.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(e)},_removeLayer:function(t){var e=t.layer||t.target||t;this._deletableLayers.removeLayer(e),this._deletedLayers.addLayer(e),e.fire("deleted")},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_hasAvailableLayers:function(){return 0!==this._deletableLayers.getLayers().length}})}(window,document);
118839
 
118840
/***/ }),
118841
 
118842
/***/ "./node_modules/leaflet/dist/leaflet-src.js":
118843
/*!**************************************************!*\
118844
  !*** ./node_modules/leaflet/dist/leaflet-src.js ***!
118845
  \**************************************************/
118846
/*! no static exports found */
118847
/***/ (function(module, exports, __webpack_require__) {
118848
 
118849
/* @preserve
118850
 * Leaflet 1.3.3, a JS library for interactive maps. http://leafletjs.com
118851
 * (c) 2010-2018 Vladimir Agafonkin, (c) 2010-2011 CloudMade
118852
 */
118853
 
118854
(function (global, factory) {
118855
	 true ? factory(exports) :
118856
	undefined;
118857
}(this, (function (exports) { 'use strict';
118858
 
118859
var version = "1.3.3";
118860
 
118861
/*
118862
 * @namespace Util
118863
 *
118864
 * Various utility functions, used by Leaflet internally.
118865
 */
118866
 
118867
var freeze = Object.freeze;
118868
Object.freeze = function (obj) { return obj; };
118869
 
118870
// @function extend(dest: Object, src?: Object): Object
118871
// Merges the properties of the `src` object (or multiple objects) into `dest` object and returns the latter. Has an `L.extend` shortcut.
118872
function extend(dest) {
118873
	var i, j, len, src;
118874
 
118875
	for (j = 1, len = arguments.length; j < len; j++) {
118876
		src = arguments[j];
118877
		for (i in src) {
118878
			dest[i] = src[i];
118879
		}
118880
	}
118881
	return dest;
118882
}
118883
 
118884
// @function create(proto: Object, properties?: Object): Object
118885
// Compatibility polyfill for [Object.create](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/create)
118886
var create = Object.create || (function () {
118887
	function F() {}
118888
	return function (proto) {
118889
		F.prototype = proto;
118890
		return new F();
118891
	};
118892
})();
118893
 
118894
// @function bind(fn: Function, …): Function
118895
// Returns a new function bound to the arguments passed, like [Function.prototype.bind](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).
118896
// Has a `L.bind()` shortcut.
118897
function bind(fn, obj) {
118898
	var slice = Array.prototype.slice;
118899
 
118900
	if (fn.bind) {
118901
		return fn.bind.apply(fn, slice.call(arguments, 1));
118902
	}
118903
 
118904
	var args = slice.call(arguments, 2);
118905
 
118906
	return function () {
118907
		return fn.apply(obj, args.length ? args.concat(slice.call(arguments)) : arguments);
118908
	};
118909
}
118910
 
118911
// @property lastId: Number
118912
// Last unique ID used by [`stamp()`](#util-stamp)
118913
var lastId = 0;
118914
 
118915
// @function stamp(obj: Object): Number
118916
// Returns the unique ID of an object, assigning it one if it doesn't have it.
118917
function stamp(obj) {
118918
	/*eslint-disable */
118919
	obj._leaflet_id = obj._leaflet_id || ++lastId;
118920
	return obj._leaflet_id;
118921
	/* eslint-enable */
118922
}
118923
 
118924
// @function throttle(fn: Function, time: Number, context: Object): Function
118925
// Returns a function which executes function `fn` with the given scope `context`
118926
// (so that the `this` keyword refers to `context` inside `fn`'s code). The function
118927
// `fn` will be called no more than one time per given amount of `time`. The arguments
118928
// received by the bound function will be any arguments passed when binding the
118929
// function, followed by any arguments passed when invoking the bound function.
118930
// Has an `L.throttle` shortcut.
118931
function throttle(fn, time, context) {
118932
	var lock, args, wrapperFn, later;
118933
 
118934
	later = function () {
118935
		// reset lock and call if queued
118936
		lock = false;
118937
		if (args) {
118938
			wrapperFn.apply(context, args);
118939
			args = false;
118940
		}
118941
	};
118942
 
118943
	wrapperFn = function () {
118944
		if (lock) {
118945
			// called too soon, queue to call later
118946
			args = arguments;
118947
 
118948
		} else {
118949
			// call and lock until later
118950
			fn.apply(context, arguments);
118951
			setTimeout(later, time);
118952
			lock = true;
118953
		}
118954
	};
118955
 
118956
	return wrapperFn;
118957
}
118958
 
118959
// @function wrapNum(num: Number, range: Number[], includeMax?: Boolean): Number
118960
// Returns the number `num` modulo `range` in such a way so it lies within
118961
// `range[0]` and `range[1]`. The returned value will be always smaller than
118962
// `range[1]` unless `includeMax` is set to `true`.
118963
function wrapNum(x, range, includeMax) {
118964
	var max = range[1],
118965
	    min = range[0],
118966
	    d = max - min;
118967
	return x === max && includeMax ? x : ((x - min) % d + d) % d + min;
118968
}
118969
 
118970
// @function falseFn(): Function
118971
// Returns a function which always returns `false`.
118972
function falseFn() { return false; }
118973
 
118974
// @function formatNum(num: Number, digits?: Number): Number
118975
// Returns the number `num` rounded to `digits` decimals, or to 6 decimals by default.
118976
function formatNum(num, digits) {
118977
	var pow = Math.pow(10, (digits === undefined ? 6 : digits));
118978
	return Math.round(num * pow) / pow;
118979
}
118980
 
118981
// @function trim(str: String): String
118982
// Compatibility polyfill for [String.prototype.trim](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim)
118983
function trim(str) {
118984
	return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, '');
118985
}
118986
 
118987
// @function splitWords(str: String): String[]
118988
// Trims and splits the string on whitespace and returns the array of parts.
118989
function splitWords(str) {
118990
	return trim(str).split(/\s+/);
118991
}
118992
 
118993
// @function setOptions(obj: Object, options: Object): Object
118994
// Merges the given properties to the `options` of the `obj` object, returning the resulting options. See `Class options`. Has an `L.setOptions` shortcut.
118995
function setOptions(obj, options) {
118996
	if (!obj.hasOwnProperty('options')) {
118997
		obj.options = obj.options ? create(obj.options) : {};
118998
	}
118999
	for (var i in options) {
119000
		obj.options[i] = options[i];
119001
	}
119002
	return obj.options;
119003
}
119004
 
119005
// @function getParamString(obj: Object, existingUrl?: String, uppercase?: Boolean): String
119006
// Converts an object into a parameter URL string, e.g. `{a: "foo", b: "bar"}`
119007
// translates to `'?a=foo&b=bar'`. If `existingUrl` is set, the parameters will
119008
// be appended at the end. If `uppercase` is `true`, the parameter names will
119009
// be uppercased (e.g. `'?A=foo&B=bar'`)
119010
function getParamString(obj, existingUrl, uppercase) {
119011
	var params = [];
119012
	for (var i in obj) {
119013
		params.push(encodeURIComponent(uppercase ? i.toUpperCase() : i) + '=' + encodeURIComponent(obj[i]));
119014
	}
119015
	return ((!existingUrl || existingUrl.indexOf('?') === -1) ? '?' : '&') + params.join('&');
119016
}
119017
 
119018
var templateRe = /\{ *([\w_-]+) *\}/g;
119019
 
119020
// @function template(str: String, data: Object): String
119021
// Simple templating facility, accepts a template string of the form `'Hello {a}, {b}'`
119022
// and a data object like `{a: 'foo', b: 'bar'}`, returns evaluated string
119023
// `('Hello foo, bar')`. You can also specify functions instead of strings for
119024
// data values — they will be evaluated passing `data` as an argument.
119025
function template(str, data) {
119026
	return str.replace(templateRe, function (str, key) {
119027
		var value = data[key];
119028
 
119029
		if (value === undefined) {
119030
			throw new Error('No value provided for variable ' + str);
119031
 
119032
		} else if (typeof value === 'function') {
119033
			value = value(data);
119034
		}
119035
		return value;
119036
	});
119037
}
119038
 
119039
// @function isArray(obj): Boolean
119040
// Compatibility polyfill for [Array.isArray](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray)
119041
var isArray = Array.isArray || function (obj) {
119042
	return (Object.prototype.toString.call(obj) === '[object Array]');
119043
};
119044
 
119045
// @function indexOf(array: Array, el: Object): Number
119046
// Compatibility polyfill for [Array.prototype.indexOf](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf)
119047
function indexOf(array, el) {
119048
	for (var i = 0; i < array.length; i++) {
119049
		if (array[i] === el) { return i; }
119050
	}
119051
	return -1;
119052
}
119053
 
119054
// @property emptyImageUrl: String
119055
// Data URI string containing a base64-encoded empty GIF image.
119056
// Used as a hack to free memory from unused images on WebKit-powered
119057
// mobile devices (by setting image `src` to this string).
119058
var emptyImageUrl = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=';
119059
 
119060
// inspired by http://paulirish.com/2011/requestanimationframe-for-smart-animating/
119061
 
119062
function getPrefixed(name) {
119063
	return window['webkit' + name] || window['moz' + name] || window['ms' + name];
119064
}
119065
 
119066
var lastTime = 0;
119067
 
119068
// fallback for IE 7-8
119069
function timeoutDefer(fn) {
119070
	var time = +new Date(),
119071
	    timeToCall = Math.max(0, 16 - (time - lastTime));
119072
 
119073
	lastTime = time + timeToCall;
119074
	return window.setTimeout(fn, timeToCall);
119075
}
119076
 
119077
var requestFn = window.requestAnimationFrame || getPrefixed('RequestAnimationFrame') || timeoutDefer;
119078
var cancelFn = window.cancelAnimationFrame || getPrefixed('CancelAnimationFrame') ||
119079
		getPrefixed('CancelRequestAnimationFrame') || function (id) { window.clearTimeout(id); };
119080
 
119081
// @function requestAnimFrame(fn: Function, context?: Object, immediate?: Boolean): Number
119082
// Schedules `fn` to be executed when the browser repaints. `fn` is bound to
119083
// `context` if given. When `immediate` is set, `fn` is called immediately if
119084
// the browser doesn't have native support for
119085
// [`window.requestAnimationFrame`](https://developer.mozilla.org/docs/Web/API/window/requestAnimationFrame),
119086
// otherwise it's delayed. Returns a request ID that can be used to cancel the request.
119087
function requestAnimFrame(fn, context, immediate) {
119088
	if (immediate && requestFn === timeoutDefer) {
119089
		fn.call(context);
119090
	} else {
119091
		return requestFn.call(window, bind(fn, context));
119092
	}
119093
}
119094
 
119095
// @function cancelAnimFrame(id: Number): undefined
119096
// Cancels a previous `requestAnimFrame`. See also [window.cancelAnimationFrame](https://developer.mozilla.org/docs/Web/API/window/cancelAnimationFrame).
119097
function cancelAnimFrame(id) {
119098
	if (id) {
119099
		cancelFn.call(window, id);
119100
	}
119101
}
119102
 
119103
 
119104
var Util = (Object.freeze || Object)({
119105
	freeze: freeze,
119106
	extend: extend,
119107
	create: create,
119108
	bind: bind,
119109
	lastId: lastId,
119110
	stamp: stamp,
119111
	throttle: throttle,
119112
	wrapNum: wrapNum,
119113
	falseFn: falseFn,
119114
	formatNum: formatNum,
119115
	trim: trim,
119116
	splitWords: splitWords,
119117
	setOptions: setOptions,
119118
	getParamString: getParamString,
119119
	template: template,
119120
	isArray: isArray,
119121
	indexOf: indexOf,
119122
	emptyImageUrl: emptyImageUrl,
119123
	requestFn: requestFn,
119124
	cancelFn: cancelFn,
119125
	requestAnimFrame: requestAnimFrame,
119126
	cancelAnimFrame: cancelAnimFrame
119127
});
119128
 
119129
// @class Class
119130
// @aka L.Class
119131
 
119132
// @section
119133
// @uninheritable
119134
 
119135
// Thanks to John Resig and Dean Edwards for inspiration!
119136
 
119137
function Class() {}
119138
 
119139
Class.extend = function (props) {
119140
 
119141
	// @function extend(props: Object): Function
119142
	// [Extends the current class](#class-inheritance) given the properties to be included.
119143
	// Returns a Javascript function that is a class constructor (to be called with `new`).
119144
	var NewClass = function () {
119145
 
119146
		// call the constructor
119147
		if (this.initialize) {
119148
			this.initialize.apply(this, arguments);
119149
		}
119150
 
119151
		// call all constructor hooks
119152
		this.callInitHooks();
119153
	};
119154
 
119155
	var parentProto = NewClass.__super__ = this.prototype;
119156
 
119157
	var proto = create(parentProto);
119158
	proto.constructor = NewClass;
119159
 
119160
	NewClass.prototype = proto;
119161
 
119162
	// inherit parent's statics
119163
	for (var i in this) {
119164
		if (this.hasOwnProperty(i) && i !== 'prototype' && i !== '__super__') {
119165
			NewClass[i] = this[i];
119166
		}
119167
	}
119168
 
119169
	// mix static properties into the class
119170
	if (props.statics) {
119171
		extend(NewClass, props.statics);
119172
		delete props.statics;
119173
	}
119174
 
119175
	// mix includes into the prototype
119176
	if (props.includes) {
119177
		checkDeprecatedMixinEvents(props.includes);
119178
		extend.apply(null, [proto].concat(props.includes));
119179
		delete props.includes;
119180
	}
119181
 
119182
	// merge options
119183
	if (proto.options) {
119184
		props.options = extend(create(proto.options), props.options);
119185
	}
119186
 
119187
	// mix given properties into the prototype
119188
	extend(proto, props);
119189
 
119190
	proto._initHooks = [];
119191
 
119192
	// add method for calling all hooks
119193
	proto.callInitHooks = function () {
119194
 
119195
		if (this._initHooksCalled) { return; }
119196
 
119197
		if (parentProto.callInitHooks) {
119198
			parentProto.callInitHooks.call(this);
119199
		}
119200
 
119201
		this._initHooksCalled = true;
119202
 
119203
		for (var i = 0, len = proto._initHooks.length; i < len; i++) {
119204
			proto._initHooks[i].call(this);
119205
		}
119206
	};
119207
 
119208
	return NewClass;
119209
};
119210
 
119211
 
119212
// @function include(properties: Object): this
119213
// [Includes a mixin](#class-includes) into the current class.
119214
Class.include = function (props) {
119215
	extend(this.prototype, props);
119216
	return this;
119217
};
119218
 
119219
// @function mergeOptions(options: Object): this
119220
// [Merges `options`](#class-options) into the defaults of the class.
119221
Class.mergeOptions = function (options) {
119222
	extend(this.prototype.options, options);
119223
	return this;
119224
};
119225
 
119226
// @function addInitHook(fn: Function): this
119227
// Adds a [constructor hook](#class-constructor-hooks) to the class.
119228
Class.addInitHook = function (fn) { // (Function) || (String, args...)
119229
	var args = Array.prototype.slice.call(arguments, 1);
119230
 
119231
	var init = typeof fn === 'function' ? fn : function () {
119232
		this[fn].apply(this, args);
119233
	};
119234
 
119235
	this.prototype._initHooks = this.prototype._initHooks || [];
119236
	this.prototype._initHooks.push(init);
119237
	return this;
119238
};
119239
 
119240
function checkDeprecatedMixinEvents(includes) {
119241
	if (typeof L === 'undefined' || !L || !L.Mixin) { return; }
119242
 
119243
	includes = isArray(includes) ? includes : [includes];
119244
 
119245
	for (var i = 0; i < includes.length; i++) {
119246
		if (includes[i] === L.Mixin.Events) {
119247
			console.warn('Deprecated include of L.Mixin.Events: ' +
119248
				'this property will be removed in future releases, ' +
119249
				'please inherit from L.Evented instead.', new Error().stack);
119250
		}
119251
	}
119252
}
119253
 
119254
/*
119255
 * @class Evented
119256
 * @aka L.Evented
119257
 * @inherits Class
119258
 *
119259
 * A set of methods shared between event-powered classes (like `Map` and `Marker`). Generally, events allow you to execute some function when something happens with an object (e.g. the user clicks on the map, causing the map to fire `'click'` event).
119260
 *
119261
 * @example
119262
 *
119263
 * ```js
119264
 * map.on('click', function(e) {
119265
 * 	alert(e.latlng);
119266
 * } );
119267
 * ```
119268
 *
119269
 * Leaflet deals with event listeners by reference, so if you want to add a listener and then remove it, define it as a function:
119270
 *
119271
 * ```js
119272
 * function onClick(e) { ... }
119273
 *
119274
 * map.on('click', onClick);
119275
 * map.off('click', onClick);
119276
 * ```
119277
 */
119278
 
119279
var Events = {
119280
	/* @method on(type: String, fn: Function, context?: Object): this
119281
	 * Adds a listener function (`fn`) to a particular event type of the object. You can optionally specify the context of the listener (object the this keyword will point to). You can also pass several space-separated types (e.g. `'click dblclick'`).
119282
	 *
119283
	 * @alternative
119284
	 * @method on(eventMap: Object): this
119285
	 * Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}`
119286
	 */
119287
	on: function (types, fn, context) {
119288
 
119289
		// types can be a map of types/handlers
119290
		if (typeof types === 'object') {
119291
			for (var type in types) {
119292
				// we don't process space-separated events here for performance;
119293
				// it's a hot path since Layer uses the on(obj) syntax
119294
				this._on(type, types[type], fn);
119295
			}
119296
 
119297
		} else {
119298
			// types can be a string of space-separated words
119299
			types = splitWords(types);
119300
 
119301
			for (var i = 0, len = types.length; i < len; i++) {
119302
				this._on(types[i], fn, context);
119303
			}
119304
		}
119305
 
119306
		return this;
119307
	},
119308
 
119309
	/* @method off(type: String, fn?: Function, context?: Object): this
119310
	 * Removes a previously added listener function. If no function is specified, it will remove all the listeners of that particular event from the object. Note that if you passed a custom context to `on`, you must pass the same context to `off` in order to remove the listener.
119311
	 *
119312
	 * @alternative
119313
	 * @method off(eventMap: Object): this
119314
	 * Removes a set of type/listener pairs.
119315
	 *
119316
	 * @alternative
119317
	 * @method off: this
119318
	 * Removes all listeners to all events on the object.
119319
	 */
119320
	off: function (types, fn, context) {
119321
 
119322
		if (!types) {
119323
			// clear all listeners if called without arguments
119324
			delete this._events;
119325
 
119326
		} else if (typeof types === 'object') {
119327
			for (var type in types) {
119328
				this._off(type, types[type], fn);
119329
			}
119330
 
119331
		} else {
119332
			types = splitWords(types);
119333
 
119334
			for (var i = 0, len = types.length; i < len; i++) {
119335
				this._off(types[i], fn, context);
119336
			}
119337
		}
119338
 
119339
		return this;
119340
	},
119341
 
119342
	// attach listener (without syntactic sugar now)
119343
	_on: function (type, fn, context) {
119344
		this._events = this._events || {};
119345
 
119346
		/* get/init listeners for type */
119347
		var typeListeners = this._events[type];
119348
		if (!typeListeners) {
119349
			typeListeners = [];
119350
			this._events[type] = typeListeners;
119351
		}
119352
 
119353
		if (context === this) {
119354
			// Less memory footprint.
119355
			context = undefined;
119356
		}
119357
		var newListener = {fn: fn, ctx: context},
119358
		    listeners = typeListeners;
119359
 
119360
		// check if fn already there
119361
		for (var i = 0, len = listeners.length; i < len; i++) {
119362
			if (listeners[i].fn === fn && listeners[i].ctx === context) {
119363
				return;
119364
			}
119365
		}
119366
 
119367
		listeners.push(newListener);
119368
	},
119369
 
119370
	_off: function (type, fn, context) {
119371
		var listeners,
119372
		    i,
119373
		    len;
119374
 
119375
		if (!this._events) { return; }
119376
 
119377
		listeners = this._events[type];
119378
 
119379
		if (!listeners) {
119380
			return;
119381
		}
119382
 
119383
		if (!fn) {
119384
			// Set all removed listeners to noop so they are not called if remove happens in fire
119385
			for (i = 0, len = listeners.length; i < len; i++) {
119386
				listeners[i].fn = falseFn;
119387
			}
119388
			// clear all listeners for a type if function isn't specified
119389
			delete this._events[type];
119390
			return;
119391
		}
119392
 
119393
		if (context === this) {
119394
			context = undefined;
119395
		}
119396
 
119397
		if (listeners) {
119398
 
119399
			// find fn and remove it
119400
			for (i = 0, len = listeners.length; i < len; i++) {
119401
				var l = listeners[i];
119402
				if (l.ctx !== context) { continue; }
119403
				if (l.fn === fn) {
119404
 
119405
					// set the removed listener to noop so that's not called if remove happens in fire
119406
					l.fn = falseFn;
119407
 
119408
					if (this._firingCount) {
119409
						/* copy array in case events are being fired */
119410
						this._events[type] = listeners = listeners.slice();
119411
					}
119412
					listeners.splice(i, 1);
119413
 
119414
					return;
119415
				}
119416
			}
119417
		}
119418
	},
119419
 
119420
	// @method fire(type: String, data?: Object, propagate?: Boolean): this
119421
	// Fires an event of the specified type. You can optionally provide an data
119422
	// object — the first argument of the listener function will contain its
119423
	// properties. The event can optionally be propagated to event parents.
119424
	fire: function (type, data, propagate) {
119425
		if (!this.listens(type, propagate)) { return this; }
119426
 
119427
		var event = extend({}, data, {
119428
			type: type,
119429
			target: this,
119430
			sourceTarget: data && data.sourceTarget || this
119431
		});
119432
 
119433
		if (this._events) {
119434
			var listeners = this._events[type];
119435
 
119436
			if (listeners) {
119437
				this._firingCount = (this._firingCount + 1) || 1;
119438
				for (var i = 0, len = listeners.length; i < len; i++) {
119439
					var l = listeners[i];
119440
					l.fn.call(l.ctx || this, event);
119441
				}
119442
 
119443
				this._firingCount--;
119444
			}
119445
		}
119446
 
119447
		if (propagate) {
119448
			// propagate the event to parents (set with addEventParent)
119449
			this._propagateEvent(event);
119450
		}
119451
 
119452
		return this;
119453
	},
119454
 
119455
	// @method listens(type: String): Boolean
119456
	// Returns `true` if a particular event type has any listeners attached to it.
119457
	listens: function (type, propagate) {
119458
		var listeners = this._events && this._events[type];
119459
		if (listeners && listeners.length) { return true; }
119460
 
119461
		if (propagate) {
119462
			// also check parents for listeners if event propagates
119463
			for (var id in this._eventParents) {
119464
				if (this._eventParents[id].listens(type, propagate)) { return true; }
119465
			}
119466
		}
119467
		return false;
119468
	},
119469
 
119470
	// @method once(…): this
119471
	// Behaves as [`on(…)`](#evented-on), except the listener will only get fired once and then removed.
119472
	once: function (types, fn, context) {
119473
 
119474
		if (typeof types === 'object') {
119475
			for (var type in types) {
119476
				this.once(type, types[type], fn);
119477
			}
119478
			return this;
119479
		}
119480
 
119481
		var handler = bind(function () {
119482
			this
119483
			    .off(types, fn, context)
119484
			    .off(types, handler, context);
119485
		}, this);
119486
 
119487
		// add a listener that's executed once and removed after that
119488
		return this
119489
		    .on(types, fn, context)
119490
		    .on(types, handler, context);
119491
	},
119492
 
119493
	// @method addEventParent(obj: Evented): this
119494
	// Adds an event parent - an `Evented` that will receive propagated events
119495
	addEventParent: function (obj) {
119496
		this._eventParents = this._eventParents || {};
119497
		this._eventParents[stamp(obj)] = obj;
119498
		return this;
119499
	},
119500
 
119501
	// @method removeEventParent(obj: Evented): this
119502
	// Removes an event parent, so it will stop receiving propagated events
119503
	removeEventParent: function (obj) {
119504
		if (this._eventParents) {
119505
			delete this._eventParents[stamp(obj)];
119506
		}
119507
		return this;
119508
	},
119509
 
119510
	_propagateEvent: function (e) {
119511
		for (var id in this._eventParents) {
119512
			this._eventParents[id].fire(e.type, extend({
119513
				layer: e.target,
119514
				propagatedFrom: e.target
119515
			}, e), true);
119516
		}
119517
	}
119518
};
119519
 
119520
// aliases; we should ditch those eventually
119521
 
119522
// @method addEventListener(…): this
119523
// Alias to [`on(…)`](#evented-on)
119524
Events.addEventListener = Events.on;
119525
 
119526
// @method removeEventListener(…): this
119527
// Alias to [`off(…)`](#evented-off)
119528
 
119529
// @method clearAllEventListeners(…): this
119530
// Alias to [`off()`](#evented-off)
119531
Events.removeEventListener = Events.clearAllEventListeners = Events.off;
119532
 
119533
// @method addOneTimeEventListener(…): this
119534
// Alias to [`once(…)`](#evented-once)
119535
Events.addOneTimeEventListener = Events.once;
119536
 
119537
// @method fireEvent(…): this
119538
// Alias to [`fire(…)`](#evented-fire)
119539
Events.fireEvent = Events.fire;
119540
 
119541
// @method hasEventListeners(…): Boolean
119542
// Alias to [`listens(…)`](#evented-listens)
119543
Events.hasEventListeners = Events.listens;
119544
 
119545
var Evented = Class.extend(Events);
119546
 
119547
/*
119548
 * @class Point
119549
 * @aka L.Point
119550
 *
119551
 * Represents a point with `x` and `y` coordinates in pixels.
119552
 *
119553
 * @example
119554
 *
119555
 * ```js
119556
 * var point = L.point(200, 300);
119557
 * ```
119558
 *
119559
 * All Leaflet methods and options that accept `Point` objects also accept them in a simple Array form (unless noted otherwise), so these lines are equivalent:
119560
 *
119561
 * ```js
119562
 * map.panBy([200, 300]);
119563
 * map.panBy(L.point(200, 300));
119564
 * ```
119565
 *
119566
 * Note that `Point` does not inherit from Leafet's `Class` object,
119567
 * which means new classes can't inherit from it, and new methods
119568
 * can't be added to it with the `include` function.
119569
 */
119570
 
119571
function Point(x, y, round) {
119572
	// @property x: Number; The `x` coordinate of the point
119573
	this.x = (round ? Math.round(x) : x);
119574
	// @property y: Number; The `y` coordinate of the point
119575
	this.y = (round ? Math.round(y) : y);
119576
}
119577
 
119578
var trunc = Math.trunc || function (v) {
119579
	return v > 0 ? Math.floor(v) : Math.ceil(v);
119580
};
119581
 
119582
Point.prototype = {
119583
 
119584
	// @method clone(): Point
119585
	// Returns a copy of the current point.
119586
	clone: function () {
119587
		return new Point(this.x, this.y);
119588
	},
119589
 
119590
	// @method add(otherPoint: Point): Point
119591
	// Returns the result of addition of the current and the given points.
119592
	add: function (point) {
119593
		// non-destructive, returns a new point
119594
		return this.clone()._add(toPoint(point));
119595
	},
119596
 
119597
	_add: function (point) {
119598
		// destructive, used directly for performance in situations where it's safe to modify existing point
119599
		this.x += point.x;
119600
		this.y += point.y;
119601
		return this;
119602
	},
119603
 
119604
	// @method subtract(otherPoint: Point): Point
119605
	// Returns the result of subtraction of the given point from the current.
119606
	subtract: function (point) {
119607
		return this.clone()._subtract(toPoint(point));
119608
	},
119609
 
119610
	_subtract: function (point) {
119611
		this.x -= point.x;
119612
		this.y -= point.y;
119613
		return this;
119614
	},
119615
 
119616
	// @method divideBy(num: Number): Point
119617
	// Returns the result of division of the current point by the given number.
119618
	divideBy: function (num) {
119619
		return this.clone()._divideBy(num);
119620
	},
119621
 
119622
	_divideBy: function (num) {
119623
		this.x /= num;
119624
		this.y /= num;
119625
		return this;
119626
	},
119627
 
119628
	// @method multiplyBy(num: Number): Point
119629
	// Returns the result of multiplication of the current point by the given number.
119630
	multiplyBy: function (num) {
119631
		return this.clone()._multiplyBy(num);
119632
	},
119633
 
119634
	_multiplyBy: function (num) {
119635
		this.x *= num;
119636
		this.y *= num;
119637
		return this;
119638
	},
119639
 
119640
	// @method scaleBy(scale: Point): Point
119641
	// Multiply each coordinate of the current point by each coordinate of
119642
	// `scale`. In linear algebra terms, multiply the point by the
119643
	// [scaling matrix](https://en.wikipedia.org/wiki/Scaling_%28geometry%29#Matrix_representation)
119644
	// defined by `scale`.
119645
	scaleBy: function (point) {
119646
		return new Point(this.x * point.x, this.y * point.y);
119647
	},
119648
 
119649
	// @method unscaleBy(scale: Point): Point
119650
	// Inverse of `scaleBy`. Divide each coordinate of the current point by
119651
	// each coordinate of `scale`.
119652
	unscaleBy: function (point) {
119653
		return new Point(this.x / point.x, this.y / point.y);
119654
	},
119655
 
119656
	// @method round(): Point
119657
	// Returns a copy of the current point with rounded coordinates.
119658
	round: function () {
119659
		return this.clone()._round();
119660
	},
119661
 
119662
	_round: function () {
119663
		this.x = Math.round(this.x);
119664
		this.y = Math.round(this.y);
119665
		return this;
119666
	},
119667
 
119668
	// @method floor(): Point
119669
	// Returns a copy of the current point with floored coordinates (rounded down).
119670
	floor: function () {
119671
		return this.clone()._floor();
119672
	},
119673
 
119674
	_floor: function () {
119675
		this.x = Math.floor(this.x);
119676
		this.y = Math.floor(this.y);
119677
		return this;
119678
	},
119679
 
119680
	// @method ceil(): Point
119681
	// Returns a copy of the current point with ceiled coordinates (rounded up).
119682
	ceil: function () {
119683
		return this.clone()._ceil();
119684
	},
119685
 
119686
	_ceil: function () {
119687
		this.x = Math.ceil(this.x);
119688
		this.y = Math.ceil(this.y);
119689
		return this;
119690
	},
119691
 
119692
	// @method trunc(): Point
119693
	// Returns a copy of the current point with truncated coordinates (rounded towards zero).
119694
	trunc: function () {
119695
		return this.clone()._trunc();
119696
	},
119697
 
119698
	_trunc: function () {
119699
		this.x = trunc(this.x);
119700
		this.y = trunc(this.y);
119701
		return this;
119702
	},
119703
 
119704
	// @method distanceTo(otherPoint: Point): Number
119705
	// Returns the cartesian distance between the current and the given points.
119706
	distanceTo: function (point) {
119707
		point = toPoint(point);
119708
 
119709
		var x = point.x - this.x,
119710
		    y = point.y - this.y;
119711
 
119712
		return Math.sqrt(x * x + y * y);
119713
	},
119714
 
119715
	// @method equals(otherPoint: Point): Boolean
119716
	// Returns `true` if the given point has the same coordinates.
119717
	equals: function (point) {
119718
		point = toPoint(point);
119719
 
119720
		return point.x === this.x &&
119721
		       point.y === this.y;
119722
	},
119723
 
119724
	// @method contains(otherPoint: Point): Boolean
119725
	// Returns `true` if both coordinates of the given point are less than the corresponding current point coordinates (in absolute values).
119726
	contains: function (point) {
119727
		point = toPoint(point);
119728
 
119729
		return Math.abs(point.x) <= Math.abs(this.x) &&
119730
		       Math.abs(point.y) <= Math.abs(this.y);
119731
	},
119732
 
119733
	// @method toString(): String
119734
	// Returns a string representation of the point for debugging purposes.
119735
	toString: function () {
119736
		return 'Point(' +
119737
		        formatNum(this.x) + ', ' +
119738
		        formatNum(this.y) + ')';
119739
	}
119740
};
119741
 
119742
// @factory L.point(x: Number, y: Number, round?: Boolean)
119743
// Creates a Point object with the given `x` and `y` coordinates. If optional `round` is set to true, rounds the `x` and `y` values.
119744
 
119745
// @alternative
119746
// @factory L.point(coords: Number[])
119747
// Expects an array of the form `[x, y]` instead.
119748
 
119749
// @alternative
119750
// @factory L.point(coords: Object)
119751
// Expects a plain object of the form `{x: Number, y: Number}` instead.
119752
function toPoint(x, y, round) {
119753
	if (x instanceof Point) {
119754
		return x;
119755
	}
119756
	if (isArray(x)) {
119757
		return new Point(x[0], x[1]);
119758
	}
119759
	if (x === undefined || x === null) {
119760
		return x;
119761
	}
119762
	if (typeof x === 'object' && 'x' in x && 'y' in x) {
119763
		return new Point(x.x, x.y);
119764
	}
119765
	return new Point(x, y, round);
119766
}
119767
 
119768
/*
119769
 * @class Bounds
119770
 * @aka L.Bounds
119771
 *
119772
 * Represents a rectangular area in pixel coordinates.
119773
 *
119774
 * @example
119775
 *
119776
 * ```js
119777
 * var p1 = L.point(10, 10),
119778
 * p2 = L.point(40, 60),
119779
 * bounds = L.bounds(p1, p2);
119780
 * ```
119781
 *
119782
 * All Leaflet methods that accept `Bounds` objects also accept them in a simple Array form (unless noted otherwise), so the bounds example above can be passed like this:
119783
 *
119784
 * ```js
119785
 * otherBounds.intersects([[10, 10], [40, 60]]);
119786
 * ```
119787
 *
119788
 * Note that `Bounds` does not inherit from Leafet's `Class` object,
119789
 * which means new classes can't inherit from it, and new methods
119790
 * can't be added to it with the `include` function.
119791
 */
119792
 
119793
function Bounds(a, b) {
119794
	if (!a) { return; }
119795
 
119796
	var points = b ? [a, b] : a;
119797
 
119798
	for (var i = 0, len = points.length; i < len; i++) {
119799
		this.extend(points[i]);
119800
	}
119801
}
119802
 
119803
Bounds.prototype = {
119804
	// @method extend(point: Point): this
119805
	// Extends the bounds to contain the given point.
119806
	extend: function (point) { // (Point)
119807
		point = toPoint(point);
119808
 
119809
		// @property min: Point
119810
		// The top left corner of the rectangle.
119811
		// @property max: Point
119812
		// The bottom right corner of the rectangle.
119813
		if (!this.min && !this.max) {
119814
			this.min = point.clone();
119815
			this.max = point.clone();
119816
		} else {
119817
			this.min.x = Math.min(point.x, this.min.x);
119818
			this.max.x = Math.max(point.x, this.max.x);
119819
			this.min.y = Math.min(point.y, this.min.y);
119820
			this.max.y = Math.max(point.y, this.max.y);
119821
		}
119822
		return this;
119823
	},
119824
 
119825
	// @method getCenter(round?: Boolean): Point
119826
	// Returns the center point of the bounds.
119827
	getCenter: function (round) {
119828
		return new Point(
119829
		        (this.min.x + this.max.x) / 2,
119830
		        (this.min.y + this.max.y) / 2, round);
119831
	},
119832
 
119833
	// @method getBottomLeft(): Point
119834
	// Returns the bottom-left point of the bounds.
119835
	getBottomLeft: function () {
119836
		return new Point(this.min.x, this.max.y);
119837
	},
119838
 
119839
	// @method getTopRight(): Point
119840
	// Returns the top-right point of the bounds.
119841
	getTopRight: function () { // -> Point
119842
		return new Point(this.max.x, this.min.y);
119843
	},
119844
 
119845
	// @method getTopLeft(): Point
119846
	// Returns the top-left point of the bounds (i.e. [`this.min`](#bounds-min)).
119847
	getTopLeft: function () {
119848
		return this.min; // left, top
119849
	},
119850
 
119851
	// @method getBottomRight(): Point
119852
	// Returns the bottom-right point of the bounds (i.e. [`this.max`](#bounds-max)).
119853
	getBottomRight: function () {
119854
		return this.max; // right, bottom
119855
	},
119856
 
119857
	// @method getSize(): Point
119858
	// Returns the size of the given bounds
119859
	getSize: function () {
119860
		return this.max.subtract(this.min);
119861
	},
119862
 
119863
	// @method contains(otherBounds: Bounds): Boolean
119864
	// Returns `true` if the rectangle contains the given one.
119865
	// @alternative
119866
	// @method contains(point: Point): Boolean
119867
	// Returns `true` if the rectangle contains the given point.
119868
	contains: function (obj) {
119869
		var min, max;
119870
 
119871
		if (typeof obj[0] === 'number' || obj instanceof Point) {
119872
			obj = toPoint(obj);
119873
		} else {
119874
			obj = toBounds(obj);
119875
		}
119876
 
119877
		if (obj instanceof Bounds) {
119878
			min = obj.min;
119879
			max = obj.max;
119880
		} else {
119881
			min = max = obj;
119882
		}
119883
 
119884
		return (min.x >= this.min.x) &&
119885
		       (max.x <= this.max.x) &&
119886
		       (min.y >= this.min.y) &&
119887
		       (max.y <= this.max.y);
119888
	},
119889
 
119890
	// @method intersects(otherBounds: Bounds): Boolean
119891
	// Returns `true` if the rectangle intersects the given bounds. Two bounds
119892
	// intersect if they have at least one point in common.
119893
	intersects: function (bounds) { // (Bounds) -> Boolean
119894
		bounds = toBounds(bounds);
119895
 
119896
		var min = this.min,
119897
		    max = this.max,
119898
		    min2 = bounds.min,
119899
		    max2 = bounds.max,
119900
		    xIntersects = (max2.x >= min.x) && (min2.x <= max.x),
119901
		    yIntersects = (max2.y >= min.y) && (min2.y <= max.y);
119902
 
119903
		return xIntersects && yIntersects;
119904
	},
119905
 
119906
	// @method overlaps(otherBounds: Bounds): Boolean
119907
	// Returns `true` if the rectangle overlaps the given bounds. Two bounds
119908
	// overlap if their intersection is an area.
119909
	overlaps: function (bounds) { // (Bounds) -> Boolean
119910
		bounds = toBounds(bounds);
119911
 
119912
		var min = this.min,
119913
		    max = this.max,
119914
		    min2 = bounds.min,
119915
		    max2 = bounds.max,
119916
		    xOverlaps = (max2.x > min.x) && (min2.x < max.x),
119917
		    yOverlaps = (max2.y > min.y) && (min2.y < max.y);
119918
 
119919
		return xOverlaps && yOverlaps;
119920
	},
119921
 
119922
	isValid: function () {
119923
		return !!(this.min && this.max);
119924
	}
119925
};
119926
 
119927
 
119928
// @factory L.bounds(corner1: Point, corner2: Point)
119929
// Creates a Bounds object from two corners coordinate pairs.
119930
// @alternative
119931
// @factory L.bounds(points: Point[])
119932
// Creates a Bounds object from the given array of points.
119933
function toBounds(a, b) {
119934
	if (!a || a instanceof Bounds) {
119935
		return a;
119936
	}
119937
	return new Bounds(a, b);
119938
}
119939
 
119940
/*
119941
 * @class LatLngBounds
119942
 * @aka L.LatLngBounds
119943
 *
119944
 * Represents a rectangular geographical area on a map.
119945
 *
119946
 * @example
119947
 *
119948
 * ```js
119949
 * var corner1 = L.latLng(40.712, -74.227),
119950
 * corner2 = L.latLng(40.774, -74.125),
119951
 * bounds = L.latLngBounds(corner1, corner2);
119952
 * ```
119953
 *
119954
 * All Leaflet methods that accept LatLngBounds objects also accept them in a simple Array form (unless noted otherwise), so the bounds example above can be passed like this:
119955
 *
119956
 * ```js
119957
 * map.fitBounds([
119958
 * 	[40.712, -74.227],
119959
 * 	[40.774, -74.125]
119960
 * ]);
119961
 * ```
119962
 *
119963
 * Caution: if the area crosses the antimeridian (often confused with the International Date Line), you must specify corners _outside_ the [-180, 180] degrees longitude range.
119964
 *
119965
 * Note that `LatLngBounds` does not inherit from Leafet's `Class` object,
119966
 * which means new classes can't inherit from it, and new methods
119967
 * can't be added to it with the `include` function.
119968
 */
119969
 
119970
function LatLngBounds(corner1, corner2) { // (LatLng, LatLng) or (LatLng[])
119971
	if (!corner1) { return; }
119972
 
119973
	var latlngs = corner2 ? [corner1, corner2] : corner1;
119974
 
119975
	for (var i = 0, len = latlngs.length; i < len; i++) {
119976
		this.extend(latlngs[i]);
119977
	}
119978
}
119979
 
119980
LatLngBounds.prototype = {
119981
 
119982
	// @method extend(latlng: LatLng): this
119983
	// Extend the bounds to contain the given point
119984
 
119985
	// @alternative
119986
	// @method extend(otherBounds: LatLngBounds): this
119987
	// Extend the bounds to contain the given bounds
119988
	extend: function (obj) {
119989
		var sw = this._southWest,
119990
		    ne = this._northEast,
119991
		    sw2, ne2;
119992
 
119993
		if (obj instanceof LatLng) {
119994
			sw2 = obj;
119995
			ne2 = obj;
119996
 
119997
		} else if (obj instanceof LatLngBounds) {
119998
			sw2 = obj._southWest;
119999
			ne2 = obj._northEast;
120000
 
120001
			if (!sw2 || !ne2) { return this; }
120002
 
120003
		} else {
120004
			return obj ? this.extend(toLatLng(obj) || toLatLngBounds(obj)) : this;
120005
		}
120006
 
120007
		if (!sw && !ne) {
120008
			this._southWest = new LatLng(sw2.lat, sw2.lng);
120009
			this._northEast = new LatLng(ne2.lat, ne2.lng);
120010
		} else {
120011
			sw.lat = Math.min(sw2.lat, sw.lat);
120012
			sw.lng = Math.min(sw2.lng, sw.lng);
120013
			ne.lat = Math.max(ne2.lat, ne.lat);
120014
			ne.lng = Math.max(ne2.lng, ne.lng);
120015
		}
120016
 
120017
		return this;
120018
	},
120019
 
120020
	// @method pad(bufferRatio: Number): LatLngBounds
120021
	// Returns bounds created by extending or retracting the current bounds by a given ratio in each direction.
120022
	// For example, a ratio of 0.5 extends the bounds by 50% in each direction.
120023
	// Negative values will retract the bounds.
120024
	pad: function (bufferRatio) {
120025
		var sw = this._southWest,
120026
		    ne = this._northEast,
120027
		    heightBuffer = Math.abs(sw.lat - ne.lat) * bufferRatio,
120028
		    widthBuffer = Math.abs(sw.lng - ne.lng) * bufferRatio;
120029
 
120030
		return new LatLngBounds(
120031
		        new LatLng(sw.lat - heightBuffer, sw.lng - widthBuffer),
120032
		        new LatLng(ne.lat + heightBuffer, ne.lng + widthBuffer));
120033
	},
120034
 
120035
	// @method getCenter(): LatLng
120036
	// Returns the center point of the bounds.
120037
	getCenter: function () {
120038
		return new LatLng(
120039
		        (this._southWest.lat + this._northEast.lat) / 2,
120040
		        (this._southWest.lng + this._northEast.lng) / 2);
120041
	},
120042
 
120043
	// @method getSouthWest(): LatLng
120044
	// Returns the south-west point of the bounds.
120045
	getSouthWest: function () {
120046
		return this._southWest;
120047
	},
120048
 
120049
	// @method getNorthEast(): LatLng
120050
	// Returns the north-east point of the bounds.
120051
	getNorthEast: function () {
120052
		return this._northEast;
120053
	},
120054
 
120055
	// @method getNorthWest(): LatLng
120056
	// Returns the north-west point of the bounds.
120057
	getNorthWest: function () {
120058
		return new LatLng(this.getNorth(), this.getWest());
120059
	},
120060
 
120061
	// @method getSouthEast(): LatLng
120062
	// Returns the south-east point of the bounds.
120063
	getSouthEast: function () {
120064
		return new LatLng(this.getSouth(), this.getEast());
120065
	},
120066
 
120067
	// @method getWest(): Number
120068
	// Returns the west longitude of the bounds
120069
	getWest: function () {
120070
		return this._southWest.lng;
120071
	},
120072
 
120073
	// @method getSouth(): Number
120074
	// Returns the south latitude of the bounds
120075
	getSouth: function () {
120076
		return this._southWest.lat;
120077
	},
120078
 
120079
	// @method getEast(): Number
120080
	// Returns the east longitude of the bounds
120081
	getEast: function () {
120082
		return this._northEast.lng;
120083
	},
120084
 
120085
	// @method getNorth(): Number
120086
	// Returns the north latitude of the bounds
120087
	getNorth: function () {
120088
		return this._northEast.lat;
120089
	},
120090
 
120091
	// @method contains(otherBounds: LatLngBounds): Boolean
120092
	// Returns `true` if the rectangle contains the given one.
120093
 
120094
	// @alternative
120095
	// @method contains (latlng: LatLng): Boolean
120096
	// Returns `true` if the rectangle contains the given point.
120097
	contains: function (obj) { // (LatLngBounds) or (LatLng) -> Boolean
120098
		if (typeof obj[0] === 'number' || obj instanceof LatLng || 'lat' in obj) {
120099
			obj = toLatLng(obj);
120100
		} else {
120101
			obj = toLatLngBounds(obj);
120102
		}
120103
 
120104
		var sw = this._southWest,
120105
		    ne = this._northEast,
120106
		    sw2, ne2;
120107
 
120108
		if (obj instanceof LatLngBounds) {
120109
			sw2 = obj.getSouthWest();
120110
			ne2 = obj.getNorthEast();
120111
		} else {
120112
			sw2 = ne2 = obj;
120113
		}
120114
 
120115
		return (sw2.lat >= sw.lat) && (ne2.lat <= ne.lat) &&
120116
		       (sw2.lng >= sw.lng) && (ne2.lng <= ne.lng);
120117
	},
120118
 
120119
	// @method intersects(otherBounds: LatLngBounds): Boolean
120120
	// Returns `true` if the rectangle intersects the given bounds. Two bounds intersect if they have at least one point in common.
120121
	intersects: function (bounds) {
120122
		bounds = toLatLngBounds(bounds);
120123
 
120124
		var sw = this._southWest,
120125
		    ne = this._northEast,
120126
		    sw2 = bounds.getSouthWest(),
120127
		    ne2 = bounds.getNorthEast(),
120128
 
120129
		    latIntersects = (ne2.lat >= sw.lat) && (sw2.lat <= ne.lat),
120130
		    lngIntersects = (ne2.lng >= sw.lng) && (sw2.lng <= ne.lng);
120131
 
120132
		return latIntersects && lngIntersects;
120133
	},
120134
 
120135
	// @method overlaps(otherBounds: Bounds): Boolean
120136
	// Returns `true` if the rectangle overlaps the given bounds. Two bounds overlap if their intersection is an area.
120137
	overlaps: function (bounds) {
120138
		bounds = toLatLngBounds(bounds);
120139
 
120140
		var sw = this._southWest,
120141
		    ne = this._northEast,
120142
		    sw2 = bounds.getSouthWest(),
120143
		    ne2 = bounds.getNorthEast(),
120144
 
120145
		    latOverlaps = (ne2.lat > sw.lat) && (sw2.lat < ne.lat),
120146
		    lngOverlaps = (ne2.lng > sw.lng) && (sw2.lng < ne.lng);
120147
 
120148
		return latOverlaps && lngOverlaps;
120149
	},
120150
 
120151
	// @method toBBoxString(): String
120152
	// Returns a string with bounding box coordinates in a 'southwest_lng,southwest_lat,northeast_lng,northeast_lat' format. Useful for sending requests to web services that return geo data.
120153
	toBBoxString: function () {
120154
		return [this.getWest(), this.getSouth(), this.getEast(), this.getNorth()].join(',');
120155
	},
120156
 
120157
	// @method equals(otherBounds: LatLngBounds, maxMargin?: Number): Boolean
120158
	// Returns `true` if the rectangle is equivalent (within a small margin of error) to the given bounds. The margin of error can be overridden by setting `maxMargin` to a small number.
120159
	equals: function (bounds, maxMargin) {
120160
		if (!bounds) { return false; }
120161
 
120162
		bounds = toLatLngBounds(bounds);
120163
 
120164
		return this._southWest.equals(bounds.getSouthWest(), maxMargin) &&
120165
		       this._northEast.equals(bounds.getNorthEast(), maxMargin);
120166
	},
120167
 
120168
	// @method isValid(): Boolean
120169
	// Returns `true` if the bounds are properly initialized.
120170
	isValid: function () {
120171
		return !!(this._southWest && this._northEast);
120172
	}
120173
};
120174
 
120175
// TODO International date line?
120176
 
120177
// @factory L.latLngBounds(corner1: LatLng, corner2: LatLng)
120178
// Creates a `LatLngBounds` object by defining two diagonally opposite corners of the rectangle.
120179
 
120180
// @alternative
120181
// @factory L.latLngBounds(latlngs: LatLng[])
120182
// Creates a `LatLngBounds` object defined by the geographical points it contains. Very useful for zooming the map to fit a particular set of locations with [`fitBounds`](#map-fitbounds).
120183
function toLatLngBounds(a, b) {
120184
	if (a instanceof LatLngBounds) {
120185
		return a;
120186
	}
120187
	return new LatLngBounds(a, b);
120188
}
120189
 
120190
/* @class LatLng
120191
 * @aka L.LatLng
120192
 *
120193
 * Represents a geographical point with a certain latitude and longitude.
120194
 *
120195
 * @example
120196
 *
120197
 * ```
120198
 * var latlng = L.latLng(50.5, 30.5);
120199
 * ```
120200
 *
120201
 * All Leaflet methods that accept LatLng objects also accept them in a simple Array form and simple object form (unless noted otherwise), so these lines are equivalent:
120202
 *
120203
 * ```
120204
 * map.panTo([50, 30]);
120205
 * map.panTo({lon: 30, lat: 50});
120206
 * map.panTo({lat: 50, lng: 30});
120207
 * map.panTo(L.latLng(50, 30));
120208
 * ```
120209
 *
120210
 * Note that `LatLng` does not inherit from Leaflet's `Class` object,
120211
 * which means new classes can't inherit from it, and new methods
120212
 * can't be added to it with the `include` function.
120213
 */
120214
 
120215
function LatLng(lat, lng, alt) {
120216
	if (isNaN(lat) || isNaN(lng)) {
120217
		throw new Error('Invalid LatLng object: (' + lat + ', ' + lng + ')');
120218
	}
120219
 
120220
	// @property lat: Number
120221
	// Latitude in degrees
120222
	this.lat = +lat;
120223
 
120224
	// @property lng: Number
120225
	// Longitude in degrees
120226
	this.lng = +lng;
120227
 
120228
	// @property alt: Number
120229
	// Altitude in meters (optional)
120230
	if (alt !== undefined) {
120231
		this.alt = +alt;
120232
	}
120233
}
120234
 
120235
LatLng.prototype = {
120236
	// @method equals(otherLatLng: LatLng, maxMargin?: Number): Boolean
120237
	// Returns `true` if the given `LatLng` point is at the same position (within a small margin of error). The margin of error can be overridden by setting `maxMargin` to a small number.
120238
	equals: function (obj, maxMargin) {
120239
		if (!obj) { return false; }
120240
 
120241
		obj = toLatLng(obj);
120242
 
120243
		var margin = Math.max(
120244
		        Math.abs(this.lat - obj.lat),
120245
		        Math.abs(this.lng - obj.lng));
120246
 
120247
		return margin <= (maxMargin === undefined ? 1.0E-9 : maxMargin);
120248
	},
120249
 
120250
	// @method toString(): String
120251
	// Returns a string representation of the point (for debugging purposes).
120252
	toString: function (precision) {
120253
		return 'LatLng(' +
120254
		        formatNum(this.lat, precision) + ', ' +
120255
		        formatNum(this.lng, precision) + ')';
120256
	},
120257
 
120258
	// @method distanceTo(otherLatLng: LatLng): Number
120259
	// Returns the distance (in meters) to the given `LatLng` calculated using the [Spherical Law of Cosines](https://en.wikipedia.org/wiki/Spherical_law_of_cosines).
120260
	distanceTo: function (other) {
120261
		return Earth.distance(this, toLatLng(other));
120262
	},
120263
 
120264
	// @method wrap(): LatLng
120265
	// Returns a new `LatLng` object with the longitude wrapped so it's always between -180 and +180 degrees.
120266
	wrap: function () {
120267
		return Earth.wrapLatLng(this);
120268
	},
120269
 
120270
	// @method toBounds(sizeInMeters: Number): LatLngBounds
120271
	// Returns a new `LatLngBounds` object in which each boundary is `sizeInMeters/2` meters apart from the `LatLng`.
120272
	toBounds: function (sizeInMeters) {
120273
		var latAccuracy = 180 * sizeInMeters / 40075017,
120274
		    lngAccuracy = latAccuracy / Math.cos((Math.PI / 180) * this.lat);
120275
 
120276
		return toLatLngBounds(
120277
		        [this.lat - latAccuracy, this.lng - lngAccuracy],
120278
		        [this.lat + latAccuracy, this.lng + lngAccuracy]);
120279
	},
120280
 
120281
	clone: function () {
120282
		return new LatLng(this.lat, this.lng, this.alt);
120283
	}
120284
};
120285
 
120286
 
120287
 
120288
// @factory L.latLng(latitude: Number, longitude: Number, altitude?: Number): LatLng
120289
// Creates an object representing a geographical point with the given latitude and longitude (and optionally altitude).
120290
 
120291
// @alternative
120292
// @factory L.latLng(coords: Array): LatLng
120293
// Expects an array of the form `[Number, Number]` or `[Number, Number, Number]` instead.
120294
 
120295
// @alternative
120296
// @factory L.latLng(coords: Object): LatLng
120297
// Expects an plain object of the form `{lat: Number, lng: Number}` or `{lat: Number, lng: Number, alt: Number}` instead.
120298
 
120299
function toLatLng(a, b, c) {
120300
	if (a instanceof LatLng) {
120301
		return a;
120302
	}
120303
	if (isArray(a) && typeof a[0] !== 'object') {
120304
		if (a.length === 3) {
120305
			return new LatLng(a[0], a[1], a[2]);
120306
		}
120307
		if (a.length === 2) {
120308
			return new LatLng(a[0], a[1]);
120309
		}
120310
		return null;
120311
	}
120312
	if (a === undefined || a === null) {
120313
		return a;
120314
	}
120315
	if (typeof a === 'object' && 'lat' in a) {
120316
		return new LatLng(a.lat, 'lng' in a ? a.lng : a.lon, a.alt);
120317
	}
120318
	if (b === undefined) {
120319
		return null;
120320
	}
120321
	return new LatLng(a, b, c);
120322
}
120323
 
120324
/*
120325
 * @namespace CRS
120326
 * @crs L.CRS.Base
120327
 * Object that defines coordinate reference systems for projecting
120328
 * geographical points into pixel (screen) coordinates and back (and to
120329
 * coordinates in other units for [WMS](https://en.wikipedia.org/wiki/Web_Map_Service) services). See
120330
 * [spatial reference system](http://en.wikipedia.org/wiki/Coordinate_reference_system).
120331
 *
120332
 * Leaflet defines the most usual CRSs by default. If you want to use a
120333
 * CRS not defined by default, take a look at the
120334
 * [Proj4Leaflet](https://github.com/kartena/Proj4Leaflet) plugin.
120335
 *
120336
 * Note that the CRS instances do not inherit from Leafet's `Class` object,
120337
 * and can't be instantiated. Also, new classes can't inherit from them,
120338
 * and methods can't be added to them with the `include` function.
120339
 */
120340
 
120341
var CRS = {
120342
	// @method latLngToPoint(latlng: LatLng, zoom: Number): Point
120343
	// Projects geographical coordinates into pixel coordinates for a given zoom.
120344
	latLngToPoint: function (latlng, zoom) {
120345
		var projectedPoint = this.projection.project(latlng),
120346
		    scale = this.scale(zoom);
120347
 
120348
		return this.transformation._transform(projectedPoint, scale);
120349
	},
120350
 
120351
	// @method pointToLatLng(point: Point, zoom: Number): LatLng
120352
	// The inverse of `latLngToPoint`. Projects pixel coordinates on a given
120353
	// zoom into geographical coordinates.
120354
	pointToLatLng: function (point, zoom) {
120355
		var scale = this.scale(zoom),
120356
		    untransformedPoint = this.transformation.untransform(point, scale);
120357
 
120358
		return this.projection.unproject(untransformedPoint);
120359
	},
120360
 
120361
	// @method project(latlng: LatLng): Point
120362
	// Projects geographical coordinates into coordinates in units accepted for
120363
	// this CRS (e.g. meters for EPSG:3857, for passing it to WMS services).
120364
	project: function (latlng) {
120365
		return this.projection.project(latlng);
120366
	},
120367
 
120368
	// @method unproject(point: Point): LatLng
120369
	// Given a projected coordinate returns the corresponding LatLng.
120370
	// The inverse of `project`.
120371
	unproject: function (point) {
120372
		return this.projection.unproject(point);
120373
	},
120374
 
120375
	// @method scale(zoom: Number): Number
120376
	// Returns the scale used when transforming projected coordinates into
120377
	// pixel coordinates for a particular zoom. For example, it returns
120378
	// `256 * 2^zoom` for Mercator-based CRS.
120379
	scale: function (zoom) {
120380
		return 256 * Math.pow(2, zoom);
120381
	},
120382
 
120383
	// @method zoom(scale: Number): Number
120384
	// Inverse of `scale()`, returns the zoom level corresponding to a scale
120385
	// factor of `scale`.
120386
	zoom: function (scale) {
120387
		return Math.log(scale / 256) / Math.LN2;
120388
	},
120389
 
120390
	// @method getProjectedBounds(zoom: Number): Bounds
120391
	// Returns the projection's bounds scaled and transformed for the provided `zoom`.
120392
	getProjectedBounds: function (zoom) {
120393
		if (this.infinite) { return null; }
120394
 
120395
		var b = this.projection.bounds,
120396
		    s = this.scale(zoom),
120397
		    min = this.transformation.transform(b.min, s),
120398
		    max = this.transformation.transform(b.max, s);
120399
 
120400
		return new Bounds(min, max);
120401
	},
120402
 
120403
	// @method distance(latlng1: LatLng, latlng2: LatLng): Number
120404
	// Returns the distance between two geographical coordinates.
120405
 
120406
	// @property code: String
120407
	// Standard code name of the CRS passed into WMS services (e.g. `'EPSG:3857'`)
120408
	//
120409
	// @property wrapLng: Number[]
120410
	// An array of two numbers defining whether the longitude (horizontal) coordinate
120411
	// axis wraps around a given range and how. Defaults to `[-180, 180]` in most
120412
	// geographical CRSs. If `undefined`, the longitude axis does not wrap around.
120413
	//
120414
	// @property wrapLat: Number[]
120415
	// Like `wrapLng`, but for the latitude (vertical) axis.
120416
 
120417
	// wrapLng: [min, max],
120418
	// wrapLat: [min, max],
120419
 
120420
	// @property infinite: Boolean
120421
	// If true, the coordinate space will be unbounded (infinite in both axes)
120422
	infinite: false,
120423
 
120424
	// @method wrapLatLng(latlng: LatLng): LatLng
120425
	// Returns a `LatLng` where lat and lng has been wrapped according to the
120426
	// CRS's `wrapLat` and `wrapLng` properties, if they are outside the CRS's bounds.
120427
	wrapLatLng: function (latlng) {
120428
		var lng = this.wrapLng ? wrapNum(latlng.lng, this.wrapLng, true) : latlng.lng,
120429
		    lat = this.wrapLat ? wrapNum(latlng.lat, this.wrapLat, true) : latlng.lat,
120430
		    alt = latlng.alt;
120431
 
120432
		return new LatLng(lat, lng, alt);
120433
	},
120434
 
120435
	// @method wrapLatLngBounds(bounds: LatLngBounds): LatLngBounds
120436
	// Returns a `LatLngBounds` with the same size as the given one, ensuring
120437
	// that its center is within the CRS's bounds.
120438
	// Only accepts actual `L.LatLngBounds` instances, not arrays.
120439
	wrapLatLngBounds: function (bounds) {
120440
		var center = bounds.getCenter(),
120441
		    newCenter = this.wrapLatLng(center),
120442
		    latShift = center.lat - newCenter.lat,
120443
		    lngShift = center.lng - newCenter.lng;
120444
 
120445
		if (latShift === 0 && lngShift === 0) {
120446
			return bounds;
120447
		}
120448
 
120449
		var sw = bounds.getSouthWest(),
120450
		    ne = bounds.getNorthEast(),
120451
		    newSw = new LatLng(sw.lat - latShift, sw.lng - lngShift),
120452
		    newNe = new LatLng(ne.lat - latShift, ne.lng - lngShift);
120453
 
120454
		return new LatLngBounds(newSw, newNe);
120455
	}
120456
};
120457
 
120458
/*
120459
 * @namespace CRS
120460
 * @crs L.CRS.Earth
120461
 *
120462
 * Serves as the base for CRS that are global such that they cover the earth.
120463
 * Can only be used as the base for other CRS and cannot be used directly,
120464
 * since it does not have a `code`, `projection` or `transformation`. `distance()` returns
120465
 * meters.
120466
 */
120467
 
120468
var Earth = extend({}, CRS, {
120469
	wrapLng: [-180, 180],
120470
 
120471
	// Mean Earth Radius, as recommended for use by
120472
	// the International Union of Geodesy and Geophysics,
120473
	// see http://rosettacode.org/wiki/Haversine_formula
120474
	R: 6371000,
120475
 
120476
	// distance between two geographical points using spherical law of cosines approximation
120477
	distance: function (latlng1, latlng2) {
120478
		var rad = Math.PI / 180,
120479
		    lat1 = latlng1.lat * rad,
120480
		    lat2 = latlng2.lat * rad,
120481
		    sinDLat = Math.sin((latlng2.lat - latlng1.lat) * rad / 2),
120482
		    sinDLon = Math.sin((latlng2.lng - latlng1.lng) * rad / 2),
120483
		    a = sinDLat * sinDLat + Math.cos(lat1) * Math.cos(lat2) * sinDLon * sinDLon,
120484
		    c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
120485
		return this.R * c;
120486
	}
120487
});
120488
 
120489
/*
120490
 * @namespace Projection
120491
 * @projection L.Projection.SphericalMercator
120492
 *
120493
 * Spherical Mercator projection — the most common projection for online maps,
120494
 * used by almost all free and commercial tile providers. Assumes that Earth is
120495
 * a sphere. Used by the `EPSG:3857` CRS.
120496
 */
120497
 
120498
var SphericalMercator = {
120499
 
120500
	R: 6378137,
120501
	MAX_LATITUDE: 85.0511287798,
120502
 
120503
	project: function (latlng) {
120504
		var d = Math.PI / 180,
120505
		    max = this.MAX_LATITUDE,
120506
		    lat = Math.max(Math.min(max, latlng.lat), -max),
120507
		    sin = Math.sin(lat * d);
120508
 
120509
		return new Point(
120510
			this.R * latlng.lng * d,
120511
			this.R * Math.log((1 + sin) / (1 - sin)) / 2);
120512
	},
120513
 
120514
	unproject: function (point) {
120515
		var d = 180 / Math.PI;
120516
 
120517
		return new LatLng(
120518
			(2 * Math.atan(Math.exp(point.y / this.R)) - (Math.PI / 2)) * d,
120519
			point.x * d / this.R);
120520
	},
120521
 
120522
	bounds: (function () {
120523
		var d = 6378137 * Math.PI;
120524
		return new Bounds([-d, -d], [d, d]);
120525
	})()
120526
};
120527
 
120528
/*
120529
 * @class Transformation
120530
 * @aka L.Transformation
120531
 *
120532
 * Represents an affine transformation: a set of coefficients `a`, `b`, `c`, `d`
120533
 * for transforming a point of a form `(x, y)` into `(a*x + b, c*y + d)` and doing
120534
 * the reverse. Used by Leaflet in its projections code.
120535
 *
120536
 * @example
120537
 *
120538
 * ```js
120539
 * var transformation = L.transformation(2, 5, -1, 10),
120540
 * 	p = L.point(1, 2),
120541
 * 	p2 = transformation.transform(p), //  L.point(7, 8)
120542
 * 	p3 = transformation.untransform(p2); //  L.point(1, 2)
120543
 * ```
120544
 */
120545
 
120546
 
120547
// factory new L.Transformation(a: Number, b: Number, c: Number, d: Number)
120548
// Creates a `Transformation` object with the given coefficients.
120549
function Transformation(a, b, c, d) {
120550
	if (isArray(a)) {
120551
		// use array properties
120552
		this._a = a[0];
120553
		this._b = a[1];
120554
		this._c = a[2];
120555
		this._d = a[3];
120556
		return;
120557
	}
120558
	this._a = a;
120559
	this._b = b;
120560
	this._c = c;
120561
	this._d = d;
120562
}
120563
 
120564
Transformation.prototype = {
120565
	// @method transform(point: Point, scale?: Number): Point
120566
	// Returns a transformed point, optionally multiplied by the given scale.
120567
	// Only accepts actual `L.Point` instances, not arrays.
120568
	transform: function (point, scale) { // (Point, Number) -> Point
120569
		return this._transform(point.clone(), scale);
120570
	},
120571
 
120572
	// destructive transform (faster)
120573
	_transform: function (point, scale) {
120574
		scale = scale || 1;
120575
		point.x = scale * (this._a * point.x + this._b);
120576
		point.y = scale * (this._c * point.y + this._d);
120577
		return point;
120578
	},
120579
 
120580
	// @method untransform(point: Point, scale?: Number): Point
120581
	// Returns the reverse transformation of the given point, optionally divided
120582
	// by the given scale. Only accepts actual `L.Point` instances, not arrays.
120583
	untransform: function (point, scale) {
120584
		scale = scale || 1;
120585
		return new Point(
120586
		        (point.x / scale - this._b) / this._a,
120587
		        (point.y / scale - this._d) / this._c);
120588
	}
120589
};
120590
 
120591
// factory L.transformation(a: Number, b: Number, c: Number, d: Number)
120592
 
120593
// @factory L.transformation(a: Number, b: Number, c: Number, d: Number)
120594
// Instantiates a Transformation object with the given coefficients.
120595
 
120596
// @alternative
120597
// @factory L.transformation(coefficients: Array): Transformation
120598
// Expects an coefficients array of the form
120599
// `[a: Number, b: Number, c: Number, d: Number]`.
120600
 
120601
function toTransformation(a, b, c, d) {
120602
	return new Transformation(a, b, c, d);
120603
}
120604
 
120605
/*
120606
 * @namespace CRS
120607
 * @crs L.CRS.EPSG3857
120608
 *
120609
 * The most common CRS for online maps, used by almost all free and commercial
120610
 * tile providers. Uses Spherical Mercator projection. Set in by default in
120611
 * Map's `crs` option.
120612
 */
120613
 
120614
var EPSG3857 = extend({}, Earth, {
120615
	code: 'EPSG:3857',
120616
	projection: SphericalMercator,
120617
 
120618
	transformation: (function () {
120619
		var scale = 0.5 / (Math.PI * SphericalMercator.R);
120620
		return toTransformation(scale, 0.5, -scale, 0.5);
120621
	}())
120622
});
120623
 
120624
var EPSG900913 = extend({}, EPSG3857, {
120625
	code: 'EPSG:900913'
120626
});
120627
 
120628
// @namespace SVG; @section
120629
// There are several static functions which can be called without instantiating L.SVG:
120630
 
120631
// @function create(name: String): SVGElement
120632
// Returns a instance of [SVGElement](https://developer.mozilla.org/docs/Web/API/SVGElement),
120633
// corresponding to the class name passed. For example, using 'line' will return
120634
// an instance of [SVGLineElement](https://developer.mozilla.org/docs/Web/API/SVGLineElement).
120635
function svgCreate(name) {
120636
	return document.createElementNS('http://www.w3.org/2000/svg', name);
120637
}
120638
 
120639
// @function pointsToPath(rings: Point[], closed: Boolean): String
120640
// Generates a SVG path string for multiple rings, with each ring turning
120641
// into "M..L..L.." instructions
120642
function pointsToPath(rings, closed) {
120643
	var str = '',
120644
	i, j, len, len2, points, p;
120645
 
120646
	for (i = 0, len = rings.length; i < len; i++) {
120647
		points = rings[i];
120648
 
120649
		for (j = 0, len2 = points.length; j < len2; j++) {
120650
			p = points[j];
120651
			str += (j ? 'L' : 'M') + p.x + ' ' + p.y;
120652
		}
120653
 
120654
		// closes the ring for polygons; "x" is VML syntax
120655
		str += closed ? (svg ? 'z' : 'x') : '';
120656
	}
120657
 
120658
	// SVG complains about empty path strings
120659
	return str || 'M0 0';
120660
}
120661
 
120662
/*
120663
 * @namespace Browser
120664
 * @aka L.Browser
120665
 *
120666
 * A namespace with static properties for browser/feature detection used by Leaflet internally.
120667
 *
120668
 * @example
120669
 *
120670
 * ```js
120671
 * if (L.Browser.ielt9) {
120672
 *   alert('Upgrade your browser, dude!');
120673
 * }
120674
 * ```
120675
 */
120676
 
120677
var style$1 = document.documentElement.style;
120678
 
120679
// @property ie: Boolean; `true` for all Internet Explorer versions (not Edge).
120680
var ie = 'ActiveXObject' in window;
120681
 
120682
// @property ielt9: Boolean; `true` for Internet Explorer versions less than 9.
120683
var ielt9 = ie && !document.addEventListener;
120684
 
120685
// @property edge: Boolean; `true` for the Edge web browser.
120686
var edge = 'msLaunchUri' in navigator && !('documentMode' in document);
120687
 
120688
// @property webkit: Boolean;
120689
// `true` for webkit-based browsers like Chrome and Safari (including mobile versions).
120690
var webkit = userAgentContains('webkit');
120691
 
120692
// @property android: Boolean
120693
// `true` for any browser running on an Android platform.
120694
var android = userAgentContains('android');
120695
 
120696
// @property android23: Boolean; `true` for browsers running on Android 2 or Android 3.
120697
var android23 = userAgentContains('android 2') || userAgentContains('android 3');
120698
 
120699
/* See https://stackoverflow.com/a/17961266 for details on detecting stock Android */
120700
var webkitVer = parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1], 10); // also matches AppleWebKit
120701
// @property androidStock: Boolean; `true` for the Android stock browser (i.e. not Chrome)
120702
var androidStock = android && userAgentContains('Google') && webkitVer < 537 && !('AudioNode' in window);
120703
 
120704
// @property opera: Boolean; `true` for the Opera browser
120705
var opera = !!window.opera;
120706
 
120707
// @property chrome: Boolean; `true` for the Chrome browser.
120708
var chrome = userAgentContains('chrome');
120709
 
120710
// @property gecko: Boolean; `true` for gecko-based browsers like Firefox.
120711
var gecko = userAgentContains('gecko') && !webkit && !opera && !ie;
120712
 
120713
// @property safari: Boolean; `true` for the Safari browser.
120714
var safari = !chrome && userAgentContains('safari');
120715
 
120716
var phantom = userAgentContains('phantom');
120717
 
120718
// @property opera12: Boolean
120719
// `true` for the Opera browser supporting CSS transforms (version 12 or later).
120720
var opera12 = 'OTransition' in style$1;
120721
 
120722
// @property win: Boolean; `true` when the browser is running in a Windows platform
120723
var win = navigator.platform.indexOf('Win') === 0;
120724
 
120725
// @property ie3d: Boolean; `true` for all Internet Explorer versions supporting CSS transforms.
120726
var ie3d = ie && ('transition' in style$1);
120727
 
120728
// @property webkit3d: Boolean; `true` for webkit-based browsers supporting CSS transforms.
120729
var webkit3d = ('WebKitCSSMatrix' in window) && ('m11' in new window.WebKitCSSMatrix()) && !android23;
120730
 
120731
// @property gecko3d: Boolean; `true` for gecko-based browsers supporting CSS transforms.
120732
var gecko3d = 'MozPerspective' in style$1;
120733
 
120734
// @property any3d: Boolean
120735
// `true` for all browsers supporting CSS transforms.
120736
var any3d = !window.L_DISABLE_3D && (ie3d || webkit3d || gecko3d) && !opera12 && !phantom;
120737
 
120738
// @property mobile: Boolean; `true` for all browsers running in a mobile device.
120739
var mobile = typeof orientation !== 'undefined' || userAgentContains('mobile');
120740
 
120741
// @property mobileWebkit: Boolean; `true` for all webkit-based browsers in a mobile device.
120742
var mobileWebkit = mobile && webkit;
120743
 
120744
// @property mobileWebkit3d: Boolean
120745
// `true` for all webkit-based browsers in a mobile device supporting CSS transforms.
120746
var mobileWebkit3d = mobile && webkit3d;
120747
 
120748
// @property msPointer: Boolean
120749
// `true` for browsers implementing the Microsoft touch events model (notably IE10).
120750
var msPointer = !window.PointerEvent && window.MSPointerEvent;
120751
 
120752
// @property pointer: Boolean
120753
// `true` for all browsers supporting [pointer events](https://msdn.microsoft.com/en-us/library/dn433244%28v=vs.85%29.aspx).
120754
var pointer = !!(window.PointerEvent || msPointer);
120755
 
120756
// @property touch: Boolean
120757
// `true` for all browsers supporting [touch events](https://developer.mozilla.org/docs/Web/API/Touch_events).
120758
// This does not necessarily mean that the browser is running in a computer with
120759
// a touchscreen, it only means that the browser is capable of understanding
120760
// touch events.
120761
var touch = !window.L_NO_TOUCH && (pointer || 'ontouchstart' in window ||
120762
		(window.DocumentTouch && document instanceof window.DocumentTouch));
120763
 
120764
// @property mobileOpera: Boolean; `true` for the Opera browser in a mobile device.
120765
var mobileOpera = mobile && opera;
120766
 
120767
// @property mobileGecko: Boolean
120768
// `true` for gecko-based browsers running in a mobile device.
120769
var mobileGecko = mobile && gecko;
120770
 
120771
// @property retina: Boolean
120772
// `true` for browsers on a high-resolution "retina" screen or on any screen when browser's display zoom is more than 100%.
120773
var retina = (window.devicePixelRatio || (window.screen.deviceXDPI / window.screen.logicalXDPI)) > 1;
120774
 
120775
 
120776
// @property canvas: Boolean
120777
// `true` when the browser supports [`<canvas>`](https://developer.mozilla.org/docs/Web/API/Canvas_API).
120778
var canvas = (function () {
120779
	return !!document.createElement('canvas').getContext;
120780
}());
120781
 
120782
// @property svg: Boolean
120783
// `true` when the browser supports [SVG](https://developer.mozilla.org/docs/Web/SVG).
120784
var svg = !!(document.createElementNS && svgCreate('svg').createSVGRect);
120785
 
120786
// @property vml: Boolean
120787
// `true` if the browser supports [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language).
120788
var vml = !svg && (function () {
120789
	try {
120790
		var div = document.createElement('div');
120791
		div.innerHTML = '<v:shape adj="1"/>';
120792
 
120793
		var shape = div.firstChild;
120794
		shape.style.behavior = 'url(#default#VML)';
120795
 
120796
		return shape && (typeof shape.adj === 'object');
120797
 
120798
	} catch (e) {
120799
		return false;
120800
	}
120801
}());
120802
 
120803
 
120804
function userAgentContains(str) {
120805
	return navigator.userAgent.toLowerCase().indexOf(str) >= 0;
120806
}
120807
 
120808
 
120809
var Browser = (Object.freeze || Object)({
120810
	ie: ie,
120811
	ielt9: ielt9,
120812
	edge: edge,
120813
	webkit: webkit,
120814
	android: android,
120815
	android23: android23,
120816
	androidStock: androidStock,
120817
	opera: opera,
120818
	chrome: chrome,
120819
	gecko: gecko,
120820
	safari: safari,
120821
	phantom: phantom,
120822
	opera12: opera12,
120823
	win: win,
120824
	ie3d: ie3d,
120825
	webkit3d: webkit3d,
120826
	gecko3d: gecko3d,
120827
	any3d: any3d,
120828
	mobile: mobile,
120829
	mobileWebkit: mobileWebkit,
120830
	mobileWebkit3d: mobileWebkit3d,
120831
	msPointer: msPointer,
120832
	pointer: pointer,
120833
	touch: touch,
120834
	mobileOpera: mobileOpera,
120835
	mobileGecko: mobileGecko,
120836
	retina: retina,
120837
	canvas: canvas,
120838
	svg: svg,
120839
	vml: vml
120840
});
120841
 
120842
/*
120843
 * Extends L.DomEvent to provide touch support for Internet Explorer and Windows-based devices.
120844
 */
120845
 
120846
 
120847
var POINTER_DOWN =   msPointer ? 'MSPointerDown'   : 'pointerdown';
120848
var POINTER_MOVE =   msPointer ? 'MSPointerMove'   : 'pointermove';
120849
var POINTER_UP =     msPointer ? 'MSPointerUp'     : 'pointerup';
120850
var POINTER_CANCEL = msPointer ? 'MSPointerCancel' : 'pointercancel';
120851
var TAG_WHITE_LIST = ['INPUT', 'SELECT', 'OPTION'];
120852
 
120853
var _pointers = {};
120854
var _pointerDocListener = false;
120855
 
120856
// DomEvent.DoubleTap needs to know about this
120857
var _pointersCount = 0;
120858
 
120859
// Provides a touch events wrapper for (ms)pointer events.
120860
// ref http://www.w3.org/TR/pointerevents/ https://www.w3.org/Bugs/Public/show_bug.cgi?id=22890
120861
 
120862
function addPointerListener(obj, type, handler, id) {
120863
	if (type === 'touchstart') {
120864
		_addPointerStart(obj, handler, id);
120865
 
120866
	} else if (type === 'touchmove') {
120867
		_addPointerMove(obj, handler, id);
120868
 
120869
	} else if (type === 'touchend') {
120870
		_addPointerEnd(obj, handler, id);
120871
	}
120872
 
120873
	return this;
120874
}
120875
 
120876
function removePointerListener(obj, type, id) {
120877
	var handler = obj['_leaflet_' + type + id];
120878
 
120879
	if (type === 'touchstart') {
120880
		obj.removeEventListener(POINTER_DOWN, handler, false);
120881
 
120882
	} else if (type === 'touchmove') {
120883
		obj.removeEventListener(POINTER_MOVE, handler, false);
120884
 
120885
	} else if (type === 'touchend') {
120886
		obj.removeEventListener(POINTER_UP, handler, false);
120887
		obj.removeEventListener(POINTER_CANCEL, handler, false);
120888
	}
120889
 
120890
	return this;
120891
}
120892
 
120893
function _addPointerStart(obj, handler, id) {
120894
	var onDown = bind(function (e) {
120895
		if (e.pointerType !== 'mouse' && e.MSPOINTER_TYPE_MOUSE && e.pointerType !== e.MSPOINTER_TYPE_MOUSE) {
120896
			// In IE11, some touch events needs to fire for form controls, or
120897
			// the controls will stop working. We keep a whitelist of tag names that
120898
			// need these events. For other target tags, we prevent default on the event.
120899
			if (TAG_WHITE_LIST.indexOf(e.target.tagName) < 0) {
120900
				preventDefault(e);
120901
			} else {
120902
				return;
120903
			}
120904
		}
120905
 
120906
		_handlePointer(e, handler);
120907
	});
120908
 
120909
	obj['_leaflet_touchstart' + id] = onDown;
120910
	obj.addEventListener(POINTER_DOWN, onDown, false);
120911
 
120912
	// need to keep track of what pointers and how many are active to provide e.touches emulation
120913
	if (!_pointerDocListener) {
120914
		// we listen documentElement as any drags that end by moving the touch off the screen get fired there
120915
		document.documentElement.addEventListener(POINTER_DOWN, _globalPointerDown, true);
120916
		document.documentElement.addEventListener(POINTER_MOVE, _globalPointerMove, true);
120917
		document.documentElement.addEventListener(POINTER_UP, _globalPointerUp, true);
120918
		document.documentElement.addEventListener(POINTER_CANCEL, _globalPointerUp, true);
120919
 
120920
		_pointerDocListener = true;
120921
	}
120922
}
120923
 
120924
function _globalPointerDown(e) {
120925
	_pointers[e.pointerId] = e;
120926
	_pointersCount++;
120927
}
120928
 
120929
function _globalPointerMove(e) {
120930
	if (_pointers[e.pointerId]) {
120931
		_pointers[e.pointerId] = e;
120932
	}
120933
}
120934
 
120935
function _globalPointerUp(e) {
120936
	delete _pointers[e.pointerId];
120937
	_pointersCount--;
120938
}
120939
 
120940
function _handlePointer(e, handler) {
120941
	e.touches = [];
120942
	for (var i in _pointers) {
120943
		e.touches.push(_pointers[i]);
120944
	}
120945
	e.changedTouches = [e];
120946
 
120947
	handler(e);
120948
}
120949
 
120950
function _addPointerMove(obj, handler, id) {
120951
	var onMove = function (e) {
120952
		// don't fire touch moves when mouse isn't down
120953
		if ((e.pointerType === e.MSPOINTER_TYPE_MOUSE || e.pointerType === 'mouse') && e.buttons === 0) { return; }
120954
 
120955
		_handlePointer(e, handler);
120956
	};
120957
 
120958
	obj['_leaflet_touchmove' + id] = onMove;
120959
	obj.addEventListener(POINTER_MOVE, onMove, false);
120960
}
120961
 
120962
function _addPointerEnd(obj, handler, id) {
120963
	var onUp = function (e) {
120964
		_handlePointer(e, handler);
120965
	};
120966
 
120967
	obj['_leaflet_touchend' + id] = onUp;
120968
	obj.addEventListener(POINTER_UP, onUp, false);
120969
	obj.addEventListener(POINTER_CANCEL, onUp, false);
120970
}
120971
 
120972
/*
120973
 * Extends the event handling code with double tap support for mobile browsers.
120974
 */
120975
 
120976
var _touchstart = msPointer ? 'MSPointerDown' : pointer ? 'pointerdown' : 'touchstart';
120977
var _touchend = msPointer ? 'MSPointerUp' : pointer ? 'pointerup' : 'touchend';
120978
var _pre = '_leaflet_';
120979
 
120980
// inspired by Zepto touch code by Thomas Fuchs
120981
function addDoubleTapListener(obj, handler, id) {
120982
	var last, touch$$1,
120983
	    doubleTap = false,
120984
	    delay = 250;
120985
 
120986
	function onTouchStart(e) {
120987
		var count;
120988
 
120989
		if (pointer) {
120990
			if ((!edge) || e.pointerType === 'mouse') { return; }
120991
			count = _pointersCount;
120992
		} else {
120993
			count = e.touches.length;
120994
		}
120995
 
120996
		if (count > 1) { return; }
120997
 
120998
		var now = Date.now(),
120999
		    delta = now - (last || now);
121000
 
121001
		touch$$1 = e.touches ? e.touches[0] : e;
121002
		doubleTap = (delta > 0 && delta <= delay);
121003
		last = now;
121004
	}
121005
 
121006
	function onTouchEnd(e) {
121007
		if (doubleTap && !touch$$1.cancelBubble) {
121008
			if (pointer) {
121009
				if ((!edge) || e.pointerType === 'mouse') { return; }
121010
				// work around .type being readonly with MSPointer* events
121011
				var newTouch = {},
121012
				    prop, i;
121013
 
121014
				for (i in touch$$1) {
121015
					prop = touch$$1[i];
121016
					newTouch[i] = prop && prop.bind ? prop.bind(touch$$1) : prop;
121017
				}
121018
				touch$$1 = newTouch;
121019
			}
121020
			touch$$1.type = 'dblclick';
121021
			handler(touch$$1);
121022
			last = null;
121023
		}
121024
	}
121025
 
121026
	obj[_pre + _touchstart + id] = onTouchStart;
121027
	obj[_pre + _touchend + id] = onTouchEnd;
121028
	obj[_pre + 'dblclick' + id] = handler;
121029
 
121030
	obj.addEventListener(_touchstart, onTouchStart, false);
121031
	obj.addEventListener(_touchend, onTouchEnd, false);
121032
 
121033
	// On some platforms (notably, chrome<55 on win10 + touchscreen + mouse),
121034
	// the browser doesn't fire touchend/pointerup events but does fire
121035
	// native dblclicks. See #4127.
121036
	// Edge 14 also fires native dblclicks, but only for pointerType mouse, see #5180.
121037
	obj.addEventListener('dblclick', handler, false);
121038
 
121039
	return this;
121040
}
121041
 
121042
function removeDoubleTapListener(obj, id) {
121043
	var touchstart = obj[_pre + _touchstart + id],
121044
	    touchend = obj[_pre + _touchend + id],
121045
	    dblclick = obj[_pre + 'dblclick' + id];
121046
 
121047
	obj.removeEventListener(_touchstart, touchstart, false);
121048
	obj.removeEventListener(_touchend, touchend, false);
121049
	if (!edge) {
121050
		obj.removeEventListener('dblclick', dblclick, false);
121051
	}
121052
 
121053
	return this;
121054
}
121055
 
121056
/*
121057
 * @namespace DomUtil
121058
 *
121059
 * Utility functions to work with the [DOM](https://developer.mozilla.org/docs/Web/API/Document_Object_Model)
121060
 * tree, used by Leaflet internally.
121061
 *
121062
 * Most functions expecting or returning a `HTMLElement` also work for
121063
 * SVG elements. The only difference is that classes refer to CSS classes
121064
 * in HTML and SVG classes in SVG.
121065
 */
121066
 
121067
 
121068
// @property TRANSFORM: String
121069
// Vendor-prefixed transform style name (e.g. `'webkitTransform'` for WebKit).
121070
var TRANSFORM = testProp(
121071
	['transform', 'WebkitTransform', 'OTransform', 'MozTransform', 'msTransform']);
121072
 
121073
// webkitTransition comes first because some browser versions that drop vendor prefix don't do
121074
// the same for the transitionend event, in particular the Android 4.1 stock browser
121075
 
121076
// @property TRANSITION: String
121077
// Vendor-prefixed transition style name.
121078
var TRANSITION = testProp(
121079
	['webkitTransition', 'transition', 'OTransition', 'MozTransition', 'msTransition']);
121080
 
121081
// @property TRANSITION_END: String
121082
// Vendor-prefixed transitionend event name.
121083
var TRANSITION_END =
121084
	TRANSITION === 'webkitTransition' || TRANSITION === 'OTransition' ? TRANSITION + 'End' : 'transitionend';
121085
 
121086
 
121087
// @function get(id: String|HTMLElement): HTMLElement
121088
// Returns an element given its DOM id, or returns the element itself
121089
// if it was passed directly.
121090
function get(id) {
121091
	return typeof id === 'string' ? document.getElementById(id) : id;
121092
}
121093
 
121094
// @function getStyle(el: HTMLElement, styleAttrib: String): String
121095
// Returns the value for a certain style attribute on an element,
121096
// including computed values or values set through CSS.
121097
function getStyle(el, style) {
121098
	var value = el.style[style] || (el.currentStyle && el.currentStyle[style]);
121099
 
121100
	if ((!value || value === 'auto') && document.defaultView) {
121101
		var css = document.defaultView.getComputedStyle(el, null);
121102
		value = css ? css[style] : null;
121103
	}
121104
	return value === 'auto' ? null : value;
121105
}
121106
 
121107
// @function create(tagName: String, className?: String, container?: HTMLElement): HTMLElement
121108
// Creates an HTML element with `tagName`, sets its class to `className`, and optionally appends it to `container` element.
121109
function create$1(tagName, className, container) {
121110
	var el = document.createElement(tagName);
121111
	el.className = className || '';
121112
 
121113
	if (container) {
121114
		container.appendChild(el);
121115
	}
121116
	return el;
121117
}
121118
 
121119
// @function remove(el: HTMLElement)
121120
// Removes `el` from its parent element
121121
function remove(el) {
121122
	var parent = el.parentNode;
121123
	if (parent) {
121124
		parent.removeChild(el);
121125
	}
121126
}
121127
 
121128
// @function empty(el: HTMLElement)
121129
// Removes all of `el`'s children elements from `el`
121130
function empty(el) {
121131
	while (el.firstChild) {
121132
		el.removeChild(el.firstChild);
121133
	}
121134
}
121135
 
121136
// @function toFront(el: HTMLElement)
121137
// Makes `el` the last child of its parent, so it renders in front of the other children.
121138
function toFront(el) {
121139
	var parent = el.parentNode;
121140
	if (parent.lastChild !== el) {
121141
		parent.appendChild(el);
121142
	}
121143
}
121144
 
121145
// @function toBack(el: HTMLElement)
121146
// Makes `el` the first child of its parent, so it renders behind the other children.
121147
function toBack(el) {
121148
	var parent = el.parentNode;
121149
	if (parent.firstChild !== el) {
121150
		parent.insertBefore(el, parent.firstChild);
121151
	}
121152
}
121153
 
121154
// @function hasClass(el: HTMLElement, name: String): Boolean
121155
// Returns `true` if the element's class attribute contains `name`.
121156
function hasClass(el, name) {
121157
	if (el.classList !== undefined) {
121158
		return el.classList.contains(name);
121159
	}
121160
	var className = getClass(el);
121161
	return className.length > 0 && new RegExp('(^|\\s)' + name + '(\\s|$)').test(className);
121162
}
121163
 
121164
// @function addClass(el: HTMLElement, name: String)
121165
// Adds `name` to the element's class attribute.
121166
function addClass(el, name) {
121167
	if (el.classList !== undefined) {
121168
		var classes = splitWords(name);
121169
		for (var i = 0, len = classes.length; i < len; i++) {
121170
			el.classList.add(classes[i]);
121171
		}
121172
	} else if (!hasClass(el, name)) {
121173
		var className = getClass(el);
121174
		setClass(el, (className ? className + ' ' : '') + name);
121175
	}
121176
}
121177
 
121178
// @function removeClass(el: HTMLElement, name: String)
121179
// Removes `name` from the element's class attribute.
121180
function removeClass(el, name) {
121181
	if (el.classList !== undefined) {
121182
		el.classList.remove(name);
121183
	} else {
121184
		setClass(el, trim((' ' + getClass(el) + ' ').replace(' ' + name + ' ', ' ')));
121185
	}
121186
}
121187
 
121188
// @function setClass(el: HTMLElement, name: String)
121189
// Sets the element's class.
121190
function setClass(el, name) {
121191
	if (el.className.baseVal === undefined) {
121192
		el.className = name;
121193
	} else {
121194
		// in case of SVG element
121195
		el.className.baseVal = name;
121196
	}
121197
}
121198
 
121199
// @function getClass(el: HTMLElement): String
121200
// Returns the element's class.
121201
function getClass(el) {
121202
	return el.className.baseVal === undefined ? el.className : el.className.baseVal;
121203
}
121204
 
121205
// @function setOpacity(el: HTMLElement, opacity: Number)
121206
// Set the opacity of an element (including old IE support).
121207
// `opacity` must be a number from `0` to `1`.
121208
function setOpacity(el, value) {
121209
	if ('opacity' in el.style) {
121210
		el.style.opacity = value;
121211
	} else if ('filter' in el.style) {
121212
		_setOpacityIE(el, value);
121213
	}
121214
}
121215
 
121216
function _setOpacityIE(el, value) {
121217
	var filter = false,
121218
	    filterName = 'DXImageTransform.Microsoft.Alpha';
121219
 
121220
	// filters collection throws an error if we try to retrieve a filter that doesn't exist
121221
	try {
121222
		filter = el.filters.item(filterName);
121223
	} catch (e) {
121224
		// don't set opacity to 1 if we haven't already set an opacity,
121225
		// it isn't needed and breaks transparent pngs.
121226
		if (value === 1) { return; }
121227
	}
121228
 
121229
	value = Math.round(value * 100);
121230
 
121231
	if (filter) {
121232
		filter.Enabled = (value !== 100);
121233
		filter.Opacity = value;
121234
	} else {
121235
		el.style.filter += ' progid:' + filterName + '(opacity=' + value + ')';
121236
	}
121237
}
121238
 
121239
// @function testProp(props: String[]): String|false
121240
// Goes through the array of style names and returns the first name
121241
// that is a valid style name for an element. If no such name is found,
121242
// it returns false. Useful for vendor-prefixed styles like `transform`.
121243
function testProp(props) {
121244
	var style = document.documentElement.style;
121245
 
121246
	for (var i = 0; i < props.length; i++) {
121247
		if (props[i] in style) {
121248
			return props[i];
121249
		}
121250
	}
121251
	return false;
121252
}
121253
 
121254
// @function setTransform(el: HTMLElement, offset: Point, scale?: Number)
121255
// Resets the 3D CSS transform of `el` so it is translated by `offset` pixels
121256
// and optionally scaled by `scale`. Does not have an effect if the
121257
// browser doesn't support 3D CSS transforms.
121258
function setTransform(el, offset, scale) {
121259
	var pos = offset || new Point(0, 0);
121260
 
121261
	el.style[TRANSFORM] =
121262
		(ie3d ?
121263
			'translate(' + pos.x + 'px,' + pos.y + 'px)' :
121264
			'translate3d(' + pos.x + 'px,' + pos.y + 'px,0)') +
121265
		(scale ? ' scale(' + scale + ')' : '');
121266
}
121267
 
121268
// @function setPosition(el: HTMLElement, position: Point)
121269
// Sets the position of `el` to coordinates specified by `position`,
121270
// using CSS translate or top/left positioning depending on the browser
121271
// (used by Leaflet internally to position its layers).
121272
function setPosition(el, point) {
121273
 
121274
	/*eslint-disable */
121275
	el._leaflet_pos = point;
121276
	/* eslint-enable */
121277
 
121278
	if (any3d) {
121279
		setTransform(el, point);
121280
	} else {
121281
		el.style.left = point.x + 'px';
121282
		el.style.top = point.y + 'px';
121283
	}
121284
}
121285
 
121286
// @function getPosition(el: HTMLElement): Point
121287
// Returns the coordinates of an element previously positioned with setPosition.
121288
function getPosition(el) {
121289
	// this method is only used for elements previously positioned using setPosition,
121290
	// so it's safe to cache the position for performance
121291
 
121292
	return el._leaflet_pos || new Point(0, 0);
121293
}
121294
 
121295
// @function disableTextSelection()
121296
// Prevents the user from generating `selectstart` DOM events, usually generated
121297
// when the user drags the mouse through a page with text. Used internally
121298
// by Leaflet to override the behaviour of any click-and-drag interaction on
121299
// the map. Affects drag interactions on the whole document.
121300
 
121301
// @function enableTextSelection()
121302
// Cancels the effects of a previous [`L.DomUtil.disableTextSelection`](#domutil-disabletextselection).
121303
var disableTextSelection;
121304
var enableTextSelection;
121305
var _userSelect;
121306
if ('onselectstart' in document) {
121307
	disableTextSelection = function () {
121308
		on(window, 'selectstart', preventDefault);
121309
	};
121310
	enableTextSelection = function () {
121311
		off(window, 'selectstart', preventDefault);
121312
	};
121313
} else {
121314
	var userSelectProperty = testProp(
121315
		['userSelect', 'WebkitUserSelect', 'OUserSelect', 'MozUserSelect', 'msUserSelect']);
121316
 
121317
	disableTextSelection = function () {
121318
		if (userSelectProperty) {
121319
			var style = document.documentElement.style;
121320
			_userSelect = style[userSelectProperty];
121321
			style[userSelectProperty] = 'none';
121322
		}
121323
	};
121324
	enableTextSelection = function () {
121325
		if (userSelectProperty) {
121326
			document.documentElement.style[userSelectProperty] = _userSelect;
121327
			_userSelect = undefined;
121328
		}
121329
	};
121330
}
121331
 
121332
// @function disableImageDrag()
121333
// As [`L.DomUtil.disableTextSelection`](#domutil-disabletextselection), but
121334
// for `dragstart` DOM events, usually generated when the user drags an image.
121335
function disableImageDrag() {
121336
	on(window, 'dragstart', preventDefault);
121337
}
121338
 
121339
// @function enableImageDrag()
121340
// Cancels the effects of a previous [`L.DomUtil.disableImageDrag`](#domutil-disabletextselection).
121341
function enableImageDrag() {
121342
	off(window, 'dragstart', preventDefault);
121343
}
121344
 
121345
var _outlineElement;
121346
var _outlineStyle;
121347
// @function preventOutline(el: HTMLElement)
121348
// Makes the [outline](https://developer.mozilla.org/docs/Web/CSS/outline)
121349
// of the element `el` invisible. Used internally by Leaflet to prevent
121350
// focusable elements from displaying an outline when the user performs a
121351
// drag interaction on them.
121352
function preventOutline(element) {
121353
	while (element.tabIndex === -1) {
121354
		element = element.parentNode;
121355
	}
121356
	if (!element.style) { return; }
121357
	restoreOutline();
121358
	_outlineElement = element;
121359
	_outlineStyle = element.style.outline;
121360
	element.style.outline = 'none';
121361
	on(window, 'keydown', restoreOutline);
121362
}
121363
 
121364
// @function restoreOutline()
121365
// Cancels the effects of a previous [`L.DomUtil.preventOutline`]().
121366
function restoreOutline() {
121367
	if (!_outlineElement) { return; }
121368
	_outlineElement.style.outline = _outlineStyle;
121369
	_outlineElement = undefined;
121370
	_outlineStyle = undefined;
121371
	off(window, 'keydown', restoreOutline);
121372
}
121373
 
121374
// @function getSizedParentNode(el: HTMLElement): HTMLElement
121375
// Finds the closest parent node which size (width and height) is not null.
121376
function getSizedParentNode(element) {
121377
	do {
121378
		element = element.parentNode;
121379
	} while ((!element.offsetWidth || !element.offsetHeight) && element !== document.body);
121380
	return element;
121381
}
121382
 
121383
// @function getScale(el: HTMLElement): Object
121384
// Computes the CSS scale currently applied on the element.
121385
// Returns an object with `x` and `y` members as horizontal and vertical scales respectively,
121386
// and `boundingClientRect` as the result of [`getBoundingClientRect()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect).
121387
function getScale(element) {
121388
	var rect = element.getBoundingClientRect(); // Read-only in old browsers.
121389
 
121390
	return {
121391
		x: rect.width / element.offsetWidth || 1,
121392
		y: rect.height / element.offsetHeight || 1,
121393
		boundingClientRect: rect
121394
	};
121395
}
121396
 
121397
 
121398
var DomUtil = (Object.freeze || Object)({
121399
	TRANSFORM: TRANSFORM,
121400
	TRANSITION: TRANSITION,
121401
	TRANSITION_END: TRANSITION_END,
121402
	get: get,
121403
	getStyle: getStyle,
121404
	create: create$1,
121405
	remove: remove,
121406
	empty: empty,
121407
	toFront: toFront,
121408
	toBack: toBack,
121409
	hasClass: hasClass,
121410
	addClass: addClass,
121411
	removeClass: removeClass,
121412
	setClass: setClass,
121413
	getClass: getClass,
121414
	setOpacity: setOpacity,
121415
	testProp: testProp,
121416
	setTransform: setTransform,
121417
	setPosition: setPosition,
121418
	getPosition: getPosition,
121419
	disableTextSelection: disableTextSelection,
121420
	enableTextSelection: enableTextSelection,
121421
	disableImageDrag: disableImageDrag,
121422
	enableImageDrag: enableImageDrag,
121423
	preventOutline: preventOutline,
121424
	restoreOutline: restoreOutline,
121425
	getSizedParentNode: getSizedParentNode,
121426
	getScale: getScale
121427
});
121428
 
121429
/*
121430
 * @namespace DomEvent
121431
 * Utility functions to work with the [DOM events](https://developer.mozilla.org/docs/Web/API/Event), used by Leaflet internally.
121432
 */
121433
 
121434
// Inspired by John Resig, Dean Edwards and YUI addEvent implementations.
121435
 
121436
// @function on(el: HTMLElement, types: String, fn: Function, context?: Object): this
121437
// Adds a listener function (`fn`) to a particular DOM event type of the
121438
// element `el`. You can optionally specify the context of the listener
121439
// (object the `this` keyword will point to). You can also pass several
121440
// space-separated types (e.g. `'click dblclick'`).
121441
 
121442
// @alternative
121443
// @function on(el: HTMLElement, eventMap: Object, context?: Object): this
121444
// Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}`
121445
function on(obj, types, fn, context) {
121446
 
121447
	if (typeof types === 'object') {
121448
		for (var type in types) {
121449
			addOne(obj, type, types[type], fn);
121450
		}
121451
	} else {
121452
		types = splitWords(types);
121453
 
121454
		for (var i = 0, len = types.length; i < len; i++) {
121455
			addOne(obj, types[i], fn, context);
121456
		}
121457
	}
121458
 
121459
	return this;
121460
}
121461
 
121462
var eventsKey = '_leaflet_events';
121463
 
121464
// @function off(el: HTMLElement, types: String, fn: Function, context?: Object): this
121465
// Removes a previously added listener function.
121466
// Note that if you passed a custom context to on, you must pass the same
121467
// context to `off` in order to remove the listener.
121468
 
121469
// @alternative
121470
// @function off(el: HTMLElement, eventMap: Object, context?: Object): this
121471
// Removes a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}`
121472
function off(obj, types, fn, context) {
121473
 
121474
	if (typeof types === 'object') {
121475
		for (var type in types) {
121476
			removeOne(obj, type, types[type], fn);
121477
		}
121478
	} else if (types) {
121479
		types = splitWords(types);
121480
 
121481
		for (var i = 0, len = types.length; i < len; i++) {
121482
			removeOne(obj, types[i], fn, context);
121483
		}
121484
	} else {
121485
		for (var j in obj[eventsKey]) {
121486
			removeOne(obj, j, obj[eventsKey][j]);
121487
		}
121488
		delete obj[eventsKey];
121489
	}
121490
 
121491
	return this;
121492
}
121493
 
121494
function addOne(obj, type, fn, context) {
121495
	var id = type + stamp(fn) + (context ? '_' + stamp(context) : '');
121496
 
121497
	if (obj[eventsKey] && obj[eventsKey][id]) { return this; }
121498
 
121499
	var handler = function (e) {
121500
		return fn.call(context || obj, e || window.event);
121501
	};
121502
 
121503
	var originalHandler = handler;
121504
 
121505
	if (pointer && type.indexOf('touch') === 0) {
121506
		// Needs DomEvent.Pointer.js
121507
		addPointerListener(obj, type, handler, id);
121508
 
121509
	} else if (touch && (type === 'dblclick') && addDoubleTapListener &&
121510
	           !(pointer && chrome)) {
121511
		// Chrome >55 does not need the synthetic dblclicks from addDoubleTapListener
121512
		// See #5180
121513
		addDoubleTapListener(obj, handler, id);
121514
 
121515
	} else if ('addEventListener' in obj) {
121516
 
121517
		if (type === 'mousewheel') {
121518
			obj.addEventListener('onwheel' in obj ? 'wheel' : 'mousewheel', handler, false);
121519
 
121520
		} else if ((type === 'mouseenter') || (type === 'mouseleave')) {
121521
			handler = function (e) {
121522
				e = e || window.event;
121523
				if (isExternalTarget(obj, e)) {
121524
					originalHandler(e);
121525
				}
121526
			};
121527
			obj.addEventListener(type === 'mouseenter' ? 'mouseover' : 'mouseout', handler, false);
121528
 
121529
		} else {
121530
			if (type === 'click' && android) {
121531
				handler = function (e) {
121532
					filterClick(e, originalHandler);
121533
				};
121534
			}
121535
			obj.addEventListener(type, handler, false);
121536
		}
121537
 
121538
	} else if ('attachEvent' in obj) {
121539
		obj.attachEvent('on' + type, handler);
121540
	}
121541
 
121542
	obj[eventsKey] = obj[eventsKey] || {};
121543
	obj[eventsKey][id] = handler;
121544
}
121545
 
121546
function removeOne(obj, type, fn, context) {
121547
 
121548
	var id = type + stamp(fn) + (context ? '_' + stamp(context) : ''),
121549
	    handler = obj[eventsKey] && obj[eventsKey][id];
121550
 
121551
	if (!handler) { return this; }
121552
 
121553
	if (pointer && type.indexOf('touch') === 0) {
121554
		removePointerListener(obj, type, id);
121555
 
121556
	} else if (touch && (type === 'dblclick') && removeDoubleTapListener &&
121557
	           !(pointer && chrome)) {
121558
		removeDoubleTapListener(obj, id);
121559
 
121560
	} else if ('removeEventListener' in obj) {
121561
 
121562
		if (type === 'mousewheel') {
121563
			obj.removeEventListener('onwheel' in obj ? 'wheel' : 'mousewheel', handler, false);
121564
 
121565
		} else {
121566
			obj.removeEventListener(
121567
				type === 'mouseenter' ? 'mouseover' :
121568
				type === 'mouseleave' ? 'mouseout' : type, handler, false);
121569
		}
121570
 
121571
	} else if ('detachEvent' in obj) {
121572
		obj.detachEvent('on' + type, handler);
121573
	}
121574
 
121575
	obj[eventsKey][id] = null;
121576
}
121577
 
121578
// @function stopPropagation(ev: DOMEvent): this
121579
// Stop the given event from propagation to parent elements. Used inside the listener functions:
121580
// ```js
121581
// L.DomEvent.on(div, 'click', function (ev) {
121582
// 	L.DomEvent.stopPropagation(ev);
121583
// });
121584
// ```
121585
function stopPropagation(e) {
121586
 
121587
	if (e.stopPropagation) {
121588
		e.stopPropagation();
121589
	} else if (e.originalEvent) {  // In case of Leaflet event.
121590
		e.originalEvent._stopped = true;
121591
	} else {
121592
		e.cancelBubble = true;
121593
	}
121594
	skipped(e);
121595
 
121596
	return this;
121597
}
121598
 
121599
// @function disableScrollPropagation(el: HTMLElement): this
121600
// Adds `stopPropagation` to the element's `'mousewheel'` events (plus browser variants).
121601
function disableScrollPropagation(el) {
121602
	addOne(el, 'mousewheel', stopPropagation);
121603
	return this;
121604
}
121605
 
121606
// @function disableClickPropagation(el: HTMLElement): this
121607
// Adds `stopPropagation` to the element's `'click'`, `'doubleclick'`,
121608
// `'mousedown'` and `'touchstart'` events (plus browser variants).
121609
function disableClickPropagation(el) {
121610
	on(el, 'mousedown touchstart dblclick', stopPropagation);
121611
	addOne(el, 'click', fakeStop);
121612
	return this;
121613
}
121614
 
121615
// @function preventDefault(ev: DOMEvent): this
121616
// Prevents the default action of the DOM Event `ev` from happening (such as
121617
// following a link in the href of the a element, or doing a POST request
121618
// with page reload when a `<form>` is submitted).
121619
// Use it inside listener functions.
121620
function preventDefault(e) {
121621
	if (e.preventDefault) {
121622
		e.preventDefault();
121623
	} else {
121624
		e.returnValue = false;
121625
	}
121626
	return this;
121627
}
121628
 
121629
// @function stop(ev: DOMEvent): this
121630
// Does `stopPropagation` and `preventDefault` at the same time.
121631
function stop(e) {
121632
	preventDefault(e);
121633
	stopPropagation(e);
121634
	return this;
121635
}
121636
 
121637
// @function getMousePosition(ev: DOMEvent, container?: HTMLElement): Point
121638
// Gets normalized mouse position from a DOM event relative to the
121639
// `container` (border excluded) or to the whole page if not specified.
121640
function getMousePosition(e, container) {
121641
	if (!container) {
121642
		return new Point(e.clientX, e.clientY);
121643
	}
121644
 
121645
	var scale = getScale(container),
121646
	    offset = scale.boundingClientRect; // left and top  values are in page scale (like the event clientX/Y)
121647
 
121648
	return new Point(
121649
		// offset.left/top values are in page scale (like clientX/Y),
121650
		// whereas clientLeft/Top (border width) values are the original values (before CSS scale applies).
121651
		(e.clientX - offset.left) / scale.x - container.clientLeft,
121652
		(e.clientY - offset.top) / scale.y - container.clientTop
121653
	);
121654
}
121655
 
121656
// Chrome on Win scrolls double the pixels as in other platforms (see #4538),
121657
// and Firefox scrolls device pixels, not CSS pixels
121658
var wheelPxFactor =
121659
	(win && chrome) ? 2 * window.devicePixelRatio :
121660
	gecko ? window.devicePixelRatio : 1;
121661
 
121662
// @function getWheelDelta(ev: DOMEvent): Number
121663
// Gets normalized wheel delta from a mousewheel DOM event, in vertical
121664
// pixels scrolled (negative if scrolling down).
121665
// Events from pointing devices without precise scrolling are mapped to
121666
// a best guess of 60 pixels.
121667
function getWheelDelta(e) {
121668
	return (edge) ? e.wheelDeltaY / 2 : // Don't trust window-geometry-based delta
121669
	       (e.deltaY && e.deltaMode === 0) ? -e.deltaY / wheelPxFactor : // Pixels
121670
	       (e.deltaY && e.deltaMode === 1) ? -e.deltaY * 20 : // Lines
121671
	       (e.deltaY && e.deltaMode === 2) ? -e.deltaY * 60 : // Pages
121672
	       (e.deltaX || e.deltaZ) ? 0 :	// Skip horizontal/depth wheel events
121673
	       e.wheelDelta ? (e.wheelDeltaY || e.wheelDelta) / 2 : // Legacy IE pixels
121674
	       (e.detail && Math.abs(e.detail) < 32765) ? -e.detail * 20 : // Legacy Moz lines
121675
	       e.detail ? e.detail / -32765 * 60 : // Legacy Moz pages
121676
	       0;
121677
}
121678
 
121679
var skipEvents = {};
121680
 
121681
function fakeStop(e) {
121682
	// fakes stopPropagation by setting a special event flag, checked/reset with skipped(e)
121683
	skipEvents[e.type] = true;
121684
}
121685
 
121686
function skipped(e) {
121687
	var events = skipEvents[e.type];
121688
	// reset when checking, as it's only used in map container and propagates outside of the map
121689
	skipEvents[e.type] = false;
121690
	return events;
121691
}
121692
 
121693
// check if element really left/entered the event target (for mouseenter/mouseleave)
121694
function isExternalTarget(el, e) {
121695
 
121696
	var related = e.relatedTarget;
121697
 
121698
	if (!related) { return true; }
121699
 
121700
	try {
121701
		while (related && (related !== el)) {
121702
			related = related.parentNode;
121703
		}
121704
	} catch (err) {
121705
		return false;
121706
	}
121707
	return (related !== el);
121708
}
121709
 
121710
var lastClick;
121711
 
121712
// this is a horrible workaround for a bug in Android where a single touch triggers two click events
121713
function filterClick(e, handler) {
121714
	var timeStamp = (e.timeStamp || (e.originalEvent && e.originalEvent.timeStamp)),
121715
	    elapsed = lastClick && (timeStamp - lastClick);
121716
 
121717
	// are they closer together than 500ms yet more than 100ms?
121718
	// Android typically triggers them ~300ms apart while multiple listeners
121719
	// on the same event should be triggered far faster;
121720
	// or check if click is simulated on the element, and if it is, reject any non-simulated events
121721
 
121722
	if ((elapsed && elapsed > 100 && elapsed < 500) || (e.target._simulatedClick && !e._simulated)) {
121723
		stop(e);
121724
		return;
121725
	}
121726
	lastClick = timeStamp;
121727
 
121728
	handler(e);
121729
}
121730
 
121731
 
121732
 
121733
 
121734
var DomEvent = (Object.freeze || Object)({
121735
	on: on,
121736
	off: off,
121737
	stopPropagation: stopPropagation,
121738
	disableScrollPropagation: disableScrollPropagation,
121739
	disableClickPropagation: disableClickPropagation,
121740
	preventDefault: preventDefault,
121741
	stop: stop,
121742
	getMousePosition: getMousePosition,
121743
	getWheelDelta: getWheelDelta,
121744
	fakeStop: fakeStop,
121745
	skipped: skipped,
121746
	isExternalTarget: isExternalTarget,
121747
	addListener: on,
121748
	removeListener: off
121749
});
121750
 
121751
/*
121752
 * @class PosAnimation
121753
 * @aka L.PosAnimation
121754
 * @inherits Evented
121755
 * Used internally for panning animations, utilizing CSS3 Transitions for modern browsers and a timer fallback for IE6-9.
121756
 *
121757
 * @example
121758
 * ```js
121759
 * var fx = new L.PosAnimation();
121760
 * fx.run(el, [300, 500], 0.5);
121761
 * ```
121762
 *
121763
 * @constructor L.PosAnimation()
121764
 * Creates a `PosAnimation` object.
121765
 *
121766
 */
121767
 
121768
var PosAnimation = Evented.extend({
121769
 
121770
	// @method run(el: HTMLElement, newPos: Point, duration?: Number, easeLinearity?: Number)
121771
	// Run an animation of a given element to a new position, optionally setting
121772
	// duration in seconds (`0.25` by default) and easing linearity factor (3rd
121773
	// argument of the [cubic bezier curve](http://cubic-bezier.com/#0,0,.5,1),
121774
	// `0.5` by default).
121775
	run: function (el, newPos, duration, easeLinearity) {
121776
		this.stop();
121777
 
121778
		this._el = el;
121779
		this._inProgress = true;
121780
		this._duration = duration || 0.25;
121781
		this._easeOutPower = 1 / Math.max(easeLinearity || 0.5, 0.2);
121782
 
121783
		this._startPos = getPosition(el);
121784
		this._offset = newPos.subtract(this._startPos);
121785
		this._startTime = +new Date();
121786
 
121787
		// @event start: Event
121788
		// Fired when the animation starts
121789
		this.fire('start');
121790
 
121791
		this._animate();
121792
	},
121793
 
121794
	// @method stop()
121795
	// Stops the animation (if currently running).
121796
	stop: function () {
121797
		if (!this._inProgress) { return; }
121798
 
121799
		this._step(true);
121800
		this._complete();
121801
	},
121802
 
121803
	_animate: function () {
121804
		// animation loop
121805
		this._animId = requestAnimFrame(this._animate, this);
121806
		this._step();
121807
	},
121808
 
121809
	_step: function (round) {
121810
		var elapsed = (+new Date()) - this._startTime,
121811
		    duration = this._duration * 1000;
121812
 
121813
		if (elapsed < duration) {
121814
			this._runFrame(this._easeOut(elapsed / duration), round);
121815
		} else {
121816
			this._runFrame(1);
121817
			this._complete();
121818
		}
121819
	},
121820
 
121821
	_runFrame: function (progress, round) {
121822
		var pos = this._startPos.add(this._offset.multiplyBy(progress));
121823
		if (round) {
121824
			pos._round();
121825
		}
121826
		setPosition(this._el, pos);
121827
 
121828
		// @event step: Event
121829
		// Fired continuously during the animation.
121830
		this.fire('step');
121831
	},
121832
 
121833
	_complete: function () {
121834
		cancelAnimFrame(this._animId);
121835
 
121836
		this._inProgress = false;
121837
		// @event end: Event
121838
		// Fired when the animation ends.
121839
		this.fire('end');
121840
	},
121841
 
121842
	_easeOut: function (t) {
121843
		return 1 - Math.pow(1 - t, this._easeOutPower);
121844
	}
121845
});
121846
 
121847
/*
121848
 * @class Map
121849
 * @aka L.Map
121850
 * @inherits Evented
121851
 *
121852
 * The central class of the API — it is used to create a map on a page and manipulate it.
121853
 *
121854
 * @example
121855
 *
121856
 * ```js
121857
 * // initialize the map on the "map" div with a given center and zoom
121858
 * var map = L.map('map', {
121859
 * 	center: [51.505, -0.09],
121860
 * 	zoom: 13
121861
 * });
121862
 * ```
121863
 *
121864
 */
121865
 
121866
var Map = Evented.extend({
121867
 
121868
	options: {
121869
		// @section Map State Options
121870
		// @option crs: CRS = L.CRS.EPSG3857
121871
		// The [Coordinate Reference System](#crs) to use. Don't change this if you're not
121872
		// sure what it means.
121873
		crs: EPSG3857,
121874
 
121875
		// @option center: LatLng = undefined
121876
		// Initial geographic center of the map
121877
		center: undefined,
121878
 
121879
		// @option zoom: Number = undefined
121880
		// Initial map zoom level
121881
		zoom: undefined,
121882
 
121883
		// @option minZoom: Number = *
121884
		// Minimum zoom level of the map.
121885
		// If not specified and at least one `GridLayer` or `TileLayer` is in the map,
121886
		// the lowest of their `minZoom` options will be used instead.
121887
		minZoom: undefined,
121888
 
121889
		// @option maxZoom: Number = *
121890
		// Maximum zoom level of the map.
121891
		// If not specified and at least one `GridLayer` or `TileLayer` is in the map,
121892
		// the highest of their `maxZoom` options will be used instead.
121893
		maxZoom: undefined,
121894
 
121895
		// @option layers: Layer[] = []
121896
		// Array of layers that will be added to the map initially
121897
		layers: [],
121898
 
121899
		// @option maxBounds: LatLngBounds = null
121900
		// When this option is set, the map restricts the view to the given
121901
		// geographical bounds, bouncing the user back if the user tries to pan
121902
		// outside the view. To set the restriction dynamically, use
121903
		// [`setMaxBounds`](#map-setmaxbounds) method.
121904
		maxBounds: undefined,
121905
 
121906
		// @option renderer: Renderer = *
121907
		// The default method for drawing vector layers on the map. `L.SVG`
121908
		// or `L.Canvas` by default depending on browser support.
121909
		renderer: undefined,
121910
 
121911
 
121912
		// @section Animation Options
121913
		// @option zoomAnimation: Boolean = true
121914
		// Whether the map zoom animation is enabled. By default it's enabled
121915
		// in all browsers that support CSS3 Transitions except Android.
121916
		zoomAnimation: true,
121917
 
121918
		// @option zoomAnimationThreshold: Number = 4
121919
		// Won't animate zoom if the zoom difference exceeds this value.
121920
		zoomAnimationThreshold: 4,
121921
 
121922
		// @option fadeAnimation: Boolean = true
121923
		// Whether the tile fade animation is enabled. By default it's enabled
121924
		// in all browsers that support CSS3 Transitions except Android.
121925
		fadeAnimation: true,
121926
 
121927
		// @option markerZoomAnimation: Boolean = true
121928
		// Whether markers animate their zoom with the zoom animation, if disabled
121929
		// they will disappear for the length of the animation. By default it's
121930
		// enabled in all browsers that support CSS3 Transitions except Android.
121931
		markerZoomAnimation: true,
121932
 
121933
		// @option transform3DLimit: Number = 2^23
121934
		// Defines the maximum size of a CSS translation transform. The default
121935
		// value should not be changed unless a web browser positions layers in
121936
		// the wrong place after doing a large `panBy`.
121937
		transform3DLimit: 8388608, // Precision limit of a 32-bit float
121938
 
121939
		// @section Interaction Options
121940
		// @option zoomSnap: Number = 1
121941
		// Forces the map's zoom level to always be a multiple of this, particularly
121942
		// right after a [`fitBounds()`](#map-fitbounds) or a pinch-zoom.
121943
		// By default, the zoom level snaps to the nearest integer; lower values
121944
		// (e.g. `0.5` or `0.1`) allow for greater granularity. A value of `0`
121945
		// means the zoom level will not be snapped after `fitBounds` or a pinch-zoom.
121946
		zoomSnap: 1,
121947
 
121948
		// @option zoomDelta: Number = 1
121949
		// Controls how much the map's zoom level will change after a
121950
		// [`zoomIn()`](#map-zoomin), [`zoomOut()`](#map-zoomout), pressing `+`
121951
		// or `-` on the keyboard, or using the [zoom controls](#control-zoom).
121952
		// Values smaller than `1` (e.g. `0.5`) allow for greater granularity.
121953
		zoomDelta: 1,
121954
 
121955
		// @option trackResize: Boolean = true
121956
		// Whether the map automatically handles browser window resize to update itself.
121957
		trackResize: true
121958
	},
121959
 
121960
	initialize: function (id, options) { // (HTMLElement or String, Object)
121961
		options = setOptions(this, options);
121962
 
121963
		this._initContainer(id);
121964
		this._initLayout();
121965
 
121966
		// hack for https://github.com/Leaflet/Leaflet/issues/1980
121967
		this._onResize = bind(this._onResize, this);
121968
 
121969
		this._initEvents();
121970
 
121971
		if (options.maxBounds) {
121972
			this.setMaxBounds(options.maxBounds);
121973
		}
121974
 
121975
		if (options.zoom !== undefined) {
121976
			this._zoom = this._limitZoom(options.zoom);
121977
		}
121978
 
121979
		if (options.center && options.zoom !== undefined) {
121980
			this.setView(toLatLng(options.center), options.zoom, {reset: true});
121981
		}
121982
 
121983
		this._handlers = [];
121984
		this._layers = {};
121985
		this._zoomBoundLayers = {};
121986
		this._sizeChanged = true;
121987
 
121988
		this.callInitHooks();
121989
 
121990
		// don't animate on browsers without hardware-accelerated transitions or old Android/Opera
121991
		this._zoomAnimated = TRANSITION && any3d && !mobileOpera &&
121992
				this.options.zoomAnimation;
121993
 
121994
		// zoom transitions run with the same duration for all layers, so if one of transitionend events
121995
		// happens after starting zoom animation (propagating to the map pane), we know that it ended globally
121996
		if (this._zoomAnimated) {
121997
			this._createAnimProxy();
121998
			on(this._proxy, TRANSITION_END, this._catchTransitionEnd, this);
121999
		}
122000
 
122001
		this._addLayers(this.options.layers);
122002
	},
122003
 
122004
 
122005
	// @section Methods for modifying map state
122006
 
122007
	// @method setView(center: LatLng, zoom: Number, options?: Zoom/pan options): this
122008
	// Sets the view of the map (geographical center and zoom) with the given
122009
	// animation options.
122010
	setView: function (center, zoom, options) {
122011
 
122012
		zoom = zoom === undefined ? this._zoom : this._limitZoom(zoom);
122013
		center = this._limitCenter(toLatLng(center), zoom, this.options.maxBounds);
122014
		options = options || {};
122015
 
122016
		this._stop();
122017
 
122018
		if (this._loaded && !options.reset && options !== true) {
122019
 
122020
			if (options.animate !== undefined) {
122021
				options.zoom = extend({animate: options.animate}, options.zoom);
122022
				options.pan = extend({animate: options.animate, duration: options.duration}, options.pan);
122023
			}
122024
 
122025
			// try animating pan or zoom
122026
			var moved = (this._zoom !== zoom) ?
122027
				this._tryAnimatedZoom && this._tryAnimatedZoom(center, zoom, options.zoom) :
122028
				this._tryAnimatedPan(center, options.pan);
122029
 
122030
			if (moved) {
122031
				// prevent resize handler call, the view will refresh after animation anyway
122032
				clearTimeout(this._sizeTimer);
122033
				return this;
122034
			}
122035
		}
122036
 
122037
		// animation didn't start, just reset the map view
122038
		this._resetView(center, zoom);
122039
 
122040
		return this;
122041
	},
122042
 
122043
	// @method setZoom(zoom: Number, options?: Zoom/pan options): this
122044
	// Sets the zoom of the map.
122045
	setZoom: function (zoom, options) {
122046
		if (!this._loaded) {
122047
			this._zoom = zoom;
122048
			return this;
122049
		}
122050
		return this.setView(this.getCenter(), zoom, {zoom: options});
122051
	},
122052
 
122053
	// @method zoomIn(delta?: Number, options?: Zoom options): this
122054
	// Increases the zoom of the map by `delta` ([`zoomDelta`](#map-zoomdelta) by default).
122055
	zoomIn: function (delta, options) {
122056
		delta = delta || (any3d ? this.options.zoomDelta : 1);
122057
		return this.setZoom(this._zoom + delta, options);
122058
	},
122059
 
122060
	// @method zoomOut(delta?: Number, options?: Zoom options): this
122061
	// Decreases the zoom of the map by `delta` ([`zoomDelta`](#map-zoomdelta) by default).
122062
	zoomOut: function (delta, options) {
122063
		delta = delta || (any3d ? this.options.zoomDelta : 1);
122064
		return this.setZoom(this._zoom - delta, options);
122065
	},
122066
 
122067
	// @method setZoomAround(latlng: LatLng, zoom: Number, options: Zoom options): this
122068
	// Zooms the map while keeping a specified geographical point on the map
122069
	// stationary (e.g. used internally for scroll zoom and double-click zoom).
122070
	// @alternative
122071
	// @method setZoomAround(offset: Point, zoom: Number, options: Zoom options): this
122072
	// Zooms the map while keeping a specified pixel on the map (relative to the top-left corner) stationary.
122073
	setZoomAround: function (latlng, zoom, options) {
122074
		var scale = this.getZoomScale(zoom),
122075
		    viewHalf = this.getSize().divideBy(2),
122076
		    containerPoint = latlng instanceof Point ? latlng : this.latLngToContainerPoint(latlng),
122077
 
122078
		    centerOffset = containerPoint.subtract(viewHalf).multiplyBy(1 - 1 / scale),
122079
		    newCenter = this.containerPointToLatLng(viewHalf.add(centerOffset));
122080
 
122081
		return this.setView(newCenter, zoom, {zoom: options});
122082
	},
122083
 
122084
	_getBoundsCenterZoom: function (bounds, options) {
122085
 
122086
		options = options || {};
122087
		bounds = bounds.getBounds ? bounds.getBounds() : toLatLngBounds(bounds);
122088
 
122089
		var paddingTL = toPoint(options.paddingTopLeft || options.padding || [0, 0]),
122090
		    paddingBR = toPoint(options.paddingBottomRight || options.padding || [0, 0]),
122091
 
122092
		    zoom = this.getBoundsZoom(bounds, false, paddingTL.add(paddingBR));
122093
 
122094
		zoom = (typeof options.maxZoom === 'number') ? Math.min(options.maxZoom, zoom) : zoom;
122095
 
122096
		if (zoom === Infinity) {
122097
			return {
122098
				center: bounds.getCenter(),
122099
				zoom: zoom
122100
			};
122101
		}
122102
 
122103
		var paddingOffset = paddingBR.subtract(paddingTL).divideBy(2),
122104
 
122105
		    swPoint = this.project(bounds.getSouthWest(), zoom),
122106
		    nePoint = this.project(bounds.getNorthEast(), zoom),
122107
		    center = this.unproject(swPoint.add(nePoint).divideBy(2).add(paddingOffset), zoom);
122108
 
122109
		return {
122110
			center: center,
122111
			zoom: zoom
122112
		};
122113
	},
122114
 
122115
	// @method fitBounds(bounds: LatLngBounds, options?: fitBounds options): this
122116
	// Sets a map view that contains the given geographical bounds with the
122117
	// maximum zoom level possible.
122118
	fitBounds: function (bounds, options) {
122119
 
122120
		bounds = toLatLngBounds(bounds);
122121
 
122122
		if (!bounds.isValid()) {
122123
			throw new Error('Bounds are not valid.');
122124
		}
122125
 
122126
		var target = this._getBoundsCenterZoom(bounds, options);
122127
		return this.setView(target.center, target.zoom, options);
122128
	},
122129
 
122130
	// @method fitWorld(options?: fitBounds options): this
122131
	// Sets a map view that mostly contains the whole world with the maximum
122132
	// zoom level possible.
122133
	fitWorld: function (options) {
122134
		return this.fitBounds([[-90, -180], [90, 180]], options);
122135
	},
122136
 
122137
	// @method panTo(latlng: LatLng, options?: Pan options): this
122138
	// Pans the map to a given center.
122139
	panTo: function (center, options) { // (LatLng)
122140
		return this.setView(center, this._zoom, {pan: options});
122141
	},
122142
 
122143
	// @method panBy(offset: Point, options?: Pan options): this
122144
	// Pans the map by a given number of pixels (animated).
122145
	panBy: function (offset, options) {
122146
		offset = toPoint(offset).round();
122147
		options = options || {};
122148
 
122149
		if (!offset.x && !offset.y) {
122150
			return this.fire('moveend');
122151
		}
122152
		// If we pan too far, Chrome gets issues with tiles
122153
		// and makes them disappear or appear in the wrong place (slightly offset) #2602
122154
		if (options.animate !== true && !this.getSize().contains(offset)) {
122155
			this._resetView(this.unproject(this.project(this.getCenter()).add(offset)), this.getZoom());
122156
			return this;
122157
		}
122158
 
122159
		if (!this._panAnim) {
122160
			this._panAnim = new PosAnimation();
122161
 
122162
			this._panAnim.on({
122163
				'step': this._onPanTransitionStep,
122164
				'end': this._onPanTransitionEnd
122165
			}, this);
122166
		}
122167
 
122168
		// don't fire movestart if animating inertia
122169
		if (!options.noMoveStart) {
122170
			this.fire('movestart');
122171
		}
122172
 
122173
		// animate pan unless animate: false specified
122174
		if (options.animate !== false) {
122175
			addClass(this._mapPane, 'leaflet-pan-anim');
122176
 
122177
			var newPos = this._getMapPanePos().subtract(offset).round();
122178
			this._panAnim.run(this._mapPane, newPos, options.duration || 0.25, options.easeLinearity);
122179
		} else {
122180
			this._rawPanBy(offset);
122181
			this.fire('move').fire('moveend');
122182
		}
122183
 
122184
		return this;
122185
	},
122186
 
122187
	// @method flyTo(latlng: LatLng, zoom?: Number, options?: Zoom/pan options): this
122188
	// Sets the view of the map (geographical center and zoom) performing a smooth
122189
	// pan-zoom animation.
122190
	flyTo: function (targetCenter, targetZoom, options) {
122191
 
122192
		options = options || {};
122193
		if (options.animate === false || !any3d) {
122194
			return this.setView(targetCenter, targetZoom, options);
122195
		}
122196
 
122197
		this._stop();
122198
 
122199
		var from = this.project(this.getCenter()),
122200
		    to = this.project(targetCenter),
122201
		    size = this.getSize(),
122202
		    startZoom = this._zoom;
122203
 
122204
		targetCenter = toLatLng(targetCenter);
122205
		targetZoom = targetZoom === undefined ? startZoom : targetZoom;
122206
 
122207
		var w0 = Math.max(size.x, size.y),
122208
		    w1 = w0 * this.getZoomScale(startZoom, targetZoom),
122209
		    u1 = (to.distanceTo(from)) || 1,
122210
		    rho = 1.42,
122211
		    rho2 = rho * rho;
122212
 
122213
		function r(i) {
122214
			var s1 = i ? -1 : 1,
122215
			    s2 = i ? w1 : w0,
122216
			    t1 = w1 * w1 - w0 * w0 + s1 * rho2 * rho2 * u1 * u1,
122217
			    b1 = 2 * s2 * rho2 * u1,
122218
			    b = t1 / b1,
122219
			    sq = Math.sqrt(b * b + 1) - b;
122220
 
122221
			    // workaround for floating point precision bug when sq = 0, log = -Infinite,
122222
			    // thus triggering an infinite loop in flyTo
122223
			    var log = sq < 0.000000001 ? -18 : Math.log(sq);
122224
 
122225
			return log;
122226
		}
122227
 
122228
		function sinh(n) { return (Math.exp(n) - Math.exp(-n)) / 2; }
122229
		function cosh(n) { return (Math.exp(n) + Math.exp(-n)) / 2; }
122230
		function tanh(n) { return sinh(n) / cosh(n); }
122231
 
122232
		var r0 = r(0);
122233
 
122234
		function w(s) { return w0 * (cosh(r0) / cosh(r0 + rho * s)); }
122235
		function u(s) { return w0 * (cosh(r0) * tanh(r0 + rho * s) - sinh(r0)) / rho2; }
122236
 
122237
		function easeOut(t) { return 1 - Math.pow(1 - t, 1.5); }
122238
 
122239
		var start = Date.now(),
122240
		    S = (r(1) - r0) / rho,
122241
		    duration = options.duration ? 1000 * options.duration : 1000 * S * 0.8;
122242
 
122243
		function frame() {
122244
			var t = (Date.now() - start) / duration,
122245
			    s = easeOut(t) * S;
122246
 
122247
			if (t <= 1) {
122248
				this._flyToFrame = requestAnimFrame(frame, this);
122249
 
122250
				this._move(
122251
					this.unproject(from.add(to.subtract(from).multiplyBy(u(s) / u1)), startZoom),
122252
					this.getScaleZoom(w0 / w(s), startZoom),
122253
					{flyTo: true});
122254
 
122255
			} else {
122256
				this
122257
					._move(targetCenter, targetZoom)
122258
					._moveEnd(true);
122259
			}
122260
		}
122261
 
122262
		this._moveStart(true, options.noMoveStart);
122263
 
122264
		frame.call(this);
122265
		return this;
122266
	},
122267
 
122268
	// @method flyToBounds(bounds: LatLngBounds, options?: fitBounds options): this
122269
	// Sets the view of the map with a smooth animation like [`flyTo`](#map-flyto),
122270
	// but takes a bounds parameter like [`fitBounds`](#map-fitbounds).
122271
	flyToBounds: function (bounds, options) {
122272
		var target = this._getBoundsCenterZoom(bounds, options);
122273
		return this.flyTo(target.center, target.zoom, options);
122274
	},
122275
 
122276
	// @method setMaxBounds(bounds: Bounds): this
122277
	// Restricts the map view to the given bounds (see the [maxBounds](#map-maxbounds) option).
122278
	setMaxBounds: function (bounds) {
122279
		bounds = toLatLngBounds(bounds);
122280
 
122281
		if (!bounds.isValid()) {
122282
			this.options.maxBounds = null;
122283
			return this.off('moveend', this._panInsideMaxBounds);
122284
		} else if (this.options.maxBounds) {
122285
			this.off('moveend', this._panInsideMaxBounds);
122286
		}
122287
 
122288
		this.options.maxBounds = bounds;
122289
 
122290
		if (this._loaded) {
122291
			this._panInsideMaxBounds();
122292
		}
122293
 
122294
		return this.on('moveend', this._panInsideMaxBounds);
122295
	},
122296
 
122297
	// @method setMinZoom(zoom: Number): this
122298
	// Sets the lower limit for the available zoom levels (see the [minZoom](#map-minzoom) option).
122299
	setMinZoom: function (zoom) {
122300
		var oldZoom = this.options.minZoom;
122301
		this.options.minZoom = zoom;
122302
 
122303
		if (this._loaded && oldZoom !== zoom) {
122304
			this.fire('zoomlevelschange');
122305
 
122306
			if (this.getZoom() < this.options.minZoom) {
122307
				return this.setZoom(zoom);
122308
			}
122309
		}
122310
 
122311
		return this;
122312
	},
122313
 
122314
	// @method setMaxZoom(zoom: Number): this
122315
	// Sets the upper limit for the available zoom levels (see the [maxZoom](#map-maxzoom) option).
122316
	setMaxZoom: function (zoom) {
122317
		var oldZoom = this.options.maxZoom;
122318
		this.options.maxZoom = zoom;
122319
 
122320
		if (this._loaded && oldZoom !== zoom) {
122321
			this.fire('zoomlevelschange');
122322
 
122323
			if (this.getZoom() > this.options.maxZoom) {
122324
				return this.setZoom(zoom);
122325
			}
122326
		}
122327
 
122328
		return this;
122329
	},
122330
 
122331
	// @method panInsideBounds(bounds: LatLngBounds, options?: Pan options): this
122332
	// Pans the map to the closest view that would lie inside the given bounds (if it's not already), controlling the animation using the options specific, if any.
122333
	panInsideBounds: function (bounds, options) {
122334
		this._enforcingBounds = true;
122335
		var center = this.getCenter(),
122336
		    newCenter = this._limitCenter(center, this._zoom, toLatLngBounds(bounds));
122337
 
122338
		if (!center.equals(newCenter)) {
122339
			this.panTo(newCenter, options);
122340
		}
122341
 
122342
		this._enforcingBounds = false;
122343
		return this;
122344
	},
122345
 
122346
	// @method invalidateSize(options: Zoom/pan options): this
122347
	// Checks if the map container size changed and updates the map if so —
122348
	// call it after you've changed the map size dynamically, also animating
122349
	// pan by default. If `options.pan` is `false`, panning will not occur.
122350
	// If `options.debounceMoveend` is `true`, it will delay `moveend` event so
122351
	// that it doesn't happen often even if the method is called many
122352
	// times in a row.
122353
 
122354
	// @alternative
122355
	// @method invalidateSize(animate: Boolean): this
122356
	// Checks if the map container size changed and updates the map if so —
122357
	// call it after you've changed the map size dynamically, also animating
122358
	// pan by default.
122359
	invalidateSize: function (options) {
122360
		if (!this._loaded) { return this; }
122361
 
122362
		options = extend({
122363
			animate: false,
122364
			pan: true
122365
		}, options === true ? {animate: true} : options);
122366
 
122367
		var oldSize = this.getSize();
122368
		this._sizeChanged = true;
122369
		this._lastCenter = null;
122370
 
122371
		var newSize = this.getSize(),
122372
		    oldCenter = oldSize.divideBy(2).round(),
122373
		    newCenter = newSize.divideBy(2).round(),
122374
		    offset = oldCenter.subtract(newCenter);
122375
 
122376
		if (!offset.x && !offset.y) { return this; }
122377
 
122378
		if (options.animate && options.pan) {
122379
			this.panBy(offset);
122380
 
122381
		} else {
122382
			if (options.pan) {
122383
				this._rawPanBy(offset);
122384
			}
122385
 
122386
			this.fire('move');
122387
 
122388
			if (options.debounceMoveend) {
122389
				clearTimeout(this._sizeTimer);
122390
				this._sizeTimer = setTimeout(bind(this.fire, this, 'moveend'), 200);
122391
			} else {
122392
				this.fire('moveend');
122393
			}
122394
		}
122395
 
122396
		// @section Map state change events
122397
		// @event resize: ResizeEvent
122398
		// Fired when the map is resized.
122399
		return this.fire('resize', {
122400
			oldSize: oldSize,
122401
			newSize: newSize
122402
		});
122403
	},
122404
 
122405
	// @section Methods for modifying map state
122406
	// @method stop(): this
122407
	// Stops the currently running `panTo` or `flyTo` animation, if any.
122408
	stop: function () {
122409
		this.setZoom(this._limitZoom(this._zoom));
122410
		if (!this.options.zoomSnap) {
122411
			this.fire('viewreset');
122412
		}
122413
		return this._stop();
122414
	},
122415
 
122416
	// @section Geolocation methods
122417
	// @method locate(options?: Locate options): this
122418
	// Tries to locate the user using the Geolocation API, firing a [`locationfound`](#map-locationfound)
122419
	// event with location data on success or a [`locationerror`](#map-locationerror) event on failure,
122420
	// and optionally sets the map view to the user's location with respect to
122421
	// detection accuracy (or to the world view if geolocation failed).
122422
	// Note that, if your page doesn't use HTTPS, this method will fail in
122423
	// modern browsers ([Chrome 50 and newer](https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-powerful-features-on-insecure-origins))
122424
	// See `Locate options` for more details.
122425
	locate: function (options) {
122426
 
122427
		options = this._locateOptions = extend({
122428
			timeout: 10000,
122429
			watch: false
122430
			// setView: false
122431
			// maxZoom: <Number>
122432
			// maximumAge: 0
122433
			// enableHighAccuracy: false
122434
		}, options);
122435
 
122436
		if (!('geolocation' in navigator)) {
122437
			this._handleGeolocationError({
122438
				code: 0,
122439
				message: 'Geolocation not supported.'
122440
			});
122441
			return this;
122442
		}
122443
 
122444
		var onResponse = bind(this._handleGeolocationResponse, this),
122445
		    onError = bind(this._handleGeolocationError, this);
122446
 
122447
		if (options.watch) {
122448
			this._locationWatchId =
122449
			        navigator.geolocation.watchPosition(onResponse, onError, options);
122450
		} else {
122451
			navigator.geolocation.getCurrentPosition(onResponse, onError, options);
122452
		}
122453
		return this;
122454
	},
122455
 
122456
	// @method stopLocate(): this
122457
	// Stops watching location previously initiated by `map.locate({watch: true})`
122458
	// and aborts resetting the map view if map.locate was called with
122459
	// `{setView: true}`.
122460
	stopLocate: function () {
122461
		if (navigator.geolocation && navigator.geolocation.clearWatch) {
122462
			navigator.geolocation.clearWatch(this._locationWatchId);
122463
		}
122464
		if (this._locateOptions) {
122465
			this._locateOptions.setView = false;
122466
		}
122467
		return this;
122468
	},
122469
 
122470
	_handleGeolocationError: function (error) {
122471
		var c = error.code,
122472
		    message = error.message ||
122473
		            (c === 1 ? 'permission denied' :
122474
		            (c === 2 ? 'position unavailable' : 'timeout'));
122475
 
122476
		if (this._locateOptions.setView && !this._loaded) {
122477
			this.fitWorld();
122478
		}
122479
 
122480
		// @section Location events
122481
		// @event locationerror: ErrorEvent
122482
		// Fired when geolocation (using the [`locate`](#map-locate) method) failed.
122483
		this.fire('locationerror', {
122484
			code: c,
122485
			message: 'Geolocation error: ' + message + '.'
122486
		});
122487
	},
122488
 
122489
	_handleGeolocationResponse: function (pos) {
122490
		var lat = pos.coords.latitude,
122491
		    lng = pos.coords.longitude,
122492
		    latlng = new LatLng(lat, lng),
122493
		    bounds = latlng.toBounds(pos.coords.accuracy * 2),
122494
		    options = this._locateOptions;
122495
 
122496
		if (options.setView) {
122497
			var zoom = this.getBoundsZoom(bounds);
122498
			this.setView(latlng, options.maxZoom ? Math.min(zoom, options.maxZoom) : zoom);
122499
		}
122500
 
122501
		var data = {
122502
			latlng: latlng,
122503
			bounds: bounds,
122504
			timestamp: pos.timestamp
122505
		};
122506
 
122507
		for (var i in pos.coords) {
122508
			if (typeof pos.coords[i] === 'number') {
122509
				data[i] = pos.coords[i];
122510
			}
122511
		}
122512
 
122513
		// @event locationfound: LocationEvent
122514
		// Fired when geolocation (using the [`locate`](#map-locate) method)
122515
		// went successfully.
122516
		this.fire('locationfound', data);
122517
	},
122518
 
122519
	// TODO Appropriate docs section?
122520
	// @section Other Methods
122521
	// @method addHandler(name: String, HandlerClass: Function): this
122522
	// Adds a new `Handler` to the map, given its name and constructor function.
122523
	addHandler: function (name, HandlerClass) {
122524
		if (!HandlerClass) { return this; }
122525
 
122526
		var handler = this[name] = new HandlerClass(this);
122527
 
122528
		this._handlers.push(handler);
122529
 
122530
		if (this.options[name]) {
122531
			handler.enable();
122532
		}
122533
 
122534
		return this;
122535
	},
122536
 
122537
	// @method remove(): this
122538
	// Destroys the map and clears all related event listeners.
122539
	remove: function () {
122540
 
122541
		this._initEvents(true);
122542
 
122543
		if (this._containerId !== this._container._leaflet_id) {
122544
			throw new Error('Map container is being reused by another instance');
122545
		}
122546
 
122547
		try {
122548
			// throws error in IE6-8
122549
			delete this._container._leaflet_id;
122550
			delete this._containerId;
122551
		} catch (e) {
122552
			/*eslint-disable */
122553
			this._container._leaflet_id = undefined;
122554
			/* eslint-enable */
122555
			this._containerId = undefined;
122556
		}
122557
 
122558
		if (this._locationWatchId !== undefined) {
122559
			this.stopLocate();
122560
		}
122561
 
122562
		this._stop();
122563
 
122564
		remove(this._mapPane);
122565
 
122566
		if (this._clearControlPos) {
122567
			this._clearControlPos();
122568
		}
122569
		if (this._resizeRequest) {
122570
			cancelAnimFrame(this._resizeRequest);
122571
			this._resizeRequest = null;
122572
		}
122573
 
122574
		this._clearHandlers();
122575
 
122576
		if (this._loaded) {
122577
			// @section Map state change events
122578
			// @event unload: Event
122579
			// Fired when the map is destroyed with [remove](#map-remove) method.
122580
			this.fire('unload');
122581
		}
122582
 
122583
		var i;
122584
		for (i in this._layers) {
122585
			this._layers[i].remove();
122586
		}
122587
		for (i in this._panes) {
122588
			remove(this._panes[i]);
122589
		}
122590
 
122591
		this._layers = [];
122592
		this._panes = [];
122593
		delete this._mapPane;
122594
		delete this._renderer;
122595
 
122596
		return this;
122597
	},
122598
 
122599
	// @section Other Methods
122600
	// @method createPane(name: String, container?: HTMLElement): HTMLElement
122601
	// Creates a new [map pane](#map-pane) with the given name if it doesn't exist already,
122602
	// then returns it. The pane is created as a child of `container`, or
122603
	// as a child of the main map pane if not set.
122604
	createPane: function (name, container) {
122605
		var className = 'leaflet-pane' + (name ? ' leaflet-' + name.replace('Pane', '') + '-pane' : ''),
122606
		    pane = create$1('div', className, container || this._mapPane);
122607
 
122608
		if (name) {
122609
			this._panes[name] = pane;
122610
		}
122611
		return pane;
122612
	},
122613
 
122614
	// @section Methods for Getting Map State
122615
 
122616
	// @method getCenter(): LatLng
122617
	// Returns the geographical center of the map view
122618
	getCenter: function () {
122619
		this._checkIfLoaded();
122620
 
122621
		if (this._lastCenter && !this._moved()) {
122622
			return this._lastCenter;
122623
		}
122624
		return this.layerPointToLatLng(this._getCenterLayerPoint());
122625
	},
122626
 
122627
	// @method getZoom(): Number
122628
	// Returns the current zoom level of the map view
122629
	getZoom: function () {
122630
		return this._zoom;
122631
	},
122632
 
122633
	// @method getBounds(): LatLngBounds
122634
	// Returns the geographical bounds visible in the current map view
122635
	getBounds: function () {
122636
		var bounds = this.getPixelBounds(),
122637
		    sw = this.unproject(bounds.getBottomLeft()),
122638
		    ne = this.unproject(bounds.getTopRight());
122639
 
122640
		return new LatLngBounds(sw, ne);
122641
	},
122642
 
122643
	// @method getMinZoom(): Number
122644
	// Returns the minimum zoom level of the map (if set in the `minZoom` option of the map or of any layers), or `0` by default.
122645
	getMinZoom: function () {
122646
		return this.options.minZoom === undefined ? this._layersMinZoom || 0 : this.options.minZoom;
122647
	},
122648
 
122649
	// @method getMaxZoom(): Number
122650
	// Returns the maximum zoom level of the map (if set in the `maxZoom` option of the map or of any layers).
122651
	getMaxZoom: function () {
122652
		return this.options.maxZoom === undefined ?
122653
			(this._layersMaxZoom === undefined ? Infinity : this._layersMaxZoom) :
122654
			this.options.maxZoom;
122655
	},
122656
 
122657
	// @method getBoundsZoom(bounds: LatLngBounds, inside?: Boolean, padding?: Point): Number
122658
	// Returns the maximum zoom level on which the given bounds fit to the map
122659
	// view in its entirety. If `inside` (optional) is set to `true`, the method
122660
	// instead returns the minimum zoom level on which the map view fits into
122661
	// the given bounds in its entirety.
122662
	getBoundsZoom: function (bounds, inside, padding) { // (LatLngBounds[, Boolean, Point]) -> Number
122663
		bounds = toLatLngBounds(bounds);
122664
		padding = toPoint(padding || [0, 0]);
122665
 
122666
		var zoom = this.getZoom() || 0,
122667
		    min = this.getMinZoom(),
122668
		    max = this.getMaxZoom(),
122669
		    nw = bounds.getNorthWest(),
122670
		    se = bounds.getSouthEast(),
122671
		    size = this.getSize().subtract(padding),
122672
		    boundsSize = toBounds(this.project(se, zoom), this.project(nw, zoom)).getSize(),
122673
		    snap = any3d ? this.options.zoomSnap : 1,
122674
		    scalex = size.x / boundsSize.x,
122675
		    scaley = size.y / boundsSize.y,
122676
		    scale = inside ? Math.max(scalex, scaley) : Math.min(scalex, scaley);
122677
 
122678
		zoom = this.getScaleZoom(scale, zoom);
122679
 
122680
		if (snap) {
122681
			zoom = Math.round(zoom / (snap / 100)) * (snap / 100); // don't jump if within 1% of a snap level
122682
			zoom = inside ? Math.ceil(zoom / snap) * snap : Math.floor(zoom / snap) * snap;
122683
		}
122684
 
122685
		return Math.max(min, Math.min(max, zoom));
122686
	},
122687
 
122688
	// @method getSize(): Point
122689
	// Returns the current size of the map container (in pixels).
122690
	getSize: function () {
122691
		if (!this._size || this._sizeChanged) {
122692
			this._size = new Point(
122693
				this._container.clientWidth || 0,
122694
				this._container.clientHeight || 0);
122695
 
122696
			this._sizeChanged = false;
122697
		}
122698
		return this._size.clone();
122699
	},
122700
 
122701
	// @method getPixelBounds(): Bounds
122702
	// Returns the bounds of the current map view in projected pixel
122703
	// coordinates (sometimes useful in layer and overlay implementations).
122704
	getPixelBounds: function (center, zoom) {
122705
		var topLeftPoint = this._getTopLeftPoint(center, zoom);
122706
		return new Bounds(topLeftPoint, topLeftPoint.add(this.getSize()));
122707
	},
122708
 
122709
	// TODO: Check semantics - isn't the pixel origin the 0,0 coord relative to
122710
	// the map pane? "left point of the map layer" can be confusing, specially
122711
	// since there can be negative offsets.
122712
	// @method getPixelOrigin(): Point
122713
	// Returns the projected pixel coordinates of the top left point of
122714
	// the map layer (useful in custom layer and overlay implementations).
122715
	getPixelOrigin: function () {
122716
		this._checkIfLoaded();
122717
		return this._pixelOrigin;
122718
	},
122719
 
122720
	// @method getPixelWorldBounds(zoom?: Number): Bounds
122721
	// Returns the world's bounds in pixel coordinates for zoom level `zoom`.
122722
	// If `zoom` is omitted, the map's current zoom level is used.
122723
	getPixelWorldBounds: function (zoom) {
122724
		return this.options.crs.getProjectedBounds(zoom === undefined ? this.getZoom() : zoom);
122725
	},
122726
 
122727
	// @section Other Methods
122728
 
122729
	// @method getPane(pane: String|HTMLElement): HTMLElement
122730
	// Returns a [map pane](#map-pane), given its name or its HTML element (its identity).
122731
	getPane: function (pane) {
122732
		return typeof pane === 'string' ? this._panes[pane] : pane;
122733
	},
122734
 
122735
	// @method getPanes(): Object
122736
	// Returns a plain object containing the names of all [panes](#map-pane) as keys and
122737
	// the panes as values.
122738
	getPanes: function () {
122739
		return this._panes;
122740
	},
122741
 
122742
	// @method getContainer: HTMLElement
122743
	// Returns the HTML element that contains the map.
122744
	getContainer: function () {
122745
		return this._container;
122746
	},
122747
 
122748
 
122749
	// @section Conversion Methods
122750
 
122751
	// @method getZoomScale(toZoom: Number, fromZoom: Number): Number
122752
	// Returns the scale factor to be applied to a map transition from zoom level
122753
	// `fromZoom` to `toZoom`. Used internally to help with zoom animations.
122754
	getZoomScale: function (toZoom, fromZoom) {
122755
		// TODO replace with universal implementation after refactoring projections
122756
		var crs = this.options.crs;
122757
		fromZoom = fromZoom === undefined ? this._zoom : fromZoom;
122758
		return crs.scale(toZoom) / crs.scale(fromZoom);
122759
	},
122760
 
122761
	// @method getScaleZoom(scale: Number, fromZoom: Number): Number
122762
	// Returns the zoom level that the map would end up at, if it is at `fromZoom`
122763
	// level and everything is scaled by a factor of `scale`. Inverse of
122764
	// [`getZoomScale`](#map-getZoomScale).
122765
	getScaleZoom: function (scale, fromZoom) {
122766
		var crs = this.options.crs;
122767
		fromZoom = fromZoom === undefined ? this._zoom : fromZoom;
122768
		var zoom = crs.zoom(scale * crs.scale(fromZoom));
122769
		return isNaN(zoom) ? Infinity : zoom;
122770
	},
122771
 
122772
	// @method project(latlng: LatLng, zoom: Number): Point
122773
	// Projects a geographical coordinate `LatLng` according to the projection
122774
	// of the map's CRS, then scales it according to `zoom` and the CRS's
122775
	// `Transformation`. The result is pixel coordinate relative to
122776
	// the CRS origin.
122777
	project: function (latlng, zoom) {
122778
		zoom = zoom === undefined ? this._zoom : zoom;
122779
		return this.options.crs.latLngToPoint(toLatLng(latlng), zoom);
122780
	},
122781
 
122782
	// @method unproject(point: Point, zoom: Number): LatLng
122783
	// Inverse of [`project`](#map-project).
122784
	unproject: function (point, zoom) {
122785
		zoom = zoom === undefined ? this._zoom : zoom;
122786
		return this.options.crs.pointToLatLng(toPoint(point), zoom);
122787
	},
122788
 
122789
	// @method layerPointToLatLng(point: Point): LatLng
122790
	// Given a pixel coordinate relative to the [origin pixel](#map-getpixelorigin),
122791
	// returns the corresponding geographical coordinate (for the current zoom level).
122792
	layerPointToLatLng: function (point) {
122793
		var projectedPoint = toPoint(point).add(this.getPixelOrigin());
122794
		return this.unproject(projectedPoint);
122795
	},
122796
 
122797
	// @method latLngToLayerPoint(latlng: LatLng): Point
122798
	// Given a geographical coordinate, returns the corresponding pixel coordinate
122799
	// relative to the [origin pixel](#map-getpixelorigin).
122800
	latLngToLayerPoint: function (latlng) {
122801
		var projectedPoint = this.project(toLatLng(latlng))._round();
122802
		return projectedPoint._subtract(this.getPixelOrigin());
122803
	},
122804
 
122805
	// @method wrapLatLng(latlng: LatLng): LatLng
122806
	// Returns a `LatLng` where `lat` and `lng` has been wrapped according to the
122807
	// map's CRS's `wrapLat` and `wrapLng` properties, if they are outside the
122808
	// CRS's bounds.
122809
	// By default this means longitude is wrapped around the dateline so its
122810
	// value is between -180 and +180 degrees.
122811
	wrapLatLng: function (latlng) {
122812
		return this.options.crs.wrapLatLng(toLatLng(latlng));
122813
	},
122814
 
122815
	// @method wrapLatLngBounds(bounds: LatLngBounds): LatLngBounds
122816
	// Returns a `LatLngBounds` with the same size as the given one, ensuring that
122817
	// its center is within the CRS's bounds.
122818
	// By default this means the center longitude is wrapped around the dateline so its
122819
	// value is between -180 and +180 degrees, and the majority of the bounds
122820
	// overlaps the CRS's bounds.
122821
	wrapLatLngBounds: function (latlng) {
122822
		return this.options.crs.wrapLatLngBounds(toLatLngBounds(latlng));
122823
	},
122824
 
122825
	// @method distance(latlng1: LatLng, latlng2: LatLng): Number
122826
	// Returns the distance between two geographical coordinates according to
122827
	// the map's CRS. By default this measures distance in meters.
122828
	distance: function (latlng1, latlng2) {
122829
		return this.options.crs.distance(toLatLng(latlng1), toLatLng(latlng2));
122830
	},
122831
 
122832
	// @method containerPointToLayerPoint(point: Point): Point
122833
	// Given a pixel coordinate relative to the map container, returns the corresponding
122834
	// pixel coordinate relative to the [origin pixel](#map-getpixelorigin).
122835
	containerPointToLayerPoint: function (point) { // (Point)
122836
		return toPoint(point).subtract(this._getMapPanePos());
122837
	},
122838
 
122839
	// @method layerPointToContainerPoint(point: Point): Point
122840
	// Given a pixel coordinate relative to the [origin pixel](#map-getpixelorigin),
122841
	// returns the corresponding pixel coordinate relative to the map container.
122842
	layerPointToContainerPoint: function (point) { // (Point)
122843
		return toPoint(point).add(this._getMapPanePos());
122844
	},
122845
 
122846
	// @method containerPointToLatLng(point: Point): LatLng
122847
	// Given a pixel coordinate relative to the map container, returns
122848
	// the corresponding geographical coordinate (for the current zoom level).
122849
	containerPointToLatLng: function (point) {
122850
		var layerPoint = this.containerPointToLayerPoint(toPoint(point));
122851
		return this.layerPointToLatLng(layerPoint);
122852
	},
122853
 
122854
	// @method latLngToContainerPoint(latlng: LatLng): Point
122855
	// Given a geographical coordinate, returns the corresponding pixel coordinate
122856
	// relative to the map container.
122857
	latLngToContainerPoint: function (latlng) {
122858
		return this.layerPointToContainerPoint(this.latLngToLayerPoint(toLatLng(latlng)));
122859
	},
122860
 
122861
	// @method mouseEventToContainerPoint(ev: MouseEvent): Point
122862
	// Given a MouseEvent object, returns the pixel coordinate relative to the
122863
	// map container where the event took place.
122864
	mouseEventToContainerPoint: function (e) {
122865
		return getMousePosition(e, this._container);
122866
	},
122867
 
122868
	// @method mouseEventToLayerPoint(ev: MouseEvent): Point
122869
	// Given a MouseEvent object, returns the pixel coordinate relative to
122870
	// the [origin pixel](#map-getpixelorigin) where the event took place.
122871
	mouseEventToLayerPoint: function (e) {
122872
		return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e));
122873
	},
122874
 
122875
	// @method mouseEventToLatLng(ev: MouseEvent): LatLng
122876
	// Given a MouseEvent object, returns geographical coordinate where the
122877
	// event took place.
122878
	mouseEventToLatLng: function (e) { // (MouseEvent)
122879
		return this.layerPointToLatLng(this.mouseEventToLayerPoint(e));
122880
	},
122881
 
122882
 
122883
	// map initialization methods
122884
 
122885
	_initContainer: function (id) {
122886
		var container = this._container = get(id);
122887
 
122888
		if (!container) {
122889
			throw new Error('Map container not found.');
122890
		} else if (container._leaflet_id) {
122891
			throw new Error('Map container is already initialized.');
122892
		}
122893
 
122894
		on(container, 'scroll', this._onScroll, this);
122895
		this._containerId = stamp(container);
122896
	},
122897
 
122898
	_initLayout: function () {
122899
		var container = this._container;
122900
 
122901
		this._fadeAnimated = this.options.fadeAnimation && any3d;
122902
 
122903
		addClass(container, 'leaflet-container' +
122904
			(touch ? ' leaflet-touch' : '') +
122905
			(retina ? ' leaflet-retina' : '') +
122906
			(ielt9 ? ' leaflet-oldie' : '') +
122907
			(safari ? ' leaflet-safari' : '') +
122908
			(this._fadeAnimated ? ' leaflet-fade-anim' : ''));
122909
 
122910
		var position = getStyle(container, 'position');
122911
 
122912
		if (position !== 'absolute' && position !== 'relative' && position !== 'fixed') {
122913
			container.style.position = 'relative';
122914
		}
122915
 
122916
		this._initPanes();
122917
 
122918
		if (this._initControlPos) {
122919
			this._initControlPos();
122920
		}
122921
	},
122922
 
122923
	_initPanes: function () {
122924
		var panes = this._panes = {};
122925
		this._paneRenderers = {};
122926
 
122927
		// @section
122928
		//
122929
		// Panes are DOM elements used to control the ordering of layers on the map. You
122930
		// can access panes with [`map.getPane`](#map-getpane) or
122931
		// [`map.getPanes`](#map-getpanes) methods. New panes can be created with the
122932
		// [`map.createPane`](#map-createpane) method.
122933
		//
122934
		// Every map has the following default panes that differ only in zIndex.
122935
		//
122936
		// @pane mapPane: HTMLElement = 'auto'
122937
		// Pane that contains all other map panes
122938
 
122939
		this._mapPane = this.createPane('mapPane', this._container);
122940
		setPosition(this._mapPane, new Point(0, 0));
122941
 
122942
		// @pane tilePane: HTMLElement = 200
122943
		// Pane for `GridLayer`s and `TileLayer`s
122944
		this.createPane('tilePane');
122945
		// @pane overlayPane: HTMLElement = 400
122946
		// Pane for vectors (`Path`s, like `Polyline`s and `Polygon`s), `ImageOverlay`s and `VideoOverlay`s
122947
		this.createPane('shadowPane');
122948
		// @pane shadowPane: HTMLElement = 500
122949
		// Pane for overlay shadows (e.g. `Marker` shadows)
122950
		this.createPane('overlayPane');
122951
		// @pane markerPane: HTMLElement = 600
122952
		// Pane for `Icon`s of `Marker`s
122953
		this.createPane('markerPane');
122954
		// @pane tooltipPane: HTMLElement = 650
122955
		// Pane for `Tooltip`s.
122956
		this.createPane('tooltipPane');
122957
		// @pane popupPane: HTMLElement = 700
122958
		// Pane for `Popup`s.
122959
		this.createPane('popupPane');
122960
 
122961
		if (!this.options.markerZoomAnimation) {
122962
			addClass(panes.markerPane, 'leaflet-zoom-hide');
122963
			addClass(panes.shadowPane, 'leaflet-zoom-hide');
122964
		}
122965
	},
122966
 
122967
 
122968
	// private methods that modify map state
122969
 
122970
	// @section Map state change events
122971
	_resetView: function (center, zoom) {
122972
		setPosition(this._mapPane, new Point(0, 0));
122973
 
122974
		var loading = !this._loaded;
122975
		this._loaded = true;
122976
		zoom = this._limitZoom(zoom);
122977
 
122978
		this.fire('viewprereset');
122979
 
122980
		var zoomChanged = this._zoom !== zoom;
122981
		this
122982
			._moveStart(zoomChanged, false)
122983
			._move(center, zoom)
122984
			._moveEnd(zoomChanged);
122985
 
122986
		// @event viewreset: Event
122987
		// Fired when the map needs to redraw its content (this usually happens
122988
		// on map zoom or load). Very useful for creating custom overlays.
122989
		this.fire('viewreset');
122990
 
122991
		// @event load: Event
122992
		// Fired when the map is initialized (when its center and zoom are set
122993
		// for the first time).
122994
		if (loading) {
122995
			this.fire('load');
122996
		}
122997
	},
122998
 
122999
	_moveStart: function (zoomChanged, noMoveStart) {
123000
		// @event zoomstart: Event
123001
		// Fired when the map zoom is about to change (e.g. before zoom animation).
123002
		// @event movestart: Event
123003
		// Fired when the view of the map starts changing (e.g. user starts dragging the map).
123004
		if (zoomChanged) {
123005
			this.fire('zoomstart');
123006
		}
123007
		if (!noMoveStart) {
123008
			this.fire('movestart');
123009
		}
123010
		return this;
123011
	},
123012
 
123013
	_move: function (center, zoom, data) {
123014
		if (zoom === undefined) {
123015
			zoom = this._zoom;
123016
		}
123017
		var zoomChanged = this._zoom !== zoom;
123018
 
123019
		this._zoom = zoom;
123020
		this._lastCenter = center;
123021
		this._pixelOrigin = this._getNewPixelOrigin(center);
123022
 
123023
		// @event zoom: Event
123024
		// Fired repeatedly during any change in zoom level, including zoom
123025
		// and fly animations.
123026
		if (zoomChanged || (data && data.pinch)) {	// Always fire 'zoom' if pinching because #3530
123027
			this.fire('zoom', data);
123028
		}
123029
 
123030
		// @event move: Event
123031
		// Fired repeatedly during any movement of the map, including pan and
123032
		// fly animations.
123033
		return this.fire('move', data);
123034
	},
123035
 
123036
	_moveEnd: function (zoomChanged) {
123037
		// @event zoomend: Event
123038
		// Fired when the map has changed, after any animations.
123039
		if (zoomChanged) {
123040
			this.fire('zoomend');
123041
		}
123042
 
123043
		// @event moveend: Event
123044
		// Fired when the center of the map stops changing (e.g. user stopped
123045
		// dragging the map).
123046
		return this.fire('moveend');
123047
	},
123048
 
123049
	_stop: function () {
123050
		cancelAnimFrame(this._flyToFrame);
123051
		if (this._panAnim) {
123052
			this._panAnim.stop();
123053
		}
123054
		return this;
123055
	},
123056
 
123057
	_rawPanBy: function (offset) {
123058
		setPosition(this._mapPane, this._getMapPanePos().subtract(offset));
123059
	},
123060
 
123061
	_getZoomSpan: function () {
123062
		return this.getMaxZoom() - this.getMinZoom();
123063
	},
123064
 
123065
	_panInsideMaxBounds: function () {
123066
		if (!this._enforcingBounds) {
123067
			this.panInsideBounds(this.options.maxBounds);
123068
		}
123069
	},
123070
 
123071
	_checkIfLoaded: function () {
123072
		if (!this._loaded) {
123073
			throw new Error('Set map center and zoom first.');
123074
		}
123075
	},
123076
 
123077
	// DOM event handling
123078
 
123079
	// @section Interaction events
123080
	_initEvents: function (remove$$1) {
123081
		this._targets = {};
123082
		this._targets[stamp(this._container)] = this;
123083
 
123084
		var onOff = remove$$1 ? off : on;
123085
 
123086
		// @event click: MouseEvent
123087
		// Fired when the user clicks (or taps) the map.
123088
		// @event dblclick: MouseEvent
123089
		// Fired when the user double-clicks (or double-taps) the map.
123090
		// @event mousedown: MouseEvent
123091
		// Fired when the user pushes the mouse button on the map.
123092
		// @event mouseup: MouseEvent
123093
		// Fired when the user releases the mouse button on the map.
123094
		// @event mouseover: MouseEvent
123095
		// Fired when the mouse enters the map.
123096
		// @event mouseout: MouseEvent
123097
		// Fired when the mouse leaves the map.
123098
		// @event mousemove: MouseEvent
123099
		// Fired while the mouse moves over the map.
123100
		// @event contextmenu: MouseEvent
123101
		// Fired when the user pushes the right mouse button on the map, prevents
123102
		// default browser context menu from showing if there are listeners on
123103
		// this event. Also fired on mobile when the user holds a single touch
123104
		// for a second (also called long press).
123105
		// @event keypress: KeyboardEvent
123106
		// Fired when the user presses a key from the keyboard while the map is focused.
123107
		onOff(this._container, 'click dblclick mousedown mouseup ' +
123108
			'mouseover mouseout mousemove contextmenu keypress', this._handleDOMEvent, this);
123109
 
123110
		if (this.options.trackResize) {
123111
			onOff(window, 'resize', this._onResize, this);
123112
		}
123113
 
123114
		if (any3d && this.options.transform3DLimit) {
123115
			(remove$$1 ? this.off : this.on).call(this, 'moveend', this._onMoveEnd);
123116
		}
123117
	},
123118
 
123119
	_onResize: function () {
123120
		cancelAnimFrame(this._resizeRequest);
123121
		this._resizeRequest = requestAnimFrame(
123122
		        function () { this.invalidateSize({debounceMoveend: true}); }, this);
123123
	},
123124
 
123125
	_onScroll: function () {
123126
		this._container.scrollTop  = 0;
123127
		this._container.scrollLeft = 0;
123128
	},
123129
 
123130
	_onMoveEnd: function () {
123131
		var pos = this._getMapPanePos();
123132
		if (Math.max(Math.abs(pos.x), Math.abs(pos.y)) >= this.options.transform3DLimit) {
123133
			// https://bugzilla.mozilla.org/show_bug.cgi?id=1203873 but Webkit also have
123134
			// a pixel offset on very high values, see: http://jsfiddle.net/dg6r5hhb/
123135
			this._resetView(this.getCenter(), this.getZoom());
123136
		}
123137
	},
123138
 
123139
	_findEventTargets: function (e, type) {
123140
		var targets = [],
123141
		    target,
123142
		    isHover = type === 'mouseout' || type === 'mouseover',
123143
		    src = e.target || e.srcElement,
123144
		    dragging = false;
123145
 
123146
		while (src) {
123147
			target = this._targets[stamp(src)];
123148
			if (target && (type === 'click' || type === 'preclick') && !e._simulated && this._draggableMoved(target)) {
123149
				// Prevent firing click after you just dragged an object.
123150
				dragging = true;
123151
				break;
123152
			}
123153
			if (target && target.listens(type, true)) {
123154
				if (isHover && !isExternalTarget(src, e)) { break; }
123155
				targets.push(target);
123156
				if (isHover) { break; }
123157
			}
123158
			if (src === this._container) { break; }
123159
			src = src.parentNode;
123160
		}
123161
		if (!targets.length && !dragging && !isHover && isExternalTarget(src, e)) {
123162
			targets = [this];
123163
		}
123164
		return targets;
123165
	},
123166
 
123167
	_handleDOMEvent: function (e) {
123168
		if (!this._loaded || skipped(e)) { return; }
123169
 
123170
		var type = e.type;
123171
 
123172
		if (type === 'mousedown' || type === 'keypress') {
123173
			// prevents outline when clicking on keyboard-focusable element
123174
			preventOutline(e.target || e.srcElement);
123175
		}
123176
 
123177
		this._fireDOMEvent(e, type);
123178
	},
123179
 
123180
	_mouseEvents: ['click', 'dblclick', 'mouseover', 'mouseout', 'contextmenu'],
123181
 
123182
	_fireDOMEvent: function (e, type, targets) {
123183
 
123184
		if (e.type === 'click') {
123185
			// Fire a synthetic 'preclick' event which propagates up (mainly for closing popups).
123186
			// @event preclick: MouseEvent
123187
			// Fired before mouse click on the map (sometimes useful when you
123188
			// want something to happen on click before any existing click
123189
			// handlers start running).
123190
			var synth = extend({}, e);
123191
			synth.type = 'preclick';
123192
			this._fireDOMEvent(synth, synth.type, targets);
123193
		}
123194
 
123195
		if (e._stopped) { return; }
123196
 
123197
		// Find the layer the event is propagating from and its parents.
123198
		targets = (targets || []).concat(this._findEventTargets(e, type));
123199
 
123200
		if (!targets.length) { return; }
123201
 
123202
		var target = targets[0];
123203
		if (type === 'contextmenu' && target.listens(type, true)) {
123204
			preventDefault(e);
123205
		}
123206
 
123207
		var data = {
123208
			originalEvent: e
123209
		};
123210
 
123211
		if (e.type !== 'keypress') {
123212
			var isMarker = target.getLatLng && (!target._radius || target._radius <= 10);
123213
			data.containerPoint = isMarker ?
123214
				this.latLngToContainerPoint(target.getLatLng()) : this.mouseEventToContainerPoint(e);
123215
			data.layerPoint = this.containerPointToLayerPoint(data.containerPoint);
123216
			data.latlng = isMarker ? target.getLatLng() : this.layerPointToLatLng(data.layerPoint);
123217
		}
123218
 
123219
		for (var i = 0; i < targets.length; i++) {
123220
			targets[i].fire(type, data, true);
123221
			if (data.originalEvent._stopped ||
123222
				(targets[i].options.bubblingMouseEvents === false && indexOf(this._mouseEvents, type) !== -1)) { return; }
123223
		}
123224
	},
123225
 
123226
	_draggableMoved: function (obj) {
123227
		obj = obj.dragging && obj.dragging.enabled() ? obj : this;
123228
		return (obj.dragging && obj.dragging.moved()) || (this.boxZoom && this.boxZoom.moved());
123229
	},
123230
 
123231
	_clearHandlers: function () {
123232
		for (var i = 0, len = this._handlers.length; i < len; i++) {
123233
			this._handlers[i].disable();
123234
		}
123235
	},
123236
 
123237
	// @section Other Methods
123238
 
123239
	// @method whenReady(fn: Function, context?: Object): this
123240
	// Runs the given function `fn` when the map gets initialized with
123241
	// a view (center and zoom) and at least one layer, or immediately
123242
	// if it's already initialized, optionally passing a function context.
123243
	whenReady: function (callback, context) {
123244
		if (this._loaded) {
123245
			callback.call(context || this, {target: this});
123246
		} else {
123247
			this.on('load', callback, context);
123248
		}
123249
		return this;
123250
	},
123251
 
123252
 
123253
	// private methods for getting map state
123254
 
123255
	_getMapPanePos: function () {
123256
		return getPosition(this._mapPane) || new Point(0, 0);
123257
	},
123258
 
123259
	_moved: function () {
123260
		var pos = this._getMapPanePos();
123261
		return pos && !pos.equals([0, 0]);
123262
	},
123263
 
123264
	_getTopLeftPoint: function (center, zoom) {
123265
		var pixelOrigin = center && zoom !== undefined ?
123266
			this._getNewPixelOrigin(center, zoom) :
123267
			this.getPixelOrigin();
123268
		return pixelOrigin.subtract(this._getMapPanePos());
123269
	},
123270
 
123271
	_getNewPixelOrigin: function (center, zoom) {
123272
		var viewHalf = this.getSize()._divideBy(2);
123273
		return this.project(center, zoom)._subtract(viewHalf)._add(this._getMapPanePos())._round();
123274
	},
123275
 
123276
	_latLngToNewLayerPoint: function (latlng, zoom, center) {
123277
		var topLeft = this._getNewPixelOrigin(center, zoom);
123278
		return this.project(latlng, zoom)._subtract(topLeft);
123279
	},
123280
 
123281
	_latLngBoundsToNewLayerBounds: function (latLngBounds, zoom, center) {
123282
		var topLeft = this._getNewPixelOrigin(center, zoom);
123283
		return toBounds([
123284
			this.project(latLngBounds.getSouthWest(), zoom)._subtract(topLeft),
123285
			this.project(latLngBounds.getNorthWest(), zoom)._subtract(topLeft),
123286
			this.project(latLngBounds.getSouthEast(), zoom)._subtract(topLeft),
123287
			this.project(latLngBounds.getNorthEast(), zoom)._subtract(topLeft)
123288
		]);
123289
	},
123290
 
123291
	// layer point of the current center
123292
	_getCenterLayerPoint: function () {
123293
		return this.containerPointToLayerPoint(this.getSize()._divideBy(2));
123294
	},
123295
 
123296
	// offset of the specified place to the current center in pixels
123297
	_getCenterOffset: function (latlng) {
123298
		return this.latLngToLayerPoint(latlng).subtract(this._getCenterLayerPoint());
123299
	},
123300
 
123301
	// adjust center for view to get inside bounds
123302
	_limitCenter: function (center, zoom, bounds) {
123303
 
123304
		if (!bounds) { return center; }
123305
 
123306
		var centerPoint = this.project(center, zoom),
123307
		    viewHalf = this.getSize().divideBy(2),
123308
		    viewBounds = new Bounds(centerPoint.subtract(viewHalf), centerPoint.add(viewHalf)),
123309
		    offset = this._getBoundsOffset(viewBounds, bounds, zoom);
123310
 
123311
		// If offset is less than a pixel, ignore.
123312
		// This prevents unstable projections from getting into
123313
		// an infinite loop of tiny offsets.
123314
		if (offset.round().equals([0, 0])) {
123315
			return center;
123316
		}
123317
 
123318
		return this.unproject(centerPoint.add(offset), zoom);
123319
	},
123320
 
123321
	// adjust offset for view to get inside bounds
123322
	_limitOffset: function (offset, bounds) {
123323
		if (!bounds) { return offset; }
123324
 
123325
		var viewBounds = this.getPixelBounds(),
123326
		    newBounds = new Bounds(viewBounds.min.add(offset), viewBounds.max.add(offset));
123327
 
123328
		return offset.add(this._getBoundsOffset(newBounds, bounds));
123329
	},
123330
 
123331
	// returns offset needed for pxBounds to get inside maxBounds at a specified zoom
123332
	_getBoundsOffset: function (pxBounds, maxBounds, zoom) {
123333
		var projectedMaxBounds = toBounds(
123334
		        this.project(maxBounds.getNorthEast(), zoom),
123335
		        this.project(maxBounds.getSouthWest(), zoom)
123336
		    ),
123337
		    minOffset = projectedMaxBounds.min.subtract(pxBounds.min),
123338
		    maxOffset = projectedMaxBounds.max.subtract(pxBounds.max),
123339
 
123340
		    dx = this._rebound(minOffset.x, -maxOffset.x),
123341
		    dy = this._rebound(minOffset.y, -maxOffset.y);
123342
 
123343
		return new Point(dx, dy);
123344
	},
123345
 
123346
	_rebound: function (left, right) {
123347
		return left + right > 0 ?
123348
			Math.round(left - right) / 2 :
123349
			Math.max(0, Math.ceil(left)) - Math.max(0, Math.floor(right));
123350
	},
123351
 
123352
	_limitZoom: function (zoom) {
123353
		var min = this.getMinZoom(),
123354
		    max = this.getMaxZoom(),
123355
		    snap = any3d ? this.options.zoomSnap : 1;
123356
		if (snap) {
123357
			zoom = Math.round(zoom / snap) * snap;
123358
		}
123359
		return Math.max(min, Math.min(max, zoom));
123360
	},
123361
 
123362
	_onPanTransitionStep: function () {
123363
		this.fire('move');
123364
	},
123365
 
123366
	_onPanTransitionEnd: function () {
123367
		removeClass(this._mapPane, 'leaflet-pan-anim');
123368
		this.fire('moveend');
123369
	},
123370
 
123371
	_tryAnimatedPan: function (center, options) {
123372
		// difference between the new and current centers in pixels
123373
		var offset = this._getCenterOffset(center)._trunc();
123374
 
123375
		// don't animate too far unless animate: true specified in options
123376
		if ((options && options.animate) !== true && !this.getSize().contains(offset)) { return false; }
123377
 
123378
		this.panBy(offset, options);
123379
 
123380
		return true;
123381
	},
123382
 
123383
	_createAnimProxy: function () {
123384
 
123385
		var proxy = this._proxy = create$1('div', 'leaflet-proxy leaflet-zoom-animated');
123386
		this._panes.mapPane.appendChild(proxy);
123387
 
123388
		this.on('zoomanim', function (e) {
123389
			var prop = TRANSFORM,
123390
			    transform = this._proxy.style[prop];
123391
 
123392
			setTransform(this._proxy, this.project(e.center, e.zoom), this.getZoomScale(e.zoom, 1));
123393
 
123394
			// workaround for case when transform is the same and so transitionend event is not fired
123395
			if (transform === this._proxy.style[prop] && this._animatingZoom) {
123396
				this._onZoomTransitionEnd();
123397
			}
123398
		}, this);
123399
 
123400
		this.on('load moveend', function () {
123401
			var c = this.getCenter(),
123402
			    z = this.getZoom();
123403
			setTransform(this._proxy, this.project(c, z), this.getZoomScale(z, 1));
123404
		}, this);
123405
 
123406
		this._on('unload', this._destroyAnimProxy, this);
123407
	},
123408
 
123409
	_destroyAnimProxy: function () {
123410
		remove(this._proxy);
123411
		delete this._proxy;
123412
	},
123413
 
123414
	_catchTransitionEnd: function (e) {
123415
		if (this._animatingZoom && e.propertyName.indexOf('transform') >= 0) {
123416
			this._onZoomTransitionEnd();
123417
		}
123418
	},
123419
 
123420
	_nothingToAnimate: function () {
123421
		return !this._container.getElementsByClassName('leaflet-zoom-animated').length;
123422
	},
123423
 
123424
	_tryAnimatedZoom: function (center, zoom, options) {
123425
 
123426
		if (this._animatingZoom) { return true; }
123427
 
123428
		options = options || {};
123429
 
123430
		// don't animate if disabled, not supported or zoom difference is too large
123431
		if (!this._zoomAnimated || options.animate === false || this._nothingToAnimate() ||
123432
		        Math.abs(zoom - this._zoom) > this.options.zoomAnimationThreshold) { return false; }
123433
 
123434
		// offset is the pixel coords of the zoom origin relative to the current center
123435
		var scale = this.getZoomScale(zoom),
123436
		    offset = this._getCenterOffset(center)._divideBy(1 - 1 / scale);
123437
 
123438
		// don't animate if the zoom origin isn't within one screen from the current center, unless forced
123439
		if (options.animate !== true && !this.getSize().contains(offset)) { return false; }
123440
 
123441
		requestAnimFrame(function () {
123442
			this
123443
			    ._moveStart(true, false)
123444
			    ._animateZoom(center, zoom, true);
123445
		}, this);
123446
 
123447
		return true;
123448
	},
123449
 
123450
	_animateZoom: function (center, zoom, startAnim, noUpdate) {
123451
		if (!this._mapPane) { return; }
123452
 
123453
		if (startAnim) {
123454
			this._animatingZoom = true;
123455
 
123456
			// remember what center/zoom to set after animation
123457
			this._animateToCenter = center;
123458
			this._animateToZoom = zoom;
123459
 
123460
			addClass(this._mapPane, 'leaflet-zoom-anim');
123461
		}
123462
 
123463
		// @event zoomanim: ZoomAnimEvent
123464
		// Fired on every frame of a zoom animation
123465
		this.fire('zoomanim', {
123466
			center: center,
123467
			zoom: zoom,
123468
			noUpdate: noUpdate
123469
		});
123470
 
123471
		// Work around webkit not firing 'transitionend', see https://github.com/Leaflet/Leaflet/issues/3689, 2693
123472
		setTimeout(bind(this._onZoomTransitionEnd, this), 250);
123473
	},
123474
 
123475
	_onZoomTransitionEnd: function () {
123476
		if (!this._animatingZoom) { return; }
123477
 
123478
		if (this._mapPane) {
123479
			removeClass(this._mapPane, 'leaflet-zoom-anim');
123480
		}
123481
 
123482
		this._animatingZoom = false;
123483
 
123484
		this._move(this._animateToCenter, this._animateToZoom);
123485
 
123486
		// This anim frame should prevent an obscure iOS webkit tile loading race condition.
123487
		requestAnimFrame(function () {
123488
			this._moveEnd(true);
123489
		}, this);
123490
	}
123491
});
123492
 
123493
// @section
123494
 
123495
// @factory L.map(id: String, options?: Map options)
123496
// Instantiates a map object given the DOM ID of a `<div>` element
123497
// and optionally an object literal with `Map options`.
123498
//
123499
// @alternative
123500
// @factory L.map(el: HTMLElement, options?: Map options)
123501
// Instantiates a map object given an instance of a `<div>` HTML element
123502
// and optionally an object literal with `Map options`.
123503
function createMap(id, options) {
123504
	return new Map(id, options);
123505
}
123506
 
123507
/*
123508
 * @class Control
123509
 * @aka L.Control
123510
 * @inherits Class
123511
 *
123512
 * L.Control is a base class for implementing map controls. Handles positioning.
123513
 * All other controls extend from this class.
123514
 */
123515
 
123516
var Control = Class.extend({
123517
	// @section
123518
	// @aka Control options
123519
	options: {
123520
		// @option position: String = 'topright'
123521
		// The position of the control (one of the map corners). Possible values are `'topleft'`,
123522
		// `'topright'`, `'bottomleft'` or `'bottomright'`
123523
		position: 'topright'
123524
	},
123525
 
123526
	initialize: function (options) {
123527
		setOptions(this, options);
123528
	},
123529
 
123530
	/* @section
123531
	 * Classes extending L.Control will inherit the following methods:
123532
	 *
123533
	 * @method getPosition: string
123534
	 * Returns the position of the control.
123535
	 */
123536
	getPosition: function () {
123537
		return this.options.position;
123538
	},
123539
 
123540
	// @method setPosition(position: string): this
123541
	// Sets the position of the control.
123542
	setPosition: function (position) {
123543
		var map = this._map;
123544
 
123545
		if (map) {
123546
			map.removeControl(this);
123547
		}
123548
 
123549
		this.options.position = position;
123550
 
123551
		if (map) {
123552
			map.addControl(this);
123553
		}
123554
 
123555
		return this;
123556
	},
123557
 
123558
	// @method getContainer: HTMLElement
123559
	// Returns the HTMLElement that contains the control.
123560
	getContainer: function () {
123561
		return this._container;
123562
	},
123563
 
123564
	// @method addTo(map: Map): this
123565
	// Adds the control to the given map.
123566
	addTo: function (map) {
123567
		this.remove();
123568
		this._map = map;
123569
 
123570
		var container = this._container = this.onAdd(map),
123571
		    pos = this.getPosition(),
123572
		    corner = map._controlCorners[pos];
123573
 
123574
		addClass(container, 'leaflet-control');
123575
 
123576
		if (pos.indexOf('bottom') !== -1) {
123577
			corner.insertBefore(container, corner.firstChild);
123578
		} else {
123579
			corner.appendChild(container);
123580
		}
123581
 
123582
		return this;
123583
	},
123584
 
123585
	// @method remove: this
123586
	// Removes the control from the map it is currently active on.
123587
	remove: function () {
123588
		if (!this._map) {
123589
			return this;
123590
		}
123591
 
123592
		remove(this._container);
123593
 
123594
		if (this.onRemove) {
123595
			this.onRemove(this._map);
123596
		}
123597
 
123598
		this._map = null;
123599
 
123600
		return this;
123601
	},
123602
 
123603
	_refocusOnMap: function (e) {
123604
		// if map exists and event is not a keyboard event
123605
		if (this._map && e && e.screenX > 0 && e.screenY > 0) {
123606
			this._map.getContainer().focus();
123607
		}
123608
	}
123609
});
123610
 
123611
var control = function (options) {
123612
	return new Control(options);
123613
};
123614
 
123615
/* @section Extension methods
123616
 * @uninheritable
123617
 *
123618
 * Every control should extend from `L.Control` and (re-)implement the following methods.
123619
 *
123620
 * @method onAdd(map: Map): HTMLElement
123621
 * Should return the container DOM element for the control and add listeners on relevant map events. Called on [`control.addTo(map)`](#control-addTo).
123622
 *
123623
 * @method onRemove(map: Map)
123624
 * Optional method. Should contain all clean up code that removes the listeners previously added in [`onAdd`](#control-onadd). Called on [`control.remove()`](#control-remove).
123625
 */
123626
 
123627
/* @namespace Map
123628
 * @section Methods for Layers and Controls
123629
 */
123630
Map.include({
123631
	// @method addControl(control: Control): this
123632
	// Adds the given control to the map
123633
	addControl: function (control) {
123634
		control.addTo(this);
123635
		return this;
123636
	},
123637
 
123638
	// @method removeControl(control: Control): this
123639
	// Removes the given control from the map
123640
	removeControl: function (control) {
123641
		control.remove();
123642
		return this;
123643
	},
123644
 
123645
	_initControlPos: function () {
123646
		var corners = this._controlCorners = {},
123647
		    l = 'leaflet-',
123648
		    container = this._controlContainer =
123649
		            create$1('div', l + 'control-container', this._container);
123650
 
123651
		function createCorner(vSide, hSide) {
123652
			var className = l + vSide + ' ' + l + hSide;
123653
 
123654
			corners[vSide + hSide] = create$1('div', className, container);
123655
		}
123656
 
123657
		createCorner('top', 'left');
123658
		createCorner('top', 'right');
123659
		createCorner('bottom', 'left');
123660
		createCorner('bottom', 'right');
123661
	},
123662
 
123663
	_clearControlPos: function () {
123664
		for (var i in this._controlCorners) {
123665
			remove(this._controlCorners[i]);
123666
		}
123667
		remove(this._controlContainer);
123668
		delete this._controlCorners;
123669
		delete this._controlContainer;
123670
	}
123671
});
123672
 
123673
/*
123674
 * @class Control.Layers
123675
 * @aka L.Control.Layers
123676
 * @inherits Control
123677
 *
123678
 * The layers control gives users the ability to switch between different base layers and switch overlays on/off (check out the [detailed example](http://leafletjs.com/examples/layers-control/)). Extends `Control`.
123679
 *
123680
 * @example
123681
 *
123682
 * ```js
123683
 * var baseLayers = {
123684
 * 	"Mapbox": mapbox,
123685
 * 	"OpenStreetMap": osm
123686
 * };
123687
 *
123688
 * var overlays = {
123689
 * 	"Marker": marker,
123690
 * 	"Roads": roadsLayer
123691
 * };
123692
 *
123693
 * L.control.layers(baseLayers, overlays).addTo(map);
123694
 * ```
123695
 *
123696
 * The `baseLayers` and `overlays` parameters are object literals with layer names as keys and `Layer` objects as values:
123697
 *
123698
 * ```js
123699
 * {
123700
 *     "<someName1>": layer1,
123701
 *     "<someName2>": layer2
123702
 * }
123703
 * ```
123704
 *
123705
 * The layer names can contain HTML, which allows you to add additional styling to the items:
123706
 *
123707
 * ```js
123708
 * {"<img src='my-layer-icon' /> <span class='my-layer-item'>My Layer</span>": myLayer}
123709
 * ```
123710
 */
123711
 
123712
var Layers = Control.extend({
123713
	// @section
123714
	// @aka Control.Layers options
123715
	options: {
123716
		// @option collapsed: Boolean = true
123717
		// If `true`, the control will be collapsed into an icon and expanded on mouse hover or touch.
123718
		collapsed: true,
123719
		position: 'topright',
123720
 
123721
		// @option autoZIndex: Boolean = true
123722
		// If `true`, the control will assign zIndexes in increasing order to all of its layers so that the order is preserved when switching them on/off.
123723
		autoZIndex: true,
123724
 
123725
		// @option hideSingleBase: Boolean = false
123726
		// If `true`, the base layers in the control will be hidden when there is only one.
123727
		hideSingleBase: false,
123728
 
123729
		// @option sortLayers: Boolean = false
123730
		// Whether to sort the layers. When `false`, layers will keep the order
123731
		// in which they were added to the control.
123732
		sortLayers: false,
123733
 
123734
		// @option sortFunction: Function = *
123735
		// A [compare function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)
123736
		// that will be used for sorting the layers, when `sortLayers` is `true`.
123737
		// The function receives both the `L.Layer` instances and their names, as in
123738
		// `sortFunction(layerA, layerB, nameA, nameB)`.
123739
		// By default, it sorts layers alphabetically by their name.
123740
		sortFunction: function (layerA, layerB, nameA, nameB) {
123741
			return nameA < nameB ? -1 : (nameB < nameA ? 1 : 0);
123742
		}
123743
	},
123744
 
123745
	initialize: function (baseLayers, overlays, options) {
123746
		setOptions(this, options);
123747
 
123748
		this._layerControlInputs = [];
123749
		this._layers = [];
123750
		this._lastZIndex = 0;
123751
		this._handlingClick = false;
123752
 
123753
		for (var i in baseLayers) {
123754
			this._addLayer(baseLayers[i], i);
123755
		}
123756
 
123757
		for (i in overlays) {
123758
			this._addLayer(overlays[i], i, true);
123759
		}
123760
	},
123761
 
123762
	onAdd: function (map) {
123763
		this._initLayout();
123764
		this._update();
123765
 
123766
		this._map = map;
123767
		map.on('zoomend', this._checkDisabledLayers, this);
123768
 
123769
		for (var i = 0; i < this._layers.length; i++) {
123770
			this._layers[i].layer.on('add remove', this._onLayerChange, this);
123771
		}
123772
 
123773
		return this._container;
123774
	},
123775
 
123776
	addTo: function (map) {
123777
		Control.prototype.addTo.call(this, map);
123778
		// Trigger expand after Layers Control has been inserted into DOM so that is now has an actual height.
123779
		return this._expandIfNotCollapsed();
123780
	},
123781
 
123782
	onRemove: function () {
123783
		this._map.off('zoomend', this._checkDisabledLayers, this);
123784
 
123785
		for (var i = 0; i < this._layers.length; i++) {
123786
			this._layers[i].layer.off('add remove', this._onLayerChange, this);
123787
		}
123788
	},
123789
 
123790
	// @method addBaseLayer(layer: Layer, name: String): this
123791
	// Adds a base layer (radio button entry) with the given name to the control.
123792
	addBaseLayer: function (layer, name) {
123793
		this._addLayer(layer, name);
123794
		return (this._map) ? this._update() : this;
123795
	},
123796
 
123797
	// @method addOverlay(layer: Layer, name: String): this
123798
	// Adds an overlay (checkbox entry) with the given name to the control.
123799
	addOverlay: function (layer, name) {
123800
		this._addLayer(layer, name, true);
123801
		return (this._map) ? this._update() : this;
123802
	},
123803
 
123804
	// @method removeLayer(layer: Layer): this
123805
	// Remove the given layer from the control.
123806
	removeLayer: function (layer) {
123807
		layer.off('add remove', this._onLayerChange, this);
123808
 
123809
		var obj = this._getLayer(stamp(layer));
123810
		if (obj) {
123811
			this._layers.splice(this._layers.indexOf(obj), 1);
123812
		}
123813
		return (this._map) ? this._update() : this;
123814
	},
123815
 
123816
	// @method expand(): this
123817
	// Expand the control container if collapsed.
123818
	expand: function () {
123819
		addClass(this._container, 'leaflet-control-layers-expanded');
123820
		this._form.style.height = null;
123821
		var acceptableHeight = this._map.getSize().y - (this._container.offsetTop + 50);
123822
		if (acceptableHeight < this._form.clientHeight) {
123823
			addClass(this._form, 'leaflet-control-layers-scrollbar');
123824
			this._form.style.height = acceptableHeight + 'px';
123825
		} else {
123826
			removeClass(this._form, 'leaflet-control-layers-scrollbar');
123827
		}
123828
		this._checkDisabledLayers();
123829
		return this;
123830
	},
123831
 
123832
	// @method collapse(): this
123833
	// Collapse the control container if expanded.
123834
	collapse: function () {
123835
		removeClass(this._container, 'leaflet-control-layers-expanded');
123836
		return this;
123837
	},
123838
 
123839
	_initLayout: function () {
123840
		var className = 'leaflet-control-layers',
123841
		    container = this._container = create$1('div', className),
123842
		    collapsed = this.options.collapsed;
123843
 
123844
		// makes this work on IE touch devices by stopping it from firing a mouseout event when the touch is released
123845
		container.setAttribute('aria-haspopup', true);
123846
 
123847
		disableClickPropagation(container);
123848
		disableScrollPropagation(container);
123849
 
123850
		var form = this._form = create$1('form', className + '-list');
123851
 
123852
		if (collapsed) {
123853
			this._map.on('click', this.collapse, this);
123854
 
123855
			if (!android) {
123856
				on(container, {
123857
					mouseenter: this.expand,
123858
					mouseleave: this.collapse
123859
				}, this);
123860
			}
123861
		}
123862
 
123863
		var link = this._layersLink = create$1('a', className + '-toggle', container);
123864
		link.href = '#';
123865
		link.title = 'Layers';
123866
 
123867
		if (touch) {
123868
			on(link, 'click', stop);
123869
			on(link, 'click', this.expand, this);
123870
		} else {
123871
			on(link, 'focus', this.expand, this);
123872
		}
123873
 
123874
		if (!collapsed) {
123875
			this.expand();
123876
		}
123877
 
123878
		this._baseLayersList = create$1('div', className + '-base', form);
123879
		this._separator = create$1('div', className + '-separator', form);
123880
		this._overlaysList = create$1('div', className + '-overlays', form);
123881
 
123882
		container.appendChild(form);
123883
	},
123884
 
123885
	_getLayer: function (id) {
123886
		for (var i = 0; i < this._layers.length; i++) {
123887
 
123888
			if (this._layers[i] && stamp(this._layers[i].layer) === id) {
123889
				return this._layers[i];
123890
			}
123891
		}
123892
	},
123893
 
123894
	_addLayer: function (layer, name, overlay) {
123895
		if (this._map) {
123896
			layer.on('add remove', this._onLayerChange, this);
123897
		}
123898
 
123899
		this._layers.push({
123900
			layer: layer,
123901
			name: name,
123902
			overlay: overlay
123903
		});
123904
 
123905
		if (this.options.sortLayers) {
123906
			this._layers.sort(bind(function (a, b) {
123907
				return this.options.sortFunction(a.layer, b.layer, a.name, b.name);
123908
			}, this));
123909
		}
123910
 
123911
		if (this.options.autoZIndex && layer.setZIndex) {
123912
			this._lastZIndex++;
123913
			layer.setZIndex(this._lastZIndex);
123914
		}
123915
 
123916
		this._expandIfNotCollapsed();
123917
	},
123918
 
123919
	_update: function () {
123920
		if (!this._container) { return this; }
123921
 
123922
		empty(this._baseLayersList);
123923
		empty(this._overlaysList);
123924
 
123925
		this._layerControlInputs = [];
123926
		var baseLayersPresent, overlaysPresent, i, obj, baseLayersCount = 0;
123927
 
123928
		for (i = 0; i < this._layers.length; i++) {
123929
			obj = this._layers[i];
123930
			this._addItem(obj);
123931
			overlaysPresent = overlaysPresent || obj.overlay;
123932
			baseLayersPresent = baseLayersPresent || !obj.overlay;
123933
			baseLayersCount += !obj.overlay ? 1 : 0;
123934
		}
123935
 
123936
		// Hide base layers section if there's only one layer.
123937
		if (this.options.hideSingleBase) {
123938
			baseLayersPresent = baseLayersPresent && baseLayersCount > 1;
123939
			this._baseLayersList.style.display = baseLayersPresent ? '' : 'none';
123940
		}
123941
 
123942
		this._separator.style.display = overlaysPresent && baseLayersPresent ? '' : 'none';
123943
 
123944
		return this;
123945
	},
123946
 
123947
	_onLayerChange: function (e) {
123948
		if (!this._handlingClick) {
123949
			this._update();
123950
		}
123951
 
123952
		var obj = this._getLayer(stamp(e.target));
123953
 
123954
		// @namespace Map
123955
		// @section Layer events
123956
		// @event baselayerchange: LayersControlEvent
123957
		// Fired when the base layer is changed through the [layer control](#control-layers).
123958
		// @event overlayadd: LayersControlEvent
123959
		// Fired when an overlay is selected through the [layer control](#control-layers).
123960
		// @event overlayremove: LayersControlEvent
123961
		// Fired when an overlay is deselected through the [layer control](#control-layers).
123962
		// @namespace Control.Layers
123963
		var type = obj.overlay ?
123964
			(e.type === 'add' ? 'overlayadd' : 'overlayremove') :
123965
			(e.type === 'add' ? 'baselayerchange' : null);
123966
 
123967
		if (type) {
123968
			this._map.fire(type, obj);
123969
		}
123970
	},
123971
 
123972
	// IE7 bugs out if you create a radio dynamically, so you have to do it this hacky way (see http://bit.ly/PqYLBe)
123973
	_createRadioElement: function (name, checked) {
123974
 
123975
		var radioHtml = '<input type="radio" class="leaflet-control-layers-selector" name="' +
123976
				name + '"' + (checked ? ' checked="checked"' : '') + '/>';
123977
 
123978
		var radioFragment = document.createElement('div');
123979
		radioFragment.innerHTML = radioHtml;
123980
 
123981
		return radioFragment.firstChild;
123982
	},
123983
 
123984
	_addItem: function (obj) {
123985
		var label = document.createElement('label'),
123986
		    checked = this._map.hasLayer(obj.layer),
123987
		    input;
123988
 
123989
		if (obj.overlay) {
123990
			input = document.createElement('input');
123991
			input.type = 'checkbox';
123992
			input.className = 'leaflet-control-layers-selector';
123993
			input.defaultChecked = checked;
123994
		} else {
123995
			input = this._createRadioElement('leaflet-base-layers', checked);
123996
		}
123997
 
123998
		this._layerControlInputs.push(input);
123999
		input.layerId = stamp(obj.layer);
124000
 
124001
		on(input, 'click', this._onInputClick, this);
124002
 
124003
		var name = document.createElement('span');
124004
		name.innerHTML = ' ' + obj.name;
124005
 
124006
		// Helps from preventing layer control flicker when checkboxes are disabled
124007
		// https://github.com/Leaflet/Leaflet/issues/2771
124008
		var holder = document.createElement('div');
124009
 
124010
		label.appendChild(holder);
124011
		holder.appendChild(input);
124012
		holder.appendChild(name);
124013
 
124014
		var container = obj.overlay ? this._overlaysList : this._baseLayersList;
124015
		container.appendChild(label);
124016
 
124017
		this._checkDisabledLayers();
124018
		return label;
124019
	},
124020
 
124021
	_onInputClick: function () {
124022
		var inputs = this._layerControlInputs,
124023
		    input, layer;
124024
		var addedLayers = [],
124025
		    removedLayers = [];
124026
 
124027
		this._handlingClick = true;
124028
 
124029
		for (var i = inputs.length - 1; i >= 0; i--) {
124030
			input = inputs[i];
124031
			layer = this._getLayer(input.layerId).layer;
124032
 
124033
			if (input.checked) {
124034
				addedLayers.push(layer);
124035
			} else if (!input.checked) {
124036
				removedLayers.push(layer);
124037
			}
124038
		}
124039
 
124040
		// Bugfix issue 2318: Should remove all old layers before readding new ones
124041
		for (i = 0; i < removedLayers.length; i++) {
124042
			if (this._map.hasLayer(removedLayers[i])) {
124043
				this._map.removeLayer(removedLayers[i]);
124044
			}
124045
		}
124046
		for (i = 0; i < addedLayers.length; i++) {
124047
			if (!this._map.hasLayer(addedLayers[i])) {
124048
				this._map.addLayer(addedLayers[i]);
124049
			}
124050
		}
124051
 
124052
		this._handlingClick = false;
124053
 
124054
		this._refocusOnMap();
124055
	},
124056
 
124057
	_checkDisabledLayers: function () {
124058
		var inputs = this._layerControlInputs,
124059
		    input,
124060
		    layer,
124061
		    zoom = this._map.getZoom();
124062
 
124063
		for (var i = inputs.length - 1; i >= 0; i--) {
124064
			input = inputs[i];
124065
			layer = this._getLayer(input.layerId).layer;
124066
			input.disabled = (layer.options.minZoom !== undefined && zoom < layer.options.minZoom) ||
124067
			                 (layer.options.maxZoom !== undefined && zoom > layer.options.maxZoom);
124068
 
124069
		}
124070
	},
124071
 
124072
	_expandIfNotCollapsed: function () {
124073
		if (this._map && !this.options.collapsed) {
124074
			this.expand();
124075
		}
124076
		return this;
124077
	},
124078
 
124079
	_expand: function () {
124080
		// Backward compatibility, remove me in 1.1.
124081
		return this.expand();
124082
	},
124083
 
124084
	_collapse: function () {
124085
		// Backward compatibility, remove me in 1.1.
124086
		return this.collapse();
124087
	}
124088
 
124089
});
124090
 
124091
 
124092
// @factory L.control.layers(baselayers?: Object, overlays?: Object, options?: Control.Layers options)
124093
// Creates an attribution control with the given layers. Base layers will be switched with radio buttons, while overlays will be switched with checkboxes. Note that all base layers should be passed in the base layers object, but only one should be added to the map during map instantiation.
124094
var layers = function (baseLayers, overlays, options) {
124095
	return new Layers(baseLayers, overlays, options);
124096
};
124097
 
124098
/*
124099
 * @class Control.Zoom
124100
 * @aka L.Control.Zoom
124101
 * @inherits Control
124102
 *
124103
 * A basic zoom control with two buttons (zoom in and zoom out). It is put on the map by default unless you set its [`zoomControl` option](#map-zoomcontrol) to `false`. Extends `Control`.
124104
 */
124105
 
124106
var Zoom = Control.extend({
124107
	// @section
124108
	// @aka Control.Zoom options
124109
	options: {
124110
		position: 'topleft',
124111
 
124112
		// @option zoomInText: String = '+'
124113
		// The text set on the 'zoom in' button.
124114
		zoomInText: '+',
124115
 
124116
		// @option zoomInTitle: String = 'Zoom in'
124117
		// The title set on the 'zoom in' button.
124118
		zoomInTitle: 'Zoom in',
124119
 
124120
		// @option zoomOutText: String = '&#x2212;'
124121
		// The text set on the 'zoom out' button.
124122
		zoomOutText: '&#x2212;',
124123
 
124124
		// @option zoomOutTitle: String = 'Zoom out'
124125
		// The title set on the 'zoom out' button.
124126
		zoomOutTitle: 'Zoom out'
124127
	},
124128
 
124129
	onAdd: function (map) {
124130
		var zoomName = 'leaflet-control-zoom',
124131
		    container = create$1('div', zoomName + ' leaflet-bar'),
124132
		    options = this.options;
124133
 
124134
		this._zoomInButton  = this._createButton(options.zoomInText, options.zoomInTitle,
124135
		        zoomName + '-in',  container, this._zoomIn);
124136
		this._zoomOutButton = this._createButton(options.zoomOutText, options.zoomOutTitle,
124137
		        zoomName + '-out', container, this._zoomOut);
124138
 
124139
		this._updateDisabled();
124140
		map.on('zoomend zoomlevelschange', this._updateDisabled, this);
124141
 
124142
		return container;
124143
	},
124144
 
124145
	onRemove: function (map) {
124146
		map.off('zoomend zoomlevelschange', this._updateDisabled, this);
124147
	},
124148
 
124149
	disable: function () {
124150
		this._disabled = true;
124151
		this._updateDisabled();
124152
		return this;
124153
	},
124154
 
124155
	enable: function () {
124156
		this._disabled = false;
124157
		this._updateDisabled();
124158
		return this;
124159
	},
124160
 
124161
	_zoomIn: function (e) {
124162
		if (!this._disabled && this._map._zoom < this._map.getMaxZoom()) {
124163
			this._map.zoomIn(this._map.options.zoomDelta * (e.shiftKey ? 3 : 1));
124164
		}
124165
	},
124166
 
124167
	_zoomOut: function (e) {
124168
		if (!this._disabled && this._map._zoom > this._map.getMinZoom()) {
124169
			this._map.zoomOut(this._map.options.zoomDelta * (e.shiftKey ? 3 : 1));
124170
		}
124171
	},
124172
 
124173
	_createButton: function (html, title, className, container, fn) {
124174
		var link = create$1('a', className, container);
124175
		link.innerHTML = html;
124176
		link.href = '#';
124177
		link.title = title;
124178
 
124179
		/*
124180
		 * Will force screen readers like VoiceOver to read this as "Zoom in - button"
124181
		 */
124182
		link.setAttribute('role', 'button');
124183
		link.setAttribute('aria-label', title);
124184
 
124185
		disableClickPropagation(link);
124186
		on(link, 'click', stop);
124187
		on(link, 'click', fn, this);
124188
		on(link, 'click', this._refocusOnMap, this);
124189
 
124190
		return link;
124191
	},
124192
 
124193
	_updateDisabled: function () {
124194
		var map = this._map,
124195
		    className = 'leaflet-disabled';
124196
 
124197
		removeClass(this._zoomInButton, className);
124198
		removeClass(this._zoomOutButton, className);
124199
 
124200
		if (this._disabled || map._zoom === map.getMinZoom()) {
124201
			addClass(this._zoomOutButton, className);
124202
		}
124203
		if (this._disabled || map._zoom === map.getMaxZoom()) {
124204
			addClass(this._zoomInButton, className);
124205
		}
124206
	}
124207
});
124208
 
124209
// @namespace Map
124210
// @section Control options
124211
// @option zoomControl: Boolean = true
124212
// Whether a [zoom control](#control-zoom) is added to the map by default.
124213
Map.mergeOptions({
124214
	zoomControl: true
124215
});
124216
 
124217
Map.addInitHook(function () {
124218
	if (this.options.zoomControl) {
124219
		this.zoomControl = new Zoom();
124220
		this.addControl(this.zoomControl);
124221
	}
124222
});
124223
 
124224
// @namespace Control.Zoom
124225
// @factory L.control.zoom(options: Control.Zoom options)
124226
// Creates a zoom control
124227
var zoom = function (options) {
124228
	return new Zoom(options);
124229
};
124230
 
124231
/*
124232
 * @class Control.Scale
124233
 * @aka L.Control.Scale
124234
 * @inherits Control
124235
 *
124236
 * A simple scale control that shows the scale of the current center of screen in metric (m/km) and imperial (mi/ft) systems. Extends `Control`.
124237
 *
124238
 * @example
124239
 *
124240
 * ```js
124241
 * L.control.scale().addTo(map);
124242
 * ```
124243
 */
124244
 
124245
var Scale = Control.extend({
124246
	// @section
124247
	// @aka Control.Scale options
124248
	options: {
124249
		position: 'bottomleft',
124250
 
124251
		// @option maxWidth: Number = 100
124252
		// Maximum width of the control in pixels. The width is set dynamically to show round values (e.g. 100, 200, 500).
124253
		maxWidth: 100,
124254
 
124255
		// @option metric: Boolean = True
124256
		// Whether to show the metric scale line (m/km).
124257
		metric: true,
124258
 
124259
		// @option imperial: Boolean = True
124260
		// Whether to show the imperial scale line (mi/ft).
124261
		imperial: true
124262
 
124263
		// @option updateWhenIdle: Boolean = false
124264
		// If `true`, the control is updated on [`moveend`](#map-moveend), otherwise it's always up-to-date (updated on [`move`](#map-move)).
124265
	},
124266
 
124267
	onAdd: function (map) {
124268
		var className = 'leaflet-control-scale',
124269
		    container = create$1('div', className),
124270
		    options = this.options;
124271
 
124272
		this._addScales(options, className + '-line', container);
124273
 
124274
		map.on(options.updateWhenIdle ? 'moveend' : 'move', this._update, this);
124275
		map.whenReady(this._update, this);
124276
 
124277
		return container;
124278
	},
124279
 
124280
	onRemove: function (map) {
124281
		map.off(this.options.updateWhenIdle ? 'moveend' : 'move', this._update, this);
124282
	},
124283
 
124284
	_addScales: function (options, className, container) {
124285
		if (options.metric) {
124286
			this._mScale = create$1('div', className, container);
124287
		}
124288
		if (options.imperial) {
124289
			this._iScale = create$1('div', className, container);
124290
		}
124291
	},
124292
 
124293
	_update: function () {
124294
		var map = this._map,
124295
		    y = map.getSize().y / 2;
124296
 
124297
		var maxMeters = map.distance(
124298
			map.containerPointToLatLng([0, y]),
124299
			map.containerPointToLatLng([this.options.maxWidth, y]));
124300
 
124301
		this._updateScales(maxMeters);
124302
	},
124303
 
124304
	_updateScales: function (maxMeters) {
124305
		if (this.options.metric && maxMeters) {
124306
			this._updateMetric(maxMeters);
124307
		}
124308
		if (this.options.imperial && maxMeters) {
124309
			this._updateImperial(maxMeters);
124310
		}
124311
	},
124312
 
124313
	_updateMetric: function (maxMeters) {
124314
		var meters = this._getRoundNum(maxMeters),
124315
		    label = meters < 1000 ? meters + ' m' : (meters / 1000) + ' km';
124316
 
124317
		this._updateScale(this._mScale, label, meters / maxMeters);
124318
	},
124319
 
124320
	_updateImperial: function (maxMeters) {
124321
		var maxFeet = maxMeters * 3.2808399,
124322
		    maxMiles, miles, feet;
124323
 
124324
		if (maxFeet > 5280) {
124325
			maxMiles = maxFeet / 5280;
124326
			miles = this._getRoundNum(maxMiles);
124327
			this._updateScale(this._iScale, miles + ' mi', miles / maxMiles);
124328
 
124329
		} else {
124330
			feet = this._getRoundNum(maxFeet);
124331
			this._updateScale(this._iScale, feet + ' ft', feet / maxFeet);
124332
		}
124333
	},
124334
 
124335
	_updateScale: function (scale, text, ratio) {
124336
		scale.style.width = Math.round(this.options.maxWidth * ratio) + 'px';
124337
		scale.innerHTML = text;
124338
	},
124339
 
124340
	_getRoundNum: function (num) {
124341
		var pow10 = Math.pow(10, (Math.floor(num) + '').length - 1),
124342
		    d = num / pow10;
124343
 
124344
		d = d >= 10 ? 10 :
124345
		    d >= 5 ? 5 :
124346
		    d >= 3 ? 3 :
124347
		    d >= 2 ? 2 : 1;
124348
 
124349
		return pow10 * d;
124350
	}
124351
});
124352
 
124353
 
124354
// @factory L.control.scale(options?: Control.Scale options)
124355
// Creates an scale control with the given options.
124356
var scale = function (options) {
124357
	return new Scale(options);
124358
};
124359
 
124360
/*
124361
 * @class Control.Attribution
124362
 * @aka L.Control.Attribution
124363
 * @inherits Control
124364
 *
124365
 * The attribution control allows you to display attribution data in a small text box on a map. It is put on the map by default unless you set its [`attributionControl` option](#map-attributioncontrol) to `false`, and it fetches attribution texts from layers with the [`getAttribution` method](#layer-getattribution) automatically. Extends Control.
124366
 */
124367
 
124368
var Attribution = Control.extend({
124369
	// @section
124370
	// @aka Control.Attribution options
124371
	options: {
124372
		position: 'bottomright',
124373
 
124374
		// @option prefix: String = 'Leaflet'
124375
		// The HTML text shown before the attributions. Pass `false` to disable.
124376
		prefix: '<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'
124377
	},
124378
 
124379
	initialize: function (options) {
124380
		setOptions(this, options);
124381
 
124382
		this._attributions = {};
124383
	},
124384
 
124385
	onAdd: function (map) {
124386
		map.attributionControl = this;
124387
		this._container = create$1('div', 'leaflet-control-attribution');
124388
		disableClickPropagation(this._container);
124389
 
124390
		// TODO ugly, refactor
124391
		for (var i in map._layers) {
124392
			if (map._layers[i].getAttribution) {
124393
				this.addAttribution(map._layers[i].getAttribution());
124394
			}
124395
		}
124396
 
124397
		this._update();
124398
 
124399
		return this._container;
124400
	},
124401
 
124402
	// @method setPrefix(prefix: String): this
124403
	// Sets the text before the attributions.
124404
	setPrefix: function (prefix) {
124405
		this.options.prefix = prefix;
124406
		this._update();
124407
		return this;
124408
	},
124409
 
124410
	// @method addAttribution(text: String): this
124411
	// Adds an attribution text (e.g. `'Vector data &copy; Mapbox'`).
124412
	addAttribution: function (text) {
124413
		if (!text) { return this; }
124414
 
124415
		if (!this._attributions[text]) {
124416
			this._attributions[text] = 0;
124417
		}
124418
		this._attributions[text]++;
124419
 
124420
		this._update();
124421
 
124422
		return this;
124423
	},
124424
 
124425
	// @method removeAttribution(text: String): this
124426
	// Removes an attribution text.
124427
	removeAttribution: function (text) {
124428
		if (!text) { return this; }
124429
 
124430
		if (this._attributions[text]) {
124431
			this._attributions[text]--;
124432
			this._update();
124433
		}
124434
 
124435
		return this;
124436
	},
124437
 
124438
	_update: function () {
124439
		if (!this._map) { return; }
124440
 
124441
		var attribs = [];
124442
 
124443
		for (var i in this._attributions) {
124444
			if (this._attributions[i]) {
124445
				attribs.push(i);
124446
			}
124447
		}
124448
 
124449
		var prefixAndAttribs = [];
124450
 
124451
		if (this.options.prefix) {
124452
			prefixAndAttribs.push(this.options.prefix);
124453
		}
124454
		if (attribs.length) {
124455
			prefixAndAttribs.push(attribs.join(', '));
124456
		}
124457
 
124458
		this._container.innerHTML = prefixAndAttribs.join(' | ');
124459
	}
124460
});
124461
 
124462
// @namespace Map
124463
// @section Control options
124464
// @option attributionControl: Boolean = true
124465
// Whether a [attribution control](#control-attribution) is added to the map by default.
124466
Map.mergeOptions({
124467
	attributionControl: true
124468
});
124469
 
124470
Map.addInitHook(function () {
124471
	if (this.options.attributionControl) {
124472
		new Attribution().addTo(this);
124473
	}
124474
});
124475
 
124476
// @namespace Control.Attribution
124477
// @factory L.control.attribution(options: Control.Attribution options)
124478
// Creates an attribution control.
124479
var attribution = function (options) {
124480
	return new Attribution(options);
124481
};
124482
 
124483
Control.Layers = Layers;
124484
Control.Zoom = Zoom;
124485
Control.Scale = Scale;
124486
Control.Attribution = Attribution;
124487
 
124488
control.layers = layers;
124489
control.zoom = zoom;
124490
control.scale = scale;
124491
control.attribution = attribution;
124492
 
124493
/*
124494
	L.Handler is a base class for handler classes that are used internally to inject
124495
	interaction features like dragging to classes like Map and Marker.
124496
*/
124497
 
124498
// @class Handler
124499
// @aka L.Handler
124500
// Abstract class for map interaction handlers
124501
 
124502
var Handler = Class.extend({
124503
	initialize: function (map) {
124504
		this._map = map;
124505
	},
124506
 
124507
	// @method enable(): this
124508
	// Enables the handler
124509
	enable: function () {
124510
		if (this._enabled) { return this; }
124511
 
124512
		this._enabled = true;
124513
		this.addHooks();
124514
		return this;
124515
	},
124516
 
124517
	// @method disable(): this
124518
	// Disables the handler
124519
	disable: function () {
124520
		if (!this._enabled) { return this; }
124521
 
124522
		this._enabled = false;
124523
		this.removeHooks();
124524
		return this;
124525
	},
124526
 
124527
	// @method enabled(): Boolean
124528
	// Returns `true` if the handler is enabled
124529
	enabled: function () {
124530
		return !!this._enabled;
124531
	}
124532
 
124533
	// @section Extension methods
124534
	// Classes inheriting from `Handler` must implement the two following methods:
124535
	// @method addHooks()
124536
	// Called when the handler is enabled, should add event hooks.
124537
	// @method removeHooks()
124538
	// Called when the handler is disabled, should remove the event hooks added previously.
124539
});
124540
 
124541
// @section There is static function which can be called without instantiating L.Handler:
124542
// @function addTo(map: Map, name: String): this
124543
// Adds a new Handler to the given map with the given name.
124544
Handler.addTo = function (map, name) {
124545
	map.addHandler(name, this);
124546
	return this;
124547
};
124548
 
124549
var Mixin = {Events: Events};
124550
 
124551
/*
124552
 * @class Draggable
124553
 * @aka L.Draggable
124554
 * @inherits Evented
124555
 *
124556
 * A class for making DOM elements draggable (including touch support).
124557
 * Used internally for map and marker dragging. Only works for elements
124558
 * that were positioned with [`L.DomUtil.setPosition`](#domutil-setposition).
124559
 *
124560
 * @example
124561
 * ```js
124562
 * var draggable = new L.Draggable(elementToDrag);
124563
 * draggable.enable();
124564
 * ```
124565
 */
124566
 
124567
var START = touch ? 'touchstart mousedown' : 'mousedown';
124568
var END = {
124569
	mousedown: 'mouseup',
124570
	touchstart: 'touchend',
124571
	pointerdown: 'touchend',
124572
	MSPointerDown: 'touchend'
124573
};
124574
var MOVE = {
124575
	mousedown: 'mousemove',
124576
	touchstart: 'touchmove',
124577
	pointerdown: 'touchmove',
124578
	MSPointerDown: 'touchmove'
124579
};
124580
 
124581
 
124582
var Draggable = Evented.extend({
124583
 
124584
	options: {
124585
		// @section
124586
		// @aka Draggable options
124587
		// @option clickTolerance: Number = 3
124588
		// The max number of pixels a user can shift the mouse pointer during a click
124589
		// for it to be considered a valid click (as opposed to a mouse drag).
124590
		clickTolerance: 3
124591
	},
124592
 
124593
	// @constructor L.Draggable(el: HTMLElement, dragHandle?: HTMLElement, preventOutline?: Boolean, options?: Draggable options)
124594
	// Creates a `Draggable` object for moving `el` when you start dragging the `dragHandle` element (equals `el` itself by default).
124595
	initialize: function (element, dragStartTarget, preventOutline$$1, options) {
124596
		setOptions(this, options);
124597
 
124598
		this._element = element;
124599
		this._dragStartTarget = dragStartTarget || element;
124600
		this._preventOutline = preventOutline$$1;
124601
	},
124602
 
124603
	// @method enable()
124604
	// Enables the dragging ability
124605
	enable: function () {
124606
		if (this._enabled) { return; }
124607
 
124608
		on(this._dragStartTarget, START, this._onDown, this);
124609
 
124610
		this._enabled = true;
124611
	},
124612
 
124613
	// @method disable()
124614
	// Disables the dragging ability
124615
	disable: function () {
124616
		if (!this._enabled) { return; }
124617
 
124618
		// If we're currently dragging this draggable,
124619
		// disabling it counts as first ending the drag.
124620
		if (Draggable._dragging === this) {
124621
			this.finishDrag();
124622
		}
124623
 
124624
		off(this._dragStartTarget, START, this._onDown, this);
124625
 
124626
		this._enabled = false;
124627
		this._moved = false;
124628
	},
124629
 
124630
	_onDown: function (e) {
124631
		// Ignore simulated events, since we handle both touch and
124632
		// mouse explicitly; otherwise we risk getting duplicates of
124633
		// touch events, see #4315.
124634
		// Also ignore the event if disabled; this happens in IE11
124635
		// under some circumstances, see #3666.
124636
		if (e._simulated || !this._enabled) { return; }
124637
 
124638
		this._moved = false;
124639
 
124640
		if (hasClass(this._element, 'leaflet-zoom-anim')) { return; }
124641
 
124642
		if (Draggable._dragging || e.shiftKey || ((e.which !== 1) && (e.button !== 1) && !e.touches)) { return; }
124643
		Draggable._dragging = this;  // Prevent dragging multiple objects at once.
124644
 
124645
		if (this._preventOutline) {
124646
			preventOutline(this._element);
124647
		}
124648
 
124649
		disableImageDrag();
124650
		disableTextSelection();
124651
 
124652
		if (this._moving) { return; }
124653
 
124654
		// @event down: Event
124655
		// Fired when a drag is about to start.
124656
		this.fire('down');
124657
 
124658
		var first = e.touches ? e.touches[0] : e,
124659
		    sizedParent = getSizedParentNode(this._element);
124660
 
124661
		this._startPoint = new Point(first.clientX, first.clientY);
124662
 
124663
		// Cache the scale, so that we can continuously compensate for it during drag (_onMove).
124664
		this._parentScale = getScale(sizedParent);
124665
 
124666
		on(document, MOVE[e.type], this._onMove, this);
124667
		on(document, END[e.type], this._onUp, this);
124668
	},
124669
 
124670
	_onMove: function (e) {
124671
		// Ignore simulated events, since we handle both touch and
124672
		// mouse explicitly; otherwise we risk getting duplicates of
124673
		// touch events, see #4315.
124674
		// Also ignore the event if disabled; this happens in IE11
124675
		// under some circumstances, see #3666.
124676
		if (e._simulated || !this._enabled) { return; }
124677
 
124678
		if (e.touches && e.touches.length > 1) {
124679
			this._moved = true;
124680
			return;
124681
		}
124682
 
124683
		var first = (e.touches && e.touches.length === 1 ? e.touches[0] : e),
124684
		    offset = new Point(first.clientX, first.clientY)._subtract(this._startPoint);
124685
 
124686
		if (!offset.x && !offset.y) { return; }
124687
		if (Math.abs(offset.x) + Math.abs(offset.y) < this.options.clickTolerance) { return; }
124688
 
124689
		// We assume that the parent container's position, border and scale do not change for the duration of the drag.
124690
		// Therefore there is no need to account for the position and border (they are eliminated by the subtraction)
124691
		// and we can use the cached value for the scale.
124692
		offset.x /= this._parentScale.x;
124693
		offset.y /= this._parentScale.y;
124694
 
124695
		preventDefault(e);
124696
 
124697
		if (!this._moved) {
124698
			// @event dragstart: Event
124699
			// Fired when a drag starts
124700
			this.fire('dragstart');
124701
 
124702
			this._moved = true;
124703
			this._startPos = getPosition(this._element).subtract(offset);
124704
 
124705
			addClass(document.body, 'leaflet-dragging');
124706
 
124707
			this._lastTarget = e.target || e.srcElement;
124708
			// IE and Edge do not give the <use> element, so fetch it
124709
			// if necessary
124710
			if ((window.SVGElementInstance) && (this._lastTarget instanceof SVGElementInstance)) {
124711
				this._lastTarget = this._lastTarget.correspondingUseElement;
124712
			}
124713
			addClass(this._lastTarget, 'leaflet-drag-target');
124714
		}
124715
 
124716
		this._newPos = this._startPos.add(offset);
124717
		this._moving = true;
124718
 
124719
		cancelAnimFrame(this._animRequest);
124720
		this._lastEvent = e;
124721
		this._animRequest = requestAnimFrame(this._updatePosition, this, true);
124722
	},
124723
 
124724
	_updatePosition: function () {
124725
		var e = {originalEvent: this._lastEvent};
124726
 
124727
		// @event predrag: Event
124728
		// Fired continuously during dragging *before* each corresponding
124729
		// update of the element's position.
124730
		this.fire('predrag', e);
124731
		setPosition(this._element, this._newPos);
124732
 
124733
		// @event drag: Event
124734
		// Fired continuously during dragging.
124735
		this.fire('drag', e);
124736
	},
124737
 
124738
	_onUp: function (e) {
124739
		// Ignore simulated events, since we handle both touch and
124740
		// mouse explicitly; otherwise we risk getting duplicates of
124741
		// touch events, see #4315.
124742
		// Also ignore the event if disabled; this happens in IE11
124743
		// under some circumstances, see #3666.
124744
		if (e._simulated || !this._enabled) { return; }
124745
		this.finishDrag();
124746
	},
124747
 
124748
	finishDrag: function () {
124749
		removeClass(document.body, 'leaflet-dragging');
124750
 
124751
		if (this._lastTarget) {
124752
			removeClass(this._lastTarget, 'leaflet-drag-target');
124753
			this._lastTarget = null;
124754
		}
124755
 
124756
		for (var i in MOVE) {
124757
			off(document, MOVE[i], this._onMove, this);
124758
			off(document, END[i], this._onUp, this);
124759
		}
124760
 
124761
		enableImageDrag();
124762
		enableTextSelection();
124763
 
124764
		if (this._moved && this._moving) {
124765
			// ensure drag is not fired after dragend
124766
			cancelAnimFrame(this._animRequest);
124767
 
124768
			// @event dragend: DragEndEvent
124769
			// Fired when the drag ends.
124770
			this.fire('dragend', {
124771
				distance: this._newPos.distanceTo(this._startPos)
124772
			});
124773
		}
124774
 
124775
		this._moving = false;
124776
		Draggable._dragging = false;
124777
	}
124778
 
124779
});
124780
 
124781
/*
124782
 * @namespace LineUtil
124783
 *
124784
 * Various utility functions for polyline points processing, used by Leaflet internally to make polylines lightning-fast.
124785
 */
124786
 
124787
// Simplify polyline with vertex reduction and Douglas-Peucker simplification.
124788
// Improves rendering performance dramatically by lessening the number of points to draw.
124789
 
124790
// @function simplify(points: Point[], tolerance: Number): Point[]
124791
// Dramatically reduces the number of points in a polyline while retaining
124792
// its shape and returns a new array of simplified points, using the
124793
// [Douglas-Peucker algorithm](http://en.wikipedia.org/wiki/Douglas-Peucker_algorithm).
124794
// Used for a huge performance boost when processing/displaying Leaflet polylines for
124795
// each zoom level and also reducing visual noise. tolerance affects the amount of
124796
// simplification (lesser value means higher quality but slower and with more points).
124797
// Also released as a separated micro-library [Simplify.js](http://mourner.github.com/simplify-js/).
124798
function simplify(points, tolerance) {
124799
	if (!tolerance || !points.length) {
124800
		return points.slice();
124801
	}
124802
 
124803
	var sqTolerance = tolerance * tolerance;
124804
 
124805
	    // stage 1: vertex reduction
124806
	    points = _reducePoints(points, sqTolerance);
124807
 
124808
	    // stage 2: Douglas-Peucker simplification
124809
	    points = _simplifyDP(points, sqTolerance);
124810
 
124811
	return points;
124812
}
124813
 
124814
// @function pointToSegmentDistance(p: Point, p1: Point, p2: Point): Number
124815
// Returns the distance between point `p` and segment `p1` to `p2`.
124816
function pointToSegmentDistance(p, p1, p2) {
124817
	return Math.sqrt(_sqClosestPointOnSegment(p, p1, p2, true));
124818
}
124819
 
124820
// @function closestPointOnSegment(p: Point, p1: Point, p2: Point): Number
124821
// Returns the closest point from a point `p` on a segment `p1` to `p2`.
124822
function closestPointOnSegment(p, p1, p2) {
124823
	return _sqClosestPointOnSegment(p, p1, p2);
124824
}
124825
 
124826
// Douglas-Peucker simplification, see http://en.wikipedia.org/wiki/Douglas-Peucker_algorithm
124827
function _simplifyDP(points, sqTolerance) {
124828
 
124829
	var len = points.length,
124830
	    ArrayConstructor = typeof Uint8Array !== undefined + '' ? Uint8Array : Array,
124831
	    markers = new ArrayConstructor(len);
124832
 
124833
	    markers[0] = markers[len - 1] = 1;
124834
 
124835
	_simplifyDPStep(points, markers, sqTolerance, 0, len - 1);
124836
 
124837
	var i,
124838
	    newPoints = [];
124839
 
124840
	for (i = 0; i < len; i++) {
124841
		if (markers[i]) {
124842
			newPoints.push(points[i]);
124843
		}
124844
	}
124845
 
124846
	return newPoints;
124847
}
124848
 
124849
function _simplifyDPStep(points, markers, sqTolerance, first, last) {
124850
 
124851
	var maxSqDist = 0,
124852
	index, i, sqDist;
124853
 
124854
	for (i = first + 1; i <= last - 1; i++) {
124855
		sqDist = _sqClosestPointOnSegment(points[i], points[first], points[last], true);
124856
 
124857
		if (sqDist > maxSqDist) {
124858
			index = i;
124859
			maxSqDist = sqDist;
124860
		}
124861
	}
124862
 
124863
	if (maxSqDist > sqTolerance) {
124864
		markers[index] = 1;
124865
 
124866
		_simplifyDPStep(points, markers, sqTolerance, first, index);
124867
		_simplifyDPStep(points, markers, sqTolerance, index, last);
124868
	}
124869
}
124870
 
124871
// reduce points that are too close to each other to a single point
124872
function _reducePoints(points, sqTolerance) {
124873
	var reducedPoints = [points[0]];
124874
 
124875
	for (var i = 1, prev = 0, len = points.length; i < len; i++) {
124876
		if (_sqDist(points[i], points[prev]) > sqTolerance) {
124877
			reducedPoints.push(points[i]);
124878
			prev = i;
124879
		}
124880
	}
124881
	if (prev < len - 1) {
124882
		reducedPoints.push(points[len - 1]);
124883
	}
124884
	return reducedPoints;
124885
}
124886
 
124887
var _lastCode;
124888
 
124889
// @function clipSegment(a: Point, b: Point, bounds: Bounds, useLastCode?: Boolean, round?: Boolean): Point[]|Boolean
124890
// Clips the segment a to b by rectangular bounds with the
124891
// [Cohen-Sutherland algorithm](https://en.wikipedia.org/wiki/Cohen%E2%80%93Sutherland_algorithm)
124892
// (modifying the segment points directly!). Used by Leaflet to only show polyline
124893
// points that are on the screen or near, increasing performance.
124894
function clipSegment(a, b, bounds, useLastCode, round) {
124895
	var codeA = useLastCode ? _lastCode : _getBitCode(a, bounds),
124896
	    codeB = _getBitCode(b, bounds),
124897
 
124898
	    codeOut, p, newCode;
124899
 
124900
	    // save 2nd code to avoid calculating it on the next segment
124901
	    _lastCode = codeB;
124902
 
124903
	while (true) {
124904
		// if a,b is inside the clip window (trivial accept)
124905
		if (!(codeA | codeB)) {
124906
			return [a, b];
124907
		}
124908
 
124909
		// if a,b is outside the clip window (trivial reject)
124910
		if (codeA & codeB) {
124911
			return false;
124912
		}
124913
 
124914
		// other cases
124915
		codeOut = codeA || codeB;
124916
		p = _getEdgeIntersection(a, b, codeOut, bounds, round);
124917
		newCode = _getBitCode(p, bounds);
124918
 
124919
		if (codeOut === codeA) {
124920
			a = p;
124921
			codeA = newCode;
124922
		} else {
124923
			b = p;
124924
			codeB = newCode;
124925
		}
124926
	}
124927
}
124928
 
124929
function _getEdgeIntersection(a, b, code, bounds, round) {
124930
	var dx = b.x - a.x,
124931
	    dy = b.y - a.y,
124932
	    min = bounds.min,
124933
	    max = bounds.max,
124934
	    x, y;
124935
 
124936
	if (code & 8) { // top
124937
		x = a.x + dx * (max.y - a.y) / dy;
124938
		y = max.y;
124939
 
124940
	} else if (code & 4) { // bottom
124941
		x = a.x + dx * (min.y - a.y) / dy;
124942
		y = min.y;
124943
 
124944
	} else if (code & 2) { // right
124945
		x = max.x;
124946
		y = a.y + dy * (max.x - a.x) / dx;
124947
 
124948
	} else if (code & 1) { // left
124949
		x = min.x;
124950
		y = a.y + dy * (min.x - a.x) / dx;
124951
	}
124952
 
124953
	return new Point(x, y, round);
124954
}
124955
 
124956
function _getBitCode(p, bounds) {
124957
	var code = 0;
124958
 
124959
	if (p.x < bounds.min.x) { // left
124960
		code |= 1;
124961
	} else if (p.x > bounds.max.x) { // right
124962
		code |= 2;
124963
	}
124964
 
124965
	if (p.y < bounds.min.y) { // bottom
124966
		code |= 4;
124967
	} else if (p.y > bounds.max.y) { // top
124968
		code |= 8;
124969
	}
124970
 
124971
	return code;
124972
}
124973
 
124974
// square distance (to avoid unnecessary Math.sqrt calls)
124975
function _sqDist(p1, p2) {
124976
	var dx = p2.x - p1.x,
124977
	    dy = p2.y - p1.y;
124978
	return dx * dx + dy * dy;
124979
}
124980
 
124981
// return closest point on segment or distance to that point
124982
function _sqClosestPointOnSegment(p, p1, p2, sqDist) {
124983
	var x = p1.x,
124984
	    y = p1.y,
124985
	    dx = p2.x - x,
124986
	    dy = p2.y - y,
124987
	    dot = dx * dx + dy * dy,
124988
	    t;
124989
 
124990
	if (dot > 0) {
124991
		t = ((p.x - x) * dx + (p.y - y) * dy) / dot;
124992
 
124993
		if (t > 1) {
124994
			x = p2.x;
124995
			y = p2.y;
124996
		} else if (t > 0) {
124997
			x += dx * t;
124998
			y += dy * t;
124999
		}
125000
	}
125001
 
125002
	dx = p.x - x;
125003
	dy = p.y - y;
125004
 
125005
	return sqDist ? dx * dx + dy * dy : new Point(x, y);
125006
}
125007
 
125008
 
125009
// @function isFlat(latlngs: LatLng[]): Boolean
125010
// Returns true if `latlngs` is a flat array, false is nested.
125011
function isFlat(latlngs) {
125012
	return !isArray(latlngs[0]) || (typeof latlngs[0][0] !== 'object' && typeof latlngs[0][0] !== 'undefined');
125013
}
125014
 
125015
function _flat(latlngs) {
125016
	console.warn('Deprecated use of _flat, please use L.LineUtil.isFlat instead.');
125017
	return isFlat(latlngs);
125018
}
125019
 
125020
 
125021
var LineUtil = (Object.freeze || Object)({
125022
	simplify: simplify,
125023
	pointToSegmentDistance: pointToSegmentDistance,
125024
	closestPointOnSegment: closestPointOnSegment,
125025
	clipSegment: clipSegment,
125026
	_getEdgeIntersection: _getEdgeIntersection,
125027
	_getBitCode: _getBitCode,
125028
	_sqClosestPointOnSegment: _sqClosestPointOnSegment,
125029
	isFlat: isFlat,
125030
	_flat: _flat
125031
});
125032
 
125033
/*
125034
 * @namespace PolyUtil
125035
 * Various utility functions for polygon geometries.
125036
 */
125037
 
125038
/* @function clipPolygon(points: Point[], bounds: Bounds, round?: Boolean): Point[]
125039
 * Clips the polygon geometry defined by the given `points` by the given bounds (using the [Sutherland-Hodgman algorithm](https://en.wikipedia.org/wiki/Sutherland%E2%80%93Hodgman_algorithm)).
125040
 * Used by Leaflet to only show polygon points that are on the screen or near, increasing
125041
 * performance. Note that polygon points needs different algorithm for clipping
125042
 * than polyline, so there's a separate method for it.
125043
 */
125044
function clipPolygon(points, bounds, round) {
125045
	var clippedPoints,
125046
	    edges = [1, 4, 2, 8],
125047
	    i, j, k,
125048
	    a, b,
125049
	    len, edge, p;
125050
 
125051
	for (i = 0, len = points.length; i < len; i++) {
125052
		points[i]._code = _getBitCode(points[i], bounds);
125053
	}
125054
 
125055
	// for each edge (left, bottom, right, top)
125056
	for (k = 0; k < 4; k++) {
125057
		edge = edges[k];
125058
		clippedPoints = [];
125059
 
125060
		for (i = 0, len = points.length, j = len - 1; i < len; j = i++) {
125061
			a = points[i];
125062
			b = points[j];
125063
 
125064
			// if a is inside the clip window
125065
			if (!(a._code & edge)) {
125066
				// if b is outside the clip window (a->b goes out of screen)
125067
				if (b._code & edge) {
125068
					p = _getEdgeIntersection(b, a, edge, bounds, round);
125069
					p._code = _getBitCode(p, bounds);
125070
					clippedPoints.push(p);
125071
				}
125072
				clippedPoints.push(a);
125073
 
125074
			// else if b is inside the clip window (a->b enters the screen)
125075
			} else if (!(b._code & edge)) {
125076
				p = _getEdgeIntersection(b, a, edge, bounds, round);
125077
				p._code = _getBitCode(p, bounds);
125078
				clippedPoints.push(p);
125079
			}
125080
		}
125081
		points = clippedPoints;
125082
	}
125083
 
125084
	return points;
125085
}
125086
 
125087
 
125088
var PolyUtil = (Object.freeze || Object)({
125089
	clipPolygon: clipPolygon
125090
});
125091
 
125092
/*
125093
 * @namespace Projection
125094
 * @section
125095
 * Leaflet comes with a set of already defined Projections out of the box:
125096
 *
125097
 * @projection L.Projection.LonLat
125098
 *
125099
 * Equirectangular, or Plate Carree projection — the most simple projection,
125100
 * mostly used by GIS enthusiasts. Directly maps `x` as longitude, and `y` as
125101
 * latitude. Also suitable for flat worlds, e.g. game maps. Used by the
125102
 * `EPSG:4326` and `Simple` CRS.
125103
 */
125104
 
125105
var LonLat = {
125106
	project: function (latlng) {
125107
		return new Point(latlng.lng, latlng.lat);
125108
	},
125109
 
125110
	unproject: function (point) {
125111
		return new LatLng(point.y, point.x);
125112
	},
125113
 
125114
	bounds: new Bounds([-180, -90], [180, 90])
125115
};
125116
 
125117
/*
125118
 * @namespace Projection
125119
 * @projection L.Projection.Mercator
125120
 *
125121
 * Elliptical Mercator projection — more complex than Spherical Mercator. Takes into account that Earth is a geoid, not a perfect sphere. Used by the EPSG:3395 CRS.
125122
 */
125123
 
125124
var Mercator = {
125125
	R: 6378137,
125126
	R_MINOR: 6356752.314245179,
125127
 
125128
	bounds: new Bounds([-20037508.34279, -15496570.73972], [20037508.34279, 18764656.23138]),
125129
 
125130
	project: function (latlng) {
125131
		var d = Math.PI / 180,
125132
		    r = this.R,
125133
		    y = latlng.lat * d,
125134
		    tmp = this.R_MINOR / r,
125135
		    e = Math.sqrt(1 - tmp * tmp),
125136
		    con = e * Math.sin(y);
125137
 
125138
		var ts = Math.tan(Math.PI / 4 - y / 2) / Math.pow((1 - con) / (1 + con), e / 2);
125139
		y = -r * Math.log(Math.max(ts, 1E-10));
125140
 
125141
		return new Point(latlng.lng * d * r, y);
125142
	},
125143
 
125144
	unproject: function (point) {
125145
		var d = 180 / Math.PI,
125146
		    r = this.R,
125147
		    tmp = this.R_MINOR / r,
125148
		    e = Math.sqrt(1 - tmp * tmp),
125149
		    ts = Math.exp(-point.y / r),
125150
		    phi = Math.PI / 2 - 2 * Math.atan(ts);
125151
 
125152
		for (var i = 0, dphi = 0.1, con; i < 15 && Math.abs(dphi) > 1e-7; i++) {
125153
			con = e * Math.sin(phi);
125154
			con = Math.pow((1 - con) / (1 + con), e / 2);
125155
			dphi = Math.PI / 2 - 2 * Math.atan(ts * con) - phi;
125156
			phi += dphi;
125157
		}
125158
 
125159
		return new LatLng(phi * d, point.x * d / r);
125160
	}
125161
};
125162
 
125163
/*
125164
 * @class Projection
125165
 
125166
 * An object with methods for projecting geographical coordinates of the world onto
125167
 * a flat surface (and back). See [Map projection](http://en.wikipedia.org/wiki/Map_projection).
125168
 
125169
 * @property bounds: Bounds
125170
 * The bounds (specified in CRS units) where the projection is valid
125171
 
125172
 * @method project(latlng: LatLng): Point
125173
 * Projects geographical coordinates into a 2D point.
125174
 * Only accepts actual `L.LatLng` instances, not arrays.
125175
 
125176
 * @method unproject(point: Point): LatLng
125177
 * The inverse of `project`. Projects a 2D point into a geographical location.
125178
 * Only accepts actual `L.Point` instances, not arrays.
125179
 
125180
 * Note that the projection instances do not inherit from Leafet's `Class` object,
125181
 * and can't be instantiated. Also, new classes can't inherit from them,
125182
 * and methods can't be added to them with the `include` function.
125183
 
125184
 */
125185
 
125186
 
125187
 
125188
 
125189
var index = (Object.freeze || Object)({
125190
	LonLat: LonLat,
125191
	Mercator: Mercator,
125192
	SphericalMercator: SphericalMercator
125193
});
125194
 
125195
/*
125196
 * @namespace CRS
125197
 * @crs L.CRS.EPSG3395
125198
 *
125199
 * Rarely used by some commercial tile providers. Uses Elliptical Mercator projection.
125200
 */
125201
var EPSG3395 = extend({}, Earth, {
125202
	code: 'EPSG:3395',
125203
	projection: Mercator,
125204
 
125205
	transformation: (function () {
125206
		var scale = 0.5 / (Math.PI * Mercator.R);
125207
		return toTransformation(scale, 0.5, -scale, 0.5);
125208
	}())
125209
});
125210
 
125211
/*
125212
 * @namespace CRS
125213
 * @crs L.CRS.EPSG4326
125214
 *
125215
 * A common CRS among GIS enthusiasts. Uses simple Equirectangular projection.
125216
 *
125217
 * Leaflet 1.0.x complies with the [TMS coordinate scheme for EPSG:4326](https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification#global-geodetic),
125218
 * which is a breaking change from 0.7.x behaviour.  If you are using a `TileLayer`
125219
 * with this CRS, ensure that there are two 256x256 pixel tiles covering the
125220
 * whole earth at zoom level zero, and that the tile coordinate origin is (-180,+90),
125221
 * or (-180,-90) for `TileLayer`s with [the `tms` option](#tilelayer-tms) set.
125222
 */
125223
 
125224
var EPSG4326 = extend({}, Earth, {
125225
	code: 'EPSG:4326',
125226
	projection: LonLat,
125227
	transformation: toTransformation(1 / 180, 1, -1 / 180, 0.5)
125228
});
125229
 
125230
/*
125231
 * @namespace CRS
125232
 * @crs L.CRS.Simple
125233
 *
125234
 * A simple CRS that maps longitude and latitude into `x` and `y` directly.
125235
 * May be used for maps of flat surfaces (e.g. game maps). Note that the `y`
125236
 * axis should still be inverted (going from bottom to top). `distance()` returns
125237
 * simple euclidean distance.
125238
 */
125239
 
125240
var Simple = extend({}, CRS, {
125241
	projection: LonLat,
125242
	transformation: toTransformation(1, 0, -1, 0),
125243
 
125244
	scale: function (zoom) {
125245
		return Math.pow(2, zoom);
125246
	},
125247
 
125248
	zoom: function (scale) {
125249
		return Math.log(scale) / Math.LN2;
125250
	},
125251
 
125252
	distance: function (latlng1, latlng2) {
125253
		var dx = latlng2.lng - latlng1.lng,
125254
		    dy = latlng2.lat - latlng1.lat;
125255
 
125256
		return Math.sqrt(dx * dx + dy * dy);
125257
	},
125258
 
125259
	infinite: true
125260
});
125261
 
125262
CRS.Earth = Earth;
125263
CRS.EPSG3395 = EPSG3395;
125264
CRS.EPSG3857 = EPSG3857;
125265
CRS.EPSG900913 = EPSG900913;
125266
CRS.EPSG4326 = EPSG4326;
125267
CRS.Simple = Simple;
125268
 
125269
/*
125270
 * @class Layer
125271
 * @inherits Evented
125272
 * @aka L.Layer
125273
 * @aka ILayer
125274
 *
125275
 * A set of methods from the Layer base class that all Leaflet layers use.
125276
 * Inherits all methods, options and events from `L.Evented`.
125277
 *
125278
 * @example
125279
 *
125280
 * ```js
125281
 * var layer = L.Marker(latlng).addTo(map);
125282
 * layer.addTo(map);
125283
 * layer.remove();
125284
 * ```
125285
 *
125286
 * @event add: Event
125287
 * Fired after the layer is added to a map
125288
 *
125289
 * @event remove: Event
125290
 * Fired after the layer is removed from a map
125291
 */
125292
 
125293
 
125294
var Layer = Evented.extend({
125295
 
125296
	// Classes extending `L.Layer` will inherit the following options:
125297
	options: {
125298
		// @option pane: String = 'overlayPane'
125299
		// By default the layer will be added to the map's [overlay pane](#map-overlaypane). Overriding this option will cause the layer to be placed on another pane by default.
125300
		pane: 'overlayPane',
125301
 
125302
		// @option attribution: String = null
125303
		// String to be shown in the attribution control, describes the layer data, e.g. "© Mapbox".
125304
		attribution: null,
125305
 
125306
		bubblingMouseEvents: true
125307
	},
125308
 
125309
	/* @section
125310
	 * Classes extending `L.Layer` will inherit the following methods:
125311
	 *
125312
	 * @method addTo(map: Map|LayerGroup): this
125313
	 * Adds the layer to the given map or layer group.
125314
	 */
125315
	addTo: function (map) {
125316
		map.addLayer(this);
125317
		return this;
125318
	},
125319
 
125320
	// @method remove: this
125321
	// Removes the layer from the map it is currently active on.
125322
	remove: function () {
125323
		return this.removeFrom(this._map || this._mapToAdd);
125324
	},
125325
 
125326
	// @method removeFrom(map: Map): this
125327
	// Removes the layer from the given map
125328
	removeFrom: function (obj) {
125329
		if (obj) {
125330
			obj.removeLayer(this);
125331
		}
125332
		return this;
125333
	},
125334
 
125335
	// @method getPane(name? : String): HTMLElement
125336
	// Returns the `HTMLElement` representing the named pane on the map. If `name` is omitted, returns the pane for this layer.
125337
	getPane: function (name) {
125338
		return this._map.getPane(name ? (this.options[name] || name) : this.options.pane);
125339
	},
125340
 
125341
	addInteractiveTarget: function (targetEl) {
125342
		this._map._targets[stamp(targetEl)] = this;
125343
		return this;
125344
	},
125345
 
125346
	removeInteractiveTarget: function (targetEl) {
125347
		delete this._map._targets[stamp(targetEl)];
125348
		return this;
125349
	},
125350
 
125351
	// @method getAttribution: String
125352
	// Used by the `attribution control`, returns the [attribution option](#gridlayer-attribution).
125353
	getAttribution: function () {
125354
		return this.options.attribution;
125355
	},
125356
 
125357
	_layerAdd: function (e) {
125358
		var map = e.target;
125359
 
125360
		// check in case layer gets added and then removed before the map is ready
125361
		if (!map.hasLayer(this)) { return; }
125362
 
125363
		this._map = map;
125364
		this._zoomAnimated = map._zoomAnimated;
125365
 
125366
		if (this.getEvents) {
125367
			var events = this.getEvents();
125368
			map.on(events, this);
125369
			this.once('remove', function () {
125370
				map.off(events, this);
125371
			}, this);
125372
		}
125373
 
125374
		this.onAdd(map);
125375
 
125376
		if (this.getAttribution && map.attributionControl) {
125377
			map.attributionControl.addAttribution(this.getAttribution());
125378
		}
125379
 
125380
		this.fire('add');
125381
		map.fire('layeradd', {layer: this});
125382
	}
125383
});
125384
 
125385
/* @section Extension methods
125386
 * @uninheritable
125387
 *
125388
 * Every layer should extend from `L.Layer` and (re-)implement the following methods.
125389
 *
125390
 * @method onAdd(map: Map): this
125391
 * Should contain code that creates DOM elements for the layer, adds them to `map panes` where they should belong and puts listeners on relevant map events. Called on [`map.addLayer(layer)`](#map-addlayer).
125392
 *
125393
 * @method onRemove(map: Map): this
125394
 * Should contain all clean up code that removes the layer's elements from the DOM and removes listeners previously added in [`onAdd`](#layer-onadd). Called on [`map.removeLayer(layer)`](#map-removelayer).
125395
 *
125396
 * @method getEvents(): Object
125397
 * This optional method should return an object like `{ viewreset: this._reset }` for [`addEventListener`](#evented-addeventlistener). The event handlers in this object will be automatically added and removed from the map with your layer.
125398
 *
125399
 * @method getAttribution(): String
125400
 * This optional method should return a string containing HTML to be shown on the `Attribution control` whenever the layer is visible.
125401
 *
125402
 * @method beforeAdd(map: Map): this
125403
 * Optional method. Called on [`map.addLayer(layer)`](#map-addlayer), before the layer is added to the map, before events are initialized, without waiting until the map is in a usable state. Use for early initialization only.
125404
 */
125405
 
125406
 
125407
/* @namespace Map
125408
 * @section Layer events
125409
 *
125410
 * @event layeradd: LayerEvent
125411
 * Fired when a new layer is added to the map.
125412
 *
125413
 * @event layerremove: LayerEvent
125414
 * Fired when some layer is removed from the map
125415
 *
125416
 * @section Methods for Layers and Controls
125417
 */
125418
Map.include({
125419
	// @method addLayer(layer: Layer): this
125420
	// Adds the given layer to the map
125421
	addLayer: function (layer) {
125422
		if (!layer._layerAdd) {
125423
			throw new Error('The provided object is not a Layer.');
125424
		}
125425
 
125426
		var id = stamp(layer);
125427
		if (this._layers[id]) { return this; }
125428
		this._layers[id] = layer;
125429
 
125430
		layer._mapToAdd = this;
125431
 
125432
		if (layer.beforeAdd) {
125433
			layer.beforeAdd(this);
125434
		}
125435
 
125436
		this.whenReady(layer._layerAdd, layer);
125437
 
125438
		return this;
125439
	},
125440
 
125441
	// @method removeLayer(layer: Layer): this
125442
	// Removes the given layer from the map.
125443
	removeLayer: function (layer) {
125444
		var id = stamp(layer);
125445
 
125446
		if (!this._layers[id]) { return this; }
125447
 
125448
		if (this._loaded) {
125449
			layer.onRemove(this);
125450
		}
125451
 
125452
		if (layer.getAttribution && this.attributionControl) {
125453
			this.attributionControl.removeAttribution(layer.getAttribution());
125454
		}
125455
 
125456
		delete this._layers[id];
125457
 
125458
		if (this._loaded) {
125459
			this.fire('layerremove', {layer: layer});
125460
			layer.fire('remove');
125461
		}
125462
 
125463
		layer._map = layer._mapToAdd = null;
125464
 
125465
		return this;
125466
	},
125467
 
125468
	// @method hasLayer(layer: Layer): Boolean
125469
	// Returns `true` if the given layer is currently added to the map
125470
	hasLayer: function (layer) {
125471
		return !!layer && (stamp(layer) in this._layers);
125472
	},
125473
 
125474
	/* @method eachLayer(fn: Function, context?: Object): this
125475
	 * Iterates over the layers of the map, optionally specifying context of the iterator function.
125476
	 * ```
125477
	 * map.eachLayer(function(layer){
125478
	 *     layer.bindPopup('Hello');
125479
	 * });
125480
	 * ```
125481
	 */
125482
	eachLayer: function (method, context) {
125483
		for (var i in this._layers) {
125484
			method.call(context, this._layers[i]);
125485
		}
125486
		return this;
125487
	},
125488
 
125489
	_addLayers: function (layers) {
125490
		layers = layers ? (isArray(layers) ? layers : [layers]) : [];
125491
 
125492
		for (var i = 0, len = layers.length; i < len; i++) {
125493
			this.addLayer(layers[i]);
125494
		}
125495
	},
125496
 
125497
	_addZoomLimit: function (layer) {
125498
		if (isNaN(layer.options.maxZoom) || !isNaN(layer.options.minZoom)) {
125499
			this._zoomBoundLayers[stamp(layer)] = layer;
125500
			this._updateZoomLevels();
125501
		}
125502
	},
125503
 
125504
	_removeZoomLimit: function (layer) {
125505
		var id = stamp(layer);
125506
 
125507
		if (this._zoomBoundLayers[id]) {
125508
			delete this._zoomBoundLayers[id];
125509
			this._updateZoomLevels();
125510
		}
125511
	},
125512
 
125513
	_updateZoomLevels: function () {
125514
		var minZoom = Infinity,
125515
		    maxZoom = -Infinity,
125516
		    oldZoomSpan = this._getZoomSpan();
125517
 
125518
		for (var i in this._zoomBoundLayers) {
125519
			var options = this._zoomBoundLayers[i].options;
125520
 
125521
			minZoom = options.minZoom === undefined ? minZoom : Math.min(minZoom, options.minZoom);
125522
			maxZoom = options.maxZoom === undefined ? maxZoom : Math.max(maxZoom, options.maxZoom);
125523
		}
125524
 
125525
		this._layersMaxZoom = maxZoom === -Infinity ? undefined : maxZoom;
125526
		this._layersMinZoom = minZoom === Infinity ? undefined : minZoom;
125527
 
125528
		// @section Map state change events
125529
		// @event zoomlevelschange: Event
125530
		// Fired when the number of zoomlevels on the map is changed due
125531
		// to adding or removing a layer.
125532
		if (oldZoomSpan !== this._getZoomSpan()) {
125533
			this.fire('zoomlevelschange');
125534
		}
125535
 
125536
		if (this.options.maxZoom === undefined && this._layersMaxZoom && this.getZoom() > this._layersMaxZoom) {
125537
			this.setZoom(this._layersMaxZoom);
125538
		}
125539
		if (this.options.minZoom === undefined && this._layersMinZoom && this.getZoom() < this._layersMinZoom) {
125540
			this.setZoom(this._layersMinZoom);
125541
		}
125542
	}
125543
});
125544
 
125545
/*
125546
 * @class LayerGroup
125547
 * @aka L.LayerGroup
125548
 * @inherits Layer
125549
 *
125550
 * Used to group several layers and handle them as one. If you add it to the map,
125551
 * any layers added or removed from the group will be added/removed on the map as
125552
 * well. Extends `Layer`.
125553
 *
125554
 * @example
125555
 *
125556
 * ```js
125557
 * L.layerGroup([marker1, marker2])
125558
 * 	.addLayer(polyline)
125559
 * 	.addTo(map);
125560
 * ```
125561
 */
125562
 
125563
var LayerGroup = Layer.extend({
125564
 
125565
	initialize: function (layers, options) {
125566
		setOptions(this, options);
125567
 
125568
		this._layers = {};
125569
 
125570
		var i, len;
125571
 
125572
		if (layers) {
125573
			for (i = 0, len = layers.length; i < len; i++) {
125574
				this.addLayer(layers[i]);
125575
			}
125576
		}
125577
	},
125578
 
125579
	// @method addLayer(layer: Layer): this
125580
	// Adds the given layer to the group.
125581
	addLayer: function (layer) {
125582
		var id = this.getLayerId(layer);
125583
 
125584
		this._layers[id] = layer;
125585
 
125586
		if (this._map) {
125587
			this._map.addLayer(layer);
125588
		}
125589
 
125590
		return this;
125591
	},
125592
 
125593
	// @method removeLayer(layer: Layer): this
125594
	// Removes the given layer from the group.
125595
	// @alternative
125596
	// @method removeLayer(id: Number): this
125597
	// Removes the layer with the given internal ID from the group.
125598
	removeLayer: function (layer) {
125599
		var id = layer in this._layers ? layer : this.getLayerId(layer);
125600
 
125601
		if (this._map && this._layers[id]) {
125602
			this._map.removeLayer(this._layers[id]);
125603
		}
125604
 
125605
		delete this._layers[id];
125606
 
125607
		return this;
125608
	},
125609
 
125610
	// @method hasLayer(layer: Layer): Boolean
125611
	// Returns `true` if the given layer is currently added to the group.
125612
	// @alternative
125613
	// @method hasLayer(id: Number): Boolean
125614
	// Returns `true` if the given internal ID is currently added to the group.
125615
	hasLayer: function (layer) {
125616
		return !!layer && (layer in this._layers || this.getLayerId(layer) in this._layers);
125617
	},
125618
 
125619
	// @method clearLayers(): this
125620
	// Removes all the layers from the group.
125621
	clearLayers: function () {
125622
		return this.eachLayer(this.removeLayer, this);
125623
	},
125624
 
125625
	// @method invoke(methodName: String, …): this
125626
	// Calls `methodName` on every layer contained in this group, passing any
125627
	// additional parameters. Has no effect if the layers contained do not
125628
	// implement `methodName`.
125629
	invoke: function (methodName) {
125630
		var args = Array.prototype.slice.call(arguments, 1),
125631
		    i, layer;
125632
 
125633
		for (i in this._layers) {
125634
			layer = this._layers[i];
125635
 
125636
			if (layer[methodName]) {
125637
				layer[methodName].apply(layer, args);
125638
			}
125639
		}
125640
 
125641
		return this;
125642
	},
125643
 
125644
	onAdd: function (map) {
125645
		this.eachLayer(map.addLayer, map);
125646
	},
125647
 
125648
	onRemove: function (map) {
125649
		this.eachLayer(map.removeLayer, map);
125650
	},
125651
 
125652
	// @method eachLayer(fn: Function, context?: Object): this
125653
	// Iterates over the layers of the group, optionally specifying context of the iterator function.
125654
	// ```js
125655
	// group.eachLayer(function (layer) {
125656
	// 	layer.bindPopup('Hello');
125657
	// });
125658
	// ```
125659
	eachLayer: function (method, context) {
125660
		for (var i in this._layers) {
125661
			method.call(context, this._layers[i]);
125662
		}
125663
		return this;
125664
	},
125665
 
125666
	// @method getLayer(id: Number): Layer
125667
	// Returns the layer with the given internal ID.
125668
	getLayer: function (id) {
125669
		return this._layers[id];
125670
	},
125671
 
125672
	// @method getLayers(): Layer[]
125673
	// Returns an array of all the layers added to the group.
125674
	getLayers: function () {
125675
		var layers = [];
125676
		this.eachLayer(layers.push, layers);
125677
		return layers;
125678
	},
125679
 
125680
	// @method setZIndex(zIndex: Number): this
125681
	// Calls `setZIndex` on every layer contained in this group, passing the z-index.
125682
	setZIndex: function (zIndex) {
125683
		return this.invoke('setZIndex', zIndex);
125684
	},
125685
 
125686
	// @method getLayerId(layer: Layer): Number
125687
	// Returns the internal ID for a layer
125688
	getLayerId: function (layer) {
125689
		return stamp(layer);
125690
	}
125691
});
125692
 
125693
 
125694
// @factory L.layerGroup(layers?: Layer[], options?: Object)
125695
// Create a layer group, optionally given an initial set of layers and an `options` object.
125696
var layerGroup = function (layers, options) {
125697
	return new LayerGroup(layers, options);
125698
};
125699
 
125700
/*
125701
 * @class FeatureGroup
125702
 * @aka L.FeatureGroup
125703
 * @inherits LayerGroup
125704
 *
125705
 * Extended `LayerGroup` that makes it easier to do the same thing to all its member layers:
125706
 *  * [`bindPopup`](#layer-bindpopup) binds a popup to all of the layers at once (likewise with [`bindTooltip`](#layer-bindtooltip))
125707
 *  * Events are propagated to the `FeatureGroup`, so if the group has an event
125708
 * handler, it will handle events from any of the layers. This includes mouse events
125709
 * and custom events.
125710
 *  * Has `layeradd` and `layerremove` events
125711
 *
125712
 * @example
125713
 *
125714
 * ```js
125715
 * L.featureGroup([marker1, marker2, polyline])
125716
 * 	.bindPopup('Hello world!')
125717
 * 	.on('click', function() { alert('Clicked on a member of the group!'); })
125718
 * 	.addTo(map);
125719
 * ```
125720
 */
125721
 
125722
var FeatureGroup = LayerGroup.extend({
125723
 
125724
	addLayer: function (layer) {
125725
		if (this.hasLayer(layer)) {
125726
			return this;
125727
		}
125728
 
125729
		layer.addEventParent(this);
125730
 
125731
		LayerGroup.prototype.addLayer.call(this, layer);
125732
 
125733
		// @event layeradd: LayerEvent
125734
		// Fired when a layer is added to this `FeatureGroup`
125735
		return this.fire('layeradd', {layer: layer});
125736
	},
125737
 
125738
	removeLayer: function (layer) {
125739
		if (!this.hasLayer(layer)) {
125740
			return this;
125741
		}
125742
		if (layer in this._layers) {
125743
			layer = this._layers[layer];
125744
		}
125745
 
125746
		layer.removeEventParent(this);
125747
 
125748
		LayerGroup.prototype.removeLayer.call(this, layer);
125749
 
125750
		// @event layerremove: LayerEvent
125751
		// Fired when a layer is removed from this `FeatureGroup`
125752
		return this.fire('layerremove', {layer: layer});
125753
	},
125754
 
125755
	// @method setStyle(style: Path options): this
125756
	// Sets the given path options to each layer of the group that has a `setStyle` method.
125757
	setStyle: function (style) {
125758
		return this.invoke('setStyle', style);
125759
	},
125760
 
125761
	// @method bringToFront(): this
125762
	// Brings the layer group to the top of all other layers
125763
	bringToFront: function () {
125764
		return this.invoke('bringToFront');
125765
	},
125766
 
125767
	// @method bringToBack(): this
125768
	// Brings the layer group to the back of all other layers
125769
	bringToBack: function () {
125770
		return this.invoke('bringToBack');
125771
	},
125772
 
125773
	// @method getBounds(): LatLngBounds
125774
	// Returns the LatLngBounds of the Feature Group (created from bounds and coordinates of its children).
125775
	getBounds: function () {
125776
		var bounds = new LatLngBounds();
125777
 
125778
		for (var id in this._layers) {
125779
			var layer = this._layers[id];
125780
			bounds.extend(layer.getBounds ? layer.getBounds() : layer.getLatLng());
125781
		}
125782
		return bounds;
125783
	}
125784
});
125785
 
125786
// @factory L.featureGroup(layers: Layer[])
125787
// Create a feature group, optionally given an initial set of layers.
125788
var featureGroup = function (layers) {
125789
	return new FeatureGroup(layers);
125790
};
125791
 
125792
/*
125793
 * @class Icon
125794
 * @aka L.Icon
125795
 *
125796
 * Represents an icon to provide when creating a marker.
125797
 *
125798
 * @example
125799
 *
125800
 * ```js
125801
 * var myIcon = L.icon({
125802
 *     iconUrl: 'my-icon.png',
125803
 *     iconRetinaUrl: 'my-icon@2x.png',
125804
 *     iconSize: [38, 95],
125805
 *     iconAnchor: [22, 94],
125806
 *     popupAnchor: [-3, -76],
125807
 *     shadowUrl: 'my-icon-shadow.png',
125808
 *     shadowRetinaUrl: 'my-icon-shadow@2x.png',
125809
 *     shadowSize: [68, 95],
125810
 *     shadowAnchor: [22, 94]
125811
 * });
125812
 *
125813
 * L.marker([50.505, 30.57], {icon: myIcon}).addTo(map);
125814
 * ```
125815
 *
125816
 * `L.Icon.Default` extends `L.Icon` and is the blue icon Leaflet uses for markers by default.
125817
 *
125818
 */
125819
 
125820
var Icon = Class.extend({
125821
 
125822
	/* @section
125823
	 * @aka Icon options
125824
	 *
125825
	 * @option iconUrl: String = null
125826
	 * **(required)** The URL to the icon image (absolute or relative to your script path).
125827
	 *
125828
	 * @option iconRetinaUrl: String = null
125829
	 * The URL to a retina sized version of the icon image (absolute or relative to your
125830
	 * script path). Used for Retina screen devices.
125831
	 *
125832
	 * @option iconSize: Point = null
125833
	 * Size of the icon image in pixels.
125834
	 *
125835
	 * @option iconAnchor: Point = null
125836
	 * The coordinates of the "tip" of the icon (relative to its top left corner). The icon
125837
	 * will be aligned so that this point is at the marker's geographical location. Centered
125838
	 * by default if size is specified, also can be set in CSS with negative margins.
125839
	 *
125840
	 * @option popupAnchor: Point = [0, 0]
125841
	 * The coordinates of the point from which popups will "open", relative to the icon anchor.
125842
	 *
125843
	 * @option tooltipAnchor: Point = [0, 0]
125844
	 * The coordinates of the point from which tooltips will "open", relative to the icon anchor.
125845
	 *
125846
	 * @option shadowUrl: String = null
125847
	 * The URL to the icon shadow image. If not specified, no shadow image will be created.
125848
	 *
125849
	 * @option shadowRetinaUrl: String = null
125850
	 *
125851
	 * @option shadowSize: Point = null
125852
	 * Size of the shadow image in pixels.
125853
	 *
125854
	 * @option shadowAnchor: Point = null
125855
	 * The coordinates of the "tip" of the shadow (relative to its top left corner) (the same
125856
	 * as iconAnchor if not specified).
125857
	 *
125858
	 * @option className: String = ''
125859
	 * A custom class name to assign to both icon and shadow images. Empty by default.
125860
	 */
125861
 
125862
	options: {
125863
		popupAnchor: [0, 0],
125864
		tooltipAnchor: [0, 0],
125865
	},
125866
 
125867
	initialize: function (options) {
125868
		setOptions(this, options);
125869
	},
125870
 
125871
	// @method createIcon(oldIcon?: HTMLElement): HTMLElement
125872
	// Called internally when the icon has to be shown, returns a `<img>` HTML element
125873
	// styled according to the options.
125874
	createIcon: function (oldIcon) {
125875
		return this._createIcon('icon', oldIcon);
125876
	},
125877
 
125878
	// @method createShadow(oldIcon?: HTMLElement): HTMLElement
125879
	// As `createIcon`, but for the shadow beneath it.
125880
	createShadow: function (oldIcon) {
125881
		return this._createIcon('shadow', oldIcon);
125882
	},
125883
 
125884
	_createIcon: function (name, oldIcon) {
125885
		var src = this._getIconUrl(name);
125886
 
125887
		if (!src) {
125888
			if (name === 'icon') {
125889
				throw new Error('iconUrl not set in Icon options (see the docs).');
125890
			}
125891
			return null;
125892
		}
125893
 
125894
		var img = this._createImg(src, oldIcon && oldIcon.tagName === 'IMG' ? oldIcon : null);
125895
		this._setIconStyles(img, name);
125896
 
125897
		return img;
125898
	},
125899
 
125900
	_setIconStyles: function (img, name) {
125901
		var options = this.options;
125902
		var sizeOption = options[name + 'Size'];
125903
 
125904
		if (typeof sizeOption === 'number') {
125905
			sizeOption = [sizeOption, sizeOption];
125906
		}
125907
 
125908
		var size = toPoint(sizeOption),
125909
		    anchor = toPoint(name === 'shadow' && options.shadowAnchor || options.iconAnchor ||
125910
		            size && size.divideBy(2, true));
125911
 
125912
		img.className = 'leaflet-marker-' + name + ' ' + (options.className || '');
125913
 
125914
		if (anchor) {
125915
			img.style.marginLeft = (-anchor.x) + 'px';
125916
			img.style.marginTop  = (-anchor.y) + 'px';
125917
		}
125918
 
125919
		if (size) {
125920
			img.style.width  = size.x + 'px';
125921
			img.style.height = size.y + 'px';
125922
		}
125923
	},
125924
 
125925
	_createImg: function (src, el) {
125926
		el = el || document.createElement('img');
125927
		el.src = src;
125928
		return el;
125929
	},
125930
 
125931
	_getIconUrl: function (name) {
125932
		return retina && this.options[name + 'RetinaUrl'] || this.options[name + 'Url'];
125933
	}
125934
});
125935
 
125936
 
125937
// @factory L.icon(options: Icon options)
125938
// Creates an icon instance with the given options.
125939
function icon(options) {
125940
	return new Icon(options);
125941
}
125942
 
125943
/*
125944
 * @miniclass Icon.Default (Icon)
125945
 * @aka L.Icon.Default
125946
 * @section
125947
 *
125948
 * A trivial subclass of `Icon`, represents the icon to use in `Marker`s when
125949
 * no icon is specified. Points to the blue marker image distributed with Leaflet
125950
 * releases.
125951
 *
125952
 * In order to customize the default icon, just change the properties of `L.Icon.Default.prototype.options`
125953
 * (which is a set of `Icon options`).
125954
 *
125955
 * If you want to _completely_ replace the default icon, override the
125956
 * `L.Marker.prototype.options.icon` with your own icon instead.
125957
 */
125958
 
125959
var IconDefault = Icon.extend({
125960
 
125961
	options: {
125962
		iconUrl:       'marker-icon.png',
125963
		iconRetinaUrl: 'marker-icon-2x.png',
125964
		shadowUrl:     'marker-shadow.png',
125965
		iconSize:    [25, 41],
125966
		iconAnchor:  [12, 41],
125967
		popupAnchor: [1, -34],
125968
		tooltipAnchor: [16, -28],
125969
		shadowSize:  [41, 41]
125970
	},
125971
 
125972
	_getIconUrl: function (name) {
125973
		if (!IconDefault.imagePath) {	// Deprecated, backwards-compatibility only
125974
			IconDefault.imagePath = this._detectIconPath();
125975
		}
125976
 
125977
		// @option imagePath: String
125978
		// `Icon.Default` will try to auto-detect the location of the
125979
		// blue icon images. If you are placing these images in a non-standard
125980
		// way, set this option to point to the right path.
125981
		return (this.options.imagePath || IconDefault.imagePath) + Icon.prototype._getIconUrl.call(this, name);
125982
	},
125983
 
125984
	_detectIconPath: function () {
125985
		var el = create$1('div',  'leaflet-default-icon-path', document.body);
125986
		var path = getStyle(el, 'background-image') ||
125987
		           getStyle(el, 'backgroundImage');	// IE8
125988
 
125989
		document.body.removeChild(el);
125990
 
125991
		if (path === null || path.indexOf('url') !== 0) {
125992
			path = '';
125993
		} else {
125994
			path = path.replace(/^url\(["']?/, '').replace(/marker-icon\.png["']?\)$/, '');
125995
		}
125996
 
125997
		return path;
125998
	}
125999
});
126000
 
126001
/*
126002
 * L.Handler.MarkerDrag is used internally by L.Marker to make the markers draggable.
126003
 */
126004
 
126005
 
126006
/* @namespace Marker
126007
 * @section Interaction handlers
126008
 *
126009
 * Interaction handlers are properties of a marker instance that allow you to control interaction behavior in runtime, enabling or disabling certain features such as dragging (see `Handler` methods). Example:
126010
 *
126011
 * ```js
126012
 * marker.dragging.disable();
126013
 * ```
126014
 *
126015
 * @property dragging: Handler
126016
 * Marker dragging handler (by both mouse and touch). Only valid when the marker is on the map (Otherwise set [`marker.options.draggable`](#marker-draggable)).
126017
 */
126018
 
126019
var MarkerDrag = Handler.extend({
126020
	initialize: function (marker) {
126021
		this._marker = marker;
126022
	},
126023
 
126024
	addHooks: function () {
126025
		var icon = this._marker._icon;
126026
 
126027
		if (!this._draggable) {
126028
			this._draggable = new Draggable(icon, icon, true);
126029
		}
126030
 
126031
		this._draggable.on({
126032
			dragstart: this._onDragStart,
126033
			predrag: this._onPreDrag,
126034
			drag: this._onDrag,
126035
			dragend: this._onDragEnd
126036
		}, this).enable();
126037
 
126038
		addClass(icon, 'leaflet-marker-draggable');
126039
	},
126040
 
126041
	removeHooks: function () {
126042
		this._draggable.off({
126043
			dragstart: this._onDragStart,
126044
			predrag: this._onPreDrag,
126045
			drag: this._onDrag,
126046
			dragend: this._onDragEnd
126047
		}, this).disable();
126048
 
126049
		if (this._marker._icon) {
126050
			removeClass(this._marker._icon, 'leaflet-marker-draggable');
126051
		}
126052
	},
126053
 
126054
	moved: function () {
126055
		return this._draggable && this._draggable._moved;
126056
	},
126057
 
126058
	_adjustPan: function (e) {
126059
		var marker = this._marker,
126060
		    map = marker._map,
126061
		    speed = this._marker.options.autoPanSpeed,
126062
		    padding = this._marker.options.autoPanPadding,
126063
		    iconPos = getPosition(marker._icon),
126064
		    bounds = map.getPixelBounds(),
126065
		    origin = map.getPixelOrigin();
126066
 
126067
		var panBounds = toBounds(
126068
			bounds.min._subtract(origin).add(padding),
126069
			bounds.max._subtract(origin).subtract(padding)
126070
		);
126071
 
126072
		if (!panBounds.contains(iconPos)) {
126073
			// Compute incremental movement
126074
			var movement = toPoint(
126075
				(Math.max(panBounds.max.x, iconPos.x) - panBounds.max.x) / (bounds.max.x - panBounds.max.x) -
126076
				(Math.min(panBounds.min.x, iconPos.x) - panBounds.min.x) / (bounds.min.x - panBounds.min.x),
126077
 
126078
				(Math.max(panBounds.max.y, iconPos.y) - panBounds.max.y) / (bounds.max.y - panBounds.max.y) -
126079
				(Math.min(panBounds.min.y, iconPos.y) - panBounds.min.y) / (bounds.min.y - panBounds.min.y)
126080
			).multiplyBy(speed);
126081
 
126082
			map.panBy(movement, {animate: false});
126083
 
126084
			this._draggable._newPos._add(movement);
126085
			this._draggable._startPos._add(movement);
126086
 
126087
			setPosition(marker._icon, this._draggable._newPos);
126088
			this._onDrag(e);
126089
 
126090
			this._panRequest = requestAnimFrame(this._adjustPan.bind(this, e));
126091
		}
126092
	},
126093
 
126094
	_onDragStart: function () {
126095
		// @section Dragging events
126096
		// @event dragstart: Event
126097
		// Fired when the user starts dragging the marker.
126098
 
126099
		// @event movestart: Event
126100
		// Fired when the marker starts moving (because of dragging).
126101
 
126102
		this._oldLatLng = this._marker.getLatLng();
126103
		this._marker
126104
		    .closePopup()
126105
		    .fire('movestart')
126106
		    .fire('dragstart');
126107
	},
126108
 
126109
	_onPreDrag: function (e) {
126110
		if (this._marker.options.autoPan) {
126111
			cancelAnimFrame(this._panRequest);
126112
			this._panRequest = requestAnimFrame(this._adjustPan.bind(this, e));
126113
		}
126114
	},
126115
 
126116
	_onDrag: function (e) {
126117
		var marker = this._marker,
126118
		    shadow = marker._shadow,
126119
		    iconPos = getPosition(marker._icon),
126120
		    latlng = marker._map.layerPointToLatLng(iconPos);
126121
 
126122
		// update shadow position
126123
		if (shadow) {
126124
			setPosition(shadow, iconPos);
126125
		}
126126
 
126127
		marker._latlng = latlng;
126128
		e.latlng = latlng;
126129
		e.oldLatLng = this._oldLatLng;
126130
 
126131
		// @event drag: Event
126132
		// Fired repeatedly while the user drags the marker.
126133
		marker
126134
		    .fire('move', e)
126135
		    .fire('drag', e);
126136
	},
126137
 
126138
	_onDragEnd: function (e) {
126139
		// @event dragend: DragEndEvent
126140
		// Fired when the user stops dragging the marker.
126141
 
126142
		 cancelAnimFrame(this._panRequest);
126143
 
126144
		// @event moveend: Event
126145
		// Fired when the marker stops moving (because of dragging).
126146
		delete this._oldLatLng;
126147
		this._marker
126148
		    .fire('moveend')
126149
		    .fire('dragend', e);
126150
	}
126151
});
126152
 
126153
/*
126154
 * @class Marker
126155
 * @inherits Interactive layer
126156
 * @aka L.Marker
126157
 * L.Marker is used to display clickable/draggable icons on the map. Extends `Layer`.
126158
 *
126159
 * @example
126160
 *
126161
 * ```js
126162
 * L.marker([50.5, 30.5]).addTo(map);
126163
 * ```
126164
 */
126165
 
126166
var Marker = Layer.extend({
126167
 
126168
	// @section
126169
	// @aka Marker options
126170
	options: {
126171
		// @option icon: Icon = *
126172
		// Icon instance to use for rendering the marker.
126173
		// See [Icon documentation](#L.Icon) for details on how to customize the marker icon.
126174
		// If not specified, a common instance of `L.Icon.Default` is used.
126175
		icon: new IconDefault(),
126176
 
126177
		// Option inherited from "Interactive layer" abstract class
126178
		interactive: true,
126179
 
126180
		// @option draggable: Boolean = false
126181
		// Whether the marker is draggable with mouse/touch or not.
126182
		draggable: false,
126183
 
126184
		// @option autoPan: Boolean = false
126185
		// Set it to `true` if you want the map to do panning animation when marker hits the edges.
126186
		autoPan: false,
126187
 
126188
		// @option autoPanPadding: Point = Point(50, 50)
126189
		// Equivalent of setting both top left and bottom right autopan padding to the same value.
126190
		autoPanPadding: [50, 50],
126191
 
126192
		// @option autoPanSpeed: Number = 10
126193
		// Number of pixels the map should move by.
126194
		autoPanSpeed: 10,
126195
 
126196
		// @option keyboard: Boolean = true
126197
		// Whether the marker can be tabbed to with a keyboard and clicked by pressing enter.
126198
		keyboard: true,
126199
 
126200
		// @option title: String = ''
126201
		// Text for the browser tooltip that appear on marker hover (no tooltip by default).
126202
		title: '',
126203
 
126204
		// @option alt: String = ''
126205
		// Text for the `alt` attribute of the icon image (useful for accessibility).
126206
		alt: '',
126207
 
126208
		// @option zIndexOffset: Number = 0
126209
		// By default, marker images zIndex is set automatically based on its latitude. Use this option if you want to put the marker on top of all others (or below), specifying a high value like `1000` (or high negative value, respectively).
126210
		zIndexOffset: 0,
126211
 
126212
		// @option opacity: Number = 1.0
126213
		// The opacity of the marker.
126214
		opacity: 1,
126215
 
126216
		// @option riseOnHover: Boolean = false
126217
		// If `true`, the marker will get on top of others when you hover the mouse over it.
126218
		riseOnHover: false,
126219
 
126220
		// @option riseOffset: Number = 250
126221
		// The z-index offset used for the `riseOnHover` feature.
126222
		riseOffset: 250,
126223
 
126224
		// @option pane: String = 'markerPane'
126225
		// `Map pane` where the markers icon will be added.
126226
		pane: 'markerPane',
126227
 
126228
		// @option bubblingMouseEvents: Boolean = false
126229
		// When `true`, a mouse event on this marker will trigger the same event on the map
126230
		// (unless [`L.DomEvent.stopPropagation`](#domevent-stoppropagation) is used).
126231
		bubblingMouseEvents: false
126232
	},
126233
 
126234
	/* @section
126235
	 *
126236
	 * In addition to [shared layer methods](#Layer) like `addTo()` and `remove()` and [popup methods](#Popup) like bindPopup() you can also use the following methods:
126237
	 */
126238
 
126239
	initialize: function (latlng, options) {
126240
		setOptions(this, options);
126241
		this._latlng = toLatLng(latlng);
126242
	},
126243
 
126244
	onAdd: function (map) {
126245
		this._zoomAnimated = this._zoomAnimated && map.options.markerZoomAnimation;
126246
 
126247
		if (this._zoomAnimated) {
126248
			map.on('zoomanim', this._animateZoom, this);
126249
		}
126250
 
126251
		this._initIcon();
126252
		this.update();
126253
	},
126254
 
126255
	onRemove: function (map) {
126256
		if (this.dragging && this.dragging.enabled()) {
126257
			this.options.draggable = true;
126258
			this.dragging.removeHooks();
126259
		}
126260
		delete this.dragging;
126261
 
126262
		if (this._zoomAnimated) {
126263
			map.off('zoomanim', this._animateZoom, this);
126264
		}
126265
 
126266
		this._removeIcon();
126267
		this._removeShadow();
126268
	},
126269
 
126270
	getEvents: function () {
126271
		return {
126272
			zoom: this.update,
126273
			viewreset: this.update
126274
		};
126275
	},
126276
 
126277
	// @method getLatLng: LatLng
126278
	// Returns the current geographical position of the marker.
126279
	getLatLng: function () {
126280
		return this._latlng;
126281
	},
126282
 
126283
	// @method setLatLng(latlng: LatLng): this
126284
	// Changes the marker position to the given point.
126285
	setLatLng: function (latlng) {
126286
		var oldLatLng = this._latlng;
126287
		this._latlng = toLatLng(latlng);
126288
		this.update();
126289
 
126290
		// @event move: Event
126291
		// Fired when the marker is moved via [`setLatLng`](#marker-setlatlng) or by [dragging](#marker-dragging). Old and new coordinates are included in event arguments as `oldLatLng`, `latlng`.
126292
		return this.fire('move', {oldLatLng: oldLatLng, latlng: this._latlng});
126293
	},
126294
 
126295
	// @method setZIndexOffset(offset: Number): this
126296
	// Changes the [zIndex offset](#marker-zindexoffset) of the marker.
126297
	setZIndexOffset: function (offset) {
126298
		this.options.zIndexOffset = offset;
126299
		return this.update();
126300
	},
126301
 
126302
	// @method setIcon(icon: Icon): this
126303
	// Changes the marker icon.
126304
	setIcon: function (icon) {
126305
 
126306
		this.options.icon = icon;
126307
 
126308
		if (this._map) {
126309
			this._initIcon();
126310
			this.update();
126311
		}
126312
 
126313
		if (this._popup) {
126314
			this.bindPopup(this._popup, this._popup.options);
126315
		}
126316
 
126317
		return this;
126318
	},
126319
 
126320
	getElement: function () {
126321
		return this._icon;
126322
	},
126323
 
126324
	update: function () {
126325
 
126326
		if (this._icon && this._map) {
126327
			var pos = this._map.latLngToLayerPoint(this._latlng).round();
126328
			this._setPos(pos);
126329
		}
126330
 
126331
		return this;
126332
	},
126333
 
126334
	_initIcon: function () {
126335
		var options = this.options,
126336
		    classToAdd = 'leaflet-zoom-' + (this._zoomAnimated ? 'animated' : 'hide');
126337
 
126338
		var icon = options.icon.createIcon(this._icon),
126339
		    addIcon = false;
126340
 
126341
		// if we're not reusing the icon, remove the old one and init new one
126342
		if (icon !== this._icon) {
126343
			if (this._icon) {
126344
				this._removeIcon();
126345
			}
126346
			addIcon = true;
126347
 
126348
			if (options.title) {
126349
				icon.title = options.title;
126350
			}
126351
 
126352
			if (icon.tagName === 'IMG') {
126353
				icon.alt = options.alt || '';
126354
			}
126355
		}
126356
 
126357
		addClass(icon, classToAdd);
126358
 
126359
		if (options.keyboard) {
126360
			icon.tabIndex = '0';
126361
		}
126362
 
126363
		this._icon = icon;
126364
 
126365
		if (options.riseOnHover) {
126366
			this.on({
126367
				mouseover: this._bringToFront,
126368
				mouseout: this._resetZIndex
126369
			});
126370
		}
126371
 
126372
		var newShadow = options.icon.createShadow(this._shadow),
126373
		    addShadow = false;
126374
 
126375
		if (newShadow !== this._shadow) {
126376
			this._removeShadow();
126377
			addShadow = true;
126378
		}
126379
 
126380
		if (newShadow) {
126381
			addClass(newShadow, classToAdd);
126382
			newShadow.alt = '';
126383
		}
126384
		this._shadow = newShadow;
126385
 
126386
 
126387
		if (options.opacity < 1) {
126388
			this._updateOpacity();
126389
		}
126390
 
126391
 
126392
		if (addIcon) {
126393
			this.getPane().appendChild(this._icon);
126394
		}
126395
		this._initInteraction();
126396
		if (newShadow && addShadow) {
126397
			this.getPane('shadowPane').appendChild(this._shadow);
126398
		}
126399
	},
126400
 
126401
	_removeIcon: function () {
126402
		if (this.options.riseOnHover) {
126403
			this.off({
126404
				mouseover: this._bringToFront,
126405
				mouseout: this._resetZIndex
126406
			});
126407
		}
126408
 
126409
		remove(this._icon);
126410
		this.removeInteractiveTarget(this._icon);
126411
 
126412
		this._icon = null;
126413
	},
126414
 
126415
	_removeShadow: function () {
126416
		if (this._shadow) {
126417
			remove(this._shadow);
126418
		}
126419
		this._shadow = null;
126420
	},
126421
 
126422
	_setPos: function (pos) {
126423
		setPosition(this._icon, pos);
126424
 
126425
		if (this._shadow) {
126426
			setPosition(this._shadow, pos);
126427
		}
126428
 
126429
		this._zIndex = pos.y + this.options.zIndexOffset;
126430
 
126431
		this._resetZIndex();
126432
	},
126433
 
126434
	_updateZIndex: function (offset) {
126435
		this._icon.style.zIndex = this._zIndex + offset;
126436
	},
126437
 
126438
	_animateZoom: function (opt) {
126439
		var pos = this._map._latLngToNewLayerPoint(this._latlng, opt.zoom, opt.center).round();
126440
 
126441
		this._setPos(pos);
126442
	},
126443
 
126444
	_initInteraction: function () {
126445
 
126446
		if (!this.options.interactive) { return; }
126447
 
126448
		addClass(this._icon, 'leaflet-interactive');
126449
 
126450
		this.addInteractiveTarget(this._icon);
126451
 
126452
		if (MarkerDrag) {
126453
			var draggable = this.options.draggable;
126454
			if (this.dragging) {
126455
				draggable = this.dragging.enabled();
126456
				this.dragging.disable();
126457
			}
126458
 
126459
			this.dragging = new MarkerDrag(this);
126460
 
126461
			if (draggable) {
126462
				this.dragging.enable();
126463
			}
126464
		}
126465
	},
126466
 
126467
	// @method setOpacity(opacity: Number): this
126468
	// Changes the opacity of the marker.
126469
	setOpacity: function (opacity) {
126470
		this.options.opacity = opacity;
126471
		if (this._map) {
126472
			this._updateOpacity();
126473
		}
126474
 
126475
		return this;
126476
	},
126477
 
126478
	_updateOpacity: function () {
126479
		var opacity = this.options.opacity;
126480
 
126481
		setOpacity(this._icon, opacity);
126482
 
126483
		if (this._shadow) {
126484
			setOpacity(this._shadow, opacity);
126485
		}
126486
	},
126487
 
126488
	_bringToFront: function () {
126489
		this._updateZIndex(this.options.riseOffset);
126490
	},
126491
 
126492
	_resetZIndex: function () {
126493
		this._updateZIndex(0);
126494
	},
126495
 
126496
	_getPopupAnchor: function () {
126497
		return this.options.icon.options.popupAnchor;
126498
	},
126499
 
126500
	_getTooltipAnchor: function () {
126501
		return this.options.icon.options.tooltipAnchor;
126502
	}
126503
});
126504
 
126505
 
126506
// factory L.marker(latlng: LatLng, options? : Marker options)
126507
 
126508
// @factory L.marker(latlng: LatLng, options? : Marker options)
126509
// Instantiates a Marker object given a geographical point and optionally an options object.
126510
function marker(latlng, options) {
126511
	return new Marker(latlng, options);
126512
}
126513
 
126514
/*
126515
 * @class Path
126516
 * @aka L.Path
126517
 * @inherits Interactive layer
126518
 *
126519
 * An abstract class that contains options and constants shared between vector
126520
 * overlays (Polygon, Polyline, Circle). Do not use it directly. Extends `Layer`.
126521
 */
126522
 
126523
var Path = Layer.extend({
126524
 
126525
	// @section
126526
	// @aka Path options
126527
	options: {
126528
		// @option stroke: Boolean = true
126529
		// Whether to draw stroke along the path. Set it to `false` to disable borders on polygons or circles.
126530
		stroke: true,
126531
 
126532
		// @option color: String = '#3388ff'
126533
		// Stroke color
126534
		color: '#3388ff',
126535
 
126536
		// @option weight: Number = 3
126537
		// Stroke width in pixels
126538
		weight: 3,
126539
 
126540
		// @option opacity: Number = 1.0
126541
		// Stroke opacity
126542
		opacity: 1,
126543
 
126544
		// @option lineCap: String= 'round'
126545
		// A string that defines [shape to be used at the end](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-linecap) of the stroke.
126546
		lineCap: 'round',
126547
 
126548
		// @option lineJoin: String = 'round'
126549
		// A string that defines [shape to be used at the corners](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-linejoin) of the stroke.
126550
		lineJoin: 'round',
126551
 
126552
		// @option dashArray: String = null
126553
		// A string that defines the stroke [dash pattern](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-dasharray). Doesn't work on `Canvas`-powered layers in [some old browsers](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility).
126554
		dashArray: null,
126555
 
126556
		// @option dashOffset: String = null
126557
		// A string that defines the [distance into the dash pattern to start the dash](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-dashoffset). Doesn't work on `Canvas`-powered layers in [some old browsers](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility).
126558
		dashOffset: null,
126559
 
126560
		// @option fill: Boolean = depends
126561
		// Whether to fill the path with color. Set it to `false` to disable filling on polygons or circles.
126562
		fill: false,
126563
 
126564
		// @option fillColor: String = *
126565
		// Fill color. Defaults to the value of the [`color`](#path-color) option
126566
		fillColor: null,
126567
 
126568
		// @option fillOpacity: Number = 0.2
126569
		// Fill opacity.
126570
		fillOpacity: 0.2,
126571
 
126572
		// @option fillRule: String = 'evenodd'
126573
		// A string that defines [how the inside of a shape](https://developer.mozilla.org/docs/Web/SVG/Attribute/fill-rule) is determined.
126574
		fillRule: 'evenodd',
126575
 
126576
		// className: '',
126577
 
126578
		// Option inherited from "Interactive layer" abstract class
126579
		interactive: true,
126580
 
126581
		// @option bubblingMouseEvents: Boolean = true
126582
		// When `true`, a mouse event on this path will trigger the same event on the map
126583
		// (unless [`L.DomEvent.stopPropagation`](#domevent-stoppropagation) is used).
126584
		bubblingMouseEvents: true
126585
	},
126586
 
126587
	beforeAdd: function (map) {
126588
		// Renderer is set here because we need to call renderer.getEvents
126589
		// before this.getEvents.
126590
		this._renderer = map.getRenderer(this);
126591
	},
126592
 
126593
	onAdd: function () {
126594
		this._renderer._initPath(this);
126595
		this._reset();
126596
		this._renderer._addPath(this);
126597
	},
126598
 
126599
	onRemove: function () {
126600
		this._renderer._removePath(this);
126601
	},
126602
 
126603
	// @method redraw(): this
126604
	// Redraws the layer. Sometimes useful after you changed the coordinates that the path uses.
126605
	redraw: function () {
126606
		if (this._map) {
126607
			this._renderer._updatePath(this);
126608
		}
126609
		return this;
126610
	},
126611
 
126612
	// @method setStyle(style: Path options): this
126613
	// Changes the appearance of a Path based on the options in the `Path options` object.
126614
	setStyle: function (style) {
126615
		setOptions(this, style);
126616
		if (this._renderer) {
126617
			this._renderer._updateStyle(this);
126618
		}
126619
		return this;
126620
	},
126621
 
126622
	// @method bringToFront(): this
126623
	// Brings the layer to the top of all path layers.
126624
	bringToFront: function () {
126625
		if (this._renderer) {
126626
			this._renderer._bringToFront(this);
126627
		}
126628
		return this;
126629
	},
126630
 
126631
	// @method bringToBack(): this
126632
	// Brings the layer to the bottom of all path layers.
126633
	bringToBack: function () {
126634
		if (this._renderer) {
126635
			this._renderer._bringToBack(this);
126636
		}
126637
		return this;
126638
	},
126639
 
126640
	getElement: function () {
126641
		return this._path;
126642
	},
126643
 
126644
	_reset: function () {
126645
		// defined in child classes
126646
		this._project();
126647
		this._update();
126648
	},
126649
 
126650
	_clickTolerance: function () {
126651
		// used when doing hit detection for Canvas layers
126652
		return (this.options.stroke ? this.options.weight / 2 : 0) + this._renderer.options.tolerance;
126653
	}
126654
});
126655
 
126656
/*
126657
 * @class CircleMarker
126658
 * @aka L.CircleMarker
126659
 * @inherits Path
126660
 *
126661
 * A circle of a fixed size with radius specified in pixels. Extends `Path`.
126662
 */
126663
 
126664
var CircleMarker = Path.extend({
126665
 
126666
	// @section
126667
	// @aka CircleMarker options
126668
	options: {
126669
		fill: true,
126670
 
126671
		// @option radius: Number = 10
126672
		// Radius of the circle marker, in pixels
126673
		radius: 10
126674
	},
126675
 
126676
	initialize: function (latlng, options) {
126677
		setOptions(this, options);
126678
		this._latlng = toLatLng(latlng);
126679
		this._radius = this.options.radius;
126680
	},
126681
 
126682
	// @method setLatLng(latLng: LatLng): this
126683
	// Sets the position of a circle marker to a new location.
126684
	setLatLng: function (latlng) {
126685
		this._latlng = toLatLng(latlng);
126686
		this.redraw();
126687
		return this.fire('move', {latlng: this._latlng});
126688
	},
126689
 
126690
	// @method getLatLng(): LatLng
126691
	// Returns the current geographical position of the circle marker
126692
	getLatLng: function () {
126693
		return this._latlng;
126694
	},
126695
 
126696
	// @method setRadius(radius: Number): this
126697
	// Sets the radius of a circle marker. Units are in pixels.
126698
	setRadius: function (radius) {
126699
		this.options.radius = this._radius = radius;
126700
		return this.redraw();
126701
	},
126702
 
126703
	// @method getRadius(): Number
126704
	// Returns the current radius of the circle
126705
	getRadius: function () {
126706
		return this._radius;
126707
	},
126708
 
126709
	setStyle : function (options) {
126710
		var radius = options && options.radius || this._radius;
126711
		Path.prototype.setStyle.call(this, options);
126712
		this.setRadius(radius);
126713
		return this;
126714
	},
126715
 
126716
	_project: function () {
126717
		this._point = this._map.latLngToLayerPoint(this._latlng);
126718
		this._updateBounds();
126719
	},
126720
 
126721
	_updateBounds: function () {
126722
		var r = this._radius,
126723
		    r2 = this._radiusY || r,
126724
		    w = this._clickTolerance(),
126725
		    p = [r + w, r2 + w];
126726
		this._pxBounds = new Bounds(this._point.subtract(p), this._point.add(p));
126727
	},
126728
 
126729
	_update: function () {
126730
		if (this._map) {
126731
			this._updatePath();
126732
		}
126733
	},
126734
 
126735
	_updatePath: function () {
126736
		this._renderer._updateCircle(this);
126737
	},
126738
 
126739
	_empty: function () {
126740
		return this._radius && !this._renderer._bounds.intersects(this._pxBounds);
126741
	},
126742
 
126743
	// Needed by the `Canvas` renderer for interactivity
126744
	_containsPoint: function (p) {
126745
		return p.distanceTo(this._point) <= this._radius + this._clickTolerance();
126746
	}
126747
});
126748
 
126749
 
126750
// @factory L.circleMarker(latlng: LatLng, options?: CircleMarker options)
126751
// Instantiates a circle marker object given a geographical point, and an optional options object.
126752
function circleMarker(latlng, options) {
126753
	return new CircleMarker(latlng, options);
126754
}
126755
 
126756
/*
126757
 * @class Circle
126758
 * @aka L.Circle
126759
 * @inherits CircleMarker
126760
 *
126761
 * A class for drawing circle overlays on a map. Extends `CircleMarker`.
126762
 *
126763
 * It's an approximation and starts to diverge from a real circle closer to poles (due to projection distortion).
126764
 *
126765
 * @example
126766
 *
126767
 * ```js
126768
 * L.circle([50.5, 30.5], {radius: 200}).addTo(map);
126769
 * ```
126770
 */
126771
 
126772
var Circle = CircleMarker.extend({
126773
 
126774
	initialize: function (latlng, options, legacyOptions) {
126775
		if (typeof options === 'number') {
126776
			// Backwards compatibility with 0.7.x factory (latlng, radius, options?)
126777
			options = extend({}, legacyOptions, {radius: options});
126778
		}
126779
		setOptions(this, options);
126780
		this._latlng = toLatLng(latlng);
126781
 
126782
		if (isNaN(this.options.radius)) { throw new Error('Circle radius cannot be NaN'); }
126783
 
126784
		// @section
126785
		// @aka Circle options
126786
		// @option radius: Number; Radius of the circle, in meters.
126787
		this._mRadius = this.options.radius;
126788
	},
126789
 
126790
	// @method setRadius(radius: Number): this
126791
	// Sets the radius of a circle. Units are in meters.
126792
	setRadius: function (radius) {
126793
		this._mRadius = radius;
126794
		return this.redraw();
126795
	},
126796
 
126797
	// @method getRadius(): Number
126798
	// Returns the current radius of a circle. Units are in meters.
126799
	getRadius: function () {
126800
		return this._mRadius;
126801
	},
126802
 
126803
	// @method getBounds(): LatLngBounds
126804
	// Returns the `LatLngBounds` of the path.
126805
	getBounds: function () {
126806
		var half = [this._radius, this._radiusY || this._radius];
126807
 
126808
		return new LatLngBounds(
126809
			this._map.layerPointToLatLng(this._point.subtract(half)),
126810
			this._map.layerPointToLatLng(this._point.add(half)));
126811
	},
126812
 
126813
	setStyle: Path.prototype.setStyle,
126814
 
126815
	_project: function () {
126816
 
126817
		var lng = this._latlng.lng,
126818
		    lat = this._latlng.lat,
126819
		    map = this._map,
126820
		    crs = map.options.crs;
126821
 
126822
		if (crs.distance === Earth.distance) {
126823
			var d = Math.PI / 180,
126824
			    latR = (this._mRadius / Earth.R) / d,
126825
			    top = map.project([lat + latR, lng]),
126826
			    bottom = map.project([lat - latR, lng]),
126827
			    p = top.add(bottom).divideBy(2),
126828
			    lat2 = map.unproject(p).lat,
126829
			    lngR = Math.acos((Math.cos(latR * d) - Math.sin(lat * d) * Math.sin(lat2 * d)) /
126830
			            (Math.cos(lat * d) * Math.cos(lat2 * d))) / d;
126831
 
126832
			if (isNaN(lngR) || lngR === 0) {
126833
				lngR = latR / Math.cos(Math.PI / 180 * lat); // Fallback for edge case, #2425
126834
			}
126835
 
126836
			this._point = p.subtract(map.getPixelOrigin());
126837
			this._radius = isNaN(lngR) ? 0 : p.x - map.project([lat2, lng - lngR]).x;
126838
			this._radiusY = p.y - top.y;
126839
 
126840
		} else {
126841
			var latlng2 = crs.unproject(crs.project(this._latlng).subtract([this._mRadius, 0]));
126842
 
126843
			this._point = map.latLngToLayerPoint(this._latlng);
126844
			this._radius = this._point.x - map.latLngToLayerPoint(latlng2).x;
126845
		}
126846
 
126847
		this._updateBounds();
126848
	}
126849
});
126850
 
126851
// @factory L.circle(latlng: LatLng, options?: Circle options)
126852
// Instantiates a circle object given a geographical point, and an options object
126853
// which contains the circle radius.
126854
// @alternative
126855
// @factory L.circle(latlng: LatLng, radius: Number, options?: Circle options)
126856
// Obsolete way of instantiating a circle, for compatibility with 0.7.x code.
126857
// Do not use in new applications or plugins.
126858
function circle(latlng, options, legacyOptions) {
126859
	return new Circle(latlng, options, legacyOptions);
126860
}
126861
 
126862
/*
126863
 * @class Polyline
126864
 * @aka L.Polyline
126865
 * @inherits Path
126866
 *
126867
 * A class for drawing polyline overlays on a map. Extends `Path`.
126868
 *
126869
 * @example
126870
 *
126871
 * ```js
126872
 * // create a red polyline from an array of LatLng points
126873
 * var latlngs = [
126874
 * 	[45.51, -122.68],
126875
 * 	[37.77, -122.43],
126876
 * 	[34.04, -118.2]
126877
 * ];
126878
 *
126879
 * var polyline = L.polyline(latlngs, {color: 'red'}).addTo(map);
126880
 *
126881
 * // zoom the map to the polyline
126882
 * map.fitBounds(polyline.getBounds());
126883
 * ```
126884
 *
126885
 * You can also pass a multi-dimensional array to represent a `MultiPolyline` shape:
126886
 *
126887
 * ```js
126888
 * // create a red polyline from an array of arrays of LatLng points
126889
 * var latlngs = [
126890
 * 	[[45.51, -122.68],
126891
 * 	 [37.77, -122.43],
126892
 * 	 [34.04, -118.2]],
126893
 * 	[[40.78, -73.91],
126894
 * 	 [41.83, -87.62],
126895
 * 	 [32.76, -96.72]]
126896
 * ];
126897
 * ```
126898
 */
126899
 
126900
 
126901
var Polyline = Path.extend({
126902
 
126903
	// @section
126904
	// @aka Polyline options
126905
	options: {
126906
		// @option smoothFactor: Number = 1.0
126907
		// How much to simplify the polyline on each zoom level. More means
126908
		// better performance and smoother look, and less means more accurate representation.
126909
		smoothFactor: 1.0,
126910
 
126911
		// @option noClip: Boolean = false
126912
		// Disable polyline clipping.
126913
		noClip: false
126914
	},
126915
 
126916
	initialize: function (latlngs, options) {
126917
		setOptions(this, options);
126918
		this._setLatLngs(latlngs);
126919
	},
126920
 
126921
	// @method getLatLngs(): LatLng[]
126922
	// Returns an array of the points in the path, or nested arrays of points in case of multi-polyline.
126923
	getLatLngs: function () {
126924
		return this._latlngs;
126925
	},
126926
 
126927
	// @method setLatLngs(latlngs: LatLng[]): this
126928
	// Replaces all the points in the polyline with the given array of geographical points.
126929
	setLatLngs: function (latlngs) {
126930
		this._setLatLngs(latlngs);
126931
		return this.redraw();
126932
	},
126933
 
126934
	// @method isEmpty(): Boolean
126935
	// Returns `true` if the Polyline has no LatLngs.
126936
	isEmpty: function () {
126937
		return !this._latlngs.length;
126938
	},
126939
 
126940
	// @method closestLayerPoint(p: Point): Point
126941
	// Returns the point closest to `p` on the Polyline.
126942
	closestLayerPoint: function (p) {
126943
		var minDistance = Infinity,
126944
		    minPoint = null,
126945
		    closest = _sqClosestPointOnSegment,
126946
		    p1, p2;
126947
 
126948
		for (var j = 0, jLen = this._parts.length; j < jLen; j++) {
126949
			var points = this._parts[j];
126950
 
126951
			for (var i = 1, len = points.length; i < len; i++) {
126952
				p1 = points[i - 1];
126953
				p2 = points[i];
126954
 
126955
				var sqDist = closest(p, p1, p2, true);
126956
 
126957
				if (sqDist < minDistance) {
126958
					minDistance = sqDist;
126959
					minPoint = closest(p, p1, p2);
126960
				}
126961
			}
126962
		}
126963
		if (minPoint) {
126964
			minPoint.distance = Math.sqrt(minDistance);
126965
		}
126966
		return minPoint;
126967
	},
126968
 
126969
	// @method getCenter(): LatLng
126970
	// Returns the center ([centroid](http://en.wikipedia.org/wiki/Centroid)) of the polyline.
126971
	getCenter: function () {
126972
		// throws error when not yet added to map as this center calculation requires projected coordinates
126973
		if (!this._map) {
126974
			throw new Error('Must add layer to map before using getCenter()');
126975
		}
126976
 
126977
		var i, halfDist, segDist, dist, p1, p2, ratio,
126978
		    points = this._rings[0],
126979
		    len = points.length;
126980
 
126981
		if (!len) { return null; }
126982
 
126983
		// polyline centroid algorithm; only uses the first ring if there are multiple
126984
 
126985
		for (i = 0, halfDist = 0; i < len - 1; i++) {
126986
			halfDist += points[i].distanceTo(points[i + 1]) / 2;
126987
		}
126988
 
126989
		// The line is so small in the current view that all points are on the same pixel.
126990
		if (halfDist === 0) {
126991
			return this._map.layerPointToLatLng(points[0]);
126992
		}
126993
 
126994
		for (i = 0, dist = 0; i < len - 1; i++) {
126995
			p1 = points[i];
126996
			p2 = points[i + 1];
126997
			segDist = p1.distanceTo(p2);
126998
			dist += segDist;
126999
 
127000
			if (dist > halfDist) {
127001
				ratio = (dist - halfDist) / segDist;
127002
				return this._map.layerPointToLatLng([
127003
					p2.x - ratio * (p2.x - p1.x),
127004
					p2.y - ratio * (p2.y - p1.y)
127005
				]);
127006
			}
127007
		}
127008
	},
127009
 
127010
	// @method getBounds(): LatLngBounds
127011
	// Returns the `LatLngBounds` of the path.
127012
	getBounds: function () {
127013
		return this._bounds;
127014
	},
127015
 
127016
	// @method addLatLng(latlng: LatLng, latlngs? LatLng[]): this
127017
	// Adds a given point to the polyline. By default, adds to the first ring of
127018
	// the polyline in case of a multi-polyline, but can be overridden by passing
127019
	// a specific ring as a LatLng array (that you can earlier access with [`getLatLngs`](#polyline-getlatlngs)).
127020
	addLatLng: function (latlng, latlngs) {
127021
		latlngs = latlngs || this._defaultShape();
127022
		latlng = toLatLng(latlng);
127023
		latlngs.push(latlng);
127024
		this._bounds.extend(latlng);
127025
		return this.redraw();
127026
	},
127027
 
127028
	_setLatLngs: function (latlngs) {
127029
		this._bounds = new LatLngBounds();
127030
		this._latlngs = this._convertLatLngs(latlngs);
127031
	},
127032
 
127033
	_defaultShape: function () {
127034
		return isFlat(this._latlngs) ? this._latlngs : this._latlngs[0];
127035
	},
127036
 
127037
	// recursively convert latlngs input into actual LatLng instances; calculate bounds along the way
127038
	_convertLatLngs: function (latlngs) {
127039
		var result = [],
127040
		    flat = isFlat(latlngs);
127041
 
127042
		for (var i = 0, len = latlngs.length; i < len; i++) {
127043
			if (flat) {
127044
				result[i] = toLatLng(latlngs[i]);
127045
				this._bounds.extend(result[i]);
127046
			} else {
127047
				result[i] = this._convertLatLngs(latlngs[i]);
127048
			}
127049
		}
127050
 
127051
		return result;
127052
	},
127053
 
127054
	_project: function () {
127055
		var pxBounds = new Bounds();
127056
		this._rings = [];
127057
		this._projectLatlngs(this._latlngs, this._rings, pxBounds);
127058
 
127059
		var w = this._clickTolerance(),
127060
		    p = new Point(w, w);
127061
 
127062
		if (this._bounds.isValid() && pxBounds.isValid()) {
127063
			pxBounds.min._subtract(p);
127064
			pxBounds.max._add(p);
127065
			this._pxBounds = pxBounds;
127066
		}
127067
	},
127068
 
127069
	// recursively turns latlngs into a set of rings with projected coordinates
127070
	_projectLatlngs: function (latlngs, result, projectedBounds) {
127071
		var flat = latlngs[0] instanceof LatLng,
127072
		    len = latlngs.length,
127073
		    i, ring;
127074
 
127075
		if (flat) {
127076
			ring = [];
127077
			for (i = 0; i < len; i++) {
127078
				ring[i] = this._map.latLngToLayerPoint(latlngs[i]);
127079
				projectedBounds.extend(ring[i]);
127080
			}
127081
			result.push(ring);
127082
		} else {
127083
			for (i = 0; i < len; i++) {
127084
				this._projectLatlngs(latlngs[i], result, projectedBounds);
127085
			}
127086
		}
127087
	},
127088
 
127089
	// clip polyline by renderer bounds so that we have less to render for performance
127090
	_clipPoints: function () {
127091
		var bounds = this._renderer._bounds;
127092
 
127093
		this._parts = [];
127094
		if (!this._pxBounds || !this._pxBounds.intersects(bounds)) {
127095
			return;
127096
		}
127097
 
127098
		if (this.options.noClip) {
127099
			this._parts = this._rings;
127100
			return;
127101
		}
127102
 
127103
		var parts = this._parts,
127104
		    i, j, k, len, len2, segment, points;
127105
 
127106
		for (i = 0, k = 0, len = this._rings.length; i < len; i++) {
127107
			points = this._rings[i];
127108
 
127109
			for (j = 0, len2 = points.length; j < len2 - 1; j++) {
127110
				segment = clipSegment(points[j], points[j + 1], bounds, j, true);
127111
 
127112
				if (!segment) { continue; }
127113
 
127114
				parts[k] = parts[k] || [];
127115
				parts[k].push(segment[0]);
127116
 
127117
				// if segment goes out of screen, or it's the last one, it's the end of the line part
127118
				if ((segment[1] !== points[j + 1]) || (j === len2 - 2)) {
127119
					parts[k].push(segment[1]);
127120
					k++;
127121
				}
127122
			}
127123
		}
127124
	},
127125
 
127126
	// simplify each clipped part of the polyline for performance
127127
	_simplifyPoints: function () {
127128
		var parts = this._parts,
127129
		    tolerance = this.options.smoothFactor;
127130
 
127131
		for (var i = 0, len = parts.length; i < len; i++) {
127132
			parts[i] = simplify(parts[i], tolerance);
127133
		}
127134
	},
127135
 
127136
	_update: function () {
127137
		if (!this._map) { return; }
127138
 
127139
		this._clipPoints();
127140
		this._simplifyPoints();
127141
		this._updatePath();
127142
	},
127143
 
127144
	_updatePath: function () {
127145
		this._renderer._updatePoly(this);
127146
	},
127147
 
127148
	// Needed by the `Canvas` renderer for interactivity
127149
	_containsPoint: function (p, closed) {
127150
		var i, j, k, len, len2, part,
127151
		    w = this._clickTolerance();
127152
 
127153
		if (!this._pxBounds || !this._pxBounds.contains(p)) { return false; }
127154
 
127155
		// hit detection for polylines
127156
		for (i = 0, len = this._parts.length; i < len; i++) {
127157
			part = this._parts[i];
127158
 
127159
			for (j = 0, len2 = part.length, k = len2 - 1; j < len2; k = j++) {
127160
				if (!closed && (j === 0)) { continue; }
127161
 
127162
				if (pointToSegmentDistance(p, part[k], part[j]) <= w) {
127163
					return true;
127164
				}
127165
			}
127166
		}
127167
		return false;
127168
	}
127169
});
127170
 
127171
// @factory L.polyline(latlngs: LatLng[], options?: Polyline options)
127172
// Instantiates a polyline object given an array of geographical points and
127173
// optionally an options object. You can create a `Polyline` object with
127174
// multiple separate lines (`MultiPolyline`) by passing an array of arrays
127175
// of geographic points.
127176
function polyline(latlngs, options) {
127177
	return new Polyline(latlngs, options);
127178
}
127179
 
127180
// Retrocompat. Allow plugins to support Leaflet versions before and after 1.1.
127181
Polyline._flat = _flat;
127182
 
127183
/*
127184
 * @class Polygon
127185
 * @aka L.Polygon
127186
 * @inherits Polyline
127187
 *
127188
 * A class for drawing polygon overlays on a map. Extends `Polyline`.
127189
 *
127190
 * Note that points you pass when creating a polygon shouldn't have an additional last point equal to the first one — it's better to filter out such points.
127191
 *
127192
 *
127193
 * @example
127194
 *
127195
 * ```js
127196
 * // create a red polygon from an array of LatLng points
127197
 * var latlngs = [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]];
127198
 *
127199
 * var polygon = L.polygon(latlngs, {color: 'red'}).addTo(map);
127200
 *
127201
 * // zoom the map to the polygon
127202
 * map.fitBounds(polygon.getBounds());
127203
 * ```
127204
 *
127205
 * You can also pass an array of arrays of latlngs, with the first array representing the outer shape and the other arrays representing holes in the outer shape:
127206
 *
127207
 * ```js
127208
 * var latlngs = [
127209
 *   [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]], // outer ring
127210
 *   [[37.29, -108.58],[40.71, -108.58],[40.71, -102.50],[37.29, -102.50]] // hole
127211
 * ];
127212
 * ```
127213
 *
127214
 * Additionally, you can pass a multi-dimensional array to represent a MultiPolygon shape.
127215
 *
127216
 * ```js
127217
 * var latlngs = [
127218
 *   [ // first polygon
127219
 *     [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]], // outer ring
127220
 *     [[37.29, -108.58],[40.71, -108.58],[40.71, -102.50],[37.29, -102.50]] // hole
127221
 *   ],
127222
 *   [ // second polygon
127223
 *     [[41, -111.03],[45, -111.04],[45, -104.05],[41, -104.05]]
127224
 *   ]
127225
 * ];
127226
 * ```
127227
 */
127228
 
127229
var Polygon = Polyline.extend({
127230
 
127231
	options: {
127232
		fill: true
127233
	},
127234
 
127235
	isEmpty: function () {
127236
		return !this._latlngs.length || !this._latlngs[0].length;
127237
	},
127238
 
127239
	getCenter: function () {
127240
		// throws error when not yet added to map as this center calculation requires projected coordinates
127241
		if (!this._map) {
127242
			throw new Error('Must add layer to map before using getCenter()');
127243
		}
127244
 
127245
		var i, j, p1, p2, f, area, x, y, center,
127246
		    points = this._rings[0],
127247
		    len = points.length;
127248
 
127249
		if (!len) { return null; }
127250
 
127251
		// polygon centroid algorithm; only uses the first ring if there are multiple
127252
 
127253
		area = x = y = 0;
127254
 
127255
		for (i = 0, j = len - 1; i < len; j = i++) {
127256
			p1 = points[i];
127257
			p2 = points[j];
127258
 
127259
			f = p1.y * p2.x - p2.y * p1.x;
127260
			x += (p1.x + p2.x) * f;
127261
			y += (p1.y + p2.y) * f;
127262
			area += f * 3;
127263
		}
127264
 
127265
		if (area === 0) {
127266
			// Polygon is so small that all points are on same pixel.
127267
			center = points[0];
127268
		} else {
127269
			center = [x / area, y / area];
127270
		}
127271
		return this._map.layerPointToLatLng(center);
127272
	},
127273
 
127274
	_convertLatLngs: function (latlngs) {
127275
		var result = Polyline.prototype._convertLatLngs.call(this, latlngs),
127276
		    len = result.length;
127277
 
127278
		// remove last point if it equals first one
127279
		if (len >= 2 && result[0] instanceof LatLng && result[0].equals(result[len - 1])) {
127280
			result.pop();
127281
		}
127282
		return result;
127283
	},
127284
 
127285
	_setLatLngs: function (latlngs) {
127286
		Polyline.prototype._setLatLngs.call(this, latlngs);
127287
		if (isFlat(this._latlngs)) {
127288
			this._latlngs = [this._latlngs];
127289
		}
127290
	},
127291
 
127292
	_defaultShape: function () {
127293
		return isFlat(this._latlngs[0]) ? this._latlngs[0] : this._latlngs[0][0];
127294
	},
127295
 
127296
	_clipPoints: function () {
127297
		// polygons need a different clipping algorithm so we redefine that
127298
 
127299
		var bounds = this._renderer._bounds,
127300
		    w = this.options.weight,
127301
		    p = new Point(w, w);
127302
 
127303
		// increase clip padding by stroke width to avoid stroke on clip edges
127304
		bounds = new Bounds(bounds.min.subtract(p), bounds.max.add(p));
127305
 
127306
		this._parts = [];
127307
		if (!this._pxBounds || !this._pxBounds.intersects(bounds)) {
127308
			return;
127309
		}
127310
 
127311
		if (this.options.noClip) {
127312
			this._parts = this._rings;
127313
			return;
127314
		}
127315
 
127316
		for (var i = 0, len = this._rings.length, clipped; i < len; i++) {
127317
			clipped = clipPolygon(this._rings[i], bounds, true);
127318
			if (clipped.length) {
127319
				this._parts.push(clipped);
127320
			}
127321
		}
127322
	},
127323
 
127324
	_updatePath: function () {
127325
		this._renderer._updatePoly(this, true);
127326
	},
127327
 
127328
	// Needed by the `Canvas` renderer for interactivity
127329
	_containsPoint: function (p) {
127330
		var inside = false,
127331
		    part, p1, p2, i, j, k, len, len2;
127332
 
127333
		if (!this._pxBounds || !this._pxBounds.contains(p)) { return false; }
127334
 
127335
		// ray casting algorithm for detecting if point is in polygon
127336
		for (i = 0, len = this._parts.length; i < len; i++) {
127337
			part = this._parts[i];
127338
 
127339
			for (j = 0, len2 = part.length, k = len2 - 1; j < len2; k = j++) {
127340
				p1 = part[j];
127341
				p2 = part[k];
127342
 
127343
				if (((p1.y > p.y) !== (p2.y > p.y)) && (p.x < (p2.x - p1.x) * (p.y - p1.y) / (p2.y - p1.y) + p1.x)) {
127344
					inside = !inside;
127345
				}
127346
			}
127347
		}
127348
 
127349
		// also check if it's on polygon stroke
127350
		return inside || Polyline.prototype._containsPoint.call(this, p, true);
127351
	}
127352
 
127353
});
127354
 
127355
 
127356
// @factory L.polygon(latlngs: LatLng[], options?: Polyline options)
127357
function polygon(latlngs, options) {
127358
	return new Polygon(latlngs, options);
127359
}
127360
 
127361
/*
127362
 * @class GeoJSON
127363
 * @aka L.GeoJSON
127364
 * @inherits FeatureGroup
127365
 *
127366
 * Represents a GeoJSON object or an array of GeoJSON objects. Allows you to parse
127367
 * GeoJSON data and display it on the map. Extends `FeatureGroup`.
127368
 *
127369
 * @example
127370
 *
127371
 * ```js
127372
 * L.geoJSON(data, {
127373
 * 	style: function (feature) {
127374
 * 		return {color: feature.properties.color};
127375
 * 	}
127376
 * }).bindPopup(function (layer) {
127377
 * 	return layer.feature.properties.description;
127378
 * }).addTo(map);
127379
 * ```
127380
 */
127381
 
127382
var GeoJSON = FeatureGroup.extend({
127383
 
127384
	/* @section
127385
	 * @aka GeoJSON options
127386
	 *
127387
	 * @option pointToLayer: Function = *
127388
	 * A `Function` defining how GeoJSON points spawn Leaflet layers. It is internally
127389
	 * called when data is added, passing the GeoJSON point feature and its `LatLng`.
127390
	 * The default is to spawn a default `Marker`:
127391
	 * ```js
127392
	 * function(geoJsonPoint, latlng) {
127393
	 * 	return L.marker(latlng);
127394
	 * }
127395
	 * ```
127396
	 *
127397
	 * @option style: Function = *
127398
	 * A `Function` defining the `Path options` for styling GeoJSON lines and polygons,
127399
	 * called internally when data is added.
127400
	 * The default value is to not override any defaults:
127401
	 * ```js
127402
	 * function (geoJsonFeature) {
127403
	 * 	return {}
127404
	 * }
127405
	 * ```
127406
	 *
127407
	 * @option onEachFeature: Function = *
127408
	 * A `Function` that will be called once for each created `Feature`, after it has
127409
	 * been created and styled. Useful for attaching events and popups to features.
127410
	 * The default is to do nothing with the newly created layers:
127411
	 * ```js
127412
	 * function (feature, layer) {}
127413
	 * ```
127414
	 *
127415
	 * @option filter: Function = *
127416
	 * A `Function` that will be used to decide whether to include a feature or not.
127417
	 * The default is to include all features:
127418
	 * ```js
127419
	 * function (geoJsonFeature) {
127420
	 * 	return true;
127421
	 * }
127422
	 * ```
127423
	 * Note: dynamically changing the `filter` option will have effect only on newly
127424
	 * added data. It will _not_ re-evaluate already included features.
127425
	 *
127426
	 * @option coordsToLatLng: Function = *
127427
	 * A `Function` that will be used for converting GeoJSON coordinates to `LatLng`s.
127428
	 * The default is the `coordsToLatLng` static method.
127429
	 */
127430
 
127431
	initialize: function (geojson, options) {
127432
		setOptions(this, options);
127433
 
127434
		this._layers = {};
127435
 
127436
		if (geojson) {
127437
			this.addData(geojson);
127438
		}
127439
	},
127440
 
127441
	// @method addData( <GeoJSON> data ): this
127442
	// Adds a GeoJSON object to the layer.
127443
	addData: function (geojson) {
127444
		var features = isArray(geojson) ? geojson : geojson.features,
127445
		    i, len, feature;
127446
 
127447
		if (features) {
127448
			for (i = 0, len = features.length; i < len; i++) {
127449
				// only add this if geometry or geometries are set and not null
127450
				feature = features[i];
127451
				if (feature.geometries || feature.geometry || feature.features || feature.coordinates) {
127452
					this.addData(feature);
127453
				}
127454
			}
127455
			return this;
127456
		}
127457
 
127458
		var options = this.options;
127459
 
127460
		if (options.filter && !options.filter(geojson)) { return this; }
127461
 
127462
		var layer = geometryToLayer(geojson, options);
127463
		if (!layer) {
127464
			return this;
127465
		}
127466
		layer.feature = asFeature(geojson);
127467
 
127468
		layer.defaultOptions = layer.options;
127469
		this.resetStyle(layer);
127470
 
127471
		if (options.onEachFeature) {
127472
			options.onEachFeature(geojson, layer);
127473
		}
127474
 
127475
		return this.addLayer(layer);
127476
	},
127477
 
127478
	// @method resetStyle( <Path> layer ): this
127479
	// Resets the given vector layer's style to the original GeoJSON style, useful for resetting style after hover events.
127480
	resetStyle: function (layer) {
127481
		// reset any custom styles
127482
		layer.options = extend({}, layer.defaultOptions);
127483
		this._setLayerStyle(layer, this.options.style);
127484
		return this;
127485
	},
127486
 
127487
	// @method setStyle( <Function> style ): this
127488
	// Changes styles of GeoJSON vector layers with the given style function.
127489
	setStyle: function (style) {
127490
		return this.eachLayer(function (layer) {
127491
			this._setLayerStyle(layer, style);
127492
		}, this);
127493
	},
127494
 
127495
	_setLayerStyle: function (layer, style) {
127496
		if (typeof style === 'function') {
127497
			style = style(layer.feature);
127498
		}
127499
		if (layer.setStyle) {
127500
			layer.setStyle(style);
127501
		}
127502
	}
127503
});
127504
 
127505
// @section
127506
// There are several static functions which can be called without instantiating L.GeoJSON:
127507
 
127508
// @function geometryToLayer(featureData: Object, options?: GeoJSON options): Layer
127509
// Creates a `Layer` from a given GeoJSON feature. Can use a custom
127510
// [`pointToLayer`](#geojson-pointtolayer) and/or [`coordsToLatLng`](#geojson-coordstolatlng)
127511
// functions if provided as options.
127512
function geometryToLayer(geojson, options) {
127513
 
127514
	var geometry = geojson.type === 'Feature' ? geojson.geometry : geojson,
127515
	    coords = geometry ? geometry.coordinates : null,
127516
	    layers = [],
127517
	    pointToLayer = options && options.pointToLayer,
127518
	    _coordsToLatLng = options && options.coordsToLatLng || coordsToLatLng,
127519
	    latlng, latlngs, i, len;
127520
 
127521
	if (!coords && !geometry) {
127522
		return null;
127523
	}
127524
 
127525
	switch (geometry.type) {
127526
	case 'Point':
127527
		latlng = _coordsToLatLng(coords);
127528
		return pointToLayer ? pointToLayer(geojson, latlng) : new Marker(latlng);
127529
 
127530
	case 'MultiPoint':
127531
		for (i = 0, len = coords.length; i < len; i++) {
127532
			latlng = _coordsToLatLng(coords[i]);
127533
			layers.push(pointToLayer ? pointToLayer(geojson, latlng) : new Marker(latlng));
127534
		}
127535
		return new FeatureGroup(layers);
127536
 
127537
	case 'LineString':
127538
	case 'MultiLineString':
127539
		latlngs = coordsToLatLngs(coords, geometry.type === 'LineString' ? 0 : 1, _coordsToLatLng);
127540
		return new Polyline(latlngs, options);
127541
 
127542
	case 'Polygon':
127543
	case 'MultiPolygon':
127544
		latlngs = coordsToLatLngs(coords, geometry.type === 'Polygon' ? 1 : 2, _coordsToLatLng);
127545
		return new Polygon(latlngs, options);
127546
 
127547
	case 'GeometryCollection':
127548
		for (i = 0, len = geometry.geometries.length; i < len; i++) {
127549
			var layer = geometryToLayer({
127550
				geometry: geometry.geometries[i],
127551
				type: 'Feature',
127552
				properties: geojson.properties
127553
			}, options);
127554
 
127555
			if (layer) {
127556
				layers.push(layer);
127557
			}
127558
		}
127559
		return new FeatureGroup(layers);
127560
 
127561
	default:
127562
		throw new Error('Invalid GeoJSON object.');
127563
	}
127564
}
127565
 
127566
// @function coordsToLatLng(coords: Array): LatLng
127567
// Creates a `LatLng` object from an array of 2 numbers (longitude, latitude)
127568
// or 3 numbers (longitude, latitude, altitude) used in GeoJSON for points.
127569
function coordsToLatLng(coords) {
127570
	return new LatLng(coords[1], coords[0], coords[2]);
127571
}
127572
 
127573
// @function coordsToLatLngs(coords: Array, levelsDeep?: Number, coordsToLatLng?: Function): Array
127574
// Creates a multidimensional array of `LatLng`s from a GeoJSON coordinates array.
127575
// `levelsDeep` specifies the nesting level (0 is for an array of points, 1 for an array of arrays of points, etc., 0 by default).
127576
// Can use a custom [`coordsToLatLng`](#geojson-coordstolatlng) function.
127577
function coordsToLatLngs(coords, levelsDeep, _coordsToLatLng) {
127578
	var latlngs = [];
127579
 
127580
	for (var i = 0, len = coords.length, latlng; i < len; i++) {
127581
		latlng = levelsDeep ?
127582
			coordsToLatLngs(coords[i], levelsDeep - 1, _coordsToLatLng) :
127583
			(_coordsToLatLng || coordsToLatLng)(coords[i]);
127584
 
127585
		latlngs.push(latlng);
127586
	}
127587
 
127588
	return latlngs;
127589
}
127590
 
127591
// @function latLngToCoords(latlng: LatLng, precision?: Number): Array
127592
// Reverse of [`coordsToLatLng`](#geojson-coordstolatlng)
127593
function latLngToCoords(latlng, precision) {
127594
	precision = typeof precision === 'number' ? precision : 6;
127595
	return latlng.alt !== undefined ?
127596
		[formatNum(latlng.lng, precision), formatNum(latlng.lat, precision), formatNum(latlng.alt, precision)] :
127597
		[formatNum(latlng.lng, precision), formatNum(latlng.lat, precision)];
127598
}
127599
 
127600
// @function latLngsToCoords(latlngs: Array, levelsDeep?: Number, closed?: Boolean): Array
127601
// Reverse of [`coordsToLatLngs`](#geojson-coordstolatlngs)
127602
// `closed` determines whether the first point should be appended to the end of the array to close the feature, only used when `levelsDeep` is 0. False by default.
127603
function latLngsToCoords(latlngs, levelsDeep, closed, precision) {
127604
	var coords = [];
127605
 
127606
	for (var i = 0, len = latlngs.length; i < len; i++) {
127607
		coords.push(levelsDeep ?
127608
			latLngsToCoords(latlngs[i], levelsDeep - 1, closed, precision) :
127609
			latLngToCoords(latlngs[i], precision));
127610
	}
127611
 
127612
	if (!levelsDeep && closed) {
127613
		coords.push(coords[0]);
127614
	}
127615
 
127616
	return coords;
127617
}
127618
 
127619
function getFeature(layer, newGeometry) {
127620
	return layer.feature ?
127621
		extend({}, layer.feature, {geometry: newGeometry}) :
127622
		asFeature(newGeometry);
127623
}
127624
 
127625
// @function asFeature(geojson: Object): Object
127626
// Normalize GeoJSON geometries/features into GeoJSON features.
127627
function asFeature(geojson) {
127628
	if (geojson.type === 'Feature' || geojson.type === 'FeatureCollection') {
127629
		return geojson;
127630
	}
127631
 
127632
	return {
127633
		type: 'Feature',
127634
		properties: {},
127635
		geometry: geojson
127636
	};
127637
}
127638
 
127639
var PointToGeoJSON = {
127640
	toGeoJSON: function (precision) {
127641
		return getFeature(this, {
127642
			type: 'Point',
127643
			coordinates: latLngToCoords(this.getLatLng(), precision)
127644
		});
127645
	}
127646
};
127647
 
127648
// @namespace Marker
127649
// @method toGeoJSON(): Object
127650
// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the marker (as a GeoJSON `Point` Feature).
127651
Marker.include(PointToGeoJSON);
127652
 
127653
// @namespace CircleMarker
127654
// @method toGeoJSON(): Object
127655
// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the circle marker (as a GeoJSON `Point` Feature).
127656
Circle.include(PointToGeoJSON);
127657
CircleMarker.include(PointToGeoJSON);
127658
 
127659
 
127660
// @namespace Polyline
127661
// @method toGeoJSON(): Object
127662
// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the polyline (as a GeoJSON `LineString` or `MultiLineString` Feature).
127663
Polyline.include({
127664
	toGeoJSON: function (precision) {
127665
		var multi = !isFlat(this._latlngs);
127666
 
127667
		var coords = latLngsToCoords(this._latlngs, multi ? 1 : 0, false, precision);
127668
 
127669
		return getFeature(this, {
127670
			type: (multi ? 'Multi' : '') + 'LineString',
127671
			coordinates: coords
127672
		});
127673
	}
127674
});
127675
 
127676
// @namespace Polygon
127677
// @method toGeoJSON(): Object
127678
// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the polygon (as a GeoJSON `Polygon` or `MultiPolygon` Feature).
127679
Polygon.include({
127680
	toGeoJSON: function (precision) {
127681
		var holes = !isFlat(this._latlngs),
127682
		    multi = holes && !isFlat(this._latlngs[0]);
127683
 
127684
		var coords = latLngsToCoords(this._latlngs, multi ? 2 : holes ? 1 : 0, true, precision);
127685
 
127686
		if (!holes) {
127687
			coords = [coords];
127688
		}
127689
 
127690
		return getFeature(this, {
127691
			type: (multi ? 'Multi' : '') + 'Polygon',
127692
			coordinates: coords
127693
		});
127694
	}
127695
});
127696
 
127697
 
127698
// @namespace LayerGroup
127699
LayerGroup.include({
127700
	toMultiPoint: function (precision) {
127701
		var coords = [];
127702
 
127703
		this.eachLayer(function (layer) {
127704
			coords.push(layer.toGeoJSON(precision).geometry.coordinates);
127705
		});
127706
 
127707
		return getFeature(this, {
127708
			type: 'MultiPoint',
127709
			coordinates: coords
127710
		});
127711
	},
127712
 
127713
	// @method toGeoJSON(): Object
127714
	// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the layer group (as a GeoJSON `FeatureCollection`, `GeometryCollection`, or `MultiPoint`).
127715
	toGeoJSON: function (precision) {
127716
 
127717
		var type = this.feature && this.feature.geometry && this.feature.geometry.type;
127718
 
127719
		if (type === 'MultiPoint') {
127720
			return this.toMultiPoint(precision);
127721
		}
127722
 
127723
		var isGeometryCollection = type === 'GeometryCollection',
127724
		    jsons = [];
127725
 
127726
		this.eachLayer(function (layer) {
127727
			if (layer.toGeoJSON) {
127728
				var json = layer.toGeoJSON(precision);
127729
				if (isGeometryCollection) {
127730
					jsons.push(json.geometry);
127731
				} else {
127732
					var feature = asFeature(json);
127733
					// Squash nested feature collections
127734
					if (feature.type === 'FeatureCollection') {
127735
						jsons.push.apply(jsons, feature.features);
127736
					} else {
127737
						jsons.push(feature);
127738
					}
127739
				}
127740
			}
127741
		});
127742
 
127743
		if (isGeometryCollection) {
127744
			return getFeature(this, {
127745
				geometries: jsons,
127746
				type: 'GeometryCollection'
127747
			});
127748
		}
127749
 
127750
		return {
127751
			type: 'FeatureCollection',
127752
			features: jsons
127753
		};
127754
	}
127755
});
127756
 
127757
// @namespace GeoJSON
127758
// @factory L.geoJSON(geojson?: Object, options?: GeoJSON options)
127759
// Creates a GeoJSON layer. Optionally accepts an object in
127760
// [GeoJSON format](https://tools.ietf.org/html/rfc7946) to display on the map
127761
// (you can alternatively add it later with `addData` method) and an `options` object.
127762
function geoJSON(geojson, options) {
127763
	return new GeoJSON(geojson, options);
127764
}
127765
 
127766
// Backward compatibility.
127767
var geoJson = geoJSON;
127768
 
127769
/*
127770
 * @class ImageOverlay
127771
 * @aka L.ImageOverlay
127772
 * @inherits Interactive layer
127773
 *
127774
 * Used to load and display a single image over specific bounds of the map. Extends `Layer`.
127775
 *
127776
 * @example
127777
 *
127778
 * ```js
127779
 * var imageUrl = 'http://www.lib.utexas.edu/maps/historical/newark_nj_1922.jpg',
127780
 * 	imageBounds = [[40.712216, -74.22655], [40.773941, -74.12544]];
127781
 * L.imageOverlay(imageUrl, imageBounds).addTo(map);
127782
 * ```
127783
 */
127784
 
127785
var ImageOverlay = Layer.extend({
127786
 
127787
	// @section
127788
	// @aka ImageOverlay options
127789
	options: {
127790
		// @option opacity: Number = 1.0
127791
		// The opacity of the image overlay.
127792
		opacity: 1,
127793
 
127794
		// @option alt: String = ''
127795
		// Text for the `alt` attribute of the image (useful for accessibility).
127796
		alt: '',
127797
 
127798
		// @option interactive: Boolean = false
127799
		// If `true`, the image overlay will emit [mouse events](#interactive-layer) when clicked or hovered.
127800
		interactive: false,
127801
 
127802
		// @option crossOrigin: Boolean|String = false
127803
		// Whether the crossOrigin attribute will be added to the image.
127804
		// If a String is provided, the image will have its crossOrigin attribute set to the String provided. This is needed if you want to access image pixel data.
127805
		// Refer to [CORS Settings](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for valid String values.
127806
		crossOrigin: false,
127807
 
127808
		// @option errorOverlayUrl: String = ''
127809
		// URL to the overlay image to show in place of the overlay that failed to load.
127810
		errorOverlayUrl: '',
127811
 
127812
		// @option zIndex: Number = 1
127813
		// The explicit [zIndex](https://developer.mozilla.org/docs/Web/CSS/CSS_Positioning/Understanding_z_index) of the tile layer.
127814
		zIndex: 1,
127815
 
127816
		// @option className: String = ''
127817
		// A custom class name to assign to the image. Empty by default.
127818
		className: '',
127819
	},
127820
 
127821
	initialize: function (url, bounds, options) { // (String, LatLngBounds, Object)
127822
		this._url = url;
127823
		this._bounds = toLatLngBounds(bounds);
127824
 
127825
		setOptions(this, options);
127826
	},
127827
 
127828
	onAdd: function () {
127829
		if (!this._image) {
127830
			this._initImage();
127831
 
127832
			if (this.options.opacity < 1) {
127833
				this._updateOpacity();
127834
			}
127835
		}
127836
 
127837
		if (this.options.interactive) {
127838
			addClass(this._image, 'leaflet-interactive');
127839
			this.addInteractiveTarget(this._image);
127840
		}
127841
 
127842
		this.getPane().appendChild(this._image);
127843
		this._reset();
127844
	},
127845
 
127846
	onRemove: function () {
127847
		remove(this._image);
127848
		if (this.options.interactive) {
127849
			this.removeInteractiveTarget(this._image);
127850
		}
127851
	},
127852
 
127853
	// @method setOpacity(opacity: Number): this
127854
	// Sets the opacity of the overlay.
127855
	setOpacity: function (opacity) {
127856
		this.options.opacity = opacity;
127857
 
127858
		if (this._image) {
127859
			this._updateOpacity();
127860
		}
127861
		return this;
127862
	},
127863
 
127864
	setStyle: function (styleOpts) {
127865
		if (styleOpts.opacity) {
127866
			this.setOpacity(styleOpts.opacity);
127867
		}
127868
		return this;
127869
	},
127870
 
127871
	// @method bringToFront(): this
127872
	// Brings the layer to the top of all overlays.
127873
	bringToFront: function () {
127874
		if (this._map) {
127875
			toFront(this._image);
127876
		}
127877
		return this;
127878
	},
127879
 
127880
	// @method bringToBack(): this
127881
	// Brings the layer to the bottom of all overlays.
127882
	bringToBack: function () {
127883
		if (this._map) {
127884
			toBack(this._image);
127885
		}
127886
		return this;
127887
	},
127888
 
127889
	// @method setUrl(url: String): this
127890
	// Changes the URL of the image.
127891
	setUrl: function (url) {
127892
		this._url = url;
127893
 
127894
		if (this._image) {
127895
			this._image.src = url;
127896
		}
127897
		return this;
127898
	},
127899
 
127900
	// @method setBounds(bounds: LatLngBounds): this
127901
	// Update the bounds that this ImageOverlay covers
127902
	setBounds: function (bounds) {
127903
		this._bounds = toLatLngBounds(bounds);
127904
 
127905
		if (this._map) {
127906
			this._reset();
127907
		}
127908
		return this;
127909
	},
127910
 
127911
	getEvents: function () {
127912
		var events = {
127913
			zoom: this._reset,
127914
			viewreset: this._reset
127915
		};
127916
 
127917
		if (this._zoomAnimated) {
127918
			events.zoomanim = this._animateZoom;
127919
		}
127920
 
127921
		return events;
127922
	},
127923
 
127924
	// @method: setZIndex(value: Number) : this
127925
	// Changes the [zIndex](#imageoverlay-zindex) of the image overlay.
127926
	setZIndex: function (value) {
127927
		this.options.zIndex = value;
127928
		this._updateZIndex();
127929
		return this;
127930
	},
127931
 
127932
	// @method getBounds(): LatLngBounds
127933
	// Get the bounds that this ImageOverlay covers
127934
	getBounds: function () {
127935
		return this._bounds;
127936
	},
127937
 
127938
	// @method getElement(): HTMLElement
127939
	// Returns the instance of [`HTMLImageElement`](https://developer.mozilla.org/docs/Web/API/HTMLImageElement)
127940
	// used by this overlay.
127941
	getElement: function () {
127942
		return this._image;
127943
	},
127944
 
127945
	_initImage: function () {
127946
		var wasElementSupplied = this._url.tagName === 'IMG';
127947
		var img = this._image = wasElementSupplied ? this._url : create$1('img');
127948
 
127949
		addClass(img, 'leaflet-image-layer');
127950
		if (this._zoomAnimated) { addClass(img, 'leaflet-zoom-animated'); }
127951
		if (this.options.className) { addClass(img, this.options.className); }
127952
 
127953
		img.onselectstart = falseFn;
127954
		img.onmousemove = falseFn;
127955
 
127956
		// @event load: Event
127957
		// Fired when the ImageOverlay layer has loaded its image
127958
		img.onload = bind(this.fire, this, 'load');
127959
		img.onerror = bind(this._overlayOnError, this, 'error');
127960
 
127961
		if (this.options.crossOrigin || this.options.crossOrigin === '') {
127962
			img.crossOrigin = this.options.crossOrigin === true ? '' : this.options.crossOrigin;
127963
		}
127964
 
127965
		if (this.options.zIndex) {
127966
			this._updateZIndex();
127967
		}
127968
 
127969
		if (wasElementSupplied) {
127970
			this._url = img.src;
127971
			return;
127972
		}
127973
 
127974
		img.src = this._url;
127975
		img.alt = this.options.alt;
127976
	},
127977
 
127978
	_animateZoom: function (e) {
127979
		var scale = this._map.getZoomScale(e.zoom),
127980
		    offset = this._map._latLngBoundsToNewLayerBounds(this._bounds, e.zoom, e.center).min;
127981
 
127982
		setTransform(this._image, offset, scale);
127983
	},
127984
 
127985
	_reset: function () {
127986
		var image = this._image,
127987
		    bounds = new Bounds(
127988
		        this._map.latLngToLayerPoint(this._bounds.getNorthWest()),
127989
		        this._map.latLngToLayerPoint(this._bounds.getSouthEast())),
127990
		    size = bounds.getSize();
127991
 
127992
		setPosition(image, bounds.min);
127993
 
127994
		image.style.width  = size.x + 'px';
127995
		image.style.height = size.y + 'px';
127996
	},
127997
 
127998
	_updateOpacity: function () {
127999
		setOpacity(this._image, this.options.opacity);
128000
	},
128001
 
128002
	_updateZIndex: function () {
128003
		if (this._image && this.options.zIndex !== undefined && this.options.zIndex !== null) {
128004
			this._image.style.zIndex = this.options.zIndex;
128005
		}
128006
	},
128007
 
128008
	_overlayOnError: function () {
128009
		// @event error: Event
128010
		// Fired when the ImageOverlay layer has loaded its image
128011
		this.fire('error');
128012
 
128013
		var errorUrl = this.options.errorOverlayUrl;
128014
		if (errorUrl && this._url !== errorUrl) {
128015
			this._url = errorUrl;
128016
			this._image.src = errorUrl;
128017
		}
128018
	}
128019
});
128020
 
128021
// @factory L.imageOverlay(imageUrl: String, bounds: LatLngBounds, options?: ImageOverlay options)
128022
// Instantiates an image overlay object given the URL of the image and the
128023
// geographical bounds it is tied to.
128024
var imageOverlay = function (url, bounds, options) {
128025
	return new ImageOverlay(url, bounds, options);
128026
};
128027
 
128028
/*
128029
 * @class VideoOverlay
128030
 * @aka L.VideoOverlay
128031
 * @inherits ImageOverlay
128032
 *
128033
 * Used to load and display a video player over specific bounds of the map. Extends `ImageOverlay`.
128034
 *
128035
 * A video overlay uses the [`<video>`](https://developer.mozilla.org/docs/Web/HTML/Element/video)
128036
 * HTML5 element.
128037
 *
128038
 * @example
128039
 *
128040
 * ```js
128041
 * var videoUrl = 'https://www.mapbox.com/bites/00188/patricia_nasa.webm',
128042
 * 	videoBounds = [[ 32, -130], [ 13, -100]];
128043
 * L.videoOverlay(videoUrl, videoBounds ).addTo(map);
128044
 * ```
128045
 */
128046
 
128047
var VideoOverlay = ImageOverlay.extend({
128048
 
128049
	// @section
128050
	// @aka VideoOverlay options
128051
	options: {
128052
		// @option autoplay: Boolean = true
128053
		// Whether the video starts playing automatically when loaded.
128054
		autoplay: true,
128055
 
128056
		// @option loop: Boolean = true
128057
		// Whether the video will loop back to the beginning when played.
128058
		loop: true
128059
	},
128060
 
128061
	_initImage: function () {
128062
		var wasElementSupplied = this._url.tagName === 'VIDEO';
128063
		var vid = this._image = wasElementSupplied ? this._url : create$1('video');
128064
 
128065
		addClass(vid, 'leaflet-image-layer');
128066
		if (this._zoomAnimated) { addClass(vid, 'leaflet-zoom-animated'); }
128067
 
128068
		vid.onselectstart = falseFn;
128069
		vid.onmousemove = falseFn;
128070
 
128071
		// @event load: Event
128072
		// Fired when the video has finished loading the first frame
128073
		vid.onloadeddata = bind(this.fire, this, 'load');
128074
 
128075
		if (wasElementSupplied) {
128076
			var sourceElements = vid.getElementsByTagName('source');
128077
			var sources = [];
128078
			for (var j = 0; j < sourceElements.length; j++) {
128079
				sources.push(sourceElements[j].src);
128080
			}
128081
 
128082
			this._url = (sourceElements.length > 0) ? sources : [vid.src];
128083
			return;
128084
		}
128085
 
128086
		if (!isArray(this._url)) { this._url = [this._url]; }
128087
 
128088
		vid.autoplay = !!this.options.autoplay;
128089
		vid.loop = !!this.options.loop;
128090
		for (var i = 0; i < this._url.length; i++) {
128091
			var source = create$1('source');
128092
			source.src = this._url[i];
128093
			vid.appendChild(source);
128094
		}
128095
	}
128096
 
128097
	// @method getElement(): HTMLVideoElement
128098
	// Returns the instance of [`HTMLVideoElement`](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement)
128099
	// used by this overlay.
128100
});
128101
 
128102
 
128103
// @factory L.videoOverlay(video: String|Array|HTMLVideoElement, bounds: LatLngBounds, options?: VideoOverlay options)
128104
// Instantiates an image overlay object given the URL of the video (or array of URLs, or even a video element) and the
128105
// geographical bounds it is tied to.
128106
 
128107
function videoOverlay(video, bounds, options) {
128108
	return new VideoOverlay(video, bounds, options);
128109
}
128110
 
128111
/*
128112
 * @class DivOverlay
128113
 * @inherits Layer
128114
 * @aka L.DivOverlay
128115
 * Base model for L.Popup and L.Tooltip. Inherit from it for custom popup like plugins.
128116
 */
128117
 
128118
// @namespace DivOverlay
128119
var DivOverlay = Layer.extend({
128120
 
128121
	// @section
128122
	// @aka DivOverlay options
128123
	options: {
128124
		// @option offset: Point = Point(0, 7)
128125
		// The offset of the popup position. Useful to control the anchor
128126
		// of the popup when opening it on some overlays.
128127
		offset: [0, 7],
128128
 
128129
		// @option className: String = ''
128130
		// A custom CSS class name to assign to the popup.
128131
		className: '',
128132
 
128133
		// @option pane: String = 'popupPane'
128134
		// `Map pane` where the popup will be added.
128135
		pane: 'popupPane'
128136
	},
128137
 
128138
	initialize: function (options, source) {
128139
		setOptions(this, options);
128140
 
128141
		this._source = source;
128142
	},
128143
 
128144
	onAdd: function (map) {
128145
		this._zoomAnimated = map._zoomAnimated;
128146
 
128147
		if (!this._container) {
128148
			this._initLayout();
128149
		}
128150
 
128151
		if (map._fadeAnimated) {
128152
			setOpacity(this._container, 0);
128153
		}
128154
 
128155
		clearTimeout(this._removeTimeout);
128156
		this.getPane().appendChild(this._container);
128157
		this.update();
128158
 
128159
		if (map._fadeAnimated) {
128160
			setOpacity(this._container, 1);
128161
		}
128162
 
128163
		this.bringToFront();
128164
	},
128165
 
128166
	onRemove: function (map) {
128167
		if (map._fadeAnimated) {
128168
			setOpacity(this._container, 0);
128169
			this._removeTimeout = setTimeout(bind(remove, undefined, this._container), 200);
128170
		} else {
128171
			remove(this._container);
128172
		}
128173
	},
128174
 
128175
	// @namespace Popup
128176
	// @method getLatLng: LatLng
128177
	// Returns the geographical point of popup.
128178
	getLatLng: function () {
128179
		return this._latlng;
128180
	},
128181
 
128182
	// @method setLatLng(latlng: LatLng): this
128183
	// Sets the geographical point where the popup will open.
128184
	setLatLng: function (latlng) {
128185
		this._latlng = toLatLng(latlng);
128186
		if (this._map) {
128187
			this._updatePosition();
128188
			this._adjustPan();
128189
		}
128190
		return this;
128191
	},
128192
 
128193
	// @method getContent: String|HTMLElement
128194
	// Returns the content of the popup.
128195
	getContent: function () {
128196
		return this._content;
128197
	},
128198
 
128199
	// @method setContent(htmlContent: String|HTMLElement|Function): this
128200
	// Sets the HTML content of the popup. If a function is passed the source layer will be passed to the function. The function should return a `String` or `HTMLElement` to be used in the popup.
128201
	setContent: function (content) {
128202
		this._content = content;
128203
		this.update();
128204
		return this;
128205
	},
128206
 
128207
	// @method getElement: String|HTMLElement
128208
	// Alias for [getContent()](#popup-getcontent)
128209
	getElement: function () {
128210
		return this._container;
128211
	},
128212
 
128213
	// @method update: null
128214
	// Updates the popup content, layout and position. Useful for updating the popup after something inside changed, e.g. image loaded.
128215
	update: function () {
128216
		if (!this._map) { return; }
128217
 
128218
		this._container.style.visibility = 'hidden';
128219
 
128220
		this._updateContent();
128221
		this._updateLayout();
128222
		this._updatePosition();
128223
 
128224
		this._container.style.visibility = '';
128225
 
128226
		this._adjustPan();
128227
	},
128228
 
128229
	getEvents: function () {
128230
		var events = {
128231
			zoom: this._updatePosition,
128232
			viewreset: this._updatePosition
128233
		};
128234
 
128235
		if (this._zoomAnimated) {
128236
			events.zoomanim = this._animateZoom;
128237
		}
128238
		return events;
128239
	},
128240
 
128241
	// @method isOpen: Boolean
128242
	// Returns `true` when the popup is visible on the map.
128243
	isOpen: function () {
128244
		return !!this._map && this._map.hasLayer(this);
128245
	},
128246
 
128247
	// @method bringToFront: this
128248
	// Brings this popup in front of other popups (in the same map pane).
128249
	bringToFront: function () {
128250
		if (this._map) {
128251
			toFront(this._container);
128252
		}
128253
		return this;
128254
	},
128255
 
128256
	// @method bringToBack: this
128257
	// Brings this popup to the back of other popups (in the same map pane).
128258
	bringToBack: function () {
128259
		if (this._map) {
128260
			toBack(this._container);
128261
		}
128262
		return this;
128263
	},
128264
 
128265
	_updateContent: function () {
128266
		if (!this._content) { return; }
128267
 
128268
		var node = this._contentNode;
128269
		var content = (typeof this._content === 'function') ? this._content(this._source || this) : this._content;
128270
 
128271
		if (typeof content === 'string') {
128272
			node.innerHTML = content;
128273
		} else {
128274
			while (node.hasChildNodes()) {
128275
				node.removeChild(node.firstChild);
128276
			}
128277
			node.appendChild(content);
128278
		}
128279
		this.fire('contentupdate');
128280
	},
128281
 
128282
	_updatePosition: function () {
128283
		if (!this._map) { return; }
128284
 
128285
		var pos = this._map.latLngToLayerPoint(this._latlng),
128286
		    offset = toPoint(this.options.offset),
128287
		    anchor = this._getAnchor();
128288
 
128289
		if (this._zoomAnimated) {
128290
			setPosition(this._container, pos.add(anchor));
128291
		} else {
128292
			offset = offset.add(pos).add(anchor);
128293
		}
128294
 
128295
		var bottom = this._containerBottom = -offset.y,
128296
		    left = this._containerLeft = -Math.round(this._containerWidth / 2) + offset.x;
128297
 
128298
		// bottom position the popup in case the height of the popup changes (images loading etc)
128299
		this._container.style.bottom = bottom + 'px';
128300
		this._container.style.left = left + 'px';
128301
	},
128302
 
128303
	_getAnchor: function () {
128304
		return [0, 0];
128305
	}
128306
 
128307
});
128308
 
128309
/*
128310
 * @class Popup
128311
 * @inherits DivOverlay
128312
 * @aka L.Popup
128313
 * Used to open popups in certain places of the map. Use [Map.openPopup](#map-openpopup) to
128314
 * open popups while making sure that only one popup is open at one time
128315
 * (recommended for usability), or use [Map.addLayer](#map-addlayer) to open as many as you want.
128316
 *
128317
 * @example
128318
 *
128319
 * If you want to just bind a popup to marker click and then open it, it's really easy:
128320
 *
128321
 * ```js
128322
 * marker.bindPopup(popupContent).openPopup();
128323
 * ```
128324
 * Path overlays like polylines also have a `bindPopup` method.
128325
 * Here's a more complicated way to open a popup on a map:
128326
 *
128327
 * ```js
128328
 * var popup = L.popup()
128329
 * 	.setLatLng(latlng)
128330
 * 	.setContent('<p>Hello world!<br />This is a nice popup.</p>')
128331
 * 	.openOn(map);
128332
 * ```
128333
 */
128334
 
128335
 
128336
// @namespace Popup
128337
var Popup = DivOverlay.extend({
128338
 
128339
	// @section
128340
	// @aka Popup options
128341
	options: {
128342
		// @option maxWidth: Number = 300
128343
		// Max width of the popup, in pixels.
128344
		maxWidth: 300,
128345
 
128346
		// @option minWidth: Number = 50
128347
		// Min width of the popup, in pixels.
128348
		minWidth: 50,
128349
 
128350
		// @option maxHeight: Number = null
128351
		// If set, creates a scrollable container of the given height
128352
		// inside a popup if its content exceeds it.
128353
		maxHeight: null,
128354
 
128355
		// @option autoPan: Boolean = true
128356
		// Set it to `false` if you don't want the map to do panning animation
128357
		// to fit the opened popup.
128358
		autoPan: true,
128359
 
128360
		// @option autoPanPaddingTopLeft: Point = null
128361
		// The margin between the popup and the top left corner of the map
128362
		// view after autopanning was performed.
128363
		autoPanPaddingTopLeft: null,
128364
 
128365
		// @option autoPanPaddingBottomRight: Point = null
128366
		// The margin between the popup and the bottom right corner of the map
128367
		// view after autopanning was performed.
128368
		autoPanPaddingBottomRight: null,
128369
 
128370
		// @option autoPanPadding: Point = Point(5, 5)
128371
		// Equivalent of setting both top left and bottom right autopan padding to the same value.
128372
		autoPanPadding: [5, 5],
128373
 
128374
		// @option keepInView: Boolean = false
128375
		// Set it to `true` if you want to prevent users from panning the popup
128376
		// off of the screen while it is open.
128377
		keepInView: false,
128378
 
128379
		// @option closeButton: Boolean = true
128380
		// Controls the presence of a close button in the popup.
128381
		closeButton: true,
128382
 
128383
		// @option autoClose: Boolean = true
128384
		// Set it to `false` if you want to override the default behavior of
128385
		// the popup closing when another popup is opened.
128386
		autoClose: true,
128387
 
128388
		// @option closeOnEscapeKey: Boolean = true
128389
		// Set it to `false` if you want to override the default behavior of
128390
		// the ESC key for closing of the popup.
128391
		closeOnEscapeKey: true,
128392
 
128393
		// @option closeOnClick: Boolean = *
128394
		// Set it if you want to override the default behavior of the popup closing when user clicks
128395
		// on the map. Defaults to the map's [`closePopupOnClick`](#map-closepopuponclick) option.
128396
 
128397
		// @option className: String = ''
128398
		// A custom CSS class name to assign to the popup.
128399
		className: ''
128400
	},
128401
 
128402
	// @namespace Popup
128403
	// @method openOn(map: Map): this
128404
	// Adds the popup to the map and closes the previous one. The same as `map.openPopup(popup)`.
128405
	openOn: function (map) {
128406
		map.openPopup(this);
128407
		return this;
128408
	},
128409
 
128410
	onAdd: function (map) {
128411
		DivOverlay.prototype.onAdd.call(this, map);
128412
 
128413
		// @namespace Map
128414
		// @section Popup events
128415
		// @event popupopen: PopupEvent
128416
		// Fired when a popup is opened in the map
128417
		map.fire('popupopen', {popup: this});
128418
 
128419
		if (this._source) {
128420
			// @namespace Layer
128421
			// @section Popup events
128422
			// @event popupopen: PopupEvent
128423
			// Fired when a popup bound to this layer is opened
128424
			this._source.fire('popupopen', {popup: this}, true);
128425
			// For non-path layers, we toggle the popup when clicking
128426
			// again the layer, so prevent the map to reopen it.
128427
			if (!(this._source instanceof Path)) {
128428
				this._source.on('preclick', stopPropagation);
128429
			}
128430
		}
128431
	},
128432
 
128433
	onRemove: function (map) {
128434
		DivOverlay.prototype.onRemove.call(this, map);
128435
 
128436
		// @namespace Map
128437
		// @section Popup events
128438
		// @event popupclose: PopupEvent
128439
		// Fired when a popup in the map is closed
128440
		map.fire('popupclose', {popup: this});
128441
 
128442
		if (this._source) {
128443
			// @namespace Layer
128444
			// @section Popup events
128445
			// @event popupclose: PopupEvent
128446
			// Fired when a popup bound to this layer is closed
128447
			this._source.fire('popupclose', {popup: this}, true);
128448
			if (!(this._source instanceof Path)) {
128449
				this._source.off('preclick', stopPropagation);
128450
			}
128451
		}
128452
	},
128453
 
128454
	getEvents: function () {
128455
		var events = DivOverlay.prototype.getEvents.call(this);
128456
 
128457
		if (this.options.closeOnClick !== undefined ? this.options.closeOnClick : this._map.options.closePopupOnClick) {
128458
			events.preclick = this._close;
128459
		}
128460
 
128461
		if (this.options.keepInView) {
128462
			events.moveend = this._adjustPan;
128463
		}
128464
 
128465
		return events;
128466
	},
128467
 
128468
	_close: function () {
128469
		if (this._map) {
128470
			this._map.closePopup(this);
128471
		}
128472
	},
128473
 
128474
	_initLayout: function () {
128475
		var prefix = 'leaflet-popup',
128476
		    container = this._container = create$1('div',
128477
			prefix + ' ' + (this.options.className || '') +
128478
			' leaflet-zoom-animated');
128479
 
128480
		var wrapper = this._wrapper = create$1('div', prefix + '-content-wrapper', container);
128481
		this._contentNode = create$1('div', prefix + '-content', wrapper);
128482
 
128483
		disableClickPropagation(wrapper);
128484
		disableScrollPropagation(this._contentNode);
128485
		on(wrapper, 'contextmenu', stopPropagation);
128486
 
128487
		this._tipContainer = create$1('div', prefix + '-tip-container', container);
128488
		this._tip = create$1('div', prefix + '-tip', this._tipContainer);
128489
 
128490
		if (this.options.closeButton) {
128491
			var closeButton = this._closeButton = create$1('a', prefix + '-close-button', container);
128492
			closeButton.href = '#close';
128493
			closeButton.innerHTML = '&#215;';
128494
 
128495
			on(closeButton, 'click', this._onCloseButtonClick, this);
128496
		}
128497
	},
128498
 
128499
	_updateLayout: function () {
128500
		var container = this._contentNode,
128501
		    style = container.style;
128502
 
128503
		style.width = '';
128504
		style.whiteSpace = 'nowrap';
128505
 
128506
		var width = container.offsetWidth;
128507
		width = Math.min(width, this.options.maxWidth);
128508
		width = Math.max(width, this.options.minWidth);
128509
 
128510
		style.width = (width + 1) + 'px';
128511
		style.whiteSpace = '';
128512
 
128513
		style.height = '';
128514
 
128515
		var height = container.offsetHeight,
128516
		    maxHeight = this.options.maxHeight,
128517
		    scrolledClass = 'leaflet-popup-scrolled';
128518
 
128519
		if (maxHeight && height > maxHeight) {
128520
			style.height = maxHeight + 'px';
128521
			addClass(container, scrolledClass);
128522
		} else {
128523
			removeClass(container, scrolledClass);
128524
		}
128525
 
128526
		this._containerWidth = this._container.offsetWidth;
128527
	},
128528
 
128529
	_animateZoom: function (e) {
128530
		var pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center),
128531
		    anchor = this._getAnchor();
128532
		setPosition(this._container, pos.add(anchor));
128533
	},
128534
 
128535
	_adjustPan: function () {
128536
		if (!this.options.autoPan || (this._map._panAnim && this._map._panAnim._inProgress)) { return; }
128537
 
128538
		var map = this._map,
128539
		    marginBottom = parseInt(getStyle(this._container, 'marginBottom'), 10) || 0,
128540
		    containerHeight = this._container.offsetHeight + marginBottom,
128541
		    containerWidth = this._containerWidth,
128542
		    layerPos = new Point(this._containerLeft, -containerHeight - this._containerBottom);
128543
 
128544
		layerPos._add(getPosition(this._container));
128545
 
128546
		var containerPos = map.layerPointToContainerPoint(layerPos),
128547
		    padding = toPoint(this.options.autoPanPadding),
128548
		    paddingTL = toPoint(this.options.autoPanPaddingTopLeft || padding),
128549
		    paddingBR = toPoint(this.options.autoPanPaddingBottomRight || padding),
128550
		    size = map.getSize(),
128551
		    dx = 0,
128552
		    dy = 0;
128553
 
128554
		if (containerPos.x + containerWidth + paddingBR.x > size.x) { // right
128555
			dx = containerPos.x + containerWidth - size.x + paddingBR.x;
128556
		}
128557
		if (containerPos.x - dx - paddingTL.x < 0) { // left
128558
			dx = containerPos.x - paddingTL.x;
128559
		}
128560
		if (containerPos.y + containerHeight + paddingBR.y > size.y) { // bottom
128561
			dy = containerPos.y + containerHeight - size.y + paddingBR.y;
128562
		}
128563
		if (containerPos.y - dy - paddingTL.y < 0) { // top
128564
			dy = containerPos.y - paddingTL.y;
128565
		}
128566
 
128567
		// @namespace Map
128568
		// @section Popup events
128569
		// @event autopanstart: Event
128570
		// Fired when the map starts autopanning when opening a popup.
128571
		if (dx || dy) {
128572
			map
128573
			    .fire('autopanstart')
128574
			    .panBy([dx, dy]);
128575
		}
128576
	},
128577
 
128578
	_onCloseButtonClick: function (e) {
128579
		this._close();
128580
		stop(e);
128581
	},
128582
 
128583
	_getAnchor: function () {
128584
		// Where should we anchor the popup on the source layer?
128585
		return toPoint(this._source && this._source._getPopupAnchor ? this._source._getPopupAnchor() : [0, 0]);
128586
	}
128587
 
128588
});
128589
 
128590
// @namespace Popup
128591
// @factory L.popup(options?: Popup options, source?: Layer)
128592
// Instantiates a `Popup` object given an optional `options` object that describes its appearance and location and an optional `source` object that is used to tag the popup with a reference to the Layer to which it refers.
128593
var popup = function (options, source) {
128594
	return new Popup(options, source);
128595
};
128596
 
128597
 
128598
/* @namespace Map
128599
 * @section Interaction Options
128600
 * @option closePopupOnClick: Boolean = true
128601
 * Set it to `false` if you don't want popups to close when user clicks the map.
128602
 */
128603
Map.mergeOptions({
128604
	closePopupOnClick: true
128605
});
128606
 
128607
 
128608
// @namespace Map
128609
// @section Methods for Layers and Controls
128610
Map.include({
128611
	// @method openPopup(popup: Popup): this
128612
	// Opens the specified popup while closing the previously opened (to make sure only one is opened at one time for usability).
128613
	// @alternative
128614
	// @method openPopup(content: String|HTMLElement, latlng: LatLng, options?: Popup options): this
128615
	// Creates a popup with the specified content and options and opens it in the given point on a map.
128616
	openPopup: function (popup, latlng, options) {
128617
		if (!(popup instanceof Popup)) {
128618
			popup = new Popup(options).setContent(popup);
128619
		}
128620
 
128621
		if (latlng) {
128622
			popup.setLatLng(latlng);
128623
		}
128624
 
128625
		if (this.hasLayer(popup)) {
128626
			return this;
128627
		}
128628
 
128629
		if (this._popup && this._popup.options.autoClose) {
128630
			this.closePopup();
128631
		}
128632
 
128633
		this._popup = popup;
128634
		return this.addLayer(popup);
128635
	},
128636
 
128637
	// @method closePopup(popup?: Popup): this
128638
	// Closes the popup previously opened with [openPopup](#map-openpopup) (or the given one).
128639
	closePopup: function (popup) {
128640
		if (!popup || popup === this._popup) {
128641
			popup = this._popup;
128642
			this._popup = null;
128643
		}
128644
		if (popup) {
128645
			this.removeLayer(popup);
128646
		}
128647
		return this;
128648
	}
128649
});
128650
 
128651
/*
128652
 * @namespace Layer
128653
 * @section Popup methods example
128654
 *
128655
 * All layers share a set of methods convenient for binding popups to it.
128656
 *
128657
 * ```js
128658
 * var layer = L.Polygon(latlngs).bindPopup('Hi There!').addTo(map);
128659
 * layer.openPopup();
128660
 * layer.closePopup();
128661
 * ```
128662
 *
128663
 * Popups will also be automatically opened when the layer is clicked on and closed when the layer is removed from the map or another popup is opened.
128664
 */
128665
 
128666
// @section Popup methods
128667
Layer.include({
128668
 
128669
	// @method bindPopup(content: String|HTMLElement|Function|Popup, options?: Popup options): this
128670
	// Binds a popup to the layer with the passed `content` and sets up the
128671
	// necessary event listeners. If a `Function` is passed it will receive
128672
	// the layer as the first argument and should return a `String` or `HTMLElement`.
128673
	bindPopup: function (content, options) {
128674
 
128675
		if (content instanceof Popup) {
128676
			setOptions(content, options);
128677
			this._popup = content;
128678
			content._source = this;
128679
		} else {
128680
			if (!this._popup || options) {
128681
				this._popup = new Popup(options, this);
128682
			}
128683
			this._popup.setContent(content);
128684
		}
128685
 
128686
		if (!this._popupHandlersAdded) {
128687
			this.on({
128688
				click: this._openPopup,
128689
				keypress: this._onKeyPress,
128690
				remove: this.closePopup,
128691
				move: this._movePopup
128692
			});
128693
			this._popupHandlersAdded = true;
128694
		}
128695
 
128696
		return this;
128697
	},
128698
 
128699
	// @method unbindPopup(): this
128700
	// Removes the popup previously bound with `bindPopup`.
128701
	unbindPopup: function () {
128702
		if (this._popup) {
128703
			this.off({
128704
				click: this._openPopup,
128705
				keypress: this._onKeyPress,
128706
				remove: this.closePopup,
128707
				move: this._movePopup
128708
			});
128709
			this._popupHandlersAdded = false;
128710
			this._popup = null;
128711
		}
128712
		return this;
128713
	},
128714
 
128715
	// @method openPopup(latlng?: LatLng): this
128716
	// Opens the bound popup at the specified `latlng` or at the default popup anchor if no `latlng` is passed.
128717
	openPopup: function (layer, latlng) {
128718
		if (!(layer instanceof Layer)) {
128719
			latlng = layer;
128720
			layer = this;
128721
		}
128722
 
128723
		if (layer instanceof FeatureGroup) {
128724
			for (var id in this._layers) {
128725
				layer = this._layers[id];
128726
				break;
128727
			}
128728
		}
128729
 
128730
		if (!latlng) {
128731
			latlng = layer.getCenter ? layer.getCenter() : layer.getLatLng();
128732
		}
128733
 
128734
		if (this._popup && this._map) {
128735
			// set popup source to this layer
128736
			this._popup._source = layer;
128737
 
128738
			// update the popup (content, layout, ect...)
128739
			this._popup.update();
128740
 
128741
			// open the popup on the map
128742
			this._map.openPopup(this._popup, latlng);
128743
		}
128744
 
128745
		return this;
128746
	},
128747
 
128748
	// @method closePopup(): this
128749
	// Closes the popup bound to this layer if it is open.
128750
	closePopup: function () {
128751
		if (this._popup) {
128752
			this._popup._close();
128753
		}
128754
		return this;
128755
	},
128756
 
128757
	// @method togglePopup(): this
128758
	// Opens or closes the popup bound to this layer depending on its current state.
128759
	togglePopup: function (target) {
128760
		if (this._popup) {
128761
			if (this._popup._map) {
128762
				this.closePopup();
128763
			} else {
128764
				this.openPopup(target);
128765
			}
128766
		}
128767
		return this;
128768
	},
128769
 
128770
	// @method isPopupOpen(): boolean
128771
	// Returns `true` if the popup bound to this layer is currently open.
128772
	isPopupOpen: function () {
128773
		return (this._popup ? this._popup.isOpen() : false);
128774
	},
128775
 
128776
	// @method setPopupContent(content: String|HTMLElement|Popup): this
128777
	// Sets the content of the popup bound to this layer.
128778
	setPopupContent: function (content) {
128779
		if (this._popup) {
128780
			this._popup.setContent(content);
128781
		}
128782
		return this;
128783
	},
128784
 
128785
	// @method getPopup(): Popup
128786
	// Returns the popup bound to this layer.
128787
	getPopup: function () {
128788
		return this._popup;
128789
	},
128790
 
128791
	_openPopup: function (e) {
128792
		var layer = e.layer || e.target;
128793
 
128794
		if (!this._popup) {
128795
			return;
128796
		}
128797
 
128798
		if (!this._map) {
128799
			return;
128800
		}
128801
 
128802
		// prevent map click
128803
		stop(e);
128804
 
128805
		// if this inherits from Path its a vector and we can just
128806
		// open the popup at the new location
128807
		if (layer instanceof Path) {
128808
			this.openPopup(e.layer || e.target, e.latlng);
128809
			return;
128810
		}
128811
 
128812
		// otherwise treat it like a marker and figure out
128813
		// if we should toggle it open/closed
128814
		if (this._map.hasLayer(this._popup) && this._popup._source === layer) {
128815
			this.closePopup();
128816
		} else {
128817
			this.openPopup(layer, e.latlng);
128818
		}
128819
	},
128820
 
128821
	_movePopup: function (e) {
128822
		this._popup.setLatLng(e.latlng);
128823
	},
128824
 
128825
	_onKeyPress: function (e) {
128826
		if (e.originalEvent.keyCode === 13) {
128827
			this._openPopup(e);
128828
		}
128829
	}
128830
});
128831
 
128832
/*
128833
 * @class Tooltip
128834
 * @inherits DivOverlay
128835
 * @aka L.Tooltip
128836
 * Used to display small texts on top of map layers.
128837
 *
128838
 * @example
128839
 *
128840
 * ```js
128841
 * marker.bindTooltip("my tooltip text").openTooltip();
128842
 * ```
128843
 * Note about tooltip offset. Leaflet takes two options in consideration
128844
 * for computing tooltip offsetting:
128845
 * - the `offset` Tooltip option: it defaults to [0, 0], and it's specific to one tooltip.
128846
 *   Add a positive x offset to move the tooltip to the right, and a positive y offset to
128847
 *   move it to the bottom. Negatives will move to the left and top.
128848
 * - the `tooltipAnchor` Icon option: this will only be considered for Marker. You
128849
 *   should adapt this value if you use a custom icon.
128850
 */
128851
 
128852
 
128853
// @namespace Tooltip
128854
var Tooltip = DivOverlay.extend({
128855
 
128856
	// @section
128857
	// @aka Tooltip options
128858
	options: {
128859
		// @option pane: String = 'tooltipPane'
128860
		// `Map pane` where the tooltip will be added.
128861
		pane: 'tooltipPane',
128862
 
128863
		// @option offset: Point = Point(0, 0)
128864
		// Optional offset of the tooltip position.
128865
		offset: [0, 0],
128866
 
128867
		// @option direction: String = 'auto'
128868
		// Direction where to open the tooltip. Possible values are: `right`, `left`,
128869
		// `top`, `bottom`, `center`, `auto`.
128870
		// `auto` will dynamically switch between `right` and `left` according to the tooltip
128871
		// position on the map.
128872
		direction: 'auto',
128873
 
128874
		// @option permanent: Boolean = false
128875
		// Whether to open the tooltip permanently or only on mouseover.
128876
		permanent: false,
128877
 
128878
		// @option sticky: Boolean = false
128879
		// If true, the tooltip will follow the mouse instead of being fixed at the feature center.
128880
		sticky: false,
128881
 
128882
		// @option interactive: Boolean = false
128883
		// If true, the tooltip will listen to the feature events.
128884
		interactive: false,
128885
 
128886
		// @option opacity: Number = 0.9
128887
		// Tooltip container opacity.
128888
		opacity: 0.9
128889
	},
128890
 
128891
	onAdd: function (map) {
128892
		DivOverlay.prototype.onAdd.call(this, map);
128893
		this.setOpacity(this.options.opacity);
128894
 
128895
		// @namespace Map
128896
		// @section Tooltip events
128897
		// @event tooltipopen: TooltipEvent
128898
		// Fired when a tooltip is opened in the map.
128899
		map.fire('tooltipopen', {tooltip: this});
128900
 
128901
		if (this._source) {
128902
			// @namespace Layer
128903
			// @section Tooltip events
128904
			// @event tooltipopen: TooltipEvent
128905
			// Fired when a tooltip bound to this layer is opened.
128906
			this._source.fire('tooltipopen', {tooltip: this}, true);
128907
		}
128908
	},
128909
 
128910
	onRemove: function (map) {
128911
		DivOverlay.prototype.onRemove.call(this, map);
128912
 
128913
		// @namespace Map
128914
		// @section Tooltip events
128915
		// @event tooltipclose: TooltipEvent
128916
		// Fired when a tooltip in the map is closed.
128917
		map.fire('tooltipclose', {tooltip: this});
128918
 
128919
		if (this._source) {
128920
			// @namespace Layer
128921
			// @section Tooltip events
128922
			// @event tooltipclose: TooltipEvent
128923
			// Fired when a tooltip bound to this layer is closed.
128924
			this._source.fire('tooltipclose', {tooltip: this}, true);
128925
		}
128926
	},
128927
 
128928
	getEvents: function () {
128929
		var events = DivOverlay.prototype.getEvents.call(this);
128930
 
128931
		if (touch && !this.options.permanent) {
128932
			events.preclick = this._close;
128933
		}
128934
 
128935
		return events;
128936
	},
128937
 
128938
	_close: function () {
128939
		if (this._map) {
128940
			this._map.closeTooltip(this);
128941
		}
128942
	},
128943
 
128944
	_initLayout: function () {
128945
		var prefix = 'leaflet-tooltip',
128946
		    className = prefix + ' ' + (this.options.className || '') + ' leaflet-zoom-' + (this._zoomAnimated ? 'animated' : 'hide');
128947
 
128948
		this._contentNode = this._container = create$1('div', className);
128949
	},
128950
 
128951
	_updateLayout: function () {},
128952
 
128953
	_adjustPan: function () {},
128954
 
128955
	_setPosition: function (pos) {
128956
		var map = this._map,
128957
		    container = this._container,
128958
		    centerPoint = map.latLngToContainerPoint(map.getCenter()),
128959
		    tooltipPoint = map.layerPointToContainerPoint(pos),
128960
		    direction = this.options.direction,
128961
		    tooltipWidth = container.offsetWidth,
128962
		    tooltipHeight = container.offsetHeight,
128963
		    offset = toPoint(this.options.offset),
128964
		    anchor = this._getAnchor();
128965
 
128966
		if (direction === 'top') {
128967
			pos = pos.add(toPoint(-tooltipWidth / 2 + offset.x, -tooltipHeight + offset.y + anchor.y, true));
128968
		} else if (direction === 'bottom') {
128969
			pos = pos.subtract(toPoint(tooltipWidth / 2 - offset.x, -offset.y, true));
128970
		} else if (direction === 'center') {
128971
			pos = pos.subtract(toPoint(tooltipWidth / 2 + offset.x, tooltipHeight / 2 - anchor.y + offset.y, true));
128972
		} else if (direction === 'right' || direction === 'auto' && tooltipPoint.x < centerPoint.x) {
128973
			direction = 'right';
128974
			pos = pos.add(toPoint(offset.x + anchor.x, anchor.y - tooltipHeight / 2 + offset.y, true));
128975
		} else {
128976
			direction = 'left';
128977
			pos = pos.subtract(toPoint(tooltipWidth + anchor.x - offset.x, tooltipHeight / 2 - anchor.y - offset.y, true));
128978
		}
128979
 
128980
		removeClass(container, 'leaflet-tooltip-right');
128981
		removeClass(container, 'leaflet-tooltip-left');
128982
		removeClass(container, 'leaflet-tooltip-top');
128983
		removeClass(container, 'leaflet-tooltip-bottom');
128984
		addClass(container, 'leaflet-tooltip-' + direction);
128985
		setPosition(container, pos);
128986
	},
128987
 
128988
	_updatePosition: function () {
128989
		var pos = this._map.latLngToLayerPoint(this._latlng);
128990
		this._setPosition(pos);
128991
	},
128992
 
128993
	setOpacity: function (opacity) {
128994
		this.options.opacity = opacity;
128995
 
128996
		if (this._container) {
128997
			setOpacity(this._container, opacity);
128998
		}
128999
	},
129000
 
129001
	_animateZoom: function (e) {
129002
		var pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center);
129003
		this._setPosition(pos);
129004
	},
129005
 
129006
	_getAnchor: function () {
129007
		// Where should we anchor the tooltip on the source layer?
129008
		return toPoint(this._source && this._source._getTooltipAnchor && !this.options.sticky ? this._source._getTooltipAnchor() : [0, 0]);
129009
	}
129010
 
129011
});
129012
 
129013
// @namespace Tooltip
129014
// @factory L.tooltip(options?: Tooltip options, source?: Layer)
129015
// Instantiates a Tooltip object given an optional `options` object that describes its appearance and location and an optional `source` object that is used to tag the tooltip with a reference to the Layer to which it refers.
129016
var tooltip = function (options, source) {
129017
	return new Tooltip(options, source);
129018
};
129019
 
129020
// @namespace Map
129021
// @section Methods for Layers and Controls
129022
Map.include({
129023
 
129024
	// @method openTooltip(tooltip: Tooltip): this
129025
	// Opens the specified tooltip.
129026
	// @alternative
129027
	// @method openTooltip(content: String|HTMLElement, latlng: LatLng, options?: Tooltip options): this
129028
	// Creates a tooltip with the specified content and options and open it.
129029
	openTooltip: function (tooltip, latlng, options) {
129030
		if (!(tooltip instanceof Tooltip)) {
129031
			tooltip = new Tooltip(options).setContent(tooltip);
129032
		}
129033
 
129034
		if (latlng) {
129035
			tooltip.setLatLng(latlng);
129036
		}
129037
 
129038
		if (this.hasLayer(tooltip)) {
129039
			return this;
129040
		}
129041
 
129042
		return this.addLayer(tooltip);
129043
	},
129044
 
129045
	// @method closeTooltip(tooltip?: Tooltip): this
129046
	// Closes the tooltip given as parameter.
129047
	closeTooltip: function (tooltip) {
129048
		if (tooltip) {
129049
			this.removeLayer(tooltip);
129050
		}
129051
		return this;
129052
	}
129053
 
129054
});
129055
 
129056
/*
129057
 * @namespace Layer
129058
 * @section Tooltip methods example
129059
 *
129060
 * All layers share a set of methods convenient for binding tooltips to it.
129061
 *
129062
 * ```js
129063
 * var layer = L.Polygon(latlngs).bindTooltip('Hi There!').addTo(map);
129064
 * layer.openTooltip();
129065
 * layer.closeTooltip();
129066
 * ```
129067
 */
129068
 
129069
// @section Tooltip methods
129070
Layer.include({
129071
 
129072
	// @method bindTooltip(content: String|HTMLElement|Function|Tooltip, options?: Tooltip options): this
129073
	// Binds a tooltip to the layer with the passed `content` and sets up the
129074
	// necessary event listeners. If a `Function` is passed it will receive
129075
	// the layer as the first argument and should return a `String` or `HTMLElement`.
129076
	bindTooltip: function (content, options) {
129077
 
129078
		if (content instanceof Tooltip) {
129079
			setOptions(content, options);
129080
			this._tooltip = content;
129081
			content._source = this;
129082
		} else {
129083
			if (!this._tooltip || options) {
129084
				this._tooltip = new Tooltip(options, this);
129085
			}
129086
			this._tooltip.setContent(content);
129087
 
129088
		}
129089
 
129090
		this._initTooltipInteractions();
129091
 
129092
		if (this._tooltip.options.permanent && this._map && this._map.hasLayer(this)) {
129093
			this.openTooltip();
129094
		}
129095
 
129096
		return this;
129097
	},
129098
 
129099
	// @method unbindTooltip(): this
129100
	// Removes the tooltip previously bound with `bindTooltip`.
129101
	unbindTooltip: function () {
129102
		if (this._tooltip) {
129103
			this._initTooltipInteractions(true);
129104
			this.closeTooltip();
129105
			this._tooltip = null;
129106
		}
129107
		return this;
129108
	},
129109
 
129110
	_initTooltipInteractions: function (remove$$1) {
129111
		if (!remove$$1 && this._tooltipHandlersAdded) { return; }
129112
		var onOff = remove$$1 ? 'off' : 'on',
129113
		    events = {
129114
			remove: this.closeTooltip,
129115
			move: this._moveTooltip
129116
		    };
129117
		if (!this._tooltip.options.permanent) {
129118
			events.mouseover = this._openTooltip;
129119
			events.mouseout = this.closeTooltip;
129120
			if (this._tooltip.options.sticky) {
129121
				events.mousemove = this._moveTooltip;
129122
			}
129123
			if (touch) {
129124
				events.click = this._openTooltip;
129125
			}
129126
		} else {
129127
			events.add = this._openTooltip;
129128
		}
129129
		this[onOff](events);
129130
		this._tooltipHandlersAdded = !remove$$1;
129131
	},
129132
 
129133
	// @method openTooltip(latlng?: LatLng): this
129134
	// Opens the bound tooltip at the specified `latlng` or at the default tooltip anchor if no `latlng` is passed.
129135
	openTooltip: function (layer, latlng) {
129136
		if (!(layer instanceof Layer)) {
129137
			latlng = layer;
129138
			layer = this;
129139
		}
129140
 
129141
		if (layer instanceof FeatureGroup) {
129142
			for (var id in this._layers) {
129143
				layer = this._layers[id];
129144
				break;
129145
			}
129146
		}
129147
 
129148
		if (!latlng) {
129149
			latlng = layer.getCenter ? layer.getCenter() : layer.getLatLng();
129150
		}
129151
 
129152
		if (this._tooltip && this._map) {
129153
 
129154
			// set tooltip source to this layer
129155
			this._tooltip._source = layer;
129156
 
129157
			// update the tooltip (content, layout, ect...)
129158
			this._tooltip.update();
129159
 
129160
			// open the tooltip on the map
129161
			this._map.openTooltip(this._tooltip, latlng);
129162
 
129163
			// Tooltip container may not be defined if not permanent and never
129164
			// opened.
129165
			if (this._tooltip.options.interactive && this._tooltip._container) {
129166
				addClass(this._tooltip._container, 'leaflet-clickable');
129167
				this.addInteractiveTarget(this._tooltip._container);
129168
			}
129169
		}
129170
 
129171
		return this;
129172
	},
129173
 
129174
	// @method closeTooltip(): this
129175
	// Closes the tooltip bound to this layer if it is open.
129176
	closeTooltip: function () {
129177
		if (this._tooltip) {
129178
			this._tooltip._close();
129179
			if (this._tooltip.options.interactive && this._tooltip._container) {
129180
				removeClass(this._tooltip._container, 'leaflet-clickable');
129181
				this.removeInteractiveTarget(this._tooltip._container);
129182
			}
129183
		}
129184
		return this;
129185
	},
129186
 
129187
	// @method toggleTooltip(): this
129188
	// Opens or closes the tooltip bound to this layer depending on its current state.
129189
	toggleTooltip: function (target) {
129190
		if (this._tooltip) {
129191
			if (this._tooltip._map) {
129192
				this.closeTooltip();
129193
			} else {
129194
				this.openTooltip(target);
129195
			}
129196
		}
129197
		return this;
129198
	},
129199
 
129200
	// @method isTooltipOpen(): boolean
129201
	// Returns `true` if the tooltip bound to this layer is currently open.
129202
	isTooltipOpen: function () {
129203
		return this._tooltip.isOpen();
129204
	},
129205
 
129206
	// @method setTooltipContent(content: String|HTMLElement|Tooltip): this
129207
	// Sets the content of the tooltip bound to this layer.
129208
	setTooltipContent: function (content) {
129209
		if (this._tooltip) {
129210
			this._tooltip.setContent(content);
129211
		}
129212
		return this;
129213
	},
129214
 
129215
	// @method getTooltip(): Tooltip
129216
	// Returns the tooltip bound to this layer.
129217
	getTooltip: function () {
129218
		return this._tooltip;
129219
	},
129220
 
129221
	_openTooltip: function (e) {
129222
		var layer = e.layer || e.target;
129223
 
129224
		if (!this._tooltip || !this._map) {
129225
			return;
129226
		}
129227
		this.openTooltip(layer, this._tooltip.options.sticky ? e.latlng : undefined);
129228
	},
129229
 
129230
	_moveTooltip: function (e) {
129231
		var latlng = e.latlng, containerPoint, layerPoint;
129232
		if (this._tooltip.options.sticky && e.originalEvent) {
129233
			containerPoint = this._map.mouseEventToContainerPoint(e.originalEvent);
129234
			layerPoint = this._map.containerPointToLayerPoint(containerPoint);
129235
			latlng = this._map.layerPointToLatLng(layerPoint);
129236
		}
129237
		this._tooltip.setLatLng(latlng);
129238
	}
129239
});
129240
 
129241
/*
129242
 * @class DivIcon
129243
 * @aka L.DivIcon
129244
 * @inherits Icon
129245
 *
129246
 * Represents a lightweight icon for markers that uses a simple `<div>`
129247
 * element instead of an image. Inherits from `Icon` but ignores the `iconUrl` and shadow options.
129248
 *
129249
 * @example
129250
 * ```js
129251
 * var myIcon = L.divIcon({className: 'my-div-icon'});
129252
 * // you can set .my-div-icon styles in CSS
129253
 *
129254
 * L.marker([50.505, 30.57], {icon: myIcon}).addTo(map);
129255
 * ```
129256
 *
129257
 * By default, it has a 'leaflet-div-icon' CSS class and is styled as a little white square with a shadow.
129258
 */
129259
 
129260
var DivIcon = Icon.extend({
129261
	options: {
129262
		// @section
129263
		// @aka DivIcon options
129264
		iconSize: [12, 12], // also can be set through CSS
129265
 
129266
		// iconAnchor: (Point),
129267
		// popupAnchor: (Point),
129268
 
129269
		// @option html: String = ''
129270
		// Custom HTML code to put inside the div element, empty by default.
129271
		html: false,
129272
 
129273
		// @option bgPos: Point = [0, 0]
129274
		// Optional relative position of the background, in pixels
129275
		bgPos: null,
129276
 
129277
		className: 'leaflet-div-icon'
129278
	},
129279
 
129280
	createIcon: function (oldIcon) {
129281
		var div = (oldIcon && oldIcon.tagName === 'DIV') ? oldIcon : document.createElement('div'),
129282
		    options = this.options;
129283
 
129284
		div.innerHTML = options.html !== false ? options.html : '';
129285
 
129286
		if (options.bgPos) {
129287
			var bgPos = toPoint(options.bgPos);
129288
			div.style.backgroundPosition = (-bgPos.x) + 'px ' + (-bgPos.y) + 'px';
129289
		}
129290
		this._setIconStyles(div, 'icon');
129291
 
129292
		return div;
129293
	},
129294
 
129295
	createShadow: function () {
129296
		return null;
129297
	}
129298
});
129299
 
129300
// @factory L.divIcon(options: DivIcon options)
129301
// Creates a `DivIcon` instance with the given options.
129302
function divIcon(options) {
129303
	return new DivIcon(options);
129304
}
129305
 
129306
Icon.Default = IconDefault;
129307
 
129308
/*
129309
 * @class GridLayer
129310
 * @inherits Layer
129311
 * @aka L.GridLayer
129312
 *
129313
 * Generic class for handling a tiled grid of HTML elements. This is the base class for all tile layers and replaces `TileLayer.Canvas`.
129314
 * GridLayer can be extended to create a tiled grid of HTML elements like `<canvas>`, `<img>` or `<div>`. GridLayer will handle creating and animating these DOM elements for you.
129315
 *
129316
 *
129317
 * @section Synchronous usage
129318
 * @example
129319
 *
129320
 * To create a custom layer, extend GridLayer and implement the `createTile()` method, which will be passed a `Point` object with the `x`, `y`, and `z` (zoom level) coordinates to draw your tile.
129321
 *
129322
 * ```js
129323
 * var CanvasLayer = L.GridLayer.extend({
129324
 *     createTile: function(coords){
129325
 *         // create a <canvas> element for drawing
129326
 *         var tile = L.DomUtil.create('canvas', 'leaflet-tile');
129327
 *
129328
 *         // setup tile width and height according to the options
129329
 *         var size = this.getTileSize();
129330
 *         tile.width = size.x;
129331
 *         tile.height = size.y;
129332
 *
129333
 *         // get a canvas context and draw something on it using coords.x, coords.y and coords.z
129334
 *         var ctx = tile.getContext('2d');
129335
 *
129336
 *         // return the tile so it can be rendered on screen
129337
 *         return tile;
129338
 *     }
129339
 * });
129340
 * ```
129341
 *
129342
 * @section Asynchronous usage
129343
 * @example
129344
 *
129345
 * Tile creation can also be asynchronous, this is useful when using a third-party drawing library. Once the tile is finished drawing it can be passed to the `done()` callback.
129346
 *
129347
 * ```js
129348
 * var CanvasLayer = L.GridLayer.extend({
129349
 *     createTile: function(coords, done){
129350
 *         var error;
129351
 *
129352
 *         // create a <canvas> element for drawing
129353
 *         var tile = L.DomUtil.create('canvas', 'leaflet-tile');
129354
 *
129355
 *         // setup tile width and height according to the options
129356
 *         var size = this.getTileSize();
129357
 *         tile.width = size.x;
129358
 *         tile.height = size.y;
129359
 *
129360
 *         // draw something asynchronously and pass the tile to the done() callback
129361
 *         setTimeout(function() {
129362
 *             done(error, tile);
129363
 *         }, 1000);
129364
 *
129365
 *         return tile;
129366
 *     }
129367
 * });
129368
 * ```
129369
 *
129370
 * @section
129371
 */
129372
 
129373
 
129374
var GridLayer = Layer.extend({
129375
 
129376
	// @section
129377
	// @aka GridLayer options
129378
	options: {
129379
		// @option tileSize: Number|Point = 256
129380
		// Width and height of tiles in the grid. Use a number if width and height are equal, or `L.point(width, height)` otherwise.
129381
		tileSize: 256,
129382
 
129383
		// @option opacity: Number = 1.0
129384
		// Opacity of the tiles. Can be used in the `createTile()` function.
129385
		opacity: 1,
129386
 
129387
		// @option updateWhenIdle: Boolean = (depends)
129388
		// Load new tiles only when panning ends.
129389
		// `true` by default on mobile browsers, in order to avoid too many requests and keep smooth navigation.
129390
		// `false` otherwise in order to display new tiles _during_ panning, since it is easy to pan outside the
129391
		// [`keepBuffer`](#gridlayer-keepbuffer) option in desktop browsers.
129392
		updateWhenIdle: mobile,
129393
 
129394
		// @option updateWhenZooming: Boolean = true
129395
		// By default, a smooth zoom animation (during a [touch zoom](#map-touchzoom) or a [`flyTo()`](#map-flyto)) will update grid layers every integer zoom level. Setting this option to `false` will update the grid layer only when the smooth animation ends.
129396
		updateWhenZooming: true,
129397
 
129398
		// @option updateInterval: Number = 200
129399
		// Tiles will not update more than once every `updateInterval` milliseconds when panning.
129400
		updateInterval: 200,
129401
 
129402
		// @option zIndex: Number = 1
129403
		// The explicit zIndex of the tile layer.
129404
		zIndex: 1,
129405
 
129406
		// @option bounds: LatLngBounds = undefined
129407
		// If set, tiles will only be loaded inside the set `LatLngBounds`.
129408
		bounds: null,
129409
 
129410
		// @option minZoom: Number = 0
129411
		// The minimum zoom level down to which this layer will be displayed (inclusive).
129412
		minZoom: 0,
129413
 
129414
		// @option maxZoom: Number = undefined
129415
		// The maximum zoom level up to which this layer will be displayed (inclusive).
129416
		maxZoom: undefined,
129417
 
129418
		// @option maxNativeZoom: Number = undefined
129419
		// Maximum zoom number the tile source has available. If it is specified,
129420
		// the tiles on all zoom levels higher than `maxNativeZoom` will be loaded
129421
		// from `maxNativeZoom` level and auto-scaled.
129422
		maxNativeZoom: undefined,
129423
 
129424
		// @option minNativeZoom: Number = undefined
129425
		// Minimum zoom number the tile source has available. If it is specified,
129426
		// the tiles on all zoom levels lower than `minNativeZoom` will be loaded
129427
		// from `minNativeZoom` level and auto-scaled.
129428
		minNativeZoom: undefined,
129429
 
129430
		// @option noWrap: Boolean = false
129431
		// Whether the layer is wrapped around the antimeridian. If `true`, the
129432
		// GridLayer will only be displayed once at low zoom levels. Has no
129433
		// effect when the [map CRS](#map-crs) doesn't wrap around. Can be used
129434
		// in combination with [`bounds`](#gridlayer-bounds) to prevent requesting
129435
		// tiles outside the CRS limits.
129436
		noWrap: false,
129437
 
129438
		// @option pane: String = 'tilePane'
129439
		// `Map pane` where the grid layer will be added.
129440
		pane: 'tilePane',
129441
 
129442
		// @option className: String = ''
129443
		// A custom class name to assign to the tile layer. Empty by default.
129444
		className: '',
129445
 
129446
		// @option keepBuffer: Number = 2
129447
		// When panning the map, keep this many rows and columns of tiles before unloading them.
129448
		keepBuffer: 2
129449
	},
129450
 
129451
	initialize: function (options) {
129452
		setOptions(this, options);
129453
	},
129454
 
129455
	onAdd: function () {
129456
		this._initContainer();
129457
 
129458
		this._levels = {};
129459
		this._tiles = {};
129460
 
129461
		this._resetView();
129462
		this._update();
129463
	},
129464
 
129465
	beforeAdd: function (map) {
129466
		map._addZoomLimit(this);
129467
	},
129468
 
129469
	onRemove: function (map) {
129470
		this._removeAllTiles();
129471
		remove(this._container);
129472
		map._removeZoomLimit(this);
129473
		this._container = null;
129474
		this._tileZoom = undefined;
129475
	},
129476
 
129477
	// @method bringToFront: this
129478
	// Brings the tile layer to the top of all tile layers.
129479
	bringToFront: function () {
129480
		if (this._map) {
129481
			toFront(this._container);
129482
			this._setAutoZIndex(Math.max);
129483
		}
129484
		return this;
129485
	},
129486
 
129487
	// @method bringToBack: this
129488
	// Brings the tile layer to the bottom of all tile layers.
129489
	bringToBack: function () {
129490
		if (this._map) {
129491
			toBack(this._container);
129492
			this._setAutoZIndex(Math.min);
129493
		}
129494
		return this;
129495
	},
129496
 
129497
	// @method getContainer: HTMLElement
129498
	// Returns the HTML element that contains the tiles for this layer.
129499
	getContainer: function () {
129500
		return this._container;
129501
	},
129502
 
129503
	// @method setOpacity(opacity: Number): this
129504
	// Changes the [opacity](#gridlayer-opacity) of the grid layer.
129505
	setOpacity: function (opacity) {
129506
		this.options.opacity = opacity;
129507
		this._updateOpacity();
129508
		return this;
129509
	},
129510
 
129511
	// @method setZIndex(zIndex: Number): this
129512
	// Changes the [zIndex](#gridlayer-zindex) of the grid layer.
129513
	setZIndex: function (zIndex) {
129514
		this.options.zIndex = zIndex;
129515
		this._updateZIndex();
129516
 
129517
		return this;
129518
	},
129519
 
129520
	// @method isLoading: Boolean
129521
	// Returns `true` if any tile in the grid layer has not finished loading.
129522
	isLoading: function () {
129523
		return this._loading;
129524
	},
129525
 
129526
	// @method redraw: this
129527
	// Causes the layer to clear all the tiles and request them again.
129528
	redraw: function () {
129529
		if (this._map) {
129530
			this._removeAllTiles();
129531
			this._update();
129532
		}
129533
		return this;
129534
	},
129535
 
129536
	getEvents: function () {
129537
		var events = {
129538
			viewprereset: this._invalidateAll,
129539
			viewreset: this._resetView,
129540
			zoom: this._resetView,
129541
			moveend: this._onMoveEnd
129542
		};
129543
 
129544
		if (!this.options.updateWhenIdle) {
129545
			// update tiles on move, but not more often than once per given interval
129546
			if (!this._onMove) {
129547
				this._onMove = throttle(this._onMoveEnd, this.options.updateInterval, this);
129548
			}
129549
 
129550
			events.move = this._onMove;
129551
		}
129552
 
129553
		if (this._zoomAnimated) {
129554
			events.zoomanim = this._animateZoom;
129555
		}
129556
 
129557
		return events;
129558
	},
129559
 
129560
	// @section Extension methods
129561
	// Layers extending `GridLayer` shall reimplement the following method.
129562
	// @method createTile(coords: Object, done?: Function): HTMLElement
129563
	// Called only internally, must be overridden by classes extending `GridLayer`.
129564
	// Returns the `HTMLElement` corresponding to the given `coords`. If the `done` callback
129565
	// is specified, it must be called when the tile has finished loading and drawing.
129566
	createTile: function () {
129567
		return document.createElement('div');
129568
	},
129569
 
129570
	// @section
129571
	// @method getTileSize: Point
129572
	// Normalizes the [tileSize option](#gridlayer-tilesize) into a point. Used by the `createTile()` method.
129573
	getTileSize: function () {
129574
		var s = this.options.tileSize;
129575
		return s instanceof Point ? s : new Point(s, s);
129576
	},
129577
 
129578
	_updateZIndex: function () {
129579
		if (this._container && this.options.zIndex !== undefined && this.options.zIndex !== null) {
129580
			this._container.style.zIndex = this.options.zIndex;
129581
		}
129582
	},
129583
 
129584
	_setAutoZIndex: function (compare) {
129585
		// go through all other layers of the same pane, set zIndex to max + 1 (front) or min - 1 (back)
129586
 
129587
		var layers = this.getPane().children,
129588
		    edgeZIndex = -compare(-Infinity, Infinity); // -Infinity for max, Infinity for min
129589
 
129590
		for (var i = 0, len = layers.length, zIndex; i < len; i++) {
129591
 
129592
			zIndex = layers[i].style.zIndex;
129593
 
129594
			if (layers[i] !== this._container && zIndex) {
129595
				edgeZIndex = compare(edgeZIndex, +zIndex);
129596
			}
129597
		}
129598
 
129599
		if (isFinite(edgeZIndex)) {
129600
			this.options.zIndex = edgeZIndex + compare(-1, 1);
129601
			this._updateZIndex();
129602
		}
129603
	},
129604
 
129605
	_updateOpacity: function () {
129606
		if (!this._map) { return; }
129607
 
129608
		// IE doesn't inherit filter opacity properly, so we're forced to set it on tiles
129609
		if (ielt9) { return; }
129610
 
129611
		setOpacity(this._container, this.options.opacity);
129612
 
129613
		var now = +new Date(),
129614
		    nextFrame = false,
129615
		    willPrune = false;
129616
 
129617
		for (var key in this._tiles) {
129618
			var tile = this._tiles[key];
129619
			if (!tile.current || !tile.loaded) { continue; }
129620
 
129621
			var fade = Math.min(1, (now - tile.loaded) / 200);
129622
 
129623
			setOpacity(tile.el, fade);
129624
			if (fade < 1) {
129625
				nextFrame = true;
129626
			} else {
129627
				if (tile.active) {
129628
					willPrune = true;
129629
				} else {
129630
					this._onOpaqueTile(tile);
129631
				}
129632
				tile.active = true;
129633
			}
129634
		}
129635
 
129636
		if (willPrune && !this._noPrune) { this._pruneTiles(); }
129637
 
129638
		if (nextFrame) {
129639
			cancelAnimFrame(this._fadeFrame);
129640
			this._fadeFrame = requestAnimFrame(this._updateOpacity, this);
129641
		}
129642
	},
129643
 
129644
	_onOpaqueTile: falseFn,
129645
 
129646
	_initContainer: function () {
129647
		if (this._container) { return; }
129648
 
129649
		this._container = create$1('div', 'leaflet-layer ' + (this.options.className || ''));
129650
		this._updateZIndex();
129651
 
129652
		if (this.options.opacity < 1) {
129653
			this._updateOpacity();
129654
		}
129655
 
129656
		this.getPane().appendChild(this._container);
129657
	},
129658
 
129659
	_updateLevels: function () {
129660
 
129661
		var zoom = this._tileZoom,
129662
		    maxZoom = this.options.maxZoom;
129663
 
129664
		if (zoom === undefined) { return undefined; }
129665
 
129666
		for (var z in this._levels) {
129667
			if (this._levels[z].el.children.length || z === zoom) {
129668
				this._levels[z].el.style.zIndex = maxZoom - Math.abs(zoom - z);
129669
				this._onUpdateLevel(z);
129670
			} else {
129671
				remove(this._levels[z].el);
129672
				this._removeTilesAtZoom(z);
129673
				this._onRemoveLevel(z);
129674
				delete this._levels[z];
129675
			}
129676
		}
129677
 
129678
		var level = this._levels[zoom],
129679
		    map = this._map;
129680
 
129681
		if (!level) {
129682
			level = this._levels[zoom] = {};
129683
 
129684
			level.el = create$1('div', 'leaflet-tile-container leaflet-zoom-animated', this._container);
129685
			level.el.style.zIndex = maxZoom;
129686
 
129687
			level.origin = map.project(map.unproject(map.getPixelOrigin()), zoom).round();
129688
			level.zoom = zoom;
129689
 
129690
			this._setZoomTransform(level, map.getCenter(), map.getZoom());
129691
 
129692
			// force the browser to consider the newly added element for transition
129693
			falseFn(level.el.offsetWidth);
129694
 
129695
			this._onCreateLevel(level);
129696
		}
129697
 
129698
		this._level = level;
129699
 
129700
		return level;
129701
	},
129702
 
129703
	_onUpdateLevel: falseFn,
129704
 
129705
	_onRemoveLevel: falseFn,
129706
 
129707
	_onCreateLevel: falseFn,
129708
 
129709
	_pruneTiles: function () {
129710
		if (!this._map) {
129711
			return;
129712
		}
129713
 
129714
		var key, tile;
129715
 
129716
		var zoom = this._map.getZoom();
129717
		if (zoom > this.options.maxZoom ||
129718
			zoom < this.options.minZoom) {
129719
			this._removeAllTiles();
129720
			return;
129721
		}
129722
 
129723
		for (key in this._tiles) {
129724
			tile = this._tiles[key];
129725
			tile.retain = tile.current;
129726
		}
129727
 
129728
		for (key in this._tiles) {
129729
			tile = this._tiles[key];
129730
			if (tile.current && !tile.active) {
129731
				var coords = tile.coords;
129732
				if (!this._retainParent(coords.x, coords.y, coords.z, coords.z - 5)) {
129733
					this._retainChildren(coords.x, coords.y, coords.z, coords.z + 2);
129734
				}
129735
			}
129736
		}
129737
 
129738
		for (key in this._tiles) {
129739
			if (!this._tiles[key].retain) {
129740
				this._removeTile(key);
129741
			}
129742
		}
129743
	},
129744
 
129745
	_removeTilesAtZoom: function (zoom) {
129746
		for (var key in this._tiles) {
129747
			if (this._tiles[key].coords.z !== zoom) {
129748
				continue;
129749
			}
129750
			this._removeTile(key);
129751
		}
129752
	},
129753
 
129754
	_removeAllTiles: function () {
129755
		for (var key in this._tiles) {
129756
			this._removeTile(key);
129757
		}
129758
	},
129759
 
129760
	_invalidateAll: function () {
129761
		for (var z in this._levels) {
129762
			remove(this._levels[z].el);
129763
			this._onRemoveLevel(z);
129764
			delete this._levels[z];
129765
		}
129766
		this._removeAllTiles();
129767
 
129768
		this._tileZoom = undefined;
129769
	},
129770
 
129771
	_retainParent: function (x, y, z, minZoom) {
129772
		var x2 = Math.floor(x / 2),
129773
		    y2 = Math.floor(y / 2),
129774
		    z2 = z - 1,
129775
		    coords2 = new Point(+x2, +y2);
129776
		coords2.z = +z2;
129777
 
129778
		var key = this._tileCoordsToKey(coords2),
129779
		    tile = this._tiles[key];
129780
 
129781
		if (tile && tile.active) {
129782
			tile.retain = true;
129783
			return true;
129784
 
129785
		} else if (tile && tile.loaded) {
129786
			tile.retain = true;
129787
		}
129788
 
129789
		if (z2 > minZoom) {
129790
			return this._retainParent(x2, y2, z2, minZoom);
129791
		}
129792
 
129793
		return false;
129794
	},
129795
 
129796
	_retainChildren: function (x, y, z, maxZoom) {
129797
 
129798
		for (var i = 2 * x; i < 2 * x + 2; i++) {
129799
			for (var j = 2 * y; j < 2 * y + 2; j++) {
129800
 
129801
				var coords = new Point(i, j);
129802
				coords.z = z + 1;
129803
 
129804
				var key = this._tileCoordsToKey(coords),
129805
				    tile = this._tiles[key];
129806
 
129807
				if (tile && tile.active) {
129808
					tile.retain = true;
129809
					continue;
129810
 
129811
				} else if (tile && tile.loaded) {
129812
					tile.retain = true;
129813
				}
129814
 
129815
				if (z + 1 < maxZoom) {
129816
					this._retainChildren(i, j, z + 1, maxZoom);
129817
				}
129818
			}
129819
		}
129820
	},
129821
 
129822
	_resetView: function (e) {
129823
		var animating = e && (e.pinch || e.flyTo);
129824
		this._setView(this._map.getCenter(), this._map.getZoom(), animating, animating);
129825
	},
129826
 
129827
	_animateZoom: function (e) {
129828
		this._setView(e.center, e.zoom, true, e.noUpdate);
129829
	},
129830
 
129831
	_clampZoom: function (zoom) {
129832
		var options = this.options;
129833
 
129834
		if (undefined !== options.minNativeZoom && zoom < options.minNativeZoom) {
129835
			return options.minNativeZoom;
129836
		}
129837
 
129838
		if (undefined !== options.maxNativeZoom && options.maxNativeZoom < zoom) {
129839
			return options.maxNativeZoom;
129840
		}
129841
 
129842
		return zoom;
129843
	},
129844
 
129845
	_setView: function (center, zoom, noPrune, noUpdate) {
129846
		var tileZoom = this._clampZoom(Math.round(zoom));
129847
		if ((this.options.maxZoom !== undefined && tileZoom > this.options.maxZoom) ||
129848
		    (this.options.minZoom !== undefined && tileZoom < this.options.minZoom)) {
129849
			tileZoom = undefined;
129850
		}
129851
 
129852
		var tileZoomChanged = this.options.updateWhenZooming && (tileZoom !== this._tileZoom);
129853
 
129854
		if (!noUpdate || tileZoomChanged) {
129855
 
129856
			this._tileZoom = tileZoom;
129857
 
129858
			if (this._abortLoading) {
129859
				this._abortLoading();
129860
			}
129861
 
129862
			this._updateLevels();
129863
			this._resetGrid();
129864
 
129865
			if (tileZoom !== undefined) {
129866
				this._update(center);
129867
			}
129868
 
129869
			if (!noPrune) {
129870
				this._pruneTiles();
129871
			}
129872
 
129873
			// Flag to prevent _updateOpacity from pruning tiles during
129874
			// a zoom anim or a pinch gesture
129875
			this._noPrune = !!noPrune;
129876
		}
129877
 
129878
		this._setZoomTransforms(center, zoom);
129879
	},
129880
 
129881
	_setZoomTransforms: function (center, zoom) {
129882
		for (var i in this._levels) {
129883
			this._setZoomTransform(this._levels[i], center, zoom);
129884
		}
129885
	},
129886
 
129887
	_setZoomTransform: function (level, center, zoom) {
129888
		var scale = this._map.getZoomScale(zoom, level.zoom),
129889
		    translate = level.origin.multiplyBy(scale)
129890
		        .subtract(this._map._getNewPixelOrigin(center, zoom)).round();
129891
 
129892
		if (any3d) {
129893
			setTransform(level.el, translate, scale);
129894
		} else {
129895
			setPosition(level.el, translate);
129896
		}
129897
	},
129898
 
129899
	_resetGrid: function () {
129900
		var map = this._map,
129901
		    crs = map.options.crs,
129902
		    tileSize = this._tileSize = this.getTileSize(),
129903
		    tileZoom = this._tileZoom;
129904
 
129905
		var bounds = this._map.getPixelWorldBounds(this._tileZoom);
129906
		if (bounds) {
129907
			this._globalTileRange = this._pxBoundsToTileRange(bounds);
129908
		}
129909
 
129910
		this._wrapX = crs.wrapLng && !this.options.noWrap && [
129911
			Math.floor(map.project([0, crs.wrapLng[0]], tileZoom).x / tileSize.x),
129912
			Math.ceil(map.project([0, crs.wrapLng[1]], tileZoom).x / tileSize.y)
129913
		];
129914
		this._wrapY = crs.wrapLat && !this.options.noWrap && [
129915
			Math.floor(map.project([crs.wrapLat[0], 0], tileZoom).y / tileSize.x),
129916
			Math.ceil(map.project([crs.wrapLat[1], 0], tileZoom).y / tileSize.y)
129917
		];
129918
	},
129919
 
129920
	_onMoveEnd: function () {
129921
		if (!this._map || this._map._animatingZoom) { return; }
129922
 
129923
		this._update();
129924
	},
129925
 
129926
	_getTiledPixelBounds: function (center) {
129927
		var map = this._map,
129928
		    mapZoom = map._animatingZoom ? Math.max(map._animateToZoom, map.getZoom()) : map.getZoom(),
129929
		    scale = map.getZoomScale(mapZoom, this._tileZoom),
129930
		    pixelCenter = map.project(center, this._tileZoom).floor(),
129931
		    halfSize = map.getSize().divideBy(scale * 2);
129932
 
129933
		return new Bounds(pixelCenter.subtract(halfSize), pixelCenter.add(halfSize));
129934
	},
129935
 
129936
	// Private method to load tiles in the grid's active zoom level according to map bounds
129937
	_update: function (center) {
129938
		var map = this._map;
129939
		if (!map) { return; }
129940
		var zoom = this._clampZoom(map.getZoom());
129941
 
129942
		if (center === undefined) { center = map.getCenter(); }
129943
		if (this._tileZoom === undefined) { return; }	// if out of minzoom/maxzoom
129944
 
129945
		var pixelBounds = this._getTiledPixelBounds(center),
129946
		    tileRange = this._pxBoundsToTileRange(pixelBounds),
129947
		    tileCenter = tileRange.getCenter(),
129948
		    queue = [],
129949
		    margin = this.options.keepBuffer,
129950
		    noPruneRange = new Bounds(tileRange.getBottomLeft().subtract([margin, -margin]),
129951
		                              tileRange.getTopRight().add([margin, -margin]));
129952
 
129953
		// Sanity check: panic if the tile range contains Infinity somewhere.
129954
		if (!(isFinite(tileRange.min.x) &&
129955
		      isFinite(tileRange.min.y) &&
129956
		      isFinite(tileRange.max.x) &&
129957
		      isFinite(tileRange.max.y))) { throw new Error('Attempted to load an infinite number of tiles'); }
129958
 
129959
		for (var key in this._tiles) {
129960
			var c = this._tiles[key].coords;
129961
			if (c.z !== this._tileZoom || !noPruneRange.contains(new Point(c.x, c.y))) {
129962
				this._tiles[key].current = false;
129963
			}
129964
		}
129965
 
129966
		// _update just loads more tiles. If the tile zoom level differs too much
129967
		// from the map's, let _setView reset levels and prune old tiles.
129968
		if (Math.abs(zoom - this._tileZoom) > 1) { this._setView(center, zoom); return; }
129969
 
129970
		// create a queue of coordinates to load tiles from
129971
		for (var j = tileRange.min.y; j <= tileRange.max.y; j++) {
129972
			for (var i = tileRange.min.x; i <= tileRange.max.x; i++) {
129973
				var coords = new Point(i, j);
129974
				coords.z = this._tileZoom;
129975
 
129976
				if (!this._isValidTile(coords)) { continue; }
129977
 
129978
				var tile = this._tiles[this._tileCoordsToKey(coords)];
129979
				if (tile) {
129980
					tile.current = true;
129981
				} else {
129982
					queue.push(coords);
129983
				}
129984
			}
129985
		}
129986
 
129987
		// sort tile queue to load tiles in order of their distance to center
129988
		queue.sort(function (a, b) {
129989
			return a.distanceTo(tileCenter) - b.distanceTo(tileCenter);
129990
		});
129991
 
129992
		if (queue.length !== 0) {
129993
			// if it's the first batch of tiles to load
129994
			if (!this._loading) {
129995
				this._loading = true;
129996
				// @event loading: Event
129997
				// Fired when the grid layer starts loading tiles.
129998
				this.fire('loading');
129999
			}
130000
 
130001
			// create DOM fragment to append tiles in one batch
130002
			var fragment = document.createDocumentFragment();
130003
 
130004
			for (i = 0; i < queue.length; i++) {
130005
				this._addTile(queue[i], fragment);
130006
			}
130007
 
130008
			this._level.el.appendChild(fragment);
130009
		}
130010
	},
130011
 
130012
	_isValidTile: function (coords) {
130013
		var crs = this._map.options.crs;
130014
 
130015
		if (!crs.infinite) {
130016
			// don't load tile if it's out of bounds and not wrapped
130017
			var bounds = this._globalTileRange;
130018
			if ((!crs.wrapLng && (coords.x < bounds.min.x || coords.x > bounds.max.x)) ||
130019
			    (!crs.wrapLat && (coords.y < bounds.min.y || coords.y > bounds.max.y))) { return false; }
130020
		}
130021
 
130022
		if (!this.options.bounds) { return true; }
130023
 
130024
		// don't load tile if it doesn't intersect the bounds in options
130025
		var tileBounds = this._tileCoordsToBounds(coords);
130026
		return toLatLngBounds(this.options.bounds).overlaps(tileBounds);
130027
	},
130028
 
130029
	_keyToBounds: function (key) {
130030
		return this._tileCoordsToBounds(this._keyToTileCoords(key));
130031
	},
130032
 
130033
	_tileCoordsToNwSe: function (coords) {
130034
		var map = this._map,
130035
		    tileSize = this.getTileSize(),
130036
		    nwPoint = coords.scaleBy(tileSize),
130037
		    sePoint = nwPoint.add(tileSize),
130038
		    nw = map.unproject(nwPoint, coords.z),
130039
		    se = map.unproject(sePoint, coords.z);
130040
		return [nw, se];
130041
	},
130042
 
130043
	// converts tile coordinates to its geographical bounds
130044
	_tileCoordsToBounds: function (coords) {
130045
		var bp = this._tileCoordsToNwSe(coords),
130046
		    bounds = new LatLngBounds(bp[0], bp[1]);
130047
 
130048
		if (!this.options.noWrap) {
130049
			bounds = this._map.wrapLatLngBounds(bounds);
130050
		}
130051
		return bounds;
130052
	},
130053
	// converts tile coordinates to key for the tile cache
130054
	_tileCoordsToKey: function (coords) {
130055
		return coords.x + ':' + coords.y + ':' + coords.z;
130056
	},
130057
 
130058
	// converts tile cache key to coordinates
130059
	_keyToTileCoords: function (key) {
130060
		var k = key.split(':'),
130061
		    coords = new Point(+k[0], +k[1]);
130062
		coords.z = +k[2];
130063
		return coords;
130064
	},
130065
 
130066
	_removeTile: function (key) {
130067
		var tile = this._tiles[key];
130068
		if (!tile) { return; }
130069
 
130070
		// Cancels any pending http requests associated with the tile
130071
		// unless we're on Android's stock browser,
130072
		// see https://github.com/Leaflet/Leaflet/issues/137
130073
		if (!androidStock) {
130074
			tile.el.setAttribute('src', emptyImageUrl);
130075
		}
130076
		remove(tile.el);
130077
 
130078
		delete this._tiles[key];
130079
 
130080
		// @event tileunload: TileEvent
130081
		// Fired when a tile is removed (e.g. when a tile goes off the screen).
130082
		this.fire('tileunload', {
130083
			tile: tile.el,
130084
			coords: this._keyToTileCoords(key)
130085
		});
130086
	},
130087
 
130088
	_initTile: function (tile) {
130089
		addClass(tile, 'leaflet-tile');
130090
 
130091
		var tileSize = this.getTileSize();
130092
		tile.style.width = tileSize.x + 'px';
130093
		tile.style.height = tileSize.y + 'px';
130094
 
130095
		tile.onselectstart = falseFn;
130096
		tile.onmousemove = falseFn;
130097
 
130098
		// update opacity on tiles in IE7-8 because of filter inheritance problems
130099
		if (ielt9 && this.options.opacity < 1) {
130100
			setOpacity(tile, this.options.opacity);
130101
		}
130102
 
130103
		// without this hack, tiles disappear after zoom on Chrome for Android
130104
		// https://github.com/Leaflet/Leaflet/issues/2078
130105
		if (android && !android23) {
130106
			tile.style.WebkitBackfaceVisibility = 'hidden';
130107
		}
130108
	},
130109
 
130110
	_addTile: function (coords, container) {
130111
		var tilePos = this._getTilePos(coords),
130112
		    key = this._tileCoordsToKey(coords);
130113
 
130114
		var tile = this.createTile(this._wrapCoords(coords), bind(this._tileReady, this, coords));
130115
 
130116
		this._initTile(tile);
130117
 
130118
		// if createTile is defined with a second argument ("done" callback),
130119
		// we know that tile is async and will be ready later; otherwise
130120
		if (this.createTile.length < 2) {
130121
			// mark tile as ready, but delay one frame for opacity animation to happen
130122
			requestAnimFrame(bind(this._tileReady, this, coords, null, tile));
130123
		}
130124
 
130125
		setPosition(tile, tilePos);
130126
 
130127
		// save tile in cache
130128
		this._tiles[key] = {
130129
			el: tile,
130130
			coords: coords,
130131
			current: true
130132
		};
130133
 
130134
		container.appendChild(tile);
130135
		// @event tileloadstart: TileEvent
130136
		// Fired when a tile is requested and starts loading.
130137
		this.fire('tileloadstart', {
130138
			tile: tile,
130139
			coords: coords
130140
		});
130141
	},
130142
 
130143
	_tileReady: function (coords, err, tile) {
130144
		if (!this._map || tile.getAttribute('src') === emptyImageUrl) { return; }
130145
 
130146
		if (err) {
130147
			// @event tileerror: TileErrorEvent
130148
			// Fired when there is an error loading a tile.
130149
			this.fire('tileerror', {
130150
				error: err,
130151
				tile: tile,
130152
				coords: coords
130153
			});
130154
		}
130155
 
130156
		var key = this._tileCoordsToKey(coords);
130157
 
130158
		tile = this._tiles[key];
130159
		if (!tile) { return; }
130160
 
130161
		tile.loaded = +new Date();
130162
		if (this._map._fadeAnimated) {
130163
			setOpacity(tile.el, 0);
130164
			cancelAnimFrame(this._fadeFrame);
130165
			this._fadeFrame = requestAnimFrame(this._updateOpacity, this);
130166
		} else {
130167
			tile.active = true;
130168
			this._pruneTiles();
130169
		}
130170
 
130171
		if (!err) {
130172
			addClass(tile.el, 'leaflet-tile-loaded');
130173
 
130174
			// @event tileload: TileEvent
130175
			// Fired when a tile loads.
130176
			this.fire('tileload', {
130177
				tile: tile.el,
130178
				coords: coords
130179
			});
130180
		}
130181
 
130182
		if (this._noTilesToLoad()) {
130183
			this._loading = false;
130184
			// @event load: Event
130185
			// Fired when the grid layer loaded all visible tiles.
130186
			this.fire('load');
130187
 
130188
			if (ielt9 || !this._map._fadeAnimated) {
130189
				requestAnimFrame(this._pruneTiles, this);
130190
			} else {
130191
				// Wait a bit more than 0.2 secs (the duration of the tile fade-in)
130192
				// to trigger a pruning.
130193
				setTimeout(bind(this._pruneTiles, this), 250);
130194
			}
130195
		}
130196
	},
130197
 
130198
	_getTilePos: function (coords) {
130199
		return coords.scaleBy(this.getTileSize()).subtract(this._level.origin);
130200
	},
130201
 
130202
	_wrapCoords: function (coords) {
130203
		var newCoords = new Point(
130204
			this._wrapX ? wrapNum(coords.x, this._wrapX) : coords.x,
130205
			this._wrapY ? wrapNum(coords.y, this._wrapY) : coords.y);
130206
		newCoords.z = coords.z;
130207
		return newCoords;
130208
	},
130209
 
130210
	_pxBoundsToTileRange: function (bounds) {
130211
		var tileSize = this.getTileSize();
130212
		return new Bounds(
130213
			bounds.min.unscaleBy(tileSize).floor(),
130214
			bounds.max.unscaleBy(tileSize).ceil().subtract([1, 1]));
130215
	},
130216
 
130217
	_noTilesToLoad: function () {
130218
		for (var key in this._tiles) {
130219
			if (!this._tiles[key].loaded) { return false; }
130220
		}
130221
		return true;
130222
	}
130223
});
130224
 
130225
// @factory L.gridLayer(options?: GridLayer options)
130226
// Creates a new instance of GridLayer with the supplied options.
130227
function gridLayer(options) {
130228
	return new GridLayer(options);
130229
}
130230
 
130231
/*
130232
 * @class TileLayer
130233
 * @inherits GridLayer
130234
 * @aka L.TileLayer
130235
 * Used to load and display tile layers on the map. Extends `GridLayer`.
130236
 *
130237
 * @example
130238
 *
130239
 * ```js
130240
 * L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png?{foo}', {foo: 'bar'}).addTo(map);
130241
 * ```
130242
 *
130243
 * @section URL template
130244
 * @example
130245
 *
130246
 * A string of the following form:
130247
 *
130248
 * ```
130249
 * 'http://{s}.somedomain.com/blabla/{z}/{x}/{y}{r}.png'
130250
 * ```
130251
 *
130252
 * `{s}` means one of the available subdomains (used sequentially to help with browser parallel requests per domain limitation; subdomain values are specified in options; `a`, `b` or `c` by default, can be omitted), `{z}` — zoom level, `{x}` and `{y}` — tile coordinates. `{r}` can be used to add "&commat;2x" to the URL to load retina tiles.
130253
 *
130254
 * You can use custom keys in the template, which will be [evaluated](#util-template) from TileLayer options, like this:
130255
 *
130256
 * ```
130257
 * L.tileLayer('http://{s}.somedomain.com/{foo}/{z}/{x}/{y}.png', {foo: 'bar'});
130258
 * ```
130259
 */
130260
 
130261
 
130262
var TileLayer = GridLayer.extend({
130263
 
130264
	// @section
130265
	// @aka TileLayer options
130266
	options: {
130267
		// @option minZoom: Number = 0
130268
		// The minimum zoom level down to which this layer will be displayed (inclusive).
130269
		minZoom: 0,
130270
 
130271
		// @option maxZoom: Number = 18
130272
		// The maximum zoom level up to which this layer will be displayed (inclusive).
130273
		maxZoom: 18,
130274
 
130275
		// @option subdomains: String|String[] = 'abc'
130276
		// Subdomains of the tile service. Can be passed in the form of one string (where each letter is a subdomain name) or an array of strings.
130277
		subdomains: 'abc',
130278
 
130279
		// @option errorTileUrl: String = ''
130280
		// URL to the tile image to show in place of the tile that failed to load.
130281
		errorTileUrl: '',
130282
 
130283
		// @option zoomOffset: Number = 0
130284
		// The zoom number used in tile URLs will be offset with this value.
130285
		zoomOffset: 0,
130286
 
130287
		// @option tms: Boolean = false
130288
		// If `true`, inverses Y axis numbering for tiles (turn this on for [TMS](https://en.wikipedia.org/wiki/Tile_Map_Service) services).
130289
		tms: false,
130290
 
130291
		// @option zoomReverse: Boolean = false
130292
		// If set to true, the zoom number used in tile URLs will be reversed (`maxZoom - zoom` instead of `zoom`)
130293
		zoomReverse: false,
130294
 
130295
		// @option detectRetina: Boolean = false
130296
		// If `true` and user is on a retina display, it will request four tiles of half the specified size and a bigger zoom level in place of one to utilize the high resolution.
130297
		detectRetina: false,
130298
 
130299
		// @option crossOrigin: Boolean|String = false
130300
		// Whether the crossOrigin attribute will be added to the tiles.
130301
		// If a String is provided, all tiles will have their crossOrigin attribute set to the String provided. This is needed if you want to access tile pixel data.
130302
		// Refer to [CORS Settings](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for valid String values.
130303
		crossOrigin: false
130304
	},
130305
 
130306
	initialize: function (url, options) {
130307
 
130308
		this._url = url;
130309
 
130310
		options = setOptions(this, options);
130311
 
130312
		// detecting retina displays, adjusting tileSize and zoom levels
130313
		if (options.detectRetina && retina && options.maxZoom > 0) {
130314
 
130315
			options.tileSize = Math.floor(options.tileSize / 2);
130316
 
130317
			if (!options.zoomReverse) {
130318
				options.zoomOffset++;
130319
				options.maxZoom--;
130320
			} else {
130321
				options.zoomOffset--;
130322
				options.minZoom++;
130323
			}
130324
 
130325
			options.minZoom = Math.max(0, options.minZoom);
130326
		}
130327
 
130328
		if (typeof options.subdomains === 'string') {
130329
			options.subdomains = options.subdomains.split('');
130330
		}
130331
 
130332
		// for https://github.com/Leaflet/Leaflet/issues/137
130333
		if (!android) {
130334
			this.on('tileunload', this._onTileRemove);
130335
		}
130336
	},
130337
 
130338
	// @method setUrl(url: String, noRedraw?: Boolean): this
130339
	// Updates the layer's URL template and redraws it (unless `noRedraw` is set to `true`).
130340
	setUrl: function (url, noRedraw) {
130341
		this._url = url;
130342
 
130343
		if (!noRedraw) {
130344
			this.redraw();
130345
		}
130346
		return this;
130347
	},
130348
 
130349
	// @method createTile(coords: Object, done?: Function): HTMLElement
130350
	// Called only internally, overrides GridLayer's [`createTile()`](#gridlayer-createtile)
130351
	// to return an `<img>` HTML element with the appropriate image URL given `coords`. The `done`
130352
	// callback is called when the tile has been loaded.
130353
	createTile: function (coords, done) {
130354
		var tile = document.createElement('img');
130355
 
130356
		on(tile, 'load', bind(this._tileOnLoad, this, done, tile));
130357
		on(tile, 'error', bind(this._tileOnError, this, done, tile));
130358
 
130359
		if (this.options.crossOrigin || this.options.crossOrigin === '') {
130360
			tile.crossOrigin = this.options.crossOrigin === true ? '' : this.options.crossOrigin;
130361
		}
130362
 
130363
		/*
130364
		 Alt tag is set to empty string to keep screen readers from reading URL and for compliance reasons
130365
		 http://www.w3.org/TR/WCAG20-TECHS/H67
130366
		*/
130367
		tile.alt = '';
130368
 
130369
		/*
130370
		 Set role="presentation" to force screen readers to ignore this
130371
		 https://www.w3.org/TR/wai-aria/roles#textalternativecomputation
130372
		*/
130373
		tile.setAttribute('role', 'presentation');
130374
 
130375
		tile.src = this.getTileUrl(coords);
130376
 
130377
		return tile;
130378
	},
130379
 
130380
	// @section Extension methods
130381
	// @uninheritable
130382
	// Layers extending `TileLayer` might reimplement the following method.
130383
	// @method getTileUrl(coords: Object): String
130384
	// Called only internally, returns the URL for a tile given its coordinates.
130385
	// Classes extending `TileLayer` can override this function to provide custom tile URL naming schemes.
130386
	getTileUrl: function (coords) {
130387
		var data = {
130388
			r: retina ? '@2x' : '',
130389
			s: this._getSubdomain(coords),
130390
			x: coords.x,
130391
			y: coords.y,
130392
			z: this._getZoomForUrl()
130393
		};
130394
		if (this._map && !this._map.options.crs.infinite) {
130395
			var invertedY = this._globalTileRange.max.y - coords.y;
130396
			if (this.options.tms) {
130397
				data['y'] = invertedY;
130398
			}
130399
			data['-y'] = invertedY;
130400
		}
130401
 
130402
		return template(this._url, extend(data, this.options));
130403
	},
130404
 
130405
	_tileOnLoad: function (done, tile) {
130406
		// For https://github.com/Leaflet/Leaflet/issues/3332
130407
		if (ielt9) {
130408
			setTimeout(bind(done, this, null, tile), 0);
130409
		} else {
130410
			done(null, tile);
130411
		}
130412
	},
130413
 
130414
	_tileOnError: function (done, tile, e) {
130415
		var errorUrl = this.options.errorTileUrl;
130416
		if (errorUrl && tile.getAttribute('src') !== errorUrl) {
130417
			tile.src = errorUrl;
130418
		}
130419
		done(e, tile);
130420
	},
130421
 
130422
	_onTileRemove: function (e) {
130423
		e.tile.onload = null;
130424
	},
130425
 
130426
	_getZoomForUrl: function () {
130427
		var zoom = this._tileZoom,
130428
		maxZoom = this.options.maxZoom,
130429
		zoomReverse = this.options.zoomReverse,
130430
		zoomOffset = this.options.zoomOffset;
130431
 
130432
		if (zoomReverse) {
130433
			zoom = maxZoom - zoom;
130434
		}
130435
 
130436
		return zoom + zoomOffset;
130437
	},
130438
 
130439
	_getSubdomain: function (tilePoint) {
130440
		var index = Math.abs(tilePoint.x + tilePoint.y) % this.options.subdomains.length;
130441
		return this.options.subdomains[index];
130442
	},
130443
 
130444
	// stops loading all tiles in the background layer
130445
	_abortLoading: function () {
130446
		var i, tile;
130447
		for (i in this._tiles) {
130448
			if (this._tiles[i].coords.z !== this._tileZoom) {
130449
				tile = this._tiles[i].el;
130450
 
130451
				tile.onload = falseFn;
130452
				tile.onerror = falseFn;
130453
 
130454
				if (!tile.complete) {
130455
					tile.src = emptyImageUrl;
130456
					remove(tile);
130457
					delete this._tiles[i];
130458
				}
130459
			}
130460
		}
130461
	}
130462
});
130463
 
130464
 
130465
// @factory L.tilelayer(urlTemplate: String, options?: TileLayer options)
130466
// Instantiates a tile layer object given a `URL template` and optionally an options object.
130467
 
130468
function tileLayer(url, options) {
130469
	return new TileLayer(url, options);
130470
}
130471
 
130472
/*
130473
 * @class TileLayer.WMS
130474
 * @inherits TileLayer
130475
 * @aka L.TileLayer.WMS
130476
 * Used to display [WMS](https://en.wikipedia.org/wiki/Web_Map_Service) services as tile layers on the map. Extends `TileLayer`.
130477
 *
130478
 * @example
130479
 *
130480
 * ```js
130481
 * var nexrad = L.tileLayer.wms("http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi", {
130482
 * 	layers: 'nexrad-n0r-900913',
130483
 * 	format: 'image/png',
130484
 * 	transparent: true,
130485
 * 	attribution: "Weather data © 2012 IEM Nexrad"
130486
 * });
130487
 * ```
130488
 */
130489
 
130490
var TileLayerWMS = TileLayer.extend({
130491
 
130492
	// @section
130493
	// @aka TileLayer.WMS options
130494
	// If any custom options not documented here are used, they will be sent to the
130495
	// WMS server as extra parameters in each request URL. This can be useful for
130496
	// [non-standard vendor WMS parameters](http://docs.geoserver.org/stable/en/user/services/wms/vendor.html).
130497
	defaultWmsParams: {
130498
		service: 'WMS',
130499
		request: 'GetMap',
130500
 
130501
		// @option layers: String = ''
130502
		// **(required)** Comma-separated list of WMS layers to show.
130503
		layers: '',
130504
 
130505
		// @option styles: String = ''
130506
		// Comma-separated list of WMS styles.
130507
		styles: '',
130508
 
130509
		// @option format: String = 'image/jpeg'
130510
		// WMS image format (use `'image/png'` for layers with transparency).
130511
		format: 'image/jpeg',
130512
 
130513
		// @option transparent: Boolean = false
130514
		// If `true`, the WMS service will return images with transparency.
130515
		transparent: false,
130516
 
130517
		// @option version: String = '1.1.1'
130518
		// Version of the WMS service to use
130519
		version: '1.1.1'
130520
	},
130521
 
130522
	options: {
130523
		// @option crs: CRS = null
130524
		// Coordinate Reference System to use for the WMS requests, defaults to
130525
		// map CRS. Don't change this if you're not sure what it means.
130526
		crs: null,
130527
 
130528
		// @option uppercase: Boolean = false
130529
		// If `true`, WMS request parameter keys will be uppercase.
130530
		uppercase: false
130531
	},
130532
 
130533
	initialize: function (url, options) {
130534
 
130535
		this._url = url;
130536
 
130537
		var wmsParams = extend({}, this.defaultWmsParams);
130538
 
130539
		// all keys that are not TileLayer options go to WMS params
130540
		for (var i in options) {
130541
			if (!(i in this.options)) {
130542
				wmsParams[i] = options[i];
130543
			}
130544
		}
130545
 
130546
		options = setOptions(this, options);
130547
 
130548
		var realRetina = options.detectRetina && retina ? 2 : 1;
130549
		var tileSize = this.getTileSize();
130550
		wmsParams.width = tileSize.x * realRetina;
130551
		wmsParams.height = tileSize.y * realRetina;
130552
 
130553
		this.wmsParams = wmsParams;
130554
	},
130555
 
130556
	onAdd: function (map) {
130557
 
130558
		this._crs = this.options.crs || map.options.crs;
130559
		this._wmsVersion = parseFloat(this.wmsParams.version);
130560
 
130561
		var projectionKey = this._wmsVersion >= 1.3 ? 'crs' : 'srs';
130562
		this.wmsParams[projectionKey] = this._crs.code;
130563
 
130564
		TileLayer.prototype.onAdd.call(this, map);
130565
	},
130566
 
130567
	getTileUrl: function (coords) {
130568
 
130569
		var tileBounds = this._tileCoordsToNwSe(coords),
130570
		    crs = this._crs,
130571
		    bounds = toBounds(crs.project(tileBounds[0]), crs.project(tileBounds[1])),
130572
		    min = bounds.min,
130573
		    max = bounds.max,
130574
		    bbox = (this._wmsVersion >= 1.3 && this._crs === EPSG4326 ?
130575
		    [min.y, min.x, max.y, max.x] :
130576
		    [min.x, min.y, max.x, max.y]).join(','),
130577
		    url = TileLayer.prototype.getTileUrl.call(this, coords);
130578
		return url +
130579
			getParamString(this.wmsParams, url, this.options.uppercase) +
130580
			(this.options.uppercase ? '&BBOX=' : '&bbox=') + bbox;
130581
	},
130582
 
130583
	// @method setParams(params: Object, noRedraw?: Boolean): this
130584
	// Merges an object with the new parameters and re-requests tiles on the current screen (unless `noRedraw` was set to true).
130585
	setParams: function (params, noRedraw) {
130586
 
130587
		extend(this.wmsParams, params);
130588
 
130589
		if (!noRedraw) {
130590
			this.redraw();
130591
		}
130592
 
130593
		return this;
130594
	}
130595
});
130596
 
130597
 
130598
// @factory L.tileLayer.wms(baseUrl: String, options: TileLayer.WMS options)
130599
// Instantiates a WMS tile layer object given a base URL of the WMS service and a WMS parameters/options object.
130600
function tileLayerWMS(url, options) {
130601
	return new TileLayerWMS(url, options);
130602
}
130603
 
130604
TileLayer.WMS = TileLayerWMS;
130605
tileLayer.wms = tileLayerWMS;
130606
 
130607
/*
130608
 * @class Renderer
130609
 * @inherits Layer
130610
 * @aka L.Renderer
130611
 *
130612
 * Base class for vector renderer implementations (`SVG`, `Canvas`). Handles the
130613
 * DOM container of the renderer, its bounds, and its zoom animation.
130614
 *
130615
 * A `Renderer` works as an implicit layer group for all `Path`s - the renderer
130616
 * itself can be added or removed to the map. All paths use a renderer, which can
130617
 * be implicit (the map will decide the type of renderer and use it automatically)
130618
 * or explicit (using the [`renderer`](#path-renderer) option of the path).
130619
 *
130620
 * Do not use this class directly, use `SVG` and `Canvas` instead.
130621
 *
130622
 * @event update: Event
130623
 * Fired when the renderer updates its bounds, center and zoom, for example when
130624
 * its map has moved
130625
 */
130626
 
130627
var Renderer = Layer.extend({
130628
 
130629
	// @section
130630
	// @aka Renderer options
130631
	options: {
130632
		// @option padding: Number = 0.1
130633
		// How much to extend the clip area around the map view (relative to its size)
130634
		// e.g. 0.1 would be 10% of map view in each direction
130635
		padding: 0.1,
130636
 
130637
		// @option tolerance: Number = 0
130638
		// How much to extend click tolerance round a path/object on the map
130639
		tolerance : 0
130640
	},
130641
 
130642
	initialize: function (options) {
130643
		setOptions(this, options);
130644
		stamp(this);
130645
		this._layers = this._layers || {};
130646
	},
130647
 
130648
	onAdd: function () {
130649
		if (!this._container) {
130650
			this._initContainer(); // defined by renderer implementations
130651
 
130652
			if (this._zoomAnimated) {
130653
				addClass(this._container, 'leaflet-zoom-animated');
130654
			}
130655
		}
130656
 
130657
		this.getPane().appendChild(this._container);
130658
		this._update();
130659
		this.on('update', this._updatePaths, this);
130660
	},
130661
 
130662
	onRemove: function () {
130663
		this.off('update', this._updatePaths, this);
130664
		this._destroyContainer();
130665
	},
130666
 
130667
	getEvents: function () {
130668
		var events = {
130669
			viewreset: this._reset,
130670
			zoom: this._onZoom,
130671
			moveend: this._update,
130672
			zoomend: this._onZoomEnd
130673
		};
130674
		if (this._zoomAnimated) {
130675
			events.zoomanim = this._onAnimZoom;
130676
		}
130677
		return events;
130678
	},
130679
 
130680
	_onAnimZoom: function (ev) {
130681
		this._updateTransform(ev.center, ev.zoom);
130682
	},
130683
 
130684
	_onZoom: function () {
130685
		this._updateTransform(this._map.getCenter(), this._map.getZoom());
130686
	},
130687
 
130688
	_updateTransform: function (center, zoom) {
130689
		var scale = this._map.getZoomScale(zoom, this._zoom),
130690
		    position = getPosition(this._container),
130691
		    viewHalf = this._map.getSize().multiplyBy(0.5 + this.options.padding),
130692
		    currentCenterPoint = this._map.project(this._center, zoom),
130693
		    destCenterPoint = this._map.project(center, zoom),
130694
		    centerOffset = destCenterPoint.subtract(currentCenterPoint),
130695
 
130696
		    topLeftOffset = viewHalf.multiplyBy(-scale).add(position).add(viewHalf).subtract(centerOffset);
130697
 
130698
		if (any3d) {
130699
			setTransform(this._container, topLeftOffset, scale);
130700
		} else {
130701
			setPosition(this._container, topLeftOffset);
130702
		}
130703
	},
130704
 
130705
	_reset: function () {
130706
		this._update();
130707
		this._updateTransform(this._center, this._zoom);
130708
 
130709
		for (var id in this._layers) {
130710
			this._layers[id]._reset();
130711
		}
130712
	},
130713
 
130714
	_onZoomEnd: function () {
130715
		for (var id in this._layers) {
130716
			this._layers[id]._project();
130717
		}
130718
	},
130719
 
130720
	_updatePaths: function () {
130721
		for (var id in this._layers) {
130722
			this._layers[id]._update();
130723
		}
130724
	},
130725
 
130726
	_update: function () {
130727
		// Update pixel bounds of renderer container (for positioning/sizing/clipping later)
130728
		// Subclasses are responsible of firing the 'update' event.
130729
		var p = this.options.padding,
130730
		    size = this._map.getSize(),
130731
		    min = this._map.containerPointToLayerPoint(size.multiplyBy(-p)).round();
130732
 
130733
		this._bounds = new Bounds(min, min.add(size.multiplyBy(1 + p * 2)).round());
130734
 
130735
		this._center = this._map.getCenter();
130736
		this._zoom = this._map.getZoom();
130737
	}
130738
});
130739
 
130740
/*
130741
 * @class Canvas
130742
 * @inherits Renderer
130743
 * @aka L.Canvas
130744
 *
130745
 * Allows vector layers to be displayed with [`<canvas>`](https://developer.mozilla.org/docs/Web/API/Canvas_API).
130746
 * Inherits `Renderer`.
130747
 *
130748
 * Due to [technical limitations](http://caniuse.com/#search=canvas), Canvas is not
130749
 * available in all web browsers, notably IE8, and overlapping geometries might
130750
 * not display properly in some edge cases.
130751
 *
130752
 * @example
130753
 *
130754
 * Use Canvas by default for all paths in the map:
130755
 *
130756
 * ```js
130757
 * var map = L.map('map', {
130758
 * 	renderer: L.canvas()
130759
 * });
130760
 * ```
130761
 *
130762
 * Use a Canvas renderer with extra padding for specific vector geometries:
130763
 *
130764
 * ```js
130765
 * var map = L.map('map');
130766
 * var myRenderer = L.canvas({ padding: 0.5 });
130767
 * var line = L.polyline( coordinates, { renderer: myRenderer } );
130768
 * var circle = L.circle( center, { renderer: myRenderer } );
130769
 * ```
130770
 */
130771
 
130772
var Canvas = Renderer.extend({
130773
	getEvents: function () {
130774
		var events = Renderer.prototype.getEvents.call(this);
130775
		events.viewprereset = this._onViewPreReset;
130776
		return events;
130777
	},
130778
 
130779
	_onViewPreReset: function () {
130780
		// Set a flag so that a viewprereset+moveend+viewreset only updates&redraws once
130781
		this._postponeUpdatePaths = true;
130782
	},
130783
 
130784
	onAdd: function () {
130785
		Renderer.prototype.onAdd.call(this);
130786
 
130787
		// Redraw vectors since canvas is cleared upon removal,
130788
		// in case of removing the renderer itself from the map.
130789
		this._draw();
130790
	},
130791
 
130792
	_initContainer: function () {
130793
		var container = this._container = document.createElement('canvas');
130794
 
130795
		on(container, 'mousemove', throttle(this._onMouseMove, 32, this), this);
130796
		on(container, 'click dblclick mousedown mouseup contextmenu', this._onClick, this);
130797
		on(container, 'mouseout', this._handleMouseOut, this);
130798
 
130799
		this._ctx = container.getContext('2d');
130800
	},
130801
 
130802
	_destroyContainer: function () {
130803
		cancelAnimFrame(this._redrawRequest);
130804
		delete this._ctx;
130805
		remove(this._container);
130806
		off(this._container);
130807
		delete this._container;
130808
	},
130809
 
130810
	_updatePaths: function () {
130811
		if (this._postponeUpdatePaths) { return; }
130812
 
130813
		var layer;
130814
		this._redrawBounds = null;
130815
		for (var id in this._layers) {
130816
			layer = this._layers[id];
130817
			layer._update();
130818
		}
130819
		this._redraw();
130820
	},
130821
 
130822
	_update: function () {
130823
		if (this._map._animatingZoom && this._bounds) { return; }
130824
 
130825
		this._drawnLayers = {};
130826
 
130827
		Renderer.prototype._update.call(this);
130828
 
130829
		var b = this._bounds,
130830
		    container = this._container,
130831
		    size = b.getSize(),
130832
		    m = retina ? 2 : 1;
130833
 
130834
		setPosition(container, b.min);
130835
 
130836
		// set canvas size (also clearing it); use double size on retina
130837
		container.width = m * size.x;
130838
		container.height = m * size.y;
130839
		container.style.width = size.x + 'px';
130840
		container.style.height = size.y + 'px';
130841
 
130842
		if (retina) {
130843
			this._ctx.scale(2, 2);
130844
		}
130845
 
130846
		// translate so we use the same path coordinates after canvas element moves
130847
		this._ctx.translate(-b.min.x, -b.min.y);
130848
 
130849
		// Tell paths to redraw themselves
130850
		this.fire('update');
130851
	},
130852
 
130853
	_reset: function () {
130854
		Renderer.prototype._reset.call(this);
130855
 
130856
		if (this._postponeUpdatePaths) {
130857
			this._postponeUpdatePaths = false;
130858
			this._updatePaths();
130859
		}
130860
	},
130861
 
130862
	_initPath: function (layer) {
130863
		this._updateDashArray(layer);
130864
		this._layers[stamp(layer)] = layer;
130865
 
130866
		var order = layer._order = {
130867
			layer: layer,
130868
			prev: this._drawLast,
130869
			next: null
130870
		};
130871
		if (this._drawLast) { this._drawLast.next = order; }
130872
		this._drawLast = order;
130873
		this._drawFirst = this._drawFirst || this._drawLast;
130874
	},
130875
 
130876
	_addPath: function (layer) {
130877
		this._requestRedraw(layer);
130878
	},
130879
 
130880
	_removePath: function (layer) {
130881
		var order = layer._order;
130882
		var next = order.next;
130883
		var prev = order.prev;
130884
 
130885
		if (next) {
130886
			next.prev = prev;
130887
		} else {
130888
			this._drawLast = prev;
130889
		}
130890
		if (prev) {
130891
			prev.next = next;
130892
		} else {
130893
			this._drawFirst = next;
130894
		}
130895
 
130896
		delete this._drawnLayers[layer._leaflet_id];
130897
 
130898
		delete layer._order;
130899
 
130900
		delete this._layers[stamp(layer)];
130901
 
130902
		this._requestRedraw(layer);
130903
	},
130904
 
130905
	_updatePath: function (layer) {
130906
		// Redraw the union of the layer's old pixel
130907
		// bounds and the new pixel bounds.
130908
		this._extendRedrawBounds(layer);
130909
		layer._project();
130910
		layer._update();
130911
		// The redraw will extend the redraw bounds
130912
		// with the new pixel bounds.
130913
		this._requestRedraw(layer);
130914
	},
130915
 
130916
	_updateStyle: function (layer) {
130917
		this._updateDashArray(layer);
130918
		this._requestRedraw(layer);
130919
	},
130920
 
130921
	_updateDashArray: function (layer) {
130922
		if (typeof layer.options.dashArray === 'string') {
130923
			var parts = layer.options.dashArray.split(','),
130924
			    dashArray = [],
130925
			    i;
130926
			for (i = 0; i < parts.length; i++) {
130927
				dashArray.push(Number(parts[i]));
130928
			}
130929
			layer.options._dashArray = dashArray;
130930
		} else {
130931
			layer.options._dashArray = layer.options.dashArray;
130932
		}
130933
	},
130934
 
130935
	_requestRedraw: function (layer) {
130936
		if (!this._map) { return; }
130937
 
130938
		this._extendRedrawBounds(layer);
130939
		this._redrawRequest = this._redrawRequest || requestAnimFrame(this._redraw, this);
130940
	},
130941
 
130942
	_extendRedrawBounds: function (layer) {
130943
		if (layer._pxBounds) {
130944
			var padding = (layer.options.weight || 0) + 1;
130945
			this._redrawBounds = this._redrawBounds || new Bounds();
130946
			this._redrawBounds.extend(layer._pxBounds.min.subtract([padding, padding]));
130947
			this._redrawBounds.extend(layer._pxBounds.max.add([padding, padding]));
130948
		}
130949
	},
130950
 
130951
	_redraw: function () {
130952
		this._redrawRequest = null;
130953
 
130954
		if (this._redrawBounds) {
130955
			this._redrawBounds.min._floor();
130956
			this._redrawBounds.max._ceil();
130957
		}
130958
 
130959
		this._clear(); // clear layers in redraw bounds
130960
		this._draw(); // draw layers
130961
 
130962
		this._redrawBounds = null;
130963
	},
130964
 
130965
	_clear: function () {
130966
		var bounds = this._redrawBounds;
130967
		if (bounds) {
130968
			var size = bounds.getSize();
130969
			this._ctx.clearRect(bounds.min.x, bounds.min.y, size.x, size.y);
130970
		} else {
130971
			this._ctx.clearRect(0, 0, this._container.width, this._container.height);
130972
		}
130973
	},
130974
 
130975
	_draw: function () {
130976
		var layer, bounds = this._redrawBounds;
130977
		this._ctx.save();
130978
		if (bounds) {
130979
			var size = bounds.getSize();
130980
			this._ctx.beginPath();
130981
			this._ctx.rect(bounds.min.x, bounds.min.y, size.x, size.y);
130982
			this._ctx.clip();
130983
		}
130984
 
130985
		this._drawing = true;
130986
 
130987
		for (var order = this._drawFirst; order; order = order.next) {
130988
			layer = order.layer;
130989
			if (!bounds || (layer._pxBounds && layer._pxBounds.intersects(bounds))) {
130990
				layer._updatePath();
130991
			}
130992
		}
130993
 
130994
		this._drawing = false;
130995
 
130996
		this._ctx.restore();  // Restore state before clipping.
130997
	},
130998
 
130999
	_updatePoly: function (layer, closed) {
131000
		if (!this._drawing) { return; }
131001
 
131002
		var i, j, len2, p,
131003
		    parts = layer._parts,
131004
		    len = parts.length,
131005
		    ctx = this._ctx;
131006
 
131007
		if (!len) { return; }
131008
 
131009
		this._drawnLayers[layer._leaflet_id] = layer;
131010
 
131011
		ctx.beginPath();
131012
 
131013
		for (i = 0; i < len; i++) {
131014
			for (j = 0, len2 = parts[i].length; j < len2; j++) {
131015
				p = parts[i][j];
131016
				ctx[j ? 'lineTo' : 'moveTo'](p.x, p.y);
131017
			}
131018
			if (closed) {
131019
				ctx.closePath();
131020
			}
131021
		}
131022
 
131023
		this._fillStroke(ctx, layer);
131024
 
131025
		// TODO optimization: 1 fill/stroke for all features with equal style instead of 1 for each feature
131026
	},
131027
 
131028
	_updateCircle: function (layer) {
131029
 
131030
		if (!this._drawing || layer._empty()) { return; }
131031
 
131032
		var p = layer._point,
131033
		    ctx = this._ctx,
131034
		    r = Math.max(Math.round(layer._radius), 1),
131035
		    s = (Math.max(Math.round(layer._radiusY), 1) || r) / r;
131036
 
131037
		this._drawnLayers[layer._leaflet_id] = layer;
131038
 
131039
		if (s !== 1) {
131040
			ctx.save();
131041
			ctx.scale(1, s);
131042
		}
131043
 
131044
		ctx.beginPath();
131045
		ctx.arc(p.x, p.y / s, r, 0, Math.PI * 2, false);
131046
 
131047
		if (s !== 1) {
131048
			ctx.restore();
131049
		}
131050
 
131051
		this._fillStroke(ctx, layer);
131052
	},
131053
 
131054
	_fillStroke: function (ctx, layer) {
131055
		var options = layer.options;
131056
 
131057
		if (options.fill) {
131058
			ctx.globalAlpha = options.fillOpacity;
131059
			ctx.fillStyle = options.fillColor || options.color;
131060
			ctx.fill(options.fillRule || 'evenodd');
131061
		}
131062
 
131063
		if (options.stroke && options.weight !== 0) {
131064
			if (ctx.setLineDash) {
131065
				ctx.setLineDash(layer.options && layer.options._dashArray || []);
131066
			}
131067
			ctx.globalAlpha = options.opacity;
131068
			ctx.lineWidth = options.weight;
131069
			ctx.strokeStyle = options.color;
131070
			ctx.lineCap = options.lineCap;
131071
			ctx.lineJoin = options.lineJoin;
131072
			ctx.stroke();
131073
		}
131074
	},
131075
 
131076
	// Canvas obviously doesn't have mouse events for individual drawn objects,
131077
	// so we emulate that by calculating what's under the mouse on mousemove/click manually
131078
 
131079
	_onClick: function (e) {
131080
		var point = this._map.mouseEventToLayerPoint(e), layer, clickedLayer;
131081
 
131082
		for (var order = this._drawFirst; order; order = order.next) {
131083
			layer = order.layer;
131084
			if (layer.options.interactive && layer._containsPoint(point) && !this._map._draggableMoved(layer)) {
131085
				clickedLayer = layer;
131086
			}
131087
		}
131088
		if (clickedLayer)  {
131089
			fakeStop(e);
131090
			this._fireEvent([clickedLayer], e);
131091
		}
131092
	},
131093
 
131094
	_onMouseMove: function (e) {
131095
		if (!this._map || this._map.dragging.moving() || this._map._animatingZoom) { return; }
131096
 
131097
		var point = this._map.mouseEventToLayerPoint(e);
131098
		this._handleMouseHover(e, point);
131099
	},
131100
 
131101
 
131102
	_handleMouseOut: function (e) {
131103
		var layer = this._hoveredLayer;
131104
		if (layer) {
131105
			// if we're leaving the layer, fire mouseout
131106
			removeClass(this._container, 'leaflet-interactive');
131107
			this._fireEvent([layer], e, 'mouseout');
131108
			this._hoveredLayer = null;
131109
		}
131110
	},
131111
 
131112
	_handleMouseHover: function (e, point) {
131113
		var layer, candidateHoveredLayer;
131114
 
131115
		for (var order = this._drawFirst; order; order = order.next) {
131116
			layer = order.layer;
131117
			if (layer.options.interactive && layer._containsPoint(point)) {
131118
				candidateHoveredLayer = layer;
131119
			}
131120
		}
131121
 
131122
		if (candidateHoveredLayer !== this._hoveredLayer) {
131123
			this._handleMouseOut(e);
131124
 
131125
			if (candidateHoveredLayer) {
131126
				addClass(this._container, 'leaflet-interactive'); // change cursor
131127
				this._fireEvent([candidateHoveredLayer], e, 'mouseover');
131128
				this._hoveredLayer = candidateHoveredLayer;
131129
			}
131130
		}
131131
 
131132
		if (this._hoveredLayer) {
131133
			this._fireEvent([this._hoveredLayer], e);
131134
		}
131135
	},
131136
 
131137
	_fireEvent: function (layers, e, type) {
131138
		this._map._fireDOMEvent(e, type || e.type, layers);
131139
	},
131140
 
131141
	_bringToFront: function (layer) {
131142
		var order = layer._order;
131143
		var next = order.next;
131144
		var prev = order.prev;
131145
 
131146
		if (next) {
131147
			next.prev = prev;
131148
		} else {
131149
			// Already last
131150
			return;
131151
		}
131152
		if (prev) {
131153
			prev.next = next;
131154
		} else if (next) {
131155
			// Update first entry unless this is the
131156
			// single entry
131157
			this._drawFirst = next;
131158
		}
131159
 
131160
		order.prev = this._drawLast;
131161
		this._drawLast.next = order;
131162
 
131163
		order.next = null;
131164
		this._drawLast = order;
131165
 
131166
		this._requestRedraw(layer);
131167
	},
131168
 
131169
	_bringToBack: function (layer) {
131170
		var order = layer._order;
131171
		var next = order.next;
131172
		var prev = order.prev;
131173
 
131174
		if (prev) {
131175
			prev.next = next;
131176
		} else {
131177
			// Already first
131178
			return;
131179
		}
131180
		if (next) {
131181
			next.prev = prev;
131182
		} else if (prev) {
131183
			// Update last entry unless this is the
131184
			// single entry
131185
			this._drawLast = prev;
131186
		}
131187
 
131188
		order.prev = null;
131189
 
131190
		order.next = this._drawFirst;
131191
		this._drawFirst.prev = order;
131192
		this._drawFirst = order;
131193
 
131194
		this._requestRedraw(layer);
131195
	}
131196
});
131197
 
131198
// @factory L.canvas(options?: Renderer options)
131199
// Creates a Canvas renderer with the given options.
131200
function canvas$1(options) {
131201
	return canvas ? new Canvas(options) : null;
131202
}
131203
 
131204
/*
131205
 * Thanks to Dmitry Baranovsky and his Raphael library for inspiration!
131206
 */
131207
 
131208
 
131209
var vmlCreate = (function () {
131210
	try {
131211
		document.namespaces.add('lvml', 'urn:schemas-microsoft-com:vml');
131212
		return function (name) {
131213
			return document.createElement('<lvml:' + name + ' class="lvml">');
131214
		};
131215
	} catch (e) {
131216
		return function (name) {
131217
			return document.createElement('<' + name + ' xmlns="urn:schemas-microsoft.com:vml" class="lvml">');
131218
		};
131219
	}
131220
})();
131221
 
131222
 
131223
/*
131224
 * @class SVG
131225
 *
131226
 * Although SVG is not available on IE7 and IE8, these browsers support [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language), and the SVG renderer will fall back to VML in this case.
131227
 *
131228
 * VML was deprecated in 2012, which means VML functionality exists only for backwards compatibility
131229
 * with old versions of Internet Explorer.
131230
 */
131231
 
131232
// mixin to redefine some SVG methods to handle VML syntax which is similar but with some differences
131233
var vmlMixin = {
131234
 
131235
	_initContainer: function () {
131236
		this._container = create$1('div', 'leaflet-vml-container');
131237
	},
131238
 
131239
	_update: function () {
131240
		if (this._map._animatingZoom) { return; }
131241
		Renderer.prototype._update.call(this);
131242
		this.fire('update');
131243
	},
131244
 
131245
	_initPath: function (layer) {
131246
		var container = layer._container = vmlCreate('shape');
131247
 
131248
		addClass(container, 'leaflet-vml-shape ' + (this.options.className || ''));
131249
 
131250
		container.coordsize = '1 1';
131251
 
131252
		layer._path = vmlCreate('path');
131253
		container.appendChild(layer._path);
131254
 
131255
		this._updateStyle(layer);
131256
		this._layers[stamp(layer)] = layer;
131257
	},
131258
 
131259
	_addPath: function (layer) {
131260
		var container = layer._container;
131261
		this._container.appendChild(container);
131262
 
131263
		if (layer.options.interactive) {
131264
			layer.addInteractiveTarget(container);
131265
		}
131266
	},
131267
 
131268
	_removePath: function (layer) {
131269
		var container = layer._container;
131270
		remove(container);
131271
		layer.removeInteractiveTarget(container);
131272
		delete this._layers[stamp(layer)];
131273
	},
131274
 
131275
	_updateStyle: function (layer) {
131276
		var stroke = layer._stroke,
131277
		    fill = layer._fill,
131278
		    options = layer.options,
131279
		    container = layer._container;
131280
 
131281
		container.stroked = !!options.stroke;
131282
		container.filled = !!options.fill;
131283
 
131284
		if (options.stroke) {
131285
			if (!stroke) {
131286
				stroke = layer._stroke = vmlCreate('stroke');
131287
			}
131288
			container.appendChild(stroke);
131289
			stroke.weight = options.weight + 'px';
131290
			stroke.color = options.color;
131291
			stroke.opacity = options.opacity;
131292
 
131293
			if (options.dashArray) {
131294
				stroke.dashStyle = isArray(options.dashArray) ?
131295
				    options.dashArray.join(' ') :
131296
				    options.dashArray.replace(/( *, *)/g, ' ');
131297
			} else {
131298
				stroke.dashStyle = '';
131299
			}
131300
			stroke.endcap = options.lineCap.replace('butt', 'flat');
131301
			stroke.joinstyle = options.lineJoin;
131302
 
131303
		} else if (stroke) {
131304
			container.removeChild(stroke);
131305
			layer._stroke = null;
131306
		}
131307
 
131308
		if (options.fill) {
131309
			if (!fill) {
131310
				fill = layer._fill = vmlCreate('fill');
131311
			}
131312
			container.appendChild(fill);
131313
			fill.color = options.fillColor || options.color;
131314
			fill.opacity = options.fillOpacity;
131315
 
131316
		} else if (fill) {
131317
			container.removeChild(fill);
131318
			layer._fill = null;
131319
		}
131320
	},
131321
 
131322
	_updateCircle: function (layer) {
131323
		var p = layer._point.round(),
131324
		    r = Math.round(layer._radius),
131325
		    r2 = Math.round(layer._radiusY || r);
131326
 
131327
		this._setPath(layer, layer._empty() ? 'M0 0' :
131328
			'AL ' + p.x + ',' + p.y + ' ' + r + ',' + r2 + ' 0,' + (65535 * 360));
131329
	},
131330
 
131331
	_setPath: function (layer, path) {
131332
		layer._path.v = path;
131333
	},
131334
 
131335
	_bringToFront: function (layer) {
131336
		toFront(layer._container);
131337
	},
131338
 
131339
	_bringToBack: function (layer) {
131340
		toBack(layer._container);
131341
	}
131342
};
131343
 
131344
var create$2 = vml ? vmlCreate : svgCreate;
131345
 
131346
/*
131347
 * @class SVG
131348
 * @inherits Renderer
131349
 * @aka L.SVG
131350
 *
131351
 * Allows vector layers to be displayed with [SVG](https://developer.mozilla.org/docs/Web/SVG).
131352
 * Inherits `Renderer`.
131353
 *
131354
 * Due to [technical limitations](http://caniuse.com/#search=svg), SVG is not
131355
 * available in all web browsers, notably Android 2.x and 3.x.
131356
 *
131357
 * Although SVG is not available on IE7 and IE8, these browsers support
131358
 * [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language)
131359
 * (a now deprecated technology), and the SVG renderer will fall back to VML in
131360
 * this case.
131361
 *
131362
 * @example
131363
 *
131364
 * Use SVG by default for all paths in the map:
131365
 *
131366
 * ```js
131367
 * var map = L.map('map', {
131368
 * 	renderer: L.svg()
131369
 * });
131370
 * ```
131371
 *
131372
 * Use a SVG renderer with extra padding for specific vector geometries:
131373
 *
131374
 * ```js
131375
 * var map = L.map('map');
131376
 * var myRenderer = L.svg({ padding: 0.5 });
131377
 * var line = L.polyline( coordinates, { renderer: myRenderer } );
131378
 * var circle = L.circle( center, { renderer: myRenderer } );
131379
 * ```
131380
 */
131381
 
131382
var SVG = Renderer.extend({
131383
 
131384
	getEvents: function () {
131385
		var events = Renderer.prototype.getEvents.call(this);
131386
		events.zoomstart = this._onZoomStart;
131387
		return events;
131388
	},
131389
 
131390
	_initContainer: function () {
131391
		this._container = create$2('svg');
131392
 
131393
		// makes it possible to click through svg root; we'll reset it back in individual paths
131394
		this._container.setAttribute('pointer-events', 'none');
131395
 
131396
		this._rootGroup = create$2('g');
131397
		this._container.appendChild(this._rootGroup);
131398
	},
131399
 
131400
	_destroyContainer: function () {
131401
		remove(this._container);
131402
		off(this._container);
131403
		delete this._container;
131404
		delete this._rootGroup;
131405
		delete this._svgSize;
131406
	},
131407
 
131408
	_onZoomStart: function () {
131409
		// Drag-then-pinch interactions might mess up the center and zoom.
131410
		// In this case, the easiest way to prevent this is re-do the renderer
131411
		//   bounds and padding when the zooming starts.
131412
		this._update();
131413
	},
131414
 
131415
	_update: function () {
131416
		if (this._map._animatingZoom && this._bounds) { return; }
131417
 
131418
		Renderer.prototype._update.call(this);
131419
 
131420
		var b = this._bounds,
131421
		    size = b.getSize(),
131422
		    container = this._container;
131423
 
131424
		// set size of svg-container if changed
131425
		if (!this._svgSize || !this._svgSize.equals(size)) {
131426
			this._svgSize = size;
131427
			container.setAttribute('width', size.x);
131428
			container.setAttribute('height', size.y);
131429
		}
131430
 
131431
		// movement: update container viewBox so that we don't have to change coordinates of individual layers
131432
		setPosition(container, b.min);
131433
		container.setAttribute('viewBox', [b.min.x, b.min.y, size.x, size.y].join(' '));
131434
 
131435
		this.fire('update');
131436
	},
131437
 
131438
	// methods below are called by vector layers implementations
131439
 
131440
	_initPath: function (layer) {
131441
		var path = layer._path = create$2('path');
131442
 
131443
		// @namespace Path
131444
		// @option className: String = null
131445
		// Custom class name set on an element. Only for SVG renderer.
131446
		if (layer.options.className) {
131447
			addClass(path, layer.options.className);
131448
		}
131449
 
131450
		if (layer.options.interactive) {
131451
			addClass(path, 'leaflet-interactive');
131452
		}
131453
 
131454
		this._updateStyle(layer);
131455
		this._layers[stamp(layer)] = layer;
131456
	},
131457
 
131458
	_addPath: function (layer) {
131459
		if (!this._rootGroup) { this._initContainer(); }
131460
		this._rootGroup.appendChild(layer._path);
131461
		layer.addInteractiveTarget(layer._path);
131462
	},
131463
 
131464
	_removePath: function (layer) {
131465
		remove(layer._path);
131466
		layer.removeInteractiveTarget(layer._path);
131467
		delete this._layers[stamp(layer)];
131468
	},
131469
 
131470
	_updatePath: function (layer) {
131471
		layer._project();
131472
		layer._update();
131473
	},
131474
 
131475
	_updateStyle: function (layer) {
131476
		var path = layer._path,
131477
		    options = layer.options;
131478
 
131479
		if (!path) { return; }
131480
 
131481
		if (options.stroke) {
131482
			path.setAttribute('stroke', options.color);
131483
			path.setAttribute('stroke-opacity', options.opacity);
131484
			path.setAttribute('stroke-width', options.weight);
131485
			path.setAttribute('stroke-linecap', options.lineCap);
131486
			path.setAttribute('stroke-linejoin', options.lineJoin);
131487
 
131488
			if (options.dashArray) {
131489
				path.setAttribute('stroke-dasharray', options.dashArray);
131490
			} else {
131491
				path.removeAttribute('stroke-dasharray');
131492
			}
131493
 
131494
			if (options.dashOffset) {
131495
				path.setAttribute('stroke-dashoffset', options.dashOffset);
131496
			} else {
131497
				path.removeAttribute('stroke-dashoffset');
131498
			}
131499
		} else {
131500
			path.setAttribute('stroke', 'none');
131501
		}
131502
 
131503
		if (options.fill) {
131504
			path.setAttribute('fill', options.fillColor || options.color);
131505
			path.setAttribute('fill-opacity', options.fillOpacity);
131506
			path.setAttribute('fill-rule', options.fillRule || 'evenodd');
131507
		} else {
131508
			path.setAttribute('fill', 'none');
131509
		}
131510
	},
131511
 
131512
	_updatePoly: function (layer, closed) {
131513
		this._setPath(layer, pointsToPath(layer._parts, closed));
131514
	},
131515
 
131516
	_updateCircle: function (layer) {
131517
		var p = layer._point,
131518
		    r = Math.max(Math.round(layer._radius), 1),
131519
		    r2 = Math.max(Math.round(layer._radiusY), 1) || r,
131520
		    arc = 'a' + r + ',' + r2 + ' 0 1,0 ';
131521
 
131522
		// drawing a circle with two half-arcs
131523
		var d = layer._empty() ? 'M0 0' :
131524
			'M' + (p.x - r) + ',' + p.y +
131525
			arc + (r * 2) + ',0 ' +
131526
			arc + (-r * 2) + ',0 ';
131527
 
131528
		this._setPath(layer, d);
131529
	},
131530
 
131531
	_setPath: function (layer, path) {
131532
		layer._path.setAttribute('d', path);
131533
	},
131534
 
131535
	// SVG does not have the concept of zIndex so we resort to changing the DOM order of elements
131536
	_bringToFront: function (layer) {
131537
		toFront(layer._path);
131538
	},
131539
 
131540
	_bringToBack: function (layer) {
131541
		toBack(layer._path);
131542
	}
131543
});
131544
 
131545
if (vml) {
131546
	SVG.include(vmlMixin);
131547
}
131548
 
131549
// @namespace SVG
131550
// @factory L.svg(options?: Renderer options)
131551
// Creates a SVG renderer with the given options.
131552
function svg$1(options) {
131553
	return svg || vml ? new SVG(options) : null;
131554
}
131555
 
131556
Map.include({
131557
	// @namespace Map; @method getRenderer(layer: Path): Renderer
131558
	// Returns the instance of `Renderer` that should be used to render the given
131559
	// `Path`. It will ensure that the `renderer` options of the map and paths
131560
	// are respected, and that the renderers do exist on the map.
131561
	getRenderer: function (layer) {
131562
		// @namespace Path; @option renderer: Renderer
131563
		// Use this specific instance of `Renderer` for this path. Takes
131564
		// precedence over the map's [default renderer](#map-renderer).
131565
		var renderer = layer.options.renderer || this._getPaneRenderer(layer.options.pane) || this.options.renderer || this._renderer;
131566
 
131567
		if (!renderer) {
131568
			renderer = this._renderer = this._createRenderer();
131569
		}
131570
 
131571
		if (!this.hasLayer(renderer)) {
131572
			this.addLayer(renderer);
131573
		}
131574
		return renderer;
131575
	},
131576
 
131577
	_getPaneRenderer: function (name) {
131578
		if (name === 'overlayPane' || name === undefined) {
131579
			return false;
131580
		}
131581
 
131582
		var renderer = this._paneRenderers[name];
131583
		if (renderer === undefined) {
131584
			renderer = this._createRenderer({pane: name});
131585
			this._paneRenderers[name] = renderer;
131586
		}
131587
		return renderer;
131588
	},
131589
 
131590
	_createRenderer: function (options) {
131591
		// @namespace Map; @option preferCanvas: Boolean = false
131592
		// Whether `Path`s should be rendered on a `Canvas` renderer.
131593
		// By default, all `Path`s are rendered in a `SVG` renderer.
131594
		return (this.options.preferCanvas && canvas$1(options)) || svg$1(options);
131595
	}
131596
});
131597
 
131598
/*
131599
 * L.Rectangle extends Polygon and creates a rectangle when passed a LatLngBounds object.
131600
 */
131601
 
131602
/*
131603
 * @class Rectangle
131604
 * @aka L.Rectangle
131605
 * @inherits Polygon
131606
 *
131607
 * A class for drawing rectangle overlays on a map. Extends `Polygon`.
131608
 *
131609
 * @example
131610
 *
131611
 * ```js
131612
 * // define rectangle geographical bounds
131613
 * var bounds = [[54.559322, -5.767822], [56.1210604, -3.021240]];
131614
 *
131615
 * // create an orange rectangle
131616
 * L.rectangle(bounds, {color: "#ff7800", weight: 1}).addTo(map);
131617
 *
131618
 * // zoom the map to the rectangle bounds
131619
 * map.fitBounds(bounds);
131620
 * ```
131621
 *
131622
 */
131623
 
131624
 
131625
var Rectangle = Polygon.extend({
131626
	initialize: function (latLngBounds, options) {
131627
		Polygon.prototype.initialize.call(this, this._boundsToLatLngs(latLngBounds), options);
131628
	},
131629
 
131630
	// @method setBounds(latLngBounds: LatLngBounds): this
131631
	// Redraws the rectangle with the passed bounds.
131632
	setBounds: function (latLngBounds) {
131633
		return this.setLatLngs(this._boundsToLatLngs(latLngBounds));
131634
	},
131635
 
131636
	_boundsToLatLngs: function (latLngBounds) {
131637
		latLngBounds = toLatLngBounds(latLngBounds);
131638
		return [
131639
			latLngBounds.getSouthWest(),
131640
			latLngBounds.getNorthWest(),
131641
			latLngBounds.getNorthEast(),
131642
			latLngBounds.getSouthEast()
131643
		];
131644
	}
131645
});
131646
 
131647
 
131648
// @factory L.rectangle(latLngBounds: LatLngBounds, options?: Polyline options)
131649
function rectangle(latLngBounds, options) {
131650
	return new Rectangle(latLngBounds, options);
131651
}
131652
 
131653
SVG.create = create$2;
131654
SVG.pointsToPath = pointsToPath;
131655
 
131656
GeoJSON.geometryToLayer = geometryToLayer;
131657
GeoJSON.coordsToLatLng = coordsToLatLng;
131658
GeoJSON.coordsToLatLngs = coordsToLatLngs;
131659
GeoJSON.latLngToCoords = latLngToCoords;
131660
GeoJSON.latLngsToCoords = latLngsToCoords;
131661
GeoJSON.getFeature = getFeature;
131662
GeoJSON.asFeature = asFeature;
131663
 
131664
/*
131665
 * L.Handler.BoxZoom is used to add shift-drag zoom interaction to the map
131666
 * (zoom to a selected bounding box), enabled by default.
131667
 */
131668
 
131669
// @namespace Map
131670
// @section Interaction Options
131671
Map.mergeOptions({
131672
	// @option boxZoom: Boolean = true
131673
	// Whether the map can be zoomed to a rectangular area specified by
131674
	// dragging the mouse while pressing the shift key.
131675
	boxZoom: true
131676
});
131677
 
131678
var BoxZoom = Handler.extend({
131679
	initialize: function (map) {
131680
		this._map = map;
131681
		this._container = map._container;
131682
		this._pane = map._panes.overlayPane;
131683
		this._resetStateTimeout = 0;
131684
		map.on('unload', this._destroy, this);
131685
	},
131686
 
131687
	addHooks: function () {
131688
		on(this._container, 'mousedown', this._onMouseDown, this);
131689
	},
131690
 
131691
	removeHooks: function () {
131692
		off(this._container, 'mousedown', this._onMouseDown, this);
131693
	},
131694
 
131695
	moved: function () {
131696
		return this._moved;
131697
	},
131698
 
131699
	_destroy: function () {
131700
		remove(this._pane);
131701
		delete this._pane;
131702
	},
131703
 
131704
	_resetState: function () {
131705
		this._resetStateTimeout = 0;
131706
		this._moved = false;
131707
	},
131708
 
131709
	_clearDeferredResetState: function () {
131710
		if (this._resetStateTimeout !== 0) {
131711
			clearTimeout(this._resetStateTimeout);
131712
			this._resetStateTimeout = 0;
131713
		}
131714
	},
131715
 
131716
	_onMouseDown: function (e) {
131717
		if (!e.shiftKey || ((e.which !== 1) && (e.button !== 1))) { return false; }
131718
 
131719
		// Clear the deferred resetState if it hasn't executed yet, otherwise it
131720
		// will interrupt the interaction and orphan a box element in the container.
131721
		this._clearDeferredResetState();
131722
		this._resetState();
131723
 
131724
		disableTextSelection();
131725
		disableImageDrag();
131726
 
131727
		this._startPoint = this._map.mouseEventToContainerPoint(e);
131728
 
131729
		on(document, {
131730
			contextmenu: stop,
131731
			mousemove: this._onMouseMove,
131732
			mouseup: this._onMouseUp,
131733
			keydown: this._onKeyDown
131734
		}, this);
131735
	},
131736
 
131737
	_onMouseMove: function (e) {
131738
		if (!this._moved) {
131739
			this._moved = true;
131740
 
131741
			this._box = create$1('div', 'leaflet-zoom-box', this._container);
131742
			addClass(this._container, 'leaflet-crosshair');
131743
 
131744
			this._map.fire('boxzoomstart');
131745
		}
131746
 
131747
		this._point = this._map.mouseEventToContainerPoint(e);
131748
 
131749
		var bounds = new Bounds(this._point, this._startPoint),
131750
		    size = bounds.getSize();
131751
 
131752
		setPosition(this._box, bounds.min);
131753
 
131754
		this._box.style.width  = size.x + 'px';
131755
		this._box.style.height = size.y + 'px';
131756
	},
131757
 
131758
	_finish: function () {
131759
		if (this._moved) {
131760
			remove(this._box);
131761
			removeClass(this._container, 'leaflet-crosshair');
131762
		}
131763
 
131764
		enableTextSelection();
131765
		enableImageDrag();
131766
 
131767
		off(document, {
131768
			contextmenu: stop,
131769
			mousemove: this._onMouseMove,
131770
			mouseup: this._onMouseUp,
131771
			keydown: this._onKeyDown
131772
		}, this);
131773
	},
131774
 
131775
	_onMouseUp: function (e) {
131776
		if ((e.which !== 1) && (e.button !== 1)) { return; }
131777
 
131778
		this._finish();
131779
 
131780
		if (!this._moved) { return; }
131781
		// Postpone to next JS tick so internal click event handling
131782
		// still see it as "moved".
131783
		this._clearDeferredResetState();
131784
		this._resetStateTimeout = setTimeout(bind(this._resetState, this), 0);
131785
 
131786
		var bounds = new LatLngBounds(
131787
		        this._map.containerPointToLatLng(this._startPoint),
131788
		        this._map.containerPointToLatLng(this._point));
131789
 
131790
		this._map
131791
			.fitBounds(bounds)
131792
			.fire('boxzoomend', {boxZoomBounds: bounds});
131793
	},
131794
 
131795
	_onKeyDown: function (e) {
131796
		if (e.keyCode === 27) {
131797
			this._finish();
131798
		}
131799
	}
131800
});
131801
 
131802
// @section Handlers
131803
// @property boxZoom: Handler
131804
// Box (shift-drag with mouse) zoom handler.
131805
Map.addInitHook('addHandler', 'boxZoom', BoxZoom);
131806
 
131807
/*
131808
 * L.Handler.DoubleClickZoom is used to handle double-click zoom on the map, enabled by default.
131809
 */
131810
 
131811
// @namespace Map
131812
// @section Interaction Options
131813
 
131814
Map.mergeOptions({
131815
	// @option doubleClickZoom: Boolean|String = true
131816
	// Whether the map can be zoomed in by double clicking on it and
131817
	// zoomed out by double clicking while holding shift. If passed
131818
	// `'center'`, double-click zoom will zoom to the center of the
131819
	//  view regardless of where the mouse was.
131820
	doubleClickZoom: true
131821
});
131822
 
131823
var DoubleClickZoom = Handler.extend({
131824
	addHooks: function () {
131825
		this._map.on('dblclick', this._onDoubleClick, this);
131826
	},
131827
 
131828
	removeHooks: function () {
131829
		this._map.off('dblclick', this._onDoubleClick, this);
131830
	},
131831
 
131832
	_onDoubleClick: function (e) {
131833
		var map = this._map,
131834
		    oldZoom = map.getZoom(),
131835
		    delta = map.options.zoomDelta,
131836
		    zoom = e.originalEvent.shiftKey ? oldZoom - delta : oldZoom + delta;
131837
 
131838
		if (map.options.doubleClickZoom === 'center') {
131839
			map.setZoom(zoom);
131840
		} else {
131841
			map.setZoomAround(e.containerPoint, zoom);
131842
		}
131843
	}
131844
});
131845
 
131846
// @section Handlers
131847
//
131848
// Map properties include interaction handlers that allow you to control
131849
// interaction behavior in runtime, enabling or disabling certain features such
131850
// as dragging or touch zoom (see `Handler` methods). For example:
131851
//
131852
// ```js
131853
// map.doubleClickZoom.disable();
131854
// ```
131855
//
131856
// @property doubleClickZoom: Handler
131857
// Double click zoom handler.
131858
Map.addInitHook('addHandler', 'doubleClickZoom', DoubleClickZoom);
131859
 
131860
/*
131861
 * L.Handler.MapDrag is used to make the map draggable (with panning inertia), enabled by default.
131862
 */
131863
 
131864
// @namespace Map
131865
// @section Interaction Options
131866
Map.mergeOptions({
131867
	// @option dragging: Boolean = true
131868
	// Whether the map be draggable with mouse/touch or not.
131869
	dragging: true,
131870
 
131871
	// @section Panning Inertia Options
131872
	// @option inertia: Boolean = *
131873
	// If enabled, panning of the map will have an inertia effect where
131874
	// the map builds momentum while dragging and continues moving in
131875
	// the same direction for some time. Feels especially nice on touch
131876
	// devices. Enabled by default unless running on old Android devices.
131877
	inertia: !android23,
131878
 
131879
	// @option inertiaDeceleration: Number = 3000
131880
	// The rate with which the inertial movement slows down, in pixels/second².
131881
	inertiaDeceleration: 3400, // px/s^2
131882
 
131883
	// @option inertiaMaxSpeed: Number = Infinity
131884
	// Max speed of the inertial movement, in pixels/second.
131885
	inertiaMaxSpeed: Infinity, // px/s
131886
 
131887
	// @option easeLinearity: Number = 0.2
131888
	easeLinearity: 0.2,
131889
 
131890
	// TODO refactor, move to CRS
131891
	// @option worldCopyJump: Boolean = false
131892
	// With this option enabled, the map tracks when you pan to another "copy"
131893
	// of the world and seamlessly jumps to the original one so that all overlays
131894
	// like markers and vector layers are still visible.
131895
	worldCopyJump: false,
131896
 
131897
	// @option maxBoundsViscosity: Number = 0.0
131898
	// If `maxBounds` is set, this option will control how solid the bounds
131899
	// are when dragging the map around. The default value of `0.0` allows the
131900
	// user to drag outside the bounds at normal speed, higher values will
131901
	// slow down map dragging outside bounds, and `1.0` makes the bounds fully
131902
	// solid, preventing the user from dragging outside the bounds.
131903
	maxBoundsViscosity: 0.0
131904
});
131905
 
131906
var Drag = Handler.extend({
131907
	addHooks: function () {
131908
		if (!this._draggable) {
131909
			var map = this._map;
131910
 
131911
			this._draggable = new Draggable(map._mapPane, map._container);
131912
 
131913
			this._draggable.on({
131914
				dragstart: this._onDragStart,
131915
				drag: this._onDrag,
131916
				dragend: this._onDragEnd
131917
			}, this);
131918
 
131919
			this._draggable.on('predrag', this._onPreDragLimit, this);
131920
			if (map.options.worldCopyJump) {
131921
				this._draggable.on('predrag', this._onPreDragWrap, this);
131922
				map.on('zoomend', this._onZoomEnd, this);
131923
 
131924
				map.whenReady(this._onZoomEnd, this);
131925
			}
131926
		}
131927
		addClass(this._map._container, 'leaflet-grab leaflet-touch-drag');
131928
		this._draggable.enable();
131929
		this._positions = [];
131930
		this._times = [];
131931
	},
131932
 
131933
	removeHooks: function () {
131934
		removeClass(this._map._container, 'leaflet-grab');
131935
		removeClass(this._map._container, 'leaflet-touch-drag');
131936
		this._draggable.disable();
131937
	},
131938
 
131939
	moved: function () {
131940
		return this._draggable && this._draggable._moved;
131941
	},
131942
 
131943
	moving: function () {
131944
		return this._draggable && this._draggable._moving;
131945
	},
131946
 
131947
	_onDragStart: function () {
131948
		var map = this._map;
131949
 
131950
		map._stop();
131951
		if (this._map.options.maxBounds && this._map.options.maxBoundsViscosity) {
131952
			var bounds = toLatLngBounds(this._map.options.maxBounds);
131953
 
131954
			this._offsetLimit = toBounds(
131955
				this._map.latLngToContainerPoint(bounds.getNorthWest()).multiplyBy(-1),
131956
				this._map.latLngToContainerPoint(bounds.getSouthEast()).multiplyBy(-1)
131957
					.add(this._map.getSize()));
131958
 
131959
			this._viscosity = Math.min(1.0, Math.max(0.0, this._map.options.maxBoundsViscosity));
131960
		} else {
131961
			this._offsetLimit = null;
131962
		}
131963
 
131964
		map
131965
		    .fire('movestart')
131966
		    .fire('dragstart');
131967
 
131968
		if (map.options.inertia) {
131969
			this._positions = [];
131970
			this._times = [];
131971
		}
131972
	},
131973
 
131974
	_onDrag: function (e) {
131975
		if (this._map.options.inertia) {
131976
			var time = this._lastTime = +new Date(),
131977
			    pos = this._lastPos = this._draggable._absPos || this._draggable._newPos;
131978
 
131979
			this._positions.push(pos);
131980
			this._times.push(time);
131981
 
131982
			this._prunePositions(time);
131983
		}
131984
 
131985
		this._map
131986
		    .fire('move', e)
131987
		    .fire('drag', e);
131988
	},
131989
 
131990
	_prunePositions: function (time) {
131991
		while (this._positions.length > 1 && time - this._times[0] > 50) {
131992
			this._positions.shift();
131993
			this._times.shift();
131994
		}
131995
	},
131996
 
131997
	_onZoomEnd: function () {
131998
		var pxCenter = this._map.getSize().divideBy(2),
131999
		    pxWorldCenter = this._map.latLngToLayerPoint([0, 0]);
132000
 
132001
		this._initialWorldOffset = pxWorldCenter.subtract(pxCenter).x;
132002
		this._worldWidth = this._map.getPixelWorldBounds().getSize().x;
132003
	},
132004
 
132005
	_viscousLimit: function (value, threshold) {
132006
		return value - (value - threshold) * this._viscosity;
132007
	},
132008
 
132009
	_onPreDragLimit: function () {
132010
		if (!this._viscosity || !this._offsetLimit) { return; }
132011
 
132012
		var offset = this._draggable._newPos.subtract(this._draggable._startPos);
132013
 
132014
		var limit = this._offsetLimit;
132015
		if (offset.x < limit.min.x) { offset.x = this._viscousLimit(offset.x, limit.min.x); }
132016
		if (offset.y < limit.min.y) { offset.y = this._viscousLimit(offset.y, limit.min.y); }
132017
		if (offset.x > limit.max.x) { offset.x = this._viscousLimit(offset.x, limit.max.x); }
132018
		if (offset.y > limit.max.y) { offset.y = this._viscousLimit(offset.y, limit.max.y); }
132019
 
132020
		this._draggable._newPos = this._draggable._startPos.add(offset);
132021
	},
132022
 
132023
	_onPreDragWrap: function () {
132024
		// TODO refactor to be able to adjust map pane position after zoom
132025
		var worldWidth = this._worldWidth,
132026
		    halfWidth = Math.round(worldWidth / 2),
132027
		    dx = this._initialWorldOffset,
132028
		    x = this._draggable._newPos.x,
132029
		    newX1 = (x - halfWidth + dx) % worldWidth + halfWidth - dx,
132030
		    newX2 = (x + halfWidth + dx) % worldWidth - halfWidth - dx,
132031
		    newX = Math.abs(newX1 + dx) < Math.abs(newX2 + dx) ? newX1 : newX2;
132032
 
132033
		this._draggable._absPos = this._draggable._newPos.clone();
132034
		this._draggable._newPos.x = newX;
132035
	},
132036
 
132037
	_onDragEnd: function (e) {
132038
		var map = this._map,
132039
		    options = map.options,
132040
 
132041
		    noInertia = !options.inertia || this._times.length < 2;
132042
 
132043
		map.fire('dragend', e);
132044
 
132045
		if (noInertia) {
132046
			map.fire('moveend');
132047
 
132048
		} else {
132049
			this._prunePositions(+new Date());
132050
 
132051
			var direction = this._lastPos.subtract(this._positions[0]),
132052
			    duration = (this._lastTime - this._times[0]) / 1000,
132053
			    ease = options.easeLinearity,
132054
 
132055
			    speedVector = direction.multiplyBy(ease / duration),
132056
			    speed = speedVector.distanceTo([0, 0]),
132057
 
132058
			    limitedSpeed = Math.min(options.inertiaMaxSpeed, speed),
132059
			    limitedSpeedVector = speedVector.multiplyBy(limitedSpeed / speed),
132060
 
132061
			    decelerationDuration = limitedSpeed / (options.inertiaDeceleration * ease),
132062
			    offset = limitedSpeedVector.multiplyBy(-decelerationDuration / 2).round();
132063
 
132064
			if (!offset.x && !offset.y) {
132065
				map.fire('moveend');
132066
 
132067
			} else {
132068
				offset = map._limitOffset(offset, map.options.maxBounds);
132069
 
132070
				requestAnimFrame(function () {
132071
					map.panBy(offset, {
132072
						duration: decelerationDuration,
132073
						easeLinearity: ease,
132074
						noMoveStart: true,
132075
						animate: true
132076
					});
132077
				});
132078
			}
132079
		}
132080
	}
132081
});
132082
 
132083
// @section Handlers
132084
// @property dragging: Handler
132085
// Map dragging handler (by both mouse and touch).
132086
Map.addInitHook('addHandler', 'dragging', Drag);
132087
 
132088
/*
132089
 * L.Map.Keyboard is handling keyboard interaction with the map, enabled by default.
132090
 */
132091
 
132092
// @namespace Map
132093
// @section Keyboard Navigation Options
132094
Map.mergeOptions({
132095
	// @option keyboard: Boolean = true
132096
	// Makes the map focusable and allows users to navigate the map with keyboard
132097
	// arrows and `+`/`-` keys.
132098
	keyboard: true,
132099
 
132100
	// @option keyboardPanDelta: Number = 80
132101
	// Amount of pixels to pan when pressing an arrow key.
132102
	keyboardPanDelta: 80
132103
});
132104
 
132105
var Keyboard = Handler.extend({
132106
 
132107
	keyCodes: {
132108
		left:    [37],
132109
		right:   [39],
132110
		down:    [40],
132111
		up:      [38],
132112
		zoomIn:  [187, 107, 61, 171],
132113
		zoomOut: [189, 109, 54, 173]
132114
	},
132115
 
132116
	initialize: function (map) {
132117
		this._map = map;
132118
 
132119
		this._setPanDelta(map.options.keyboardPanDelta);
132120
		this._setZoomDelta(map.options.zoomDelta);
132121
	},
132122
 
132123
	addHooks: function () {
132124
		var container = this._map._container;
132125
 
132126
		// make the container focusable by tabbing
132127
		if (container.tabIndex <= 0) {
132128
			container.tabIndex = '0';
132129
		}
132130
 
132131
		on(container, {
132132
			focus: this._onFocus,
132133
			blur: this._onBlur,
132134
			mousedown: this._onMouseDown
132135
		}, this);
132136
 
132137
		this._map.on({
132138
			focus: this._addHooks,
132139
			blur: this._removeHooks
132140
		}, this);
132141
	},
132142
 
132143
	removeHooks: function () {
132144
		this._removeHooks();
132145
 
132146
		off(this._map._container, {
132147
			focus: this._onFocus,
132148
			blur: this._onBlur,
132149
			mousedown: this._onMouseDown
132150
		}, this);
132151
 
132152
		this._map.off({
132153
			focus: this._addHooks,
132154
			blur: this._removeHooks
132155
		}, this);
132156
	},
132157
 
132158
	_onMouseDown: function () {
132159
		if (this._focused) { return; }
132160
 
132161
		var body = document.body,
132162
		    docEl = document.documentElement,
132163
		    top = body.scrollTop || docEl.scrollTop,
132164
		    left = body.scrollLeft || docEl.scrollLeft;
132165
 
132166
		this._map._container.focus();
132167
 
132168
		window.scrollTo(left, top);
132169
	},
132170
 
132171
	_onFocus: function () {
132172
		this._focused = true;
132173
		this._map.fire('focus');
132174
	},
132175
 
132176
	_onBlur: function () {
132177
		this._focused = false;
132178
		this._map.fire('blur');
132179
	},
132180
 
132181
	_setPanDelta: function (panDelta) {
132182
		var keys = this._panKeys = {},
132183
		    codes = this.keyCodes,
132184
		    i, len;
132185
 
132186
		for (i = 0, len = codes.left.length; i < len; i++) {
132187
			keys[codes.left[i]] = [-1 * panDelta, 0];
132188
		}
132189
		for (i = 0, len = codes.right.length; i < len; i++) {
132190
			keys[codes.right[i]] = [panDelta, 0];
132191
		}
132192
		for (i = 0, len = codes.down.length; i < len; i++) {
132193
			keys[codes.down[i]] = [0, panDelta];
132194
		}
132195
		for (i = 0, len = codes.up.length; i < len; i++) {
132196
			keys[codes.up[i]] = [0, -1 * panDelta];
132197
		}
132198
	},
132199
 
132200
	_setZoomDelta: function (zoomDelta) {
132201
		var keys = this._zoomKeys = {},
132202
		    codes = this.keyCodes,
132203
		    i, len;
132204
 
132205
		for (i = 0, len = codes.zoomIn.length; i < len; i++) {
132206
			keys[codes.zoomIn[i]] = zoomDelta;
132207
		}
132208
		for (i = 0, len = codes.zoomOut.length; i < len; i++) {
132209
			keys[codes.zoomOut[i]] = -zoomDelta;
132210
		}
132211
	},
132212
 
132213
	_addHooks: function () {
132214
		on(document, 'keydown', this._onKeyDown, this);
132215
	},
132216
 
132217
	_removeHooks: function () {
132218
		off(document, 'keydown', this._onKeyDown, this);
132219
	},
132220
 
132221
	_onKeyDown: function (e) {
132222
		if (e.altKey || e.ctrlKey || e.metaKey) { return; }
132223
 
132224
		var key = e.keyCode,
132225
		    map = this._map,
132226
		    offset;
132227
 
132228
		if (key in this._panKeys) {
132229
			if (!map._panAnim || !map._panAnim._inProgress) {
132230
				offset = this._panKeys[key];
132231
				if (e.shiftKey) {
132232
					offset = toPoint(offset).multiplyBy(3);
132233
				}
132234
 
132235
				map.panBy(offset);
132236
 
132237
				if (map.options.maxBounds) {
132238
					map.panInsideBounds(map.options.maxBounds);
132239
				}
132240
			}
132241
		} else if (key in this._zoomKeys) {
132242
			map.setZoom(map.getZoom() + (e.shiftKey ? 3 : 1) * this._zoomKeys[key]);
132243
 
132244
		} else if (key === 27 && map._popup && map._popup.options.closeOnEscapeKey) {
132245
			map.closePopup();
132246
 
132247
		} else {
132248
			return;
132249
		}
132250
 
132251
		stop(e);
132252
	}
132253
});
132254
 
132255
// @section Handlers
132256
// @section Handlers
132257
// @property keyboard: Handler
132258
// Keyboard navigation handler.
132259
Map.addInitHook('addHandler', 'keyboard', Keyboard);
132260
 
132261
/*
132262
 * L.Handler.ScrollWheelZoom is used by L.Map to enable mouse scroll wheel zoom on the map.
132263
 */
132264
 
132265
// @namespace Map
132266
// @section Interaction Options
132267
Map.mergeOptions({
132268
	// @section Mousewheel options
132269
	// @option scrollWheelZoom: Boolean|String = true
132270
	// Whether the map can be zoomed by using the mouse wheel. If passed `'center'`,
132271
	// it will zoom to the center of the view regardless of where the mouse was.
132272
	scrollWheelZoom: true,
132273
 
132274
	// @option wheelDebounceTime: Number = 40
132275
	// Limits the rate at which a wheel can fire (in milliseconds). By default
132276
	// user can't zoom via wheel more often than once per 40 ms.
132277
	wheelDebounceTime: 40,
132278
 
132279
	// @option wheelPxPerZoomLevel: Number = 60
132280
	// How many scroll pixels (as reported by [L.DomEvent.getWheelDelta](#domevent-getwheeldelta))
132281
	// mean a change of one full zoom level. Smaller values will make wheel-zooming
132282
	// faster (and vice versa).
132283
	wheelPxPerZoomLevel: 60
132284
});
132285
 
132286
var ScrollWheelZoom = Handler.extend({
132287
	addHooks: function () {
132288
		on(this._map._container, 'mousewheel', this._onWheelScroll, this);
132289
 
132290
		this._delta = 0;
132291
	},
132292
 
132293
	removeHooks: function () {
132294
		off(this._map._container, 'mousewheel', this._onWheelScroll, this);
132295
	},
132296
 
132297
	_onWheelScroll: function (e) {
132298
		var delta = getWheelDelta(e);
132299
 
132300
		var debounce = this._map.options.wheelDebounceTime;
132301
 
132302
		this._delta += delta;
132303
		this._lastMousePos = this._map.mouseEventToContainerPoint(e);
132304
 
132305
		if (!this._startTime) {
132306
			this._startTime = +new Date();
132307
		}
132308
 
132309
		var left = Math.max(debounce - (+new Date() - this._startTime), 0);
132310
 
132311
		clearTimeout(this._timer);
132312
		this._timer = setTimeout(bind(this._performZoom, this), left);
132313
 
132314
		stop(e);
132315
	},
132316
 
132317
	_performZoom: function () {
132318
		var map = this._map,
132319
		    zoom = map.getZoom(),
132320
		    snap = this._map.options.zoomSnap || 0;
132321
 
132322
		map._stop(); // stop panning and fly animations if any
132323
 
132324
		// map the delta with a sigmoid function to -4..4 range leaning on -1..1
132325
		var d2 = this._delta / (this._map.options.wheelPxPerZoomLevel * 4),
132326
		    d3 = 4 * Math.log(2 / (1 + Math.exp(-Math.abs(d2)))) / Math.LN2,
132327
		    d4 = snap ? Math.ceil(d3 / snap) * snap : d3,
132328
		    delta = map._limitZoom(zoom + (this._delta > 0 ? d4 : -d4)) - zoom;
132329
 
132330
		this._delta = 0;
132331
		this._startTime = null;
132332
 
132333
		if (!delta) { return; }
132334
 
132335
		if (map.options.scrollWheelZoom === 'center') {
132336
			map.setZoom(zoom + delta);
132337
		} else {
132338
			map.setZoomAround(this._lastMousePos, zoom + delta);
132339
		}
132340
	}
132341
});
132342
 
132343
// @section Handlers
132344
// @property scrollWheelZoom: Handler
132345
// Scroll wheel zoom handler.
132346
Map.addInitHook('addHandler', 'scrollWheelZoom', ScrollWheelZoom);
132347
 
132348
/*
132349
 * L.Map.Tap is used to enable mobile hacks like quick taps and long hold.
132350
 */
132351
 
132352
// @namespace Map
132353
// @section Interaction Options
132354
Map.mergeOptions({
132355
	// @section Touch interaction options
132356
	// @option tap: Boolean = true
132357
	// Enables mobile hacks for supporting instant taps (fixing 200ms click
132358
	// delay on iOS/Android) and touch holds (fired as `contextmenu` events).
132359
	tap: true,
132360
 
132361
	// @option tapTolerance: Number = 15
132362
	// The max number of pixels a user can shift his finger during touch
132363
	// for it to be considered a valid tap.
132364
	tapTolerance: 15
132365
});
132366
 
132367
var Tap = Handler.extend({
132368
	addHooks: function () {
132369
		on(this._map._container, 'touchstart', this._onDown, this);
132370
	},
132371
 
132372
	removeHooks: function () {
132373
		off(this._map._container, 'touchstart', this._onDown, this);
132374
	},
132375
 
132376
	_onDown: function (e) {
132377
		if (!e.touches) { return; }
132378
 
132379
		preventDefault(e);
132380
 
132381
		this._fireClick = true;
132382
 
132383
		// don't simulate click or track longpress if more than 1 touch
132384
		if (e.touches.length > 1) {
132385
			this._fireClick = false;
132386
			clearTimeout(this._holdTimeout);
132387
			return;
132388
		}
132389
 
132390
		var first = e.touches[0],
132391
		    el = first.target;
132392
 
132393
		this._startPos = this._newPos = new Point(first.clientX, first.clientY);
132394
 
132395
		// if touching a link, highlight it
132396
		if (el.tagName && el.tagName.toLowerCase() === 'a') {
132397
			addClass(el, 'leaflet-active');
132398
		}
132399
 
132400
		// simulate long hold but setting a timeout
132401
		this._holdTimeout = setTimeout(bind(function () {
132402
			if (this._isTapValid()) {
132403
				this._fireClick = false;
132404
				this._onUp();
132405
				this._simulateEvent('contextmenu', first);
132406
			}
132407
		}, this), 1000);
132408
 
132409
		this._simulateEvent('mousedown', first);
132410
 
132411
		on(document, {
132412
			touchmove: this._onMove,
132413
			touchend: this._onUp
132414
		}, this);
132415
	},
132416
 
132417
	_onUp: function (e) {
132418
		clearTimeout(this._holdTimeout);
132419
 
132420
		off(document, {
132421
			touchmove: this._onMove,
132422
			touchend: this._onUp
132423
		}, this);
132424
 
132425
		if (this._fireClick && e && e.changedTouches) {
132426
 
132427
			var first = e.changedTouches[0],
132428
			    el = first.target;
132429
 
132430
			if (el && el.tagName && el.tagName.toLowerCase() === 'a') {
132431
				removeClass(el, 'leaflet-active');
132432
			}
132433
 
132434
			this._simulateEvent('mouseup', first);
132435
 
132436
			// simulate click if the touch didn't move too much
132437
			if (this._isTapValid()) {
132438
				this._simulateEvent('click', first);
132439
			}
132440
		}
132441
	},
132442
 
132443
	_isTapValid: function () {
132444
		return this._newPos.distanceTo(this._startPos) <= this._map.options.tapTolerance;
132445
	},
132446
 
132447
	_onMove: function (e) {
132448
		var first = e.touches[0];
132449
		this._newPos = new Point(first.clientX, first.clientY);
132450
		this._simulateEvent('mousemove', first);
132451
	},
132452
 
132453
	_simulateEvent: function (type, e) {
132454
		var simulatedEvent = document.createEvent('MouseEvents');
132455
 
132456
		simulatedEvent._simulated = true;
132457
		e.target._simulatedClick = true;
132458
 
132459
		simulatedEvent.initMouseEvent(
132460
		        type, true, true, window, 1,
132461
		        e.screenX, e.screenY,
132462
		        e.clientX, e.clientY,
132463
		        false, false, false, false, 0, null);
132464
 
132465
		e.target.dispatchEvent(simulatedEvent);
132466
	}
132467
});
132468
 
132469
// @section Handlers
132470
// @property tap: Handler
132471
// Mobile touch hacks (quick tap and touch hold) handler.
132472
if (touch && !pointer) {
132473
	Map.addInitHook('addHandler', 'tap', Tap);
132474
}
132475
 
132476
/*
132477
 * L.Handler.TouchZoom is used by L.Map to add pinch zoom on supported mobile browsers.
132478
 */
132479
 
132480
// @namespace Map
132481
// @section Interaction Options
132482
Map.mergeOptions({
132483
	// @section Touch interaction options
132484
	// @option touchZoom: Boolean|String = *
132485
	// Whether the map can be zoomed by touch-dragging with two fingers. If
132486
	// passed `'center'`, it will zoom to the center of the view regardless of
132487
	// where the touch events (fingers) were. Enabled for touch-capable web
132488
	// browsers except for old Androids.
132489
	touchZoom: touch && !android23,
132490
 
132491
	// @option bounceAtZoomLimits: Boolean = true
132492
	// Set it to false if you don't want the map to zoom beyond min/max zoom
132493
	// and then bounce back when pinch-zooming.
132494
	bounceAtZoomLimits: true
132495
});
132496
 
132497
var TouchZoom = Handler.extend({
132498
	addHooks: function () {
132499
		addClass(this._map._container, 'leaflet-touch-zoom');
132500
		on(this._map._container, 'touchstart', this._onTouchStart, this);
132501
	},
132502
 
132503
	removeHooks: function () {
132504
		removeClass(this._map._container, 'leaflet-touch-zoom');
132505
		off(this._map._container, 'touchstart', this._onTouchStart, this);
132506
	},
132507
 
132508
	_onTouchStart: function (e) {
132509
		var map = this._map;
132510
		if (!e.touches || e.touches.length !== 2 || map._animatingZoom || this._zooming) { return; }
132511
 
132512
		var p1 = map.mouseEventToContainerPoint(e.touches[0]),
132513
		    p2 = map.mouseEventToContainerPoint(e.touches[1]);
132514
 
132515
		this._centerPoint = map.getSize()._divideBy(2);
132516
		this._startLatLng = map.containerPointToLatLng(this._centerPoint);
132517
		if (map.options.touchZoom !== 'center') {
132518
			this._pinchStartLatLng = map.containerPointToLatLng(p1.add(p2)._divideBy(2));
132519
		}
132520
 
132521
		this._startDist = p1.distanceTo(p2);
132522
		this._startZoom = map.getZoom();
132523
 
132524
		this._moved = false;
132525
		this._zooming = true;
132526
 
132527
		map._stop();
132528
 
132529
		on(document, 'touchmove', this._onTouchMove, this);
132530
		on(document, 'touchend', this._onTouchEnd, this);
132531
 
132532
		preventDefault(e);
132533
	},
132534
 
132535
	_onTouchMove: function (e) {
132536
		if (!e.touches || e.touches.length !== 2 || !this._zooming) { return; }
132537
 
132538
		var map = this._map,
132539
		    p1 = map.mouseEventToContainerPoint(e.touches[0]),
132540
		    p2 = map.mouseEventToContainerPoint(e.touches[1]),
132541
		    scale = p1.distanceTo(p2) / this._startDist;
132542
 
132543
		this._zoom = map.getScaleZoom(scale, this._startZoom);
132544
 
132545
		if (!map.options.bounceAtZoomLimits && (
132546
			(this._zoom < map.getMinZoom() && scale < 1) ||
132547
			(this._zoom > map.getMaxZoom() && scale > 1))) {
132548
			this._zoom = map._limitZoom(this._zoom);
132549
		}
132550
 
132551
		if (map.options.touchZoom === 'center') {
132552
			this._center = this._startLatLng;
132553
			if (scale === 1) { return; }
132554
		} else {
132555
			// Get delta from pinch to center, so centerLatLng is delta applied to initial pinchLatLng
132556
			var delta = p1._add(p2)._divideBy(2)._subtract(this._centerPoint);
132557
			if (scale === 1 && delta.x === 0 && delta.y === 0) { return; }
132558
			this._center = map.unproject(map.project(this._pinchStartLatLng, this._zoom).subtract(delta), this._zoom);
132559
		}
132560
 
132561
		if (!this._moved) {
132562
			map._moveStart(true, false);
132563
			this._moved = true;
132564
		}
132565
 
132566
		cancelAnimFrame(this._animRequest);
132567
 
132568
		var moveFn = bind(map._move, map, this._center, this._zoom, {pinch: true, round: false});
132569
		this._animRequest = requestAnimFrame(moveFn, this, true);
132570
 
132571
		preventDefault(e);
132572
	},
132573
 
132574
	_onTouchEnd: function () {
132575
		if (!this._moved || !this._zooming) {
132576
			this._zooming = false;
132577
			return;
132578
		}
132579
 
132580
		this._zooming = false;
132581
		cancelAnimFrame(this._animRequest);
132582
 
132583
		off(document, 'touchmove', this._onTouchMove);
132584
		off(document, 'touchend', this._onTouchEnd);
132585
 
132586
		// Pinch updates GridLayers' levels only when zoomSnap is off, so zoomSnap becomes noUpdate.
132587
		if (this._map.options.zoomAnimation) {
132588
			this._map._animateZoom(this._center, this._map._limitZoom(this._zoom), true, this._map.options.zoomSnap);
132589
		} else {
132590
			this._map._resetView(this._center, this._map._limitZoom(this._zoom));
132591
		}
132592
	}
132593
});
132594
 
132595
// @section Handlers
132596
// @property touchZoom: Handler
132597
// Touch zoom handler.
132598
Map.addInitHook('addHandler', 'touchZoom', TouchZoom);
132599
 
132600
Map.BoxZoom = BoxZoom;
132601
Map.DoubleClickZoom = DoubleClickZoom;
132602
Map.Drag = Drag;
132603
Map.Keyboard = Keyboard;
132604
Map.ScrollWheelZoom = ScrollWheelZoom;
132605
Map.Tap = Tap;
132606
Map.TouchZoom = TouchZoom;
132607
 
132608
Object.freeze = freeze;
132609
 
132610
exports.version = version;
132611
exports.Control = Control;
132612
exports.control = control;
132613
exports.Browser = Browser;
132614
exports.Evented = Evented;
132615
exports.Mixin = Mixin;
132616
exports.Util = Util;
132617
exports.Class = Class;
132618
exports.Handler = Handler;
132619
exports.extend = extend;
132620
exports.bind = bind;
132621
exports.stamp = stamp;
132622
exports.setOptions = setOptions;
132623
exports.DomEvent = DomEvent;
132624
exports.DomUtil = DomUtil;
132625
exports.PosAnimation = PosAnimation;
132626
exports.Draggable = Draggable;
132627
exports.LineUtil = LineUtil;
132628
exports.PolyUtil = PolyUtil;
132629
exports.Point = Point;
132630
exports.point = toPoint;
132631
exports.Bounds = Bounds;
132632
exports.bounds = toBounds;
132633
exports.Transformation = Transformation;
132634
exports.transformation = toTransformation;
132635
exports.Projection = index;
132636
exports.LatLng = LatLng;
132637
exports.latLng = toLatLng;
132638
exports.LatLngBounds = LatLngBounds;
132639
exports.latLngBounds = toLatLngBounds;
132640
exports.CRS = CRS;
132641
exports.GeoJSON = GeoJSON;
132642
exports.geoJSON = geoJSON;
132643
exports.geoJson = geoJson;
132644
exports.Layer = Layer;
132645
exports.LayerGroup = LayerGroup;
132646
exports.layerGroup = layerGroup;
132647
exports.FeatureGroup = FeatureGroup;
132648
exports.featureGroup = featureGroup;
132649
exports.ImageOverlay = ImageOverlay;
132650
exports.imageOverlay = imageOverlay;
132651
exports.VideoOverlay = VideoOverlay;
132652
exports.videoOverlay = videoOverlay;
132653
exports.DivOverlay = DivOverlay;
132654
exports.Popup = Popup;
132655
exports.popup = popup;
132656
exports.Tooltip = Tooltip;
132657
exports.tooltip = tooltip;
132658
exports.Icon = Icon;
132659
exports.icon = icon;
132660
exports.DivIcon = DivIcon;
132661
exports.divIcon = divIcon;
132662
exports.Marker = Marker;
132663
exports.marker = marker;
132664
exports.TileLayer = TileLayer;
132665
exports.tileLayer = tileLayer;
132666
exports.GridLayer = GridLayer;
132667
exports.gridLayer = gridLayer;
132668
exports.SVG = SVG;
132669
exports.svg = svg$1;
132670
exports.Renderer = Renderer;
132671
exports.Canvas = Canvas;
132672
exports.canvas = canvas$1;
132673
exports.Path = Path;
132674
exports.CircleMarker = CircleMarker;
132675
exports.circleMarker = circleMarker;
132676
exports.Circle = Circle;
132677
exports.circle = circle;
132678
exports.Polyline = Polyline;
132679
exports.polyline = polyline;
132680
exports.Polygon = Polygon;
132681
exports.polygon = polygon;
132682
exports.Rectangle = Rectangle;
132683
exports.rectangle = rectangle;
132684
exports.Map = Map;
132685
exports.map = createMap;
132686
 
132687
var oldL = window.L;
132688
exports.noConflict = function() {
132689
	window.L = oldL;
132690
	return this;
132691
}
132692
 
132693
// Always export us to window global (see #2364)
132694
window.L = exports;
132695
 
132696
})));
132697
//# sourceMappingURL=leaflet-src.js.map
132698
 
132699
 
132700
/***/ }),
132701
 
132702
/***/ "./node_modules/rxjs/_esm5/index.js":
132703
/*!******************************************!*\
132704
  !*** ./node_modules/rxjs/_esm5/index.js ***!
132705
  \******************************************/
132706
/*! exports provided: Observable, ConnectableObservable, GroupedObservable, observable, Subject, BehaviorSubject, ReplaySubject, AsyncSubject, asapScheduler, asyncScheduler, queueScheduler, animationFrameScheduler, VirtualTimeScheduler, VirtualAction, Scheduler, Subscription, Subscriber, Notification, pipe, noop, identity, ArgumentOutOfRangeError, EmptyError, ObjectUnsubscribedError, UnsubscriptionError, TimeoutError, bindCallback, bindNodeCallback, combineLatest, concat, defer, empty, forkJoin, from, fromEvent, fromEventPattern, generate, iif, interval, merge, never, of, onErrorResumeNext, pairs, race, range, throwError, timer, using, zip, EMPTY, NEVER, config */
132707
/***/ (function(module, __webpack_exports__, __webpack_require__) {
132708
 
132709
"use strict";
132710
__webpack_require__.r(__webpack_exports__);
132711
/* harmony import */ var _internal_Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
132712
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return _internal_Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]; });
132713
 
132714
/* harmony import */ var _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/observable/ConnectableObservable */ "./node_modules/rxjs/_esm5/internal/observable/ConnectableObservable.js");
132715
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__["ConnectableObservable"]; });
132716
 
132717
/* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/operators/groupBy */ "./node_modules/rxjs/_esm5/internal/operators/groupBy.js");
132718
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__["GroupedObservable"]; });
132719
 
132720
/* harmony import */ var _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/symbol/observable */ "./node_modules/rxjs/_esm5/internal/symbol/observable.js");
132721
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observable", function() { return _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__["observable"]; });
132722
 
132723
/* harmony import */ var _internal_Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internal/Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
132724
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return _internal_Subject__WEBPACK_IMPORTED_MODULE_4__["Subject"]; });
132725
 
132726
/* harmony import */ var _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./internal/BehaviorSubject */ "./node_modules/rxjs/_esm5/internal/BehaviorSubject.js");
132727
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__["BehaviorSubject"]; });
132728
 
132729
/* harmony import */ var _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./internal/ReplaySubject */ "./node_modules/rxjs/_esm5/internal/ReplaySubject.js");
132730
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__["ReplaySubject"]; });
132731
 
132732
/* harmony import */ var _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./internal/AsyncSubject */ "./node_modules/rxjs/_esm5/internal/AsyncSubject.js");
132733
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__["AsyncSubject"]; });
132734
 
132735
/* harmony import */ var _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./internal/scheduler/asap */ "./node_modules/rxjs/_esm5/internal/scheduler/asap.js");
132736
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asapScheduler", function() { return _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__["asap"]; });
132737
 
132738
/* harmony import */ var _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./internal/scheduler/async */ "./node_modules/rxjs/_esm5/internal/scheduler/async.js");
132739
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asyncScheduler", function() { return _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__["async"]; });
132740
 
132741
/* harmony import */ var _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./internal/scheduler/queue */ "./node_modules/rxjs/_esm5/internal/scheduler/queue.js");
132742
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "queueScheduler", function() { return _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__["queue"]; });
132743
 
132744
/* harmony import */ var _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./internal/scheduler/animationFrame */ "./node_modules/rxjs/_esm5/internal/scheduler/animationFrame.js");
132745
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "animationFrameScheduler", function() { return _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__["animationFrame"]; });
132746
 
132747
/* harmony import */ var _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./internal/scheduler/VirtualTimeScheduler */ "./node_modules/rxjs/_esm5/internal/scheduler/VirtualTimeScheduler.js");
132748
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function() { return _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__["VirtualTimeScheduler"]; });
132749
 
132750
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualAction", function() { return _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__["VirtualAction"]; });
132751
 
132752
/* harmony import */ var _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./internal/Scheduler */ "./node_modules/rxjs/_esm5/internal/Scheduler.js");
132753
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scheduler", function() { return _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__["Scheduler"]; });
132754
 
132755
/* harmony import */ var _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./internal/Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
132756
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subscription", function() { return _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__["Subscription"]; });
132757
 
132758
/* harmony import */ var _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./internal/Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
132759
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__["Subscriber"]; });
132760
 
132761
/* harmony import */ var _internal_Notification__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./internal/Notification */ "./node_modules/rxjs/_esm5/internal/Notification.js");
132762
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return _internal_Notification__WEBPACK_IMPORTED_MODULE_16__["Notification"]; });
132763
 
132764
/* harmony import */ var _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./internal/util/pipe */ "./node_modules/rxjs/_esm5/internal/util/pipe.js");
132765
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__["pipe"]; });
132766
 
132767
/* harmony import */ var _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./internal/util/noop */ "./node_modules/rxjs/_esm5/internal/util/noop.js");
132768
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__["noop"]; });
132769
 
132770
/* harmony import */ var _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./internal/util/identity */ "./node_modules/rxjs/_esm5/internal/util/identity.js");
132771
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__["identity"]; });
132772
 
132773
/* harmony import */ var _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./internal/util/ArgumentOutOfRangeError */ "./node_modules/rxjs/_esm5/internal/util/ArgumentOutOfRangeError.js");
132774
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_20__["ArgumentOutOfRangeError"]; });
132775
 
132776
/* harmony import */ var _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./internal/util/EmptyError */ "./node_modules/rxjs/_esm5/internal/util/EmptyError.js");
132777
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_21__["EmptyError"]; });
132778
 
132779
/* harmony import */ var _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./internal/util/ObjectUnsubscribedError */ "./node_modules/rxjs/_esm5/internal/util/ObjectUnsubscribedError.js");
132780
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_22__["ObjectUnsubscribedError"]; });
132781
 
132782
/* harmony import */ var _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./internal/util/UnsubscriptionError */ "./node_modules/rxjs/_esm5/internal/util/UnsubscriptionError.js");
132783
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function() { return _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_23__["UnsubscriptionError"]; });
132784
 
132785
/* harmony import */ var _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./internal/util/TimeoutError */ "./node_modules/rxjs/_esm5/internal/util/TimeoutError.js");
132786
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_24__["TimeoutError"]; });
132787
 
132788
/* harmony import */ var _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./internal/observable/bindCallback */ "./node_modules/rxjs/_esm5/internal/observable/bindCallback.js");
132789
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_25__["bindCallback"]; });
132790
 
132791
/* harmony import */ var _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./internal/observable/bindNodeCallback */ "./node_modules/rxjs/_esm5/internal/observable/bindNodeCallback.js");
132792
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_26__["bindNodeCallback"]; });
132793
 
132794
/* harmony import */ var _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./internal/observable/combineLatest */ "./node_modules/rxjs/_esm5/internal/observable/combineLatest.js");
132795
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_27__["combineLatest"]; });
132796
 
132797
/* harmony import */ var _internal_observable_concat__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./internal/observable/concat */ "./node_modules/rxjs/_esm5/internal/observable/concat.js");
132798
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_observable_concat__WEBPACK_IMPORTED_MODULE_28__["concat"]; });
132799
 
132800
/* harmony import */ var _internal_observable_defer__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./internal/observable/defer */ "./node_modules/rxjs/_esm5/internal/observable/defer.js");
132801
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return _internal_observable_defer__WEBPACK_IMPORTED_MODULE_29__["defer"]; });
132802
 
132803
/* harmony import */ var _internal_observable_empty__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./internal/observable/empty */ "./node_modules/rxjs/_esm5/internal/observable/empty.js");
132804
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return _internal_observable_empty__WEBPACK_IMPORTED_MODULE_30__["empty"]; });
132805
 
132806
/* harmony import */ var _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./internal/observable/forkJoin */ "./node_modules/rxjs/_esm5/internal/observable/forkJoin.js");
132807
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forkJoin", function() { return _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_31__["forkJoin"]; });
132808
 
132809
/* harmony import */ var _internal_observable_from__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./internal/observable/from */ "./node_modules/rxjs/_esm5/internal/observable/from.js");
132810
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "from", function() { return _internal_observable_from__WEBPACK_IMPORTED_MODULE_32__["from"]; });
132811
 
132812
/* harmony import */ var _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./internal/observable/fromEvent */ "./node_modules/rxjs/_esm5/internal/observable/fromEvent.js");
132813
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromEvent", function() { return _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_33__["fromEvent"]; });
132814
 
132815
/* harmony import */ var _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./internal/observable/fromEventPattern */ "./node_modules/rxjs/_esm5/internal/observable/fromEventPattern.js");
132816
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromEventPattern", function() { return _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_34__["fromEventPattern"]; });
132817
 
132818
/* harmony import */ var _internal_observable_generate__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./internal/observable/generate */ "./node_modules/rxjs/_esm5/internal/observable/generate.js");
132819
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "generate", function() { return _internal_observable_generate__WEBPACK_IMPORTED_MODULE_35__["generate"]; });
132820
 
132821
/* harmony import */ var _internal_observable_iif__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./internal/observable/iif */ "./node_modules/rxjs/_esm5/internal/observable/iif.js");
132822
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "iif", function() { return _internal_observable_iif__WEBPACK_IMPORTED_MODULE_36__["iif"]; });
132823
 
132824
/* harmony import */ var _internal_observable_interval__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./internal/observable/interval */ "./node_modules/rxjs/_esm5/internal/observable/interval.js");
132825
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return _internal_observable_interval__WEBPACK_IMPORTED_MODULE_37__["interval"]; });
132826
 
132827
/* harmony import */ var _internal_observable_merge__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./internal/observable/merge */ "./node_modules/rxjs/_esm5/internal/observable/merge.js");
132828
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_observable_merge__WEBPACK_IMPORTED_MODULE_38__["merge"]; });
132829
 
132830
/* harmony import */ var _internal_observable_never__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./internal/observable/never */ "./node_modules/rxjs/_esm5/internal/observable/never.js");
132831
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "never", function() { return _internal_observable_never__WEBPACK_IMPORTED_MODULE_39__["never"]; });
132832
 
132833
/* harmony import */ var _internal_observable_of__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./internal/observable/of */ "./node_modules/rxjs/_esm5/internal/observable/of.js");
132834
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "of", function() { return _internal_observable_of__WEBPACK_IMPORTED_MODULE_40__["of"]; });
132835
 
132836
/* harmony import */ var _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./internal/observable/onErrorResumeNext */ "./node_modules/rxjs/_esm5/internal/observable/onErrorResumeNext.js");
132837
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_41__["onErrorResumeNext"]; });
132838
 
132839
/* harmony import */ var _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./internal/observable/pairs */ "./node_modules/rxjs/_esm5/internal/observable/pairs.js");
132840
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_42__["pairs"]; });
132841
 
132842
/* harmony import */ var _internal_observable_race__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./internal/observable/race */ "./node_modules/rxjs/_esm5/internal/observable/race.js");
132843
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_observable_race__WEBPACK_IMPORTED_MODULE_43__["race"]; });
132844
 
132845
/* harmony import */ var _internal_observable_range__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./internal/observable/range */ "./node_modules/rxjs/_esm5/internal/observable/range.js");
132846
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "range", function() { return _internal_observable_range__WEBPACK_IMPORTED_MODULE_44__["range"]; });
132847
 
132848
/* harmony import */ var _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./internal/observable/throwError */ "./node_modules/rxjs/_esm5/internal/observable/throwError.js");
132849
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwError", function() { return _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_45__["throwError"]; });
132850
 
132851
/* harmony import */ var _internal_observable_timer__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./internal/observable/timer */ "./node_modules/rxjs/_esm5/internal/observable/timer.js");
132852
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return _internal_observable_timer__WEBPACK_IMPORTED_MODULE_46__["timer"]; });
132853
 
132854
/* harmony import */ var _internal_observable_using__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./internal/observable/using */ "./node_modules/rxjs/_esm5/internal/observable/using.js");
132855
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "using", function() { return _internal_observable_using__WEBPACK_IMPORTED_MODULE_47__["using"]; });
132856
 
132857
/* harmony import */ var _internal_observable_zip__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./internal/observable/zip */ "./node_modules/rxjs/_esm5/internal/observable/zip.js");
132858
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_observable_zip__WEBPACK_IMPORTED_MODULE_48__["zip"]; });
132859
 
132860
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return _internal_observable_empty__WEBPACK_IMPORTED_MODULE_30__["EMPTY"]; });
132861
 
132862
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return _internal_observable_never__WEBPACK_IMPORTED_MODULE_39__["NEVER"]; });
132863
 
132864
/* harmony import */ var _internal_config__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./internal/config */ "./node_modules/rxjs/_esm5/internal/config.js");
132865
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "config", function() { return _internal_config__WEBPACK_IMPORTED_MODULE_49__["config"]; });
132866
 
132867
/* Observable */
132868
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
132869
 
132870
 
132871
 
132872
 
132873
/* Subjects */
132874
 
132875
 
132876
 
132877
 
132878
/* Schedulers */
132879
 
132880
 
132881
 
132882
 
132883
 
132884
 
132885
/* Subscription */
132886
 
132887
 
132888
/* Notification */
132889
 
132890
/* Utils */
132891
 
132892
 
132893
 
132894
/* Error types */
132895
 
132896
 
132897
 
132898
 
132899
 
132900
/* Static observable creation exports */
132901
 
132902
 
132903
 
132904
 
132905
 
132906
 
132907
 
132908
 
132909
 
132910
 
132911
 
132912
 
132913
 
132914
 
132915
 
132916
 
132917
 
132918
 
132919
 
132920
 
132921
 
132922
 
132923
 
132924
 
132925
/* Constants */
132926
 
132927
 
132928
/* Config */
132929
 
132930
//# sourceMappingURL=index.js.map
132931
 
132932
 
132933
/***/ }),
132934
 
132935
/***/ "./node_modules/rxjs/_esm5/internal/AsyncSubject.js":
132936
/*!**********************************************************!*\
132937
  !*** ./node_modules/rxjs/_esm5/internal/AsyncSubject.js ***!
132938
  \**********************************************************/
132939
/*! exports provided: AsyncSubject */
132940
/***/ (function(module, __webpack_exports__, __webpack_require__) {
132941
 
132942
"use strict";
132943
__webpack_require__.r(__webpack_exports__);
132944
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return AsyncSubject; });
132945
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
132946
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
132947
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
132948
/** PURE_IMPORTS_START tslib,_Subject,_Subscription PURE_IMPORTS_END */
132949
 
132950
 
132951
 
132952
/**
132953
 * @class AsyncSubject<T>
132954
 */
132955
var AsyncSubject = /*@__PURE__*/ (function (_super) {
132956
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncSubject, _super);
132957
    function AsyncSubject() {
132958
        var _this = _super !== null && _super.apply(this, arguments) || this;
132959
        _this.value = null;
132960
        _this.hasNext = false;
132961
        _this.hasCompleted = false;
132962
        return _this;
132963
    }
132964
    /** @deprecated This is an internal implementation detail, do not use. */
132965
    AsyncSubject.prototype._subscribe = function (subscriber) {
132966
        if (this.hasError) {
132967
            subscriber.error(this.thrownError);
132968
            return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY;
132969
        }
132970
        else if (this.hasCompleted && this.hasNext) {
132971
            subscriber.next(this.value);
132972
            subscriber.complete();
132973
            return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY;
132974
        }
132975
        return _super.prototype._subscribe.call(this, subscriber);
132976
    };
132977
    AsyncSubject.prototype.next = function (value) {
132978
        if (!this.hasCompleted) {
132979
            this.value = value;
132980
            this.hasNext = true;
132981
        }
132982
    };
132983
    AsyncSubject.prototype.error = function (error) {
132984
        if (!this.hasCompleted) {
132985
            _super.prototype.error.call(this, error);
132986
        }
132987
    };
132988
    AsyncSubject.prototype.complete = function () {
132989
        this.hasCompleted = true;
132990
        if (this.hasNext) {
132991
            _super.prototype.next.call(this, this.value);
132992
        }
132993
        _super.prototype.complete.call(this);
132994
    };
132995
    return AsyncSubject;
132996
}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
132997
 
132998
//# sourceMappingURL=AsyncSubject.js.map
132999
 
133000
 
133001
/***/ }),
133002
 
133003
/***/ "./node_modules/rxjs/_esm5/internal/BehaviorSubject.js":
133004
/*!*************************************************************!*\
133005
  !*** ./node_modules/rxjs/_esm5/internal/BehaviorSubject.js ***!
133006
  \*************************************************************/
133007
/*! exports provided: BehaviorSubject */
133008
/***/ (function(module, __webpack_exports__, __webpack_require__) {
133009
 
133010
"use strict";
133011
__webpack_require__.r(__webpack_exports__);
133012
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return BehaviorSubject; });
133013
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
133014
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
133015
/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util/ObjectUnsubscribedError */ "./node_modules/rxjs/_esm5/internal/util/ObjectUnsubscribedError.js");
133016
/** PURE_IMPORTS_START tslib,_Subject,_util_ObjectUnsubscribedError PURE_IMPORTS_END */
133017
 
133018
 
133019
 
133020
/**
133021
 * @class BehaviorSubject<T>
133022
 */
133023
var BehaviorSubject = /*@__PURE__*/ (function (_super) {
133024
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BehaviorSubject, _super);
133025
    function BehaviorSubject(_value) {
133026
        var _this = _super.call(this) || this;
133027
        _this._value = _value;
133028
        return _this;
133029
    }
133030
    Object.defineProperty(BehaviorSubject.prototype, "value", {
133031
        get: function () {
133032
            return this.getValue();
133033
        },
133034
        enumerable: true,
133035
        configurable: true
133036
    });
133037
    /** @deprecated This is an internal implementation detail, do not use. */
133038
    BehaviorSubject.prototype._subscribe = function (subscriber) {
133039
        var subscription = _super.prototype._subscribe.call(this, subscriber);
133040
        if (subscription && !subscription.closed) {
133041
            subscriber.next(this._value);
133042
        }
133043
        return subscription;
133044
    };
133045
    BehaviorSubject.prototype.getValue = function () {
133046
        if (this.hasError) {
133047
            throw this.thrownError;
133048
        }
133049
        else if (this.closed) {
133050
            throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_2__["ObjectUnsubscribedError"]();
133051
        }
133052
        else {
133053
            return this._value;
133054
        }
133055
    };
133056
    BehaviorSubject.prototype.next = function (value) {
133057
        _super.prototype.next.call(this, this._value = value);
133058
    };
133059
    return BehaviorSubject;
133060
}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
133061
 
133062
//# sourceMappingURL=BehaviorSubject.js.map
133063
 
133064
 
133065
/***/ }),
133066
 
133067
/***/ "./node_modules/rxjs/_esm5/internal/InnerSubscriber.js":
133068
/*!*************************************************************!*\
133069
  !*** ./node_modules/rxjs/_esm5/internal/InnerSubscriber.js ***!
133070
  \*************************************************************/
133071
/*! exports provided: InnerSubscriber */
133072
/***/ (function(module, __webpack_exports__, __webpack_require__) {
133073
 
133074
"use strict";
133075
__webpack_require__.r(__webpack_exports__);
133076
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InnerSubscriber", function() { return InnerSubscriber; });
133077
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
133078
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
133079
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
133080
 
133081
 
133082
/**
133083
 * We need this JSDoc comment for affecting ESDoc.
133084
 * @ignore
133085
 * @extends {Ignored}
133086
 */
133087
var InnerSubscriber = /*@__PURE__*/ (function (_super) {
133088
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](InnerSubscriber, _super);
133089
    function InnerSubscriber(parent, outerValue, outerIndex) {
133090
        var _this = _super.call(this) || this;
133091
        _this.parent = parent;
133092
        _this.outerValue = outerValue;
133093
        _this.outerIndex = outerIndex;
133094
        _this.index = 0;
133095
        return _this;
133096
    }
133097
    InnerSubscriber.prototype._next = function (value) {
133098
        this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);
133099
    };
133100
    InnerSubscriber.prototype._error = function (error) {
133101
        this.parent.notifyError(error, this);
133102
        this.unsubscribe();
133103
    };
133104
    InnerSubscriber.prototype._complete = function () {
133105
        this.parent.notifyComplete(this);
133106
        this.unsubscribe();
133107
    };
133108
    return InnerSubscriber;
133109
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
133110
 
133111
//# sourceMappingURL=InnerSubscriber.js.map
133112
 
133113
 
133114
/***/ }),
133115
 
133116
/***/ "./node_modules/rxjs/_esm5/internal/Notification.js":
133117
/*!**********************************************************!*\
133118
  !*** ./node_modules/rxjs/_esm5/internal/Notification.js ***!
133119
  \**********************************************************/
133120
/*! exports provided: Notification */
133121
/***/ (function(module, __webpack_exports__, __webpack_require__) {
133122
 
133123
"use strict";
133124
__webpack_require__.r(__webpack_exports__);
133125
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return Notification; });
133126
/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./observable/empty */ "./node_modules/rxjs/_esm5/internal/observable/empty.js");
133127
/* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./observable/of */ "./node_modules/rxjs/_esm5/internal/observable/of.js");
133128
/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./observable/throwError */ "./node_modules/rxjs/_esm5/internal/observable/throwError.js");
133129
/** PURE_IMPORTS_START _observable_empty,_observable_of,_observable_throwError PURE_IMPORTS_END */
133130
 
133131
 
133132
 
133133
/**
133134
 * Represents a push-based event or value that an {@link Observable} can emit.
133135
 * This class is particularly useful for operators that manage notifications,
133136
 * like {@link materialize}, {@link dematerialize}, {@link observeOn}, and
133137
 * others. Besides wrapping the actual delivered value, it also annotates it
133138
 * with metadata of, for instance, what type of push message it is (`next`,
133139
 * `error`, or `complete`).
133140
 *
133141
 * @see {@link materialize}
133142
 * @see {@link dematerialize}
133143
 * @see {@link observeOn}
133144
 *
133145
 * @class Notification<T>
133146
 */
133147
var Notification = /*@__PURE__*/ (function () {
133148
    function Notification(kind, value, error) {
133149
        this.kind = kind;
133150
        this.value = value;
133151
        this.error = error;
133152
        this.hasValue = kind === 'N';
133153
    }
133154
    /**
133155
     * Delivers to the given `observer` the value wrapped by this Notification.
133156
     * @param {Observer} observer
133157
     * @return
133158
     */
133159
    Notification.prototype.observe = function (observer) {
133160
        switch (this.kind) {
133161
            case 'N':
133162
                return observer.next && observer.next(this.value);
133163
            case 'E':
133164
                return observer.error && observer.error(this.error);
133165
            case 'C':
133166
                return observer.complete && observer.complete();
133167
        }
133168
    };
133169
    /**
133170
     * Given some {@link Observer} callbacks, deliver the value represented by the
133171
     * current Notification to the correctly corresponding callback.
133172
     * @param {function(value: T): void} next An Observer `next` callback.
133173
     * @param {function(err: any): void} [error] An Observer `error` callback.
133174
     * @param {function(): void} [complete] An Observer `complete` callback.
133175
     * @return {any}
133176
     */
133177
    Notification.prototype.do = function (next, error, complete) {
133178
        var kind = this.kind;
133179
        switch (kind) {
133180
            case 'N':
133181
                return next && next(this.value);
133182
            case 'E':
133183
                return error && error(this.error);
133184
            case 'C':
133185
                return complete && complete();
133186
        }
133187
    };
133188
    /**
133189
     * Takes an Observer or its individual callback functions, and calls `observe`
133190
     * or `do` methods accordingly.
133191
     * @param {Observer|function(value: T): void} nextOrObserver An Observer or
133192
     * the `next` callback.
133193
     * @param {function(err: any): void} [error] An Observer `error` callback.
133194
     * @param {function(): void} [complete] An Observer `complete` callback.
133195
     * @return {any}
133196
     */
133197
    Notification.prototype.accept = function (nextOrObserver, error, complete) {
133198
        if (nextOrObserver && typeof nextOrObserver.next === 'function') {
133199
            return this.observe(nextOrObserver);
133200
        }
133201
        else {
133202
            return this.do(nextOrObserver, error, complete);
133203
        }
133204
    };
133205
    /**
133206
     * Returns a simple Observable that just delivers the notification represented
133207
     * by this Notification instance.
133208
     * @return {any}
133209
     */
133210
    Notification.prototype.toObservable = function () {
133211
        var kind = this.kind;
133212
        switch (kind) {
133213
            case 'N':
133214
                return Object(_observable_of__WEBPACK_IMPORTED_MODULE_1__["of"])(this.value);
133215
            case 'E':
133216
                return Object(_observable_throwError__WEBPACK_IMPORTED_MODULE_2__["throwError"])(this.error);
133217
            case 'C':
133218
                return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_0__["empty"])();
133219
        }
133220
        throw new Error('unexpected notification kind value');
133221
    };
133222
    /**
133223
     * A shortcut to create a Notification instance of the type `next` from a
133224
     * given value.
133225
     * @param {T} value The `next` value.
133226
     * @return {Notification<T>} The "next" Notification representing the
133227
     * argument.
133228
     * @nocollapse
133229
     */
133230
    Notification.createNext = function (value) {
133231
        if (typeof value !== 'undefined') {
133232
            return new Notification('N', value);
133233
        }
133234
        return Notification.undefinedValueNotification;
133235
    };
133236
    /**
133237
     * A shortcut to create a Notification instance of the type `error` from a
133238
     * given error.
133239
     * @param {any} [err] The `error` error.
133240
     * @return {Notification<T>} The "error" Notification representing the
133241
     * argument.
133242
     * @nocollapse
133243
     */
133244
    Notification.createError = function (err) {
133245
        return new Notification('E', undefined, err);
133246
    };
133247
    /**
133248
     * A shortcut to create a Notification instance of the type `complete`.
133249
     * @return {Notification<any>} The valueless "complete" Notification.
133250
     * @nocollapse
133251
     */
133252
    Notification.createComplete = function () {
133253
        return Notification.completeNotification;
133254
    };
133255
    Notification.completeNotification = new Notification('C');
133256
    Notification.undefinedValueNotification = new Notification('N', undefined);
133257
    return Notification;
133258
}());
133259
 
133260
//# sourceMappingURL=Notification.js.map
133261
 
133262
 
133263
/***/ }),
133264
 
133265
/***/ "./node_modules/rxjs/_esm5/internal/Observable.js":
133266
/*!********************************************************!*\
133267
  !*** ./node_modules/rxjs/_esm5/internal/Observable.js ***!
133268
  \********************************************************/
133269
/*! exports provided: Observable */
133270
/***/ (function(module, __webpack_exports__, __webpack_require__) {
133271
 
133272
"use strict";
133273
__webpack_require__.r(__webpack_exports__);
133274
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return Observable; });
133275
/* harmony import */ var _util_toSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/toSubscriber */ "./node_modules/rxjs/_esm5/internal/util/toSubscriber.js");
133276
/* harmony import */ var _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../internal/symbol/observable */ "./node_modules/rxjs/_esm5/internal/symbol/observable.js");
133277
/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util/pipe */ "./node_modules/rxjs/_esm5/internal/util/pipe.js");
133278
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./config */ "./node_modules/rxjs/_esm5/internal/config.js");
133279
/** PURE_IMPORTS_START _util_toSubscriber,_internal_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */
133280
 
133281
 
133282
 
133283
 
133284
/**
133285
 * A representation of any set of values over any amount of time. This is the most basic building block
133286
 * of RxJS.
133287
 *
133288
 * @class Observable<T>
133289
 */
133290
var Observable = /*@__PURE__*/ (function () {
133291
    /**
133292
     * @constructor
133293
     * @param {Function} subscribe the function that is called when the Observable is
133294
     * initially subscribed to. This function is given a Subscriber, to which new values
133295
     * can be `next`ed, or an `error` method can be called to raise an error, or
133296
     * `complete` can be called to notify of a successful completion.
133297
     */
133298
    function Observable(subscribe) {
133299
        /** Internal implementation detail, do not use directly. */
133300
        this._isScalar = false;
133301
        if (subscribe) {
133302
            this._subscribe = subscribe;
133303
        }
133304
    }
133305
    /**
133306
     * Creates a new Observable, with this Observable as the source, and the passed
133307
     * operator defined as the new observable's operator.
133308
     * @method lift
133309
     * @param {Operator} operator the operator defining the operation to take on the observable
133310
     * @return {Observable} a new observable with the Operator applied
133311
     */
133312
    Observable.prototype.lift = function (operator) {
133313
        var observable = new Observable();
133314
        observable.source = this;
133315
        observable.operator = operator;
133316
        return observable;
133317
    };
133318
    /**
133319
     * Invokes an execution of an Observable and registers Observer handlers for notifications it will emit.
133320
     *
133321
     * <span class="informal">Use it when you have all these Observables, but still nothing is happening.</span>
133322
     *
133323
     * `subscribe` is not a regular operator, but a method that calls Observable's internal `subscribe` function. It
133324
     * might be for example a function that you passed to a {@link create} static factory, but most of the time it is
133325
     * a library implementation, which defines what and when will be emitted by an Observable. This means that calling
133326
     * `subscribe` is actually the moment when Observable starts its work, not when it is created, as it is often
133327
     * thought.
133328
     *
133329
     * Apart from starting the execution of an Observable, this method allows you to listen for values
133330
     * that an Observable emits, as well as for when it completes or errors. You can achieve this in two
133331
     * following ways.
133332
     *
133333
     * The first way is creating an object that implements {@link Observer} interface. It should have methods
133334
     * defined by that interface, but note that it should be just a regular JavaScript object, which you can create
133335
     * yourself in any way you want (ES6 class, classic function constructor, object literal etc.). In particular do
133336
     * not attempt to use any RxJS implementation details to create Observers - you don't need them. Remember also
133337
     * that your object does not have to implement all methods. If you find yourself creating a method that doesn't
133338
     * do anything, you can simply omit it. Note however, that if `error` method is not provided, all errors will
133339
     * be left uncaught.
133340
     *
133341
     * The second way is to give up on Observer object altogether and simply provide callback functions in place of its methods.
133342
     * This means you can provide three functions as arguments to `subscribe`, where first function is equivalent
133343
     * of a `next` method, second of an `error` method and third of a `complete` method. Just as in case of Observer,
133344
     * if you do not need to listen for something, you can omit a function, preferably by passing `undefined` or `null`,
133345
     * since `subscribe` recognizes these functions by where they were placed in function call. When it comes
133346
     * to `error` function, just as before, if not provided, errors emitted by an Observable will be thrown.
133347
     *
133348
     * Whatever style of calling `subscribe` you use, in both cases it returns a Subscription object.
133349
     * This object allows you to call `unsubscribe` on it, which in turn will stop work that an Observable does and will clean
133350
     * up all resources that an Observable used. Note that cancelling a subscription will not call `complete` callback
133351
     * provided to `subscribe` function, which is reserved for a regular completion signal that comes from an Observable.
133352
     *
133353
     * Remember that callbacks provided to `subscribe` are not guaranteed to be called asynchronously.
133354
     * It is an Observable itself that decides when these functions will be called. For example {@link of}
133355
     * by default emits all its values synchronously. Always check documentation for how given Observable
133356
     * will behave when subscribed and if its default behavior can be modified with a {@link Scheduler}.
133357
     *
133358
     * @example <caption>Subscribe with an Observer</caption>
133359
     * const sumObserver = {
133360
     *   sum: 0,
133361
     *   next(value) {
133362
     *     console.log('Adding: ' + value);
133363
     *     this.sum = this.sum + value;
133364
     *   },
133365
     *   error() { // We actually could just remove this method,
133366
     *   },        // since we do not really care about errors right now.
133367
     *   complete() {
133368
     *     console.log('Sum equals: ' + this.sum);
133369
     *   }
133370
     * };
133371
     *
133372
     * Rx.Observable.of(1, 2, 3) // Synchronously emits 1, 2, 3 and then completes.
133373
     * .subscribe(sumObserver);
133374
     *
133375
     * // Logs:
133376
     * // "Adding: 1"
133377
     * // "Adding: 2"
133378
     * // "Adding: 3"
133379
     * // "Sum equals: 6"
133380
     *
133381
     *
133382
     * @example <caption>Subscribe with functions</caption>
133383
     * let sum = 0;
133384
     *
133385
     * Rx.Observable.of(1, 2, 3)
133386
     * .subscribe(
133387
     *   function(value) {
133388
     *     console.log('Adding: ' + value);
133389
     *     sum = sum + value;
133390
     *   },
133391
     *   undefined,
133392
     *   function() {
133393
     *     console.log('Sum equals: ' + sum);
133394
     *   }
133395
     * );
133396
     *
133397
     * // Logs:
133398
     * // "Adding: 1"
133399
     * // "Adding: 2"
133400
     * // "Adding: 3"
133401
     * // "Sum equals: 6"
133402
     *
133403
     *
133404
     * @example <caption>Cancel a subscription</caption>
133405
     * const subscription = Rx.Observable.interval(1000).subscribe(
133406
     *   num => console.log(num),
133407
     *   undefined,
133408
     *   () => console.log('completed!') // Will not be called, even
133409
     * );                                // when cancelling subscription
133410
     *
133411
     *
133412
     * setTimeout(() => {
133413
     *   subscription.unsubscribe();
133414
     *   console.log('unsubscribed!');
133415
     * }, 2500);
133416
     *
133417
     * // Logs:
133418
     * // 0 after 1s
133419
     * // 1 after 2s
133420
     * // "unsubscribed!" after 2.5s
133421
     *
133422
     *
133423
     * @param {Observer|Function} observerOrNext (optional) Either an observer with methods to be called,
133424
     *  or the first of three possible handlers, which is the handler for each value emitted from the subscribed
133425
     *  Observable.
133426
     * @param {Function} error (optional) A handler for a terminal event resulting from an error. If no error handler is provided,
133427
     *  the error will be thrown as unhandled.
133428
     * @param {Function} complete (optional) A handler for a terminal event resulting from successful completion.
133429
     * @return {ISubscription} a subscription reference to the registered handlers
133430
     * @method subscribe
133431
     */
133432
    Observable.prototype.subscribe = function (observerOrNext, error, complete) {
133433
        var operator = this.operator;
133434
        var sink = Object(_util_toSubscriber__WEBPACK_IMPORTED_MODULE_0__["toSubscriber"])(observerOrNext, error, complete);
133435
        if (operator) {
133436
            operator.call(sink, this.source);
133437
        }
133438
        else {
133439
            sink.add(this.source || !sink.syncErrorThrowable ? this._subscribe(sink) : this._trySubscribe(sink));
133440
        }
133441
        if (_config__WEBPACK_IMPORTED_MODULE_3__["config"].useDeprecatedSynchronousErrorHandling) {
133442
            if (sink.syncErrorThrowable) {
133443
                sink.syncErrorThrowable = false;
133444
                if (sink.syncErrorThrown) {
133445
                    throw sink.syncErrorValue;
133446
                }
133447
            }
133448
        }
133449
        return sink;
133450
    };
133451
    /** @deprecated This is an internal implementation detail, do not use. */
133452
    Observable.prototype._trySubscribe = function (sink) {
133453
        try {
133454
            return this._subscribe(sink);
133455
        }
133456
        catch (err) {
133457
            if (_config__WEBPACK_IMPORTED_MODULE_3__["config"].useDeprecatedSynchronousErrorHandling) {
133458
                sink.syncErrorThrown = true;
133459
                sink.syncErrorValue = err;
133460
            }
133461
            sink.error(err);
133462
        }
133463
    };
133464
    /**
133465
     * @method forEach
133466
     * @param {Function} next a handler for each value emitted by the observable
133467
     * @param {PromiseConstructor} [promiseCtor] a constructor function used to instantiate the Promise
133468
     * @return {Promise} a promise that either resolves on observable completion or
133469
     *  rejects with the handled error
133470
     */
133471
    Observable.prototype.forEach = function (next, promiseCtor) {
133472
        var _this = this;
133473
        promiseCtor = getPromiseCtor(promiseCtor);
133474
        return new promiseCtor(function (resolve, reject) {
133475
            // Must be declared in a separate statement to avoid a RefernceError when
133476
            // accessing subscription below in the closure due to Temporal Dead Zone.
133477
            var subscription;
133478
            subscription = _this.subscribe(function (value) {
133479
                try {
133480
                    next(value);
133481
                }
133482
                catch (err) {
133483
                    reject(err);
133484
                    if (subscription) {
133485
                        subscription.unsubscribe();
133486
                    }
133487
                }
133488
            }, reject, resolve);
133489
        });
133490
    };
133491
    /** @deprecated This is an internal implementation detail, do not use. */
133492
    Observable.prototype._subscribe = function (subscriber) {
133493
        var source = this.source;
133494
        return source && source.subscribe(subscriber);
133495
    };
133496
    /**
133497
     * An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
133498
     * @method Symbol.observable
133499
     * @return {Observable} this instance of the observable
133500
     */
133501
    Observable.prototype[_internal_symbol_observable__WEBPACK_IMPORTED_MODULE_1__["observable"]] = function () {
133502
        return this;
133503
    };
133504
    /* tslint:enable:max-line-length */
133505
    /**
133506
     * Used to stitch together functional operators into a chain.
133507
     * @method pipe
133508
     * @return {Observable} the Observable result of all of the operators having
133509
     * been called in the order they were passed in.
133510
     *
133511
     * @example
133512
     *
133513
     * import { map, filter, scan } from 'rxjs/operators';
133514
     *
133515
     * Rx.Observable.interval(1000)
133516
     *   .pipe(
133517
     *     filter(x => x % 2 === 0),
133518
     *     map(x => x + x),
133519
     *     scan((acc, x) => acc + x)
133520
     *   )
133521
     *   .subscribe(x => console.log(x))
133522
     */
133523
    Observable.prototype.pipe = function () {
133524
        var operations = [];
133525
        for (var _i = 0; _i < arguments.length; _i++) {
133526
            operations[_i] = arguments[_i];
133527
        }
133528
        if (operations.length === 0) {
133529
            return this;
133530
        }
133531
        return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_2__["pipeFromArray"])(operations)(this);
133532
    };
133533
    /* tslint:enable:max-line-length */
133534
    Observable.prototype.toPromise = function (promiseCtor) {
133535
        var _this = this;
133536
        promiseCtor = getPromiseCtor(promiseCtor);
133537
        return new promiseCtor(function (resolve, reject) {
133538
            var value;
133539
            _this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); });
133540
        });
133541
    };
133542
    // HACK: Since TypeScript inherits static properties too, we have to
133543
    // fight against TypeScript here so Subject can have a different static create signature
133544
    /**
133545
     * Creates a new cold Observable by calling the Observable constructor
133546
     * @static true
133547
     * @owner Observable
133548
     * @method create
133549
     * @param {Function} subscribe? the subscriber function to be passed to the Observable constructor
133550
     * @return {Observable} a new cold observable
133551
     * @nocollapse
133552
     */
133553
    Observable.create = function (subscribe) {
133554
        return new Observable(subscribe);
133555
    };
133556
    return Observable;
133557
}());
133558
 
133559
/**
133560
 * Decides between a passed promise constructor from consuming code,
133561
 * A default configured promise constructor, and the native promise
133562
 * constructor and returns it. If nothing can be found, it will throw
133563
 * an error.
133564
 * @param promiseCtor The optional promise constructor to passed by consuming code
133565
 */
133566
function getPromiseCtor(promiseCtor) {
133567
    if (!promiseCtor) {
133568
        promiseCtor = _config__WEBPACK_IMPORTED_MODULE_3__["config"].Promise || Promise;
133569
    }
133570
    if (!promiseCtor) {
133571
        throw new Error('no Promise impl found');
133572
    }
133573
    return promiseCtor;
133574
}
133575
//# sourceMappingURL=Observable.js.map
133576
 
133577
 
133578
/***/ }),
133579
 
133580
/***/ "./node_modules/rxjs/_esm5/internal/Observer.js":
133581
/*!******************************************************!*\
133582
  !*** ./node_modules/rxjs/_esm5/internal/Observer.js ***!
133583
  \******************************************************/
133584
/*! exports provided: empty */
133585
/***/ (function(module, __webpack_exports__, __webpack_require__) {
133586
 
133587
"use strict";
133588
__webpack_require__.r(__webpack_exports__);
133589
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return empty; });
133590
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./config */ "./node_modules/rxjs/_esm5/internal/config.js");
133591
/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/hostReportError */ "./node_modules/rxjs/_esm5/internal/util/hostReportError.js");
133592
/** PURE_IMPORTS_START _config,_util_hostReportError PURE_IMPORTS_END */
133593
 
133594
 
133595
var empty = {
133596
    closed: true,
133597
    next: function (value) { },
133598
    error: function (err) {
133599
        if (_config__WEBPACK_IMPORTED_MODULE_0__["config"].useDeprecatedSynchronousErrorHandling) {
133600
            throw err;
133601
        }
133602
        else {
133603
            Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_1__["hostReportError"])(err);
133604
        }
133605
    },
133606
    complete: function () { }
133607
};
133608
//# sourceMappingURL=Observer.js.map
133609
 
133610
 
133611
/***/ }),
133612
 
133613
/***/ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js":
133614
/*!*************************************************************!*\
133615
  !*** ./node_modules/rxjs/_esm5/internal/OuterSubscriber.js ***!
133616
  \*************************************************************/
133617
/*! exports provided: OuterSubscriber */
133618
/***/ (function(module, __webpack_exports__, __webpack_require__) {
133619
 
133620
"use strict";
133621
__webpack_require__.r(__webpack_exports__);
133622
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OuterSubscriber", function() { return OuterSubscriber; });
133623
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
133624
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
133625
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
133626
 
133627
 
133628
/**
133629
 * We need this JSDoc comment for affecting ESDoc.
133630
 * @ignore
133631
 * @extends {Ignored}
133632
 */
133633
var OuterSubscriber = /*@__PURE__*/ (function (_super) {
133634
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](OuterSubscriber, _super);
133635
    function OuterSubscriber() {
133636
        return _super !== null && _super.apply(this, arguments) || this;
133637
    }
133638
    OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
133639
        this.destination.next(innerValue);
133640
    };
133641
    OuterSubscriber.prototype.notifyError = function (error, innerSub) {
133642
        this.destination.error(error);
133643
    };
133644
    OuterSubscriber.prototype.notifyComplete = function (innerSub) {
133645
        this.destination.complete();
133646
    };
133647
    return OuterSubscriber;
133648
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
133649
 
133650
//# sourceMappingURL=OuterSubscriber.js.map
133651
 
133652
 
133653
/***/ }),
133654
 
133655
/***/ "./node_modules/rxjs/_esm5/internal/ReplaySubject.js":
133656
/*!***********************************************************!*\
133657
  !*** ./node_modules/rxjs/_esm5/internal/ReplaySubject.js ***!
133658
  \***********************************************************/
133659
/*! exports provided: ReplaySubject */
133660
/***/ (function(module, __webpack_exports__, __webpack_require__) {
133661
 
133662
"use strict";
133663
__webpack_require__.r(__webpack_exports__);
133664
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return ReplaySubject; });
133665
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
133666
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
133667
/* harmony import */ var _scheduler_queue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./scheduler/queue */ "./node_modules/rxjs/_esm5/internal/scheduler/queue.js");
133668
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
133669
/* harmony import */ var _operators_observeOn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./operators/observeOn */ "./node_modules/rxjs/_esm5/internal/operators/observeOn.js");
133670
/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./util/ObjectUnsubscribedError */ "./node_modules/rxjs/_esm5/internal/util/ObjectUnsubscribedError.js");
133671
/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SubjectSubscription */ "./node_modules/rxjs/_esm5/internal/SubjectSubscription.js");
133672
/** PURE_IMPORTS_START tslib,_Subject,_scheduler_queue,_Subscription,_operators_observeOn,_util_ObjectUnsubscribedError,_SubjectSubscription PURE_IMPORTS_END */
133673
 
133674
 
133675
 
133676
 
133677
 
133678
 
133679
 
133680
/**
133681
 * @class ReplaySubject<T>
133682
 */
133683
var ReplaySubject = /*@__PURE__*/ (function (_super) {
133684
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ReplaySubject, _super);
133685
    function ReplaySubject(bufferSize, windowTime, scheduler) {
133686
        if (bufferSize === void 0) {
133687
            bufferSize = Number.POSITIVE_INFINITY;
133688
        }
133689
        if (windowTime === void 0) {
133690
            windowTime = Number.POSITIVE_INFINITY;
133691
        }
133692
        var _this = _super.call(this) || this;
133693
        _this.scheduler = scheduler;
133694
        _this._events = [];
133695
        _this._infiniteTimeWindow = false;
133696
        _this._bufferSize = bufferSize < 1 ? 1 : bufferSize;
133697
        _this._windowTime = windowTime < 1 ? 1 : windowTime;
133698
        if (windowTime === Number.POSITIVE_INFINITY) {
133699
            _this._infiniteTimeWindow = true;
133700
            _this.next = _this.nextInfiniteTimeWindow;
133701
        }
133702
        else {
133703
            _this.next = _this.nextTimeWindow;
133704
        }
133705
        return _this;
133706
    }
133707
    ReplaySubject.prototype.nextInfiniteTimeWindow = function (value) {
133708
        var _events = this._events;
133709
        _events.push(value);
133710
        // Since this method is invoked in every next() call than the buffer
133711
        // can overgrow the max size only by one item
133712
        if (_events.length > this._bufferSize) {
133713
            _events.shift();
133714
        }
133715
        _super.prototype.next.call(this, value);
133716
    };
133717
    ReplaySubject.prototype.nextTimeWindow = function (value) {
133718
        this._events.push(new ReplayEvent(this._getNow(), value));
133719
        this._trimBufferThenGetEvents();
133720
        _super.prototype.next.call(this, value);
133721
    };
133722
    /** @deprecated This is an internal implementation detail, do not use. */
133723
    ReplaySubject.prototype._subscribe = function (subscriber) {
133724
        // When `_infiniteTimeWindow === true` then the buffer is already trimmed
133725
        var _infiniteTimeWindow = this._infiniteTimeWindow;
133726
        var _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents();
133727
        var scheduler = this.scheduler;
133728
        var len = _events.length;
133729
        var subscription;
133730
        if (this.closed) {
133731
            throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_5__["ObjectUnsubscribedError"]();
133732
        }
133733
        else if (this.isStopped || this.hasError) {
133734
            subscription = _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
133735
        }
133736
        else {
133737
            this.observers.push(subscriber);
133738
            subscription = new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_6__["SubjectSubscription"](this, subscriber);
133739
        }
133740
        if (scheduler) {
133741
            subscriber.add(subscriber = new _operators_observeOn__WEBPACK_IMPORTED_MODULE_4__["ObserveOnSubscriber"](subscriber, scheduler));
133742
        }
133743
        if (_infiniteTimeWindow) {
133744
            for (var i = 0; i < len && !subscriber.closed; i++) {
133745
                subscriber.next(_events[i]);
133746
            }
133747
        }
133748
        else {
133749
            for (var i = 0; i < len && !subscriber.closed; i++) {
133750
                subscriber.next(_events[i].value);
133751
            }
133752
        }
133753
        if (this.hasError) {
133754
            subscriber.error(this.thrownError);
133755
        }
133756
        else if (this.isStopped) {
133757
            subscriber.complete();
133758
        }
133759
        return subscription;
133760
    };
133761
    ReplaySubject.prototype._getNow = function () {
133762
        return (this.scheduler || _scheduler_queue__WEBPACK_IMPORTED_MODULE_2__["queue"]).now();
133763
    };
133764
    ReplaySubject.prototype._trimBufferThenGetEvents = function () {
133765
        var now = this._getNow();
133766
        var _bufferSize = this._bufferSize;
133767
        var _windowTime = this._windowTime;
133768
        var _events = this._events;
133769
        var eventsCount = _events.length;
133770
        var spliceCount = 0;
133771
        // Trim events that fall out of the time window.
133772
        // Start at the front of the list. Break early once
133773
        // we encounter an event that falls within the window.
133774
        while (spliceCount < eventsCount) {
133775
            if ((now - _events[spliceCount].time) < _windowTime) {
133776
                break;
133777
            }
133778
            spliceCount++;
133779
        }
133780
        if (eventsCount > _bufferSize) {
133781
            spliceCount = Math.max(spliceCount, eventsCount - _bufferSize);
133782
        }
133783
        if (spliceCount > 0) {
133784
            _events.splice(0, spliceCount);
133785
        }
133786
        return _events;
133787
    };
133788
    return ReplaySubject;
133789
}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
133790
 
133791
var ReplayEvent = /*@__PURE__*/ (function () {
133792
    function ReplayEvent(time, value) {
133793
        this.time = time;
133794
        this.value = value;
133795
    }
133796
    return ReplayEvent;
133797
}());
133798
//# sourceMappingURL=ReplaySubject.js.map
133799
 
133800
 
133801
/***/ }),
133802
 
133803
/***/ "./node_modules/rxjs/_esm5/internal/Scheduler.js":
133804
/*!*******************************************************!*\
133805
  !*** ./node_modules/rxjs/_esm5/internal/Scheduler.js ***!
133806
  \*******************************************************/
133807
/*! exports provided: Scheduler */
133808
/***/ (function(module, __webpack_exports__, __webpack_require__) {
133809
 
133810
"use strict";
133811
__webpack_require__.r(__webpack_exports__);
133812
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Scheduler", function() { return Scheduler; });
133813
/**
133814
 * An execution context and a data structure to order tasks and schedule their
133815
 * execution. Provides a notion of (potentially virtual) time, through the
133816
 * `now()` getter method.
133817
 *
133818
 * Each unit of work in a Scheduler is called an {@link Action}.
133819
 *
133820
 * ```ts
133821
 * class Scheduler {
133822
 *   now(): number;
133823
 *   schedule(work, delay?, state?): Subscription;
133824
 * }
133825
 * ```
133826
 *
133827
 * @class Scheduler
133828
 * @deprecated Scheduler is an internal implementation detail of RxJS, and
133829
 * should not be used directly. Rather, create your own class and implement
133830
 * {@link SchedulerLike}
133831
 */
133832
var Scheduler = /*@__PURE__*/ (function () {
133833
    function Scheduler(SchedulerAction, now) {
133834
        if (now === void 0) {
133835
            now = Scheduler.now;
133836
        }
133837
        this.SchedulerAction = SchedulerAction;
133838
        this.now = now;
133839
    }
133840
    /**
133841
     * Schedules a function, `work`, for execution. May happen at some point in
133842
     * the future, according to the `delay` parameter, if specified. May be passed
133843
     * some context object, `state`, which will be passed to the `work` function.
133844
     *
133845
     * The given arguments will be processed an stored as an Action object in a
133846
     * queue of actions.
133847
     *
133848
     * @param {function(state: ?T): ?Subscription} work A function representing a
133849
     * task, or some unit of work to be executed by the Scheduler.
133850
     * @param {number} [delay] Time to wait before executing the work, where the
133851
     * time unit is implicit and defined by the Scheduler itself.
133852
     * @param {T} [state] Some contextual data that the `work` function uses when
133853
     * called by the Scheduler.
133854
     * @return {Subscription} A subscription in order to be able to unsubscribe
133855
     * the scheduled work.
133856
     */
133857
    Scheduler.prototype.schedule = function (work, delay, state) {
133858
        if (delay === void 0) {
133859
            delay = 0;
133860
        }
133861
        return new this.SchedulerAction(this, work).schedule(state, delay);
133862
    };
133863
    /** @nocollapse */
133864
    Scheduler.now = Date.now ? Date.now : function () { return +new Date(); };
133865
    return Scheduler;
133866
}());
133867
 
133868
//# sourceMappingURL=Scheduler.js.map
133869
 
133870
 
133871
/***/ }),
133872
 
133873
/***/ "./node_modules/rxjs/_esm5/internal/Subject.js":
133874
/*!*****************************************************!*\
133875
  !*** ./node_modules/rxjs/_esm5/internal/Subject.js ***!
133876
  \*****************************************************/
133877
/*! exports provided: SubjectSubscriber, Subject, AnonymousSubject */
133878
/***/ (function(module, __webpack_exports__, __webpack_require__) {
133879
 
133880
"use strict";
133881
__webpack_require__.r(__webpack_exports__);
133882
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubjectSubscriber", function() { return SubjectSubscriber; });
133883
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return Subject; });
133884
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnonymousSubject", function() { return AnonymousSubject; });
133885
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
133886
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
133887
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
133888
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
133889
/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./util/ObjectUnsubscribedError */ "./node_modules/rxjs/_esm5/internal/util/ObjectUnsubscribedError.js");
133890
/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SubjectSubscription */ "./node_modules/rxjs/_esm5/internal/SubjectSubscription.js");
133891
/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../internal/symbol/rxSubscriber */ "./node_modules/rxjs/_esm5/internal/symbol/rxSubscriber.js");
133892
/** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */
133893
 
133894
 
133895
 
133896
 
133897
 
133898
 
133899
 
133900
/**
133901
 * @class SubjectSubscriber<T>
133902
 */
133903
var SubjectSubscriber = /*@__PURE__*/ (function (_super) {
133904
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubjectSubscriber, _super);
133905
    function SubjectSubscriber(destination) {
133906
        var _this = _super.call(this, destination) || this;
133907
        _this.destination = destination;
133908
        return _this;
133909
    }
133910
    return SubjectSubscriber;
133911
}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]));
133912
 
133913
/**
133914
 * @class Subject<T>
133915
 */
133916
var Subject = /*@__PURE__*/ (function (_super) {
133917
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Subject, _super);
133918
    function Subject() {
133919
        var _this = _super.call(this) || this;
133920
        _this.observers = [];
133921
        _this.closed = false;
133922
        _this.isStopped = false;
133923
        _this.hasError = false;
133924
        _this.thrownError = null;
133925
        return _this;
133926
    }
133927
    Subject.prototype[_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_6__["rxSubscriber"]] = function () {
133928
        return new SubjectSubscriber(this);
133929
    };
133930
    Subject.prototype.lift = function (operator) {
133931
        var subject = new AnonymousSubject(this, this);
133932
        subject.operator = operator;
133933
        return subject;
133934
    };
133935
    Subject.prototype.next = function (value) {
133936
        if (this.closed) {
133937
            throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
133938
        }
133939
        if (!this.isStopped) {
133940
            var observers = this.observers;
133941
            var len = observers.length;
133942
            var copy = observers.slice();
133943
            for (var i = 0; i < len; i++) {
133944
                copy[i].next(value);
133945
            }
133946
        }
133947
    };
133948
    Subject.prototype.error = function (err) {
133949
        if (this.closed) {
133950
            throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
133951
        }
133952
        this.hasError = true;
133953
        this.thrownError = err;
133954
        this.isStopped = true;
133955
        var observers = this.observers;
133956
        var len = observers.length;
133957
        var copy = observers.slice();
133958
        for (var i = 0; i < len; i++) {
133959
            copy[i].error(err);
133960
        }
133961
        this.observers.length = 0;
133962
    };
133963
    Subject.prototype.complete = function () {
133964
        if (this.closed) {
133965
            throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
133966
        }
133967
        this.isStopped = true;
133968
        var observers = this.observers;
133969
        var len = observers.length;
133970
        var copy = observers.slice();
133971
        for (var i = 0; i < len; i++) {
133972
            copy[i].complete();
133973
        }
133974
        this.observers.length = 0;
133975
    };
133976
    Subject.prototype.unsubscribe = function () {
133977
        this.isStopped = true;
133978
        this.closed = true;
133979
        this.observers = null;
133980
    };
133981
    /** @deprecated This is an internal implementation detail, do not use. */
133982
    Subject.prototype._trySubscribe = function (subscriber) {
133983
        if (this.closed) {
133984
            throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
133985
        }
133986
        else {
133987
            return _super.prototype._trySubscribe.call(this, subscriber);
133988
        }
133989
    };
133990
    /** @deprecated This is an internal implementation detail, do not use. */
133991
    Subject.prototype._subscribe = function (subscriber) {
133992
        if (this.closed) {
133993
            throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
133994
        }
133995
        else if (this.hasError) {
133996
            subscriber.error(this.thrownError);
133997
            return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
133998
        }
133999
        else if (this.isStopped) {
134000
            subscriber.complete();
134001
            return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
134002
        }
134003
        else {
134004
            this.observers.push(subscriber);
134005
            return new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__["SubjectSubscription"](this, subscriber);
134006
        }
134007
    };
134008
    Subject.prototype.asObservable = function () {
134009
        var observable = new _Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]();
134010
        observable.source = this;
134011
        return observable;
134012
    };
134013
    /**@nocollapse */
134014
    Subject.create = function (destination, source) {
134015
        return new AnonymousSubject(destination, source);
134016
    };
134017
    return Subject;
134018
}(_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]));
134019
 
134020
/**
134021
 * @class AnonymousSubject<T>
134022
 */
134023
var AnonymousSubject = /*@__PURE__*/ (function (_super) {
134024
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnonymousSubject, _super);
134025
    function AnonymousSubject(destination, source) {
134026
        var _this = _super.call(this) || this;
134027
        _this.destination = destination;
134028
        _this.source = source;
134029
        return _this;
134030
    }
134031
    AnonymousSubject.prototype.next = function (value) {
134032
        var destination = this.destination;
134033
        if (destination && destination.next) {
134034
            destination.next(value);
134035
        }
134036
    };
134037
    AnonymousSubject.prototype.error = function (err) {
134038
        var destination = this.destination;
134039
        if (destination && destination.error) {
134040
            this.destination.error(err);
134041
        }
134042
    };
134043
    AnonymousSubject.prototype.complete = function () {
134044
        var destination = this.destination;
134045
        if (destination && destination.complete) {
134046
            this.destination.complete();
134047
        }
134048
    };
134049
    /** @deprecated This is an internal implementation detail, do not use. */
134050
    AnonymousSubject.prototype._subscribe = function (subscriber) {
134051
        var source = this.source;
134052
        if (source) {
134053
            return this.source.subscribe(subscriber);
134054
        }
134055
        else {
134056
            return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
134057
        }
134058
    };
134059
    return AnonymousSubject;
134060
}(Subject));
134061
 
134062
//# sourceMappingURL=Subject.js.map
134063
 
134064
 
134065
/***/ }),
134066
 
134067
/***/ "./node_modules/rxjs/_esm5/internal/SubjectSubscription.js":
134068
/*!*****************************************************************!*\
134069
  !*** ./node_modules/rxjs/_esm5/internal/SubjectSubscription.js ***!
134070
  \*****************************************************************/
134071
/*! exports provided: SubjectSubscription */
134072
/***/ (function(module, __webpack_exports__, __webpack_require__) {
134073
 
134074
"use strict";
134075
__webpack_require__.r(__webpack_exports__);
134076
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubjectSubscription", function() { return SubjectSubscription; });
134077
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
134078
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
134079
/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */
134080
 
134081
 
134082
/**
134083
 * We need this JSDoc comment for affecting ESDoc.
134084
 * @ignore
134085
 * @extends {Ignored}
134086
 */
134087
var SubjectSubscription = /*@__PURE__*/ (function (_super) {
134088
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubjectSubscription, _super);
134089
    function SubjectSubscription(subject, subscriber) {
134090
        var _this = _super.call(this) || this;
134091
        _this.subject = subject;
134092
        _this.subscriber = subscriber;
134093
        _this.closed = false;
134094
        return _this;
134095
    }
134096
    SubjectSubscription.prototype.unsubscribe = function () {
134097
        if (this.closed) {
134098
            return;
134099
        }
134100
        this.closed = true;
134101
        var subject = this.subject;
134102
        var observers = subject.observers;
134103
        this.subject = null;
134104
        if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {
134105
            return;
134106
        }
134107
        var subscriberIndex = observers.indexOf(this.subscriber);
134108
        if (subscriberIndex !== -1) {
134109
            observers.splice(subscriberIndex, 1);
134110
        }
134111
    };
134112
    return SubjectSubscription;
134113
}(_Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]));
134114
 
134115
//# sourceMappingURL=SubjectSubscription.js.map
134116
 
134117
 
134118
/***/ }),
134119
 
134120
/***/ "./node_modules/rxjs/_esm5/internal/Subscriber.js":
134121
/*!********************************************************!*\
134122
  !*** ./node_modules/rxjs/_esm5/internal/Subscriber.js ***!
134123
  \********************************************************/
134124
/*! exports provided: Subscriber */
134125
/***/ (function(module, __webpack_exports__, __webpack_require__) {
134126
 
134127
"use strict";
134128
__webpack_require__.r(__webpack_exports__);
134129
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return Subscriber; });
134130
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
134131
/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/isFunction */ "./node_modules/rxjs/_esm5/internal/util/isFunction.js");
134132
/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Observer */ "./node_modules/rxjs/_esm5/internal/Observer.js");
134133
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
134134
/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../internal/symbol/rxSubscriber */ "./node_modules/rxjs/_esm5/internal/symbol/rxSubscriber.js");
134135
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./config */ "./node_modules/rxjs/_esm5/internal/config.js");
134136
/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./util/hostReportError */ "./node_modules/rxjs/_esm5/internal/util/hostReportError.js");
134137
/** PURE_IMPORTS_START tslib,_util_isFunction,_Observer,_Subscription,_internal_symbol_rxSubscriber,_config,_util_hostReportError PURE_IMPORTS_END */
134138
 
134139
 
134140
 
134141
 
134142
 
134143
 
134144
 
134145
/**
134146
 * Implements the {@link Observer} interface and extends the
134147
 * {@link Subscription} class. While the {@link Observer} is the public API for
134148
 * consuming the values of an {@link Observable}, all Observers get converted to
134149
 * a Subscriber, in order to provide Subscription-like capabilities such as
134150
 * `unsubscribe`. Subscriber is a common type in RxJS, and crucial for
134151
 * implementing operators, but it is rarely used as a public API.
134152
 *
134153
 * @class Subscriber<T>
134154
 */
134155
var Subscriber = /*@__PURE__*/ (function (_super) {
134156
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Subscriber, _super);
134157
    /**
134158
     * @param {Observer|function(value: T): void} [destinationOrNext] A partially
134159
     * defined Observer or a `next` callback function.
134160
     * @param {function(e: ?any): void} [error] The `error` callback of an
134161
     * Observer.
134162
     * @param {function(): void} [complete] The `complete` callback of an
134163
     * Observer.
134164
     */
134165
    function Subscriber(destinationOrNext, error, complete) {
134166
        var _this = _super.call(this) || this;
134167
        /** @internal */ _this.syncErrorValue = null;
134168
        /** @internal */ _this.syncErrorThrown = false;
134169
        /** @internal */ _this.syncErrorThrowable = false;
134170
        _this.isStopped = false;
134171
        switch (arguments.length) {
134172
            case 0:
134173
                _this.destination = _Observer__WEBPACK_IMPORTED_MODULE_2__["empty"];
134174
                break;
134175
            case 1:
134176
                if (!destinationOrNext) {
134177
                    _this.destination = _Observer__WEBPACK_IMPORTED_MODULE_2__["empty"];
134178
                    break;
134179
                }
134180
                if (typeof destinationOrNext === 'object') {
134181
                    // HACK(benlesh): For situations where Node has multiple copies of rxjs in
134182
                    // node_modules, we cannot rely on `instanceof` checks
134183
                    if (isTrustedSubscriber(destinationOrNext)) {
134184
                        var trustedSubscriber = destinationOrNext[_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_4__["rxSubscriber"]]();
134185
                        _this.syncErrorThrowable = trustedSubscriber.syncErrorThrowable;
134186
                        _this.destination = trustedSubscriber;
134187
                        trustedSubscriber.add(_this);
134188
                    }
134189
                    else {
134190
                        _this.syncErrorThrowable = true;
134191
                        _this.destination = new SafeSubscriber(_this, destinationOrNext);
134192
                    }
134193
                    break;
134194
                }
134195
            default:
134196
                _this.syncErrorThrowable = true;
134197
                _this.destination = new SafeSubscriber(_this, destinationOrNext, error, complete);
134198
                break;
134199
        }
134200
        return _this;
134201
    }
134202
    Subscriber.prototype[_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_4__["rxSubscriber"]] = function () { return this; };
134203
    /**
134204
     * A static factory for a Subscriber, given a (potentially partial) definition
134205
     * of an Observer.
134206
     * @param {function(x: ?T): void} [next] The `next` callback of an Observer.
134207
     * @param {function(e: ?any): void} [error] The `error` callback of an
134208
     * Observer.
134209
     * @param {function(): void} [complete] The `complete` callback of an
134210
     * Observer.
134211
     * @return {Subscriber<T>} A Subscriber wrapping the (partially defined)
134212
     * Observer represented by the given arguments.
134213
     * @nocollapse
134214
     */
134215
    Subscriber.create = function (next, error, complete) {
134216
        var subscriber = new Subscriber(next, error, complete);
134217
        subscriber.syncErrorThrowable = false;
134218
        return subscriber;
134219
    };
134220
    /**
134221
     * The {@link Observer} callback to receive notifications of type `next` from
134222
     * the Observable, with a value. The Observable may call this method 0 or more
134223
     * times.
134224
     * @param {T} [value] The `next` value.
134225
     * @return {void}
134226
     */
134227
    Subscriber.prototype.next = function (value) {
134228
        if (!this.isStopped) {
134229
            this._next(value);
134230
        }
134231
    };
134232
    /**
134233
     * The {@link Observer} callback to receive notifications of type `error` from
134234
     * the Observable, with an attached {@link Error}. Notifies the Observer that
134235
     * the Observable has experienced an error condition.
134236
     * @param {any} [err] The `error` exception.
134237
     * @return {void}
134238
     */
134239
    Subscriber.prototype.error = function (err) {
134240
        if (!this.isStopped) {
134241
            this.isStopped = true;
134242
            this._error(err);
134243
        }
134244
    };
134245
    /**
134246
     * The {@link Observer} callback to receive a valueless notification of type
134247
     * `complete` from the Observable. Notifies the Observer that the Observable
134248
     * has finished sending push-based notifications.
134249
     * @return {void}
134250
     */
134251
    Subscriber.prototype.complete = function () {
134252
        if (!this.isStopped) {
134253
            this.isStopped = true;
134254
            this._complete();
134255
        }
134256
    };
134257
    Subscriber.prototype.unsubscribe = function () {
134258
        if (this.closed) {
134259
            return;
134260
        }
134261
        this.isStopped = true;
134262
        _super.prototype.unsubscribe.call(this);
134263
    };
134264
    Subscriber.prototype._next = function (value) {
134265
        this.destination.next(value);
134266
    };
134267
    Subscriber.prototype._error = function (err) {
134268
        this.destination.error(err);
134269
        this.unsubscribe();
134270
    };
134271
    Subscriber.prototype._complete = function () {
134272
        this.destination.complete();
134273
        this.unsubscribe();
134274
    };
134275
    /** @deprecated This is an internal implementation detail, do not use. */
134276
    Subscriber.prototype._unsubscribeAndRecycle = function () {
134277
        var _a = this, _parent = _a._parent, _parents = _a._parents;
134278
        this._parent = null;
134279
        this._parents = null;
134280
        this.unsubscribe();
134281
        this.closed = false;
134282
        this.isStopped = false;
134283
        this._parent = _parent;
134284
        this._parents = _parents;
134285
        return this;
134286
    };
134287
    return Subscriber;
134288
}(_Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"]));
134289
 
134290
/**
134291
 * We need this JSDoc comment for affecting ESDoc.
134292
 * @ignore
134293
 * @extends {Ignored}
134294
 */
134295
var SafeSubscriber = /*@__PURE__*/ (function (_super) {
134296
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SafeSubscriber, _super);
134297
    function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) {
134298
        var _this = _super.call(this) || this;
134299
        _this._parentSubscriber = _parentSubscriber;
134300
        var next;
134301
        var context = _this;
134302
        if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(observerOrNext)) {
134303
            next = observerOrNext;
134304
        }
134305
        else if (observerOrNext) {
134306
            next = observerOrNext.next;
134307
            error = observerOrNext.error;
134308
            complete = observerOrNext.complete;
134309
            if (observerOrNext !== _Observer__WEBPACK_IMPORTED_MODULE_2__["empty"]) {
134310
                context = Object.create(observerOrNext);
134311
                if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(context.unsubscribe)) {
134312
                    _this.add(context.unsubscribe.bind(context));
134313
                }
134314
                context.unsubscribe = _this.unsubscribe.bind(_this);
134315
            }
134316
        }
134317
        _this._context = context;
134318
        _this._next = next;
134319
        _this._error = error;
134320
        _this._complete = complete;
134321
        return _this;
134322
    }
134323
    SafeSubscriber.prototype.next = function (value) {
134324
        if (!this.isStopped && this._next) {
134325
            var _parentSubscriber = this._parentSubscriber;
134326
            if (!_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
134327
                this.__tryOrUnsub(this._next, value);
134328
            }
134329
            else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) {
134330
                this.unsubscribe();
134331
            }
134332
        }
134333
    };
134334
    SafeSubscriber.prototype.error = function (err) {
134335
        if (!this.isStopped) {
134336
            var _parentSubscriber = this._parentSubscriber;
134337
            var useDeprecatedSynchronousErrorHandling = _config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling;
134338
            if (this._error) {
134339
                if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
134340
                    this.__tryOrUnsub(this._error, err);
134341
                    this.unsubscribe();
134342
                }
134343
                else {
134344
                    this.__tryOrSetError(_parentSubscriber, this._error, err);
134345
                    this.unsubscribe();
134346
                }
134347
            }
134348
            else if (!_parentSubscriber.syncErrorThrowable) {
134349
                this.unsubscribe();
134350
                if (useDeprecatedSynchronousErrorHandling) {
134351
                    throw err;
134352
                }
134353
                Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
134354
            }
134355
            else {
134356
                if (useDeprecatedSynchronousErrorHandling) {
134357
                    _parentSubscriber.syncErrorValue = err;
134358
                    _parentSubscriber.syncErrorThrown = true;
134359
                }
134360
                else {
134361
                    Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
134362
                }
134363
                this.unsubscribe();
134364
            }
134365
        }
134366
    };
134367
    SafeSubscriber.prototype.complete = function () {
134368
        var _this = this;
134369
        if (!this.isStopped) {
134370
            var _parentSubscriber = this._parentSubscriber;
134371
            if (this._complete) {
134372
                var wrappedComplete = function () { return _this._complete.call(_this._context); };
134373
                if (!_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
134374
                    this.__tryOrUnsub(wrappedComplete);
134375
                    this.unsubscribe();
134376
                }
134377
                else {
134378
                    this.__tryOrSetError(_parentSubscriber, wrappedComplete);
134379
                    this.unsubscribe();
134380
                }
134381
            }
134382
            else {
134383
                this.unsubscribe();
134384
            }
134385
        }
134386
    };
134387
    SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) {
134388
        try {
134389
            fn.call(this._context, value);
134390
        }
134391
        catch (err) {
134392
            this.unsubscribe();
134393
            if (_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling) {
134394
                throw err;
134395
            }
134396
            else {
134397
                Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
134398
            }
134399
        }
134400
    };
134401
    SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) {
134402
        if (!_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling) {
134403
            throw new Error('bad call');
134404
        }
134405
        try {
134406
            fn.call(this._context, value);
134407
        }
134408
        catch (err) {
134409
            if (_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling) {
134410
                parent.syncErrorValue = err;
134411
                parent.syncErrorThrown = true;
134412
                return true;
134413
            }
134414
            else {
134415
                Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
134416
                return true;
134417
            }
134418
        }
134419
        return false;
134420
    };
134421
    /** @deprecated This is an internal implementation detail, do not use. */
134422
    SafeSubscriber.prototype._unsubscribe = function () {
134423
        var _parentSubscriber = this._parentSubscriber;
134424
        this._context = null;
134425
        this._parentSubscriber = null;
134426
        _parentSubscriber.unsubscribe();
134427
    };
134428
    return SafeSubscriber;
134429
}(Subscriber));
134430
function isTrustedSubscriber(obj) {
134431
    return obj instanceof Subscriber || ('syncErrorThrowable' in obj && obj[_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_4__["rxSubscriber"]]);
134432
}
134433
//# sourceMappingURL=Subscriber.js.map
134434
 
134435
 
134436
/***/ }),
134437
 
134438
/***/ "./node_modules/rxjs/_esm5/internal/Subscription.js":
134439
/*!**********************************************************!*\
134440
  !*** ./node_modules/rxjs/_esm5/internal/Subscription.js ***!
134441
  \**********************************************************/
134442
/*! exports provided: Subscription */
134443
/***/ (function(module, __webpack_exports__, __webpack_require__) {
134444
 
134445
"use strict";
134446
__webpack_require__.r(__webpack_exports__);
134447
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subscription", function() { return Subscription; });
134448
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/isArray */ "./node_modules/rxjs/_esm5/internal/util/isArray.js");
134449
/* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/isObject */ "./node_modules/rxjs/_esm5/internal/util/isObject.js");
134450
/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util/isFunction */ "./node_modules/rxjs/_esm5/internal/util/isFunction.js");
134451
/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util/tryCatch */ "./node_modules/rxjs/_esm5/internal/util/tryCatch.js");
134452
/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./util/errorObject */ "./node_modules/rxjs/_esm5/internal/util/errorObject.js");
134453
/* harmony import */ var _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./util/UnsubscriptionError */ "./node_modules/rxjs/_esm5/internal/util/UnsubscriptionError.js");
134454
/** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_tryCatch,_util_errorObject,_util_UnsubscriptionError PURE_IMPORTS_END */
134455
 
134456
 
134457
 
134458
 
134459
 
134460
 
134461
/**
134462
 * Represents a disposable resource, such as the execution of an Observable. A
134463
 * Subscription has one important method, `unsubscribe`, that takes no argument
134464
 * and just disposes the resource held by the subscription.
134465
 *
134466
 * Additionally, subscriptions may be grouped together through the `add()`
134467
 * method, which will attach a child Subscription to the current Subscription.
134468
 * When a Subscription is unsubscribed, all its children (and its grandchildren)
134469
 * will be unsubscribed as well.
134470
 *
134471
 * @class Subscription
134472
 */
134473
var Subscription = /*@__PURE__*/ (function () {
134474
    /**
134475
     * @param {function(): void} [unsubscribe] A function describing how to
134476
     * perform the disposal of resources when the `unsubscribe` method is called.
134477
     */
134478
    function Subscription(unsubscribe) {
134479
        /**
134480
         * A flag to indicate whether this Subscription has already been unsubscribed.
134481
         * @type {boolean}
134482
         */
134483
        this.closed = false;
134484
        /** @internal */
134485
        this._parent = null;
134486
        /** @internal */
134487
        this._parents = null;
134488
        /** @internal */
134489
        this._subscriptions = null;
134490
        if (unsubscribe) {
134491
            this._unsubscribe = unsubscribe;
134492
        }
134493
    }
134494
    /**
134495
     * Disposes the resources held by the subscription. May, for instance, cancel
134496
     * an ongoing Observable execution or cancel any other type of work that
134497
     * started when the Subscription was created.
134498
     * @return {void}
134499
     */
134500
    Subscription.prototype.unsubscribe = function () {
134501
        var hasErrors = false;
134502
        var errors;
134503
        if (this.closed) {
134504
            return;
134505
        }
134506
        var _a = this, _parent = _a._parent, _parents = _a._parents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;
134507
        this.closed = true;
134508
        this._parent = null;
134509
        this._parents = null;
134510
        // null out _subscriptions first so any child subscriptions that attempt
134511
        // to remove themselves from this subscription will noop
134512
        this._subscriptions = null;
134513
        var index = -1;
134514
        var len = _parents ? _parents.length : 0;
134515
        // if this._parent is null, then so is this._parents, and we
134516
        // don't have to remove ourselves from any parent subscriptions.
134517
        while (_parent) {
134518
            _parent.remove(this);
134519
            // if this._parents is null or index >= len,
134520
            // then _parent is set to null, and the loop exits
134521
            _parent = ++index < len && _parents[index] || null;
134522
        }
134523
        if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(_unsubscribe)) {
134524
            var trial = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_3__["tryCatch"])(_unsubscribe).call(this);
134525
            if (trial === _util_errorObject__WEBPACK_IMPORTED_MODULE_4__["errorObject"]) {
134526
                hasErrors = true;
134527
                errors = errors || (_util_errorObject__WEBPACK_IMPORTED_MODULE_4__["errorObject"].e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_5__["UnsubscriptionError"] ?
134528
                    flattenUnsubscriptionErrors(_util_errorObject__WEBPACK_IMPORTED_MODULE_4__["errorObject"].e.errors) : [_util_errorObject__WEBPACK_IMPORTED_MODULE_4__["errorObject"].e]);
134529
            }
134530
        }
134531
        if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(_subscriptions)) {
134532
            index = -1;
134533
            len = _subscriptions.length;
134534
            while (++index < len) {
134535
                var sub = _subscriptions[index];
134536
                if (Object(_util_isObject__WEBPACK_IMPORTED_MODULE_1__["isObject"])(sub)) {
134537
                    var trial = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_3__["tryCatch"])(sub.unsubscribe).call(sub);
134538
                    if (trial === _util_errorObject__WEBPACK_IMPORTED_MODULE_4__["errorObject"]) {
134539
                        hasErrors = true;
134540
                        errors = errors || [];
134541
                        var err = _util_errorObject__WEBPACK_IMPORTED_MODULE_4__["errorObject"].e;
134542
                        if (err instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_5__["UnsubscriptionError"]) {
134543
                            errors = errors.concat(flattenUnsubscriptionErrors(err.errors));
134544
                        }
134545
                        else {
134546
                            errors.push(err);
134547
                        }
134548
                    }
134549
                }
134550
            }
134551
        }
134552
        if (hasErrors) {
134553
            throw new _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_5__["UnsubscriptionError"](errors);
134554
        }
134555
    };
134556
    /**
134557
     * Adds a tear down to be called during the unsubscribe() of this
134558
     * Subscription.
134559
     *
134560
     * If the tear down being added is a subscription that is already
134561
     * unsubscribed, is the same reference `add` is being called on, or is
134562
     * `Subscription.EMPTY`, it will not be added.
134563
     *
134564
     * If this subscription is already in an `closed` state, the passed
134565
     * tear down logic will be executed immediately.
134566
     *
134567
     * @param {TeardownLogic} teardown The additional logic to execute on
134568
     * teardown.
134569
     * @return {Subscription} Returns the Subscription used or created to be
134570
     * added to the inner subscriptions list. This Subscription can be used with
134571
     * `remove()` to remove the passed teardown logic from the inner subscriptions
134572
     * list.
134573
     */
134574
    Subscription.prototype.add = function (teardown) {
134575
        if (!teardown || (teardown === Subscription.EMPTY)) {
134576
            return Subscription.EMPTY;
134577
        }
134578
        if (teardown === this) {
134579
            return this;
134580
        }
134581
        var subscription = teardown;
134582
        switch (typeof teardown) {
134583
            case 'function':
134584
                subscription = new Subscription(teardown);
134585
            case 'object':
134586
                if (subscription.closed || typeof subscription.unsubscribe !== 'function') {
134587
                    return subscription;
134588
                }
134589
                else if (this.closed) {
134590
                    subscription.unsubscribe();
134591
                    return subscription;
134592
                }
134593
                else if (typeof subscription._addParent !== 'function' /* quack quack */) {
134594
                    var tmp = subscription;
134595
                    subscription = new Subscription();
134596
                    subscription._subscriptions = [tmp];
134597
                }
134598
                break;
134599
            default:
134600
                throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');
134601
        }
134602
        var subscriptions = this._subscriptions || (this._subscriptions = []);
134603
        subscriptions.push(subscription);
134604
        subscription._addParent(this);
134605
        return subscription;
134606
    };
134607
    /**
134608
     * Removes a Subscription from the internal list of subscriptions that will
134609
     * unsubscribe during the unsubscribe process of this Subscription.
134610
     * @param {Subscription} subscription The subscription to remove.
134611
     * @return {void}
134612
     */
134613
    Subscription.prototype.remove = function (subscription) {
134614
        var subscriptions = this._subscriptions;
134615
        if (subscriptions) {
134616
            var subscriptionIndex = subscriptions.indexOf(subscription);
134617
            if (subscriptionIndex !== -1) {
134618
                subscriptions.splice(subscriptionIndex, 1);
134619
            }
134620
        }
134621
    };
134622
    /** @internal */
134623
    Subscription.prototype._addParent = function (parent) {
134624
        var _a = this, _parent = _a._parent, _parents = _a._parents;
134625
        if (!_parent || _parent === parent) {
134626
            // If we don't have a parent, or the new parent is the same as the
134627
            // current parent, then set this._parent to the new parent.
134628
            this._parent = parent;
134629
        }
134630
        else if (!_parents) {
134631
            // If there's already one parent, but not multiple, allocate an Array to
134632
            // store the rest of the parent Subscriptions.
134633
            this._parents = [parent];
134634
        }
134635
        else if (_parents.indexOf(parent) === -1) {
134636
            // Only add the new parent to the _parents list if it's not already there.
134637
            _parents.push(parent);
134638
        }
134639
    };
134640
    /** @nocollapse */
134641
    Subscription.EMPTY = (function (empty) {
134642
        empty.closed = true;
134643
        return empty;
134644
    }(new Subscription()));
134645
    return Subscription;
134646
}());
134647
 
134648
function flattenUnsubscriptionErrors(errors) {
134649
    return errors.reduce(function (errs, err) { return errs.concat((err instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_5__["UnsubscriptionError"]) ? err.errors : err); }, []);
134650
}
134651
//# sourceMappingURL=Subscription.js.map
134652
 
134653
 
134654
/***/ }),
134655
 
134656
/***/ "./node_modules/rxjs/_esm5/internal/config.js":
134657
/*!****************************************************!*\
134658
  !*** ./node_modules/rxjs/_esm5/internal/config.js ***!
134659
  \****************************************************/
134660
/*! exports provided: config */
134661
/***/ (function(module, __webpack_exports__, __webpack_require__) {
134662
 
134663
"use strict";
134664
__webpack_require__.r(__webpack_exports__);
134665
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "config", function() { return config; });
134666
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
134667
var _enable_super_gross_mode_that_will_cause_bad_things = false;
134668
/**
134669
 * The global configuration object for RxJS, used to configure things
134670
 * like what Promise contructor should used to create Promises
134671
 */
134672
var config = {
134673
    /**
134674
     * The promise constructor used by default for methods such as
134675
     * {@link toPromise} and {@link forEach}
134676
     */
134677
    Promise: undefined,
134678
    /**
134679
     * If true, turns on synchronous error rethrowing, which is a deprecated behavior
134680
     * in v6 and higher. This behavior enables bad patterns like wrapping a subscribe
134681
     * call in a try/catch block. It also enables producer interference, a nasty bug
134682
     * where a multicast can be broken for all observers by a downstream consumer with
134683
     * an unhandled error. DO NOT USE THIS FLAG UNLESS IT'S NEEDED TO BY TIME
134684
     * FOR MIGRATION REASONS.
134685
     */
134686
    set useDeprecatedSynchronousErrorHandling(value) {
134687
        if (value) {
134688
            var error = /*@__PURE__*/ new Error();
134689
            /*@__PURE__*/ console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n' + error.stack);
134690
        }
134691
        else if (_enable_super_gross_mode_that_will_cause_bad_things) {
134692
            /*@__PURE__*/ console.log('RxJS: Back to a better error behavior. Thank you. <3');
134693
        }
134694
        _enable_super_gross_mode_that_will_cause_bad_things = value;
134695
    },
134696
    get useDeprecatedSynchronousErrorHandling() {
134697
        return _enable_super_gross_mode_that_will_cause_bad_things;
134698
    },
134699
};
134700
//# sourceMappingURL=config.js.map
134701
 
134702
 
134703
/***/ }),
134704
 
134705
/***/ "./node_modules/rxjs/_esm5/internal/observable/ConnectableObservable.js":
134706
/*!******************************************************************************!*\
134707
  !*** ./node_modules/rxjs/_esm5/internal/observable/ConnectableObservable.js ***!
134708
  \******************************************************************************/
134709
/*! exports provided: ConnectableObservable, connectableObservableDescriptor */
134710
/***/ (function(module, __webpack_exports__, __webpack_require__) {
134711
 
134712
"use strict";
134713
__webpack_require__.r(__webpack_exports__);
134714
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return ConnectableObservable; });
134715
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "connectableObservableDescriptor", function() { return connectableObservableDescriptor; });
134716
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
134717
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
134718
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
134719
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
134720
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
134721
/* harmony import */ var _operators_refCount__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../operators/refCount */ "./node_modules/rxjs/_esm5/internal/operators/refCount.js");
134722
/** PURE_IMPORTS_START tslib,_Subject,_Observable,_Subscriber,_Subscription,_operators_refCount PURE_IMPORTS_END */
134723
 
134724
 
134725
 
134726
 
134727
 
134728
 
134729
/**
134730
 * @class ConnectableObservable<T>
134731
 */
134732
var ConnectableObservable = /*@__PURE__*/ (function (_super) {
134733
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ConnectableObservable, _super);
134734
    function ConnectableObservable(source, subjectFactory) {
134735
        var _this = _super.call(this) || this;
134736
        _this.source = source;
134737
        _this.subjectFactory = subjectFactory;
134738
        _this._refCount = 0;
134739
        /** @internal */
134740
        _this._isComplete = false;
134741
        return _this;
134742
    }
134743
    /** @deprecated This is an internal implementation detail, do not use. */
134744
    ConnectableObservable.prototype._subscribe = function (subscriber) {
134745
        return this.getSubject().subscribe(subscriber);
134746
    };
134747
    ConnectableObservable.prototype.getSubject = function () {
134748
        var subject = this._subject;
134749
        if (!subject || subject.isStopped) {
134750
            this._subject = this.subjectFactory();
134751
        }
134752
        return this._subject;
134753
    };
134754
    ConnectableObservable.prototype.connect = function () {
134755
        var connection = this._connection;
134756
        if (!connection) {
134757
            this._isComplete = false;
134758
            connection = this._connection = new _Subscription__WEBPACK_IMPORTED_MODULE_4__["Subscription"]();
134759
            connection.add(this.source
134760
                .subscribe(new ConnectableSubscriber(this.getSubject(), this)));
134761
            if (connection.closed) {
134762
                this._connection = null;
134763
                connection = _Subscription__WEBPACK_IMPORTED_MODULE_4__["Subscription"].EMPTY;
134764
            }
134765
            else {
134766
                this._connection = connection;
134767
            }
134768
        }
134769
        return connection;
134770
    };
134771
    ConnectableObservable.prototype.refCount = function () {
134772
        return Object(_operators_refCount__WEBPACK_IMPORTED_MODULE_5__["refCount"])()(this);
134773
    };
134774
    return ConnectableObservable;
134775
}(_Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]));
134776
 
134777
var connectableProto = ConnectableObservable.prototype;
134778
var connectableObservableDescriptor = {
134779
    operator: { value: null },
134780
    _refCount: { value: 0, writable: true },
134781
    _subject: { value: null, writable: true },
134782
    _connection: { value: null, writable: true },
134783
    _subscribe: { value: connectableProto._subscribe },
134784
    _isComplete: { value: connectableProto._isComplete, writable: true },
134785
    getSubject: { value: connectableProto.getSubject },
134786
    connect: { value: connectableProto.connect },
134787
    refCount: { value: connectableProto.refCount }
134788
};
134789
var ConnectableSubscriber = /*@__PURE__*/ (function (_super) {
134790
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ConnectableSubscriber, _super);
134791
    function ConnectableSubscriber(destination, connectable) {
134792
        var _this = _super.call(this, destination) || this;
134793
        _this.connectable = connectable;
134794
        return _this;
134795
    }
134796
    ConnectableSubscriber.prototype._error = function (err) {
134797
        this._unsubscribe();
134798
        _super.prototype._error.call(this, err);
134799
    };
134800
    ConnectableSubscriber.prototype._complete = function () {
134801
        this.connectable._isComplete = true;
134802
        this._unsubscribe();
134803
        _super.prototype._complete.call(this);
134804
    };
134805
    ConnectableSubscriber.prototype._unsubscribe = function () {
134806
        var connectable = this.connectable;
134807
        if (connectable) {
134808
            this.connectable = null;
134809
            var connection = connectable._connection;
134810
            connectable._refCount = 0;
134811
            connectable._subject = null;
134812
            connectable._connection = null;
134813
            if (connection) {
134814
                connection.unsubscribe();
134815
            }
134816
        }
134817
    };
134818
    return ConnectableSubscriber;
134819
}(_Subject__WEBPACK_IMPORTED_MODULE_1__["SubjectSubscriber"]));
134820
var RefCountOperator = /*@__PURE__*/ (function () {
134821
    function RefCountOperator(connectable) {
134822
        this.connectable = connectable;
134823
    }
134824
    RefCountOperator.prototype.call = function (subscriber, source) {
134825
        var connectable = this.connectable;
134826
        connectable._refCount++;
134827
        var refCounter = new RefCountSubscriber(subscriber, connectable);
134828
        var subscription = source.subscribe(refCounter);
134829
        if (!refCounter.closed) {
134830
            refCounter.connection = connectable.connect();
134831
        }
134832
        return subscription;
134833
    };
134834
    return RefCountOperator;
134835
}());
134836
var RefCountSubscriber = /*@__PURE__*/ (function (_super) {
134837
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RefCountSubscriber, _super);
134838
    function RefCountSubscriber(destination, connectable) {
134839
        var _this = _super.call(this, destination) || this;
134840
        _this.connectable = connectable;
134841
        return _this;
134842
    }
134843
    RefCountSubscriber.prototype._unsubscribe = function () {
134844
        var connectable = this.connectable;
134845
        if (!connectable) {
134846
            this.connection = null;
134847
            return;
134848
        }
134849
        this.connectable = null;
134850
        var refCount = connectable._refCount;
134851
        if (refCount <= 0) {
134852
            this.connection = null;
134853
            return;
134854
        }
134855
        connectable._refCount = refCount - 1;
134856
        if (refCount > 1) {
134857
            this.connection = null;
134858
            return;
134859
        }
134860
        ///
134861
        // Compare the local RefCountSubscriber's connection Subscription to the
134862
        // connection Subscription on the shared ConnectableObservable. In cases
134863
        // where the ConnectableObservable source synchronously emits values, and
134864
        // the RefCountSubscriber's downstream Observers synchronously unsubscribe,
134865
        // execution continues to here before the RefCountOperator has a chance to
134866
        // supply the RefCountSubscriber with the shared connection Subscription.
134867
        // For example:
134868
        // ```
134869
        // Observable.range(0, 10)
134870
        //   .publish()
134871
        //   .refCount()
134872
        //   .take(5)
134873
        //   .subscribe();
134874
        // ```
134875
        // In order to account for this case, RefCountSubscriber should only dispose
134876
        // the ConnectableObservable's shared connection Subscription if the
134877
        // connection Subscription exists, *and* either:
134878
        //   a. RefCountSubscriber doesn't have a reference to the shared connection
134879
        //      Subscription yet, or,
134880
        //   b. RefCountSubscriber's connection Subscription reference is identical
134881
        //      to the shared connection Subscription
134882
        ///
134883
        var connection = this.connection;
134884
        var sharedConnection = connectable._connection;
134885
        this.connection = null;
134886
        if (sharedConnection && (!connection || sharedConnection === connection)) {
134887
            sharedConnection.unsubscribe();
134888
        }
134889
    };
134890
    return RefCountSubscriber;
134891
}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
134892
//# sourceMappingURL=ConnectableObservable.js.map
134893
 
134894
 
134895
/***/ }),
134896
 
134897
/***/ "./node_modules/rxjs/_esm5/internal/observable/SubscribeOnObservable.js":
134898
/*!******************************************************************************!*\
134899
  !*** ./node_modules/rxjs/_esm5/internal/observable/SubscribeOnObservable.js ***!
134900
  \******************************************************************************/
134901
/*! exports provided: SubscribeOnObservable */
134902
/***/ (function(module, __webpack_exports__, __webpack_require__) {
134903
 
134904
"use strict";
134905
__webpack_require__.r(__webpack_exports__);
134906
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubscribeOnObservable", function() { return SubscribeOnObservable; });
134907
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
134908
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
134909
/* harmony import */ var _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../scheduler/asap */ "./node_modules/rxjs/_esm5/internal/scheduler/asap.js");
134910
/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/isNumeric */ "./node_modules/rxjs/_esm5/internal/util/isNumeric.js");
134911
/** PURE_IMPORTS_START tslib,_Observable,_scheduler_asap,_util_isNumeric PURE_IMPORTS_END */
134912
 
134913
 
134914
 
134915
 
134916
/**
134917
 * We need this JSDoc comment for affecting ESDoc.
134918
 * @extends {Ignored}
134919
 * @hide true
134920
 */
134921
var SubscribeOnObservable = /*@__PURE__*/ (function (_super) {
134922
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscribeOnObservable, _super);
134923
    function SubscribeOnObservable(source, delayTime, scheduler) {
134924
        if (delayTime === void 0) {
134925
            delayTime = 0;
134926
        }
134927
        if (scheduler === void 0) {
134928
            scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
134929
        }
134930
        var _this = _super.call(this) || this;
134931
        _this.source = source;
134932
        _this.delayTime = delayTime;
134933
        _this.scheduler = scheduler;
134934
        if (!Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_3__["isNumeric"])(delayTime) || delayTime < 0) {
134935
            _this.delayTime = 0;
134936
        }
134937
        if (!scheduler || typeof scheduler.schedule !== 'function') {
134938
            _this.scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
134939
        }
134940
        return _this;
134941
    }
134942
    /** @nocollapse */
134943
    SubscribeOnObservable.create = function (source, delay, scheduler) {
134944
        if (delay === void 0) {
134945
            delay = 0;
134946
        }
134947
        if (scheduler === void 0) {
134948
            scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
134949
        }
134950
        return new SubscribeOnObservable(source, delay, scheduler);
134951
    };
134952
    /** @nocollapse */
134953
    SubscribeOnObservable.dispatch = function (arg) {
134954
        var source = arg.source, subscriber = arg.subscriber;
134955
        return this.add(source.subscribe(subscriber));
134956
    };
134957
    /** @deprecated This is an internal implementation detail, do not use. */
134958
    SubscribeOnObservable.prototype._subscribe = function (subscriber) {
134959
        var delay = this.delayTime;
134960
        var source = this.source;
134961
        var scheduler = this.scheduler;
134962
        return scheduler.schedule(SubscribeOnObservable.dispatch, delay, {
134963
            source: source, subscriber: subscriber
134964
        });
134965
    };
134966
    return SubscribeOnObservable;
134967
}(_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]));
134968
 
134969
//# sourceMappingURL=SubscribeOnObservable.js.map
134970
 
134971
 
134972
/***/ }),
134973
 
134974
/***/ "./node_modules/rxjs/_esm5/internal/observable/bindCallback.js":
134975
/*!*********************************************************************!*\
134976
  !*** ./node_modules/rxjs/_esm5/internal/observable/bindCallback.js ***!
134977
  \*********************************************************************/
134978
/*! exports provided: bindCallback */
134979
/***/ (function(module, __webpack_exports__, __webpack_require__) {
134980
 
134981
"use strict";
134982
__webpack_require__.r(__webpack_exports__);
134983
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return bindCallback; });
134984
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
134985
/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../AsyncSubject */ "./node_modules/rxjs/_esm5/internal/AsyncSubject.js");
134986
/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../operators/map */ "./node_modules/rxjs/_esm5/internal/operators/map.js");
134987
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/isArray */ "./node_modules/rxjs/_esm5/internal/util/isArray.js");
134988
/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/isScheduler */ "./node_modules/rxjs/_esm5/internal/util/isScheduler.js");
134989
/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_isArray,_util_isScheduler PURE_IMPORTS_END */
134990
 
134991
 
134992
 
134993
 
134994
 
134995
// tslint:enable:max-line-length
134996
/**
134997
 * Converts a callback API to a function that returns an Observable.
134998
 *
134999
 * <span class="informal">Give it a function `f` of type `f(x, callback)` and
135000
 * it will return a function `g` that when called as `g(x)` will output an
135001
 * Observable.</span>
135002
 *
135003
 * `bindCallback` is not an operator because its input and output are not
135004
 * Observables. The input is a function `func` with some parameters, the
135005
 * last parameter must be a callback function that `func` calls when it is
135006
 * done.
135007
 *
135008
 * The output of `bindCallback` is a function that takes the same parameters
135009
 * as `func`, except the last one (the callback). When the output function
135010
 * is called with arguments it will return an Observable. If function `func`
135011
 * calls its callback with one argument the Observable will emit that value.
135012
 * If on the other hand the callback is called with multiple values the resulting
135013
 * Observable will emit an array with said values as arguments.
135014
 *
135015
 * It is very important to remember that input function `func` is not called
135016
 * when the output function is, but rather when the Observable returned by the output
135017
 * function is subscribed. This means if `func` makes an AJAX request, that request
135018
 * will be made every time someone subscribes to the resulting Observable, but not before.
135019
 *
135020
 * The last optional parameter - {@link Scheduler} - can be used to control when the call
135021
 * to `func` happens after someone subscribes to Observable, as well as when results
135022
 * passed to callback will be emitted. By default, the subscription to  an Observable calls `func`
135023
 * synchronously, but using `Scheduler.async` as the last parameter will defer the call to `func`,
135024
 * just like wrapping the call in `setTimeout` with a timeout of `0` would. If you use the async Scheduler
135025
 * and call `subscribe` on the output Observable all function calls that are currently executing
135026
 * will end before `func` is invoked.
135027
 *
135028
 * By default results passed to the callback are emitted immediately after `func` invokes the callback.
135029
 * In particular, if the callback is called synchronously the subscription of the resulting Observable
135030
 * will call the `next` function synchronously as well.  If you want to defer that call,
135031
 * you may use `Scheduler.async` just as before.  This means that by using `Scheduler.async` you can
135032
 * ensure that `func` always calls its callback asynchronously, thus avoiding terrifying Zalgo.
135033
 *
135034
 * Note that the Observable created by the output function will always emit a single value
135035
 * and then complete immediately. If `func` calls the callback multiple times, values from subsequent
135036
 * calls will not appear in the stream. If you need to listen for multiple calls,
135037
 *  you probably want to use {@link fromEvent} or {@link fromEventPattern} instead.
135038
 *
135039
 * If `func` depends on some context (`this` property) and is not already bound the context of `func`
135040
 * will be the context that the output function has at call time. In particular, if `func`
135041
 * is called as a method of some objec and if `func` is not already bound, in order to preserve the context
135042
 * it is recommended that the context of the output function is set to that object as well.
135043
 *
135044
 * If the input function calls its callback in the "node style" (i.e. first argument to callback is
135045
 * optional error parameter signaling whether the call failed or not), {@link bindNodeCallback}
135046
 * provides convenient error handling and probably is a better choice.
135047
 * `bindCallback` will treat such functions the same as any other and error parameters
135048
 * (whether passed or not) will always be interpreted as regular callback argument.
135049
 *
135050
 *
135051
 * @example <caption>Convert jQuery's getJSON to an Observable API</caption>
135052
 * // Suppose we have jQuery.getJSON('/my/url', callback)
135053
 * var getJSONAsObservable = bindCallback(jQuery.getJSON);
135054
 * var result = getJSONAsObservable('/my/url');
135055
 * result.subscribe(x => console.log(x), e => console.error(e));
135056
 *
135057
 *
135058
 * @example <caption>Receive an array of arguments passed to a callback</caption>
135059
 * someFunction((a, b, c) => {
135060
 *   console.log(a); // 5
135061
 *   console.log(b); // 'some string'
135062
 *   console.log(c); // {someProperty: 'someValue'}
135063
 * });
135064
 *
135065
 * const boundSomeFunction = bindCallback(someFunction);
135066
 * boundSomeFunction().subscribe(values => {
135067
 *   console.log(values) // [5, 'some string', {someProperty: 'someValue'}]
135068
 * });
135069
 *
135070
 *
135071
 * @example <caption>Compare behaviour with and without async Scheduler</caption>
135072
 * function iCallMyCallbackSynchronously(cb) {
135073
 *   cb();
135074
 * }
135075
 *
135076
 * const boundSyncFn = bindCallback(iCallMyCallbackSynchronously);
135077
 * const boundAsyncFn = bindCallback(iCallMyCallbackSynchronously, null, Rx.Scheduler.async);
135078
 *
135079
 * boundSyncFn().subscribe(() => console.log('I was sync!'));
135080
 * boundAsyncFn().subscribe(() => console.log('I was async!'));
135081
 * console.log('This happened...');
135082
 *
135083
 * // Logs:
135084
 * // I was sync!
135085
 * // This happened...
135086
 * // I was async!
135087
 *
135088
 *
135089
 * @example <caption>Use bindCallback on an object method</caption>
135090
 * const boundMethod = bindCallback(someObject.methodWithCallback);
135091
 * boundMethod.call(someObject) // make sure methodWithCallback has access to someObject
135092
 * .subscribe(subscriber);
135093
 *
135094
 *
135095
 * @see {@link bindNodeCallback}
135096
 * @see {@link from}
135097
 * @see {@link fromPromise}
135098
 *
135099
 * @param {function} func A function with a callback as the last parameter.
135100
 * @param {Scheduler} [scheduler] The scheduler on which to schedule the
135101
 * callbacks.
135102
 * @return {function(...params: *): Observable} A function which returns the
135103
 * Observable that delivers the same values the callback would deliver.
135104
 * @name bindCallback
135105
 */
135106
function bindCallback(callbackFunc, resultSelector, scheduler) {
135107
    if (resultSelector) {
135108
        if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(resultSelector)) {
135109
            scheduler = resultSelector;
135110
        }
135111
        else {
135112
            // DEPRECATED PATH
135113
            return function () {
135114
                var args = [];
135115
                for (var _i = 0; _i < arguments.length; _i++) {
135116
                    args[_i] = arguments[_i];
135117
                }
135118
                return bindCallback(callbackFunc, scheduler).apply(void 0, args).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])(function (args) { return Object(_util_isArray__WEBPACK_IMPORTED_MODULE_3__["isArray"])(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
135119
            };
135120
        }
135121
    }
135122
    return function () {
135123
        var args = [];
135124
        for (var _i = 0; _i < arguments.length; _i++) {
135125
            args[_i] = arguments[_i];
135126
        }
135127
        var context = this;
135128
        var subject;
135129
        var params = {
135130
            context: context,
135131
            subject: subject,
135132
            callbackFunc: callbackFunc,
135133
            scheduler: scheduler,
135134
        };
135135
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
135136
            if (!scheduler) {
135137
                if (!subject) {
135138
                    subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
135139
                    var handler = function () {
135140
                        var innerArgs = [];
135141
                        for (var _i = 0; _i < arguments.length; _i++) {
135142
                            innerArgs[_i] = arguments[_i];
135143
                        }
135144
                        subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
135145
                        subject.complete();
135146
                    };
135147
                    try {
135148
                        callbackFunc.apply(context, args.concat([handler]));
135149
                    }
135150
                    catch (err) {
135151
                        subject.error(err);
135152
                    }
135153
                }
135154
                return subject.subscribe(subscriber);
135155
            }
135156
            else {
135157
                var state = {
135158
                    args: args, subscriber: subscriber, params: params,
135159
                };
135160
                return scheduler.schedule(dispatch, 0, state);
135161
            }
135162
        });
135163
    };
135164
}
135165
function dispatch(state) {
135166
    var _this = this;
135167
    var self = this;
135168
    var args = state.args, subscriber = state.subscriber, params = state.params;
135169
    var callbackFunc = params.callbackFunc, context = params.context, scheduler = params.scheduler;
135170
    var subject = params.subject;
135171
    if (!subject) {
135172
        subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
135173
        var handler = function () {
135174
            var innerArgs = [];
135175
            for (var _i = 0; _i < arguments.length; _i++) {
135176
                innerArgs[_i] = arguments[_i];
135177
            }
135178
            var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
135179
            _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
135180
        };
135181
        try {
135182
            callbackFunc.apply(context, args.concat([handler]));
135183
        }
135184
        catch (err) {
135185
            subject.error(err);
135186
        }
135187
    }
135188
    this.add(subject.subscribe(subscriber));
135189
}
135190
function dispatchNext(state) {
135191
    var value = state.value, subject = state.subject;
135192
    subject.next(value);
135193
    subject.complete();
135194
}
135195
function dispatchError(state) {
135196
    var err = state.err, subject = state.subject;
135197
    subject.error(err);
135198
}
135199
//# sourceMappingURL=bindCallback.js.map
135200
 
135201
 
135202
/***/ }),
135203
 
135204
/***/ "./node_modules/rxjs/_esm5/internal/observable/bindNodeCallback.js":
135205
/*!*************************************************************************!*\
135206
  !*** ./node_modules/rxjs/_esm5/internal/observable/bindNodeCallback.js ***!
135207
  \*************************************************************************/
135208
/*! exports provided: bindNodeCallback */
135209
/***/ (function(module, __webpack_exports__, __webpack_require__) {
135210
 
135211
"use strict";
135212
__webpack_require__.r(__webpack_exports__);
135213
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return bindNodeCallback; });
135214
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
135215
/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../AsyncSubject */ "./node_modules/rxjs/_esm5/internal/AsyncSubject.js");
135216
/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../operators/map */ "./node_modules/rxjs/_esm5/internal/operators/map.js");
135217
/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/isScheduler */ "./node_modules/rxjs/_esm5/internal/util/isScheduler.js");
135218
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/isArray */ "./node_modules/rxjs/_esm5/internal/util/isArray.js");
135219
/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_isScheduler,_util_isArray PURE_IMPORTS_END */
135220
 
135221
 
135222
 
135223
 
135224
 
135225
/**
135226
 * Converts a Node.js-style callback API to a function that returns an
135227
 * Observable.
135228
 *
135229
 * <span class="informal">It's just like {@link bindCallback}, but the
135230
 * callback is expected to be of type `callback(error, result)`.</span>
135231
 *
135232
 * `bindNodeCallback` is not an operator because its input and output are not
135233
 * Observables. The input is a function `func` with some parameters, but the
135234
 * last parameter must be a callback function that `func` calls when it is
135235
 * done. The callback function is expected to follow Node.js conventions,
135236
 * where the first argument to the callback is an error object, signaling
135237
 * whether call was successful. If that object is passed to callback, it means
135238
 * something went wrong.
135239
 *
135240
 * The output of `bindNodeCallback` is a function that takes the same
135241
 * parameters as `func`, except the last one (the callback). When the output
135242
 * function is called with arguments, it will return an Observable.
135243
 * If `func` calls its callback with error parameter present, Observable will
135244
 * error with that value as well. If error parameter is not passed, Observable will emit
135245
 * second parameter. If there are more parameters (third and so on),
135246
 * Observable will emit an array with all arguments, except first error argument.
135247
 *
135248
 * Note that `func` will not be called at the same time output function is,
135249
 * but rather whenever resulting Observable is subscribed. By default call to
135250
 * `func` will happen synchronously after subscription, but that can be changed
135251
 * with proper {@link Scheduler} provided as optional third parameter. Scheduler
135252
 * can also control when values from callback will be emitted by Observable.
135253
 * To find out more, check out documentation for {@link bindCallback}, where
135254
 * Scheduler works exactly the same.
135255
 *
135256
 * As in {@link bindCallback}, context (`this` property) of input function will be set to context
135257
 * of returned function, when it is called.
135258
 *
135259
 * After Observable emits value, it will complete immediately. This means
135260
 * even if `func` calls callback again, values from second and consecutive
135261
 * calls will never appear on the stream. If you need to handle functions
135262
 * that call callbacks multiple times, check out {@link fromEvent} or
135263
 * {@link fromEventPattern} instead.
135264
 *
135265
 * Note that `bindNodeCallback` can be used in non-Node.js environments as well.
135266
 * "Node.js-style" callbacks are just a convention, so if you write for
135267
 * browsers or any other environment and API you use implements that callback style,
135268
 * `bindNodeCallback` can be safely used on that API functions as well.
135269
 *
135270
 * Remember that Error object passed to callback does not have to be an instance
135271
 * of JavaScript built-in `Error` object. In fact, it does not even have to an object.
135272
 * Error parameter of callback function is interpreted as "present", when value
135273
 * of that parameter is truthy. It could be, for example, non-zero number, non-empty
135274
 * string or boolean `true`. In all of these cases resulting Observable would error
135275
 * with that value. This means usually regular style callbacks will fail very often when
135276
 * `bindNodeCallback` is used. If your Observable errors much more often then you
135277
 * would expect, check if callback really is called in Node.js-style and, if not,
135278
 * switch to {@link bindCallback} instead.
135279
 *
135280
 * Note that even if error parameter is technically present in callback, but its value
135281
 * is falsy, it still won't appear in array emitted by Observable.
135282
 *
135283
 *
135284
 * @example <caption>Read a file from the filesystem and get the data as an Observable</caption>
135285
 * import * as fs from 'fs';
135286
 * var readFileAsObservable = bindNodeCallback(fs.readFile);
135287
 * var result = readFileAsObservable('./roadNames.txt', 'utf8');
135288
 * result.subscribe(x => console.log(x), e => console.error(e));
135289
 *
135290
 *
135291
 * @example <caption>Use on function calling callback with multiple arguments</caption>
135292
 * someFunction((err, a, b) => {
135293
 *   console.log(err); // null
135294
 *   console.log(a); // 5
135295
 *   console.log(b); // "some string"
135296
 * });
135297
 * var boundSomeFunction = bindNodeCallback(someFunction);
135298
 * boundSomeFunction()
135299
 * .subscribe(value => {
135300
 *   console.log(value); // [5, "some string"]
135301
 * });
135302
 *
135303
 * @example <caption>Use on function calling callback in regular style</caption>
135304
 * someFunction(a => {
135305
 *   console.log(a); // 5
135306
 * });
135307
 * var boundSomeFunction = bindNodeCallback(someFunction);
135308
 * boundSomeFunction()
135309
 * .subscribe(
135310
 *   value => {}             // never gets called
135311
 *   err => console.log(err) // 5
135312
 * );
135313
 *
135314
 *
135315
 * @see {@link bindCallback}
135316
 * @see {@link from}
135317
 * @see {@link fromPromise}
135318
 *
135319
 * @param {function} func Function with a Node.js-style callback as the last parameter.
135320
 * @param {Scheduler} [scheduler] The scheduler on which to schedule the
135321
 * callbacks.
135322
 * @return {function(...params: *): Observable} A function which returns the
135323
 * Observable that delivers the same values the Node.js callback would
135324
 * deliver.
135325
 * @name bindNodeCallback
135326
 */
135327
function bindNodeCallback(callbackFunc, resultSelector, scheduler) {
135328
    if (resultSelector) {
135329
        if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(resultSelector)) {
135330
            scheduler = resultSelector;
135331
        }
135332
        else {
135333
            // DEPRECATED PATH
135334
            return function () {
135335
                var args = [];
135336
                for (var _i = 0; _i < arguments.length; _i++) {
135337
                    args[_i] = arguments[_i];
135338
                }
135339
                return bindNodeCallback(callbackFunc, scheduler).apply(void 0, args).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])(function (args) { return Object(_util_isArray__WEBPACK_IMPORTED_MODULE_4__["isArray"])(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
135340
            };
135341
        }
135342
    }
135343
    return function () {
135344
        var args = [];
135345
        for (var _i = 0; _i < arguments.length; _i++) {
135346
            args[_i] = arguments[_i];
135347
        }
135348
        var params = {
135349
            subject: undefined,
135350
            args: args,
135351
            callbackFunc: callbackFunc,
135352
            scheduler: scheduler,
135353
            context: this,
135354
        };
135355
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
135356
            var context = params.context;
135357
            var subject = params.subject;
135358
            if (!scheduler) {
135359
                if (!subject) {
135360
                    subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
135361
                    var handler = function () {
135362
                        var innerArgs = [];
135363
                        for (var _i = 0; _i < arguments.length; _i++) {
135364
                            innerArgs[_i] = arguments[_i];
135365
                        }
135366
                        var err = innerArgs.shift();
135367
                        if (err) {
135368
                            subject.error(err);
135369
                            return;
135370
                        }
135371
                        subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
135372
                        subject.complete();
135373
                    };
135374
                    try {
135375
                        callbackFunc.apply(context, args.concat([handler]));
135376
                    }
135377
                    catch (err) {
135378
                        subject.error(err);
135379
                    }
135380
                }
135381
                return subject.subscribe(subscriber);
135382
            }
135383
            else {
135384
                return scheduler.schedule(dispatch, 0, { params: params, subscriber: subscriber, context: context });
135385
            }
135386
        });
135387
    };
135388
}
135389
function dispatch(state) {
135390
    var _this = this;
135391
    var params = state.params, subscriber = state.subscriber, context = state.context;
135392
    var callbackFunc = params.callbackFunc, args = params.args, scheduler = params.scheduler;
135393
    var subject = params.subject;
135394
    if (!subject) {
135395
        subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
135396
        var handler = function () {
135397
            var innerArgs = [];
135398
            for (var _i = 0; _i < arguments.length; _i++) {
135399
                innerArgs[_i] = arguments[_i];
135400
            }
135401
            var err = innerArgs.shift();
135402
            if (err) {
135403
                _this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));
135404
            }
135405
            else {
135406
                var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
135407
                _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
135408
            }
135409
        };
135410
        try {
135411
            callbackFunc.apply(context, args.concat([handler]));
135412
        }
135413
        catch (err) {
135414
            this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));
135415
        }
135416
    }
135417
    this.add(subject.subscribe(subscriber));
135418
}
135419
function dispatchNext(arg) {
135420
    var value = arg.value, subject = arg.subject;
135421
    subject.next(value);
135422
    subject.complete();
135423
}
135424
function dispatchError(arg) {
135425
    var err = arg.err, subject = arg.subject;
135426
    subject.error(err);
135427
}
135428
//# sourceMappingURL=bindNodeCallback.js.map
135429
 
135430
 
135431
/***/ }),
135432
 
135433
/***/ "./node_modules/rxjs/_esm5/internal/observable/combineLatest.js":
135434
/*!**********************************************************************!*\
135435
  !*** ./node_modules/rxjs/_esm5/internal/observable/combineLatest.js ***!
135436
  \**********************************************************************/
135437
/*! exports provided: combineLatest, CombineLatestOperator, CombineLatestSubscriber */
135438
/***/ (function(module, __webpack_exports__, __webpack_require__) {
135439
 
135440
"use strict";
135441
__webpack_require__.r(__webpack_exports__);
135442
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return combineLatest; });
135443
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CombineLatestOperator", function() { return CombineLatestOperator; });
135444
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CombineLatestSubscriber", function() { return CombineLatestSubscriber; });
135445
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
135446
/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isScheduler */ "./node_modules/rxjs/_esm5/internal/util/isScheduler.js");
135447
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isArray */ "./node_modules/rxjs/_esm5/internal/util/isArray.js");
135448
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
135449
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
135450
/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./fromArray */ "./node_modules/rxjs/_esm5/internal/observable/fromArray.js");
135451
/** PURE_IMPORTS_START tslib,_util_isScheduler,_util_isArray,_OuterSubscriber,_util_subscribeToResult,_fromArray PURE_IMPORTS_END */
135452
 
135453
 
135454
 
135455
 
135456
 
135457
 
135458
var NONE = {};
135459
/* tslint:enable:max-line-length */
135460
/**
135461
 * Combines multiple Observables to create an Observable whose values are
135462
 * calculated from the latest values of each of its input Observables.
135463
 *
135464
 * <span class="informal">Whenever any input Observable emits a value, it
135465
 * computes a formula using the latest values from all the inputs, then emits
135466
 * the output of that formula.</span>
135467
 *
135468
 * <img src="./img/combineLatest.png" width="100%">
135469
 *
135470
 * `combineLatest` combines the values from all the Observables passed as
135471
 * arguments. This is done by subscribing to each Observable in order and,
135472
 * whenever any Observable emits, collecting an array of the most recent
135473
 * values from each Observable. So if you pass `n` Observables to operator,
135474
 * returned Observable will always emit an array of `n` values, in order
135475
 * corresponding to order of passed Observables (value from the first Observable
135476
 * on the first place and so on).
135477
 *
135478
 * Static version of `combineLatest` accepts either an array of Observables
135479
 * or each Observable can be put directly as an argument. Note that array of
135480
 * Observables is good choice, if you don't know beforehand how many Observables
135481
 * you will combine. Passing empty array will result in Observable that
135482
 * completes immediately.
135483
 *
135484
 * To ensure output array has always the same length, `combineLatest` will
135485
 * actually wait for all input Observables to emit at least once,
135486
 * before it starts emitting results. This means if some Observable emits
135487
 * values before other Observables started emitting, all that values but last
135488
 * will be lost. On the other hand, is some Observable does not emit value but
135489
 * completes, resulting Observable will complete at the same moment without
135490
 * emitting anything, since it will be now impossible to include value from
135491
 * completed Observable in resulting array. Also, if some input Observable does
135492
 * not emit any value and never completes, `combineLatest` will also never emit
135493
 * and never complete, since, again, it will wait for all streams to emit some
135494
 * value.
135495
 *
135496
 * If at least one Observable was passed to `combineLatest` and all passed Observables
135497
 * emitted something, resulting Observable will complete when all combined
135498
 * streams complete. So even if some Observable completes, result of
135499
 * `combineLatest` will still emit values when other Observables do. In case
135500
 * of completed Observable, its value from now on will always be the last
135501
 * emitted value. On the other hand, if any Observable errors, `combineLatest`
135502
 * will error immediately as well, and all other Observables will be unsubscribed.
135503
 *
135504
 * `combineLatest` accepts as optional parameter `project` function, which takes
135505
 * as arguments all values that would normally be emitted by resulting Observable.
135506
 * `project` can return any kind of value, which will be then emitted by Observable
135507
 * instead of default array. Note that `project` does not take as argument that array
135508
 * of values, but values themselves. That means default `project` can be imagined
135509
 * as function that takes all its arguments and puts them into an array.
135510
 *
135511
 *
135512
 * @example <caption>Combine two timer Observables</caption>
135513
 * const firstTimer = Rx.Observable.timer(0, 1000); // emit 0, 1, 2... after every second, starting from now
135514
 * const secondTimer = Rx.Observable.timer(500, 1000); // emit 0, 1, 2... after every second, starting 0,5s from now
135515
 * const combinedTimers = Rx.Observable.combineLatest(firstTimer, secondTimer);
135516
 * combinedTimers.subscribe(value => console.log(value));
135517
 * // Logs
135518
 * // [0, 0] after 0.5s
135519
 * // [1, 0] after 1s
135520
 * // [1, 1] after 1.5s
135521
 * // [2, 1] after 2s
135522
 *
135523
 *
135524
 * @example <caption>Combine an array of Observables</caption>
135525
 * const observables = [1, 5, 10].map(
135526
 *   n => Rx.Observable.of(n).delay(n * 1000).startWith(0) // emit 0 and then emit n after n seconds
135527
 * );
135528
 * const combined = Rx.Observable.combineLatest(observables);
135529
 * combined.subscribe(value => console.log(value));
135530
 * // Logs
135531
 * // [0, 0, 0] immediately
135532
 * // [1, 0, 0] after 1s
135533
 * // [1, 5, 0] after 5s
135534
 * // [1, 5, 10] after 10s
135535
 *
135536
 *
135537
 * @example <caption>Use project function to dynamically calculate the Body-Mass Index</caption>
135538
 * var weight = Rx.Observable.of(70, 72, 76, 79, 75);
135539
 * var height = Rx.Observable.of(1.76, 1.77, 1.78);
135540
 * var bmi = Rx.Observable.combineLatest(weight, height, (w, h) => w / (h * h));
135541
 * bmi.subscribe(x => console.log('BMI is ' + x));
135542
 *
135543
 * // With output to console:
135544
 * // BMI is 24.212293388429753
135545
 * // BMI is 23.93948099205209
135546
 * // BMI is 23.671253629592222
135547
 *
135548
 *
135549
 * @see {@link combineAll}
135550
 * @see {@link merge}
135551
 * @see {@link withLatestFrom}
135552
 *
135553
 * @param {ObservableInput} observable1 An input Observable to combine with other Observables.
135554
 * @param {ObservableInput} observable2 An input Observable to combine with other Observables.
135555
 * More than one input Observables may be given as arguments
135556
 * or an array of Observables may be given as the first argument.
135557
 * @param {function} [project] An optional function to project the values from
135558
 * the combined latest values into a new value on the output Observable.
135559
 * @param {Scheduler} [scheduler=null] The IScheduler to use for subscribing to
135560
 * each input Observable.
135561
 * @return {Observable} An Observable of projected values from the most recent
135562
 * values from each input Observable, or an array of the most recent values from
135563
 * each input Observable.
135564
 */
135565
function combineLatest() {
135566
    var observables = [];
135567
    for (var _i = 0; _i < arguments.length; _i++) {
135568
        observables[_i] = arguments[_i];
135569
    }
135570
    var resultSelector = null;
135571
    var scheduler = null;
135572
    if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(observables[observables.length - 1])) {
135573
        scheduler = observables.pop();
135574
    }
135575
    if (typeof observables[observables.length - 1] === 'function') {
135576
        resultSelector = observables.pop();
135577
    }
135578
    // if the first and only other argument besides the resultSelector is an array
135579
    // assume it's been called with `combineLatest([obs1, obs2, obs3], resultSelector)`
135580
    if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(observables[0])) {
135581
        observables = observables[0];
135582
    }
135583
    return Object(_fromArray__WEBPACK_IMPORTED_MODULE_5__["fromArray"])(observables, scheduler).lift(new CombineLatestOperator(resultSelector));
135584
}
135585
var CombineLatestOperator = /*@__PURE__*/ (function () {
135586
    function CombineLatestOperator(resultSelector) {
135587
        this.resultSelector = resultSelector;
135588
    }
135589
    CombineLatestOperator.prototype.call = function (subscriber, source) {
135590
        return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector));
135591
    };
135592
    return CombineLatestOperator;
135593
}());
135594
 
135595
/**
135596
 * We need this JSDoc comment for affecting ESDoc.
135597
 * @ignore
135598
 * @extends {Ignored}
135599
 */
135600
var CombineLatestSubscriber = /*@__PURE__*/ (function (_super) {
135601
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CombineLatestSubscriber, _super);
135602
    function CombineLatestSubscriber(destination, resultSelector) {
135603
        var _this = _super.call(this, destination) || this;
135604
        _this.resultSelector = resultSelector;
135605
        _this.active = 0;
135606
        _this.values = [];
135607
        _this.observables = [];
135608
        return _this;
135609
    }
135610
    CombineLatestSubscriber.prototype._next = function (observable) {
135611
        this.values.push(NONE);
135612
        this.observables.push(observable);
135613
    };
135614
    CombineLatestSubscriber.prototype._complete = function () {
135615
        var observables = this.observables;
135616
        var len = observables.length;
135617
        if (len === 0) {
135618
            this.destination.complete();
135619
        }
135620
        else {
135621
            this.active = len;
135622
            this.toRespond = len;
135623
            for (var i = 0; i < len; i++) {
135624
                var observable = observables[i];
135625
                this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, observable, observable, i));
135626
            }
135627
        }
135628
    };
135629
    CombineLatestSubscriber.prototype.notifyComplete = function (unused) {
135630
        if ((this.active -= 1) === 0) {
135631
            this.destination.complete();
135632
        }
135633
    };
135634
    CombineLatestSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
135635
        var values = this.values;
135636
        var oldVal = values[outerIndex];
135637
        var toRespond = !this.toRespond
135638
            ? 0
135639
            : oldVal === NONE ? --this.toRespond : this.toRespond;
135640
        values[outerIndex] = innerValue;
135641
        if (toRespond === 0) {
135642
            if (this.resultSelector) {
135643
                this._tryResultSelector(values);
135644
            }
135645
            else {
135646
                this.destination.next(values.slice());
135647
            }
135648
        }
135649
    };
135650
    CombineLatestSubscriber.prototype._tryResultSelector = function (values) {
135651
        var result;
135652
        try {
135653
            result = this.resultSelector.apply(this, values);
135654
        }
135655
        catch (err) {
135656
            this.destination.error(err);
135657
            return;
135658
        }
135659
        this.destination.next(result);
135660
    };
135661
    return CombineLatestSubscriber;
135662
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
135663
 
135664
//# sourceMappingURL=combineLatest.js.map
135665
 
135666
 
135667
/***/ }),
135668
 
135669
/***/ "./node_modules/rxjs/_esm5/internal/observable/concat.js":
135670
/*!***************************************************************!*\
135671
  !*** ./node_modules/rxjs/_esm5/internal/observable/concat.js ***!
135672
  \***************************************************************/
135673
/*! exports provided: concat */
135674
/***/ (function(module, __webpack_exports__, __webpack_require__) {
135675
 
135676
"use strict";
135677
__webpack_require__.r(__webpack_exports__);
135678
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return concat; });
135679
/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isScheduler */ "./node_modules/rxjs/_esm5/internal/util/isScheduler.js");
135680
/* harmony import */ var _of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./of */ "./node_modules/rxjs/_esm5/internal/observable/of.js");
135681
/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./from */ "./node_modules/rxjs/_esm5/internal/observable/from.js");
135682
/* harmony import */ var _operators_concatAll__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../operators/concatAll */ "./node_modules/rxjs/_esm5/internal/operators/concatAll.js");
135683
/** PURE_IMPORTS_START _util_isScheduler,_of,_from,_operators_concatAll PURE_IMPORTS_END */
135684
 
135685
 
135686
 
135687
 
135688
/* tslint:enable:max-line-length */
135689
/**
135690
 * Creates an output Observable which sequentially emits all values from given
135691
 * Observable and then moves on to the next.
135692
 *
135693
 * <span class="informal">Concatenates multiple Observables together by
135694
 * sequentially emitting their values, one Observable after the other.</span>
135695
 *
135696
 * <img src="./img/concat.png" width="100%">
135697
 *
135698
 * `concat` joins multiple Observables together, by subscribing to them one at a time and
135699
 * merging their results into the output Observable. You can pass either an array of
135700
 * Observables, or put them directly as arguments. Passing an empty array will result
135701
 * in Observable that completes immediately.
135702
 *
135703
 * `concat` will subscribe to first input Observable and emit all its values, without
135704
 * changing or affecting them in any way. When that Observable completes, it will
135705
 * subscribe to then next Observable passed and, again, emit its values. This will be
135706
 * repeated, until the operator runs out of Observables. When last input Observable completes,
135707
 * `concat` will complete as well. At any given moment only one Observable passed to operator
135708
 * emits values. If you would like to emit values from passed Observables concurrently, check out
135709
 * {@link merge} instead, especially with optional `concurrent` parameter. As a matter of fact,
135710
 * `concat` is an equivalent of `merge` operator with `concurrent` parameter set to `1`.
135711
 *
135712
 * Note that if some input Observable never completes, `concat` will also never complete
135713
 * and Observables following the one that did not complete will never be subscribed. On the other
135714
 * hand, if some Observable simply completes immediately after it is subscribed, it will be
135715
 * invisible for `concat`, which will just move on to the next Observable.
135716
 *
135717
 * If any Observable in chain errors, instead of passing control to the next Observable,
135718
 * `concat` will error immediately as well. Observables that would be subscribed after
135719
 * the one that emitted error, never will.
135720
 *
135721
 * If you pass to `concat` the same Observable many times, its stream of values
135722
 * will be "replayed" on every subscription, which means you can repeat given Observable
135723
 * as many times as you like. If passing the same Observable to `concat` 1000 times becomes tedious,
135724
 * you can always use {@link repeat}.
135725
 *
135726
 * @example <caption>Concatenate a timer counting from 0 to 3 with a synchronous sequence from 1 to 10</caption>
135727
 * var timer = Rx.Observable.interval(1000).take(4);
135728
 * var sequence = Rx.Observable.range(1, 10);
135729
 * var result = Rx.Observable.concat(timer, sequence);
135730
 * result.subscribe(x => console.log(x));
135731
 *
135732
 * // results in:
135733
 * // 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3 -immediate-> 1 ... 10
135734
 *
135735
 *
135736
 * @example <caption>Concatenate an array of 3 Observables</caption>
135737
 * var timer1 = Rx.Observable.interval(1000).take(10);
135738
 * var timer2 = Rx.Observable.interval(2000).take(6);
135739
 * var timer3 = Rx.Observable.interval(500).take(10);
135740
 * var result = Rx.Observable.concat([timer1, timer2, timer3]); // note that array is passed
135741
 * result.subscribe(x => console.log(x));
135742
 *
135743
 * // results in the following:
135744
 * // (Prints to console sequentially)
135745
 * // -1000ms-> 0 -1000ms-> 1 -1000ms-> ... 9
135746
 * // -2000ms-> 0 -2000ms-> 1 -2000ms-> ... 5
135747
 * // -500ms-> 0 -500ms-> 1 -500ms-> ... 9
135748
 *
135749
 *
135750
 * @example <caption>Concatenate the same Observable to repeat it</caption>
135751
 * const timer = Rx.Observable.interval(1000).take(2);
135752
 *
135753
 * Rx.Observable.concat(timer, timer) // concating the same Observable!
135754
 * .subscribe(
135755
 *   value => console.log(value),
135756
 *   err => {},
135757
 *   () => console.log('...and it is done!')
135758
 * );
135759
 *
135760
 * // Logs:
135761
 * // 0 after 1s
135762
 * // 1 after 2s
135763
 * // 0 after 3s
135764
 * // 1 after 4s
135765
 * // "...and it is done!" also after 4s
135766
 *
135767
 * @see {@link concatAll}
135768
 * @see {@link concatMap}
135769
 * @see {@link concatMapTo}
135770
 *
135771
 * @param {ObservableInput} input1 An input Observable to concatenate with others.
135772
 * @param {ObservableInput} input2 An input Observable to concatenate with others.
135773
 * More than one input Observables may be given as argument.
135774
 * @param {Scheduler} [scheduler=null] An optional IScheduler to schedule each
135775
 * Observable subscription on.
135776
 * @return {Observable} All values of each passed Observable merged into a
135777
 * single Observable, in order, in serial fashion.
135778
 * @static true
135779
 * @name concat
135780
 * @owner Observable
135781
 */
135782
function concat() {
135783
    var observables = [];
135784
    for (var _i = 0; _i < arguments.length; _i++) {
135785
        observables[_i] = arguments[_i];
135786
    }
135787
    if (observables.length === 1 || (observables.length === 2 && Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__["isScheduler"])(observables[1]))) {
135788
        return Object(_from__WEBPACK_IMPORTED_MODULE_2__["from"])(observables[0]);
135789
    }
135790
    return Object(_operators_concatAll__WEBPACK_IMPORTED_MODULE_3__["concatAll"])()(_of__WEBPACK_IMPORTED_MODULE_1__["of"].apply(void 0, observables));
135791
}
135792
//# sourceMappingURL=concat.js.map
135793
 
135794
 
135795
/***/ }),
135796
 
135797
/***/ "./node_modules/rxjs/_esm5/internal/observable/defer.js":
135798
/*!**************************************************************!*\
135799
  !*** ./node_modules/rxjs/_esm5/internal/observable/defer.js ***!
135800
  \**************************************************************/
135801
/*! exports provided: defer */
135802
/***/ (function(module, __webpack_exports__, __webpack_require__) {
135803
 
135804
"use strict";
135805
__webpack_require__.r(__webpack_exports__);
135806
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return defer; });
135807
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
135808
/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./from */ "./node_modules/rxjs/_esm5/internal/observable/from.js");
135809
/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./empty */ "./node_modules/rxjs/_esm5/internal/observable/empty.js");
135810
/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */
135811
 
135812
 // lol
135813
 
135814
/**
135815
 * Creates an Observable that, on subscribe, calls an Observable factory to
135816
 * make an Observable for each new Observer.
135817
 *
135818
 * <span class="informal">Creates the Observable lazily, that is, only when it
135819
 * is subscribed.
135820
 * </span>
135821
 *
135822
 * <img src="./img/defer.png" width="100%">
135823
 *
135824
 * `defer` allows you to create the Observable only when the Observer
135825
 * subscribes, and create a fresh Observable for each Observer. It waits until
135826
 * an Observer subscribes to it, and then it generates an Observable,
135827
 * typically with an Observable factory function. It does this afresh for each
135828
 * subscriber, so although each subscriber may think it is subscribing to the
135829
 * same Observable, in fact each subscriber gets its own individual
135830
 * Observable.
135831
 *
135832
 * @example <caption>Subscribe to either an Observable of clicks or an Observable of interval, at random</caption>
135833
 * var clicksOrInterval = Rx.Observable.defer(function () {
135834
 *   if (Math.random() > 0.5) {
135835
 *     return Rx.Observable.fromEvent(document, 'click');
135836
 *   } else {
135837
 *     return Rx.Observable.interval(1000);
135838
 *   }
135839
 * });
135840
 * clicksOrInterval.subscribe(x => console.log(x));
135841
 *
135842
 * // Results in the following behavior:
135843
 * // If the result of Math.random() is greater than 0.5 it will listen
135844
 * // for clicks anywhere on the "document"; when document is clicked it
135845
 * // will log a MouseEvent object to the console. If the result is less
135846
 * // than 0.5 it will emit ascending numbers, one every second(1000ms).
135847
 *
135848
 * @see {@link create}
135849
 *
135850
 * @param {function(): SubscribableOrPromise} observableFactory The Observable
135851
 * factory function to invoke for each Observer that subscribes to the output
135852
 * Observable. May also return a Promise, which will be converted on the fly
135853
 * to an Observable.
135854
 * @return {Observable} An Observable whose Observers' subscriptions trigger
135855
 * an invocation of the given Observable factory function.
135856
 * @static true
135857
 * @name defer
135858
 * @owner Observable
135859
 */
135860
function defer(observableFactory) {
135861
    return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
135862
        var input;
135863
        try {
135864
            input = observableFactory();
135865
        }
135866
        catch (err) {
135867
            subscriber.error(err);
135868
            return undefined;
135869
        }
135870
        var source = input ? Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(input) : Object(_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])();
135871
        return source.subscribe(subscriber);
135872
    });
135873
}
135874
//# sourceMappingURL=defer.js.map
135875
 
135876
 
135877
/***/ }),
135878
 
135879
/***/ "./node_modules/rxjs/_esm5/internal/observable/empty.js":
135880
/*!**************************************************************!*\
135881
  !*** ./node_modules/rxjs/_esm5/internal/observable/empty.js ***!
135882
  \**************************************************************/
135883
/*! exports provided: EMPTY, empty, emptyScheduled */
135884
/***/ (function(module, __webpack_exports__, __webpack_require__) {
135885
 
135886
"use strict";
135887
__webpack_require__.r(__webpack_exports__);
135888
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return EMPTY; });
135889
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return empty; });
135890
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "emptyScheduled", function() { return emptyScheduled; });
135891
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
135892
/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
135893
 
135894
/**
135895
 * The same Observable instance returned by any call to {@link empty} without a
135896
 * {@link Scheduler}. It is preferrable to use this over `empty()`.
135897
 */
135898
var EMPTY = /*@__PURE__*/ new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return subscriber.complete(); });
135899
/**
135900
 * Creates an Observable that emits no items to the Observer and immediately
135901
 * emits a complete notification.
135902
 *
135903
 * <span class="informal">Just emits 'complete', and nothing else.
135904
 * </span>
135905
 *
135906
 * <img src="./img/empty.png" width="100%">
135907
 *
135908
 * This static operator is useful for creating a simple Observable that only
135909
 * emits the complete notification. It can be used for composing with other
135910
 * Observables, such as in a {@link mergeMap}.
135911
 *
135912
 * @example <caption>Emit the number 7, then complete.</caption>
135913
 * var result = Rx.Observable.empty().startWith(7);
135914
 * result.subscribe(x => console.log(x));
135915
 *
135916
 * @example <caption>Map and flatten only odd numbers to the sequence 'a', 'b', 'c'</caption>
135917
 * var interval = Rx.Observable.interval(1000);
135918
 * var result = interval.mergeMap(x =>
135919
 *   x % 2 === 1 ? Rx.Observable.of('a', 'b', 'c') : Rx.Observable.empty()
135920
 * );
135921
 * result.subscribe(x => console.log(x));
135922
 *
135923
 * // Results in the following to the console:
135924
 * // x is equal to the count on the interval eg(0,1,2,3,...)
135925
 * // x will occur every 1000ms
135926
 * // if x % 2 is equal to 1 print abc
135927
 * // if x % 2 is not equal to 1 nothing will be output
135928
 *
135929
 * @see {@link create}
135930
 * @see {@link never}
135931
 * @see {@link of}
135932
 * @see {@link throw}
135933
 *
135934
 * @param {Scheduler} [scheduler] A {@link IScheduler} to use for scheduling
135935
 * the emission of the complete notification.
135936
 * @return {Observable} An "empty" Observable: emits only the complete
135937
 * notification.
135938
 * @static true
135939
 * @name empty
135940
 * @owner Observable
135941
 * @deprecated Deprecated in favor of using EMPTY constant.
135942
 */
135943
function empty(scheduler) {
135944
    return scheduler ? emptyScheduled(scheduler) : EMPTY;
135945
}
135946
function emptyScheduled(scheduler) {
135947
    return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); });
135948
}
135949
//# sourceMappingURL=empty.js.map
135950
 
135951
 
135952
/***/ }),
135953
 
135954
/***/ "./node_modules/rxjs/_esm5/internal/observable/forkJoin.js":
135955
/*!*****************************************************************!*\
135956
  !*** ./node_modules/rxjs/_esm5/internal/observable/forkJoin.js ***!
135957
  \*****************************************************************/
135958
/*! exports provided: forkJoin */
135959
/***/ (function(module, __webpack_exports__, __webpack_require__) {
135960
 
135961
"use strict";
135962
__webpack_require__.r(__webpack_exports__);
135963
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forkJoin", function() { return forkJoin; });
135964
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
135965
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
135966
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isArray */ "./node_modules/rxjs/_esm5/internal/util/isArray.js");
135967
/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./empty */ "./node_modules/rxjs/_esm5/internal/observable/empty.js");
135968
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
135969
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
135970
/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../operators/map */ "./node_modules/rxjs/_esm5/internal/operators/map.js");
135971
/** PURE_IMPORTS_START tslib,_Observable,_util_isArray,_empty,_util_subscribeToResult,_OuterSubscriber,_operators_map PURE_IMPORTS_END */
135972
 
135973
 
135974
 
135975
 
135976
 
135977
 
135978
 
135979
/* tslint:enable:max-line-length */
135980
/**
135981
 * Joins last values emitted by passed Observables.
135982
 *
135983
 * <span class="informal">Wait for Observables to complete and then combine last values they emitted.</span>
135984
 *
135985
 * <img src="./img/forkJoin.png" width="100%">
135986
 *
135987
 * `forkJoin` is an operator that takes any number of Observables which can be passed either as an array
135988
 * or directly as arguments. If no input Observables are provided, resulting stream will complete
135989
 * immediately.
135990
 *
135991
 * `forkJoin` will wait for all passed Observables to complete and then it will emit an array with last
135992
 * values from corresponding Observables. So if you pass `n` Observables to the operator, resulting
135993
 * array will have `n` values, where first value is the last thing emitted by the first Observable,
135994
 * second value is the last thing emitted by the second Observable and so on. That means `forkJoin` will
135995
 * not emit more than once and it will complete after that. If you need to emit combined values not only
135996
 * at the end of lifecycle of passed Observables, but also throughout it, try out {@link combineLatest}
135997
 * or {@link zip} instead.
135998
 *
135999
 * In order for resulting array to have the same length as the number of input Observables, whenever any of
136000
 * that Observables completes without emitting any value, `forkJoin` will complete at that moment as well
136001
 * and it will not emit anything either, even if it already has some last values from other Observables.
136002
 * Conversely, if there is an Observable that never completes, `forkJoin` will never complete as well,
136003
 * unless at any point some other Observable completes without emitting value, which brings us back to
136004
 * the previous case. Overall, in order for `forkJoin` to emit a value, all Observables passed as arguments
136005
 * have to emit something at least once and complete.
136006
 *
136007
 * If any input Observable errors at some point, `forkJoin` will error as well and all other Observables
136008
 * will be immediately unsubscribed.
136009
 *
136010
 * Optionally `forkJoin` accepts project function, that will be called with values which normally
136011
 * would land in emitted array. Whatever is returned by project function, will appear in output
136012
 * Observable instead. This means that default project can be thought of as a function that takes
136013
 * all its arguments and puts them into an array. Note that project function will be called only
136014
 * when output Observable is supposed to emit a result.
136015
 *
136016
 * @example <caption>Use forkJoin with operator emitting immediately</caption>
136017
 * import { forkJoin, of } from 'rxjs';
136018
 *
136019
 * const observable = forkJoin(
136020
 *   of(1, 2, 3, 4),
136021
 *   of(5, 6, 7, 8)
136022
 * );
136023
 * observable.subscribe(
136024
 *   value => console.log(value),
136025
 *   err => {},
136026
 *   () => console.log('This is how it ends!')
136027
 * );
136028
 *
136029
 * // Logs:
136030
 * // [4, 8]
136031
 * // "This is how it ends!"
136032
 *
136033
 *
136034
 * @example <caption>Use forkJoin with operator emitting after some time</caption>
136035
 * import { forkJoin, interval } from 'rxjs';
136036
 * import { take } from 'rxjs/operators';
136037
 *
136038
 * const observable = forkJoin(
136039
 *   interval(1000).pipe(take(3)), // emit 0, 1, 2 every second and complete
136040
 *   interval(500).pipe(take(4)) // emit 0, 1, 2, 3 every half a second and complete
136041
 * );
136042
 * observable.subscribe(
136043
 *   value => console.log(value),
136044
 *   err => {},
136045
 *   () => console.log('This is how it ends!')
136046
 * );
136047
 *
136048
 * // Logs:
136049
 * // [2, 3] after 3 seconds
136050
 * // "This is how it ends!" immediately after
136051
 *
136052
 *
136053
 * @example <caption>Use forkJoin with project function</caption>
136054
 * import { jorkJoin, interval } from 'rxjs';
136055
 * import { take } from 'rxjs/operators';
136056
 *
136057
 * const observable = forkJoin(
136058
 *   interval(1000).pipe(take(3)), // emit 0, 1, 2 every second and complete
136059
 *   interval(500).pipe(take(4)), // emit 0, 1, 2, 3 every half a second and complete
136060
 *   (n, m) => n + m
136061
 * );
136062
 * observable.subscribe(
136063
 *   value => console.log(value),
136064
 *   err => {},
136065
 *   () => console.log('This is how it ends!')
136066
 * );
136067
 *
136068
 * // Logs:
136069
 * // 5 after 3 seconds
136070
 * // "This is how it ends!" immediately after
136071
 *
136072
 * @see {@link combineLatest}
136073
 * @see {@link zip}
136074
 *
136075
 * @param {...ObservableInput} sources Any number of Observables provided either as an array or as an arguments
136076
 * passed directly to the operator.
136077
 * @param {function} [project] Function that takes values emitted by input Observables and returns value
136078
 * that will appear in resulting Observable instead of default array.
136079
 * @return {Observable} Observable emitting either an array of last values emitted by passed Observables
136080
 * or value from project function.
136081
 */
136082
function forkJoin() {
136083
    var sources = [];
136084
    for (var _i = 0; _i < arguments.length; _i++) {
136085
        sources[_i] = arguments[_i];
136086
    }
136087
    var resultSelector;
136088
    if (typeof sources[sources.length - 1] === 'function') {
136089
        // DEPRECATED PATH
136090
        resultSelector = sources.pop();
136091
    }
136092
    // if the first and only other argument is an array
136093
    // assume it's been called with `forkJoin([obs1, obs2, obs3])`
136094
    if (sources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(sources[0])) {
136095
        sources = sources[0];
136096
    }
136097
    if (sources.length === 0) {
136098
        return _empty__WEBPACK_IMPORTED_MODULE_3__["EMPTY"];
136099
    }
136100
    if (resultSelector) {
136101
        // DEPRECATED PATH
136102
        return forkJoin(sources).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_6__["map"])(function (args) { return resultSelector.apply(void 0, args); }));
136103
    }
136104
    return new _Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"](function (subscriber) {
136105
        return new ForkJoinSubscriber(subscriber, sources);
136106
    });
136107
}
136108
/**
136109
 * We need this JSDoc comment for affecting ESDoc.
136110
 * @ignore
136111
 * @extends {Ignored}
136112
 */
136113
var ForkJoinSubscriber = /*@__PURE__*/ (function (_super) {
136114
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ForkJoinSubscriber, _super);
136115
    function ForkJoinSubscriber(destination, sources) {
136116
        var _this = _super.call(this, destination) || this;
136117
        _this.sources = sources;
136118
        _this.completed = 0;
136119
        _this.haveValues = 0;
136120
        var len = sources.length;
136121
        _this.values = new Array(len);
136122
        for (var i = 0; i < len; i++) {
136123
            var source = sources[i];
136124
            var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(_this, source, null, i);
136125
            if (innerSubscription) {
136126
                _this.add(innerSubscription);
136127
            }
136128
        }
136129
        return _this;
136130
    }
136131
    ForkJoinSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
136132
        this.values[outerIndex] = innerValue;
136133
        if (!innerSub._hasValue) {
136134
            innerSub._hasValue = true;
136135
            this.haveValues++;
136136
        }
136137
    };
136138
    ForkJoinSubscriber.prototype.notifyComplete = function (innerSub) {
136139
        var _a = this, destination = _a.destination, haveValues = _a.haveValues, values = _a.values;
136140
        var len = values.length;
136141
        if (!innerSub._hasValue) {
136142
            destination.complete();
136143
            return;
136144
        }
136145
        this.completed++;
136146
        if (this.completed !== len) {
136147
            return;
136148
        }
136149
        if (haveValues === len) {
136150
            destination.next(values);
136151
        }
136152
        destination.complete();
136153
    };
136154
    return ForkJoinSubscriber;
136155
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_5__["OuterSubscriber"]));
136156
//# sourceMappingURL=forkJoin.js.map
136157
 
136158
 
136159
/***/ }),
136160
 
136161
/***/ "./node_modules/rxjs/_esm5/internal/observable/from.js":
136162
/*!*************************************************************!*\
136163
  !*** ./node_modules/rxjs/_esm5/internal/observable/from.js ***!
136164
  \*************************************************************/
136165
/*! exports provided: from */
136166
/***/ (function(module, __webpack_exports__, __webpack_require__) {
136167
 
136168
"use strict";
136169
__webpack_require__.r(__webpack_exports__);
136170
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "from", function() { return from; });
136171
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
136172
/* harmony import */ var _util_isPromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isPromise */ "./node_modules/rxjs/_esm5/internal/util/isPromise.js");
136173
/* harmony import */ var _util_isArrayLike__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isArrayLike */ "./node_modules/rxjs/_esm5/internal/util/isArrayLike.js");
136174
/* harmony import */ var _util_isObservable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/isObservable */ "./node_modules/rxjs/_esm5/internal/util/isObservable.js");
136175
/* harmony import */ var _util_isIterable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/isIterable */ "./node_modules/rxjs/_esm5/internal/util/isIterable.js");
136176
/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./fromArray */ "./node_modules/rxjs/_esm5/internal/observable/fromArray.js");
136177
/* harmony import */ var _fromPromise__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./fromPromise */ "./node_modules/rxjs/_esm5/internal/observable/fromPromise.js");
136178
/* harmony import */ var _fromIterable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./fromIterable */ "./node_modules/rxjs/_esm5/internal/observable/fromIterable.js");
136179
/* harmony import */ var _fromObservable__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./fromObservable */ "./node_modules/rxjs/_esm5/internal/observable/fromObservable.js");
136180
/* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../util/subscribeTo */ "./node_modules/rxjs/_esm5/internal/util/subscribeTo.js");
136181
/** PURE_IMPORTS_START _Observable,_util_isPromise,_util_isArrayLike,_util_isObservable,_util_isIterable,_fromArray,_fromPromise,_fromIterable,_fromObservable,_util_subscribeTo PURE_IMPORTS_END */
136182
 
136183
 
136184
 
136185
 
136186
 
136187
 
136188
 
136189
 
136190
 
136191
 
136192
function from(input, scheduler) {
136193
    if (!scheduler) {
136194
        if (input instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]) {
136195
            return input;
136196
        }
136197
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_9__["subscribeTo"])(input));
136198
    }
136199
    if (input != null) {
136200
        if (Object(_util_isObservable__WEBPACK_IMPORTED_MODULE_3__["isObservable"])(input)) {
136201
            return Object(_fromObservable__WEBPACK_IMPORTED_MODULE_8__["fromObservable"])(input, scheduler);
136202
        }
136203
        else if (Object(_util_isPromise__WEBPACK_IMPORTED_MODULE_1__["isPromise"])(input)) {
136204
            return Object(_fromPromise__WEBPACK_IMPORTED_MODULE_6__["fromPromise"])(input, scheduler);
136205
        }
136206
        else if (Object(_util_isArrayLike__WEBPACK_IMPORTED_MODULE_2__["isArrayLike"])(input)) {
136207
            return Object(_fromArray__WEBPACK_IMPORTED_MODULE_5__["fromArray"])(input, scheduler);
136208
        }
136209
        else if (Object(_util_isIterable__WEBPACK_IMPORTED_MODULE_4__["isIterable"])(input) || typeof input === 'string') {
136210
            return Object(_fromIterable__WEBPACK_IMPORTED_MODULE_7__["fromIterable"])(input, scheduler);
136211
        }
136212
    }
136213
    throw new TypeError((input !== null && typeof input || input) + ' is not observable');
136214
}
136215
//# sourceMappingURL=from.js.map
136216
 
136217
 
136218
/***/ }),
136219
 
136220
/***/ "./node_modules/rxjs/_esm5/internal/observable/fromArray.js":
136221
/*!******************************************************************!*\
136222
  !*** ./node_modules/rxjs/_esm5/internal/observable/fromArray.js ***!
136223
  \******************************************************************/
136224
/*! exports provided: fromArray */
136225
/***/ (function(module, __webpack_exports__, __webpack_require__) {
136226
 
136227
"use strict";
136228
__webpack_require__.r(__webpack_exports__);
136229
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromArray", function() { return fromArray; });
136230
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
136231
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
136232
/* harmony import */ var _util_subscribeToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToArray */ "./node_modules/rxjs/_esm5/internal/util/subscribeToArray.js");
136233
/** PURE_IMPORTS_START _Observable,_Subscription,_util_subscribeToArray PURE_IMPORTS_END */
136234
 
136235
 
136236
 
136237
function fromArray(input, scheduler) {
136238
    if (!scheduler) {
136239
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeToArray__WEBPACK_IMPORTED_MODULE_2__["subscribeToArray"])(input));
136240
    }
136241
    else {
136242
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
136243
            var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
136244
            var i = 0;
136245
            sub.add(scheduler.schedule(function () {
136246
                if (i === input.length) {
136247
                    subscriber.complete();
136248
                    return;
136249
                }
136250
                subscriber.next(input[i++]);
136251
                if (!subscriber.closed) {
136252
                    sub.add(this.schedule());
136253
                }
136254
            }));
136255
            return sub;
136256
        });
136257
    }
136258
}
136259
//# sourceMappingURL=fromArray.js.map
136260
 
136261
 
136262
/***/ }),
136263
 
136264
/***/ "./node_modules/rxjs/_esm5/internal/observable/fromEvent.js":
136265
/*!******************************************************************!*\
136266
  !*** ./node_modules/rxjs/_esm5/internal/observable/fromEvent.js ***!
136267
  \******************************************************************/
136268
/*! exports provided: fromEvent */
136269
/***/ (function(module, __webpack_exports__, __webpack_require__) {
136270
 
136271
"use strict";
136272
__webpack_require__.r(__webpack_exports__);
136273
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromEvent", function() { return fromEvent; });
136274
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
136275
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isArray */ "./node_modules/rxjs/_esm5/internal/util/isArray.js");
136276
/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isFunction */ "./node_modules/rxjs/_esm5/internal/util/isFunction.js");
136277
/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../operators/map */ "./node_modules/rxjs/_esm5/internal/operators/map.js");
136278
/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */
136279
 
136280
 
136281
 
136282
 
136283
var toString = Object.prototype.toString;
136284
/* tslint:enable:max-line-length */
136285
/**
136286
 * Creates an Observable that emits events of a specific type coming from the
136287
 * given event target.
136288
 *
136289
 * <span class="informal">Creates an Observable from DOM events, or Node.js
136290
 * EventEmitter events or others.</span>
136291
 *
136292
 * <img src="./img/fromEvent.png" width="100%">
136293
 *
136294
 * `fromEvent` accepts as a first argument event target, which is an object with methods
136295
 * for registering event handler functions. As a second argument it takes string that indicates
136296
 * type of event we want to listen for. `fromEvent` supports selected types of event targets,
136297
 * which are described in detail below. If your event target does not match any of the ones listed,
136298
 * you should use {@link fromEventPattern}, which can be used on arbitrary APIs.
136299
 * When it comes to APIs supported by `fromEvent`, their methods for adding and removing event
136300
 * handler functions have different names, but they all accept a string describing event type
136301
 * and function itself, which will be called whenever said event happens.
136302
 *
136303
 * Every time resulting Observable is subscribed, event handler function will be registered
136304
 * to event target on given event type. When that event fires, value
136305
 * passed as a first argument to registered function will be emitted by output Observable.
136306
 * When Observable is unsubscribed, function will be unregistered from event target.
136307
 *
136308
 * Note that if event target calls registered function with more than one argument, second
136309
 * and following arguments will not appear in resulting stream. In order to get access to them,
136310
 * you can pass to `fromEvent` optional project function, which will be called with all arguments
136311
 * passed to event handler. Output Observable will then emit value returned by project function,
136312
 * instead of the usual value.
136313
 *
136314
 * Remember that event targets listed below are checked via duck typing. It means that
136315
 * no matter what kind of object you have and no matter what environment you work in,
136316
 * you can safely use `fromEvent` on that object if it exposes described methods (provided
136317
 * of course they behave as was described above). So for example if Node.js library exposes
136318
 * event target which has the same method names as DOM EventTarget, `fromEvent` is still
136319
 * a good choice.
136320
 *
136321
 * If the API you use is more callback then event handler oriented (subscribed
136322
 * callback function fires only once and thus there is no need to manually
136323
 * unregister it), you should use {@link bindCallback} or {@link bindNodeCallback}
136324
 * instead.
136325
 *
136326
 * `fromEvent` supports following types of event targets:
136327
 *
136328
 * **DOM EventTarget**
136329
 *
136330
 * This is an object with `addEventListener` and `removeEventListener` methods.
136331
 *
136332
 * In the browser, `addEventListener` accepts - apart from event type string and event
136333
 * handler function arguments - optional third parameter, which is either an object or boolean,
136334
 * both used for additional configuration how and when passed function will be called. When
136335
 * `fromEvent` is used with event target of that type, you can provide this values
136336
 * as third parameter as well.
136337
 *
136338
 * **Node.js EventEmitter**
136339
 *
136340
 * An object with `addListener` and `removeListener` methods.
136341
 *
136342
 * **JQuery-style event target**
136343
 *
136344
 * An object with `on` and `off` methods
136345
 *
136346
 * **DOM NodeList**
136347
 *
136348
 * List of DOM Nodes, returned for example by `document.querySelectorAll` or `Node.childNodes`.
136349
 *
136350
 * Although this collection is not event target in itself, `fromEvent` will iterate over all Nodes
136351
 * it contains and install event handler function in every of them. When returned Observable
136352
 * is unsubscribed, function will be removed from all Nodes.
136353
 *
136354
 * **DOM HtmlCollection**
136355
 *
136356
 * Just as in case of NodeList it is a collection of DOM nodes. Here as well event handler function is
136357
 * installed and removed in each of elements.
136358
 *
136359
 *
136360
 * @example <caption>Emits clicks happening on the DOM document</caption>
136361
 * var clicks = fromEvent(document, 'click');
136362
 * clicks.subscribe(x => console.log(x));
136363
 *
136364
 * // Results in:
136365
 * // MouseEvent object logged to console every time a click
136366
 * // occurs on the document.
136367
 *
136368
 *
136369
 * @example <caption>Use addEventListener with capture option</caption>
136370
 * var clicksInDocument = fromEvent(document, 'click', true); // note optional configuration parameter
136371
 *                                                                          // which will be passed to addEventListener
136372
 * var clicksInDiv = fromEvent(someDivInDocument, 'click');
136373
 *
136374
 * clicksInDocument.subscribe(() => console.log('document'));
136375
 * clicksInDiv.subscribe(() => console.log('div'));
136376
 *
136377
 * // By default events bubble UP in DOM tree, so normally
136378
 * // when we would click on div in document
136379
 * // "div" would be logged first and then "document".
136380
 * // Since we specified optional `capture` option, document
136381
 * // will catch event when it goes DOWN DOM tree, so console
136382
 * // will log "document" and then "div".
136383
 *
136384
 * @see {@link bindCallback}
136385
 * @see {@link bindNodeCallback}
136386
 * @see {@link fromEventPattern}
136387
 *
136388
 * @param {FromEventTarget<T>} target The DOM EventTarget, Node.js
136389
 * EventEmitter, JQuery-like event target, NodeList or HTMLCollection to attach the event handler to.
136390
 * @param {string} eventName The event name of interest, being emitted by the
136391
 * `target`.
136392
 * @param {EventListenerOptions} [options] Options to pass through to addEventListener
136393
 * @return {Observable<T>}
136394
 * @name fromEvent
136395
 */
136396
function fromEvent(target, eventName, options, resultSelector) {
136397
    if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(options)) {
136398
        // DEPRECATED PATH
136399
        resultSelector = options;
136400
        options = undefined;
136401
    }
136402
    if (resultSelector) {
136403
        // DEPRECATED PATH
136404
        return fromEvent(target, eventName, options).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (args) { return Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
136405
    }
136406
    return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
136407
        function handler(e) {
136408
            if (arguments.length > 1) {
136409
                subscriber.next(Array.prototype.slice.call(arguments));
136410
            }
136411
            else {
136412
                subscriber.next(e);
136413
            }
136414
        }
136415
        setupSubscription(target, eventName, handler, subscriber, options);
136416
    });
136417
}
136418
function setupSubscription(sourceObj, eventName, handler, subscriber, options) {
136419
    var unsubscribe;
136420
    if (isEventTarget(sourceObj)) {
136421
        var source_1 = sourceObj;
136422
        sourceObj.addEventListener(eventName, handler, options);
136423
        unsubscribe = function () { return source_1.removeEventListener(eventName, handler, options); };
136424
    }
136425
    else if (isJQueryStyleEventEmitter(sourceObj)) {
136426
        var source_2 = sourceObj;
136427
        sourceObj.on(eventName, handler);
136428
        unsubscribe = function () { return source_2.off(eventName, handler); };
136429
    }
136430
    else if (isNodeStyleEventEmitter(sourceObj)) {
136431
        var source_3 = sourceObj;
136432
        sourceObj.addListener(eventName, handler);
136433
        unsubscribe = function () { return source_3.removeListener(eventName, handler); };
136434
    }
136435
    else if (sourceObj && sourceObj.length) {
136436
        for (var i = 0, len = sourceObj.length; i < len; i++) {
136437
            setupSubscription(sourceObj[i], eventName, handler, subscriber, options);
136438
        }
136439
    }
136440
    else {
136441
        throw new TypeError('Invalid event target');
136442
    }
136443
    subscriber.add(unsubscribe);
136444
}
136445
function isNodeStyleEventEmitter(sourceObj) {
136446
    return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function';
136447
}
136448
function isJQueryStyleEventEmitter(sourceObj) {
136449
    return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function';
136450
}
136451
function isEventTarget(sourceObj) {
136452
    return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';
136453
}
136454
//# sourceMappingURL=fromEvent.js.map
136455
 
136456
 
136457
/***/ }),
136458
 
136459
/***/ "./node_modules/rxjs/_esm5/internal/observable/fromEventPattern.js":
136460
/*!*************************************************************************!*\
136461
  !*** ./node_modules/rxjs/_esm5/internal/observable/fromEventPattern.js ***!
136462
  \*************************************************************************/
136463
/*! exports provided: fromEventPattern */
136464
/***/ (function(module, __webpack_exports__, __webpack_require__) {
136465
 
136466
"use strict";
136467
__webpack_require__.r(__webpack_exports__);
136468
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromEventPattern", function() { return fromEventPattern; });
136469
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
136470
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isArray */ "./node_modules/rxjs/_esm5/internal/util/isArray.js");
136471
/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isFunction */ "./node_modules/rxjs/_esm5/internal/util/isFunction.js");
136472
/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../operators/map */ "./node_modules/rxjs/_esm5/internal/operators/map.js");
136473
/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */
136474
 
136475
 
136476
 
136477
 
136478
/* tslint:enable:max-line-length */
136479
/**
136480
 * Creates an Observable from an API based on addHandler/removeHandler
136481
 * functions.
136482
 *
136483
 * <span class="informal">Converts any addHandler/removeHandler API to an
136484
 * Observable.</span>
136485
 *
136486
 * <img src="./img/fromEventPattern.png" width="100%">
136487
 *
136488
 * Creates an Observable by using the `addHandler` and `removeHandler`
136489
 * functions to add and remove the handlers. The `addHandler` is
136490
 * called when the output Observable is subscribed, and `removeHandler` is
136491
 * called when the Subscription is unsubscribed.
136492
 *
136493
 * @example <caption>Emits clicks happening on the DOM document</caption>
136494
 * function addClickHandler(handler) {
136495
 *   document.addEventListener('click', handler);
136496
 * }
136497
 *
136498
 * function removeClickHandler(handler) {
136499
 *   document.removeEventListener('click', handler);
136500
 * }
136501
 *
136502
 * var clicks = fromEventPattern(
136503
 *   addClickHandler,
136504
 *   removeClickHandler
136505
 * );
136506
 * clicks.subscribe(x => console.log(x));
136507
 *
136508
 * @see {@link from}
136509
 * @see {@link fromEvent}
136510
 *
136511
 * @param {function(handler: Function): any} addHandler A function that takes
136512
 * a `handler` function as argument and attaches it somehow to the actual
136513
 * source of events.
136514
 * @param {function(handler: Function, signal?: any): void} [removeHandler] An optional function that
136515
 * takes a `handler` function as argument and removes it in case it was
136516
 * previously attached using `addHandler`. if addHandler returns signal to teardown when remove,
136517
 * removeHandler function will forward it.
136518
 * @return {Observable<T>}
136519
 * @name fromEventPattern
136520
 */
136521
function fromEventPattern(addHandler, removeHandler, resultSelector) {
136522
    if (resultSelector) {
136523
        // DEPRECATED PATH
136524
        return fromEventPattern(addHandler, removeHandler).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (args) { return Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
136525
    }
136526
    return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
136527
        var handler = function () {
136528
            var e = [];
136529
            for (var _i = 0; _i < arguments.length; _i++) {
136530
                e[_i] = arguments[_i];
136531
            }
136532
            return subscriber.next(e.length === 1 ? e[0] : e);
136533
        };
136534
        var retValue;
136535
        try {
136536
            retValue = addHandler(handler);
136537
        }
136538
        catch (err) {
136539
            subscriber.error(err);
136540
            return undefined;
136541
        }
136542
        if (!Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(removeHandler)) {
136543
            return undefined;
136544
        }
136545
        return function () { return removeHandler(handler, retValue); };
136546
    });
136547
}
136548
//# sourceMappingURL=fromEventPattern.js.map
136549
 
136550
 
136551
/***/ }),
136552
 
136553
/***/ "./node_modules/rxjs/_esm5/internal/observable/fromIterable.js":
136554
/*!*********************************************************************!*\
136555
  !*** ./node_modules/rxjs/_esm5/internal/observable/fromIterable.js ***!
136556
  \*********************************************************************/
136557
/*! exports provided: fromIterable */
136558
/***/ (function(module, __webpack_exports__, __webpack_require__) {
136559
 
136560
"use strict";
136561
__webpack_require__.r(__webpack_exports__);
136562
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromIterable", function() { return fromIterable; });
136563
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
136564
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
136565
/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../symbol/iterator */ "./node_modules/rxjs/_esm5/internal/symbol/iterator.js");
136566
/* harmony import */ var _util_subscribeToIterable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/subscribeToIterable */ "./node_modules/rxjs/_esm5/internal/util/subscribeToIterable.js");
136567
/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_iterator,_util_subscribeToIterable PURE_IMPORTS_END */
136568
 
136569
 
136570
 
136571
 
136572
function fromIterable(input, scheduler) {
136573
    if (!input) {
136574
        throw new Error('Iterable cannot be null');
136575
    }
136576
    if (!scheduler) {
136577
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeToIterable__WEBPACK_IMPORTED_MODULE_3__["subscribeToIterable"])(input));
136578
    }
136579
    else {
136580
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
136581
            var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
136582
            var iterator;
136583
            sub.add(function () {
136584
                // Finalize generators
136585
                if (iterator && typeof iterator.return === 'function') {
136586
                    iterator.return();
136587
                }
136588
            });
136589
            sub.add(scheduler.schedule(function () {
136590
                iterator = input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_2__["iterator"]]();
136591
                sub.add(scheduler.schedule(function () {
136592
                    if (subscriber.closed) {
136593
                        return;
136594
                    }
136595
                    var value;
136596
                    var done;
136597
                    try {
136598
                        var result = iterator.next();
136599
                        value = result.value;
136600
                        done = result.done;
136601
                    }
136602
                    catch (err) {
136603
                        subscriber.error(err);
136604
                        return;
136605
                    }
136606
                    if (done) {
136607
                        subscriber.complete();
136608
                    }
136609
                    else {
136610
                        subscriber.next(value);
136611
                        this.schedule();
136612
                    }
136613
                }));
136614
            }));
136615
            return sub;
136616
        });
136617
    }
136618
}
136619
//# sourceMappingURL=fromIterable.js.map
136620
 
136621
 
136622
/***/ }),
136623
 
136624
/***/ "./node_modules/rxjs/_esm5/internal/observable/fromObservable.js":
136625
/*!***********************************************************************!*\
136626
  !*** ./node_modules/rxjs/_esm5/internal/observable/fromObservable.js ***!
136627
  \***********************************************************************/
136628
/*! exports provided: fromObservable */
136629
/***/ (function(module, __webpack_exports__, __webpack_require__) {
136630
 
136631
"use strict";
136632
__webpack_require__.r(__webpack_exports__);
136633
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromObservable", function() { return fromObservable; });
136634
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
136635
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
136636
/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../symbol/observable */ "./node_modules/rxjs/_esm5/internal/symbol/observable.js");
136637
/* harmony import */ var _util_subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/subscribeToObservable */ "./node_modules/rxjs/_esm5/internal/util/subscribeToObservable.js");
136638
/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_observable,_util_subscribeToObservable PURE_IMPORTS_END */
136639
 
136640
 
136641
 
136642
 
136643
function fromObservable(input, scheduler) {
136644
    if (!scheduler) {
136645
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__["subscribeToObservable"])(input));
136646
    }
136647
    else {
136648
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
136649
            var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
136650
            sub.add(scheduler.schedule(function () {
136651
                var observable = input[_symbol_observable__WEBPACK_IMPORTED_MODULE_2__["observable"]]();
136652
                sub.add(observable.subscribe({
136653
                    next: function (value) { sub.add(scheduler.schedule(function () { return subscriber.next(value); })); },
136654
                    error: function (err) { sub.add(scheduler.schedule(function () { return subscriber.error(err); })); },
136655
                    complete: function () { sub.add(scheduler.schedule(function () { return subscriber.complete(); })); },
136656
                }));
136657
            }));
136658
            return sub;
136659
        });
136660
    }
136661
}
136662
//# sourceMappingURL=fromObservable.js.map
136663
 
136664
 
136665
/***/ }),
136666
 
136667
/***/ "./node_modules/rxjs/_esm5/internal/observable/fromPromise.js":
136668
/*!********************************************************************!*\
136669
  !*** ./node_modules/rxjs/_esm5/internal/observable/fromPromise.js ***!
136670
  \********************************************************************/
136671
/*! exports provided: fromPromise */
136672
/***/ (function(module, __webpack_exports__, __webpack_require__) {
136673
 
136674
"use strict";
136675
__webpack_require__.r(__webpack_exports__);
136676
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromPromise", function() { return fromPromise; });
136677
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
136678
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
136679
/* harmony import */ var _util_subscribeToPromise__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToPromise */ "./node_modules/rxjs/_esm5/internal/util/subscribeToPromise.js");
136680
/** PURE_IMPORTS_START _Observable,_Subscription,_util_subscribeToPromise PURE_IMPORTS_END */
136681
 
136682
 
136683
 
136684
function fromPromise(input, scheduler) {
136685
    if (!scheduler) {
136686
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeToPromise__WEBPACK_IMPORTED_MODULE_2__["subscribeToPromise"])(input));
136687
    }
136688
    else {
136689
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
136690
            var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
136691
            sub.add(scheduler.schedule(function () {
136692
                return input.then(function (value) {
136693
                    sub.add(scheduler.schedule(function () {
136694
                        subscriber.next(value);
136695
                        sub.add(scheduler.schedule(function () { return subscriber.complete(); }));
136696
                    }));
136697
                }, function (err) {
136698
                    sub.add(scheduler.schedule(function () { return subscriber.error(err); }));
136699
                });
136700
            }));
136701
            return sub;
136702
        });
136703
    }
136704
}
136705
//# sourceMappingURL=fromPromise.js.map
136706
 
136707
 
136708
/***/ }),
136709
 
136710
/***/ "./node_modules/rxjs/_esm5/internal/observable/generate.js":
136711
/*!*****************************************************************!*\
136712
  !*** ./node_modules/rxjs/_esm5/internal/observable/generate.js ***!
136713
  \*****************************************************************/
136714
/*! exports provided: generate */
136715
/***/ (function(module, __webpack_exports__, __webpack_require__) {
136716
 
136717
"use strict";
136718
__webpack_require__.r(__webpack_exports__);
136719
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generate", function() { return generate; });
136720
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
136721
/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/identity */ "./node_modules/rxjs/_esm5/internal/util/identity.js");
136722
/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isScheduler */ "./node_modules/rxjs/_esm5/internal/util/isScheduler.js");
136723
/** PURE_IMPORTS_START _Observable,_util_identity,_util_isScheduler PURE_IMPORTS_END */
136724
 
136725
 
136726
 
136727
function generate(initialStateOrOptions, condition, iterate, resultSelectorOrObservable, scheduler) {
136728
    var resultSelector;
136729
    var initialState;
136730
    if (arguments.length == 1) {
136731
        var options = initialStateOrOptions;
136732
        initialState = options.initialState;
136733
        condition = options.condition;
136734
        iterate = options.iterate;
136735
        resultSelector = options.resultSelector || _util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"];
136736
        scheduler = options.scheduler;
136737
    }
136738
    else if (resultSelectorOrObservable === undefined || Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_2__["isScheduler"])(resultSelectorOrObservable)) {
136739
        initialState = initialStateOrOptions;
136740
        resultSelector = _util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"];
136741
        scheduler = resultSelectorOrObservable;
136742
    }
136743
    else {
136744
        initialState = initialStateOrOptions;
136745
        resultSelector = resultSelectorOrObservable;
136746
    }
136747
    return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
136748
        var state = initialState;
136749
        if (scheduler) {
136750
            return scheduler.schedule(dispatch, 0, {
136751
                subscriber: subscriber,
136752
                iterate: iterate,
136753
                condition: condition,
136754
                resultSelector: resultSelector,
136755
                state: state
136756
            });
136757
        }
136758
        do {
136759
            if (condition) {
136760
                var conditionResult = void 0;
136761
                try {
136762
                    conditionResult = condition(state);
136763
                }
136764
                catch (err) {
136765
                    subscriber.error(err);
136766
                    return undefined;
136767
                }
136768
                if (!conditionResult) {
136769
                    subscriber.complete();
136770
                    break;
136771
                }
136772
            }
136773
            var value = void 0;
136774
            try {
136775
                value = resultSelector(state);
136776
            }
136777
            catch (err) {
136778
                subscriber.error(err);
136779
                return undefined;
136780
            }
136781
            subscriber.next(value);
136782
            if (subscriber.closed) {
136783
                break;
136784
            }
136785
            try {
136786
                state = iterate(state);
136787
            }
136788
            catch (err) {
136789
                subscriber.error(err);
136790
                return undefined;
136791
            }
136792
        } while (true);
136793
        return undefined;
136794
    });
136795
}
136796
function dispatch(state) {
136797
    var subscriber = state.subscriber, condition = state.condition;
136798
    if (subscriber.closed) {
136799
        return undefined;
136800
    }
136801
    if (state.needIterate) {
136802
        try {
136803
            state.state = state.iterate(state.state);
136804
        }
136805
        catch (err) {
136806
            subscriber.error(err);
136807
            return undefined;
136808
        }
136809
    }
136810
    else {
136811
        state.needIterate = true;
136812
    }
136813
    if (condition) {
136814
        var conditionResult = void 0;
136815
        try {
136816
            conditionResult = condition(state.state);
136817
        }
136818
        catch (err) {
136819
            subscriber.error(err);
136820
            return undefined;
136821
        }
136822
        if (!conditionResult) {
136823
            subscriber.complete();
136824
            return undefined;
136825
        }
136826
        if (subscriber.closed) {
136827
            return undefined;
136828
        }
136829
    }
136830
    var value;
136831
    try {
136832
        value = state.resultSelector(state.state);
136833
    }
136834
    catch (err) {
136835
        subscriber.error(err);
136836
        return undefined;
136837
    }
136838
    if (subscriber.closed) {
136839
        return undefined;
136840
    }
136841
    subscriber.next(value);
136842
    if (subscriber.closed) {
136843
        return undefined;
136844
    }
136845
    return this.schedule(state);
136846
}
136847
//# sourceMappingURL=generate.js.map
136848
 
136849
 
136850
/***/ }),
136851
 
136852
/***/ "./node_modules/rxjs/_esm5/internal/observable/iif.js":
136853
/*!************************************************************!*\
136854
  !*** ./node_modules/rxjs/_esm5/internal/observable/iif.js ***!
136855
  \************************************************************/
136856
/*! exports provided: iif */
136857
/***/ (function(module, __webpack_exports__, __webpack_require__) {
136858
 
136859
"use strict";
136860
__webpack_require__.r(__webpack_exports__);
136861
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iif", function() { return iif; });
136862
/* harmony import */ var _defer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defer */ "./node_modules/rxjs/_esm5/internal/observable/defer.js");
136863
/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./empty */ "./node_modules/rxjs/_esm5/internal/observable/empty.js");
136864
/** PURE_IMPORTS_START _defer,_empty PURE_IMPORTS_END */
136865
 
136866
 
136867
/**
136868
 * Decides at subscription time which Observable will actually be subscribed.
136869
 *
136870
 * <span class="informal">`If` statement for Observables.</span>
136871
 *
136872
 * `if` accepts a condition function and two Observables. When
136873
 * an Observable returned by the operator is subscribed, condition function will be called.
136874
 * Based on what boolean it returns at that moment, consumer will subscribe either to
136875
 * the first Observable (if condition was true) or to the second (if condition was false). Condition
136876
 * function may also not return anything - in that case condition will be evaluated as false and
136877
 * second Observable will be subscribed.
136878
 *
136879
 * Note that Observables for both cases (true and false) are optional. If condition points to an Observable that
136880
 * was left undefined, resulting stream will simply complete immediately. That allows you to, rather
136881
 * then controlling which Observable will be subscribed, decide at runtime if consumer should have access
136882
 * to given Observable or not.
136883
 *
136884
 * If you have more complex logic that requires decision between more than two Observables, {@link defer}
136885
 * will probably be a better choice. Actually `if` can be easily implemented with {@link defer}
136886
 * and exists only for convenience and readability reasons.
136887
 *
136888
 *
136889
 * @example <caption>Change at runtime which Observable will be subscribed</caption>
136890
 * let subscribeToFirst;
136891
 * const firstOrSecond = Rx.Observable.if(
136892
 *   () => subscribeToFirst,
136893
 *   Rx.Observable.of('first'),
136894
 *   Rx.Observable.of('second')
136895
 * );
136896
 *
136897
 * subscribeToFirst = true;
136898
 * firstOrSecond.subscribe(value => console.log(value));
136899
 *
136900
 * // Logs:
136901
 * // "first"
136902
 *
136903
 * subscribeToFirst = false;
136904
 * firstOrSecond.subscribe(value => console.log(value));
136905
 *
136906
 * // Logs:
136907
 * // "second"
136908
 *
136909
 *
136910
 * @example <caption>Control an access to an Observable</caption>
136911
 * let accessGranted;
136912
 * const observableIfYouHaveAccess = Rx.Observable.if(
136913
 *   () => accessGranted,
136914
 *   Rx.Observable.of('It seems you have an access...') // Note that only one Observable is passed to the operator.
136915
 * );
136916
 *
136917
 * accessGranted = true;
136918
 * observableIfYouHaveAccess.subscribe(
136919
 *   value => console.log(value),
136920
 *   err => {},
136921
 *   () => console.log('The end')
136922
 * );
136923
 *
136924
 * // Logs:
136925
 * // "It seems you have an access..."
136926
 * // "The end"
136927
 *
136928
 * accessGranted = false;
136929
 * observableIfYouHaveAccess.subscribe(
136930
 *   value => console.log(value),
136931
 *   err => {},
136932
 *   () => console.log('The end')
136933
 * );
136934
 *
136935
 * // Logs:
136936
 * // "The end"
136937
 *
136938
 * @see {@link defer}
136939
 *
136940
 * @param {function(): boolean} condition Condition which Observable should be chosen.
136941
 * @param {Observable} [trueObservable] An Observable that will be subscribed if condition is true.
136942
 * @param {Observable} [falseObservable] An Observable that will be subscribed if condition is false.
136943
 * @return {Observable} Either first or second Observable, depending on condition.
136944
 * @static true
136945
 * @name iif
136946
 * @owner Observable
136947
 */
136948
function iif(condition, trueResult, falseResult) {
136949
    if (trueResult === void 0) {
136950
        trueResult = _empty__WEBPACK_IMPORTED_MODULE_1__["EMPTY"];
136951
    }
136952
    if (falseResult === void 0) {
136953
        falseResult = _empty__WEBPACK_IMPORTED_MODULE_1__["EMPTY"];
136954
    }
136955
    return Object(_defer__WEBPACK_IMPORTED_MODULE_0__["defer"])(function () { return condition() ? trueResult : falseResult; });
136956
}
136957
//# sourceMappingURL=iif.js.map
136958
 
136959
 
136960
/***/ }),
136961
 
136962
/***/ "./node_modules/rxjs/_esm5/internal/observable/interval.js":
136963
/*!*****************************************************************!*\
136964
  !*** ./node_modules/rxjs/_esm5/internal/observable/interval.js ***!
136965
  \*****************************************************************/
136966
/*! exports provided: interval */
136967
/***/ (function(module, __webpack_exports__, __webpack_require__) {
136968
 
136969
"use strict";
136970
__webpack_require__.r(__webpack_exports__);
136971
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return interval; });
136972
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
136973
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/async */ "./node_modules/rxjs/_esm5/internal/scheduler/async.js");
136974
/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isNumeric */ "./node_modules/rxjs/_esm5/internal/util/isNumeric.js");
136975
/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric PURE_IMPORTS_END */
136976
 
136977
 
136978
 
136979
/**
136980
 * Creates an Observable that emits sequential numbers every specified
136981
 * interval of time, on a specified IScheduler.
136982
 *
136983
 * <span class="informal">Emits incremental numbers periodically in time.
136984
 * </span>
136985
 *
136986
 * <img src="./img/interval.png" width="100%">
136987
 *
136988
 * `interval` returns an Observable that emits an infinite sequence of
136989
 * ascending integers, with a constant interval of time of your choosing
136990
 * between those emissions. The first emission is not sent immediately, but
136991
 * only after the first period has passed. By default, this operator uses the
136992
 * `async` IScheduler to provide a notion of time, but you may pass any
136993
 * IScheduler to it.
136994
 *
136995
 * @example <caption>Emits ascending numbers, one every second (1000ms)</caption>
136996
 * var numbers = Rx.Observable.interval(1000);
136997
 * numbers.subscribe(x => console.log(x));
136998
 *
136999
 * @see {@link timer}
137000
 * @see {@link delay}
137001
 *
137002
 * @param {number} [period=0] The interval size in milliseconds (by default)
137003
 * or the time unit determined by the scheduler's clock.
137004
 * @param {Scheduler} [scheduler=async] The IScheduler to use for scheduling
137005
 * the emission of values, and providing a notion of "time".
137006
 * @return {Observable} An Observable that emits a sequential number each time
137007
 * interval.
137008
 * @static true
137009
 * @name interval
137010
 * @owner Observable
137011
 */
137012
function interval(period, scheduler) {
137013
    if (period === void 0) {
137014
        period = 0;
137015
    }
137016
    if (scheduler === void 0) {
137017
        scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
137018
    }
137019
    if (!Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(period) || period < 0) {
137020
        period = 0;
137021
    }
137022
    if (!scheduler || typeof scheduler.schedule !== 'function') {
137023
        scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
137024
    }
137025
    return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
137026
        subscriber.add(scheduler.schedule(dispatch, period, { subscriber: subscriber, counter: 0, period: period }));
137027
        return subscriber;
137028
    });
137029
}
137030
function dispatch(state) {
137031
    var subscriber = state.subscriber, counter = state.counter, period = state.period;
137032
    subscriber.next(counter);
137033
    this.schedule({ subscriber: subscriber, counter: counter + 1, period: period }, period);
137034
}
137035
//# sourceMappingURL=interval.js.map
137036
 
137037
 
137038
/***/ }),
137039
 
137040
/***/ "./node_modules/rxjs/_esm5/internal/observable/merge.js":
137041
/*!**************************************************************!*\
137042
  !*** ./node_modules/rxjs/_esm5/internal/observable/merge.js ***!
137043
  \**************************************************************/
137044
/*! exports provided: merge */
137045
/***/ (function(module, __webpack_exports__, __webpack_require__) {
137046
 
137047
"use strict";
137048
__webpack_require__.r(__webpack_exports__);
137049
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; });
137050
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
137051
/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isScheduler */ "./node_modules/rxjs/_esm5/internal/util/isScheduler.js");
137052
/* harmony import */ var _operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../operators/mergeAll */ "./node_modules/rxjs/_esm5/internal/operators/mergeAll.js");
137053
/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fromArray */ "./node_modules/rxjs/_esm5/internal/observable/fromArray.js");
137054
/** PURE_IMPORTS_START _Observable,_util_isScheduler,_operators_mergeAll,_fromArray PURE_IMPORTS_END */
137055
 
137056
 
137057
 
137058
 
137059
/* tslint:enable:max-line-length */
137060
/**
137061
 * Creates an output Observable which concurrently emits all values from every
137062
 * given input Observable.
137063
 *
137064
 * <span class="informal">Flattens multiple Observables together by blending
137065
 * their values into one Observable.</span>
137066
 *
137067
 * <img src="./img/merge.png" width="100%">
137068
 *
137069
 * `merge` subscribes to each given input Observable (as arguments), and simply
137070
 * forwards (without doing any transformation) all the values from all the input
137071
 * Observables to the output Observable. The output Observable only completes
137072
 * once all input Observables have completed. Any error delivered by an input
137073
 * Observable will be immediately emitted on the output Observable.
137074
 *
137075
 * @example <caption>Merge together two Observables: 1s interval and clicks</caption>
137076
 * var clicks = Rx.Observable.fromEvent(document, 'click');
137077
 * var timer = Rx.Observable.interval(1000);
137078
 * var clicksOrTimer = Rx.Observable.merge(clicks, timer);
137079
 * clicksOrTimer.subscribe(x => console.log(x));
137080
 *
137081
 * // Results in the following:
137082
 * // timer will emit ascending values, one every second(1000ms) to console
137083
 * // clicks logs MouseEvents to console everytime the "document" is clicked
137084
 * // Since the two streams are merged you see these happening
137085
 * // as they occur.
137086
 *
137087
 * @example <caption>Merge together 3 Observables, but only 2 run concurrently</caption>
137088
 * var timer1 = Rx.Observable.interval(1000).take(10);
137089
 * var timer2 = Rx.Observable.interval(2000).take(6);
137090
 * var timer3 = Rx.Observable.interval(500).take(10);
137091
 * var concurrent = 2; // the argument
137092
 * var merged = Rx.Observable.merge(timer1, timer2, timer3, concurrent);
137093
 * merged.subscribe(x => console.log(x));
137094
 *
137095
 * // Results in the following:
137096
 * // - First timer1 and timer2 will run concurrently
137097
 * // - timer1 will emit a value every 1000ms for 10 iterations
137098
 * // - timer2 will emit a value every 2000ms for 6 iterations
137099
 * // - after timer1 hits it's max iteration, timer2 will
137100
 * //   continue, and timer3 will start to run concurrently with timer2
137101
 * // - when timer2 hits it's max iteration it terminates, and
137102
 * //   timer3 will continue to emit a value every 500ms until it is complete
137103
 *
137104
 * @see {@link mergeAll}
137105
 * @see {@link mergeMap}
137106
 * @see {@link mergeMapTo}
137107
 * @see {@link mergeScan}
137108
 *
137109
 * @param {...ObservableInput} observables Input Observables to merge together.
137110
 * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of input
137111
 * Observables being subscribed to concurrently.
137112
 * @param {Scheduler} [scheduler=null] The IScheduler to use for managing
137113
 * concurrency of input Observables.
137114
 * @return {Observable} an Observable that emits items that are the result of
137115
 * every input Observable.
137116
 * @static true
137117
 * @name merge
137118
 * @owner Observable
137119
 */
137120
function merge() {
137121
    var observables = [];
137122
    for (var _i = 0; _i < arguments.length; _i++) {
137123
        observables[_i] = arguments[_i];
137124
    }
137125
    var concurrent = Number.POSITIVE_INFINITY;
137126
    var scheduler = null;
137127
    var last = observables[observables.length - 1];
137128
    if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(last)) {
137129
        scheduler = observables.pop();
137130
        if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {
137131
            concurrent = observables.pop();
137132
        }
137133
    }
137134
    else if (typeof last === 'number') {
137135
        concurrent = observables.pop();
137136
    }
137137
    if (scheduler === null && observables.length === 1 && observables[0] instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]) {
137138
        return observables[0];
137139
    }
137140
    return Object(_operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__["mergeAll"])(concurrent)(Object(_fromArray__WEBPACK_IMPORTED_MODULE_3__["fromArray"])(observables, scheduler));
137141
}
137142
//# sourceMappingURL=merge.js.map
137143
 
137144
 
137145
/***/ }),
137146
 
137147
/***/ "./node_modules/rxjs/_esm5/internal/observable/never.js":
137148
/*!**************************************************************!*\
137149
  !*** ./node_modules/rxjs/_esm5/internal/observable/never.js ***!
137150
  \**************************************************************/
137151
/*! exports provided: NEVER, never */
137152
/***/ (function(module, __webpack_exports__, __webpack_require__) {
137153
 
137154
"use strict";
137155
__webpack_require__.r(__webpack_exports__);
137156
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return NEVER; });
137157
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "never", function() { return never; });
137158
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
137159
/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/noop */ "./node_modules/rxjs/_esm5/internal/util/noop.js");
137160
/** PURE_IMPORTS_START _Observable,_util_noop PURE_IMPORTS_END */
137161
 
137162
 
137163
/**
137164
 * An Observable that emits no items to the Observer and never completes.
137165
 *
137166
 * <img src="./img/never.png" width="100%">
137167
 *
137168
 * A simple Observable that emits neither values nor errors nor the completion
137169
 * notification. It can be used for testing purposes or for composing with other
137170
 * Observables. Please note that by never emitting a complete notification, this
137171
 * Observable keeps the subscription from being disposed automatically.
137172
 * Subscriptions need to be manually disposed.
137173
 *
137174
 * @example <caption>Emit the number 7, then never emit anything else (not even complete).</caption>
137175
 * function info() {
137176
 *   console.log('Will not be called');
137177
 * }
137178
 * var result = NEVER.startWith(7);
137179
 * result.subscribe(x => console.log(x), info, info);
137180
 *
137181
 * @see {@link create}
137182
 * @see {@link EMPTY}
137183
 * @see {@link of}
137184
 * @see {@link throwError}
137185
 */
137186
var NEVER = /*@__PURE__*/ new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](_util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]);
137187
/**
137188
 * @deprecated Deprecated in favor of using NEVER constant.
137189
 */
137190
function never() {
137191
    return NEVER;
137192
}
137193
//# sourceMappingURL=never.js.map
137194
 
137195
 
137196
/***/ }),
137197
 
137198
/***/ "./node_modules/rxjs/_esm5/internal/observable/of.js":
137199
/*!***********************************************************!*\
137200
  !*** ./node_modules/rxjs/_esm5/internal/observable/of.js ***!
137201
  \***********************************************************/
137202
/*! exports provided: of */
137203
/***/ (function(module, __webpack_exports__, __webpack_require__) {
137204
 
137205
"use strict";
137206
__webpack_require__.r(__webpack_exports__);
137207
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "of", function() { return of; });
137208
/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isScheduler */ "./node_modules/rxjs/_esm5/internal/util/isScheduler.js");
137209
/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./fromArray */ "./node_modules/rxjs/_esm5/internal/observable/fromArray.js");
137210
/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./empty */ "./node_modules/rxjs/_esm5/internal/observable/empty.js");
137211
/* harmony import */ var _scalar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./scalar */ "./node_modules/rxjs/_esm5/internal/observable/scalar.js");
137212
/** PURE_IMPORTS_START _util_isScheduler,_fromArray,_empty,_scalar PURE_IMPORTS_END */
137213
 
137214
 
137215
 
137216
 
137217
function of() {
137218
    var args = [];
137219
    for (var _i = 0; _i < arguments.length; _i++) {
137220
        args[_i] = arguments[_i];
137221
    }
137222
    var scheduler = args[args.length - 1];
137223
    if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__["isScheduler"])(scheduler)) {
137224
        args.pop();
137225
    }
137226
    else {
137227
        scheduler = undefined;
137228
    }
137229
    switch (args.length) {
137230
        case 0:
137231
            return Object(_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])(scheduler);
137232
        case 1:
137233
            return scheduler ? Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(args, scheduler) : Object(_scalar__WEBPACK_IMPORTED_MODULE_3__["scalar"])(args[0]);
137234
        default:
137235
            return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(args, scheduler);
137236
    }
137237
}
137238
//# sourceMappingURL=of.js.map
137239
 
137240
 
137241
/***/ }),
137242
 
137243
/***/ "./node_modules/rxjs/_esm5/internal/observable/onErrorResumeNext.js":
137244
/*!**************************************************************************!*\
137245
  !*** ./node_modules/rxjs/_esm5/internal/observable/onErrorResumeNext.js ***!
137246
  \**************************************************************************/
137247
/*! exports provided: onErrorResumeNext */
137248
/***/ (function(module, __webpack_exports__, __webpack_require__) {
137249
 
137250
"use strict";
137251
__webpack_require__.r(__webpack_exports__);
137252
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return onErrorResumeNext; });
137253
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
137254
/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./from */ "./node_modules/rxjs/_esm5/internal/observable/from.js");
137255
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isArray */ "./node_modules/rxjs/_esm5/internal/util/isArray.js");
137256
/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./empty */ "./node_modules/rxjs/_esm5/internal/observable/empty.js");
137257
/** PURE_IMPORTS_START _Observable,_from,_util_isArray,_empty PURE_IMPORTS_END */
137258
 
137259
 
137260
 
137261
 
137262
/* tslint:enable:max-line-length */
137263
/**
137264
 * When any of the provided Observable emits an complete or error notification, it immediately subscribes to the next one
137265
 * that was passed.
137266
 *
137267
 * <span class="informal">Execute series of Observables no matter what, even if it means swallowing errors.</span>
137268
 *
137269
 * <img src="./img/onErrorResumeNext.png" width="100%">
137270
 *
137271
 * `onErrorResumeNext` Will subscribe to each observable source it is provided, in order.
137272
 * If the source it's subscribed to emits an error or completes, it will move to the next source
137273
 * without error.
137274
 *
137275
 * If `onErrorResumeNext` is provided no arguments, or a single, empty array, it will return {@link EMPTY}.
137276
 *
137277
 * `onErrorResumeNext` is basically {@link concat}, only it will continue, even if one of its
137278
 * sources emits an error.
137279
 *
137280
 * Note that there is no way to handle any errors thrown by sources via the resuult of
137281
 * `onErrorResumeNext`. If you want to handle errors thrown in any given source, you can
137282
 * always use the {@link catchError} operator on them before passing them into `onErrorResumeNext`.
137283
 *
137284
 * @example <caption>Subscribe to the next Observable after map fails</caption>
137285
 * import { onErrorResumeNext, of } from 'rxjs/create';
137286
 * import { map } from 'rxjs/operators';
137287
 *
137288
 * onErrorResumeNext(
137289
 *  of(1, 2, 3, 0).pipe(
137290
 *    map(x => {
137291
 *      if (x === 0) throw Error();
137292
 *      return 10 / x;
137293
 *    })
137294
 *  ),
137295
 *  of(1, 2, 3),
137296
 * )
137297
 * .subscribe(
137298
 *   val => console.log(val),
137299
 *   err => console.log(err),          // Will never be called.
137300
 *   () => console.log('done')
137301
 * );
137302
 *
137303
 * // Logs:
137304
 * // 10
137305
 * // 5
137306
 * // 3.3333333333333335
137307
 * // 1
137308
 * // 2
137309
 * // 3
137310
 * // "done"
137311
 *
137312
 * @see {@link concat}
137313
 * @see {@link catch}
137314
 *
137315
 * @param {...ObservableInput} sources Observables (or anything that *is* observable) passed either directly or as an array.
137316
 * @return {Observable} An Observable that concatenates all sources, one after the other,
137317
 * ignoring all errors, such that any error causes it to move on to the next source.
137318
 */
137319
function onErrorResumeNext() {
137320
    var sources = [];
137321
    for (var _i = 0; _i < arguments.length; _i++) {
137322
        sources[_i] = arguments[_i];
137323
    }
137324
    if (sources.length === 0) {
137325
        return _empty__WEBPACK_IMPORTED_MODULE_3__["EMPTY"];
137326
    }
137327
    var first = sources[0], remainder = sources.slice(1);
137328
    if (sources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(first)) {
137329
        return onErrorResumeNext.apply(void 0, first);
137330
    }
137331
    return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
137332
        var subNext = function () { return subscriber.add(onErrorResumeNext.apply(void 0, remainder).subscribe(subscriber)); };
137333
        return Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(first).subscribe({
137334
            next: function (value) { subscriber.next(value); },
137335
            error: subNext,
137336
            complete: subNext,
137337
        });
137338
    });
137339
}
137340
//# sourceMappingURL=onErrorResumeNext.js.map
137341
 
137342
 
137343
/***/ }),
137344
 
137345
/***/ "./node_modules/rxjs/_esm5/internal/observable/pairs.js":
137346
/*!**************************************************************!*\
137347
  !*** ./node_modules/rxjs/_esm5/internal/observable/pairs.js ***!
137348
  \**************************************************************/
137349
/*! exports provided: pairs, dispatch */
137350
/***/ (function(module, __webpack_exports__, __webpack_require__) {
137351
 
137352
"use strict";
137353
__webpack_require__.r(__webpack_exports__);
137354
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return pairs; });
137355
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return dispatch; });
137356
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
137357
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
137358
/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
137359
 
137360
 
137361
/**
137362
 * Convert an object into an observable sequence of [key, value] pairs
137363
 * using an optional IScheduler to enumerate the object.
137364
 *
137365
 * @example <caption>Converts a javascript object to an Observable</caption>
137366
 * var obj = {
137367
 *   foo: 42,
137368
 *   bar: 56,
137369
 *   baz: 78
137370
 * };
137371
 *
137372
 * var source = Rx.Observable.pairs(obj);
137373
 *
137374
 * var subscription = source.subscribe(
137375
 *   function (x) {
137376
 *     console.log('Next: %s', x);
137377
 *   },
137378
 *   function (err) {
137379
 *     console.log('Error: %s', err);
137380
 *   },
137381
 *   function () {
137382
 *     console.log('Completed');
137383
 *   });
137384
 *
137385
 * @param {Object} obj The object to inspect and turn into an
137386
 * Observable sequence.
137387
 * @param {Scheduler} [scheduler] An optional IScheduler to run the
137388
 * enumeration of the input sequence on.
137389
 * @returns {(Observable<[string, T]>)} An observable sequence of
137390
 * [key, value] pairs from the object.
137391
 */
137392
function pairs(obj, scheduler) {
137393
    if (!scheduler) {
137394
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
137395
            var keys = Object.keys(obj);
137396
            for (var i = 0; i < keys.length && !subscriber.closed; i++) {
137397
                var key = keys[i];
137398
                if (obj.hasOwnProperty(key)) {
137399
                    subscriber.next([key, obj[key]]);
137400
                }
137401
            }
137402
            subscriber.complete();
137403
        });
137404
    }
137405
    else {
137406
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
137407
            var keys = Object.keys(obj);
137408
            var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
137409
            subscription.add(scheduler.schedule(dispatch, 0, { keys: keys, index: 0, subscriber: subscriber, subscription: subscription, obj: obj }));
137410
            return subscription;
137411
        });
137412
    }
137413
}
137414
/** @internal */
137415
function dispatch(state) {
137416
    var keys = state.keys, index = state.index, subscriber = state.subscriber, subscription = state.subscription, obj = state.obj;
137417
    if (!subscriber.closed) {
137418
        if (index < keys.length) {
137419
            var key = keys[index];
137420
            subscriber.next([key, obj[key]]);
137421
            subscription.add(this.schedule({ keys: keys, index: index + 1, subscriber: subscriber, subscription: subscription, obj: obj }));
137422
        }
137423
        else {
137424
            subscriber.complete();
137425
        }
137426
    }
137427
}
137428
//# sourceMappingURL=pairs.js.map
137429
 
137430
 
137431
/***/ }),
137432
 
137433
/***/ "./node_modules/rxjs/_esm5/internal/observable/race.js":
137434
/*!*************************************************************!*\
137435
  !*** ./node_modules/rxjs/_esm5/internal/observable/race.js ***!
137436
  \*************************************************************/
137437
/*! exports provided: race, RaceOperator, RaceSubscriber */
137438
/***/ (function(module, __webpack_exports__, __webpack_require__) {
137439
 
137440
"use strict";
137441
__webpack_require__.r(__webpack_exports__);
137442
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return race; });
137443
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RaceOperator", function() { return RaceOperator; });
137444
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RaceSubscriber", function() { return RaceSubscriber; });
137445
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
137446
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isArray */ "./node_modules/rxjs/_esm5/internal/util/isArray.js");
137447
/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fromArray */ "./node_modules/rxjs/_esm5/internal/observable/fromArray.js");
137448
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
137449
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
137450
/** PURE_IMPORTS_START tslib,_util_isArray,_fromArray,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
137451
 
137452
 
137453
 
137454
 
137455
 
137456
function race() {
137457
    var observables = [];
137458
    for (var _i = 0; _i < arguments.length; _i++) {
137459
        observables[_i] = arguments[_i];
137460
    }
137461
    // if the only argument is an array, it was most likely called with
137462
    // `race([obs1, obs2, ...])`
137463
    if (observables.length === 1) {
137464
        if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(observables[0])) {
137465
            observables = observables[0];
137466
        }
137467
        else {
137468
            return observables[0];
137469
        }
137470
    }
137471
    return Object(_fromArray__WEBPACK_IMPORTED_MODULE_2__["fromArray"])(observables, undefined).lift(new RaceOperator());
137472
}
137473
var RaceOperator = /*@__PURE__*/ (function () {
137474
    function RaceOperator() {
137475
    }
137476
    RaceOperator.prototype.call = function (subscriber, source) {
137477
        return source.subscribe(new RaceSubscriber(subscriber));
137478
    };
137479
    return RaceOperator;
137480
}());
137481
 
137482
/**
137483
 * We need this JSDoc comment for affecting ESDoc.
137484
 * @ignore
137485
 * @extends {Ignored}
137486
 */
137487
var RaceSubscriber = /*@__PURE__*/ (function (_super) {
137488
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RaceSubscriber, _super);
137489
    function RaceSubscriber(destination) {
137490
        var _this = _super.call(this, destination) || this;
137491
        _this.hasFirst = false;
137492
        _this.observables = [];
137493
        _this.subscriptions = [];
137494
        return _this;
137495
    }
137496
    RaceSubscriber.prototype._next = function (observable) {
137497
        this.observables.push(observable);
137498
    };
137499
    RaceSubscriber.prototype._complete = function () {
137500
        var observables = this.observables;
137501
        var len = observables.length;
137502
        if (len === 0) {
137503
            this.destination.complete();
137504
        }
137505
        else {
137506
            for (var i = 0; i < len && !this.hasFirst; i++) {
137507
                var observable = observables[i];
137508
                var subscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, observable, observable, i);
137509
                if (this.subscriptions) {
137510
                    this.subscriptions.push(subscription);
137511
                }
137512
                this.add(subscription);
137513
            }
137514
            this.observables = null;
137515
        }
137516
    };
137517
    RaceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
137518
        if (!this.hasFirst) {
137519
            this.hasFirst = true;
137520
            for (var i = 0; i < this.subscriptions.length; i++) {
137521
                if (i !== outerIndex) {
137522
                    var subscription = this.subscriptions[i];
137523
                    subscription.unsubscribe();
137524
                    this.remove(subscription);
137525
                }
137526
            }
137527
            this.subscriptions = null;
137528
        }
137529
        this.destination.next(innerValue);
137530
    };
137531
    return RaceSubscriber;
137532
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
137533
 
137534
//# sourceMappingURL=race.js.map
137535
 
137536
 
137537
/***/ }),
137538
 
137539
/***/ "./node_modules/rxjs/_esm5/internal/observable/range.js":
137540
/*!**************************************************************!*\
137541
  !*** ./node_modules/rxjs/_esm5/internal/observable/range.js ***!
137542
  \**************************************************************/
137543
/*! exports provided: range, dispatch */
137544
/***/ (function(module, __webpack_exports__, __webpack_require__) {
137545
 
137546
"use strict";
137547
__webpack_require__.r(__webpack_exports__);
137548
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "range", function() { return range; });
137549
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return dispatch; });
137550
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
137551
/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
137552
 
137553
/**
137554
 * Creates an Observable that emits a sequence of numbers within a specified
137555
 * range.
137556
 *
137557
 * <span class="informal">Emits a sequence of numbers in a range.</span>
137558
 *
137559
 * <img src="./img/range.png" width="100%">
137560
 *
137561
 * `range` operator emits a range of sequential integers, in order, where you
137562
 * select the `start` of the range and its `length`. By default, uses no
137563
 * IScheduler and just delivers the notifications synchronously, but may use
137564
 * an optional IScheduler to regulate those deliveries.
137565
 *
137566
 * @example <caption>Emits the numbers 1 to 10</caption>
137567
 * var numbers = Rx.Observable.range(1, 10);
137568
 * numbers.subscribe(x => console.log(x));
137569
 *
137570
 * @see {@link timer}
137571
 * @see {@link interval}
137572
 *
137573
 * @param {number} [start=0] The value of the first integer in the sequence.
137574
 * @param {number} [count=0] The number of sequential integers to generate.
137575
 * @param {Scheduler} [scheduler] A {@link IScheduler} to use for scheduling
137576
 * the emissions of the notifications.
137577
 * @return {Observable} An Observable of numbers that emits a finite range of
137578
 * sequential integers.
137579
 * @static true
137580
 * @name range
137581
 * @owner Observable
137582
 */
137583
function range(start, count, scheduler) {
137584
    if (start === void 0) {
137585
        start = 0;
137586
    }
137587
    if (count === void 0) {
137588
        count = 0;
137589
    }
137590
    return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
137591
        var index = 0;
137592
        if (scheduler) {
137593
            return scheduler.schedule(dispatch, 0, {
137594
                index: index, count: count, start: start, subscriber: subscriber
137595
            });
137596
        }
137597
        else {
137598
            do {
137599
                if (index++ >= count) {
137600
                    subscriber.complete();
137601
                    break;
137602
                }
137603
                subscriber.next(start++);
137604
                if (subscriber.closed) {
137605
                    break;
137606
                }
137607
            } while (true);
137608
        }
137609
        return undefined;
137610
    });
137611
}
137612
/** @internal */
137613
function dispatch(state) {
137614
    var start = state.start, index = state.index, count = state.count, subscriber = state.subscriber;
137615
    if (index >= count) {
137616
        subscriber.complete();
137617
        return;
137618
    }
137619
    subscriber.next(start);
137620
    if (subscriber.closed) {
137621
        return;
137622
    }
137623
    state.index = index + 1;
137624
    state.start = start + 1;
137625
    this.schedule(state);
137626
}
137627
//# sourceMappingURL=range.js.map
137628
 
137629
 
137630
/***/ }),
137631
 
137632
/***/ "./node_modules/rxjs/_esm5/internal/observable/scalar.js":
137633
/*!***************************************************************!*\
137634
  !*** ./node_modules/rxjs/_esm5/internal/observable/scalar.js ***!
137635
  \***************************************************************/
137636
/*! exports provided: scalar */
137637
/***/ (function(module, __webpack_exports__, __webpack_require__) {
137638
 
137639
"use strict";
137640
__webpack_require__.r(__webpack_exports__);
137641
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scalar", function() { return scalar; });
137642
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
137643
/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
137644
 
137645
function scalar(value) {
137646
    var result = new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
137647
        subscriber.next(value);
137648
        subscriber.complete();
137649
    });
137650
    result._isScalar = true;
137651
    result.value = value;
137652
    return result;
137653
}
137654
//# sourceMappingURL=scalar.js.map
137655
 
137656
 
137657
/***/ }),
137658
 
137659
/***/ "./node_modules/rxjs/_esm5/internal/observable/throwError.js":
137660
/*!*******************************************************************!*\
137661
  !*** ./node_modules/rxjs/_esm5/internal/observable/throwError.js ***!
137662
  \*******************************************************************/
137663
/*! exports provided: throwError */
137664
/***/ (function(module, __webpack_exports__, __webpack_require__) {
137665
 
137666
"use strict";
137667
__webpack_require__.r(__webpack_exports__);
137668
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throwError", function() { return throwError; });
137669
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
137670
/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
137671
 
137672
/**
137673
 * Creates an Observable that emits no items to the Observer and immediately
137674
 * emits an error notification.
137675
 *
137676
 * <span class="informal">Just emits 'error', and nothing else.
137677
 * </span>
137678
 *
137679
 * <img src="./img/throw.png" width="100%">
137680
 *
137681
 * This static operator is useful for creating a simple Observable that only
137682
 * emits the error notification. It can be used for composing with other
137683
 * Observables, such as in a {@link mergeMap}.
137684
 *
137685
 * @example <caption>Emit the number 7, then emit an error.</caption>
137686
 * import { throwError, concat, of } from 'rxjs/create';
137687
 *
137688
 * const result = concat(of(7), throwError(new Error('oops!')));
137689
 * result.subscribe(x => console.log(x), e => console.error(e));
137690
 *
137691
 * @example <caption>Map and flatten numbers to the sequence 'a', 'b', 'c', but throw an error for 13</caption>
137692
 * import { throwError, interval, of } from 'rxjs/create';
137693
 * import { mergeMap } from 'rxjs/operators';
137694
 *
137695
 * interval(1000).pipe(
137696
 *   mergeMap(x => x === 13 ?
137697
 *     throwError('Thirteens are bad') :
137698
 *     of('a', 'b', 'c')
137699
 *   )
137700
 * ).subscribe(x => console.log(x), e => console.error(e));
137701
 *
137702
 * @see {@link create}
137703
 * @see {@link empty}
137704
 * @see {@link never}
137705
 * @see {@link of}
137706
 *
137707
 * @param {any} error The particular Error to pass to the error notification.
137708
 * @param {Scheduler} [scheduler] A {@link IScheduler} to use for scheduling
137709
 * the emission of the error notification.
137710
 * @return {Observable} An error Observable: emits only the error notification
137711
 * using the given error argument.
137712
 * @static true
137713
 * @name throw
137714
 * @owner Observable
137715
 */
137716
function throwError(error, scheduler) {
137717
    if (!scheduler) {
137718
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return subscriber.error(error); });
137719
    }
137720
    else {
137721
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return scheduler.schedule(dispatch, 0, { error: error, subscriber: subscriber }); });
137722
    }
137723
}
137724
function dispatch(_a) {
137725
    var error = _a.error, subscriber = _a.subscriber;
137726
    subscriber.error(error);
137727
}
137728
//# sourceMappingURL=throwError.js.map
137729
 
137730
 
137731
/***/ }),
137732
 
137733
/***/ "./node_modules/rxjs/_esm5/internal/observable/timer.js":
137734
/*!**************************************************************!*\
137735
  !*** ./node_modules/rxjs/_esm5/internal/observable/timer.js ***!
137736
  \**************************************************************/
137737
/*! exports provided: timer */
137738
/***/ (function(module, __webpack_exports__, __webpack_require__) {
137739
 
137740
"use strict";
137741
__webpack_require__.r(__webpack_exports__);
137742
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return timer; });
137743
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
137744
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/async */ "./node_modules/rxjs/_esm5/internal/scheduler/async.js");
137745
/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isNumeric */ "./node_modules/rxjs/_esm5/internal/util/isNumeric.js");
137746
/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/isScheduler */ "./node_modules/rxjs/_esm5/internal/util/isScheduler.js");
137747
/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
137748
 
137749
 
137750
 
137751
 
137752
/**
137753
 * Creates an Observable that starts emitting after an `initialDelay` and
137754
 * emits ever increasing numbers after each `period` of time thereafter.
137755
 *
137756
 * <span class="informal">Its like {@link interval}, but you can specify when
137757
 * should the emissions start.</span>
137758
 *
137759
 * <img src="./img/timer.png" width="100%">
137760
 *
137761
 * `timer` returns an Observable that emits an infinite sequence of ascending
137762
 * integers, with a constant interval of time, `period` of your choosing
137763
 * between those emissions. The first emission happens after the specified
137764
 * `initialDelay`. The initial delay may be a {@link Date}. By default, this
137765
 * operator uses the `async` IScheduler to provide a notion of time, but you
137766
 * may pass any IScheduler to it. If `period` is not specified, the output
137767
 * Observable emits only one value, `0`. Otherwise, it emits an infinite
137768
 * sequence.
137769
 *
137770
 * @example <caption>Emits ascending numbers, one every second (1000ms), starting after 3 seconds</caption>
137771
 * var numbers = Rx.Observable.timer(3000, 1000);
137772
 * numbers.subscribe(x => console.log(x));
137773
 *
137774
 * @example <caption>Emits one number after five seconds</caption>
137775
 * var numbers = Rx.Observable.timer(5000);
137776
 * numbers.subscribe(x => console.log(x));
137777
 *
137778
 * @see {@link interval}
137779
 * @see {@link delay}
137780
 *
137781
 * @param {number|Date} [dueTime] The initial delay time to wait before
137782
 * emitting the first value of `0`.
137783
 * @param {number|SchedulerLike} [periodOrScheduler] The period of time between emissions of the
137784
 * subsequent numbers.
137785
 * @param {SchedulerLike} [scheduler=async] The IScheduler to use for scheduling
137786
 * the emission of values, and providing a notion of "time".
137787
 * @return {Observable} An Observable that emits a `0` after the
137788
 * `initialDelay` and ever increasing numbers after each `period` of time
137789
 * thereafter.
137790
 * @static true
137791
 * @name timer
137792
 * @owner Observable
137793
 */
137794
function timer(dueTime, periodOrScheduler, scheduler) {
137795
    if (dueTime === void 0) {
137796
        dueTime = 0;
137797
    }
137798
    var period = -1;
137799
    if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(periodOrScheduler)) {
137800
        period = Number(periodOrScheduler) < 1 && 1 || Number(periodOrScheduler);
137801
    }
137802
    else if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(periodOrScheduler)) {
137803
        scheduler = periodOrScheduler;
137804
    }
137805
    if (!Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(scheduler)) {
137806
        scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
137807
    }
137808
    return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
137809
        var due = Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(dueTime)
137810
            ? dueTime
137811
            : (+dueTime - scheduler.now());
137812
        return scheduler.schedule(dispatch, due, {
137813
            index: 0, period: period, subscriber: subscriber
137814
        });
137815
    });
137816
}
137817
function dispatch(state) {
137818
    var index = state.index, period = state.period, subscriber = state.subscriber;
137819
    subscriber.next(index);
137820
    if (subscriber.closed) {
137821
        return;
137822
    }
137823
    else if (period === -1) {
137824
        return subscriber.complete();
137825
    }
137826
    state.index = index + 1;
137827
    this.schedule(state, period);
137828
}
137829
//# sourceMappingURL=timer.js.map
137830
 
137831
 
137832
/***/ }),
137833
 
137834
/***/ "./node_modules/rxjs/_esm5/internal/observable/using.js":
137835
/*!**************************************************************!*\
137836
  !*** ./node_modules/rxjs/_esm5/internal/observable/using.js ***!
137837
  \**************************************************************/
137838
/*! exports provided: using */
137839
/***/ (function(module, __webpack_exports__, __webpack_require__) {
137840
 
137841
"use strict";
137842
__webpack_require__.r(__webpack_exports__);
137843
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "using", function() { return using; });
137844
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
137845
/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./from */ "./node_modules/rxjs/_esm5/internal/observable/from.js");
137846
/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./empty */ "./node_modules/rxjs/_esm5/internal/observable/empty.js");
137847
/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */
137848
 
137849
 // from from from! LAWL
137850
 
137851
/**
137852
 * Creates an Observable that uses a resource which will be disposed at the same time as the Observable.
137853
 *
137854
 * <span class="informal">Use it when you catch yourself cleaning up after an Observable.</span>
137855
 *
137856
 * `using` is a factory operator, which accepts two functions. First function returns a disposable resource.
137857
 * It can be an arbitrary object that implements `unsubscribe` method. Second function will be injected with
137858
 * that object and should return an Observable. That Observable can use resource object during its execution.
137859
 * Both functions passed to `using` will be called every time someone subscribes - neither an Observable nor
137860
 * resource object will be shared in any way between subscriptions.
137861
 *
137862
 * When Observable returned by `using` is subscribed, Observable returned from the second function will be subscribed
137863
 * as well. All its notifications (nexted values, completion and error events) will be emitted unchanged by the output
137864
 * Observable. If however someone unsubscribes from the Observable or source Observable completes or errors by itself,
137865
 * the `unsubscribe` method on resource object will be called. This can be used to do any necessary clean up, which
137866
 * otherwise would have to be handled by hand. Note that complete or error notifications are not emitted when someone
137867
 * cancels subscription to an Observable via `unsubscribe`, so `using` can be used as a hook, allowing you to make
137868
 * sure that all resources which need to exist during an Observable execution will be disposed at appropriate time.
137869
 *
137870
 * @see {@link defer}
137871
 *
137872
 * @param {function(): ISubscription} resourceFactory A function which creates any resource object
137873
 * that implements `unsubscribe` method.
137874
 * @param {function(resource: ISubscription): Observable<T>} observableFactory A function which
137875
 * creates an Observable, that can use injected resource object.
137876
 * @return {Observable<T>} An Observable that behaves the same as Observable returned by `observableFactory`, but
137877
 * which - when completed, errored or unsubscribed - will also call `unsubscribe` on created resource object.
137878
 */
137879
function using(resourceFactory, observableFactory) {
137880
    return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
137881
        var resource;
137882
        try {
137883
            resource = resourceFactory();
137884
        }
137885
        catch (err) {
137886
            subscriber.error(err);
137887
            return undefined;
137888
        }
137889
        var result;
137890
        try {
137891
            result = observableFactory(resource);
137892
        }
137893
        catch (err) {
137894
            subscriber.error(err);
137895
            return undefined;
137896
        }
137897
        var source = result ? Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(result) : _empty__WEBPACK_IMPORTED_MODULE_2__["EMPTY"];
137898
        var subscription = source.subscribe(subscriber);
137899
        return function () {
137900
            subscription.unsubscribe();
137901
            if (resource) {
137902
                resource.unsubscribe();
137903
            }
137904
        };
137905
    });
137906
}
137907
//# sourceMappingURL=using.js.map
137908
 
137909
 
137910
/***/ }),
137911
 
137912
/***/ "./node_modules/rxjs/_esm5/internal/observable/zip.js":
137913
/*!************************************************************!*\
137914
  !*** ./node_modules/rxjs/_esm5/internal/observable/zip.js ***!
137915
  \************************************************************/
137916
/*! exports provided: zip, ZipOperator, ZipSubscriber */
137917
/***/ (function(module, __webpack_exports__, __webpack_require__) {
137918
 
137919
"use strict";
137920
__webpack_require__.r(__webpack_exports__);
137921
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return zip; });
137922
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipOperator", function() { return ZipOperator; });
137923
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipSubscriber", function() { return ZipSubscriber; });
137924
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
137925
/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./fromArray */ "./node_modules/rxjs/_esm5/internal/observable/fromArray.js");
137926
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isArray */ "./node_modules/rxjs/_esm5/internal/util/isArray.js");
137927
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
137928
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
137929
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
137930
/* harmony import */ var _internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../internal/symbol/iterator */ "./node_modules/rxjs/_esm5/internal/symbol/iterator.js");
137931
/** PURE_IMPORTS_START tslib,_fromArray,_util_isArray,_Subscriber,_OuterSubscriber,_util_subscribeToResult,_.._internal_symbol_iterator PURE_IMPORTS_END */
137932
 
137933
 
137934
 
137935
 
137936
 
137937
 
137938
 
137939
/* tslint:enable:max-line-length */
137940
/**
137941
 * Combines multiple Observables to create an Observable whose values are calculated from the values, in order, of each
137942
 * of its input Observables.
137943
 *
137944
 * If the latest parameter is a function, this function is used to compute the created value from the input values.
137945
 * Otherwise, an array of the input values is returned.
137946
 *
137947
 * @example <caption>Combine age and name from different sources</caption>
137948
 *
137949
 * let age$ = Observable.of<number>(27, 25, 29);
137950
 * let name$ = Observable.of<string>('Foo', 'Bar', 'Beer');
137951
 * let isDev$ = Observable.of<boolean>(true, true, false);
137952
 *
137953
 * Observable
137954
 *     .zip(age$,
137955
 *          name$,
137956
 *          isDev$,
137957
 *          (age: number, name: string, isDev: boolean) => ({ age, name, isDev }))
137958
 *     .subscribe(x => console.log(x));
137959
 *
137960
 * // outputs
137961
 * // { age: 27, name: 'Foo', isDev: true }
137962
 * // { age: 25, name: 'Bar', isDev: true }
137963
 * // { age: 29, name: 'Beer', isDev: false }
137964
 *
137965
 * @param observables
137966
 * @return {Observable<R>}
137967
 * @static true
137968
 * @name zip
137969
 * @owner Observable
137970
 */
137971
function zip() {
137972
    var observables = [];
137973
    for (var _i = 0; _i < arguments.length; _i++) {
137974
        observables[_i] = arguments[_i];
137975
    }
137976
    var resultSelector = observables[observables.length - 1];
137977
    if (typeof resultSelector === 'function') {
137978
        observables.pop();
137979
    }
137980
    return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(observables, undefined).lift(new ZipOperator(resultSelector));
137981
}
137982
var ZipOperator = /*@__PURE__*/ (function () {
137983
    function ZipOperator(resultSelector) {
137984
        this.resultSelector = resultSelector;
137985
    }
137986
    ZipOperator.prototype.call = function (subscriber, source) {
137987
        return source.subscribe(new ZipSubscriber(subscriber, this.resultSelector));
137988
    };
137989
    return ZipOperator;
137990
}());
137991
 
137992
/**
137993
 * We need this JSDoc comment for affecting ESDoc.
137994
 * @ignore
137995
 * @extends {Ignored}
137996
 */
137997
var ZipSubscriber = /*@__PURE__*/ (function (_super) {
137998
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ZipSubscriber, _super);
137999
    function ZipSubscriber(destination, resultSelector, values) {
138000
        if (values === void 0) {
138001
            values = Object.create(null);
138002
        }
138003
        var _this = _super.call(this, destination) || this;
138004
        _this.iterators = [];
138005
        _this.active = 0;
138006
        _this.resultSelector = (typeof resultSelector === 'function') ? resultSelector : null;
138007
        _this.values = values;
138008
        return _this;
138009
    }
138010
    ZipSubscriber.prototype._next = function (value) {
138011
        var iterators = this.iterators;
138012
        if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(value)) {
138013
            iterators.push(new StaticArrayIterator(value));
138014
        }
138015
        else if (typeof value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] === 'function') {
138016
            iterators.push(new StaticIterator(value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]]()));
138017
        }
138018
        else {
138019
            iterators.push(new ZipBufferIterator(this.destination, this, value));
138020
        }
138021
    };
138022
    ZipSubscriber.prototype._complete = function () {
138023
        var iterators = this.iterators;
138024
        var len = iterators.length;
138025
        if (len === 0) {
138026
            this.destination.complete();
138027
            return;
138028
        }
138029
        this.active = len;
138030
        for (var i = 0; i < len; i++) {
138031
            var iterator = iterators[i];
138032
            if (iterator.stillUnsubscribed) {
138033
                this.add(iterator.subscribe(iterator, i));
138034
            }
138035
            else {
138036
                this.active--; // not an observable
138037
            }
138038
        }
138039
    };
138040
    ZipSubscriber.prototype.notifyInactive = function () {
138041
        this.active--;
138042
        if (this.active === 0) {
138043
            this.destination.complete();
138044
        }
138045
    };
138046
    ZipSubscriber.prototype.checkIterators = function () {
138047
        var iterators = this.iterators;
138048
        var len = iterators.length;
138049
        var destination = this.destination;
138050
        // abort if not all of them have values
138051
        for (var i = 0; i < len; i++) {
138052
            var iterator = iterators[i];
138053
            if (typeof iterator.hasValue === 'function' && !iterator.hasValue()) {
138054
                return;
138055
            }
138056
        }
138057
        var shouldComplete = false;
138058
        var args = [];
138059
        for (var i = 0; i < len; i++) {
138060
            var iterator = iterators[i];
138061
            var result = iterator.next();
138062
            // check to see if it's completed now that you've gotten
138063
            // the next value.
138064
            if (iterator.hasCompleted()) {
138065
                shouldComplete = true;
138066
            }
138067
            if (result.done) {
138068
                destination.complete();
138069
                return;
138070
            }
138071
            args.push(result.value);
138072
        }
138073
        if (this.resultSelector) {
138074
            this._tryresultSelector(args);
138075
        }
138076
        else {
138077
            destination.next(args);
138078
        }
138079
        if (shouldComplete) {
138080
            destination.complete();
138081
        }
138082
    };
138083
    ZipSubscriber.prototype._tryresultSelector = function (args) {
138084
        var result;
138085
        try {
138086
            result = this.resultSelector.apply(this, args);
138087
        }
138088
        catch (err) {
138089
            this.destination.error(err);
138090
            return;
138091
        }
138092
        this.destination.next(result);
138093
    };
138094
    return ZipSubscriber;
138095
}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
138096
 
138097
var StaticIterator = /*@__PURE__*/ (function () {
138098
    function StaticIterator(iterator) {
138099
        this.iterator = iterator;
138100
        this.nextResult = iterator.next();
138101
    }
138102
    StaticIterator.prototype.hasValue = function () {
138103
        return true;
138104
    };
138105
    StaticIterator.prototype.next = function () {
138106
        var result = this.nextResult;
138107
        this.nextResult = this.iterator.next();
138108
        return result;
138109
    };
138110
    StaticIterator.prototype.hasCompleted = function () {
138111
        var nextResult = this.nextResult;
138112
        return nextResult && nextResult.done;
138113
    };
138114
    return StaticIterator;
138115
}());
138116
var StaticArrayIterator = /*@__PURE__*/ (function () {
138117
    function StaticArrayIterator(array) {
138118
        this.array = array;
138119
        this.index = 0;
138120
        this.length = 0;
138121
        this.length = array.length;
138122
    }
138123
    StaticArrayIterator.prototype[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] = function () {
138124
        return this;
138125
    };
138126
    StaticArrayIterator.prototype.next = function (value) {
138127
        var i = this.index++;
138128
        var array = this.array;
138129
        return i < this.length ? { value: array[i], done: false } : { value: null, done: true };
138130
    };
138131
    StaticArrayIterator.prototype.hasValue = function () {
138132
        return this.array.length > this.index;
138133
    };
138134
    StaticArrayIterator.prototype.hasCompleted = function () {
138135
        return this.array.length === this.index;
138136
    };
138137
    return StaticArrayIterator;
138138
}());
138139
/**
138140
 * We need this JSDoc comment for affecting ESDoc.
138141
 * @ignore
138142
 * @extends {Ignored}
138143
 */
138144
var ZipBufferIterator = /*@__PURE__*/ (function (_super) {
138145
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ZipBufferIterator, _super);
138146
    function ZipBufferIterator(destination, parent, observable) {
138147
        var _this = _super.call(this, destination) || this;
138148
        _this.parent = parent;
138149
        _this.observable = observable;
138150
        _this.stillUnsubscribed = true;
138151
        _this.buffer = [];
138152
        _this.isComplete = false;
138153
        return _this;
138154
    }
138155
    ZipBufferIterator.prototype[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] = function () {
138156
        return this;
138157
    };
138158
    // NOTE: there is actually a name collision here with Subscriber.next and Iterator.next
138159
    //    this is legit because `next()` will never be called by a subscription in this case.
138160
    ZipBufferIterator.prototype.next = function () {
138161
        var buffer = this.buffer;
138162
        if (buffer.length === 0 && this.isComplete) {
138163
            return { value: null, done: true };
138164
        }
138165
        else {
138166
            return { value: buffer.shift(), done: false };
138167
        }
138168
    };
138169
    ZipBufferIterator.prototype.hasValue = function () {
138170
        return this.buffer.length > 0;
138171
    };
138172
    ZipBufferIterator.prototype.hasCompleted = function () {
138173
        return this.buffer.length === 0 && this.isComplete;
138174
    };
138175
    ZipBufferIterator.prototype.notifyComplete = function () {
138176
        if (this.buffer.length > 0) {
138177
            this.isComplete = true;
138178
            this.parent.notifyInactive();
138179
        }
138180
        else {
138181
            this.destination.complete();
138182
        }
138183
    };
138184
    ZipBufferIterator.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
138185
        this.buffer.push(innerValue);
138186
        this.parent.checkIterators();
138187
    };
138188
    ZipBufferIterator.prototype.subscribe = function (value, index) {
138189
        return Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__["subscribeToResult"])(this, this.observable, this, index);
138190
    };
138191
    return ZipBufferIterator;
138192
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__["OuterSubscriber"]));
138193
//# sourceMappingURL=zip.js.map
138194
 
138195
 
138196
/***/ }),
138197
 
138198
/***/ "./node_modules/rxjs/_esm5/internal/operators/audit.js":
138199
/*!*************************************************************!*\
138200
  !*** ./node_modules/rxjs/_esm5/internal/operators/audit.js ***!
138201
  \*************************************************************/
138202
/*! exports provided: audit */
138203
/***/ (function(module, __webpack_exports__, __webpack_require__) {
138204
 
138205
"use strict";
138206
__webpack_require__.r(__webpack_exports__);
138207
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return audit; });
138208
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
138209
/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/tryCatch */ "./node_modules/rxjs/_esm5/internal/util/tryCatch.js");
138210
/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/errorObject */ "./node_modules/rxjs/_esm5/internal/util/errorObject.js");
138211
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
138212
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
138213
/** PURE_IMPORTS_START tslib,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
138214
 
138215
 
138216
 
138217
 
138218
 
138219
/**
138220
 * Ignores source values for a duration determined by another Observable, then
138221
 * emits the most recent value from the source Observable, then repeats this
138222
 * process.
138223
 *
138224
 * <span class="informal">It's like {@link auditTime}, but the silencing
138225
 * duration is determined by a second Observable.</span>
138226
 *
138227
 * <img src="./img/audit.png" width="100%">
138228
 *
138229
 * `audit` is similar to `throttle`, but emits the last value from the silenced
138230
 * time window, instead of the first value. `audit` emits the most recent value
138231
 * from the source Observable on the output Observable as soon as its internal
138232
 * timer becomes disabled, and ignores source values while the timer is enabled.
138233
 * Initially, the timer is disabled. As soon as the first source value arrives,
138234
 * the timer is enabled by calling the `durationSelector` function with the
138235
 * source value, which returns the "duration" Observable. When the duration
138236
 * Observable emits a value or completes, the timer is disabled, then the most
138237
 * recent source value is emitted on the output Observable, and this process
138238
 * repeats for the next source value.
138239
 *
138240
 * @example <caption>Emit clicks at a rate of at most one click per second</caption>
138241
 * var clicks = Rx.Observable.fromEvent(document, 'click');
138242
 * var result = clicks.audit(ev => Rx.Observable.interval(1000));
138243
 * result.subscribe(x => console.log(x));
138244
 *
138245
 * @see {@link auditTime}
138246
 * @see {@link debounce}
138247
 * @see {@link delayWhen}
138248
 * @see {@link sample}
138249
 * @see {@link throttle}
138250
 *
138251
 * @param {function(value: T): SubscribableOrPromise} durationSelector A function
138252
 * that receives a value from the source Observable, for computing the silencing
138253
 * duration, returned as an Observable or a Promise.
138254
 * @return {Observable<T>} An Observable that performs rate-limiting of
138255
 * emissions from the source Observable.
138256
 * @method audit
138257
 * @owner Observable
138258
 */
138259
function audit(durationSelector) {
138260
    return function auditOperatorFunction(source) {
138261
        return source.lift(new AuditOperator(durationSelector));
138262
    };
138263
}
138264
var AuditOperator = /*@__PURE__*/ (function () {
138265
    function AuditOperator(durationSelector) {
138266
        this.durationSelector = durationSelector;
138267
    }
138268
    AuditOperator.prototype.call = function (subscriber, source) {
138269
        return source.subscribe(new AuditSubscriber(subscriber, this.durationSelector));
138270
    };
138271
    return AuditOperator;
138272
}());
138273
/**
138274
 * We need this JSDoc comment for affecting ESDoc.
138275
 * @ignore
138276
 * @extends {Ignored}
138277
 */
138278
var AuditSubscriber = /*@__PURE__*/ (function (_super) {
138279
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AuditSubscriber, _super);
138280
    function AuditSubscriber(destination, durationSelector) {
138281
        var _this = _super.call(this, destination) || this;
138282
        _this.durationSelector = durationSelector;
138283
        _this.hasValue = false;
138284
        return _this;
138285
    }
138286
    AuditSubscriber.prototype._next = function (value) {
138287
        this.value = value;
138288
        this.hasValue = true;
138289
        if (!this.throttled) {
138290
            var duration = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_1__["tryCatch"])(this.durationSelector)(value);
138291
            if (duration === _util_errorObject__WEBPACK_IMPORTED_MODULE_2__["errorObject"]) {
138292
                this.destination.error(_util_errorObject__WEBPACK_IMPORTED_MODULE_2__["errorObject"].e);
138293
            }
138294
            else {
138295
                var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, duration);
138296
                if (innerSubscription.closed) {
138297
                    this.clearThrottle();
138298
                }
138299
                else {
138300
                    this.add(this.throttled = innerSubscription);
138301
                }
138302
            }
138303
        }
138304
    };
138305
    AuditSubscriber.prototype.clearThrottle = function () {
138306
        var _a = this, value = _a.value, hasValue = _a.hasValue, throttled = _a.throttled;
138307
        if (throttled) {
138308
            this.remove(throttled);
138309
            this.throttled = null;
138310
            throttled.unsubscribe();
138311
        }
138312
        if (hasValue) {
138313
            this.value = null;
138314
            this.hasValue = false;
138315
            this.destination.next(value);
138316
        }
138317
    };
138318
    AuditSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {
138319
        this.clearThrottle();
138320
    };
138321
    AuditSubscriber.prototype.notifyComplete = function () {
138322
        this.clearThrottle();
138323
    };
138324
    return AuditSubscriber;
138325
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
138326
//# sourceMappingURL=audit.js.map
138327
 
138328
 
138329
/***/ }),
138330
 
138331
/***/ "./node_modules/rxjs/_esm5/internal/operators/auditTime.js":
138332
/*!*****************************************************************!*\
138333
  !*** ./node_modules/rxjs/_esm5/internal/operators/auditTime.js ***!
138334
  \*****************************************************************/
138335
/*! exports provided: auditTime */
138336
/***/ (function(module, __webpack_exports__, __webpack_require__) {
138337
 
138338
"use strict";
138339
__webpack_require__.r(__webpack_exports__);
138340
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return auditTime; });
138341
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduler/async */ "./node_modules/rxjs/_esm5/internal/scheduler/async.js");
138342
/* harmony import */ var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./audit */ "./node_modules/rxjs/_esm5/internal/operators/audit.js");
138343
/* harmony import */ var _observable_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/timer */ "./node_modules/rxjs/_esm5/internal/observable/timer.js");
138344
/** PURE_IMPORTS_START _scheduler_async,_audit,_observable_timer PURE_IMPORTS_END */
138345
 
138346
 
138347
 
138348
/**
138349
 * Ignores source values for `duration` milliseconds, then emits the most recent
138350
 * value from the source Observable, then repeats this process.
138351
 *
138352
 * <span class="informal">When it sees a source values, it ignores that plus
138353
 * the next ones for `duration` milliseconds, and then it emits the most recent
138354
 * value from the source.</span>
138355
 *
138356
 * <img src="./img/auditTime.png" width="100%">
138357
 *
138358
 * `auditTime` is similar to `throttleTime`, but emits the last value from the
138359
 * silenced time window, instead of the first value. `auditTime` emits the most
138360
 * recent value from the source Observable on the output Observable as soon as
138361
 * its internal timer becomes disabled, and ignores source values while the
138362
 * timer is enabled. Initially, the timer is disabled. As soon as the first
138363
 * source value arrives, the timer is enabled. After `duration` milliseconds (or
138364
 * the time unit determined internally by the optional `scheduler`) has passed,
138365
 * the timer is disabled, then the most recent source value is emitted on the
138366
 * output Observable, and this process repeats for the next source value.
138367
 * Optionally takes a {@link IScheduler} for managing timers.
138368
 *
138369
 * @example <caption>Emit clicks at a rate of at most one click per second</caption>
138370
 * var clicks = Rx.Observable.fromEvent(document, 'click');
138371
 * var result = clicks.auditTime(1000);
138372
 * result.subscribe(x => console.log(x));
138373
 *
138374
 * @see {@link audit}
138375
 * @see {@link debounceTime}
138376
 * @see {@link delay}
138377
 * @see {@link sampleTime}
138378
 * @see {@link throttleTime}
138379
 *
138380
 * @param {number} duration Time to wait before emitting the most recent source
138381
 * value, measured in milliseconds or the time unit determined internally
138382
 * by the optional `scheduler`.
138383
 * @param {Scheduler} [scheduler=async] The {@link IScheduler} to use for
138384
 * managing the timers that handle the rate-limiting behavior.
138385
 * @return {Observable<T>} An Observable that performs rate-limiting of
138386
 * emissions from the source Observable.
138387
 * @method auditTime
138388
 * @owner Observable
138389
 */
138390
function auditTime(duration, scheduler) {
138391
    if (scheduler === void 0) {
138392
        scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
138393
    }
138394
    return Object(_audit__WEBPACK_IMPORTED_MODULE_1__["audit"])(function () { return Object(_observable_timer__WEBPACK_IMPORTED_MODULE_2__["timer"])(duration, scheduler); });
138395
}
138396
//# sourceMappingURL=auditTime.js.map
138397
 
138398
 
138399
/***/ }),
138400
 
138401
/***/ "./node_modules/rxjs/_esm5/internal/operators/buffer.js":
138402
/*!**************************************************************!*\
138403
  !*** ./node_modules/rxjs/_esm5/internal/operators/buffer.js ***!
138404
  \**************************************************************/
138405
/*! exports provided: buffer */
138406
/***/ (function(module, __webpack_exports__, __webpack_require__) {
138407
 
138408
"use strict";
138409
__webpack_require__.r(__webpack_exports__);
138410
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return buffer; });
138411
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
138412
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
138413
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
138414
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
138415
 
138416
 
138417
 
138418
/**
138419
 * Buffers the source Observable values until `closingNotifier` emits.
138420
 *
138421
 * <span class="informal">Collects values from the past as an array, and emits
138422
 * that array only when another Observable emits.</span>
138423
 *
138424
 * <img src="./img/buffer.png" width="100%">
138425
 *
138426
 * Buffers the incoming Observable values until the given `closingNotifier`
138427
 * Observable emits a value, at which point it emits the buffer on the output
138428
 * Observable and starts a new buffer internally, awaiting the next time
138429
 * `closingNotifier` emits.
138430
 *
138431
 * @example <caption>On every click, emit array of most recent interval events</caption>
138432
 * var clicks = Rx.Observable.fromEvent(document, 'click');
138433
 * var interval = Rx.Observable.interval(1000);
138434
 * var buffered = interval.buffer(clicks);
138435
 * buffered.subscribe(x => console.log(x));
138436
 *
138437
 * @see {@link bufferCount}
138438
 * @see {@link bufferTime}
138439
 * @see {@link bufferToggle}
138440
 * @see {@link bufferWhen}
138441
 * @see {@link window}
138442
 *
138443
 * @param {Observable<any>} closingNotifier An Observable that signals the
138444
 * buffer to be emitted on the output Observable.
138445
 * @return {Observable<T[]>} An Observable of buffers, which are arrays of
138446
 * values.
138447
 * @method buffer
138448
 * @owner Observable
138449
 */
138450
function buffer(closingNotifier) {
138451
    return function bufferOperatorFunction(source) {
138452
        return source.lift(new BufferOperator(closingNotifier));
138453
    };
138454
}
138455
var BufferOperator = /*@__PURE__*/ (function () {
138456
    function BufferOperator(closingNotifier) {
138457
        this.closingNotifier = closingNotifier;
138458
    }
138459
    BufferOperator.prototype.call = function (subscriber, source) {
138460
        return source.subscribe(new BufferSubscriber(subscriber, this.closingNotifier));
138461
    };
138462
    return BufferOperator;
138463
}());
138464
/**
138465
 * We need this JSDoc comment for affecting ESDoc.
138466
 * @ignore
138467
 * @extends {Ignored}
138468
 */
138469
var BufferSubscriber = /*@__PURE__*/ (function (_super) {
138470
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferSubscriber, _super);
138471
    function BufferSubscriber(destination, closingNotifier) {
138472
        var _this = _super.call(this, destination) || this;
138473
        _this.buffer = [];
138474
        _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, closingNotifier));
138475
        return _this;
138476
    }
138477
    BufferSubscriber.prototype._next = function (value) {
138478
        this.buffer.push(value);
138479
    };
138480
    BufferSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
138481
        var buffer = this.buffer;
138482
        this.buffer = [];
138483
        this.destination.next(buffer);
138484
    };
138485
    return BufferSubscriber;
138486
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
138487
//# sourceMappingURL=buffer.js.map
138488
 
138489
 
138490
/***/ }),
138491
 
138492
/***/ "./node_modules/rxjs/_esm5/internal/operators/bufferCount.js":
138493
/*!*******************************************************************!*\
138494
  !*** ./node_modules/rxjs/_esm5/internal/operators/bufferCount.js ***!
138495
  \*******************************************************************/
138496
/*! exports provided: bufferCount */
138497
/***/ (function(module, __webpack_exports__, __webpack_require__) {
138498
 
138499
"use strict";
138500
__webpack_require__.r(__webpack_exports__);
138501
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return bufferCount; });
138502
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
138503
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
138504
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
138505
 
138506
 
138507
/**
138508
 * Buffers the source Observable values until the size hits the maximum
138509
 * `bufferSize` given.
138510
 *
138511
 * <span class="informal">Collects values from the past as an array, and emits
138512
 * that array only when its size reaches `bufferSize`.</span>
138513
 *
138514
 * <img src="./img/bufferCount.png" width="100%">
138515
 *
138516
 * Buffers a number of values from the source Observable by `bufferSize` then
138517
 * emits the buffer and clears it, and starts a new buffer each
138518
 * `startBufferEvery` values. If `startBufferEvery` is not provided or is
138519
 * `null`, then new buffers are started immediately at the start of the source
138520
 * and when each buffer closes and is emitted.
138521
 *
138522
 * @example <caption>Emit the last two click events as an array</caption>
138523
 * var clicks = Rx.Observable.fromEvent(document, 'click');
138524
 * var buffered = clicks.bufferCount(2);
138525
 * buffered.subscribe(x => console.log(x));
138526
 *
138527
 * @example <caption>On every click, emit the last two click events as an array</caption>
138528
 * var clicks = Rx.Observable.fromEvent(document, 'click');
138529
 * var buffered = clicks.bufferCount(2, 1);
138530
 * buffered.subscribe(x => console.log(x));
138531
 *
138532
 * @see {@link buffer}
138533
 * @see {@link bufferTime}
138534
 * @see {@link bufferToggle}
138535
 * @see {@link bufferWhen}
138536
 * @see {@link pairwise}
138537
 * @see {@link windowCount}
138538
 *
138539
 * @param {number} bufferSize The maximum size of the buffer emitted.
138540
 * @param {number} [startBufferEvery] Interval at which to start a new buffer.
138541
 * For example if `startBufferEvery` is `2`, then a new buffer will be started
138542
 * on every other value from the source. A new buffer is started at the
138543
 * beginning of the source by default.
138544
 * @return {Observable<T[]>} An Observable of arrays of buffered values.
138545
 * @method bufferCount
138546
 * @owner Observable
138547
 */
138548
function bufferCount(bufferSize, startBufferEvery) {
138549
    if (startBufferEvery === void 0) {
138550
        startBufferEvery = null;
138551
    }
138552
    return function bufferCountOperatorFunction(source) {
138553
        return source.lift(new BufferCountOperator(bufferSize, startBufferEvery));
138554
    };
138555
}
138556
var BufferCountOperator = /*@__PURE__*/ (function () {
138557
    function BufferCountOperator(bufferSize, startBufferEvery) {
138558
        this.bufferSize = bufferSize;
138559
        this.startBufferEvery = startBufferEvery;
138560
        if (!startBufferEvery || bufferSize === startBufferEvery) {
138561
            this.subscriberClass = BufferCountSubscriber;
138562
        }
138563
        else {
138564
            this.subscriberClass = BufferSkipCountSubscriber;
138565
        }
138566
    }
138567
    BufferCountOperator.prototype.call = function (subscriber, source) {
138568
        return source.subscribe(new this.subscriberClass(subscriber, this.bufferSize, this.startBufferEvery));
138569
    };
138570
    return BufferCountOperator;
138571
}());
138572
/**
138573
 * We need this JSDoc comment for affecting ESDoc.
138574
 * @ignore
138575
 * @extends {Ignored}
138576
 */
138577
var BufferCountSubscriber = /*@__PURE__*/ (function (_super) {
138578
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferCountSubscriber, _super);
138579
    function BufferCountSubscriber(destination, bufferSize) {
138580
        var _this = _super.call(this, destination) || this;
138581
        _this.bufferSize = bufferSize;
138582
        _this.buffer = [];
138583
        return _this;
138584
    }
138585
    BufferCountSubscriber.prototype._next = function (value) {
138586
        var buffer = this.buffer;
138587
        buffer.push(value);
138588
        if (buffer.length == this.bufferSize) {
138589
            this.destination.next(buffer);
138590
            this.buffer = [];
138591
        }
138592
    };
138593
    BufferCountSubscriber.prototype._complete = function () {
138594
        var buffer = this.buffer;
138595
        if (buffer.length > 0) {
138596
            this.destination.next(buffer);
138597
        }
138598
        _super.prototype._complete.call(this);
138599
    };
138600
    return BufferCountSubscriber;
138601
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
138602
/**
138603
 * We need this JSDoc comment for affecting ESDoc.
138604
 * @ignore
138605
 * @extends {Ignored}
138606
 */
138607
var BufferSkipCountSubscriber = /*@__PURE__*/ (function (_super) {
138608
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferSkipCountSubscriber, _super);
138609
    function BufferSkipCountSubscriber(destination, bufferSize, startBufferEvery) {
138610
        var _this = _super.call(this, destination) || this;
138611
        _this.bufferSize = bufferSize;
138612
        _this.startBufferEvery = startBufferEvery;
138613
        _this.buffers = [];
138614
        _this.count = 0;
138615
        return _this;
138616
    }
138617
    BufferSkipCountSubscriber.prototype._next = function (value) {
138618
        var _a = this, bufferSize = _a.bufferSize, startBufferEvery = _a.startBufferEvery, buffers = _a.buffers, count = _a.count;
138619
        this.count++;
138620
        if (count % startBufferEvery === 0) {
138621
            buffers.push([]);
138622
        }
138623
        for (var i = buffers.length; i--;) {
138624
            var buffer = buffers[i];
138625
            buffer.push(value);
138626
            if (buffer.length === bufferSize) {
138627
                buffers.splice(i, 1);
138628
                this.destination.next(buffer);
138629
            }
138630
        }
138631
    };
138632
    BufferSkipCountSubscriber.prototype._complete = function () {
138633
        var _a = this, buffers = _a.buffers, destination = _a.destination;
138634
        while (buffers.length > 0) {
138635
            var buffer = buffers.shift();
138636
            if (buffer.length > 0) {
138637
                destination.next(buffer);
138638
            }
138639
        }
138640
        _super.prototype._complete.call(this);
138641
    };
138642
    return BufferSkipCountSubscriber;
138643
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
138644
//# sourceMappingURL=bufferCount.js.map
138645
 
138646
 
138647
/***/ }),
138648
 
138649
/***/ "./node_modules/rxjs/_esm5/internal/operators/bufferTime.js":
138650
/*!******************************************************************!*\
138651
  !*** ./node_modules/rxjs/_esm5/internal/operators/bufferTime.js ***!
138652
  \******************************************************************/
138653
/*! exports provided: bufferTime */
138654
/***/ (function(module, __webpack_exports__, __webpack_require__) {
138655
 
138656
"use strict";
138657
__webpack_require__.r(__webpack_exports__);
138658
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return bufferTime; });
138659
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
138660
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/async */ "./node_modules/rxjs/_esm5/internal/scheduler/async.js");
138661
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
138662
/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/isScheduler */ "./node_modules/rxjs/_esm5/internal/util/isScheduler.js");
138663
/** PURE_IMPORTS_START tslib,_scheduler_async,_Subscriber,_util_isScheduler PURE_IMPORTS_END */
138664
 
138665
 
138666
 
138667
 
138668
/* tslint:enable:max-line-length */
138669
/**
138670
 * Buffers the source Observable values for a specific time period.
138671
 *
138672
 * <span class="informal">Collects values from the past as an array, and emits
138673
 * those arrays periodically in time.</span>
138674
 *
138675
 * <img src="./img/bufferTime.png" width="100%">
138676
 *
138677
 * Buffers values from the source for a specific time duration `bufferTimeSpan`.
138678
 * Unless the optional argument `bufferCreationInterval` is given, it emits and
138679
 * resets the buffer every `bufferTimeSpan` milliseconds. If
138680
 * `bufferCreationInterval` is given, this operator opens the buffer every
138681
 * `bufferCreationInterval` milliseconds and closes (emits and resets) the
138682
 * buffer every `bufferTimeSpan` milliseconds. When the optional argument
138683
 * `maxBufferSize` is specified, the buffer will be closed either after
138684
 * `bufferTimeSpan` milliseconds or when it contains `maxBufferSize` elements.
138685
 *
138686
 * @example <caption>Every second, emit an array of the recent click events</caption>
138687
 * var clicks = Rx.Observable.fromEvent(document, 'click');
138688
 * var buffered = clicks.bufferTime(1000);
138689
 * buffered.subscribe(x => console.log(x));
138690
 *
138691
 * @example <caption>Every 5 seconds, emit the click events from the next 2 seconds</caption>
138692
 * var clicks = Rx.Observable.fromEvent(document, 'click');
138693
 * var buffered = clicks.bufferTime(2000, 5000);
138694
 * buffered.subscribe(x => console.log(x));
138695
 *
138696
 * @see {@link buffer}
138697
 * @see {@link bufferCount}
138698
 * @see {@link bufferToggle}
138699
 * @see {@link bufferWhen}
138700
 * @see {@link windowTime}
138701
 *
138702
 * @param {number} bufferTimeSpan The amount of time to fill each buffer array.
138703
 * @param {number} [bufferCreationInterval] The interval at which to start new
138704
 * buffers.
138705
 * @param {number} [maxBufferSize] The maximum buffer size.
138706
 * @param {Scheduler} [scheduler=async] The scheduler on which to schedule the
138707
 * intervals that determine buffer boundaries.
138708
 * @return {Observable<T[]>} An observable of arrays of buffered values.
138709
 * @method bufferTime
138710
 * @owner Observable
138711
 */
138712
function bufferTime(bufferTimeSpan) {
138713
    var length = arguments.length;
138714
    var scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
138715
    if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(arguments[arguments.length - 1])) {
138716
        scheduler = arguments[arguments.length - 1];
138717
        length--;
138718
    }
138719
    var bufferCreationInterval = null;
138720
    if (length >= 2) {
138721
        bufferCreationInterval = arguments[1];
138722
    }
138723
    var maxBufferSize = Number.POSITIVE_INFINITY;
138724
    if (length >= 3) {
138725
        maxBufferSize = arguments[2];
138726
    }
138727
    return function bufferTimeOperatorFunction(source) {
138728
        return source.lift(new BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler));
138729
    };
138730
}
138731
var BufferTimeOperator = /*@__PURE__*/ (function () {
138732
    function BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
138733
        this.bufferTimeSpan = bufferTimeSpan;
138734
        this.bufferCreationInterval = bufferCreationInterval;
138735
        this.maxBufferSize = maxBufferSize;
138736
        this.scheduler = scheduler;
138737
    }
138738
    BufferTimeOperator.prototype.call = function (subscriber, source) {
138739
        return source.subscribe(new BufferTimeSubscriber(subscriber, this.bufferTimeSpan, this.bufferCreationInterval, this.maxBufferSize, this.scheduler));
138740
    };
138741
    return BufferTimeOperator;
138742
}());
138743
var Context = /*@__PURE__*/ (function () {
138744
    function Context() {
138745
        this.buffer = [];
138746
    }
138747
    return Context;
138748
}());
138749
/**
138750
 * We need this JSDoc comment for affecting ESDoc.
138751
 * @ignore
138752
 * @extends {Ignored}
138753
 */
138754
var BufferTimeSubscriber = /*@__PURE__*/ (function (_super) {
138755
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferTimeSubscriber, _super);
138756
    function BufferTimeSubscriber(destination, bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
138757
        var _this = _super.call(this, destination) || this;
138758
        _this.bufferTimeSpan = bufferTimeSpan;
138759
        _this.bufferCreationInterval = bufferCreationInterval;
138760
        _this.maxBufferSize = maxBufferSize;
138761
        _this.scheduler = scheduler;
138762
        _this.contexts = [];
138763
        var context = _this.openContext();
138764
        _this.timespanOnly = bufferCreationInterval == null || bufferCreationInterval < 0;
138765
        if (_this.timespanOnly) {
138766
            var timeSpanOnlyState = { subscriber: _this, context: context, bufferTimeSpan: bufferTimeSpan };
138767
            _this.add(context.closeAction = scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
138768
        }
138769
        else {
138770
            var closeState = { subscriber: _this, context: context };
138771
            var creationState = { bufferTimeSpan: bufferTimeSpan, bufferCreationInterval: bufferCreationInterval, subscriber: _this, scheduler: scheduler };
138772
            _this.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, closeState));
138773
            _this.add(scheduler.schedule(dispatchBufferCreation, bufferCreationInterval, creationState));
138774
        }
138775
        return _this;
138776
    }
138777
    BufferTimeSubscriber.prototype._next = function (value) {
138778
        var contexts = this.contexts;
138779
        var len = contexts.length;
138780
        var filledBufferContext;
138781
        for (var i = 0; i < len; i++) {
138782
            var context_1 = contexts[i];
138783
            var buffer = context_1.buffer;
138784
            buffer.push(value);
138785
            if (buffer.length == this.maxBufferSize) {
138786
                filledBufferContext = context_1;
138787
            }
138788
        }
138789
        if (filledBufferContext) {
138790
            this.onBufferFull(filledBufferContext);
138791
        }
138792
    };
138793
    BufferTimeSubscriber.prototype._error = function (err) {
138794
        this.contexts.length = 0;
138795
        _super.prototype._error.call(this, err);
138796
    };
138797
    BufferTimeSubscriber.prototype._complete = function () {
138798
        var _a = this, contexts = _a.contexts, destination = _a.destination;
138799
        while (contexts.length > 0) {
138800
            var context_2 = contexts.shift();
138801
            destination.next(context_2.buffer);
138802
        }
138803
        _super.prototype._complete.call(this);
138804
    };
138805
    /** @deprecated This is an internal implementation detail, do not use. */
138806
    BufferTimeSubscriber.prototype._unsubscribe = function () {
138807
        this.contexts = null;
138808
    };
138809
    BufferTimeSubscriber.prototype.onBufferFull = function (context) {
138810
        this.closeContext(context);
138811
        var closeAction = context.closeAction;
138812
        closeAction.unsubscribe();
138813
        this.remove(closeAction);
138814
        if (!this.closed && this.timespanOnly) {
138815
            context = this.openContext();
138816
            var bufferTimeSpan = this.bufferTimeSpan;
138817
            var timeSpanOnlyState = { subscriber: this, context: context, bufferTimeSpan: bufferTimeSpan };
138818
            this.add(context.closeAction = this.scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
138819
        }
138820
    };
138821
    BufferTimeSubscriber.prototype.openContext = function () {
138822
        var context = new Context();
138823
        this.contexts.push(context);
138824
        return context;
138825
    };
138826
    BufferTimeSubscriber.prototype.closeContext = function (context) {
138827
        this.destination.next(context.buffer);
138828
        var contexts = this.contexts;
138829
        var spliceIndex = contexts ? contexts.indexOf(context) : -1;
138830
        if (spliceIndex >= 0) {
138831
            contexts.splice(contexts.indexOf(context), 1);
138832
        }
138833
    };
138834
    return BufferTimeSubscriber;
138835
}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]));
138836
function dispatchBufferTimeSpanOnly(state) {
138837
    var subscriber = state.subscriber;
138838
    var prevContext = state.context;
138839
    if (prevContext) {
138840
        subscriber.closeContext(prevContext);
138841
    }
138842
    if (!subscriber.closed) {
138843
        state.context = subscriber.openContext();
138844
        state.context.closeAction = this.schedule(state, state.bufferTimeSpan);
138845
    }
138846
}
138847
function dispatchBufferCreation(state) {
138848
    var bufferCreationInterval = state.bufferCreationInterval, bufferTimeSpan = state.bufferTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler;
138849
    var context = subscriber.openContext();
138850
    var action = this;
138851
    if (!subscriber.closed) {
138852
        subscriber.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, { subscriber: subscriber, context: context }));
138853
        action.schedule(state, bufferCreationInterval);
138854
    }
138855
}
138856
function dispatchBufferClose(arg) {
138857
    var subscriber = arg.subscriber, context = arg.context;
138858
    subscriber.closeContext(context);
138859
}
138860
//# sourceMappingURL=bufferTime.js.map
138861
 
138862
 
138863
/***/ }),
138864
 
138865
/***/ "./node_modules/rxjs/_esm5/internal/operators/bufferToggle.js":
138866
/*!********************************************************************!*\
138867
  !*** ./node_modules/rxjs/_esm5/internal/operators/bufferToggle.js ***!
138868
  \********************************************************************/
138869
/*! exports provided: bufferToggle */
138870
/***/ (function(module, __webpack_exports__, __webpack_require__) {
138871
 
138872
"use strict";
138873
__webpack_require__.r(__webpack_exports__);
138874
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return bufferToggle; });
138875
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
138876
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
138877
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
138878
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
138879
/** PURE_IMPORTS_START tslib,_Subscription,_util_subscribeToResult,_OuterSubscriber PURE_IMPORTS_END */
138880
 
138881
 
138882
 
138883
 
138884
/**
138885
 * Buffers the source Observable values starting from an emission from
138886
 * `openings` and ending when the output of `closingSelector` emits.
138887
 *
138888
 * <span class="informal">Collects values from the past as an array. Starts
138889
 * collecting only when `opening` emits, and calls the `closingSelector`
138890
 * function to get an Observable that tells when to close the buffer.</span>
138891
 *
138892
 * <img src="./img/bufferToggle.png" width="100%">
138893
 *
138894
 * Buffers values from the source by opening the buffer via signals from an
138895
 * Observable provided to `openings`, and closing and sending the buffers when
138896
 * a Subscribable or Promise returned by the `closingSelector` function emits.
138897
 *
138898
 * @example <caption>Every other second, emit the click events from the next 500ms</caption>
138899
 * var clicks = Rx.Observable.fromEvent(document, 'click');
138900
 * var openings = Rx.Observable.interval(1000);
138901
 * var buffered = clicks.bufferToggle(openings, i =>
138902
 *   i % 2 ? Rx.Observable.interval(500) : Rx.Observable.empty()
138903
 * );
138904
 * buffered.subscribe(x => console.log(x));
138905
 *
138906
 * @see {@link buffer}
138907
 * @see {@link bufferCount}
138908
 * @see {@link bufferTime}
138909
 * @see {@link bufferWhen}
138910
 * @see {@link windowToggle}
138911
 *
138912
 * @param {SubscribableOrPromise<O>} openings A Subscribable or Promise of notifications to start new
138913
 * buffers.
138914
 * @param {function(value: O): SubscribableOrPromise} closingSelector A function that takes
138915
 * the value emitted by the `openings` observable and returns a Subscribable or Promise,
138916
 * which, when it emits, signals that the associated buffer should be emitted
138917
 * and cleared.
138918
 * @return {Observable<T[]>} An observable of arrays of buffered values.
138919
 * @method bufferToggle
138920
 * @owner Observable
138921
 */
138922
function bufferToggle(openings, closingSelector) {
138923
    return function bufferToggleOperatorFunction(source) {
138924
        return source.lift(new BufferToggleOperator(openings, closingSelector));
138925
    };
138926
}
138927
var BufferToggleOperator = /*@__PURE__*/ (function () {
138928
    function BufferToggleOperator(openings, closingSelector) {
138929
        this.openings = openings;
138930
        this.closingSelector = closingSelector;
138931
    }
138932
    BufferToggleOperator.prototype.call = function (subscriber, source) {
138933
        return source.subscribe(new BufferToggleSubscriber(subscriber, this.openings, this.closingSelector));
138934
    };
138935
    return BufferToggleOperator;
138936
}());
138937
/**
138938
 * We need this JSDoc comment for affecting ESDoc.
138939
 * @ignore
138940
 * @extends {Ignored}
138941
 */
138942
var BufferToggleSubscriber = /*@__PURE__*/ (function (_super) {
138943
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferToggleSubscriber, _super);
138944
    function BufferToggleSubscriber(destination, openings, closingSelector) {
138945
        var _this = _super.call(this, destination) || this;
138946
        _this.openings = openings;
138947
        _this.closingSelector = closingSelector;
138948
        _this.contexts = [];
138949
        _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, openings));
138950
        return _this;
138951
    }
138952
    BufferToggleSubscriber.prototype._next = function (value) {
138953
        var contexts = this.contexts;
138954
        var len = contexts.length;
138955
        for (var i = 0; i < len; i++) {
138956
            contexts[i].buffer.push(value);
138957
        }
138958
    };
138959
    BufferToggleSubscriber.prototype._error = function (err) {
138960
        var contexts = this.contexts;
138961
        while (contexts.length > 0) {
138962
            var context_1 = contexts.shift();
138963
            context_1.subscription.unsubscribe();
138964
            context_1.buffer = null;
138965
            context_1.subscription = null;
138966
        }
138967
        this.contexts = null;
138968
        _super.prototype._error.call(this, err);
138969
    };
138970
    BufferToggleSubscriber.prototype._complete = function () {
138971
        var contexts = this.contexts;
138972
        while (contexts.length > 0) {
138973
            var context_2 = contexts.shift();
138974
            this.destination.next(context_2.buffer);
138975
            context_2.subscription.unsubscribe();
138976
            context_2.buffer = null;
138977
            context_2.subscription = null;
138978
        }
138979
        this.contexts = null;
138980
        _super.prototype._complete.call(this);
138981
    };
138982
    BufferToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
138983
        outerValue ? this.closeBuffer(outerValue) : this.openBuffer(innerValue);
138984
    };
138985
    BufferToggleSubscriber.prototype.notifyComplete = function (innerSub) {
138986
        this.closeBuffer(innerSub.context);
138987
    };
138988
    BufferToggleSubscriber.prototype.openBuffer = function (value) {
138989
        try {
138990
            var closingSelector = this.closingSelector;
138991
            var closingNotifier = closingSelector.call(this, value);
138992
            if (closingNotifier) {
138993
                this.trySubscribe(closingNotifier);
138994
            }
138995
        }
138996
        catch (err) {
138997
            this._error(err);
138998
        }
138999
    };
139000
    BufferToggleSubscriber.prototype.closeBuffer = function (context) {
139001
        var contexts = this.contexts;
139002
        if (contexts && context) {
139003
            var buffer = context.buffer, subscription = context.subscription;
139004
            this.destination.next(buffer);
139005
            contexts.splice(contexts.indexOf(context), 1);
139006
            this.remove(subscription);
139007
            subscription.unsubscribe();
139008
        }
139009
    };
139010
    BufferToggleSubscriber.prototype.trySubscribe = function (closingNotifier) {
139011
        var contexts = this.contexts;
139012
        var buffer = [];
139013
        var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
139014
        var context = { buffer: buffer, subscription: subscription };
139015
        contexts.push(context);
139016
        var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, closingNotifier, context);
139017
        if (!innerSubscription || innerSubscription.closed) {
139018
            this.closeBuffer(context);
139019
        }
139020
        else {
139021
            innerSubscription.context = context;
139022
            this.add(innerSubscription);
139023
            subscription.add(innerSubscription);
139024
        }
139025
    };
139026
    return BufferToggleSubscriber;
139027
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
139028
//# sourceMappingURL=bufferToggle.js.map
139029
 
139030
 
139031
/***/ }),
139032
 
139033
/***/ "./node_modules/rxjs/_esm5/internal/operators/bufferWhen.js":
139034
/*!******************************************************************!*\
139035
  !*** ./node_modules/rxjs/_esm5/internal/operators/bufferWhen.js ***!
139036
  \******************************************************************/
139037
/*! exports provided: bufferWhen */
139038
/***/ (function(module, __webpack_exports__, __webpack_require__) {
139039
 
139040
"use strict";
139041
__webpack_require__.r(__webpack_exports__);
139042
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return bufferWhen; });
139043
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
139044
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
139045
/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/tryCatch */ "./node_modules/rxjs/_esm5/internal/util/tryCatch.js");
139046
/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/errorObject */ "./node_modules/rxjs/_esm5/internal/util/errorObject.js");
139047
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
139048
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
139049
/** PURE_IMPORTS_START tslib,_Subscription,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
139050
 
139051
 
139052
 
139053
 
139054
 
139055
 
139056
/**
139057
 * Buffers the source Observable values, using a factory function of closing
139058
 * Observables to determine when to close, emit, and reset the buffer.
139059
 *
139060
 * <span class="informal">Collects values from the past as an array. When it
139061
 * starts collecting values, it calls a function that returns an Observable that
139062
 * tells when to close the buffer and restart collecting.</span>
139063
 *
139064
 * <img src="./img/bufferWhen.png" width="100%">
139065
 *
139066
 * Opens a buffer immediately, then closes the buffer when the observable
139067
 * returned by calling `closingSelector` function emits a value. When it closes
139068
 * the buffer, it immediately opens a new buffer and repeats the process.
139069
 *
139070
 * @example <caption>Emit an array of the last clicks every [1-5] random seconds</caption>
139071
 * var clicks = Rx.Observable.fromEvent(document, 'click');
139072
 * var buffered = clicks.bufferWhen(() =>
139073
 *   Rx.Observable.interval(1000 + Math.random() * 4000)
139074
 * );
139075
 * buffered.subscribe(x => console.log(x));
139076
 *
139077
 * @see {@link buffer}
139078
 * @see {@link bufferCount}
139079
 * @see {@link bufferTime}
139080
 * @see {@link bufferToggle}
139081
 * @see {@link windowWhen}
139082
 *
139083
 * @param {function(): Observable} closingSelector A function that takes no
139084
 * arguments and returns an Observable that signals buffer closure.
139085
 * @return {Observable<T[]>} An observable of arrays of buffered values.
139086
 * @method bufferWhen
139087
 * @owner Observable
139088
 */
139089
function bufferWhen(closingSelector) {
139090
    return function (source) {
139091
        return source.lift(new BufferWhenOperator(closingSelector));
139092
    };
139093
}
139094
var BufferWhenOperator = /*@__PURE__*/ (function () {
139095
    function BufferWhenOperator(closingSelector) {
139096
        this.closingSelector = closingSelector;
139097
    }
139098
    BufferWhenOperator.prototype.call = function (subscriber, source) {
139099
        return source.subscribe(new BufferWhenSubscriber(subscriber, this.closingSelector));
139100
    };
139101
    return BufferWhenOperator;
139102
}());
139103
/**
139104
 * We need this JSDoc comment for affecting ESDoc.
139105
 * @ignore
139106
 * @extends {Ignored}
139107
 */
139108
var BufferWhenSubscriber = /*@__PURE__*/ (function (_super) {
139109
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferWhenSubscriber, _super);
139110
    function BufferWhenSubscriber(destination, closingSelector) {
139111
        var _this = _super.call(this, destination) || this;
139112
        _this.closingSelector = closingSelector;
139113
        _this.subscribing = false;
139114
        _this.openBuffer();
139115
        return _this;
139116
    }
139117
    BufferWhenSubscriber.prototype._next = function (value) {
139118
        this.buffer.push(value);
139119
    };
139120
    BufferWhenSubscriber.prototype._complete = function () {
139121
        var buffer = this.buffer;
139122
        if (buffer) {
139123
            this.destination.next(buffer);
139124
        }
139125
        _super.prototype._complete.call(this);
139126
    };
139127
    /** @deprecated This is an internal implementation detail, do not use. */
139128
    BufferWhenSubscriber.prototype._unsubscribe = function () {
139129
        this.buffer = null;
139130
        this.subscribing = false;
139131
    };
139132
    BufferWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
139133
        this.openBuffer();
139134
    };
139135
    BufferWhenSubscriber.prototype.notifyComplete = function () {
139136
        if (this.subscribing) {
139137
            this.complete();
139138
        }
139139
        else {
139140
            this.openBuffer();
139141
        }
139142
    };
139143
    BufferWhenSubscriber.prototype.openBuffer = function () {
139144
        var closingSubscription = this.closingSubscription;
139145
        if (closingSubscription) {
139146
            this.remove(closingSubscription);
139147
            closingSubscription.unsubscribe();
139148
        }
139149
        var buffer = this.buffer;
139150
        if (this.buffer) {
139151
            this.destination.next(buffer);
139152
        }
139153
        this.buffer = [];
139154
        var closingNotifier = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_2__["tryCatch"])(this.closingSelector)();
139155
        if (closingNotifier === _util_errorObject__WEBPACK_IMPORTED_MODULE_3__["errorObject"]) {
139156
            this.error(_util_errorObject__WEBPACK_IMPORTED_MODULE_3__["errorObject"].e);
139157
        }
139158
        else {
139159
            closingSubscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
139160
            this.closingSubscription = closingSubscription;
139161
            this.add(closingSubscription);
139162
            this.subscribing = true;
139163
            closingSubscription.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__["subscribeToResult"])(this, closingNotifier));
139164
            this.subscribing = false;
139165
        }
139166
    };
139167
    return BufferWhenSubscriber;
139168
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__["OuterSubscriber"]));
139169
//# sourceMappingURL=bufferWhen.js.map
139170
 
139171
 
139172
/***/ }),
139173
 
139174
/***/ "./node_modules/rxjs/_esm5/internal/operators/catchError.js":
139175
/*!******************************************************************!*\
139176
  !*** ./node_modules/rxjs/_esm5/internal/operators/catchError.js ***!
139177
  \******************************************************************/
139178
/*! exports provided: catchError */
139179
/***/ (function(module, __webpack_exports__, __webpack_require__) {
139180
 
139181
"use strict";
139182
__webpack_require__.r(__webpack_exports__);
139183
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return catchError; });
139184
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
139185
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
139186
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
139187
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
139188
 
139189
 
139190
 
139191
/**
139192
 * Catches errors on the observable to be handled by returning a new observable or throwing an error.
139193
 *
139194
 * <img src="./img/catch.png" width="100%">
139195
 *
139196
 * @example <caption>Continues with a different Observable when there's an error</caption>
139197
 *
139198
 * Observable.of(1, 2, 3, 4, 5)
139199
 *   .map(n => {
139200
 * 	   if (n == 4) {
139201
 * 	     throw 'four!';
139202
 *     }
139203
 *	   return n;
139204
 *   })
139205
 *   .catch(err => Observable.of('I', 'II', 'III', 'IV', 'V'))
139206
 *   .subscribe(x => console.log(x));
139207
 *   // 1, 2, 3, I, II, III, IV, V
139208
 *
139209
 * @example <caption>Retries the caught source Observable again in case of error, similar to retry() operator</caption>
139210
 *
139211
 * Observable.of(1, 2, 3, 4, 5)
139212
 *   .map(n => {
139213
 * 	   if (n === 4) {
139214
 * 	     throw 'four!';
139215
 *     }
139216
 * 	   return n;
139217
 *   })
139218
 *   .catch((err, caught) => caught)
139219
 *   .take(30)
139220
 *   .subscribe(x => console.log(x));
139221
 *   // 1, 2, 3, 1, 2, 3, ...
139222
 *
139223
 * @example <caption>Throws a new error when the source Observable throws an error</caption>
139224
 *
139225
 * Observable.of(1, 2, 3, 4, 5)
139226
 *   .map(n => {
139227
 *     if (n == 4) {
139228
 *       throw 'four!';
139229
 *     }
139230
 *     return n;
139231
 *   })
139232
 *   .catch(err => {
139233
 *     throw 'error in source. Details: ' + err;
139234
 *   })
139235
 *   .subscribe(
139236
 *     x => console.log(x),
139237
 *     err => console.log(err)
139238
 *   );
139239
 *   // 1, 2, 3, error in source. Details: four!
139240
 *
139241
 * @param {function} selector a function that takes as arguments `err`, which is the error, and `caught`, which
139242
 *  is the source observable, in case you'd like to "retry" that observable by returning it again. Whatever observable
139243
 *  is returned by the `selector` will be used to continue the observable chain.
139244
 * @return {Observable} An observable that originates from either the source or the observable returned by the
139245
 *  catch `selector` function.
139246
 * @name catchError
139247
 */
139248
function catchError(selector) {
139249
    return function catchErrorOperatorFunction(source) {
139250
        var operator = new CatchOperator(selector);
139251
        var caught = source.lift(operator);
139252
        return (operator.caught = caught);
139253
    };
139254
}
139255
var CatchOperator = /*@__PURE__*/ (function () {
139256
    function CatchOperator(selector) {
139257
        this.selector = selector;
139258
    }
139259
    CatchOperator.prototype.call = function (subscriber, source) {
139260
        return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught));
139261
    };
139262
    return CatchOperator;
139263
}());
139264
/**
139265
 * We need this JSDoc comment for affecting ESDoc.
139266
 * @ignore
139267
 * @extends {Ignored}
139268
 */
139269
var CatchSubscriber = /*@__PURE__*/ (function (_super) {
139270
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CatchSubscriber, _super);
139271
    function CatchSubscriber(destination, selector, caught) {
139272
        var _this = _super.call(this, destination) || this;
139273
        _this.selector = selector;
139274
        _this.caught = caught;
139275
        return _this;
139276
    }
139277
    // NOTE: overriding `error` instead of `_error` because we don't want
139278
    // to have this flag this subscriber as `isStopped`. We can mimic the
139279
    // behavior of the RetrySubscriber (from the `retry` operator), where
139280
    // we unsubscribe from our source chain, reset our Subscriber flags,
139281
    // then subscribe to the selector result.
139282
    CatchSubscriber.prototype.error = function (err) {
139283
        if (!this.isStopped) {
139284
            var result = void 0;
139285
            try {
139286
                result = this.selector(err, this.caught);
139287
            }
139288
            catch (err2) {
139289
                _super.prototype.error.call(this, err2);
139290
                return;
139291
            }
139292
            this._unsubscribeAndRecycle();
139293
            this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, result));
139294
        }
139295
    };
139296
    return CatchSubscriber;
139297
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
139298
//# sourceMappingURL=catchError.js.map
139299
 
139300
 
139301
/***/ }),
139302
 
139303
/***/ "./node_modules/rxjs/_esm5/internal/operators/combineAll.js":
139304
/*!******************************************************************!*\
139305
  !*** ./node_modules/rxjs/_esm5/internal/operators/combineAll.js ***!
139306
  \******************************************************************/
139307
/*! exports provided: combineAll */
139308
/***/ (function(module, __webpack_exports__, __webpack_require__) {
139309
 
139310
"use strict";
139311
__webpack_require__.r(__webpack_exports__);
139312
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return combineAll; });
139313
/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/combineLatest */ "./node_modules/rxjs/_esm5/internal/observable/combineLatest.js");
139314
/** PURE_IMPORTS_START _observable_combineLatest PURE_IMPORTS_END */
139315
 
139316
function combineAll(project) {
139317
    return function (source) { return source.lift(new _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__["CombineLatestOperator"](project)); };
139318
}
139319
//# sourceMappingURL=combineAll.js.map
139320
 
139321
 
139322
/***/ }),
139323
 
139324
/***/ "./node_modules/rxjs/_esm5/internal/operators/combineLatest.js":
139325
/*!*********************************************************************!*\
139326
  !*** ./node_modules/rxjs/_esm5/internal/operators/combineLatest.js ***!
139327
  \*********************************************************************/
139328
/*! exports provided: combineLatest */
139329
/***/ (function(module, __webpack_exports__, __webpack_require__) {
139330
 
139331
"use strict";
139332
__webpack_require__.r(__webpack_exports__);
139333
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return combineLatest; });
139334
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isArray */ "./node_modules/rxjs/_esm5/internal/util/isArray.js");
139335
/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/combineLatest */ "./node_modules/rxjs/_esm5/internal/observable/combineLatest.js");
139336
/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/from */ "./node_modules/rxjs/_esm5/internal/observable/from.js");
139337
/** PURE_IMPORTS_START _util_isArray,_observable_combineLatest,_observable_from PURE_IMPORTS_END */
139338
 
139339
 
139340
 
139341
var none = {};
139342
/* tslint:enable:max-line-length */
139343
/**
139344
 * @deprecated Deprecated in favor of static combineLatest.
139345
 */
139346
function combineLatest() {
139347
    var observables = [];
139348
    for (var _i = 0; _i < arguments.length; _i++) {
139349
        observables[_i] = arguments[_i];
139350
    }
139351
    var project = null;
139352
    if (typeof observables[observables.length - 1] === 'function') {
139353
        project = observables.pop();
139354
    }
139355
    // if the first and only other argument besides the resultSelector is an array
139356
    // assume it's been called with `combineLatest([obs1, obs2, obs3], project)`
139357
    if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) {
139358
        observables = observables[0].slice();
139359
    }
139360
    return function (source) { return source.lift.call(Object(_observable_from__WEBPACK_IMPORTED_MODULE_2__["from"])([source].concat(observables)), new _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__["CombineLatestOperator"](project)); };
139361
}
139362
//# sourceMappingURL=combineLatest.js.map
139363
 
139364
 
139365
/***/ }),
139366
 
139367
/***/ "./node_modules/rxjs/_esm5/internal/operators/concat.js":
139368
/*!**************************************************************!*\
139369
  !*** ./node_modules/rxjs/_esm5/internal/operators/concat.js ***!
139370
  \**************************************************************/
139371
/*! exports provided: concat */
139372
/***/ (function(module, __webpack_exports__, __webpack_require__) {
139373
 
139374
"use strict";
139375
__webpack_require__.r(__webpack_exports__);
139376
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return concat; });
139377
/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/concat */ "./node_modules/rxjs/_esm5/internal/observable/concat.js");
139378
/** PURE_IMPORTS_START _observable_concat PURE_IMPORTS_END */
139379
 
139380
/* tslint:enable:max-line-length */
139381
/**
139382
 * @deprecated Deprecated in favor of static concat.
139383
 */
139384
function concat() {
139385
    var observables = [];
139386
    for (var _i = 0; _i < arguments.length; _i++) {
139387
        observables[_i] = arguments[_i];
139388
    }
139389
    return function (source) { return source.lift.call(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"].apply(void 0, [source].concat(observables))); };
139390
}
139391
//# sourceMappingURL=concat.js.map
139392
 
139393
 
139394
/***/ }),
139395
 
139396
/***/ "./node_modules/rxjs/_esm5/internal/operators/concatAll.js":
139397
/*!*****************************************************************!*\
139398
  !*** ./node_modules/rxjs/_esm5/internal/operators/concatAll.js ***!
139399
  \*****************************************************************/
139400
/*! exports provided: concatAll */
139401
/***/ (function(module, __webpack_exports__, __webpack_require__) {
139402
 
139403
"use strict";
139404
__webpack_require__.r(__webpack_exports__);
139405
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return concatAll; });
139406
/* harmony import */ var _mergeAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mergeAll */ "./node_modules/rxjs/_esm5/internal/operators/mergeAll.js");
139407
/** PURE_IMPORTS_START _mergeAll PURE_IMPORTS_END */
139408
 
139409
/**
139410
 * Converts a higher-order Observable into a first-order Observable by
139411
 * concatenating the inner Observables in order.
139412
 *
139413
 * <span class="informal">Flattens an Observable-of-Observables by putting one
139414
 * inner Observable after the other.</span>
139415
 *
139416
 * <img src="./img/concatAll.png" width="100%">
139417
 *
139418
 * Joins every Observable emitted by the source (a higher-order Observable), in
139419
 * a serial fashion. It subscribes to each inner Observable only after the
139420
 * previous inner Observable has completed, and merges all of their values into
139421
 * the returned observable.
139422
 *
139423
 * __Warning:__ If the source Observable emits Observables quickly and
139424
 * endlessly, and the inner Observables it emits generally complete slower than
139425
 * the source emits, you can run into memory issues as the incoming Observables
139426
 * collect in an unbounded buffer.
139427
 *
139428
 * Note: `concatAll` is equivalent to `mergeAll` with concurrency parameter set
139429
 * to `1`.
139430
 *
139431
 * @example <caption>For each click event, tick every second from 0 to 3, with no concurrency</caption>
139432
 * var clicks = Rx.Observable.fromEvent(document, 'click');
139433
 * var higherOrder = clicks.map(ev => Rx.Observable.interval(1000).take(4));
139434
 * var firstOrder = higherOrder.concatAll();
139435
 * firstOrder.subscribe(x => console.log(x));
139436
 *
139437
 * // Results in the following:
139438
 * // (results are not concurrent)
139439
 * // For every click on the "document" it will emit values 0 to 3 spaced
139440
 * // on a 1000ms interval
139441
 * // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3
139442
 *
139443
 * @see {@link combineAll}
139444
 * @see {@link concat}
139445
 * @see {@link concatMap}
139446
 * @see {@link concatMapTo}
139447
 * @see {@link exhaust}
139448
 * @see {@link mergeAll}
139449
 * @see {@link switch}
139450
 * @see {@link zipAll}
139451
 *
139452
 * @return {Observable} An Observable emitting values from all the inner
139453
 * Observables concatenated.
139454
 * @method concatAll
139455
 * @owner Observable
139456
 */
139457
function concatAll() {
139458
    return Object(_mergeAll__WEBPACK_IMPORTED_MODULE_0__["mergeAll"])(1);
139459
}
139460
//# sourceMappingURL=concatAll.js.map
139461
 
139462
 
139463
/***/ }),
139464
 
139465
/***/ "./node_modules/rxjs/_esm5/internal/operators/concatMap.js":
139466
/*!*****************************************************************!*\
139467
  !*** ./node_modules/rxjs/_esm5/internal/operators/concatMap.js ***!
139468
  \*****************************************************************/
139469
/*! exports provided: concatMap */
139470
/***/ (function(module, __webpack_exports__, __webpack_require__) {
139471
 
139472
"use strict";
139473
__webpack_require__.r(__webpack_exports__);
139474
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return concatMap; });
139475
/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mergeMap */ "./node_modules/rxjs/_esm5/internal/operators/mergeMap.js");
139476
/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */
139477
 
139478
/* tslint:enable:max-line-length */
139479
/**
139480
 * Projects each source value to an Observable which is merged in the output
139481
 * Observable, in a serialized fashion waiting for each one to complete before
139482
 * merging the next.
139483
 *
139484
 * <span class="informal">Maps each value to an Observable, then flattens all of
139485
 * these inner Observables using {@link concatAll}.</span>
139486
 *
139487
 * <img src="./img/concatMap.png" width="100%">
139488
 *
139489
 * Returns an Observable that emits items based on applying a function that you
139490
 * supply to each item emitted by the source Observable, where that function
139491
 * returns an (so-called "inner") Observable. Each new inner Observable is
139492
 * concatenated with the previous inner Observable.
139493
 *
139494
 * __Warning:__ if source values arrive endlessly and faster than their
139495
 * corresponding inner Observables can complete, it will result in memory issues
139496
 * as inner Observables amass in an unbounded buffer waiting for their turn to
139497
 * be subscribed to.
139498
 *
139499
 * Note: `concatMap` is equivalent to `mergeMap` with concurrency parameter set
139500
 * to `1`.
139501
 *
139502
 * @example <caption>For each click event, tick every second from 0 to 3, with no concurrency</caption>
139503
 * var clicks = Rx.Observable.fromEvent(document, 'click');
139504
 * var result = clicks.concatMap(ev => Rx.Observable.interval(1000).take(4));
139505
 * result.subscribe(x => console.log(x));
139506
 *
139507
 * // Results in the following:
139508
 * // (results are not concurrent)
139509
 * // For every click on the "document" it will emit values 0 to 3 spaced
139510
 * // on a 1000ms interval
139511
 * // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3
139512
 *
139513
 * @see {@link concat}
139514
 * @see {@link concatAll}
139515
 * @see {@link concatMapTo}
139516
 * @see {@link exhaustMap}
139517
 * @see {@link mergeMap}
139518
 * @see {@link switchMap}
139519
 *
139520
 * @param {function(value: T, ?index: number): ObservableInput} project A function
139521
 * that, when applied to an item emitted by the source Observable, returns an
139522
 * Observable.
139523
 * @return {Observable} An Observable that emits the result of applying the
139524
 * projection function (and the optional `resultSelector`) to each item emitted
139525
 * by the source Observable and taking values from each projected inner
139526
 * Observable sequentially.
139527
 * @method concatMap
139528
 * @owner Observable
139529
 */
139530
function concatMap(project, resultSelector) {
139531
    return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(project, resultSelector, 1);
139532
}
139533
//# sourceMappingURL=concatMap.js.map
139534
 
139535
 
139536
/***/ }),
139537
 
139538
/***/ "./node_modules/rxjs/_esm5/internal/operators/concatMapTo.js":
139539
/*!*******************************************************************!*\
139540
  !*** ./node_modules/rxjs/_esm5/internal/operators/concatMapTo.js ***!
139541
  \*******************************************************************/
139542
/*! exports provided: concatMapTo */
139543
/***/ (function(module, __webpack_exports__, __webpack_require__) {
139544
 
139545
"use strict";
139546
__webpack_require__.r(__webpack_exports__);
139547
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return concatMapTo; });
139548
/* harmony import */ var _concatMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./concatMap */ "./node_modules/rxjs/_esm5/internal/operators/concatMap.js");
139549
/** PURE_IMPORTS_START _concatMap PURE_IMPORTS_END */
139550
 
139551
/* tslint:enable:max-line-length */
139552
/**
139553
 * Projects each source value to the same Observable which is merged multiple
139554
 * times in a serialized fashion on the output Observable.
139555
 *
139556
 * <span class="informal">It's like {@link concatMap}, but maps each value
139557
 * always to the same inner Observable.</span>
139558
 *
139559
 * <img src="./img/concatMapTo.png" width="100%">
139560
 *
139561
 * Maps each source value to the given Observable `innerObservable` regardless
139562
 * of the source value, and then flattens those resulting Observables into one
139563
 * single Observable, which is the output Observable. Each new `innerObservable`
139564
 * instance emitted on the output Observable is concatenated with the previous
139565
 * `innerObservable` instance.
139566
 *
139567
 * __Warning:__ if source values arrive endlessly and faster than their
139568
 * corresponding inner Observables can complete, it will result in memory issues
139569
 * as inner Observables amass in an unbounded buffer waiting for their turn to
139570
 * be subscribed to.
139571
 *
139572
 * Note: `concatMapTo` is equivalent to `mergeMapTo` with concurrency parameter
139573
 * set to `1`.
139574
 *
139575
 * @example <caption>For each click event, tick every second from 0 to 3, with no concurrency</caption>
139576
 * var clicks = Rx.Observable.fromEvent(document, 'click');
139577
 * var result = clicks.concatMapTo(Rx.Observable.interval(1000).take(4));
139578
 * result.subscribe(x => console.log(x));
139579
 *
139580
 * // Results in the following:
139581
 * // (results are not concurrent)
139582
 * // For every click on the "document" it will emit values 0 to 3 spaced
139583
 * // on a 1000ms interval
139584
 * // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3
139585
 *
139586
 * @see {@link concat}
139587
 * @see {@link concatAll}
139588
 * @see {@link concatMap}
139589
 * @see {@link mergeMapTo}
139590
 * @see {@link switchMapTo}
139591
 *
139592
 * @param {ObservableInput} innerObservable An Observable to replace each value from
139593
 * the source Observable.
139594
 * @return {Observable} An observable of values merged together by joining the
139595
 * passed observable with itself, one after the other, for each value emitted
139596
 * from the source.
139597
 * @method concatMapTo
139598
 * @owner Observable
139599
 */
139600
function concatMapTo(innerObservable, resultSelector) {
139601
    return Object(_concatMap__WEBPACK_IMPORTED_MODULE_0__["concatMap"])(function () { return innerObservable; }, resultSelector);
139602
}
139603
//# sourceMappingURL=concatMapTo.js.map
139604
 
139605
 
139606
/***/ }),
139607
 
139608
/***/ "./node_modules/rxjs/_esm5/internal/operators/count.js":
139609
/*!*************************************************************!*\
139610
  !*** ./node_modules/rxjs/_esm5/internal/operators/count.js ***!
139611
  \*************************************************************/
139612
/*! exports provided: count */
139613
/***/ (function(module, __webpack_exports__, __webpack_require__) {
139614
 
139615
"use strict";
139616
__webpack_require__.r(__webpack_exports__);
139617
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "count", function() { return count; });
139618
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
139619
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
139620
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
139621
 
139622
 
139623
/**
139624
 * Counts the number of emissions on the source and emits that number when the
139625
 * source completes.
139626
 *
139627
 * <span class="informal">Tells how many values were emitted, when the source
139628
 * completes.</span>
139629
 *
139630
 * <img src="./img/count.png" width="100%">
139631
 *
139632
 * `count` transforms an Observable that emits values into an Observable that
139633
 * emits a single value that represents the number of values emitted by the
139634
 * source Observable. If the source Observable terminates with an error, `count`
139635
 * will pass this error notification along without emitting a value first. If
139636
 * the source Observable does not terminate at all, `count` will neither emit
139637
 * a value nor terminate. This operator takes an optional `predicate` function
139638
 * as argument, in which case the output emission will represent the number of
139639
 * source values that matched `true` with the `predicate`.
139640
 *
139641
 * @example <caption>Counts how many seconds have passed before the first click happened</caption>
139642
 * var seconds = Rx.Observable.interval(1000);
139643
 * var clicks = Rx.Observable.fromEvent(document, 'click');
139644
 * var secondsBeforeClick = seconds.takeUntil(clicks);
139645
 * var result = secondsBeforeClick.count();
139646
 * result.subscribe(x => console.log(x));
139647
 *
139648
 * @example <caption>Counts how many odd numbers are there between 1 and 7</caption>
139649
 * var numbers = Rx.Observable.range(1, 7);
139650
 * var result = numbers.count(i => i % 2 === 1);
139651
 * result.subscribe(x => console.log(x));
139652
 *
139653
 * // Results in:
139654
 * // 4
139655
 *
139656
 * @see {@link max}
139657
 * @see {@link min}
139658
 * @see {@link reduce}
139659
 *
139660
 * @param {function(value: T, i: number, source: Observable<T>): boolean} [predicate] A
139661
 * boolean function to select what values are to be counted. It is provided with
139662
 * arguments of:
139663
 * - `value`: the value from the source Observable.
139664
 * - `index`: the (zero-based) "index" of the value from the source Observable.
139665
 * - `source`: the source Observable instance itself.
139666
 * @return {Observable} An Observable of one number that represents the count as
139667
 * described above.
139668
 * @method count
139669
 * @owner Observable
139670
 */
139671
function count(predicate) {
139672
    return function (source) { return source.lift(new CountOperator(predicate, source)); };
139673
}
139674
var CountOperator = /*@__PURE__*/ (function () {
139675
    function CountOperator(predicate, source) {
139676
        this.predicate = predicate;
139677
        this.source = source;
139678
    }
139679
    CountOperator.prototype.call = function (subscriber, source) {
139680
        return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source));
139681
    };
139682
    return CountOperator;
139683
}());
139684
/**
139685
 * We need this JSDoc comment for affecting ESDoc.
139686
 * @ignore
139687
 * @extends {Ignored}
139688
 */
139689
var CountSubscriber = /*@__PURE__*/ (function (_super) {
139690
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CountSubscriber, _super);
139691
    function CountSubscriber(destination, predicate, source) {
139692
        var _this = _super.call(this, destination) || this;
139693
        _this.predicate = predicate;
139694
        _this.source = source;
139695
        _this.count = 0;
139696
        _this.index = 0;
139697
        return _this;
139698
    }
139699
    CountSubscriber.prototype._next = function (value) {
139700
        if (this.predicate) {
139701
            this._tryPredicate(value);
139702
        }
139703
        else {
139704
            this.count++;
139705
        }
139706
    };
139707
    CountSubscriber.prototype._tryPredicate = function (value) {
139708
        var result;
139709
        try {
139710
            result = this.predicate(value, this.index++, this.source);
139711
        }
139712
        catch (err) {
139713
            this.destination.error(err);
139714
            return;
139715
        }
139716
        if (result) {
139717
            this.count++;
139718
        }
139719
    };
139720
    CountSubscriber.prototype._complete = function () {
139721
        this.destination.next(this.count);
139722
        this.destination.complete();
139723
    };
139724
    return CountSubscriber;
139725
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
139726
//# sourceMappingURL=count.js.map
139727
 
139728
 
139729
/***/ }),
139730
 
139731
/***/ "./node_modules/rxjs/_esm5/internal/operators/debounce.js":
139732
/*!****************************************************************!*\
139733
  !*** ./node_modules/rxjs/_esm5/internal/operators/debounce.js ***!
139734
  \****************************************************************/
139735
/*! exports provided: debounce */
139736
/***/ (function(module, __webpack_exports__, __webpack_require__) {
139737
 
139738
"use strict";
139739
__webpack_require__.r(__webpack_exports__);
139740
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return debounce; });
139741
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
139742
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
139743
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
139744
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
139745
 
139746
 
139747
 
139748
/**
139749
 * Emits a value from the source Observable only after a particular time span
139750
 * determined by another Observable has passed without another source emission.
139751
 *
139752
 * <span class="informal">It's like {@link debounceTime}, but the time span of
139753
 * emission silence is determined by a second Observable.</span>
139754
 *
139755
 * <img src="./img/debounce.png" width="100%">
139756
 *
139757
 * `debounce` delays values emitted by the source Observable, but drops previous
139758
 * pending delayed emissions if a new value arrives on the source Observable.
139759
 * This operator keeps track of the most recent value from the source
139760
 * Observable, and spawns a duration Observable by calling the
139761
 * `durationSelector` function. The value is emitted only when the duration
139762
 * Observable emits a value or completes, and if no other value was emitted on
139763
 * the source Observable since the duration Observable was spawned. If a new
139764
 * value appears before the duration Observable emits, the previous value will
139765
 * be dropped and will not be emitted on the output Observable.
139766
 *
139767
 * Like {@link debounceTime}, this is a rate-limiting operator, and also a
139768
 * delay-like operator since output emissions do not necessarily occur at the
139769
 * same time as they did on the source Observable.
139770
 *
139771
 * @example <caption>Emit the most recent click after a burst of clicks</caption>
139772
 * var clicks = Rx.Observable.fromEvent(document, 'click');
139773
 * var result = clicks.debounce(() => Rx.Observable.interval(1000));
139774
 * result.subscribe(x => console.log(x));
139775
 *
139776
 * @see {@link audit}
139777
 * @see {@link debounceTime}
139778
 * @see {@link delayWhen}
139779
 * @see {@link throttle}
139780
 *
139781
 * @param {function(value: T): SubscribableOrPromise} durationSelector A function
139782
 * that receives a value from the source Observable, for computing the timeout
139783
 * duration for each source value, returned as an Observable or a Promise.
139784
 * @return {Observable} An Observable that delays the emissions of the source
139785
 * Observable by the specified duration Observable returned by
139786
 * `durationSelector`, and may drop some values if they occur too frequently.
139787
 * @method debounce
139788
 * @owner Observable
139789
 */
139790
function debounce(durationSelector) {
139791
    return function (source) { return source.lift(new DebounceOperator(durationSelector)); };
139792
}
139793
var DebounceOperator = /*@__PURE__*/ (function () {
139794
    function DebounceOperator(durationSelector) {
139795
        this.durationSelector = durationSelector;
139796
    }
139797
    DebounceOperator.prototype.call = function (subscriber, source) {
139798
        return source.subscribe(new DebounceSubscriber(subscriber, this.durationSelector));
139799
    };
139800
    return DebounceOperator;
139801
}());
139802
/**
139803
 * We need this JSDoc comment for affecting ESDoc.
139804
 * @ignore
139805
 * @extends {Ignored}
139806
 */
139807
var DebounceSubscriber = /*@__PURE__*/ (function (_super) {
139808
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DebounceSubscriber, _super);
139809
    function DebounceSubscriber(destination, durationSelector) {
139810
        var _this = _super.call(this, destination) || this;
139811
        _this.durationSelector = durationSelector;
139812
        _this.hasValue = false;
139813
        _this.durationSubscription = null;
139814
        return _this;
139815
    }
139816
    DebounceSubscriber.prototype._next = function (value) {
139817
        try {
139818
            var result = this.durationSelector.call(this, value);
139819
            if (result) {
139820
                this._tryNext(value, result);
139821
            }
139822
        }
139823
        catch (err) {
139824
            this.destination.error(err);
139825
        }
139826
    };
139827
    DebounceSubscriber.prototype._complete = function () {
139828
        this.emitValue();
139829
        this.destination.complete();
139830
    };
139831
    DebounceSubscriber.prototype._tryNext = function (value, duration) {
139832
        var subscription = this.durationSubscription;
139833
        this.value = value;
139834
        this.hasValue = true;
139835
        if (subscription) {
139836
            subscription.unsubscribe();
139837
            this.remove(subscription);
139838
        }
139839
        subscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, duration);
139840
        if (subscription && !subscription.closed) {
139841
            this.add(this.durationSubscription = subscription);
139842
        }
139843
    };
139844
    DebounceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
139845
        this.emitValue();
139846
    };
139847
    DebounceSubscriber.prototype.notifyComplete = function () {
139848
        this.emitValue();
139849
    };
139850
    DebounceSubscriber.prototype.emitValue = function () {
139851
        if (this.hasValue) {
139852
            var value = this.value;
139853
            var subscription = this.durationSubscription;
139854
            if (subscription) {
139855
                this.durationSubscription = null;
139856
                subscription.unsubscribe();
139857
                this.remove(subscription);
139858
            }
139859
            // This must be done *before* passing the value
139860
            // along to the destination because it's possible for
139861
            // the value to synchronously re-enter this operator
139862
            // recursively if the duration selector Observable
139863
            // emits synchronously
139864
            this.value = null;
139865
            this.hasValue = false;
139866
            _super.prototype._next.call(this, value);
139867
        }
139868
    };
139869
    return DebounceSubscriber;
139870
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
139871
//# sourceMappingURL=debounce.js.map
139872
 
139873
 
139874
/***/ }),
139875
 
139876
/***/ "./node_modules/rxjs/_esm5/internal/operators/debounceTime.js":
139877
/*!********************************************************************!*\
139878
  !*** ./node_modules/rxjs/_esm5/internal/operators/debounceTime.js ***!
139879
  \********************************************************************/
139880
/*! exports provided: debounceTime */
139881
/***/ (function(module, __webpack_exports__, __webpack_require__) {
139882
 
139883
"use strict";
139884
__webpack_require__.r(__webpack_exports__);
139885
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return debounceTime; });
139886
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
139887
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
139888
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../scheduler/async */ "./node_modules/rxjs/_esm5/internal/scheduler/async.js");
139889
/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */
139890
 
139891
 
139892
 
139893
/**
139894
 * Emits a value from the source Observable only after a particular time span
139895
 * has passed without another source emission.
139896
 *
139897
 * <span class="informal">It's like {@link delay}, but passes only the most
139898
 * recent value from each burst of emissions.</span>
139899
 *
139900
 * <img src="./img/debounceTime.png" width="100%">
139901
 *
139902
 * `debounceTime` delays values emitted by the source Observable, but drops
139903
 * previous pending delayed emissions if a new value arrives on the source
139904
 * Observable. This operator keeps track of the most recent value from the
139905
 * source Observable, and emits that only when `dueTime` enough time has passed
139906
 * without any other value appearing on the source Observable. If a new value
139907
 * appears before `dueTime` silence occurs, the previous value will be dropped
139908
 * and will not be emitted on the output Observable.
139909
 *
139910
 * This is a rate-limiting operator, because it is impossible for more than one
139911
 * value to be emitted in any time window of duration `dueTime`, but it is also
139912
 * a delay-like operator since output emissions do not occur at the same time as
139913
 * they did on the source Observable. Optionally takes a {@link IScheduler} for
139914
 * managing timers.
139915
 *
139916
 * @example <caption>Emit the most recent click after a burst of clicks</caption>
139917
 * var clicks = Rx.Observable.fromEvent(document, 'click');
139918
 * var result = clicks.debounceTime(1000);
139919
 * result.subscribe(x => console.log(x));
139920
 *
139921
 * @see {@link auditTime}
139922
 * @see {@link debounce}
139923
 * @see {@link delay}
139924
 * @see {@link sampleTime}
139925
 * @see {@link throttleTime}
139926
 *
139927
 * @param {number} dueTime The timeout duration in milliseconds (or the time
139928
 * unit determined internally by the optional `scheduler`) for the window of
139929
 * time required to wait for emission silence before emitting the most recent
139930
 * source value.
139931
 * @param {Scheduler} [scheduler=async] The {@link IScheduler} to use for
139932
 * managing the timers that handle the timeout for each value.
139933
 * @return {Observable} An Observable that delays the emissions of the source
139934
 * Observable by the specified `dueTime`, and may drop some values if they occur
139935
 * too frequently.
139936
 * @method debounceTime
139937
 * @owner Observable
139938
 */
139939
function debounceTime(dueTime, scheduler) {
139940
    if (scheduler === void 0) {
139941
        scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
139942
    }
139943
    return function (source) { return source.lift(new DebounceTimeOperator(dueTime, scheduler)); };
139944
}
139945
var DebounceTimeOperator = /*@__PURE__*/ (function () {
139946
    function DebounceTimeOperator(dueTime, scheduler) {
139947
        this.dueTime = dueTime;
139948
        this.scheduler = scheduler;
139949
    }
139950
    DebounceTimeOperator.prototype.call = function (subscriber, source) {
139951
        return source.subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler));
139952
    };
139953
    return DebounceTimeOperator;
139954
}());
139955
/**
139956
 * We need this JSDoc comment for affecting ESDoc.
139957
 * @ignore
139958
 * @extends {Ignored}
139959
 */
139960
var DebounceTimeSubscriber = /*@__PURE__*/ (function (_super) {
139961
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DebounceTimeSubscriber, _super);
139962
    function DebounceTimeSubscriber(destination, dueTime, scheduler) {
139963
        var _this = _super.call(this, destination) || this;
139964
        _this.dueTime = dueTime;
139965
        _this.scheduler = scheduler;
139966
        _this.debouncedSubscription = null;
139967
        _this.lastValue = null;
139968
        _this.hasValue = false;
139969
        return _this;
139970
    }
139971
    DebounceTimeSubscriber.prototype._next = function (value) {
139972
        this.clearDebounce();
139973
        this.lastValue = value;
139974
        this.hasValue = true;
139975
        this.add(this.debouncedSubscription = this.scheduler.schedule(dispatchNext, this.dueTime, this));
139976
    };
139977
    DebounceTimeSubscriber.prototype._complete = function () {
139978
        this.debouncedNext();
139979
        this.destination.complete();
139980
    };
139981
    DebounceTimeSubscriber.prototype.debouncedNext = function () {
139982
        this.clearDebounce();
139983
        if (this.hasValue) {
139984
            var lastValue = this.lastValue;
139985
            // This must be done *before* passing the value
139986
            // along to the destination because it's possible for
139987
            // the value to synchronously re-enter this operator
139988
            // recursively when scheduled with things like
139989
            // VirtualScheduler/TestScheduler.
139990
            this.lastValue = null;
139991
            this.hasValue = false;
139992
            this.destination.next(lastValue);
139993
        }
139994
    };
139995
    DebounceTimeSubscriber.prototype.clearDebounce = function () {
139996
        var debouncedSubscription = this.debouncedSubscription;
139997
        if (debouncedSubscription !== null) {
139998
            this.remove(debouncedSubscription);
139999
            debouncedSubscription.unsubscribe();
140000
            this.debouncedSubscription = null;
140001
        }
140002
    };
140003
    return DebounceTimeSubscriber;
140004
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
140005
function dispatchNext(subscriber) {
140006
    subscriber.debouncedNext();
140007
}
140008
//# sourceMappingURL=debounceTime.js.map
140009
 
140010
 
140011
/***/ }),
140012
 
140013
/***/ "./node_modules/rxjs/_esm5/internal/operators/defaultIfEmpty.js":
140014
/*!**********************************************************************!*\
140015
  !*** ./node_modules/rxjs/_esm5/internal/operators/defaultIfEmpty.js ***!
140016
  \**********************************************************************/
140017
/*! exports provided: defaultIfEmpty */
140018
/***/ (function(module, __webpack_exports__, __webpack_require__) {
140019
 
140020
"use strict";
140021
__webpack_require__.r(__webpack_exports__);
140022
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return defaultIfEmpty; });
140023
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
140024
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
140025
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
140026
 
140027
 
140028
/* tslint:enable:max-line-length */
140029
/**
140030
 * Emits a given value if the source Observable completes without emitting any
140031
 * `next` value, otherwise mirrors the source Observable.
140032
 *
140033
 * <span class="informal">If the source Observable turns out to be empty, then
140034
 * this operator will emit a default value.</span>
140035
 *
140036
 * <img src="./img/defaultIfEmpty.png" width="100%">
140037
 *
140038
 * `defaultIfEmpty` emits the values emitted by the source Observable or a
140039
 * specified default value if the source Observable is empty (completes without
140040
 * having emitted any `next` value).
140041
 *
140042
 * @example <caption>If no clicks happen in 5 seconds, then emit "no clicks"</caption>
140043
 * var clicks = Rx.Observable.fromEvent(document, 'click');
140044
 * var clicksBeforeFive = clicks.takeUntil(Rx.Observable.interval(5000));
140045
 * var result = clicksBeforeFive.defaultIfEmpty('no clicks');
140046
 * result.subscribe(x => console.log(x));
140047
 *
140048
 * @see {@link empty}
140049
 * @see {@link last}
140050
 *
140051
 * @param {any} [defaultValue=null] The default value used if the source
140052
 * Observable is empty.
140053
 * @return {Observable} An Observable that emits either the specified
140054
 * `defaultValue` if the source Observable emits no items, or the values emitted
140055
 * by the source Observable.
140056
 * @method defaultIfEmpty
140057
 * @owner Observable
140058
 */
140059
function defaultIfEmpty(defaultValue) {
140060
    if (defaultValue === void 0) {
140061
        defaultValue = null;
140062
    }
140063
    return function (source) { return source.lift(new DefaultIfEmptyOperator(defaultValue)); };
140064
}
140065
var DefaultIfEmptyOperator = /*@__PURE__*/ (function () {
140066
    function DefaultIfEmptyOperator(defaultValue) {
140067
        this.defaultValue = defaultValue;
140068
    }
140069
    DefaultIfEmptyOperator.prototype.call = function (subscriber, source) {
140070
        return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue));
140071
    };
140072
    return DefaultIfEmptyOperator;
140073
}());
140074
/**
140075
 * We need this JSDoc comment for affecting ESDoc.
140076
 * @ignore
140077
 * @extends {Ignored}
140078
 */
140079
var DefaultIfEmptySubscriber = /*@__PURE__*/ (function (_super) {
140080
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DefaultIfEmptySubscriber, _super);
140081
    function DefaultIfEmptySubscriber(destination, defaultValue) {
140082
        var _this = _super.call(this, destination) || this;
140083
        _this.defaultValue = defaultValue;
140084
        _this.isEmpty = true;
140085
        return _this;
140086
    }
140087
    DefaultIfEmptySubscriber.prototype._next = function (value) {
140088
        this.isEmpty = false;
140089
        this.destination.next(value);
140090
    };
140091
    DefaultIfEmptySubscriber.prototype._complete = function () {
140092
        if (this.isEmpty) {
140093
            this.destination.next(this.defaultValue);
140094
        }
140095
        this.destination.complete();
140096
    };
140097
    return DefaultIfEmptySubscriber;
140098
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
140099
//# sourceMappingURL=defaultIfEmpty.js.map
140100
 
140101
 
140102
/***/ }),
140103
 
140104
/***/ "./node_modules/rxjs/_esm5/internal/operators/delay.js":
140105
/*!*************************************************************!*\
140106
  !*** ./node_modules/rxjs/_esm5/internal/operators/delay.js ***!
140107
  \*************************************************************/
140108
/*! exports provided: delay */
140109
/***/ (function(module, __webpack_exports__, __webpack_require__) {
140110
 
140111
"use strict";
140112
__webpack_require__.r(__webpack_exports__);
140113
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return delay; });
140114
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
140115
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/async */ "./node_modules/rxjs/_esm5/internal/scheduler/async.js");
140116
/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isDate */ "./node_modules/rxjs/_esm5/internal/util/isDate.js");
140117
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
140118
/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Notification */ "./node_modules/rxjs/_esm5/internal/Notification.js");
140119
/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_Subscriber,_Notification PURE_IMPORTS_END */
140120
 
140121
 
140122
 
140123
 
140124
 
140125
/**
140126
 * Delays the emission of items from the source Observable by a given timeout or
140127
 * until a given Date.
140128
 *
140129
 * <span class="informal">Time shifts each item by some specified amount of
140130
 * milliseconds.</span>
140131
 *
140132
 * <img src="./img/delay.png" width="100%">
140133
 *
140134
 * If the delay argument is a Number, this operator time shifts the source
140135
 * Observable by that amount of time expressed in milliseconds. The relative
140136
 * time intervals between the values are preserved.
140137
 *
140138
 * If the delay argument is a Date, this operator time shifts the start of the
140139
 * Observable execution until the given date occurs.
140140
 *
140141
 * @example <caption>Delay each click by one second</caption>
140142
 * var clicks = Rx.Observable.fromEvent(document, 'click');
140143
 * var delayedClicks = clicks.delay(1000); // each click emitted after 1 second
140144
 * delayedClicks.subscribe(x => console.log(x));
140145
 *
140146
 * @example <caption>Delay all clicks until a future date happens</caption>
140147
 * var clicks = Rx.Observable.fromEvent(document, 'click');
140148
 * var date = new Date('March 15, 2050 12:00:00'); // in the future
140149
 * var delayedClicks = clicks.delay(date); // click emitted only after that date
140150
 * delayedClicks.subscribe(x => console.log(x));
140151
 *
140152
 * @see {@link debounceTime}
140153
 * @see {@link delayWhen}
140154
 *
140155
 * @param {number|Date} delay The delay duration in milliseconds (a `number`) or
140156
 * a `Date` until which the emission of the source items is delayed.
140157
 * @param {Scheduler} [scheduler=async] The IScheduler to use for
140158
 * managing the timers that handle the time-shift for each item.
140159
 * @return {Observable} An Observable that delays the emissions of the source
140160
 * Observable by the specified timeout or Date.
140161
 * @method delay
140162
 * @owner Observable
140163
 */
140164
function delay(delay, scheduler) {
140165
    if (scheduler === void 0) {
140166
        scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
140167
    }
140168
    var absoluteDelay = Object(_util_isDate__WEBPACK_IMPORTED_MODULE_2__["isDate"])(delay);
140169
    var delayFor = absoluteDelay ? (+delay - scheduler.now()) : Math.abs(delay);
140170
    return function (source) { return source.lift(new DelayOperator(delayFor, scheduler)); };
140171
}
140172
var DelayOperator = /*@__PURE__*/ (function () {
140173
    function DelayOperator(delay, scheduler) {
140174
        this.delay = delay;
140175
        this.scheduler = scheduler;
140176
    }
140177
    DelayOperator.prototype.call = function (subscriber, source) {
140178
        return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler));
140179
    };
140180
    return DelayOperator;
140181
}());
140182
/**
140183
 * We need this JSDoc comment for affecting ESDoc.
140184
 * @ignore
140185
 * @extends {Ignored}
140186
 */
140187
var DelaySubscriber = /*@__PURE__*/ (function (_super) {
140188
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DelaySubscriber, _super);
140189
    function DelaySubscriber(destination, delay, scheduler) {
140190
        var _this = _super.call(this, destination) || this;
140191
        _this.delay = delay;
140192
        _this.scheduler = scheduler;
140193
        _this.queue = [];
140194
        _this.active = false;
140195
        _this.errored = false;
140196
        return _this;
140197
    }
140198
    DelaySubscriber.dispatch = function (state) {
140199
        var source = state.source;
140200
        var queue = source.queue;
140201
        var scheduler = state.scheduler;
140202
        var destination = state.destination;
140203
        while (queue.length > 0 && (queue[0].time - scheduler.now()) <= 0) {
140204
            queue.shift().notification.observe(destination);
140205
        }
140206
        if (queue.length > 0) {
140207
            var delay_1 = Math.max(0, queue[0].time - scheduler.now());
140208
            this.schedule(state, delay_1);
140209
        }
140210
        else {
140211
            source.active = false;
140212
        }
140213
    };
140214
    DelaySubscriber.prototype._schedule = function (scheduler) {
140215
        this.active = true;
140216
        this.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, {
140217
            source: this, destination: this.destination, scheduler: scheduler
140218
        }));
140219
    };
140220
    DelaySubscriber.prototype.scheduleNotification = function (notification) {
140221
        if (this.errored === true) {
140222
            return;
140223
        }
140224
        var scheduler = this.scheduler;
140225
        var message = new DelayMessage(scheduler.now() + this.delay, notification);
140226
        this.queue.push(message);
140227
        if (this.active === false) {
140228
            this._schedule(scheduler);
140229
        }
140230
    };
140231
    DelaySubscriber.prototype._next = function (value) {
140232
        this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_4__["Notification"].createNext(value));
140233
    };
140234
    DelaySubscriber.prototype._error = function (err) {
140235
        this.errored = true;
140236
        this.queue = [];
140237
        this.destination.error(err);
140238
    };
140239
    DelaySubscriber.prototype._complete = function () {
140240
        this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_4__["Notification"].createComplete());
140241
    };
140242
    return DelaySubscriber;
140243
}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
140244
var DelayMessage = /*@__PURE__*/ (function () {
140245
    function DelayMessage(time, notification) {
140246
        this.time = time;
140247
        this.notification = notification;
140248
    }
140249
    return DelayMessage;
140250
}());
140251
//# sourceMappingURL=delay.js.map
140252
 
140253
 
140254
/***/ }),
140255
 
140256
/***/ "./node_modules/rxjs/_esm5/internal/operators/delayWhen.js":
140257
/*!*****************************************************************!*\
140258
  !*** ./node_modules/rxjs/_esm5/internal/operators/delayWhen.js ***!
140259
  \*****************************************************************/
140260
/*! exports provided: delayWhen */
140261
/***/ (function(module, __webpack_exports__, __webpack_require__) {
140262
 
140263
"use strict";
140264
__webpack_require__.r(__webpack_exports__);
140265
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return delayWhen; });
140266
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
140267
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
140268
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
140269
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
140270
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
140271
/** PURE_IMPORTS_START tslib,_Subscriber,_Observable,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
140272
 
140273
 
140274
 
140275
 
140276
 
140277
/**
140278
 * Delays the emission of items from the source Observable by a given time span
140279
 * determined by the emissions of another Observable.
140280
 *
140281
 * <span class="informal">It's like {@link delay}, but the time span of the
140282
 * delay duration is determined by a second Observable.</span>
140283
 *
140284
 * <img src="./img/delayWhen.png" width="100%">
140285
 *
140286
 * `delayWhen` time shifts each emitted value from the source Observable by a
140287
 * time span determined by another Observable. When the source emits a value,
140288
 * the `delayDurationSelector` function is called with the source value as
140289
 * argument, and should return an Observable, called the "duration" Observable.
140290
 * The source value is emitted on the output Observable only when the duration
140291
 * Observable emits a value or completes.
140292
 *
140293
 * Optionally, `delayWhen` takes a second argument, `subscriptionDelay`, which
140294
 * is an Observable. When `subscriptionDelay` emits its first value or
140295
 * completes, the source Observable is subscribed to and starts behaving like
140296
 * described in the previous paragraph. If `subscriptionDelay` is not provided,
140297
 * `delayWhen` will subscribe to the source Observable as soon as the output
140298
 * Observable is subscribed.
140299
 *
140300
 * @example <caption>Delay each click by a random amount of time, between 0 and 5 seconds</caption>
140301
 * var clicks = Rx.Observable.fromEvent(document, 'click');
140302
 * var delayedClicks = clicks.delayWhen(event =>
140303
 *   Rx.Observable.interval(Math.random() * 5000)
140304
 * );
140305
 * delayedClicks.subscribe(x => console.log(x));
140306
 *
140307
 * @see {@link debounce}
140308
 * @see {@link delay}
140309
 *
140310
 * @param {function(value: T): Observable} delayDurationSelector A function that
140311
 * returns an Observable for each value emitted by the source Observable, which
140312
 * is then used to delay the emission of that item on the output Observable
140313
 * until the Observable returned from this function emits a value.
140314
 * @param {Observable} subscriptionDelay An Observable that triggers the
140315
 * subscription to the source Observable once it emits any value.
140316
 * @return {Observable} An Observable that delays the emissions of the source
140317
 * Observable by an amount of time specified by the Observable returned by
140318
 * `delayDurationSelector`.
140319
 * @method delayWhen
140320
 * @owner Observable
140321
 */
140322
function delayWhen(delayDurationSelector, subscriptionDelay) {
140323
    if (subscriptionDelay) {
140324
        return function (source) {
140325
            return new SubscriptionDelayObservable(source, subscriptionDelay)
140326
                .lift(new DelayWhenOperator(delayDurationSelector));
140327
        };
140328
    }
140329
    return function (source) { return source.lift(new DelayWhenOperator(delayDurationSelector)); };
140330
}
140331
var DelayWhenOperator = /*@__PURE__*/ (function () {
140332
    function DelayWhenOperator(delayDurationSelector) {
140333
        this.delayDurationSelector = delayDurationSelector;
140334
    }
140335
    DelayWhenOperator.prototype.call = function (subscriber, source) {
140336
        return source.subscribe(new DelayWhenSubscriber(subscriber, this.delayDurationSelector));
140337
    };
140338
    return DelayWhenOperator;
140339
}());
140340
/**
140341
 * We need this JSDoc comment for affecting ESDoc.
140342
 * @ignore
140343
 * @extends {Ignored}
140344
 */
140345
var DelayWhenSubscriber = /*@__PURE__*/ (function (_super) {
140346
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DelayWhenSubscriber, _super);
140347
    function DelayWhenSubscriber(destination, delayDurationSelector) {
140348
        var _this = _super.call(this, destination) || this;
140349
        _this.delayDurationSelector = delayDurationSelector;
140350
        _this.completed = false;
140351
        _this.delayNotifierSubscriptions = [];
140352
        _this.values = [];
140353
        return _this;
140354
    }
140355
    DelayWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
140356
        this.destination.next(outerValue);
140357
        this.removeSubscription(innerSub);
140358
        this.tryComplete();
140359
    };
140360
    DelayWhenSubscriber.prototype.notifyError = function (error, innerSub) {
140361
        this._error(error);
140362
    };
140363
    DelayWhenSubscriber.prototype.notifyComplete = function (innerSub) {
140364
        var value = this.removeSubscription(innerSub);
140365
        if (value) {
140366
            this.destination.next(value);
140367
        }
140368
        this.tryComplete();
140369
    };
140370
    DelayWhenSubscriber.prototype._next = function (value) {
140371
        try {
140372
            var delayNotifier = this.delayDurationSelector(value);
140373
            if (delayNotifier) {
140374
                this.tryDelay(delayNotifier, value);
140375
            }
140376
        }
140377
        catch (err) {
140378
            this.destination.error(err);
140379
        }
140380
    };
140381
    DelayWhenSubscriber.prototype._complete = function () {
140382
        this.completed = true;
140383
        this.tryComplete();
140384
    };
140385
    DelayWhenSubscriber.prototype.removeSubscription = function (subscription) {
140386
        subscription.unsubscribe();
140387
        var subscriptionIdx = this.delayNotifierSubscriptions.indexOf(subscription);
140388
        var value = null;
140389
        if (subscriptionIdx !== -1) {
140390
            value = this.values[subscriptionIdx];
140391
            this.delayNotifierSubscriptions.splice(subscriptionIdx, 1);
140392
            this.values.splice(subscriptionIdx, 1);
140393
        }
140394
        return value;
140395
    };
140396
    DelayWhenSubscriber.prototype.tryDelay = function (delayNotifier, value) {
140397
        var notifierSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, delayNotifier, value);
140398
        if (notifierSubscription && !notifierSubscription.closed) {
140399
            this.add(notifierSubscription);
140400
            this.delayNotifierSubscriptions.push(notifierSubscription);
140401
        }
140402
        this.values.push(value);
140403
    };
140404
    DelayWhenSubscriber.prototype.tryComplete = function () {
140405
        if (this.completed && this.delayNotifierSubscriptions.length === 0) {
140406
            this.destination.complete();
140407
        }
140408
    };
140409
    return DelayWhenSubscriber;
140410
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
140411
/**
140412
 * We need this JSDoc comment for affecting ESDoc.
140413
 * @ignore
140414
 * @extends {Ignored}
140415
 */
140416
var SubscriptionDelayObservable = /*@__PURE__*/ (function (_super) {
140417
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscriptionDelayObservable, _super);
140418
    function SubscriptionDelayObservable(source, subscriptionDelay) {
140419
        var _this = _super.call(this) || this;
140420
        _this.source = source;
140421
        _this.subscriptionDelay = subscriptionDelay;
140422
        return _this;
140423
    }
140424
    /** @deprecated This is an internal implementation detail, do not use. */
140425
    SubscriptionDelayObservable.prototype._subscribe = function (subscriber) {
140426
        this.subscriptionDelay.subscribe(new SubscriptionDelaySubscriber(subscriber, this.source));
140427
    };
140428
    return SubscriptionDelayObservable;
140429
}(_Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]));
140430
/**
140431
 * We need this JSDoc comment for affecting ESDoc.
140432
 * @ignore
140433
 * @extends {Ignored}
140434
 */
140435
var SubscriptionDelaySubscriber = /*@__PURE__*/ (function (_super) {
140436
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscriptionDelaySubscriber, _super);
140437
    function SubscriptionDelaySubscriber(parent, source) {
140438
        var _this = _super.call(this) || this;
140439
        _this.parent = parent;
140440
        _this.source = source;
140441
        _this.sourceSubscribed = false;
140442
        return _this;
140443
    }
140444
    SubscriptionDelaySubscriber.prototype._next = function (unused) {
140445
        this.subscribeToSource();
140446
    };
140447
    SubscriptionDelaySubscriber.prototype._error = function (err) {
140448
        this.unsubscribe();
140449
        this.parent.error(err);
140450
    };
140451
    SubscriptionDelaySubscriber.prototype._complete = function () {
140452
        this.subscribeToSource();
140453
    };
140454
    SubscriptionDelaySubscriber.prototype.subscribeToSource = function () {
140455
        if (!this.sourceSubscribed) {
140456
            this.sourceSubscribed = true;
140457
            this.unsubscribe();
140458
            this.source.subscribe(this.parent);
140459
        }
140460
    };
140461
    return SubscriptionDelaySubscriber;
140462
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
140463
//# sourceMappingURL=delayWhen.js.map
140464
 
140465
 
140466
/***/ }),
140467
 
140468
/***/ "./node_modules/rxjs/_esm5/internal/operators/dematerialize.js":
140469
/*!*********************************************************************!*\
140470
  !*** ./node_modules/rxjs/_esm5/internal/operators/dematerialize.js ***!
140471
  \*********************************************************************/
140472
/*! exports provided: dematerialize */
140473
/***/ (function(module, __webpack_exports__, __webpack_require__) {
140474
 
140475
"use strict";
140476
__webpack_require__.r(__webpack_exports__);
140477
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return dematerialize; });
140478
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
140479
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
140480
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
140481
 
140482
 
140483
/**
140484
 * Converts an Observable of {@link Notification} objects into the emissions
140485
 * that they represent.
140486
 *
140487
 * <span class="informal">Unwraps {@link Notification} objects as actual `next`,
140488
 * `error` and `complete` emissions. The opposite of {@link materialize}.</span>
140489
 *
140490
 * <img src="./img/dematerialize.png" width="100%">
140491
 *
140492
 * `dematerialize` is assumed to operate an Observable that only emits
140493
 * {@link Notification} objects as `next` emissions, and does not emit any
140494
 * `error`. Such Observable is the output of a `materialize` operation. Those
140495
 * notifications are then unwrapped using the metadata they contain, and emitted
140496
 * as `next`, `error`, and `complete` on the output Observable.
140497
 *
140498
 * Use this operator in conjunction with {@link materialize}.
140499
 *
140500
 * @example <caption>Convert an Observable of Notifications to an actual Observable</caption>
140501
 * var notifA = new Rx.Notification('N', 'A');
140502
 * var notifB = new Rx.Notification('N', 'B');
140503
 * var notifE = new Rx.Notification('E', void 0,
140504
 *   new TypeError('x.toUpperCase is not a function')
140505
 * );
140506
 * var materialized = Rx.Observable.of(notifA, notifB, notifE);
140507
 * var upperCase = materialized.dematerialize();
140508
 * upperCase.subscribe(x => console.log(x), e => console.error(e));
140509
 *
140510
 * // Results in:
140511
 * // A
140512
 * // B
140513
 * // TypeError: x.toUpperCase is not a function
140514
 *
140515
 * @see {@link Notification}
140516
 * @see {@link materialize}
140517
 *
140518
 * @return {Observable} An Observable that emits items and notifications
140519
 * embedded in Notification objects emitted by the source Observable.
140520
 * @method dematerialize
140521
 * @owner Observable
140522
 */
140523
function dematerialize() {
140524
    return function dematerializeOperatorFunction(source) {
140525
        return source.lift(new DeMaterializeOperator());
140526
    };
140527
}
140528
var DeMaterializeOperator = /*@__PURE__*/ (function () {
140529
    function DeMaterializeOperator() {
140530
    }
140531
    DeMaterializeOperator.prototype.call = function (subscriber, source) {
140532
        return source.subscribe(new DeMaterializeSubscriber(subscriber));
140533
    };
140534
    return DeMaterializeOperator;
140535
}());
140536
/**
140537
 * We need this JSDoc comment for affecting ESDoc.
140538
 * @ignore
140539
 * @extends {Ignored}
140540
 */
140541
var DeMaterializeSubscriber = /*@__PURE__*/ (function (_super) {
140542
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DeMaterializeSubscriber, _super);
140543
    function DeMaterializeSubscriber(destination) {
140544
        return _super.call(this, destination) || this;
140545
    }
140546
    DeMaterializeSubscriber.prototype._next = function (value) {
140547
        value.observe(this.destination);
140548
    };
140549
    return DeMaterializeSubscriber;
140550
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
140551
//# sourceMappingURL=dematerialize.js.map
140552
 
140553
 
140554
/***/ }),
140555
 
140556
/***/ "./node_modules/rxjs/_esm5/internal/operators/distinct.js":
140557
/*!****************************************************************!*\
140558
  !*** ./node_modules/rxjs/_esm5/internal/operators/distinct.js ***!
140559
  \****************************************************************/
140560
/*! exports provided: distinct, DistinctSubscriber */
140561
/***/ (function(module, __webpack_exports__, __webpack_require__) {
140562
 
140563
"use strict";
140564
__webpack_require__.r(__webpack_exports__);
140565
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return distinct; });
140566
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistinctSubscriber", function() { return DistinctSubscriber; });
140567
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
140568
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
140569
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
140570
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
140571
 
140572
 
140573
 
140574
/**
140575
 * Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from previous items.
140576
 *
140577
 * If a keySelector function is provided, then it will project each value from the source observable into a new value that it will
140578
 * check for equality with previously projected values. If a keySelector function is not provided, it will use each value from the
140579
 * source observable directly with an equality check against previous values.
140580
 *
140581
 * In JavaScript runtimes that support `Set`, this operator will use a `Set` to improve performance of the distinct value checking.
140582
 *
140583
 * In other runtimes, this operator will use a minimal implementation of `Set` that relies on an `Array` and `indexOf` under the
140584
 * hood, so performance will degrade as more values are checked for distinction. Even in newer browsers, a long-running `distinct`
140585
 * use might result in memory leaks. To help alleviate this in some scenarios, an optional `flushes` parameter is also provided so
140586
 * that the internal `Set` can be "flushed", basically clearing it of values.
140587
 *
140588
 * @example <caption>A simple example with numbers</caption>
140589
 * Observable.of(1, 1, 2, 2, 2, 1, 2, 3, 4, 3, 2, 1)
140590
 *   .distinct()
140591
 *   .subscribe(x => console.log(x)); // 1, 2, 3, 4
140592
 *
140593
 * @example <caption>An example using a keySelector function</caption>
140594
 * interface Person {
140595
 *    age: number,
140596
 *    name: string
140597
 * }
140598
 *
140599
 * Observable.of<Person>(
140600
 *     { age: 4, name: 'Foo'},
140601
 *     { age: 7, name: 'Bar'},
140602
 *     { age: 5, name: 'Foo'})
140603
 *     .distinct((p: Person) => p.name)
140604
 *     .subscribe(x => console.log(x));
140605
 *
140606
 * // displays:
140607
 * // { age: 4, name: 'Foo' }
140608
 * // { age: 7, name: 'Bar' }
140609
 *
140610
 * @see {@link distinctUntilChanged}
140611
 * @see {@link distinctUntilKeyChanged}
140612
 *
140613
 * @param {function} [keySelector] Optional function to select which value you want to check as distinct.
140614
 * @param {Observable} [flushes] Optional Observable for flushing the internal HashSet of the operator.
140615
 * @return {Observable} An Observable that emits items from the source Observable with distinct values.
140616
 * @method distinct
140617
 * @owner Observable
140618
 */
140619
function distinct(keySelector, flushes) {
140620
    return function (source) { return source.lift(new DistinctOperator(keySelector, flushes)); };
140621
}
140622
var DistinctOperator = /*@__PURE__*/ (function () {
140623
    function DistinctOperator(keySelector, flushes) {
140624
        this.keySelector = keySelector;
140625
        this.flushes = flushes;
140626
    }
140627
    DistinctOperator.prototype.call = function (subscriber, source) {
140628
        return source.subscribe(new DistinctSubscriber(subscriber, this.keySelector, this.flushes));
140629
    };
140630
    return DistinctOperator;
140631
}());
140632
/**
140633
 * We need this JSDoc comment for affecting ESDoc.
140634
 * @ignore
140635
 * @extends {Ignored}
140636
 */
140637
var DistinctSubscriber = /*@__PURE__*/ (function (_super) {
140638
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DistinctSubscriber, _super);
140639
    function DistinctSubscriber(destination, keySelector, flushes) {
140640
        var _this = _super.call(this, destination) || this;
140641
        _this.keySelector = keySelector;
140642
        _this.values = new Set();
140643
        if (flushes) {
140644
            _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, flushes));
140645
        }
140646
        return _this;
140647
    }
140648
    DistinctSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
140649
        this.values.clear();
140650
    };
140651
    DistinctSubscriber.prototype.notifyError = function (error, innerSub) {
140652
        this._error(error);
140653
    };
140654
    DistinctSubscriber.prototype._next = function (value) {
140655
        if (this.keySelector) {
140656
            this._useKeySelector(value);
140657
        }
140658
        else {
140659
            this._finalizeNext(value, value);
140660
        }
140661
    };
140662
    DistinctSubscriber.prototype._useKeySelector = function (value) {
140663
        var key;
140664
        var destination = this.destination;
140665
        try {
140666
            key = this.keySelector(value);
140667
        }
140668
        catch (err) {
140669
            destination.error(err);
140670
            return;
140671
        }
140672
        this._finalizeNext(key, value);
140673
    };
140674
    DistinctSubscriber.prototype._finalizeNext = function (key, value) {
140675
        var values = this.values;
140676
        if (!values.has(key)) {
140677
            values.add(key);
140678
            this.destination.next(value);
140679
        }
140680
    };
140681
    return DistinctSubscriber;
140682
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
140683
 
140684
//# sourceMappingURL=distinct.js.map
140685
 
140686
 
140687
/***/ }),
140688
 
140689
/***/ "./node_modules/rxjs/_esm5/internal/operators/distinctUntilChanged.js":
140690
/*!****************************************************************************!*\
140691
  !*** ./node_modules/rxjs/_esm5/internal/operators/distinctUntilChanged.js ***!
140692
  \****************************************************************************/
140693
/*! exports provided: distinctUntilChanged */
140694
/***/ (function(module, __webpack_exports__, __webpack_require__) {
140695
 
140696
"use strict";
140697
__webpack_require__.r(__webpack_exports__);
140698
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return distinctUntilChanged; });
140699
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
140700
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
140701
/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/tryCatch */ "./node_modules/rxjs/_esm5/internal/util/tryCatch.js");
140702
/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/errorObject */ "./node_modules/rxjs/_esm5/internal/util/errorObject.js");
140703
/** PURE_IMPORTS_START tslib,_Subscriber,_util_tryCatch,_util_errorObject PURE_IMPORTS_END */
140704
 
140705
 
140706
 
140707
 
140708
/* tslint:enable:max-line-length */
140709
/**
140710
 * Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from the previous item.
140711
 *
140712
 * If a comparator function is provided, then it will be called for each item to test for whether or not that value should be emitted.
140713
 *
140714
 * If a comparator function is not provided, an equality check is used by default.
140715
 *
140716
 * @example <caption>A simple example with numbers</caption>
140717
 * Observable.of(1, 1, 2, 2, 2, 1, 1, 2, 3, 3, 4)
140718
 *   .distinctUntilChanged()
140719
 *   .subscribe(x => console.log(x)); // 1, 2, 1, 2, 3, 4
140720
 *
140721
 * @example <caption>An example using a compare function</caption>
140722
 * interface Person {
140723
 *    age: number,
140724
 *    name: string
140725
 * }
140726
 *
140727
 * Observable.of<Person>(
140728
 *     { age: 4, name: 'Foo'},
140729
 *     { age: 7, name: 'Bar'},
140730
 *     { age: 5, name: 'Foo'})
140731
 *     { age: 6, name: 'Foo'})
140732
 *     .distinctUntilChanged((p: Person, q: Person) => p.name === q.name)
140733
 *     .subscribe(x => console.log(x));
140734
 *
140735
 * // displays:
140736
 * // { age: 4, name: 'Foo' }
140737
 * // { age: 7, name: 'Bar' }
140738
 * // { age: 5, name: 'Foo' }
140739
 *
140740
 * @see {@link distinct}
140741
 * @see {@link distinctUntilKeyChanged}
140742
 *
140743
 * @param {function} [compare] Optional comparison function called to test if an item is distinct from the previous item in the source.
140744
 * @return {Observable} An Observable that emits items from the source Observable with distinct values.
140745
 * @method distinctUntilChanged
140746
 * @owner Observable
140747
 */
140748
function distinctUntilChanged(compare, keySelector) {
140749
    return function (source) { return source.lift(new DistinctUntilChangedOperator(compare, keySelector)); };
140750
}
140751
var DistinctUntilChangedOperator = /*@__PURE__*/ (function () {
140752
    function DistinctUntilChangedOperator(compare, keySelector) {
140753
        this.compare = compare;
140754
        this.keySelector = keySelector;
140755
    }
140756
    DistinctUntilChangedOperator.prototype.call = function (subscriber, source) {
140757
        return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector));
140758
    };
140759
    return DistinctUntilChangedOperator;
140760
}());
140761
/**
140762
 * We need this JSDoc comment for affecting ESDoc.
140763
 * @ignore
140764
 * @extends {Ignored}
140765
 */
140766
var DistinctUntilChangedSubscriber = /*@__PURE__*/ (function (_super) {
140767
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DistinctUntilChangedSubscriber, _super);
140768
    function DistinctUntilChangedSubscriber(destination, compare, keySelector) {
140769
        var _this = _super.call(this, destination) || this;
140770
        _this.keySelector = keySelector;
140771
        _this.hasKey = false;
140772
        if (typeof compare === 'function') {
140773
            _this.compare = compare;
140774
        }
140775
        return _this;
140776
    }
140777
    DistinctUntilChangedSubscriber.prototype.compare = function (x, y) {
140778
        return x === y;
140779
    };
140780
    DistinctUntilChangedSubscriber.prototype._next = function (value) {
140781
        var keySelector = this.keySelector;
140782
        var key = value;
140783
        if (keySelector) {
140784
            key = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_2__["tryCatch"])(this.keySelector)(value);
140785
            if (key === _util_errorObject__WEBPACK_IMPORTED_MODULE_3__["errorObject"]) {
140786
                return this.destination.error(_util_errorObject__WEBPACK_IMPORTED_MODULE_3__["errorObject"].e);
140787
            }
140788
        }
140789
        var result = false;
140790
        if (this.hasKey) {
140791
            result = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_2__["tryCatch"])(this.compare)(this.key, key);
140792
            if (result === _util_errorObject__WEBPACK_IMPORTED_MODULE_3__["errorObject"]) {
140793
                return this.destination.error(_util_errorObject__WEBPACK_IMPORTED_MODULE_3__["errorObject"].e);
140794
            }
140795
        }
140796
        else {
140797
            this.hasKey = true;
140798
        }
140799
        if (Boolean(result) === false) {
140800
            this.key = key;
140801
            this.destination.next(value);
140802
        }
140803
    };
140804
    return DistinctUntilChangedSubscriber;
140805
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
140806
//# sourceMappingURL=distinctUntilChanged.js.map
140807
 
140808
 
140809
/***/ }),
140810
 
140811
/***/ "./node_modules/rxjs/_esm5/internal/operators/distinctUntilKeyChanged.js":
140812
/*!*******************************************************************************!*\
140813
  !*** ./node_modules/rxjs/_esm5/internal/operators/distinctUntilKeyChanged.js ***!
140814
  \*******************************************************************************/
140815
/*! exports provided: distinctUntilKeyChanged */
140816
/***/ (function(module, __webpack_exports__, __webpack_require__) {
140817
 
140818
"use strict";
140819
__webpack_require__.r(__webpack_exports__);
140820
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return distinctUntilKeyChanged; });
140821
/* harmony import */ var _distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./distinctUntilChanged */ "./node_modules/rxjs/_esm5/internal/operators/distinctUntilChanged.js");
140822
/** PURE_IMPORTS_START _distinctUntilChanged PURE_IMPORTS_END */
140823
 
140824
/* tslint:enable:max-line-length */
140825
/**
140826
 * Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from the previous item,
140827
 * using a property accessed by using the key provided to check if the two items are distinct.
140828
 *
140829
 * If a comparator function is provided, then it will be called for each item to test for whether or not that value should be emitted.
140830
 *
140831
 * If a comparator function is not provided, an equality check is used by default.
140832
 *
140833
 * @example <caption>An example comparing the name of persons</caption>
140834
 *
140835
 *  interface Person {
140836
 *     age: number,
140837
 *     name: string
140838
 *  }
140839
 *
140840
 * Observable.of<Person>(
140841
 *     { age: 4, name: 'Foo'},
140842
 *     { age: 7, name: 'Bar'},
140843
 *     { age: 5, name: 'Foo'},
140844
 *     { age: 6, name: 'Foo'})
140845
 *     .distinctUntilKeyChanged('name')
140846
 *     .subscribe(x => console.log(x));
140847
 *
140848
 * // displays:
140849
 * // { age: 4, name: 'Foo' }
140850
 * // { age: 7, name: 'Bar' }
140851
 * // { age: 5, name: 'Foo' }
140852
 *
140853
 * @example <caption>An example comparing the first letters of the name</caption>
140854
 *
140855
 * interface Person {
140856
 *     age: number,
140857
 *     name: string
140858
 *  }
140859
 *
140860
 * Observable.of<Person>(
140861
 *     { age: 4, name: 'Foo1'},
140862
 *     { age: 7, name: 'Bar'},
140863
 *     { age: 5, name: 'Foo2'},
140864
 *     { age: 6, name: 'Foo3'})
140865
 *     .distinctUntilKeyChanged('name', (x: string, y: string) => x.substring(0, 3) === y.substring(0, 3))
140866
 *     .subscribe(x => console.log(x));
140867
 *
140868
 * // displays:
140869
 * // { age: 4, name: 'Foo1' }
140870
 * // { age: 7, name: 'Bar' }
140871
 * // { age: 5, name: 'Foo2' }
140872
 *
140873
 * @see {@link distinct}
140874
 * @see {@link distinctUntilChanged}
140875
 *
140876
 * @param {string} key String key for object property lookup on each item.
140877
 * @param {function} [compare] Optional comparison function called to test if an item is distinct from the previous item in the source.
140878
 * @return {Observable} An Observable that emits items from the source Observable with distinct values based on the key specified.
140879
 * @method distinctUntilKeyChanged
140880
 * @owner Observable
140881
 */
140882
function distinctUntilKeyChanged(key, compare) {
140883
    return Object(_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__["distinctUntilChanged"])(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; });
140884
}
140885
//# sourceMappingURL=distinctUntilKeyChanged.js.map
140886
 
140887
 
140888
/***/ }),
140889
 
140890
/***/ "./node_modules/rxjs/_esm5/internal/operators/elementAt.js":
140891
/*!*****************************************************************!*\
140892
  !*** ./node_modules/rxjs/_esm5/internal/operators/elementAt.js ***!
140893
  \*****************************************************************/
140894
/*! exports provided: elementAt */
140895
/***/ (function(module, __webpack_exports__, __webpack_require__) {
140896
 
140897
"use strict";
140898
__webpack_require__.r(__webpack_exports__);
140899
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return elementAt; });
140900
/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/ArgumentOutOfRangeError */ "./node_modules/rxjs/_esm5/internal/util/ArgumentOutOfRangeError.js");
140901
/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filter */ "./node_modules/rxjs/_esm5/internal/operators/filter.js");
140902
/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./throwIfEmpty */ "./node_modules/rxjs/_esm5/internal/operators/throwIfEmpty.js");
140903
/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./defaultIfEmpty */ "./node_modules/rxjs/_esm5/internal/operators/defaultIfEmpty.js");
140904
/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./take */ "./node_modules/rxjs/_esm5/internal/operators/take.js");
140905
/** PURE_IMPORTS_START _util_ArgumentOutOfRangeError,_filter,_throwIfEmpty,_defaultIfEmpty,_take PURE_IMPORTS_END */
140906
 
140907
 
140908
 
140909
 
140910
 
140911
/**
140912
 * Emits the single value at the specified `index` in a sequence of emissions
140913
 * from the source Observable.
140914
 *
140915
 * <span class="informal">Emits only the i-th value, then completes.</span>
140916
 *
140917
 * <img src="./img/elementAt.png" width="100%">
140918
 *
140919
 * `elementAt` returns an Observable that emits the item at the specified
140920
 * `index` in the source Observable, or a default value if that `index` is out
140921
 * of range and the `default` argument is provided. If the `default` argument is
140922
 * not given and the `index` is out of range, the output Observable will emit an
140923
 * `ArgumentOutOfRangeError` error.
140924
 *
140925
 * @example <caption>Emit only the third click event</caption>
140926
 * var clicks = Rx.Observable.fromEvent(document, 'click');
140927
 * var result = clicks.elementAt(2);
140928
 * result.subscribe(x => console.log(x));
140929
 *
140930
 * // Results in:
140931
 * // click 1 = nothing
140932
 * // click 2 = nothing
140933
 * // click 3 = MouseEvent object logged to console
140934
 *
140935
 * @see {@link first}
140936
 * @see {@link last}
140937
 * @see {@link skip}
140938
 * @see {@link single}
140939
 * @see {@link take}
140940
 *
140941
 * @throws {ArgumentOutOfRangeError} When using `elementAt(i)`, it delivers an
140942
 * ArgumentOutOrRangeError to the Observer's `error` callback if `i < 0` or the
140943
 * Observable has completed before emitting the i-th `next` notification.
140944
 *
140945
 * @param {number} index Is the number `i` for the i-th source emission that has
140946
 * happened since the subscription, starting from the number `0`.
140947
 * @param {T} [defaultValue] The default value returned for missing indices.
140948
 * @return {Observable} An Observable that emits a single item, if it is found.
140949
 * Otherwise, will emit the default value if given. If not, then emits an error.
140950
 * @method elementAt
140951
 * @owner Observable
140952
 */
140953
function elementAt(index, defaultValue) {
140954
    if (index < 0) {
140955
        throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"]();
140956
    }
140957
    var hasDefaultValue = arguments.length >= 2;
140958
    return function (source) {
140959
        return source.pipe(Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(function (v, i) { return i === index; }), Object(_take__WEBPACK_IMPORTED_MODULE_4__["take"])(1), hasDefaultValue
140960
            ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__["defaultIfEmpty"])(defaultValue)
140961
            : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__["throwIfEmpty"])(function () { return new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"](); }));
140962
    };
140963
}
140964
//# sourceMappingURL=elementAt.js.map
140965
 
140966
 
140967
/***/ }),
140968
 
140969
/***/ "./node_modules/rxjs/_esm5/internal/operators/every.js":
140970
/*!*************************************************************!*\
140971
  !*** ./node_modules/rxjs/_esm5/internal/operators/every.js ***!
140972
  \*************************************************************/
140973
/*! exports provided: every */
140974
/***/ (function(module, __webpack_exports__, __webpack_require__) {
140975
 
140976
"use strict";
140977
__webpack_require__.r(__webpack_exports__);
140978
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "every", function() { return every; });
140979
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
140980
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
140981
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
140982
 
140983
 
140984
/**
140985
 * Returns an Observable that emits whether or not every item of the source satisfies the condition specified.
140986
 *
140987
 * @example <caption>A simple example emitting true if all elements are less than 5, false otherwise</caption>
140988
 *  Observable.of(1, 2, 3, 4, 5, 6)
140989
 *     .every(x => x < 5)
140990
 *     .subscribe(x => console.log(x)); // -> false
140991
 *
140992
 * @param {function} predicate A function for determining if an item meets a specified condition.
140993
 * @param {any} [thisArg] Optional object to use for `this` in the callback.
140994
 * @return {Observable} An Observable of booleans that determines if all items of the source Observable meet the condition specified.
140995
 * @method every
140996
 * @owner Observable
140997
 */
140998
function every(predicate, thisArg) {
140999
    return function (source) { return source.lift(new EveryOperator(predicate, thisArg, source)); };
141000
}
141001
var EveryOperator = /*@__PURE__*/ (function () {
141002
    function EveryOperator(predicate, thisArg, source) {
141003
        this.predicate = predicate;
141004
        this.thisArg = thisArg;
141005
        this.source = source;
141006
    }
141007
    EveryOperator.prototype.call = function (observer, source) {
141008
        return source.subscribe(new EverySubscriber(observer, this.predicate, this.thisArg, this.source));
141009
    };
141010
    return EveryOperator;
141011
}());
141012
/**
141013
 * We need this JSDoc comment for affecting ESDoc.
141014
 * @ignore
141015
 * @extends {Ignored}
141016
 */
141017
var EverySubscriber = /*@__PURE__*/ (function (_super) {
141018
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](EverySubscriber, _super);
141019
    function EverySubscriber(destination, predicate, thisArg, source) {
141020
        var _this = _super.call(this, destination) || this;
141021
        _this.predicate = predicate;
141022
        _this.thisArg = thisArg;
141023
        _this.source = source;
141024
        _this.index = 0;
141025
        _this.thisArg = thisArg || _this;
141026
        return _this;
141027
    }
141028
    EverySubscriber.prototype.notifyComplete = function (everyValueMatch) {
141029
        this.destination.next(everyValueMatch);
141030
        this.destination.complete();
141031
    };
141032
    EverySubscriber.prototype._next = function (value) {
141033
        var result = false;
141034
        try {
141035
            result = this.predicate.call(this.thisArg, value, this.index++, this.source);
141036
        }
141037
        catch (err) {
141038
            this.destination.error(err);
141039
            return;
141040
        }
141041
        if (!result) {
141042
            this.notifyComplete(false);
141043
        }
141044
    };
141045
    EverySubscriber.prototype._complete = function () {
141046
        this.notifyComplete(true);
141047
    };
141048
    return EverySubscriber;
141049
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
141050
//# sourceMappingURL=every.js.map
141051
 
141052
 
141053
/***/ }),
141054
 
141055
/***/ "./node_modules/rxjs/_esm5/internal/operators/exhaust.js":
141056
/*!***************************************************************!*\
141057
  !*** ./node_modules/rxjs/_esm5/internal/operators/exhaust.js ***!
141058
  \***************************************************************/
141059
/*! exports provided: exhaust */
141060
/***/ (function(module, __webpack_exports__, __webpack_require__) {
141061
 
141062
"use strict";
141063
__webpack_require__.r(__webpack_exports__);
141064
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return exhaust; });
141065
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
141066
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
141067
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
141068
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
141069
 
141070
 
141071
 
141072
/**
141073
 * Converts a higher-order Observable into a first-order Observable by dropping
141074
 * inner Observables while the previous inner Observable has not yet completed.
141075
 *
141076
 * <span class="informal">Flattens an Observable-of-Observables by dropping the
141077
 * next inner Observables while the current inner is still executing.</span>
141078
 *
141079
 * <img src="./img/exhaust.png" width="100%">
141080
 *
141081
 * `exhaust` subscribes to an Observable that emits Observables, also known as a
141082
 * higher-order Observable. Each time it observes one of these emitted inner
141083
 * Observables, the output Observable begins emitting the items emitted by that
141084
 * inner Observable. So far, it behaves like {@link mergeAll}. However,
141085
 * `exhaust` ignores every new inner Observable if the previous Observable has
141086
 * not yet completed. Once that one completes, it will accept and flatten the
141087
 * next inner Observable and repeat this process.
141088
 *
141089
 * @example <caption>Run a finite timer for each click, only if there is no currently active timer</caption>
141090
 * var clicks = Rx.Observable.fromEvent(document, 'click');
141091
 * var higherOrder = clicks.map((ev) => Rx.Observable.interval(1000).take(5));
141092
 * var result = higherOrder.exhaust();
141093
 * result.subscribe(x => console.log(x));
141094
 *
141095
 * @see {@link combineAll}
141096
 * @see {@link concatAll}
141097
 * @see {@link switch}
141098
 * @see {@link mergeAll}
141099
 * @see {@link exhaustMap}
141100
 * @see {@link zipAll}
141101
 *
141102
 * @return {Observable} An Observable that takes a source of Observables and propagates the first observable
141103
 * exclusively until it completes before subscribing to the next.
141104
 * @method exhaust
141105
 * @owner Observable
141106
 */
141107
function exhaust() {
141108
    return function (source) { return source.lift(new SwitchFirstOperator()); };
141109
}
141110
var SwitchFirstOperator = /*@__PURE__*/ (function () {
141111
    function SwitchFirstOperator() {
141112
    }
141113
    SwitchFirstOperator.prototype.call = function (subscriber, source) {
141114
        return source.subscribe(new SwitchFirstSubscriber(subscriber));
141115
    };
141116
    return SwitchFirstOperator;
141117
}());
141118
/**
141119
 * We need this JSDoc comment for affecting ESDoc.
141120
 * @ignore
141121
 * @extends {Ignored}
141122
 */
141123
var SwitchFirstSubscriber = /*@__PURE__*/ (function (_super) {
141124
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SwitchFirstSubscriber, _super);
141125
    function SwitchFirstSubscriber(destination) {
141126
        var _this = _super.call(this, destination) || this;
141127
        _this.hasCompleted = false;
141128
        _this.hasSubscription = false;
141129
        return _this;
141130
    }
141131
    SwitchFirstSubscriber.prototype._next = function (value) {
141132
        if (!this.hasSubscription) {
141133
            this.hasSubscription = true;
141134
            this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, value));
141135
        }
141136
    };
141137
    SwitchFirstSubscriber.prototype._complete = function () {
141138
        this.hasCompleted = true;
141139
        if (!this.hasSubscription) {
141140
            this.destination.complete();
141141
        }
141142
    };
141143
    SwitchFirstSubscriber.prototype.notifyComplete = function (innerSub) {
141144
        this.remove(innerSub);
141145
        this.hasSubscription = false;
141146
        if (this.hasCompleted) {
141147
            this.destination.complete();
141148
        }
141149
    };
141150
    return SwitchFirstSubscriber;
141151
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
141152
//# sourceMappingURL=exhaust.js.map
141153
 
141154
 
141155
/***/ }),
141156
 
141157
/***/ "./node_modules/rxjs/_esm5/internal/operators/exhaustMap.js":
141158
/*!******************************************************************!*\
141159
  !*** ./node_modules/rxjs/_esm5/internal/operators/exhaustMap.js ***!
141160
  \******************************************************************/
141161
/*! exports provided: exhaustMap */
141162
/***/ (function(module, __webpack_exports__, __webpack_require__) {
141163
 
141164
"use strict";
141165
__webpack_require__.r(__webpack_exports__);
141166
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return exhaustMap; });
141167
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
141168
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
141169
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
141170
/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./map */ "./node_modules/rxjs/_esm5/internal/operators/map.js");
141171
/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../observable/from */ "./node_modules/rxjs/_esm5/internal/observable/from.js");
141172
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */
141173
 
141174
 
141175
 
141176
 
141177
 
141178
/* tslint:enable:max-line-length */
141179
/**
141180
 * Projects each source value to an Observable which is merged in the output
141181
 * Observable only if the previous projected Observable has completed.
141182
 *
141183
 * <span class="informal">Maps each value to an Observable, then flattens all of
141184
 * these inner Observables using {@link exhaust}.</span>
141185
 *
141186
 * <img src="./img/exhaustMap.png" width="100%">
141187
 *
141188
 * Returns an Observable that emits items based on applying a function that you
141189
 * supply to each item emitted by the source Observable, where that function
141190
 * returns an (so-called "inner") Observable. When it projects a source value to
141191
 * an Observable, the output Observable begins emitting the items emitted by
141192
 * that projected Observable. However, `exhaustMap` ignores every new projected
141193
 * Observable if the previous projected Observable has not yet completed. Once
141194
 * that one completes, it will accept and flatten the next projected Observable
141195
 * and repeat this process.
141196
 *
141197
 * @example <caption>Run a finite timer for each click, only if there is no currently active timer</caption>
141198
 * var clicks = Rx.Observable.fromEvent(document, 'click');
141199
 * var result = clicks.exhaustMap((ev) => Rx.Observable.interval(1000).take(5));
141200
 * result.subscribe(x => console.log(x));
141201
 *
141202
 * @see {@link concatMap}
141203
 * @see {@link exhaust}
141204
 * @see {@link mergeMap}
141205
 * @see {@link switchMap}
141206
 *
141207
 * @param {function(value: T, ?index: number): ObservableInput} project A function
141208
 * that, when applied to an item emitted by the source Observable, returns an
141209
 * Observable.
141210
 * @return {Observable} An Observable containing projected Observables
141211
 * of each item of the source, ignoring projected Observables that start before
141212
 * their preceding Observable has completed.
141213
 * @method exhaustMap
141214
 * @owner Observable
141215
 */
141216
function exhaustMap(project, resultSelector) {
141217
    if (resultSelector) {
141218
        // DEPRECATED PATH
141219
        return function (source) { return source.pipe(exhaustMap(function (a, i) { return Object(_observable_from__WEBPACK_IMPORTED_MODULE_4__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };
141220
    }
141221
    return function (source) {
141222
        return source.lift(new ExhauseMapOperator(project));
141223
    };
141224
}
141225
var ExhauseMapOperator = /*@__PURE__*/ (function () {
141226
    function ExhauseMapOperator(project) {
141227
        this.project = project;
141228
    }
141229
    ExhauseMapOperator.prototype.call = function (subscriber, source) {
141230
        return source.subscribe(new ExhaustMapSubscriber(subscriber, this.project));
141231
    };
141232
    return ExhauseMapOperator;
141233
}());
141234
/**
141235
 * We need this JSDoc comment for affecting ESDoc.
141236
 * @ignore
141237
 * @extends {Ignored}
141238
 */
141239
var ExhaustMapSubscriber = /*@__PURE__*/ (function (_super) {
141240
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ExhaustMapSubscriber, _super);
141241
    function ExhaustMapSubscriber(destination, project) {
141242
        var _this = _super.call(this, destination) || this;
141243
        _this.project = project;
141244
        _this.hasSubscription = false;
141245
        _this.hasCompleted = false;
141246
        _this.index = 0;
141247
        return _this;
141248
    }
141249
    ExhaustMapSubscriber.prototype._next = function (value) {
141250
        if (!this.hasSubscription) {
141251
            this.tryNext(value);
141252
        }
141253
    };
141254
    ExhaustMapSubscriber.prototype.tryNext = function (value) {
141255
        var index = this.index++;
141256
        var destination = this.destination;
141257
        try {
141258
            var result = this.project(value, index);
141259
            this.hasSubscription = true;
141260
            this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, result, value, index));
141261
        }
141262
        catch (err) {
141263
            destination.error(err);
141264
        }
141265
    };
141266
    ExhaustMapSubscriber.prototype._complete = function () {
141267
        this.hasCompleted = true;
141268
        if (!this.hasSubscription) {
141269
            this.destination.complete();
141270
        }
141271
    };
141272
    ExhaustMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
141273
        this.destination.next(innerValue);
141274
    };
141275
    ExhaustMapSubscriber.prototype.notifyError = function (err) {
141276
        this.destination.error(err);
141277
    };
141278
    ExhaustMapSubscriber.prototype.notifyComplete = function (innerSub) {
141279
        this.remove(innerSub);
141280
        this.hasSubscription = false;
141281
        if (this.hasCompleted) {
141282
            this.destination.complete();
141283
        }
141284
    };
141285
    return ExhaustMapSubscriber;
141286
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
141287
//# sourceMappingURL=exhaustMap.js.map
141288
 
141289
 
141290
/***/ }),
141291
 
141292
/***/ "./node_modules/rxjs/_esm5/internal/operators/expand.js":
141293
/*!**************************************************************!*\
141294
  !*** ./node_modules/rxjs/_esm5/internal/operators/expand.js ***!
141295
  \**************************************************************/
141296
/*! exports provided: expand, ExpandOperator, ExpandSubscriber */
141297
/***/ (function(module, __webpack_exports__, __webpack_require__) {
141298
 
141299
"use strict";
141300
__webpack_require__.r(__webpack_exports__);
141301
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return expand; });
141302
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpandOperator", function() { return ExpandOperator; });
141303
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpandSubscriber", function() { return ExpandSubscriber; });
141304
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
141305
/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/tryCatch */ "./node_modules/rxjs/_esm5/internal/util/tryCatch.js");
141306
/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/errorObject */ "./node_modules/rxjs/_esm5/internal/util/errorObject.js");
141307
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
141308
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
141309
/** PURE_IMPORTS_START tslib,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
141310
 
141311
 
141312
 
141313
 
141314
 
141315
/* tslint:enable:max-line-length */
141316
/**
141317
 * Recursively projects each source value to an Observable which is merged in
141318
 * the output Observable.
141319
 *
141320
 * <span class="informal">It's similar to {@link mergeMap}, but applies the
141321
 * projection function to every source value as well as every output value.
141322
 * It's recursive.</span>
141323
 *
141324
 * <img src="./img/expand.png" width="100%">
141325
 *
141326
 * Returns an Observable that emits items based on applying a function that you
141327
 * supply to each item emitted by the source Observable, where that function
141328
 * returns an Observable, and then merging those resulting Observables and
141329
 * emitting the results of this merger. *Expand* will re-emit on the output
141330
 * Observable every source value. Then, each output value is given to the
141331
 * `project` function which returns an inner Observable to be merged on the
141332
 * output Observable. Those output values resulting from the projection are also
141333
 * given to the `project` function to produce new output values. This is how
141334
 * *expand* behaves recursively.
141335
 *
141336
 * @example <caption>Start emitting the powers of two on every click, at most 10 of them</caption>
141337
 * var clicks = Rx.Observable.fromEvent(document, 'click');
141338
 * var powersOfTwo = clicks
141339
 *   .mapTo(1)
141340
 *   .expand(x => Rx.Observable.of(2 * x).delay(1000))
141341
 *   .take(10);
141342
 * powersOfTwo.subscribe(x => console.log(x));
141343
 *
141344
 * @see {@link mergeMap}
141345
 * @see {@link mergeScan}
141346
 *
141347
 * @param {function(value: T, index: number) => Observable} project A function
141348
 * that, when applied to an item emitted by the source or the output Observable,
141349
 * returns an Observable.
141350
 * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of input
141351
 * Observables being subscribed to concurrently.
141352
 * @param {Scheduler} [scheduler=null] The IScheduler to use for subscribing to
141353
 * each projected inner Observable.
141354
 * @return {Observable} An Observable that emits the source values and also
141355
 * result of applying the projection function to each value emitted on the
141356
 * output Observable and and merging the results of the Observables obtained
141357
 * from this transformation.
141358
 * @method expand
141359
 * @owner Observable
141360
 */
141361
function expand(project, concurrent, scheduler) {
141362
    if (concurrent === void 0) {
141363
        concurrent = Number.POSITIVE_INFINITY;
141364
    }
141365
    if (scheduler === void 0) {
141366
        scheduler = undefined;
141367
    }
141368
    concurrent = (concurrent || 0) < 1 ? Number.POSITIVE_INFINITY : concurrent;
141369
    return function (source) { return source.lift(new ExpandOperator(project, concurrent, scheduler)); };
141370
}
141371
var ExpandOperator = /*@__PURE__*/ (function () {
141372
    function ExpandOperator(project, concurrent, scheduler) {
141373
        this.project = project;
141374
        this.concurrent = concurrent;
141375
        this.scheduler = scheduler;
141376
    }
141377
    ExpandOperator.prototype.call = function (subscriber, source) {
141378
        return source.subscribe(new ExpandSubscriber(subscriber, this.project, this.concurrent, this.scheduler));
141379
    };
141380
    return ExpandOperator;
141381
}());
141382
 
141383
/**
141384
 * We need this JSDoc comment for affecting ESDoc.
141385
 * @ignore
141386
 * @extends {Ignored}
141387
 */
141388
var ExpandSubscriber = /*@__PURE__*/ (function (_super) {
141389
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ExpandSubscriber, _super);
141390
    function ExpandSubscriber(destination, project, concurrent, scheduler) {
141391
        var _this = _super.call(this, destination) || this;
141392
        _this.project = project;
141393
        _this.concurrent = concurrent;
141394
        _this.scheduler = scheduler;
141395
        _this.index = 0;
141396
        _this.active = 0;
141397
        _this.hasCompleted = false;
141398
        if (concurrent < Number.POSITIVE_INFINITY) {
141399
            _this.buffer = [];
141400
        }
141401
        return _this;
141402
    }
141403
    ExpandSubscriber.dispatch = function (arg) {
141404
        var subscriber = arg.subscriber, result = arg.result, value = arg.value, index = arg.index;
141405
        subscriber.subscribeToProjection(result, value, index);
141406
    };
141407
    ExpandSubscriber.prototype._next = function (value) {
141408
        var destination = this.destination;
141409
        if (destination.closed) {
141410
            this._complete();
141411
            return;
141412
        }
141413
        var index = this.index++;
141414
        if (this.active < this.concurrent) {
141415
            destination.next(value);
141416
            var result = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_1__["tryCatch"])(this.project)(value, index);
141417
            if (result === _util_errorObject__WEBPACK_IMPORTED_MODULE_2__["errorObject"]) {
141418
                destination.error(_util_errorObject__WEBPACK_IMPORTED_MODULE_2__["errorObject"].e);
141419
            }
141420
            else if (!this.scheduler) {
141421
                this.subscribeToProjection(result, value, index);
141422
            }
141423
            else {
141424
                var state = { subscriber: this, result: result, value: value, index: index };
141425
                this.add(this.scheduler.schedule(ExpandSubscriber.dispatch, 0, state));
141426
            }
141427
        }
141428
        else {
141429
            this.buffer.push(value);
141430
        }
141431
    };
141432
    ExpandSubscriber.prototype.subscribeToProjection = function (result, value, index) {
141433
        this.active++;
141434
        this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, result, value, index));
141435
    };
141436
    ExpandSubscriber.prototype._complete = function () {
141437
        this.hasCompleted = true;
141438
        if (this.hasCompleted && this.active === 0) {
141439
            this.destination.complete();
141440
        }
141441
    };
141442
    ExpandSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
141443
        this._next(innerValue);
141444
    };
141445
    ExpandSubscriber.prototype.notifyComplete = function (innerSub) {
141446
        var buffer = this.buffer;
141447
        this.remove(innerSub);
141448
        this.active--;
141449
        if (buffer && buffer.length > 0) {
141450
            this._next(buffer.shift());
141451
        }
141452
        if (this.hasCompleted && this.active === 0) {
141453
            this.destination.complete();
141454
        }
141455
    };
141456
    return ExpandSubscriber;
141457
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
141458
 
141459
//# sourceMappingURL=expand.js.map
141460
 
141461
 
141462
/***/ }),
141463
 
141464
/***/ "./node_modules/rxjs/_esm5/internal/operators/filter.js":
141465
/*!**************************************************************!*\
141466
  !*** ./node_modules/rxjs/_esm5/internal/operators/filter.js ***!
141467
  \**************************************************************/
141468
/*! exports provided: filter */
141469
/***/ (function(module, __webpack_exports__, __webpack_require__) {
141470
 
141471
"use strict";
141472
__webpack_require__.r(__webpack_exports__);
141473
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return filter; });
141474
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
141475
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
141476
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
141477
 
141478
 
141479
/* tslint:enable:max-line-length */
141480
/**
141481
 * Filter items emitted by the source Observable by only emitting those that
141482
 * satisfy a specified predicate.
141483
 *
141484
 * <span class="informal">Like
141485
 * [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),
141486
 * it only emits a value from the source if it passes a criterion function.</span>
141487
 *
141488
 * <img src="./img/filter.png" width="100%">
141489
 *
141490
 * Similar to the well-known `Array.prototype.filter` method, this operator
141491
 * takes values from the source Observable, passes them through a `predicate`
141492
 * function and only emits those values that yielded `true`.
141493
 *
141494
 * @example <caption>Emit only click events whose target was a DIV element</caption>
141495
 * var clicks = Rx.Observable.fromEvent(document, 'click');
141496
 * var clicksOnDivs = clicks.filter(ev => ev.target.tagName === 'DIV');
141497
 * clicksOnDivs.subscribe(x => console.log(x));
141498
 *
141499
 * @see {@link distinct}
141500
 * @see {@link distinctUntilChanged}
141501
 * @see {@link distinctUntilKeyChanged}
141502
 * @see {@link ignoreElements}
141503
 * @see {@link partition}
141504
 * @see {@link skip}
141505
 *
141506
 * @param {function(value: T, index: number): boolean} predicate A function that
141507
 * evaluates each value emitted by the source Observable. If it returns `true`,
141508
 * the value is emitted, if `false` the value is not passed to the output
141509
 * Observable. The `index` parameter is the number `i` for the i-th source
141510
 * emission that has happened since the subscription, starting from the number
141511
 * `0`.
141512
 * @param {any} [thisArg] An optional argument to determine the value of `this`
141513
 * in the `predicate` function.
141514
 * @return {Observable} An Observable of values from the source that were
141515
 * allowed by the `predicate` function.
141516
 * @method filter
141517
 * @owner Observable
141518
 */
141519
function filter(predicate, thisArg) {
141520
    return function filterOperatorFunction(source) {
141521
        return source.lift(new FilterOperator(predicate, thisArg));
141522
    };
141523
}
141524
var FilterOperator = /*@__PURE__*/ (function () {
141525
    function FilterOperator(predicate, thisArg) {
141526
        this.predicate = predicate;
141527
        this.thisArg = thisArg;
141528
    }
141529
    FilterOperator.prototype.call = function (subscriber, source) {
141530
        return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));
141531
    };
141532
    return FilterOperator;
141533
}());
141534
/**
141535
 * We need this JSDoc comment for affecting ESDoc.
141536
 * @ignore
141537
 * @extends {Ignored}
141538
 */
141539
var FilterSubscriber = /*@__PURE__*/ (function (_super) {
141540
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FilterSubscriber, _super);
141541
    function FilterSubscriber(destination, predicate, thisArg) {
141542
        var _this = _super.call(this, destination) || this;
141543
        _this.predicate = predicate;
141544
        _this.thisArg = thisArg;
141545
        _this.count = 0;
141546
        return _this;
141547
    }
141548
    // the try catch block below is left specifically for
141549
    // optimization and perf reasons. a tryCatcher is not necessary here.
141550
    FilterSubscriber.prototype._next = function (value) {
141551
        var result;
141552
        try {
141553
            result = this.predicate.call(this.thisArg, value, this.count++);
141554
        }
141555
        catch (err) {
141556
            this.destination.error(err);
141557
            return;
141558
        }
141559
        if (result) {
141560
            this.destination.next(value);
141561
        }
141562
    };
141563
    return FilterSubscriber;
141564
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
141565
//# sourceMappingURL=filter.js.map
141566
 
141567
 
141568
/***/ }),
141569
 
141570
/***/ "./node_modules/rxjs/_esm5/internal/operators/finalize.js":
141571
/*!****************************************************************!*\
141572
  !*** ./node_modules/rxjs/_esm5/internal/operators/finalize.js ***!
141573
  \****************************************************************/
141574
/*! exports provided: finalize */
141575
/***/ (function(module, __webpack_exports__, __webpack_require__) {
141576
 
141577
"use strict";
141578
__webpack_require__.r(__webpack_exports__);
141579
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return finalize; });
141580
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
141581
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
141582
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
141583
/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription PURE_IMPORTS_END */
141584
 
141585
 
141586
 
141587
/**
141588
 * Returns an Observable that mirrors the source Observable, but will call a specified function when
141589
 * the source terminates on complete or error.
141590
 * @param {function} callback Function to be called when source terminates.
141591
 * @return {Observable} An Observable that mirrors the source, but will call the specified function on termination.
141592
 * @method finally
141593
 * @owner Observable
141594
 */
141595
function finalize(callback) {
141596
    return function (source) { return source.lift(new FinallyOperator(callback)); };
141597
}
141598
var FinallyOperator = /*@__PURE__*/ (function () {
141599
    function FinallyOperator(callback) {
141600
        this.callback = callback;
141601
    }
141602
    FinallyOperator.prototype.call = function (subscriber, source) {
141603
        return source.subscribe(new FinallySubscriber(subscriber, this.callback));
141604
    };
141605
    return FinallyOperator;
141606
}());
141607
/**
141608
 * We need this JSDoc comment for affecting ESDoc.
141609
 * @ignore
141610
 * @extends {Ignored}
141611
 */
141612
var FinallySubscriber = /*@__PURE__*/ (function (_super) {
141613
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FinallySubscriber, _super);
141614
    function FinallySubscriber(destination, callback) {
141615
        var _this = _super.call(this, destination) || this;
141616
        _this.add(new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"](callback));
141617
        return _this;
141618
    }
141619
    return FinallySubscriber;
141620
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
141621
//# sourceMappingURL=finalize.js.map
141622
 
141623
 
141624
/***/ }),
141625
 
141626
/***/ "./node_modules/rxjs/_esm5/internal/operators/find.js":
141627
/*!************************************************************!*\
141628
  !*** ./node_modules/rxjs/_esm5/internal/operators/find.js ***!
141629
  \************************************************************/
141630
/*! exports provided: find, FindValueOperator, FindValueSubscriber */
141631
/***/ (function(module, __webpack_exports__, __webpack_require__) {
141632
 
141633
"use strict";
141634
__webpack_require__.r(__webpack_exports__);
141635
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "find", function() { return find; });
141636
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindValueOperator", function() { return FindValueOperator; });
141637
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindValueSubscriber", function() { return FindValueSubscriber; });
141638
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
141639
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
141640
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
141641
 
141642
 
141643
/**
141644
 * Emits only the first value emitted by the source Observable that meets some
141645
 * condition.
141646
 *
141647
 * <span class="informal">Finds the first value that passes some test and emits
141648
 * that.</span>
141649
 *
141650
 * <img src="./img/find.png" width="100%">
141651
 *
141652
 * `find` searches for the first item in the source Observable that matches the
141653
 * specified condition embodied by the `predicate`, and returns the first
141654
 * occurrence in the source. Unlike {@link first}, the `predicate` is required
141655
 * in `find`, and does not emit an error if a valid value is not found.
141656
 *
141657
 * @example <caption>Find and emit the first click that happens on a DIV element</caption>
141658
 * var clicks = Rx.Observable.fromEvent(document, 'click');
141659
 * var result = clicks.find(ev => ev.target.tagName === 'DIV');
141660
 * result.subscribe(x => console.log(x));
141661
 *
141662
 * @see {@link filter}
141663
 * @see {@link first}
141664
 * @see {@link findIndex}
141665
 * @see {@link take}
141666
 *
141667
 * @param {function(value: T, index: number, source: Observable<T>): boolean} predicate
141668
 * A function called with each item to test for condition matching.
141669
 * @param {any} [thisArg] An optional argument to determine the value of `this`
141670
 * in the `predicate` function.
141671
 * @return {Observable<T>} An Observable of the first item that matches the
141672
 * condition.
141673
 * @method find
141674
 * @owner Observable
141675
 */
141676
function find(predicate, thisArg) {
141677
    if (typeof predicate !== 'function') {
141678
        throw new TypeError('predicate is not a function');
141679
    }
141680
    return function (source) { return source.lift(new FindValueOperator(predicate, source, false, thisArg)); };
141681
}
141682
var FindValueOperator = /*@__PURE__*/ (function () {
141683
    function FindValueOperator(predicate, source, yieldIndex, thisArg) {
141684
        this.predicate = predicate;
141685
        this.source = source;
141686
        this.yieldIndex = yieldIndex;
141687
        this.thisArg = thisArg;
141688
    }
141689
    FindValueOperator.prototype.call = function (observer, source) {
141690
        return source.subscribe(new FindValueSubscriber(observer, this.predicate, this.source, this.yieldIndex, this.thisArg));
141691
    };
141692
    return FindValueOperator;
141693
}());
141694
 
141695
/**
141696
 * We need this JSDoc comment for affecting ESDoc.
141697
 * @ignore
141698
 * @extends {Ignored}
141699
 */
141700
var FindValueSubscriber = /*@__PURE__*/ (function (_super) {
141701
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FindValueSubscriber, _super);
141702
    function FindValueSubscriber(destination, predicate, source, yieldIndex, thisArg) {
141703
        var _this = _super.call(this, destination) || this;
141704
        _this.predicate = predicate;
141705
        _this.source = source;
141706
        _this.yieldIndex = yieldIndex;
141707
        _this.thisArg = thisArg;
141708
        _this.index = 0;
141709
        return _this;
141710
    }
141711
    FindValueSubscriber.prototype.notifyComplete = function (value) {
141712
        var destination = this.destination;
141713
        destination.next(value);
141714
        destination.complete();
141715
    };
141716
    FindValueSubscriber.prototype._next = function (value) {
141717
        var _a = this, predicate = _a.predicate, thisArg = _a.thisArg;
141718
        var index = this.index++;
141719
        try {
141720
            var result = predicate.call(thisArg || this, value, index, this.source);
141721
            if (result) {
141722
                this.notifyComplete(this.yieldIndex ? index : value);
141723
            }
141724
        }
141725
        catch (err) {
141726
            this.destination.error(err);
141727
        }
141728
    };
141729
    FindValueSubscriber.prototype._complete = function () {
141730
        this.notifyComplete(this.yieldIndex ? -1 : undefined);
141731
    };
141732
    return FindValueSubscriber;
141733
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
141734
 
141735
//# sourceMappingURL=find.js.map
141736
 
141737
 
141738
/***/ }),
141739
 
141740
/***/ "./node_modules/rxjs/_esm5/internal/operators/findIndex.js":
141741
/*!*****************************************************************!*\
141742
  !*** ./node_modules/rxjs/_esm5/internal/operators/findIndex.js ***!
141743
  \*****************************************************************/
141744
/*! exports provided: findIndex */
141745
/***/ (function(module, __webpack_exports__, __webpack_require__) {
141746
 
141747
"use strict";
141748
__webpack_require__.r(__webpack_exports__);
141749
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return findIndex; });
141750
/* harmony import */ var _operators_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../operators/find */ "./node_modules/rxjs/_esm5/internal/operators/find.js");
141751
/** PURE_IMPORTS_START _operators_find PURE_IMPORTS_END */
141752
 
141753
/**
141754
 * Emits only the index of the first value emitted by the source Observable that
141755
 * meets some condition.
141756
 *
141757
 * <span class="informal">It's like {@link find}, but emits the index of the
141758
 * found value, not the value itself.</span>
141759
 *
141760
 * <img src="./img/findIndex.png" width="100%">
141761
 *
141762
 * `findIndex` searches for the first item in the source Observable that matches
141763
 * the specified condition embodied by the `predicate`, and returns the
141764
 * (zero-based) index of the first occurrence in the source. Unlike
141765
 * {@link first}, the `predicate` is required in `findIndex`, and does not emit
141766
 * an error if a valid value is not found.
141767
 *
141768
 * @example <caption>Emit the index of first click that happens on a DIV element</caption>
141769
 * var clicks = Rx.Observable.fromEvent(document, 'click');
141770
 * var result = clicks.findIndex(ev => ev.target.tagName === 'DIV');
141771
 * result.subscribe(x => console.log(x));
141772
 *
141773
 * @see {@link filter}
141774
 * @see {@link find}
141775
 * @see {@link first}
141776
 * @see {@link take}
141777
 *
141778
 * @param {function(value: T, index: number, source: Observable<T>): boolean} predicate
141779
 * A function called with each item to test for condition matching.
141780
 * @param {any} [thisArg] An optional argument to determine the value of `this`
141781
 * in the `predicate` function.
141782
 * @return {Observable} An Observable of the index of the first item that
141783
 * matches the condition.
141784
 * @method find
141785
 * @owner Observable
141786
 */
141787
function findIndex(predicate, thisArg) {
141788
    return function (source) { return source.lift(new _operators_find__WEBPACK_IMPORTED_MODULE_0__["FindValueOperator"](predicate, source, true, thisArg)); };
141789
}
141790
//# sourceMappingURL=findIndex.js.map
141791
 
141792
 
141793
/***/ }),
141794
 
141795
/***/ "./node_modules/rxjs/_esm5/internal/operators/first.js":
141796
/*!*************************************************************!*\
141797
  !*** ./node_modules/rxjs/_esm5/internal/operators/first.js ***!
141798
  \*************************************************************/
141799
/*! exports provided: first */
141800
/***/ (function(module, __webpack_exports__, __webpack_require__) {
141801
 
141802
"use strict";
141803
__webpack_require__.r(__webpack_exports__);
141804
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "first", function() { return first; });
141805
/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/EmptyError */ "./node_modules/rxjs/_esm5/internal/util/EmptyError.js");
141806
/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filter */ "./node_modules/rxjs/_esm5/internal/operators/filter.js");
141807
/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./take */ "./node_modules/rxjs/_esm5/internal/operators/take.js");
141808
/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./defaultIfEmpty */ "./node_modules/rxjs/_esm5/internal/operators/defaultIfEmpty.js");
141809
/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./throwIfEmpty */ "./node_modules/rxjs/_esm5/internal/operators/throwIfEmpty.js");
141810
/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/identity */ "./node_modules/rxjs/_esm5/internal/util/identity.js");
141811
/** PURE_IMPORTS_START _util_EmptyError,_filter,_take,_defaultIfEmpty,_throwIfEmpty,_util_identity PURE_IMPORTS_END */
141812
 
141813
 
141814
 
141815
 
141816
 
141817
 
141818
/**
141819
 * Emits only the first value (or the first value that meets some condition)
141820
 * emitted by the source Observable.
141821
 *
141822
 * <span class="informal">Emits only the first value. Or emits only the first
141823
 * value that passes some test.</span>
141824
 *
141825
 * <img src="./img/first.png" width="100%">
141826
 *
141827
 * If called with no arguments, `first` emits the first value of the source
141828
 * Observable, then completes. If called with a `predicate` function, `first`
141829
 * emits the first value of the source that matches the specified condition. It
141830
 * may also take a `resultSelector` function to produce the output value from
141831
 * the input value, and a `defaultValue` to emit in case the source completes
141832
 * before it is able to emit a valid value. Throws an error if `defaultValue`
141833
 * was not provided and a matching element is not found.
141834
 *
141835
 * @example <caption>Emit only the first click that happens on the DOM</caption>
141836
 * var clicks = Rx.Observable.fromEvent(document, 'click');
141837
 * var result = clicks.first();
141838
 * result.subscribe(x => console.log(x));
141839
 *
141840
 * @example <caption>Emits the first click that happens on a DIV</caption>
141841
 * var clicks = Rx.Observable.fromEvent(document, 'click');
141842
 * var result = clicks.first(ev => ev.target.tagName === 'DIV');
141843
 * result.subscribe(x => console.log(x));
141844
 *
141845
 * @see {@link filter}
141846
 * @see {@link find}
141847
 * @see {@link take}
141848
 *
141849
 * @throws {EmptyError} Delivers an EmptyError to the Observer's `error`
141850
 * callback if the Observable completes before any `next` notification was sent.
141851
 *
141852
 * @param {function(value: T, index: number, source: Observable<T>): boolean} [predicate]
141853
 * An optional function called with each item to test for condition matching.
141854
 * @param {R} [defaultValue] The default value emitted in case no valid value
141855
 * was found on the source.
141856
 * @return {Observable<T|R>} An Observable of the first item that matches the
141857
 * condition.
141858
 * @method first
141859
 * @owner Observable
141860
 */
141861
function first(predicate, defaultValue) {
141862
    var hasDefaultValue = arguments.length >= 2;
141863
    return function (source) { return source.pipe(predicate ? Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(function (v, i) { return predicate(v, i, source); }) : _util_identity__WEBPACK_IMPORTED_MODULE_5__["identity"], Object(_take__WEBPACK_IMPORTED_MODULE_2__["take"])(1), hasDefaultValue ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__["defaultIfEmpty"])(defaultValue) : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__["throwIfEmpty"])(function () { return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__["EmptyError"](); })); };
141864
}
141865
//# sourceMappingURL=first.js.map
141866
 
141867
 
141868
/***/ }),
141869
 
141870
/***/ "./node_modules/rxjs/_esm5/internal/operators/groupBy.js":
141871
/*!***************************************************************!*\
141872
  !*** ./node_modules/rxjs/_esm5/internal/operators/groupBy.js ***!
141873
  \***************************************************************/
141874
/*! exports provided: groupBy, GroupedObservable */
141875
/***/ (function(module, __webpack_exports__, __webpack_require__) {
141876
 
141877
"use strict";
141878
__webpack_require__.r(__webpack_exports__);
141879
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return groupBy; });
141880
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return GroupedObservable; });
141881
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
141882
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
141883
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
141884
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
141885
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
141886
/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription,_Observable,_Subject PURE_IMPORTS_END */
141887
 
141888
 
141889
 
141890
 
141891
 
141892
/* tslint:enable:max-line-length */
141893
/**
141894
 * Groups the items emitted by an Observable according to a specified criterion,
141895
 * and emits these grouped items as `GroupedObservables`, one
141896
 * {@link GroupedObservable} per group.
141897
 *
141898
 * <img src="./img/groupBy.png" width="100%">
141899
 *
141900
 * @example <caption>Group objects by id and return as array</caption>
141901
 * Observable.of<Obj>({id: 1, name: 'aze1'},
141902
 *                    {id: 2, name: 'sf2'},
141903
 *                    {id: 2, name: 'dg2'},
141904
 *                    {id: 1, name: 'erg1'},
141905
 *                    {id: 1, name: 'df1'},
141906
 *                    {id: 2, name: 'sfqfb2'},
141907
 *                    {id: 3, name: 'qfs3'},
141908
 *                    {id: 2, name: 'qsgqsfg2'}
141909
 *     )
141910
 *     .groupBy(p => p.id)
141911
 *     .flatMap( (group$) => group$.reduce((acc, cur) => [...acc, cur], []))
141912
 *     .subscribe(p => console.log(p));
141913
 *
141914
 * // displays:
141915
 * // [ { id: 1, name: 'aze1' },
141916
 * //   { id: 1, name: 'erg1' },
141917
 * //   { id: 1, name: 'df1' } ]
141918
 * //
141919
 * // [ { id: 2, name: 'sf2' },
141920
 * //   { id: 2, name: 'dg2' },
141921
 * //   { id: 2, name: 'sfqfb2' },
141922
 * //   { id: 2, name: 'qsgqsfg2' } ]
141923
 * //
141924
 * // [ { id: 3, name: 'qfs3' } ]
141925
 *
141926
 * @example <caption>Pivot data on the id field</caption>
141927
 * Observable.of<Obj>({id: 1, name: 'aze1'},
141928
 *                    {id: 2, name: 'sf2'},
141929
 *                    {id: 2, name: 'dg2'},
141930
 *                    {id: 1, name: 'erg1'},
141931
 *                    {id: 1, name: 'df1'},
141932
 *                    {id: 2, name: 'sfqfb2'},
141933
 *                    {id: 3, name: 'qfs1'},
141934
 *                    {id: 2, name: 'qsgqsfg2'}
141935
 *                   )
141936
 *     .groupBy(p => p.id, p => p.name)
141937
 *     .flatMap( (group$) => group$.reduce((acc, cur) => [...acc, cur], ["" + group$.key]))
141938
 *     .map(arr => ({'id': parseInt(arr[0]), 'values': arr.slice(1)}))
141939
 *     .subscribe(p => console.log(p));
141940
 *
141941
 * // displays:
141942
 * // { id: 1, values: [ 'aze1', 'erg1', 'df1' ] }
141943
 * // { id: 2, values: [ 'sf2', 'dg2', 'sfqfb2', 'qsgqsfg2' ] }
141944
 * // { id: 3, values: [ 'qfs1' ] }
141945
 *
141946
 * @param {function(value: T): K} keySelector A function that extracts the key
141947
 * for each item.
141948
 * @param {function(value: T): R} [elementSelector] A function that extracts the
141949
 * return element for each item.
141950
 * @param {function(grouped: GroupedObservable<K,R>): Observable<any>} [durationSelector]
141951
 * A function that returns an Observable to determine how long each group should
141952
 * exist.
141953
 * @return {Observable<GroupedObservable<K,R>>} An Observable that emits
141954
 * GroupedObservables, each of which corresponds to a unique key value and each
141955
 * of which emits those items from the source Observable that share that key
141956
 * value.
141957
 * @method groupBy
141958
 * @owner Observable
141959
 */
141960
function groupBy(keySelector, elementSelector, durationSelector, subjectSelector) {
141961
    return function (source) {
141962
        return source.lift(new GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector));
141963
    };
141964
}
141965
var GroupByOperator = /*@__PURE__*/ (function () {
141966
    function GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector) {
141967
        this.keySelector = keySelector;
141968
        this.elementSelector = elementSelector;
141969
        this.durationSelector = durationSelector;
141970
        this.subjectSelector = subjectSelector;
141971
    }
141972
    GroupByOperator.prototype.call = function (subscriber, source) {
141973
        return source.subscribe(new GroupBySubscriber(subscriber, this.keySelector, this.elementSelector, this.durationSelector, this.subjectSelector));
141974
    };
141975
    return GroupByOperator;
141976
}());
141977
/**
141978
 * We need this JSDoc comment for affecting ESDoc.
141979
 * @ignore
141980
 * @extends {Ignored}
141981
 */
141982
var GroupBySubscriber = /*@__PURE__*/ (function (_super) {
141983
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupBySubscriber, _super);
141984
    function GroupBySubscriber(destination, keySelector, elementSelector, durationSelector, subjectSelector) {
141985
        var _this = _super.call(this, destination) || this;
141986
        _this.keySelector = keySelector;
141987
        _this.elementSelector = elementSelector;
141988
        _this.durationSelector = durationSelector;
141989
        _this.subjectSelector = subjectSelector;
141990
        _this.groups = null;
141991
        _this.attemptedToUnsubscribe = false;
141992
        _this.count = 0;
141993
        return _this;
141994
    }
141995
    GroupBySubscriber.prototype._next = function (value) {
141996
        var key;
141997
        try {
141998
            key = this.keySelector(value);
141999
        }
142000
        catch (err) {
142001
            this.error(err);
142002
            return;
142003
        }
142004
        this._group(value, key);
142005
    };
142006
    GroupBySubscriber.prototype._group = function (value, key) {
142007
        var groups = this.groups;
142008
        if (!groups) {
142009
            groups = this.groups = new Map();
142010
        }
142011
        var group = groups.get(key);
142012
        var element;
142013
        if (this.elementSelector) {
142014
            try {
142015
                element = this.elementSelector(value);
142016
            }
142017
            catch (err) {
142018
                this.error(err);
142019
            }
142020
        }
142021
        else {
142022
            element = value;
142023
        }
142024
        if (!group) {
142025
            group = (this.subjectSelector ? this.subjectSelector() : new _Subject__WEBPACK_IMPORTED_MODULE_4__["Subject"]());
142026
            groups.set(key, group);
142027
            var groupedObservable = new GroupedObservable(key, group, this);
142028
            this.destination.next(groupedObservable);
142029
            if (this.durationSelector) {
142030
                var duration = void 0;
142031
                try {
142032
                    duration = this.durationSelector(new GroupedObservable(key, group));
142033
                }
142034
                catch (err) {
142035
                    this.error(err);
142036
                    return;
142037
                }
142038
                this.add(duration.subscribe(new GroupDurationSubscriber(key, group, this)));
142039
            }
142040
        }
142041
        if (!group.closed) {
142042
            group.next(element);
142043
        }
142044
    };
142045
    GroupBySubscriber.prototype._error = function (err) {
142046
        var groups = this.groups;
142047
        if (groups) {
142048
            groups.forEach(function (group, key) {
142049
                group.error(err);
142050
            });
142051
            groups.clear();
142052
        }
142053
        this.destination.error(err);
142054
    };
142055
    GroupBySubscriber.prototype._complete = function () {
142056
        var groups = this.groups;
142057
        if (groups) {
142058
            groups.forEach(function (group, key) {
142059
                group.complete();
142060
            });
142061
            groups.clear();
142062
        }
142063
        this.destination.complete();
142064
    };
142065
    GroupBySubscriber.prototype.removeGroup = function (key) {
142066
        this.groups.delete(key);
142067
    };
142068
    GroupBySubscriber.prototype.unsubscribe = function () {
142069
        if (!this.closed) {
142070
            this.attemptedToUnsubscribe = true;
142071
            if (this.count === 0) {
142072
                _super.prototype.unsubscribe.call(this);
142073
            }
142074
        }
142075
    };
142076
    return GroupBySubscriber;
142077
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
142078
/**
142079
 * We need this JSDoc comment for affecting ESDoc.
142080
 * @ignore
142081
 * @extends {Ignored}
142082
 */
142083
var GroupDurationSubscriber = /*@__PURE__*/ (function (_super) {
142084
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupDurationSubscriber, _super);
142085
    function GroupDurationSubscriber(key, group, parent) {
142086
        var _this = _super.call(this, group) || this;
142087
        _this.key = key;
142088
        _this.group = group;
142089
        _this.parent = parent;
142090
        return _this;
142091
    }
142092
    GroupDurationSubscriber.prototype._next = function (value) {
142093
        this.complete();
142094
    };
142095
    /** @deprecated This is an internal implementation detail, do not use. */
142096
    GroupDurationSubscriber.prototype._unsubscribe = function () {
142097
        var _a = this, parent = _a.parent, key = _a.key;
142098
        this.key = this.parent = null;
142099
        if (parent) {
142100
            parent.removeGroup(key);
142101
        }
142102
    };
142103
    return GroupDurationSubscriber;
142104
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
142105
/**
142106
 * An Observable representing values belonging to the same group represented by
142107
 * a common key. The values emitted by a GroupedObservable come from the source
142108
 * Observable. The common key is available as the field `key` on a
142109
 * GroupedObservable instance.
142110
 *
142111
 * @class GroupedObservable<K, T>
142112
 */
142113
var GroupedObservable = /*@__PURE__*/ (function (_super) {
142114
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupedObservable, _super);
142115
    /** @deprecated Do not construct this type. Internal use only */
142116
    function GroupedObservable(key, groupSubject, refCountSubscription) {
142117
        var _this = _super.call(this) || this;
142118
        _this.key = key;
142119
        _this.groupSubject = groupSubject;
142120
        _this.refCountSubscription = refCountSubscription;
142121
        return _this;
142122
    }
142123
    /** @deprecated This is an internal implementation detail, do not use. */
142124
    GroupedObservable.prototype._subscribe = function (subscriber) {
142125
        var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]();
142126
        var _a = this, refCountSubscription = _a.refCountSubscription, groupSubject = _a.groupSubject;
142127
        if (refCountSubscription && !refCountSubscription.closed) {
142128
            subscription.add(new InnerRefCountSubscription(refCountSubscription));
142129
        }
142130
        subscription.add(groupSubject.subscribe(subscriber));
142131
        return subscription;
142132
    };
142133
    return GroupedObservable;
142134
}(_Observable__WEBPACK_IMPORTED_MODULE_3__["Observable"]));
142135
 
142136
/**
142137
 * We need this JSDoc comment for affecting ESDoc.
142138
 * @ignore
142139
 * @extends {Ignored}
142140
 */
142141
var InnerRefCountSubscription = /*@__PURE__*/ (function (_super) {
142142
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](InnerRefCountSubscription, _super);
142143
    function InnerRefCountSubscription(parent) {
142144
        var _this = _super.call(this) || this;
142145
        _this.parent = parent;
142146
        parent.count++;
142147
        return _this;
142148
    }
142149
    InnerRefCountSubscription.prototype.unsubscribe = function () {
142150
        var parent = this.parent;
142151
        if (!parent.closed && !this.closed) {
142152
            _super.prototype.unsubscribe.call(this);
142153
            parent.count -= 1;
142154
            if (parent.count === 0 && parent.attemptedToUnsubscribe) {
142155
                parent.unsubscribe();
142156
            }
142157
        }
142158
    };
142159
    return InnerRefCountSubscription;
142160
}(_Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]));
142161
//# sourceMappingURL=groupBy.js.map
142162
 
142163
 
142164
/***/ }),
142165
 
142166
/***/ "./node_modules/rxjs/_esm5/internal/operators/ignoreElements.js":
142167
/*!**********************************************************************!*\
142168
  !*** ./node_modules/rxjs/_esm5/internal/operators/ignoreElements.js ***!
142169
  \**********************************************************************/
142170
/*! exports provided: ignoreElements */
142171
/***/ (function(module, __webpack_exports__, __webpack_require__) {
142172
 
142173
"use strict";
142174
__webpack_require__.r(__webpack_exports__);
142175
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return ignoreElements; });
142176
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
142177
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
142178
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
142179
 
142180
 
142181
/**
142182
 * Ignores all items emitted by the source Observable and only passes calls of `complete` or `error`.
142183
 *
142184
 * <img src="./img/ignoreElements.png" width="100%">
142185
 *
142186
 * @return {Observable} An empty Observable that only calls `complete`
142187
 * or `error`, based on which one is called by the source Observable.
142188
 * @method ignoreElements
142189
 * @owner Observable
142190
 */
142191
function ignoreElements() {
142192
    return function ignoreElementsOperatorFunction(source) {
142193
        return source.lift(new IgnoreElementsOperator());
142194
    };
142195
}
142196
var IgnoreElementsOperator = /*@__PURE__*/ (function () {
142197
    function IgnoreElementsOperator() {
142198
    }
142199
    IgnoreElementsOperator.prototype.call = function (subscriber, source) {
142200
        return source.subscribe(new IgnoreElementsSubscriber(subscriber));
142201
    };
142202
    return IgnoreElementsOperator;
142203
}());
142204
/**
142205
 * We need this JSDoc comment for affecting ESDoc.
142206
 * @ignore
142207
 * @extends {Ignored}
142208
 */
142209
var IgnoreElementsSubscriber = /*@__PURE__*/ (function (_super) {
142210
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](IgnoreElementsSubscriber, _super);
142211
    function IgnoreElementsSubscriber() {
142212
        return _super !== null && _super.apply(this, arguments) || this;
142213
    }
142214
    IgnoreElementsSubscriber.prototype._next = function (unused) {
142215
        // Do nothing
142216
    };
142217
    return IgnoreElementsSubscriber;
142218
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
142219
//# sourceMappingURL=ignoreElements.js.map
142220
 
142221
 
142222
/***/ }),
142223
 
142224
/***/ "./node_modules/rxjs/_esm5/internal/operators/isEmpty.js":
142225
/*!***************************************************************!*\
142226
  !*** ./node_modules/rxjs/_esm5/internal/operators/isEmpty.js ***!
142227
  \***************************************************************/
142228
/*! exports provided: isEmpty */
142229
/***/ (function(module, __webpack_exports__, __webpack_require__) {
142230
 
142231
"use strict";
142232
__webpack_require__.r(__webpack_exports__);
142233
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return isEmpty; });
142234
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
142235
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
142236
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
142237
 
142238
 
142239
function isEmpty() {
142240
    return function (source) { return source.lift(new IsEmptyOperator()); };
142241
}
142242
var IsEmptyOperator = /*@__PURE__*/ (function () {
142243
    function IsEmptyOperator() {
142244
    }
142245
    IsEmptyOperator.prototype.call = function (observer, source) {
142246
        return source.subscribe(new IsEmptySubscriber(observer));
142247
    };
142248
    return IsEmptyOperator;
142249
}());
142250
/**
142251
 * We need this JSDoc comment for affecting ESDoc.
142252
 * @ignore
142253
 * @extends {Ignored}
142254
 */
142255
var IsEmptySubscriber = /*@__PURE__*/ (function (_super) {
142256
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](IsEmptySubscriber, _super);
142257
    function IsEmptySubscriber(destination) {
142258
        return _super.call(this, destination) || this;
142259
    }
142260
    IsEmptySubscriber.prototype.notifyComplete = function (isEmpty) {
142261
        var destination = this.destination;
142262
        destination.next(isEmpty);
142263
        destination.complete();
142264
    };
142265
    IsEmptySubscriber.prototype._next = function (value) {
142266
        this.notifyComplete(false);
142267
    };
142268
    IsEmptySubscriber.prototype._complete = function () {
142269
        this.notifyComplete(true);
142270
    };
142271
    return IsEmptySubscriber;
142272
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
142273
//# sourceMappingURL=isEmpty.js.map
142274
 
142275
 
142276
/***/ }),
142277
 
142278
/***/ "./node_modules/rxjs/_esm5/internal/operators/last.js":
142279
/*!************************************************************!*\
142280
  !*** ./node_modules/rxjs/_esm5/internal/operators/last.js ***!
142281
  \************************************************************/
142282
/*! exports provided: last */
142283
/***/ (function(module, __webpack_exports__, __webpack_require__) {
142284
 
142285
"use strict";
142286
__webpack_require__.r(__webpack_exports__);
142287
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "last", function() { return last; });
142288
/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/EmptyError */ "./node_modules/rxjs/_esm5/internal/util/EmptyError.js");
142289
/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filter */ "./node_modules/rxjs/_esm5/internal/operators/filter.js");
142290
/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./takeLast */ "./node_modules/rxjs/_esm5/internal/operators/takeLast.js");
142291
/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./throwIfEmpty */ "./node_modules/rxjs/_esm5/internal/operators/throwIfEmpty.js");
142292
/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./defaultIfEmpty */ "./node_modules/rxjs/_esm5/internal/operators/defaultIfEmpty.js");
142293
/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/identity */ "./node_modules/rxjs/_esm5/internal/util/identity.js");
142294
/** PURE_IMPORTS_START _util_EmptyError,_filter,_takeLast,_throwIfEmpty,_defaultIfEmpty,_util_identity PURE_IMPORTS_END */
142295
 
142296
 
142297
 
142298
 
142299
 
142300
 
142301
/**
142302
 * Returns an Observable that emits only the last item emitted by the source Observable.
142303
 * It optionally takes a predicate function as a parameter, in which case, rather than emitting
142304
 * the last item from the source Observable, the resulting Observable will emit the last item
142305
 * from the source Observable that satisfies the predicate.
142306
 *
142307
 * <img src="./img/last.png" width="100%">
142308
 *
142309
 * @throws {EmptyError} Delivers an EmptyError to the Observer's `error`
142310
 * callback if the Observable completes before any `next` notification was sent.
142311
 * @param {function} [predicate] - The condition any source emitted item has to satisfy.
142312
 * @param {any} [defaultValue] - An optional default value to provide if last
142313
 * predicate isn't met or no values were emitted.
142314
 * @return {Observable} An Observable that emits only the last item satisfying the given condition
142315
 * from the source, or an NoSuchElementException if no such items are emitted.
142316
 * @throws - Throws if no items that match the predicate are emitted by the source Observable.
142317
 */
142318
function last(predicate, defaultValue) {
142319
    var hasDefaultValue = arguments.length >= 2;
142320
    return function (source) { return source.pipe(predicate ? Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(function (v, i) { return predicate(v, i, source); }) : _util_identity__WEBPACK_IMPORTED_MODULE_5__["identity"], Object(_takeLast__WEBPACK_IMPORTED_MODULE_2__["takeLast"])(1), hasDefaultValue ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__["defaultIfEmpty"])(defaultValue) : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__["throwIfEmpty"])(function () { return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__["EmptyError"](); })); };
142321
}
142322
//# sourceMappingURL=last.js.map
142323
 
142324
 
142325
/***/ }),
142326
 
142327
/***/ "./node_modules/rxjs/_esm5/internal/operators/map.js":
142328
/*!***********************************************************!*\
142329
  !*** ./node_modules/rxjs/_esm5/internal/operators/map.js ***!
142330
  \***********************************************************/
142331
/*! exports provided: map, MapOperator */
142332
/***/ (function(module, __webpack_exports__, __webpack_require__) {
142333
 
142334
"use strict";
142335
__webpack_require__.r(__webpack_exports__);
142336
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return map; });
142337
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MapOperator", function() { return MapOperator; });
142338
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
142339
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
142340
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
142341
 
142342
 
142343
/**
142344
 * Applies a given `project` function to each value emitted by the source
142345
 * Observable, and emits the resulting values as an Observable.
142346
 *
142347
 * <span class="informal">Like [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map),
142348
 * it passes each source value through a transformation function to get
142349
 * corresponding output values.</span>
142350
 *
142351
 * <img src="./img/map.png" width="100%">
142352
 *
142353
 * Similar to the well known `Array.prototype.map` function, this operator
142354
 * applies a projection to each value and emits that projection in the output
142355
 * Observable.
142356
 *
142357
 * @example <caption>Map every click to the clientX position of that click</caption>
142358
 * var clicks = Rx.Observable.fromEvent(document, 'click');
142359
 * var positions = clicks.map(ev => ev.clientX);
142360
 * positions.subscribe(x => console.log(x));
142361
 *
142362
 * @see {@link mapTo}
142363
 * @see {@link pluck}
142364
 *
142365
 * @param {function(value: T, index: number): R} project The function to apply
142366
 * to each `value` emitted by the source Observable. The `index` parameter is
142367
 * the number `i` for the i-th emission that has happened since the
142368
 * subscription, starting from the number `0`.
142369
 * @param {any} [thisArg] An optional argument to define what `this` is in the
142370
 * `project` function.
142371
 * @return {Observable<R>} An Observable that emits the values from the source
142372
 * Observable transformed by the given `project` function.
142373
 * @method map
142374
 * @owner Observable
142375
 */
142376
function map(project, thisArg) {
142377
    return function mapOperation(source) {
142378
        if (typeof project !== 'function') {
142379
            throw new TypeError('argument is not a function. Are you looking for `mapTo()`?');
142380
        }
142381
        return source.lift(new MapOperator(project, thisArg));
142382
    };
142383
}
142384
var MapOperator = /*@__PURE__*/ (function () {
142385
    function MapOperator(project, thisArg) {
142386
        this.project = project;
142387
        this.thisArg = thisArg;
142388
    }
142389
    MapOperator.prototype.call = function (subscriber, source) {
142390
        return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg));
142391
    };
142392
    return MapOperator;
142393
}());
142394
 
142395
/**
142396
 * We need this JSDoc comment for affecting ESDoc.
142397
 * @ignore
142398
 * @extends {Ignored}
142399
 */
142400
var MapSubscriber = /*@__PURE__*/ (function (_super) {
142401
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MapSubscriber, _super);
142402
    function MapSubscriber(destination, project, thisArg) {
142403
        var _this = _super.call(this, destination) || this;
142404
        _this.project = project;
142405
        _this.count = 0;
142406
        _this.thisArg = thisArg || _this;
142407
        return _this;
142408
    }
142409
    // NOTE: This looks unoptimized, but it's actually purposefully NOT
142410
    // using try/catch optimizations.
142411
    MapSubscriber.prototype._next = function (value) {
142412
        var result;
142413
        try {
142414
            result = this.project.call(this.thisArg, value, this.count++);
142415
        }
142416
        catch (err) {
142417
            this.destination.error(err);
142418
            return;
142419
        }
142420
        this.destination.next(result);
142421
    };
142422
    return MapSubscriber;
142423
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
142424
//# sourceMappingURL=map.js.map
142425
 
142426
 
142427
/***/ }),
142428
 
142429
/***/ "./node_modules/rxjs/_esm5/internal/operators/mapTo.js":
142430
/*!*************************************************************!*\
142431
  !*** ./node_modules/rxjs/_esm5/internal/operators/mapTo.js ***!
142432
  \*************************************************************/
142433
/*! exports provided: mapTo */
142434
/***/ (function(module, __webpack_exports__, __webpack_require__) {
142435
 
142436
"use strict";
142437
__webpack_require__.r(__webpack_exports__);
142438
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return mapTo; });
142439
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
142440
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
142441
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
142442
 
142443
 
142444
/**
142445
 * Emits the given constant value on the output Observable every time the source
142446
 * Observable emits a value.
142447
 *
142448
 * <span class="informal">Like {@link map}, but it maps every source value to
142449
 * the same output value every time.</span>
142450
 *
142451
 * <img src="./img/mapTo.png" width="100%">
142452
 *
142453
 * Takes a constant `value` as argument, and emits that whenever the source
142454
 * Observable emits a value. In other words, ignores the actual source value,
142455
 * and simply uses the emission moment to know when to emit the given `value`.
142456
 *
142457
 * @example <caption>Map every click to the string 'Hi'</caption>
142458
 * var clicks = Rx.Observable.fromEvent(document, 'click');
142459
 * var greetings = clicks.mapTo('Hi');
142460
 * greetings.subscribe(x => console.log(x));
142461
 *
142462
 * @see {@link map}
142463
 *
142464
 * @param {any} value The value to map each source value to.
142465
 * @return {Observable} An Observable that emits the given `value` every time
142466
 * the source Observable emits something.
142467
 * @method mapTo
142468
 * @owner Observable
142469
 */
142470
function mapTo(value) {
142471
    return function (source) { return source.lift(new MapToOperator(value)); };
142472
}
142473
var MapToOperator = /*@__PURE__*/ (function () {
142474
    function MapToOperator(value) {
142475
        this.value = value;
142476
    }
142477
    MapToOperator.prototype.call = function (subscriber, source) {
142478
        return source.subscribe(new MapToSubscriber(subscriber, this.value));
142479
    };
142480
    return MapToOperator;
142481
}());
142482
/**
142483
 * We need this JSDoc comment for affecting ESDoc.
142484
 * @ignore
142485
 * @extends {Ignored}
142486
 */
142487
var MapToSubscriber = /*@__PURE__*/ (function (_super) {
142488
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MapToSubscriber, _super);
142489
    function MapToSubscriber(destination, value) {
142490
        var _this = _super.call(this, destination) || this;
142491
        _this.value = value;
142492
        return _this;
142493
    }
142494
    MapToSubscriber.prototype._next = function (x) {
142495
        this.destination.next(this.value);
142496
    };
142497
    return MapToSubscriber;
142498
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
142499
//# sourceMappingURL=mapTo.js.map
142500
 
142501
 
142502
/***/ }),
142503
 
142504
/***/ "./node_modules/rxjs/_esm5/internal/operators/materialize.js":
142505
/*!*******************************************************************!*\
142506
  !*** ./node_modules/rxjs/_esm5/internal/operators/materialize.js ***!
142507
  \*******************************************************************/
142508
/*! exports provided: materialize */
142509
/***/ (function(module, __webpack_exports__, __webpack_require__) {
142510
 
142511
"use strict";
142512
__webpack_require__.r(__webpack_exports__);
142513
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return materialize; });
142514
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
142515
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
142516
/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Notification */ "./node_modules/rxjs/_esm5/internal/Notification.js");
142517
/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
142518
 
142519
 
142520
 
142521
/**
142522
 * Represents all of the notifications from the source Observable as `next`
142523
 * emissions marked with their original types within {@link Notification}
142524
 * objects.
142525
 *
142526
 * <span class="informal">Wraps `next`, `error` and `complete` emissions in
142527
 * {@link Notification} objects, emitted as `next` on the output Observable.
142528
 * </span>
142529
 *
142530
 * <img src="./img/materialize.png" width="100%">
142531
 *
142532
 * `materialize` returns an Observable that emits a `next` notification for each
142533
 * `next`, `error`, or `complete` emission of the source Observable. When the
142534
 * source Observable emits `complete`, the output Observable will emit `next` as
142535
 * a Notification of type "complete", and then it will emit `complete` as well.
142536
 * When the source Observable emits `error`, the output will emit `next` as a
142537
 * Notification of type "error", and then `complete`.
142538
 *
142539
 * This operator is useful for producing metadata of the source Observable, to
142540
 * be consumed as `next` emissions. Use it in conjunction with
142541
 * {@link dematerialize}.
142542
 *
142543
 * @example <caption>Convert a faulty Observable to an Observable of Notifications</caption>
142544
 * var letters = Rx.Observable.of('a', 'b', 13, 'd');
142545
 * var upperCase = letters.map(x => x.toUpperCase());
142546
 * var materialized = upperCase.materialize();
142547
 * materialized.subscribe(x => console.log(x));
142548
 *
142549
 * // Results in the following:
142550
 * // - Notification {kind: "N", value: "A", error: undefined, hasValue: true}
142551
 * // - Notification {kind: "N", value: "B", error: undefined, hasValue: true}
142552
 * // - Notification {kind: "E", value: undefined, error: TypeError:
142553
 * //   x.toUpperCase is not a function at MapSubscriber.letters.map.x
142554
 * //   [as project] (http://1…, hasValue: false}
142555
 *
142556
 * @see {@link Notification}
142557
 * @see {@link dematerialize}
142558
 *
142559
 * @return {Observable<Notification<T>>} An Observable that emits
142560
 * {@link Notification} objects that wrap the original emissions from the source
142561
 * Observable with metadata.
142562
 * @method materialize
142563
 * @owner Observable
142564
 */
142565
function materialize() {
142566
    return function materializeOperatorFunction(source) {
142567
        return source.lift(new MaterializeOperator());
142568
    };
142569
}
142570
var MaterializeOperator = /*@__PURE__*/ (function () {
142571
    function MaterializeOperator() {
142572
    }
142573
    MaterializeOperator.prototype.call = function (subscriber, source) {
142574
        return source.subscribe(new MaterializeSubscriber(subscriber));
142575
    };
142576
    return MaterializeOperator;
142577
}());
142578
/**
142579
 * We need this JSDoc comment for affecting ESDoc.
142580
 * @ignore
142581
 * @extends {Ignored}
142582
 */
142583
var MaterializeSubscriber = /*@__PURE__*/ (function (_super) {
142584
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MaterializeSubscriber, _super);
142585
    function MaterializeSubscriber(destination) {
142586
        return _super.call(this, destination) || this;
142587
    }
142588
    MaterializeSubscriber.prototype._next = function (value) {
142589
        this.destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createNext(value));
142590
    };
142591
    MaterializeSubscriber.prototype._error = function (err) {
142592
        var destination = this.destination;
142593
        destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createError(err));
142594
        destination.complete();
142595
    };
142596
    MaterializeSubscriber.prototype._complete = function () {
142597
        var destination = this.destination;
142598
        destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createComplete());
142599
        destination.complete();
142600
    };
142601
    return MaterializeSubscriber;
142602
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
142603
//# sourceMappingURL=materialize.js.map
142604
 
142605
 
142606
/***/ }),
142607
 
142608
/***/ "./node_modules/rxjs/_esm5/internal/operators/max.js":
142609
/*!***********************************************************!*\
142610
  !*** ./node_modules/rxjs/_esm5/internal/operators/max.js ***!
142611
  \***********************************************************/
142612
/*! exports provided: max */
142613
/***/ (function(module, __webpack_exports__, __webpack_require__) {
142614
 
142615
"use strict";
142616
__webpack_require__.r(__webpack_exports__);
142617
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; });
142618
/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./reduce */ "./node_modules/rxjs/_esm5/internal/operators/reduce.js");
142619
/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
142620
 
142621
/**
142622
 * The Max operator operates on an Observable that emits numbers (or items that can be compared with a provided function),
142623
 * and when source Observable completes it emits a single item: the item with the largest value.
142624
 *
142625
 * <img src="./img/max.png" width="100%">
142626
 *
142627
 * @example <caption>Get the maximal value of a series of numbers</caption>
142628
 * Rx.Observable.of(5, 4, 7, 2, 8)
142629
 *   .max()
142630
 *   .subscribe(x => console.log(x)); // -> 8
142631
 *
142632
 * @example <caption>Use a comparer function to get the maximal item</caption>
142633
 * interface Person {
142634
 *   age: number,
142635
 *   name: string
142636
 * }
142637
 * Observable.of<Person>({age: 7, name: 'Foo'},
142638
 *                       {age: 5, name: 'Bar'},
142639
 *                       {age: 9, name: 'Beer'})
142640
 *           .max<Person>((a: Person, b: Person) => a.age < b.age ? -1 : 1)
142641
 *           .subscribe((x: Person) => console.log(x.name)); // -> 'Beer'
142642
 * }
142643
 *
142644
 * @see {@link min}
142645
 *
142646
 * @param {Function} [comparer] - Optional comparer function that it will use instead of its default to compare the
142647
 * value of two items.
142648
 * @return {Observable} An Observable that emits item with the largest value.
142649
 * @method max
142650
 * @owner Observable
142651
 */
142652
function max(comparer) {
142653
    var max = (typeof comparer === 'function')
142654
        ? function (x, y) { return comparer(x, y) > 0 ? x : y; }
142655
        : function (x, y) { return x > y ? x : y; };
142656
    return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(max);
142657
}
142658
//# sourceMappingURL=max.js.map
142659
 
142660
 
142661
/***/ }),
142662
 
142663
/***/ "./node_modules/rxjs/_esm5/internal/operators/merge.js":
142664
/*!*************************************************************!*\
142665
  !*** ./node_modules/rxjs/_esm5/internal/operators/merge.js ***!
142666
  \*************************************************************/
142667
/*! exports provided: merge */
142668
/***/ (function(module, __webpack_exports__, __webpack_require__) {
142669
 
142670
"use strict";
142671
__webpack_require__.r(__webpack_exports__);
142672
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; });
142673
/* harmony import */ var _observable_merge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/merge */ "./node_modules/rxjs/_esm5/internal/observable/merge.js");
142674
/** PURE_IMPORTS_START _observable_merge PURE_IMPORTS_END */
142675
 
142676
/* tslint:enable:max-line-length */
142677
/**
142678
 * @deprecated Deprecated in favor of static merge.
142679
 */
142680
function merge() {
142681
    var observables = [];
142682
    for (var _i = 0; _i < arguments.length; _i++) {
142683
        observables[_i] = arguments[_i];
142684
    }
142685
    return function (source) { return source.lift.call(_observable_merge__WEBPACK_IMPORTED_MODULE_0__["merge"].apply(void 0, [source].concat(observables))); };
142686
}
142687
//# sourceMappingURL=merge.js.map
142688
 
142689
 
142690
/***/ }),
142691
 
142692
/***/ "./node_modules/rxjs/_esm5/internal/operators/mergeAll.js":
142693
/*!****************************************************************!*\
142694
  !*** ./node_modules/rxjs/_esm5/internal/operators/mergeAll.js ***!
142695
  \****************************************************************/
142696
/*! exports provided: mergeAll */
142697
/***/ (function(module, __webpack_exports__, __webpack_require__) {
142698
 
142699
"use strict";
142700
__webpack_require__.r(__webpack_exports__);
142701
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return mergeAll; });
142702
/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mergeMap */ "./node_modules/rxjs/_esm5/internal/operators/mergeMap.js");
142703
/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/identity */ "./node_modules/rxjs/_esm5/internal/util/identity.js");
142704
/** PURE_IMPORTS_START _mergeMap,_util_identity PURE_IMPORTS_END */
142705
 
142706
 
142707
/**
142708
 * Converts a higher-order Observable into a first-order Observable which
142709
 * concurrently delivers all values that are emitted on the inner Observables.
142710
 *
142711
 * <span class="informal">Flattens an Observable-of-Observables.</span>
142712
 *
142713
 * <img src="./img/mergeAll.png" width="100%">
142714
 *
142715
 * `mergeAll` subscribes to an Observable that emits Observables, also known as
142716
 * a higher-order Observable. Each time it observes one of these emitted inner
142717
 * Observables, it subscribes to that and delivers all the values from the
142718
 * inner Observable on the output Observable. The output Observable only
142719
 * completes once all inner Observables have completed. Any error delivered by
142720
 * a inner Observable will be immediately emitted on the output Observable.
142721
 *
142722
 * @example <caption>Spawn a new interval Observable for each click event, and blend their outputs as one Observable</caption>
142723
 * var clicks = Rx.Observable.fromEvent(document, 'click');
142724
 * var higherOrder = clicks.map((ev) => Rx.Observable.interval(1000));
142725
 * var firstOrder = higherOrder.mergeAll();
142726
 * firstOrder.subscribe(x => console.log(x));
142727
 *
142728
 * @example <caption>Count from 0 to 9 every second for each click, but only allow 2 concurrent timers</caption>
142729
 * var clicks = Rx.Observable.fromEvent(document, 'click');
142730
 * var higherOrder = clicks.map((ev) => Rx.Observable.interval(1000).take(10));
142731
 * var firstOrder = higherOrder.mergeAll(2);
142732
 * firstOrder.subscribe(x => console.log(x));
142733
 *
142734
 * @see {@link combineAll}
142735
 * @see {@link concatAll}
142736
 * @see {@link exhaust}
142737
 * @see {@link merge}
142738
 * @see {@link mergeMap}
142739
 * @see {@link mergeMapTo}
142740
 * @see {@link mergeScan}
142741
 * @see {@link switch}
142742
 * @see {@link zipAll}
142743
 *
142744
 * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of inner
142745
 * Observables being subscribed to concurrently.
142746
 * @return {Observable} An Observable that emits values coming from all the
142747
 * inner Observables emitted by the source Observable.
142748
 * @method mergeAll
142749
 * @owner Observable
142750
 */
142751
function mergeAll(concurrent) {
142752
    if (concurrent === void 0) {
142753
        concurrent = Number.POSITIVE_INFINITY;
142754
    }
142755
    return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"], concurrent);
142756
}
142757
//# sourceMappingURL=mergeAll.js.map
142758
 
142759
 
142760
/***/ }),
142761
 
142762
/***/ "./node_modules/rxjs/_esm5/internal/operators/mergeMap.js":
142763
/*!****************************************************************!*\
142764
  !*** ./node_modules/rxjs/_esm5/internal/operators/mergeMap.js ***!
142765
  \****************************************************************/
142766
/*! exports provided: mergeMap, MergeMapOperator, MergeMapSubscriber */
142767
/***/ (function(module, __webpack_exports__, __webpack_require__) {
142768
 
142769
"use strict";
142770
__webpack_require__.r(__webpack_exports__);
142771
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return mergeMap; });
142772
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeMapOperator", function() { return MergeMapOperator; });
142773
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeMapSubscriber", function() { return MergeMapSubscriber; });
142774
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
142775
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
142776
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
142777
/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./map */ "./node_modules/rxjs/_esm5/internal/operators/map.js");
142778
/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../observable/from */ "./node_modules/rxjs/_esm5/internal/observable/from.js");
142779
/** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_map,_observable_from PURE_IMPORTS_END */
142780
 
142781
 
142782
 
142783
 
142784
 
142785
/* tslint:enable:max-line-length */
142786
/**
142787
 * Projects each source value to an Observable which is merged in the output
142788
 * Observable.
142789
 *
142790
 * <span class="informal">Maps each value to an Observable, then flattens all of
142791
 * these inner Observables using {@link mergeAll}.</span>
142792
 *
142793
 * <img src="./img/mergeMap.png" width="100%">
142794
 *
142795
 * Returns an Observable that emits items based on applying a function that you
142796
 * supply to each item emitted by the source Observable, where that function
142797
 * returns an Observable, and then merging those resulting Observables and
142798
 * emitting the results of this merger.
142799
 *
142800
 * @example <caption>Map and flatten each letter to an Observable ticking every 1 second</caption>
142801
 * var letters = Rx.Observable.of('a', 'b', 'c');
142802
 * var result = letters.mergeMap(x =>
142803
 *   Rx.Observable.interval(1000).map(i => x+i)
142804
 * );
142805
 * result.subscribe(x => console.log(x));
142806
 *
142807
 * // Results in the following:
142808
 * // a0
142809
 * // b0
142810
 * // c0
142811
 * // a1
142812
 * // b1
142813
 * // c1
142814
 * // continues to list a,b,c with respective ascending integers
142815
 *
142816
 * @see {@link concatMap}
142817
 * @see {@link exhaustMap}
142818
 * @see {@link merge}
142819
 * @see {@link mergeAll}
142820
 * @see {@link mergeMapTo}
142821
 * @see {@link mergeScan}
142822
 * @see {@link switchMap}
142823
 *
142824
 * @param {function(value: T, ?index: number): ObservableInput} project A function
142825
 * that, when applied to an item emitted by the source Observable, returns an
142826
 * Observable.
142827
 * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of input
142828
 * Observables being subscribed to concurrently.
142829
 * @return {Observable} An Observable that emits the result of applying the
142830
 * projection function (and the optional `resultSelector`) to each item emitted
142831
 * by the source Observable and merging the results of the Observables obtained
142832
 * from this transformation.
142833
 * @method mergeMap
142834
 * @owner Observable
142835
 */
142836
function mergeMap(project, resultSelector, concurrent) {
142837
    if (concurrent === void 0) {
142838
        concurrent = Number.POSITIVE_INFINITY;
142839
    }
142840
    if (typeof resultSelector === 'function') {
142841
        // DEPRECATED PATH
142842
        return function (source) { return source.pipe(mergeMap(function (a, i) { return Object(_observable_from__WEBPACK_IMPORTED_MODULE_4__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (b, ii) { return resultSelector(a, b, i, ii); })); }, concurrent)); };
142843
    }
142844
    else if (typeof resultSelector === 'number') {
142845
        concurrent = resultSelector;
142846
    }
142847
    return function (source) { return source.lift(new MergeMapOperator(project, concurrent)); };
142848
}
142849
var MergeMapOperator = /*@__PURE__*/ (function () {
142850
    function MergeMapOperator(project, concurrent) {
142851
        if (concurrent === void 0) {
142852
            concurrent = Number.POSITIVE_INFINITY;
142853
        }
142854
        this.project = project;
142855
        this.concurrent = concurrent;
142856
    }
142857
    MergeMapOperator.prototype.call = function (observer, source) {
142858
        return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));
142859
    };
142860
    return MergeMapOperator;
142861
}());
142862
 
142863
/**
142864
 * We need this JSDoc comment for affecting ESDoc.
142865
 * @ignore
142866
 * @extends {Ignored}
142867
 */
142868
var MergeMapSubscriber = /*@__PURE__*/ (function (_super) {
142869
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MergeMapSubscriber, _super);
142870
    function MergeMapSubscriber(destination, project, concurrent) {
142871
        if (concurrent === void 0) {
142872
            concurrent = Number.POSITIVE_INFINITY;
142873
        }
142874
        var _this = _super.call(this, destination) || this;
142875
        _this.project = project;
142876
        _this.concurrent = concurrent;
142877
        _this.hasCompleted = false;
142878
        _this.buffer = [];
142879
        _this.active = 0;
142880
        _this.index = 0;
142881
        return _this;
142882
    }
142883
    MergeMapSubscriber.prototype._next = function (value) {
142884
        if (this.active < this.concurrent) {
142885
            this._tryNext(value);
142886
        }
142887
        else {
142888
            this.buffer.push(value);
142889
        }
142890
    };
142891
    MergeMapSubscriber.prototype._tryNext = function (value) {
142892
        var result;
142893
        var index = this.index++;
142894
        try {
142895
            result = this.project(value, index);
142896
        }
142897
        catch (err) {
142898
            this.destination.error(err);
142899
            return;
142900
        }
142901
        this.active++;
142902
        this._innerSub(result, value, index);
142903
    };
142904
    MergeMapSubscriber.prototype._innerSub = function (ish, value, index) {
142905
        this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, ish, value, index));
142906
    };
142907
    MergeMapSubscriber.prototype._complete = function () {
142908
        this.hasCompleted = true;
142909
        if (this.active === 0 && this.buffer.length === 0) {
142910
            this.destination.complete();
142911
        }
142912
    };
142913
    MergeMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
142914
        this.destination.next(innerValue);
142915
    };
142916
    MergeMapSubscriber.prototype.notifyComplete = function (innerSub) {
142917
        var buffer = this.buffer;
142918
        this.remove(innerSub);
142919
        this.active--;
142920
        if (buffer.length > 0) {
142921
            this._next(buffer.shift());
142922
        }
142923
        else if (this.active === 0 && this.hasCompleted) {
142924
            this.destination.complete();
142925
        }
142926
    };
142927
    return MergeMapSubscriber;
142928
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
142929
 
142930
//# sourceMappingURL=mergeMap.js.map
142931
 
142932
 
142933
/***/ }),
142934
 
142935
/***/ "./node_modules/rxjs/_esm5/internal/operators/mergeMapTo.js":
142936
/*!******************************************************************!*\
142937
  !*** ./node_modules/rxjs/_esm5/internal/operators/mergeMapTo.js ***!
142938
  \******************************************************************/
142939
/*! exports provided: mergeMapTo */
142940
/***/ (function(module, __webpack_exports__, __webpack_require__) {
142941
 
142942
"use strict";
142943
__webpack_require__.r(__webpack_exports__);
142944
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return mergeMapTo; });
142945
/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mergeMap */ "./node_modules/rxjs/_esm5/internal/operators/mergeMap.js");
142946
/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */
142947
 
142948
/* tslint:enable:max-line-length */
142949
/**
142950
 * Projects each source value to the same Observable which is merged multiple
142951
 * times in the output Observable.
142952
 *
142953
 * <span class="informal">It's like {@link mergeMap}, but maps each value always
142954
 * to the same inner Observable.</span>
142955
 *
142956
 * <img src="./img/mergeMapTo.png" width="100%">
142957
 *
142958
 * Maps each source value to the given Observable `innerObservable` regardless
142959
 * of the source value, and then merges those resulting Observables into one
142960
 * single Observable, which is the output Observable.
142961
 *
142962
 * @example <caption>For each click event, start an interval Observable ticking every 1 second</caption>
142963
 * var clicks = Rx.Observable.fromEvent(document, 'click');
142964
 * var result = clicks.mergeMapTo(Rx.Observable.interval(1000));
142965
 * result.subscribe(x => console.log(x));
142966
 *
142967
 * @see {@link concatMapTo}
142968
 * @see {@link merge}
142969
 * @see {@link mergeAll}
142970
 * @see {@link mergeMap}
142971
 * @see {@link mergeScan}
142972
 * @see {@link switchMapTo}
142973
 *
142974
 * @param {ObservableInput} innerObservable An Observable to replace each value from
142975
 * the source Observable.
142976
 * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of input
142977
 * Observables being subscribed to concurrently.
142978
 * @return {Observable} An Observable that emits items from the given
142979
 * `innerObservable`
142980
 * @method mergeMapTo
142981
 * @owner Observable
142982
 */
142983
function mergeMapTo(innerObservable, resultSelector, concurrent) {
142984
    if (concurrent === void 0) {
142985
        concurrent = Number.POSITIVE_INFINITY;
142986
    }
142987
    if (typeof resultSelector === 'function') {
142988
        return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(function () { return innerObservable; }, resultSelector, concurrent);
142989
    }
142990
    if (typeof resultSelector === 'number') {
142991
        concurrent = resultSelector;
142992
    }
142993
    return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(function () { return innerObservable; }, concurrent);
142994
}
142995
//# sourceMappingURL=mergeMapTo.js.map
142996
 
142997
 
142998
/***/ }),
142999
 
143000
/***/ "./node_modules/rxjs/_esm5/internal/operators/mergeScan.js":
143001
/*!*****************************************************************!*\
143002
  !*** ./node_modules/rxjs/_esm5/internal/operators/mergeScan.js ***!
143003
  \*****************************************************************/
143004
/*! exports provided: mergeScan, MergeScanOperator, MergeScanSubscriber */
143005
/***/ (function(module, __webpack_exports__, __webpack_require__) {
143006
 
143007
"use strict";
143008
__webpack_require__.r(__webpack_exports__);
143009
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return mergeScan; });
143010
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeScanOperator", function() { return MergeScanOperator; });
143011
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeScanSubscriber", function() { return MergeScanSubscriber; });
143012
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
143013
/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/tryCatch */ "./node_modules/rxjs/_esm5/internal/util/tryCatch.js");
143014
/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/errorObject */ "./node_modules/rxjs/_esm5/internal/util/errorObject.js");
143015
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
143016
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
143017
/** PURE_IMPORTS_START tslib,_util_tryCatch,_util_errorObject,_util_subscribeToResult,_OuterSubscriber PURE_IMPORTS_END */
143018
 
143019
 
143020
 
143021
 
143022
 
143023
/**
143024
 * Applies an accumulator function over the source Observable where the
143025
 * accumulator function itself returns an Observable, then each intermediate
143026
 * Observable returned is merged into the output Observable.
143027
 *
143028
 * <span class="informal">It's like {@link scan}, but the Observables returned
143029
 * by the accumulator are merged into the outer Observable.</span>
143030
 *
143031
 * @example <caption>Count the number of click events</caption>
143032
 * const click$ = Rx.Observable.fromEvent(document, 'click');
143033
 * const one$ = click$.mapTo(1);
143034
 * const seed = 0;
143035
 * const count$ = one$.mergeScan((acc, one) => Rx.Observable.of(acc + one), seed);
143036
 * count$.subscribe(x => console.log(x));
143037
 *
143038
 * // Results:
143039
 * 1
143040
 * 2
143041
 * 3
143042
 * 4
143043
 * // ...and so on for each click
143044
 *
143045
 * @param {function(acc: R, value: T): Observable<R>} accumulator
143046
 * The accumulator function called on each source value.
143047
 * @param seed The initial accumulation value.
143048
 * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of
143049
 * input Observables being subscribed to concurrently.
143050
 * @return {Observable<R>} An observable of the accumulated values.
143051
 * @method mergeScan
143052
 * @owner Observable
143053
 */
143054
function mergeScan(accumulator, seed, concurrent) {
143055
    if (concurrent === void 0) {
143056
        concurrent = Number.POSITIVE_INFINITY;
143057
    }
143058
    return function (source) { return source.lift(new MergeScanOperator(accumulator, seed, concurrent)); };
143059
}
143060
var MergeScanOperator = /*@__PURE__*/ (function () {
143061
    function MergeScanOperator(accumulator, seed, concurrent) {
143062
        this.accumulator = accumulator;
143063
        this.seed = seed;
143064
        this.concurrent = concurrent;
143065
    }
143066
    MergeScanOperator.prototype.call = function (subscriber, source) {
143067
        return source.subscribe(new MergeScanSubscriber(subscriber, this.accumulator, this.seed, this.concurrent));
143068
    };
143069
    return MergeScanOperator;
143070
}());
143071
 
143072
/**
143073
 * We need this JSDoc comment for affecting ESDoc.
143074
 * @ignore
143075
 * @extends {Ignored}
143076
 */
143077
var MergeScanSubscriber = /*@__PURE__*/ (function (_super) {
143078
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MergeScanSubscriber, _super);
143079
    function MergeScanSubscriber(destination, accumulator, acc, concurrent) {
143080
        var _this = _super.call(this, destination) || this;
143081
        _this.accumulator = accumulator;
143082
        _this.acc = acc;
143083
        _this.concurrent = concurrent;
143084
        _this.hasValue = false;
143085
        _this.hasCompleted = false;
143086
        _this.buffer = [];
143087
        _this.active = 0;
143088
        _this.index = 0;
143089
        return _this;
143090
    }
143091
    MergeScanSubscriber.prototype._next = function (value) {
143092
        if (this.active < this.concurrent) {
143093
            var index = this.index++;
143094
            var ish = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_1__["tryCatch"])(this.accumulator)(this.acc, value);
143095
            var destination = this.destination;
143096
            if (ish === _util_errorObject__WEBPACK_IMPORTED_MODULE_2__["errorObject"]) {
143097
                destination.error(_util_errorObject__WEBPACK_IMPORTED_MODULE_2__["errorObject"].e);
143098
            }
143099
            else {
143100
                this.active++;
143101
                this._innerSub(ish, value, index);
143102
            }
143103
        }
143104
        else {
143105
            this.buffer.push(value);
143106
        }
143107
    };
143108
    MergeScanSubscriber.prototype._innerSub = function (ish, value, index) {
143109
        this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, ish, value, index));
143110
    };
143111
    MergeScanSubscriber.prototype._complete = function () {
143112
        this.hasCompleted = true;
143113
        if (this.active === 0 && this.buffer.length === 0) {
143114
            if (this.hasValue === false) {
143115
                this.destination.next(this.acc);
143116
            }
143117
            this.destination.complete();
143118
        }
143119
    };
143120
    MergeScanSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
143121
        var destination = this.destination;
143122
        this.acc = innerValue;
143123
        this.hasValue = true;
143124
        destination.next(innerValue);
143125
    };
143126
    MergeScanSubscriber.prototype.notifyComplete = function (innerSub) {
143127
        var buffer = this.buffer;
143128
        this.remove(innerSub);
143129
        this.active--;
143130
        if (buffer.length > 0) {
143131
            this._next(buffer.shift());
143132
        }
143133
        else if (this.active === 0 && this.hasCompleted) {
143134
            if (this.hasValue === false) {
143135
                this.destination.next(this.acc);
143136
            }
143137
            this.destination.complete();
143138
        }
143139
    };
143140
    return MergeScanSubscriber;
143141
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__["OuterSubscriber"]));
143142
 
143143
//# sourceMappingURL=mergeScan.js.map
143144
 
143145
 
143146
/***/ }),
143147
 
143148
/***/ "./node_modules/rxjs/_esm5/internal/operators/min.js":
143149
/*!***********************************************************!*\
143150
  !*** ./node_modules/rxjs/_esm5/internal/operators/min.js ***!
143151
  \***********************************************************/
143152
/*! exports provided: min */
143153
/***/ (function(module, __webpack_exports__, __webpack_require__) {
143154
 
143155
"use strict";
143156
__webpack_require__.r(__webpack_exports__);
143157
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return min; });
143158
/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./reduce */ "./node_modules/rxjs/_esm5/internal/operators/reduce.js");
143159
/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
143160
 
143161
/**
143162
 * The Min operator operates on an Observable that emits numbers (or items that can be compared with a provided function),
143163
 * and when source Observable completes it emits a single item: the item with the smallest value.
143164
 *
143165
 * <img src="./img/min.png" width="100%">
143166
 *
143167
 * @example <caption>Get the minimal value of a series of numbers</caption>
143168
 * Rx.Observable.of(5, 4, 7, 2, 8)
143169
 *   .min()
143170
 *   .subscribe(x => console.log(x)); // -> 2
143171
 *
143172
 * @example <caption>Use a comparer function to get the minimal item</caption>
143173
 * interface Person {
143174
 *   age: number,
143175
 *   name: string
143176
 * }
143177
 * Observable.of<Person>({age: 7, name: 'Foo'},
143178
 *                       {age: 5, name: 'Bar'},
143179
 *                       {age: 9, name: 'Beer'})
143180
 *           .min<Person>( (a: Person, b: Person) => a.age < b.age ? -1 : 1)
143181
 *           .subscribe((x: Person) => console.log(x.name)); // -> 'Bar'
143182
 * }
143183
 *
143184
 * @see {@link max}
143185
 *
143186
 * @param {Function} [comparer] - Optional comparer function that it will use instead of its default to compare the
143187
 * value of two items.
143188
 * @return {Observable<R>} An Observable that emits item with the smallest value.
143189
 * @method min
143190
 * @owner Observable
143191
 */
143192
function min(comparer) {
143193
    var min = (typeof comparer === 'function')
143194
        ? function (x, y) { return comparer(x, y) < 0 ? x : y; }
143195
        : function (x, y) { return x < y ? x : y; };
143196
    return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(min);
143197
}
143198
//# sourceMappingURL=min.js.map
143199
 
143200
 
143201
/***/ }),
143202
 
143203
/***/ "./node_modules/rxjs/_esm5/internal/operators/multicast.js":
143204
/*!*****************************************************************!*\
143205
  !*** ./node_modules/rxjs/_esm5/internal/operators/multicast.js ***!
143206
  \*****************************************************************/
143207
/*! exports provided: multicast, MulticastOperator */
143208
/***/ (function(module, __webpack_exports__, __webpack_require__) {
143209
 
143210
"use strict";
143211
__webpack_require__.r(__webpack_exports__);
143212
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return multicast; });
143213
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MulticastOperator", function() { return MulticastOperator; });
143214
/* harmony import */ var _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/ConnectableObservable */ "./node_modules/rxjs/_esm5/internal/observable/ConnectableObservable.js");
143215
/** PURE_IMPORTS_START _observable_ConnectableObservable PURE_IMPORTS_END */
143216
 
143217
/* tslint:enable:max-line-length */
143218
/**
143219
 * Returns an Observable that emits the results of invoking a specified selector on items
143220
 * emitted by a ConnectableObservable that shares a single subscription to the underlying stream.
143221
 *
143222
 * <img src="./img/multicast.png" width="100%">
143223
 *
143224
 * @param {Function|Subject} subjectOrSubjectFactory - Factory function to create an intermediate subject through
143225
 * which the source sequence's elements will be multicast to the selector function
143226
 * or Subject to push source elements into.
143227
 * @param {Function} [selector] - Optional selector function that can use the multicasted source stream
143228
 * as many times as needed, without causing multiple subscriptions to the source stream.
143229
 * Subscribers to the given source will receive all notifications of the source from the
143230
 * time of the subscription forward.
143231
 * @return {Observable} An Observable that emits the results of invoking the selector
143232
 * on the items emitted by a `ConnectableObservable` that shares a single subscription to
143233
 * the underlying stream.
143234
 * @method multicast
143235
 * @owner Observable
143236
 */
143237
function multicast(subjectOrSubjectFactory, selector) {
143238
    return function multicastOperatorFunction(source) {
143239
        var subjectFactory;
143240
        if (typeof subjectOrSubjectFactory === 'function') {
143241
            subjectFactory = subjectOrSubjectFactory;
143242
        }
143243
        else {
143244
            subjectFactory = function subjectFactory() {
143245
                return subjectOrSubjectFactory;
143246
            };
143247
        }
143248
        if (typeof selector === 'function') {
143249
            return source.lift(new MulticastOperator(subjectFactory, selector));
143250
        }
143251
        var connectable = Object.create(source, _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__["connectableObservableDescriptor"]);
143252
        connectable.source = source;
143253
        connectable.subjectFactory = subjectFactory;
143254
        return connectable;
143255
    };
143256
}
143257
var MulticastOperator = /*@__PURE__*/ (function () {
143258
    function MulticastOperator(subjectFactory, selector) {
143259
        this.subjectFactory = subjectFactory;
143260
        this.selector = selector;
143261
    }
143262
    MulticastOperator.prototype.call = function (subscriber, source) {
143263
        var selector = this.selector;
143264
        var subject = this.subjectFactory();
143265
        var subscription = selector(subject).subscribe(subscriber);
143266
        subscription.add(source.subscribe(subject));
143267
        return subscription;
143268
    };
143269
    return MulticastOperator;
143270
}());
143271
 
143272
//# sourceMappingURL=multicast.js.map
143273
 
143274
 
143275
/***/ }),
143276
 
143277
/***/ "./node_modules/rxjs/_esm5/internal/operators/observeOn.js":
143278
/*!*****************************************************************!*\
143279
  !*** ./node_modules/rxjs/_esm5/internal/operators/observeOn.js ***!
143280
  \*****************************************************************/
143281
/*! exports provided: observeOn, ObserveOnOperator, ObserveOnSubscriber, ObserveOnMessage */
143282
/***/ (function(module, __webpack_exports__, __webpack_require__) {
143283
 
143284
"use strict";
143285
__webpack_require__.r(__webpack_exports__);
143286
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return observeOn; });
143287
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnOperator", function() { return ObserveOnOperator; });
143288
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnSubscriber", function() { return ObserveOnSubscriber; });
143289
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnMessage", function() { return ObserveOnMessage; });
143290
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
143291
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
143292
/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Notification */ "./node_modules/rxjs/_esm5/internal/Notification.js");
143293
/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
143294
 
143295
 
143296
 
143297
/**
143298
 *
143299
 * Re-emits all notifications from source Observable with specified scheduler.
143300
 *
143301
 * <span class="informal">Ensure a specific scheduler is used, from outside of an Observable.</span>
143302
 *
143303
 * `observeOn` is an operator that accepts a scheduler as a first parameter, which will be used to reschedule
143304
 * notifications emitted by the source Observable. It might be useful, if you do not have control over
143305
 * internal scheduler of a given Observable, but want to control when its values are emitted nevertheless.
143306
 *
143307
 * Returned Observable emits the same notifications (nexted values, complete and error events) as the source Observable,
143308
 * but rescheduled with provided scheduler. Note that this doesn't mean that source Observables internal
143309
 * scheduler will be replaced in any way. Original scheduler still will be used, but when the source Observable emits
143310
 * notification, it will be immediately scheduled again - this time with scheduler passed to `observeOn`.
143311
 * An anti-pattern would be calling `observeOn` on Observable that emits lots of values synchronously, to split
143312
 * that emissions into asynchronous chunks. For this to happen, scheduler would have to be passed into the source
143313
 * Observable directly (usually into the operator that creates it). `observeOn` simply delays notifications a
143314
 * little bit more, to ensure that they are emitted at expected moments.
143315
 *
143316
 * As a matter of fact, `observeOn` accepts second parameter, which specifies in milliseconds with what delay notifications
143317
 * will be emitted. The main difference between {@link delay} operator and `observeOn` is that `observeOn`
143318
 * will delay all notifications - including error notifications - while `delay` will pass through error
143319
 * from source Observable immediately when it is emitted. In general it is highly recommended to use `delay` operator
143320
 * for any kind of delaying of values in the stream, while using `observeOn` to specify which scheduler should be used
143321
 * for notification emissions in general.
143322
 *
143323
 * @example <caption>Ensure values in subscribe are called just before browser repaint.</caption>
143324
 * const intervals = Rx.Observable.interval(10); // Intervals are scheduled
143325
 *                                               // with async scheduler by default...
143326
 *
143327
 * intervals
143328
 * .observeOn(Rx.Scheduler.animationFrame)       // ...but we will observe on animationFrame
143329
 * .subscribe(val => {                           // scheduler to ensure smooth animation.
143330
 *   someDiv.style.height = val + 'px';
143331
 * });
143332
 *
143333
 * @see {@link delay}
143334
 *
143335
 * @param {SchedulerLike} scheduler Scheduler that will be used to reschedule notifications from source Observable.
143336
 * @param {number} [delay] Number of milliseconds that states with what delay every notification should be rescheduled.
143337
 * @return {Observable<T>} Observable that emits the same notifications as the source Observable,
143338
 * but with provided scheduler.
143339
 *
143340
 * @method observeOn
143341
 * @owner Observable
143342
 */
143343
function observeOn(scheduler, delay) {
143344
    if (delay === void 0) {
143345
        delay = 0;
143346
    }
143347
    return function observeOnOperatorFunction(source) {
143348
        return source.lift(new ObserveOnOperator(scheduler, delay));
143349
    };
143350
}
143351
var ObserveOnOperator = /*@__PURE__*/ (function () {
143352
    function ObserveOnOperator(scheduler, delay) {
143353
        if (delay === void 0) {
143354
            delay = 0;
143355
        }
143356
        this.scheduler = scheduler;
143357
        this.delay = delay;
143358
    }
143359
    ObserveOnOperator.prototype.call = function (subscriber, source) {
143360
        return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay));
143361
    };
143362
    return ObserveOnOperator;
143363
}());
143364
 
143365
/**
143366
 * We need this JSDoc comment for affecting ESDoc.
143367
 * @ignore
143368
 * @extends {Ignored}
143369
 */
143370
var ObserveOnSubscriber = /*@__PURE__*/ (function (_super) {
143371
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ObserveOnSubscriber, _super);
143372
    function ObserveOnSubscriber(destination, scheduler, delay) {
143373
        if (delay === void 0) {
143374
            delay = 0;
143375
        }
143376
        var _this = _super.call(this, destination) || this;
143377
        _this.scheduler = scheduler;
143378
        _this.delay = delay;
143379
        return _this;
143380
    }
143381
    /** @nocollapse */
143382
    ObserveOnSubscriber.dispatch = function (arg) {
143383
        var notification = arg.notification, destination = arg.destination;
143384
        notification.observe(destination);
143385
        this.unsubscribe();
143386
    };
143387
    ObserveOnSubscriber.prototype.scheduleMessage = function (notification) {
143388
        this.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination)));
143389
    };
143390
    ObserveOnSubscriber.prototype._next = function (value) {
143391
        this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createNext(value));
143392
    };
143393
    ObserveOnSubscriber.prototype._error = function (err) {
143394
        this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createError(err));
143395
    };
143396
    ObserveOnSubscriber.prototype._complete = function () {
143397
        this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createComplete());
143398
    };
143399
    return ObserveOnSubscriber;
143400
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
143401
 
143402
var ObserveOnMessage = /*@__PURE__*/ (function () {
143403
    function ObserveOnMessage(notification, destination) {
143404
        this.notification = notification;
143405
        this.destination = destination;
143406
    }
143407
    return ObserveOnMessage;
143408
}());
143409
 
143410
//# sourceMappingURL=observeOn.js.map
143411
 
143412
 
143413
/***/ }),
143414
 
143415
/***/ "./node_modules/rxjs/_esm5/internal/operators/onErrorResumeNext.js":
143416
/*!*************************************************************************!*\
143417
  !*** ./node_modules/rxjs/_esm5/internal/operators/onErrorResumeNext.js ***!
143418
  \*************************************************************************/
143419
/*! exports provided: onErrorResumeNext, onErrorResumeNextStatic */
143420
/***/ (function(module, __webpack_exports__, __webpack_require__) {
143421
 
143422
"use strict";
143423
__webpack_require__.r(__webpack_exports__);
143424
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return onErrorResumeNext; });
143425
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNextStatic", function() { return onErrorResumeNextStatic; });
143426
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
143427
/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/from */ "./node_modules/rxjs/_esm5/internal/observable/from.js");
143428
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isArray */ "./node_modules/rxjs/_esm5/internal/util/isArray.js");
143429
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
143430
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
143431
/** PURE_IMPORTS_START tslib,_observable_from,_util_isArray,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
143432
 
143433
 
143434
 
143435
 
143436
 
143437
/* tslint:enable:max-line-length */
143438
/**
143439
 * When any of the provided Observable emits an complete or error notification, it immediately subscribes to the next one
143440
 * that was passed.
143441
 *
143442
 * <span class="informal">Execute series of Observables no matter what, even if it means swallowing errors.</span>
143443
 *
143444
 * <img src="./img/onErrorResumeNext.png" width="100%">
143445
 *
143446
 * `onErrorResumeNext` is an operator that accepts a series of Observables, provided either directly as
143447
 * arguments or as an array. If no single Observable is provided, returned Observable will simply behave the same
143448
 * as the source.
143449
 *
143450
 * `onErrorResumeNext` returns an Observable that starts by subscribing and re-emitting values from the source Observable.
143451
 * When its stream of values ends - no matter if Observable completed or emitted an error - `onErrorResumeNext`
143452
 * will subscribe to the first Observable that was passed as an argument to the method. It will start re-emitting
143453
 * its values as well and - again - when that stream ends, `onErrorResumeNext` will proceed to subscribing yet another
143454
 * Observable in provided series, no matter if previous Observable completed or ended with an error. This will
143455
 * be happening until there is no more Observables left in the series, at which point returned Observable will
143456
 * complete - even if the last subscribed stream ended with an error.
143457
 *
143458
 * `onErrorResumeNext` can be therefore thought of as version of {@link concat} operator, which is more permissive
143459
 * when it comes to the errors emitted by its input Observables. While `concat` subscribes to the next Observable
143460
 * in series only if previous one successfully completed, `onErrorResumeNext` subscribes even if it ended with
143461
 * an error.
143462
 *
143463
 * Note that you do not get any access to errors emitted by the Observables. In particular do not
143464
 * expect these errors to appear in error callback passed to {@link subscribe}. If you want to take
143465
 * specific actions based on what error was emitted by an Observable, you should try out {@link catch} instead.
143466
 *
143467
 *
143468
 * @example <caption>Subscribe to the next Observable after map fails</caption>
143469
 * Rx.Observable.of(1, 2, 3, 0)
143470
 *   .map(x => {
143471
 *       if (x === 0) { throw Error(); }
143472
         return 10 / x;
143473
 *   })
143474
 *   .onErrorResumeNext(Rx.Observable.of(1, 2, 3))
143475
 *   .subscribe(
143476
 *     val => console.log(val),
143477
 *     err => console.log(err),          // Will never be called.
143478
 *     () => console.log('that\'s it!')
143479
 *   );
143480
 *
143481
 * // Logs:
143482
 * // 10
143483
 * // 5
143484
 * // 3.3333333333333335
143485
 * // 1
143486
 * // 2
143487
 * // 3
143488
 * // "that's it!"
143489
 *
143490
 * @see {@link concat}
143491
 * @see {@link catch}
143492
 *
143493
 * @param {...ObservableInput} observables Observables passed either directly or as an array.
143494
 * @return {Observable} An Observable that emits values from source Observable, but - if it errors - subscribes
143495
 * to the next passed Observable and so on, until it completes or runs out of Observables.
143496
 * @method onErrorResumeNext
143497
 * @owner Observable
143498
 */
143499
function onErrorResumeNext() {
143500
    var nextSources = [];
143501
    for (var _i = 0; _i < arguments.length; _i++) {
143502
        nextSources[_i] = arguments[_i];
143503
    }
143504
    if (nextSources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(nextSources[0])) {
143505
        nextSources = nextSources[0];
143506
    }
143507
    return function (source) { return source.lift(new OnErrorResumeNextOperator(nextSources)); };
143508
}
143509
/* tslint:enable:max-line-length */
143510
function onErrorResumeNextStatic() {
143511
    var nextSources = [];
143512
    for (var _i = 0; _i < arguments.length; _i++) {
143513
        nextSources[_i] = arguments[_i];
143514
    }
143515
    var source = null;
143516
    if (nextSources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(nextSources[0])) {
143517
        nextSources = nextSources[0];
143518
    }
143519
    source = nextSources.shift();
143520
    return Object(_observable_from__WEBPACK_IMPORTED_MODULE_1__["from"])(source, null).lift(new OnErrorResumeNextOperator(nextSources));
143521
}
143522
var OnErrorResumeNextOperator = /*@__PURE__*/ (function () {
143523
    function OnErrorResumeNextOperator(nextSources) {
143524
        this.nextSources = nextSources;
143525
    }
143526
    OnErrorResumeNextOperator.prototype.call = function (subscriber, source) {
143527
        return source.subscribe(new OnErrorResumeNextSubscriber(subscriber, this.nextSources));
143528
    };
143529
    return OnErrorResumeNextOperator;
143530
}());
143531
var OnErrorResumeNextSubscriber = /*@__PURE__*/ (function (_super) {
143532
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](OnErrorResumeNextSubscriber, _super);
143533
    function OnErrorResumeNextSubscriber(destination, nextSources) {
143534
        var _this = _super.call(this, destination) || this;
143535
        _this.destination = destination;
143536
        _this.nextSources = nextSources;
143537
        return _this;
143538
    }
143539
    OnErrorResumeNextSubscriber.prototype.notifyError = function (error, innerSub) {
143540
        this.subscribeToNextSource();
143541
    };
143542
    OnErrorResumeNextSubscriber.prototype.notifyComplete = function (innerSub) {
143543
        this.subscribeToNextSource();
143544
    };
143545
    OnErrorResumeNextSubscriber.prototype._error = function (err) {
143546
        this.subscribeToNextSource();
143547
    };
143548
    OnErrorResumeNextSubscriber.prototype._complete = function () {
143549
        this.subscribeToNextSource();
143550
    };
143551
    OnErrorResumeNextSubscriber.prototype.subscribeToNextSource = function () {
143552
        var next = this.nextSources.shift();
143553
        if (next) {
143554
            this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, next));
143555
        }
143556
        else {
143557
            this.destination.complete();
143558
        }
143559
    };
143560
    return OnErrorResumeNextSubscriber;
143561
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
143562
//# sourceMappingURL=onErrorResumeNext.js.map
143563
 
143564
 
143565
/***/ }),
143566
 
143567
/***/ "./node_modules/rxjs/_esm5/internal/operators/pairwise.js":
143568
/*!****************************************************************!*\
143569
  !*** ./node_modules/rxjs/_esm5/internal/operators/pairwise.js ***!
143570
  \****************************************************************/
143571
/*! exports provided: pairwise */
143572
/***/ (function(module, __webpack_exports__, __webpack_require__) {
143573
 
143574
"use strict";
143575
__webpack_require__.r(__webpack_exports__);
143576
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return pairwise; });
143577
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
143578
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
143579
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
143580
 
143581
 
143582
/**
143583
 * Groups pairs of consecutive emissions together and emits them as an array of
143584
 * two values.
143585
 *
143586
 * <span class="informal">Puts the current value and previous value together as
143587
 * an array, and emits that.</span>
143588
 *
143589
 * <img src="./img/pairwise.png" width="100%">
143590
 *
143591
 * The Nth emission from the source Observable will cause the output Observable
143592
 * to emit an array [(N-1)th, Nth] of the previous and the current value, as a
143593
 * pair. For this reason, `pairwise` emits on the second and subsequent
143594
 * emissions from the source Observable, but not on the first emission, because
143595
 * there is no previous value in that case.
143596
 *
143597
 * @example <caption>On every click (starting from the second), emit the relative distance to the previous click</caption>
143598
 * var clicks = Rx.Observable.fromEvent(document, 'click');
143599
 * var pairs = clicks.pairwise();
143600
 * var distance = pairs.map(pair => {
143601
 *   var x0 = pair[0].clientX;
143602
 *   var y0 = pair[0].clientY;
143603
 *   var x1 = pair[1].clientX;
143604
 *   var y1 = pair[1].clientY;
143605
 *   return Math.sqrt(Math.pow(x0 - x1, 2) + Math.pow(y0 - y1, 2));
143606
 * });
143607
 * distance.subscribe(x => console.log(x));
143608
 *
143609
 * @see {@link buffer}
143610
 * @see {@link bufferCount}
143611
 *
143612
 * @return {Observable<Array<T>>} An Observable of pairs (as arrays) of
143613
 * consecutive values from the source Observable.
143614
 * @method pairwise
143615
 * @owner Observable
143616
 */
143617
function pairwise() {
143618
    return function (source) { return source.lift(new PairwiseOperator()); };
143619
}
143620
var PairwiseOperator = /*@__PURE__*/ (function () {
143621
    function PairwiseOperator() {
143622
    }
143623
    PairwiseOperator.prototype.call = function (subscriber, source) {
143624
        return source.subscribe(new PairwiseSubscriber(subscriber));
143625
    };
143626
    return PairwiseOperator;
143627
}());
143628
/**
143629
 * We need this JSDoc comment for affecting ESDoc.
143630
 * @ignore
143631
 * @extends {Ignored}
143632
 */
143633
var PairwiseSubscriber = /*@__PURE__*/ (function (_super) {
143634
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](PairwiseSubscriber, _super);
143635
    function PairwiseSubscriber(destination) {
143636
        var _this = _super.call(this, destination) || this;
143637
        _this.hasPrev = false;
143638
        return _this;
143639
    }
143640
    PairwiseSubscriber.prototype._next = function (value) {
143641
        if (this.hasPrev) {
143642
            this.destination.next([this.prev, value]);
143643
        }
143644
        else {
143645
            this.hasPrev = true;
143646
        }
143647
        this.prev = value;
143648
    };
143649
    return PairwiseSubscriber;
143650
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
143651
//# sourceMappingURL=pairwise.js.map
143652
 
143653
 
143654
/***/ }),
143655
 
143656
/***/ "./node_modules/rxjs/_esm5/internal/operators/partition.js":
143657
/*!*****************************************************************!*\
143658
  !*** ./node_modules/rxjs/_esm5/internal/operators/partition.js ***!
143659
  \*****************************************************************/
143660
/*! exports provided: partition */
143661
/***/ (function(module, __webpack_exports__, __webpack_require__) {
143662
 
143663
"use strict";
143664
__webpack_require__.r(__webpack_exports__);
143665
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return partition; });
143666
/* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/not */ "./node_modules/rxjs/_esm5/internal/util/not.js");
143667
/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filter */ "./node_modules/rxjs/_esm5/internal/operators/filter.js");
143668
/** PURE_IMPORTS_START _util_not,_filter PURE_IMPORTS_END */
143669
 
143670
 
143671
/**
143672
 * Splits the source Observable into two, one with values that satisfy a
143673
 * predicate, and another with values that don't satisfy the predicate.
143674
 *
143675
 * <span class="informal">It's like {@link filter}, but returns two Observables:
143676
 * one like the output of {@link filter}, and the other with values that did not
143677
 * pass the condition.</span>
143678
 *
143679
 * <img src="./img/partition.png" width="100%">
143680
 *
143681
 * `partition` outputs an array with two Observables that partition the values
143682
 * from the source Observable through the given `predicate` function. The first
143683
 * Observable in that array emits source values for which the predicate argument
143684
 * returns true. The second Observable emits source values for which the
143685
 * predicate returns false. The first behaves like {@link filter} and the second
143686
 * behaves like {@link filter} with the predicate negated.
143687
 *
143688
 * @example <caption>Partition click events into those on DIV elements and those elsewhere</caption>
143689
 * var clicks = Rx.Observable.fromEvent(document, 'click');
143690
 * var parts = clicks.partition(ev => ev.target.tagName === 'DIV');
143691
 * var clicksOnDivs = parts[0];
143692
 * var clicksElsewhere = parts[1];
143693
 * clicksOnDivs.subscribe(x => console.log('DIV clicked: ', x));
143694
 * clicksElsewhere.subscribe(x => console.log('Other clicked: ', x));
143695
 *
143696
 * @see {@link filter}
143697
 *
143698
 * @param {function(value: T, index: number): boolean} predicate A function that
143699
 * evaluates each value emitted by the source Observable. If it returns `true`,
143700
 * the value is emitted on the first Observable in the returned array, if
143701
 * `false` the value is emitted on the second Observable in the array. The
143702
 * `index` parameter is the number `i` for the i-th source emission that has
143703
 * happened since the subscription, starting from the number `0`.
143704
 * @param {any} [thisArg] An optional argument to determine the value of `this`
143705
 * in the `predicate` function.
143706
 * @return {[Observable<T>, Observable<T>]} An array with two Observables: one
143707
 * with values that passed the predicate, and another with values that did not
143708
 * pass the predicate.
143709
 * @method partition
143710
 * @owner Observable
143711
 */
143712
function partition(predicate, thisArg) {
143713
    return function (source) {
143714
        return [
143715
            Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(predicate, thisArg)(source),
143716
            Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(Object(_util_not__WEBPACK_IMPORTED_MODULE_0__["not"])(predicate, thisArg))(source)
143717
        ];
143718
    };
143719
}
143720
//# sourceMappingURL=partition.js.map
143721
 
143722
 
143723
/***/ }),
143724
 
143725
/***/ "./node_modules/rxjs/_esm5/internal/operators/pluck.js":
143726
/*!*************************************************************!*\
143727
  !*** ./node_modules/rxjs/_esm5/internal/operators/pluck.js ***!
143728
  \*************************************************************/
143729
/*! exports provided: pluck */
143730
/***/ (function(module, __webpack_exports__, __webpack_require__) {
143731
 
143732
"use strict";
143733
__webpack_require__.r(__webpack_exports__);
143734
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return pluck; });
143735
/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map */ "./node_modules/rxjs/_esm5/internal/operators/map.js");
143736
/** PURE_IMPORTS_START _map PURE_IMPORTS_END */
143737
 
143738
/**
143739
 * Maps each source value (an object) to its specified nested property.
143740
 *
143741
 * <span class="informal">Like {@link map}, but meant only for picking one of
143742
 * the nested properties of every emitted object.</span>
143743
 *
143744
 * <img src="./img/pluck.png" width="100%">
143745
 *
143746
 * Given a list of strings describing a path to an object property, retrieves
143747
 * the value of a specified nested property from all values in the source
143748
 * Observable. If a property can't be resolved, it will return `undefined` for
143749
 * that value.
143750
 *
143751
 * @example <caption>Map every click to the tagName of the clicked target element</caption>
143752
 * var clicks = Rx.Observable.fromEvent(document, 'click');
143753
 * var tagNames = clicks.pluck('target', 'tagName');
143754
 * tagNames.subscribe(x => console.log(x));
143755
 *
143756
 * @see {@link map}
143757
 *
143758
 * @param {...string} properties The nested properties to pluck from each source
143759
 * value (an object).
143760
 * @return {Observable} A new Observable of property values from the source values.
143761
 * @method pluck
143762
 * @owner Observable
143763
 */
143764
function pluck() {
143765
    var properties = [];
143766
    for (var _i = 0; _i < arguments.length; _i++) {
143767
        properties[_i] = arguments[_i];
143768
    }
143769
    var length = properties.length;
143770
    if (length === 0) {
143771
        throw new Error('list of properties cannot be empty.');
143772
    }
143773
    return function (source) { return Object(_map__WEBPACK_IMPORTED_MODULE_0__["map"])(plucker(properties, length))(source); };
143774
}
143775
function plucker(props, length) {
143776
    var mapper = function (x) {
143777
        var currentProp = x;
143778
        for (var i = 0; i < length; i++) {
143779
            var p = currentProp[props[i]];
143780
            if (typeof p !== 'undefined') {
143781
                currentProp = p;
143782
            }
143783
            else {
143784
                return undefined;
143785
            }
143786
        }
143787
        return currentProp;
143788
    };
143789
    return mapper;
143790
}
143791
//# sourceMappingURL=pluck.js.map
143792
 
143793
 
143794
/***/ }),
143795
 
143796
/***/ "./node_modules/rxjs/_esm5/internal/operators/publish.js":
143797
/*!***************************************************************!*\
143798
  !*** ./node_modules/rxjs/_esm5/internal/operators/publish.js ***!
143799
  \***************************************************************/
143800
/*! exports provided: publish */
143801
/***/ (function(module, __webpack_exports__, __webpack_require__) {
143802
 
143803
"use strict";
143804
__webpack_require__.r(__webpack_exports__);
143805
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return publish; });
143806
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
143807
/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./multicast */ "./node_modules/rxjs/_esm5/internal/operators/multicast.js");
143808
/** PURE_IMPORTS_START _Subject,_multicast PURE_IMPORTS_END */
143809
 
143810
 
143811
/* tslint:enable:max-line-length */
143812
/**
143813
 * Returns a ConnectableObservable, which is a variety of Observable that waits until its connect method is called
143814
 * before it begins emitting items to those Observers that have subscribed to it.
143815
 *
143816
 * <img src="./img/publish.png" width="100%">
143817
 *
143818
 * @param {Function} [selector] - Optional selector function which can use the multicasted source sequence as many times
143819
 * as needed, without causing multiple subscriptions to the source sequence.
143820
 * Subscribers to the given source will receive all notifications of the source from the time of the subscription on.
143821
 * @return A ConnectableObservable that upon connection causes the source Observable to emit items to its Observers.
143822
 * @method publish
143823
 * @owner Observable
143824
 */
143825
function publish(selector) {
143826
    return selector ?
143827
        Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(function () { return new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"](); }, selector) :
143828
        Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]());
143829
}
143830
//# sourceMappingURL=publish.js.map
143831
 
143832
 
143833
/***/ }),
143834
 
143835
/***/ "./node_modules/rxjs/_esm5/internal/operators/publishBehavior.js":
143836
/*!***********************************************************************!*\
143837
  !*** ./node_modules/rxjs/_esm5/internal/operators/publishBehavior.js ***!
143838
  \***********************************************************************/
143839
/*! exports provided: publishBehavior */
143840
/***/ (function(module, __webpack_exports__, __webpack_require__) {
143841
 
143842
"use strict";
143843
__webpack_require__.r(__webpack_exports__);
143844
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return publishBehavior; });
143845
/* harmony import */ var _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../BehaviorSubject */ "./node_modules/rxjs/_esm5/internal/BehaviorSubject.js");
143846
/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./multicast */ "./node_modules/rxjs/_esm5/internal/operators/multicast.js");
143847
/** PURE_IMPORTS_START _BehaviorSubject,_multicast PURE_IMPORTS_END */
143848
 
143849
 
143850
/**
143851
 * @param value
143852
 * @return {ConnectableObservable<T>}
143853
 * @method publishBehavior
143854
 * @owner Observable
143855
 */
143856
function publishBehavior(value) {
143857
    return function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__["BehaviorSubject"](value))(source); };
143858
}
143859
//# sourceMappingURL=publishBehavior.js.map
143860
 
143861
 
143862
/***/ }),
143863
 
143864
/***/ "./node_modules/rxjs/_esm5/internal/operators/publishLast.js":
143865
/*!*******************************************************************!*\
143866
  !*** ./node_modules/rxjs/_esm5/internal/operators/publishLast.js ***!
143867
  \*******************************************************************/
143868
/*! exports provided: publishLast */
143869
/***/ (function(module, __webpack_exports__, __webpack_require__) {
143870
 
143871
"use strict";
143872
__webpack_require__.r(__webpack_exports__);
143873
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return publishLast; });
143874
/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../AsyncSubject */ "./node_modules/rxjs/_esm5/internal/AsyncSubject.js");
143875
/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./multicast */ "./node_modules/rxjs/_esm5/internal/operators/multicast.js");
143876
/** PURE_IMPORTS_START _AsyncSubject,_multicast PURE_IMPORTS_END */
143877
 
143878
 
143879
function publishLast() {
143880
    return function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__["AsyncSubject"]())(source); };
143881
}
143882
//# sourceMappingURL=publishLast.js.map
143883
 
143884
 
143885
/***/ }),
143886
 
143887
/***/ "./node_modules/rxjs/_esm5/internal/operators/publishReplay.js":
143888
/*!*********************************************************************!*\
143889
  !*** ./node_modules/rxjs/_esm5/internal/operators/publishReplay.js ***!
143890
  \*********************************************************************/
143891
/*! exports provided: publishReplay */
143892
/***/ (function(module, __webpack_exports__, __webpack_require__) {
143893
 
143894
"use strict";
143895
__webpack_require__.r(__webpack_exports__);
143896
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return publishReplay; });
143897
/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../ReplaySubject */ "./node_modules/rxjs/_esm5/internal/ReplaySubject.js");
143898
/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./multicast */ "./node_modules/rxjs/_esm5/internal/operators/multicast.js");
143899
/** PURE_IMPORTS_START _ReplaySubject,_multicast PURE_IMPORTS_END */
143900
 
143901
 
143902
/* tslint:enable:max-line-length */
143903
function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) {
143904
    if (selectorOrScheduler && typeof selectorOrScheduler !== 'function') {
143905
        scheduler = selectorOrScheduler;
143906
    }
143907
    var selector = typeof selectorOrScheduler === 'function' ? selectorOrScheduler : undefined;
143908
    var subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__["ReplaySubject"](bufferSize, windowTime, scheduler);
143909
    return function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(function () { return subject; }, selector)(source); };
143910
}
143911
//# sourceMappingURL=publishReplay.js.map
143912
 
143913
 
143914
/***/ }),
143915
 
143916
/***/ "./node_modules/rxjs/_esm5/internal/operators/race.js":
143917
/*!************************************************************!*\
143918
  !*** ./node_modules/rxjs/_esm5/internal/operators/race.js ***!
143919
  \************************************************************/
143920
/*! exports provided: race */
143921
/***/ (function(module, __webpack_exports__, __webpack_require__) {
143922
 
143923
"use strict";
143924
__webpack_require__.r(__webpack_exports__);
143925
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return race; });
143926
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isArray */ "./node_modules/rxjs/_esm5/internal/util/isArray.js");
143927
/* harmony import */ var _observable_race__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/race */ "./node_modules/rxjs/_esm5/internal/observable/race.js");
143928
/** PURE_IMPORTS_START _util_isArray,_observable_race PURE_IMPORTS_END */
143929
 
143930
 
143931
/* tslint:enable:max-line-length */
143932
/**
143933
 * Returns an Observable that mirrors the first source Observable to emit an item
143934
 * from the combination of this Observable and supplied Observables.
143935
 * @param {...Observables} ...observables Sources used to race for which Observable emits first.
143936
 * @return {Observable} An Observable that mirrors the output of the first Observable to emit an item.
143937
 * @method race
143938
 * @owner Observable
143939
 */
143940
function race() {
143941
    var observables = [];
143942
    for (var _i = 0; _i < arguments.length; _i++) {
143943
        observables[_i] = arguments[_i];
143944
    }
143945
    return function raceOperatorFunction(source) {
143946
        // if the only argument is an array, it was most likely called with
143947
        // `pair([obs1, obs2, ...])`
143948
        if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) {
143949
            observables = observables[0];
143950
        }
143951
        return source.lift.call(_observable_race__WEBPACK_IMPORTED_MODULE_1__["race"].apply(void 0, [source].concat(observables)));
143952
    };
143953
}
143954
//# sourceMappingURL=race.js.map
143955
 
143956
 
143957
/***/ }),
143958
 
143959
/***/ "./node_modules/rxjs/_esm5/internal/operators/reduce.js":
143960
/*!**************************************************************!*\
143961
  !*** ./node_modules/rxjs/_esm5/internal/operators/reduce.js ***!
143962
  \**************************************************************/
143963
/*! exports provided: reduce */
143964
/***/ (function(module, __webpack_exports__, __webpack_require__) {
143965
 
143966
"use strict";
143967
__webpack_require__.r(__webpack_exports__);
143968
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return reduce; });
143969
/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./scan */ "./node_modules/rxjs/_esm5/internal/operators/scan.js");
143970
/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./takeLast */ "./node_modules/rxjs/_esm5/internal/operators/takeLast.js");
143971
/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./defaultIfEmpty */ "./node_modules/rxjs/_esm5/internal/operators/defaultIfEmpty.js");
143972
/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/pipe */ "./node_modules/rxjs/_esm5/internal/util/pipe.js");
143973
/** PURE_IMPORTS_START _scan,_takeLast,_defaultIfEmpty,_util_pipe PURE_IMPORTS_END */
143974
 
143975
 
143976
 
143977
 
143978
/* tslint:enable:max-line-length */
143979
/**
143980
 * Applies an accumulator function over the source Observable, and returns the
143981
 * accumulated result when the source completes, given an optional seed value.
143982
 *
143983
 * <span class="informal">Combines together all values emitted on the source,
143984
 * using an accumulator function that knows how to join a new source value into
143985
 * the accumulation from the past.</span>
143986
 *
143987
 * <img src="./img/reduce.png" width="100%">
143988
 *
143989
 * Like
143990
 * [Array.prototype.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce),
143991
 * `reduce` applies an `accumulator` function against an accumulation and each
143992
 * value of the source Observable (from the past) to reduce it to a single
143993
 * value, emitted on the output Observable. Note that `reduce` will only emit
143994
 * one value, only when the source Observable completes. It is equivalent to
143995
 * applying operator {@link scan} followed by operator {@link last}.
143996
 *
143997
 * Returns an Observable that applies a specified `accumulator` function to each
143998
 * item emitted by the source Observable. If a `seed` value is specified, then
143999
 * that value will be used as the initial value for the accumulator. If no seed
144000
 * value is specified, the first item of the source is used as the seed.
144001
 *
144002
 * @example <caption>Count the number of click events that happened in 5 seconds</caption>
144003
 * var clicksInFiveSeconds = Rx.Observable.fromEvent(document, 'click')
144004
 *   .takeUntil(Rx.Observable.interval(5000));
144005
 * var ones = clicksInFiveSeconds.mapTo(1);
144006
 * var seed = 0;
144007
 * var count = ones.reduce((acc, one) => acc + one, seed);
144008
 * count.subscribe(x => console.log(x));
144009
 *
144010
 * @see {@link count}
144011
 * @see {@link expand}
144012
 * @see {@link mergeScan}
144013
 * @see {@link scan}
144014
 *
144015
 * @param {function(acc: R, value: T, index: number): R} accumulator The accumulator function
144016
 * called on each source value.
144017
 * @param {R} [seed] The initial accumulation value.
144018
 * @return {Observable<R>} An Observable that emits a single value that is the
144019
 * result of accumulating the values emitted by the source Observable.
144020
 * @method reduce
144021
 * @owner Observable
144022
 */
144023
function reduce(accumulator, seed) {
144024
    // providing a seed of `undefined` *should* be valid and trigger
144025
    // hasSeed! so don't use `seed !== undefined` checks!
144026
    // For this reason, we have to check it here at the original call site
144027
    // otherwise inside Operator/Subscriber we won't know if `undefined`
144028
    // means they didn't provide anything or if they literally provided `undefined`
144029
    if (arguments.length >= 2) {
144030
        return function reduceOperatorFunctionWithSeed(source) {
144031
            return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipe"])(Object(_scan__WEBPACK_IMPORTED_MODULE_0__["scan"])(accumulator, seed), Object(_takeLast__WEBPACK_IMPORTED_MODULE_1__["takeLast"])(1), Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__["defaultIfEmpty"])(seed))(source);
144032
        };
144033
    }
144034
    return function reduceOperatorFunction(source) {
144035
        return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipe"])(Object(_scan__WEBPACK_IMPORTED_MODULE_0__["scan"])(function (acc, value, index) {
144036
            return accumulator(acc, value, index + 1);
144037
        }), Object(_takeLast__WEBPACK_IMPORTED_MODULE_1__["takeLast"])(1))(source);
144038
    };
144039
}
144040
//# sourceMappingURL=reduce.js.map
144041
 
144042
 
144043
/***/ }),
144044
 
144045
/***/ "./node_modules/rxjs/_esm5/internal/operators/refCount.js":
144046
/*!****************************************************************!*\
144047
  !*** ./node_modules/rxjs/_esm5/internal/operators/refCount.js ***!
144048
  \****************************************************************/
144049
/*! exports provided: refCount */
144050
/***/ (function(module, __webpack_exports__, __webpack_require__) {
144051
 
144052
"use strict";
144053
__webpack_require__.r(__webpack_exports__);
144054
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return refCount; });
144055
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
144056
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
144057
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
144058
 
144059
 
144060
function refCount() {
144061
    return function refCountOperatorFunction(source) {
144062
        return source.lift(new RefCountOperator(source));
144063
    };
144064
}
144065
var RefCountOperator = /*@__PURE__*/ (function () {
144066
    function RefCountOperator(connectable) {
144067
        this.connectable = connectable;
144068
    }
144069
    RefCountOperator.prototype.call = function (subscriber, source) {
144070
        var connectable = this.connectable;
144071
        connectable._refCount++;
144072
        var refCounter = new RefCountSubscriber(subscriber, connectable);
144073
        var subscription = source.subscribe(refCounter);
144074
        if (!refCounter.closed) {
144075
            refCounter.connection = connectable.connect();
144076
        }
144077
        return subscription;
144078
    };
144079
    return RefCountOperator;
144080
}());
144081
var RefCountSubscriber = /*@__PURE__*/ (function (_super) {
144082
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RefCountSubscriber, _super);
144083
    function RefCountSubscriber(destination, connectable) {
144084
        var _this = _super.call(this, destination) || this;
144085
        _this.connectable = connectable;
144086
        return _this;
144087
    }
144088
    RefCountSubscriber.prototype._unsubscribe = function () {
144089
        var connectable = this.connectable;
144090
        if (!connectable) {
144091
            this.connection = null;
144092
            return;
144093
        }
144094
        this.connectable = null;
144095
        var refCount = connectable._refCount;
144096
        if (refCount <= 0) {
144097
            this.connection = null;
144098
            return;
144099
        }
144100
        connectable._refCount = refCount - 1;
144101
        if (refCount > 1) {
144102
            this.connection = null;
144103
            return;
144104
        }
144105
        ///
144106
        // Compare the local RefCountSubscriber's connection Subscription to the
144107
        // connection Subscription on the shared ConnectableObservable. In cases
144108
        // where the ConnectableObservable source synchronously emits values, and
144109
        // the RefCountSubscriber's downstream Observers synchronously unsubscribe,
144110
        // execution continues to here before the RefCountOperator has a chance to
144111
        // supply the RefCountSubscriber with the shared connection Subscription.
144112
        // For example:
144113
        // ```
144114
        // Observable.range(0, 10)
144115
        //   .publish()
144116
        //   .refCount()
144117
        //   .take(5)
144118
        //   .subscribe();
144119
        // ```
144120
        // In order to account for this case, RefCountSubscriber should only dispose
144121
        // the ConnectableObservable's shared connection Subscription if the
144122
        // connection Subscription exists, *and* either:
144123
        //   a. RefCountSubscriber doesn't have a reference to the shared connection
144124
        //      Subscription yet, or,
144125
        //   b. RefCountSubscriber's connection Subscription reference is identical
144126
        //      to the shared connection Subscription
144127
        ///
144128
        var connection = this.connection;
144129
        var sharedConnection = connectable._connection;
144130
        this.connection = null;
144131
        if (sharedConnection && (!connection || sharedConnection === connection)) {
144132
            sharedConnection.unsubscribe();
144133
        }
144134
    };
144135
    return RefCountSubscriber;
144136
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
144137
//# sourceMappingURL=refCount.js.map
144138
 
144139
 
144140
/***/ }),
144141
 
144142
/***/ "./node_modules/rxjs/_esm5/internal/operators/repeat.js":
144143
/*!**************************************************************!*\
144144
  !*** ./node_modules/rxjs/_esm5/internal/operators/repeat.js ***!
144145
  \**************************************************************/
144146
/*! exports provided: repeat */
144147
/***/ (function(module, __webpack_exports__, __webpack_require__) {
144148
 
144149
"use strict";
144150
__webpack_require__.r(__webpack_exports__);
144151
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return repeat; });
144152
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
144153
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
144154
/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/empty */ "./node_modules/rxjs/_esm5/internal/observable/empty.js");
144155
/** PURE_IMPORTS_START tslib,_Subscriber,_observable_empty PURE_IMPORTS_END */
144156
 
144157
 
144158
 
144159
/**
144160
 * Returns an Observable that repeats the stream of items emitted by the source Observable at most count times.
144161
 *
144162
 * <img src="./img/repeat.png" width="100%">
144163
 *
144164
 * @param {number} [count] The number of times the source Observable items are repeated, a count of 0 will yield
144165
 * an empty Observable.
144166
 * @return {Observable} An Observable that repeats the stream of items emitted by the source Observable at most
144167
 * count times.
144168
 * @method repeat
144169
 * @owner Observable
144170
 */
144171
function repeat(count) {
144172
    if (count === void 0) {
144173
        count = -1;
144174
    }
144175
    return function (source) {
144176
        if (count === 0) {
144177
            return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])();
144178
        }
144179
        else if (count < 0) {
144180
            return source.lift(new RepeatOperator(-1, source));
144181
        }
144182
        else {
144183
            return source.lift(new RepeatOperator(count - 1, source));
144184
        }
144185
    };
144186
}
144187
var RepeatOperator = /*@__PURE__*/ (function () {
144188
    function RepeatOperator(count, source) {
144189
        this.count = count;
144190
        this.source = source;
144191
    }
144192
    RepeatOperator.prototype.call = function (subscriber, source) {
144193
        return source.subscribe(new RepeatSubscriber(subscriber, this.count, this.source));
144194
    };
144195
    return RepeatOperator;
144196
}());
144197
/**
144198
 * We need this JSDoc comment for affecting ESDoc.
144199
 * @ignore
144200
 * @extends {Ignored}
144201
 */
144202
var RepeatSubscriber = /*@__PURE__*/ (function (_super) {
144203
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RepeatSubscriber, _super);
144204
    function RepeatSubscriber(destination, count, source) {
144205
        var _this = _super.call(this, destination) || this;
144206
        _this.count = count;
144207
        _this.source = source;
144208
        return _this;
144209
    }
144210
    RepeatSubscriber.prototype.complete = function () {
144211
        if (!this.isStopped) {
144212
            var _a = this, source = _a.source, count = _a.count;
144213
            if (count === 0) {
144214
                return _super.prototype.complete.call(this);
144215
            }
144216
            else if (count > -1) {
144217
                this.count = count - 1;
144218
            }
144219
            source.subscribe(this._unsubscribeAndRecycle());
144220
        }
144221
    };
144222
    return RepeatSubscriber;
144223
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
144224
//# sourceMappingURL=repeat.js.map
144225
 
144226
 
144227
/***/ }),
144228
 
144229
/***/ "./node_modules/rxjs/_esm5/internal/operators/repeatWhen.js":
144230
/*!******************************************************************!*\
144231
  !*** ./node_modules/rxjs/_esm5/internal/operators/repeatWhen.js ***!
144232
  \******************************************************************/
144233
/*! exports provided: repeatWhen */
144234
/***/ (function(module, __webpack_exports__, __webpack_require__) {
144235
 
144236
"use strict";
144237
__webpack_require__.r(__webpack_exports__);
144238
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return repeatWhen; });
144239
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
144240
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
144241
/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/tryCatch */ "./node_modules/rxjs/_esm5/internal/util/tryCatch.js");
144242
/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/errorObject */ "./node_modules/rxjs/_esm5/internal/util/errorObject.js");
144243
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
144244
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
144245
/** PURE_IMPORTS_START tslib,_Subject,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
144246
 
144247
 
144248
 
144249
 
144250
 
144251
 
144252
/**
144253
 * Returns an Observable that mirrors the source Observable with the exception of a `complete`. If the source
144254
 * Observable calls `complete`, this method will emit to the Observable returned from `notifier`. If that Observable
144255
 * calls `complete` or `error`, then this method will call `complete` or `error` on the child subscription. Otherwise
144256
 * this method will resubscribe to the source Observable.
144257
 *
144258
 * <img src="./img/repeatWhen.png" width="100%">
144259
 *
144260
 * @param {function(notifications: Observable): Observable} notifier - Receives an Observable of notifications with
144261
 * which a user can `complete` or `error`, aborting the repetition.
144262
 * @return {Observable} The source Observable modified with repeat logic.
144263
 * @method repeatWhen
144264
 * @owner Observable
144265
 */
144266
function repeatWhen(notifier) {
144267
    return function (source) { return source.lift(new RepeatWhenOperator(notifier)); };
144268
}
144269
var RepeatWhenOperator = /*@__PURE__*/ (function () {
144270
    function RepeatWhenOperator(notifier) {
144271
        this.notifier = notifier;
144272
    }
144273
    RepeatWhenOperator.prototype.call = function (subscriber, source) {
144274
        return source.subscribe(new RepeatWhenSubscriber(subscriber, this.notifier, source));
144275
    };
144276
    return RepeatWhenOperator;
144277
}());
144278
/**
144279
 * We need this JSDoc comment for affecting ESDoc.
144280
 * @ignore
144281
 * @extends {Ignored}
144282
 */
144283
var RepeatWhenSubscriber = /*@__PURE__*/ (function (_super) {
144284
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RepeatWhenSubscriber, _super);
144285
    function RepeatWhenSubscriber(destination, notifier, source) {
144286
        var _this = _super.call(this, destination) || this;
144287
        _this.notifier = notifier;
144288
        _this.source = source;
144289
        _this.sourceIsBeingSubscribedTo = true;
144290
        return _this;
144291
    }
144292
    RepeatWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
144293
        this.sourceIsBeingSubscribedTo = true;
144294
        this.source.subscribe(this);
144295
    };
144296
    RepeatWhenSubscriber.prototype.notifyComplete = function (innerSub) {
144297
        if (this.sourceIsBeingSubscribedTo === false) {
144298
            return _super.prototype.complete.call(this);
144299
        }
144300
    };
144301
    RepeatWhenSubscriber.prototype.complete = function () {
144302
        this.sourceIsBeingSubscribedTo = false;
144303
        if (!this.isStopped) {
144304
            if (!this.retries) {
144305
                this.subscribeToRetries();
144306
            }
144307
            if (!this.retriesSubscription || this.retriesSubscription.closed) {
144308
                return _super.prototype.complete.call(this);
144309
            }
144310
            this._unsubscribeAndRecycle();
144311
            this.notifications.next();
144312
        }
144313
    };
144314
    /** @deprecated This is an internal implementation detail, do not use. */
144315
    RepeatWhenSubscriber.prototype._unsubscribe = function () {
144316
        var _a = this, notifications = _a.notifications, retriesSubscription = _a.retriesSubscription;
144317
        if (notifications) {
144318
            notifications.unsubscribe();
144319
            this.notifications = null;
144320
        }
144321
        if (retriesSubscription) {
144322
            retriesSubscription.unsubscribe();
144323
            this.retriesSubscription = null;
144324
        }
144325
        this.retries = null;
144326
    };
144327
    /** @deprecated This is an internal implementation detail, do not use. */
144328
    RepeatWhenSubscriber.prototype._unsubscribeAndRecycle = function () {
144329
        var _unsubscribe = this._unsubscribe;
144330
        this._unsubscribe = null;
144331
        _super.prototype._unsubscribeAndRecycle.call(this);
144332
        this._unsubscribe = _unsubscribe;
144333
        return this;
144334
    };
144335
    RepeatWhenSubscriber.prototype.subscribeToRetries = function () {
144336
        this.notifications = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
144337
        var retries = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_2__["tryCatch"])(this.notifier)(this.notifications);
144338
        if (retries === _util_errorObject__WEBPACK_IMPORTED_MODULE_3__["errorObject"]) {
144339
            return _super.prototype.complete.call(this);
144340
        }
144341
        this.retries = retries;
144342
        this.retriesSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__["subscribeToResult"])(this, retries);
144343
    };
144344
    return RepeatWhenSubscriber;
144345
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__["OuterSubscriber"]));
144346
//# sourceMappingURL=repeatWhen.js.map
144347
 
144348
 
144349
/***/ }),
144350
 
144351
/***/ "./node_modules/rxjs/_esm5/internal/operators/retry.js":
144352
/*!*************************************************************!*\
144353
  !*** ./node_modules/rxjs/_esm5/internal/operators/retry.js ***!
144354
  \*************************************************************/
144355
/*! exports provided: retry */
144356
/***/ (function(module, __webpack_exports__, __webpack_require__) {
144357
 
144358
"use strict";
144359
__webpack_require__.r(__webpack_exports__);
144360
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return retry; });
144361
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
144362
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
144363
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
144364
 
144365
 
144366
/**
144367
 * Returns an Observable that mirrors the source Observable with the exception of an `error`. If the source Observable
144368
 * calls `error`, this method will resubscribe to the source Observable for a maximum of `count` resubscriptions (given
144369
 * as a number parameter) rather than propagating the `error` call.
144370
 *
144371
 * <img src="./img/retry.png" width="100%">
144372
 *
144373
 * Any and all items emitted by the source Observable will be emitted by the resulting Observable, even those emitted
144374
 * during failed subscriptions. For example, if an Observable fails at first but emits [1, 2] then succeeds the second
144375
 * time and emits: [1, 2, 3, 4, 5] then the complete stream of emissions and notifications
144376
 * would be: [1, 2, 1, 2, 3, 4, 5, `complete`].
144377
 * @param {number} count - Number of retry attempts before failing.
144378
 * @return {Observable} The source Observable modified with the retry logic.
144379
 * @method retry
144380
 * @owner Observable
144381
 */
144382
function retry(count) {
144383
    if (count === void 0) {
144384
        count = -1;
144385
    }
144386
    return function (source) { return source.lift(new RetryOperator(count, source)); };
144387
}
144388
var RetryOperator = /*@__PURE__*/ (function () {
144389
    function RetryOperator(count, source) {
144390
        this.count = count;
144391
        this.source = source;
144392
    }
144393
    RetryOperator.prototype.call = function (subscriber, source) {
144394
        return source.subscribe(new RetrySubscriber(subscriber, this.count, this.source));
144395
    };
144396
    return RetryOperator;
144397
}());
144398
/**
144399
 * We need this JSDoc comment for affecting ESDoc.
144400
 * @ignore
144401
 * @extends {Ignored}
144402
 */
144403
var RetrySubscriber = /*@__PURE__*/ (function (_super) {
144404
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RetrySubscriber, _super);
144405
    function RetrySubscriber(destination, count, source) {
144406
        var _this = _super.call(this, destination) || this;
144407
        _this.count = count;
144408
        _this.source = source;
144409
        return _this;
144410
    }
144411
    RetrySubscriber.prototype.error = function (err) {
144412
        if (!this.isStopped) {
144413
            var _a = this, source = _a.source, count = _a.count;
144414
            if (count === 0) {
144415
                return _super.prototype.error.call(this, err);
144416
            }
144417
            else if (count > -1) {
144418
                this.count = count - 1;
144419
            }
144420
            source.subscribe(this._unsubscribeAndRecycle());
144421
        }
144422
    };
144423
    return RetrySubscriber;
144424
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
144425
//# sourceMappingURL=retry.js.map
144426
 
144427
 
144428
/***/ }),
144429
 
144430
/***/ "./node_modules/rxjs/_esm5/internal/operators/retryWhen.js":
144431
/*!*****************************************************************!*\
144432
  !*** ./node_modules/rxjs/_esm5/internal/operators/retryWhen.js ***!
144433
  \*****************************************************************/
144434
/*! exports provided: retryWhen */
144435
/***/ (function(module, __webpack_exports__, __webpack_require__) {
144436
 
144437
"use strict";
144438
__webpack_require__.r(__webpack_exports__);
144439
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return retryWhen; });
144440
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
144441
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
144442
/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/tryCatch */ "./node_modules/rxjs/_esm5/internal/util/tryCatch.js");
144443
/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/errorObject */ "./node_modules/rxjs/_esm5/internal/util/errorObject.js");
144444
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
144445
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
144446
/** PURE_IMPORTS_START tslib,_Subject,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
144447
 
144448
 
144449
 
144450
 
144451
 
144452
 
144453
/**
144454
 * Returns an Observable that mirrors the source Observable with the exception of an `error`. If the source Observable
144455
 * calls `error`, this method will emit the Throwable that caused the error to the Observable returned from `notifier`.
144456
 * If that Observable calls `complete` or `error` then this method will call `complete` or `error` on the child
144457
 * subscription. Otherwise this method will resubscribe to the source Observable.
144458
 *
144459
 * <img src="./img/retryWhen.png" width="100%">
144460
 *
144461
 * @param {function(errors: Observable): Observable} notifier - Receives an Observable of notifications with which a
144462
 * user can `complete` or `error`, aborting the retry.
144463
 * @return {Observable} The source Observable modified with retry logic.
144464
 * @method retryWhen
144465
 * @owner Observable
144466
 */
144467
function retryWhen(notifier) {
144468
    return function (source) { return source.lift(new RetryWhenOperator(notifier, source)); };
144469
}
144470
var RetryWhenOperator = /*@__PURE__*/ (function () {
144471
    function RetryWhenOperator(notifier, source) {
144472
        this.notifier = notifier;
144473
        this.source = source;
144474
    }
144475
    RetryWhenOperator.prototype.call = function (subscriber, source) {
144476
        return source.subscribe(new RetryWhenSubscriber(subscriber, this.notifier, this.source));
144477
    };
144478
    return RetryWhenOperator;
144479
}());
144480
/**
144481
 * We need this JSDoc comment for affecting ESDoc.
144482
 * @ignore
144483
 * @extends {Ignored}
144484
 */
144485
var RetryWhenSubscriber = /*@__PURE__*/ (function (_super) {
144486
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RetryWhenSubscriber, _super);
144487
    function RetryWhenSubscriber(destination, notifier, source) {
144488
        var _this = _super.call(this, destination) || this;
144489
        _this.notifier = notifier;
144490
        _this.source = source;
144491
        return _this;
144492
    }
144493
    RetryWhenSubscriber.prototype.error = function (err) {
144494
        if (!this.isStopped) {
144495
            var errors = this.errors;
144496
            var retries = this.retries;
144497
            var retriesSubscription = this.retriesSubscription;
144498
            if (!retries) {
144499
                errors = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
144500
                retries = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_2__["tryCatch"])(this.notifier)(errors);
144501
                if (retries === _util_errorObject__WEBPACK_IMPORTED_MODULE_3__["errorObject"]) {
144502
                    return _super.prototype.error.call(this, _util_errorObject__WEBPACK_IMPORTED_MODULE_3__["errorObject"].e);
144503
                }
144504
                retriesSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__["subscribeToResult"])(this, retries);
144505
            }
144506
            else {
144507
                this.errors = null;
144508
                this.retriesSubscription = null;
144509
            }
144510
            this._unsubscribeAndRecycle();
144511
            this.errors = errors;
144512
            this.retries = retries;
144513
            this.retriesSubscription = retriesSubscription;
144514
            errors.next(err);
144515
        }
144516
    };
144517
    /** @deprecated This is an internal implementation detail, do not use. */
144518
    RetryWhenSubscriber.prototype._unsubscribe = function () {
144519
        var _a = this, errors = _a.errors, retriesSubscription = _a.retriesSubscription;
144520
        if (errors) {
144521
            errors.unsubscribe();
144522
            this.errors = null;
144523
        }
144524
        if (retriesSubscription) {
144525
            retriesSubscription.unsubscribe();
144526
            this.retriesSubscription = null;
144527
        }
144528
        this.retries = null;
144529
    };
144530
    RetryWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
144531
        var _unsubscribe = this._unsubscribe;
144532
        this._unsubscribe = null;
144533
        this._unsubscribeAndRecycle();
144534
        this._unsubscribe = _unsubscribe;
144535
        this.source.subscribe(this);
144536
    };
144537
    return RetryWhenSubscriber;
144538
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__["OuterSubscriber"]));
144539
//# sourceMappingURL=retryWhen.js.map
144540
 
144541
 
144542
/***/ }),
144543
 
144544
/***/ "./node_modules/rxjs/_esm5/internal/operators/sample.js":
144545
/*!**************************************************************!*\
144546
  !*** ./node_modules/rxjs/_esm5/internal/operators/sample.js ***!
144547
  \**************************************************************/
144548
/*! exports provided: sample */
144549
/***/ (function(module, __webpack_exports__, __webpack_require__) {
144550
 
144551
"use strict";
144552
__webpack_require__.r(__webpack_exports__);
144553
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return sample; });
144554
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
144555
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
144556
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
144557
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
144558
 
144559
 
144560
 
144561
/**
144562
 * Emits the most recently emitted value from the source Observable whenever
144563
 * another Observable, the `notifier`, emits.
144564
 *
144565
 * <span class="informal">It's like {@link sampleTime}, but samples whenever
144566
 * the `notifier` Observable emits something.</span>
144567
 *
144568
 * <img src="./img/sample.png" width="100%">
144569
 *
144570
 * Whenever the `notifier` Observable emits a value or completes, `sample`
144571
 * looks at the source Observable and emits whichever value it has most recently
144572
 * emitted since the previous sampling, unless the source has not emitted
144573
 * anything since the previous sampling. The `notifier` is subscribed to as soon
144574
 * as the output Observable is subscribed.
144575
 *
144576
 * @example <caption>On every click, sample the most recent "seconds" timer</caption>
144577
 * var seconds = Rx.Observable.interval(1000);
144578
 * var clicks = Rx.Observable.fromEvent(document, 'click');
144579
 * var result = seconds.sample(clicks);
144580
 * result.subscribe(x => console.log(x));
144581
 *
144582
 * @see {@link audit}
144583
 * @see {@link debounce}
144584
 * @see {@link sampleTime}
144585
 * @see {@link throttle}
144586
 *
144587
 * @param {Observable<any>} notifier The Observable to use for sampling the
144588
 * source Observable.
144589
 * @return {Observable<T>} An Observable that emits the results of sampling the
144590
 * values emitted by the source Observable whenever the notifier Observable
144591
 * emits value or completes.
144592
 * @method sample
144593
 * @owner Observable
144594
 */
144595
function sample(notifier) {
144596
    return function (source) { return source.lift(new SampleOperator(notifier)); };
144597
}
144598
var SampleOperator = /*@__PURE__*/ (function () {
144599
    function SampleOperator(notifier) {
144600
        this.notifier = notifier;
144601
    }
144602
    SampleOperator.prototype.call = function (subscriber, source) {
144603
        var sampleSubscriber = new SampleSubscriber(subscriber);
144604
        var subscription = source.subscribe(sampleSubscriber);
144605
        subscription.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(sampleSubscriber, this.notifier));
144606
        return subscription;
144607
    };
144608
    return SampleOperator;
144609
}());
144610
/**
144611
 * We need this JSDoc comment for affecting ESDoc.
144612
 * @ignore
144613
 * @extends {Ignored}
144614
 */
144615
var SampleSubscriber = /*@__PURE__*/ (function (_super) {
144616
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SampleSubscriber, _super);
144617
    function SampleSubscriber() {
144618
        var _this = _super !== null && _super.apply(this, arguments) || this;
144619
        _this.hasValue = false;
144620
        return _this;
144621
    }
144622
    SampleSubscriber.prototype._next = function (value) {
144623
        this.value = value;
144624
        this.hasValue = true;
144625
    };
144626
    SampleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
144627
        this.emitValue();
144628
    };
144629
    SampleSubscriber.prototype.notifyComplete = function () {
144630
        this.emitValue();
144631
    };
144632
    SampleSubscriber.prototype.emitValue = function () {
144633
        if (this.hasValue) {
144634
            this.hasValue = false;
144635
            this.destination.next(this.value);
144636
        }
144637
    };
144638
    return SampleSubscriber;
144639
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
144640
//# sourceMappingURL=sample.js.map
144641
 
144642
 
144643
/***/ }),
144644
 
144645
/***/ "./node_modules/rxjs/_esm5/internal/operators/sampleTime.js":
144646
/*!******************************************************************!*\
144647
  !*** ./node_modules/rxjs/_esm5/internal/operators/sampleTime.js ***!
144648
  \******************************************************************/
144649
/*! exports provided: sampleTime */
144650
/***/ (function(module, __webpack_exports__, __webpack_require__) {
144651
 
144652
"use strict";
144653
__webpack_require__.r(__webpack_exports__);
144654
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return sampleTime; });
144655
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
144656
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
144657
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../scheduler/async */ "./node_modules/rxjs/_esm5/internal/scheduler/async.js");
144658
/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */
144659
 
144660
 
144661
 
144662
/**
144663
 * Emits the most recently emitted value from the source Observable within
144664
 * periodic time intervals.
144665
 *
144666
 * <span class="informal">Samples the source Observable at periodic time
144667
 * intervals, emitting what it samples.</span>
144668
 *
144669
 * <img src="./img/sampleTime.png" width="100%">
144670
 *
144671
 * `sampleTime` periodically looks at the source Observable and emits whichever
144672
 * value it has most recently emitted since the previous sampling, unless the
144673
 * source has not emitted anything since the previous sampling. The sampling
144674
 * happens periodically in time every `period` milliseconds (or the time unit
144675
 * defined by the optional `scheduler` argument). The sampling starts as soon as
144676
 * the output Observable is subscribed.
144677
 *
144678
 * @example <caption>Every second, emit the most recent click at most once</caption>
144679
 * var clicks = Rx.Observable.fromEvent(document, 'click');
144680
 * var result = clicks.sampleTime(1000);
144681
 * result.subscribe(x => console.log(x));
144682
 *
144683
 * @see {@link auditTime}
144684
 * @see {@link debounceTime}
144685
 * @see {@link delay}
144686
 * @see {@link sample}
144687
 * @see {@link throttleTime}
144688
 *
144689
 * @param {number} period The sampling period expressed in milliseconds or the
144690
 * time unit determined internally by the optional `scheduler`.
144691
 * @param {Scheduler} [scheduler=async] The {@link IScheduler} to use for
144692
 * managing the timers that handle the sampling.
144693
 * @return {Observable<T>} An Observable that emits the results of sampling the
144694
 * values emitted by the source Observable at the specified time interval.
144695
 * @method sampleTime
144696
 * @owner Observable
144697
 */
144698
function sampleTime(period, scheduler) {
144699
    if (scheduler === void 0) {
144700
        scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
144701
    }
144702
    return function (source) { return source.lift(new SampleTimeOperator(period, scheduler)); };
144703
}
144704
var SampleTimeOperator = /*@__PURE__*/ (function () {
144705
    function SampleTimeOperator(period, scheduler) {
144706
        this.period = period;
144707
        this.scheduler = scheduler;
144708
    }
144709
    SampleTimeOperator.prototype.call = function (subscriber, source) {
144710
        return source.subscribe(new SampleTimeSubscriber(subscriber, this.period, this.scheduler));
144711
    };
144712
    return SampleTimeOperator;
144713
}());
144714
/**
144715
 * We need this JSDoc comment for affecting ESDoc.
144716
 * @ignore
144717
 * @extends {Ignored}
144718
 */
144719
var SampleTimeSubscriber = /*@__PURE__*/ (function (_super) {
144720
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SampleTimeSubscriber, _super);
144721
    function SampleTimeSubscriber(destination, period, scheduler) {
144722
        var _this = _super.call(this, destination) || this;
144723
        _this.period = period;
144724
        _this.scheduler = scheduler;
144725
        _this.hasValue = false;
144726
        _this.add(scheduler.schedule(dispatchNotification, period, { subscriber: _this, period: period }));
144727
        return _this;
144728
    }
144729
    SampleTimeSubscriber.prototype._next = function (value) {
144730
        this.lastValue = value;
144731
        this.hasValue = true;
144732
    };
144733
    SampleTimeSubscriber.prototype.notifyNext = function () {
144734
        if (this.hasValue) {
144735
            this.hasValue = false;
144736
            this.destination.next(this.lastValue);
144737
        }
144738
    };
144739
    return SampleTimeSubscriber;
144740
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
144741
function dispatchNotification(state) {
144742
    var subscriber = state.subscriber, period = state.period;
144743
    subscriber.notifyNext();
144744
    this.schedule(state, period);
144745
}
144746
//# sourceMappingURL=sampleTime.js.map
144747
 
144748
 
144749
/***/ }),
144750
 
144751
/***/ "./node_modules/rxjs/_esm5/internal/operators/scan.js":
144752
/*!************************************************************!*\
144753
  !*** ./node_modules/rxjs/_esm5/internal/operators/scan.js ***!
144754
  \************************************************************/
144755
/*! exports provided: scan */
144756
/***/ (function(module, __webpack_exports__, __webpack_require__) {
144757
 
144758
"use strict";
144759
__webpack_require__.r(__webpack_exports__);
144760
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return scan; });
144761
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
144762
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
144763
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
144764
 
144765
 
144766
/* tslint:enable:max-line-length */
144767
/**
144768
 * Applies an accumulator function over the source Observable, and returns each
144769
 * intermediate result, with an optional seed value.
144770
 *
144771
 * <span class="informal">It's like {@link reduce}, but emits the current
144772
 * accumulation whenever the source emits a value.</span>
144773
 *
144774
 * <img src="./img/scan.png" width="100%">
144775
 *
144776
 * Combines together all values emitted on the source, using an accumulator
144777
 * function that knows how to join a new source value into the accumulation from
144778
 * the past. Is similar to {@link reduce}, but emits the intermediate
144779
 * accumulations.
144780
 *
144781
 * Returns an Observable that applies a specified `accumulator` function to each
144782
 * item emitted by the source Observable. If a `seed` value is specified, then
144783
 * that value will be used as the initial value for the accumulator. If no seed
144784
 * value is specified, the first item of the source is used as the seed.
144785
 *
144786
 * @example <caption>Count the number of click events</caption>
144787
 * var clicks = Rx.Observable.fromEvent(document, 'click');
144788
 * var ones = clicks.mapTo(1);
144789
 * var seed = 0;
144790
 * var count = ones.scan((acc, one) => acc + one, seed);
144791
 * count.subscribe(x => console.log(x));
144792
 *
144793
 * @see {@link expand}
144794
 * @see {@link mergeScan}
144795
 * @see {@link reduce}
144796
 *
144797
 * @param {function(acc: R, value: T, index: number): R} accumulator
144798
 * The accumulator function called on each source value.
144799
 * @param {T|R} [seed] The initial accumulation value.
144800
 * @return {Observable<R>} An observable of the accumulated values.
144801
 * @method scan
144802
 * @owner Observable
144803
 */
144804
function scan(accumulator, seed) {
144805
    var hasSeed = false;
144806
    // providing a seed of `undefined` *should* be valid and trigger
144807
    // hasSeed! so don't use `seed !== undefined` checks!
144808
    // For this reason, we have to check it here at the original call site
144809
    // otherwise inside Operator/Subscriber we won't know if `undefined`
144810
    // means they didn't provide anything or if they literally provided `undefined`
144811
    if (arguments.length >= 2) {
144812
        hasSeed = true;
144813
    }
144814
    return function scanOperatorFunction(source) {
144815
        return source.lift(new ScanOperator(accumulator, seed, hasSeed));
144816
    };
144817
}
144818
var ScanOperator = /*@__PURE__*/ (function () {
144819
    function ScanOperator(accumulator, seed, hasSeed) {
144820
        if (hasSeed === void 0) {
144821
            hasSeed = false;
144822
        }
144823
        this.accumulator = accumulator;
144824
        this.seed = seed;
144825
        this.hasSeed = hasSeed;
144826
    }
144827
    ScanOperator.prototype.call = function (subscriber, source) {
144828
        return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed));
144829
    };
144830
    return ScanOperator;
144831
}());
144832
/**
144833
 * We need this JSDoc comment for affecting ESDoc.
144834
 * @ignore
144835
 * @extends {Ignored}
144836
 */
144837
var ScanSubscriber = /*@__PURE__*/ (function (_super) {
144838
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ScanSubscriber, _super);
144839
    function ScanSubscriber(destination, accumulator, _seed, hasSeed) {
144840
        var _this = _super.call(this, destination) || this;
144841
        _this.accumulator = accumulator;
144842
        _this._seed = _seed;
144843
        _this.hasSeed = hasSeed;
144844
        _this.index = 0;
144845
        return _this;
144846
    }
144847
    Object.defineProperty(ScanSubscriber.prototype, "seed", {
144848
        get: function () {
144849
            return this._seed;
144850
        },
144851
        set: function (value) {
144852
            this.hasSeed = true;
144853
            this._seed = value;
144854
        },
144855
        enumerable: true,
144856
        configurable: true
144857
    });
144858
    ScanSubscriber.prototype._next = function (value) {
144859
        if (!this.hasSeed) {
144860
            this.seed = value;
144861
            this.destination.next(value);
144862
        }
144863
        else {
144864
            return this._tryNext(value);
144865
        }
144866
    };
144867
    ScanSubscriber.prototype._tryNext = function (value) {
144868
        var index = this.index++;
144869
        var result;
144870
        try {
144871
            result = this.accumulator(this.seed, value, index);
144872
        }
144873
        catch (err) {
144874
            this.destination.error(err);
144875
        }
144876
        this.seed = result;
144877
        this.destination.next(result);
144878
    };
144879
    return ScanSubscriber;
144880
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
144881
//# sourceMappingURL=scan.js.map
144882
 
144883
 
144884
/***/ }),
144885
 
144886
/***/ "./node_modules/rxjs/_esm5/internal/operators/sequenceEqual.js":
144887
/*!*********************************************************************!*\
144888
  !*** ./node_modules/rxjs/_esm5/internal/operators/sequenceEqual.js ***!
144889
  \*********************************************************************/
144890
/*! exports provided: sequenceEqual, SequenceEqualOperator, SequenceEqualSubscriber */
144891
/***/ (function(module, __webpack_exports__, __webpack_require__) {
144892
 
144893
"use strict";
144894
__webpack_require__.r(__webpack_exports__);
144895
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return sequenceEqual; });
144896
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SequenceEqualOperator", function() { return SequenceEqualOperator; });
144897
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SequenceEqualSubscriber", function() { return SequenceEqualSubscriber; });
144898
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
144899
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
144900
/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/tryCatch */ "./node_modules/rxjs/_esm5/internal/util/tryCatch.js");
144901
/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/errorObject */ "./node_modules/rxjs/_esm5/internal/util/errorObject.js");
144902
/** PURE_IMPORTS_START tslib,_Subscriber,_util_tryCatch,_util_errorObject PURE_IMPORTS_END */
144903
 
144904
 
144905
 
144906
 
144907
/**
144908
 * Compares all values of two observables in sequence using an optional comparor function
144909
 * and returns an observable of a single boolean value representing whether or not the two sequences
144910
 * are equal.
144911
 *
144912
 * <span class="informal">Checks to see of all values emitted by both observables are equal, in order.</span>
144913
 *
144914
 * <img src="./img/sequenceEqual.png" width="100%">
144915
 *
144916
 * `sequenceEqual` subscribes to two observables and buffers incoming values from each observable. Whenever either
144917
 * observable emits a value, the value is buffered and the buffers are shifted and compared from the bottom
144918
 * up; If any value pair doesn't match, the returned observable will emit `false` and complete. If one of the
144919
 * observables completes, the operator will wait for the other observable to complete; If the other
144920
 * observable emits before completing, the returned observable will emit `false` and complete. If one observable never
144921
 * completes or emits after the other complets, the returned observable will never complete.
144922
 *
144923
 * @example <caption>figure out if the Konami code matches</caption>
144924
 * var code = Rx.Observable.from([
144925
 *  "ArrowUp",
144926
 *  "ArrowUp",
144927
 *  "ArrowDown",
144928
 *  "ArrowDown",
144929
 *  "ArrowLeft",
144930
 *  "ArrowRight",
144931
 *  "ArrowLeft",
144932
 *  "ArrowRight",
144933
 *  "KeyB",
144934
 *  "KeyA",
144935
 *  "Enter" // no start key, clearly.
144936
 * ]);
144937
 *
144938
 * var keys = Rx.Observable.fromEvent(document, 'keyup')
144939
 *  .map(e => e.code);
144940
 * var matches = keys.bufferCount(11, 1)
144941
 *  .mergeMap(
144942
 *    last11 =>
144943
 *      Rx.Observable.from(last11)
144944
 *        .sequenceEqual(code)
144945
 *   );
144946
 * matches.subscribe(matched => console.log('Successful cheat at Contra? ', matched));
144947
 *
144948
 * @see {@link combineLatest}
144949
 * @see {@link zip}
144950
 * @see {@link withLatestFrom}
144951
 *
144952
 * @param {Observable} compareTo The observable sequence to compare the source sequence to.
144953
 * @param {function} [comparor] An optional function to compare each value pair
144954
 * @return {Observable} An Observable of a single boolean value representing whether or not
144955
 * the values emitted by both observables were equal in sequence.
144956
 * @method sequenceEqual
144957
 * @owner Observable
144958
 */
144959
function sequenceEqual(compareTo, comparor) {
144960
    return function (source) { return source.lift(new SequenceEqualOperator(compareTo, comparor)); };
144961
}
144962
var SequenceEqualOperator = /*@__PURE__*/ (function () {
144963
    function SequenceEqualOperator(compareTo, comparor) {
144964
        this.compareTo = compareTo;
144965
        this.comparor = comparor;
144966
    }
144967
    SequenceEqualOperator.prototype.call = function (subscriber, source) {
144968
        return source.subscribe(new SequenceEqualSubscriber(subscriber, this.compareTo, this.comparor));
144969
    };
144970
    return SequenceEqualOperator;
144971
}());
144972
 
144973
/**
144974
 * We need this JSDoc comment for affecting ESDoc.
144975
 * @ignore
144976
 * @extends {Ignored}
144977
 */
144978
var SequenceEqualSubscriber = /*@__PURE__*/ (function (_super) {
144979
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SequenceEqualSubscriber, _super);
144980
    function SequenceEqualSubscriber(destination, compareTo, comparor) {
144981
        var _this = _super.call(this, destination) || this;
144982
        _this.compareTo = compareTo;
144983
        _this.comparor = comparor;
144984
        _this._a = [];
144985
        _this._b = [];
144986
        _this._oneComplete = false;
144987
        _this.add(compareTo.subscribe(new SequenceEqualCompareToSubscriber(destination, _this)));
144988
        return _this;
144989
    }
144990
    SequenceEqualSubscriber.prototype._next = function (value) {
144991
        if (this._oneComplete && this._b.length === 0) {
144992
            this.emit(false);
144993
        }
144994
        else {
144995
            this._a.push(value);
144996
            this.checkValues();
144997
        }
144998
    };
144999
    SequenceEqualSubscriber.prototype._complete = function () {
145000
        if (this._oneComplete) {
145001
            this.emit(this._a.length === 0 && this._b.length === 0);
145002
        }
145003
        else {
145004
            this._oneComplete = true;
145005
        }
145006
    };
145007
    SequenceEqualSubscriber.prototype.checkValues = function () {
145008
        var _c = this, _a = _c._a, _b = _c._b, comparor = _c.comparor;
145009
        while (_a.length > 0 && _b.length > 0) {
145010
            var a = _a.shift();
145011
            var b = _b.shift();
145012
            var areEqual = false;
145013
            if (comparor) {
145014
                areEqual = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_2__["tryCatch"])(comparor)(a, b);
145015
                if (areEqual === _util_errorObject__WEBPACK_IMPORTED_MODULE_3__["errorObject"]) {
145016
                    this.destination.error(_util_errorObject__WEBPACK_IMPORTED_MODULE_3__["errorObject"].e);
145017
                }
145018
            }
145019
            else {
145020
                areEqual = a === b;
145021
            }
145022
            if (!areEqual) {
145023
                this.emit(false);
145024
            }
145025
        }
145026
    };
145027
    SequenceEqualSubscriber.prototype.emit = function (value) {
145028
        var destination = this.destination;
145029
        destination.next(value);
145030
        destination.complete();
145031
    };
145032
    SequenceEqualSubscriber.prototype.nextB = function (value) {
145033
        if (this._oneComplete && this._a.length === 0) {
145034
            this.emit(false);
145035
        }
145036
        else {
145037
            this._b.push(value);
145038
            this.checkValues();
145039
        }
145040
    };
145041
    return SequenceEqualSubscriber;
145042
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
145043
 
145044
var SequenceEqualCompareToSubscriber = /*@__PURE__*/ (function (_super) {
145045
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SequenceEqualCompareToSubscriber, _super);
145046
    function SequenceEqualCompareToSubscriber(destination, parent) {
145047
        var _this = _super.call(this, destination) || this;
145048
        _this.parent = parent;
145049
        return _this;
145050
    }
145051
    SequenceEqualCompareToSubscriber.prototype._next = function (value) {
145052
        this.parent.nextB(value);
145053
    };
145054
    SequenceEqualCompareToSubscriber.prototype._error = function (err) {
145055
        this.parent.error(err);
145056
    };
145057
    SequenceEqualCompareToSubscriber.prototype._complete = function () {
145058
        this.parent._complete();
145059
    };
145060
    return SequenceEqualCompareToSubscriber;
145061
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
145062
//# sourceMappingURL=sequenceEqual.js.map
145063
 
145064
 
145065
/***/ }),
145066
 
145067
/***/ "./node_modules/rxjs/_esm5/internal/operators/share.js":
145068
/*!*************************************************************!*\
145069
  !*** ./node_modules/rxjs/_esm5/internal/operators/share.js ***!
145070
  \*************************************************************/
145071
/*! exports provided: share */
145072
/***/ (function(module, __webpack_exports__, __webpack_require__) {
145073
 
145074
"use strict";
145075
__webpack_require__.r(__webpack_exports__);
145076
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "share", function() { return share; });
145077
/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./multicast */ "./node_modules/rxjs/_esm5/internal/operators/multicast.js");
145078
/* harmony import */ var _refCount__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./refCount */ "./node_modules/rxjs/_esm5/internal/operators/refCount.js");
145079
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
145080
/** PURE_IMPORTS_START _multicast,_refCount,_Subject PURE_IMPORTS_END */
145081
 
145082
 
145083
 
145084
function shareSubjectFactory() {
145085
    return new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
145086
}
145087
/**
145088
 * Returns a new Observable that multicasts (shares) the original Observable. As long as there is at least one
145089
 * Subscriber this Observable will be subscribed and emitting data. When all subscribers have unsubscribed it will
145090
 * unsubscribe from the source Observable. Because the Observable is multicasting it makes the stream `hot`.
145091
 * This is an alias for .multicast(() => new Subject()).refCount().
145092
 *
145093
 * <img src="./img/share.png" width="100%">
145094
 *
145095
 * @return {Observable<T>} An Observable that upon connection causes the source Observable to emit items to its Observers.
145096
 * @method share
145097
 * @owner Observable
145098
 */
145099
function share() {
145100
    return function (source) { return Object(_refCount__WEBPACK_IMPORTED_MODULE_1__["refCount"])()(Object(_multicast__WEBPACK_IMPORTED_MODULE_0__["multicast"])(shareSubjectFactory)(source)); };
145101
}
145102
//# sourceMappingURL=share.js.map
145103
 
145104
 
145105
/***/ }),
145106
 
145107
/***/ "./node_modules/rxjs/_esm5/internal/operators/shareReplay.js":
145108
/*!*******************************************************************!*\
145109
  !*** ./node_modules/rxjs/_esm5/internal/operators/shareReplay.js ***!
145110
  \*******************************************************************/
145111
/*! exports provided: shareReplay */
145112
/***/ (function(module, __webpack_exports__, __webpack_require__) {
145113
 
145114
"use strict";
145115
__webpack_require__.r(__webpack_exports__);
145116
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return shareReplay; });
145117
/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../ReplaySubject */ "./node_modules/rxjs/_esm5/internal/ReplaySubject.js");
145118
/** PURE_IMPORTS_START _ReplaySubject PURE_IMPORTS_END */
145119
 
145120
/**
145121
 * @method shareReplay
145122
 * @owner Observable
145123
 */
145124
function shareReplay(bufferSize, windowTime, scheduler) {
145125
    return function (source) { return source.lift(shareReplayOperator(bufferSize, windowTime, scheduler)); };
145126
}
145127
function shareReplayOperator(bufferSize, windowTime, scheduler) {
145128
    var subject;
145129
    var refCount = 0;
145130
    var subscription;
145131
    var hasError = false;
145132
    var isComplete = false;
145133
    return function shareReplayOperation(source) {
145134
        refCount++;
145135
        if (!subject || hasError) {
145136
            hasError = false;
145137
            subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__["ReplaySubject"](bufferSize, windowTime, scheduler);
145138
            subscription = source.subscribe({
145139
                next: function (value) { subject.next(value); },
145140
                error: function (err) {
145141
                    hasError = true;
145142
                    subject.error(err);
145143
                },
145144
                complete: function () {
145145
                    isComplete = true;
145146
                    subject.complete();
145147
                },
145148
            });
145149
        }
145150
        var innerSub = subject.subscribe(this);
145151
        return function () {
145152
            refCount--;
145153
            innerSub.unsubscribe();
145154
            if (subscription && refCount === 0 && isComplete) {
145155
                subscription.unsubscribe();
145156
            }
145157
        };
145158
    };
145159
}
145160
//# sourceMappingURL=shareReplay.js.map
145161
 
145162
 
145163
/***/ }),
145164
 
145165
/***/ "./node_modules/rxjs/_esm5/internal/operators/single.js":
145166
/*!**************************************************************!*\
145167
  !*** ./node_modules/rxjs/_esm5/internal/operators/single.js ***!
145168
  \**************************************************************/
145169
/*! exports provided: single */
145170
/***/ (function(module, __webpack_exports__, __webpack_require__) {
145171
 
145172
"use strict";
145173
__webpack_require__.r(__webpack_exports__);
145174
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "single", function() { return single; });
145175
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
145176
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
145177
/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/EmptyError */ "./node_modules/rxjs/_esm5/internal/util/EmptyError.js");
145178
/** PURE_IMPORTS_START tslib,_Subscriber,_util_EmptyError PURE_IMPORTS_END */
145179
 
145180
 
145181
 
145182
/**
145183
 * Returns an Observable that emits the single item emitted by the source Observable that matches a specified
145184
 * predicate, if that Observable emits one such item. If the source Observable emits more than one such item or no
145185
 * items, notify of an IllegalArgumentException or NoSuchElementException respectively. If the source Observable
145186
 * emits items but none match the specified predicate then `undefined` is emiited.
145187
 *
145188
 * <img src="./img/single.png" width="100%">
145189
 *
145190
 * @throws {EmptyError} Delivers an EmptyError to the Observer's `error`
145191
 * callback if the Observable completes before any `next` notification was sent.
145192
 * @param {Function} predicate - A predicate function to evaluate items emitted by the source Observable.
145193
 * @return {Observable<T>} An Observable that emits the single item emitted by the source Observable that matches
145194
 * the predicate or `undefined` when no items match.
145195
 *
145196
 * @method single
145197
 * @owner Observable
145198
 */
145199
function single(predicate) {
145200
    return function (source) { return source.lift(new SingleOperator(predicate, source)); };
145201
}
145202
var SingleOperator = /*@__PURE__*/ (function () {
145203
    function SingleOperator(predicate, source) {
145204
        this.predicate = predicate;
145205
        this.source = source;
145206
    }
145207
    SingleOperator.prototype.call = function (subscriber, source) {
145208
        return source.subscribe(new SingleSubscriber(subscriber, this.predicate, this.source));
145209
    };
145210
    return SingleOperator;
145211
}());
145212
/**
145213
 * We need this JSDoc comment for affecting ESDoc.
145214
 * @ignore
145215
 * @extends {Ignored}
145216
 */
145217
var SingleSubscriber = /*@__PURE__*/ (function (_super) {
145218
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SingleSubscriber, _super);
145219
    function SingleSubscriber(destination, predicate, source) {
145220
        var _this = _super.call(this, destination) || this;
145221
        _this.predicate = predicate;
145222
        _this.source = source;
145223
        _this.seenValue = false;
145224
        _this.index = 0;
145225
        return _this;
145226
    }
145227
    SingleSubscriber.prototype.applySingleValue = function (value) {
145228
        if (this.seenValue) {
145229
            this.destination.error('Sequence contains more than one element');
145230
        }
145231
        else {
145232
            this.seenValue = true;
145233
            this.singleValue = value;
145234
        }
145235
    };
145236
    SingleSubscriber.prototype._next = function (value) {
145237
        var index = this.index++;
145238
        if (this.predicate) {
145239
            this.tryNext(value, index);
145240
        }
145241
        else {
145242
            this.applySingleValue(value);
145243
        }
145244
    };
145245
    SingleSubscriber.prototype.tryNext = function (value, index) {
145246
        try {
145247
            if (this.predicate(value, index, this.source)) {
145248
                this.applySingleValue(value);
145249
            }
145250
        }
145251
        catch (err) {
145252
            this.destination.error(err);
145253
        }
145254
    };
145255
    SingleSubscriber.prototype._complete = function () {
145256
        var destination = this.destination;
145257
        if (this.index > 0) {
145258
            destination.next(this.seenValue ? this.singleValue : undefined);
145259
            destination.complete();
145260
        }
145261
        else {
145262
            destination.error(new _util_EmptyError__WEBPACK_IMPORTED_MODULE_2__["EmptyError"]);
145263
        }
145264
    };
145265
    return SingleSubscriber;
145266
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
145267
//# sourceMappingURL=single.js.map
145268
 
145269
 
145270
/***/ }),
145271
 
145272
/***/ "./node_modules/rxjs/_esm5/internal/operators/skip.js":
145273
/*!************************************************************!*\
145274
  !*** ./node_modules/rxjs/_esm5/internal/operators/skip.js ***!
145275
  \************************************************************/
145276
/*! exports provided: skip */
145277
/***/ (function(module, __webpack_exports__, __webpack_require__) {
145278
 
145279
"use strict";
145280
__webpack_require__.r(__webpack_exports__);
145281
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return skip; });
145282
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
145283
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
145284
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
145285
 
145286
 
145287
/**
145288
 * Returns an Observable that skips the first `count` items emitted by the source Observable.
145289
 *
145290
 * <img src="./img/skip.png" width="100%">
145291
 *
145292
 * @param {Number} count - The number of times, items emitted by source Observable should be skipped.
145293
 * @return {Observable} An Observable that skips values emitted by the source Observable.
145294
 *
145295
 * @method skip
145296
 * @owner Observable
145297
 */
145298
function skip(count) {
145299
    return function (source) { return source.lift(new SkipOperator(count)); };
145300
}
145301
var SkipOperator = /*@__PURE__*/ (function () {
145302
    function SkipOperator(total) {
145303
        this.total = total;
145304
    }
145305
    SkipOperator.prototype.call = function (subscriber, source) {
145306
        return source.subscribe(new SkipSubscriber(subscriber, this.total));
145307
    };
145308
    return SkipOperator;
145309
}());
145310
/**
145311
 * We need this JSDoc comment for affecting ESDoc.
145312
 * @ignore
145313
 * @extends {Ignored}
145314
 */
145315
var SkipSubscriber = /*@__PURE__*/ (function (_super) {
145316
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipSubscriber, _super);
145317
    function SkipSubscriber(destination, total) {
145318
        var _this = _super.call(this, destination) || this;
145319
        _this.total = total;
145320
        _this.count = 0;
145321
        return _this;
145322
    }
145323
    SkipSubscriber.prototype._next = function (x) {
145324
        if (++this.count > this.total) {
145325
            this.destination.next(x);
145326
        }
145327
    };
145328
    return SkipSubscriber;
145329
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
145330
//# sourceMappingURL=skip.js.map
145331
 
145332
 
145333
/***/ }),
145334
 
145335
/***/ "./node_modules/rxjs/_esm5/internal/operators/skipLast.js":
145336
/*!****************************************************************!*\
145337
  !*** ./node_modules/rxjs/_esm5/internal/operators/skipLast.js ***!
145338
  \****************************************************************/
145339
/*! exports provided: skipLast */
145340
/***/ (function(module, __webpack_exports__, __webpack_require__) {
145341
 
145342
"use strict";
145343
__webpack_require__.r(__webpack_exports__);
145344
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return skipLast; });
145345
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
145346
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
145347
/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/ArgumentOutOfRangeError */ "./node_modules/rxjs/_esm5/internal/util/ArgumentOutOfRangeError.js");
145348
/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError PURE_IMPORTS_END */
145349
 
145350
 
145351
 
145352
/**
145353
 * Skip the last `count` values emitted by the source Observable.
145354
 *
145355
 * <img src="./img/skipLast.png" width="100%">
145356
 *
145357
 * `skipLast` returns an Observable that accumulates a queue with a length
145358
 * enough to store the first `count` values. As more values are received,
145359
 * values are taken from the front of the queue and produced on the result
145360
 * sequence. This causes values to be delayed.
145361
 *
145362
 * @example <caption>Skip the last 2 values of an Observable with many values</caption>
145363
 * var many = Rx.Observable.range(1, 5);
145364
 * var skipLastTwo = many.skipLast(2);
145365
 * skipLastTwo.subscribe(x => console.log(x));
145366
 *
145367
 * // Results in:
145368
 * // 1 2 3
145369
 *
145370
 * @see {@link skip}
145371
 * @see {@link skipUntil}
145372
 * @see {@link skipWhile}
145373
 * @see {@link take}
145374
 *
145375
 * @throws {ArgumentOutOfRangeError} When using `skipLast(i)`, it throws
145376
 * ArgumentOutOrRangeError if `i < 0`.
145377
 *
145378
 * @param {number} count Number of elements to skip from the end of the source Observable.
145379
 * @returns {Observable<T>} An Observable that skips the last count values
145380
 * emitted by the source Observable.
145381
 * @method skipLast
145382
 * @owner Observable
145383
 */
145384
function skipLast(count) {
145385
    return function (source) { return source.lift(new SkipLastOperator(count)); };
145386
}
145387
var SkipLastOperator = /*@__PURE__*/ (function () {
145388
    function SkipLastOperator(_skipCount) {
145389
        this._skipCount = _skipCount;
145390
        if (this._skipCount < 0) {
145391
            throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
145392
        }
145393
    }
145394
    SkipLastOperator.prototype.call = function (subscriber, source) {
145395
        if (this._skipCount === 0) {
145396
            // If we don't want to skip any values then just subscribe
145397
            // to Subscriber without any further logic.
145398
            return source.subscribe(new _Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"](subscriber));
145399
        }
145400
        else {
145401
            return source.subscribe(new SkipLastSubscriber(subscriber, this._skipCount));
145402
        }
145403
    };
145404
    return SkipLastOperator;
145405
}());
145406
/**
145407
 * We need this JSDoc comment for affecting ESDoc.
145408
 * @ignore
145409
 * @extends {Ignored}
145410
 */
145411
var SkipLastSubscriber = /*@__PURE__*/ (function (_super) {
145412
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipLastSubscriber, _super);
145413
    function SkipLastSubscriber(destination, _skipCount) {
145414
        var _this = _super.call(this, destination) || this;
145415
        _this._skipCount = _skipCount;
145416
        _this._count = 0;
145417
        _this._ring = new Array(_skipCount);
145418
        return _this;
145419
    }
145420
    SkipLastSubscriber.prototype._next = function (value) {
145421
        var skipCount = this._skipCount;
145422
        var count = this._count++;
145423
        if (count < skipCount) {
145424
            this._ring[count] = value;
145425
        }
145426
        else {
145427
            var currentIndex = count % skipCount;
145428
            var ring = this._ring;
145429
            var oldValue = ring[currentIndex];
145430
            ring[currentIndex] = value;
145431
            this.destination.next(oldValue);
145432
        }
145433
    };
145434
    return SkipLastSubscriber;
145435
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
145436
//# sourceMappingURL=skipLast.js.map
145437
 
145438
 
145439
/***/ }),
145440
 
145441
/***/ "./node_modules/rxjs/_esm5/internal/operators/skipUntil.js":
145442
/*!*****************************************************************!*\
145443
  !*** ./node_modules/rxjs/_esm5/internal/operators/skipUntil.js ***!
145444
  \*****************************************************************/
145445
/*! exports provided: skipUntil */
145446
/***/ (function(module, __webpack_exports__, __webpack_require__) {
145447
 
145448
"use strict";
145449
__webpack_require__.r(__webpack_exports__);
145450
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return skipUntil; });
145451
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
145452
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
145453
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
145454
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
145455
 
145456
 
145457
 
145458
/**
145459
 * Returns an Observable that skips items emitted by the source Observable until a second Observable emits an item.
145460
 *
145461
 * <img src="./img/skipUntil.png" width="100%">
145462
 *
145463
 * @param {Observable} notifier - The second Observable that has to emit an item before the source Observable's elements begin to
145464
 * be mirrored by the resulting Observable.
145465
 * @return {Observable<T>} An Observable that skips items from the source Observable until the second Observable emits
145466
 * an item, then emits the remaining items.
145467
 * @method skipUntil
145468
 * @owner Observable
145469
 */
145470
function skipUntil(notifier) {
145471
    return function (source) { return source.lift(new SkipUntilOperator(notifier)); };
145472
}
145473
var SkipUntilOperator = /*@__PURE__*/ (function () {
145474
    function SkipUntilOperator(notifier) {
145475
        this.notifier = notifier;
145476
    }
145477
    SkipUntilOperator.prototype.call = function (destination, source) {
145478
        return source.subscribe(new SkipUntilSubscriber(destination, this.notifier));
145479
    };
145480
    return SkipUntilOperator;
145481
}());
145482
/**
145483
 * We need this JSDoc comment for affecting ESDoc.
145484
 * @ignore
145485
 * @extends {Ignored}
145486
 */
145487
var SkipUntilSubscriber = /*@__PURE__*/ (function (_super) {
145488
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipUntilSubscriber, _super);
145489
    function SkipUntilSubscriber(destination, notifier) {
145490
        var _this = _super.call(this, destination) || this;
145491
        _this.hasValue = false;
145492
        _this.add(_this.innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, notifier));
145493
        return _this;
145494
    }
145495
    SkipUntilSubscriber.prototype._next = function (value) {
145496
        if (this.hasValue) {
145497
            _super.prototype._next.call(this, value);
145498
        }
145499
    };
145500
    SkipUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
145501
        this.hasValue = true;
145502
        this.innerSubscription.unsubscribe();
145503
    };
145504
    SkipUntilSubscriber.prototype.notifyComplete = function () {
145505
        /* do nothing */
145506
    };
145507
    return SkipUntilSubscriber;
145508
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
145509
//# sourceMappingURL=skipUntil.js.map
145510
 
145511
 
145512
/***/ }),
145513
 
145514
/***/ "./node_modules/rxjs/_esm5/internal/operators/skipWhile.js":
145515
/*!*****************************************************************!*\
145516
  !*** ./node_modules/rxjs/_esm5/internal/operators/skipWhile.js ***!
145517
  \*****************************************************************/
145518
/*! exports provided: skipWhile */
145519
/***/ (function(module, __webpack_exports__, __webpack_require__) {
145520
 
145521
"use strict";
145522
__webpack_require__.r(__webpack_exports__);
145523
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return skipWhile; });
145524
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
145525
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
145526
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
145527
 
145528
 
145529
/**
145530
 * Returns an Observable that skips all items emitted by the source Observable as long as a specified condition holds
145531
 * true, but emits all further source items as soon as the condition becomes false.
145532
 *
145533
 * <img src="./img/skipWhile.png" width="100%">
145534
 *
145535
 * @param {Function} predicate - A function to test each item emitted from the source Observable.
145536
 * @return {Observable<T>} An Observable that begins emitting items emitted by the source Observable when the
145537
 * specified predicate becomes false.
145538
 * @method skipWhile
145539
 * @owner Observable
145540
 */
145541
function skipWhile(predicate) {
145542
    return function (source) { return source.lift(new SkipWhileOperator(predicate)); };
145543
}
145544
var SkipWhileOperator = /*@__PURE__*/ (function () {
145545
    function SkipWhileOperator(predicate) {
145546
        this.predicate = predicate;
145547
    }
145548
    SkipWhileOperator.prototype.call = function (subscriber, source) {
145549
        return source.subscribe(new SkipWhileSubscriber(subscriber, this.predicate));
145550
    };
145551
    return SkipWhileOperator;
145552
}());
145553
/**
145554
 * We need this JSDoc comment for affecting ESDoc.
145555
 * @ignore
145556
 * @extends {Ignored}
145557
 */
145558
var SkipWhileSubscriber = /*@__PURE__*/ (function (_super) {
145559
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipWhileSubscriber, _super);
145560
    function SkipWhileSubscriber(destination, predicate) {
145561
        var _this = _super.call(this, destination) || this;
145562
        _this.predicate = predicate;
145563
        _this.skipping = true;
145564
        _this.index = 0;
145565
        return _this;
145566
    }
145567
    SkipWhileSubscriber.prototype._next = function (value) {
145568
        var destination = this.destination;
145569
        if (this.skipping) {
145570
            this.tryCallPredicate(value);
145571
        }
145572
        if (!this.skipping) {
145573
            destination.next(value);
145574
        }
145575
    };
145576
    SkipWhileSubscriber.prototype.tryCallPredicate = function (value) {
145577
        try {
145578
            var result = this.predicate(value, this.index++);
145579
            this.skipping = Boolean(result);
145580
        }
145581
        catch (err) {
145582
            this.destination.error(err);
145583
        }
145584
    };
145585
    return SkipWhileSubscriber;
145586
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
145587
//# sourceMappingURL=skipWhile.js.map
145588
 
145589
 
145590
/***/ }),
145591
 
145592
/***/ "./node_modules/rxjs/_esm5/internal/operators/startWith.js":
145593
/*!*****************************************************************!*\
145594
  !*** ./node_modules/rxjs/_esm5/internal/operators/startWith.js ***!
145595
  \*****************************************************************/
145596
/*! exports provided: startWith */
145597
/***/ (function(module, __webpack_exports__, __webpack_require__) {
145598
 
145599
"use strict";
145600
__webpack_require__.r(__webpack_exports__);
145601
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return startWith; });
145602
/* harmony import */ var _observable_fromArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/fromArray */ "./node_modules/rxjs/_esm5/internal/observable/fromArray.js");
145603
/* harmony import */ var _observable_scalar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/scalar */ "./node_modules/rxjs/_esm5/internal/observable/scalar.js");
145604
/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/empty */ "./node_modules/rxjs/_esm5/internal/observable/empty.js");
145605
/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../observable/concat */ "./node_modules/rxjs/_esm5/internal/observable/concat.js");
145606
/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/isScheduler */ "./node_modules/rxjs/_esm5/internal/util/isScheduler.js");
145607
/** PURE_IMPORTS_START _observable_fromArray,_observable_scalar,_observable_empty,_observable_concat,_util_isScheduler PURE_IMPORTS_END */
145608
 
145609
 
145610
 
145611
 
145612
 
145613
/* tslint:enable:max-line-length */
145614
/**
145615
 * Returns an Observable that emits the items you specify as arguments before it begins to emit
145616
 * items emitted by the source Observable.
145617
 *
145618
 * <img src="./img/startWith.png" width="100%">
145619
 *
145620
 * @param {...T} values - Items you want the modified Observable to emit first.
145621
 * @param {Scheduler} [scheduler] - A {@link IScheduler} to use for scheduling
145622
 * the emissions of the `next` notifications.
145623
 * @return {Observable} An Observable that emits the items in the specified Iterable and then emits the items
145624
 * emitted by the source Observable.
145625
 * @method startWith
145626
 * @owner Observable
145627
 */
145628
function startWith() {
145629
    var array = [];
145630
    for (var _i = 0; _i < arguments.length; _i++) {
145631
        array[_i] = arguments[_i];
145632
    }
145633
    return function (source) {
145634
        var scheduler = array[array.length - 1];
145635
        if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(scheduler)) {
145636
            array.pop();
145637
        }
145638
        else {
145639
            scheduler = null;
145640
        }
145641
        var len = array.length;
145642
        if (len === 1 && !scheduler) {
145643
            return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_3__["concat"])(Object(_observable_scalar__WEBPACK_IMPORTED_MODULE_1__["scalar"])(array[0]), source);
145644
        }
145645
        else if (len > 0) {
145646
            return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_3__["concat"])(Object(_observable_fromArray__WEBPACK_IMPORTED_MODULE_0__["fromArray"])(array, scheduler), source);
145647
        }
145648
        else {
145649
            return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_3__["concat"])(Object(_observable_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])(scheduler), source);
145650
        }
145651
    };
145652
}
145653
//# sourceMappingURL=startWith.js.map
145654
 
145655
 
145656
/***/ }),
145657
 
145658
/***/ "./node_modules/rxjs/_esm5/internal/operators/subscribeOn.js":
145659
/*!*******************************************************************!*\
145660
  !*** ./node_modules/rxjs/_esm5/internal/operators/subscribeOn.js ***!
145661
  \*******************************************************************/
145662
/*! exports provided: subscribeOn */
145663
/***/ (function(module, __webpack_exports__, __webpack_require__) {
145664
 
145665
"use strict";
145666
__webpack_require__.r(__webpack_exports__);
145667
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return subscribeOn; });
145668
/* harmony import */ var _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/SubscribeOnObservable */ "./node_modules/rxjs/_esm5/internal/observable/SubscribeOnObservable.js");
145669
/** PURE_IMPORTS_START _observable_SubscribeOnObservable PURE_IMPORTS_END */
145670
 
145671
/**
145672
 * Asynchronously subscribes Observers to this Observable on the specified IScheduler.
145673
 *
145674
 * <img src="./img/subscribeOn.png" width="100%">
145675
 *
145676
 * @param {Scheduler} scheduler - The IScheduler to perform subscription actions on.
145677
 * @return {Observable<T>} The source Observable modified so that its subscriptions happen on the specified IScheduler.
145678
 .
145679
 * @method subscribeOn
145680
 * @owner Observable
145681
 */
145682
function subscribeOn(scheduler, delay) {
145683
    if (delay === void 0) {
145684
        delay = 0;
145685
    }
145686
    return function subscribeOnOperatorFunction(source) {
145687
        return source.lift(new SubscribeOnOperator(scheduler, delay));
145688
    };
145689
}
145690
var SubscribeOnOperator = /*@__PURE__*/ (function () {
145691
    function SubscribeOnOperator(scheduler, delay) {
145692
        this.scheduler = scheduler;
145693
        this.delay = delay;
145694
    }
145695
    SubscribeOnOperator.prototype.call = function (subscriber, source) {
145696
        return new _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__["SubscribeOnObservable"](source, this.delay, this.scheduler).subscribe(subscriber);
145697
    };
145698
    return SubscribeOnOperator;
145699
}());
145700
//# sourceMappingURL=subscribeOn.js.map
145701
 
145702
 
145703
/***/ }),
145704
 
145705
/***/ "./node_modules/rxjs/_esm5/internal/operators/switchAll.js":
145706
/*!*****************************************************************!*\
145707
  !*** ./node_modules/rxjs/_esm5/internal/operators/switchAll.js ***!
145708
  \*****************************************************************/
145709
/*! exports provided: switchAll */
145710
/***/ (function(module, __webpack_exports__, __webpack_require__) {
145711
 
145712
"use strict";
145713
__webpack_require__.r(__webpack_exports__);
145714
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return switchAll; });
145715
/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./switchMap */ "./node_modules/rxjs/_esm5/internal/operators/switchMap.js");
145716
/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/identity */ "./node_modules/rxjs/_esm5/internal/util/identity.js");
145717
/** PURE_IMPORTS_START _switchMap,_util_identity PURE_IMPORTS_END */
145718
 
145719
 
145720
function switchAll() {
145721
    return Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"]);
145722
}
145723
//# sourceMappingURL=switchAll.js.map
145724
 
145725
 
145726
/***/ }),
145727
 
145728
/***/ "./node_modules/rxjs/_esm5/internal/operators/switchMap.js":
145729
/*!*****************************************************************!*\
145730
  !*** ./node_modules/rxjs/_esm5/internal/operators/switchMap.js ***!
145731
  \*****************************************************************/
145732
/*! exports provided: switchMap */
145733
/***/ (function(module, __webpack_exports__, __webpack_require__) {
145734
 
145735
"use strict";
145736
__webpack_require__.r(__webpack_exports__);
145737
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return switchMap; });
145738
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
145739
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
145740
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
145741
/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./map */ "./node_modules/rxjs/_esm5/internal/operators/map.js");
145742
/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../observable/from */ "./node_modules/rxjs/_esm5/internal/observable/from.js");
145743
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */
145744
 
145745
 
145746
 
145747
 
145748
 
145749
/* tslint:enable:max-line-length */
145750
/**
145751
 * Projects each source value to an Observable which is merged in the output
145752
 * Observable, emitting values only from the most recently projected Observable.
145753
 *
145754
 * <span class="informal">Maps each value to an Observable, then flattens all of
145755
 * these inner Observables using {@link switch}.</span>
145756
 *
145757
 * <img src="./img/switchMap.png" width="100%">
145758
 *
145759
 * Returns an Observable that emits items based on applying a function that you
145760
 * supply to each item emitted by the source Observable, where that function
145761
 * returns an (so-called "inner") Observable. Each time it observes one of these
145762
 * inner Observables, the output Observable begins emitting the items emitted by
145763
 * that inner Observable. When a new inner Observable is emitted, `switchMap`
145764
 * stops emitting items from the earlier-emitted inner Observable and begins
145765
 * emitting items from the new one. It continues to behave like this for
145766
 * subsequent inner Observables.
145767
 *
145768
 * @example <caption>Rerun an interval Observable on every click event</caption>
145769
 * var clicks = Rx.Observable.fromEvent(document, 'click');
145770
 * var result = clicks.switchMap((ev) => Rx.Observable.interval(1000));
145771
 * result.subscribe(x => console.log(x));
145772
 *
145773
 * @see {@link concatMap}
145774
 * @see {@link exhaustMap}
145775
 * @see {@link mergeMap}
145776
 * @see {@link switch}
145777
 * @see {@link switchMapTo}
145778
 *
145779
 * @param {function(value: T, ?index: number): ObservableInput} project A function
145780
 * that, when applied to an item emitted by the source Observable, returns an
145781
 * Observable.
145782
 * @return {Observable} An Observable that emits the result of applying the
145783
 * projection function (and the optional `resultSelector`) to each item emitted
145784
 * by the source Observable and taking only the values from the most recently
145785
 * projected inner Observable.
145786
 * @method switchMap
145787
 * @owner Observable
145788
 */
145789
function switchMap(project, resultSelector) {
145790
    if (typeof resultSelector === 'function') {
145791
        return function (source) { return source.pipe(switchMap(function (a, i) { return Object(_observable_from__WEBPACK_IMPORTED_MODULE_4__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };
145792
    }
145793
    return function (source) { return source.lift(new SwitchMapOperator(project)); };
145794
}
145795
var SwitchMapOperator = /*@__PURE__*/ (function () {
145796
    function SwitchMapOperator(project) {
145797
        this.project = project;
145798
    }
145799
    SwitchMapOperator.prototype.call = function (subscriber, source) {
145800
        return source.subscribe(new SwitchMapSubscriber(subscriber, this.project));
145801
    };
145802
    return SwitchMapOperator;
145803
}());
145804
/**
145805
 * We need this JSDoc comment for affecting ESDoc.
145806
 * @ignore
145807
 * @extends {Ignored}
145808
 */
145809
var SwitchMapSubscriber = /*@__PURE__*/ (function (_super) {
145810
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SwitchMapSubscriber, _super);
145811
    function SwitchMapSubscriber(destination, project) {
145812
        var _this = _super.call(this, destination) || this;
145813
        _this.project = project;
145814
        _this.index = 0;
145815
        return _this;
145816
    }
145817
    SwitchMapSubscriber.prototype._next = function (value) {
145818
        var result;
145819
        var index = this.index++;
145820
        try {
145821
            result = this.project(value, index);
145822
        }
145823
        catch (error) {
145824
            this.destination.error(error);
145825
            return;
145826
        }
145827
        this._innerSub(result, value, index);
145828
    };
145829
    SwitchMapSubscriber.prototype._innerSub = function (result, value, index) {
145830
        var innerSubscription = this.innerSubscription;
145831
        if (innerSubscription) {
145832
            innerSubscription.unsubscribe();
145833
        }
145834
        this.add(this.innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, result, value, index));
145835
    };
145836
    SwitchMapSubscriber.prototype._complete = function () {
145837
        var innerSubscription = this.innerSubscription;
145838
        if (!innerSubscription || innerSubscription.closed) {
145839
            _super.prototype._complete.call(this);
145840
        }
145841
    };
145842
    SwitchMapSubscriber.prototype._unsubscribe = function () {
145843
        this.innerSubscription = null;
145844
    };
145845
    SwitchMapSubscriber.prototype.notifyComplete = function (innerSub) {
145846
        this.remove(innerSub);
145847
        this.innerSubscription = null;
145848
        if (this.isStopped) {
145849
            _super.prototype._complete.call(this);
145850
        }
145851
    };
145852
    SwitchMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
145853
        this.destination.next(innerValue);
145854
    };
145855
    return SwitchMapSubscriber;
145856
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
145857
//# sourceMappingURL=switchMap.js.map
145858
 
145859
 
145860
/***/ }),
145861
 
145862
/***/ "./node_modules/rxjs/_esm5/internal/operators/switchMapTo.js":
145863
/*!*******************************************************************!*\
145864
  !*** ./node_modules/rxjs/_esm5/internal/operators/switchMapTo.js ***!
145865
  \*******************************************************************/
145866
/*! exports provided: switchMapTo */
145867
/***/ (function(module, __webpack_exports__, __webpack_require__) {
145868
 
145869
"use strict";
145870
__webpack_require__.r(__webpack_exports__);
145871
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return switchMapTo; });
145872
/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./switchMap */ "./node_modules/rxjs/_esm5/internal/operators/switchMap.js");
145873
/** PURE_IMPORTS_START _switchMap PURE_IMPORTS_END */
145874
 
145875
/* tslint:enable:max-line-length */
145876
/**
145877
 * Projects each source value to the same Observable which is flattened multiple
145878
 * times with {@link switch} in the output Observable.
145879
 *
145880
 * <span class="informal">It's like {@link switchMap}, but maps each value
145881
 * always to the same inner Observable.</span>
145882
 *
145883
 * <img src="./img/switchMapTo.png" width="100%">
145884
 *
145885
 * Maps each source value to the given Observable `innerObservable` regardless
145886
 * of the source value, and then flattens those resulting Observables into one
145887
 * single Observable, which is the output Observable. The output Observables
145888
 * emits values only from the most recently emitted instance of
145889
 * `innerObservable`.
145890
 *
145891
 * @example <caption>Rerun an interval Observable on every click event</caption>
145892
 * var clicks = Rx.Observable.fromEvent(document, 'click');
145893
 * var result = clicks.switchMapTo(Rx.Observable.interval(1000));
145894
 * result.subscribe(x => console.log(x));
145895
 *
145896
 * @see {@link concatMapTo}
145897
 * @see {@link switch}
145898
 * @see {@link switchMap}
145899
 * @see {@link mergeMapTo}
145900
 *
145901
 * @param {ObservableInput} innerObservable An Observable to replace each value from
145902
 * the source Observable.
145903
 * @return {Observable} An Observable that emits items from the given
145904
 * `innerObservable` (and optionally transformed through `resultSelector`) every
145905
 * time a value is emitted on the source Observable, and taking only the values
145906
 * from the most recently projected inner Observable.
145907
 * @method switchMapTo
145908
 * @owner Observable
145909
 */
145910
function switchMapTo(innerObservable, resultSelector) {
145911
    return resultSelector ? Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(function () { return innerObservable; }, resultSelector) : Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(function () { return innerObservable; });
145912
}
145913
//# sourceMappingURL=switchMapTo.js.map
145914
 
145915
 
145916
/***/ }),
145917
 
145918
/***/ "./node_modules/rxjs/_esm5/internal/operators/take.js":
145919
/*!************************************************************!*\
145920
  !*** ./node_modules/rxjs/_esm5/internal/operators/take.js ***!
145921
  \************************************************************/
145922
/*! exports provided: take */
145923
/***/ (function(module, __webpack_exports__, __webpack_require__) {
145924
 
145925
"use strict";
145926
__webpack_require__.r(__webpack_exports__);
145927
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "take", function() { return take; });
145928
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
145929
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
145930
/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/ArgumentOutOfRangeError */ "./node_modules/rxjs/_esm5/internal/util/ArgumentOutOfRangeError.js");
145931
/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../observable/empty */ "./node_modules/rxjs/_esm5/internal/observable/empty.js");
145932
/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */
145933
 
145934
 
145935
 
145936
 
145937
/**
145938
 * Emits only the first `count` values emitted by the source Observable.
145939
 *
145940
 * <span class="informal">Takes the first `count` values from the source, then
145941
 * completes.</span>
145942
 *
145943
 * <img src="./img/take.png" width="100%">
145944
 *
145945
 * `take` returns an Observable that emits only the first `count` values emitted
145946
 * by the source Observable. If the source emits fewer than `count` values then
145947
 * all of its values are emitted. After that, it completes, regardless if the
145948
 * source completes.
145949
 *
145950
 * @example <caption>Take the first 5 seconds of an infinite 1-second interval Observable</caption>
145951
 * var interval = Rx.Observable.interval(1000);
145952
 * var five = interval.take(5);
145953
 * five.subscribe(x => console.log(x));
145954
 *
145955
 * @see {@link takeLast}
145956
 * @see {@link takeUntil}
145957
 * @see {@link takeWhile}
145958
 * @see {@link skip}
145959
 *
145960
 * @throws {ArgumentOutOfRangeError} When using `take(i)`, it delivers an
145961
 * ArgumentOutOrRangeError to the Observer's `error` callback if `i < 0`.
145962
 *
145963
 * @param {number} count The maximum number of `next` values to emit.
145964
 * @return {Observable<T>} An Observable that emits only the first `count`
145965
 * values emitted by the source Observable, or all of the values from the source
145966
 * if the source emits fewer than `count` values.
145967
 * @method take
145968
 * @owner Observable
145969
 */
145970
function take(count) {
145971
    return function (source) {
145972
        if (count === 0) {
145973
            return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_3__["empty"])();
145974
        }
145975
        else {
145976
            return source.lift(new TakeOperator(count));
145977
        }
145978
    };
145979
}
145980
var TakeOperator = /*@__PURE__*/ (function () {
145981
    function TakeOperator(total) {
145982
        this.total = total;
145983
        if (this.total < 0) {
145984
            throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
145985
        }
145986
    }
145987
    TakeOperator.prototype.call = function (subscriber, source) {
145988
        return source.subscribe(new TakeSubscriber(subscriber, this.total));
145989
    };
145990
    return TakeOperator;
145991
}());
145992
/**
145993
 * We need this JSDoc comment for affecting ESDoc.
145994
 * @ignore
145995
 * @extends {Ignored}
145996
 */
145997
var TakeSubscriber = /*@__PURE__*/ (function (_super) {
145998
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeSubscriber, _super);
145999
    function TakeSubscriber(destination, total) {
146000
        var _this = _super.call(this, destination) || this;
146001
        _this.total = total;
146002
        _this.count = 0;
146003
        return _this;
146004
    }
146005
    TakeSubscriber.prototype._next = function (value) {
146006
        var total = this.total;
146007
        var count = ++this.count;
146008
        if (count <= total) {
146009
            this.destination.next(value);
146010
            if (count === total) {
146011
                this.destination.complete();
146012
                this.unsubscribe();
146013
            }
146014
        }
146015
    };
146016
    return TakeSubscriber;
146017
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
146018
//# sourceMappingURL=take.js.map
146019
 
146020
 
146021
/***/ }),
146022
 
146023
/***/ "./node_modules/rxjs/_esm5/internal/operators/takeLast.js":
146024
/*!****************************************************************!*\
146025
  !*** ./node_modules/rxjs/_esm5/internal/operators/takeLast.js ***!
146026
  \****************************************************************/
146027
/*! exports provided: takeLast */
146028
/***/ (function(module, __webpack_exports__, __webpack_require__) {
146029
 
146030
"use strict";
146031
__webpack_require__.r(__webpack_exports__);
146032
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return takeLast; });
146033
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
146034
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
146035
/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/ArgumentOutOfRangeError */ "./node_modules/rxjs/_esm5/internal/util/ArgumentOutOfRangeError.js");
146036
/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../observable/empty */ "./node_modules/rxjs/_esm5/internal/observable/empty.js");
146037
/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */
146038
 
146039
 
146040
 
146041
 
146042
/**
146043
 * Emits only the last `count` values emitted by the source Observable.
146044
 *
146045
 * <span class="informal">Remembers the latest `count` values, then emits those
146046
 * only when the source completes.</span>
146047
 *
146048
 * <img src="./img/takeLast.png" width="100%">
146049
 *
146050
 * `takeLast` returns an Observable that emits at most the last `count` values
146051
 * emitted by the source Observable. If the source emits fewer than `count`
146052
 * values then all of its values are emitted. This operator must wait until the
146053
 * `complete` notification emission from the source in order to emit the `next`
146054
 * values on the output Observable, because otherwise it is impossible to know
146055
 * whether or not more values will be emitted on the source. For this reason,
146056
 * all values are emitted synchronously, followed by the complete notification.
146057
 *
146058
 * @example <caption>Take the last 3 values of an Observable with many values</caption>
146059
 * var many = Rx.Observable.range(1, 100);
146060
 * var lastThree = many.pipe(takeLast(3));
146061
 * lastThree.subscribe(x => console.log(x));
146062
 *
146063
 * @see {@link take}
146064
 * @see {@link takeUntil}
146065
 * @see {@link takeWhile}
146066
 * @see {@link skip}
146067
 *
146068
 * @throws {ArgumentOutOfRangeError} When using `takeLast(i)`, it delivers an
146069
 * ArgumentOutOrRangeError to the Observer's `error` callback if `i < 0`.
146070
 *
146071
 * @param {number} count The maximum number of values to emit from the end of
146072
 * the sequence of values emitted by the source Observable.
146073
 * @return {Observable<T>} An Observable that emits at most the last count
146074
 * values emitted by the source Observable.
146075
 * @method takeLast
146076
 * @owner Observable
146077
 */
146078
function takeLast(count) {
146079
    return function takeLastOperatorFunction(source) {
146080
        if (count === 0) {
146081
            return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_3__["empty"])();
146082
        }
146083
        else {
146084
            return source.lift(new TakeLastOperator(count));
146085
        }
146086
    };
146087
}
146088
var TakeLastOperator = /*@__PURE__*/ (function () {
146089
    function TakeLastOperator(total) {
146090
        this.total = total;
146091
        if (this.total < 0) {
146092
            throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
146093
        }
146094
    }
146095
    TakeLastOperator.prototype.call = function (subscriber, source) {
146096
        return source.subscribe(new TakeLastSubscriber(subscriber, this.total));
146097
    };
146098
    return TakeLastOperator;
146099
}());
146100
/**
146101
 * We need this JSDoc comment for affecting ESDoc.
146102
 * @ignore
146103
 * @extends {Ignored}
146104
 */
146105
var TakeLastSubscriber = /*@__PURE__*/ (function (_super) {
146106
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeLastSubscriber, _super);
146107
    function TakeLastSubscriber(destination, total) {
146108
        var _this = _super.call(this, destination) || this;
146109
        _this.total = total;
146110
        _this.ring = new Array();
146111
        _this.count = 0;
146112
        return _this;
146113
    }
146114
    TakeLastSubscriber.prototype._next = function (value) {
146115
        var ring = this.ring;
146116
        var total = this.total;
146117
        var count = this.count++;
146118
        if (ring.length < total) {
146119
            ring.push(value);
146120
        }
146121
        else {
146122
            var index = count % total;
146123
            ring[index] = value;
146124
        }
146125
    };
146126
    TakeLastSubscriber.prototype._complete = function () {
146127
        var destination = this.destination;
146128
        var count = this.count;
146129
        if (count > 0) {
146130
            var total = this.count >= this.total ? this.total : this.count;
146131
            var ring = this.ring;
146132
            for (var i = 0; i < total; i++) {
146133
                var idx = (count++) % total;
146134
                destination.next(ring[idx]);
146135
            }
146136
        }
146137
        destination.complete();
146138
    };
146139
    return TakeLastSubscriber;
146140
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
146141
//# sourceMappingURL=takeLast.js.map
146142
 
146143
 
146144
/***/ }),
146145
 
146146
/***/ "./node_modules/rxjs/_esm5/internal/operators/takeUntil.js":
146147
/*!*****************************************************************!*\
146148
  !*** ./node_modules/rxjs/_esm5/internal/operators/takeUntil.js ***!
146149
  \*****************************************************************/
146150
/*! exports provided: takeUntil */
146151
/***/ (function(module, __webpack_exports__, __webpack_require__) {
146152
 
146153
"use strict";
146154
__webpack_require__.r(__webpack_exports__);
146155
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return takeUntil; });
146156
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
146157
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
146158
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
146159
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
146160
 
146161
 
146162
 
146163
/**
146164
 * Emits the values emitted by the source Observable until a `notifier`
146165
 * Observable emits a value.
146166
 *
146167
 * <span class="informal">Lets values pass until a second Observable,
146168
 * `notifier`, emits a value. Then, it completes.</span>
146169
 *
146170
 * <img src="./img/takeUntil.png" width="100%">
146171
 *
146172
 * `takeUntil` subscribes and begins mirroring the source Observable. It also
146173
 * monitors a second Observable, `notifier` that you provide. If the `notifier`
146174
 * emits a value, the output Observable stops mirroring the source Observable
146175
 * and completes. If the `notifier` doesn't emit any value and completes
146176
 * then `takeUntil` will pass all values.
146177
 *
146178
 * @example <caption>Tick every second until the first click happens</caption>
146179
 * var interval = Rx.Observable.interval(1000);
146180
 * var clicks = Rx.Observable.fromEvent(document, 'click');
146181
 * var result = interval.takeUntil(clicks);
146182
 * result.subscribe(x => console.log(x));
146183
 *
146184
 * @see {@link take}
146185
 * @see {@link takeLast}
146186
 * @see {@link takeWhile}
146187
 * @see {@link skip}
146188
 *
146189
 * @param {Observable} notifier The Observable whose first emitted value will
146190
 * cause the output Observable of `takeUntil` to stop emitting values from the
146191
 * source Observable.
146192
 * @return {Observable<T>} An Observable that emits the values from the source
146193
 * Observable until such time as `notifier` emits its first value.
146194
 * @method takeUntil
146195
 * @owner Observable
146196
 */
146197
function takeUntil(notifier) {
146198
    return function (source) { return source.lift(new TakeUntilOperator(notifier)); };
146199
}
146200
var TakeUntilOperator = /*@__PURE__*/ (function () {
146201
    function TakeUntilOperator(notifier) {
146202
        this.notifier = notifier;
146203
    }
146204
    TakeUntilOperator.prototype.call = function (subscriber, source) {
146205
        var takeUntilSubscriber = new TakeUntilSubscriber(subscriber);
146206
        var notifierSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(takeUntilSubscriber, this.notifier);
146207
        if (notifierSubscription && !notifierSubscription.closed) {
146208
            takeUntilSubscriber.add(notifierSubscription);
146209
            return source.subscribe(takeUntilSubscriber);
146210
        }
146211
        return takeUntilSubscriber;
146212
    };
146213
    return TakeUntilOperator;
146214
}());
146215
/**
146216
 * We need this JSDoc comment for affecting ESDoc.
146217
 * @ignore
146218
 * @extends {Ignored}
146219
 */
146220
var TakeUntilSubscriber = /*@__PURE__*/ (function (_super) {
146221
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeUntilSubscriber, _super);
146222
    function TakeUntilSubscriber(destination) {
146223
        return _super.call(this, destination) || this;
146224
    }
146225
    TakeUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
146226
        this.complete();
146227
    };
146228
    TakeUntilSubscriber.prototype.notifyComplete = function () {
146229
        // noop
146230
    };
146231
    return TakeUntilSubscriber;
146232
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
146233
//# sourceMappingURL=takeUntil.js.map
146234
 
146235
 
146236
/***/ }),
146237
 
146238
/***/ "./node_modules/rxjs/_esm5/internal/operators/takeWhile.js":
146239
/*!*****************************************************************!*\
146240
  !*** ./node_modules/rxjs/_esm5/internal/operators/takeWhile.js ***!
146241
  \*****************************************************************/
146242
/*! exports provided: takeWhile */
146243
/***/ (function(module, __webpack_exports__, __webpack_require__) {
146244
 
146245
"use strict";
146246
__webpack_require__.r(__webpack_exports__);
146247
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return takeWhile; });
146248
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
146249
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
146250
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
146251
 
146252
 
146253
/**
146254
 * Emits values emitted by the source Observable so long as each value satisfies
146255
 * the given `predicate`, and then completes as soon as this `predicate` is not
146256
 * satisfied.
146257
 *
146258
 * <span class="informal">Takes values from the source only while they pass the
146259
 * condition given. When the first value does not satisfy, it completes.</span>
146260
 *
146261
 * <img src="./img/takeWhile.png" width="100%">
146262
 *
146263
 * `takeWhile` subscribes and begins mirroring the source Observable. Each value
146264
 * emitted on the source is given to the `predicate` function which returns a
146265
 * boolean, representing a condition to be satisfied by the source values. The
146266
 * output Observable emits the source values until such time as the `predicate`
146267
 * returns false, at which point `takeWhile` stops mirroring the source
146268
 * Observable and completes the output Observable.
146269
 *
146270
 * @example <caption>Emit click events only while the clientX property is greater than 200</caption>
146271
 * var clicks = Rx.Observable.fromEvent(document, 'click');
146272
 * var result = clicks.takeWhile(ev => ev.clientX > 200);
146273
 * result.subscribe(x => console.log(x));
146274
 *
146275
 * @see {@link take}
146276
 * @see {@link takeLast}
146277
 * @see {@link takeUntil}
146278
 * @see {@link skip}
146279
 *
146280
 * @param {function(value: T, index: number): boolean} predicate A function that
146281
 * evaluates a value emitted by the source Observable and returns a boolean.
146282
 * Also takes the (zero-based) index as the second argument.
146283
 * @return {Observable<T>} An Observable that emits the values from the source
146284
 * Observable so long as each value satisfies the condition defined by the
146285
 * `predicate`, then completes.
146286
 * @method takeWhile
146287
 * @owner Observable
146288
 */
146289
function takeWhile(predicate) {
146290
    return function (source) { return source.lift(new TakeWhileOperator(predicate)); };
146291
}
146292
var TakeWhileOperator = /*@__PURE__*/ (function () {
146293
    function TakeWhileOperator(predicate) {
146294
        this.predicate = predicate;
146295
    }
146296
    TakeWhileOperator.prototype.call = function (subscriber, source) {
146297
        return source.subscribe(new TakeWhileSubscriber(subscriber, this.predicate));
146298
    };
146299
    return TakeWhileOperator;
146300
}());
146301
/**
146302
 * We need this JSDoc comment for affecting ESDoc.
146303
 * @ignore
146304
 * @extends {Ignored}
146305
 */
146306
var TakeWhileSubscriber = /*@__PURE__*/ (function (_super) {
146307
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeWhileSubscriber, _super);
146308
    function TakeWhileSubscriber(destination, predicate) {
146309
        var _this = _super.call(this, destination) || this;
146310
        _this.predicate = predicate;
146311
        _this.index = 0;
146312
        return _this;
146313
    }
146314
    TakeWhileSubscriber.prototype._next = function (value) {
146315
        var destination = this.destination;
146316
        var result;
146317
        try {
146318
            result = this.predicate(value, this.index++);
146319
        }
146320
        catch (err) {
146321
            destination.error(err);
146322
            return;
146323
        }
146324
        this.nextOrComplete(value, result);
146325
    };
146326
    TakeWhileSubscriber.prototype.nextOrComplete = function (value, predicateResult) {
146327
        var destination = this.destination;
146328
        if (Boolean(predicateResult)) {
146329
            destination.next(value);
146330
        }
146331
        else {
146332
            destination.complete();
146333
        }
146334
    };
146335
    return TakeWhileSubscriber;
146336
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
146337
//# sourceMappingURL=takeWhile.js.map
146338
 
146339
 
146340
/***/ }),
146341
 
146342
/***/ "./node_modules/rxjs/_esm5/internal/operators/tap.js":
146343
/*!***********************************************************!*\
146344
  !*** ./node_modules/rxjs/_esm5/internal/operators/tap.js ***!
146345
  \***********************************************************/
146346
/*! exports provided: tap */
146347
/***/ (function(module, __webpack_exports__, __webpack_require__) {
146348
 
146349
"use strict";
146350
__webpack_require__.r(__webpack_exports__);
146351
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return tap; });
146352
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
146353
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
146354
/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/noop */ "./node_modules/rxjs/_esm5/internal/util/noop.js");
146355
/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/isFunction */ "./node_modules/rxjs/_esm5/internal/util/isFunction.js");
146356
/** PURE_IMPORTS_START tslib,_Subscriber,_util_noop,_util_isFunction PURE_IMPORTS_END */
146357
 
146358
 
146359
 
146360
 
146361
/* tslint:enable:max-line-length */
146362
/**
146363
 * Perform a side effect for every emission on the source Observable, but return
146364
 * an Observable that is identical to the source.
146365
 *
146366
 * <span class="informal">Intercepts each emission on the source and runs a
146367
 * function, but returns an output which is identical to the source as long as errors don't occur.</span>
146368
 *
146369
 * <img src="./img/do.png" width="100%">
146370
 *
146371
 * Returns a mirrored Observable of the source Observable, but modified so that
146372
 * the provided Observer is called to perform a side effect for every value,
146373
 * error, and completion emitted by the source. Any errors that are thrown in
146374
 * the aforementioned Observer or handlers are safely sent down the error path
146375
 * of the output Observable.
146376
 *
146377
 * This operator is useful for debugging your Observables for the correct values
146378
 * or performing other side effects.
146379
 *
146380
 * Note: this is different to a `subscribe` on the Observable. If the Observable
146381
 * returned by `do` is not subscribed, the side effects specified by the
146382
 * Observer will never happen. `do` therefore simply spies on existing
146383
 * execution, it does not trigger an execution to happen like `subscribe` does.
146384
 *
146385
 * @example <caption>Map every click to the clientX position of that click, while also logging the click event</caption>
146386
 * var clicks = Rx.Observable.fromEvent(document, 'click');
146387
 * var positions = clicks
146388
 *   .do(ev => console.log(ev))
146389
 *   .map(ev => ev.clientX);
146390
 * positions.subscribe(x => console.log(x));
146391
 *
146392
 * @see {@link map}
146393
 * @see {@link subscribe}
146394
 *
146395
 * @param {Observer|function} [nextOrObserver] A normal Observer object or a
146396
 * callback for `next`.
146397
 * @param {function} [error] Callback for errors in the source.
146398
 * @param {function} [complete] Callback for the completion of the source.
146399
 * @return {Observable} An Observable identical to the source, but runs the
146400
 * specified Observer or callback(s) for each item.
146401
 * @name tap
146402
 */
146403
function tap(nextOrObserver, error, complete) {
146404
    return function tapOperatorFunction(source) {
146405
        return source.lift(new DoOperator(nextOrObserver, error, complete));
146406
    };
146407
}
146408
var DoOperator = /*@__PURE__*/ (function () {
146409
    function DoOperator(nextOrObserver, error, complete) {
146410
        this.nextOrObserver = nextOrObserver;
146411
        this.error = error;
146412
        this.complete = complete;
146413
    }
146414
    DoOperator.prototype.call = function (subscriber, source) {
146415
        return source.subscribe(new TapSubscriber(subscriber, this.nextOrObserver, this.error, this.complete));
146416
    };
146417
    return DoOperator;
146418
}());
146419
/**
146420
 * We need this JSDoc comment for affecting ESDoc.
146421
 * @ignore
146422
 * @extends {Ignored}
146423
 */
146424
var TapSubscriber = /*@__PURE__*/ (function (_super) {
146425
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TapSubscriber, _super);
146426
    function TapSubscriber(destination, observerOrNext, error, complete) {
146427
        var _this = _super.call(this, destination) || this;
146428
        _this._tapNext = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
146429
        _this._tapError = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
146430
        _this._tapComplete = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
146431
        _this._tapError = error || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
146432
        _this._tapComplete = complete || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
146433
        if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_3__["isFunction"])(observerOrNext)) {
146434
            _this._context = _this;
146435
            _this._tapNext = observerOrNext;
146436
        }
146437
        else if (observerOrNext) {
146438
            _this._context = observerOrNext;
146439
            _this._tapNext = observerOrNext.next || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
146440
            _this._tapError = observerOrNext.error || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
146441
            _this._tapComplete = observerOrNext.complete || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
146442
        }
146443
        return _this;
146444
    }
146445
    TapSubscriber.prototype._next = function (value) {
146446
        try {
146447
            this._tapNext.call(this._context, value);
146448
        }
146449
        catch (err) {
146450
            this.destination.error(err);
146451
            return;
146452
        }
146453
        this.destination.next(value);
146454
    };
146455
    TapSubscriber.prototype._error = function (err) {
146456
        try {
146457
            this._tapError.call(this._context, err);
146458
        }
146459
        catch (err) {
146460
            this.destination.error(err);
146461
            return;
146462
        }
146463
        this.destination.error(err);
146464
    };
146465
    TapSubscriber.prototype._complete = function () {
146466
        try {
146467
            this._tapComplete.call(this._context);
146468
        }
146469
        catch (err) {
146470
            this.destination.error(err);
146471
            return;
146472
        }
146473
        return this.destination.complete();
146474
    };
146475
    return TapSubscriber;
146476
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
146477
//# sourceMappingURL=tap.js.map
146478
 
146479
 
146480
/***/ }),
146481
 
146482
/***/ "./node_modules/rxjs/_esm5/internal/operators/throttle.js":
146483
/*!****************************************************************!*\
146484
  !*** ./node_modules/rxjs/_esm5/internal/operators/throttle.js ***!
146485
  \****************************************************************/
146486
/*! exports provided: defaultThrottleConfig, throttle */
146487
/***/ (function(module, __webpack_exports__, __webpack_require__) {
146488
 
146489
"use strict";
146490
__webpack_require__.r(__webpack_exports__);
146491
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultThrottleConfig", function() { return defaultThrottleConfig; });
146492
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return throttle; });
146493
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
146494
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
146495
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
146496
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
146497
 
146498
 
146499
 
146500
var defaultThrottleConfig = {
146501
    leading: true,
146502
    trailing: false
146503
};
146504
/**
146505
 * Emits a value from the source Observable, then ignores subsequent source
146506
 * values for a duration determined by another Observable, then repeats this
146507
 * process.
146508
 *
146509
 * <span class="informal">It's like {@link throttleTime}, but the silencing
146510
 * duration is determined by a second Observable.</span>
146511
 *
146512
 * <img src="./img/throttle.png" width="100%">
146513
 *
146514
 * `throttle` emits the source Observable values on the output Observable
146515
 * when its internal timer is disabled, and ignores source values when the timer
146516
 * is enabled. Initially, the timer is disabled. As soon as the first source
146517
 * value arrives, it is forwarded to the output Observable, and then the timer
146518
 * is enabled by calling the `durationSelector` function with the source value,
146519
 * which returns the "duration" Observable. When the duration Observable emits a
146520
 * value or completes, the timer is disabled, and this process repeats for the
146521
 * next source value.
146522
 *
146523
 * @example <caption>Emit clicks at a rate of at most one click per second</caption>
146524
 * var clicks = Rx.Observable.fromEvent(document, 'click');
146525
 * var result = clicks.throttle(ev => Rx.Observable.interval(1000));
146526
 * result.subscribe(x => console.log(x));
146527
 *
146528
 * @see {@link audit}
146529
 * @see {@link debounce}
146530
 * @see {@link delayWhen}
146531
 * @see {@link sample}
146532
 * @see {@link throttleTime}
146533
 *
146534
 * @param {function(value: T): SubscribableOrPromise} durationSelector A function
146535
 * that receives a value from the source Observable, for computing the silencing
146536
 * duration for each source value, returned as an Observable or a Promise.
146537
 * @param {Object} config a configuration object to define `leading` and `trailing` behavior. Defaults
146538
 * to `{ leading: true, trailing: false }`.
146539
 * @return {Observable<T>} An Observable that performs the throttle operation to
146540
 * limit the rate of emissions from the source.
146541
 * @method throttle
146542
 * @owner Observable
146543
 */
146544
function throttle(durationSelector, config) {
146545
    if (config === void 0) {
146546
        config = defaultThrottleConfig;
146547
    }
146548
    return function (source) { return source.lift(new ThrottleOperator(durationSelector, config.leading, config.trailing)); };
146549
}
146550
var ThrottleOperator = /*@__PURE__*/ (function () {
146551
    function ThrottleOperator(durationSelector, leading, trailing) {
146552
        this.durationSelector = durationSelector;
146553
        this.leading = leading;
146554
        this.trailing = trailing;
146555
    }
146556
    ThrottleOperator.prototype.call = function (subscriber, source) {
146557
        return source.subscribe(new ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing));
146558
    };
146559
    return ThrottleOperator;
146560
}());
146561
/**
146562
 * We need this JSDoc comment for affecting ESDoc
146563
 * @ignore
146564
 * @extends {Ignored}
146565
 */
146566
var ThrottleSubscriber = /*@__PURE__*/ (function (_super) {
146567
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ThrottleSubscriber, _super);
146568
    function ThrottleSubscriber(destination, durationSelector, _leading, _trailing) {
146569
        var _this = _super.call(this, destination) || this;
146570
        _this.destination = destination;
146571
        _this.durationSelector = durationSelector;
146572
        _this._leading = _leading;
146573
        _this._trailing = _trailing;
146574
        _this._hasValue = false;
146575
        return _this;
146576
    }
146577
    ThrottleSubscriber.prototype._next = function (value) {
146578
        this._hasValue = true;
146579
        this._sendValue = value;
146580
        if (!this._throttled) {
146581
            if (this._leading) {
146582
                this.send();
146583
            }
146584
            else {
146585
                this.throttle(value);
146586
            }
146587
        }
146588
    };
146589
    ThrottleSubscriber.prototype.send = function () {
146590
        var _a = this, _hasValue = _a._hasValue, _sendValue = _a._sendValue;
146591
        if (_hasValue) {
146592
            this.destination.next(_sendValue);
146593
            this.throttle(_sendValue);
146594
        }
146595
        this._hasValue = false;
146596
        this._sendValue = null;
146597
    };
146598
    ThrottleSubscriber.prototype.throttle = function (value) {
146599
        var duration = this.tryDurationSelector(value);
146600
        if (duration) {
146601
            this.add(this._throttled = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, duration));
146602
        }
146603
    };
146604
    ThrottleSubscriber.prototype.tryDurationSelector = function (value) {
146605
        try {
146606
            return this.durationSelector(value);
146607
        }
146608
        catch (err) {
146609
            this.destination.error(err);
146610
            return null;
146611
        }
146612
    };
146613
    ThrottleSubscriber.prototype.throttlingDone = function () {
146614
        var _a = this, _throttled = _a._throttled, _trailing = _a._trailing;
146615
        if (_throttled) {
146616
            _throttled.unsubscribe();
146617
        }
146618
        this._throttled = null;
146619
        if (_trailing) {
146620
            this.send();
146621
        }
146622
    };
146623
    ThrottleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
146624
        this.throttlingDone();
146625
    };
146626
    ThrottleSubscriber.prototype.notifyComplete = function () {
146627
        this.throttlingDone();
146628
    };
146629
    return ThrottleSubscriber;
146630
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
146631
//# sourceMappingURL=throttle.js.map
146632
 
146633
 
146634
/***/ }),
146635
 
146636
/***/ "./node_modules/rxjs/_esm5/internal/operators/throttleTime.js":
146637
/*!********************************************************************!*\
146638
  !*** ./node_modules/rxjs/_esm5/internal/operators/throttleTime.js ***!
146639
  \********************************************************************/
146640
/*! exports provided: throttleTime */
146641
/***/ (function(module, __webpack_exports__, __webpack_require__) {
146642
 
146643
"use strict";
146644
__webpack_require__.r(__webpack_exports__);
146645
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return throttleTime; });
146646
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
146647
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
146648
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../scheduler/async */ "./node_modules/rxjs/_esm5/internal/scheduler/async.js");
146649
/* harmony import */ var _throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./throttle */ "./node_modules/rxjs/_esm5/internal/operators/throttle.js");
146650
/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async,_throttle PURE_IMPORTS_END */
146651
 
146652
 
146653
 
146654
 
146655
/**
146656
 * Emits a value from the source Observable, then ignores subsequent source
146657
 * values for `duration` milliseconds, then repeats this process.
146658
 *
146659
 * <span class="informal">Lets a value pass, then ignores source values for the
146660
 * next `duration` milliseconds.</span>
146661
 *
146662
 * <img src="./img/throttleTime.png" width="100%">
146663
 *
146664
 * `throttleTime` emits the source Observable values on the output Observable
146665
 * when its internal timer is disabled, and ignores source values when the timer
146666
 * is enabled. Initially, the timer is disabled. As soon as the first source
146667
 * value arrives, it is forwarded to the output Observable, and then the timer
146668
 * is enabled. After `duration` milliseconds (or the time unit determined
146669
 * internally by the optional `scheduler`) has passed, the timer is disabled,
146670
 * and this process repeats for the next source value. Optionally takes a
146671
 * {@link IScheduler} for managing timers.
146672
 *
146673
 * @example <caption>Emit clicks at a rate of at most one click per second</caption>
146674
 * var clicks = Rx.Observable.fromEvent(document, 'click');
146675
 * var result = clicks.throttleTime(1000);
146676
 * result.subscribe(x => console.log(x));
146677
 *
146678
 * @see {@link auditTime}
146679
 * @see {@link debounceTime}
146680
 * @see {@link delay}
146681
 * @see {@link sampleTime}
146682
 * @see {@link throttle}
146683
 *
146684
 * @param {number} duration Time to wait before emitting another value after
146685
 * emitting the last value, measured in milliseconds or the time unit determined
146686
 * internally by the optional `scheduler`.
146687
 * @param {Scheduler} [scheduler=async] The {@link IScheduler} to use for
146688
 * managing the timers that handle the throttling.
146689
 * @param {Object} config a configuration object to define `leading` and
146690
 * `trailing` behavior. Defaults to `{ leading: true, trailing: false }`.
146691
 * @return {Observable<T>} An Observable that performs the throttle operation to
146692
 * limit the rate of emissions from the source.
146693
 * @method throttleTime
146694
 * @owner Observable
146695
 */
146696
function throttleTime(duration, scheduler, config) {
146697
    if (scheduler === void 0) {
146698
        scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
146699
    }
146700
    if (config === void 0) {
146701
        config = _throttle__WEBPACK_IMPORTED_MODULE_3__["defaultThrottleConfig"];
146702
    }
146703
    return function (source) { return source.lift(new ThrottleTimeOperator(duration, scheduler, config.leading, config.trailing)); };
146704
}
146705
var ThrottleTimeOperator = /*@__PURE__*/ (function () {
146706
    function ThrottleTimeOperator(duration, scheduler, leading, trailing) {
146707
        this.duration = duration;
146708
        this.scheduler = scheduler;
146709
        this.leading = leading;
146710
        this.trailing = trailing;
146711
    }
146712
    ThrottleTimeOperator.prototype.call = function (subscriber, source) {
146713
        return source.subscribe(new ThrottleTimeSubscriber(subscriber, this.duration, this.scheduler, this.leading, this.trailing));
146714
    };
146715
    return ThrottleTimeOperator;
146716
}());
146717
/**
146718
 * We need this JSDoc comment for affecting ESDoc.
146719
 * @ignore
146720
 * @extends {Ignored}
146721
 */
146722
var ThrottleTimeSubscriber = /*@__PURE__*/ (function (_super) {
146723
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ThrottleTimeSubscriber, _super);
146724
    function ThrottleTimeSubscriber(destination, duration, scheduler, leading, trailing) {
146725
        var _this = _super.call(this, destination) || this;
146726
        _this.duration = duration;
146727
        _this.scheduler = scheduler;
146728
        _this.leading = leading;
146729
        _this.trailing = trailing;
146730
        _this._hasTrailingValue = false;
146731
        _this._trailingValue = null;
146732
        return _this;
146733
    }
146734
    ThrottleTimeSubscriber.prototype._next = function (value) {
146735
        if (this.throttled) {
146736
            if (this.trailing) {
146737
                this._trailingValue = value;
146738
                this._hasTrailingValue = true;
146739
            }
146740
        }
146741
        else {
146742
            this.add(this.throttled = this.scheduler.schedule(dispatchNext, this.duration, { subscriber: this }));
146743
            if (this.leading) {
146744
                this.destination.next(value);
146745
            }
146746
        }
146747
    };
146748
    ThrottleTimeSubscriber.prototype._complete = function () {
146749
        if (this._hasTrailingValue) {
146750
            this.destination.next(this._trailingValue);
146751
            this.destination.complete();
146752
        }
146753
        else {
146754
            this.destination.complete();
146755
        }
146756
    };
146757
    ThrottleTimeSubscriber.prototype.clearThrottle = function () {
146758
        var throttled = this.throttled;
146759
        if (throttled) {
146760
            if (this.trailing && this._hasTrailingValue) {
146761
                this.destination.next(this._trailingValue);
146762
                this._trailingValue = null;
146763
                this._hasTrailingValue = false;
146764
            }
146765
            throttled.unsubscribe();
146766
            this.remove(throttled);
146767
            this.throttled = null;
146768
        }
146769
    };
146770
    return ThrottleTimeSubscriber;
146771
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
146772
function dispatchNext(arg) {
146773
    var subscriber = arg.subscriber;
146774
    subscriber.clearThrottle();
146775
}
146776
//# sourceMappingURL=throttleTime.js.map
146777
 
146778
 
146779
/***/ }),
146780
 
146781
/***/ "./node_modules/rxjs/_esm5/internal/operators/throwIfEmpty.js":
146782
/*!********************************************************************!*\
146783
  !*** ./node_modules/rxjs/_esm5/internal/operators/throwIfEmpty.js ***!
146784
  \********************************************************************/
146785
/*! exports provided: throwIfEmpty */
146786
/***/ (function(module, __webpack_exports__, __webpack_require__) {
146787
 
146788
"use strict";
146789
__webpack_require__.r(__webpack_exports__);
146790
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return throwIfEmpty; });
146791
/* harmony import */ var _tap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tap */ "./node_modules/rxjs/_esm5/internal/operators/tap.js");
146792
/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/EmptyError */ "./node_modules/rxjs/_esm5/internal/util/EmptyError.js");
146793
/** PURE_IMPORTS_START _tap,_util_EmptyError PURE_IMPORTS_END */
146794
 
146795
 
146796
/**
146797
 * If the source observable completes without emitting a value, it will emit
146798
 * an error. The error will be created at that time by the optional
146799
 * `errorFactory` argument, otherwise, the error will be {@link ErrorEmpty}.
146800
 *
146801
 * @example
146802
 *
146803
 * const click$ = fromEvent(button, 'click');
146804
 *
146805
 * clicks$.pipe(
146806
 *   takeUntil(timer(1000)),
146807
 *   throwIfEmpty(
146808
 *     () => new Error('the button was not clicked within 1 second')
146809
 *   ),
146810
 * )
146811
 * .subscribe({
146812
 *   next() { console.log('The button was clicked'); },
146813
 *   error(err) { console.error(err); },
146814
 * });
146815
 * @param {Function} [errorFactory] A factory function called to produce the
146816
 * error to be thrown when the source observable completes without emitting a
146817
 * value.
146818
 */
146819
var throwIfEmpty = function (errorFactory) {
146820
    if (errorFactory === void 0) {
146821
        errorFactory = defaultErrorFactory;
146822
    }
146823
    return Object(_tap__WEBPACK_IMPORTED_MODULE_0__["tap"])({
146824
        hasValue: false,
146825
        next: function () { this.hasValue = true; },
146826
        complete: function () {
146827
            if (!this.hasValue) {
146828
                throw errorFactory();
146829
            }
146830
        }
146831
    });
146832
};
146833
function defaultErrorFactory() {
146834
    return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__["EmptyError"]();
146835
}
146836
//# sourceMappingURL=throwIfEmpty.js.map
146837
 
146838
 
146839
/***/ }),
146840
 
146841
/***/ "./node_modules/rxjs/_esm5/internal/operators/timeInterval.js":
146842
/*!********************************************************************!*\
146843
  !*** ./node_modules/rxjs/_esm5/internal/operators/timeInterval.js ***!
146844
  \********************************************************************/
146845
/*! exports provided: timeInterval, TimeInterval */
146846
/***/ (function(module, __webpack_exports__, __webpack_require__) {
146847
 
146848
"use strict";
146849
__webpack_require__.r(__webpack_exports__);
146850
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return timeInterval; });
146851
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeInterval", function() { return TimeInterval; });
146852
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduler/async */ "./node_modules/rxjs/_esm5/internal/scheduler/async.js");
146853
/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./scan */ "./node_modules/rxjs/_esm5/internal/operators/scan.js");
146854
/* harmony import */ var _observable_defer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/defer */ "./node_modules/rxjs/_esm5/internal/observable/defer.js");
146855
/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./map */ "./node_modules/rxjs/_esm5/internal/operators/map.js");
146856
/** PURE_IMPORTS_START _scheduler_async,_scan,_observable_defer,_map PURE_IMPORTS_END */
146857
 
146858
 
146859
 
146860
 
146861
function timeInterval(scheduler) {
146862
    if (scheduler === void 0) {
146863
        scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
146864
    }
146865
    return function (source) {
146866
        return Object(_observable_defer__WEBPACK_IMPORTED_MODULE_2__["defer"])(function () {
146867
            return source.pipe(
146868
            // HACK: the typings seem off with scan
146869
            Object(_scan__WEBPACK_IMPORTED_MODULE_1__["scan"])(function (_a, value) {
146870
                var current = _a.current;
146871
                return ({ value: value, current: scheduler.now(), last: current });
146872
            }, { current: scheduler.now(), value: undefined, last: undefined }), Object(_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (_a) {
146873
                var current = _a.current, last = _a.last, value = _a.value;
146874
                return new TimeInterval(value, current - last);
146875
            }));
146876
        });
146877
    };
146878
}
146879
var TimeInterval = /*@__PURE__*/ (function () {
146880
    function TimeInterval(value, interval) {
146881
        this.value = value;
146882
        this.interval = interval;
146883
    }
146884
    return TimeInterval;
146885
}());
146886
 
146887
//# sourceMappingURL=timeInterval.js.map
146888
 
146889
 
146890
/***/ }),
146891
 
146892
/***/ "./node_modules/rxjs/_esm5/internal/operators/timeout.js":
146893
/*!***************************************************************!*\
146894
  !*** ./node_modules/rxjs/_esm5/internal/operators/timeout.js ***!
146895
  \***************************************************************/
146896
/*! exports provided: timeout */
146897
/***/ (function(module, __webpack_exports__, __webpack_require__) {
146898
 
146899
"use strict";
146900
__webpack_require__.r(__webpack_exports__);
146901
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return timeout; });
146902
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduler/async */ "./node_modules/rxjs/_esm5/internal/scheduler/async.js");
146903
/* harmony import */ var _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/TimeoutError */ "./node_modules/rxjs/_esm5/internal/util/TimeoutError.js");
146904
/* harmony import */ var _timeoutWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./timeoutWith */ "./node_modules/rxjs/_esm5/internal/operators/timeoutWith.js");
146905
/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../observable/throwError */ "./node_modules/rxjs/_esm5/internal/observable/throwError.js");
146906
/** PURE_IMPORTS_START _scheduler_async,_util_TimeoutError,_timeoutWith,_observable_throwError PURE_IMPORTS_END */
146907
 
146908
 
146909
 
146910
 
146911
/**
146912
 *
146913
 * Errors if Observable does not emit a value in given time span.
146914
 *
146915
 * <span class="informal">Timeouts on Observable that doesn't emit values fast enough.</span>
146916
 *
146917
 * <img src="./img/timeout.png" width="100%">
146918
 *
146919
 * `timeout` operator accepts as an argument either a number or a Date.
146920
 *
146921
 * If number was provided, it returns an Observable that behaves like a source
146922
 * Observable, unless there is a period of time where there is no value emitted.
146923
 * So if you provide `100` as argument and first value comes after 50ms from
146924
 * the moment of subscription, this value will be simply re-emitted by the resulting
146925
 * Observable. If however after that 100ms passes without a second value being emitted,
146926
 * stream will end with an error and source Observable will be unsubscribed.
146927
 * These checks are performed throughout whole lifecycle of Observable - from the moment
146928
 * it was subscribed to, until it completes or errors itself. Thus every value must be
146929
 * emitted within specified period since previous value.
146930
 *
146931
 * If provided argument was Date, returned Observable behaves differently. It throws
146932
 * if Observable did not complete before provided Date. This means that periods between
146933
 * emission of particular values do not matter in this case. If Observable did not complete
146934
 * before provided Date, source Observable will be unsubscribed. Other than that, resulting
146935
 * stream behaves just as source Observable.
146936
 *
146937
 * `timeout` accepts also a Scheduler as a second parameter. It is used to schedule moment (or moments)
146938
 * when returned Observable will check if source stream emitted value or completed.
146939
 *
146940
 * @example <caption>Check if ticks are emitted within certain timespan</caption>
146941
 * const seconds = Rx.Observable.interval(1000);
146942
 *
146943
 * seconds.timeout(1100) // Let's use bigger timespan to be safe,
146944
 *                       // since `interval` might fire a bit later then scheduled.
146945
 * .subscribe(
146946
 *     value => console.log(value), // Will emit numbers just as regular `interval` would.
146947
 *     err => console.log(err) // Will never be called.
146948
 * );
146949
 *
146950
 * seconds.timeout(900).subscribe(
146951
 *     value => console.log(value), // Will never be called.
146952
 *     err => console.log(err) // Will emit error before even first value is emitted,
146953
 *                             // since it did not arrive within 900ms period.
146954
 * );
146955
 *
146956
 * @example <caption>Use Date to check if Observable completed</caption>
146957
 * const seconds = Rx.Observable.interval(1000);
146958
 *
146959
 * seconds.timeout(new Date("December 17, 2020 03:24:00"))
146960
 * .subscribe(
146961
 *     value => console.log(value), // Will emit values as regular `interval` would
146962
 *                                  // until December 17, 2020 at 03:24:00.
146963
 *     err => console.log(err) // On December 17, 2020 at 03:24:00 it will emit an error,
146964
 *                             // since Observable did not complete by then.
146965
 * );
146966
 *
146967
 * @see {@link timeoutWith}
146968
 *
146969
 * @param {number|Date} due Number specifying period within which Observable must emit values
146970
 *                          or Date specifying before when Observable should complete
146971
 * @param {Scheduler} [scheduler] Scheduler controlling when timeout checks occur.
146972
 * @return {Observable<T>} Observable that mirrors behaviour of source, unless timeout checks fail.
146973
 * @method timeout
146974
 * @owner Observable
146975
 */
146976
function timeout(due, scheduler) {
146977
    if (scheduler === void 0) {
146978
        scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
146979
    }
146980
    return Object(_timeoutWith__WEBPACK_IMPORTED_MODULE_2__["timeoutWith"])(due, Object(_observable_throwError__WEBPACK_IMPORTED_MODULE_3__["throwError"])(new _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__["TimeoutError"]()), scheduler);
146981
}
146982
//# sourceMappingURL=timeout.js.map
146983
 
146984
 
146985
/***/ }),
146986
 
146987
/***/ "./node_modules/rxjs/_esm5/internal/operators/timeoutWith.js":
146988
/*!*******************************************************************!*\
146989
  !*** ./node_modules/rxjs/_esm5/internal/operators/timeoutWith.js ***!
146990
  \*******************************************************************/
146991
/*! exports provided: timeoutWith */
146992
/***/ (function(module, __webpack_exports__, __webpack_require__) {
146993
 
146994
"use strict";
146995
__webpack_require__.r(__webpack_exports__);
146996
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return timeoutWith; });
146997
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
146998
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/async */ "./node_modules/rxjs/_esm5/internal/scheduler/async.js");
146999
/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isDate */ "./node_modules/rxjs/_esm5/internal/util/isDate.js");
147000
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
147001
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
147002
/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
147003
 
147004
 
147005
 
147006
 
147007
 
147008
/* tslint:enable:max-line-length */
147009
/**
147010
 *
147011
 * Errors if Observable does not emit a value in given time span, in case of which
147012
 * subscribes to the second Observable.
147013
 *
147014
 * <span class="informal">It's a version of `timeout` operator that let's you specify fallback Observable.</span>
147015
 *
147016
 * <img src="./img/timeoutWith.png" width="100%">
147017
 *
147018
 * `timeoutWith` is a variation of `timeout` operator. It behaves exactly the same,
147019
 * still accepting as a first argument either a number or a Date, which control - respectively -
147020
 * when values of source Observable should be emitted or when it should complete.
147021
 *
147022
 * The only difference is that it accepts a second, required parameter. This parameter
147023
 * should be an Observable which will be subscribed when source Observable fails any timeout check.
147024
 * So whenever regular `timeout` would emit an error, `timeoutWith` will instead start re-emitting
147025
 * values from second Observable. Note that this fallback Observable is not checked for timeouts
147026
 * itself, so it can emit values and complete at arbitrary points in time. From the moment of a second
147027
 * subscription, Observable returned from `timeoutWith` simply mirrors fallback stream. When that
147028
 * stream completes, it completes as well.
147029
 *
147030
 * Scheduler, which in case of `timeout` is provided as as second argument, can be still provided
147031
 * here - as a third, optional parameter. It still is used to schedule timeout checks and -
147032
 * as a consequence - when second Observable will be subscribed, since subscription happens
147033
 * immediately after failing check.
147034
 *
147035
 * @example <caption>Add fallback observable</caption>
147036
 * const seconds = Rx.Observable.interval(1000);
147037
 * const minutes = Rx.Observable.interval(60 * 1000);
147038
 *
147039
 * seconds.timeoutWith(900, minutes)
147040
 *     .subscribe(
147041
 *         value => console.log(value), // After 900ms, will start emitting `minutes`,
147042
 *                                      // since first value of `seconds` will not arrive fast enough.
147043
 *         err => console.log(err) // Would be called after 900ms in case of `timeout`,
147044
 *                                 // but here will never be called.
147045
 *     );
147046
 *
147047
 * @param {number|Date} due Number specifying period within which Observable must emit values
147048
 *                          or Date specifying before when Observable should complete
147049
 * @param {Observable<T>} withObservable Observable which will be subscribed if source fails timeout check.
147050
 * @param {Scheduler} [scheduler] Scheduler controlling when timeout checks occur.
147051
 * @return {Observable<T>} Observable that mirrors behaviour of source or, when timeout check fails, of an Observable
147052
 *                          passed as a second parameter.
147053
 * @method timeoutWith
147054
 * @owner Observable
147055
 */
147056
function timeoutWith(due, withObservable, scheduler) {
147057
    if (scheduler === void 0) {
147058
        scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
147059
    }
147060
    return function (source) {
147061
        var absoluteTimeout = Object(_util_isDate__WEBPACK_IMPORTED_MODULE_2__["isDate"])(due);
147062
        var waitFor = absoluteTimeout ? (+due - scheduler.now()) : Math.abs(due);
147063
        return source.lift(new TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler));
147064
    };
147065
}
147066
var TimeoutWithOperator = /*@__PURE__*/ (function () {
147067
    function TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler) {
147068
        this.waitFor = waitFor;
147069
        this.absoluteTimeout = absoluteTimeout;
147070
        this.withObservable = withObservable;
147071
        this.scheduler = scheduler;
147072
    }
147073
    TimeoutWithOperator.prototype.call = function (subscriber, source) {
147074
        return source.subscribe(new TimeoutWithSubscriber(subscriber, this.absoluteTimeout, this.waitFor, this.withObservable, this.scheduler));
147075
    };
147076
    return TimeoutWithOperator;
147077
}());
147078
/**
147079
 * We need this JSDoc comment for affecting ESDoc.
147080
 * @ignore
147081
 * @extends {Ignored}
147082
 */
147083
var TimeoutWithSubscriber = /*@__PURE__*/ (function (_super) {
147084
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TimeoutWithSubscriber, _super);
147085
    function TimeoutWithSubscriber(destination, absoluteTimeout, waitFor, withObservable, scheduler) {
147086
        var _this = _super.call(this, destination) || this;
147087
        _this.absoluteTimeout = absoluteTimeout;
147088
        _this.waitFor = waitFor;
147089
        _this.withObservable = withObservable;
147090
        _this.scheduler = scheduler;
147091
        _this.action = null;
147092
        _this.scheduleTimeout();
147093
        return _this;
147094
    }
147095
    TimeoutWithSubscriber.dispatchTimeout = function (subscriber) {
147096
        var withObservable = subscriber.withObservable;
147097
        subscriber._unsubscribeAndRecycle();
147098
        subscriber.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(subscriber, withObservable));
147099
    };
147100
    TimeoutWithSubscriber.prototype.scheduleTimeout = function () {
147101
        var action = this.action;
147102
        if (action) {
147103
            // Recycle the action if we've already scheduled one. All the production
147104
            // Scheduler Actions mutate their state/delay time and return themeselves.
147105
            // VirtualActions are immutable, so they create and return a clone. In this
147106
            // case, we need to set the action reference to the most recent VirtualAction,
147107
            // to ensure that's the one we clone from next time.
147108
            this.action = action.schedule(this, this.waitFor);
147109
        }
147110
        else {
147111
            this.add(this.action = this.scheduler.schedule(TimeoutWithSubscriber.dispatchTimeout, this.waitFor, this));
147112
        }
147113
    };
147114
    TimeoutWithSubscriber.prototype._next = function (value) {
147115
        if (!this.absoluteTimeout) {
147116
            this.scheduleTimeout();
147117
        }
147118
        _super.prototype._next.call(this, value);
147119
    };
147120
    /** @deprecated This is an internal implementation detail, do not use. */
147121
    TimeoutWithSubscriber.prototype._unsubscribe = function () {
147122
        this.action = null;
147123
        this.scheduler = null;
147124
        this.withObservable = null;
147125
    };
147126
    return TimeoutWithSubscriber;
147127
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
147128
//# sourceMappingURL=timeoutWith.js.map
147129
 
147130
 
147131
/***/ }),
147132
 
147133
/***/ "./node_modules/rxjs/_esm5/internal/operators/timestamp.js":
147134
/*!*****************************************************************!*\
147135
  !*** ./node_modules/rxjs/_esm5/internal/operators/timestamp.js ***!
147136
  \*****************************************************************/
147137
/*! exports provided: timestamp, Timestamp */
147138
/***/ (function(module, __webpack_exports__, __webpack_require__) {
147139
 
147140
"use strict";
147141
__webpack_require__.r(__webpack_exports__);
147142
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return timestamp; });
147143
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Timestamp", function() { return Timestamp; });
147144
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduler/async */ "./node_modules/rxjs/_esm5/internal/scheduler/async.js");
147145
/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./map */ "./node_modules/rxjs/_esm5/internal/operators/map.js");
147146
/** PURE_IMPORTS_START _scheduler_async,_map PURE_IMPORTS_END */
147147
 
147148
 
147149
/**
147150
 * @param scheduler
147151
 * @return {Observable<Timestamp<any>>|WebSocketSubject<T>|Observable<T>}
147152
 * @method timestamp
147153
 * @owner Observable
147154
 */
147155
function timestamp(scheduler) {
147156
    if (scheduler === void 0) {
147157
        scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
147158
    }
147159
    return Object(_map__WEBPACK_IMPORTED_MODULE_1__["map"])(function (value) { return new Timestamp(value, scheduler.now()); });
147160
    // return (source: Observable<T>) => source.lift(new TimestampOperator(scheduler));
147161
}
147162
var Timestamp = /*@__PURE__*/ (function () {
147163
    function Timestamp(value, timestamp) {
147164
        this.value = value;
147165
        this.timestamp = timestamp;
147166
    }
147167
    return Timestamp;
147168
}());
147169
 
147170
//# sourceMappingURL=timestamp.js.map
147171
 
147172
 
147173
/***/ }),
147174
 
147175
/***/ "./node_modules/rxjs/_esm5/internal/operators/toArray.js":
147176
/*!***************************************************************!*\
147177
  !*** ./node_modules/rxjs/_esm5/internal/operators/toArray.js ***!
147178
  \***************************************************************/
147179
/*! exports provided: toArray */
147180
/***/ (function(module, __webpack_exports__, __webpack_require__) {
147181
 
147182
"use strict";
147183
__webpack_require__.r(__webpack_exports__);
147184
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return toArray; });
147185
/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./reduce */ "./node_modules/rxjs/_esm5/internal/operators/reduce.js");
147186
/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
147187
 
147188
function toArrayReducer(arr, item, index) {
147189
    if (index === 0) {
147190
        return [item];
147191
    }
147192
    arr.push(item);
147193
    return arr;
147194
}
147195
function toArray() {
147196
    return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(toArrayReducer, []);
147197
}
147198
//# sourceMappingURL=toArray.js.map
147199
 
147200
 
147201
/***/ }),
147202
 
147203
/***/ "./node_modules/rxjs/_esm5/internal/operators/window.js":
147204
/*!**************************************************************!*\
147205
  !*** ./node_modules/rxjs/_esm5/internal/operators/window.js ***!
147206
  \**************************************************************/
147207
/*! exports provided: window */
147208
/***/ (function(module, __webpack_exports__, __webpack_require__) {
147209
 
147210
"use strict";
147211
__webpack_require__.r(__webpack_exports__);
147212
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "window", function() { return window; });
147213
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
147214
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
147215
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
147216
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
147217
/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
147218
 
147219
 
147220
 
147221
 
147222
/**
147223
 * Branch out the source Observable values as a nested Observable whenever
147224
 * `windowBoundaries` emits.
147225
 *
147226
 * <span class="informal">It's like {@link buffer}, but emits a nested Observable
147227
 * instead of an array.</span>
147228
 *
147229
 * <img src="./img/window.png" width="100%">
147230
 *
147231
 * Returns an Observable that emits windows of items it collects from the source
147232
 * Observable. The output Observable emits connected, non-overlapping
147233
 * windows. It emits the current window and opens a new one whenever the
147234
 * Observable `windowBoundaries` emits an item. Because each window is an
147235
 * Observable, the output is a higher-order Observable.
147236
 *
147237
 * @example <caption>In every window of 1 second each, emit at most 2 click events</caption>
147238
 * var clicks = Rx.Observable.fromEvent(document, 'click');
147239
 * var interval = Rx.Observable.interval(1000);
147240
 * var result = clicks.window(interval)
147241
 *   .map(win => win.take(2)) // each window has at most 2 emissions
147242
 *   .mergeAll(); // flatten the Observable-of-Observables
147243
 * result.subscribe(x => console.log(x));
147244
 *
147245
 * @see {@link windowCount}
147246
 * @see {@link windowTime}
147247
 * @see {@link windowToggle}
147248
 * @see {@link windowWhen}
147249
 * @see {@link buffer}
147250
 *
147251
 * @param {Observable<any>} windowBoundaries An Observable that completes the
147252
 * previous window and starts a new window.
147253
 * @return {Observable<Observable<T>>} An Observable of windows, which are
147254
 * Observables emitting values of the source Observable.
147255
 * @method window
147256
 * @owner Observable
147257
 */
147258
function window(windowBoundaries) {
147259
    return function windowOperatorFunction(source) {
147260
        return source.lift(new WindowOperator(windowBoundaries));
147261
    };
147262
}
147263
var WindowOperator = /*@__PURE__*/ (function () {
147264
    function WindowOperator(windowBoundaries) {
147265
        this.windowBoundaries = windowBoundaries;
147266
    }
147267
    WindowOperator.prototype.call = function (subscriber, source) {
147268
        var windowSubscriber = new WindowSubscriber(subscriber);
147269
        var sourceSubscription = source.subscribe(windowSubscriber);
147270
        if (!sourceSubscription.closed) {
147271
            windowSubscriber.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(windowSubscriber, this.windowBoundaries));
147272
        }
147273
        return sourceSubscription;
147274
    };
147275
    return WindowOperator;
147276
}());
147277
/**
147278
 * We need this JSDoc comment for affecting ESDoc.
147279
 * @ignore
147280
 * @extends {Ignored}
147281
 */
147282
var WindowSubscriber = /*@__PURE__*/ (function (_super) {
147283
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowSubscriber, _super);
147284
    function WindowSubscriber(destination) {
147285
        var _this = _super.call(this, destination) || this;
147286
        _this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
147287
        destination.next(_this.window);
147288
        return _this;
147289
    }
147290
    WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
147291
        this.openWindow();
147292
    };
147293
    WindowSubscriber.prototype.notifyError = function (error, innerSub) {
147294
        this._error(error);
147295
    };
147296
    WindowSubscriber.prototype.notifyComplete = function (innerSub) {
147297
        this._complete();
147298
    };
147299
    WindowSubscriber.prototype._next = function (value) {
147300
        this.window.next(value);
147301
    };
147302
    WindowSubscriber.prototype._error = function (err) {
147303
        this.window.error(err);
147304
        this.destination.error(err);
147305
    };
147306
    WindowSubscriber.prototype._complete = function () {
147307
        this.window.complete();
147308
        this.destination.complete();
147309
    };
147310
    /** @deprecated This is an internal implementation detail, do not use. */
147311
    WindowSubscriber.prototype._unsubscribe = function () {
147312
        this.window = null;
147313
    };
147314
    WindowSubscriber.prototype.openWindow = function () {
147315
        var prevWindow = this.window;
147316
        if (prevWindow) {
147317
            prevWindow.complete();
147318
        }
147319
        var destination = this.destination;
147320
        var newWindow = this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
147321
        destination.next(newWindow);
147322
    };
147323
    return WindowSubscriber;
147324
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
147325
//# sourceMappingURL=window.js.map
147326
 
147327
 
147328
/***/ }),
147329
 
147330
/***/ "./node_modules/rxjs/_esm5/internal/operators/windowCount.js":
147331
/*!*******************************************************************!*\
147332
  !*** ./node_modules/rxjs/_esm5/internal/operators/windowCount.js ***!
147333
  \*******************************************************************/
147334
/*! exports provided: windowCount */
147335
/***/ (function(module, __webpack_exports__, __webpack_require__) {
147336
 
147337
"use strict";
147338
__webpack_require__.r(__webpack_exports__);
147339
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return windowCount; });
147340
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
147341
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
147342
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
147343
/** PURE_IMPORTS_START tslib,_Subscriber,_Subject PURE_IMPORTS_END */
147344
 
147345
 
147346
 
147347
/**
147348
 * Branch out the source Observable values as a nested Observable with each
147349
 * nested Observable emitting at most `windowSize` values.
147350
 *
147351
 * <span class="informal">It's like {@link bufferCount}, but emits a nested
147352
 * Observable instead of an array.</span>
147353
 *
147354
 * <img src="./img/windowCount.png" width="100%">
147355
 *
147356
 * Returns an Observable that emits windows of items it collects from the source
147357
 * Observable. The output Observable emits windows every `startWindowEvery`
147358
 * items, each containing no more than `windowSize` items. When the source
147359
 * Observable completes or encounters an error, the output Observable emits
147360
 * the current window and propagates the notification from the source
147361
 * Observable. If `startWindowEvery` is not provided, then new windows are
147362
 * started immediately at the start of the source and when each window completes
147363
 * with size `windowSize`.
147364
 *
147365
 * @example <caption>Ignore every 3rd click event, starting from the first one</caption>
147366
 * var clicks = Rx.Observable.fromEvent(document, 'click');
147367
 * var result = clicks.windowCount(3)
147368
 *   .map(win => win.skip(1)) // skip first of every 3 clicks
147369
 *   .mergeAll(); // flatten the Observable-of-Observables
147370
 * result.subscribe(x => console.log(x));
147371
 *
147372
 * @example <caption>Ignore every 3rd click event, starting from the third one</caption>
147373
 * var clicks = Rx.Observable.fromEvent(document, 'click');
147374
 * var result = clicks.windowCount(2, 3)
147375
 *   .mergeAll(); // flatten the Observable-of-Observables
147376
 * result.subscribe(x => console.log(x));
147377
 *
147378
 * @see {@link window}
147379
 * @see {@link windowTime}
147380
 * @see {@link windowToggle}
147381
 * @see {@link windowWhen}
147382
 * @see {@link bufferCount}
147383
 *
147384
 * @param {number} windowSize The maximum number of values emitted by each
147385
 * window.
147386
 * @param {number} [startWindowEvery] Interval at which to start a new window.
147387
 * For example if `startWindowEvery` is `2`, then a new window will be started
147388
 * on every other value from the source. A new window is started at the
147389
 * beginning of the source by default.
147390
 * @return {Observable<Observable<T>>} An Observable of windows, which in turn
147391
 * are Observable of values.
147392
 * @method windowCount
147393
 * @owner Observable
147394
 */
147395
function windowCount(windowSize, startWindowEvery) {
147396
    if (startWindowEvery === void 0) {
147397
        startWindowEvery = 0;
147398
    }
147399
    return function windowCountOperatorFunction(source) {
147400
        return source.lift(new WindowCountOperator(windowSize, startWindowEvery));
147401
    };
147402
}
147403
var WindowCountOperator = /*@__PURE__*/ (function () {
147404
    function WindowCountOperator(windowSize, startWindowEvery) {
147405
        this.windowSize = windowSize;
147406
        this.startWindowEvery = startWindowEvery;
147407
    }
147408
    WindowCountOperator.prototype.call = function (subscriber, source) {
147409
        return source.subscribe(new WindowCountSubscriber(subscriber, this.windowSize, this.startWindowEvery));
147410
    };
147411
    return WindowCountOperator;
147412
}());
147413
/**
147414
 * We need this JSDoc comment for affecting ESDoc.
147415
 * @ignore
147416
 * @extends {Ignored}
147417
 */
147418
var WindowCountSubscriber = /*@__PURE__*/ (function (_super) {
147419
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowCountSubscriber, _super);
147420
    function WindowCountSubscriber(destination, windowSize, startWindowEvery) {
147421
        var _this = _super.call(this, destination) || this;
147422
        _this.destination = destination;
147423
        _this.windowSize = windowSize;
147424
        _this.startWindowEvery = startWindowEvery;
147425
        _this.windows = [new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]()];
147426
        _this.count = 0;
147427
        destination.next(_this.windows[0]);
147428
        return _this;
147429
    }
147430
    WindowCountSubscriber.prototype._next = function (value) {
147431
        var startWindowEvery = (this.startWindowEvery > 0) ? this.startWindowEvery : this.windowSize;
147432
        var destination = this.destination;
147433
        var windowSize = this.windowSize;
147434
        var windows = this.windows;
147435
        var len = windows.length;
147436
        for (var i = 0; i < len && !this.closed; i++) {
147437
            windows[i].next(value);
147438
        }
147439
        var c = this.count - windowSize + 1;
147440
        if (c >= 0 && c % startWindowEvery === 0 && !this.closed) {
147441
            windows.shift().complete();
147442
        }
147443
        if (++this.count % startWindowEvery === 0 && !this.closed) {
147444
            var window_1 = new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
147445
            windows.push(window_1);
147446
            destination.next(window_1);
147447
        }
147448
    };
147449
    WindowCountSubscriber.prototype._error = function (err) {
147450
        var windows = this.windows;
147451
        if (windows) {
147452
            while (windows.length > 0 && !this.closed) {
147453
                windows.shift().error(err);
147454
            }
147455
        }
147456
        this.destination.error(err);
147457
    };
147458
    WindowCountSubscriber.prototype._complete = function () {
147459
        var windows = this.windows;
147460
        if (windows) {
147461
            while (windows.length > 0 && !this.closed) {
147462
                windows.shift().complete();
147463
            }
147464
        }
147465
        this.destination.complete();
147466
    };
147467
    WindowCountSubscriber.prototype._unsubscribe = function () {
147468
        this.count = 0;
147469
        this.windows = null;
147470
    };
147471
    return WindowCountSubscriber;
147472
}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
147473
//# sourceMappingURL=windowCount.js.map
147474
 
147475
 
147476
/***/ }),
147477
 
147478
/***/ "./node_modules/rxjs/_esm5/internal/operators/windowTime.js":
147479
/*!******************************************************************!*\
147480
  !*** ./node_modules/rxjs/_esm5/internal/operators/windowTime.js ***!
147481
  \******************************************************************/
147482
/*! exports provided: windowTime */
147483
/***/ (function(module, __webpack_exports__, __webpack_require__) {
147484
 
147485
"use strict";
147486
__webpack_require__.r(__webpack_exports__);
147487
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return windowTime; });
147488
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
147489
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
147490
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../scheduler/async */ "./node_modules/rxjs/_esm5/internal/scheduler/async.js");
147491
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
147492
/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/isNumeric */ "./node_modules/rxjs/_esm5/internal/util/isNumeric.js");
147493
/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/isScheduler */ "./node_modules/rxjs/_esm5/internal/util/isScheduler.js");
147494
/** PURE_IMPORTS_START tslib,_Subject,_scheduler_async,_Subscriber,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
147495
 
147496
 
147497
 
147498
 
147499
 
147500
 
147501
function windowTime(windowTimeSpan) {
147502
    var scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
147503
    var windowCreationInterval = null;
147504
    var maxWindowSize = Number.POSITIVE_INFINITY;
147505
    if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[3])) {
147506
        scheduler = arguments[3];
147507
    }
147508
    if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[2])) {
147509
        scheduler = arguments[2];
147510
    }
147511
    else if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_4__["isNumeric"])(arguments[2])) {
147512
        maxWindowSize = arguments[2];
147513
    }
147514
    if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[1])) {
147515
        scheduler = arguments[1];
147516
    }
147517
    else if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_4__["isNumeric"])(arguments[1])) {
147518
        windowCreationInterval = arguments[1];
147519
    }
147520
    return function windowTimeOperatorFunction(source) {
147521
        return source.lift(new WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler));
147522
    };
147523
}
147524
var WindowTimeOperator = /*@__PURE__*/ (function () {
147525
    function WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {
147526
        this.windowTimeSpan = windowTimeSpan;
147527
        this.windowCreationInterval = windowCreationInterval;
147528
        this.maxWindowSize = maxWindowSize;
147529
        this.scheduler = scheduler;
147530
    }
147531
    WindowTimeOperator.prototype.call = function (subscriber, source) {
147532
        return source.subscribe(new WindowTimeSubscriber(subscriber, this.windowTimeSpan, this.windowCreationInterval, this.maxWindowSize, this.scheduler));
147533
    };
147534
    return WindowTimeOperator;
147535
}());
147536
var CountedSubject = /*@__PURE__*/ (function (_super) {
147537
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CountedSubject, _super);
147538
    function CountedSubject() {
147539
        var _this = _super !== null && _super.apply(this, arguments) || this;
147540
        _this._numberOfNextedValues = 0;
147541
        return _this;
147542
    }
147543
    CountedSubject.prototype.next = function (value) {
147544
        this._numberOfNextedValues++;
147545
        _super.prototype.next.call(this, value);
147546
    };
147547
    Object.defineProperty(CountedSubject.prototype, "numberOfNextedValues", {
147548
        get: function () {
147549
            return this._numberOfNextedValues;
147550
        },
147551
        enumerable: true,
147552
        configurable: true
147553
    });
147554
    return CountedSubject;
147555
}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
147556
/**
147557
 * We need this JSDoc comment for affecting ESDoc.
147558
 * @ignore
147559
 * @extends {Ignored}
147560
 */
147561
var WindowTimeSubscriber = /*@__PURE__*/ (function (_super) {
147562
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowTimeSubscriber, _super);
147563
    function WindowTimeSubscriber(destination, windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {
147564
        var _this = _super.call(this, destination) || this;
147565
        _this.destination = destination;
147566
        _this.windowTimeSpan = windowTimeSpan;
147567
        _this.windowCreationInterval = windowCreationInterval;
147568
        _this.maxWindowSize = maxWindowSize;
147569
        _this.scheduler = scheduler;
147570
        _this.windows = [];
147571
        var window = _this.openWindow();
147572
        if (windowCreationInterval !== null && windowCreationInterval >= 0) {
147573
            var closeState = { subscriber: _this, window: window, context: null };
147574
            var creationState = { windowTimeSpan: windowTimeSpan, windowCreationInterval: windowCreationInterval, subscriber: _this, scheduler: scheduler };
147575
            _this.add(scheduler.schedule(dispatchWindowClose, windowTimeSpan, closeState));
147576
            _this.add(scheduler.schedule(dispatchWindowCreation, windowCreationInterval, creationState));
147577
        }
147578
        else {
147579
            var timeSpanOnlyState = { subscriber: _this, window: window, windowTimeSpan: windowTimeSpan };
147580
            _this.add(scheduler.schedule(dispatchWindowTimeSpanOnly, windowTimeSpan, timeSpanOnlyState));
147581
        }
147582
        return _this;
147583
    }
147584
    WindowTimeSubscriber.prototype._next = function (value) {
147585
        var windows = this.windows;
147586
        var len = windows.length;
147587
        for (var i = 0; i < len; i++) {
147588
            var window_1 = windows[i];
147589
            if (!window_1.closed) {
147590
                window_1.next(value);
147591
                if (window_1.numberOfNextedValues >= this.maxWindowSize) {
147592
                    this.closeWindow(window_1);
147593
                }
147594
            }
147595
        }
147596
    };
147597
    WindowTimeSubscriber.prototype._error = function (err) {
147598
        var windows = this.windows;
147599
        while (windows.length > 0) {
147600
            windows.shift().error(err);
147601
        }
147602
        this.destination.error(err);
147603
    };
147604
    WindowTimeSubscriber.prototype._complete = function () {
147605
        var windows = this.windows;
147606
        while (windows.length > 0) {
147607
            var window_2 = windows.shift();
147608
            if (!window_2.closed) {
147609
                window_2.complete();
147610
            }
147611
        }
147612
        this.destination.complete();
147613
    };
147614
    WindowTimeSubscriber.prototype.openWindow = function () {
147615
        var window = new CountedSubject();
147616
        this.windows.push(window);
147617
        var destination = this.destination;
147618
        destination.next(window);
147619
        return window;
147620
    };
147621
    WindowTimeSubscriber.prototype.closeWindow = function (window) {
147622
        window.complete();
147623
        var windows = this.windows;
147624
        windows.splice(windows.indexOf(window), 1);
147625
    };
147626
    return WindowTimeSubscriber;
147627
}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
147628
function dispatchWindowTimeSpanOnly(state) {
147629
    var subscriber = state.subscriber, windowTimeSpan = state.windowTimeSpan, window = state.window;
147630
    if (window) {
147631
        subscriber.closeWindow(window);
147632
    }
147633
    state.window = subscriber.openWindow();
147634
    this.schedule(state, windowTimeSpan);
147635
}
147636
function dispatchWindowCreation(state) {
147637
    var windowTimeSpan = state.windowTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler, windowCreationInterval = state.windowCreationInterval;
147638
    var window = subscriber.openWindow();
147639
    var action = this;
147640
    var context = { action: action, subscription: null };
147641
    var timeSpanState = { subscriber: subscriber, window: window, context: context };
147642
    context.subscription = scheduler.schedule(dispatchWindowClose, windowTimeSpan, timeSpanState);
147643
    action.add(context.subscription);
147644
    action.schedule(state, windowCreationInterval);
147645
}
147646
function dispatchWindowClose(state) {
147647
    var subscriber = state.subscriber, window = state.window, context = state.context;
147648
    if (context && context.action && context.subscription) {
147649
        context.action.remove(context.subscription);
147650
    }
147651
    subscriber.closeWindow(window);
147652
}
147653
//# sourceMappingURL=windowTime.js.map
147654
 
147655
 
147656
/***/ }),
147657
 
147658
/***/ "./node_modules/rxjs/_esm5/internal/operators/windowToggle.js":
147659
/*!********************************************************************!*\
147660
  !*** ./node_modules/rxjs/_esm5/internal/operators/windowToggle.js ***!
147661
  \********************************************************************/
147662
/*! exports provided: windowToggle */
147663
/***/ (function(module, __webpack_exports__, __webpack_require__) {
147664
 
147665
"use strict";
147666
__webpack_require__.r(__webpack_exports__);
147667
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return windowToggle; });
147668
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
147669
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
147670
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
147671
/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/tryCatch */ "./node_modules/rxjs/_esm5/internal/util/tryCatch.js");
147672
/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/errorObject */ "./node_modules/rxjs/_esm5/internal/util/errorObject.js");
147673
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
147674
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
147675
/** PURE_IMPORTS_START tslib,_Subject,_Subscription,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
147676
 
147677
 
147678
 
147679
 
147680
 
147681
 
147682
 
147683
/**
147684
 * Branch out the source Observable values as a nested Observable starting from
147685
 * an emission from `openings` and ending when the output of `closingSelector`
147686
 * emits.
147687
 *
147688
 * <span class="informal">It's like {@link bufferToggle}, but emits a nested
147689
 * Observable instead of an array.</span>
147690
 *
147691
 * <img src="./img/windowToggle.png" width="100%">
147692
 *
147693
 * Returns an Observable that emits windows of items it collects from the source
147694
 * Observable. The output Observable emits windows that contain those items
147695
 * emitted by the source Observable between the time when the `openings`
147696
 * Observable emits an item and when the Observable returned by
147697
 * `closingSelector` emits an item.
147698
 *
147699
 * @example <caption>Every other second, emit the click events from the next 500ms</caption>
147700
 * var clicks = Rx.Observable.fromEvent(document, 'click');
147701
 * var openings = Rx.Observable.interval(1000);
147702
 * var result = clicks.windowToggle(openings, i =>
147703
 *   i % 2 ? Rx.Observable.interval(500) : Rx.Observable.empty()
147704
 * ).mergeAll();
147705
 * result.subscribe(x => console.log(x));
147706
 *
147707
 * @see {@link window}
147708
 * @see {@link windowCount}
147709
 * @see {@link windowTime}
147710
 * @see {@link windowWhen}
147711
 * @see {@link bufferToggle}
147712
 *
147713
 * @param {Observable<O>} openings An observable of notifications to start new
147714
 * windows.
147715
 * @param {function(value: O): Observable} closingSelector A function that takes
147716
 * the value emitted by the `openings` observable and returns an Observable,
147717
 * which, when it emits (either `next` or `complete`), signals that the
147718
 * associated window should complete.
147719
 * @return {Observable<Observable<T>>} An observable of windows, which in turn
147720
 * are Observables.
147721
 * @method windowToggle
147722
 * @owner Observable
147723
 */
147724
function windowToggle(openings, closingSelector) {
147725
    return function (source) { return source.lift(new WindowToggleOperator(openings, closingSelector)); };
147726
}
147727
var WindowToggleOperator = /*@__PURE__*/ (function () {
147728
    function WindowToggleOperator(openings, closingSelector) {
147729
        this.openings = openings;
147730
        this.closingSelector = closingSelector;
147731
    }
147732
    WindowToggleOperator.prototype.call = function (subscriber, source) {
147733
        return source.subscribe(new WindowToggleSubscriber(subscriber, this.openings, this.closingSelector));
147734
    };
147735
    return WindowToggleOperator;
147736
}());
147737
/**
147738
 * We need this JSDoc comment for affecting ESDoc.
147739
 * @ignore
147740
 * @extends {Ignored}
147741
 */
147742
var WindowToggleSubscriber = /*@__PURE__*/ (function (_super) {
147743
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowToggleSubscriber, _super);
147744
    function WindowToggleSubscriber(destination, openings, closingSelector) {
147745
        var _this = _super.call(this, destination) || this;
147746
        _this.openings = openings;
147747
        _this.closingSelector = closingSelector;
147748
        _this.contexts = [];
147749
        _this.add(_this.openSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_6__["subscribeToResult"])(_this, openings, openings));
147750
        return _this;
147751
    }
147752
    WindowToggleSubscriber.prototype._next = function (value) {
147753
        var contexts = this.contexts;
147754
        if (contexts) {
147755
            var len = contexts.length;
147756
            for (var i = 0; i < len; i++) {
147757
                contexts[i].window.next(value);
147758
            }
147759
        }
147760
    };
147761
    WindowToggleSubscriber.prototype._error = function (err) {
147762
        var contexts = this.contexts;
147763
        this.contexts = null;
147764
        if (contexts) {
147765
            var len = contexts.length;
147766
            var index = -1;
147767
            while (++index < len) {
147768
                var context_1 = contexts[index];
147769
                context_1.window.error(err);
147770
                context_1.subscription.unsubscribe();
147771
            }
147772
        }
147773
        _super.prototype._error.call(this, err);
147774
    };
147775
    WindowToggleSubscriber.prototype._complete = function () {
147776
        var contexts = this.contexts;
147777
        this.contexts = null;
147778
        if (contexts) {
147779
            var len = contexts.length;
147780
            var index = -1;
147781
            while (++index < len) {
147782
                var context_2 = contexts[index];
147783
                context_2.window.complete();
147784
                context_2.subscription.unsubscribe();
147785
            }
147786
        }
147787
        _super.prototype._complete.call(this);
147788
    };
147789
    /** @deprecated This is an internal implementation detail, do not use. */
147790
    WindowToggleSubscriber.prototype._unsubscribe = function () {
147791
        var contexts = this.contexts;
147792
        this.contexts = null;
147793
        if (contexts) {
147794
            var len = contexts.length;
147795
            var index = -1;
147796
            while (++index < len) {
147797
                var context_3 = contexts[index];
147798
                context_3.window.unsubscribe();
147799
                context_3.subscription.unsubscribe();
147800
            }
147801
        }
147802
    };
147803
    WindowToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
147804
        if (outerValue === this.openings) {
147805
            var closingSelector = this.closingSelector;
147806
            var closingNotifier = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_3__["tryCatch"])(closingSelector)(innerValue);
147807
            if (closingNotifier === _util_errorObject__WEBPACK_IMPORTED_MODULE_4__["errorObject"]) {
147808
                return this.error(_util_errorObject__WEBPACK_IMPORTED_MODULE_4__["errorObject"].e);
147809
            }
147810
            else {
147811
                var window_1 = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
147812
                var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]();
147813
                var context_4 = { window: window_1, subscription: subscription };
147814
                this.contexts.push(context_4);
147815
                var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_6__["subscribeToResult"])(this, closingNotifier, context_4);
147816
                if (innerSubscription.closed) {
147817
                    this.closeWindow(this.contexts.length - 1);
147818
                }
147819
                else {
147820
                    innerSubscription.context = context_4;
147821
                    subscription.add(innerSubscription);
147822
                }
147823
                this.destination.next(window_1);
147824
            }
147825
        }
147826
        else {
147827
            this.closeWindow(this.contexts.indexOf(outerValue));
147828
        }
147829
    };
147830
    WindowToggleSubscriber.prototype.notifyError = function (err) {
147831
        this.error(err);
147832
    };
147833
    WindowToggleSubscriber.prototype.notifyComplete = function (inner) {
147834
        if (inner !== this.openSubscription) {
147835
            this.closeWindow(this.contexts.indexOf(inner.context));
147836
        }
147837
    };
147838
    WindowToggleSubscriber.prototype.closeWindow = function (index) {
147839
        if (index === -1) {
147840
            return;
147841
        }
147842
        var contexts = this.contexts;
147843
        var context = contexts[index];
147844
        var window = context.window, subscription = context.subscription;
147845
        contexts.splice(index, 1);
147846
        window.complete();
147847
        subscription.unsubscribe();
147848
    };
147849
    return WindowToggleSubscriber;
147850
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_5__["OuterSubscriber"]));
147851
//# sourceMappingURL=windowToggle.js.map
147852
 
147853
 
147854
/***/ }),
147855
 
147856
/***/ "./node_modules/rxjs/_esm5/internal/operators/windowWhen.js":
147857
/*!******************************************************************!*\
147858
  !*** ./node_modules/rxjs/_esm5/internal/operators/windowWhen.js ***!
147859
  \******************************************************************/
147860
/*! exports provided: windowWhen */
147861
/***/ (function(module, __webpack_exports__, __webpack_require__) {
147862
 
147863
"use strict";
147864
__webpack_require__.r(__webpack_exports__);
147865
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return windowWhen; });
147866
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
147867
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subject */ "./node_modules/rxjs/_esm5/internal/Subject.js");
147868
/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/tryCatch */ "./node_modules/rxjs/_esm5/internal/util/tryCatch.js");
147869
/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/errorObject */ "./node_modules/rxjs/_esm5/internal/util/errorObject.js");
147870
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
147871
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
147872
/** PURE_IMPORTS_START tslib,_Subject,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
147873
 
147874
 
147875
 
147876
 
147877
 
147878
 
147879
/**
147880
 * Branch out the source Observable values as a nested Observable using a
147881
 * factory function of closing Observables to determine when to start a new
147882
 * window.
147883
 *
147884
 * <span class="informal">It's like {@link bufferWhen}, but emits a nested
147885
 * Observable instead of an array.</span>
147886
 *
147887
 * <img src="./img/windowWhen.png" width="100%">
147888
 *
147889
 * Returns an Observable that emits windows of items it collects from the source
147890
 * Observable. The output Observable emits connected, non-overlapping windows.
147891
 * It emits the current window and opens a new one whenever the Observable
147892
 * produced by the specified `closingSelector` function emits an item. The first
147893
 * window is opened immediately when subscribing to the output Observable.
147894
 *
147895
 * @example <caption>Emit only the first two clicks events in every window of [1-5] random seconds</caption>
147896
 * var clicks = Rx.Observable.fromEvent(document, 'click');
147897
 * var result = clicks
147898
 *   .windowWhen(() => Rx.Observable.interval(1000 + Math.random() * 4000))
147899
 *   .map(win => win.take(2)) // each window has at most 2 emissions
147900
 *   .mergeAll(); // flatten the Observable-of-Observables
147901
 * result.subscribe(x => console.log(x));
147902
 *
147903
 * @see {@link window}
147904
 * @see {@link windowCount}
147905
 * @see {@link windowTime}
147906
 * @see {@link windowToggle}
147907
 * @see {@link bufferWhen}
147908
 *
147909
 * @param {function(): Observable} closingSelector A function that takes no
147910
 * arguments and returns an Observable that signals (on either `next` or
147911
 * `complete`) when to close the previous window and start a new one.
147912
 * @return {Observable<Observable<T>>} An observable of windows, which in turn
147913
 * are Observables.
147914
 * @method windowWhen
147915
 * @owner Observable
147916
 */
147917
function windowWhen(closingSelector) {
147918
    return function windowWhenOperatorFunction(source) {
147919
        return source.lift(new WindowOperator(closingSelector));
147920
    };
147921
}
147922
var WindowOperator = /*@__PURE__*/ (function () {
147923
    function WindowOperator(closingSelector) {
147924
        this.closingSelector = closingSelector;
147925
    }
147926
    WindowOperator.prototype.call = function (subscriber, source) {
147927
        return source.subscribe(new WindowSubscriber(subscriber, this.closingSelector));
147928
    };
147929
    return WindowOperator;
147930
}());
147931
/**
147932
 * We need this JSDoc comment for affecting ESDoc.
147933
 * @ignore
147934
 * @extends {Ignored}
147935
 */
147936
var WindowSubscriber = /*@__PURE__*/ (function (_super) {
147937
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowSubscriber, _super);
147938
    function WindowSubscriber(destination, closingSelector) {
147939
        var _this = _super.call(this, destination) || this;
147940
        _this.destination = destination;
147941
        _this.closingSelector = closingSelector;
147942
        _this.openWindow();
147943
        return _this;
147944
    }
147945
    WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
147946
        this.openWindow(innerSub);
147947
    };
147948
    WindowSubscriber.prototype.notifyError = function (error, innerSub) {
147949
        this._error(error);
147950
    };
147951
    WindowSubscriber.prototype.notifyComplete = function (innerSub) {
147952
        this.openWindow(innerSub);
147953
    };
147954
    WindowSubscriber.prototype._next = function (value) {
147955
        this.window.next(value);
147956
    };
147957
    WindowSubscriber.prototype._error = function (err) {
147958
        this.window.error(err);
147959
        this.destination.error(err);
147960
        this.unsubscribeClosingNotification();
147961
    };
147962
    WindowSubscriber.prototype._complete = function () {
147963
        this.window.complete();
147964
        this.destination.complete();
147965
        this.unsubscribeClosingNotification();
147966
    };
147967
    WindowSubscriber.prototype.unsubscribeClosingNotification = function () {
147968
        if (this.closingNotification) {
147969
            this.closingNotification.unsubscribe();
147970
        }
147971
    };
147972
    WindowSubscriber.prototype.openWindow = function (innerSub) {
147973
        if (innerSub === void 0) {
147974
            innerSub = null;
147975
        }
147976
        if (innerSub) {
147977
            this.remove(innerSub);
147978
            innerSub.unsubscribe();
147979
        }
147980
        var prevWindow = this.window;
147981
        if (prevWindow) {
147982
            prevWindow.complete();
147983
        }
147984
        var window = this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
147985
        this.destination.next(window);
147986
        var closingNotifier = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_2__["tryCatch"])(this.closingSelector)();
147987
        if (closingNotifier === _util_errorObject__WEBPACK_IMPORTED_MODULE_3__["errorObject"]) {
147988
            var err = _util_errorObject__WEBPACK_IMPORTED_MODULE_3__["errorObject"].e;
147989
            this.destination.error(err);
147990
            this.window.error(err);
147991
        }
147992
        else {
147993
            this.add(this.closingNotification = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__["subscribeToResult"])(this, closingNotifier));
147994
        }
147995
    };
147996
    return WindowSubscriber;
147997
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__["OuterSubscriber"]));
147998
//# sourceMappingURL=windowWhen.js.map
147999
 
148000
 
148001
/***/ }),
148002
 
148003
/***/ "./node_modules/rxjs/_esm5/internal/operators/withLatestFrom.js":
148004
/*!**********************************************************************!*\
148005
  !*** ./node_modules/rxjs/_esm5/internal/operators/withLatestFrom.js ***!
148006
  \**********************************************************************/
148007
/*! exports provided: withLatestFrom */
148008
/***/ (function(module, __webpack_exports__, __webpack_require__) {
148009
 
148010
"use strict";
148011
__webpack_require__.r(__webpack_exports__);
148012
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return withLatestFrom; });
148013
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
148014
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OuterSubscriber */ "./node_modules/rxjs/_esm5/internal/OuterSubscriber.js");
148015
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToResult */ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js");
148016
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
148017
 
148018
 
148019
 
148020
/* tslint:enable:max-line-length */
148021
/**
148022
 * Combines the source Observable with other Observables to create an Observable
148023
 * whose values are calculated from the latest values of each, only when the
148024
 * source emits.
148025
 *
148026
 * <span class="informal">Whenever the source Observable emits a value, it
148027
 * computes a formula using that value plus the latest values from other input
148028
 * Observables, then emits the output of that formula.</span>
148029
 *
148030
 * <img src="./img/withLatestFrom.png" width="100%">
148031
 *
148032
 * `withLatestFrom` combines each value from the source Observable (the
148033
 * instance) with the latest values from the other input Observables only when
148034
 * the source emits a value, optionally using a `project` function to determine
148035
 * the value to be emitted on the output Observable. All input Observables must
148036
 * emit at least one value before the output Observable will emit a value.
148037
 *
148038
 * @example <caption>On every click event, emit an array with the latest timer event plus the click event</caption>
148039
 * var clicks = Rx.Observable.fromEvent(document, 'click');
148040
 * var timer = Rx.Observable.interval(1000);
148041
 * var result = clicks.withLatestFrom(timer);
148042
 * result.subscribe(x => console.log(x));
148043
 *
148044
 * @see {@link combineLatest}
148045
 *
148046
 * @param {ObservableInput} other An input Observable to combine with the source
148047
 * Observable. More than one input Observables may be given as argument.
148048
 * @param {Function} [project] Projection function for combining values
148049
 * together. Receives all values in order of the Observables passed, where the
148050
 * first parameter is a value from the source Observable. (e.g.
148051
 * `a.withLatestFrom(b, c, (a1, b1, c1) => a1 + b1 + c1)`). If this is not
148052
 * passed, arrays will be emitted on the output Observable.
148053
 * @return {Observable} An Observable of projected values from the most recent
148054
 * values from each input Observable, or an array of the most recent values from
148055
 * each input Observable.
148056
 * @method withLatestFrom
148057
 * @owner Observable
148058
 */
148059
function withLatestFrom() {
148060
    var args = [];
148061
    for (var _i = 0; _i < arguments.length; _i++) {
148062
        args[_i] = arguments[_i];
148063
    }
148064
    return function (source) {
148065
        var project;
148066
        if (typeof args[args.length - 1] === 'function') {
148067
            project = args.pop();
148068
        }
148069
        var observables = args;
148070
        return source.lift(new WithLatestFromOperator(observables, project));
148071
    };
148072
}
148073
var WithLatestFromOperator = /*@__PURE__*/ (function () {
148074
    function WithLatestFromOperator(observables, project) {
148075
        this.observables = observables;
148076
        this.project = project;
148077
    }
148078
    WithLatestFromOperator.prototype.call = function (subscriber, source) {
148079
        return source.subscribe(new WithLatestFromSubscriber(subscriber, this.observables, this.project));
148080
    };
148081
    return WithLatestFromOperator;
148082
}());
148083
/**
148084
 * We need this JSDoc comment for affecting ESDoc.
148085
 * @ignore
148086
 * @extends {Ignored}
148087
 */
148088
var WithLatestFromSubscriber = /*@__PURE__*/ (function (_super) {
148089
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WithLatestFromSubscriber, _super);
148090
    function WithLatestFromSubscriber(destination, observables, project) {
148091
        var _this = _super.call(this, destination) || this;
148092
        _this.observables = observables;
148093
        _this.project = project;
148094
        _this.toRespond = [];
148095
        var len = observables.length;
148096
        _this.values = new Array(len);
148097
        for (var i = 0; i < len; i++) {
148098
            _this.toRespond.push(i);
148099
        }
148100
        for (var i = 0; i < len; i++) {
148101
            var observable = observables[i];
148102
            _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, observable, observable, i));
148103
        }
148104
        return _this;
148105
    }
148106
    WithLatestFromSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
148107
        this.values[outerIndex] = innerValue;
148108
        var toRespond = this.toRespond;
148109
        if (toRespond.length > 0) {
148110
            var found = toRespond.indexOf(outerIndex);
148111
            if (found !== -1) {
148112
                toRespond.splice(found, 1);
148113
            }
148114
        }
148115
    };
148116
    WithLatestFromSubscriber.prototype.notifyComplete = function () {
148117
        // noop
148118
    };
148119
    WithLatestFromSubscriber.prototype._next = function (value) {
148120
        if (this.toRespond.length === 0) {
148121
            var args = [value].concat(this.values);
148122
            if (this.project) {
148123
                this._tryProject(args);
148124
            }
148125
            else {
148126
                this.destination.next(args);
148127
            }
148128
        }
148129
    };
148130
    WithLatestFromSubscriber.prototype._tryProject = function (args) {
148131
        var result;
148132
        try {
148133
            result = this.project.apply(this, args);
148134
        }
148135
        catch (err) {
148136
            this.destination.error(err);
148137
            return;
148138
        }
148139
        this.destination.next(result);
148140
    };
148141
    return WithLatestFromSubscriber;
148142
}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
148143
//# sourceMappingURL=withLatestFrom.js.map
148144
 
148145
 
148146
/***/ }),
148147
 
148148
/***/ "./node_modules/rxjs/_esm5/internal/operators/zip.js":
148149
/*!***********************************************************!*\
148150
  !*** ./node_modules/rxjs/_esm5/internal/operators/zip.js ***!
148151
  \***********************************************************/
148152
/*! exports provided: zip */
148153
/***/ (function(module, __webpack_exports__, __webpack_require__) {
148154
 
148155
"use strict";
148156
__webpack_require__.r(__webpack_exports__);
148157
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return zip; });
148158
/* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/zip */ "./node_modules/rxjs/_esm5/internal/observable/zip.js");
148159
/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */
148160
 
148161
/* tslint:enable:max-line-length */
148162
/**
148163
 * @deprecated Deprecated in favor of static zip.
148164
 */
148165
function zip() {
148166
    var observables = [];
148167
    for (var _i = 0; _i < arguments.length; _i++) {
148168
        observables[_i] = arguments[_i];
148169
    }
148170
    return function zipOperatorFunction(source) {
148171
        return source.lift.call(_observable_zip__WEBPACK_IMPORTED_MODULE_0__["zip"].apply(void 0, [source].concat(observables)));
148172
    };
148173
}
148174
//# sourceMappingURL=zip.js.map
148175
 
148176
 
148177
/***/ }),
148178
 
148179
/***/ "./node_modules/rxjs/_esm5/internal/operators/zipAll.js":
148180
/*!**************************************************************!*\
148181
  !*** ./node_modules/rxjs/_esm5/internal/operators/zipAll.js ***!
148182
  \**************************************************************/
148183
/*! exports provided: zipAll */
148184
/***/ (function(module, __webpack_exports__, __webpack_require__) {
148185
 
148186
"use strict";
148187
__webpack_require__.r(__webpack_exports__);
148188
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return zipAll; });
148189
/* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/zip */ "./node_modules/rxjs/_esm5/internal/observable/zip.js");
148190
/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */
148191
 
148192
function zipAll(project) {
148193
    return function (source) { return source.lift(new _observable_zip__WEBPACK_IMPORTED_MODULE_0__["ZipOperator"](project)); };
148194
}
148195
//# sourceMappingURL=zipAll.js.map
148196
 
148197
 
148198
/***/ }),
148199
 
148200
/***/ "./node_modules/rxjs/_esm5/internal/scheduler/Action.js":
148201
/*!**************************************************************!*\
148202
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/Action.js ***!
148203
  \**************************************************************/
148204
/*! exports provided: Action */
148205
/***/ (function(module, __webpack_exports__, __webpack_require__) {
148206
 
148207
"use strict";
148208
__webpack_require__.r(__webpack_exports__);
148209
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Action", function() { return Action; });
148210
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
148211
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "./node_modules/rxjs/_esm5/internal/Subscription.js");
148212
/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */
148213
 
148214
 
148215
/**
148216
 * A unit of work to be executed in a {@link Scheduler}. An action is typically
148217
 * created from within a Scheduler and an RxJS user does not need to concern
148218
 * themselves about creating and manipulating an Action.
148219
 *
148220
 * ```ts
148221
 * class Action<T> extends Subscription {
148222
 *   new (scheduler: Scheduler, work: (state?: T) => void);
148223
 *   schedule(state?: T, delay: number = 0): Subscription;
148224
 * }
148225
 * ```
148226
 *
148227
 * @class Action<T>
148228
 */
148229
var Action = /*@__PURE__*/ (function (_super) {
148230
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Action, _super);
148231
    function Action(scheduler, work) {
148232
        return _super.call(this) || this;
148233
    }
148234
    /**
148235
     * Schedules this action on its parent Scheduler for execution. May be passed
148236
     * some context object, `state`. May happen at some point in the future,
148237
     * according to the `delay` parameter, if specified.
148238
     * @param {T} [state] Some contextual data that the `work` function uses when
148239
     * called by the Scheduler.
148240
     * @param {number} [delay] Time to wait before executing the work, where the
148241
     * time unit is implicit and defined by the Scheduler.
148242
     * @return {void}
148243
     */
148244
    Action.prototype.schedule = function (state, delay) {
148245
        if (delay === void 0) {
148246
            delay = 0;
148247
        }
148248
        return this;
148249
    };
148250
    return Action;
148251
}(_Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]));
148252
 
148253
//# sourceMappingURL=Action.js.map
148254
 
148255
 
148256
/***/ }),
148257
 
148258
/***/ "./node_modules/rxjs/_esm5/internal/scheduler/AnimationFrameAction.js":
148259
/*!****************************************************************************!*\
148260
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/AnimationFrameAction.js ***!
148261
  \****************************************************************************/
148262
/*! exports provided: AnimationFrameAction */
148263
/***/ (function(module, __webpack_exports__, __webpack_require__) {
148264
 
148265
"use strict";
148266
__webpack_require__.r(__webpack_exports__);
148267
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameAction", function() { return AnimationFrameAction; });
148268
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
148269
/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsyncAction */ "./node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js");
148270
/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */
148271
 
148272
 
148273
/**
148274
 * We need this JSDoc comment for affecting ESDoc.
148275
 * @ignore
148276
 * @extends {Ignored}
148277
 */
148278
var AnimationFrameAction = /*@__PURE__*/ (function (_super) {
148279
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnimationFrameAction, _super);
148280
    function AnimationFrameAction(scheduler, work) {
148281
        var _this = _super.call(this, scheduler, work) || this;
148282
        _this.scheduler = scheduler;
148283
        _this.work = work;
148284
        return _this;
148285
    }
148286
    AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) {
148287
        if (delay === void 0) {
148288
            delay = 0;
148289
        }
148290
        // If delay is greater than 0, request as an async action.
148291
        if (delay !== null && delay > 0) {
148292
            return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
148293
        }
148294
        // Push the action to the end of the scheduler queue.
148295
        scheduler.actions.push(this);
148296
        // If an animation frame has already been requested, don't request another
148297
        // one. If an animation frame hasn't been requested yet, request one. Return
148298
        // the current animation frame request id.
148299
        return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(function () { return scheduler.flush(null); }));
148300
    };
148301
    AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
148302
        if (delay === void 0) {
148303
            delay = 0;
148304
        }
148305
        // If delay exists and is greater than 0, or if the delay is null (the
148306
        // action wasn't rescheduled) but was originally scheduled as an async
148307
        // action, then recycle as an async action.
148308
        if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
148309
            return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
148310
        }
148311
        // If the scheduler queue is empty, cancel the requested animation frame and
148312
        // set the scheduled flag to undefined so the next AnimationFrameAction will
148313
        // request its own.
148314
        if (scheduler.actions.length === 0) {
148315
            cancelAnimationFrame(id);
148316
            scheduler.scheduled = undefined;
148317
        }
148318
        // Return undefined so the action knows to request a new async id if it's rescheduled.
148319
        return undefined;
148320
    };
148321
    return AnimationFrameAction;
148322
}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]));
148323
 
148324
//# sourceMappingURL=AnimationFrameAction.js.map
148325
 
148326
 
148327
/***/ }),
148328
 
148329
/***/ "./node_modules/rxjs/_esm5/internal/scheduler/AnimationFrameScheduler.js":
148330
/*!*******************************************************************************!*\
148331
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/AnimationFrameScheduler.js ***!
148332
  \*******************************************************************************/
148333
/*! exports provided: AnimationFrameScheduler */
148334
/***/ (function(module, __webpack_exports__, __webpack_require__) {
148335
 
148336
"use strict";
148337
__webpack_require__.r(__webpack_exports__);
148338
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameScheduler", function() { return AnimationFrameScheduler; });
148339
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
148340
/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsyncScheduler */ "./node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js");
148341
/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
148342
 
148343
 
148344
var AnimationFrameScheduler = /*@__PURE__*/ (function (_super) {
148345
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnimationFrameScheduler, _super);
148346
    function AnimationFrameScheduler() {
148347
        return _super !== null && _super.apply(this, arguments) || this;
148348
    }
148349
    AnimationFrameScheduler.prototype.flush = function (action) {
148350
        this.active = true;
148351
        this.scheduled = undefined;
148352
        var actions = this.actions;
148353
        var error;
148354
        var index = -1;
148355
        var count = actions.length;
148356
        action = action || actions.shift();
148357
        do {
148358
            if (error = action.execute(action.state, action.delay)) {
148359
                break;
148360
            }
148361
        } while (++index < count && (action = actions.shift()));
148362
        this.active = false;
148363
        if (error) {
148364
            while (++index < count && (action = actions.shift())) {
148365
                action.unsubscribe();
148366
            }
148367
            throw error;
148368
        }
148369
    };
148370
    return AnimationFrameScheduler;
148371
}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"]));
148372
 
148373
//# sourceMappingURL=AnimationFrameScheduler.js.map
148374
 
148375
 
148376
/***/ }),
148377
 
148378
/***/ "./node_modules/rxjs/_esm5/internal/scheduler/AsapAction.js":
148379
/*!******************************************************************!*\
148380
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/AsapAction.js ***!
148381
  \******************************************************************/
148382
/*! exports provided: AsapAction */
148383
/***/ (function(module, __webpack_exports__, __webpack_require__) {
148384
 
148385
"use strict";
148386
__webpack_require__.r(__webpack_exports__);
148387
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsapAction", function() { return AsapAction; });
148388
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
148389
/* harmony import */ var _util_Immediate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/Immediate */ "./node_modules/rxjs/_esm5/internal/util/Immediate.js");
148390
/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AsyncAction */ "./node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js");
148391
/** PURE_IMPORTS_START tslib,_util_Immediate,_AsyncAction PURE_IMPORTS_END */
148392
 
148393
 
148394
 
148395
/**
148396
 * We need this JSDoc comment for affecting ESDoc.
148397
 * @ignore
148398
 * @extends {Ignored}
148399
 */
148400
var AsapAction = /*@__PURE__*/ (function (_super) {
148401
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsapAction, _super);
148402
    function AsapAction(scheduler, work) {
148403
        var _this = _super.call(this, scheduler, work) || this;
148404
        _this.scheduler = scheduler;
148405
        _this.work = work;
148406
        return _this;
148407
    }
148408
    AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) {
148409
        if (delay === void 0) {
148410
            delay = 0;
148411
        }
148412
        // If delay is greater than 0, request as an async action.
148413
        if (delay !== null && delay > 0) {
148414
            return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
148415
        }
148416
        // Push the action to the end of the scheduler queue.
148417
        scheduler.actions.push(this);
148418
        // If a microtask has already been scheduled, don't schedule another
148419
        // one. If a microtask hasn't been scheduled yet, schedule one now. Return
148420
        // the current scheduled microtask id.
148421
        return scheduler.scheduled || (scheduler.scheduled = _util_Immediate__WEBPACK_IMPORTED_MODULE_1__["Immediate"].setImmediate(scheduler.flush.bind(scheduler, null)));
148422
    };
148423
    AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
148424
        if (delay === void 0) {
148425
            delay = 0;
148426
        }
148427
        // If delay exists and is greater than 0, or if the delay is null (the
148428
        // action wasn't rescheduled) but was originally scheduled as an async
148429
        // action, then recycle as an async action.
148430
        if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
148431
            return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
148432
        }
148433
        // If the scheduler queue is empty, cancel the requested microtask and
148434
        // set the scheduled flag to undefined so the next AsapAction will schedule
148435
        // its own.
148436
        if (scheduler.actions.length === 0) {
148437
            _util_Immediate__WEBPACK_IMPORTED_MODULE_1__["Immediate"].clearImmediate(id);
148438
            scheduler.scheduled = undefined;
148439
        }
148440
        // Return undefined so the action knows to request a new async id if it's rescheduled.
148441
        return undefined;
148442
    };
148443
    return AsapAction;
148444
}(_AsyncAction__WEBPACK_IMPORTED_MODULE_2__["AsyncAction"]));
148445
 
148446
//# sourceMappingURL=AsapAction.js.map
148447
 
148448
 
148449
/***/ }),
148450
 
148451
/***/ "./node_modules/rxjs/_esm5/internal/scheduler/AsapScheduler.js":
148452
/*!*********************************************************************!*\
148453
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/AsapScheduler.js ***!
148454
  \*********************************************************************/
148455
/*! exports provided: AsapScheduler */
148456
/***/ (function(module, __webpack_exports__, __webpack_require__) {
148457
 
148458
"use strict";
148459
__webpack_require__.r(__webpack_exports__);
148460
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsapScheduler", function() { return AsapScheduler; });
148461
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
148462
/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsyncScheduler */ "./node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js");
148463
/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
148464
 
148465
 
148466
var AsapScheduler = /*@__PURE__*/ (function (_super) {
148467
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsapScheduler, _super);
148468
    function AsapScheduler() {
148469
        return _super !== null && _super.apply(this, arguments) || this;
148470
    }
148471
    AsapScheduler.prototype.flush = function (action) {
148472
        this.active = true;
148473
        this.scheduled = undefined;
148474
        var actions = this.actions;
148475
        var error;
148476
        var index = -1;
148477
        var count = actions.length;
148478
        action = action || actions.shift();
148479
        do {
148480
            if (error = action.execute(action.state, action.delay)) {
148481
                break;
148482
            }
148483
        } while (++index < count && (action = actions.shift()));
148484
        this.active = false;
148485
        if (error) {
148486
            while (++index < count && (action = actions.shift())) {
148487
                action.unsubscribe();
148488
            }
148489
            throw error;
148490
        }
148491
    };
148492
    return AsapScheduler;
148493
}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"]));
148494
 
148495
//# sourceMappingURL=AsapScheduler.js.map
148496
 
148497
 
148498
/***/ }),
148499
 
148500
/***/ "./node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js":
148501
/*!*******************************************************************!*\
148502
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js ***!
148503
  \*******************************************************************/
148504
/*! exports provided: AsyncAction */
148505
/***/ (function(module, __webpack_exports__, __webpack_require__) {
148506
 
148507
"use strict";
148508
__webpack_require__.r(__webpack_exports__);
148509
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncAction", function() { return AsyncAction; });
148510
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
148511
/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Action */ "./node_modules/rxjs/_esm5/internal/scheduler/Action.js");
148512
/** PURE_IMPORTS_START tslib,_Action PURE_IMPORTS_END */
148513
 
148514
 
148515
/**
148516
 * We need this JSDoc comment for affecting ESDoc.
148517
 * @ignore
148518
 * @extends {Ignored}
148519
 */
148520
var AsyncAction = /*@__PURE__*/ (function (_super) {
148521
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncAction, _super);
148522
    function AsyncAction(scheduler, work) {
148523
        var _this = _super.call(this, scheduler, work) || this;
148524
        _this.scheduler = scheduler;
148525
        _this.work = work;
148526
        _this.pending = false;
148527
        return _this;
148528
    }
148529
    AsyncAction.prototype.schedule = function (state, delay) {
148530
        if (delay === void 0) {
148531
            delay = 0;
148532
        }
148533
        if (this.closed) {
148534
            return this;
148535
        }
148536
        // Always replace the current state with the new state.
148537
        this.state = state;
148538
        var id = this.id;
148539
        var scheduler = this.scheduler;
148540
        //
148541
        // Important implementation note:
148542
        //
148543
        // Actions only execute once by default, unless rescheduled from within the
148544
        // scheduled callback. This allows us to implement single and repeat
148545
        // actions via the same code path, without adding API surface area, as well
148546
        // as mimic traditional recursion but across asynchronous boundaries.
148547
        //
148548
        // However, JS runtimes and timers distinguish between intervals achieved by
148549
        // serial `setTimeout` calls vs. a single `setInterval` call. An interval of
148550
        // serial `setTimeout` calls can be individually delayed, which delays
148551
        // scheduling the next `setTimeout`, and so on. `setInterval` attempts to
148552
        // guarantee the interval callback will be invoked more precisely to the
148553
        // interval period, regardless of load.
148554
        //
148555
        // Therefore, we use `setInterval` to schedule single and repeat actions.
148556
        // If the action reschedules itself with the same delay, the interval is not
148557
        // canceled. If the action doesn't reschedule, or reschedules with a
148558
        // different delay, the interval will be canceled after scheduled callback
148559
        // execution.
148560
        //
148561
        if (id != null) {
148562
            this.id = this.recycleAsyncId(scheduler, id, delay);
148563
        }
148564
        // Set the pending flag indicating that this action has been scheduled, or
148565
        // has recursively rescheduled itself.
148566
        this.pending = true;
148567
        this.delay = delay;
148568
        // If this action has already an async Id, don't request a new one.
148569
        this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);
148570
        return this;
148571
    };
148572
    AsyncAction.prototype.requestAsyncId = function (scheduler, id, delay) {
148573
        if (delay === void 0) {
148574
            delay = 0;
148575
        }
148576
        return setInterval(scheduler.flush.bind(scheduler, this), delay);
148577
    };
148578
    AsyncAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
148579
        if (delay === void 0) {
148580
            delay = 0;
148581
        }
148582
        // If this action is rescheduled with the same delay time, don't clear the interval id.
148583
        if (delay !== null && this.delay === delay && this.pending === false) {
148584
            return id;
148585
        }
148586
        // Otherwise, if the action's delay time is different from the current delay,
148587
        // or the action has been rescheduled before it's executed, clear the interval id
148588
        return clearInterval(id) && undefined || undefined;
148589
    };
148590
    /**
148591
     * Immediately executes this action and the `work` it contains.
148592
     * @return {any}
148593
     */
148594
    AsyncAction.prototype.execute = function (state, delay) {
148595
        if (this.closed) {
148596
            return new Error('executing a cancelled action');
148597
        }
148598
        this.pending = false;
148599
        var error = this._execute(state, delay);
148600
        if (error) {
148601
            return error;
148602
        }
148603
        else if (this.pending === false && this.id != null) {
148604
            // Dequeue if the action didn't reschedule itself. Don't call
148605
            // unsubscribe(), because the action could reschedule later.
148606
            // For example:
148607
            // ```
148608
            // scheduler.schedule(function doWork(counter) {
148609
            //   /* ... I'm a busy worker bee ... */
148610
            //   var originalAction = this;
148611
            //   /* wait 100ms before rescheduling the action */
148612
            //   setTimeout(function () {
148613
            //     originalAction.schedule(counter + 1);
148614
            //   }, 100);
148615
            // }, 1000);
148616
            // ```
148617
            this.id = this.recycleAsyncId(this.scheduler, this.id, null);
148618
        }
148619
    };
148620
    AsyncAction.prototype._execute = function (state, delay) {
148621
        var errored = false;
148622
        var errorValue = undefined;
148623
        try {
148624
            this.work(state);
148625
        }
148626
        catch (e) {
148627
            errored = true;
148628
            errorValue = !!e && e || new Error(e);
148629
        }
148630
        if (errored) {
148631
            this.unsubscribe();
148632
            return errorValue;
148633
        }
148634
    };
148635
    /** @deprecated This is an internal implementation detail, do not use. */
148636
    AsyncAction.prototype._unsubscribe = function () {
148637
        var id = this.id;
148638
        var scheduler = this.scheduler;
148639
        var actions = scheduler.actions;
148640
        var index = actions.indexOf(this);
148641
        this.work = null;
148642
        this.state = null;
148643
        this.pending = false;
148644
        this.scheduler = null;
148645
        if (index !== -1) {
148646
            actions.splice(index, 1);
148647
        }
148648
        if (id != null) {
148649
            this.id = this.recycleAsyncId(scheduler, id, null);
148650
        }
148651
        this.delay = null;
148652
    };
148653
    return AsyncAction;
148654
}(_Action__WEBPACK_IMPORTED_MODULE_1__["Action"]));
148655
 
148656
//# sourceMappingURL=AsyncAction.js.map
148657
 
148658
 
148659
/***/ }),
148660
 
148661
/***/ "./node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js":
148662
/*!**********************************************************************!*\
148663
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js ***!
148664
  \**********************************************************************/
148665
/*! exports provided: AsyncScheduler */
148666
/***/ (function(module, __webpack_exports__, __webpack_require__) {
148667
 
148668
"use strict";
148669
__webpack_require__.r(__webpack_exports__);
148670
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncScheduler", function() { return AsyncScheduler; });
148671
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
148672
/* harmony import */ var _Scheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Scheduler */ "./node_modules/rxjs/_esm5/internal/Scheduler.js");
148673
/** PURE_IMPORTS_START tslib,_Scheduler PURE_IMPORTS_END */
148674
 
148675
 
148676
var AsyncScheduler = /*@__PURE__*/ (function (_super) {
148677
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncScheduler, _super);
148678
    function AsyncScheduler(SchedulerAction, now) {
148679
        if (now === void 0) {
148680
            now = _Scheduler__WEBPACK_IMPORTED_MODULE_1__["Scheduler"].now;
148681
        }
148682
        var _this = _super.call(this, SchedulerAction, function () {
148683
            if (AsyncScheduler.delegate && AsyncScheduler.delegate !== _this) {
148684
                return AsyncScheduler.delegate.now();
148685
            }
148686
            else {
148687
                return now();
148688
            }
148689
        }) || this;
148690
        _this.actions = [];
148691
        /**
148692
         * A flag to indicate whether the Scheduler is currently executing a batch of
148693
         * queued actions.
148694
         * @type {boolean}
148695
         */
148696
        _this.active = false;
148697
        /**
148698
         * An internal ID used to track the latest asynchronous task such as those
148699
         * coming from `setTimeout`, `setInterval`, `requestAnimationFrame`, and
148700
         * others.
148701
         * @type {any}
148702
         */
148703
        _this.scheduled = undefined;
148704
        return _this;
148705
    }
148706
    AsyncScheduler.prototype.schedule = function (work, delay, state) {
148707
        if (delay === void 0) {
148708
            delay = 0;
148709
        }
148710
        if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {
148711
            return AsyncScheduler.delegate.schedule(work, delay, state);
148712
        }
148713
        else {
148714
            return _super.prototype.schedule.call(this, work, delay, state);
148715
        }
148716
    };
148717
    AsyncScheduler.prototype.flush = function (action) {
148718
        var actions = this.actions;
148719
        if (this.active) {
148720
            actions.push(action);
148721
            return;
148722
        }
148723
        var error;
148724
        this.active = true;
148725
        do {
148726
            if (error = action.execute(action.state, action.delay)) {
148727
                break;
148728
            }
148729
        } while (action = actions.shift()); // exhaust the scheduler queue
148730
        this.active = false;
148731
        if (error) {
148732
            while (action = actions.shift()) {
148733
                action.unsubscribe();
148734
            }
148735
            throw error;
148736
        }
148737
    };
148738
    return AsyncScheduler;
148739
}(_Scheduler__WEBPACK_IMPORTED_MODULE_1__["Scheduler"]));
148740
 
148741
//# sourceMappingURL=AsyncScheduler.js.map
148742
 
148743
 
148744
/***/ }),
148745
 
148746
/***/ "./node_modules/rxjs/_esm5/internal/scheduler/QueueAction.js":
148747
/*!*******************************************************************!*\
148748
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/QueueAction.js ***!
148749
  \*******************************************************************/
148750
/*! exports provided: QueueAction */
148751
/***/ (function(module, __webpack_exports__, __webpack_require__) {
148752
 
148753
"use strict";
148754
__webpack_require__.r(__webpack_exports__);
148755
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueueAction", function() { return QueueAction; });
148756
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
148757
/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsyncAction */ "./node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js");
148758
/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */
148759
 
148760
 
148761
/**
148762
 * We need this JSDoc comment for affecting ESDoc.
148763
 * @ignore
148764
 * @extends {Ignored}
148765
 */
148766
var QueueAction = /*@__PURE__*/ (function (_super) {
148767
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](QueueAction, _super);
148768
    function QueueAction(scheduler, work) {
148769
        var _this = _super.call(this, scheduler, work) || this;
148770
        _this.scheduler = scheduler;
148771
        _this.work = work;
148772
        return _this;
148773
    }
148774
    QueueAction.prototype.schedule = function (state, delay) {
148775
        if (delay === void 0) {
148776
            delay = 0;
148777
        }
148778
        if (delay > 0) {
148779
            return _super.prototype.schedule.call(this, state, delay);
148780
        }
148781
        this.delay = delay;
148782
        this.state = state;
148783
        this.scheduler.flush(this);
148784
        return this;
148785
    };
148786
    QueueAction.prototype.execute = function (state, delay) {
148787
        return (delay > 0 || this.closed) ?
148788
            _super.prototype.execute.call(this, state, delay) :
148789
            this._execute(state, delay);
148790
    };
148791
    QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) {
148792
        if (delay === void 0) {
148793
            delay = 0;
148794
        }
148795
        // If delay exists and is greater than 0, or if the delay is null (the
148796
        // action wasn't rescheduled) but was originally scheduled as an async
148797
        // action, then recycle as an async action.
148798
        if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
148799
            return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
148800
        }
148801
        // Otherwise flush the scheduler starting with this action.
148802
        return scheduler.flush(this);
148803
    };
148804
    return QueueAction;
148805
}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]));
148806
 
148807
//# sourceMappingURL=QueueAction.js.map
148808
 
148809
 
148810
/***/ }),
148811
 
148812
/***/ "./node_modules/rxjs/_esm5/internal/scheduler/QueueScheduler.js":
148813
/*!**********************************************************************!*\
148814
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/QueueScheduler.js ***!
148815
  \**********************************************************************/
148816
/*! exports provided: QueueScheduler */
148817
/***/ (function(module, __webpack_exports__, __webpack_require__) {
148818
 
148819
"use strict";
148820
__webpack_require__.r(__webpack_exports__);
148821
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueueScheduler", function() { return QueueScheduler; });
148822
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
148823
/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsyncScheduler */ "./node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js");
148824
/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
148825
 
148826
 
148827
var QueueScheduler = /*@__PURE__*/ (function (_super) {
148828
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](QueueScheduler, _super);
148829
    function QueueScheduler() {
148830
        return _super !== null && _super.apply(this, arguments) || this;
148831
    }
148832
    return QueueScheduler;
148833
}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"]));
148834
 
148835
//# sourceMappingURL=QueueScheduler.js.map
148836
 
148837
 
148838
/***/ }),
148839
 
148840
/***/ "./node_modules/rxjs/_esm5/internal/scheduler/VirtualTimeScheduler.js":
148841
/*!****************************************************************************!*\
148842
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/VirtualTimeScheduler.js ***!
148843
  \****************************************************************************/
148844
/*! exports provided: VirtualTimeScheduler, VirtualAction */
148845
/***/ (function(module, __webpack_exports__, __webpack_require__) {
148846
 
148847
"use strict";
148848
__webpack_require__.r(__webpack_exports__);
148849
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function() { return VirtualTimeScheduler; });
148850
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualAction", function() { return VirtualAction; });
148851
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
148852
/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsyncAction */ "./node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js");
148853
/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AsyncScheduler */ "./node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js");
148854
/** PURE_IMPORTS_START tslib,_AsyncAction,_AsyncScheduler PURE_IMPORTS_END */
148855
 
148856
 
148857
 
148858
var VirtualTimeScheduler = /*@__PURE__*/ (function (_super) {
148859
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](VirtualTimeScheduler, _super);
148860
    function VirtualTimeScheduler(SchedulerAction, maxFrames) {
148861
        if (SchedulerAction === void 0) {
148862
            SchedulerAction = VirtualAction;
148863
        }
148864
        if (maxFrames === void 0) {
148865
            maxFrames = Number.POSITIVE_INFINITY;
148866
        }
148867
        var _this = _super.call(this, SchedulerAction, function () { return _this.frame; }) || this;
148868
        _this.maxFrames = maxFrames;
148869
        _this.frame = 0;
148870
        _this.index = -1;
148871
        return _this;
148872
    }
148873
    /**
148874
     * Prompt the Scheduler to execute all of its queued actions, therefore
148875
     * clearing its queue.
148876
     * @return {void}
148877
     */
148878
    VirtualTimeScheduler.prototype.flush = function () {
148879
        var _a = this, actions = _a.actions, maxFrames = _a.maxFrames;
148880
        var error, action;
148881
        while ((action = actions.shift()) && (this.frame = action.delay) <= maxFrames) {
148882
            if (error = action.execute(action.state, action.delay)) {
148883
                break;
148884
            }
148885
        }
148886
        if (error) {
148887
            while (action = actions.shift()) {
148888
                action.unsubscribe();
148889
            }
148890
            throw error;
148891
        }
148892
    };
148893
    VirtualTimeScheduler.frameTimeFactor = 10;
148894
    return VirtualTimeScheduler;
148895
}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_2__["AsyncScheduler"]));
148896
 
148897
/**
148898
 * We need this JSDoc comment for affecting ESDoc.
148899
 * @ignore
148900
 * @extends {Ignored}
148901
 */
148902
var VirtualAction = /*@__PURE__*/ (function (_super) {
148903
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](VirtualAction, _super);
148904
    function VirtualAction(scheduler, work, index) {
148905
        if (index === void 0) {
148906
            index = scheduler.index += 1;
148907
        }
148908
        var _this = _super.call(this, scheduler, work) || this;
148909
        _this.scheduler = scheduler;
148910
        _this.work = work;
148911
        _this.index = index;
148912
        _this.active = true;
148913
        _this.index = scheduler.index = index;
148914
        return _this;
148915
    }
148916
    VirtualAction.prototype.schedule = function (state, delay) {
148917
        if (delay === void 0) {
148918
            delay = 0;
148919
        }
148920
        if (!this.id) {
148921
            return _super.prototype.schedule.call(this, state, delay);
148922
        }
148923
        this.active = false;
148924
        // If an action is rescheduled, we save allocations by mutating its state,
148925
        // pushing it to the end of the scheduler queue, and recycling the action.
148926
        // But since the VirtualTimeScheduler is used for testing, VirtualActions
148927
        // must be immutable so they can be inspected later.
148928
        var action = new VirtualAction(this.scheduler, this.work);
148929
        this.add(action);
148930
        return action.schedule(state, delay);
148931
    };
148932
    VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) {
148933
        if (delay === void 0) {
148934
            delay = 0;
148935
        }
148936
        this.delay = scheduler.frame + delay;
148937
        var actions = scheduler.actions;
148938
        actions.push(this);
148939
        actions.sort(VirtualAction.sortActions);
148940
        return true;
148941
    };
148942
    VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
148943
        if (delay === void 0) {
148944
            delay = 0;
148945
        }
148946
        return undefined;
148947
    };
148948
    VirtualAction.prototype._execute = function (state, delay) {
148949
        if (this.active === true) {
148950
            return _super.prototype._execute.call(this, state, delay);
148951
        }
148952
    };
148953
    VirtualAction.sortActions = function (a, b) {
148954
        if (a.delay === b.delay) {
148955
            if (a.index === b.index) {
148956
                return 0;
148957
            }
148958
            else if (a.index > b.index) {
148959
                return 1;
148960
            }
148961
            else {
148962
                return -1;
148963
            }
148964
        }
148965
        else if (a.delay > b.delay) {
148966
            return 1;
148967
        }
148968
        else {
148969
            return -1;
148970
        }
148971
    };
148972
    return VirtualAction;
148973
}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]));
148974
 
148975
//# sourceMappingURL=VirtualTimeScheduler.js.map
148976
 
148977
 
148978
/***/ }),
148979
 
148980
/***/ "./node_modules/rxjs/_esm5/internal/scheduler/animationFrame.js":
148981
/*!**********************************************************************!*\
148982
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/animationFrame.js ***!
148983
  \**********************************************************************/
148984
/*! exports provided: animationFrame */
148985
/***/ (function(module, __webpack_exports__, __webpack_require__) {
148986
 
148987
"use strict";
148988
__webpack_require__.r(__webpack_exports__);
148989
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animationFrame", function() { return animationFrame; });
148990
/* harmony import */ var _AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AnimationFrameAction */ "./node_modules/rxjs/_esm5/internal/scheduler/AnimationFrameAction.js");
148991
/* harmony import */ var _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AnimationFrameScheduler */ "./node_modules/rxjs/_esm5/internal/scheduler/AnimationFrameScheduler.js");
148992
/** PURE_IMPORTS_START _AnimationFrameAction,_AnimationFrameScheduler PURE_IMPORTS_END */
148993
 
148994
 
148995
/**
148996
 *
148997
 * Animation Frame Scheduler
148998
 *
148999
 * <span class="informal">Perform task when `window.requestAnimationFrame` would fire</span>
149000
 *
149001
 * When `animationFrame` scheduler is used with delay, it will fall back to {@link async} scheduler
149002
 * behaviour.
149003
 *
149004
 * Without delay, `animationFrame` scheduler can be used to create smooth browser animations.
149005
 * It makes sure scheduled task will happen just before next browser content repaint,
149006
 * thus performing animations as efficiently as possible.
149007
 *
149008
 * @example <caption>Schedule div height animation</caption>
149009
 * const div = document.querySelector('.some-div');
149010
 *
149011
 * Rx.Scheduler.animationFrame.schedule(function(height) {
149012
 *   div.style.height = height + "px";
149013
 *
149014
 *   this.schedule(height + 1);  // `this` references currently executing Action,
149015
 *                               // which we reschedule with new state
149016
 * }, 0, 0);
149017
 *
149018
 * // You will see .some-div element growing in height
149019
 *
149020
 *
149021
 * @static true
149022
 * @name animationFrame
149023
 * @owner Scheduler
149024
 */
149025
var animationFrame = /*@__PURE__*/ new _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__["AnimationFrameScheduler"](_AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__["AnimationFrameAction"]);
149026
//# sourceMappingURL=animationFrame.js.map
149027
 
149028
 
149029
/***/ }),
149030
 
149031
/***/ "./node_modules/rxjs/_esm5/internal/scheduler/asap.js":
149032
/*!************************************************************!*\
149033
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/asap.js ***!
149034
  \************************************************************/
149035
/*! exports provided: asap */
149036
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149037
 
149038
"use strict";
149039
__webpack_require__.r(__webpack_exports__);
149040
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asap", function() { return asap; });
149041
/* harmony import */ var _AsapAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsapAction */ "./node_modules/rxjs/_esm5/internal/scheduler/AsapAction.js");
149042
/* harmony import */ var _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsapScheduler */ "./node_modules/rxjs/_esm5/internal/scheduler/AsapScheduler.js");
149043
/** PURE_IMPORTS_START _AsapAction,_AsapScheduler PURE_IMPORTS_END */
149044
 
149045
 
149046
/**
149047
 *
149048
 * Asap Scheduler
149049
 *
149050
 * <span class="informal">Perform task as fast as it can be performed asynchronously</span>
149051
 *
149052
 * `asap` scheduler behaves the same as {@link async} scheduler when you use it to delay task
149053
 * in time. If however you set delay to `0`, `asap` will wait for current synchronously executing
149054
 * code to end and then it will try to execute given task as fast as possible.
149055
 *
149056
 * `asap` scheduler will do its best to minimize time between end of currently executing code
149057
 * and start of scheduled task. This makes it best candidate for performing so called "deferring".
149058
 * Traditionally this was achieved by calling `setTimeout(deferredTask, 0)`, but that technique involves
149059
 * some (although minimal) unwanted delay.
149060
 *
149061
 * Note that using `asap` scheduler does not necessarily mean that your task will be first to process
149062
 * after currently executing code. In particular, if some task was also scheduled with `asap` before,
149063
 * that task will execute first. That being said, if you need to schedule task asynchronously, but
149064
 * as soon as possible, `asap` scheduler is your best bet.
149065
 *
149066
 * @example <caption>Compare async and asap scheduler</caption>
149067
 *
149068
 * Rx.Scheduler.async.schedule(() => console.log('async')); // scheduling 'async' first...
149069
 * Rx.Scheduler.asap.schedule(() => console.log('asap'));
149070
 *
149071
 * // Logs:
149072
 * // "asap"
149073
 * // "async"
149074
 * // ... but 'asap' goes first!
149075
 *
149076
 * @static true
149077
 * @name asap
149078
 * @owner Scheduler
149079
 */
149080
var asap = /*@__PURE__*/ new _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__["AsapScheduler"](_AsapAction__WEBPACK_IMPORTED_MODULE_0__["AsapAction"]);
149081
//# sourceMappingURL=asap.js.map
149082
 
149083
 
149084
/***/ }),
149085
 
149086
/***/ "./node_modules/rxjs/_esm5/internal/scheduler/async.js":
149087
/*!*************************************************************!*\
149088
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/async.js ***!
149089
  \*************************************************************/
149090
/*! exports provided: async */
149091
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149092
 
149093
"use strict";
149094
__webpack_require__.r(__webpack_exports__);
149095
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "async", function() { return async; });
149096
/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsyncAction */ "./node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js");
149097
/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsyncScheduler */ "./node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js");
149098
/** PURE_IMPORTS_START _AsyncAction,_AsyncScheduler PURE_IMPORTS_END */
149099
 
149100
 
149101
/**
149102
 *
149103
 * Async Scheduler
149104
 *
149105
 * <span class="informal">Schedule task as if you used setTimeout(task, duration)</span>
149106
 *
149107
 * `async` scheduler schedules tasks asynchronously, by putting them on the JavaScript
149108
 * event loop queue. It is best used to delay tasks in time or to schedule tasks repeating
149109
 * in intervals.
149110
 *
149111
 * If you just want to "defer" task, that is to perform it right after currently
149112
 * executing synchronous code ends (commonly achieved by `setTimeout(deferredTask, 0)`),
149113
 * better choice will be the {@link asap} scheduler.
149114
 *
149115
 * @example <caption>Use async scheduler to delay task</caption>
149116
 * const task = () => console.log('it works!');
149117
 *
149118
 * Rx.Scheduler.async.schedule(task, 2000);
149119
 *
149120
 * // After 2 seconds logs:
149121
 * // "it works!"
149122
 *
149123
 *
149124
 * @example <caption>Use async scheduler to repeat task in intervals</caption>
149125
 * function task(state) {
149126
 *   console.log(state);
149127
 *   this.schedule(state + 1, 1000); // `this` references currently executing Action,
149128
 *                                   // which we reschedule with new state and delay
149129
 * }
149130
 *
149131
 * Rx.Scheduler.async.schedule(task, 3000, 0);
149132
 *
149133
 * // Logs:
149134
 * // 0 after 3s
149135
 * // 1 after 4s
149136
 * // 2 after 5s
149137
 * // 3 after 6s
149138
 *
149139
 * @static true
149140
 * @name async
149141
 * @owner Scheduler
149142
 */
149143
var async = /*@__PURE__*/ new _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"](_AsyncAction__WEBPACK_IMPORTED_MODULE_0__["AsyncAction"]);
149144
//# sourceMappingURL=async.js.map
149145
 
149146
 
149147
/***/ }),
149148
 
149149
/***/ "./node_modules/rxjs/_esm5/internal/scheduler/queue.js":
149150
/*!*************************************************************!*\
149151
  !*** ./node_modules/rxjs/_esm5/internal/scheduler/queue.js ***!
149152
  \*************************************************************/
149153
/*! exports provided: queue */
149154
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149155
 
149156
"use strict";
149157
__webpack_require__.r(__webpack_exports__);
149158
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queue", function() { return queue; });
149159
/* harmony import */ var _QueueAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./QueueAction */ "./node_modules/rxjs/_esm5/internal/scheduler/QueueAction.js");
149160
/* harmony import */ var _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./QueueScheduler */ "./node_modules/rxjs/_esm5/internal/scheduler/QueueScheduler.js");
149161
/** PURE_IMPORTS_START _QueueAction,_QueueScheduler PURE_IMPORTS_END */
149162
 
149163
 
149164
/**
149165
 *
149166
 * Queue Scheduler
149167
 *
149168
 * <span class="informal">Put every next task on a queue, instead of executing it immediately</span>
149169
 *
149170
 * `queue` scheduler, when used with delay, behaves the same as {@link async} scheduler.
149171
 *
149172
 * When used without delay, it schedules given task synchronously - executes it right when
149173
 * it is scheduled. However when called recursively, that is when inside the scheduled task,
149174
 * another task is scheduled with queue scheduler, instead of executing immediately as well,
149175
 * that task will be put on a queue and wait for current one to finish.
149176
 *
149177
 * This means that when you execute task with `queue` scheduler, you are sure it will end
149178
 * before any other task scheduled with that scheduler will start.
149179
 *
149180
 * @examples <caption>Schedule recursively first, then do something</caption>
149181
 *
149182
 * Rx.Scheduler.queue.schedule(() => {
149183
 *   Rx.Scheduler.queue.schedule(() => console.log('second')); // will not happen now, but will be put on a queue
149184
 *
149185
 *   console.log('first');
149186
 * });
149187
 *
149188
 * // Logs:
149189
 * // "first"
149190
 * // "second"
149191
 *
149192
 *
149193
 * @example <caption>Reschedule itself recursively</caption>
149194
 *
149195
 * Rx.Scheduler.queue.schedule(function(state) {
149196
 *   if (state !== 0) {
149197
 *     console.log('before', state);
149198
 *     this.schedule(state - 1); // `this` references currently executing Action,
149199
 *                               // which we reschedule with new state
149200
 *     console.log('after', state);
149201
 *   }
149202
 * }, 0, 3);
149203
 *
149204
 * // In scheduler that runs recursively, you would expect:
149205
 * // "before", 3
149206
 * // "before", 2
149207
 * // "before", 1
149208
 * // "after", 1
149209
 * // "after", 2
149210
 * // "after", 3
149211
 *
149212
 * // But with queue it logs:
149213
 * // "before", 3
149214
 * // "after", 3
149215
 * // "before", 2
149216
 * // "after", 2
149217
 * // "before", 1
149218
 * // "after", 1
149219
 *
149220
 *
149221
 * @static true
149222
 * @name queue
149223
 * @owner Scheduler
149224
 */
149225
var queue = /*@__PURE__*/ new _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__["QueueScheduler"](_QueueAction__WEBPACK_IMPORTED_MODULE_0__["QueueAction"]);
149226
//# sourceMappingURL=queue.js.map
149227
 
149228
 
149229
/***/ }),
149230
 
149231
/***/ "./node_modules/rxjs/_esm5/internal/symbol/iterator.js":
149232
/*!*************************************************************!*\
149233
  !*** ./node_modules/rxjs/_esm5/internal/symbol/iterator.js ***!
149234
  \*************************************************************/
149235
/*! exports provided: getSymbolIterator, iterator, $$iterator */
149236
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149237
 
149238
"use strict";
149239
__webpack_require__.r(__webpack_exports__);
149240
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSymbolIterator", function() { return getSymbolIterator; });
149241
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iterator", function() { return iterator; });
149242
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$$iterator", function() { return $$iterator; });
149243
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
149244
function getSymbolIterator() {
149245
    if (typeof Symbol !== 'function' || !Symbol.iterator) {
149246
        return '@@iterator';
149247
    }
149248
    return Symbol.iterator;
149249
}
149250
var iterator = /*@__PURE__*/ getSymbolIterator();
149251
/**
149252
 * @deprecated use {@link iterator} instead
149253
 */
149254
var $$iterator = iterator;
149255
//# sourceMappingURL=iterator.js.map
149256
 
149257
 
149258
/***/ }),
149259
 
149260
/***/ "./node_modules/rxjs/_esm5/internal/symbol/observable.js":
149261
/*!***************************************************************!*\
149262
  !*** ./node_modules/rxjs/_esm5/internal/symbol/observable.js ***!
149263
  \***************************************************************/
149264
/*! exports provided: observable */
149265
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149266
 
149267
"use strict";
149268
__webpack_require__.r(__webpack_exports__);
149269
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "observable", function() { return observable; });
149270
/** Symbol.observable or a string "@@observable". Used for interop */
149271
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
149272
var observable = typeof Symbol === 'function' && Symbol.observable || '@@observable';
149273
//# sourceMappingURL=observable.js.map
149274
 
149275
 
149276
/***/ }),
149277
 
149278
/***/ "./node_modules/rxjs/_esm5/internal/symbol/rxSubscriber.js":
149279
/*!*****************************************************************!*\
149280
  !*** ./node_modules/rxjs/_esm5/internal/symbol/rxSubscriber.js ***!
149281
  \*****************************************************************/
149282
/*! exports provided: rxSubscriber, $$rxSubscriber */
149283
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149284
 
149285
"use strict";
149286
__webpack_require__.r(__webpack_exports__);
149287
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rxSubscriber", function() { return rxSubscriber; });
149288
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$$rxSubscriber", function() { return $$rxSubscriber; });
149289
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
149290
var rxSubscriber = (typeof Symbol === 'function' && typeof Symbol.for === 'function')
149291
    ? /*@__PURE__*/ Symbol.for('rxSubscriber')
149292
    : '@@rxSubscriber';
149293
/**
149294
 * @deprecated use rxSubscriber instead
149295
 */
149296
var $$rxSubscriber = rxSubscriber;
149297
//# sourceMappingURL=rxSubscriber.js.map
149298
 
149299
 
149300
/***/ }),
149301
 
149302
/***/ "./node_modules/rxjs/_esm5/internal/util/ArgumentOutOfRangeError.js":
149303
/*!**************************************************************************!*\
149304
  !*** ./node_modules/rxjs/_esm5/internal/util/ArgumentOutOfRangeError.js ***!
149305
  \**************************************************************************/
149306
/*! exports provided: ArgumentOutOfRangeError */
149307
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149308
 
149309
"use strict";
149310
__webpack_require__.r(__webpack_exports__);
149311
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return ArgumentOutOfRangeError; });
149312
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
149313
/** PURE_IMPORTS_START tslib PURE_IMPORTS_END */
149314
 
149315
/**
149316
 * An error thrown when an element was queried at a certain index of an
149317
 * Observable, but no such index or position exists in that sequence.
149318
 *
149319
 * @see {@link elementAt}
149320
 * @see {@link take}
149321
 * @see {@link takeLast}
149322
 *
149323
 * @class ArgumentOutOfRangeError
149324
 */
149325
var ArgumentOutOfRangeError = /*@__PURE__*/ (function (_super) {
149326
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ArgumentOutOfRangeError, _super);
149327
    function ArgumentOutOfRangeError() {
149328
        var _this = _super.call(this, 'argument out of range') || this;
149329
        _this.name = 'ArgumentOutOfRangeError';
149330
        Object.setPrototypeOf(_this, ArgumentOutOfRangeError.prototype);
149331
        return _this;
149332
    }
149333
    return ArgumentOutOfRangeError;
149334
}(Error));
149335
 
149336
//# sourceMappingURL=ArgumentOutOfRangeError.js.map
149337
 
149338
 
149339
/***/ }),
149340
 
149341
/***/ "./node_modules/rxjs/_esm5/internal/util/EmptyError.js":
149342
/*!*************************************************************!*\
149343
  !*** ./node_modules/rxjs/_esm5/internal/util/EmptyError.js ***!
149344
  \*************************************************************/
149345
/*! exports provided: EmptyError */
149346
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149347
 
149348
"use strict";
149349
__webpack_require__.r(__webpack_exports__);
149350
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return EmptyError; });
149351
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
149352
/** PURE_IMPORTS_START tslib PURE_IMPORTS_END */
149353
 
149354
/**
149355
 * An error thrown when an Observable or a sequence was queried but has no
149356
 * elements.
149357
 *
149358
 * @see {@link first}
149359
 * @see {@link last}
149360
 * @see {@link single}
149361
 *
149362
 * @class EmptyError
149363
 */
149364
var EmptyError = /*@__PURE__*/ (function (_super) {
149365
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](EmptyError, _super);
149366
    function EmptyError() {
149367
        var _this = _super.call(this, 'no elements in sequence') || this;
149368
        _this.name = 'EmptyError';
149369
        Object.setPrototypeOf(_this, EmptyError.prototype);
149370
        return _this;
149371
    }
149372
    return EmptyError;
149373
}(Error));
149374
 
149375
//# sourceMappingURL=EmptyError.js.map
149376
 
149377
 
149378
/***/ }),
149379
 
149380
/***/ "./node_modules/rxjs/_esm5/internal/util/Immediate.js":
149381
/*!************************************************************!*\
149382
  !*** ./node_modules/rxjs/_esm5/internal/util/Immediate.js ***!
149383
  \************************************************************/
149384
/*! exports provided: Immediate */
149385
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149386
 
149387
"use strict";
149388
__webpack_require__.r(__webpack_exports__);
149389
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Immediate", function() { return Immediate; });
149390
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
149391
var nextHandle = 0;
149392
var tasksByHandle = {};
149393
function runIfPresent(handle) {
149394
    var cb = tasksByHandle[handle];
149395
    if (cb) {
149396
        cb();
149397
    }
149398
}
149399
var Immediate = {
149400
    setImmediate: function (cb) {
149401
        var handle = nextHandle++;
149402
        tasksByHandle[handle] = cb;
149403
        Promise.resolve().then(function () { return runIfPresent(handle); });
149404
        return handle;
149405
    },
149406
    clearImmediate: function (handle) {
149407
        delete tasksByHandle[handle];
149408
    },
149409
};
149410
//# sourceMappingURL=Immediate.js.map
149411
 
149412
 
149413
/***/ }),
149414
 
149415
/***/ "./node_modules/rxjs/_esm5/internal/util/ObjectUnsubscribedError.js":
149416
/*!**************************************************************************!*\
149417
  !*** ./node_modules/rxjs/_esm5/internal/util/ObjectUnsubscribedError.js ***!
149418
  \**************************************************************************/
149419
/*! exports provided: ObjectUnsubscribedError */
149420
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149421
 
149422
"use strict";
149423
__webpack_require__.r(__webpack_exports__);
149424
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return ObjectUnsubscribedError; });
149425
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
149426
/** PURE_IMPORTS_START tslib PURE_IMPORTS_END */
149427
 
149428
/**
149429
 * An error thrown when an action is invalid because the object has been
149430
 * unsubscribed.
149431
 *
149432
 * @see {@link Subject}
149433
 * @see {@link BehaviorSubject}
149434
 *
149435
 * @class ObjectUnsubscribedError
149436
 */
149437
var ObjectUnsubscribedError = /*@__PURE__*/ (function (_super) {
149438
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ObjectUnsubscribedError, _super);
149439
    function ObjectUnsubscribedError() {
149440
        var _this = _super.call(this, 'object unsubscribed') || this;
149441
        _this.name = 'ObjectUnsubscribedError';
149442
        Object.setPrototypeOf(_this, ObjectUnsubscribedError.prototype);
149443
        return _this;
149444
    }
149445
    return ObjectUnsubscribedError;
149446
}(Error));
149447
 
149448
//# sourceMappingURL=ObjectUnsubscribedError.js.map
149449
 
149450
 
149451
/***/ }),
149452
 
149453
/***/ "./node_modules/rxjs/_esm5/internal/util/TimeoutError.js":
149454
/*!***************************************************************!*\
149455
  !*** ./node_modules/rxjs/_esm5/internal/util/TimeoutError.js ***!
149456
  \***************************************************************/
149457
/*! exports provided: TimeoutError */
149458
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149459
 
149460
"use strict";
149461
__webpack_require__.r(__webpack_exports__);
149462
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return TimeoutError; });
149463
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
149464
/** PURE_IMPORTS_START tslib PURE_IMPORTS_END */
149465
 
149466
/**
149467
 * An error thrown when duetime elapses.
149468
 *
149469
 * @see {@link timeout}
149470
 *
149471
 * @class TimeoutError
149472
 */
149473
var TimeoutError = /*@__PURE__*/ (function (_super) {
149474
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TimeoutError, _super);
149475
    function TimeoutError() {
149476
        var _this = _super.call(this, 'Timeout has occurred') || this;
149477
        Object.setPrototypeOf(_this, TimeoutError.prototype);
149478
        return _this;
149479
    }
149480
    return TimeoutError;
149481
}(Error));
149482
 
149483
//# sourceMappingURL=TimeoutError.js.map
149484
 
149485
 
149486
/***/ }),
149487
 
149488
/***/ "./node_modules/rxjs/_esm5/internal/util/UnsubscriptionError.js":
149489
/*!**********************************************************************!*\
149490
  !*** ./node_modules/rxjs/_esm5/internal/util/UnsubscriptionError.js ***!
149491
  \**********************************************************************/
149492
/*! exports provided: UnsubscriptionError */
149493
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149494
 
149495
"use strict";
149496
__webpack_require__.r(__webpack_exports__);
149497
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function() { return UnsubscriptionError; });
149498
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
149499
/** PURE_IMPORTS_START tslib PURE_IMPORTS_END */
149500
 
149501
/**
149502
 * An error thrown when one or more errors have occurred during the
149503
 * `unsubscribe` of a {@link Subscription}.
149504
 */
149505
var UnsubscriptionError = /*@__PURE__*/ (function (_super) {
149506
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](UnsubscriptionError, _super);
149507
    function UnsubscriptionError(errors) {
149508
        var _this = _super.call(this, errors ?
149509
            errors.length + " errors occurred during unsubscription:\n  " + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n  ') : '') || this;
149510
        _this.errors = errors;
149511
        _this.name = 'UnsubscriptionError';
149512
        Object.setPrototypeOf(_this, UnsubscriptionError.prototype);
149513
        return _this;
149514
    }
149515
    return UnsubscriptionError;
149516
}(Error));
149517
 
149518
//# sourceMappingURL=UnsubscriptionError.js.map
149519
 
149520
 
149521
/***/ }),
149522
 
149523
/***/ "./node_modules/rxjs/_esm5/internal/util/errorObject.js":
149524
/*!**************************************************************!*\
149525
  !*** ./node_modules/rxjs/_esm5/internal/util/errorObject.js ***!
149526
  \**************************************************************/
149527
/*! exports provided: errorObject */
149528
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149529
 
149530
"use strict";
149531
__webpack_require__.r(__webpack_exports__);
149532
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "errorObject", function() { return errorObject; });
149533
// typeof any so that it we don't have to cast when comparing a result to the error object
149534
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
149535
var errorObject = { e: {} };
149536
//# sourceMappingURL=errorObject.js.map
149537
 
149538
 
149539
/***/ }),
149540
 
149541
/***/ "./node_modules/rxjs/_esm5/internal/util/hostReportError.js":
149542
/*!******************************************************************!*\
149543
  !*** ./node_modules/rxjs/_esm5/internal/util/hostReportError.js ***!
149544
  \******************************************************************/
149545
/*! exports provided: hostReportError */
149546
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149547
 
149548
"use strict";
149549
__webpack_require__.r(__webpack_exports__);
149550
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hostReportError", function() { return hostReportError; });
149551
/**
149552
 * Throws an error on another job so that it's picked up by the runtime's
149553
 * uncaught error handling mechanism.
149554
 * @param err the error to throw
149555
 */
149556
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
149557
function hostReportError(err) {
149558
    setTimeout(function () { throw err; });
149559
}
149560
//# sourceMappingURL=hostReportError.js.map
149561
 
149562
 
149563
/***/ }),
149564
 
149565
/***/ "./node_modules/rxjs/_esm5/internal/util/identity.js":
149566
/*!***********************************************************!*\
149567
  !*** ./node_modules/rxjs/_esm5/internal/util/identity.js ***!
149568
  \***********************************************************/
149569
/*! exports provided: identity */
149570
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149571
 
149572
"use strict";
149573
__webpack_require__.r(__webpack_exports__);
149574
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; });
149575
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
149576
function identity(x) {
149577
    return x;
149578
}
149579
//# sourceMappingURL=identity.js.map
149580
 
149581
 
149582
/***/ }),
149583
 
149584
/***/ "./node_modules/rxjs/_esm5/internal/util/isArray.js":
149585
/*!**********************************************************!*\
149586
  !*** ./node_modules/rxjs/_esm5/internal/util/isArray.js ***!
149587
  \**********************************************************/
149588
/*! exports provided: isArray */
149589
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149590
 
149591
"use strict";
149592
__webpack_require__.r(__webpack_exports__);
149593
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArray", function() { return isArray; });
149594
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
149595
var isArray = Array.isArray || (function (x) { return x && typeof x.length === 'number'; });
149596
//# sourceMappingURL=isArray.js.map
149597
 
149598
 
149599
/***/ }),
149600
 
149601
/***/ "./node_modules/rxjs/_esm5/internal/util/isArrayLike.js":
149602
/*!**************************************************************!*\
149603
  !*** ./node_modules/rxjs/_esm5/internal/util/isArrayLike.js ***!
149604
  \**************************************************************/
149605
/*! exports provided: isArrayLike */
149606
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149607
 
149608
"use strict";
149609
__webpack_require__.r(__webpack_exports__);
149610
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArrayLike", function() { return isArrayLike; });
149611
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
149612
var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; });
149613
//# sourceMappingURL=isArrayLike.js.map
149614
 
149615
 
149616
/***/ }),
149617
 
149618
/***/ "./node_modules/rxjs/_esm5/internal/util/isDate.js":
149619
/*!*********************************************************!*\
149620
  !*** ./node_modules/rxjs/_esm5/internal/util/isDate.js ***!
149621
  \*********************************************************/
149622
/*! exports provided: isDate */
149623
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149624
 
149625
"use strict";
149626
__webpack_require__.r(__webpack_exports__);
149627
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDate", function() { return isDate; });
149628
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
149629
function isDate(value) {
149630
    return value instanceof Date && !isNaN(+value);
149631
}
149632
//# sourceMappingURL=isDate.js.map
149633
 
149634
 
149635
/***/ }),
149636
 
149637
/***/ "./node_modules/rxjs/_esm5/internal/util/isFunction.js":
149638
/*!*************************************************************!*\
149639
  !*** ./node_modules/rxjs/_esm5/internal/util/isFunction.js ***!
149640
  \*************************************************************/
149641
/*! exports provided: isFunction */
149642
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149643
 
149644
"use strict";
149645
__webpack_require__.r(__webpack_exports__);
149646
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFunction", function() { return isFunction; });
149647
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
149648
function isFunction(x) {
149649
    return typeof x === 'function';
149650
}
149651
//# sourceMappingURL=isFunction.js.map
149652
 
149653
 
149654
/***/ }),
149655
 
149656
/***/ "./node_modules/rxjs/_esm5/internal/util/isIterable.js":
149657
/*!*************************************************************!*\
149658
  !*** ./node_modules/rxjs/_esm5/internal/util/isIterable.js ***!
149659
  \*************************************************************/
149660
/*! exports provided: isIterable */
149661
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149662
 
149663
"use strict";
149664
__webpack_require__.r(__webpack_exports__);
149665
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isIterable", function() { return isIterable; });
149666
/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../symbol/iterator */ "./node_modules/rxjs/_esm5/internal/symbol/iterator.js");
149667
/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */
149668
 
149669
/** Identifies an input as being an Iterable */
149670
function isIterable(input) {
149671
    return input && typeof input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__["iterator"]] === 'function';
149672
}
149673
//# sourceMappingURL=isIterable.js.map
149674
 
149675
 
149676
/***/ }),
149677
 
149678
/***/ "./node_modules/rxjs/_esm5/internal/util/isNumeric.js":
149679
/*!************************************************************!*\
149680
  !*** ./node_modules/rxjs/_esm5/internal/util/isNumeric.js ***!
149681
  \************************************************************/
149682
/*! exports provided: isNumeric */
149683
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149684
 
149685
"use strict";
149686
__webpack_require__.r(__webpack_exports__);
149687
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNumeric", function() { return isNumeric; });
149688
/* harmony import */ var _isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isArray */ "./node_modules/rxjs/_esm5/internal/util/isArray.js");
149689
/** PURE_IMPORTS_START _isArray PURE_IMPORTS_END */
149690
 
149691
function isNumeric(val) {
149692
    // parseFloat NaNs numeric-cast false positives (null|true|false|"")
149693
    // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
149694
    // subtraction forces infinities to NaN
149695
    // adding 1 corrects loss of precision from parseFloat (#15100)
149696
    return !Object(_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(val) && (val - parseFloat(val) + 1) >= 0;
149697
}
149698
//# sourceMappingURL=isNumeric.js.map
149699
 
149700
 
149701
/***/ }),
149702
 
149703
/***/ "./node_modules/rxjs/_esm5/internal/util/isObject.js":
149704
/*!***********************************************************!*\
149705
  !*** ./node_modules/rxjs/_esm5/internal/util/isObject.js ***!
149706
  \***********************************************************/
149707
/*! exports provided: isObject */
149708
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149709
 
149710
"use strict";
149711
__webpack_require__.r(__webpack_exports__);
149712
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObject", function() { return isObject; });
149713
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
149714
function isObject(x) {
149715
    return x != null && typeof x === 'object';
149716
}
149717
//# sourceMappingURL=isObject.js.map
149718
 
149719
 
149720
/***/ }),
149721
 
149722
/***/ "./node_modules/rxjs/_esm5/internal/util/isObservable.js":
149723
/*!***************************************************************!*\
149724
  !*** ./node_modules/rxjs/_esm5/internal/util/isObservable.js ***!
149725
  \***************************************************************/
149726
/*! exports provided: isObservable */
149727
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149728
 
149729
"use strict";
149730
__webpack_require__.r(__webpack_exports__);
149731
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return isObservable; });
149732
/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../symbol/observable */ "./node_modules/rxjs/_esm5/internal/symbol/observable.js");
149733
/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */
149734
 
149735
/** Identifies an input as being Observable (but not necessary an Rx Observable) */
149736
function isObservable(input) {
149737
    return input && typeof input[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__["observable"]] === 'function';
149738
}
149739
//# sourceMappingURL=isObservable.js.map
149740
 
149741
 
149742
/***/ }),
149743
 
149744
/***/ "./node_modules/rxjs/_esm5/internal/util/isPromise.js":
149745
/*!************************************************************!*\
149746
  !*** ./node_modules/rxjs/_esm5/internal/util/isPromise.js ***!
149747
  \************************************************************/
149748
/*! exports provided: isPromise */
149749
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149750
 
149751
"use strict";
149752
__webpack_require__.r(__webpack_exports__);
149753
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPromise", function() { return isPromise; });
149754
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
149755
function isPromise(value) {
149756
    return value && typeof value.subscribe !== 'function' && typeof value.then === 'function';
149757
}
149758
//# sourceMappingURL=isPromise.js.map
149759
 
149760
 
149761
/***/ }),
149762
 
149763
/***/ "./node_modules/rxjs/_esm5/internal/util/isScheduler.js":
149764
/*!**************************************************************!*\
149765
  !*** ./node_modules/rxjs/_esm5/internal/util/isScheduler.js ***!
149766
  \**************************************************************/
149767
/*! exports provided: isScheduler */
149768
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149769
 
149770
"use strict";
149771
__webpack_require__.r(__webpack_exports__);
149772
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isScheduler", function() { return isScheduler; });
149773
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
149774
function isScheduler(value) {
149775
    return value && typeof value.schedule === 'function';
149776
}
149777
//# sourceMappingURL=isScheduler.js.map
149778
 
149779
 
149780
/***/ }),
149781
 
149782
/***/ "./node_modules/rxjs/_esm5/internal/util/noop.js":
149783
/*!*******************************************************!*\
149784
  !*** ./node_modules/rxjs/_esm5/internal/util/noop.js ***!
149785
  \*******************************************************/
149786
/*! exports provided: noop */
149787
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149788
 
149789
"use strict";
149790
__webpack_require__.r(__webpack_exports__);
149791
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return noop; });
149792
/* tslint:disable:no-empty */
149793
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
149794
function noop() { }
149795
//# sourceMappingURL=noop.js.map
149796
 
149797
 
149798
/***/ }),
149799
 
149800
/***/ "./node_modules/rxjs/_esm5/internal/util/not.js":
149801
/*!******************************************************!*\
149802
  !*** ./node_modules/rxjs/_esm5/internal/util/not.js ***!
149803
  \******************************************************/
149804
/*! exports provided: not */
149805
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149806
 
149807
"use strict";
149808
__webpack_require__.r(__webpack_exports__);
149809
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "not", function() { return not; });
149810
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
149811
function not(pred, thisArg) {
149812
    function notPred() {
149813
        return !(notPred.pred.apply(notPred.thisArg, arguments));
149814
    }
149815
    notPred.pred = pred;
149816
    notPred.thisArg = thisArg;
149817
    return notPred;
149818
}
149819
//# sourceMappingURL=not.js.map
149820
 
149821
 
149822
/***/ }),
149823
 
149824
/***/ "./node_modules/rxjs/_esm5/internal/util/pipe.js":
149825
/*!*******************************************************!*\
149826
  !*** ./node_modules/rxjs/_esm5/internal/util/pipe.js ***!
149827
  \*******************************************************/
149828
/*! exports provided: pipe, pipeFromArray */
149829
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149830
 
149831
"use strict";
149832
__webpack_require__.r(__webpack_exports__);
149833
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return pipe; });
149834
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pipeFromArray", function() { return pipeFromArray; });
149835
/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./noop */ "./node_modules/rxjs/_esm5/internal/util/noop.js");
149836
/** PURE_IMPORTS_START _noop PURE_IMPORTS_END */
149837
 
149838
/* tslint:enable:max-line-length */
149839
function pipe() {
149840
    var fns = [];
149841
    for (var _i = 0; _i < arguments.length; _i++) {
149842
        fns[_i] = arguments[_i];
149843
    }
149844
    return pipeFromArray(fns);
149845
}
149846
/* @internal */
149847
function pipeFromArray(fns) {
149848
    if (!fns) {
149849
        return _noop__WEBPACK_IMPORTED_MODULE_0__["noop"];
149850
    }
149851
    if (fns.length === 1) {
149852
        return fns[0];
149853
    }
149854
    return function piped(input) {
149855
        return fns.reduce(function (prev, fn) { return fn(prev); }, input);
149856
    };
149857
}
149858
//# sourceMappingURL=pipe.js.map
149859
 
149860
 
149861
/***/ }),
149862
 
149863
/***/ "./node_modules/rxjs/_esm5/internal/util/subscribeTo.js":
149864
/*!**************************************************************!*\
149865
  !*** ./node_modules/rxjs/_esm5/internal/util/subscribeTo.js ***!
149866
  \**************************************************************/
149867
/*! exports provided: subscribeTo */
149868
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149869
 
149870
"use strict";
149871
__webpack_require__.r(__webpack_exports__);
149872
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeTo", function() { return subscribeTo; });
149873
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "./node_modules/rxjs/_esm5/internal/Observable.js");
149874
/* harmony import */ var _subscribeToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./subscribeToArray */ "./node_modules/rxjs/_esm5/internal/util/subscribeToArray.js");
149875
/* harmony import */ var _subscribeToPromise__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./subscribeToPromise */ "./node_modules/rxjs/_esm5/internal/util/subscribeToPromise.js");
149876
/* harmony import */ var _subscribeToIterable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./subscribeToIterable */ "./node_modules/rxjs/_esm5/internal/util/subscribeToIterable.js");
149877
/* harmony import */ var _subscribeToObservable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./subscribeToObservable */ "./node_modules/rxjs/_esm5/internal/util/subscribeToObservable.js");
149878
/* harmony import */ var _isArrayLike__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./isArrayLike */ "./node_modules/rxjs/_esm5/internal/util/isArrayLike.js");
149879
/* harmony import */ var _isPromise__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./isPromise */ "./node_modules/rxjs/_esm5/internal/util/isPromise.js");
149880
/* harmony import */ var _isObject__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./isObject */ "./node_modules/rxjs/_esm5/internal/util/isObject.js");
149881
/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../symbol/iterator */ "./node_modules/rxjs/_esm5/internal/symbol/iterator.js");
149882
/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../symbol/observable */ "./node_modules/rxjs/_esm5/internal/symbol/observable.js");
149883
/** PURE_IMPORTS_START _Observable,_subscribeToArray,_subscribeToPromise,_subscribeToIterable,_subscribeToObservable,_isArrayLike,_isPromise,_isObject,_symbol_iterator,_symbol_observable PURE_IMPORTS_END */
149884
 
149885
 
149886
 
149887
 
149888
 
149889
 
149890
 
149891
 
149892
 
149893
 
149894
var subscribeTo = function (result) {
149895
    if (result instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]) {
149896
        return function (subscriber) {
149897
            if (result._isScalar) {
149898
                subscriber.next(result.value);
149899
                subscriber.complete();
149900
                return undefined;
149901
            }
149902
            else {
149903
                return result.subscribe(subscriber);
149904
            }
149905
        };
149906
    }
149907
    else if (Object(_isArrayLike__WEBPACK_IMPORTED_MODULE_5__["isArrayLike"])(result)) {
149908
        return Object(_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__["subscribeToArray"])(result);
149909
    }
149910
    else if (Object(_isPromise__WEBPACK_IMPORTED_MODULE_6__["isPromise"])(result)) {
149911
        return Object(_subscribeToPromise__WEBPACK_IMPORTED_MODULE_2__["subscribeToPromise"])(result);
149912
    }
149913
    else if (result && typeof result[_symbol_iterator__WEBPACK_IMPORTED_MODULE_8__["iterator"]] === 'function') {
149914
        return Object(_subscribeToIterable__WEBPACK_IMPORTED_MODULE_3__["subscribeToIterable"])(result);
149915
    }
149916
    else if (result && typeof result[_symbol_observable__WEBPACK_IMPORTED_MODULE_9__["observable"]] === 'function') {
149917
        return Object(_subscribeToObservable__WEBPACK_IMPORTED_MODULE_4__["subscribeToObservable"])(result);
149918
    }
149919
    else {
149920
        var value = Object(_isObject__WEBPACK_IMPORTED_MODULE_7__["isObject"])(result) ? 'an invalid object' : "'" + result + "'";
149921
        var msg = "You provided " + value + " where a stream was expected."
149922
            + ' You can provide an Observable, Promise, Array, or Iterable.';
149923
        throw new TypeError(msg);
149924
    }
149925
};
149926
//# sourceMappingURL=subscribeTo.js.map
149927
 
149928
 
149929
/***/ }),
149930
 
149931
/***/ "./node_modules/rxjs/_esm5/internal/util/subscribeToArray.js":
149932
/*!*******************************************************************!*\
149933
  !*** ./node_modules/rxjs/_esm5/internal/util/subscribeToArray.js ***!
149934
  \*******************************************************************/
149935
/*! exports provided: subscribeToArray */
149936
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149937
 
149938
"use strict";
149939
__webpack_require__.r(__webpack_exports__);
149940
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToArray", function() { return subscribeToArray; });
149941
/**
149942
 * Subscribes to an ArrayLike with a subscriber
149943
 * @param array The array or array-like to subscribe to
149944
 */
149945
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
149946
var subscribeToArray = function (array) {
149947
    return function (subscriber) {
149948
        for (var i = 0, len = array.length; i < len && !subscriber.closed; i++) {
149949
            subscriber.next(array[i]);
149950
        }
149951
        if (!subscriber.closed) {
149952
            subscriber.complete();
149953
        }
149954
    };
149955
};
149956
//# sourceMappingURL=subscribeToArray.js.map
149957
 
149958
 
149959
/***/ }),
149960
 
149961
/***/ "./node_modules/rxjs/_esm5/internal/util/subscribeToIterable.js":
149962
/*!**********************************************************************!*\
149963
  !*** ./node_modules/rxjs/_esm5/internal/util/subscribeToIterable.js ***!
149964
  \**********************************************************************/
149965
/*! exports provided: subscribeToIterable */
149966
/***/ (function(module, __webpack_exports__, __webpack_require__) {
149967
 
149968
"use strict";
149969
__webpack_require__.r(__webpack_exports__);
149970
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToIterable", function() { return subscribeToIterable; });
149971
/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../symbol/iterator */ "./node_modules/rxjs/_esm5/internal/symbol/iterator.js");
149972
/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */
149973
 
149974
var subscribeToIterable = function (iterable) {
149975
    return function (subscriber) {
149976
        var iterator = iterable[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__["iterator"]]();
149977
        do {
149978
            var item = iterator.next();
149979
            if (item.done) {
149980
                subscriber.complete();
149981
                break;
149982
            }
149983
            subscriber.next(item.value);
149984
            if (subscriber.closed) {
149985
                break;
149986
            }
149987
        } while (true);
149988
        // Finalize the iterator if it happens to be a Generator
149989
        if (typeof iterator.return === 'function') {
149990
            subscriber.add(function () {
149991
                if (iterator.return) {
149992
                    iterator.return();
149993
                }
149994
            });
149995
        }
149996
        return subscriber;
149997
    };
149998
};
149999
//# sourceMappingURL=subscribeToIterable.js.map
150000
 
150001
 
150002
/***/ }),
150003
 
150004
/***/ "./node_modules/rxjs/_esm5/internal/util/subscribeToObservable.js":
150005
/*!************************************************************************!*\
150006
  !*** ./node_modules/rxjs/_esm5/internal/util/subscribeToObservable.js ***!
150007
  \************************************************************************/
150008
/*! exports provided: subscribeToObservable */
150009
/***/ (function(module, __webpack_exports__, __webpack_require__) {
150010
 
150011
"use strict";
150012
__webpack_require__.r(__webpack_exports__);
150013
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToObservable", function() { return subscribeToObservable; });
150014
/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../symbol/observable */ "./node_modules/rxjs/_esm5/internal/symbol/observable.js");
150015
/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */
150016
 
150017
/**
150018
 * Subscribes to an object that implements Symbol.observable with the given
150019
 * Subscriber.
150020
 * @param obj An object that implements Symbol.observable
150021
 */
150022
var subscribeToObservable = function (obj) {
150023
    return function (subscriber) {
150024
        var obs = obj[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__["observable"]]();
150025
        if (typeof obs.subscribe !== 'function') {
150026
            // Should be caught by observable subscribe function error handling.
150027
            throw new TypeError('Provided object does not correctly implement Symbol.observable');
150028
        }
150029
        else {
150030
            return obs.subscribe(subscriber);
150031
        }
150032
    };
150033
};
150034
//# sourceMappingURL=subscribeToObservable.js.map
150035
 
150036
 
150037
/***/ }),
150038
 
150039
/***/ "./node_modules/rxjs/_esm5/internal/util/subscribeToPromise.js":
150040
/*!*********************************************************************!*\
150041
  !*** ./node_modules/rxjs/_esm5/internal/util/subscribeToPromise.js ***!
150042
  \*********************************************************************/
150043
/*! exports provided: subscribeToPromise */
150044
/***/ (function(module, __webpack_exports__, __webpack_require__) {
150045
 
150046
"use strict";
150047
__webpack_require__.r(__webpack_exports__);
150048
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToPromise", function() { return subscribeToPromise; });
150049
/* harmony import */ var _hostReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hostReportError */ "./node_modules/rxjs/_esm5/internal/util/hostReportError.js");
150050
/** PURE_IMPORTS_START _hostReportError PURE_IMPORTS_END */
150051
 
150052
var subscribeToPromise = function (promise) {
150053
    return function (subscriber) {
150054
        promise.then(function (value) {
150055
            if (!subscriber.closed) {
150056
                subscriber.next(value);
150057
                subscriber.complete();
150058
            }
150059
        }, function (err) { return subscriber.error(err); })
150060
            .then(null, _hostReportError__WEBPACK_IMPORTED_MODULE_0__["hostReportError"]);
150061
        return subscriber;
150062
    };
150063
};
150064
//# sourceMappingURL=subscribeToPromise.js.map
150065
 
150066
 
150067
/***/ }),
150068
 
150069
/***/ "./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js":
150070
/*!********************************************************************!*\
150071
  !*** ./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js ***!
150072
  \********************************************************************/
150073
/*! exports provided: subscribeToResult */
150074
/***/ (function(module, __webpack_exports__, __webpack_require__) {
150075
 
150076
"use strict";
150077
__webpack_require__.r(__webpack_exports__);
150078
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToResult", function() { return subscribeToResult; });
150079
/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../InnerSubscriber */ "./node_modules/rxjs/_esm5/internal/InnerSubscriber.js");
150080
/* harmony import */ var _subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./subscribeTo */ "./node_modules/rxjs/_esm5/internal/util/subscribeTo.js");
150081
/** PURE_IMPORTS_START _InnerSubscriber,_subscribeTo PURE_IMPORTS_END */
150082
 
150083
 
150084
function subscribeToResult(outerSubscriber, result, outerValue, outerIndex) {
150085
    var destination = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__["InnerSubscriber"](outerSubscriber, outerValue, outerIndex);
150086
    return Object(_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(result)(destination);
150087
}
150088
//# sourceMappingURL=subscribeToResult.js.map
150089
 
150090
 
150091
/***/ }),
150092
 
150093
/***/ "./node_modules/rxjs/_esm5/internal/util/toSubscriber.js":
150094
/*!***************************************************************!*\
150095
  !*** ./node_modules/rxjs/_esm5/internal/util/toSubscriber.js ***!
150096
  \***************************************************************/
150097
/*! exports provided: toSubscriber */
150098
/***/ (function(module, __webpack_exports__, __webpack_require__) {
150099
 
150100
"use strict";
150101
__webpack_require__.r(__webpack_exports__);
150102
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toSubscriber", function() { return toSubscriber; });
150103
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "./node_modules/rxjs/_esm5/internal/Subscriber.js");
150104
/* harmony import */ var _symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../symbol/rxSubscriber */ "./node_modules/rxjs/_esm5/internal/symbol/rxSubscriber.js");
150105
/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Observer */ "./node_modules/rxjs/_esm5/internal/Observer.js");
150106
/** PURE_IMPORTS_START _Subscriber,_symbol_rxSubscriber,_Observer PURE_IMPORTS_END */
150107
 
150108
 
150109
 
150110
function toSubscriber(nextOrObserver, error, complete) {
150111
    if (nextOrObserver) {
150112
        if (nextOrObserver instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]) {
150113
            return nextOrObserver;
150114
        }
150115
        if (nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__["rxSubscriber"]]) {
150116
            return nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__["rxSubscriber"]]();
150117
        }
150118
    }
150119
    if (!nextOrObserver && !error && !complete) {
150120
        return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](_Observer__WEBPACK_IMPORTED_MODULE_2__["empty"]);
150121
    }
150122
    return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](nextOrObserver, error, complete);
150123
}
150124
//# sourceMappingURL=toSubscriber.js.map
150125
 
150126
 
150127
/***/ }),
150128
 
150129
/***/ "./node_modules/rxjs/_esm5/internal/util/tryCatch.js":
150130
/*!***********************************************************!*\
150131
  !*** ./node_modules/rxjs/_esm5/internal/util/tryCatch.js ***!
150132
  \***********************************************************/
150133
/*! exports provided: tryCatch */
150134
/***/ (function(module, __webpack_exports__, __webpack_require__) {
150135
 
150136
"use strict";
150137
__webpack_require__.r(__webpack_exports__);
150138
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tryCatch", function() { return tryCatch; });
150139
/* harmony import */ var _errorObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./errorObject */ "./node_modules/rxjs/_esm5/internal/util/errorObject.js");
150140
/** PURE_IMPORTS_START _errorObject PURE_IMPORTS_END */
150141
 
150142
var tryCatchTarget;
150143
function tryCatcher() {
150144
    try {
150145
        return tryCatchTarget.apply(this, arguments);
150146
    }
150147
    catch (e) {
150148
        _errorObject__WEBPACK_IMPORTED_MODULE_0__["errorObject"].e = e;
150149
        return _errorObject__WEBPACK_IMPORTED_MODULE_0__["errorObject"];
150150
    }
150151
}
150152
function tryCatch(fn) {
150153
    tryCatchTarget = fn;
150154
    return tryCatcher;
150155
}
150156
//# sourceMappingURL=tryCatch.js.map
150157
 
150158
 
150159
/***/ }),
150160
 
150161
/***/ "./node_modules/rxjs/_esm5/operators/index.js":
150162
/*!****************************************************!*\
150163
  !*** ./node_modules/rxjs/_esm5/operators/index.js ***!
150164
  \****************************************************/
150165
/*! exports provided: audit, auditTime, buffer, bufferCount, bufferTime, bufferToggle, bufferWhen, catchError, combineAll, combineLatest, concat, concatAll, concatMap, concatMapTo, count, debounce, debounceTime, defaultIfEmpty, delay, delayWhen, dematerialize, distinct, distinctUntilChanged, distinctUntilKeyChanged, elementAt, every, exhaust, exhaustMap, expand, filter, finalize, find, findIndex, first, groupBy, ignoreElements, isEmpty, last, map, mapTo, materialize, max, merge, mergeAll, mergeMap, flatMap, mergeMapTo, mergeScan, min, multicast, observeOn, onErrorResumeNext, pairwise, partition, pluck, publish, publishBehavior, publishLast, publishReplay, race, reduce, repeat, repeatWhen, retry, retryWhen, refCount, sample, sampleTime, scan, sequenceEqual, share, shareReplay, single, skip, skipLast, skipUntil, skipWhile, startWith, subscribeOn, switchAll, switchMap, switchMapTo, take, takeLast, takeUntil, takeWhile, tap, throttle, throttleTime, throwIfEmpty, timeInterval, timeout, timeoutWith, timestamp, toArray, window, windowCount, windowTime, windowToggle, windowWhen, withLatestFrom, zip, zipAll */
150166
/***/ (function(module, __webpack_exports__, __webpack_require__) {
150167
 
150168
"use strict";
150169
__webpack_require__.r(__webpack_exports__);
150170
/* harmony import */ var _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../internal/operators/audit */ "./node_modules/rxjs/_esm5/internal/operators/audit.js");
150171
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__["audit"]; });
150172
 
150173
/* harmony import */ var _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../internal/operators/auditTime */ "./node_modules/rxjs/_esm5/internal/operators/auditTime.js");
150174
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__["auditTime"]; });
150175
 
150176
/* harmony import */ var _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../internal/operators/buffer */ "./node_modules/rxjs/_esm5/internal/operators/buffer.js");
150177
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__["buffer"]; });
150178
 
150179
/* harmony import */ var _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../internal/operators/bufferCount */ "./node_modules/rxjs/_esm5/internal/operators/bufferCount.js");
150180
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__["bufferCount"]; });
150181
 
150182
/* harmony import */ var _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../internal/operators/bufferTime */ "./node_modules/rxjs/_esm5/internal/operators/bufferTime.js");
150183
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__["bufferTime"]; });
150184
 
150185
/* harmony import */ var _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../internal/operators/bufferToggle */ "./node_modules/rxjs/_esm5/internal/operators/bufferToggle.js");
150186
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__["bufferToggle"]; });
150187
 
150188
/* harmony import */ var _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../internal/operators/bufferWhen */ "./node_modules/rxjs/_esm5/internal/operators/bufferWhen.js");
150189
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__["bufferWhen"]; });
150190
 
150191
/* harmony import */ var _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../internal/operators/catchError */ "./node_modules/rxjs/_esm5/internal/operators/catchError.js");
150192
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__["catchError"]; });
150193
 
150194
/* harmony import */ var _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../internal/operators/combineAll */ "./node_modules/rxjs/_esm5/internal/operators/combineAll.js");
150195
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__["combineAll"]; });
150196
 
150197
/* harmony import */ var _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../internal/operators/combineLatest */ "./node_modules/rxjs/_esm5/internal/operators/combineLatest.js");
150198
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__["combineLatest"]; });
150199
 
150200
/* harmony import */ var _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../internal/operators/concat */ "./node_modules/rxjs/_esm5/internal/operators/concat.js");
150201
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__["concat"]; });
150202
 
150203
/* harmony import */ var _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../internal/operators/concatAll */ "./node_modules/rxjs/_esm5/internal/operators/concatAll.js");
150204
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__["concatAll"]; });
150205
 
150206
/* harmony import */ var _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../internal/operators/concatMap */ "./node_modules/rxjs/_esm5/internal/operators/concatMap.js");
150207
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__["concatMap"]; });
150208
 
150209
/* harmony import */ var _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../internal/operators/concatMapTo */ "./node_modules/rxjs/_esm5/internal/operators/concatMapTo.js");
150210
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__["concatMapTo"]; });
150211
 
150212
/* harmony import */ var _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../internal/operators/count */ "./node_modules/rxjs/_esm5/internal/operators/count.js");
150213
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "count", function() { return _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__["count"]; });
150214
 
150215
/* harmony import */ var _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../internal/operators/debounce */ "./node_modules/rxjs/_esm5/internal/operators/debounce.js");
150216
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__["debounce"]; });
150217
 
150218
/* harmony import */ var _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../internal/operators/debounceTime */ "./node_modules/rxjs/_esm5/internal/operators/debounceTime.js");
150219
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__["debounceTime"]; });
150220
 
150221
/* harmony import */ var _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../internal/operators/defaultIfEmpty */ "./node_modules/rxjs/_esm5/internal/operators/defaultIfEmpty.js");
150222
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__["defaultIfEmpty"]; });
150223
 
150224
/* harmony import */ var _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../internal/operators/delay */ "./node_modules/rxjs/_esm5/internal/operators/delay.js");
150225
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__["delay"]; });
150226
 
150227
/* harmony import */ var _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../internal/operators/delayWhen */ "./node_modules/rxjs/_esm5/internal/operators/delayWhen.js");
150228
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__["delayWhen"]; });
150229
 
150230
/* harmony import */ var _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../internal/operators/dematerialize */ "./node_modules/rxjs/_esm5/internal/operators/dematerialize.js");
150231
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__["dematerialize"]; });
150232
 
150233
/* harmony import */ var _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../internal/operators/distinct */ "./node_modules/rxjs/_esm5/internal/operators/distinct.js");
150234
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__["distinct"]; });
150235
 
150236
/* harmony import */ var _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../internal/operators/distinctUntilChanged */ "./node_modules/rxjs/_esm5/internal/operators/distinctUntilChanged.js");
150237
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__["distinctUntilChanged"]; });
150238
 
150239
/* harmony import */ var _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../internal/operators/distinctUntilKeyChanged */ "./node_modules/rxjs/_esm5/internal/operators/distinctUntilKeyChanged.js");
150240
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__["distinctUntilKeyChanged"]; });
150241
 
150242
/* harmony import */ var _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../internal/operators/elementAt */ "./node_modules/rxjs/_esm5/internal/operators/elementAt.js");
150243
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__["elementAt"]; });
150244
 
150245
/* harmony import */ var _internal_operators_every__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../internal/operators/every */ "./node_modules/rxjs/_esm5/internal/operators/every.js");
150246
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "every", function() { return _internal_operators_every__WEBPACK_IMPORTED_MODULE_25__["every"]; });
150247
 
150248
/* harmony import */ var _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../internal/operators/exhaust */ "./node_modules/rxjs/_esm5/internal/operators/exhaust.js");
150249
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_26__["exhaust"]; });
150250
 
150251
/* harmony import */ var _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../internal/operators/exhaustMap */ "./node_modules/rxjs/_esm5/internal/operators/exhaustMap.js");
150252
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_27__["exhaustMap"]; });
150253
 
150254
/* harmony import */ var _internal_operators_expand__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../internal/operators/expand */ "./node_modules/rxjs/_esm5/internal/operators/expand.js");
150255
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return _internal_operators_expand__WEBPACK_IMPORTED_MODULE_28__["expand"]; });
150256
 
150257
/* harmony import */ var _internal_operators_filter__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../internal/operators/filter */ "./node_modules/rxjs/_esm5/internal/operators/filter.js");
150258
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return _internal_operators_filter__WEBPACK_IMPORTED_MODULE_29__["filter"]; });
150259
 
150260
/* harmony import */ var _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../internal/operators/finalize */ "./node_modules/rxjs/_esm5/internal/operators/finalize.js");
150261
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_30__["finalize"]; });
150262
 
150263
/* harmony import */ var _internal_operators_find__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../internal/operators/find */ "./node_modules/rxjs/_esm5/internal/operators/find.js");
150264
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "find", function() { return _internal_operators_find__WEBPACK_IMPORTED_MODULE_31__["find"]; });
150265
 
150266
/* harmony import */ var _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../internal/operators/findIndex */ "./node_modules/rxjs/_esm5/internal/operators/findIndex.js");
150267
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_32__["findIndex"]; });
150268
 
150269
/* harmony import */ var _internal_operators_first__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../internal/operators/first */ "./node_modules/rxjs/_esm5/internal/operators/first.js");
150270
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "first", function() { return _internal_operators_first__WEBPACK_IMPORTED_MODULE_33__["first"]; });
150271
 
150272
/* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../internal/operators/groupBy */ "./node_modules/rxjs/_esm5/internal/operators/groupBy.js");
150273
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_34__["groupBy"]; });
150274
 
150275
/* harmony import */ var _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../internal/operators/ignoreElements */ "./node_modules/rxjs/_esm5/internal/operators/ignoreElements.js");
150276
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_35__["ignoreElements"]; });
150277
 
150278
/* harmony import */ var _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../internal/operators/isEmpty */ "./node_modules/rxjs/_esm5/internal/operators/isEmpty.js");
150279
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_36__["isEmpty"]; });
150280
 
150281
/* harmony import */ var _internal_operators_last__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../internal/operators/last */ "./node_modules/rxjs/_esm5/internal/operators/last.js");
150282
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "last", function() { return _internal_operators_last__WEBPACK_IMPORTED_MODULE_37__["last"]; });
150283
 
150284
/* harmony import */ var _internal_operators_map__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../internal/operators/map */ "./node_modules/rxjs/_esm5/internal/operators/map.js");
150285
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return _internal_operators_map__WEBPACK_IMPORTED_MODULE_38__["map"]; });
150286
 
150287
/* harmony import */ var _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../internal/operators/mapTo */ "./node_modules/rxjs/_esm5/internal/operators/mapTo.js");
150288
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_39__["mapTo"]; });
150289
 
150290
/* harmony import */ var _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../internal/operators/materialize */ "./node_modules/rxjs/_esm5/internal/operators/materialize.js");
150291
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_40__["materialize"]; });
150292
 
150293
/* harmony import */ var _internal_operators_max__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ../internal/operators/max */ "./node_modules/rxjs/_esm5/internal/operators/max.js");
150294
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return _internal_operators_max__WEBPACK_IMPORTED_MODULE_41__["max"]; });
150295
 
150296
/* harmony import */ var _internal_operators_merge__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../internal/operators/merge */ "./node_modules/rxjs/_esm5/internal/operators/merge.js");
150297
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_operators_merge__WEBPACK_IMPORTED_MODULE_42__["merge"]; });
150298
 
150299
/* harmony import */ var _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../internal/operators/mergeAll */ "./node_modules/rxjs/_esm5/internal/operators/mergeAll.js");
150300
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_43__["mergeAll"]; });
150301
 
150302
/* harmony import */ var _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../internal/operators/mergeMap */ "./node_modules/rxjs/_esm5/internal/operators/mergeMap.js");
150303
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_44__["mergeMap"]; });
150304
 
150305
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flatMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_44__["mergeMap"]; });
150306
 
150307
/* harmony import */ var _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../internal/operators/mergeMapTo */ "./node_modules/rxjs/_esm5/internal/operators/mergeMapTo.js");
150308
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_45__["mergeMapTo"]; });
150309
 
150310
/* harmony import */ var _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ../internal/operators/mergeScan */ "./node_modules/rxjs/_esm5/internal/operators/mergeScan.js");
150311
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_46__["mergeScan"]; });
150312
 
150313
/* harmony import */ var _internal_operators_min__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ../internal/operators/min */ "./node_modules/rxjs/_esm5/internal/operators/min.js");
150314
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return _internal_operators_min__WEBPACK_IMPORTED_MODULE_47__["min"]; });
150315
 
150316
/* harmony import */ var _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ../internal/operators/multicast */ "./node_modules/rxjs/_esm5/internal/operators/multicast.js");
150317
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_48__["multicast"]; });
150318
 
150319
/* harmony import */ var _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ../internal/operators/observeOn */ "./node_modules/rxjs/_esm5/internal/operators/observeOn.js");
150320
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_49__["observeOn"]; });
150321
 
150322
/* harmony import */ var _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ../internal/operators/onErrorResumeNext */ "./node_modules/rxjs/_esm5/internal/operators/onErrorResumeNext.js");
150323
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_50__["onErrorResumeNext"]; });
150324
 
150325
/* harmony import */ var _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ../internal/operators/pairwise */ "./node_modules/rxjs/_esm5/internal/operators/pairwise.js");
150326
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_51__["pairwise"]; });
150327
 
150328
/* harmony import */ var _internal_operators_partition__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ../internal/operators/partition */ "./node_modules/rxjs/_esm5/internal/operators/partition.js");
150329
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _internal_operators_partition__WEBPACK_IMPORTED_MODULE_52__["partition"]; });
150330
 
150331
/* harmony import */ var _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ../internal/operators/pluck */ "./node_modules/rxjs/_esm5/internal/operators/pluck.js");
150332
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_53__["pluck"]; });
150333
 
150334
/* harmony import */ var _internal_operators_publish__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ../internal/operators/publish */ "./node_modules/rxjs/_esm5/internal/operators/publish.js");
150335
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return _internal_operators_publish__WEBPACK_IMPORTED_MODULE_54__["publish"]; });
150336
 
150337
/* harmony import */ var _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ../internal/operators/publishBehavior */ "./node_modules/rxjs/_esm5/internal/operators/publishBehavior.js");
150338
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_55__["publishBehavior"]; });
150339
 
150340
/* harmony import */ var _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ../internal/operators/publishLast */ "./node_modules/rxjs/_esm5/internal/operators/publishLast.js");
150341
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_56__["publishLast"]; });
150342
 
150343
/* harmony import */ var _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ../internal/operators/publishReplay */ "./node_modules/rxjs/_esm5/internal/operators/publishReplay.js");
150344
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_57__["publishReplay"]; });
150345
 
150346
/* harmony import */ var _internal_operators_race__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ../internal/operators/race */ "./node_modules/rxjs/_esm5/internal/operators/race.js");
150347
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_operators_race__WEBPACK_IMPORTED_MODULE_58__["race"]; });
150348
 
150349
/* harmony import */ var _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ../internal/operators/reduce */ "./node_modules/rxjs/_esm5/internal/operators/reduce.js");
150350
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_59__["reduce"]; });
150351
 
150352
/* harmony import */ var _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ../internal/operators/repeat */ "./node_modules/rxjs/_esm5/internal/operators/repeat.js");
150353
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_60__["repeat"]; });
150354
 
150355
/* harmony import */ var _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ../internal/operators/repeatWhen */ "./node_modules/rxjs/_esm5/internal/operators/repeatWhen.js");
150356
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_61__["repeatWhen"]; });
150357
 
150358
/* harmony import */ var _internal_operators_retry__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ../internal/operators/retry */ "./node_modules/rxjs/_esm5/internal/operators/retry.js");
150359
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return _internal_operators_retry__WEBPACK_IMPORTED_MODULE_62__["retry"]; });
150360
 
150361
/* harmony import */ var _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ../internal/operators/retryWhen */ "./node_modules/rxjs/_esm5/internal/operators/retryWhen.js");
150362
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_63__["retryWhen"]; });
150363
 
150364
/* harmony import */ var _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ../internal/operators/refCount */ "./node_modules/rxjs/_esm5/internal/operators/refCount.js");
150365
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_64__["refCount"]; });
150366
 
150367
/* harmony import */ var _internal_operators_sample__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ../internal/operators/sample */ "./node_modules/rxjs/_esm5/internal/operators/sample.js");
150368
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return _internal_operators_sample__WEBPACK_IMPORTED_MODULE_65__["sample"]; });
150369
 
150370
/* harmony import */ var _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ../internal/operators/sampleTime */ "./node_modules/rxjs/_esm5/internal/operators/sampleTime.js");
150371
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_66__["sampleTime"]; });
150372
 
150373
/* harmony import */ var _internal_operators_scan__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ../internal/operators/scan */ "./node_modules/rxjs/_esm5/internal/operators/scan.js");
150374
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return _internal_operators_scan__WEBPACK_IMPORTED_MODULE_67__["scan"]; });
150375
 
150376
/* harmony import */ var _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ../internal/operators/sequenceEqual */ "./node_modules/rxjs/_esm5/internal/operators/sequenceEqual.js");
150377
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_68__["sequenceEqual"]; });
150378
 
150379
/* harmony import */ var _internal_operators_share__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ../internal/operators/share */ "./node_modules/rxjs/_esm5/internal/operators/share.js");
150380
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "share", function() { return _internal_operators_share__WEBPACK_IMPORTED_MODULE_69__["share"]; });
150381
 
150382
/* harmony import */ var _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ../internal/operators/shareReplay */ "./node_modules/rxjs/_esm5/internal/operators/shareReplay.js");
150383
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_70__["shareReplay"]; });
150384
 
150385
/* harmony import */ var _internal_operators_single__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ../internal/operators/single */ "./node_modules/rxjs/_esm5/internal/operators/single.js");
150386
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "single", function() { return _internal_operators_single__WEBPACK_IMPORTED_MODULE_71__["single"]; });
150387
 
150388
/* harmony import */ var _internal_operators_skip__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ../internal/operators/skip */ "./node_modules/rxjs/_esm5/internal/operators/skip.js");
150389
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return _internal_operators_skip__WEBPACK_IMPORTED_MODULE_72__["skip"]; });
150390
 
150391
/* harmony import */ var _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ../internal/operators/skipLast */ "./node_modules/rxjs/_esm5/internal/operators/skipLast.js");
150392
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_73__["skipLast"]; });
150393
 
150394
/* harmony import */ var _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ../internal/operators/skipUntil */ "./node_modules/rxjs/_esm5/internal/operators/skipUntil.js");
150395
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_74__["skipUntil"]; });
150396
 
150397
/* harmony import */ var _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ../internal/operators/skipWhile */ "./node_modules/rxjs/_esm5/internal/operators/skipWhile.js");
150398
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_75__["skipWhile"]; });
150399
 
150400
/* harmony import */ var _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ../internal/operators/startWith */ "./node_modules/rxjs/_esm5/internal/operators/startWith.js");
150401
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_76__["startWith"]; });
150402
 
150403
/* harmony import */ var _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ../internal/operators/subscribeOn */ "./node_modules/rxjs/_esm5/internal/operators/subscribeOn.js");
150404
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_77__["subscribeOn"]; });
150405
 
150406
/* harmony import */ var _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ../internal/operators/switchAll */ "./node_modules/rxjs/_esm5/internal/operators/switchAll.js");
150407
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_78__["switchAll"]; });
150408
 
150409
/* harmony import */ var _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ../internal/operators/switchMap */ "./node_modules/rxjs/_esm5/internal/operators/switchMap.js");
150410
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_79__["switchMap"]; });
150411
 
150412
/* harmony import */ var _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ../internal/operators/switchMapTo */ "./node_modules/rxjs/_esm5/internal/operators/switchMapTo.js");
150413
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_80__["switchMapTo"]; });
150414
 
150415
/* harmony import */ var _internal_operators_take__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(/*! ../internal/operators/take */ "./node_modules/rxjs/_esm5/internal/operators/take.js");
150416
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "take", function() { return _internal_operators_take__WEBPACK_IMPORTED_MODULE_81__["take"]; });
150417
 
150418
/* harmony import */ var _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(/*! ../internal/operators/takeLast */ "./node_modules/rxjs/_esm5/internal/operators/takeLast.js");
150419
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_82__["takeLast"]; });
150420
 
150421
/* harmony import */ var _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(/*! ../internal/operators/takeUntil */ "./node_modules/rxjs/_esm5/internal/operators/takeUntil.js");
150422
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_83__["takeUntil"]; });
150423
 
150424
/* harmony import */ var _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(/*! ../internal/operators/takeWhile */ "./node_modules/rxjs/_esm5/internal/operators/takeWhile.js");
150425
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_84__["takeWhile"]; });
150426
 
150427
/* harmony import */ var _internal_operators_tap__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(/*! ../internal/operators/tap */ "./node_modules/rxjs/_esm5/internal/operators/tap.js");
150428
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return _internal_operators_tap__WEBPACK_IMPORTED_MODULE_85__["tap"]; });
150429
 
150430
/* harmony import */ var _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(/*! ../internal/operators/throttle */ "./node_modules/rxjs/_esm5/internal/operators/throttle.js");
150431
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_86__["throttle"]; });
150432
 
150433
/* harmony import */ var _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(/*! ../internal/operators/throttleTime */ "./node_modules/rxjs/_esm5/internal/operators/throttleTime.js");
150434
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_87__["throttleTime"]; });
150435
 
150436
/* harmony import */ var _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(/*! ../internal/operators/throwIfEmpty */ "./node_modules/rxjs/_esm5/internal/operators/throwIfEmpty.js");
150437
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_88__["throwIfEmpty"]; });
150438
 
150439
/* harmony import */ var _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(/*! ../internal/operators/timeInterval */ "./node_modules/rxjs/_esm5/internal/operators/timeInterval.js");
150440
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_89__["timeInterval"]; });
150441
 
150442
/* harmony import */ var _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(/*! ../internal/operators/timeout */ "./node_modules/rxjs/_esm5/internal/operators/timeout.js");
150443
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_90__["timeout"]; });
150444
 
150445
/* harmony import */ var _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(/*! ../internal/operators/timeoutWith */ "./node_modules/rxjs/_esm5/internal/operators/timeoutWith.js");
150446
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_91__["timeoutWith"]; });
150447
 
150448
/* harmony import */ var _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(/*! ../internal/operators/timestamp */ "./node_modules/rxjs/_esm5/internal/operators/timestamp.js");
150449
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_92__["timestamp"]; });
150450
 
150451
/* harmony import */ var _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(/*! ../internal/operators/toArray */ "./node_modules/rxjs/_esm5/internal/operators/toArray.js");
150452
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_93__["toArray"]; });
150453
 
150454
/* harmony import */ var _internal_operators_window__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(/*! ../internal/operators/window */ "./node_modules/rxjs/_esm5/internal/operators/window.js");
150455
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return _internal_operators_window__WEBPACK_IMPORTED_MODULE_94__["window"]; });
150456
 
150457
/* harmony import */ var _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(/*! ../internal/operators/windowCount */ "./node_modules/rxjs/_esm5/internal/operators/windowCount.js");
150458
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_95__["windowCount"]; });
150459
 
150460
/* harmony import */ var _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(/*! ../internal/operators/windowTime */ "./node_modules/rxjs/_esm5/internal/operators/windowTime.js");
150461
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_96__["windowTime"]; });
150462
 
150463
/* harmony import */ var _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(/*! ../internal/operators/windowToggle */ "./node_modules/rxjs/_esm5/internal/operators/windowToggle.js");
150464
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_97__["windowToggle"]; });
150465
 
150466
/* harmony import */ var _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(/*! ../internal/operators/windowWhen */ "./node_modules/rxjs/_esm5/internal/operators/windowWhen.js");
150467
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_98__["windowWhen"]; });
150468
 
150469
/* harmony import */ var _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(/*! ../internal/operators/withLatestFrom */ "./node_modules/rxjs/_esm5/internal/operators/withLatestFrom.js");
150470
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_99__["withLatestFrom"]; });
150471
 
150472
/* harmony import */ var _internal_operators_zip__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(/*! ../internal/operators/zip */ "./node_modules/rxjs/_esm5/internal/operators/zip.js");
150473
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_operators_zip__WEBPACK_IMPORTED_MODULE_100__["zip"]; });
150474
 
150475
/* harmony import */ var _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(/*! ../internal/operators/zipAll */ "./node_modules/rxjs/_esm5/internal/operators/zipAll.js");
150476
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_101__["zipAll"]; });
150477
 
150478
/* Operator exports */
150479
/** PURE_IMPORTS_START  PURE_IMPORTS_END */
150480
 
150481
 
150482
 
150483
 
150484
 
150485
 
150486
 
150487
 
150488
 
150489
 
150490
 
150491
 
150492
 
150493
 
150494
 
150495
 
150496
 
150497
 
150498
 
150499
 
150500
 
150501
 
150502
 
150503
 
150504
 
150505
 
150506
 
150507
 
150508
 
150509
 
150510
 
150511
 
150512
 
150513
 
150514
 
150515
 
150516
 
150517
 
150518
 
150519
 
150520
 
150521
 
150522
 
150523
 
150524
 
150525
 
150526
 
150527
 
150528
 
150529
 
150530
 
150531
 
150532
 
150533
 
150534
 
150535
 
150536
 
150537
 
150538
 
150539
 
150540
 
150541
 
150542
 
150543
 
150544
 
150545
 
150546
 
150547
 
150548
 
150549
 
150550
 
150551
 
150552
 
150553
 
150554
 
150555
 
150556
 
150557
 
150558
 
150559
 
150560
 
150561
 
150562
 
150563
 
150564
 
150565
 
150566
 
150567
 
150568
 
150569
 
150570
 
150571
 
150572
 
150573
 
150574
 
150575
 
150576
 
150577
 
150578
 
150579
 
150580
 
150581
 
150582
 
150583
//# sourceMappingURL=index.js.map
150584
 
150585
 
150586
/***/ }),
150587
 
150588
/***/ "./node_modules/tslib/tslib.es6.js":
150589
/*!*****************************************!*\
150590
  !*** ./node_modules/tslib/tslib.es6.js ***!
150591
  \*****************************************/
150592
/*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault */
150593
/***/ (function(module, __webpack_exports__, __webpack_require__) {
150594
 
150595
"use strict";
150596
__webpack_require__.r(__webpack_exports__);
150597
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__extends", function() { return __extends; });
150598
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__assign", function() { return __assign; });
150599
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__rest", function() { return __rest; });
150600
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__decorate", function() { return __decorate; });
150601
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__param", function() { return __param; });
150602
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__metadata", function() { return __metadata; });
150603
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__awaiter", function() { return __awaiter; });
150604
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__generator", function() { return __generator; });
150605
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__exportStar", function() { return __exportStar; });
150606
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__values", function() { return __values; });
150607
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__read", function() { return __read; });
150608
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spread", function() { return __spread; });
150609
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__await", function() { return __await; });
150610
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncGenerator", function() { return __asyncGenerator; });
150611
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncDelegator", function() { return __asyncDelegator; });
150612
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncValues", function() { return __asyncValues; });
150613
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__makeTemplateObject", function() { return __makeTemplateObject; });
150614
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importStar", function() { return __importStar; });
150615
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importDefault", function() { return __importDefault; });
150616
/*! *****************************************************************************
150617
Copyright (c) Microsoft Corporation. All rights reserved.
150618
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
150619
this file except in compliance with the License. You may obtain a copy of the
150620
License at http://www.apache.org/licenses/LICENSE-2.0
150621
 
150622
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
150623
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
150624
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
150625
MERCHANTABLITY OR NON-INFRINGEMENT.
150626
 
150627
See the Apache Version 2.0 License for specific language governing permissions
150628
and limitations under the License.
150629
***************************************************************************** */
150630
/* global Reflect, Promise */
150631
 
150632
var extendStatics = function(d, b) {
150633
    extendStatics = Object.setPrototypeOf ||
150634
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
150635
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
150636
    return extendStatics(d, b);
150637
};
150638
 
150639
function __extends(d, b) {
150640
    extendStatics(d, b);
150641
    function __() { this.constructor = d; }
150642
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
150643
}
150644
 
150645
var __assign = function() {
150646
    __assign = Object.assign || function __assign(t) {
150647
        for (var s, i = 1, n = arguments.length; i < n; i++) {
150648
            s = arguments[i];
150649
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
150650
        }
150651
        return t;
150652
    }
150653
    return __assign.apply(this, arguments);
150654
}
150655
 
150656
function __rest(s, e) {
150657
    var t = {};
150658
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
150659
        t[p] = s[p];
150660
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
150661
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
150662
            t[p[i]] = s[p[i]];
150663
    return t;
150664
}
150665
 
150666
function __decorate(decorators, target, key, desc) {
150667
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
150668
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
150669
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
150670
    return c > 3 && r && Object.defineProperty(target, key, r), r;
150671
}
150672
 
150673
function __param(paramIndex, decorator) {
150674
    return function (target, key) { decorator(target, key, paramIndex); }
150675
}
150676
 
150677
function __metadata(metadataKey, metadataValue) {
150678
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
150679
}
150680
 
150681
function __awaiter(thisArg, _arguments, P, generator) {
150682
    return new (P || (P = Promise))(function (resolve, reject) {
150683
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
150684
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
150685
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
150686
        step((generator = generator.apply(thisArg, _arguments || [])).next());
150687
    });
150688
}
150689
 
150690
function __generator(thisArg, body) {
150691
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
150692
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
150693
    function verb(n) { return function (v) { return step([n, v]); }; }
150694
    function step(op) {
150695
        if (f) throw new TypeError("Generator is already executing.");
150696
        while (_) try {
150697
            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) return t;
150698
            if (y = 0, t) op = [op[0] & 2, t.value];
150699
            switch (op[0]) {
150700
                case 0: case 1: t = op; break;
150701
                case 4: _.label++; return { value: op[1], done: false };
150702
                case 5: _.label++; y = op[1]; op = [0]; continue;
150703
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
150704
                default:
150705
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
150706
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
150707
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
150708
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
150709
                    if (t[2]) _.ops.pop();
150710
                    _.trys.pop(); continue;
150711
            }
150712
            op = body.call(thisArg, _);
150713
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
150714
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
150715
    }
150716
}
150717
 
150718
function __exportStar(m, exports) {
150719
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
150720
}
150721
 
150722
function __values(o) {
150723
    var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
150724
    if (m) return m.call(o);
150725
    return {
150726
        next: function () {
150727
            if (o && i >= o.length) o = void 0;
150728
            return { value: o && o[i++], done: !o };
150729
        }
150730
    };
150731
}
150732
 
150733
function __read(o, n) {
150734
    var m = typeof Symbol === "function" && o[Symbol.iterator];
150735
    if (!m) return o;
150736
    var i = m.call(o), r, ar = [], e;
150737
    try {
150738
        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
150739
    }
150740
    catch (error) { e = { error: error }; }
150741
    finally {
150742
        try {
150743
            if (r && !r.done && (m = i["return"])) m.call(i);
150744
        }
150745
        finally { if (e) throw e.error; }
150746
    }
150747
    return ar;
150748
}
150749
 
150750
function __spread() {
150751
    for (var ar = [], i = 0; i < arguments.length; i++)
150752
        ar = ar.concat(__read(arguments[i]));
150753
    return ar;
150754
}
150755
 
150756
function __await(v) {
150757
    return this instanceof __await ? (this.v = v, this) : new __await(v);
150758
}
150759
 
150760
function __asyncGenerator(thisArg, _arguments, generator) {
150761
    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
150762
    var g = generator.apply(thisArg, _arguments || []), i, q = [];
150763
    return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
150764
    function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
150765
    function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
150766
    function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
150767
    function fulfill(value) { resume("next", value); }
150768
    function reject(value) { resume("throw", value); }
150769
    function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
150770
}
150771
 
150772
function __asyncDelegator(o) {
150773
    var i, p;
150774
    return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
150775
    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; }
150776
}
150777
 
150778
function __asyncValues(o) {
150779
    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
150780
    var m = o[Symbol.asyncIterator], i;
150781
    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);
150782
    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); }); }; }
150783
    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
150784
}
150785
 
150786
function __makeTemplateObject(cooked, raw) {
150787
    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
150788
    return cooked;
150789
};
150790
 
150791
function __importStar(mod) {
150792
    if (mod && mod.__esModule) return mod;
150793
    var result = {};
150794
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
150795
    result.default = mod;
150796
    return result;
150797
}
150798
 
150799
function __importDefault(mod) {
150800
    return (mod && mod.__esModule) ? mod : { default: mod };
150801
}
150802
 
150803
 
150804
/***/ })
150805
 
150806
}]);
150807
//# sourceMappingURL=vendor.js.map