UNPKG

160 kBJavaScriptView Raw
1import { __spread, __decorate, __extends, __param, __awaiter, __generator, __assign, __values } from 'tslib';
2import { HostListener, Injector, ElementRef, Directive, Inject, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, Optional, ChangeDetectorRef, Component, ChangeDetectionStrategy, InjectionToken, ApplicationRef, EventEmitter, ViewContainerRef, ComponentFactoryResolver, Attribute, SkipSelf, Output, ViewChild, ContentChild, TemplateRef, IterableDiffers, APP_INITIALIZER, NgModule } from '@angular/core';
3import { NgControl, NG_VALUE_ACCESSOR } from '@angular/forms';
4import { DOCUMENT, Location, LocationStrategy, CommonModule } from '@angular/common';
5import { NavigationStart, UrlSerializer, Router, PRIMARY_OUTLET, ActivatedRoute, ChildrenOutletContexts, RouterLink } from '@angular/router';
6import { isPlatform, getPlatforms, LIFECYCLE_WILL_ENTER, LIFECYCLE_DID_ENTER, LIFECYCLE_WILL_LEAVE, LIFECYCLE_DID_LEAVE, LIFECYCLE_WILL_UNLOAD, componentOnReady, actionSheetController, alertController, loadingController, menuController, pickerController, modalController, popoverController, toastController, createAnimation, getTimeGivenProgression, createGesture } from '@ionic/core';
7export { IonicSafeString, createAnimation, getPlatforms, iosTransitionAnimation, isPlatform, mdTransitionAnimation } from '@ionic/core';
8import { Subject, fromEvent, BehaviorSubject } from 'rxjs';
9import { filter, switchMap, distinctUntilChanged } from 'rxjs/operators';
10import { applyPolyfills, defineCustomElements } from '@ionic/core/loader';
11
12var raf = function (h) {
13 if (typeof __zone_symbol__requestAnimationFrame === 'function') {
14 return __zone_symbol__requestAnimationFrame(h);
15 }
16 if (typeof requestAnimationFrame === 'function') {
17 return requestAnimationFrame(h);
18 }
19 return setTimeout(h);
20};
21
22var ValueAccessor = /** @class */ (function () {
23 function ValueAccessor(injector, el) {
24 this.injector = injector;
25 this.el = el;
26 this.onChange = function () { };
27 this.onTouched = function () { };
28 }
29 ValueAccessor.prototype.writeValue = function (value) {
30 /**
31 * TODO for Ionic 6:
32 * Change `value == null ? '' : value;`
33 * to `value`. This was a fix for IE9, but IE9
34 * is no longer supported; however, this change
35 * is potentially a breaking change
36 */
37 this.el.nativeElement.value = this.lastValue = value == null ? '' : value;
38 setIonicClasses(this.el);
39 };
40 ValueAccessor.prototype.handleChangeEvent = function (el, value) {
41 if (el === this.el.nativeElement) {
42 if (value !== this.lastValue) {
43 this.lastValue = value;
44 this.onChange(value);
45 }
46 setIonicClasses(this.el);
47 }
48 };
49 ValueAccessor.prototype._handleBlurEvent = function (el) {
50 if (el === this.el.nativeElement) {
51 this.onTouched();
52 setIonicClasses(this.el);
53 }
54 };
55 ValueAccessor.prototype.registerOnChange = function (fn) {
56 this.onChange = fn;
57 };
58 ValueAccessor.prototype.registerOnTouched = function (fn) {
59 this.onTouched = fn;
60 };
61 ValueAccessor.prototype.setDisabledState = function (isDisabled) {
62 this.el.nativeElement.disabled = isDisabled;
63 };
64 ValueAccessor.prototype.ngOnDestroy = function () {
65 if (this.statusChanges) {
66 this.statusChanges.unsubscribe();
67 }
68 };
69 ValueAccessor.prototype.ngAfterViewInit = function () {
70 var _this = this;
71 var ngControl;
72 try {
73 ngControl = this.injector.get(NgControl);
74 }
75 catch ( /* No FormControl or ngModel binding */_a) { /* No FormControl or ngModel binding */ }
76 if (!ngControl) {
77 return;
78 }
79 // Listen for changes in validity, disabled, or pending states
80 if (ngControl.statusChanges) {
81 this.statusChanges = ngControl.statusChanges.subscribe(function () { return setIonicClasses(_this.el); });
82 }
83 /**
84 * TODO Remove this in favor of https://github.com/angular/angular/issues/10887
85 * whenever it is implemented. Currently, Ionic's form status classes
86 * do not react to changes when developers manually call
87 * Angular form control methods such as markAsTouched.
88 * This results in Ionic's form status classes being out
89 * of sync with the ng form status classes.
90 * This patches the methods to manually sync
91 * the classes until this feature is implemented in Angular.
92 */
93 var formControl = ngControl.control;
94 if (formControl) {
95 var methodsToPatch = ['markAsTouched', 'markAllAsTouched', 'markAsUntouched', 'markAsDirty', 'markAsPristine'];
96 methodsToPatch.forEach(function (method) {
97 if (formControl[method]) {
98 var oldFn_1 = formControl[method].bind(formControl);
99 formControl[method] = function () {
100 var params = [];
101 for (var _i = 0; _i < arguments.length; _i++) {
102 params[_i] = arguments[_i];
103 }
104 oldFn_1.apply(void 0, __spread(params));
105 setIonicClasses(_this.el);
106 };
107 }
108 });
109 }
110 };
111 __decorate([
112 HostListener('ionBlur', ['$event.target'])
113 ], ValueAccessor.prototype, "_handleBlurEvent", null);
114 return ValueAccessor;
115}());
116var setIonicClasses = function (element) {
117 raf(function () {
118 var input = element.nativeElement;
119 var classes = getClasses(input);
120 setClasses(input, classes);
121 var item = input.closest('ion-item');
122 if (item) {
123 setClasses(item, classes);
124 }
125 });
126};
127var getClasses = function (element) {
128 var classList = element.classList;
129 var classes = [];
130 for (var i = 0; i < classList.length; i++) {
131 var item = classList.item(i);
132 if (item !== null && startsWith(item, 'ng-')) {
133 classes.push("ion-" + item.substr(3));
134 }
135 }
136 return classes;
137};
138var ɵ0 = getClasses;
139var setClasses = function (element, classes) {
140 var classList = element.classList;
141 [
142 'ion-valid',
143 'ion-invalid',
144 'ion-touched',
145 'ion-untouched',
146 'ion-dirty',
147 'ion-pristine'
148 ].forEach(function (c) { return classList.remove(c); });
149 classes.forEach(function (c) { return classList.add(c); });
150};
151var ɵ1 = setClasses;
152var startsWith = function (input, search) {
153 return input.substr(0, search.length) === search;
154};
155var ɵ2 = startsWith;
156
157var BooleanValueAccessor = /** @class */ (function (_super) {
158 __extends(BooleanValueAccessor, _super);
159 function BooleanValueAccessor(injector, el) {
160 return _super.call(this, injector, el) || this;
161 }
162 BooleanValueAccessor_1 = BooleanValueAccessor;
163 BooleanValueAccessor.prototype.writeValue = function (value) {
164 this.el.nativeElement.checked = this.lastValue = value == null ? false : value;
165 setIonicClasses(this.el);
166 };
167 BooleanValueAccessor.prototype._handleIonChange = function (el) {
168 this.handleChangeEvent(el, el.checked);
169 };
170 var BooleanValueAccessor_1;
171 BooleanValueAccessor.ctorParameters = function () { return [
172 { type: Injector },
173 { type: ElementRef }
174 ]; };
175 __decorate([
176 HostListener('ionChange', ['$event.target'])
177 ], BooleanValueAccessor.prototype, "_handleIonChange", null);
178 BooleanValueAccessor = BooleanValueAccessor_1 = __decorate([
179 Directive({
180 /* tslint:disable-next-line:directive-selector */
181 selector: 'ion-checkbox,ion-toggle',
182 providers: [
183 {
184 provide: NG_VALUE_ACCESSOR,
185 useExisting: BooleanValueAccessor_1,
186 multi: true
187 }
188 ]
189 })
190 ], BooleanValueAccessor);
191 return BooleanValueAccessor;
192}(ValueAccessor));
193
194var NumericValueAccessor = /** @class */ (function (_super) {
195 __extends(NumericValueAccessor, _super);
196 function NumericValueAccessor(injector, el) {
197 return _super.call(this, injector, el) || this;
198 }
199 NumericValueAccessor_1 = NumericValueAccessor;
200 NumericValueAccessor.prototype._handleIonChange = function (el) {
201 this.handleChangeEvent(el, el.value);
202 };
203 NumericValueAccessor.prototype.registerOnChange = function (fn) {
204 _super.prototype.registerOnChange.call(this, function (value) {
205 fn(value === '' ? null : parseFloat(value));
206 });
207 };
208 var NumericValueAccessor_1;
209 NumericValueAccessor.ctorParameters = function () { return [
210 { type: Injector },
211 { type: ElementRef }
212 ]; };
213 __decorate([
214 HostListener('ionChange', ['$event.target'])
215 ], NumericValueAccessor.prototype, "_handleIonChange", null);
216 NumericValueAccessor = NumericValueAccessor_1 = __decorate([
217 Directive({
218 /* tslint:disable-next-line:directive-selector */
219 selector: 'ion-input[type=number]',
220 providers: [
221 {
222 provide: NG_VALUE_ACCESSOR,
223 useExisting: NumericValueAccessor_1,
224 multi: true
225 }
226 ]
227 })
228 ], NumericValueAccessor);
229 return NumericValueAccessor;
230}(ValueAccessor));
231
232var RadioValueAccessor = /** @class */ (function (_super) {
233 __extends(RadioValueAccessor, _super);
234 function RadioValueAccessor(injector, el) {
235 return _super.call(this, injector, el) || this;
236 }
237 RadioValueAccessor_1 = RadioValueAccessor;
238 RadioValueAccessor.prototype._handleIonSelect = function (el) {
239 this.handleChangeEvent(el, el.checked);
240 };
241 var RadioValueAccessor_1;
242 RadioValueAccessor.ctorParameters = function () { return [
243 { type: Injector },
244 { type: ElementRef }
245 ]; };
246 __decorate([
247 HostListener('ionSelect', ['$event.target'])
248 ], RadioValueAccessor.prototype, "_handleIonSelect", null);
249 RadioValueAccessor = RadioValueAccessor_1 = __decorate([
250 Directive({
251 /* tslint:disable-next-line:directive-selector */
252 selector: 'ion-radio',
253 providers: [
254 {
255 provide: NG_VALUE_ACCESSOR,
256 useExisting: RadioValueAccessor_1,
257 multi: true
258 }
259 ]
260 })
261 ], RadioValueAccessor);
262 return RadioValueAccessor;
263}(ValueAccessor));
264
265var SelectValueAccessor = /** @class */ (function (_super) {
266 __extends(SelectValueAccessor, _super);
267 function SelectValueAccessor(injector, el) {
268 return _super.call(this, injector, el) || this;
269 }
270 SelectValueAccessor_1 = SelectValueAccessor;
271 SelectValueAccessor.prototype._handleChangeEvent = function (el) {
272 this.handleChangeEvent(el, el.value);
273 };
274 var SelectValueAccessor_1;
275 SelectValueAccessor.ctorParameters = function () { return [
276 { type: Injector },
277 { type: ElementRef }
278 ]; };
279 __decorate([
280 HostListener('ionChange', ['$event.target'])
281 ], SelectValueAccessor.prototype, "_handleChangeEvent", null);
282 SelectValueAccessor = SelectValueAccessor_1 = __decorate([
283 Directive({
284 /* tslint:disable-next-line:directive-selector */
285 selector: 'ion-range, ion-select, ion-radio-group, ion-segment, ion-datetime',
286 providers: [
287 {
288 provide: NG_VALUE_ACCESSOR,
289 useExisting: SelectValueAccessor_1,
290 multi: true
291 }
292 ]
293 })
294 ], SelectValueAccessor);
295 return SelectValueAccessor;
296}(ValueAccessor));
297
298var TextValueAccessor = /** @class */ (function (_super) {
299 __extends(TextValueAccessor, _super);
300 function TextValueAccessor(injector, el) {
301 return _super.call(this, injector, el) || this;
302 }
303 TextValueAccessor_1 = TextValueAccessor;
304 TextValueAccessor.prototype._handleInputEvent = function (el) {
305 this.handleChangeEvent(el, el.value);
306 };
307 var TextValueAccessor_1;
308 TextValueAccessor.ctorParameters = function () { return [
309 { type: Injector },
310 { type: ElementRef }
311 ]; };
312 __decorate([
313 HostListener('ionChange', ['$event.target'])
314 ], TextValueAccessor.prototype, "_handleInputEvent", null);
315 TextValueAccessor = TextValueAccessor_1 = __decorate([
316 Directive({
317 /* tslint:disable-next-line:directive-selector */
318 selector: 'ion-input:not([type=number]),ion-textarea,ion-searchbar',
319 providers: [
320 {
321 provide: NG_VALUE_ACCESSOR,
322 useExisting: TextValueAccessor_1,
323 multi: true
324 }
325 ]
326 })
327 ], TextValueAccessor);
328 return TextValueAccessor;
329}(ValueAccessor));
330
331var Platform = /** @class */ (function () {
332 function Platform(doc, zone) {
333 var _this = this;
334 this.doc = doc;
335 /**
336 * @hidden
337 */
338 this.backButton = new Subject();
339 /**
340 * The keyboardDidShow event emits when the
341 * on-screen keyboard is presented.
342 */
343 this.keyboardDidShow = new Subject();
344 /**
345 * The keyboardDidHide event emits when the
346 * on-screen keyboard is hidden.
347 */
348 this.keyboardDidHide = new Subject();
349 /**
350 * The pause event emits when the native platform puts the application
351 * into the background, typically when the user switches to a different
352 * application. This event would emit when a Cordova app is put into
353 * the background, however, it would not fire on a standard web browser.
354 */
355 this.pause = new Subject();
356 /**
357 * The resume event emits when the native platform pulls the application
358 * out from the background. This event would emit when a Cordova app comes
359 * out from the background, however, it would not fire on a standard web browser.
360 */
361 this.resume = new Subject();
362 /**
363 * The resize event emits when the browser window has changed dimensions. This
364 * could be from a browser window being physically resized, or from a device
365 * changing orientation.
366 */
367 this.resize = new Subject();
368 zone.run(function () {
369 _this.win = doc.defaultView;
370 _this.backButton.subscribeWithPriority = function (priority, callback) {
371 return this.subscribe(function (ev) {
372 return ev.register(priority, function (processNextHandler) { return zone.run(function () { return callback(processNextHandler); }); });
373 });
374 };
375 proxyEvent(_this.pause, doc, 'pause');
376 proxyEvent(_this.resume, doc, 'resume');
377 proxyEvent(_this.backButton, doc, 'ionBackButton');
378 proxyEvent(_this.resize, _this.win, 'resize');
379 proxyEvent(_this.keyboardDidShow, _this.win, 'ionKeyboardDidShow');
380 proxyEvent(_this.keyboardDidHide, _this.win, 'ionKeyboardDidHide');
381 var readyResolve;
382 _this._readyPromise = new Promise(function (res) { readyResolve = res; });
383 if (_this.win && _this.win['cordova']) {
384 doc.addEventListener('deviceready', function () {
385 readyResolve('cordova');
386 }, { once: true });
387 }
388 else {
389 readyResolve('dom');
390 }
391 });
392 }
393 /**
394 * @returns returns true/false based on platform.
395 * @description
396 * Depending on the platform the user is on, `is(platformName)` will
397 * return `true` or `false`. Note that the same app can return `true`
398 * for more than one platform name. For example, an app running from
399 * an iPad would return `true` for the platform names: `mobile`,
400 * `ios`, `ipad`, and `tablet`. Additionally, if the app was running
401 * from Cordova then `cordova` would be true, and if it was running
402 * from a web browser on the iPad then `mobileweb` would be `true`.
403 *
404 * ```
405 * import { Platform } from 'ionic-angular';
406 *
407 * @Component({...})
408 * export MyPage {
409 * constructor(public platform: Platform) {
410 * if (this.platform.is('ios')) {
411 * // This will only print when on iOS
412 * console.log('I am an iOS device!');
413 * }
414 * }
415 * }
416 * ```
417 *
418 * | Platform Name | Description |
419 * |-----------------|------------------------------------|
420 * | android | on a device running Android. |
421 * | capacitor | on a device running Capacitor. |
422 * | cordova | on a device running Cordova. |
423 * | ios | on a device running iOS. |
424 * | ipad | on an iPad device. |
425 * | iphone | on an iPhone device. |
426 * | phablet | on a phablet device. |
427 * | tablet | on a tablet device. |
428 * | electron | in Electron on a desktop device. |
429 * | pwa | as a PWA app. |
430 * | mobile | on a mobile device. |
431 * | mobileweb | on a mobile device in a browser. |
432 * | desktop | on a desktop device. |
433 * | hybrid | is a cordova or capacitor app. |
434 *
435 */
436 Platform.prototype.is = function (platformName) {
437 return isPlatform(this.win, platformName);
438 };
439 /**
440 * @returns the array of platforms
441 * @description
442 * Depending on what device you are on, `platforms` can return multiple values.
443 * Each possible value is a hierarchy of platforms. For example, on an iPhone,
444 * it would return `mobile`, `ios`, and `iphone`.
445 *
446 * ```
447 * import { Platform } from 'ionic-angular';
448 *
449 * @Component({...})
450 * export MyPage {
451 * constructor(public platform: Platform) {
452 * // This will print an array of the current platforms
453 * console.log(this.platform.platforms());
454 * }
455 * }
456 * ```
457 */
458 Platform.prototype.platforms = function () {
459 return getPlatforms(this.win);
460 };
461 /**
462 * Returns a promise when the platform is ready and native functionality
463 * can be called. If the app is running from within a web browser, then
464 * the promise will resolve when the DOM is ready. When the app is running
465 * from an application engine such as Cordova, then the promise will
466 * resolve when Cordova triggers the `deviceready` event.
467 *
468 * The resolved value is the `readySource`, which states which platform
469 * ready was used. For example, when Cordova is ready, the resolved ready
470 * source is `cordova`. The default ready source value will be `dom`. The
471 * `readySource` is useful if different logic should run depending on the
472 * platform the app is running from. For example, only Cordova can execute
473 * the status bar plugin, so the web should not run status bar plugin logic.
474 *
475 * ```
476 * import { Component } from '@angular/core';
477 * import { Platform } from 'ionic-angular';
478 *
479 * @Component({...})
480 * export MyApp {
481 * constructor(public platform: Platform) {
482 * this.platform.ready().then((readySource) => {
483 * console.log('Platform ready from', readySource);
484 * // Platform now ready, execute any required native code
485 * });
486 * }
487 * }
488 * ```
489 */
490 Platform.prototype.ready = function () {
491 return this._readyPromise;
492 };
493 Object.defineProperty(Platform.prototype, "isRTL", {
494 /**
495 * Returns if this app is using right-to-left language direction or not.
496 * We recommend the app's `index.html` file already has the correct `dir`
497 * attribute value set, such as `<html dir="ltr">` or `<html dir="rtl">`.
498 * [W3C: Structural markup and right-to-left text in HTML](http://www.w3.org/International/questions/qa-html-dir)
499 */
500 get: function () {
501 return this.doc.dir === 'rtl';
502 },
503 enumerable: true,
504 configurable: true
505 });
506 /**
507 * Get the query string parameter
508 */
509 Platform.prototype.getQueryParam = function (key) {
510 return readQueryParam(this.win.location.href, key);
511 };
512 /**
513 * Returns `true` if the app is in landscape mode.
514 */
515 Platform.prototype.isLandscape = function () {
516 return !this.isPortrait();
517 };
518 /**
519 * Returns `true` if the app is in portrait mode.
520 */
521 Platform.prototype.isPortrait = function () {
522 return this.win.matchMedia && this.win.matchMedia('(orientation: portrait)').matches;
523 };
524 Platform.prototype.testUserAgent = function (expression) {
525 var nav = this.win.navigator;
526 return !!(nav && nav.userAgent && nav.userAgent.indexOf(expression) >= 0);
527 };
528 /**
529 * Get the current url.
530 */
531 Platform.prototype.url = function () {
532 return this.win.location.href;
533 };
534 /**
535 * Gets the width of the platform's viewport using `window.innerWidth`.
536 */
537 Platform.prototype.width = function () {
538 return this.win.innerWidth;
539 };
540 /**
541 * Gets the height of the platform's viewport using `window.innerHeight`.
542 */
543 Platform.prototype.height = function () {
544 return this.win.innerHeight;
545 };
546 Platform.ctorParameters = function () { return [
547 { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
548 { type: NgZone }
549 ]; };
550 Platform.ngInjectableDef = ɵɵdefineInjectable({ factory: function Platform_Factory() { return new Platform(ɵɵinject(DOCUMENT), ɵɵinject(NgZone)); }, token: Platform, providedIn: "root" });
551 Platform = __decorate([
552 Injectable({
553 providedIn: 'root',
554 }),
555 __param(0, Inject(DOCUMENT))
556 ], Platform);
557 return Platform;
558}());
559var readQueryParam = function (url, key) {
560 key = key.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
561 var regex = new RegExp('[\\?&]' + key + '=([^&#]*)');
562 var results = regex.exec(url);
563 return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null;
564};
565var ɵ0$1 = readQueryParam;
566var proxyEvent = function (emitter, el, eventName) {
567 if (el) {
568 el.addEventListener(eventName, function (ev) {
569 // ?? cordova might emit "null" events
570 emitter.next(ev != null ? ev.detail : undefined);
571 });
572 }
573};
574var ɵ1$1 = proxyEvent;
575
576var NavController = /** @class */ (function () {
577 function NavController(platform, location, serializer, router) {
578 var _this = this;
579 this.location = location;
580 this.serializer = serializer;
581 this.router = router;
582 this.direction = DEFAULT_DIRECTION;
583 this.animated = DEFAULT_ANIMATED;
584 this.guessDirection = 'forward';
585 this.lastNavId = -1;
586 // Subscribe to router events to detect direction
587 if (router) {
588 router.events.subscribe(function (ev) {
589 if (ev instanceof NavigationStart) {
590 var id = (ev.restoredState) ? ev.restoredState.navigationId : ev.id;
591 _this.guessDirection = id < _this.lastNavId ? 'back' : 'forward';
592 _this.guessAnimation = !ev.restoredState ? _this.guessDirection : undefined;
593 _this.lastNavId = _this.guessDirection === 'forward' ? ev.id : id;
594 }
595 });
596 }
597 // Subscribe to backButton events
598 platform.backButton.subscribeWithPriority(0, function (processNextHandler) {
599 _this.pop();
600 processNextHandler();
601 });
602 }
603 /**
604 * This method uses Angular's [Router](https://angular.io/api/router/Router) under the hood,
605 * it's equivalent to calling `this.router.navigateByUrl()`, but it's explicit about the **direction** of the transition.
606 *
607 * Going **forward** means that a new page is going to be pushed to the stack of the outlet (ion-router-outlet),
608 * and that it will show a "forward" animation by default.
609 *
610 * Navigating forward can also be triggered in a declarative manner by using the `[routerDirection]` directive:
611 *
612 * ```html
613 * <a routerLink="/path/to/page" routerDirection="forward">Link</a>
614 * ```
615 */
616 NavController.prototype.navigateForward = function (url, options) {
617 if (options === void 0) { options = {}; }
618 this.setDirection('forward', options.animated, options.animationDirection, options.animation);
619 return this.navigate(url, options);
620 };
621 /**
622 * This method uses Angular's [Router](https://angular.io/api/router/Router) under the hood,
623 * it's equivalent to calling:
624 *
625 * ```ts
626 * this.navController.setDirection('back');
627 * this.router.navigateByUrl(path);
628 * ```
629 *
630 * Going **back** means that all the pages in the stack until the navigated page is found will be popped,
631 * and that it will show a "back" animation by default.
632 *
633 * Navigating back can also be triggered in a declarative manner by using the `[routerDirection]` directive:
634 *
635 * ```html
636 * <a routerLink="/path/to/page" routerDirection="back">Link</a>
637 * ```
638 */
639 NavController.prototype.navigateBack = function (url, options) {
640 if (options === void 0) { options = {}; }
641 this.setDirection('back', options.animated, options.animationDirection, options.animation);
642 return this.navigate(url, options);
643 };
644 /**
645 * This method uses Angular's [Router](https://angular.io/api/router/Router) under the hood,
646 * it's equivalent to calling:
647 *
648 * ```ts
649 * this.navController.setDirection('root');
650 * this.router.navigateByUrl(path);
651 * ```
652 *
653 * Going **root** means that all existing pages in the stack will be removed,
654 * and the navigated page will become the single page in the stack.
655 *
656 * Navigating root can also be triggered in a declarative manner by using the `[routerDirection]` directive:
657 *
658 * ```html
659 * <a routerLink="/path/to/page" routerDirection="root">Link</a>
660 * ```
661 */
662 NavController.prototype.navigateRoot = function (url, options) {
663 if (options === void 0) { options = {}; }
664 this.setDirection('root', options.animated, options.animationDirection, options.animation);
665 return this.navigate(url, options);
666 };
667 /**
668 * Same as [Location](https://angular.io/api/common/Location)'s back() method.
669 * It will use the standard `window.history.back()` under the hood, but featuring a `back` animation
670 * by default.
671 */
672 NavController.prototype.back = function (options) {
673 if (options === void 0) { options = { animated: true, animationDirection: 'back' }; }
674 this.setDirection('back', options.animated, options.animationDirection, options.animation);
675 return this.location.back();
676 };
677 /**
678 * This methods goes back in the context of Ionic's stack navigation.
679 *
680 * It recursively finds the top active `ion-router-outlet` and calls `pop()`.
681 * This is the recommended way to go back when you are using `ion-router-outlet`.
682 */
683 NavController.prototype.pop = function () {
684 return __awaiter(this, void 0, void 0, function () {
685 var outlet;
686 return __generator(this, function (_a) {
687 switch (_a.label) {
688 case 0:
689 outlet = this.topOutlet;
690 _a.label = 1;
691 case 1:
692 if (!outlet) return [3 /*break*/, 3];
693 return [4 /*yield*/, outlet.pop()];
694 case 2:
695 if (_a.sent()) {
696 return [3 /*break*/, 3];
697 }
698 else {
699 outlet = outlet.parentOutlet;
700 }
701 return [3 /*break*/, 1];
702 case 3: return [2 /*return*/];
703 }
704 });
705 });
706 };
707 /**
708 * This methods specifies the direction of the next navigation performed by the Angular router.
709 *
710 * `setDirection()` does not trigger any transition, it just sets some flags to be consumed by `ion-router-outlet`.
711 *
712 * It's recommended to use `navigateForward()`, `navigateBack()` and `navigateRoot()` instead of `setDirection()`.
713 */
714 NavController.prototype.setDirection = function (direction, animated, animationDirection, animationBuilder) {
715 this.direction = direction;
716 this.animated = getAnimation(direction, animated, animationDirection);
717 this.animationBuilder = animationBuilder;
718 };
719 /**
720 * @internal
721 */
722 NavController.prototype.setTopOutlet = function (outlet) {
723 this.topOutlet = outlet;
724 };
725 /**
726 * @internal
727 */
728 NavController.prototype.consumeTransition = function () {
729 var direction = 'root';
730 var animation;
731 var animationBuilder = this.animationBuilder;
732 if (this.direction === 'auto') {
733 direction = this.guessDirection;
734 animation = this.guessAnimation;
735 }
736 else {
737 animation = this.animated;
738 direction = this.direction;
739 }
740 this.direction = DEFAULT_DIRECTION;
741 this.animated = DEFAULT_ANIMATED;
742 this.animationBuilder = undefined;
743 return {
744 direction: direction,
745 animation: animation,
746 animationBuilder: animationBuilder
747 };
748 };
749 NavController.prototype.navigate = function (url, options) {
750 if (Array.isArray(url)) {
751 return this.router.navigate(url, options);
752 }
753 else {
754 /**
755 * navigateByUrl ignores any properties that
756 * would change the url, so things like queryParams
757 * would be ignored unless we create a url tree
758 * More Info: https://github.com/angular/angular/issues/18798
759 */
760 var urlTree = this.serializer.parse(url.toString());
761 if (options.queryParams !== undefined) {
762 urlTree.queryParams = __assign({}, options.queryParams);
763 }
764 if (options.fragment !== undefined) {
765 urlTree.fragment = options.fragment;
766 }
767 /**
768 * `navigateByUrl` will still apply `NavigationExtras` properties
769 * that do not modify the url, such as `replaceUrl` which is why
770 * `options` is passed in here.
771 */
772 return this.router.navigateByUrl(urlTree, options);
773 }
774 };
775 NavController.ctorParameters = function () { return [
776 { type: Platform },
777 { type: Location },
778 { type: UrlSerializer },
779 { type: Router, decorators: [{ type: Optional }] }
780 ]; };
781 NavController.ngInjectableDef = ɵɵdefineInjectable({ factory: function NavController_Factory() { return new NavController(ɵɵinject(Platform), ɵɵinject(Location), ɵɵinject(UrlSerializer), ɵɵinject(Router, 8)); }, token: NavController, providedIn: "root" });
782 NavController = __decorate([
783 Injectable({
784 providedIn: 'root',
785 }),
786 __param(3, Optional())
787 ], NavController);
788 return NavController;
789}());
790var getAnimation = function (direction, animated, animationDirection) {
791 if (animated === false) {
792 return undefined;
793 }
794 if (animationDirection !== undefined) {
795 return animationDirection;
796 }
797 if (direction === 'forward' || direction === 'back') {
798 return direction;
799 }
800 else if (direction === 'root' && animated === true) {
801 return 'forward';
802 }
803 return undefined;
804};
805var ɵ0$2 = getAnimation;
806var DEFAULT_DIRECTION = 'auto';
807var DEFAULT_ANIMATED = undefined;
808
809/* eslint-disable */
810var proxyInputs = function (Cmp, inputs) {
811 var Prototype = Cmp.prototype;
812 inputs.forEach(function (item) {
813 Object.defineProperty(Prototype, item, {
814 get: function () {
815 return this.el[item];
816 },
817 set: function (val) {
818 var _this = this;
819 this.z.runOutsideAngular(function () { return (_this.el[item] = val); });
820 }
821 });
822 });
823};
824var proxyMethods = function (Cmp, methods) {
825 var Prototype = Cmp.prototype;
826 methods.forEach(function (methodName) {
827 Prototype[methodName] = function () {
828 var _this = this;
829 var args = arguments;
830 return this.z.runOutsideAngular(function () {
831 return _this.el[methodName].apply(_this.el, args);
832 });
833 };
834 });
835};
836var proxyOutputs = function (instance, el, events) {
837 events.forEach(function (eventName) { return instance[eventName] = fromEvent(el, eventName); });
838};
839function ProxyCmp(opts) {
840 var decorator = function (cls) {
841 if (opts.inputs) {
842 proxyInputs(cls, opts.inputs);
843 }
844 if (opts.methods) {
845 proxyMethods(cls, opts.methods);
846 }
847 return cls;
848 };
849 return decorator;
850}
851
852var IonApp = /** @class */ (function () {
853 function IonApp(c, r, z) {
854 this.z = z;
855 c.detach();
856 this.el = r.nativeElement;
857 }
858 IonApp.ctorParameters = function () { return [
859 { type: ChangeDetectorRef },
860 { type: ElementRef },
861 { type: NgZone }
862 ]; };
863 IonApp = __decorate([
864 Component({ selector: "ion-app", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>" })
865 ], IonApp);
866 return IonApp;
867}());
868var IonAvatar = /** @class */ (function () {
869 function IonAvatar(c, r, z) {
870 this.z = z;
871 c.detach();
872 this.el = r.nativeElement;
873 }
874 IonAvatar.ctorParameters = function () { return [
875 { type: ChangeDetectorRef },
876 { type: ElementRef },
877 { type: NgZone }
878 ]; };
879 IonAvatar = __decorate([
880 Component({ selector: "ion-avatar", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>" })
881 ], IonAvatar);
882 return IonAvatar;
883}());
884var IonBackButton = /** @class */ (function () {
885 function IonBackButton(c, r, z) {
886 this.z = z;
887 c.detach();
888 this.el = r.nativeElement;
889 }
890 IonBackButton.ctorParameters = function () { return [
891 { type: ChangeDetectorRef },
892 { type: ElementRef },
893 { type: NgZone }
894 ]; };
895 IonBackButton = __decorate([
896 ProxyCmp({ inputs: ["color", "defaultHref", "disabled", "icon", "mode", "routerAnimation", "text", "type"] }),
897 Component({ selector: "ion-back-button", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "defaultHref", "disabled", "icon", "mode", "routerAnimation", "text", "type"] })
898 ], IonBackButton);
899 return IonBackButton;
900}());
901var IonBackdrop = /** @class */ (function () {
902 function IonBackdrop(c, r, z) {
903 this.z = z;
904 c.detach();
905 this.el = r.nativeElement;
906 proxyOutputs(this, this.el, ["ionBackdropTap"]);
907 }
908 IonBackdrop.ctorParameters = function () { return [
909 { type: ChangeDetectorRef },
910 { type: ElementRef },
911 { type: NgZone }
912 ]; };
913 IonBackdrop = __decorate([
914 ProxyCmp({ inputs: ["stopPropagation", "tappable", "visible"] }),
915 Component({ selector: "ion-backdrop", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["stopPropagation", "tappable", "visible"] })
916 ], IonBackdrop);
917 return IonBackdrop;
918}());
919var IonBadge = /** @class */ (function () {
920 function IonBadge(c, r, z) {
921 this.z = z;
922 c.detach();
923 this.el = r.nativeElement;
924 }
925 IonBadge.ctorParameters = function () { return [
926 { type: ChangeDetectorRef },
927 { type: ElementRef },
928 { type: NgZone }
929 ]; };
930 IonBadge = __decorate([
931 ProxyCmp({ inputs: ["color", "mode"] }),
932 Component({ selector: "ion-badge", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "mode"] })
933 ], IonBadge);
934 return IonBadge;
935}());
936var IonButton = /** @class */ (function () {
937 function IonButton(c, r, z) {
938 this.z = z;
939 c.detach();
940 this.el = r.nativeElement;
941 proxyOutputs(this, this.el, ["ionFocus", "ionBlur"]);
942 }
943 IonButton.ctorParameters = function () { return [
944 { type: ChangeDetectorRef },
945 { type: ElementRef },
946 { type: NgZone }
947 ]; };
948 IonButton = __decorate([
949 ProxyCmp({ inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }),
950 Component({ selector: "ion-button", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] })
951 ], IonButton);
952 return IonButton;
953}());
954var IonButtons = /** @class */ (function () {
955 function IonButtons(c, r, z) {
956 this.z = z;
957 c.detach();
958 this.el = r.nativeElement;
959 }
960 IonButtons.ctorParameters = function () { return [
961 { type: ChangeDetectorRef },
962 { type: ElementRef },
963 { type: NgZone }
964 ]; };
965 IonButtons = __decorate([
966 ProxyCmp({ inputs: ["collapse"] }),
967 Component({ selector: "ion-buttons", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["collapse"] })
968 ], IonButtons);
969 return IonButtons;
970}());
971var IonCard = /** @class */ (function () {
972 function IonCard(c, r, z) {
973 this.z = z;
974 c.detach();
975 this.el = r.nativeElement;
976 }
977 IonCard.ctorParameters = function () { return [
978 { type: ChangeDetectorRef },
979 { type: ElementRef },
980 { type: NgZone }
981 ]; };
982 IonCard = __decorate([
983 ProxyCmp({ inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }),
984 Component({ selector: "ion-card", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] })
985 ], IonCard);
986 return IonCard;
987}());
988var IonCardContent = /** @class */ (function () {
989 function IonCardContent(c, r, z) {
990 this.z = z;
991 c.detach();
992 this.el = r.nativeElement;
993 }
994 IonCardContent.ctorParameters = function () { return [
995 { type: ChangeDetectorRef },
996 { type: ElementRef },
997 { type: NgZone }
998 ]; };
999 IonCardContent = __decorate([
1000 ProxyCmp({ inputs: ["mode"] }),
1001 Component({ selector: "ion-card-content", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["mode"] })
1002 ], IonCardContent);
1003 return IonCardContent;
1004}());
1005var IonCardHeader = /** @class */ (function () {
1006 function IonCardHeader(c, r, z) {
1007 this.z = z;
1008 c.detach();
1009 this.el = r.nativeElement;
1010 }
1011 IonCardHeader.ctorParameters = function () { return [
1012 { type: ChangeDetectorRef },
1013 { type: ElementRef },
1014 { type: NgZone }
1015 ]; };
1016 IonCardHeader = __decorate([
1017 ProxyCmp({ inputs: ["color", "mode", "translucent"] }),
1018 Component({ selector: "ion-card-header", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "mode", "translucent"] })
1019 ], IonCardHeader);
1020 return IonCardHeader;
1021}());
1022var IonCardSubtitle = /** @class */ (function () {
1023 function IonCardSubtitle(c, r, z) {
1024 this.z = z;
1025 c.detach();
1026 this.el = r.nativeElement;
1027 }
1028 IonCardSubtitle.ctorParameters = function () { return [
1029 { type: ChangeDetectorRef },
1030 { type: ElementRef },
1031 { type: NgZone }
1032 ]; };
1033 IonCardSubtitle = __decorate([
1034 ProxyCmp({ inputs: ["color", "mode"] }),
1035 Component({ selector: "ion-card-subtitle", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "mode"] })
1036 ], IonCardSubtitle);
1037 return IonCardSubtitle;
1038}());
1039var IonCardTitle = /** @class */ (function () {
1040 function IonCardTitle(c, r, z) {
1041 this.z = z;
1042 c.detach();
1043 this.el = r.nativeElement;
1044 }
1045 IonCardTitle.ctorParameters = function () { return [
1046 { type: ChangeDetectorRef },
1047 { type: ElementRef },
1048 { type: NgZone }
1049 ]; };
1050 IonCardTitle = __decorate([
1051 ProxyCmp({ inputs: ["color", "mode"] }),
1052 Component({ selector: "ion-card-title", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "mode"] })
1053 ], IonCardTitle);
1054 return IonCardTitle;
1055}());
1056var IonCheckbox = /** @class */ (function () {
1057 function IonCheckbox(c, r, z) {
1058 this.z = z;
1059 c.detach();
1060 this.el = r.nativeElement;
1061 proxyOutputs(this, this.el, ["ionChange", "ionFocus", "ionBlur"]);
1062 }
1063 IonCheckbox.ctorParameters = function () { return [
1064 { type: ChangeDetectorRef },
1065 { type: ElementRef },
1066 { type: NgZone }
1067 ]; };
1068 IonCheckbox = __decorate([
1069 ProxyCmp({ inputs: ["checked", "color", "disabled", "indeterminate", "mode", "name", "value"] }),
1070 Component({ selector: "ion-checkbox", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["checked", "color", "disabled", "indeterminate", "mode", "name", "value"] })
1071 ], IonCheckbox);
1072 return IonCheckbox;
1073}());
1074var IonChip = /** @class */ (function () {
1075 function IonChip(c, r, z) {
1076 this.z = z;
1077 c.detach();
1078 this.el = r.nativeElement;
1079 }
1080 IonChip.ctorParameters = function () { return [
1081 { type: ChangeDetectorRef },
1082 { type: ElementRef },
1083 { type: NgZone }
1084 ]; };
1085 IonChip = __decorate([
1086 ProxyCmp({ inputs: ["color", "disabled", "mode", "outline"] }),
1087 Component({ selector: "ion-chip", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "disabled", "mode", "outline"] })
1088 ], IonChip);
1089 return IonChip;
1090}());
1091var IonCol = /** @class */ (function () {
1092 function IonCol(c, r, z) {
1093 this.z = z;
1094 c.detach();
1095 this.el = r.nativeElement;
1096 }
1097 IonCol.ctorParameters = function () { return [
1098 { type: ChangeDetectorRef },
1099 { type: ElementRef },
1100 { type: NgZone }
1101 ]; };
1102 IonCol = __decorate([
1103 ProxyCmp({ inputs: ["offset", "offsetLg", "offsetMd", "offsetSm", "offsetXl", "offsetXs", "pull", "pullLg", "pullMd", "pullSm", "pullXl", "pullXs", "push", "pushLg", "pushMd", "pushSm", "pushXl", "pushXs", "size", "sizeLg", "sizeMd", "sizeSm", "sizeXl", "sizeXs"] }),
1104 Component({ selector: "ion-col", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["offset", "offsetLg", "offsetMd", "offsetSm", "offsetXl", "offsetXs", "pull", "pullLg", "pullMd", "pullSm", "pullXl", "pullXs", "push", "pushLg", "pushMd", "pushSm", "pushXl", "pushXs", "size", "sizeLg", "sizeMd", "sizeSm", "sizeXl", "sizeXs"] })
1105 ], IonCol);
1106 return IonCol;
1107}());
1108var IonContent = /** @class */ (function () {
1109 function IonContent(c, r, z) {
1110 this.z = z;
1111 c.detach();
1112 this.el = r.nativeElement;
1113 proxyOutputs(this, this.el, ["ionScrollStart", "ionScroll", "ionScrollEnd"]);
1114 }
1115 IonContent.ctorParameters = function () { return [
1116 { type: ChangeDetectorRef },
1117 { type: ElementRef },
1118 { type: NgZone }
1119 ]; };
1120 IonContent = __decorate([
1121 ProxyCmp({ inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"], "methods": ["getScrollElement", "scrollToTop", "scrollToBottom", "scrollByPoint", "scrollToPoint"] }),
1122 Component({ selector: "ion-content", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] })
1123 ], IonContent);
1124 return IonContent;
1125}());
1126var IonDatetime = /** @class */ (function () {
1127 function IonDatetime(c, r, z) {
1128 this.z = z;
1129 c.detach();
1130 this.el = r.nativeElement;
1131 proxyOutputs(this, this.el, ["ionCancel", "ionChange", "ionFocus", "ionBlur"]);
1132 }
1133 IonDatetime.ctorParameters = function () { return [
1134 { type: ChangeDetectorRef },
1135 { type: ElementRef },
1136 { type: NgZone }
1137 ]; };
1138 IonDatetime = __decorate([
1139 ProxyCmp({ inputs: ["cancelText", "dayNames", "dayShortNames", "dayValues", "disabled", "displayFormat", "displayTimezone", "doneText", "hourValues", "max", "min", "minuteValues", "mode", "monthNames", "monthShortNames", "monthValues", "name", "pickerFormat", "pickerOptions", "placeholder", "readonly", "value", "yearValues"], "methods": ["open"] }),
1140 Component({ selector: "ion-datetime", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["cancelText", "dayNames", "dayShortNames", "dayValues", "disabled", "displayFormat", "displayTimezone", "doneText", "hourValues", "max", "min", "minuteValues", "mode", "monthNames", "monthShortNames", "monthValues", "name", "pickerFormat", "pickerOptions", "placeholder", "readonly", "value", "yearValues"] })
1141 ], IonDatetime);
1142 return IonDatetime;
1143}());
1144var IonFab = /** @class */ (function () {
1145 function IonFab(c, r, z) {
1146 this.z = z;
1147 c.detach();
1148 this.el = r.nativeElement;
1149 }
1150 IonFab.ctorParameters = function () { return [
1151 { type: ChangeDetectorRef },
1152 { type: ElementRef },
1153 { type: NgZone }
1154 ]; };
1155 IonFab = __decorate([
1156 ProxyCmp({ inputs: ["activated", "edge", "horizontal", "vertical"], "methods": ["close"] }),
1157 Component({ selector: "ion-fab", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["activated", "edge", "horizontal", "vertical"] })
1158 ], IonFab);
1159 return IonFab;
1160}());
1161var IonFabButton = /** @class */ (function () {
1162 function IonFabButton(c, r, z) {
1163 this.z = z;
1164 c.detach();
1165 this.el = r.nativeElement;
1166 proxyOutputs(this, this.el, ["ionFocus", "ionBlur"]);
1167 }
1168 IonFabButton.ctorParameters = function () { return [
1169 { type: ChangeDetectorRef },
1170 { type: ElementRef },
1171 { type: NgZone }
1172 ]; };
1173 IonFabButton = __decorate([
1174 ProxyCmp({ inputs: ["activated", "closeIcon", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "show", "size", "target", "translucent", "type"] }),
1175 Component({ selector: "ion-fab-button", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["activated", "closeIcon", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "show", "size", "target", "translucent", "type"] })
1176 ], IonFabButton);
1177 return IonFabButton;
1178}());
1179var IonFabList = /** @class */ (function () {
1180 function IonFabList(c, r, z) {
1181 this.z = z;
1182 c.detach();
1183 this.el = r.nativeElement;
1184 }
1185 IonFabList.ctorParameters = function () { return [
1186 { type: ChangeDetectorRef },
1187 { type: ElementRef },
1188 { type: NgZone }
1189 ]; };
1190 IonFabList = __decorate([
1191 ProxyCmp({ inputs: ["activated", "side"] }),
1192 Component({ selector: "ion-fab-list", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["activated", "side"] })
1193 ], IonFabList);
1194 return IonFabList;
1195}());
1196var IonFooter = /** @class */ (function () {
1197 function IonFooter(c, r, z) {
1198 this.z = z;
1199 c.detach();
1200 this.el = r.nativeElement;
1201 }
1202 IonFooter.ctorParameters = function () { return [
1203 { type: ChangeDetectorRef },
1204 { type: ElementRef },
1205 { type: NgZone }
1206 ]; };
1207 IonFooter = __decorate([
1208 ProxyCmp({ inputs: ["mode", "translucent"] }),
1209 Component({ selector: "ion-footer", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["mode", "translucent"] })
1210 ], IonFooter);
1211 return IonFooter;
1212}());
1213var IonGrid = /** @class */ (function () {
1214 function IonGrid(c, r, z) {
1215 this.z = z;
1216 c.detach();
1217 this.el = r.nativeElement;
1218 }
1219 IonGrid.ctorParameters = function () { return [
1220 { type: ChangeDetectorRef },
1221 { type: ElementRef },
1222 { type: NgZone }
1223 ]; };
1224 IonGrid = __decorate([
1225 ProxyCmp({ inputs: ["fixed"] }),
1226 Component({ selector: "ion-grid", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["fixed"] })
1227 ], IonGrid);
1228 return IonGrid;
1229}());
1230var IonHeader = /** @class */ (function () {
1231 function IonHeader(c, r, z) {
1232 this.z = z;
1233 c.detach();
1234 this.el = r.nativeElement;
1235 }
1236 IonHeader.ctorParameters = function () { return [
1237 { type: ChangeDetectorRef },
1238 { type: ElementRef },
1239 { type: NgZone }
1240 ]; };
1241 IonHeader = __decorate([
1242 ProxyCmp({ inputs: ["collapse", "mode", "translucent"] }),
1243 Component({ selector: "ion-header", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["collapse", "mode", "translucent"] })
1244 ], IonHeader);
1245 return IonHeader;
1246}());
1247var IonIcon = /** @class */ (function () {
1248 function IonIcon(c, r, z) {
1249 this.z = z;
1250 c.detach();
1251 this.el = r.nativeElement;
1252 }
1253 IonIcon.ctorParameters = function () { return [
1254 { type: ChangeDetectorRef },
1255 { type: ElementRef },
1256 { type: NgZone }
1257 ]; };
1258 IonIcon = __decorate([
1259 ProxyCmp({ inputs: ["ariaHidden", "ariaLabel", "color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }),
1260 Component({ selector: "ion-icon", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["ariaHidden", "ariaLabel", "color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] })
1261 ], IonIcon);
1262 return IonIcon;
1263}());
1264var IonImg = /** @class */ (function () {
1265 function IonImg(c, r, z) {
1266 this.z = z;
1267 c.detach();
1268 this.el = r.nativeElement;
1269 proxyOutputs(this, this.el, ["ionImgWillLoad", "ionImgDidLoad", "ionError"]);
1270 }
1271 IonImg.ctorParameters = function () { return [
1272 { type: ChangeDetectorRef },
1273 { type: ElementRef },
1274 { type: NgZone }
1275 ]; };
1276 IonImg = __decorate([
1277 ProxyCmp({ inputs: ["alt", "src"] }),
1278 Component({ selector: "ion-img", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["alt", "src"] })
1279 ], IonImg);
1280 return IonImg;
1281}());
1282var IonInfiniteScroll = /** @class */ (function () {
1283 function IonInfiniteScroll(c, r, z) {
1284 this.z = z;
1285 c.detach();
1286 this.el = r.nativeElement;
1287 proxyOutputs(this, this.el, ["ionInfinite"]);
1288 }
1289 IonInfiniteScroll.ctorParameters = function () { return [
1290 { type: ChangeDetectorRef },
1291 { type: ElementRef },
1292 { type: NgZone }
1293 ]; };
1294 IonInfiniteScroll = __decorate([
1295 ProxyCmp({ inputs: ["disabled", "position", "threshold"], "methods": ["complete"] }),
1296 Component({ selector: "ion-infinite-scroll", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["disabled", "position", "threshold"] })
1297 ], IonInfiniteScroll);
1298 return IonInfiniteScroll;
1299}());
1300var IonInfiniteScrollContent = /** @class */ (function () {
1301 function IonInfiniteScrollContent(c, r, z) {
1302 this.z = z;
1303 c.detach();
1304 this.el = r.nativeElement;
1305 }
1306 IonInfiniteScrollContent.ctorParameters = function () { return [
1307 { type: ChangeDetectorRef },
1308 { type: ElementRef },
1309 { type: NgZone }
1310 ]; };
1311 IonInfiniteScrollContent = __decorate([
1312 ProxyCmp({ inputs: ["loadingSpinner", "loadingText"] }),
1313 Component({ selector: "ion-infinite-scroll-content", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["loadingSpinner", "loadingText"] })
1314 ], IonInfiniteScrollContent);
1315 return IonInfiniteScrollContent;
1316}());
1317var IonInput = /** @class */ (function () {
1318 function IonInput(c, r, z) {
1319 this.z = z;
1320 c.detach();
1321 this.el = r.nativeElement;
1322 proxyOutputs(this, this.el, ["ionInput", "ionChange", "ionBlur", "ionFocus"]);
1323 }
1324 IonInput.ctorParameters = function () { return [
1325 { type: ChangeDetectorRef },
1326 { type: ElementRef },
1327 { type: NgZone }
1328 ]; };
1329 IonInput = __decorate([
1330 ProxyCmp({ inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"], "methods": ["setFocus", "getInputElement"] }),
1331 Component({ selector: "ion-input", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"] })
1332 ], IonInput);
1333 return IonInput;
1334}());
1335var IonItem = /** @class */ (function () {
1336 function IonItem(c, r, z) {
1337 this.z = z;
1338 c.detach();
1339 this.el = r.nativeElement;
1340 }
1341 IonItem.ctorParameters = function () { return [
1342 { type: ChangeDetectorRef },
1343 { type: ElementRef },
1344 { type: NgZone }
1345 ]; };
1346 IonItem = __decorate([
1347 ProxyCmp({ inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }),
1348 Component({ selector: "ion-item", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] })
1349 ], IonItem);
1350 return IonItem;
1351}());
1352var IonItemDivider = /** @class */ (function () {
1353 function IonItemDivider(c, r, z) {
1354 this.z = z;
1355 c.detach();
1356 this.el = r.nativeElement;
1357 }
1358 IonItemDivider.ctorParameters = function () { return [
1359 { type: ChangeDetectorRef },
1360 { type: ElementRef },
1361 { type: NgZone }
1362 ]; };
1363 IonItemDivider = __decorate([
1364 ProxyCmp({ inputs: ["color", "mode", "sticky"] }),
1365 Component({ selector: "ion-item-divider", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "mode", "sticky"] })
1366 ], IonItemDivider);
1367 return IonItemDivider;
1368}());
1369var IonItemGroup = /** @class */ (function () {
1370 function IonItemGroup(c, r, z) {
1371 this.z = z;
1372 c.detach();
1373 this.el = r.nativeElement;
1374 }
1375 IonItemGroup.ctorParameters = function () { return [
1376 { type: ChangeDetectorRef },
1377 { type: ElementRef },
1378 { type: NgZone }
1379 ]; };
1380 IonItemGroup = __decorate([
1381 Component({ selector: "ion-item-group", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>" })
1382 ], IonItemGroup);
1383 return IonItemGroup;
1384}());
1385var IonItemOption = /** @class */ (function () {
1386 function IonItemOption(c, r, z) {
1387 this.z = z;
1388 c.detach();
1389 this.el = r.nativeElement;
1390 }
1391 IonItemOption.ctorParameters = function () { return [
1392 { type: ChangeDetectorRef },
1393 { type: ElementRef },
1394 { type: NgZone }
1395 ]; };
1396 IonItemOption = __decorate([
1397 ProxyCmp({ inputs: ["color", "disabled", "download", "expandable", "href", "mode", "rel", "target", "type"] }),
1398 Component({ selector: "ion-item-option", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "disabled", "download", "expandable", "href", "mode", "rel", "target", "type"] })
1399 ], IonItemOption);
1400 return IonItemOption;
1401}());
1402var IonItemOptions = /** @class */ (function () {
1403 function IonItemOptions(c, r, z) {
1404 this.z = z;
1405 c.detach();
1406 this.el = r.nativeElement;
1407 proxyOutputs(this, this.el, ["ionSwipe"]);
1408 }
1409 IonItemOptions.ctorParameters = function () { return [
1410 { type: ChangeDetectorRef },
1411 { type: ElementRef },
1412 { type: NgZone }
1413 ]; };
1414 IonItemOptions = __decorate([
1415 ProxyCmp({ inputs: ["side"] }),
1416 Component({ selector: "ion-item-options", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["side"] })
1417 ], IonItemOptions);
1418 return IonItemOptions;
1419}());
1420var IonItemSliding = /** @class */ (function () {
1421 function IonItemSliding(c, r, z) {
1422 this.z = z;
1423 c.detach();
1424 this.el = r.nativeElement;
1425 proxyOutputs(this, this.el, ["ionDrag"]);
1426 }
1427 IonItemSliding.ctorParameters = function () { return [
1428 { type: ChangeDetectorRef },
1429 { type: ElementRef },
1430 { type: NgZone }
1431 ]; };
1432 IonItemSliding = __decorate([
1433 ProxyCmp({ inputs: ["disabled"], "methods": ["getOpenAmount", "getSlidingRatio", "open", "close", "closeOpened"] }),
1434 Component({ selector: "ion-item-sliding", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["disabled"] })
1435 ], IonItemSliding);
1436 return IonItemSliding;
1437}());
1438var IonLabel = /** @class */ (function () {
1439 function IonLabel(c, r, z) {
1440 this.z = z;
1441 c.detach();
1442 this.el = r.nativeElement;
1443 }
1444 IonLabel.ctorParameters = function () { return [
1445 { type: ChangeDetectorRef },
1446 { type: ElementRef },
1447 { type: NgZone }
1448 ]; };
1449 IonLabel = __decorate([
1450 ProxyCmp({ inputs: ["color", "mode", "position"] }),
1451 Component({ selector: "ion-label", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "mode", "position"] })
1452 ], IonLabel);
1453 return IonLabel;
1454}());
1455var IonList = /** @class */ (function () {
1456 function IonList(c, r, z) {
1457 this.z = z;
1458 c.detach();
1459 this.el = r.nativeElement;
1460 }
1461 IonList.ctorParameters = function () { return [
1462 { type: ChangeDetectorRef },
1463 { type: ElementRef },
1464 { type: NgZone }
1465 ]; };
1466 IonList = __decorate([
1467 ProxyCmp({ inputs: ["inset", "lines", "mode"], "methods": ["closeSlidingItems"] }),
1468 Component({ selector: "ion-list", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["inset", "lines", "mode"] })
1469 ], IonList);
1470 return IonList;
1471}());
1472var IonListHeader = /** @class */ (function () {
1473 function IonListHeader(c, r, z) {
1474 this.z = z;
1475 c.detach();
1476 this.el = r.nativeElement;
1477 }
1478 IonListHeader.ctorParameters = function () { return [
1479 { type: ChangeDetectorRef },
1480 { type: ElementRef },
1481 { type: NgZone }
1482 ]; };
1483 IonListHeader = __decorate([
1484 ProxyCmp({ inputs: ["color", "lines", "mode"] }),
1485 Component({ selector: "ion-list-header", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "lines", "mode"] })
1486 ], IonListHeader);
1487 return IonListHeader;
1488}());
1489var IonMenu = /** @class */ (function () {
1490 function IonMenu(c, r, z) {
1491 this.z = z;
1492 c.detach();
1493 this.el = r.nativeElement;
1494 proxyOutputs(this, this.el, ["ionWillOpen", "ionWillClose", "ionDidOpen", "ionDidClose"]);
1495 }
1496 IonMenu.ctorParameters = function () { return [
1497 { type: ChangeDetectorRef },
1498 { type: ElementRef },
1499 { type: NgZone }
1500 ]; };
1501 IonMenu = __decorate([
1502 ProxyCmp({ inputs: ["contentId", "disabled", "maxEdgeStart", "menuId", "side", "swipeGesture", "type"], "methods": ["isOpen", "isActive", "open", "close", "toggle", "setOpen"] }),
1503 Component({ selector: "ion-menu", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["contentId", "disabled", "maxEdgeStart", "menuId", "side", "swipeGesture", "type"] })
1504 ], IonMenu);
1505 return IonMenu;
1506}());
1507var IonMenuButton = /** @class */ (function () {
1508 function IonMenuButton(c, r, z) {
1509 this.z = z;
1510 c.detach();
1511 this.el = r.nativeElement;
1512 }
1513 IonMenuButton.ctorParameters = function () { return [
1514 { type: ChangeDetectorRef },
1515 { type: ElementRef },
1516 { type: NgZone }
1517 ]; };
1518 IonMenuButton = __decorate([
1519 ProxyCmp({ inputs: ["autoHide", "color", "disabled", "menu", "mode", "type"] }),
1520 Component({ selector: "ion-menu-button", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["autoHide", "color", "disabled", "menu", "mode", "type"] })
1521 ], IonMenuButton);
1522 return IonMenuButton;
1523}());
1524var IonMenuToggle = /** @class */ (function () {
1525 function IonMenuToggle(c, r, z) {
1526 this.z = z;
1527 c.detach();
1528 this.el = r.nativeElement;
1529 }
1530 IonMenuToggle.ctorParameters = function () { return [
1531 { type: ChangeDetectorRef },
1532 { type: ElementRef },
1533 { type: NgZone }
1534 ]; };
1535 IonMenuToggle = __decorate([
1536 ProxyCmp({ inputs: ["autoHide", "menu"] }),
1537 Component({ selector: "ion-menu-toggle", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["autoHide", "menu"] })
1538 ], IonMenuToggle);
1539 return IonMenuToggle;
1540}());
1541var IonNav = /** @class */ (function () {
1542 function IonNav(c, r, z) {
1543 this.z = z;
1544 c.detach();
1545 this.el = r.nativeElement;
1546 proxyOutputs(this, this.el, ["ionNavWillChange", "ionNavDidChange"]);
1547 }
1548 IonNav.ctorParameters = function () { return [
1549 { type: ChangeDetectorRef },
1550 { type: ElementRef },
1551 { type: NgZone }
1552 ]; };
1553 IonNav = __decorate([
1554 ProxyCmp({ inputs: ["animated", "animation", "root", "rootParams", "swipeGesture"], "methods": ["push", "insert", "insertPages", "pop", "popTo", "popToRoot", "removeIndex", "setRoot", "setPages", "getActive", "getByIndex", "canGoBack", "getPrevious"] }),
1555 Component({ selector: "ion-nav", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["animated", "animation", "root", "rootParams", "swipeGesture"] })
1556 ], IonNav);
1557 return IonNav;
1558}());
1559var IonNavLink = /** @class */ (function () {
1560 function IonNavLink(c, r, z) {
1561 this.z = z;
1562 c.detach();
1563 this.el = r.nativeElement;
1564 }
1565 IonNavLink.ctorParameters = function () { return [
1566 { type: ChangeDetectorRef },
1567 { type: ElementRef },
1568 { type: NgZone }
1569 ]; };
1570 IonNavLink = __decorate([
1571 ProxyCmp({ inputs: ["component", "componentProps", "routerAnimation", "routerDirection"] }),
1572 Component({ selector: "ion-nav-link", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["component", "componentProps", "routerAnimation", "routerDirection"] })
1573 ], IonNavLink);
1574 return IonNavLink;
1575}());
1576var IonNote = /** @class */ (function () {
1577 function IonNote(c, r, z) {
1578 this.z = z;
1579 c.detach();
1580 this.el = r.nativeElement;
1581 }
1582 IonNote.ctorParameters = function () { return [
1583 { type: ChangeDetectorRef },
1584 { type: ElementRef },
1585 { type: NgZone }
1586 ]; };
1587 IonNote = __decorate([
1588 ProxyCmp({ inputs: ["color", "mode"] }),
1589 Component({ selector: "ion-note", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "mode"] })
1590 ], IonNote);
1591 return IonNote;
1592}());
1593var IonProgressBar = /** @class */ (function () {
1594 function IonProgressBar(c, r, z) {
1595 this.z = z;
1596 c.detach();
1597 this.el = r.nativeElement;
1598 }
1599 IonProgressBar.ctorParameters = function () { return [
1600 { type: ChangeDetectorRef },
1601 { type: ElementRef },
1602 { type: NgZone }
1603 ]; };
1604 IonProgressBar = __decorate([
1605 ProxyCmp({ inputs: ["buffer", "color", "mode", "reversed", "type", "value"] }),
1606 Component({ selector: "ion-progress-bar", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["buffer", "color", "mode", "reversed", "type", "value"] })
1607 ], IonProgressBar);
1608 return IonProgressBar;
1609}());
1610var IonRadio = /** @class */ (function () {
1611 function IonRadio(c, r, z) {
1612 this.z = z;
1613 c.detach();
1614 this.el = r.nativeElement;
1615 proxyOutputs(this, this.el, ["ionFocus", "ionBlur"]);
1616 }
1617 IonRadio.ctorParameters = function () { return [
1618 { type: ChangeDetectorRef },
1619 { type: ElementRef },
1620 { type: NgZone }
1621 ]; };
1622 IonRadio = __decorate([
1623 ProxyCmp({ inputs: ["color", "disabled", "mode", "name", "value"] }),
1624 Component({ selector: "ion-radio", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "disabled", "mode", "name", "value"] })
1625 ], IonRadio);
1626 return IonRadio;
1627}());
1628var IonRadioGroup = /** @class */ (function () {
1629 function IonRadioGroup(c, r, z) {
1630 this.z = z;
1631 c.detach();
1632 this.el = r.nativeElement;
1633 proxyOutputs(this, this.el, ["ionChange"]);
1634 }
1635 IonRadioGroup.ctorParameters = function () { return [
1636 { type: ChangeDetectorRef },
1637 { type: ElementRef },
1638 { type: NgZone }
1639 ]; };
1640 IonRadioGroup = __decorate([
1641 ProxyCmp({ inputs: ["allowEmptySelection", "name", "value"] }),
1642 Component({ selector: "ion-radio-group", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["allowEmptySelection", "name", "value"] })
1643 ], IonRadioGroup);
1644 return IonRadioGroup;
1645}());
1646var IonRange = /** @class */ (function () {
1647 function IonRange(c, r, z) {
1648 this.z = z;
1649 c.detach();
1650 this.el = r.nativeElement;
1651 proxyOutputs(this, this.el, ["ionChange", "ionFocus", "ionBlur"]);
1652 }
1653 IonRange.ctorParameters = function () { return [
1654 { type: ChangeDetectorRef },
1655 { type: ElementRef },
1656 { type: NgZone }
1657 ]; };
1658 IonRange = __decorate([
1659 ProxyCmp({ inputs: ["color", "debounce", "disabled", "dualKnobs", "max", "min", "mode", "name", "pin", "snaps", "step", "ticks", "value"] }),
1660 Component({ selector: "ion-range", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "debounce", "disabled", "dualKnobs", "max", "min", "mode", "name", "pin", "snaps", "step", "ticks", "value"] })
1661 ], IonRange);
1662 return IonRange;
1663}());
1664var IonRefresher = /** @class */ (function () {
1665 function IonRefresher(c, r, z) {
1666 this.z = z;
1667 c.detach();
1668 this.el = r.nativeElement;
1669 proxyOutputs(this, this.el, ["ionRefresh", "ionPull", "ionStart"]);
1670 }
1671 IonRefresher.ctorParameters = function () { return [
1672 { type: ChangeDetectorRef },
1673 { type: ElementRef },
1674 { type: NgZone }
1675 ]; };
1676 IonRefresher = __decorate([
1677 ProxyCmp({ inputs: ["closeDuration", "disabled", "pullFactor", "pullMax", "pullMin", "snapbackDuration"], "methods": ["complete", "cancel", "getProgress"] }),
1678 Component({ selector: "ion-refresher", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["closeDuration", "disabled", "pullFactor", "pullMax", "pullMin", "snapbackDuration"] })
1679 ], IonRefresher);
1680 return IonRefresher;
1681}());
1682var IonRefresherContent = /** @class */ (function () {
1683 function IonRefresherContent(c, r, z) {
1684 this.z = z;
1685 c.detach();
1686 this.el = r.nativeElement;
1687 }
1688 IonRefresherContent.ctorParameters = function () { return [
1689 { type: ChangeDetectorRef },
1690 { type: ElementRef },
1691 { type: NgZone }
1692 ]; };
1693 IonRefresherContent = __decorate([
1694 ProxyCmp({ inputs: ["pullingIcon", "pullingText", "refreshingSpinner", "refreshingText"] }),
1695 Component({ selector: "ion-refresher-content", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["pullingIcon", "pullingText", "refreshingSpinner", "refreshingText"] })
1696 ], IonRefresherContent);
1697 return IonRefresherContent;
1698}());
1699var IonReorder = /** @class */ (function () {
1700 function IonReorder(c, r, z) {
1701 this.z = z;
1702 c.detach();
1703 this.el = r.nativeElement;
1704 }
1705 IonReorder.ctorParameters = function () { return [
1706 { type: ChangeDetectorRef },
1707 { type: ElementRef },
1708 { type: NgZone }
1709 ]; };
1710 IonReorder = __decorate([
1711 Component({ selector: "ion-reorder", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>" })
1712 ], IonReorder);
1713 return IonReorder;
1714}());
1715var IonReorderGroup = /** @class */ (function () {
1716 function IonReorderGroup(c, r, z) {
1717 this.z = z;
1718 c.detach();
1719 this.el = r.nativeElement;
1720 proxyOutputs(this, this.el, ["ionItemReorder"]);
1721 }
1722 IonReorderGroup.ctorParameters = function () { return [
1723 { type: ChangeDetectorRef },
1724 { type: ElementRef },
1725 { type: NgZone }
1726 ]; };
1727 IonReorderGroup = __decorate([
1728 ProxyCmp({ inputs: ["disabled"], "methods": ["complete"] }),
1729 Component({ selector: "ion-reorder-group", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["disabled"] })
1730 ], IonReorderGroup);
1731 return IonReorderGroup;
1732}());
1733var IonRippleEffect = /** @class */ (function () {
1734 function IonRippleEffect(c, r, z) {
1735 this.z = z;
1736 c.detach();
1737 this.el = r.nativeElement;
1738 }
1739 IonRippleEffect.ctorParameters = function () { return [
1740 { type: ChangeDetectorRef },
1741 { type: ElementRef },
1742 { type: NgZone }
1743 ]; };
1744 IonRippleEffect = __decorate([
1745 ProxyCmp({ inputs: ["type"], "methods": ["addRipple"] }),
1746 Component({ selector: "ion-ripple-effect", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["type"] })
1747 ], IonRippleEffect);
1748 return IonRippleEffect;
1749}());
1750var IonRow = /** @class */ (function () {
1751 function IonRow(c, r, z) {
1752 this.z = z;
1753 c.detach();
1754 this.el = r.nativeElement;
1755 }
1756 IonRow.ctorParameters = function () { return [
1757 { type: ChangeDetectorRef },
1758 { type: ElementRef },
1759 { type: NgZone }
1760 ]; };
1761 IonRow = __decorate([
1762 Component({ selector: "ion-row", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>" })
1763 ], IonRow);
1764 return IonRow;
1765}());
1766var IonSearchbar = /** @class */ (function () {
1767 function IonSearchbar(c, r, z) {
1768 this.z = z;
1769 c.detach();
1770 this.el = r.nativeElement;
1771 proxyOutputs(this, this.el, ["ionInput", "ionChange", "ionCancel", "ionClear", "ionBlur", "ionFocus"]);
1772 }
1773 IonSearchbar.ctorParameters = function () { return [
1774 { type: ChangeDetectorRef },
1775 { type: ElementRef },
1776 { type: NgZone }
1777 ]; };
1778 IonSearchbar = __decorate([
1779 ProxyCmp({ inputs: ["animated", "autocomplete", "autocorrect", "cancelButtonIcon", "cancelButtonText", "clearIcon", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "mode", "placeholder", "searchIcon", "showCancelButton", "showClearButton", "spellcheck", "type", "value"], "methods": ["setFocus", "getInputElement"] }),
1780 Component({ selector: "ion-searchbar", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["animated", "autocomplete", "autocorrect", "cancelButtonIcon", "cancelButtonText", "clearIcon", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "mode", "placeholder", "searchIcon", "showCancelButton", "showClearButton", "spellcheck", "type", "value"] })
1781 ], IonSearchbar);
1782 return IonSearchbar;
1783}());
1784var IonSegment = /** @class */ (function () {
1785 function IonSegment(c, r, z) {
1786 this.z = z;
1787 c.detach();
1788 this.el = r.nativeElement;
1789 proxyOutputs(this, this.el, ["ionChange"]);
1790 }
1791 IonSegment.ctorParameters = function () { return [
1792 { type: ChangeDetectorRef },
1793 { type: ElementRef },
1794 { type: NgZone }
1795 ]; };
1796 IonSegment = __decorate([
1797 ProxyCmp({ inputs: ["color", "disabled", "mode", "scrollable", "swipeGesture", "value"] }),
1798 Component({ selector: "ion-segment", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "disabled", "mode", "scrollable", "swipeGesture", "value"] })
1799 ], IonSegment);
1800 return IonSegment;
1801}());
1802var IonSegmentButton = /** @class */ (function () {
1803 function IonSegmentButton(c, r, z) {
1804 this.z = z;
1805 c.detach();
1806 this.el = r.nativeElement;
1807 }
1808 IonSegmentButton.ctorParameters = function () { return [
1809 { type: ChangeDetectorRef },
1810 { type: ElementRef },
1811 { type: NgZone }
1812 ]; };
1813 IonSegmentButton = __decorate([
1814 ProxyCmp({ inputs: ["disabled", "layout", "mode", "type", "value"] }),
1815 Component({ selector: "ion-segment-button", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["disabled", "layout", "mode", "type", "value"] })
1816 ], IonSegmentButton);
1817 return IonSegmentButton;
1818}());
1819var IonSelect = /** @class */ (function () {
1820 function IonSelect(c, r, z) {
1821 this.z = z;
1822 c.detach();
1823 this.el = r.nativeElement;
1824 proxyOutputs(this, this.el, ["ionChange", "ionCancel", "ionFocus", "ionBlur"]);
1825 }
1826 IonSelect.ctorParameters = function () { return [
1827 { type: ChangeDetectorRef },
1828 { type: ElementRef },
1829 { type: NgZone }
1830 ]; };
1831 IonSelect = __decorate([
1832 ProxyCmp({ inputs: ["cancelText", "compareWith", "disabled", "interface", "interfaceOptions", "mode", "multiple", "name", "okText", "placeholder", "selectedText", "value"], "methods": ["open"] }),
1833 Component({ selector: "ion-select", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["cancelText", "compareWith", "disabled", "interface", "interfaceOptions", "mode", "multiple", "name", "okText", "placeholder", "selectedText", "value"] })
1834 ], IonSelect);
1835 return IonSelect;
1836}());
1837var IonSelectOption = /** @class */ (function () {
1838 function IonSelectOption(c, r, z) {
1839 this.z = z;
1840 c.detach();
1841 this.el = r.nativeElement;
1842 }
1843 IonSelectOption.ctorParameters = function () { return [
1844 { type: ChangeDetectorRef },
1845 { type: ElementRef },
1846 { type: NgZone }
1847 ]; };
1848 IonSelectOption = __decorate([
1849 ProxyCmp({ inputs: ["disabled", "value"] }),
1850 Component({ selector: "ion-select-option", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["disabled", "value"] })
1851 ], IonSelectOption);
1852 return IonSelectOption;
1853}());
1854var IonSkeletonText = /** @class */ (function () {
1855 function IonSkeletonText(c, r, z) {
1856 this.z = z;
1857 c.detach();
1858 this.el = r.nativeElement;
1859 }
1860 IonSkeletonText.ctorParameters = function () { return [
1861 { type: ChangeDetectorRef },
1862 { type: ElementRef },
1863 { type: NgZone }
1864 ]; };
1865 IonSkeletonText = __decorate([
1866 ProxyCmp({ inputs: ["animated"] }),
1867 Component({ selector: "ion-skeleton-text", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["animated"] })
1868 ], IonSkeletonText);
1869 return IonSkeletonText;
1870}());
1871var IonSlide = /** @class */ (function () {
1872 function IonSlide(c, r, z) {
1873 this.z = z;
1874 c.detach();
1875 this.el = r.nativeElement;
1876 }
1877 IonSlide.ctorParameters = function () { return [
1878 { type: ChangeDetectorRef },
1879 { type: ElementRef },
1880 { type: NgZone }
1881 ]; };
1882 IonSlide = __decorate([
1883 Component({ selector: "ion-slide", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>" })
1884 ], IonSlide);
1885 return IonSlide;
1886}());
1887var IonSlides = /** @class */ (function () {
1888 function IonSlides(c, r, z) {
1889 this.z = z;
1890 c.detach();
1891 this.el = r.nativeElement;
1892 proxyOutputs(this, this.el, ["ionSlidesDidLoad", "ionSlideTap", "ionSlideDoubleTap", "ionSlideWillChange", "ionSlideDidChange", "ionSlideNextStart", "ionSlidePrevStart", "ionSlideNextEnd", "ionSlidePrevEnd", "ionSlideTransitionStart", "ionSlideTransitionEnd", "ionSlideDrag", "ionSlideReachStart", "ionSlideReachEnd", "ionSlideTouchStart", "ionSlideTouchEnd"]);
1893 }
1894 IonSlides.ctorParameters = function () { return [
1895 { type: ChangeDetectorRef },
1896 { type: ElementRef },
1897 { type: NgZone }
1898 ]; };
1899 IonSlides = __decorate([
1900 ProxyCmp({ inputs: ["mode", "options", "pager", "scrollbar"], "methods": ["update", "updateAutoHeight", "slideTo", "slideNext", "slidePrev", "getActiveIndex", "getPreviousIndex", "length", "isEnd", "isBeginning", "startAutoplay", "stopAutoplay", "lockSwipeToNext", "lockSwipeToPrev", "lockSwipes", "getSwiper"] }),
1901 Component({ selector: "ion-slides", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["mode", "options", "pager", "scrollbar"] })
1902 ], IonSlides);
1903 return IonSlides;
1904}());
1905var IonSpinner = /** @class */ (function () {
1906 function IonSpinner(c, r, z) {
1907 this.z = z;
1908 c.detach();
1909 this.el = r.nativeElement;
1910 }
1911 IonSpinner.ctorParameters = function () { return [
1912 { type: ChangeDetectorRef },
1913 { type: ElementRef },
1914 { type: NgZone }
1915 ]; };
1916 IonSpinner = __decorate([
1917 ProxyCmp({ inputs: ["color", "duration", "name", "paused"] }),
1918 Component({ selector: "ion-spinner", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "duration", "name", "paused"] })
1919 ], IonSpinner);
1920 return IonSpinner;
1921}());
1922var IonSplitPane = /** @class */ (function () {
1923 function IonSplitPane(c, r, z) {
1924 this.z = z;
1925 c.detach();
1926 this.el = r.nativeElement;
1927 proxyOutputs(this, this.el, ["ionSplitPaneVisible"]);
1928 }
1929 IonSplitPane.ctorParameters = function () { return [
1930 { type: ChangeDetectorRef },
1931 { type: ElementRef },
1932 { type: NgZone }
1933 ]; };
1934 IonSplitPane = __decorate([
1935 ProxyCmp({ inputs: ["contentId", "disabled", "when"] }),
1936 Component({ selector: "ion-split-pane", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["contentId", "disabled", "when"] })
1937 ], IonSplitPane);
1938 return IonSplitPane;
1939}());
1940var IonTabBar = /** @class */ (function () {
1941 function IonTabBar(c, r, z) {
1942 this.z = z;
1943 c.detach();
1944 this.el = r.nativeElement;
1945 }
1946 IonTabBar.ctorParameters = function () { return [
1947 { type: ChangeDetectorRef },
1948 { type: ElementRef },
1949 { type: NgZone }
1950 ]; };
1951 IonTabBar = __decorate([
1952 ProxyCmp({ inputs: ["color", "mode", "selectedTab", "translucent"] }),
1953 Component({ selector: "ion-tab-bar", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "mode", "selectedTab", "translucent"] })
1954 ], IonTabBar);
1955 return IonTabBar;
1956}());
1957var IonTabButton = /** @class */ (function () {
1958 function IonTabButton(c, r, z) {
1959 this.z = z;
1960 c.detach();
1961 this.el = r.nativeElement;
1962 }
1963 IonTabButton.ctorParameters = function () { return [
1964 { type: ChangeDetectorRef },
1965 { type: ElementRef },
1966 { type: NgZone }
1967 ]; };
1968 IonTabButton = __decorate([
1969 ProxyCmp({ inputs: ["disabled", "download", "href", "layout", "mode", "rel", "selected", "tab", "target"] }),
1970 Component({ selector: "ion-tab-button", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["disabled", "download", "href", "layout", "mode", "rel", "selected", "tab", "target"] })
1971 ], IonTabButton);
1972 return IonTabButton;
1973}());
1974var IonText = /** @class */ (function () {
1975 function IonText(c, r, z) {
1976 this.z = z;
1977 c.detach();
1978 this.el = r.nativeElement;
1979 }
1980 IonText.ctorParameters = function () { return [
1981 { type: ChangeDetectorRef },
1982 { type: ElementRef },
1983 { type: NgZone }
1984 ]; };
1985 IonText = __decorate([
1986 ProxyCmp({ inputs: ["color", "mode"] }),
1987 Component({ selector: "ion-text", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "mode"] })
1988 ], IonText);
1989 return IonText;
1990}());
1991var IonTextarea = /** @class */ (function () {
1992 function IonTextarea(c, r, z) {
1993 this.z = z;
1994 c.detach();
1995 this.el = r.nativeElement;
1996 proxyOutputs(this, this.el, ["ionChange", "ionInput", "ionBlur", "ionFocus"]);
1997 }
1998 IonTextarea.ctorParameters = function () { return [
1999 { type: ChangeDetectorRef },
2000 { type: ElementRef },
2001 { type: NgZone }
2002 ]; };
2003 IonTextarea = __decorate([
2004 ProxyCmp({ inputs: ["autoGrow", "autocapitalize", "autofocus", "clearOnEdit", "color", "cols", "debounce", "disabled", "enterkeyhint", "inputmode", "maxlength", "minlength", "mode", "name", "placeholder", "readonly", "required", "rows", "spellcheck", "value", "wrap"], "methods": ["setFocus", "getInputElement"] }),
2005 Component({ selector: "ion-textarea", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["autoGrow", "autocapitalize", "autofocus", "clearOnEdit", "color", "cols", "debounce", "disabled", "enterkeyhint", "inputmode", "maxlength", "minlength", "mode", "name", "placeholder", "readonly", "required", "rows", "spellcheck", "value", "wrap"] })
2006 ], IonTextarea);
2007 return IonTextarea;
2008}());
2009var IonThumbnail = /** @class */ (function () {
2010 function IonThumbnail(c, r, z) {
2011 this.z = z;
2012 c.detach();
2013 this.el = r.nativeElement;
2014 }
2015 IonThumbnail.ctorParameters = function () { return [
2016 { type: ChangeDetectorRef },
2017 { type: ElementRef },
2018 { type: NgZone }
2019 ]; };
2020 IonThumbnail = __decorate([
2021 Component({ selector: "ion-thumbnail", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>" })
2022 ], IonThumbnail);
2023 return IonThumbnail;
2024}());
2025var IonTitle = /** @class */ (function () {
2026 function IonTitle(c, r, z) {
2027 this.z = z;
2028 c.detach();
2029 this.el = r.nativeElement;
2030 }
2031 IonTitle.ctorParameters = function () { return [
2032 { type: ChangeDetectorRef },
2033 { type: ElementRef },
2034 { type: NgZone }
2035 ]; };
2036 IonTitle = __decorate([
2037 ProxyCmp({ inputs: ["color", "size"] }),
2038 Component({ selector: "ion-title", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "size"] })
2039 ], IonTitle);
2040 return IonTitle;
2041}());
2042var IonToggle = /** @class */ (function () {
2043 function IonToggle(c, r, z) {
2044 this.z = z;
2045 c.detach();
2046 this.el = r.nativeElement;
2047 proxyOutputs(this, this.el, ["ionChange", "ionFocus", "ionBlur"]);
2048 }
2049 IonToggle.ctorParameters = function () { return [
2050 { type: ChangeDetectorRef },
2051 { type: ElementRef },
2052 { type: NgZone }
2053 ]; };
2054 IonToggle = __decorate([
2055 ProxyCmp({ inputs: ["checked", "color", "disabled", "mode", "name", "value"] }),
2056 Component({ selector: "ion-toggle", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["checked", "color", "disabled", "mode", "name", "value"] })
2057 ], IonToggle);
2058 return IonToggle;
2059}());
2060var IonToolbar = /** @class */ (function () {
2061 function IonToolbar(c, r, z) {
2062 this.z = z;
2063 c.detach();
2064 this.el = r.nativeElement;
2065 }
2066 IonToolbar.ctorParameters = function () { return [
2067 { type: ChangeDetectorRef },
2068 { type: ElementRef },
2069 { type: NgZone }
2070 ]; };
2071 IonToolbar = __decorate([
2072 ProxyCmp({ inputs: ["color", "mode"] }),
2073 Component({ selector: "ion-toolbar", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "mode"] })
2074 ], IonToolbar);
2075 return IonToolbar;
2076}());
2077
2078var Config = /** @class */ (function () {
2079 function Config() {
2080 }
2081 Config.prototype.get = function (key, fallback) {
2082 var c = getConfig();
2083 if (c) {
2084 return c.get(key, fallback);
2085 }
2086 return null;
2087 };
2088 Config.prototype.getBoolean = function (key, fallback) {
2089 var c = getConfig();
2090 if (c) {
2091 return c.getBoolean(key, fallback);
2092 }
2093 return false;
2094 };
2095 Config.prototype.getNumber = function (key, fallback) {
2096 var c = getConfig();
2097 if (c) {
2098 return c.getNumber(key, fallback);
2099 }
2100 return 0;
2101 };
2102 Config.prototype.set = function (key, value) {
2103 console.warn("[DEPRECATION][Config]: The Config.set() method is deprecated and will be removed in Ionic Framework 6.0. Please see https://ionicframework.com/docs/angular/config for alternatives.");
2104 var c = getConfig();
2105 if (c) {
2106 c.set(key, value);
2107 }
2108 };
2109 Config.ngInjectableDef = ɵɵdefineInjectable({ factory: function Config_Factory() { return new Config(); }, token: Config, providedIn: "root" });
2110 Config = __decorate([
2111 Injectable({
2112 providedIn: 'root'
2113 })
2114 ], Config);
2115 return Config;
2116}());
2117var ConfigToken = new InjectionToken('USERCONFIG');
2118var getConfig = function () {
2119 if (typeof window !== 'undefined') {
2120 var Ionic = window.Ionic;
2121 if (Ionic && Ionic.config) {
2122 return Ionic.config;
2123 }
2124 }
2125 return null;
2126};
2127var ɵ0$3 = getConfig;
2128
2129/**
2130 * @description
2131 * NavParams are an object that exists on a page and can contain data for that particular view.
2132 * Similar to how data was pass to a view in V1 with `$stateParams`, NavParams offer a much more flexible
2133 * option with a simple `get` method.
2134 *
2135 * @usage
2136 * ```ts
2137 * import { NavParams } from '@ionic/angular';
2138 *
2139 * export class MyClass{
2140 *
2141 * constructor(navParams: NavParams){
2142 * // userParams is an object we have in our nav-parameters
2143 * navParams.get('userParams');
2144 * }
2145 *
2146 * }
2147 * ```
2148 */
2149var NavParams = /** @class */ (function () {
2150 function NavParams(data) {
2151 if (data === void 0) { data = {}; }
2152 this.data = data;
2153 }
2154 /**
2155 * Get the value of a nav-parameter for the current view
2156 *
2157 * ```ts
2158 * import { NavParams } from 'ionic-angular';
2159 *
2160 * export class MyClass{
2161 * constructor(public navParams: NavParams){
2162 * // userParams is an object we have in our nav-parameters
2163 * this.navParams.get('userParams');
2164 * }
2165 * }
2166 * ```
2167 *
2168 * @param param Which param you want to look up
2169 */
2170 NavParams.prototype.get = function (param) {
2171 return this.data[param];
2172 };
2173 return NavParams;
2174}());
2175
2176var AngularDelegate = /** @class */ (function () {
2177 function AngularDelegate(zone, appRef) {
2178 this.zone = zone;
2179 this.appRef = appRef;
2180 }
2181 AngularDelegate.prototype.create = function (resolver, injector, location) {
2182 return new AngularFrameworkDelegate(resolver, injector, location, this.appRef, this.zone);
2183 };
2184 AngularDelegate.ctorParameters = function () { return [
2185 { type: NgZone },
2186 { type: ApplicationRef }
2187 ]; };
2188 AngularDelegate = __decorate([
2189 Injectable()
2190 ], AngularDelegate);
2191 return AngularDelegate;
2192}());
2193var AngularFrameworkDelegate = /** @class */ (function () {
2194 function AngularFrameworkDelegate(resolver, injector, location, appRef, zone) {
2195 this.resolver = resolver;
2196 this.injector = injector;
2197 this.location = location;
2198 this.appRef = appRef;
2199 this.zone = zone;
2200 this.elRefMap = new WeakMap();
2201 this.elEventsMap = new WeakMap();
2202 }
2203 AngularFrameworkDelegate.prototype.attachViewToDom = function (container, component, params, cssClasses) {
2204 var _this = this;
2205 return this.zone.run(function () {
2206 return new Promise(function (resolve) {
2207 var el = attachView(_this.zone, _this.resolver, _this.injector, _this.location, _this.appRef, _this.elRefMap, _this.elEventsMap, container, component, params, cssClasses);
2208 resolve(el);
2209 });
2210 });
2211 };
2212 AngularFrameworkDelegate.prototype.removeViewFromDom = function (_container, component) {
2213 var _this = this;
2214 return this.zone.run(function () {
2215 return new Promise(function (resolve) {
2216 var componentRef = _this.elRefMap.get(component);
2217 if (componentRef) {
2218 componentRef.destroy();
2219 _this.elRefMap.delete(component);
2220 var unbindEvents = _this.elEventsMap.get(component);
2221 if (unbindEvents) {
2222 unbindEvents();
2223 _this.elEventsMap.delete(component);
2224 }
2225 }
2226 resolve();
2227 });
2228 });
2229 };
2230 return AngularFrameworkDelegate;
2231}());
2232var attachView = function (zone, resolver, injector, location, appRef, elRefMap, elEventsMap, container, component, params, cssClasses) {
2233 var e_1, _a;
2234 var factory = resolver.resolveComponentFactory(component);
2235 var childInjector = Injector.create({
2236 providers: getProviders(params),
2237 parent: injector
2238 });
2239 var componentRef = (location)
2240 ? location.createComponent(factory, location.length, childInjector)
2241 : factory.create(childInjector);
2242 var instance = componentRef.instance;
2243 var hostElement = componentRef.location.nativeElement;
2244 if (params) {
2245 Object.assign(instance, params);
2246 }
2247 if (cssClasses) {
2248 try {
2249 for (var cssClasses_1 = __values(cssClasses), cssClasses_1_1 = cssClasses_1.next(); !cssClasses_1_1.done; cssClasses_1_1 = cssClasses_1.next()) {
2250 var clazz = cssClasses_1_1.value;
2251 hostElement.classList.add(clazz);
2252 }
2253 }
2254 catch (e_1_1) { e_1 = { error: e_1_1 }; }
2255 finally {
2256 try {
2257 if (cssClasses_1_1 && !cssClasses_1_1.done && (_a = cssClasses_1.return)) _a.call(cssClasses_1);
2258 }
2259 finally { if (e_1) throw e_1.error; }
2260 }
2261 }
2262 var unbindEvents = bindLifecycleEvents(zone, instance, hostElement);
2263 container.appendChild(hostElement);
2264 if (!location) {
2265 appRef.attachView(componentRef.hostView);
2266 }
2267 componentRef.changeDetectorRef.reattach();
2268 elRefMap.set(hostElement, componentRef);
2269 elEventsMap.set(hostElement, unbindEvents);
2270 return hostElement;
2271};
2272var LIFECYCLES = [
2273 LIFECYCLE_WILL_ENTER,
2274 LIFECYCLE_DID_ENTER,
2275 LIFECYCLE_WILL_LEAVE,
2276 LIFECYCLE_DID_LEAVE,
2277 LIFECYCLE_WILL_UNLOAD
2278];
2279var bindLifecycleEvents = function (zone, instance, element) {
2280 return zone.run(function () {
2281 var unregisters = LIFECYCLES
2282 .filter(function (eventName) { return typeof instance[eventName] === 'function'; })
2283 .map(function (eventName) {
2284 var handler = function (ev) { return instance[eventName](ev.detail); };
2285 element.addEventListener(eventName, handler);
2286 return function () { return element.removeEventListener(eventName, handler); };
2287 });
2288 return function () { return unregisters.forEach(function (fn) { return fn(); }); };
2289 });
2290};
2291var NavParamsToken = new InjectionToken('NavParamsToken');
2292var getProviders = function (params) {
2293 return [
2294 {
2295 provide: NavParamsToken, useValue: params
2296 },
2297 {
2298 provide: NavParams, useFactory: provideNavParamsInjectable, deps: [NavParamsToken]
2299 }
2300 ];
2301};
2302var ɵ0$4 = getProviders;
2303var provideNavParamsInjectable = function (params) {
2304 return new NavParams(params);
2305};
2306var ɵ1$2 = provideNavParamsInjectable;
2307
2308var insertView = function (views, view, direction) {
2309 if (direction === 'root') {
2310 return setRoot(views, view);
2311 }
2312 else if (direction === 'forward') {
2313 return setForward(views, view);
2314 }
2315 else {
2316 return setBack(views, view);
2317 }
2318};
2319var setRoot = function (views, view) {
2320 views = views.filter(function (v) { return v.stackId !== view.stackId; });
2321 views.push(view);
2322 return views;
2323};
2324var ɵ0$5 = setRoot;
2325var setForward = function (views, view) {
2326 var index = views.indexOf(view);
2327 if (index >= 0) {
2328 views = views.filter(function (v) { return v.stackId !== view.stackId || v.id <= view.id; });
2329 }
2330 else {
2331 views.push(view);
2332 }
2333 return views;
2334};
2335var ɵ1$3 = setForward;
2336var setBack = function (views, view) {
2337 var index = views.indexOf(view);
2338 if (index >= 0) {
2339 return views.filter(function (v) { return v.stackId !== view.stackId || v.id <= view.id; });
2340 }
2341 else {
2342 return setRoot(views, view);
2343 }
2344};
2345var ɵ2$1 = setBack;
2346var getUrl = function (router, activatedRoute) {
2347 var urlTree = router.createUrlTree(['.'], { relativeTo: activatedRoute });
2348 return router.serializeUrl(urlTree);
2349};
2350var isTabSwitch = function (enteringView, leavingView) {
2351 if (!leavingView) {
2352 return true;
2353 }
2354 return enteringView.stackId !== leavingView.stackId;
2355};
2356var computeStackId = function (prefixUrl, url) {
2357 if (!prefixUrl) {
2358 return undefined;
2359 }
2360 var segments = toSegments(url);
2361 for (var i = 0; i < segments.length; i++) {
2362 if (i >= prefixUrl.length) {
2363 return segments[i];
2364 }
2365 if (segments[i] !== prefixUrl[i]) {
2366 return undefined;
2367 }
2368 }
2369 return undefined;
2370};
2371var toSegments = function (path) {
2372 return path
2373 .split('/')
2374 .map(function (s) { return s.trim(); })
2375 .filter(function (s) { return s !== ''; });
2376};
2377var destroyView = function (view) {
2378 if (view) {
2379 // TODO lifecycle event
2380 view.ref.destroy();
2381 view.unlistenEvents();
2382 }
2383};
2384
2385var StackController = /** @class */ (function () {
2386 function StackController(tabsPrefix, containerEl, router, navCtrl, zone, location) {
2387 this.containerEl = containerEl;
2388 this.router = router;
2389 this.navCtrl = navCtrl;
2390 this.zone = zone;
2391 this.location = location;
2392 this.views = [];
2393 this.skipTransition = false;
2394 this.nextId = 0;
2395 this.tabsPrefix = tabsPrefix !== undefined ? toSegments(tabsPrefix) : undefined;
2396 }
2397 StackController.prototype.createView = function (ref, activatedRoute) {
2398 var url = getUrl(this.router, activatedRoute);
2399 var element = (ref && ref.location && ref.location.nativeElement);
2400 var unlistenEvents = bindLifecycleEvents(this.zone, ref.instance, element);
2401 return {
2402 id: this.nextId++,
2403 stackId: computeStackId(this.tabsPrefix, url),
2404 unlistenEvents: unlistenEvents,
2405 element: element,
2406 ref: ref,
2407 url: url,
2408 };
2409 };
2410 StackController.prototype.getExistingView = function (activatedRoute) {
2411 var activatedUrlKey = getUrl(this.router, activatedRoute);
2412 var view = this.views.find(function (vw) { return vw.url === activatedUrlKey; });
2413 if (view) {
2414 view.ref.changeDetectorRef.reattach();
2415 }
2416 return view;
2417 };
2418 StackController.prototype.setActive = function (enteringView) {
2419 var _this = this;
2420 var consumeResult = this.navCtrl.consumeTransition();
2421 var direction = consumeResult.direction, animation = consumeResult.animation, animationBuilder = consumeResult.animationBuilder;
2422 var leavingView = this.activeView;
2423 var tabSwitch = isTabSwitch(enteringView, leavingView);
2424 if (tabSwitch) {
2425 direction = 'back';
2426 animation = undefined;
2427 }
2428 var viewsSnapshot = this.views.slice();
2429 var currentNavigation;
2430 var router = this.router;
2431 // Angular >= 7.2.0
2432 if (router.getCurrentNavigation) {
2433 currentNavigation = router.getCurrentNavigation();
2434 // Angular < 7.2.0
2435 }
2436 else if (router.navigations &&
2437 router.navigations.value) {
2438 currentNavigation = router.navigations.value;
2439 }
2440 /**
2441 * If the navigation action
2442 * sets `replaceUrl: true`
2443 * then we need to make sure
2444 * we remove the last item
2445 * from our views stack
2446 */
2447 if (currentNavigation &&
2448 currentNavigation.extras &&
2449 currentNavigation.extras.replaceUrl) {
2450 if (this.views.length > 0) {
2451 this.views.splice(-1, 1);
2452 }
2453 }
2454 var reused = this.views.includes(enteringView);
2455 var views = this.insertView(enteringView, direction);
2456 // Trigger change detection before transition starts
2457 // This will call ngOnInit() the first time too, just after the view
2458 // was attached to the dom, but BEFORE the transition starts
2459 if (!reused) {
2460 enteringView.ref.changeDetectorRef.detectChanges();
2461 }
2462 /**
2463 * If we are going back from a page that
2464 * was presented using a custom animation
2465 * we should default to using that
2466 * unless the developer explicitly
2467 * provided another animation.
2468 */
2469 var customAnimation = enteringView.animationBuilder;
2470 if (animationBuilder === undefined &&
2471 direction === 'back' &&
2472 !tabSwitch &&
2473 customAnimation !== undefined) {
2474 animationBuilder = customAnimation;
2475 }
2476 /**
2477 * Save any custom animation so that navigating
2478 * back will use this custom animation by default.
2479 */
2480 if (leavingView) {
2481 leavingView.animationBuilder = animationBuilder;
2482 }
2483 // Wait until previous transitions finish
2484 return this.zone.runOutsideAngular(function () {
2485 return _this.wait(function () {
2486 // disconnect leaving page from change detection to
2487 // reduce jank during the page transition
2488 if (leavingView) {
2489 leavingView.ref.changeDetectorRef.detach();
2490 }
2491 // In case the enteringView is the same as the leavingPage we need to reattach()
2492 enteringView.ref.changeDetectorRef.reattach();
2493 return _this.transition(enteringView, leavingView, animation, _this.canGoBack(1), false, animationBuilder)
2494 .then(function () { return cleanupAsync(enteringView, views, viewsSnapshot, _this.location); })
2495 .then(function () { return ({
2496 enteringView: enteringView,
2497 direction: direction,
2498 animation: animation,
2499 tabSwitch: tabSwitch
2500 }); });
2501 });
2502 });
2503 };
2504 StackController.prototype.canGoBack = function (deep, stackId) {
2505 if (stackId === void 0) { stackId = this.getActiveStackId(); }
2506 return this.getStack(stackId).length > deep;
2507 };
2508 StackController.prototype.pop = function (deep, stackId) {
2509 var _this = this;
2510 if (stackId === void 0) { stackId = this.getActiveStackId(); }
2511 return this.zone.run(function () {
2512 var views = _this.getStack(stackId);
2513 if (views.length <= deep) {
2514 return Promise.resolve(false);
2515 }
2516 var view = views[views.length - deep - 1];
2517 var url = view.url;
2518 var viewSavedData = view.savedData;
2519 if (viewSavedData) {
2520 var primaryOutlet = viewSavedData.get('primary');
2521 if (primaryOutlet &&
2522 primaryOutlet.route &&
2523 primaryOutlet.route._routerState &&
2524 primaryOutlet.route._routerState.snapshot &&
2525 primaryOutlet.route._routerState.snapshot.url) {
2526 url = primaryOutlet.route._routerState.snapshot.url;
2527 }
2528 }
2529 var animationBuilder = _this.navCtrl.consumeTransition().animationBuilder;
2530 return _this.navCtrl.navigateBack(url, __assign({}, view.savedExtras, { animation: animationBuilder })).then(function () { return true; });
2531 });
2532 };
2533 StackController.prototype.startBackTransition = function () {
2534 var _this = this;
2535 var leavingView = this.activeView;
2536 if (leavingView) {
2537 var views = this.getStack(leavingView.stackId);
2538 var enteringView_1 = views[views.length - 2];
2539 var customAnimation_1 = enteringView_1.animationBuilder;
2540 return this.wait(function () {
2541 return _this.transition(enteringView_1, // entering view
2542 leavingView, // leaving view
2543 'back', _this.canGoBack(2), true, customAnimation_1);
2544 });
2545 }
2546 return Promise.resolve();
2547 };
2548 StackController.prototype.endBackTransition = function (shouldComplete) {
2549 if (shouldComplete) {
2550 this.skipTransition = true;
2551 this.pop(1);
2552 }
2553 else if (this.activeView) {
2554 cleanup(this.activeView, this.views, this.views, this.location);
2555 }
2556 };
2557 StackController.prototype.getLastUrl = function (stackId) {
2558 var views = this.getStack(stackId);
2559 return views.length > 0 ? views[views.length - 1] : undefined;
2560 };
2561 /**
2562 * @internal
2563 */
2564 StackController.prototype.getRootUrl = function (stackId) {
2565 var views = this.getStack(stackId);
2566 return views.length > 0 ? views[0] : undefined;
2567 };
2568 StackController.prototype.getActiveStackId = function () {
2569 return this.activeView ? this.activeView.stackId : undefined;
2570 };
2571 StackController.prototype.hasRunningTask = function () {
2572 return this.runningTask !== undefined;
2573 };
2574 StackController.prototype.destroy = function () {
2575 this.containerEl = undefined;
2576 this.views.forEach(destroyView);
2577 this.activeView = undefined;
2578 this.views = [];
2579 };
2580 StackController.prototype.getStack = function (stackId) {
2581 return this.views.filter(function (v) { return v.stackId === stackId; });
2582 };
2583 StackController.prototype.insertView = function (enteringView, direction) {
2584 this.activeView = enteringView;
2585 this.views = insertView(this.views, enteringView, direction);
2586 return this.views.slice();
2587 };
2588 StackController.prototype.transition = function (enteringView, leavingView, direction, showGoBack, progressAnimation, animationBuilder) {
2589 if (this.skipTransition) {
2590 this.skipTransition = false;
2591 return Promise.resolve(false);
2592 }
2593 if (leavingView === enteringView) {
2594 return Promise.resolve(false);
2595 }
2596 var enteringEl = enteringView ? enteringView.element : undefined;
2597 var leavingEl = leavingView ? leavingView.element : undefined;
2598 var containerEl = this.containerEl;
2599 if (enteringEl && enteringEl !== leavingEl) {
2600 enteringEl.classList.add('ion-page');
2601 enteringEl.classList.add('ion-page-invisible');
2602 if (enteringEl.parentElement !== containerEl) {
2603 containerEl.appendChild(enteringEl);
2604 }
2605 if (containerEl.commit) {
2606 return containerEl.commit(enteringEl, leavingEl, {
2607 deepWait: true,
2608 duration: direction === undefined ? 0 : undefined,
2609 direction: direction,
2610 showGoBack: showGoBack,
2611 progressAnimation: progressAnimation,
2612 animationBuilder: animationBuilder
2613 });
2614 }
2615 }
2616 return Promise.resolve(false);
2617 };
2618 StackController.prototype.wait = function (task) {
2619 return __awaiter(this, void 0, void 0, function () {
2620 var promise;
2621 var _this = this;
2622 return __generator(this, function (_a) {
2623 switch (_a.label) {
2624 case 0:
2625 if (!(this.runningTask !== undefined)) return [3 /*break*/, 2];
2626 return [4 /*yield*/, this.runningTask];
2627 case 1:
2628 _a.sent();
2629 this.runningTask = undefined;
2630 _a.label = 2;
2631 case 2:
2632 promise = this.runningTask = task();
2633 promise.finally(function () { return _this.runningTask = undefined; });
2634 return [2 /*return*/, promise];
2635 }
2636 });
2637 });
2638 };
2639 return StackController;
2640}());
2641var cleanupAsync = function (activeRoute, views, viewsSnapshot, location) {
2642 if (typeof requestAnimationFrame === 'function') {
2643 return new Promise(function (resolve) {
2644 requestAnimationFrame(function () {
2645 cleanup(activeRoute, views, viewsSnapshot, location);
2646 resolve();
2647 });
2648 });
2649 }
2650 return Promise.resolve();
2651};
2652var ɵ0$6 = cleanupAsync;
2653var cleanup = function (activeRoute, views, viewsSnapshot, location) {
2654 viewsSnapshot
2655 .filter(function (view) { return !views.includes(view); })
2656 .forEach(destroyView);
2657 views.forEach(function (view) {
2658 /**
2659 * In the event that a user navigated multiple
2660 * times in rapid succession, we want to make sure
2661 * we don't pre-emptively detach a view while
2662 * it is in mid-transition.
2663 *
2664 * In this instance we also do not care about query
2665 * params or fragments as it will be the same view regardless
2666 */
2667 var locationWithoutParams = location.path().split('?')[0];
2668 var locationWithoutFragment = locationWithoutParams.split('#')[0];
2669 if (view !== activeRoute && view.url !== locationWithoutFragment) {
2670 var element = view.element;
2671 element.setAttribute('aria-hidden', 'true');
2672 element.classList.add('ion-page-hidden');
2673 view.ref.changeDetectorRef.detach();
2674 }
2675 });
2676};
2677var ɵ1$4 = cleanup;
2678
2679var IonRouterOutlet = /** @class */ (function () {
2680 function IonRouterOutlet(parentContexts, location, resolver, name, tabs, config, navCtrl, commonLocation, elementRef, router, zone, activatedRoute, parentOutlet) {
2681 this.parentContexts = parentContexts;
2682 this.location = location;
2683 this.resolver = resolver;
2684 this.config = config;
2685 this.navCtrl = navCtrl;
2686 this.parentOutlet = parentOutlet;
2687 this.activated = null;
2688 this.activatedView = null;
2689 this._activatedRoute = null;
2690 // Maintain map of activated route proxies for each component instance
2691 this.proxyMap = new WeakMap();
2692 // Keep the latest activated route in a subject for the proxy routes to switch map to
2693 this.currentActivatedRoute$ = new BehaviorSubject(null);
2694 this.stackEvents = new EventEmitter();
2695 this.activateEvents = new EventEmitter();
2696 this.deactivateEvents = new EventEmitter();
2697 this.nativeEl = elementRef.nativeElement;
2698 this.name = name || PRIMARY_OUTLET;
2699 this.tabsPrefix = tabs === 'true' ? getUrl(router, activatedRoute) : undefined;
2700 this.stackCtrl = new StackController(this.tabsPrefix, this.nativeEl, router, navCtrl, zone, commonLocation);
2701 parentContexts.onChildOutletCreated(this.name, this);
2702 }
2703 Object.defineProperty(IonRouterOutlet.prototype, "animation", {
2704 set: function (animation) {
2705 this.nativeEl.animation = animation;
2706 },
2707 enumerable: true,
2708 configurable: true
2709 });
2710 Object.defineProperty(IonRouterOutlet.prototype, "animated", {
2711 set: function (animated) {
2712 this.nativeEl.animated = animated;
2713 },
2714 enumerable: true,
2715 configurable: true
2716 });
2717 Object.defineProperty(IonRouterOutlet.prototype, "swipeGesture", {
2718 set: function (swipe) {
2719 var _this = this;
2720 this._swipeGesture = swipe;
2721 this.nativeEl.swipeHandler = swipe ? {
2722 canStart: function () { return _this.stackCtrl.canGoBack(1) && !_this.stackCtrl.hasRunningTask(); },
2723 onStart: function () { return _this.stackCtrl.startBackTransition(); },
2724 onEnd: function (shouldContinue) { return _this.stackCtrl.endBackTransition(shouldContinue); }
2725 } : undefined;
2726 },
2727 enumerable: true,
2728 configurable: true
2729 });
2730 IonRouterOutlet.prototype.ngOnDestroy = function () {
2731 this.stackCtrl.destroy();
2732 };
2733 IonRouterOutlet.prototype.getContext = function () {
2734 return this.parentContexts.getContext(this.name);
2735 };
2736 IonRouterOutlet.prototype.ngOnInit = function () {
2737 var _this = this;
2738 if (!this.activated) {
2739 // If the outlet was not instantiated at the time the route got activated we need to populate
2740 // the outlet when it is initialized (ie inside a NgIf)
2741 var context = this.getContext();
2742 if (context && context.route) {
2743 this.activateWith(context.route, context.resolver || null);
2744 }
2745 }
2746 new Promise(function (resolve) { return componentOnReady(_this.nativeEl, resolve); }).then(function () {
2747 if (_this._swipeGesture === undefined) {
2748 _this.swipeGesture = _this.config.getBoolean('swipeBackEnabled', _this.nativeEl.mode === 'ios');
2749 }
2750 });
2751 };
2752 Object.defineProperty(IonRouterOutlet.prototype, "isActivated", {
2753 get: function () {
2754 return !!this.activated;
2755 },
2756 enumerable: true,
2757 configurable: true
2758 });
2759 Object.defineProperty(IonRouterOutlet.prototype, "component", {
2760 get: function () {
2761 if (!this.activated) {
2762 throw new Error('Outlet is not activated');
2763 }
2764 return this.activated.instance;
2765 },
2766 enumerable: true,
2767 configurable: true
2768 });
2769 Object.defineProperty(IonRouterOutlet.prototype, "activatedRoute", {
2770 get: function () {
2771 if (!this.activated) {
2772 throw new Error('Outlet is not activated');
2773 }
2774 return this._activatedRoute;
2775 },
2776 enumerable: true,
2777 configurable: true
2778 });
2779 Object.defineProperty(IonRouterOutlet.prototype, "activatedRouteData", {
2780 get: function () {
2781 if (this._activatedRoute) {
2782 return this._activatedRoute.snapshot.data;
2783 }
2784 return {};
2785 },
2786 enumerable: true,
2787 configurable: true
2788 });
2789 /**
2790 * Called when the `RouteReuseStrategy` instructs to detach the subtree
2791 */
2792 IonRouterOutlet.prototype.detach = function () {
2793 throw new Error('incompatible reuse strategy');
2794 };
2795 /**
2796 * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree
2797 */
2798 IonRouterOutlet.prototype.attach = function (_ref, _activatedRoute) {
2799 throw new Error('incompatible reuse strategy');
2800 };
2801 IonRouterOutlet.prototype.deactivate = function () {
2802 if (this.activated) {
2803 if (this.activatedView) {
2804 var context = this.getContext();
2805 this.activatedView.savedData = new Map(context.children['contexts']);
2806 /**
2807 * Angular v11.2.10 introduced a change
2808 * where this route context is cleared out when
2809 * a router-outlet is deactivated, However,
2810 * we need this route information in order to
2811 * return a user back to the correct tab when
2812 * leaving and then going back to the tab context.
2813 */
2814 var primaryOutlet = this.activatedView.savedData.get('primary');
2815 if (primaryOutlet && context.route) {
2816 primaryOutlet.route = __assign({}, context.route);
2817 }
2818 /**
2819 * Ensure we are saving the NavigationExtras
2820 * data otherwise it will be lost
2821 */
2822 this.activatedView.savedExtras = {};
2823 if (context.route) {
2824 var contextSnapshot = context.route.snapshot;
2825 this.activatedView.savedExtras.queryParams = contextSnapshot.queryParams;
2826 this.activatedView.savedExtras.fragment = contextSnapshot.fragment;
2827 }
2828 }
2829 var c = this.component;
2830 this.activatedView = null;
2831 this.activated = null;
2832 this._activatedRoute = null;
2833 this.deactivateEvents.emit(c);
2834 }
2835 };
2836 IonRouterOutlet.prototype.activateWith = function (activatedRoute, resolver) {
2837 var _this = this;
2838 if (this.isActivated) {
2839 throw new Error('Cannot activate an already activated outlet');
2840 }
2841 this._activatedRoute = activatedRoute;
2842 var cmpRef;
2843 var enteringView = this.stackCtrl.getExistingView(activatedRoute);
2844 if (enteringView) {
2845 cmpRef = this.activated = enteringView.ref;
2846 var saved = enteringView.savedData;
2847 if (saved) {
2848 // self-restore
2849 var context = this.getContext();
2850 context.children['contexts'] = saved;
2851 }
2852 // Updated activated route proxy for this component
2853 this.updateActivatedRouteProxy(cmpRef.instance, activatedRoute);
2854 }
2855 else {
2856 var snapshot = activatedRoute._futureSnapshot;
2857 var component = snapshot.routeConfig.component;
2858 resolver = resolver || this.resolver;
2859 var factory = resolver.resolveComponentFactory(component);
2860 var childContexts = this.parentContexts.getOrCreateContext(this.name).children;
2861 // We create an activated route proxy object that will maintain future updates for this component
2862 // over its lifecycle in the stack.
2863 var component$ = new BehaviorSubject(null);
2864 var activatedRouteProxy = this.createActivatedRouteProxy(component$, activatedRoute);
2865 var injector = new OutletInjector(activatedRouteProxy, childContexts, this.location.injector);
2866 cmpRef = this.activated = this.location.createComponent(factory, this.location.length, injector);
2867 // Once the component is created we can push it to our local subject supplied to the proxy
2868 component$.next(cmpRef.instance);
2869 // Calling `markForCheck` to make sure we will run the change detection when the
2870 // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.
2871 enteringView = this.stackCtrl.createView(this.activated, activatedRoute);
2872 // Store references to the proxy by component
2873 this.proxyMap.set(cmpRef.instance, activatedRouteProxy);
2874 this.currentActivatedRoute$.next({ component: cmpRef.instance, activatedRoute: activatedRoute });
2875 }
2876 this.activatedView = enteringView;
2877 this.stackCtrl.setActive(enteringView).then(function (data) {
2878 _this.navCtrl.setTopOutlet(_this);
2879 _this.activateEvents.emit(cmpRef.instance);
2880 _this.stackEvents.emit(data);
2881 });
2882 };
2883 /**
2884 * Returns `true` if there are pages in the stack to go back.
2885 */
2886 IonRouterOutlet.prototype.canGoBack = function (deep, stackId) {
2887 if (deep === void 0) { deep = 1; }
2888 return this.stackCtrl.canGoBack(deep, stackId);
2889 };
2890 /**
2891 * Resolves to `true` if it the outlet was able to sucessfully pop the last N pages.
2892 */
2893 IonRouterOutlet.prototype.pop = function (deep, stackId) {
2894 if (deep === void 0) { deep = 1; }
2895 return this.stackCtrl.pop(deep, stackId);
2896 };
2897 /**
2898 * Returns the URL of the active page of each stack.
2899 */
2900 IonRouterOutlet.prototype.getLastUrl = function (stackId) {
2901 var active = this.stackCtrl.getLastUrl(stackId);
2902 return active ? active.url : undefined;
2903 };
2904 /**
2905 * Returns the RouteView of the active page of each stack.
2906 * @internal
2907 */
2908 IonRouterOutlet.prototype.getLastRouteView = function (stackId) {
2909 return this.stackCtrl.getLastUrl(stackId);
2910 };
2911 /**
2912 * Returns the root view in the tab stack.
2913 * @internal
2914 */
2915 IonRouterOutlet.prototype.getRootView = function (stackId) {
2916 return this.stackCtrl.getRootUrl(stackId);
2917 };
2918 /**
2919 * Returns the active stack ID. In the context of ion-tabs, it means the active tab.
2920 */
2921 IonRouterOutlet.prototype.getActiveStackId = function () {
2922 return this.stackCtrl.getActiveStackId();
2923 };
2924 /**
2925 * Since the activated route can change over the life time of a component in an ion router outlet, we create
2926 * a proxy so that we can update the values over time as a user navigates back to components already in the stack.
2927 */
2928 IonRouterOutlet.prototype.createActivatedRouteProxy = function (component$, activatedRoute) {
2929 var proxy = new ActivatedRoute();
2930 proxy._futureSnapshot = activatedRoute._futureSnapshot;
2931 proxy._routerState = activatedRoute._routerState;
2932 proxy.snapshot = activatedRoute.snapshot;
2933 proxy.outlet = activatedRoute.outlet;
2934 proxy.component = activatedRoute.component;
2935 // Setup wrappers for the observables so consumers don't have to worry about switching to new observables as the state updates
2936 proxy._paramMap = this.proxyObservable(component$, 'paramMap');
2937 proxy._queryParamMap = this.proxyObservable(component$, 'queryParamMap');
2938 proxy.url = this.proxyObservable(component$, 'url');
2939 proxy.params = this.proxyObservable(component$, 'params');
2940 proxy.queryParams = this.proxyObservable(component$, 'queryParams');
2941 proxy.fragment = this.proxyObservable(component$, 'fragment');
2942 proxy.data = this.proxyObservable(component$, 'data');
2943 return proxy;
2944 };
2945 /**
2946 * Create a wrapped observable that will switch to the latest activated route matched by the given component
2947 */
2948 IonRouterOutlet.prototype.proxyObservable = function (component$, path) {
2949 var _this = this;
2950 return component$.pipe(
2951 // First wait until the component instance is pushed
2952 filter(function (component) { return !!component; }), switchMap(function (component) {
2953 return _this.currentActivatedRoute$.pipe(filter(function (current) { return current !== null && current.component === component; }), switchMap(function (current) { return current && current.activatedRoute[path]; }), distinctUntilChanged());
2954 }));
2955 };
2956 /**
2957 * Updates the activated route proxy for the given component to the new incoming router state
2958 */
2959 IonRouterOutlet.prototype.updateActivatedRouteProxy = function (component, activatedRoute) {
2960 var proxy = this.proxyMap.get(component);
2961 if (!proxy) {
2962 throw new Error("Could not find activated route proxy for view");
2963 }
2964 proxy._futureSnapshot = activatedRoute._futureSnapshot;
2965 proxy._routerState = activatedRoute._routerState;
2966 proxy.snapshot = activatedRoute.snapshot;
2967 proxy.outlet = activatedRoute.outlet;
2968 proxy.component = activatedRoute.component;
2969 this.currentActivatedRoute$.next({ component: component, activatedRoute: activatedRoute });
2970 };
2971 IonRouterOutlet.ctorParameters = function () { return [
2972 { type: ChildrenOutletContexts },
2973 { type: ViewContainerRef },
2974 { type: ComponentFactoryResolver },
2975 { type: String, decorators: [{ type: Attribute, args: ['name',] }] },
2976 { type: String, decorators: [{ type: Optional }, { type: Attribute, args: ['tabs',] }] },
2977 { type: Config },
2978 { type: NavController },
2979 { type: Location },
2980 { type: ElementRef },
2981 { type: Router },
2982 { type: NgZone },
2983 { type: ActivatedRoute },
2984 { type: IonRouterOutlet, decorators: [{ type: SkipSelf }, { type: Optional }] }
2985 ]; };
2986 __decorate([
2987 Output()
2988 ], IonRouterOutlet.prototype, "stackEvents", void 0);
2989 __decorate([
2990 Output('activate')
2991 ], IonRouterOutlet.prototype, "activateEvents", void 0);
2992 __decorate([
2993 Output('deactivate')
2994 ], IonRouterOutlet.prototype, "deactivateEvents", void 0);
2995 IonRouterOutlet = __decorate([
2996 Directive({
2997 selector: 'ion-router-outlet',
2998 exportAs: 'outlet',
2999 inputs: ['animated', 'animation', 'swipeGesture']
3000 }),
3001 __param(3, Attribute('name')),
3002 __param(4, Optional()), __param(4, Attribute('tabs')),
3003 __param(12, SkipSelf()), __param(12, Optional())
3004 ], IonRouterOutlet);
3005 return IonRouterOutlet;
3006}());
3007var OutletInjector = /** @class */ (function () {
3008 function OutletInjector(route, childContexts, parent) {
3009 this.route = route;
3010 this.childContexts = childContexts;
3011 this.parent = parent;
3012 }
3013 OutletInjector.prototype.get = function (token, notFoundValue) {
3014 if (token === ActivatedRoute) {
3015 return this.route;
3016 }
3017 if (token === ChildrenOutletContexts) {
3018 return this.childContexts;
3019 }
3020 // tslint:disable-next-line
3021 return this.parent.get(token, notFoundValue);
3022 };
3023 return OutletInjector;
3024}());
3025
3026var IonTabs = /** @class */ (function () {
3027 function IonTabs(navCtrl) {
3028 this.navCtrl = navCtrl;
3029 this.ionTabsWillChange = new EventEmitter();
3030 this.ionTabsDidChange = new EventEmitter();
3031 }
3032 /**
3033 * @internal
3034 */
3035 IonTabs.prototype.onPageSelected = function (detail) {
3036 var stackId = detail.enteringView.stackId;
3037 if (detail.tabSwitch && stackId !== undefined) {
3038 if (this.tabBar) {
3039 this.tabBar.selectedTab = stackId;
3040 }
3041 this.ionTabsWillChange.emit({ tab: stackId });
3042 this.ionTabsDidChange.emit({ tab: stackId });
3043 }
3044 };
3045 /**
3046 * When a tab button is clicked, there are several scenarios:
3047 * 1. If the selected tab is currently active (the tab button has been clicked
3048 * again), then it should go to the root view for that tab.
3049 *
3050 * a. Get the saved root view from the router outlet. If the saved root view
3051 * matches the tabRootUrl, set the route view to this view including the
3052 * navigation extras.
3053 * b. If the saved root view from the router outlet does
3054 * not match, navigate to the tabRootUrl. No navigation extras are
3055 * included.
3056 *
3057 * 2. If the current tab tab is not currently selected, get the last route
3058 * view from the router outlet.
3059 *
3060 * a. If the last route view exists, navigate to that view including any
3061 * navigation extras
3062 * b. If the last route view doesn't exist, then navigate
3063 * to the default tabRootUrl
3064 */
3065 IonTabs.prototype.select = function (tab) {
3066 var alreadySelected = this.outlet.getActiveStackId() === tab;
3067 var tabRootUrl = this.outlet.tabsPrefix + "/" + tab;
3068 if (alreadySelected) {
3069 var activeStackId = this.outlet.getActiveStackId();
3070 var activeView = this.outlet.getLastRouteView(activeStackId);
3071 // If on root tab, do not navigate to root tab again
3072 if (activeView.url === tabRootUrl) {
3073 return;
3074 }
3075 var rootView = this.outlet.getRootView(tab);
3076 var navigationExtras = rootView && tabRootUrl === rootView.url && rootView.savedExtras;
3077 return this.navCtrl.navigateRoot(tabRootUrl, __assign({}, (navigationExtras), { animated: true, animationDirection: 'back' }));
3078 }
3079 else {
3080 var lastRoute = this.outlet.getLastRouteView(tab);
3081 /**
3082 * If there is a lastRoute, goto that, otherwise goto the fallback url of the
3083 * selected tab
3084 */
3085 var url = lastRoute && lastRoute.url || tabRootUrl;
3086 var navigationExtras = lastRoute && lastRoute.savedExtras;
3087 return this.navCtrl.navigateRoot(url, __assign({}, (navigationExtras), { animated: true, animationDirection: 'back' }));
3088 }
3089 };
3090 IonTabs.prototype.getSelected = function () {
3091 return this.outlet.getActiveStackId();
3092 };
3093 IonTabs.ctorParameters = function () { return [
3094 { type: NavController }
3095 ]; };
3096 __decorate([
3097 ViewChild('outlet', { read: IonRouterOutlet, static: false })
3098 ], IonTabs.prototype, "outlet", void 0);
3099 __decorate([
3100 ContentChild(IonTabBar, { static: false })
3101 ], IonTabs.prototype, "tabBar", void 0);
3102 __decorate([
3103 Output()
3104 ], IonTabs.prototype, "ionTabsWillChange", void 0);
3105 __decorate([
3106 Output()
3107 ], IonTabs.prototype, "ionTabsDidChange", void 0);
3108 __decorate([
3109 HostListener('ionTabButtonClick', ['$event.detail.tab'])
3110 ], IonTabs.prototype, "select", null);
3111 IonTabs = __decorate([
3112 Component({
3113 selector: 'ion-tabs',
3114 template: "\n <ng-content select=\"[slot=top]\"></ng-content>\n <div class=\"tabs-inner\">\n <ion-router-outlet #outlet tabs=\"true\" (stackEvents)=\"onPageSelected($event)\"></ion-router-outlet>\n </div>\n <ng-content></ng-content>",
3115 styles: ["\n :host {\n display: flex;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n\n flex-direction: column;\n\n width: 100%;\n height: 100%;\n\n contain: layout size style;\n z-index: $z-index-page-container;\n }\n .tabs-inner {\n position: relative;\n\n flex: 1;\n\n contain: layout size style;\n }"]
3116 })
3117 ], IonTabs);
3118 return IonTabs;
3119}());
3120
3121var IonBackButtonDelegate = /** @class */ (function () {
3122 function IonBackButtonDelegate(routerOutlet, navCtrl, config) {
3123 this.routerOutlet = routerOutlet;
3124 this.navCtrl = navCtrl;
3125 this.config = config;
3126 }
3127 /**
3128 * @internal
3129 */
3130 IonBackButtonDelegate.prototype.onClick = function (ev) {
3131 var defaultHref = this.defaultHref || this.config.get('backButtonDefaultHref');
3132 if (this.routerOutlet && this.routerOutlet.canGoBack()) {
3133 this.navCtrl.setDirection('back', undefined, undefined, this.routerAnimation);
3134 this.routerOutlet.pop();
3135 ev.preventDefault();
3136 }
3137 else if (defaultHref != null) {
3138 this.navCtrl.navigateBack(defaultHref, { animation: this.routerAnimation });
3139 ev.preventDefault();
3140 }
3141 };
3142 IonBackButtonDelegate.ctorParameters = function () { return [
3143 { type: IonRouterOutlet, decorators: [{ type: Optional }] },
3144 { type: NavController },
3145 { type: Config }
3146 ]; };
3147 __decorate([
3148 HostListener('click', ['$event'])
3149 ], IonBackButtonDelegate.prototype, "onClick", null);
3150 IonBackButtonDelegate = __decorate([
3151 Directive({
3152 selector: 'ion-back-button',
3153 inputs: ['defaultHref', 'routerAnimation'],
3154 }),
3155 __param(0, Optional())
3156 ], IonBackButtonDelegate);
3157 return IonBackButtonDelegate;
3158}());
3159
3160var NavDelegate = /** @class */ (function () {
3161 function NavDelegate(ref, resolver, injector, angularDelegate, location) {
3162 this.el = ref.nativeElement;
3163 ref.nativeElement.delegate = angularDelegate.create(resolver, injector, location);
3164 proxyOutputs(this, this.el, ['ionNavDidChange', 'ionNavWillChange']);
3165 }
3166 NavDelegate.ctorParameters = function () { return [
3167 { type: ElementRef },
3168 { type: ComponentFactoryResolver },
3169 { type: Injector },
3170 { type: AngularDelegate },
3171 { type: ViewContainerRef }
3172 ]; };
3173 NavDelegate = __decorate([
3174 ProxyCmp({
3175 inputs: ['animated', 'animation', 'root', 'rootParams', 'swipeGesture'],
3176 methods: ['push', 'insert', 'insertPages', 'pop', 'popTo', 'popToRoot', 'removeIndex', 'setRoot', 'setPages', 'getActive', 'getByIndex', 'canGoBack', 'getPrevious']
3177 }),
3178 Directive({
3179 selector: 'ion-nav'
3180 })
3181 ], NavDelegate);
3182 return NavDelegate;
3183}());
3184
3185var RouterLinkDelegate = /** @class */ (function () {
3186 function RouterLinkDelegate(locationStrategy, navCtrl, elementRef, router, routerLink) {
3187 this.locationStrategy = locationStrategy;
3188 this.navCtrl = navCtrl;
3189 this.elementRef = elementRef;
3190 this.router = router;
3191 this.routerLink = routerLink;
3192 this.routerDirection = 'forward';
3193 }
3194 RouterLinkDelegate.prototype.ngOnInit = function () {
3195 this.updateTargetUrlAndHref();
3196 };
3197 RouterLinkDelegate.prototype.ngOnChanges = function () {
3198 this.updateTargetUrlAndHref();
3199 };
3200 RouterLinkDelegate.prototype.ngOnDestroy = function () {
3201 if (this.subscription) {
3202 this.subscription.unsubscribe();
3203 }
3204 };
3205 RouterLinkDelegate.prototype.updateTargetUrlAndHref = function () {
3206 if (this.routerLink) {
3207 var href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.routerLink.urlTree));
3208 this.elementRef.nativeElement.href = href;
3209 }
3210 };
3211 /**
3212 * @internal
3213 */
3214 RouterLinkDelegate.prototype.onClick = function (ev) {
3215 this.navCtrl.setDirection(this.routerDirection, undefined, undefined, this.routerAnimation);
3216 ev.preventDefault();
3217 };
3218 RouterLinkDelegate.ctorParameters = function () { return [
3219 { type: LocationStrategy },
3220 { type: NavController },
3221 { type: ElementRef },
3222 { type: Router },
3223 { type: RouterLink, decorators: [{ type: Optional }] }
3224 ]; };
3225 __decorate([
3226 HostListener('click', ['$event'])
3227 ], RouterLinkDelegate.prototype, "onClick", null);
3228 RouterLinkDelegate = __decorate([
3229 Directive({
3230 selector: '[routerLink]',
3231 inputs: ['routerDirection', 'routerAnimation']
3232 }),
3233 __param(4, Optional())
3234 ], RouterLinkDelegate);
3235 return RouterLinkDelegate;
3236}());
3237
3238/**
3239 * @hidden
3240 */
3241var VirtualFooter = /** @class */ (function () {
3242 function VirtualFooter(templateRef) {
3243 this.templateRef = templateRef;
3244 }
3245 VirtualFooter.ctorParameters = function () { return [
3246 { type: TemplateRef }
3247 ]; };
3248 VirtualFooter = __decorate([
3249 Directive({ selector: '[virtualFooter]' })
3250 ], VirtualFooter);
3251 return VirtualFooter;
3252}());
3253
3254/**
3255 * @hidden
3256 */
3257var VirtualHeader = /** @class */ (function () {
3258 function VirtualHeader(templateRef) {
3259 this.templateRef = templateRef;
3260 }
3261 VirtualHeader.ctorParameters = function () { return [
3262 { type: TemplateRef }
3263 ]; };
3264 VirtualHeader = __decorate([
3265 Directive({ selector: '[virtualHeader]' })
3266 ], VirtualHeader);
3267 return VirtualHeader;
3268}());
3269
3270/**
3271 * @hidden
3272 */
3273var VirtualItem = /** @class */ (function () {
3274 function VirtualItem(templateRef, viewContainer) {
3275 this.templateRef = templateRef;
3276 this.viewContainer = viewContainer;
3277 }
3278 VirtualItem.ctorParameters = function () { return [
3279 { type: TemplateRef },
3280 { type: ViewContainerRef }
3281 ]; };
3282 VirtualItem = __decorate([
3283 Directive({ selector: '[virtualItem]' })
3284 ], VirtualItem);
3285 return VirtualItem;
3286}());
3287
3288var IonVirtualScroll = /** @class */ (function () {
3289 function IonVirtualScroll(z, iterableDiffers, elementRef) {
3290 this.z = z;
3291 this.iterableDiffers = iterableDiffers;
3292 this.refMap = new WeakMap();
3293 this.el = elementRef.nativeElement;
3294 this.el.nodeRender = this.nodeRender.bind(this);
3295 }
3296 IonVirtualScroll.prototype.ngOnChanges = function (changes) {
3297 if (this.trackBy && 'items' in changes) {
3298 // React on virtualScroll changes only once all inputs have been initialized
3299 var value = changes['items'].currentValue;
3300 if (this.differ === undefined && value != null) {
3301 try {
3302 this.differ = this.iterableDiffers.find(value).create(this.trackBy);
3303 }
3304 catch (e) {
3305 throw new Error("Cannot find a differ supporting object '" + value + "'. VirtualScroll only supports binding to Iterables such as Arrays.");
3306 }
3307 }
3308 }
3309 };
3310 IonVirtualScroll.prototype.ngDoCheck = function () {
3311 // and if there actually are changes
3312 var changes = this.differ !== undefined && this.items ? this.differ.diff(this.items) : null;
3313 if (changes === null) {
3314 return;
3315 }
3316 // TODO: optimize
3317 this.checkRange(0);
3318 };
3319 IonVirtualScroll.prototype.nodeRender = function (el, cell, index) {
3320 var _this = this;
3321 return this.z.run(function () {
3322 var node;
3323 if (!el) {
3324 node = _this.itmTmp.viewContainer.createEmbeddedView(_this.getComponent(cell.type), { $implicit: cell.value, index: index }, index);
3325 el = getElement(node);
3326 _this.refMap.set(el, node);
3327 }
3328 else {
3329 node = _this.refMap.get(el);
3330 var ctx = node.context;
3331 ctx.$implicit = cell.value;
3332 ctx.index = cell.index;
3333 }
3334 // run sync change detections
3335 node.detectChanges();
3336 return el;
3337 });
3338 };
3339 IonVirtualScroll.prototype.getComponent = function (type) {
3340 switch (type) {
3341 case 'item': return this.itmTmp.templateRef;
3342 case 'header': return this.hdrTmp.templateRef;
3343 case 'footer': return this.ftrTmp.templateRef;
3344 }
3345 throw new Error('template for virtual item was not provided');
3346 };
3347 IonVirtualScroll.ctorParameters = function () { return [
3348 { type: NgZone },
3349 { type: IterableDiffers },
3350 { type: ElementRef }
3351 ]; };
3352 __decorate([
3353 ContentChild(VirtualItem, { static: false })
3354 ], IonVirtualScroll.prototype, "itmTmp", void 0);
3355 __decorate([
3356 ContentChild(VirtualHeader, { static: false })
3357 ], IonVirtualScroll.prototype, "hdrTmp", void 0);
3358 __decorate([
3359 ContentChild(VirtualFooter, { static: false })
3360 ], IonVirtualScroll.prototype, "ftrTmp", void 0);
3361 IonVirtualScroll = __decorate([
3362 ProxyCmp({
3363 inputs: ['approxItemHeight', 'approxHeaderHeight', 'approxFooterHeight', 'headerFn', 'footerFn', 'items', 'itemHeight', 'headerHeight', 'footerHeight'],
3364 methods: ['checkEnd', 'checkRange', 'positionForItem']
3365 }),
3366 Component({
3367 selector: 'ion-virtual-scroll',
3368 template: '<ng-content></ng-content>',
3369 changeDetection: ChangeDetectionStrategy.OnPush,
3370 inputs: [
3371 'approxItemHeight',
3372 'approxHeaderHeight',
3373 'approxFooterHeight',
3374 'headerFn',
3375 'footerFn',
3376 'items',
3377 'itemHeight',
3378 'headerHeight',
3379 'footerHeight',
3380 'trackBy'
3381 ]
3382 })
3383 ], IonVirtualScroll);
3384 return IonVirtualScroll;
3385}());
3386var getElement = function (view) {
3387 var rootNodes = view.rootNodes;
3388 for (var i = 0; i < rootNodes.length; i++) {
3389 if (rootNodes[i].nodeType === 1) {
3390 return rootNodes[i];
3391 }
3392 }
3393 throw new Error('virtual element was not created');
3394};
3395var ɵ0$7 = getElement;
3396
3397var OverlayBaseController = /** @class */ (function () {
3398 function OverlayBaseController(ctrl) {
3399 this.ctrl = ctrl;
3400 }
3401 /**
3402 * Creates a new overlay
3403 */
3404 OverlayBaseController.prototype.create = function (opts) {
3405 // TODO: next major release opts is not optional
3406 return this.ctrl.create((opts || {}));
3407 };
3408 /**
3409 * When `id` is not provided, it dismisses the top overlay.
3410 */
3411 OverlayBaseController.prototype.dismiss = function (data, role, id) {
3412 return this.ctrl.dismiss(data, role, id);
3413 };
3414 /**
3415 * Returns the top overlay.
3416 */
3417 OverlayBaseController.prototype.getTop = function () {
3418 return this.ctrl.getTop();
3419 };
3420 return OverlayBaseController;
3421}());
3422
3423var ActionSheetController = /** @class */ (function (_super) {
3424 __extends(ActionSheetController, _super);
3425 function ActionSheetController() {
3426 return _super.call(this, actionSheetController) || this;
3427 }
3428 ActionSheetController.ngInjectableDef = ɵɵdefineInjectable({ factory: function ActionSheetController_Factory() { return new ActionSheetController(); }, token: ActionSheetController, providedIn: "root" });
3429 ActionSheetController = __decorate([
3430 Injectable({
3431 providedIn: 'root',
3432 })
3433 ], ActionSheetController);
3434 return ActionSheetController;
3435}(OverlayBaseController));
3436
3437var AlertController = /** @class */ (function (_super) {
3438 __extends(AlertController, _super);
3439 function AlertController() {
3440 return _super.call(this, alertController) || this;
3441 }
3442 AlertController.ngInjectableDef = ɵɵdefineInjectable({ factory: function AlertController_Factory() { return new AlertController(); }, token: AlertController, providedIn: "root" });
3443 AlertController = __decorate([
3444 Injectable({
3445 providedIn: 'root',
3446 })
3447 ], AlertController);
3448 return AlertController;
3449}(OverlayBaseController));
3450
3451var LoadingController = /** @class */ (function (_super) {
3452 __extends(LoadingController, _super);
3453 function LoadingController() {
3454 return _super.call(this, loadingController) || this;
3455 }
3456 LoadingController.ngInjectableDef = ɵɵdefineInjectable({ factory: function LoadingController_Factory() { return new LoadingController(); }, token: LoadingController, providedIn: "root" });
3457 LoadingController = __decorate([
3458 Injectable({
3459 providedIn: 'root',
3460 })
3461 ], LoadingController);
3462 return LoadingController;
3463}(OverlayBaseController));
3464
3465var MenuController = /** @class */ (function () {
3466 function MenuController() {
3467 }
3468 /**
3469 * Programmatically open the Menu.
3470 * @param [menuId] Optionally get the menu by its id, or side.
3471 * @return returns a promise when the menu is fully opened
3472 */
3473 MenuController.prototype.open = function (menuId) {
3474 return menuController.open(menuId);
3475 };
3476 /**
3477 * Programmatically close the Menu. If no `menuId` is given as the first
3478 * argument then it'll close any menu which is open. If a `menuId`
3479 * is given then it'll close that exact menu.
3480 * @param [menuId] Optionally get the menu by its id, or side.
3481 * @return returns a promise when the menu is fully closed
3482 */
3483 MenuController.prototype.close = function (menuId) {
3484 return menuController.close(menuId);
3485 };
3486 /**
3487 * Toggle the menu. If it's closed, it will open, and if opened, it
3488 * will close.
3489 * @param [menuId] Optionally get the menu by its id, or side.
3490 * @return returns a promise when the menu has been toggled
3491 */
3492 MenuController.prototype.toggle = function (menuId) {
3493 return menuController.toggle(menuId);
3494 };
3495 /**
3496 * Used to enable or disable a menu. For example, there could be multiple
3497 * left menus, but only one of them should be able to be opened at the same
3498 * time. If there are multiple menus on the same side, then enabling one menu
3499 * will also automatically disable all the others that are on the same side.
3500 * @param [menuId] Optionally get the menu by its id, or side.
3501 * @return Returns the instance of the menu, which is useful for chaining.
3502 */
3503 MenuController.prototype.enable = function (shouldEnable, menuId) {
3504 return menuController.enable(shouldEnable, menuId);
3505 };
3506 /**
3507 * Used to enable or disable the ability to swipe open the menu.
3508 * @param shouldEnable True if it should be swipe-able, false if not.
3509 * @param [menuId] Optionally get the menu by its id, or side.
3510 * @return Returns the instance of the menu, which is useful for chaining.
3511 */
3512 MenuController.prototype.swipeGesture = function (shouldEnable, menuId) {
3513 return menuController.swipeGesture(shouldEnable, menuId);
3514 };
3515 /**
3516 * @param [menuId] Optionally get the menu by its id, or side.
3517 * @return Returns true if the specified menu is currently open, otherwise false.
3518 * If the menuId is not specified, it returns true if ANY menu is currenly open.
3519 */
3520 MenuController.prototype.isOpen = function (menuId) {
3521 return menuController.isOpen(menuId);
3522 };
3523 /**
3524 * @param [menuId] Optionally get the menu by its id, or side.
3525 * @return Returns true if the menu is currently enabled, otherwise false.
3526 */
3527 MenuController.prototype.isEnabled = function (menuId) {
3528 return menuController.isEnabled(menuId);
3529 };
3530 /**
3531 * Used to get a menu instance. If a `menuId` is not provided then it'll
3532 * return the first menu found. If a `menuId` is `left` or `right`, then
3533 * it'll return the enabled menu on that side. Otherwise, if a `menuId` is
3534 * provided, then it'll try to find the menu using the menu's `id`
3535 * property. If a menu is not found then it'll return `null`.
3536 * @param [menuId] Optionally get the menu by its id, or side.
3537 * @return Returns the instance of the menu if found, otherwise `null`.
3538 */
3539 MenuController.prototype.get = function (menuId) {
3540 return menuController.get(menuId);
3541 };
3542 /**
3543 * @return Returns the instance of the menu already opened, otherwise `null`.
3544 */
3545 MenuController.prototype.getOpen = function () {
3546 return menuController.getOpen();
3547 };
3548 /**
3549 * @return Returns an array of all menu instances.
3550 */
3551 MenuController.prototype.getMenus = function () {
3552 return menuController.getMenus();
3553 };
3554 MenuController.ngInjectableDef = ɵɵdefineInjectable({ factory: function MenuController_Factory() { return new MenuController(); }, token: MenuController, providedIn: "root" });
3555 MenuController = __decorate([
3556 Injectable({
3557 providedIn: 'root',
3558 })
3559 ], MenuController);
3560 return MenuController;
3561}());
3562
3563var PickerController = /** @class */ (function (_super) {
3564 __extends(PickerController, _super);
3565 function PickerController() {
3566 return _super.call(this, pickerController) || this;
3567 }
3568 PickerController.ngInjectableDef = ɵɵdefineInjectable({ factory: function PickerController_Factory() { return new PickerController(); }, token: PickerController, providedIn: "root" });
3569 PickerController = __decorate([
3570 Injectable({
3571 providedIn: 'root',
3572 })
3573 ], PickerController);
3574 return PickerController;
3575}(OverlayBaseController));
3576
3577var ModalController = /** @class */ (function (_super) {
3578 __extends(ModalController, _super);
3579 function ModalController(angularDelegate, resolver, injector) {
3580 var _this = _super.call(this, modalController) || this;
3581 _this.angularDelegate = angularDelegate;
3582 _this.resolver = resolver;
3583 _this.injector = injector;
3584 return _this;
3585 }
3586 ModalController.prototype.create = function (opts) {
3587 return _super.prototype.create.call(this, __assign({}, opts, { delegate: this.angularDelegate.create(this.resolver, this.injector) }));
3588 };
3589 ModalController.ctorParameters = function () { return [
3590 { type: AngularDelegate },
3591 { type: ComponentFactoryResolver },
3592 { type: Injector }
3593 ]; };
3594 ModalController = __decorate([
3595 Injectable()
3596 ], ModalController);
3597 return ModalController;
3598}(OverlayBaseController));
3599
3600var PopoverController = /** @class */ (function (_super) {
3601 __extends(PopoverController, _super);
3602 function PopoverController(angularDelegate, resolver, injector) {
3603 var _this = _super.call(this, popoverController) || this;
3604 _this.angularDelegate = angularDelegate;
3605 _this.resolver = resolver;
3606 _this.injector = injector;
3607 return _this;
3608 }
3609 PopoverController.prototype.create = function (opts) {
3610 return _super.prototype.create.call(this, __assign({}, opts, { delegate: this.angularDelegate.create(this.resolver, this.injector) }));
3611 };
3612 PopoverController.ctorParameters = function () { return [
3613 { type: AngularDelegate },
3614 { type: ComponentFactoryResolver },
3615 { type: Injector }
3616 ]; };
3617 PopoverController = __decorate([
3618 Injectable()
3619 ], PopoverController);
3620 return PopoverController;
3621}(OverlayBaseController));
3622
3623var ToastController = /** @class */ (function (_super) {
3624 __extends(ToastController, _super);
3625 function ToastController() {
3626 return _super.call(this, toastController) || this;
3627 }
3628 ToastController.ngInjectableDef = ɵɵdefineInjectable({ factory: function ToastController_Factory() { return new ToastController(); }, token: ToastController, providedIn: "root" });
3629 ToastController = __decorate([
3630 Injectable({
3631 providedIn: 'root',
3632 })
3633 ], ToastController);
3634 return ToastController;
3635}(OverlayBaseController));
3636
3637var DomController = /** @class */ (function () {
3638 function DomController() {
3639 }
3640 /**
3641 * Schedules a task to run during the READ phase of the next frame.
3642 * This task should only read the DOM, but never modify it.
3643 */
3644 DomController.prototype.read = function (cb) {
3645 getQueue().read(cb);
3646 };
3647 /**
3648 * Schedules a task to run during the WRITE phase of the next frame.
3649 * This task should write the DOM, but never READ it.
3650 */
3651 DomController.prototype.write = function (cb) {
3652 getQueue().write(cb);
3653 };
3654 DomController.ngInjectableDef = ɵɵdefineInjectable({ factory: function DomController_Factory() { return new DomController(); }, token: DomController, providedIn: "root" });
3655 DomController = __decorate([
3656 Injectable({
3657 providedIn: 'root',
3658 })
3659 ], DomController);
3660 return DomController;
3661}());
3662var getQueue = function () {
3663 var win = typeof window !== 'undefined' ? window : null;
3664 if (win != null) {
3665 var Ionic = win.Ionic;
3666 if (Ionic && Ionic.queue) {
3667 return Ionic.queue;
3668 }
3669 return {
3670 read: function (cb) { return win.requestAnimationFrame(cb); },
3671 write: function (cb) { return win.requestAnimationFrame(cb); }
3672 };
3673 }
3674 return {
3675 read: function (cb) { return cb(); },
3676 write: function (cb) { return cb(); }
3677 };
3678};
3679var ɵ0$8 = getQueue;
3680
3681var AnimationController = /** @class */ (function () {
3682 function AnimationController() {
3683 }
3684 /**
3685 * Create a new animation
3686 */
3687 AnimationController.prototype.create = function (animationId) {
3688 return createAnimation(animationId);
3689 };
3690 /**
3691 * EXPERIMENTAL
3692 *
3693 * Given a progression and a cubic bezier function,
3694 * this utility returns the time value(s) at which the
3695 * cubic bezier reaches the given time progression.
3696 *
3697 * If the cubic bezier never reaches the progression
3698 * the result will be an empty array.
3699 *
3700 * This is most useful for switching between easing curves
3701 * when doing a gesture animation (i.e. going from linear easing
3702 * during a drag, to another easing when `progressEnd` is called)
3703 */
3704 AnimationController.prototype.easingTime = function (p0, p1, p2, p3, progression) {
3705 return getTimeGivenProgression(p0, p1, p2, p3, progression);
3706 };
3707 AnimationController.ngInjectableDef = ɵɵdefineInjectable({ factory: function AnimationController_Factory() { return new AnimationController(); }, token: AnimationController, providedIn: "root" });
3708 AnimationController = __decorate([
3709 Injectable({
3710 providedIn: 'root',
3711 })
3712 ], AnimationController);
3713 return AnimationController;
3714}());
3715
3716var GestureController = /** @class */ (function () {
3717 function GestureController(zone) {
3718 this.zone = zone;
3719 }
3720 /**
3721 * Create a new gesture
3722 */
3723 GestureController.prototype.create = function (opts, runInsideAngularZone) {
3724 var _this = this;
3725 if (runInsideAngularZone === void 0) { runInsideAngularZone = false; }
3726 if (runInsideAngularZone) {
3727 Object.getOwnPropertyNames(opts).forEach(function (key) {
3728 if (typeof opts[key] === 'function') {
3729 var fn_1 = opts[key];
3730 opts[key] = function () {
3731 var props = [];
3732 for (var _i = 0; _i < arguments.length; _i++) {
3733 props[_i] = arguments[_i];
3734 }
3735 return _this.zone.run(function () { return fn_1.apply(void 0, __spread(props)); });
3736 };
3737 }
3738 });
3739 }
3740 return createGesture(opts);
3741 };
3742 GestureController.ctorParameters = function () { return [
3743 { type: NgZone }
3744 ]; };
3745 GestureController.ngInjectableDef = ɵɵdefineInjectable({ factory: function GestureController_Factory() { return new GestureController(ɵɵinject(NgZone)); }, token: GestureController, providedIn: "root" });
3746 GestureController = __decorate([
3747 Injectable({
3748 providedIn: 'root',
3749 })
3750 ], GestureController);
3751 return GestureController;
3752}());
3753
3754var IonicRouteStrategy = /** @class */ (function () {
3755 function IonicRouteStrategy() {
3756 }
3757 IonicRouteStrategy.prototype.shouldDetach = function (_route) {
3758 return false;
3759 };
3760 IonicRouteStrategy.prototype.shouldAttach = function (_route) {
3761 return false;
3762 };
3763 IonicRouteStrategy.prototype.store = function (_route, _detachedTree) {
3764 return;
3765 };
3766 IonicRouteStrategy.prototype.retrieve = function (_route) {
3767 return null;
3768 };
3769 IonicRouteStrategy.prototype.shouldReuseRoute = function (future, curr) {
3770 var e_1, _a;
3771 if (future.routeConfig !== curr.routeConfig) {
3772 return false;
3773 }
3774 // checking router params
3775 var futureParams = future.params;
3776 var currentParams = curr.params;
3777 var keysA = Object.keys(futureParams);
3778 var keysB = Object.keys(currentParams);
3779 if (keysA.length !== keysB.length) {
3780 return false;
3781 }
3782 try {
3783 // Test for A's keys different from B.
3784 for (var keysA_1 = __values(keysA), keysA_1_1 = keysA_1.next(); !keysA_1_1.done; keysA_1_1 = keysA_1.next()) {
3785 var key = keysA_1_1.value;
3786 if (currentParams[key] !== futureParams[key]) {
3787 return false;
3788 }
3789 }
3790 }
3791 catch (e_1_1) { e_1 = { error: e_1_1 }; }
3792 finally {
3793 try {
3794 if (keysA_1_1 && !keysA_1_1.done && (_a = keysA_1.return)) _a.call(keysA_1);
3795 }
3796 finally { if (e_1) throw e_1.error; }
3797 }
3798 return true;
3799 };
3800 return IonicRouteStrategy;
3801}());
3802
3803var appInitialize = function (config, doc, zone) {
3804 return function () {
3805 var win = doc.defaultView;
3806 if (win && typeof window !== 'undefined') {
3807 var Ionic = win.Ionic = win.Ionic || {};
3808 Ionic.config = __assign({}, config, { _zoneGate: function (h) { return zone.run(h); } });
3809 var aelFn_1 = '__zone_symbol__addEventListener' in doc.body
3810 ? '__zone_symbol__addEventListener'
3811 : 'addEventListener';
3812 return applyPolyfills().then(function () {
3813 return defineCustomElements(win, {
3814 exclude: ['ion-tabs', 'ion-tab'],
3815 syncQueue: true,
3816 raf: raf,
3817 jmp: function (h) { return zone.runOutsideAngular(h); },
3818 ael: function (elm, eventName, cb, opts) {
3819 elm[aelFn_1](eventName, cb, opts);
3820 },
3821 rel: function (elm, eventName, cb, opts) {
3822 elm.removeEventListener(eventName, cb, opts);
3823 }
3824 });
3825 });
3826 }
3827 };
3828};
3829
3830var DECLARATIONS = [
3831 // proxies
3832 IonApp,
3833 IonAvatar,
3834 IonBackButton,
3835 IonBackdrop,
3836 IonBadge,
3837 IonButton,
3838 IonButtons,
3839 IonCard,
3840 IonCardContent,
3841 IonCardHeader,
3842 IonCardSubtitle,
3843 IonCardTitle,
3844 IonCheckbox,
3845 IonChip,
3846 IonCol,
3847 IonContent,
3848 IonDatetime,
3849 IonFab,
3850 IonFabButton,
3851 IonFabList,
3852 IonFooter,
3853 IonGrid,
3854 IonHeader,
3855 IonIcon,
3856 IonImg,
3857 IonInfiniteScroll,
3858 IonInfiniteScrollContent,
3859 IonInput,
3860 IonItem,
3861 IonItemDivider,
3862 IonItemGroup,
3863 IonItemOption,
3864 IonItemOptions,
3865 IonItemSliding,
3866 IonLabel,
3867 IonList,
3868 IonListHeader,
3869 IonMenu,
3870 IonMenuButton,
3871 IonMenuToggle,
3872 IonNav,
3873 IonNavLink,
3874 IonNote,
3875 IonProgressBar,
3876 IonRadio,
3877 IonRadioGroup,
3878 IonRange,
3879 IonRefresher,
3880 IonRefresherContent,
3881 IonReorder,
3882 IonReorderGroup,
3883 IonRippleEffect,
3884 IonRow,
3885 IonSearchbar,
3886 IonSegment,
3887 IonSegmentButton,
3888 IonSelect,
3889 IonSelectOption,
3890 IonSkeletonText,
3891 IonSlide,
3892 IonSlides,
3893 IonSpinner,
3894 IonSplitPane,
3895 IonTabBar,
3896 IonTabButton,
3897 IonText,
3898 IonTextarea,
3899 IonThumbnail,
3900 IonToggle,
3901 IonToolbar,
3902 IonTitle,
3903 IonTabs,
3904 // ngModel accessors
3905 BooleanValueAccessor,
3906 NumericValueAccessor,
3907 RadioValueAccessor,
3908 SelectValueAccessor,
3909 TextValueAccessor,
3910 // navigation
3911 IonRouterOutlet,
3912 IonBackButtonDelegate,
3913 NavDelegate,
3914 RouterLinkDelegate,
3915 // virtual scroll
3916 VirtualFooter,
3917 VirtualHeader,
3918 VirtualItem,
3919 IonVirtualScroll
3920];
3921var IonicModule = /** @class */ (function () {
3922 function IonicModule() {
3923 }
3924 IonicModule_1 = IonicModule;
3925 IonicModule.forRoot = function (config) {
3926 return {
3927 ngModule: IonicModule_1,
3928 providers: [
3929 {
3930 provide: ConfigToken,
3931 useValue: config
3932 },
3933 {
3934 provide: APP_INITIALIZER,
3935 useFactory: appInitialize,
3936 multi: true,
3937 deps: [
3938 ConfigToken,
3939 DOCUMENT,
3940 NgZone
3941 ]
3942 }
3943 ]
3944 };
3945 };
3946 var IonicModule_1;
3947 IonicModule = IonicModule_1 = __decorate([
3948 NgModule({
3949 declarations: DECLARATIONS,
3950 exports: DECLARATIONS,
3951 providers: [AngularDelegate, ModalController, PopoverController],
3952 imports: [CommonModule]
3953 })
3954 ], IonicModule);
3955 return IonicModule;
3956}());
3957
3958// DIRECTIVES
3959
3960/**
3961 * Generated bundle index. Do not edit.
3962 */
3963
3964export { ActionSheetController, AlertController, AngularDelegate, AnimationController, BooleanValueAccessor, Config, DomController, GestureController, IonApp, IonAvatar, IonBackButton, IonBackButtonDelegate, IonBackdrop, IonBadge, IonButton, IonButtons, IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle, IonCheckbox, IonChip, IonCol, IonContent, IonDatetime, IonFab, IonFabButton, IonFabList, IonFooter, IonGrid, IonHeader, IonIcon, IonImg, IonInfiniteScroll, IonInfiniteScrollContent, IonInput, IonItem, IonItemDivider, IonItemGroup, IonItemOption, IonItemOptions, IonItemSliding, IonLabel, IonList, IonListHeader, IonMenu, IonMenuButton, IonMenuToggle, IonNav, IonNavLink, IonNote, IonProgressBar, IonRadio, IonRadioGroup, IonRange, IonRefresher, IonRefresherContent, IonReorder, IonReorderGroup, IonRippleEffect, IonRouterOutlet, IonRow, IonSearchbar, IonSegment, IonSegmentButton, IonSelect, IonSelectOption, IonSkeletonText, IonSlide, IonSlides, IonSpinner, IonSplitPane, IonTabBar, IonTabButton, IonTabs, IonText, IonTextarea, IonThumbnail, IonTitle, IonToggle, IonToolbar, IonVirtualScroll, IonicModule, IonicRouteStrategy, LoadingController, MenuController, ModalController, NavController, NavDelegate, NavParams, NumericValueAccessor, PickerController, Platform, PopoverController, RadioValueAccessor, RouterLinkDelegate, SelectValueAccessor, TextValueAccessor, ToastController, VirtualFooter, VirtualHeader, VirtualItem, ConfigToken as ɵa, ValueAccessor as ɵb, ProxyCmp as ɵc, OverlayBaseController as ɵe, appInitialize as ɵf };
3965//# sourceMappingURL=ionic-angular.js.map