UNPKG

@ng-bootstrap/ng-bootstrap

Version:
16 lines (14 loc) 194 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("rxjs"),require("rxjs/operators"),require("@angular/forms")):"function"==typeof define&&define.amd?define("ngb",["exports","@angular/core","@angular/common","rxjs","rxjs/operators","@angular/forms"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ngb={},t.ng.core,t.ng.common,t.rxjs,t.rxjs.operators,t.ng.forms)}(this,(function(t,e,n,i,o,r){"use strict";function a(t){return parseInt(""+t,10)}function s(t){return null!=t?""+t:""}function l(t,e,n){return void 0===n&&(n=0),Math.max(Math.min(t,e),n)}function p(t){return"string"==typeof t}function c(t){return!isNaN(a(t))}function u(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}function d(t){return null!=t}function h(t){return c(t)?("0"+t).slice(-2):""}function f(t,e){return t&&t.className&&t.className.split&&t.className.split(/\s+/).indexOf(e)>=0}function g(t){return(t||document.body).getBoundingClientRect()}function m(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}"undefined"==typeof Element||Element.prototype.closest||(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest=function(t){var e=this;if(!document.documentElement.contains(e))return null;do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null});var y=!0,v=5,b=function(){this.animation=y};b.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new b},token:b,providedIn:"root"}),b.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}];var _=function(){function t(t){this._ngbConfig=t,this.closeOthers=!1}return Object.defineProperty(t.prototype,"animation",{get:function(){return void 0===this._animation?this._ngbConfig.animation:this._animation},set:function(t){this._animation=t},enumerable:!1,configurable:!0}),t}();_.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new _(e.ɵɵinject(b))},token:_,providedIn:"root"}),_.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],_.ctorParameters=function(){return[{type:b}]};var w=function(){},D=v,I=new Map,C=function(t,e,n,r){var a=r.context||{},s=I.get(e);if(s)switch(r.runningTransition){case"continue":return i.EMPTY;case"stop":t.run((function(){return s.transition$.complete()})),a=Object.assign(s.context,a),I.delete(e)}var l=n(e,r.animation,a)||w;if(!r.animation||"none"===window.getComputedStyle(e).transitionProperty)return t.run((function(){return l()})),i.of(void 0).pipe(function(t){return function(e){return new i.Observable((function(n){return e.subscribe((function(e){return t.run((function(){return n.next(e)}))}),(function(e){return t.run((function(){return n.error(e)}))}),(function(){return t.run((function(){return n.complete()}))}))}))}}(t));var p=new i.Subject,c=new i.Subject,u=p.pipe(o.endWith(!0));I.set(e,{transition$:p,complete:function(){c.next(),c.complete()},context:a});var d=function(t){var e=window.getComputedStyle(t),n=e.transitionDelay,i=e.transitionDuration;return 1e3*(parseFloat(n)+parseFloat(i))}(e);return t.runOutsideAngular((function(){var n=i.fromEvent(e,"transitionend").pipe(o.takeUntil(u),o.filter((function(t){return t.target===e}))),r=i.timer(d+D).pipe(o.takeUntil(u));i.race(r,n,c).pipe(o.takeUntil(u)).subscribe((function(){I.delete(e),t.run((function(){l(),p.next(),p.complete()}))}))})),p.asObservable()};var k=function(t,e,n){var i=n.direction,o=n.maxHeight,r=t.classList;function a(){r.add("collapse"),"show"===i?r.add("show"):r.remove("show")}if(e)return o||(o=function(t){if("undefined"==typeof navigator)return"0px";var e=t.classList,n=e.contains("show");n||e.add("show"),t.style.height="";var i=t.getBoundingClientRect().height+"px";return n||e.remove("show"),i}(t),n.maxHeight=o,t.style.height="show"!==i?o:"0px",r.remove("collapse"),r.remove("collapsing"),r.remove("show"),g(t),r.add("collapsing")),t.style.height="show"===i?o:"0px",function(){a(),r.remove("collapsing"),t.style.height=""};a()},E=0,R=function(t){this.templateRef=t};R.decorators=[{type:e.Directive,args:[{selector:"ng-template[ngbPanelHeader]"}]}],R.ctorParameters=function(){return[{type:e.TemplateRef}]};var x=function(t){this.templateRef=t};x.decorators=[{type:e.Directive,args:[{selector:"ng-template[ngbPanelTitle]"}]}],x.ctorParameters=function(){return[{type:e.TemplateRef}]};var S=function(t){this.templateRef=t};S.decorators=[{type:e.Directive,args:[{selector:"ng-template[ngbPanelContent]"}]}],S.ctorParameters=function(){return[{type:e.TemplateRef}]};var O=function(){function t(){this.disabled=!1,this.id="ngb-panel-"+E++,this.isOpen=!1,this.initClassDone=!1,this.transitionRunning=!1,this.shown=new e.EventEmitter,this.hidden=new e.EventEmitter}return t.prototype.ngAfterContentChecked=function(){this.titleTpl=this.titleTpls.first,this.headerTpl=this.headerTpls.first,this.contentTpl=this.contentTpls.first},t}();O.decorators=[{type:e.Directive,args:[{selector:"ngb-panel"}]}],O.propDecorators={disabled:[{type:e.Input}],id:[{type:e.Input}],title:[{type:e.Input}],type:[{type:e.Input}],cardClass:[{type:e.Input}],shown:[{type:e.Output}],hidden:[{type:e.Output}],titleTpls:[{type:e.ContentChildren,args:[x,{descendants:!1}]}],headerTpls:[{type:e.ContentChildren,args:[R,{descendants:!1}]}],contentTpls:[{type:e.ContentChildren,args:[S,{descendants:!1}]}]};var T=function(){function t(t,n,i,o){this._element=n,this._ngZone=i,this._changeDetector=o,this.activeIds=[],this.destroyOnHide=!0,this.panelChange=new e.EventEmitter,this.shown=new e.EventEmitter,this.hidden=new e.EventEmitter,this.animation=t.animation,this.type=t.type,this.closeOtherPanels=t.closeOthers}return t.prototype.isExpanded=function(t){return this.activeIds.indexOf(t)>-1},t.prototype.expand=function(t){this._changeOpenState(this._findPanelById(t),!0)},t.prototype.expandAll=function(){var t=this;this.closeOtherPanels?0===this.activeIds.length&&this.panels.length&&this._changeOpenState(this.panels.first,!0):this.panels.forEach((function(e){return t._changeOpenState(e,!0)}))},t.prototype.collapse=function(t){this._changeOpenState(this._findPanelById(t),!1)},t.prototype.collapseAll=function(){var t=this;this.panels.forEach((function(e){t._changeOpenState(e,!1)}))},t.prototype.toggle=function(t){var e=this._findPanelById(t);e&&this._changeOpenState(e,!e.isOpen)},t.prototype.ngAfterContentChecked=function(){var t=this;p(this.activeIds)&&(this.activeIds=this.activeIds.split(/\s*,\s*/)),this.panels.forEach((function(e){e.isOpen=!e.disabled&&t.activeIds.indexOf(e.id)>-1})),this.activeIds.length>1&&this.closeOtherPanels&&(this._closeOthers(this.activeIds[0],!1),this._updateActiveIds()),this._ngZone.onStable.pipe(o.take(1)).subscribe((function(){t.panels.forEach((function(e){var n=t._getPanelElement(e.id);n?e.initClassDone||(e.initClassDone=!0,C(t._ngZone,n,k,{animation:!1,runningTransition:"continue",context:{direction:e.isOpen?"show":"hide"}})):e.initClassDone=!1}))}))},t.prototype._changeOpenState=function(t,e){if(null!=t&&!t.disabled&&t.isOpen!==e){var n=!1;this.panelChange.emit({panelId:t.id,nextState:e,preventDefault:function(){n=!0}}),n||(t.isOpen=e,t.transitionRunning=!0,e&&this.closeOtherPanels&&this._closeOthers(t.id),this._updateActiveIds(),this._runTransitions(this.animation))}},t.prototype._closeOthers=function(t,e){void 0===e&&(e=!0),this.panels.forEach((function(n){n.id!==t&&n.isOpen&&(n.isOpen=!1,n.transitionRunning=e)}))},t.prototype._findPanelById=function(t){return this.panels.find((function(e){return e.id===t}))||null},t.prototype._updateActiveIds=function(){this.activeIds=this.panels.filter((function(t){return t.isOpen&&!t.disabled})).map((function(t){return t.id}))},t.prototype._runTransitions=function(t){var e=this;this._changeDetector.detectChanges(),this.panels.forEach((function(n){if(n.transitionRunning){var i=e._getPanelElement(n.id);C(e._ngZone,i,k,{animation:t,runningTransition:"stop",context:{direction:n.isOpen?"show":"hide"}}).subscribe((function(){n.transitionRunning=!1;var t=n.id;n.isOpen?(n.shown.emit(),e.shown.emit(t)):(n.hidden.emit(),e.hidden.emit(t))}))}}))},t.prototype._getPanelElement=function(t){return this._element.nativeElement.querySelector("#"+t)},t}();T.decorators=[{type:e.Component,args:[{selector:"ngb-accordion",exportAs:"ngbAccordion",encapsulation:e.ViewEncapsulation.None,host:{class:"accordion",role:"tablist","[attr.aria-multiselectable]":"!closeOtherPanels"},template:'\n <ng-template #t ngbPanelHeader let-panel>\n <button class="btn btn-link" [ngbPanelToggle]="panel">\n {{panel.title}}<ng-template [ngTemplateOutlet]="panel.titleTpl?.templateRef"></ng-template>\n </button>\n </ng-template>\n <ng-template ngFor let-panel [ngForOf]="panels">\n <div [class]="\'card \' + (panel.cardClass || \'\')">\n <div role="tab" id="{{panel.id}}-header" [class]="\'card-header \' + (panel.type ? \'bg-\'+panel.type: type ? \'bg-\'+type : \'\')">\n <ng-template [ngTemplateOutlet]="panel.headerTpl?.templateRef || t"\n [ngTemplateOutletContext]="{$implicit: panel, opened: panel.isOpen}"></ng-template>\n </div>\n <div id="{{panel.id}}" role="tabpanel" [attr.aria-labelledby]="panel.id + \'-header\'"\n *ngIf="!destroyOnHide || panel.isOpen || panel.transitionRunning">\n <div class="card-body">\n <ng-template [ngTemplateOutlet]="panel.contentTpl?.templateRef || null"></ng-template>\n </div>\n </div>\n </div>\n </ng-template>\n '}]}],T.ctorParameters=function(){return[{type:_},{type:e.ElementRef},{type:e.NgZone},{type:e.ChangeDetectorRef}]},T.propDecorators={panels:[{type:e.ContentChildren,args:[O]}],animation:[{type:e.Input}],activeIds:[{type:e.Input}],closeOtherPanels:[{type:e.Input,args:["closeOthers"]}],destroyOnHide:[{type:e.Input}],type:[{type:e.Input}],panelChange:[{type:e.Output}],shown:[{type:e.Output}],hidden:[{type:e.Output}]};var N=function(){function t(t,e){this.accordion=t,this.panel=e}return Object.defineProperty(t.prototype,"ngbPanelToggle",{set:function(t){t&&(this.panel=t)},enumerable:!1,configurable:!0}),t}();N.decorators=[{type:e.Directive,args:[{selector:"button[ngbPanelToggle]",host:{type:"button","[disabled]":"panel.disabled","[class.collapsed]":"!panel.isOpen","[attr.aria-expanded]":"panel.isOpen","[attr.aria-controls]":"panel.id","(click)":"accordion.toggle(panel.id)"}}]}],N.ctorParameters=function(){return[{type:T},{type:O,decorators:[{type:e.Optional},{type:e.Host}]}]},N.propDecorators={ngbPanelToggle:[{type:e.Input}]};var P=[T,O,x,S,R,N],M=function(){};M.decorators=[{type:e.NgModule,args:[{declarations:P,exports:P,imports:[n.CommonModule]}]}];var j=function(){function t(t){this._ngbConfig=t,this.dismissible=!0,this.type="warning"}return Object.defineProperty(t.prototype,"animation",{get:function(){return void 0===this._animation?this._ngbConfig.animation:this._animation},set:function(t){this._animation=t},enumerable:!1,configurable:!0}),t}();j.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new j(e.ɵɵinject(b))},token:j,providedIn:"root"}),j.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],j.ctorParameters=function(){return[{type:b}]};var A=function(t){t.classList.remove("show")},F=function(){function t(t,n,i,o){this._renderer=n,this._element=i,this._zone=o,this.closed=new e.EventEmitter,this.dismissible=t.dismissible,this.type=t.type,this.animation=t.animation}return t.prototype.close=function(){var t=this,e=C(this._zone,this._element.nativeElement,A,{animation:this.animation,runningTransition:"continue"});return e.subscribe((function(){return t.closed.emit()})),e},t.prototype.ngOnChanges=function(t){var e=t.type;e&&!e.firstChange&&(this._renderer.removeClass(this._element.nativeElement,"alert-"+e.previousValue),this._renderer.addClass(this._element.nativeElement,"alert-"+e.currentValue))},t.prototype.ngOnInit=function(){this._renderer.addClass(this._element.nativeElement,"alert-"+this.type)},t}();F.decorators=[{type:e.Component,args:[{selector:"ngb-alert",exportAs:"ngbAlert",changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,host:{role:"alert",class:"alert show","[class.fade]":"animation","[class.alert-dismissible]":"dismissible"},template:'\n <ng-content></ng-content>\n <button *ngIf="dismissible" type="button" class="close" aria-label="Close" i18n-aria-label="@@ngb.alert.close"\n (click)="close()">\n <span aria-hidden="true">&times;</span>\n </button>\n ',styles:["ngb-alert{display:block}"]}]}],F.ctorParameters=function(){return[{type:j},{type:e.Renderer2},{type:e.ElementRef},{type:e.NgZone}]},F.propDecorators={animation:[{type:e.Input}],dismissible:[{type:e.Input}],type:[{type:e.Input}],closed:[{type:e.Output}]};var V=function(){};V.decorators=[{type:e.NgModule,args:[{declarations:[F],exports:[F],imports:[n.CommonModule],entryComponents:[F]}]}];var L=function(){};L.decorators=[{type:e.Directive,args:[{selector:"[ngbButtonLabel]",host:{"[class.btn]":"true","[class.active]":"active","[class.disabled]":"disabled","[class.focus]":"focused"}}]}];var $=function(){function t(t,e){this._label=t,this._cd=e,this.disabled=!1,this.valueChecked=!0,this.valueUnChecked=!1,this.onChange=function(t){},this.onTouched=function(){}}return Object.defineProperty(t.prototype,"focused",{set:function(t){this._label.focused=t,t||this.onTouched()},enumerable:!1,configurable:!0}),t.prototype.onInputChange=function(t){var e=t.target.checked?this.valueChecked:this.valueUnChecked;this.onChange(e),this.onTouched(),this.writeValue(e)},t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this.disabled=t,this._label.disabled=t},t.prototype.writeValue=function(t){this.checked=t===this.valueChecked,this._label.active=this.checked,this._cd.markForCheck()},t}();$.decorators=[{type:e.Directive,args:[{selector:"[ngbButton][type=checkbox]",host:{"[checked]":"checked","[disabled]":"disabled","(change)":"onInputChange($event)","(focus)":"focused = true","(blur)":"focused = false"},providers:[{provide:r.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return $})),multi:!0}]}]}],$.ctorParameters=function(){return[{type:L},{type:e.ChangeDetectorRef}]},$.propDecorators={disabled:[{type:e.Input}],valueChecked:[{type:e.Input}],valueUnChecked:[{type:e.Input}]};var W=0,H=function(){function t(){this._radios=new Set,this._value=null,this.name="ngb-radio-"+W++,this.onChange=function(t){},this.onTouched=function(){}}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this.setDisabledState(t)},enumerable:!1,configurable:!0}),t.prototype.onRadioChange=function(t){this.writeValue(t.value),this.onChange(t.value)},t.prototype.onRadioValueUpdate=function(){this._updateRadiosValue()},t.prototype.register=function(t){this._radios.add(t)},t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._disabled=t,this._updateRadiosDisabled()},t.prototype.unregister=function(t){this._radios.delete(t)},t.prototype.writeValue=function(t){this._value=t,this._updateRadiosValue()},t.prototype._updateRadiosValue=function(){var t=this;this._radios.forEach((function(e){return e.updateValue(t._value)}))},t.prototype._updateRadiosDisabled=function(){this._radios.forEach((function(t){return t.updateDisabled()}))},t}();H.decorators=[{type:e.Directive,args:[{selector:"[ngbRadioGroup]",host:{role:"radiogroup"},providers:[{provide:r.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return H})),multi:!0}]}]}],H.propDecorators={name:[{type:e.Input}]};var z=function(){function t(t,e,n,i,o){this._group=t,this._label=e,this._renderer=n,this._element=i,this._cd=o,this._value=null,this._group.register(this),this.updateDisabled()}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(t){this._value=t;var e=t?t.toString():"";this._renderer.setProperty(this._element.nativeElement,"value",e),this._group.onRadioValueUpdate()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._group.disabled||this._disabled},set:function(t){this._disabled=!1!==t,this.updateDisabled()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"focused",{set:function(t){this._label&&(this._label.focused=t),t||this._group.onTouched()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return this._checked},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nameAttr",{get:function(){return this.name||this._group.name},enumerable:!1,configurable:!0}),t.prototype.ngOnDestroy=function(){this._group.unregister(this)},t.prototype.onChange=function(){this._group.onRadioChange(this)},t.prototype.updateValue=function(t){this.value!==t&&this._cd.markForCheck(),this._checked=this.value===t,this._label.active=this._checked},t.prototype.updateDisabled=function(){this._label.disabled=this.disabled},t}();z.decorators=[{type:e.Directive,args:[{selector:"[ngbButton][type=radio]",host:{"[checked]":"checked","[disabled]":"disabled","[name]":"nameAttr","(change)":"onChange()","(focus)":"focused = true","(blur)":"focused = false"}}]}],z.ctorParameters=function(){return[{type:H},{type:L},{type:e.Renderer2},{type:e.ElementRef},{type:e.ChangeDetectorRef}]},z.propDecorators={name:[{type:e.Input}],value:[{type:e.Input,args:["value"]}],disabled:[{type:e.Input,args:["disabled"]}]};var B=[L,$,H,z],U=function(){};U.decorators=[{type:e.NgModule,args:[{declarations:B,exports:B}]}]; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var Z=function(t,e){return(Z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function K(t,e){function n(){this.constructor=t}Z(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.create;function q(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Y(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,o,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function G(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Y(arguments[e]));return t}Object.create;var X,J=function(){function t(t){this._ngbConfig=t,this.interval=5e3,this.wrap=!0,this.keyboard=!0,this.pauseOnHover=!0,this.pauseOnFocus=!0,this.showNavigationArrows=!0,this.showNavigationIndicators=!0}return Object.defineProperty(t.prototype,"animation",{get:function(){return void 0===this._animation?this._ngbConfig.animation:this._animation},set:function(t){this._animation=t},enumerable:!1,configurable:!0}),t}();J.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new J(e.ɵɵinject(b))},token:J,providedIn:"root"}),J.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],J.ctorParameters=function(){return[{type:b}]},(X=t.NgbSlideEventDirection||(t.NgbSlideEventDirection={})).LEFT="left",X.RIGHT="right";var Q=function(t){var e=t.classList;return e.contains("carousel-item-left")||e.contains("carousel-item-right")},tt=function(t){t.remove("carousel-item-left"),t.remove("carousel-item-right")},et=function(t){tt(t),t.remove("carousel-item-prev"),t.remove("carousel-item-next")},nt=function(e,n,i){var o=i.direction,r=e.classList;return n?(Q(e)?tt(r):(r.add("carousel-item-"+(o===t.NgbSlideEventDirection.LEFT?"next":"prev")),g(e),r.add("carousel-item-"+o)),function(){et(r),r.add("active")}):(tt(r),et(r),void r.add("active"))},it=function(t,e,n){var i=n.direction,o=t.classList;return e?(Q(t)?tt(o):o.add("carousel-item-"+i),function(){et(o),o.remove("active")}):(tt(o),et(o),void o.remove("active"))},ot=0,rt=function(t){this.tplRef=t,this.id="ngb-slide-"+ot++,this.slid=new e.EventEmitter};rt.decorators=[{type:e.Directive,args:[{selector:"ng-template[ngbSlide]"}]}],rt.ctorParameters=function(){return[{type:e.TemplateRef}]},rt.propDecorators={id:[{type:e.Input}],slid:[{type:e.Output}]};var at,st=function(){function r(n,o,r,a,s){this._platformId=o,this._ngZone=r,this._cd=a,this._container=s,this.NgbSlideEventSource=t.NgbSlideEventSource,this._destroy$=new i.Subject,this._interval$=new i.BehaviorSubject(0),this._mouseHover$=new i.BehaviorSubject(!1),this._focused$=new i.BehaviorSubject(!1),this._pauseOnHover$=new i.BehaviorSubject(!1),this._pauseOnFocus$=new i.BehaviorSubject(!1),this._pause$=new i.BehaviorSubject(!1),this._wrap$=new i.BehaviorSubject(!1),this.slide=new e.EventEmitter,this.slid=new e.EventEmitter,this._transitionIds=null,this.animation=n.animation,this.interval=n.interval,this.wrap=n.wrap,this.keyboard=n.keyboard,this.pauseOnHover=n.pauseOnHover,this.pauseOnFocus=n.pauseOnFocus,this.showNavigationArrows=n.showNavigationArrows,this.showNavigationIndicators=n.showNavigationIndicators}return Object.defineProperty(r.prototype,"interval",{get:function(){return this._interval$.value},set:function(t){this._interval$.next(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"wrap",{get:function(){return this._wrap$.value},set:function(t){this._wrap$.next(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"pauseOnHover",{get:function(){return this._pauseOnHover$.value},set:function(t){this._pauseOnHover$.next(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"pauseOnFocus",{get:function(){return this._pauseOnFocus$.value},set:function(t){this._pauseOnFocus$.next(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"mouseHover",{get:function(){return this._mouseHover$.value},set:function(t){this._mouseHover$.next(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"focused",{get:function(){return this._focused$.value},set:function(t){this._focused$.next(t)},enumerable:!1,configurable:!0}),r.prototype.arrowLeft=function(){this.focus(),this.prev(t.NgbSlideEventSource.ARROW_LEFT)},r.prototype.arrowRight=function(){this.focus(),this.next(t.NgbSlideEventSource.ARROW_RIGHT)},r.prototype.ngAfterContentInit=function(){var e=this;n.isPlatformBrowser(this._platformId)&&this._ngZone.runOutsideAngular((function(){var n=i.combineLatest([e.slide.pipe(o.map((function(t){return t.current})),o.startWith(e.activeId)),e._wrap$,e.slides.changes.pipe(o.startWith(null))]).pipe(o.map((function(t){var n=Y(t,2),i=n[0],o=n[1],r=e.slides.toArray(),a=e._getSlideIdxById(i);return o?r.length>1:a<r.length-1})),o.distinctUntilChanged());i.combineLatest([e._pause$,e._pauseOnHover$,e._mouseHover$,e._pauseOnFocus$,e._focused$,e._interval$,n]).pipe(o.map((function(t){var e=Y(t,7),n=e[0],i=e[1],o=e[2],r=e[3],a=e[4],s=e[5],l=e[6];return n||i&&o||r&&a||!l?0:s})),o.distinctUntilChanged(),o.switchMap((function(t){return t>0?i.timer(t,t):i.NEVER})),o.takeUntil(e._destroy$)).subscribe((function(){return e._ngZone.run((function(){return e.next(t.NgbSlideEventSource.TIMER)}))}))})),this.slides.changes.pipe(o.takeUntil(this._destroy$)).subscribe((function(){var t;null===(t=e._transitionIds)||void 0===t||t.forEach((function(t){return function(t){var e;null===(e=I.get(t))||void 0===e||e.complete()}(e._getSlideElement(t))})),e._transitionIds=null,e._cd.markForCheck(),e._ngZone.onStable.pipe(o.take(1)).subscribe((function(){var t,n;try{for(var i=q(e.slides),o=i.next();!o.done;o=i.next()){var r=o.value.id,a=e._getSlideElement(r);r===e.activeId?a.classList.add("active"):a.classList.remove("active")}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}}))}))},r.prototype.ngAfterContentChecked=function(){var t=this._getSlideById(this.activeId);this.activeId=t?t.id:this.slides.length?this.slides.first.id:""},r.prototype.ngAfterViewInit=function(){if(this.activeId){var t=this._getSlideElement(this.activeId);t&&t.classList.add("active")}},r.prototype.ngOnDestroy=function(){this._destroy$.next()},r.prototype.select=function(t,e){this._cycleToSelected(t,this._getSlideEventDirection(this.activeId,t),e)},r.prototype.prev=function(e){this._cycleToSelected(this._getPrevSlide(this.activeId),t.NgbSlideEventDirection.RIGHT,e)},r.prototype.next=function(e){this._cycleToSelected(this._getNextSlide(this.activeId),t.NgbSlideEventDirection.LEFT,e)},r.prototype.pause=function(){this._pause$.next(!0)},r.prototype.cycle=function(){this._pause$.next(!1)},r.prototype.focus=function(){this._container.nativeElement.focus()},r.prototype._cycleToSelected=function(t,e,n){var r=this,a=this._transitionIds;if(!a||a[0]===t&&a[1]===this.activeId){var s=this._getSlideById(t);if(s&&s.id!==this.activeId){this._transitionIds=[this.activeId,t],this.slide.emit({prev:this.activeId,current:s.id,direction:e,paused:this._pause$.value,source:n});var l={animation:this.animation,runningTransition:"stop",context:{direction:e}},p=[],c=this._getSlideById(this.activeId);if(c){var u=C(this._ngZone,this._getSlideElement(c.id),it,l);u.subscribe((function(){c.slid.emit({isShown:!1,direction:e,source:n})})),p.push(u)}var d=this.activeId;this.activeId=s.id;var h=this._getSlideById(this.activeId),f=C(this._ngZone,this._getSlideElement(s.id),nt,l);f.subscribe((function(){null==h||h.slid.emit({isShown:!0,direction:e,source:n})})),p.push(f),i.zip.apply(void 0,G(p)).pipe(o.take(1)).subscribe((function(){r._transitionIds=null,r.slid.emit({prev:d,current:s.id,direction:e,paused:r._pause$.value,source:n})}))}this._cd.markForCheck()}},r.prototype._getSlideEventDirection=function(e,n){return this._getSlideIdxById(e)>this._getSlideIdxById(n)?t.NgbSlideEventDirection.RIGHT:t.NgbSlideEventDirection.LEFT},r.prototype._getSlideById=function(t){return this.slides.find((function(e){return e.id===t}))||null},r.prototype._getSlideIdxById=function(t){var e=this._getSlideById(t);return null!=e?this.slides.toArray().indexOf(e):-1},r.prototype._getNextSlide=function(t){var e=this.slides.toArray(),n=this._getSlideIdxById(t);return n===e.length-1?this.wrap?e[0].id:e[e.length-1].id:e[n+1].id},r.prototype._getPrevSlide=function(t){var e=this.slides.toArray(),n=this._getSlideIdxById(t);return 0===n?this.wrap?e[e.length-1].id:e[0].id:e[n-1].id},r.prototype._getSlideElement=function(t){return this._container.nativeElement.querySelector("#slide-"+t)},r}();st.decorators=[{type:e.Component,args:[{selector:"ngb-carousel",exportAs:"ngbCarousel",changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,host:{class:"carousel slide","[style.display]":'"block"',tabIndex:"0","(keydown.arrowLeft)":"keyboard && arrowLeft()","(keydown.arrowRight)":"keyboard && arrowRight()","(mouseenter)":"mouseHover = true","(mouseleave)":"mouseHover = false","(focusin)":"focused = true","(focusout)":"focused = false","[attr.aria-activedescendant]":"'slide-' + activeId"},template:'\n <ol class="carousel-indicators" [class.sr-only]="!showNavigationIndicators" role="tablist">\n <li *ngFor="let slide of slides" [class.active]="slide.id === activeId"\n role="tab" [attr.aria-labelledby]="\'slide-\' + slide.id" [attr.aria-controls]="\'slide-\' + slide.id"\n [attr.aria-selected]="slide.id === activeId"\n (click)="focus();select(slide.id, NgbSlideEventSource.INDICATOR);"></li>\n </ol>\n <div class="carousel-inner">\n <div *ngFor="let slide of slides; index as i; count as c" class="carousel-item" [id]="\'slide-\' + slide.id" role="tabpanel">\n <span class="sr-only" i18n="Currently selected slide number read by screen reader@@ngb.carousel.slide-number">\n Slide {{i + 1}} of {{c}}\n </span>\n <ng-template [ngTemplateOutlet]="slide.tplRef"></ng-template>\n </div>\n </div>\n <a class="carousel-control-prev" role="button" (click)="arrowLeft()" *ngIf="showNavigationArrows">\n <span class="carousel-control-prev-icon" aria-hidden="true"></span>\n <span class="sr-only" i18n="@@ngb.carousel.previous">Previous</span>\n </a>\n <a class="carousel-control-next" role="button" (click)="arrowRight()" *ngIf="showNavigationArrows">\n <span class="carousel-control-next-icon" aria-hidden="true"></span>\n <span class="sr-only" i18n="@@ngb.carousel.next">Next</span>\n </a>\n '}]}],st.ctorParameters=function(){return[{type:J},{type:void 0,decorators:[{type:e.Inject,args:[e.PLATFORM_ID]}]},{type:e.NgZone},{type:e.ChangeDetectorRef},{type:e.ElementRef}]},st.propDecorators={slides:[{type:e.ContentChildren,args:[rt]}],animation:[{type:e.Input}],activeId:[{type:e.Input}],interval:[{type:e.Input}],wrap:[{type:e.Input}],keyboard:[{type:e.Input}],pauseOnHover:[{type:e.Input}],pauseOnFocus:[{type:e.Input}],showNavigationArrows:[{type:e.Input}],showNavigationIndicators:[{type:e.Input}],slide:[{type:e.Output}],slid:[{type:e.Output}]},(at=t.NgbSlideEventSource||(t.NgbSlideEventSource={})).TIMER="timer",at.ARROW_LEFT="arrowLeft",at.ARROW_RIGHT="arrowRight",at.INDICATOR="indicator";var lt=[st,rt],pt=function(){};pt.decorators=[{type:e.NgModule,args:[{declarations:lt,exports:lt,imports:[n.CommonModule]}]}];var ct=function(){function t(t){this._ngbConfig=t}return Object.defineProperty(t.prototype,"animation",{get:function(){return void 0===this._animation?this._ngbConfig.animation:this._animation},set:function(t){this._animation=t},enumerable:!1,configurable:!0}),t}();ct.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new ct(e.ɵɵinject(b))},token:ct,providedIn:"root"}),ct.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],ct.ctorParameters=function(){return[{type:b}]};var ut=function(){function t(t,n,i){this._element=t,this._zone=i,this.collapsed=!1,this.ngbCollapseChange=new e.EventEmitter,this.shown=new e.EventEmitter,this.hidden=new e.EventEmitter,this.animation=n.animation}return t.prototype.ngOnInit=function(){this._runTransition(this.collapsed,!1)},t.prototype.ngOnChanges=function(t){t.collapsed.firstChange||this._runTransitionWithEvents(this.collapsed,this.animation)},t.prototype.toggle=function(t){void 0===t&&(t=this.collapsed),this.collapsed=!t,this.ngbCollapseChange.next(this.collapsed),this._runTransitionWithEvents(this.collapsed,this.animation)},t.prototype._runTransition=function(t,e){return C(this._zone,this._element.nativeElement,k,{animation:e,runningTransition:"stop",context:{direction:t?"hide":"show"}})},t.prototype._runTransitionWithEvents=function(t,e){var n=this;this._runTransition(t,e).subscribe((function(){t?n.hidden.emit():n.shown.emit()}))},t}();ut.decorators=[{type:e.Directive,args:[{selector:"[ngbCollapse]",exportAs:"ngbCollapse"}]}],ut.ctorParameters=function(){return[{type:e.ElementRef},{type:ct},{type:e.NgZone}]},ut.propDecorators={animation:[{type:e.Input}],collapsed:[{type:e.Input,args:["ngbCollapse"]}],ngbCollapseChange:[{type:e.Output}],shown:[{type:e.Output}],hidden:[{type:e.Output}]};var dt=function(){};dt.decorators=[{type:e.NgModule,args:[{declarations:[ut],exports:[ut]}]}];var ht=function(){function t(t,e,n){this.year=u(t)?t:null,this.month=u(e)?e:null,this.day=u(n)?n:null}return t.from=function(e){return e instanceof t?e:e?new t(e.year,e.month,e.day):null},t.prototype.equals=function(t){return null!=t&&this.year===t.year&&this.month===t.month&&this.day===t.day},t.prototype.before=function(t){return!!t&&(this.year===t.year?this.month===t.month?this.day!==t.day&&this.day<t.day:this.month<t.month:this.year<t.year)},t.prototype.after=function(t){return!!t&&(this.year===t.year?this.month===t.month?this.day!==t.day&&this.day>t.day:this.month>t.month:this.year>t.year)},t}();function ft(t){return new ht(t.getFullYear(),t.getMonth()+1,t.getDate())}function gt(t){var e=new Date(t.year,t.month-1,t.day,12);return isNaN(e.getTime())||e.setFullYear(t.year),e}function mt(){return new vt}var yt=function(){};yt.ɵprov=e.ɵɵdefineInjectable({factory:mt,token:yt,providedIn:"root"}),yt.decorators=[{type:e.Injectable,args:[{providedIn:"root",useFactory:mt}]}];var vt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return K(e,t),e.prototype.getDaysPerWeek=function(){return 7},e.prototype.getMonths=function(){return[1,2,3,4,5,6,7,8,9,10,11,12]},e.prototype.getWeeksPerMonth=function(){return 6},e.prototype.getNext=function(t,e,n){void 0===e&&(e="d"),void 0===n&&(n=1);var i=gt(t),o=!0,r=i.getMonth();switch(e){case"y":i.setFullYear(i.getFullYear()+n);break;case"m":r+=n,i.setMonth(r),(r%=12)<0&&(r+=12);break;case"d":i.setDate(i.getDate()+n),o=!1;break;default:return t}return o&&i.getMonth()!==r&&i.setDate(0),ft(i)},e.prototype.getPrev=function(t,e,n){return void 0===e&&(e="d"),void 0===n&&(n=1),this.getNext(t,e,-n)},e.prototype.getWeekday=function(t){var e=gt(t).getDay();return 0===e?7:e},e.prototype.getWeekNumber=function(t,e){7===e&&(e=0);var n=gt(t[(11-e)%7]);n.setDate(n.getDate()+4-(n.getDay()||7));var i=n.getTime();return n.setMonth(0),n.setDate(1),Math.floor(Math.round((i-n.getTime())/864e5)/7)+1},e.prototype.getToday=function(){return ft(new Date)},e.prototype.isValid=function(t){if(!(t&&u(t.year)&&u(t.month)&&u(t.day)))return!1;if(0===t.year)return!1;var e=gt(t);return!isNaN(e.getTime())&&e.getFullYear()===t.year&&e.getMonth()+1===t.month&&e.getDate()===t.day},e}(yt);function bt(t,e){return!function(t,e){return!t&&!e||!!t&&!!e&&t.equals(e)}(t,e)}function _t(t,e){return!(!t&&!e)&&(!t||!e||(t.year!==e.year||t.month!==e.month))}function wt(t,e,n){return t&&e&&t.before(e)?e:t&&n&&t.after(n)?n:t||null}function Dt(t,e){var n=e.minDate,i=e.maxDate,o=e.disabled,r=e.markDisabled;return!(null==t||o||r&&r(t,{year:t.year,month:t.month})||n&&t.before(n)||i&&t.after(i))}function It(t,e,n,i,o){var r=n.displayMonths,a=n.months,s=a.splice(0,a.length);return Array.from({length:r},(function(n,i){var r=Object.assign(t.getNext(e,"m",i),{day:1});if(a[i]=null,!o){var l=s.findIndex((function(t){return t.firstDate.equals(r)}));-1!==l&&(a[i]=s.splice(l,1)[0])}return r})).forEach((function(e,o){null===a[o]&&(a[o]=function(t,e,n,i,o){void 0===o&&(o={});var r=n.dayTemplateData,a=n.minDate,s=n.maxDate,l=n.firstDayOfWeek,p=n.markDisabled,c=n.outsideDays,u=n.weekdayWidth,d=n.weekdaysVisible,h=t.getToday();o.firstDate=null,o.lastDate=null,o.number=e.month,o.year=e.year,o.weeks=o.weeks||[],o.weekdays=o.weekdays||[],e=function(t,e,n){var i=t.getDaysPerWeek(),o=new ht(e.year,e.month,1),r=t.getWeekday(o)%i;return t.getPrev(o,"d",(i+r-n)%i)}(t,e,l),d||(o.weekdays.length=0);for(var f=0;f<t.getWeeksPerMonth();f++){var g=o.weeks[f];g||(g=o.weeks[f]={number:0,days:[],collapsed:!0});for(var m=g.days,y=0;y<t.getDaysPerWeek();y++){0===f&&d&&(o.weekdays[y]=i.getWeekdayLabel(t.getWeekday(e),u));var v=new ht(e.year,e.month,e.day),b=t.getNext(v),_=i.getDayAriaLabel(v),w=!!(a&&v.before(a)||s&&v.after(s));!w&&p&&(w=p(v,{month:o.number,year:o.year}));var D=v.equals(h),I=r?r(v,{month:o.number,year:o.year}):void 0;null===o.firstDate&&v.month===o.number&&(o.firstDate=v),v.month===o.number&&b.month!==o.number&&(o.lastDate=v);var C=m[y];C||(C=m[y]={}),C.date=v,C.context=Object.assign(C.context||{},{$implicit:v,date:v,data:I,currentMonth:o.number,currentYear:o.year,disabled:w,focused:!1,selected:!1,today:D}),C.tabindex=-1,C.ariaLabel=_,C.hidden=!1,e=b}g.number=t.getWeekNumber(m.map((function(t){return t.date})),l),g.collapsed="collapsed"===c&&m[0].date.month!==o.number&&m[m.length-1].date.month!==o.number}return o}(t,e,n,i,s.shift()||{}))})),a}function Ct(t){return new Et(t)}vt.decorators=[{type:e.Injectable}];var kt=function(){function t(){}return t.prototype.getWeekdayLabel=function(t,e){return this.getWeekdayShortName(t)},t.prototype.getMonthLabel=function(t){return this.getMonthFullName(t.month,t.year)+" "+this.getYearNumerals(t.year)},t.prototype.getDayNumerals=function(t){return""+t.day},t.prototype.getWeekNumerals=function(t){return""+t},t.prototype.getYearNumerals=function(t){return""+t},t.prototype.getWeekLabel=function(){return""},t}();kt.ɵprov=e.ɵɵdefineInjectable({factory:function(){return Ct(e.ɵɵinject(e.LOCALE_ID))},token:kt,providedIn:"root"}),kt.decorators=[{type:e.Injectable,args:[{providedIn:"root",useFactory:Ct,deps:[e.LOCALE_ID]}]}];var Et=function(t){function e(e){var i=t.call(this)||this;return i._locale=e,i._monthsShort=n.getLocaleMonthNames(e,n.FormStyle.Standalone,n.TranslationWidth.Abbreviated),i._monthsFull=n.getLocaleMonthNames(e,n.FormStyle.Standalone,n.TranslationWidth.Wide),i}return K(e,t),e.prototype.getWeekdayShortName=function(t){return this.getWeekdayLabel(t,n.TranslationWidth.Short)},e.prototype.getWeekdayLabel=function(t,e){var i=n.getLocaleDayNames(this._locale,n.FormStyle.Standalone,void 0===e?n.TranslationWidth.Short:e);return i.map((function(t,e){return i[(e+1)%7]}))[t-1]||""},e.prototype.getMonthShortName=function(t){return this._monthsShort[t-1]||""},e.prototype.getMonthFullName=function(t){return this._monthsFull[t-1]||""},e.prototype.getDayAriaLabel=function(t){var e=new Date(t.year,t.month-1,t.day);return n.formatDate(e,"fullDate",this._locale)},e}(kt);Et.decorators=[{type:e.Injectable}],Et.ctorParameters=function(){return[{type:String,decorators:[{type:e.Inject,args:[e.LOCALE_ID]}]}]};var Rt,xt=function(){function t(t,e){var o=this;this._calendar=t,this._i18n=e,this._VALIDATORS={dayTemplateData:function(t){if(o._state.dayTemplateData!==t)return{dayTemplateData:t}},displayMonths:function(t){if(u(t=a(t))&&t>0&&o._state.displayMonths!==t)return{displayMonths:t}},disabled:function(t){if(o._state.disabled!==t)return{disabled:t}},firstDayOfWeek:function(t){if(u(t=a(t))&&t>=0&&o._state.firstDayOfWeek!==t)return{firstDayOfWeek:t}},focusVisible:function(t){if(o._state.focusVisible!==t&&!o._state.disabled)return{focusVisible:t}},markDisabled:function(t){if(o._state.markDisabled!==t)return{markDisabled:t}},maxDate:function(t){var e=o.toValidDate(t,null);if(bt(o._state.maxDate,e))return{maxDate:e}},minDate:function(t){var e=o.toValidDate(t,null);if(bt(o._state.minDate,e))return{minDate:e}},navigation:function(t){if(o._state.navigation!==t)return{navigation:t}},outsideDays:function(t){if(o._state.outsideDays!==t)return{outsideDays:t}},weekdays:function(t){var e=!0===t||!1===t?n.TranslationWidth.Short:t,i=!0!==t&&!1!==t||t;if(o._state.weekdayWidth!==e||o._state.weekdaysVisible!==i)return{weekdayWidth:e,weekdaysVisible:i}}},this._model$=new i.Subject,this._dateSelect$=new i.Subject,this._state={dayTemplateData:null,markDisabled:null,maxDate:null,minDate:null,disabled:!1,displayMonths:1,firstDate:null,firstDayOfWeek:1,lastDate:null,focusDate:null,focusVisible:!1,months:[],navigation:"select",outsideDays:"visible",prevDisabled:!1,nextDisabled:!1,selectedDate:null,selectBoxes:{years:[],months:[]},weekdayWidth:n.TranslationWidth.Short,weekdaysVisible:!0}}return Object.defineProperty(t.prototype,"model$",{get:function(){return this._model$.pipe(o.filter((function(t){return t.months.length>0})))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dateSelect$",{get:function(){return this._dateSelect$.pipe(o.filter((function(t){return null!==t})))},enumerable:!1,configurable:!0}),t.prototype.set=function(t){var e=this,n=Object.keys(t).map((function(n){return e._VALIDATORS[n](t[n])})).reduce((function(t,e){return Object.assign(Object.assign({},t),e)}),{});Object.keys(n).length>0&&this._nextState(n)},t.prototype.focus=function(t){var e=this.toValidDate(t,null);null!=e&&!this._state.disabled&&bt(this._state.focusDate,e)&&this._nextState({focusDate:t})},t.prototype.focusSelect=function(){Dt(this._state.focusDate,this._state)&&this.select(this._state.focusDate,{emitEvent:!0})},t.prototype.open=function(t){var e=this.toValidDate(t,this._calendar.getToday());null==e||this._state.disabled||this._state.firstDate&&!_t(this._state.firstDate,e)||this._nextState({firstDate:e})},t.prototype.select=function(t,e){void 0===e&&(e={});var n=this.toValidDate(t,null);null==n||this._state.disabled||(bt(this._state.selectedDate,n)&&this._nextState({selectedDate:n}),e.emitEvent&&Dt(n,this._state)&&this._dateSelect$.next(n))},t.prototype.toValidDate=function(t,e){var n=ht.from(t);return void 0===e&&(e=this._calendar.getToday()),this._calendar.isValid(n)?n:e},t.prototype.getMonth=function(t){var e,n;try{for(var i=q(this._state.months),o=i.next();!o.done;o=i.next()){var r=o.value;if(t.month===r.number&&t.year===r.year)return r}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}throw new Error("month "+t.month+" of year "+t.year+" not found")},t.prototype._nextState=function(t){var e=this._updateState(t);this._patchContexts(e),this._state=e,this._model$.next(this._state)},t.prototype._patchContexts=function(t){var e=t.months,n=t.displayMonths,i=t.selectedDate,o=t.focusDate,r=t.focusVisible,a=t.disabled,s=t.outsideDays;t.months.forEach((function(t){t.weeks.forEach((function(l){l.days.forEach((function(l){o&&(l.context.focused=o.equals(l.date)&&r),l.tabindex=!a&&o&&l.date.equals(o)&&o.month===t.number?0:-1,!0===a&&(l.context.disabled=!0),void 0!==i&&(l.context.selected=null!==i&&i.equals(l.date)),t.number!==l.date.month&&(l.hidden="hidden"===s||"collapsed"===s||n>1&&l.date.after(e[0].firstDate)&&l.date.before(e[n-1].lastDate))}))}))}))},t.prototype._updateState=function(t){var e,n,i,o,r=Object.assign({},this._state,t),a=r.firstDate;if(("minDate"in t||"maxDate"in t)&&(!function(t,e){if(e&&t&&e.before(t))throw new Error("'maxDate' "+e+" should be greater than 'minDate' "+t)}(r.minDate,r.maxDate),r.focusDate=wt(r.focusDate,r.minDate,r.maxDate),r.firstDate=wt(r.firstDate,r.minDate,r.maxDate),a=r.focusDate),"disabled"in t&&(r.focusVisible=!1),"selectedDate"in t&&0===this._state.months.length&&(a=r.selectedDate),"focusVisible"in t)return r;if("focusDate"in t&&(r.focusDate=wt(r.focusDate,r.minDate,r.maxDate),a=r.focusDate,0!==r.months.length&&r.focusDate&&!r.focusDate.before(r.firstDate)&&!r.focusDate.after(r.lastDate)))return r;if("firstDate"in t&&(r.firstDate=wt(r.firstDate,r.minDate,r.maxDate),a=r.firstDate),a){var s="dayTemplateData"in t||"firstDayOfWeek"in t||"markDisabled"in t||"minDate"in t||"maxDate"in t||"disabled"in t||"outsideDays"in t||"weekdaysVisible"in t,l=It(this._calendar,a,r,this._i18n,s);r.months=l,r.firstDate=l[0].firstDate,r.lastDate=l[l.length-1].lastDate,"selectedDate"in t&&!Dt(r.selectedDate,r)&&(r.selectedDate=null),"firstDate"in t&&(!r.focusDate||r.focusDate.before(r.firstDate)||r.focusDate.after(r.lastDate))&&(r.focusDate=a);var p=!this._state.firstDate||this._state.firstDate.year!==r.firstDate.year,c=!this._state.firstDate||this._state.firstDate.month!==r.firstDate.month;"select"===r.navigation?(("minDate"in t||"maxDate"in t||0===r.selectBoxes.years.length||p)&&(r.selectBoxes.years=function(t,e,n){if(!t)return[];for(var i=e?Math.max(e.year,t.year-500):t.year-10,o=(n?Math.min(n.year,t.year+500):t.year+10)-i+1,r=Array(o),a=0;a<o;a++)r[a]=i+a;return r}(r.firstDate,r.minDate,r.maxDate)),("minDate"in t||"maxDate"in t||0===r.selectBoxes.months.length||p)&&(r.selectBoxes.months=function(t,e,n,i){if(!e)return[];var o=t.getMonths(e.year);if(n&&e.year===n.year){var r=o.findIndex((function(t){return t===n.month}));o=o.slice(r)}i&&e.year===i.year&&(r=o.findIndex((function(t){return t===i.month})),o=o.slice(0,r+1));return o}(this._calendar,r.firstDate,r.minDate,r.maxDate))):r.selectBoxes={years:[],months:[]},"arrows"!==r.navigation&&"select"!==r.navigation||!(c||p||"minDate"in t||"maxDate"in t||"disabled"in t)||(r.prevDisabled=r.disabled||(e=this._calendar,n=r.firstDate,i=r.minDate,o=Object.assign(e.getPrev(n,"m"),{day:1}),null!=i&&(o.year===i.year&&o.month<i.month||o.year<i.year&&1===i.month)),r.nextDisabled=r.disabled||function(t,e,n){var i=Object.assign(t.getNext(e,"m"),{day:1});return null!=n&&i.after(n)}(this._calendar,r.lastDate,r.maxDate))}return r},t}();xt.decorators=[{type:e.Injectable}],xt.ctorParameters=function(){return[{type:yt},{type:kt}]},function(t){t[t.PREV=0]="PREV",t[t.NEXT=1]="NEXT"}(Rt||(Rt={}));var St=function(){this.displayMonths=1,this.firstDayOfWeek=1,this.navigation="select",this.outsideDays="visible",this.showWeekdays=!0,this.showWeekNumbers=!1,this.weekdays=n.TranslationWidth.Short};function Ot(){return new Nt}St.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new St},token:St,providedIn:"root"}),St.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}];var Tt=function(){};Tt.ɵprov=e.ɵɵdefineInjectable({factory:Ot,token:Tt,providedIn:"root"}),Tt.decorators=[{type:e.Injectable,args:[{providedIn:"root",useFactory:Ot}]}];var Nt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return K(e,t),e.prototype.fromModel=function(t){return t&&u(t.year)&&u(t.month)&&u(t.day)?{year:t.year,month:t.month,day:t.day}:null},e.prototype.toModel=function(t){return t&&u(t.year)&&u(t.month)&&u(t.day)?{year:t.year,month:t.month,day:t.day}:null},e}(Tt);Nt.decorators=[{type:e.Injectable}];var Pt=function(t){this.templateRef=t};Pt.decorators=[{type:e.Directive,args:[{selector:"ng-template[ngbDatepickerContent]"}]}],Pt.ctorParameters=function(){return[{type:e.TemplateRef}]};var Mt,jt=function(){function t(t,n,r,a,s,l,p,c){var u=this;this._service=t,this._calendar=n,this.i18n=r,this._elementRef=l,this._ngbDateAdapter=p,this._ngZone=c,this._controlValue=null,this._destroyed$=new i.Subject,this._publicState={},this.navigate=new e.EventEmitter,this.dateSelect=new e.EventEmitter,this.onChange=function(t){},this.onTouched=function(){},["dayTemplate","dayTemplateData","displayMonths","firstDayOfWeek","footerTemplate","markDisabled","minDate","maxDate","navigation","outsideDays","showWeekdays","showWeekNumbers","startDate","weekdays"].forEach((function(t){return u[t]=a[t]})),t.dateSelect$.pipe(o.takeUntil(this._destroyed$)).subscribe((function(t){u.dateSelect.emit(t)})),t.model$.pipe(o.takeUntil(this._destroyed$)).subscribe((function(t){var e=t.firstDate,n=u.model?u.model.firstDate:null;u._publicState={maxDate:t.maxDate,minDate:t.minDate,firstDate:t.firstDate,lastDate:t.lastDate,focusedDate:t.focusDate,months:t.months.map((function(t){return t.firstDate}))};var i=!1;if(e.equals(n)||(u.navigate.emit({current:n?{year:n.year,month:n.month}:null,next:{year:e.year,month:e.month},preventDefault:function(){return i=!0}}),!i||null===n)){var o=t.selectedDate,r=t.focusDate,a=u.model?u.model.focusDate:null;u.model=t,bt(o,u._controlValue)&&(u._controlValue=o,u.onTouched(),u.onChange(u._ngbDateAdapter.toModel(o))),bt(r,a)&&a&&t.focusVisible&&u.focus(),s.markForCheck()}else u._service.open(n)}))}return Object.defineProperty(t.prototype,"showWeekdays",{get:function(){return this._showWeekdays},set:function(t){this.weekdays=t,this._showWeekdays=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._publicState},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"calendar",{get:function(){return this._calendar},enumerable:!1,configurable:!0}),t.prototype.focusDate=function(t){this._service.focus(ht.from(t))},t.prototype.focusSelect=function(){this._service.focusSelect()},t.prototype.focus=function(){var t=this;this._ngZone.onStable.asObservable().pipe(o.take(1)).subscribe((function(){var e=t._elementRef.nativeElement.querySelector('div.ngb-dp-day[tabindex="0"]');e&&e.focus()}))},t.prototype.navigateTo=function(t){this._service.open(ht.from(t?t.day?t:Object.assign(Object.assign({},t),{day:1}):null))},t.prototype.ngAfterViewInit=function(){var t=this;this._ngZone.runOutsideAngular((function(){var e=i.fromEvent(t._contentEl.nativeElement,"focusin"),n=i.fromEvent(t._contentEl.nativeElement,"focusout"),r=t._elementRef.nativeElement;i.merge(e,n).pipe(o.filter((function(t){var e=t.target,n=t.relatedTarget;return!(f(e,"ngb-dp-day")&&f(n,"ngb-dp-day")&&r.contains(e)&&r.contains(n))})),o.takeUntil(t._destroyed$)).subscribe((function(e){var n=e.type;return t._ngZone.run((function(){return t._service.set({focusVisible:"focusin"===n})}))}))}))},t.prototype.ngOnDestroy=function(){this._destroyed$.next()},t.prototype.ngOnInit=function(){var t=this;if(void 0===this.model){var e={};["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays","weekdays"].forEach((function(n){return e[n]=t[n]})),this._service.set(e),this.navigateTo(this.startDate)}this.dayTemplate||(this.dayTemplate=this._defaultDayTemplate)},t.prototype.ngOnChanges=function(t){var e=this,n={};if(t.showWeekdays&&(n.weekdays=this.weekdays),["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays","weekdays"].filter((function(e){return e in t})).forEach((function(t){return n[t]=e[t]})),this._service.set(n),"startDate"in t){var i=t.startDate,o=i.currentValue;_t(i.previousValue,o)&&this.navigateTo(this.startDate)}},t.prototype.onDateSelect=function(t){this._service.focus(t),this._service.