@ptsecurity/mosaic 8.5.3 → 8.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/mosaic-list.umd.js +68 -26
- package/bundles/mosaic-list.umd.js.map +1 -1
- package/bundles/mosaic-list.umd.min.js +1 -1
- package/bundles/mosaic-list.umd.min.js.map +1 -1
- package/bundles/mosaic-select.umd.js +27 -10
- package/bundles/mosaic-select.umd.js.map +1 -1
- package/bundles/mosaic-select.umd.min.js +1 -1
- package/bundles/mosaic-select.umd.min.js.map +1 -1
- package/bundles/mosaic-splitter.umd.js +12 -6
- package/bundles/mosaic-splitter.umd.js.map +1 -1
- package/bundles/mosaic-splitter.umd.min.js +1 -1
- package/bundles/mosaic-splitter.umd.min.js.map +1 -1
- package/bundles/mosaic-toggle.umd.js +4 -5
- package/bundles/mosaic-toggle.umd.js.map +1 -1
- package/bundles/mosaic-toggle.umd.min.js +1 -1
- package/bundles/mosaic-toggle.umd.min.js.map +1 -1
- package/bundles/mosaic.umd.js +112 -48
- package/bundles/mosaic.umd.js.map +1 -1
- package/bundles/mosaic.umd.min.js +9 -9
- package/bundles/mosaic.umd.min.js.map +1 -1
- package/esm2015/list.js +64 -26
- package/esm2015/list.js.map +1 -1
- package/esm2015/mosaic.js +2 -2
- package/esm2015/mosaic.js.map +1 -1
- package/esm2015/select.js +28 -11
- package/esm2015/select.js.map +1 -1
- package/esm2015/splitter.js +12 -7
- package/esm2015/splitter.js.map +1 -1
- package/esm2015/toggle.js +4 -5
- package/esm2015/toggle.js.map +1 -1
- package/esm5/list.es5.js +68 -26
- package/esm5/list.es5.js.map +1 -1
- package/esm5/mosaic.es5.js +2 -2
- package/esm5/mosaic.es5.js.map +1 -1
- package/esm5/select.es5.js +28 -11
- package/esm5/select.es5.js.map +1 -1
- package/esm5/splitter.es5.js +12 -7
- package/esm5/splitter.es5.js.map +1 -1
- package/esm5/toggle.es5.js +4 -5
- package/esm5/toggle.es5.js.map +1 -1
- package/list/typings/index.metadata.json +1 -1
- package/list/typings/list-selection.component.d.ts +13 -1
- package/package.json +3 -3
- package/select/typings/index.metadata.json +1 -1
- package/splitter/typings/splitter.component.d.ts +1 -1
- package/toggle/typings/index.metadata.json +1 -1
- package/toggle/typings/toggle.component.d.ts +1 -1
- package/typings/esm5/index.metadata.json +1 -1
- package/typings/esm5/list/index.metadata.json +1 -1
- package/typings/esm5/list/list-selection.component.d.ts +13 -1
- package/typings/esm5/select/index.metadata.json +1 -1
- package/typings/esm5/splitter/splitter.component.d.ts +1 -1
- package/typings/esm5/toggle/index.metadata.json +1 -1
- package/typings/esm5/toggle/toggle.component.d.ts +1 -1
- package/typings/index.metadata.json +1 -1
- package/typings/list/index.metadata.json +1 -1
- package/typings/list/list-selection.component.d.ts +13 -1
- package/typings/select/index.metadata.json +1 -1
- package/typings/splitter/splitter.component.d.ts +1 -1
- package/typings/toggle/index.metadata.json +1 -1
- package/typings/toggle/toggle.component.d.ts +1 -1
@@ -8,14 +8,14 @@
|
|
8
8
|
styles:[".mc-form-field{position:relative;display:inline-block;width:100%;border-radius:3px}.mc-form-field:hover{z-index:1}.mc-form-field.mc-focused{z-index:2}.mc-form-field__hint{margin-top:4px}.mc-form-field__container{position:relative;border-width:1px;border-style:solid;border-color:initial;border-radius:3px}.mc-form-field_without-borders .mc-form-field__container{border-color:transparent}.mc-form-field__prefix,.mc-form-field__suffix{position:absolute;top:0;bottom:0;width:32px;display:flex;flex-direction:row;justify-content:center;align-items:center}.mc-form-field__prefix{left:0}.mc-form-field__suffix{right:0}.mc-form-field_has-cleaner .mc-input,.mc-form-field_has-stepper .mc-input,.mc-form-field_has-suffix .mc-input{padding-right:32px}.mc-form-field_has-prefix .mc-input{padding-left:32px}.mc-form-field__cleaner .mc-cleaner{position:absolute;top:0;bottom:0;right:0}.mc-cleaner{display:flex;width:32px;height:100%;cursor:pointer}.mc-cleaner .mc-icon{display:flex;align-items:center;justify-content:center;width:100%;height:100%}mc-stepper{position:absolute;display:flex;flex-direction:column;justify-content:center;align-items:center;top:0;bottom:0;right:0;width:32px}mc-stepper .mc-stepper-step-down,mc-stepper .mc-stepper-step-up{cursor:pointer;width:32px;text-align:center}mc-stepper .mc-stepper-step-up{transform:scaleY(-1)} .mc-input{background:0 0;padding:0;margin:0;border:none;outline:0;box-sizing:border-box;padding:5px 16px;width:100%;min-height:30px}.mc-input::-ms-clear{display:none;width:0;height:0}.mc-input::-ms-reveal{display:none;width:0;height:0}.mc-input::-webkit-search-cancel-button,.mc-input::-webkit-search-decoration,.mc-input::-webkit-search-results-button,.mc-input::-webkit-search-results-decoration{display:none}.mc-input{display:inline-block}input.mc-input[type=number]{-moz-appearance:textfield}input.mc-input[type=number]::-webkit-inner-spin-button,input.mc-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}input.mc-input:invalid{box-shadow:unset} .mc-textarea{background:0 0;margin:0;border:none;outline:0;resize:none;overflow:auto;width:100%;box-sizing:border-box;padding:5px 16px}.mc-textarea{display:inline-block;-webkit-appearance:none;vertical-align:bottom}.mc-textarea:not(.mc-textarea-resizable){box-sizing:border-box;overflow-y:hidden}.mc-textarea.mc-textarea-resizable{resize:vertical;min-height:50px}.mc-textarea:invalid{box-shadow:unset}"],host:{class:"mc-form-field","[class.mc-form-field_invalid]":"control.errorState","[class.mc-disabled]":"control.disabled","[class.mc-form-field_has-prefix]":"hasPrefix","[class.mc-form-field_has-suffix]":"hasSuffix","[class.mc-form-field_has-cleaner]":"canShowCleaner","[class.mc-form-field_has-stepper]":"canShowStepper","[class.mc-focused]":"control.focused","[class.ng-untouched]":'shouldForward("untouched")',"[class.ng-touched]":'shouldForward("touched")',"[class.ng-pristine]":'shouldForward("pristine")',"[class.ng-dirty]":'shouldForward("dirty")',"[class.ng-valid]":'shouldForward("valid")',"[class.ng-invalid]":'shouldForward("invalid")',"[class.ng-pending]":'shouldForward("pending")',"(keydown)":"onKeyDown($event)","(mouseenter)":"onHoverChanged(true)","(mouseleave)":"onHoverChanged(false)"},inputs:["color"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef}]},n.propDecorators={control:[{type:t.ContentChild,args:[kt,{static:!1}]}],stepper:[{type:t.ContentChild,args:[Et,{static:!1}]}],cleaner:[{type:t.ContentChild,args:[Ot,{static:!1}]}],hint:[{type:t.ContentChildren,args:[St]}],suffix:[{type:t.ContentChildren,args:[Pt]}],prefix:[{type:t.ContentChildren,args:[Dt]}],connectionContainerRef:[{type:t.ViewChild,args:["connectionContainer",{static:!0}]}]},n}(At),Vt=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-form-field[mcFormFieldWithoutBorders]",exportAs:"mcFormFieldWithoutBorders",host:{class:"mc-form-field_without-borders"}}]}],e}(),Ft=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:[Rt,Vt,St,Dt,Pt,Ot,Et],imports:[r.CommonModule,wt],exports:[Rt,Vt,St,Dt,Pt,Ot,Et]}]}],e}(),Lt=0,Nt=function(){function e(e,t){this.source=e,this.option=t}return e}(),jt=new t.InjectionToken("mc-autocomplete-default-options",{providedIn:"root",factory:K}),Bt=function(){function e(e,n,i){this.changeDetectorRef=e,this.elementRef=n,this.id="mc-autocomplete-"+Lt++,this.showPanel=!1,this.displayWith=null,this.optionSelected=new t.EventEmitter,this.opened=new t.EventEmitter,this.closed=new t.EventEmitter,this._classList={},this._isOpen=!1,this._autoActiveFirstOption=!!i.autoActiveFirstOption}return Object.defineProperty(e.prototype,"classList",{get:function(){return this._classList},set:function(e){var t=this;e&&e.length&&(e.split(" ").forEach(function(e){return t._classList[e.trim()]=!0}),this.elementRef.nativeElement.className="")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"autoActiveFirstOption",{get:function(){return this._autoActiveFirstOption},set:function(e){this._autoActiveFirstOption=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen&&this.showPanel},set:function(e){this._isOpen=e},enumerable:!0,configurable:!0}),e.prototype.ngAfterContentInit=function(){this.keyManager=new p.ActiveDescendantKeyManager(this.options),this.setVisibility()},e.prototype.setScrollTop=function(e){this.panel&&(this.panel.nativeElement.scrollTop=e)},e.prototype.getScrollTop=function(){return this.panel?this.panel.nativeElement.scrollTop:0},e.prototype.setVisibility=function(){this.showPanel=!!this.options.length,this._classList["mc-autocomplete_visible"]=this.showPanel,this._classList["mc-autocomplete_hidden"]=!this.showPanel,this.changeDetectorRef.markForCheck()},e.prototype.emitSelectEvent=function(e){var t=new Nt(this,e);this.optionSelected.emit(t)},e.prototype.onKeydown=function(e){this.keyManager.onKeydown(e)},e.decorators=[{type:t.Component,args:[{selector:"mc-autocomplete",exportAs:"mcAutocomplete",template:'<ng-template><div class="mc-autocomplete-panel" role="listbox" [id]="id" [ngClass]="classList" #panel><ng-content></ng-content></div></ng-template>',styles:[".mc-autocomplete-trigger{text-overflow:ellipsis}.mc-autocomplete-panel{visibility:hidden;position:relative;overflow:auto;-webkit-overflow-scrolling:touch;margin-top:-1px;min-width:100%;width:100%;max-width:none;max-height:256px;border-width:1px;border-style:solid;border-bottom-left-radius:3px;border-bottom-right-radius:3px;padding:4px 0}.mc-autocomplete-panel.mc-autocomplete_visible{visibility:visible}.mc-autocomplete-panel.mc-autocomplete_hidden{visibility:hidden}.mc-autocomplete-panel-above .mc-autocomplete-panel{border-radius:0;border-top-left-radius:3px;border-top-right-radius:3px}.mc-autocomplete-panel .mc-divider-horizontal{margin-top:-1px}@media screen and (-ms-high-contrast:active){.mc-autocomplete-panel{outline:solid 1px}}"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,host:{class:"mc-autocomplete"},providers:[{provide:Ve,useExisting:e}]}]}],e.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:t.ElementRef},{type:void 0,decorators:[{type:t.Inject,args:[jt]}]}]},e.propDecorators={template:[{type:t.ViewChild,args:[t.TemplateRef,{static:!0}]}],panel:[{type:t.ViewChild,args:["panel",{static:!1}]}],options:[{type:t.ContentChildren,args:[Fe,{descendants:!0}]}],optionGroups:[{type:t.ContentChildren,args:[Te]}],displayWith:[{type:t.Input}],panelWidth:[{type:t.Input}],optionSelected:[{type:t.Output}],opened:[{type:t.Output}],closed:[{type:t.Output}],classList:[{type:t.Input,args:["class"]}],autoActiveFirstOption:[{type:t.Input}]},e}(),zt=function(){function e(e){this.elementRef=e}return e.decorators=[{type:t.Directive,args:[{selector:"[mcAutocompleteOrigin]",exportAs:"mcAutocompleteOrigin"}]}],e.ctorParameters=function(){return[{type:t.ElementRef}]},e}(),Wt=new t.InjectionToken("mc-autocomplete-scroll-strategy"),Yt={provide:Wt,deps:[c.Overlay],useFactory:U},Ht={provide:l.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return Kt}),multi:!0},Kt=function(){function e(e,t,n,i,r,a,s,c,l,p){var d=this;this.elementRef=e,this.viewContainerRef=t,this.changeDetectorRef=n,this.overlay=i,this.zone=r,this.dir=s,this.formField=c,this.document=l,this.viewportRuler=p,this.optionSelections=o.defer(function(){return d.autocomplete&&d.autocomplete.options?o.merge.apply(void 0,d.autocomplete.options.map(function(e){return e.onSelectionChange})):d.zone.onStable.asObservable().pipe(m.take(1),m.switchMap(function(){return d.optionSelections}))}),this.autocompleteAttribute="off",this._autocompleteDisabled=!1,this.overlayAttached=!1,this.componentDestroyed=!1,this.viewportSubscription=o.Subscription.EMPTY,this.canOpenOnNextFocus=!0,this.closeKeyEventStream=new o.Subject,this.onChange=function(){},this.onTouched=function(){},this.windowBlurHandler=function(){d.canOpenOnNextFocus=d.document.activeElement!==d.elementRef.nativeElement||d.panelOpen},"undefined"!=typeof window&&r.runOutsideAngular(function(){window.addEventListener("blur",d.windowBlurHandler)}),this.scrollStrategy=a}return Object.defineProperty(e.prototype,"activeOption",{get:function(){return this.autocomplete&&this.autocomplete.keyManager?this.autocomplete.keyManager.activeItem:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"panelOpen",{get:function(){return this.overlayAttached&&this.autocomplete.showPanel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"autocompleteDisabled",{get:function(){return this._autocompleteDisabled},set:function(e){this._autocompleteDisabled=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){"undefined"!=typeof window&&window.removeEventListener("blur",this.windowBlurHandler),this.viewportSubscription.unsubscribe(),this.componentDestroyed=!0,this.destroyPanel(),this.closeKeyEventStream.complete()},e.prototype.openPanel=function(){this.attachOverlay()},e.prototype.closePanel=function(){this.overlayAttached&&(this.panelOpen&&this.autocomplete.closed.emit(),this.autocomplete.isOpen=this.overlayAttached=!1,this.overlayRef&&this.overlayRef.hasAttached()&&(this.overlayRef.detach(),this.closingActionsSubscription.unsubscribe()),this.componentDestroyed||this.changeDetectorRef.detectChanges())},e.prototype.updatePosition=function(){this.overlayAttached&&this.overlayRef.updatePosition()},Object.defineProperty(e.prototype,"panelClosingActions",{get:function(){var e=this;return o.merge(this.optionSelections,this.autocomplete.keyManager.tabOut.pipe(m.filter(function(){return e.overlayAttached})),this.closeKeyEventStream,this.getOutsideClickStream(),this.overlayRef?this.overlayRef.detachments().pipe(m.filter(function(){return e.overlayAttached})):o.of()).pipe(m.map(function(e){return e instanceof Re?e:null}))},enumerable:!0,configurable:!0}),e.prototype.writeValue=function(e){var t=this;Promise.resolve(null).then(function(){return t.setTriggerValue(e)})},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this.elementRef.nativeElement.disabled=e},e.prototype.handleKeydown=function(e){var t=e.keyCode;if(t===a.ESCAPE&&e.preventDefault(),this.activeOption&&t===a.ENTER&&this.panelOpen)this.activeOption.selectViaInteraction(),this.resetActiveItem(),e.preventDefault();else if(this.autocomplete){var n=this.autocomplete.keyManager.activeItem;this.panelOpen||t===a.TAB?this.autocomplete.onKeydown(e):t===a.DOWN_ARROW&&this.canOpen()&&this.openPanel();var i=t===a.UP_ARROW||t===a.DOWN_ARROW;(i||this.autocomplete.keyManager.activeItem!==n)&&this.scrollToOption()}},e.prototype.handleInput=function(e){var t=e.target,n=t.value;"number"===t.type&&(n=""===n?null:parseFloat(n)),this.previousValue!==n&&(this.previousValue=n,this.onChange(n),this.canOpen()&&this.document.activeElement===e.target&&this.openPanel())},e.prototype.handleFocus=function(){this.canOpenOnNextFocus?this.canOpen()&&(this.previousValue=this.elementRef.nativeElement.value,this.attachOverlay()):this.canOpenOnNextFocus=!0},e.prototype.handleClick=function(e){this.canOpen()&&this.document.activeElement===e.target&&this.openPanel()},e.prototype.getOutsideClickStream=function(){var e=this;return o.merge(o.fromEvent(this.document,"click"),o.fromEvent(this.document,"touchend")).pipe(m.filter(function(t){var n=t.target,i=e.formField?e.formField._elementRef.nativeElement:null;return e.overlayAttached&&n!==e.elementRef.nativeElement&&(!i||!i.contains(n))&&!!e.overlayRef&&!e.overlayRef.overlayElement.contains(n)}))},e.prototype.scrollToOption=function(){var e=this.autocomplete.keyManager.activeItemIndex||0,t=S(e,this.autocomplete.options,this.autocomplete.optionGroups),n=D(e+t,32,this.autocomplete.getScrollTop(),256);this.autocomplete.setScrollTop(n)},e.prototype.subscribeToClosingActions=function(){var e=this,t=this.zone.onStable.asObservable().pipe(m.take(1)),n=this.autocomplete.options.changes.pipe(m.tap(function(){return e.positionStrategy.reapplyLastPosition()}),m.delay(0));return o.merge(t,n).pipe(m.switchMap(function(){var t=e.panelOpen;return e.resetActiveItem(),e.autocomplete.setVisibility(),e.panelOpen&&(e.overlayRef.updatePosition(),t!==e.panelOpen&&e.autocomplete.opened.emit()),e.panelClosingActions}),m.take(1)).subscribe(function(t){return e.setValueAndClose(t)})},e.prototype.destroyPanel=function(){this.overlayRef&&(this.closePanel(),this.overlayRef.dispose(),this.overlayRef=null)},e.prototype.setTriggerValue=function(e){var t=this.autocomplete&&this.autocomplete.displayWith?this.autocomplete.displayWith(e):e,n=null!=t?t:"";this.formField?this.formField.control.value=n:this.elementRef.nativeElement.value=n,this.previousValue=n},e.prototype.setValueAndClose=function(e){e&&e.source&&(this.clearPreviousSelectedOption(e.source),this.setTriggerValue(e.source.value),this.onChange(e.source.value),this.elementRef.nativeElement.focus(),this.autocomplete.emitSelectEvent(e.source)),this.closePanel()},e.prototype.clearPreviousSelectedOption=function(e){this.autocomplete.options.forEach(function(t){t!==e&&t.selected&&t.deselect()})},e.prototype.attachOverlay=function(){var e=this;if(!this.autocomplete)throw G();var t=this.overlayRef;if(t){t.getConfig().positionStrategy.setOrigin(this.getConnectedElement()),t.updateSize({width:this.getPanelWidth()})}else this.portal=new d.TemplatePortal(this.autocomplete.template,this.viewContainerRef),t=this.overlay.create(this.getOverlayConfig()),this.overlayRef=t,t.keydownEvents().subscribe(function(t){(t.keyCode===a.ESCAPE||t.keyCode===a.UP_ARROW&&t.altKey)&&(e.resetActiveItem(),e.closeKeyEventStream.next())}),this.viewportRuler&&(this.viewportSubscription=this.viewportRuler.change().subscribe(function(){e.panelOpen&&t&&t.updateSize({width:e.getPanelWidth()})}));t&&!t.hasAttached()&&(t.attach(this.portal),this.closingActionsSubscription=this.subscribeToClosingActions());var n=this.panelOpen;this.autocomplete.setVisibility(),this.autocomplete.isOpen=this.overlayAttached=!0,this.panelOpen&&n!==this.panelOpen&&this.autocomplete.opened.emit()},e.prototype.getOverlayConfig=function(){return new c.OverlayConfig({positionStrategy:this.getOverlayPosition(),scrollStrategy:this.scrollStrategy(),width:this.getPanelWidth(),direction:this.dir})},e.prototype.getOverlayPosition=function(){return this.positionStrategy=this.overlay.position().flexibleConnectedTo(this.getConnectedElement()).withFlexibleDimensions(!1).withPush(!1).withPositions([{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mc-autocomplete-panel-above"}]),this.positionStrategy},e.prototype.getConnectedElement=function(){return this.connectedTo?this.connectedTo.elementRef:this.formField?this.formField.getConnectedOverlayOrigin():this.elementRef},e.prototype.getPanelWidth=function(){return this.autocomplete.panelWidth||this.getHostWidth()-2},e.prototype.getHostWidth=function(){return this.getConnectedElement().nativeElement.getBoundingClientRect().width},e.prototype.resetActiveItem=function(){this.autocomplete.keyManager.setActiveItem(this.autocomplete.autoActiveFirstOption?0:-1)},e.prototype.canOpen=function(){var e=this.elementRef.nativeElement;return!e.readOnly&&!e.disabled&&!this._autocompleteDisabled},e.decorators=[{type:t.Directive,args:[{selector:"input[mcAutocomplete], textarea[mcAutocomplete]",host:{class:"mc-autocomplete-trigger","[attr.autocomplete]":"autocompleteAttribute","(focusin)":"handleFocus()","(blur)":"onTouched()","(input)":"handleInput($event)","(keydown)":"handleKeydown($event)","(click)":"handleClick($event)"},exportAs:"mcAutocompleteTrigger",providers:[Ht]}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ViewContainerRef},{type:t.ChangeDetectorRef},{type:c.Overlay},{type:t.NgZone},{type:void 0,decorators:[{type:t.Inject,args:[Wt]}]},{type:n.Directionality,decorators:[{type:t.Optional}]},{type:Rt,decorators:[{type:t.Optional},{type:t.Host}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[r.DOCUMENT]}]},{type:u.ViewportRuler}]},e.propDecorators={autocomplete:[{type:t.Input,args:["mcAutocomplete"]}],connectedTo:[{type:t.Input,args:["mcAutocompleteConnectedTo"]}],autocompleteAttribute:[{type:t.Input,args:["autocomplete"]}],autocompleteDisabled:[{type:t.Input,args:["mcAutocompleteDisabled"]}]},e}(),Ut=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[Le,c.OverlayModule,be,r.CommonModule],exports:[Bt,Le,Kt,zt,be],declarations:[Bt,Kt,zt],providers:[Yt]}]}],e}(),Gt=function(){function e(e,t){this.renderer=t,this.icons=[],this.nativeElement=e.nativeElement}return Object.defineProperty(e.prototype,"isIconButton",{get:function(){return this.icons.length>0},enumerable:!0,configurable:!0}),e.prototype.ngAfterContentInit=function(){this.icons=Array.from(this.nativeElement.querySelectorAll(".mc-icon")),this.addClassModificatorForIcons()},e.prototype.addClassModificatorForIcons=function(){var e=this.icons,t=e[0],n=e[1];if(1===this.icons.length){t.nextSibling&&8!==t.nextSibling.nodeType&&(this.renderer.addClass(t,"mc-icon_left"),this.renderer.addClass(this.nativeElement,"mc-icon-button_left")),t.previousSibling&&8!==t.previousSibling.nodeType&&(this.renderer.addClass(t,"mc-icon_right"),this.renderer.addClass(this.nativeElement,"mc-icon-button_right"))}else 2===this.icons.length&&(this.renderer.addClass(t,"mc-icon_left"),this.renderer.addClass(n,"mc-icon_right"))},e.decorators=[{type:t.Directive,args:[{selector:"button[mc-button], a[mc-button]",host:{"[class.mc-button]":"!isIconButton","[class.mc-icon-button]":"isIconButton"}}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2}]},e}(),Xt=function(){function e(e){this._elementRef=e}return e}(),qt=O(w(Xt)),$t=function(e){function n(t,n){var i=e.call(this,t)||this;return i._focusMonitor=n,i._focusMonitor.monitor(i._elementRef.nativeElement,!0),i}return v(n,e),n.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._elementRef.nativeElement)},n.prototype.focus=function(){this.getHostElement().focus()},n.prototype.getHostElement=function(){return this._elementRef.nativeElement},n.decorators=[{type:t.Component,args:[{selector:"button[mc-button]",template:'<div class="mc-button-wrapper"><ng-content></ng-content></div><div class="mc-button-overlay"></div>',styles:[".mc-button,.mc-icon-button,.mc-light-button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;position:relative;box-sizing:border-box;display:inline-block;white-space:nowrap;text-decoration:none;text-align:center;vertical-align:baseline;margin:0;border:1px solid transparent;border-radius:3px}.mc-button::-moz-focus-inner,.mc-icon-button::-moz-focus-inner,.mc-light-button::-moz-focus-inner{border:0}.mc-button:focus,.mc-icon-button:focus,.mc-light-button:focus{outline:0}.mc-button[disabled],.mc-icon-button[disabled],.mc-light-button[disabled]{pointer-events:none;cursor:default}.cdk-focused.mc-button,.cdk-focused.mc-icon-button,.cdk-focused.mc-light-button{z-index:1}.mc-button{padding:5px 15px}.mc-icon-button{padding:5px 7px}.mc-icon-button.mc-icon-button_left{padding-right:15px}.mc-icon-button.mc-icon-button_right{padding-left:15px}.mc-icon-button .mc-button-wrapper{display:flex}.mc-icon-button .mc-button-wrapper .mc-icon{margin:auto;line-height:20px}.mc-icon-button .mc-button-wrapper .mc-icon_left{margin-right:7px}.mc-icon-button .mc-button-wrapper .mc-icon_right{margin-left:7px}.mc-button-overlay{position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;pointer-events:none;border-radius:inherit}"],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,inputs:["disabled","color"],host:{"[disabled]":"disabled || null"}}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:p.FocusMonitor}]},n}(qt),Zt=function(e){function n(t,n){return e.call(this,n,t)||this}return v(n,e),n.prototype.haltDisabledEvents=function(e){this.disabled&&(e.preventDefault(),e.stopImmediatePropagation())},n.decorators=[{type:t.Component,args:[{selector:"a[mc-button]",template:'<div class="mc-button-wrapper"><ng-content></ng-content></div><div class="mc-button-overlay"></div>',styles:[".mc-button,.mc-icon-button,.mc-light-button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;position:relative;box-sizing:border-box;display:inline-block;white-space:nowrap;text-decoration:none;text-align:center;vertical-align:baseline;margin:0;border:1px solid transparent;border-radius:3px}.mc-button::-moz-focus-inner,.mc-icon-button::-moz-focus-inner,.mc-light-button::-moz-focus-inner{border:0}.mc-button:focus,.mc-icon-button:focus,.mc-light-button:focus{outline:0}.mc-button[disabled],.mc-icon-button[disabled],.mc-light-button[disabled]{pointer-events:none;cursor:default}.cdk-focused.mc-button,.cdk-focused.mc-icon-button,.cdk-focused.mc-light-button{z-index:1}.mc-button{padding:5px 15px}.mc-icon-button{padding:5px 7px}.mc-icon-button.mc-icon-button_left{padding-right:15px}.mc-icon-button.mc-icon-button_right{padding-left:15px}.mc-icon-button .mc-button-wrapper{display:flex}.mc-icon-button .mc-button-wrapper .mc-icon{margin:auto;line-height:20px}.mc-icon-button .mc-button-wrapper .mc-icon_left{margin-right:7px}.mc-icon-button .mc-button-wrapper .mc-icon_right{margin-left:7px}.mc-button-overlay{position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;pointer-events:none;border-radius:inherit}"],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,inputs:["disabled","color"],host:{"[attr.tabindex]":"disabled ? -1 : 0","[attr.disabled]":"disabled || null","(click)":"haltDisabledEvents($event)"}}]}],n.ctorParameters=function(){return[{type:p.FocusMonitor},{type:t.ElementRef}]},n}($t),Qt=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule,h.PlatformModule],exports:[$t,Zt,Gt],declarations:[$t,Zt,Gt]}]}],e}(),Jt={provide:l.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return tn}),multi:!0},en=function(){function e(e,t){this.source=e,this.value=t}return e}(),tn=function(){function e(e){this._changeDetector=e,this.valueChange=new t.EventEmitter,this.change=new t.EventEmitter,this._vertical=!1,this._multiple=!1,this._disabled=!1,this.controlValueAccessorChangeFn=function(){},this.onTouched=function(){}}return Object.defineProperty(e.prototype,"vertical",{get:function(){return this._vertical},set:function(e){this._vertical=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){var e=this.selectionModel?this.selectionModel.selected:[];return this.multiple?e.map(function(e){return e.value}):e[0]?e[0].value:void 0},set:function(e){this.setSelectionByValue(e),this.valueChange.emit(this.value)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selected",{get:function(){var e=this.selectionModel.selected;return this.multiple?e:e[0]||null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"multiple",{get:function(){return this._multiple},set:function(e){this._multiple=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e),this.buttonToggles&&this.buttonToggles.forEach(function(e){return e.markForCheck()})},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.selectionModel=new g.SelectionModel(this.multiple,void 0,!1)},e.prototype.ngAfterContentInit=function(){var e;(e=this.selectionModel).select.apply(e,this.buttonToggles.filter(function(e){return e.checked})),this.disabled=this._disabled},e.prototype.writeValue=function(e){this.value=e,this._changeDetector.markForCheck()},e.prototype.registerOnChange=function(e){this.controlValueAccessorChangeFn=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.emitChangeEvent=function(){var e=this.selected,t=Array.isArray(e)?e[e.length-1]:e,n=new en(t,this.value);this.controlValueAccessorChangeFn(n.value),this.change.emit(n)},e.prototype.syncButtonToggle=function(e,t,n){void 0===n&&(n=!1),this.multiple||!this.selected||e.checked||(this.selected.checked=!1),t?this.selectionModel.select(e):this.selectionModel.deselect(e),n&&this.emitChangeEvent(),this.valueChange.emit(this.value)},e.prototype.isSelected=function(e){return this.selectionModel.isSelected(e)},e.prototype.isPrechecked=function(e){return void 0!==this.rawValue&&(this.multiple&&Array.isArray(this.rawValue)?this.rawValue.some(function(t){return null!=e.value&&t===e.value}):e.value===this.rawValue)},e.prototype.setSelectionByValue=function(e){var t=this;if(this.rawValue=e,this.buttonToggles)if(this.multiple&&e){if(!Array.isArray(e))throw Error("Value must be an array in multiple-selection mode.");this.clearSelection(),e.forEach(function(e){return t.selectValue(e)})}else this.clearSelection(),this.selectValue(e)},e.prototype.clearSelection=function(){this.selectionModel.clear(),this.buttonToggles.forEach(function(e){return e.checked=!1})},e.prototype.selectValue=function(e){var t=this.buttonToggles.find(function(t){return null!=t.value&&t.value===e});t&&(t.checked=!0,this.selectionModel.select(t))},e.decorators=[{type:t.Directive,args:[{selector:"mc-button-toggle-group",providers:[Jt],host:{role:"group",class:"mc-button-toggle-group","[class.mc-button-toggle-vertical]":"vertical"},exportAs:"mcButtonToggleGroup"}]}],e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},e.propDecorators={vertical:[{type:t.Input}],value:[{type:t.Input}],multiple:[{type:t.Input}],buttonToggles:[{type:t.ContentChildren,args:[t.forwardRef(function(){return nn})]}],disabled:[{type:t.Input}],valueChange:[{type:t.Output}],change:[{type:t.Output}]},e}(),nn=function(){function e(e,n,i,o){this.buttonToggleGroup=e,this.changeDetectorRef=n,this.focusMonitor=i,this.element=o,this.change=new t.EventEmitter,this.isSingleSelector=!1,this._checked=!1,this._disabled=!1}return Object.defineProperty(e.prototype,"checked",{get:function(){return this.buttonToggleGroup?this.buttonToggleGroup.isSelected(this):this._checked},set:function(e){var t=i.coerceBooleanProperty(e);t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&this.buttonToggleGroup.syncButtonToggle(this,this._checked),this.changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.isSingleSelector=this.buttonToggleGroup&&!this.buttonToggleGroup.multiple,this.type=this.isSingleSelector?"radio":"checkbox",this.buttonToggleGroup&&this.buttonToggleGroup.isPrechecked(this)&&(this.checked=!0),this.focusMonitor.monitor(this.element.nativeElement,!0)},e.prototype.ngOnDestroy=function(){var e=this,t=this.buttonToggleGroup;this.focusMonitor.stopMonitoring(this.element.nativeElement),t&&t.isSelected(this)&&Promise.resolve().then(function(){return t.syncButtonToggle(e,!1)})},e.prototype.focus=function(){this.element.nativeElement.focus()},e.prototype.onToggleClick=function(){if(!this.disabled){var e=!!this.isSingleSelector||!this._checked;e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&(this.buttonToggleGroup.syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup.onTouched())),this.change.emit(new en(this,this.value))}},e.prototype.markForCheck=function(){this.changeDetectorRef.markForCheck()},e.decorators=[{type:t.Component,args:[{selector:"mc-button-toggle",template:'\n <button\n mc-button\n type="button"\n [disabled]="disabled"\n [attr.tabindex]="disabled ? -1 : tabIndex"\n (click)="onToggleClick()">\n <ng-content></ng-content>\n </button>\n ',
|
9
9
|
styles:[".mc-group{display:flex;flex-direction:row}.mc-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-group .mc-group-item+.mc-group-item{margin-left:-1px}.mc-group_justified>.mc-group-item{width:100%}.mc-vertical-group{display:flex;flex-direction:column}.mc-vertical-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:3px}.mc-vertical-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.mc-vertical-group>.mc-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:3px}.mc-vertical-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group .mc-group-item+.mc-group-item{margin-top:-1px}.mc-button-toggle-group{display:flex;flex-direction:row}.mc-button-toggle-group:not(.mc-button-toggle-vertical) .mc-button-toggle:not([disabled])+.mc-button-toggle:not([disabled]){margin-left:-1px}.mc-button-toggle-group .mc-button-toggle:first-of-type:not(:last-of-type)>.mc-button,.mc-button-toggle-group .mc-button-toggle:first-of-type:not(:last-of-type)>.mc-icon-button{border-bottom-right-radius:0;border-top-right-radius:0}.mc-button-toggle-group .mc-button-toggle:last-of-type:not(:first-of-type)>.mc-button,.mc-button-toggle-group .mc-button-toggle:last-of-type:not(:first-of-type)>.mc-icon-button{border-bottom-left-radius:0;border-top-left-radius:0}.mc-button-toggle-group .mc-button-toggle:not(:first-of-type):not(:last-of-type)>.mc-button,.mc-button-toggle-group .mc-button-toggle:not(:first-of-type):not(:last-of-type)>.mc-icon-button{border-radius:0}.mc-button-toggle-vertical{flex-direction:column}.mc-button-toggle-vertical .mc-button-toggle:not([disabled])+.mc-button-toggle:not([disabled]){margin-top:-1px}.mc-button-toggle-vertical .mc-button-toggle .mc-button,.mc-button-toggle-vertical .mc-button-toggle .mc-icon-button{width:100%}.mc-button-toggle-vertical .mc-button-toggle:first-child:not(:last-child)>.mc-button,.mc-button-toggle-vertical .mc-button-toggle:first-child:not(:last-child)>.mc-icon-button{border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:3px}.mc-button-toggle-vertical .mc-button-toggle:last-child:not(:first-child)>.mc-button,.mc-button-toggle-vertical .mc-button-toggle:last-child:not(:first-child)>.mc-icon-button{border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:3px}.mc-button-toggle-vertical .mc-button-toggle:not(:first-child):not(:last-child)>.mc-button,.mc-button-toggle-vertical .mc-button-toggle:not(:first-child):not(:last-child)>.mc-icon-button{border-radius:0}"],encapsulation:t.ViewEncapsulation.None,exportAs:"mcButtonToggle",changeDetection:t.ChangeDetectionStrategy.OnPush,host:{"[class.mc-button-toggle-standalone]":"!buttonToggleGroup","[class.mc-button-toggle-checked]":"checked",class:"mc-button-toggle","[attr.tabindex]":"-1","[attr.disabled]":"disabled || null","(focus)":"focus()"}}]}],e.ctorParameters=function(){return[{type:tn,decorators:[{type:t.Optional}]},{type:t.ChangeDetectorRef},{type:p.FocusMonitor},{type:t.ElementRef}]},e.propDecorators={checked:[{type:t.Input}],mcButton:[{type:t.ViewChild,args:[$t,{static:!1}]}],value:[{type:t.Input}],tabIndex:[{type:t.Input}],disabled:[{type:t.Input}],change:[{type:t.Output}]},e}(),on=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[be,Qt],exports:[be,tn,nn],declarations:[tn,nn]}]}],e}(),rn=function(){function e(e,n){this._elementRef=e,this._focusMonitor=n,this.readonly=!1,this.selected=!1,this.selectedChange=new t.EventEmitter,this._tabIndex=0,this._focusMonitor.monitor(this._elementRef.nativeElement,!1)}return Object.defineProperty(e.prototype,"tabIndex",{get:function(){return this.readonly?null:this._tabIndex},set:function(e){this._tabIndex=e},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._elementRef.nativeElement)},e.prototype.focus=function(){this.hostElement.focus()},e.prototype.onClick=function(e){this.readonly||(e.stopPropagation(),this.selectedChange.emit(!this.selected))},Object.defineProperty(e.prototype,"hostElement",{get:function(){return this._elementRef.nativeElement},enumerable:!0,configurable:!0}),e.prototype.onKeyDown=function(e){switch(e.keyCode){case a.SPACE:this.readonly||(e.preventDefault(),this.selectedChange.emit(!this.selected))}},e.decorators=[{type:t.Component,args:[{selector:"mc-card",template:'<ng-content></ng-content><div class="mc-card__overlay"></div>',styles:[".mc-card{position:relative;box-sizing:border-box;display:flex;flex-direction:column;cursor:pointer;border-left-width:4px;border-left-style:solid;border-left-color:transparent}.mc-card:focus{outline:0}.mc-card .mc-card__overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;background:0 0}.mc-card.mc-card_readonly{cursor:auto}"],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,inputs:["color"],host:{class:"mc-card","[class.mc-card_readonly]":"readonly","[class.mc-card_selected]":"selected","(keydown)":"onKeyDown($event)","(click)":"onClick($event)"}}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:p.FocusMonitor}]},e.propDecorators={tabIndex:[{type:t.HostBinding,args:["attr.tabIndex"]},{type:t.Input}],readonly:[{type:t.Input}],selected:[{type:t.Input}],selectedChange:[{type:t.Output}]},e}(),an=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule,h.PlatformModule],exports:[rn],declarations:[rn]}]}],e}(),sn=new t.InjectionToken("mc-checkbox-click-action"),cn=0,ln={provide:l.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return mn}),multi:!0},pn={Init:0,Checked:1,Unchecked:2,Indeterminate:3};pn[pn.Init]="Init",pn[pn.Checked]="Checked",pn[pn.Unchecked]="Unchecked",pn[pn.Indeterminate]="Indeterminate";var dn=function(){function e(){}return e}(),un=function(){function e(e){this._elementRef=e}return e}(),hn=k(O(w(un))),mn=function(e){function n(n,i,o,r,a){var s=e.call(this,n)||this;return s._changeDetectorRef=i,s._focusMonitor=o,s._clickAction=a,s.ariaLabel="",s.ariaLabelledby=null,s.labelPosition="after",s.name=null,s.change=new t.EventEmitter,s.indeterminateChange=new t.EventEmitter,s.uniqueId="mc-checkbox-"+ ++cn,s.currentAnimationClass="",s.currentCheckState=pn.Init,s.onTouched=function(){},s._checked=!1,s._disabled=!1,s._indeterminate=!1,s.controlValueAccessorChangeFn=function(){},s.tabIndex=parseInt(r)||0,s.id=s.uniqueId,s}return v(n,e),Object.defineProperty(n.prototype,"inputId",{get:function(){return(this.id||this.uniqueId)+"-input"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"required",{get:function(){return this._required},set:function(e){this._required=_(e)},enumerable:!0,configurable:!0}),n.prototype.ngAfterViewInit=function(){var e=this;this._focusMonitor.monitor(this.inputElement.nativeElement).subscribe(function(t){return e.onInputFocusChange(t)})},n.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this.inputElement.nativeElement)},Object.defineProperty(n.prototype,"checked",{get:function(){return this._checked},set:function(e){e!==this.checked&&(this._checked=e,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled},set:function(e){e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"indeterminate",{get:function(){return this._indeterminate},set:function(e){var t=e!==this._indeterminate;this._indeterminate=e,t&&(this._indeterminate?this.transitionCheckState(pn.Indeterminate):this.transitionCheckState(this.checked?pn.Checked:pn.Unchecked),this.indeterminateChange.emit(this._indeterminate))},enumerable:!0,configurable:!0}),n.prototype.onLabelTextChange=function(){this._changeDetectorRef.markForCheck()},n.prototype.writeValue=function(e){this.checked=!!e},n.prototype.registerOnChange=function(e){this.controlValueAccessorChangeFn=e},n.prototype.registerOnTouched=function(e){this.onTouched=e},n.prototype.setDisabledState=function(e){this.disabled=e},n.prototype.getAriaChecked=function(){return this.checked?"true":this.indeterminate?"mixed":"false"},n.prototype.toggle=function(){this.checked=!this.checked},n.prototype.onInputClick=function(e){var t=this;e.stopPropagation(),this.disabled||"noop"===this._clickAction?this.disabled||"noop"!==this._clickAction||(this.inputElement.nativeElement.checked=this.checked,this.inputElement.nativeElement.indeterminate=this.indeterminate):(this.indeterminate&&"check"!==this._clickAction&&Promise.resolve().then(function(){t._indeterminate=!1,t.indeterminateChange.emit(t._indeterminate)}),this.toggle(),this.transitionCheckState(this._checked?pn.Checked:pn.Unchecked),this.emitChangeEvent())},n.prototype.focus=function(){this._focusMonitor.focusVia(this.inputElement.nativeElement,"keyboard")},n.prototype.onInteractionEvent=function(e){e.stopPropagation()},n.prototype.transitionCheckState=function(e){var t=this.currentCheckState,n=this._elementRef.nativeElement;t!==e&&(this.currentAnimationClass.length>0&&n.classList.remove(this.currentAnimationClass),this.currentCheckState=e,this.currentAnimationClass.length>0&&n.classList.add(this.currentAnimationClass))},n.prototype.emitChangeEvent=function(){var e=new dn;e.source=this,e.checked=this.checked,this.controlValueAccessorChangeFn(this.checked),this.change.emit(e)},n.prototype.onInputFocusChange=function(e){e&&this.onTouched()},n.decorators=[{type:t.Component,args:[{selector:"mc-checkbox",template:'<label [attr.for]="inputId" class="mc-checkbox-layout" #label><div class="mc-checkbox-inner-container" [class.mc-checkbox-inner-container-no-side-margin]="!checkboxLabel.textContent || !checkboxLabel.textContent.trim()"><input #input type="checkbox" class="mc-checkbox-input cdk-visually-hidden" [id]="inputId" [required]="required" [checked]="checked" [attr.value]="value" [disabled]="disabled" [attr.name]="name" [tabIndex]="tabIndex" [indeterminate]="indeterminate" [attr.aria-label]="ariaLabel || null" [attr.aria-labelledby]="ariaLabelledby" [attr.aria-checked]="getAriaChecked()" (change)="onInteractionEvent($event)" (click)="onInputClick($event)"><div class="mc-checkbox-frame"><i class="mc-checkbox-checkmark mc mc-check_16"></i> <i class="mc-checkbox-mixedmark mc mc-minus_16"></i></div></div><span class="mc-checkbox-label" #checkboxLabel (cdkObserveContent)="onLabelTextChange()"><ng-content></ng-content></span></label>',styles:[".mc-checkbox-frame{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:3px;box-sizing:border-box;pointer-events:none}.mc-checkbox{display:inline-block;cursor:pointer;-webkit-tap-highlight-color:transparent}.mc-checkbox.mc-checked .mc-checkbox-checkmark{display:block}.mc-checkbox.mc-checked .mc-checkbox-mixedmark{display:none}.mc-checkbox.mc-indeterminate .mc-checkbox-checkmark{display:none}.mc-checkbox.mc-indeterminate .mc-checkbox-mixedmark{display:block}.mc-checkbox.mc-disabled{cursor:default}.mc-checkbox.mc-disabled .mc-checkbox-frame{box-shadow:none}.mc-checkbox-layout{cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap;width:100%}.mc-checkbox-inner-container{display:inline-block;height:16px;line-height:0;margin-right:8px;order:0;position:relative;align-self:center;white-space:nowrap;width:16px;flex-shrink:0}[dir=rtl] .mc-checkbox-inner-container{margin-left:8px;margin-right:auto}.mc-checkbox-inner-container-no-side-margin{margin-left:0;margin-right:0}.mc-checkbox-frame{background-color:transparent;border-width:1px;border-style:solid;box-shadow:inset 0 0 1px 0 rgba(0,0,0,.2)}.mc-checkbox-checkmark,.mc-checkbox-mixedmark{display:none;position:absolute;top:-1px;left:-1px;right:0;bottom:0}.mc-checkbox-label-before .mc-checkbox-inner-container{order:1;margin-left:8px;margin-right:auto}[dir=rtl] .mc-checkbox-label-before .mc-checkbox-inner-container{margin-left:auto;margin-right:8px}"],exportAs:"mcCheckbox",host:{class:"mc-checkbox","[id]":"id","[attr.id]":"id","[class.mc-indeterminate]":"indeterminate","[class.mc-checked]":"checked","[class.mc-disabled]":"disabled","[class.mc-checkbox-label-before]":'labelPosition == "before"'},providers:[ln],inputs:["color","tabIndex"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:p.FocusMonitor},{type:String,decorators:[{type:t.Attribute,args:["tabindex"]}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[sn]}]}]},n.propDecorators={ariaLabel:[{type:t.Input,args:["aria-label"]}],ariaLabelledby:[{type:t.Input,args:["aria-labelledby"]}],id:[{type:t.Input}],labelPosition:[{type:t.Input}],name:[{type:t.Input}],change:[{type:t.Output}],indeterminateChange:[{type:t.Output}],value:[{type:t.Input}],inputElement:[{type:t.ViewChild,args:["input",{static:!1}]}],required:[{type:t.Input}],checked:[{type:t.Input}],disabled:[{type:t.Input}],indeterminate:[{type:t.Input}]},n}(hn),gn={provide:l.NG_VALIDATORS,useExisting:t.forwardRef(function(){return fn}),multi:!0},fn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return v(n,e),n.decorators=[{type:t.Directive,args:[{selector:"mc-checkbox[required][formControlName],\n mc-checkbox[required][formControl], mc-checkbox[required][ngModel]",providers:[gn],host:{"[attr.required]":'required ? "" : null'}}]}],n}(l.CheckboxRequiredValidator),yn=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule],exports:[mn,fn],declarations:[mn,fn]}]}],e}(),bn=10,vn=1,Cn=function(){function e(e,t,n,i,r,a,s){this.platform=e,this.elementRef=t,this.ngControl=n,this.focused=!1,this.stateChanges=new o.Subject,this.step=Q(i)?parseFloat(i):vn,this.bigStep=Q(r)?parseFloat(r):bn,this.min=Q(a)?parseFloat(a):-1/0,this.max=Q(s)?parseFloat(s):1/0,"valueAsNumber"in this.nativeElement&&Object.defineProperty(Object.getPrototypeOf(this.nativeElement),"valueAsNumber",{get:function(){var e=parseFloat(q(this.value));return isNaN(e)?null:e}})}return Object.defineProperty(e.prototype,"nativeElement",{get:function(){return this.elementRef.nativeElement},enumerable:!0,configurable:!0}),e.prototype.focusChanged=function(e){e!==this.focused&&(this.focused=e,this.stateChanges.next())},e.prototype.onKeyDown=function(e){var t=this,n=e.keyCode,i=function(e){return"."===e.key||"Decimal"===e.key},o=function(e){return"."===e.key||","===e.key},r=[a.NUMPAD_MINUS,a.DASH,a.FF_MINUS],s=[a.DELETE,a.BACKSPACE,a.TAB,a.ESCAPE,a.ENTER],c=[a.LEFT_ARROW,a.RIGHT_ARROW],l=[a.HOME,a.END].concat(c).concat(s).concat(r);if(!(-1!==l.indexOf(n)||function(e){return e.keyCode===a.A&&(e.ctrlKey||e.metaKey)}(e)||function(e){return e.keyCode===a.C&&(e.ctrlKey||e.metaKey)}(e)||function(e){return e.keyCode===a.V&&(e.ctrlKey||e.metaKey)}(e)||function(e){return e.keyCode===a.X&&(e.ctrlKey||e.metaKey)}(e)||function(e){return e.keyCode===a.Z&&(e.ctrlKey||e.metaKey)}(e)||function(e){return e.keyCode>=a.F1&&e.keyCode<=a.F12}(e)||function(e){return t.platform.EDGE||t.platform.TRIDENT?i(e):o(e)}(e))&&(e.shiftKey||!function(e){return e.keyCode>=a.ZERO&&e.keyCode<=a.NINE||e.keyCode>=a.NUMPAD_ZERO&&e.keyCode<=a.NUMPAD_NINE}(e))){e.preventDefault();var p=e.shiftKey?this.bigStep:this.step;n===a.UP_ARROW&&this.stepUp(p),n===a.DOWN_ARROW&&this.stepDown(p)}},e.prototype.onPaste=function(e){Q(q(e.clipboardData.getData("text")))||e.preventDefault()},e.prototype.stepUp=function(e){this.elementRef.nativeElement.focus();var t=Math.max(Math.min(ee(this.nativeElement.valueAsNumber||0,e),this.max),this.min);this.nativeElement.value=t.toString(),this.viewToModelUpdate(this.nativeElement.valueAsNumber)},e.prototype.stepDown=function(e){this.elementRef.nativeElement.focus();var t=Math.min(Math.max(ee(this.nativeElement.valueAsNumber||0,-e),this.min),this.max);this.nativeElement.value=t.toString(),this.viewToModelUpdate(this.nativeElement.valueAsNumber)},e.prototype.viewToModelUpdate=function(e){this.ngControl&&this.ngControl.control.setValue(e)},e.decorators=[{type:t.Directive,args:[{selector:'input[mcInput][type="number"]',exportAs:"mcNumericalInput",host:{"(blur)":"focusChanged(false)","(focus)":"focusChanged(true)","(paste)":"onPaste($event)","(keydown)":"onKeyDown($event)"}}]}],e.ctorParameters=function(){return[{type:h.Platform},{type:t.ElementRef},{type:l.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:String,decorators:[{type:t.Attribute,args:["step"]}]},{type:String,decorators:[{type:t.Attribute,args:["big-step"]}]},{type:String,decorators:[{type:t.Attribute,args:["min"]}]},{type:String,decorators:[{type:t.Attribute,args:["max"]}]}]},e.propDecorators={bigStep:[{type:t.Input}],step:[{type:t.Input}],min:[{type:t.Input}],max:[{type:t.Input}]},e}(),_n=new t.InjectionToken("MC_INPUT_VALUE_ACCESSOR"),xn=["button","checkbox","file","hidden","image","radio","range","reset","submit"],wn=0,On=function(){function e(e,t,n,i){this.defaultErrorStateMatcher=e,this.parentForm=t,this.parentFormGroup=n,this.ngControl=i}return e}(),kn=I(On),In=function(e){function n(t,n,i,r,a,s,c,l,p,d,u){var m=e.call(this,d,l,p,r)||this;return m.elementRef=t,m.rawValidators=n,m.mcValidation=i,m.numberInput=a,m.ngModel=s,m.formControlName=c,m.focused=!1,m.stateChanges=new o.Subject,m.controlType="mc-input",m.uid="mc-input-"+wn++,m.neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(function(e){return h.getSupportedInputTypes().has(e)}),m._disabled=!1,m._required=!1,m._type="text",m._inputValueAccessor=u||m.elementRef.nativeElement,m.previousNativeValue=m.value,m.id=m.id,m}return v(n,e),Object.defineProperty(n.prototype,"disabled",{get:function(){return this.ngControl&&null!==this.ngControl.disabled?this.ngControl.disabled:this._disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e),this.focused&&(this.focused=!1,this.stateChanges.next())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"id",{get:function(){return this._id},set:function(e){this._id=e||this.uid},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"required",{get:function(){return this._required},set:function(e){this._required=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"type",{get:function(){return this._type},set:function(e){this._type=e||"text",this.validateType(),h.getSupportedInputTypes().has(this._type)&&(this.elementRef.nativeElement.type=this._type)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._inputValueAccessor.value},set:function(e){e!==this.value&&(this._inputValueAccessor.value=e,this.stateChanges.next())},enumerable:!0,configurable:!0}),n.prototype.ngAfterContentInit=function(){this.ngControl&&this.mcValidation.useValidation&&B(this)},n.prototype.ngOnChanges=function(){this.stateChanges.next()},n.prototype.ngOnDestroy=function(){this.stateChanges.complete()},n.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState(),this.dirtyCheckNativeValue()},n.prototype.focus=function(){this.elementRef.nativeElement.focus()},n.prototype.onBlur=function(){if(this.focusChanged(!1),this.ngControl&&this.ngControl.control){var e=this.ngControl.control;e.updateValueAndValidity({emitEvent:!1}),e.statusChanges.emit(e.status)}},n.prototype.focusChanged=function(e){e!==this.focused&&(this.focused=e,this.stateChanges.next())},n.prototype.onInput=function(){},Object.defineProperty(n.prototype,"empty",{get:function(){return!this.isNeverEmpty()&&!this.elementRef.nativeElement.value&&!this.isBadInput()},enumerable:!0,configurable:!0}),n.prototype.onContainerClick=function(){this.focus()},n.prototype.dirtyCheckNativeValue=function(){var e=this.value;this.previousNativeValue!==e&&(this.previousNativeValue=e,this.stateChanges.next())},n.prototype.validateType=function(){if(xn.indexOf(this._type)>-1)throw X(this._type)},n.prototype.isNeverEmpty=function(){return this.neverEmptyInputTypes.indexOf(this._type)>-1},n.prototype.isBadInput=function(){var e=this.elementRef.nativeElement.validity;return e&&e.badInput},n.decorators=[{type:t.Directive,args:[{selector:"input[mcInput]",exportAs:"mcInput",host:{class:"mc-input","[attr.id]":"id","[attr.placeholder]":"placeholder","[disabled]":"disabled","[required]":"required","(blur)":"onBlur()","(focus)":"focusChanged(true)","(input)":"onInput()"},providers:[{provide:kt,useExisting:n}]}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[l.NG_VALIDATORS]}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[bt]}]},{type:l.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:Cn,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.NgModel,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.FormControlName,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.NgForm,decorators:[{type:t.Optional}]},{type:l.FormGroupDirective,decorators:[{type:t.Optional}]},{type:Oe},{type:void 0,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[_n]}]}]},n.propDecorators={errorStateMatcher:[{type:t.Input}],placeholder:[{type:t.Input}],disabled:[{type:t.Input}],id:[{type:t.Input}],required:[{type:t.Input}],type:[{type:t.Input}],value:[{type:t.Input}]},n}(kn),Sn=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"input[mcInputMonospace]",exportAs:"McInputMonospace",host:{class:"mc-input_monospace"}}]}],e}(),Dn={provide:l.NG_VALIDATORS,useExisting:t.forwardRef(function(){return En}),multi:!0},En=function(){function e(){}return e.prototype.ngOnChanges=function(e){"min"in e&&(this.createValidator(),this.onChange&&this.onChange())},e.prototype.validate=function(e){return this.validator(e)},e.prototype.registerOnValidatorChange=function(e){this.onChange=e},e.prototype.createValidator=function(){this.validator=l.Validators.min(parseInt(this.min,10))},e.decorators=[{type:t.Directive,args:[{selector:"[min][formControlName],[min][formControl],[min][ngModel]",providers:[Dn],host:{"[attr.min]":"min ? min : null"}}]}],e.propDecorators={min:[{type:t.Input}]},e}(),Pn={provide:l.NG_VALIDATORS,useExisting:t.forwardRef(function(){return Mn}),multi:!0},Mn=function(){function e(){}return e.prototype.ngOnChanges=function(e){"max"in e&&(this.createValidator(),this.onChange&&this.onChange())},e.prototype.validate=function(e){return this.validator(e)},e.prototype.registerOnValidatorChange=function(e){this.onChange=e},e.prototype.createValidator=function(){this.validator=l.Validators.max(parseInt(this.max,10))},e.decorators=[{type:t.Directive,args:[{selector:"[max][formControlName],[max][formControl],[max][ngModel]",providers:[Pn],host:{"[attr.max]":"max ? max : null"}}]}],e.propDecorators={max:[{type:t.Input}]},e}(),Tn=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule,be,l.FormsModule],exports:[In,Cn,Sn,En,Mn],declarations:[In,Cn,Sn,En,Mn]}]}],e}(),An=function(){function e(){this.changes=new o.Subject,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 20 years",this.nextMultiYearLabel="Next 20 years",this.switchToMonthViewLabel="Choose date",this.switchToMultiYearViewLabel="Choose month and year"}return e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ngInjectableDef=t["ɵɵdefineInjectable"]({factory:function(){return new e},token:e,providedIn:"root"}),e}(),Rn=function(){function e(e,t,n,i,o){this.value=e,this.displayValue=t,this.ariaLabel=n,this.enabled=i,this.cssClasses=o}return e}(),Vn=function(){function e(e,n){this.elementRef=e,this.ngZone=n,this.numCols=7,this.activeCell=0,this.cellAspectRatio=1,this.selectedValueChange=new t.EventEmitter}return e.prototype.cellClicked=function(e){e.enabled&&this.selectedValueChange.emit(e.value)},e.prototype.ngOnChanges=function(e){var t=e.numCols,n=this,i=n.rows,o=n.numCols;(e.rows||t)&&(this.firstRowOffset=i&&i.length&&i[0].length?o-i[0].length:0),(e.cellAspectRatio||t||!this.cellPadding)&&(this.cellPadding=50*this.cellAspectRatio/o+"%"),!t&&this.cellWidth||(this.cellWidth=100/o+"%")},e.prototype.isActiveCell=function(e,t){var n=e*this.numCols+t;return e&&(n-=this.firstRowOffset),n===this.activeCell},e.prototype.focusActiveCell=function(){var e=this;this.ngZone.runOutsideAngular(function(){e.ngZone.onStable.asObservable().pipe(m.take(1)).subscribe(function(){var t=e.elementRef.nativeElement.querySelector(".mc-calendar__body_active");t&&t.focus()})})},e.decorators=[{type:t.Component,args:[{selector:"[mc-calendar-body]",template:'<tr *ngIf="firstRowOffset < labelMinRequiredCells" aria-hidden="true"><td class="mc-calendar__body-label" [attr.colspan]="numCols" [style.paddingTop]="cellPadding" [style.paddingBottom]="cellPadding">{{label}}</td></tr><tr *ngFor="let row of rows; let rowIndex = index" role="row"><td *ngIf="rowIndex === 0 && firstRowOffset" aria-hidden="true" class="mc-calendar__body-label" [attr.colspan]="firstRowOffset" [style.paddingTop]="cellPadding" [style.paddingBottom]="cellPadding">{{firstRowOffset >= labelMinRequiredCells ? label : \'\'}}</td><td *ngFor="let item of row; let colIndex = index" role="gridcell" class="mc-calendar__body-cell" [ngClass]="item.cssClasses" [tabindex]="isActiveCell(rowIndex, colIndex) ? 0 : -1" [class.mc-calendar__body_disabled]="!item.enabled" [class.mc-calendar__body_active]="isActiveCell(rowIndex, colIndex)" [attr.aria-label]="item.ariaLabel" [attr.aria-disabled]="!item.enabled || null" [attr.aria-selected]="selectedValue === item.value" (click)="cellClicked(item)" [style.width]="cellWidth" [style.paddingTop]="cellPadding" [style.paddingBottom]="cellPadding"><div class="mc-calendar__body-cell-content" [class.mc-calendar__body_selected]="selectedValue === item.value" [class.mc-calendar__body-today]="todayValue === item.value">{{item.displayValue}}</div></td></tr>',styles:[".mc-calendar__body{min-width:224px}.mc-calendar__body-label{height:0;line-height:0;text-align:left;padding-left:4.71429%;padding-right:4.71429%}.mc-calendar__body-cell{position:relative;height:0;line-height:0;text-align:center;outline:0;cursor:pointer}.mc-calendar__body_disabled{cursor:default}.mc-calendar__body-cell-content{position:absolute;top:5%;left:5%;padding:8px;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid}@media screen and (-ms-high-contrast:active){.mc-calendar__body-cell-content{border:none}}mc-month-view .mc-calendar__body-cell-content{justify-content:flex-end}mc-multi-year-view .mc-calendar__body-cell-content,mc-year-view .mc-calendar__body-cell-content{justify-content:center}@media screen and (-ms-high-contrast:active){.mc-calendar__body_selected,.mc-datepicker__popup:not(:empty){outline:solid 1px}.mc-calendar__body-today{outline:dotted 1px}}[dir=rtl] .mc-calendar__body-label{text-align:right}"],host:{class:"mc-calendar__body",role:"grid","aria-readonly":"true"},exportAs:"mcCalendarBody",encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.NgZone}]},e.propDecorators={label:[{type:t.Input}],rows:[{type:t.Input}],todayValue:[{type:t.Input}],selectedValue:[{type:t.Input}],labelMinRequiredCells:[{type:t.Input}],numCols:[{type:t.Input}],activeCell:[{type:t.Input}],cellAspectRatio:[{type:t.Input}],selectedValueChange:[{type:t.Output}]},e}(),Fn=function(){function e(e,n,i,o){if(this.changeDetectorRef=e,this.dateFormats=n,this.dateAdapter=i,this.dir=o,this.selectedChange=new t.EventEmitter,this.userSelection=new t.EventEmitter,this.activeDateChange=new t.EventEmitter,!this.dateAdapter)throw te("DateAdapter");if(!this.dateFormats)throw te("MC_DATE_FORMATS");var r=this.dateAdapter.getFirstDayOfWeek(),a=this.dateAdapter.getDayOfWeekNames("narrow"),s=this.dateAdapter.getDayOfWeekNames("long"),c=s.map(function(e,t){return{long:e,narrow:a[t]}});this.weekdays=c.slice(r).concat(c.slice(0,r)),this._activeDate=this.dateAdapter.today()}return Object.defineProperty(e.prototype,"activeDate",{get:function(){return this._activeDate},set:function(e){var t=this._activeDate,n=this.getValidDateOrNull(this.dateAdapter.deserialize(e))||this.dateAdapter.today();this._activeDate=this.dateAdapter.clampDate(n,this.minDate,this.maxDate),this.hasSameMonthAndYear(t,this._activeDate)||this.init()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selected",{get:function(){return this._selected},set:function(e){this._selected=this.getValidDateOrNull(this.dateAdapter.deserialize(e)),this.selectedDate=this.getDateInCurrentMonth(this._selected)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minDate",{get:function(){return this._minDate},set:function(e){this._minDate=this.getValidDateOrNull(this.dateAdapter.deserialize(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxDate",{get:function(){return this._maxDate},set:function(e){this._maxDate=this.getValidDateOrNull(this.dateAdapter.deserialize(e))},enumerable:!0,configurable:!0}),e.prototype.ngAfterContentInit=function(){this.init()},e.prototype.dateSelected=function(e){if(this.selectedDate!==e){var t=this.dateAdapter.getYear(this.activeDate),n=this.dateAdapter.getMonth(this.activeDate),i=this.dateAdapter.createDate(t,n,e);this.selectedChange.emit(i)}this.userSelection.emit()},e.prototype.handleCalendarBodyKeydown=function(e){var t=this._activeDate,n=this.isRtl();switch(e.keyCode){case a.LEFT_ARROW:this.activeDate=this.dateAdapter.addCalendarDays(this._activeDate,n?1:-1);break;case a.RIGHT_ARROW:this.activeDate=this.dateAdapter.addCalendarDays(this._activeDate,n?-1:1);break;case a.UP_ARROW:this.activeDate=this.dateAdapter.addCalendarDays(this._activeDate,-7);break;case a.DOWN_ARROW:this.activeDate=this.dateAdapter.addCalendarDays(this._activeDate,7);break;case a.HOME:this.activeDate=this.dateAdapter.addCalendarDays(this._activeDate,1-this.dateAdapter.getDate(this._activeDate));break;case a.END:this.activeDate=this.dateAdapter.addCalendarDays(this._activeDate,this.dateAdapter.getNumDaysInMonth(this._activeDate)-this.dateAdapter.getDate(this._activeDate));break;case a.PAGE_UP:this.activeDate=e.altKey?this.dateAdapter.addCalendarYears(this._activeDate,-1):this.dateAdapter.addCalendarMonths(this._activeDate,-1);break;case a.PAGE_DOWN:this.activeDate=e.altKey?this.dateAdapter.addCalendarYears(this._activeDate,1):this.dateAdapter.addCalendarMonths(this._activeDate,1);break;case a.ENTER:case a.SPACE:return void(this.dateFilter&&!this.dateFilter(this._activeDate)||(this.dateSelected(this.dateAdapter.getDate(this._activeDate)),
|
10
10
|
this.userSelection.emit(),e.preventDefault()));default:return}this.dateAdapter.compareDate(t,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this.focusActiveCell(),e.preventDefault()},e.prototype.init=function(){this.selectedDate=this.getDateInCurrentMonth(this.selected),this.todayDate=this.getDateInCurrentMonth(this.dateAdapter.today()),this.monthLabel=this.dateAdapter.getMonthNames("short")[this.dateAdapter.getMonth(this.activeDate)],this.monthLabel=this.monthLabel[0].toLocaleUpperCase()+this.monthLabel.substr(1);var e=this.dateAdapter.createDate(this.dateAdapter.getYear(this.activeDate),this.dateAdapter.getMonth(this.activeDate),1);this.firstWeekOffset=(7+this.dateAdapter.getDayOfWeek(e)-this.dateAdapter.getFirstDayOfWeek())%7,this.createWeekCells(),this.changeDetectorRef.markForCheck()},e.prototype.focusActiveCell=function(){this.mcCalendarBody.focusActiveCell()},e.prototype.createWeekCells=function(){var e=this.dateAdapter.getNumDaysInMonth(this.activeDate),t=this.dateAdapter.getDateNames();this.weeks=[[]];for(var n=0,i=this.firstWeekOffset;n<e;n++,i++){7===i&&(this.weeks.push([]),i=0);var o=this.dateAdapter.createDate(this.dateAdapter.getYear(this.activeDate),this.dateAdapter.getMonth(this.activeDate),n+1),r=this.shouldEnableDate(o),a=this.dateAdapter.format(o,this.dateFormats.display.dateA11yLabel),s=this.dateClass?this.dateClass(o):void 0;this.weeks[this.weeks.length-1].push(new Rn(n+1,t[n],a,r,s))}},e.prototype.shouldEnableDate=function(e){return!!e&&(!this.dateFilter||this.dateFilter(e))&&(!this.minDate||this.dateAdapter.compareDate(e,this.minDate)>=0)&&(!this.maxDate||this.dateAdapter.compareDate(e,this.maxDate)<=0)},e.prototype.getDateInCurrentMonth=function(e){return e&&this.hasSameMonthAndYear(e,this.activeDate)?this.dateAdapter.getDate(e):null},e.prototype.hasSameMonthAndYear=function(e,t){return!(!e||!t||this.dateAdapter.getMonth(e)!==this.dateAdapter.getMonth(t)||this.dateAdapter.getYear(e)!==this.dateAdapter.getYear(t))},e.prototype.getValidDateOrNull=function(e){return this.dateAdapter.isDateInstance(e)&&this.dateAdapter.isValid(e)?e:null},e.prototype.isRtl=function(){return this.dir&&"rtl"===this.dir.value},e.decorators=[{type:t.Component,args:[{selector:"mc-month-view",template:'<table class="mc-calendar__table"><thead class="mc-calendar__table-header"><tr><th *ngFor="let day of weekdays" [attr.aria-label]="day.long">{{day.narrow}}</th></tr><tr><th class="mc-calendar__table-header-divider" colspan="7" aria-hidden="true"></th></tr></thead><tbody mc-calendar-body [label]="monthLabel" [rows]="weeks" [todayValue]="todayDate" [selectedValue]="selectedDate" [labelMinRequiredCells]="3" [activeCell]="dateAdapter.getDate(activeDate) - 1" (selectedValueChange)="dateSelected($event)" (keydown)="handleCalendarBodyKeydown($event)"></tbody></table>',exportAs:"mcMonthView",encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[f.MC_DATE_FORMATS]}]},{type:f.DateAdapter,decorators:[{type:t.Optional}]},{type:n.Directionality,decorators:[{type:t.Optional}]}]},e.propDecorators={activeDate:[{type:t.Input}],selected:[{type:t.Input}],minDate:[{type:t.Input}],maxDate:[{type:t.Input}],dateFilter:[{type:t.Input}],dateClass:[{type:t.Input}],selectedChange:[{type:t.Output}],userSelection:[{type:t.Output}],activeDateChange:[{type:t.Output}],mcCalendarBody:[{type:t.ViewChild,args:[Vn,{static:!1}]}]},e}(),Ln=function(){function e(e,n,i){if(this.changeDetectorRef=e,this.dateAdapter=n,this.dir=i,this.selectedChange=new t.EventEmitter,this.yearSelected=new t.EventEmitter,this.activeDateChange=new t.EventEmitter,!this.dateAdapter)throw te("DateAdapter");this._activeDate=this.dateAdapter.today()}return Object.defineProperty(e.prototype,"activeDate",{get:function(){return this._activeDate},set:function(e){var t=this._activeDate,n=this.getValidDateOrNull(this.dateAdapter.deserialize(e))||this.dateAdapter.today();this._activeDate=this.dateAdapter.clampDate(n,this.minDate,this.maxDate),Math.floor(this.dateAdapter.getYear(t)/24)!==Math.floor(this.dateAdapter.getYear(this._activeDate)/24)&&this.init()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selected",{get:function(){return this._selected},set:function(e){this._selected=this.getValidDateOrNull(this.dateAdapter.deserialize(e)),this.selectedYear=this._selected&&this.dateAdapter.getYear(this._selected)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minDate",{get:function(){return this._minDate},set:function(e){this._minDate=this.getValidDateOrNull(this.dateAdapter.deserialize(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxDate",{get:function(){return this._maxDate},set:function(e){this._maxDate=this.getValidDateOrNull(this.dateAdapter.deserialize(e))},enumerable:!0,configurable:!0}),e.prototype.ngAfterContentInit=function(){this.init()},e.prototype.init=function(){var e=this;this.todayYear=this.dateAdapter.getYear(this.dateAdapter.today());var t=this.dateAdapter.getYear(this._activeDate),n=t%24;this.years=[];for(var i=0,o=[];i<24;i++)o.push(t-n+i),4===o.length&&(this.years.push(o.map(function(t){return e.createCellForYear(t)})),o=[]);this.changeDetectorRef.markForCheck()},e.prototype.onYearSelected=function(e){this.yearSelected.emit(this.dateAdapter.createDate(e,0,1));var t=this.dateAdapter.getMonth(this.activeDate),n=this.dateAdapter.getNumDaysInMonth(this.dateAdapter.createDate(e,t,1));this.selectedChange.emit(this.dateAdapter.createDate(e,t,Math.min(this.dateAdapter.getDate(this.activeDate),n)))},e.prototype.handleCalendarBodyKeydown=function(e){var t=this._activeDate,n=this.isRtl();switch(e.keyCode){case a.LEFT_ARROW:this.activeDate=this.dateAdapter.addCalendarYears(this._activeDate,n?1:-1);break;case a.RIGHT_ARROW:this.activeDate=this.dateAdapter.addCalendarYears(this._activeDate,n?-1:1);break;case a.UP_ARROW:this.activeDate=this.dateAdapter.addCalendarYears(this._activeDate,-4);break;case a.DOWN_ARROW:this.activeDate=this.dateAdapter.addCalendarYears(this._activeDate,4);break;case a.HOME:this.activeDate=this.dateAdapter.addCalendarYears(this._activeDate,-this.dateAdapter.getYear(this._activeDate)%24);break;case a.END:this.activeDate=this.dateAdapter.addCalendarYears(this._activeDate,24-this.dateAdapter.getYear(this._activeDate)%24-1);break;case a.PAGE_UP:this.activeDate=this.dateAdapter.addCalendarYears(this._activeDate,e.altKey?-240:-24);break;case a.PAGE_DOWN:this.activeDate=this.dateAdapter.addCalendarYears(this._activeDate,e.altKey?240:24);break;case a.ENTER:case a.SPACE:this.onYearSelected(this.dateAdapter.getYear(this._activeDate));break;default:return}this.dateAdapter.compareDate(t,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this.focusActiveCell(),e.preventDefault()},e.prototype.getActiveCell=function(){return this.dateAdapter.getYear(this.activeDate)%24},e.prototype.focusActiveCell=function(){this.mcCalendarBody.focusActiveCell()},e.prototype.createCellForYear=function(e){var t=this.dateAdapter.getYearName(this.dateAdapter.createDate(e,0,1));return new Rn(e,t,t,this.shouldEnableYear(e))},e.prototype.shouldEnableYear=function(e){if(void 0===e||null===e||this.maxDate&&e>this.dateAdapter.getYear(this.maxDate)||this.minDate&&e<this.dateAdapter.getYear(this.minDate))return!1;if(!this.dateFilter)return!0;for(var t=this.dateAdapter.createDate(e,0,1),n=t;this.dateAdapter.getYear(n)===e;n=this.dateAdapter.addCalendarDays(n,1))if(this.dateFilter(n))return!0;return!1},e.prototype.getValidDateOrNull=function(e){return this.dateAdapter.isDateInstance(e)&&this.dateAdapter.isValid(e)?e:null},e.prototype.isRtl=function(){return this.dir&&"rtl"===this.dir.value},e.decorators=[{type:t.Component,args:[{selector:"mc-multi-year-view",template:'<table class="mc-calendar__table"><thead class="mc-calendar__table-header"><tr><th class="mc-calendar__table-header-divider" colspan="4"></th></tr></thead><tbody mc-calendar-body [rows]="years" [todayValue]="todayYear" [selectedValue]="selectedYear" [numCols]="4" [cellAspectRatio]="4 / 7" [activeCell]="getActiveCell()" (selectedValueChange)="onYearSelected($event)" (keydown)="handleCalendarBodyKeydown($event)"></tbody></table>',exportAs:"mcMultiYearView",encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:f.DateAdapter,decorators:[{type:t.Optional}]},{type:n.Directionality,decorators:[{type:t.Optional}]}]},e.propDecorators={activeDate:[{type:t.Input}],selected:[{type:t.Input}],minDate:[{type:t.Input}],maxDate:[{type:t.Input}],dateFilter:[{type:t.Input}],selectedChange:[{type:t.Output}],yearSelected:[{type:t.Output}],activeDateChange:[{type:t.Output}],mcCalendarBody:[{type:t.ViewChild,args:[Vn,{static:!1}]}]},e}(),Nn=function(){function e(e,n,i,o){if(this.changeDetectorRef=e,this.dateFormats=n,this.dateAdapter=i,this.dir=o,this.selectedChange=new t.EventEmitter,this.monthSelected=new t.EventEmitter,this.activeDateChange=new t.EventEmitter,!this.dateAdapter)throw te("DateAdapter");if(!this.dateFormats)throw te("MC_DATE_FORMATS");this._activeDate=this.dateAdapter.today()}return Object.defineProperty(e.prototype,"activeDate",{get:function(){return this._activeDate},set:function(e){var t=this._activeDate,n=this.getValidDateOrNull(this.dateAdapter.deserialize(e))||this.dateAdapter.today();this._activeDate=this.dateAdapter.clampDate(n,this.minDate,this.maxDate),this.dateAdapter.getYear(t)!==this.dateAdapter.getYear(this._activeDate)&&this.init()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selected",{get:function(){return this._selected},set:function(e){this._selected=this.getValidDateOrNull(this.dateAdapter.deserialize(e)),this.selectedMonth=this.getMonthInCurrentYear(this._selected)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minDate",{get:function(){return this._minDate},set:function(e){this._minDate=this.getValidDateOrNull(this.dateAdapter.deserialize(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxDate",{get:function(){return this._maxDate},set:function(e){this._maxDate=this.getValidDateOrNull(this.dateAdapter.deserialize(e))},enumerable:!0,configurable:!0}),e.prototype.ngAfterContentInit=function(){this.init()},e.prototype.onMonthSelected=function(e){var t=this.dateAdapter.createDate(this.dateAdapter.getYear(this.activeDate),e,1);this.monthSelected.emit(t);var n=this.dateAdapter.getNumDaysInMonth(t);this.selectedChange.emit(this.dateAdapter.createDate(this.dateAdapter.getYear(this.activeDate),e,Math.min(this.dateAdapter.getDate(this.activeDate),n)))},e.prototype.handleCalendarBodyKeydown=function(e){var t=this._activeDate,n=this.isRtl();switch(e.keyCode){case a.LEFT_ARROW:this.activeDate=this.dateAdapter.addCalendarMonths(this._activeDate,n?1:-1);break;case a.RIGHT_ARROW:this.activeDate=this.dateAdapter.addCalendarMonths(this._activeDate,n?-1:1);break;case a.UP_ARROW:this.activeDate=this.dateAdapter.addCalendarMonths(this._activeDate,-4);break;case a.DOWN_ARROW:this.activeDate=this.dateAdapter.addCalendarMonths(this._activeDate,4);break;case a.HOME:this.activeDate=this.dateAdapter.addCalendarMonths(this._activeDate,-this.dateAdapter.getMonth(this._activeDate));break;case a.END:this.activeDate=this.dateAdapter.addCalendarMonths(this._activeDate,11-this.dateAdapter.getMonth(this._activeDate));break;case a.PAGE_UP:this.activeDate=this.dateAdapter.addCalendarYears(this._activeDate,e.altKey?-10:-1);break;case a.PAGE_DOWN:this.activeDate=this.dateAdapter.addCalendarYears(this._activeDate,e.altKey?10:1);break;case a.ENTER:case a.SPACE:this.onMonthSelected(this.dateAdapter.getMonth(this._activeDate));break;default:return}this.dateAdapter.compareDate(t,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this.focusActiveCell(),e.preventDefault()},e.prototype.init=function(){var e=this;this.selectedMonth=this.getMonthInCurrentYear(this.selected),this.todayMonth=this.getMonthInCurrentYear(this.dateAdapter.today()),this.yearLabel=this.dateAdapter.getYearName(this.activeDate);var t=this.dateAdapter.getMonthNames("short");this.months=[[0,1,2,3],[4,5,6,7],[8,9,10,11]].map(function(n){return n.map(function(n){return e.createCellForMonth(n,t[n])})}),this.changeDetectorRef.markForCheck()},e.prototype.focusActiveCell=function(){this.mcCalendarBody.focusActiveCell()},e.prototype.getMonthInCurrentYear=function(e){return e&&this.dateAdapter.getYear(e)===this.dateAdapter.getYear(this.activeDate)?this.dateAdapter.getMonth(e):null},e.prototype.createCellForMonth=function(e,t){var n=this.dateAdapter.format(this.dateAdapter.createDate(this.dateAdapter.getYear(this.activeDate),e,1),this.dateFormats.display.monthYearA11yLabel),i=t[0].toLocaleUpperCase()+t.substr(1);return new Rn(e,i,n,this.shouldEnableMonth(e))},e.prototype.shouldEnableMonth=function(e){var t=this.dateAdapter.getYear(this.activeDate);if(void 0===e||null===e||this.isYearAndMonthAfterMaxDate(t,e)||this.isYearAndMonthBeforeMinDate(t,e))return!1;if(!this.dateFilter)return!0;for(var n=this.dateAdapter.createDate(t,e,1),i=n;this.dateAdapter.getMonth(i)===e;i=this.dateAdapter.addCalendarDays(i,1))if(this.dateFilter(i))return!0;return!1},e.prototype.isYearAndMonthAfterMaxDate=function(e,t){if(this.maxDate){var n=this.dateAdapter.getYear(this.maxDate),i=this.dateAdapter.getMonth(this.maxDate);return e>n||e===n&&t>i}return!1},e.prototype.isYearAndMonthBeforeMinDate=function(e,t){if(this.minDate){var n=this.dateAdapter.getYear(this.minDate),i=this.dateAdapter.getMonth(this.minDate);return e<n||e===n&&t<i}return!1},e.prototype.getValidDateOrNull=function(e){return this.dateAdapter.isDateInstance(e)&&this.dateAdapter.isValid(e)?e:null},e.prototype.isRtl=function(){return this.dir&&"rtl"===this.dir.value},e.decorators=[{type:t.Component,args:[{selector:"mc-year-view",template:'<table class="mc-calendar__table"><thead class="mc-calendar__table-header"><tr><th class="mc-calendar__table-header-divider" colspan="4"></th></tr></thead><tbody mc-calendar-body [label]="yearLabel" [rows]="months" [todayValue]="todayMonth" [selectedValue]="selectedMonth" [labelMinRequiredCells]="2" [numCols]="4" [cellAspectRatio]="4 / 7" [activeCell]="dateAdapter.getMonth(activeDate)" (selectedValueChange)="onMonthSelected($event)" (keydown)="handleCalendarBodyKeydown($event)"></tbody></table>',exportAs:"mcYearView",encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[f.MC_DATE_FORMATS]}]},{type:f.DateAdapter,decorators:[{type:t.Optional}]},{type:n.Directionality,decorators:[{type:t.Optional}]}]},e.propDecorators={activeDate:[{type:t.Input}],selected:[{type:t.Input}],minDate:[{type:t.Input}],maxDate:[{type:t.Input}],dateFilter:[{type:t.Input}],selectedChange:[{type:t.Output}],monthSelected:[{type:t.Output}],activeDateChange:[{type:t.Output}],mcCalendarBody:[{type:t.ViewChild,args:[Vn,{static:!1}]}]},e}(),jn=function(){function e(e,t,n,i,o){this.intl=e,this.calendar=t,this.dateAdapter=n,this.dateFormats=i,this.calendar.stateChanges.subscribe(function(){return o.markForCheck()})}return Object.defineProperty(e.prototype,"periodButtonText",{get:function(){if("month"===this.calendar.currentView){var e=this.dateAdapter.format(this.calendar.activeDate,this.dateFormats.display.monthYearLabel);return e[0].toLocaleUpperCase()+e.substr(1)}if("year"===this.calendar.currentView)return this.dateAdapter.getYearName(this.calendar.activeDate);var t=this.dateAdapter.getYear(this.calendar.activeDate);return this.dateAdapter.getYearName(this.dateAdapter.createDate(t-t%24,0,1))+" – "+this.dateAdapter.getYearName(this.dateAdapter.createDate(t+24-1-t%24,0,1))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"periodButtonLabel",{get:function(){return"month"===this.calendar.currentView?this.intl.switchToMultiYearViewLabel:this.intl.switchToMonthViewLabel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"prevButtonLabel",{get:function(){return{month:this.intl.prevMonthLabel,year:this.intl.prevYearLabel,"multi-year":this.intl.prevMultiYearLabel}[this.calendar.currentView]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nextButtonLabel",{get:function(){return{month:this.intl.nextMonthLabel,year:this.intl.nextYearLabel,"multi-year":this.intl.nextMultiYearLabel}[this.calendar.currentView]},enumerable:!0,configurable:!0}),e.prototype.currentPeriodClicked=function(){this.calendar.currentView="month"===this.calendar.currentView?"multi-year":"month"},e.prototype.previousClicked=function(){this.calendar.activeDate="month"===this.calendar.currentView?this.dateAdapter.addCalendarMonths(this.calendar.activeDate,-1):this.dateAdapter.addCalendarYears(this.calendar.activeDate,"year"===this.calendar.currentView?-1:-24)},e.prototype.nextClicked=function(){this.calendar.activeDate="month"===this.calendar.currentView?this.dateAdapter.addCalendarMonths(this.calendar.activeDate,1):this.dateAdapter.addCalendarYears(this.calendar.activeDate,"year"===this.calendar.currentView?1:24)},e.prototype.previousEnabled=function(){return!this.calendar.minDate||(!this.calendar.minDate||!this.isSameView(this.calendar.activeDate,this.calendar.minDate))},e.prototype.nextEnabled=function(){return!this.calendar.maxDate||!this.isSameView(this.calendar.activeDate,this.calendar.maxDate)},e.prototype.isSameView=function(e,t){return"month"===this.calendar.currentView?this.dateAdapter.getYear(e)===this.dateAdapter.getYear(t)&&this.dateAdapter.getMonth(e)===this.dateAdapter.getMonth(t):"year"===this.calendar.currentView?this.dateAdapter.getYear(e)===this.dateAdapter.getYear(t):Math.floor(this.dateAdapter.getYear(e)/24)===Math.floor(this.dateAdapter.getYear(t)/24)},e.decorators=[{type:t.Component,args:[{selector:"mc-calendar-header",template:'<div class="mc-calendar__header"><div class="mc-calendar__controls"><button mc-button type="button" class="mc-calendar__period-button" (click)="currentPeriodClicked()" [attr.aria-label]="periodButtonLabel">{{periodButtonText}} <i class="mc mc-icon" [class.mc-angle-up-M_16]="calendar.currentView !== \'month\'" [class.mc-angle-down-M_16]="calendar.currentView === \'month\'"></i></button><div class="mc-calendar-spacer"></div><ng-content></ng-content><button mc-button type="button" class="mc-calendar__previous-button" [disabled]="!previousEnabled()" (click)="previousClicked()" [attr.aria-label]="prevButtonLabel"><i mc-icon="mc-angle-left-L_16"></i></button> <button mc-button type="button" class="mc-calendar__next-button" [disabled]="!nextEnabled()" (click)="nextClicked()" [attr.aria-label]="nextButtonLabel"><i mc-icon="mc-angle-right-L_16"></i></button></div></div>',exportAs:"mcCalendarHeader",encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:An},{type:Bn,decorators:[{type:t.Inject,args:[t.forwardRef(function(){return Bn})]}]},{type:f.DateAdapter,decorators:[{type:t.Optional}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[f.MC_DATE_FORMATS]}]},{type:t.ChangeDetectorRef}]},e}(),Bn=function(){function e(e,n,i,r){var a=this;if(this.dateAdapter=n,this.dateFormats=i,this.changeDetectorRef=r,this.startView="month",this.selectedChange=new t.EventEmitter,this.yearSelected=new t.EventEmitter,this.monthSelected=new t.EventEmitter,this.userSelection=new t.EventEmitter,this.stateChanges=new o.Subject,this.moveFocusOnNextTick=!1,!this.dateAdapter)throw te("DateAdapter");if(!this.dateFormats)throw te("MC_DATE_FORMATS");this.intlChanges=e.changes.subscribe(function(){r.markForCheck(),a.stateChanges.next()})}return Object.defineProperty(e.prototype,"startAt",{get:function(){return this._startAt},set:function(e){this._startAt=this.getValidDateOrNull(this.dateAdapter.deserialize(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selected",{get:function(){return this._selected},set:function(e){this._selected=this.getValidDateOrNull(this.dateAdapter.deserialize(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minDate",{get:function(){return this._minDate},set:function(e){this._minDate=this.getValidDateOrNull(this.dateAdapter.deserialize(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxDate",{get:function(){return this._maxDate},set:function(e){this._maxDate=this.getValidDateOrNull(this.dateAdapter.deserialize(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeDate",{get:function(){return this.clampedActiveDate},set:function(e){this.clampedActiveDate=this.dateAdapter.clampDate(e,this.minDate,this.maxDate),this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentView",{get:function(){return this._currentView},set:function(e){this._currentView=e,this.moveFocusOnNextTick=!0},enumerable:!0,configurable:!0}),e.prototype.ngAfterContentInit=function(){this.calendarHeaderPortal=new d.ComponentPortal(this.headerComponent||jn),this.activeDate=this.startAt||this.dateAdapter.today(),this._currentView=this.startView},e.prototype.ngAfterViewChecked=function(){this.moveFocusOnNextTick&&(this.moveFocusOnNextTick=!1,this.focusActiveCell())},e.prototype.ngOnDestroy=function(){this.intlChanges.unsubscribe(),this.stateChanges.complete()},e.prototype.ngOnChanges=function(e){var t=e.minDate||e.maxDate||e.dateFilter;if(t&&!t.firstChange){var n=this.getCurrentViewComponent();n&&(this.changeDetectorRef.detectChanges(),n.init())}this.stateChanges.next()},e.prototype.focusActiveCell=function(){this.getCurrentViewComponent().focusActiveCell()},e.prototype.updateTodaysDate=function(){("month"===this.currentView?this.monthView:"year"===this.currentView?this.yearView:this.multiYearView).ngAfterContentInit()},e.prototype.dateSelected=function(e){this.dateAdapter.sameDate(e,this.selected)||this.selectedChange.emit(e)},e.prototype.yearSelectedInMultiYearView=function(e){this.yearSelected.emit(e)},e.prototype.monthSelectedInYearView=function(e){this.monthSelected.emit(e)},e.prototype.userSelected=function(){this.userSelection.emit()},e.prototype.goToDateInView=function(e,t){this.activeDate=e,this.currentView=t},e.prototype.getValidDateOrNull=function(e){return this.dateAdapter.isDateInstance(e)&&this.dateAdapter.isValid(e)?e:null},e.prototype.getCurrentViewComponent=function(){return this.monthView||this.yearView||this.multiYearView},e.decorators=[{type:t.Component,args:[{selector:"mc-calendar",template:'<ng-template [cdkPortalOutlet]="calendarHeaderPortal"></ng-template><div class="mc-calendar__content" [ngSwitch]="currentView" cdkMonitorSubtreeFocus tabindex="-1"><mc-month-view *ngSwitchCase="\'month\'" [(activeDate)]="activeDate" [selected]="selected" [dateFilter]="dateFilter" [maxDate]="maxDate" [minDate]="minDate" [dateClass]="dateClass" (selectedChange)="dateSelected($event)" (userSelection)="userSelected()"></mc-month-view><mc-year-view *ngSwitchCase="\'year\'" [(activeDate)]="activeDate" [selected]="selected" [dateFilter]="dateFilter" [maxDate]="maxDate" [minDate]="minDate" (monthSelected)="monthSelectedInYearView($event)" (selectedChange)="goToDateInView($event, \'month\')"></mc-year-view><mc-multi-year-view *ngSwitchCase="\'multi-year\'" [(activeDate)]="activeDate" [selected]="selected" [dateFilter]="dateFilter" [maxDate]="maxDate" [minDate]="minDate" (yearSelected)="yearSelectedInMultiYearView($event)" (selectedChange)="goToDateInView($event, \'year\')"></mc-multi-year-view></div>',styles:[".mc-calendar{display:block}.mc-calendar__header{padding:8px 8px 0 8px}.mc-calendar__content{padding:0 8px 8px 8px;outline:0}.mc-calendar__controls{display:flex;margin:5% calc(33% / 7 - 16px)}.mc-calendar-spacer{flex:1 1 auto}.mc-calendar__period-button{min-width:0}.mc-calendar__previous-button::after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.mc-calendar__next-button::after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.mc-calendar__table{border-spacing:0;border-collapse:collapse;width:100%}.mc-calendar__table-header th{text-align:center;padding:0 0 8px 0}.mc-calendar__table-header-divider{position:relative;height:1px}.mc-calendar__table-header-divider::after{content:'';position:absolute;top:0;left:-8px;right:-8px;height:1px}"],host:{class:"mc-calendar"},exportAs:"mcCalendar",encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:An},{type:f.DateAdapter,decorators:[{type:t.Optional}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[f.MC_DATE_FORMATS]}]},{type:t.ChangeDetectorRef}]},e.propDecorators={startAt:[{type:t.Input}],selected:[{type:t.Input}],minDate:[{type:t.Input}],maxDate:[{type:t.Input}],headerComponent:[{type:t.Input}],startView:[{type:t.Input}],dateFilter:[{type:t.Input}],dateClass:[{type:t.Input}],selectedChange:[{type:t.Output}],yearSelected:[{type:t.Output}],monthSelected:[{type:t.Output}],userSelection:[{type:t.Output}],monthView:[{type:t.ViewChild,args:[Fn,{static:!1}]}],yearView:[{type:t.ViewChild,args:[Nn,{static:!1}]}],multiYearView:[{type:t.ViewChild,args:[Ln,{static:!1}]}]},e}(),zn={transformPanel:s.trigger("transformPanel",[s.state("void",s.style({opacity:0,transform:"scale(1, 0.8)"})),s.transition("void => enter",s.animate("120ms cubic-bezier(0, 0, 0.2, 1)",s.style({opacity:1,transform:"scale(1, 1)"}))),s.transition("* => void",s.animate("100ms linear",s.style({opacity:0})))]),fadeInCalendar:s.trigger("fadeInCalendar",[s.state("void",s.style({opacity:0})),s.state("enter",s.style({opacity:1})),s.transition("void => *",s.animate("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])};Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector);var Wn=0,Yn=new t.InjectionToken("mc-datepicker-scroll-strategy"),Hn={provide:Yn,deps:[c.Overlay],useFactory:ne},Kn=function(){function e(e){this._elementRef=e}return e}(),Un=O(Kn),Gn=function(e){function n(t){return e.call(this,t)||this}return v(n,e),n.prototype.ngAfterViewInit=function(){this.calendar.focusActiveCell()},n.decorators=[{type:t.Component,args:[{selector:"mc-datepicker__content",template:'<mc-calendar [id]="datepicker.id" [ngClass]="datepicker.panelClass" [startAt]="datepicker.startAt" [startView]="datepicker.startView" [minDate]="datepicker.minDate" [maxDate]="datepicker.maxDate" [dateFilter]="datepicker.dateFilter" [headerComponent]="datepicker.calendarHeaderComponent" [selected]="datepicker.selected" [dateClass]="datepicker.dateClass" [@fadeInCalendar]="\'enter\'" (selectedChange)="datepicker.select($event)" (yearSelected)="datepicker.selectYear($event)" (monthSelected)="datepicker.selectMonth($event)" (userSelection)="datepicker.close()"></mc-calendar>',styles:[".mc-datepicker__content{display:block}.mc-datepicker__content .mc-calendar{width:296px;height:344px}.mc-datepicker__content .mc-calendar__next-button[disabled],.mc-datepicker__content .mc-calendar__previous-button[disabled]{border:0}@media all and (orientation:landscape){.mc-calendar{width:64vh;height:80vh}}@media all and (orientation:portrait){.mc-calendar{width:80vw;height:100vw}}"],host:{class:"mc-datepicker__content","[@transformPanel]":'"enter"'},animations:[zn.transformPanel,zn.fadeInCalendar],exportAs:"mcDatepickerContent",encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,inputs:["color"]}]}],n.ctorParameters=function(){return[{type:t.ElementRef}]},n.propDecorators={calendar:[{type:t.ViewChild,args:[Bn,{static:!1}]}]},n}(Un),Xn=function(){function e(e,n,i,r,a,s,c){if(this.overlay=e,this.ngZone=n,this.viewContainerRef=i,this.dateAdapter=a,this.dir=s,this.document=c,this.startView="month",this.yearSelected=new t.EventEmitter,this.monthSelected=new t.EventEmitter,this.openedStream=new t.EventEmitter,this.closedStream=new t.EventEmitter,this.id="mc-datepicker-"+Wn++,this.stateChanges=new o.Subject,this.disabledChange=new o.Subject,this.selectedChanged=new o.Subject,this._opened=!1,this.validSelected=null,this.focusedElementBeforeOpen=null,this.inputSubscription=o.Subscription.EMPTY,!this.dateAdapter)throw te("DateAdapter");this.scrollStrategy=r}return Object.defineProperty(e.prototype,"startAt",{get:function(){return this._startAt||(this.datepickerInput?this.datepickerInput.value:null)},set:function(e){this._startAt=this.getValidDateOrNull(this.dateAdapter.deserialize(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this._color||(this.datepickerInput?this.datepickerInput.getThemePalette():void 0)},set:function(e){this._color=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return void 0===this._disabled&&this.datepickerInput?this.datepickerInput.disabled:!!this._disabled},set:function(e){var t=i.coerceBooleanProperty(e);t!==this._disabled&&(this._disabled=t,this.disabledChange.next(t))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"opened",{get:function(){return this._opened},set:function(e){e?this.open():this.close()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selected",{get:function(){return this.validSelected},set:function(e){this.validSelected=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minDate",{get:function(){return this.datepickerInput&&this.datepickerInput.min},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxDate",{get:function(){return this.datepickerInput&&this.datepickerInput.max},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dateFilter",{get:function(){return this.datepickerInput&&this.datepickerInput.dateFilter},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.selected},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this.close(),this.inputSubscription.unsubscribe(),this.disabledChange.complete(),this.popupRef&&(this.popupRef.dispose(),this.popupComponentRef=null)},e.prototype.select=function(e){var t=this.selected;this.selected=e,this.dateAdapter.sameDate(t,this.selected)||this.selectedChanged.next(e)},e.prototype.selectYear=function(e){this.yearSelected.emit(e)},e.prototype.selectMonth=function(e){this.monthSelected.emit(e)},e.prototype.registerInput=function(e){var t=this;if(this.datepickerInput)throw Error("A McDatepicker can only be associated with a single input.");this.datepickerInput=e,this.inputSubscription=this.datepickerInput.valueChange.subscribe(function(e){return t.selected=e})},e.prototype.open=function(){if(!this._opened&&!this.disabled){if(!this.datepickerInput)throw Error("Attempted to open an McDatepicker with no associated input.");this.document&&(this.focusedElementBeforeOpen=this.document.activeElement),this.openAsPopup(),this._opened=!0,this.openedStream.emit()}},e.prototype.close=function(){var e=this;if(this._opened){this.popupRef&&this.popupRef.hasAttached()&&this.popupRef.detach(),this.calendarPortal&&this.calendarPortal.isAttached&&this.calendarPortal.detach();var t=function(){e._opened&&(e._opened=!1,e.closedStream.emit(),e.focusedElementBeforeOpen=null,e.datepickerInput.elementRef.nativeElement.focus())};this.focusedElementBeforeOpen&&"function"==typeof this.focusedElementBeforeOpen.focus?(this.focusedElementBeforeOpen.focus(),setTimeout(t)):t()}},e.prototype.openAsPopup=function(){var e=this;this.calendarPortal||(this.calendarPortal=new d.ComponentPortal(Gn,this.viewContainerRef)),this.popupRef||this.createPopup(),this.popupRef.hasAttached()||(this.popupComponentRef=this.popupRef.attach(this.calendarPortal),this.popupComponentRef.instance.datepicker=this,this.setColor(),this.ngZone.onStable.asObservable().pipe(m.take(1)).subscribe(function(){
|
11
|
-
e.popupRef.updatePosition()}))},e.prototype.createPopup=function(){var e=this,t=new c.OverlayConfig({positionStrategy:this.createPopupPositionStrategy(),hasBackdrop:!0,backdropClass:"mc-overlay-transparent-backdrop",direction:this.dir,scrollStrategy:this.scrollStrategy(),panelClass:"mc-datepicker__popup"});this.popupRef=this.overlay.create(t),this.popupRef.overlayElement.setAttribute("role","dialog"),o.merge(this.popupRef.backdropClick(),this.popupRef.detachments(),this.popupRef.keydownEvents().pipe(m.filter(function(t){return t.keyCode===a.ESCAPE||e.datepickerInput&&t.altKey&&t.keyCode===a.UP_ARROW}))).subscribe(function(){return e.close()})},e.prototype.createPopupPositionStrategy=function(){return this.overlay.position().flexibleConnectedTo(this.datepickerInput.elementRef).withTransformOriginOn(".mc-datepicker__content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition().withPositions([{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"}])},e.prototype.getValidDateOrNull=function(e){return this.dateAdapter.isDateInstance(e)&&this.dateAdapter.isValid(e)?e:null},e.prototype.setColor=function(){var e=this.color;this.popupComponentRef&&(this.popupComponentRef.instance.color=e)},e.decorators=[{type:t.Component,args:[{selector:"mc-datepicker",template:"",exportAs:"mcDatepicker",changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,providers:[{provide:kt,useExisting:e}]}]}],e.ctorParameters=function(){return[{type:c.Overlay},{type:t.NgZone},{type:t.ViewContainerRef},{type:void 0,decorators:[{type:t.Inject,args:[Yn]}]},{type:f.DateAdapter,decorators:[{type:t.Optional}]},{type:n.Directionality,decorators:[{type:t.Optional}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[r.DOCUMENT]}]}]},e.propDecorators={startAt:[{type:t.Input}],color:[{type:t.Input}],disabled:[{type:t.Input}],opened:[{type:t.Input}],calendarHeaderComponent:[{type:t.Input}],startView:[{type:t.Input}],yearSelected:[{type:t.Output}],monthSelected:[{type:t.Output}],panelClass:[{type:t.Input}],dateClass:[{type:t.Input}],openedStream:[{type:t.Output,args:["opened"]}],closedStream:[{type:t.Output,args:["closed"]}]},e}(),qn={provide:l.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return Qn}),multi:!0},$n={provide:l.NG_VALIDATORS,useExisting:t.forwardRef(function(){return Qn}),multi:!0},Zn=function(){function e(e,t){this.target=e,this.targetElement=t,this.value=this.target.value}return e}(),Qn=function(){function e(e,n,i,r){var a=this;if(this.elementRef=e,this.dateAdapter=n,this.dateFormats=i,this.formField=r,this.dateChange=new t.EventEmitter,this.dateInput=new t.EventEmitter,this.valueChange=new t.EventEmitter,this.disabledChange=new t.EventEmitter,this.datepickerSubscription=o.Subscription.EMPTY,this.localeSubscription=o.Subscription.EMPTY,this.lastValueValid=!1,this.onTouched=function(){},this.cvaOnChange=function(){},this.validatorOnChange=function(){},this.parseValidator=function(){return a.lastValueValid?null:{mcDatepickerParse:{text:a.elementRef.nativeElement.value}}},this.minValidator=function(e){var t=a.getValidDateOrNull(a.dateAdapter.deserialize(e.value));return!a.min||!t||a.dateAdapter.compareDate(a.min,t)<=0?null:{mcDatepickerMin:{min:a.min,actual:t}}},this.maxValidator=function(e){var t=a.getValidDateOrNull(a.dateAdapter.deserialize(e.value));return!a.max||!t||a.dateAdapter.compareDate(a.max,t)>=0?null:{mcDatepickerMax:{max:a.max,actual:t}}},this.filterValidator=function(e){var t=a.getValidDateOrNull(a.dateAdapter.deserialize(e.value));return a.dateFilter&&t&&!a.dateFilter(t)?{mcDatepickerFilter:!0}:null},this.validator=l.Validators.compose([this.parseValidator,this.minValidator,this.maxValidator,this.filterValidator]),!this.dateAdapter)throw te("DateAdapter");if(!this.dateFormats)throw te("MC_DATE_FORMATS");this.localeSubscription=n.localeChanges.subscribe(function(){a.value=a.value})}return Object.defineProperty(e.prototype,"mcDatepicker",{set:function(e){var t=this;e&&(this.datepicker=e,this.datepicker.registerInput(this),this.datepickerSubscription.unsubscribe(),this.datepickerSubscription=this.datepicker.selectedChanged.subscribe(function(e){t.value=e,t.cvaOnChange(e),t.onTouched(),t.dateInput.emit(new Zn(t,t.elementRef.nativeElement)),t.dateChange.emit(new Zn(t,t.elementRef.nativeElement))}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcDatepickerFilter",{set:function(e){this.dateFilter=e,this.validatorOnChange()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){e=this.dateAdapter.deserialize(e),this.lastValueValid=!e||this.dateAdapter.isValid(e),e=this.getValidDateOrNull(e);var t=this.value;this._value=e,this.formatValue(e),this.dateAdapter.sameDate(t,e)||this.valueChange.emit(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},set:function(e){this._min=this.getValidDateOrNull(this.dateAdapter.deserialize(e)),this.validatorOnChange()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},set:function(e){this._max=this.getValidDateOrNull(this.dateAdapter.deserialize(e)),this.validatorOnChange()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return!!this._disabled},set:function(e){var t=i.coerceBooleanProperty(e),n=this.elementRef.nativeElement;this._disabled!==t&&(this._disabled=t,this.disabledChange.emit(t)),t&&n.blur&&n.blur()},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this.datepickerSubscription.unsubscribe(),this.localeSubscription.unsubscribe(),this.valueChange.complete(),this.disabledChange.complete()},e.prototype.registerOnValidatorChange=function(e){this.validatorOnChange=e},e.prototype.validate=function(e){return this.validator?this.validator(e):null},e.prototype.writeValue=function(e){this.value=e},e.prototype.registerOnChange=function(e){this.cvaOnChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.onKeydown=function(e){var t=e.altKey&&e.keyCode===a.DOWN_ARROW;this.datepicker&&t&&!this.elementRef.nativeElement.readOnly&&(this.datepicker.open(),e.preventDefault())},e.prototype.onInput=function(e){var t=this.dateAdapter.parse(e,this.dateFormats.parse.dateInput);this.lastValueValid=!t||this.dateAdapter.isValid(t),t=this.getValidDateOrNull(t),this.dateAdapter.sameDate(t,this._value)||(this._value=t,this.cvaOnChange(t),this.valueChange.emit(t),this.dateInput.emit(new Zn(this,this.elementRef.nativeElement)))},e.prototype.onChange=function(){this.dateChange.emit(new Zn(this,this.elementRef.nativeElement))},e.prototype.getThemePalette=function(){return this.formField?this.formField.color:void 0},e.prototype.onBlur=function(){this.value&&this.formatValue(this.value),this.onTouched()},e.prototype.formatValue=function(e){this.elementRef.nativeElement.value=e?this.dateAdapter.format(e,this.dateFormats.display.dateInput):""},e.prototype.getValidDateOrNull=function(e){return this.dateAdapter.isDateInstance(e)&&this.dateAdapter.isValid(e)?e:null},e.decorators=[{type:t.Directive,args:[{selector:"input[mcDatepicker]",providers:[qn,$n,{provide:_n,useExisting:e}],host:{"[attr.aria-haspopup]":"true","[attr.aria-owns]":"(datepicker?.opened && datepicker.id) || null","[attr.min]":"min ? dateAdapter.toIso8601(min) : null","[attr.max]":"max ? dateAdapter.toIso8601(max) : null","[disabled]":"disabled","(input)":"onInput($event.target.value)","(change)":"onChange()","(blur)":"onBlur()","(keydown)":"onKeydown($event)"},exportAs:"mcDatepickerInput"}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:f.DateAdapter,decorators:[{type:t.Optional}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[f.MC_DATE_FORMATS]}]},{type:Rt,decorators:[{type:t.Optional}]}]},e.propDecorators={mcDatepicker:[{type:t.Input}],mcDatepickerFilter:[{type:t.Input}],value:[{type:t.Input}],min:[{type:t.Input}],max:[{type:t.Input}],disabled:[{type:t.Input}],dateChange:[{type:t.Output}],dateInput:[{type:t.Output}]},e}(),Jn=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"[mcDatepickerToggleIcon]"}]}],e}(),ei=function(){function e(e,t,n){this.intl=e,this.changeDetectorRef=t,this.stateChanges=o.Subscription.EMPTY;var i=Number(n);this.tabIndex=i||0===i?i:null}return Object.defineProperty(e.prototype,"disabled",{get:function(){return void 0===this._disabled?this.datepicker.disabled:!!this._disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(e){e.datepicker&&this.watchStateChanges()},e.prototype.ngOnDestroy=function(){this.stateChanges.unsubscribe()},e.prototype.ngAfterContentInit=function(){this.watchStateChanges()},e.prototype.open=function(e){this.datepicker&&!this.disabled&&(this.datepicker.open(),e.stopPropagation())},e.prototype.watchStateChanges=function(){var e=this,t=this.datepicker?this.datepicker.disabledChange:o.of(),n=this.datepicker&&this.datepicker.datepickerInput?this.datepicker.datepickerInput.disabledChange:o.of(),i=this.datepicker?o.merge(this.datepicker.openedStream,this.datepicker.closedStream):o.of();this.stateChanges.unsubscribe(),this.stateChanges=o.merge(this.intl.changes,t,n,i).subscribe(function(){return e.changeDetectorRef.markForCheck()})},e.decorators=[{type:t.Component,args:[{selector:"mc-datepicker-toggle",template:'<button #button mc-button type="button" class="mc-datepicker-toggle__button" aria-haspopup="true" [attr.aria-label]="intl.openCalendarLabel" [attr.tabindex]="disabled ? -1 : tabIndex" [disabled]="disabled" (click)="open($event)"><i *ngIf="!customIcon" mc-icon="mc-calendar_16" class="mc-datepicker-toggle__default-icon"></i><ng-content select="[mcDatepickerToggleIcon]"></ng-content></button>',styles:[".mc-datepicker-toggle:focus{outline:0}.mc-datepicker-toggle__button.mc-icon-button{width:30px;height:30px;margin-left:2px}.mc-form-field-appearance-legacy .mc-form-field-prefix .mc-datepicker-toggle__default-icon,.mc-form-field-appearance-legacy .mc-form-field-suffix .mc-datepicker-toggle__default-icon{width:1em}.mc-form-field:not(.mc-form-field-appearance-legacy) .mc-form-field-prefix .mc-datepicker-toggle__default-icon,.mc-form-field:not(.mc-form-field-appearance-legacy) .mc-form-field-suffix .mc-datepicker-toggle__default-icon{display:block;width:1.5em;height:1.5em}.mc-form-field:not(.mc-form-field-appearance-legacy) .mc-form-field-prefix .mc-icon-button .mc-datepicker-toggle__default-icon,.mc-form-field:not(.mc-form-field-appearance-legacy) .mc-form-field-suffix .mc-icon-button .mc-datepicker-toggle__default-icon{margin:auto}"],host:{class:"mc-datepicker-toggle","[attr.tabindex]":"-1","[class.mc-datepicker-toggle_active]":"datepicker && datepicker.opened","[class.mc-warn]":'datepicker && datepicker.color === "error"',"(focus)":"button.focus()"},exportAs:"mcDatepickerToggle",encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:An},{type:t.ChangeDetectorRef},{type:String,decorators:[{type:t.Attribute,args:["tabindex"]}]}]},e.propDecorators={disabled:[{type:t.Input}],datepicker:[{type:t.Input,args:["for"]}],tabIndex:[{type:t.Input}],customIcon:[{type:t.ContentChild,args:[Jn,{static:!1}]}],button:[{type:t.ViewChild,args:["button",{static:!1}]}]},e}(),ti=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,Qt,c.OverlayModule,p.A11yModule,d.PortalModule,wt],exports:[Bn,Vn,Xn,Gn,Qn,ei,Jn,Fn,Nn,Ln,jn,Qt],declarations:[Bn,Vn,Xn,Gn,Qn,ei,Jn,Fn,Nn,Ln,jn],providers:[An,Hn],entryComponents:[Gn,jn]}]}],e}(),ni=function(){function e(){this._vertical=!1,this._inset=!1}return Object.defineProperty(e.prototype,"vertical",{get:function(){return this._vertical},set:function(e){this._vertical=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inset",{get:function(){return this._inset},set:function(e){this._inset=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),e.decorators=[{type:t.Component,args:[{selector:"mc-divider",host:{class:"mc-divider",role:"separator","[attr.aria-orientation]":'vertical ? "vertical" : "horizontal"',"[class.mc-divider-vertical]":"vertical","[class.mc-divider-inset]":"inset"},template:"",styles:[".mc-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mc-divider.mc-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mc-divider.mc-divider-inset{margin-left:80px}[dir=rtl] .mc-divider.mc-divider-inset{margin-left:auto;margin-right:80px}"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,preserveWhitespaces:!1}]}],e.propDecorators={vertical:[{type:t.Input}],inset:[{type:t.Input}]},e}(),ii=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule],exports:[ni],declarations:[ni]}]}],e}(),oi=function(){function e(e,t,n,i,r,a){this._template=e,this._componentFactoryResolver=t,this._appRef=n,this._injector=i,this._viewContainerRef=r,this._document=a,this.attached=new o.Subject}return e.prototype.attach=function(e){void 0===e&&(e={}),this.portal||(this.portal=new d.TemplatePortal(this._template,this._viewContainerRef)),this.detach(),this.outlet||(this.outlet=new d.DomPortalOutlet(this._document.createElement("div"),this._componentFactoryResolver,this._appRef,this._injector));var t=this._template.elementRef.nativeElement;t.parentNode.insertBefore(this.outlet.outletElement,t),this.portal.attach(this.outlet,e),this.attached.next()},e.prototype.detach=function(){this.portal.isAttached&&this.portal.detach()},e.prototype.ngOnDestroy=function(){this.outlet&&this.outlet.dispose()},e.decorators=[{type:t.Directive,args:[{selector:"ng-template[mcDropdownContent]"}]}],e.ctorParameters=function(){return[{type:t.TemplateRef},{type:t.ComponentFactoryResolver},{type:t.ApplicationRef},{type:t.Injector},{type:t.ViewContainerRef},{type:void 0,decorators:[{type:t.Inject,args:[r.DOCUMENT]}]}]},e}(),ri=new t.InjectionToken("MC_DROPDOWN_PANEL"),ai=function(){function e(){}return e}(),si=w(ai),ci=function(e){function n(t,n,i,r){var a=e.call(this)||this;return a._elementRef=t,a._focusMonitor=n,a.document=i,a._parentDropdownPanel=r,a.role="menuitem",a.hovered=new o.Subject,a.highlighted=!1,a.triggersNestedDropdown=!1,n&&n.monitor(a._elementRef.nativeElement,!1),r&&r.addItem&&r.addItem(a),a}return v(n,e),n.prototype.focus=function(e){void 0===e&&(e="program"),this._focusMonitor?this._focusMonitor.focusVia(this.getHostElement(),e):this.getHostElement().focus()},n.prototype.ngOnDestroy=function(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef.nativeElement),this._parentDropdownPanel&&this._parentDropdownPanel.removeItem&&this._parentDropdownPanel.removeItem(this),this.hovered.complete()},n.prototype.getTabIndex=function(){return this.disabled?"-1":"0"},n.prototype.getHostElement=function(){return this._elementRef.nativeElement},n.prototype.checkDisabled=function(e){this.disabled&&(e.preventDefault(),e.stopPropagation())},n.prototype.handleMouseEnter=function(){this.hovered.next(this)},n.prototype.getLabel=function(){var e=this.content.nativeElement,t=this.document?this.document.TEXT_NODE:3,n="";if(e.childNodes)for(var i=e.childNodes.length,o=0;o<i;o++)e.childNodes[o].nodeType===t&&(n+=e.childNodes[o].textContent);return n.trim()},n.decorators=[{type:t.Component,args:[{selector:"mc-dropdown-item, [mc-dropdown-item]",exportAs:"mcDropdownItem",inputs:["disabled"],host:{class:"mc-dropdown__item","[class.mc-dropdown__item_highlighted]":"highlighted","[attr.role]":"role","[attr.tabindex]":"getTabIndex()","[class.mc-disabled]":"disabled","(click)":"checkDisabled($event)","(mouseenter)":"handleMouseEnter()"},changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,template:'\n <div #content>\n <ng-content></ng-content>\n </div>\n <i *ngIf="triggersNestedDropdown" mc-icon="mc-angle-right-M_16" class="mc-dropdown__trigger"></i>\n '}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:p.FocusMonitor},{type:void 0,decorators:[{type:t.Inject,args:[r.DOCUMENT]}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[ri]}]}]},n.propDecorators={role:[{type:t.Input}],content:[{type:t.ViewChild,args:["content",{static:!1}]}]},n}(si),li={transformDropdown:s.trigger("transformDropdown",[s.state("void",s.style({opacity:0,transform:"scale(0.8)"})),s.transition("void => enter",s.group([s.query(".mc-dropdown__content",s.animate("50ms linear",s.style({opacity:1}))),s.animate("50ms cubic-bezier(0, 0, 0.2, 1)",s.style({transform:"scale(1)"}))])),s.transition("* => void",s.animate("50ms 25ms linear",s.style({opacity:0})))]),fadeInItems:s.trigger("fadeInItems",[s.state("showing",s.style({opacity:1})),s.transition("void => *",[s.style({opacity:0}),s.animate("200ms 60ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},pi=li.fadeInItems,di=li.transformDropdown,ui=new t.InjectionToken("mc-dropdown-default-options",{providedIn:"root",factory:ae}),hi=function(){function e(e,n,i){this._elementRef=e,this._ngZone=n,this._defaultOptions=i,this._xPosition=this._defaultOptions.xPosition,this._yPosition=this._defaultOptions.yPosition,this._overlapTriggerX=this._defaultOptions.overlapTriggerX,this._overlapTriggerY=this._defaultOptions.overlapTriggerY,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.classList={},this.panelAnimationState="void",this.animationDone=new o.Subject,this.backdropClass=this._defaultOptions.backdropClass,this.closed=new t.EventEmitter,this.itemsArray=[],this.itemChanges=new o.Subject,this.tabSubscription=o.Subscription.EMPTY}return Object.defineProperty(e.prototype,"xPosition",{get:function(){return this._xPosition},set:function(e){"before"!==e&&"after"!==e&&oe(),this._xPosition=e,this.setPositionClasses()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"yPosition",{get:function(){return this._yPosition},set:function(e){"above"!==e&&"below"!==e&&re(),this._yPosition=e,this.setPositionClasses()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"overlapTriggerY",{get:function(){return this._overlapTriggerY},set:function(e){this._overlapTriggerY=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"overlapTriggerX",{get:function(){return this._overlapTriggerX},set:function(e){this._overlapTriggerX=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasBackdrop",{get:function(){return this._hasBackdrop},set:function(e){this._hasBackdrop=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"panelClass",{set:function(e){var t=this,n=this.previousPanelClass;n&&n.length&&n.split(" ").forEach(function(e){t.classList[e]=!1}),this.previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(function(e){t.classList[e]=!0}),this._elementRef.nativeElement.className="")},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.setPositionClasses()},e.prototype.ngAfterContentInit=function(){var e=this;this.keyManager=new p.FocusKeyManager(this.items).withWrap().withTypeAhead(),this.tabSubscription=this.keyManager.tabOut.subscribe(function(){return e.closed.emit("tab")})},e.prototype.ngOnDestroy=function(){this.tabSubscription.unsubscribe(),this.closed.complete()},e.prototype.hovered=function(){return this.itemChanges.pipe(m.startWith(this.itemsArray),m.switchMap(function(e){return o.merge.apply(void 0,e.map(function(e){return e.hovered}))}))},e.prototype.handleKeydown=function(e){var t=e.keyCode;switch(t){case a.ESCAPE:this.closed.emit("keydown");break;case a.LEFT_ARROW:this.parent&&"ltr"===this.direction&&this.closed.emit("keydown");break;case a.RIGHT_ARROW:this.parent&&"rtl"===this.direction&&this.closed.emit("keydown");break;default:t!==a.UP_ARROW&&t!==a.DOWN_ARROW||this.keyManager.setFocusOrigin("keyboard"),this.keyManager.onKeydown(e)}},e.prototype.handleClick=function(){this.closed.emit("click")},e.prototype.focusFirstItem=function(e){var t=this;void 0===e&&(e="program"),this.lazyContent?this._ngZone.onStable.asObservable().pipe(m.take(1)).subscribe(function(){return t.keyManager.setFocusOrigin(e).setFirstItemActive()}):this.keyManager.setFocusOrigin(e).setFirstItemActive()},e.prototype.resetActiveItem=function(){this.keyManager.setActiveItem(-1)},e.prototype.addItem=function(e){-1===this.itemsArray.indexOf(e)&&(this.itemsArray.push(e),this.itemChanges.next(this.itemsArray))},e.prototype.removeItem=function(e){var t=this.itemsArray.indexOf(e);this.itemsArray.indexOf(e)>-1&&(this.itemsArray.splice(t,1),this.itemChanges.next(this.itemsArray))},e.prototype.setPositionClasses=function(e,t){void 0===e&&(e=this.xPosition),void 0===t&&(t=this.yPosition);var n=this.classList;n["mc-dropdown-before"]="before"===e,n["mc-dropdown-after"]="after"===e,n["mc-dropdown-above"]="above"===t,n["mc-dropdown-below"]="below"===t},e.prototype.startAnimation=function(){this.panelAnimationState="enter"},e.prototype.resetAnimation=function(){this.panelAnimationState="void"},e.prototype.onAnimationDone=function(e){this.animationDone.next(e),this.isAnimating=!1},e.prototype.onAnimationStart=function(e){this.isAnimating=!0,"enter"===e.toState&&0===this.keyManager.activeItemIndex&&(e.element.scrollTop=0)},e.decorators=[{type:t.Component,args:[{selector:"mc-dropdown",exportAs:"mcDropdown",template:'<ng-template><div class="mc-dropdown__panel" [ngClass]="classList" (keydown)="handleKeydown($event)" (click)="handleClick()" [@transformDropdown]="panelAnimationState" (@transformDropdown.start)="onAnimationStart($event)" (@transformDropdown.done)="onAnimationDone($event)" role="dropdown"><div class="mc-dropdown__content"><ng-content></ng-content></div></div></ng-template>',styles:[".mc-dropdown__item{display:flex;align-items:center;position:relative;box-sizing:border-box;width:100%;border:1px solid transparent;outline:0;padding:5px 15px;text-align:left;white-space:nowrap}.mc-dropdown__item:not([disabled]):not(.mc-disabled){cursor:pointer}.mc-dropdown__item .mc-dropdown__item-caption{margin-top:4px}.mc-dropdown__trigger{margin-left:auto;padding-left:16px}.mc-dropdown__panel{min-width:100%;overflow:auto;margin-top:-1px;border-width:1px;border-style:solid;border-bottom-left-radius:3px;border-bottom-right-radius:3px;padding:4px 0}.mc-dropdown__content h1,.mc-dropdown__content h2,.mc-dropdown__content h3,.mc-dropdown__content h4,.mc-dropdown__content h5{padding:8px 16px 4px 16px;margin:0}"],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,animations:[li.transformDropdown,li.fadeInItems],providers:[{provide:ri,useExisting:e}]}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.NgZone},{type:void 0,decorators:[{type:t.Inject,args:[ui]}]}]},e.propDecorators={xPosition:[{type:t.Input}],yPosition:[{type:t.Input}],overlapTriggerY:[{type:t.Input}],overlapTriggerX:[{type:t.Input}],hasBackdrop:[{type:t.Input}],panelClass:[{type:t.Input,args:["class"]}],backdropClass:[{type:t.Input}],templateRef:[{type:t.ViewChild,args:[t.TemplateRef,{static:!1}]}],items:[{type:t.ContentChildren,args:[ci]}],lazyContent:[{type:t.ContentChild,args:[oi,{static:!1}]}],closed:[{type:t.Output}]},e}(),mi=new t.InjectionToken("mc-dropdown-scroll-strategy"),gi={provide:mi,deps:[c.Overlay],useFactory:se},fi=h.normalizePassiveListenerOptions({passive:!0}),yi=function(){function e(e,n,i,r,a,s,c,l){var p=this;this._overlay=e,this._element=n,this._viewContainerRef=i,this._scrollStrategy=r,this._parent=a,this._dropdownItemInstance=s,this._dir=c,this._focusMonitor=l,this.openedBy=null,this.dropdownOpened=new t.EventEmitter,this.dropdownClosed=new t.EventEmitter,this._opened=!1,this.overlayRef=null,this.closeSubscription=o.Subscription.EMPTY,this.hoverSubscription=o.Subscription.EMPTY,this.handleTouchStart=function(){return p.openedBy="touch"},n.nativeElement.addEventListener("touchstart",this.handleTouchStart,fi),s&&(s.triggersNestedDropdown=this.triggersNestedDropdown())}return Object.defineProperty(e.prototype,"dir",{get:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dropdown",{get:function(){return this._dropdown},set:function(e){var t=this;e!==this._dropdown&&(this._dropdown=e,this.closeSubscription.unsubscribe(),e&&(this.closeSubscription=e.closed.asObservable().subscribe(function(e){t.destroy(),"click"!==e&&"tab"!==e||!t._parent||t._parent.closed.emit(e)})))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"opened",{get:function(){return this._opened},enumerable:!0,configurable:!0}),e.prototype.ngAfterContentInit=function(){this.check(),this.handleHover()},e.prototype.ngOnDestroy=function(){this.overlayRef&&(this.overlayRef.dispose(),this.overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this.handleTouchStart,fi),this.cleanUpSubscriptions(),this.closeSubscription.unsubscribe()},e.prototype.triggersNestedDropdown=function(){return!(!this._dropdownItemInstance||!this._parent)},e.prototype.toggle=function(){return this._opened?this.close():this.open()},e.prototype.open=function(){var e=this;if(!this._opened){this.check();var t=this.createOverlay(),n=t.getConfig();this.setPosition(n.positionStrategy),n.hasBackdrop=null==this.dropdown.hasBackdrop?!this.triggersNestedDropdown():this.dropdown.hasBackdrop,t.attach(this.getPortal()),this.dropdown.lazyContent&&this.dropdown.lazyContent.attach(this.data),this.closeSubscription=this.closingActions().subscribe(function(){return e.close()}),this.init(),this.dropdown instanceof hi&&this.dropdown.startAnimation()}},e.prototype.close=function(){this.dropdown.closed.emit()},e.prototype.focus=function(e){void 0===e&&(e="program"),this._focusMonitor?this._focusMonitor.focusVia(this._element.nativeElement,e):this._element.nativeElement.focus()},e.prototype.handleMousedown=function(e){this.openedBy=0===e.button?"mouse":null,this.triggersNestedDropdown()&&e.preventDefault()},e.prototype.handleKeydown=function(e){var t=e.key||e.keyCode;t!==a.SPACE&&t!==a.ENTER||this.open(),this.triggersNestedDropdown()&&(t===a.RIGHT_ARROW&&"ltr"===this.dir||t===a.LEFT_ARROW&&"rtl"===this.dir)&&this.open()},e.prototype.handleClick=function(e){this.triggersNestedDropdown()?(e.stopPropagation(),this.open()):this.toggle()},e.prototype.destroy=function(){var e=this;if(this.overlayRef&&this.opened){var t=this.dropdown;this.closeSubscription.unsubscribe(),this.overlayRef.detach(),t instanceof hi?(t.resetAnimation(),t.lazyContent?t.animationDone.pipe(m.filter(function(e){return"void"===e.toState}),m.take(1),m.takeUntil(t.lazyContent.attached)).subscribe({next:function(){return t.lazyContent.detach()},error:void 0,complete:function(){e.reset()}}):this.reset()):(this.reset(),t.lazyContent&&t.lazyContent.detach())}},e.prototype.init=function(){this.dropdown.parent=this.triggersNestedDropdown()?this._parent:void 0,this.dropdown.direction=this.dir,this.setIsOpened(!0),this.dropdown.focusFirstItem(this.openedBy||"program")},e.prototype.reset=function(){this.setIsOpened(!1),this.openedBy?this.triggersNestedDropdown()||this.focus(this.openedBy):this.focus(),this.openedBy=null},e.prototype.setIsOpened=function(e){this._opened=e,this._opened?this.dropdownOpened.emit():this.dropdownClosed.emit(),this.triggersNestedDropdown()&&(this._dropdownItemInstance.highlighted=e)},e.prototype.check=function(){this.dropdown||ie()},e.prototype.createOverlay=function(){if(!this.overlayRef){var e=this.getOverlayConfig();this.subscribeToPositions(e.positionStrategy),this.overlayRef=this._overlay.create(e),this.overlayRef.keydownEvents().subscribe()}return this.overlayRef},e.prototype.getOverlayConfig=function(){return new c.OverlayConfig({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withTransformOriginOn(".mc-dropdown__panel"),backdropClass:this.dropdown.backdropClass||"cdk-overlay-transparent-backdrop",scrollStrategy:this._scrollStrategy(),direction:this._dir})},e.prototype.subscribeToPositions=function(e){var t=this;this.dropdown.setPositionClasses&&e.positionChanges.subscribe(function(e){var n="start"===e.connectionPair.overlayX?"after":"before",i="top"===e.connectionPair.overlayY?"below":"above";t.dropdown.setPositionClasses(n,i)})},e.prototype.setPosition=function(e){var t="before"===this.dropdown.xPosition?["end","start","end","start"]:["start","end","start","end"],n=t[0],i=t[1],o=t[2],r=t[3],a="above"===this.dropdown.yPosition?["bottom","top","bottom","top"]:["top","bottom","top","bottom"],s=a[0],c=a[1],l=a[2],p=a[3],d=0;this.triggersNestedDropdown()?(r=n="before"===this.dropdown.xPosition?"start":"end",i=o="end"===n?"start":"end",d="bottom"===s?2:-2):(this.dropdown.overlapTriggerY||(l="top"===s?"bottom":"top",p="top"===c?"bottom":"top"),this.dropdown.overlapTriggerX||(r=n="before"===this.dropdown.xPosition?"start":"end",i=o="end"===n?"start":"end")),e.withPositions([{originX:n,originY:l,overlayX:o,overlayY:s,offsetY:d},{originX:i,originY:l,overlayX:r,overlayY:s,offsetY:d},{originX:n,originY:p,overlayX:o,overlayY:c,offsetY:-d},{originX:i,originY:p,overlayX:r,overlayY:c,offsetY:-d}])},e.prototype.cleanUpSubscriptions=function(){this.closeSubscription.unsubscribe(),this.hoverSubscription.unsubscribe()},e.prototype.closingActions=function(){var e=this,t=this.overlayRef.backdropClick(),n=this.overlayRef.detachments(),i=this._parent?this._parent.closed:o.of(),r=this._parent?this._parent.hovered().pipe(m.filter(function(t){return t!==e._dropdownItemInstance}),m.filter(function(){return e._opened})):o.of();return o.merge(t,i,r,n)},e.prototype.handleHover=function(){var e=this;this.triggersNestedDropdown()&&(this.hoverSubscription=this._parent.hovered().pipe(m.filter(function(t){return t===e._dropdownItemInstance&&!t.disabled}),m.delay(0,o.asapScheduler)).subscribe(function(){e.openedBy="mouse",e.dropdown instanceof hi&&e.dropdown.isAnimating?e.dropdown.animationDone.pipe(m.take(1),m.delay(0,o.asapScheduler),m.takeUntil(e._parent.hovered())).subscribe(function(){return e.open()}):e.open()}))},e.prototype.getPortal=function(){return this.portal&&this.portal.templateRef===this.dropdown.templateRef||(this.portal=new d.TemplatePortal(this.dropdown.templateRef,this._viewContainerRef)),this.portal},e.decorators=[{type:t.Directive,args:[{selector:"[mcDropdownTriggerFor]",host:{"aria-haspopup":"true","[attr.aria-expanded]":"opened || null","(mousedown)":"handleMousedown($event)","(keydown)":"handleKeydown($event)","(click)":"handleClick($event)"},exportAs:"mcDropdownTrigger"}]}],e.ctorParameters=function(){return[{type:c.Overlay},{type:t.ElementRef},{type:t.ViewContainerRef},{type:void 0,decorators:[{type:t.Inject,args:[mi]}]},{type:hi,decorators:[{type:t.Optional}]},{type:ci,decorators:[{type:t.Optional},{type:t.Self}]},{type:n.Directionality,decorators:[{type:t.Optional}]},{type:p.FocusMonitor}]},e.propDecorators={dropdown:[{type:t.Input,args:["mcDropdownTriggerFor"]}],data:[{type:t.Input,args:["mcDropdownTriggerData"]}],dropdownOpened:[{type:t.Output}],dropdownClosed:[{type:t.Output}]},e}(),bi=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,c.OverlayModule,wt],exports:[hi,ci,yi,oi],declarations:[hi,ci,yi,oi],providers:[gi]}]}],e}(),vi=function(){function e(e,t,n,i,r){this.elementRef=e,this.changeDetector=t,this.ngZone=n,this.listSelection=i,this.group=r,this.hasFocus=!1,this.onFocus=new o.Subject,this.onBlur=new o.Subject,this._disabled=!1,
|
12
|
-
this._selected=!1}return Object.defineProperty(e.prototype,"disabled",{get:function(){return this.listSelection&&this.listSelection.disabled||this.group&&this.group.disabled||this._disabled},set:function(e){var t=_(e);t!==this._disabled&&(this._disabled=t,this.changeDetector.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showCheckbox",{get:function(){return void 0!==this._showCheckbox?this._showCheckbox:this.listSelection.showCheckbox},set:function(e){this._showCheckbox=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selected",{get:function(){return this.listSelection.selectionModel&&this.listSelection.selectionModel.isSelected(this)||!1},set:function(e){var t=_(e);t!==this._selected&&(this.setSelected(t),this.listSelection.reportValueChange())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabIndex",{get:function(){return this.disabled?null:-1},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;if(this._selected){var t=this._selected;Promise.resolve().then(function(){(e._selected||t)&&(e.selected=!0,e.changeDetector.markForCheck())})}},e.prototype.ngOnDestroy=function(){var e=this;this.selected&&Promise.resolve().then(function(){return e.selected=!1}),this.listSelection.removeOptionFromList(this)},e.prototype.toggle=function(){this.selected=!this.selected},e.prototype.getLabel=function(){return this.text?this.text.nativeElement.textContent:""},e.prototype.setSelected=function(e){this._selected!==e&&this.listSelection.selectionModel&&(this._selected=e,e?this.listSelection.selectionModel.select(this):this.listSelection.selectionModel.deselect(this),this.changeDetector.markForCheck())},e.prototype.getHeight=function(){return this.elementRef.nativeElement.getClientRects()[0].height},e.prototype.handleClick=function(e){this.disabled||this.listSelection.setSelectedOptionsByClick(this,a.hasModifierKey(e,"shiftKey"),a.hasModifierKey(e,"ctrlKey"))},e.prototype.focus=function(){var e=this;this.hasFocus||(this.elementRef.nativeElement.focus(),this.onFocus.next({option:this}),Promise.resolve().then(function(){e.hasFocus=!0,e.changeDetector.markForCheck()}))},e.prototype.blur=function(){var e=this;this.ngZone.onStable.asObservable().pipe(m.take(1)).subscribe(function(){e.ngZone.run(function(){e.hasFocus=!1,e.onBlur.next({option:e})})})},e.prototype.getHostElement=function(){return this.elementRef.nativeElement},e.decorators=[{type:t.Component,args:[{exportAs:"mcListOption",selector:"mc-list-option",host:{"[attr.tabindex]":"tabIndex",class:"mc-list-option mc-no-select","[class.mc-selected]":"selected","[class.mc-focused]":"hasFocus","[class.mc-disabled]":"disabled","(focus)":"focus()","(blur)":"blur()","(click)":"handleClick($event)"},template:'<div class="mc-list-item-content"><mc-pseudo-checkbox *ngIf="showCheckbox" [state]="selected ? \'checked\' : \'unchecked\'" [disabled]="disabled"></mc-pseudo-checkbox><div class="mc-list-text" #text><ng-content></ng-content></div></div>',encapsulation:t.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:t.NgZone},{type:Oi,decorators:[{type:t.Inject,args:[t.forwardRef(function(){return Oi})]}]},{type:Te,decorators:[{type:t.Optional}]}]},e.propDecorators={lines:[{type:t.ContentChildren,args:[Ce]}],text:[{type:t.ViewChild,args:["text",{static:!1}]}],checkboxPosition:[{type:t.Input}],value:[{type:t.Input}],disabled:[{type:t.Input}],showCheckbox:[{type:t.Input}],selected:[{type:t.Input}]},e}(),Ci={provide:l.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return Oi}),multi:!0},_i=function(){function e(e,t){this.source=e,this.option=t}return e}(),xi=function(){function e(){}return e}(),wi=k(w(xi)),Oi=function(e){function n(n,i,r,a,s,c){var l=e.call(this)||this;return l.element=n,l.changeDetectorRef=i,l.horizontal=!1,l._tabIndex=0,l.selectionChange=new t.EventEmitter,l.destroyed=new o.Subject,l.onTouched=function(){},l.onChange=function(e){},l.autoSelect=null===a||_(a),l.noUnselect=null===s||_(s),c===Ie.CHECKBOX||c===Ie.KEYBOARD?l.multipleMode=c:null!==c&&(l.multipleMode=Ie.CHECKBOX),l.multipleMode===Ie.CHECKBOX&&(l.autoSelect=!1,l.noUnselect=!1),l._tabIndex=parseInt(r)||0,l.selectionModel=new g.SelectionModel(l.multiple),l}return v(n,e),Object.defineProperty(n.prototype,"multiple",{get:function(){return!!this.multipleMode},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"tabIndex",{get:function(){return this._tabIndex},set:function(e){this._tabIndex=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"showCheckbox",{get:function(){return this.multipleMode===Ie.CHECKBOX},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"optionFocusChanges",{get:function(){return o.merge.apply(void 0,this.options.map(function(e){return e.onFocus}))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"optionBlurChanges",{get:function(){return o.merge.apply(void 0,this.options.map(function(e){return e.onBlur}))},enumerable:!0,configurable:!0}),n.prototype.ngAfterContentInit=function(){var e=this;this.horizontal=_(this.horizontal),this.keyManager=new p.FocusKeyManager(this.options).withTypeAhead().withVerticalOrientation(!this.horizontal).withHorizontalOrientation(this.horizontal?"ltr":null),this.keyManager.tabOut.pipe(m.takeUntil(this.destroyed)).subscribe(function(){e._tabIndex=-1,setTimeout(function(){e._tabIndex=0,e.changeDetectorRef.markForCheck()})}),this.tempValues&&(this.setOptionsFromValues(this.tempValues),this.tempValues=null),this.selectionModel.changed.pipe(m.takeUntil(this.destroyed)).subscribe(function(e){for(var t=0,n=e.added;t<n.length;t++){var i=n[t];i.selected=!0}for(var o=0,r=e.removed;o<r.length;o++){var i=r[o];i.selected=!1}}),this.options.changes.pipe(m.startWith(null),m.takeUntil(this.destroyed)).subscribe(function(){e.resetOptions(),e.updateTabIndex()}),this.updateScrollSize()},n.prototype.ngOnDestroy=function(){this.destroyed.next(),this.destroyed.complete()},n.prototype.focus=function(){0!==this.options.length&&this.keyManager.setFirstItemActive()},n.prototype.blur=function(){this.hasFocusedOption()||this.keyManager.setActiveItem(-1),this.onTouched(),this.changeDetectorRef.markForCheck()},n.prototype.selectAll=function(){this.options.forEach(function(e){return e.setSelected(!0)}),this.reportValueChange()},n.prototype.deselectAll=function(){this.options.forEach(function(e){return e.setSelected(!1)}),this.reportValueChange()},n.prototype.updateScrollSize=function(){!this.horizontal&&this.options.first&&this.keyManager.withScrollSize(Math.floor(this.getHeight()/this.options.first.getHeight()))},n.prototype.setSelectedOptionsByClick=function(e,t,n){if(t&&this.multiple)this.setSelectedOptions(e);else if(n){if(!this.canDeselectLast(e))return;this.selectionModel.toggle(e)}else this.autoSelect&&(this.multipleMode!==Ie.KEYBOARD&&this.selectionModel.toggle(e),this.multipleMode!==Ie.KEYBOARD&&this.multiple||(this.options.forEach(function(e){return e.setSelected(!1)}),e.setSelected(!0)));this.emitChangeEvent(e),this.reportValueChange()},n.prototype.setSelectedOptionsByKey=function(e,t,n){if(t&&this.multiple)this.setSelectedOptions(e);else if(n){if(!this.canDeselectLast(e))return}else this.multipleMode!==Ie.KEYBOARD&&this.multiple||(this.options.forEach(function(e){return e.setSelected(!1)}),e.setSelected(!0));this.emitChangeEvent(e),this.reportValueChange()},n.prototype.setSelectedOptions=function(e){var t,n=this,i=e.selected,o=this.keyManager.previousActiveItemIndex,r=this.keyManager.previousActiveItemIndex=this.keyManager.activeItemIndex;r!==o&&(o>r&&(t=[r,o],o=t[0],r=t[1]),this.options.toArray().slice(o,r+1).filter(function(e){return!e.disabled}).forEach(function(e){e===n.keyManager.activeItem&&e.selected&&n.noUnselect||e.setSelected(!i)}))},n.prototype.writeValue=function(e){this.options?this.setOptionsFromValues(e||[]):this.tempValues=e},n.prototype.registerOnChange=function(e){this.onChange=e},n.prototype.registerOnTouched=function(e){this.onTouched=e},n.prototype.setDisabledState=function(e){this.options&&this.options.forEach(function(t){return t.disabled=e})},n.prototype.getSelectedOptionValues=function(){return this.options.filter(function(e){return e.selected}).map(function(e){return e.value})},n.prototype.toggleFocusedOption=function(){var e=this.keyManager.activeItemIndex;if(null!=e&&this.isValidIndex(e)){var t=this.options.toArray()[e];t&&this.canDeselectLast(t)&&(t.toggle(),this.emitChangeEvent(t))}},n.prototype.canDeselectLast=function(e){return!(this.noUnselect&&1===this.selectionModel.selected.length&&e.selected)},n.prototype.getHeight=function(){return this.element.nativeElement.getClientRects()[0].height},n.prototype.removeOptionFromList=function(e){if(e.hasFocus){var t=this.getOptionIndex(e);t>0?this.keyManager.setPreviousItemActive():0===t&&this.options.length>1&&this.keyManager.setNextItemActive()}},n.prototype.onKeyDown=function(e){switch(e.keyCode){case a.SPACE:case a.ENTER:this.toggleFocusedOption();break;case a.TAB:return void this.keyManager.tabOut.next();case a.DOWN_ARROW:this.keyManager.setNextItemActive();break;case a.UP_ARROW:this.keyManager.setPreviousItemActive();break;case a.HOME:this.keyManager.setFirstItemActive();break;case a.END:this.keyManager.setLastItemActive();break;case a.PAGE_UP:this.keyManager.setPreviousPageItemActive();break;case a.PAGE_DOWN:this.keyManager.setNextPageItemActive();break;default:return}e.preventDefault(),this.setSelectedOptionsByKey(this.keyManager.activeItem,a.hasModifierKey(e,"shiftKey"),a.hasModifierKey(e,"ctrlKey"))},n.prototype.reportValueChange=function(){this.options&&this.onChange(this.getSelectedOptionValues())},n.prototype.emitChangeEvent=function(e){this.selectionChange.emit(new _i(this,e))},n.prototype.updateTabIndex=function(){this._tabIndex=0===this.options.length?-1:0},n.prototype.resetOptions=function(){this.dropSubscriptions(),this.listenToOptionsFocus()},n.prototype.dropSubscriptions=function(){this.optionFocusSubscription&&(this.optionFocusSubscription.unsubscribe(),this.optionFocusSubscription=null),this.optionBlurSubscription&&(this.optionBlurSubscription.unsubscribe(),this.optionBlurSubscription=null)},n.prototype.listenToOptionsFocus=function(){var e=this;this.optionFocusSubscription=this.optionFocusChanges.subscribe(function(t){var n=e.options.toArray().indexOf(t.option);e.isValidIndex(n)&&e.keyManager.updateActiveItem(n)}),this.optionBlurSubscription=this.optionBlurChanges.subscribe(function(){return e.blur()})},n.prototype.hasFocusedOption=function(){return this.options.some(function(e){return e.hasFocus})},n.prototype.getOptionByValue=function(e){return this.options.find(function(t){return t.value===e})},n.prototype.setOptionsFromValues=function(e){var t=this;this.options.forEach(function(e){return e.setSelected(!1)}),e.map(function(e){return t.getOptionByValue(e)}).filter(Boolean).forEach(function(e){return e.setSelected(!0)})},n.prototype.isValidIndex=function(e){return e>=0&&e<this.options.length},n.prototype.getOptionIndex=function(e){return this.options.toArray().indexOf(e)},n.decorators=[{type:t.Component,args:[{exportAs:"mcListSelection",selector:"mc-list-selection",template:"<ng-content></ng-content>",styles:[".mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mc-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mc-divider.mc-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mc-divider.mc-divider-inset{margin-left:80px}[dir=rtl] .mc-divider.mc-divider-inset{margin-left:auto;margin-right:80px}.mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mc-list,.mc-list-selection{display:block;outline:0}.mc-list .mc-subheader,.mc-list-selection .mc-subheader{display:flex;box-sizing:border-box;height:28px;line-height:-2px;padding:15px;align-items:center}.mc-list .mc-subheader:first-child,.mc-list-selection .mc-subheader:first-child{margin-top:0}.mc-list .mc-list .mc-subheader,.mc-list .mc-list-selection .mc-subheader,.mc-list-selection .mc-list .mc-subheader,.mc-list-selection .mc-list-selection .mc-subheader{margin:0}.mc-list-item,.mc-list-option{display:block;height:28px;border:2px solid transparent}.mc-list-item .mc-list-item-content,.mc-list-option .mc-list-item-content{position:relative;box-sizing:border-box;display:flex;flex-direction:row;align-items:center;height:100%;padding:0 15px}.mc-list-item.mc-2-line,.mc-list-option.mc-2-line{height:72px}.mc-list-item.mc-3-line,.mc-list-option.mc-3-line{height:88px}.mc-list-item.mc-multi-line,.mc-list-option.mc-multi-line{height:auto}.mc-list-item.mc-multi-line .mc-list-item-content,.mc-list-option.mc-multi-line .mc-list-item-content{padding-top:16px;padding-bottom:16px}.mc-list-item .mc-list-text,.mc-list-option .mc-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden;padding:0}.mc-list-item .mc-list-text>*,.mc-list-option .mc-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mc-list-item .mc-list-text:empty,.mc-list-option .mc-list-text:empty{display:none}.mc-list-item .mc-list-item-content .mc-list-text:not(:nth-child(2)),.mc-list-option .mc-list-item-content .mc-list-text:not(:nth-child(2)){padding-right:0}[dir=rtl] .mc-list-item .mc-list-item-content .mc-list-text:not(:nth-child(2)),[dir=rtl] .mc-list-option .mc-list-item-content .mc-list-text:not(:nth-child(2)){padding-left:0}.mc-list-item .mc-list-icon,.mc-list-option .mc-list-icon{box-sizing:content-box;flex-shrink:0;width:24px;height:24px;border-radius:50%;padding:4px;font-size:24px}.mc-list-item .mc-list-icon~.mc-divider-inset,.mc-list-option .mc-list-icon~.mc-divider-inset{margin-left:62px;width:calc(100% - 62px)}[dir=rtl] .mc-list-item .mc-list-icon~.mc-divider-inset,[dir=rtl] .mc-list-option .mc-list-icon~.mc-divider-inset{margin-left:auto;margin-right:62px}.mc-list-item .mc-divider,.mc-list-option .mc-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mc-list-item .mc-divider,[dir=rtl] .mc-list-option .mc-divider{margin-left:auto;margin-right:0}.mc-list-item .mc-divider.mc-divider-inset,.mc-list-option .mc-divider.mc-divider-inset{position:absolute}.mc-list-item .mc-pseudo-checkbox,.mc-list-option .mc-pseudo-checkbox{margin-right:8px}.mc-list-option:not([disabled]):not(.mc-disabled){cursor:pointer}"],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,inputs:["disabled"],host:{"[attr.tabindex]":"tabIndex",class:"mc-list-selection","(focus)":"focus()","(blur)":"blur()","(keydown)":"onKeyDown($event)","(window:resize)":"updateScrollSize()"},providers:[Ci],preserveWhitespaces:!1}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:String,decorators:[{type:t.Attribute,args:["tabindex"]}]},{type:String,decorators:[{type:t.Attribute,args:["auto-select"]}]},{type:String,decorators:[{type:t.Attribute,args:["no-unselect"]}]},{type:String,decorators:[{type:t.Attribute,args:["multiple"]}]}]},n.propDecorators={options:[{type:t.ContentChildren,args:[vi,{descendants:!0}]}],horizontal:[{type:t.Input}],tabIndex:[{type:t.Input}],selectionChange:[{type:t.Output}]},n}(wi),ki=function(){function e(){}return e}(),Ii=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return v(n,e),n.decorators=[{type:t.Component,args:[{selector:"mc-list",host:{class:"mc-list"},template:"<ng-content></ng-content>",styles:[".mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mc-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mc-divider.mc-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mc-divider.mc-divider-inset{margin-left:80px}[dir=rtl] .mc-divider.mc-divider-inset{margin-left:auto;margin-right:80px}.mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mc-list,.mc-list-selection{display:block;outline:0}.mc-list .mc-subheader,.mc-list-selection .mc-subheader{display:flex;box-sizing:border-box;height:28px;line-height:-2px;padding:15px;align-items:center}.mc-list .mc-subheader:first-child,.mc-list-selection .mc-subheader:first-child{margin-top:0}.mc-list .mc-list .mc-subheader,.mc-list .mc-list-selection .mc-subheader,.mc-list-selection .mc-list .mc-subheader,.mc-list-selection .mc-list-selection .mc-subheader{margin:0}.mc-list-item,.mc-list-option{display:block;height:28px;border:2px solid transparent}.mc-list-item .mc-list-item-content,.mc-list-option .mc-list-item-content{position:relative;box-sizing:border-box;display:flex;flex-direction:row;align-items:center;height:100%;padding:0 15px}.mc-list-item.mc-2-line,.mc-list-option.mc-2-line{height:72px}.mc-list-item.mc-3-line,.mc-list-option.mc-3-line{height:88px}.mc-list-item.mc-multi-line,.mc-list-option.mc-multi-line{height:auto}.mc-list-item.mc-multi-line .mc-list-item-content,.mc-list-option.mc-multi-line .mc-list-item-content{padding-top:16px;padding-bottom:16px}.mc-list-item .mc-list-text,.mc-list-option .mc-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden;padding:0}.mc-list-item .mc-list-text>*,.mc-list-option .mc-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mc-list-item .mc-list-text:empty,.mc-list-option .mc-list-text:empty{display:none}.mc-list-item .mc-list-item-content .mc-list-text:not(:nth-child(2)),.mc-list-option .mc-list-item-content .mc-list-text:not(:nth-child(2)){padding-right:0}[dir=rtl] .mc-list-item .mc-list-item-content .mc-list-text:not(:nth-child(2)),[dir=rtl] .mc-list-option .mc-list-item-content .mc-list-text:not(:nth-child(2)){padding-left:0}.mc-list-item .mc-list-icon,.mc-list-option .mc-list-icon{box-sizing:content-box;flex-shrink:0;width:24px;height:24px;border-radius:50%;padding:4px;font-size:24px}.mc-list-item .mc-list-icon~.mc-divider-inset,.mc-list-option .mc-list-icon~.mc-divider-inset{margin-left:62px;width:calc(100% - 62px)}[dir=rtl] .mc-list-item .mc-list-icon~.mc-divider-inset,[dir=rtl] .mc-list-option .mc-list-icon~.mc-divider-inset{margin-left:auto;margin-right:62px}.mc-list-item .mc-divider,.mc-list-option .mc-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mc-list-item .mc-divider,[dir=rtl] .mc-list-option .mc-divider{margin-left:auto;margin-right:0}.mc-list-item .mc-divider.mc-divider-inset,.mc-list-option .mc-divider.mc-divider-inset{position:absolute}.mc-list-item .mc-pseudo-checkbox,.mc-list-option .mc-pseudo-checkbox{margin-right:8px}.mc-list-option:not([disabled]):not(.mc-disabled){cursor:pointer}"],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None}]}],n}(ki),Si=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"[mc-subheader], [mcSubheader]",host:{class:"mc-subheader"}}]}],e}(),Di=function(){function e(){}return e}(),Ei=function(e){function n(t){var n=e.call(this)||this;return n._element=t,n}return v(n,e),n.prototype.ngAfterContentInit=function(){this.lineSetter=new _e(this.lines,this._element)},n.prototype.handleFocus=function(){this._element.nativeElement.classList.add("mc-focused")},n.prototype.handleBlur=function(){this._element.nativeElement.classList.remove("mc-focused")},n.prototype.getHostElement=function(){return this._element.nativeElement},n.decorators=[{type:t.Component,args:[{selector:"mc-list-item, a[mc-list-item]",host:{class:"mc-list-item","(focus)":"handleFocus()","(blur)":"handleBlur()"},template:'<div class="mc-list-item-content"><ng-content select="[mc-list-icon], [mcListIcon]"></ng-content><div class="mc-list-text"><ng-content select="[mc-line], [mcLine]"></ng-content></div><ng-content></ng-content></div>',encapsulation:t.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],n.ctorParameters=function(){return[{type:t.ElementRef}]},n.propDecorators={lines:[{type:t.ContentChildren,args:[Ce]}]},n}(Di),Pi=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule,Se,xe,Le],exports:[Ii,Oi,Ei,vi,Le,Si],declarations:[Ii,Oi,Ei,vi,Si]}]}],e}(),Mi=function(){function e(e){this.elementRef=e}return e}(),Ti=k(w(Mi)),Ai=function(e){function n(t,n,i,o){var r=e.call(this,t)||this;return r.focusMonitor=n,r.changeDetector=i,r._disabled=!1,r.tabIndex=parseInt(o)||0,r.focusMonitor.monitor(t.nativeElement,!0),r}return v(n,e),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled},set:function(e){var t=_(e);t!==this._disabled&&(this._disabled=t,this.changeDetector.markForCheck())},enumerable:!0,configurable:!0}),n.prototype.ngOnDestroy=function(){this.focusMonitor.stopMonitoring(this.elementRef.nativeElement)},n.prototype.focus=function(){this.getHostElement().focus()},n.prototype.getHostElement=function(){return this.elementRef.nativeElement},n.decorators=[{type:t.Directive,args:[{selector:"a.mc-link",exportAs:"mcLink",inputs:["disabled"],host:{"[attr.disabled]":"disabled || null","[attr.tabindex]":"tabIndex"}}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:p.FocusMonitor},{type:t.ChangeDetectorRef},{type:String,decorators:[{type:t.Attribute,args:["tabindex"]}]}]},n.propDecorators={disabled:[{type:t.Input}]},n}(Ti),Ri=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule],declarations:[Ai],exports:[Ai]}]}],e}(),Vi=function(){function e(e){this.parentService=e,this.rootOpenModals=this.parentService?null:[],this.rootAfterAllClose=this.parentService?null:new o.Subject,this.rootRegisteredMetaMap=this.parentService?null:new Map}return Object.defineProperty(e.prototype,"afterAllClose",{get:function(){return this.parentService?this.parentService.afterAllClose:this.rootAfterAllClose},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"openModals",{get:function(){return this.parentService?this.parentService.openModals:this.rootOpenModals},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"registeredMetaMap",{get:function(){return this.parentService?this.parentService.registeredMetaMap:this.rootRegisteredMetaMap},enumerable:!0,configurable:!0}),e.prototype.registerModal=function(e){var t=this;if(!this.hasRegistered(e)){var n=e.afterOpen.subscribe(function(){return t.openModals.push(e)}),i=e.afterClose.subscribe(function(){return t.removeOpenModal(e)});this.registeredMetaMap.set(e,{modalRef:e,afterOpenSubscription:n,afterCloseSubscription:i})}},e.prototype.hasRegistered=function(e){return this.registeredMetaMap.has(e)},e.prototype.closeAll=function(){for(var e=this.openModals.length;e--;)this.openModals[e].close()},e.prototype.removeOpenModal=function(e){var t=this.openModals.indexOf(e);t>-1&&(this.openModals.splice(t,1),this.openModals.length||this.afterAllClose.next())},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:e,decorators:[{type:t.Optional},{type:t.SkipSelf}]}]},e}(),Fi=function(){function e(){}return e}(),Li=function(){function e(e){this.document=e,this.lastPosition={x:-1,y:-1},this.listenDocumentClick()}return e.prototype.getLastClickPosition=function(){return this.lastPosition},e.prototype.listenDocumentClick=function(){var e=this;this.document.addEventListener("click",function(t){e.lastPosition={x:t.clientX,y:t.clientY}})},e}(),Ni=new Li(document),ji=function(e){function n(n,i,o,r,a,s,c,l){var p=e.call(this)||this;return p.overlay=n,p.renderer=i,p.cfr=o,p.elementRef=r,p.viewContainer=a,p.modalControl=s,p.changeDetector=c,p.document=l,p.mcModalType="default",p._mcVisible=!1,p.mcVisibleChange=new t.EventEmitter,p.mcZIndex=1e3,p.mcWidth=480,p.mcCloseByESC=!0,p._mcClosable=!0,p._mcMask=!0,p._mcMaskClosable=!1,p.mcAfterOpen=new t.EventEmitter,p.mcAfterClose=new t.EventEmitter,p.mcOkType="primary",p._mcOkLoading=!1,p.mcOnOk=new t.EventEmitter,p._mcCancelLoading=!1,p.mcOnCancel=new t.EventEmitter,p.transformOrigin="0px 0px 0px",p.mcGetContainer=function(){return p.overlay.create()},p}return v(n,e),Object.defineProperty(n.prototype,"mcVisible",{get:function(){return this._mcVisible},set:function(e){this._mcVisible=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"mcClosable",{get:function(){return this._mcClosable},set:function(e){this._mcClosable=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"mcMask",{get:function(){return this._mcMask},set:function(e){this._mcMask=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"mcMaskClosable",{get:function(){return this._mcMaskClosable},set:function(e){this._mcMaskClosable=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"mcOkLoading",{get:function(){return this._mcOkLoading},set:function(e){this._mcOkLoading=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"mcCancelLoading",{get:function(){return this._mcCancelLoading},set:function(e){this._mcCancelLoading=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"afterOpen",{get:function(){return this.mcAfterOpen.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"afterClose",{get:function(){return this.mcAfterClose.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"okText",{get:function(){return this.mcOkText},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"cancelText",{get:function(){return this.mcCancelText},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hidden",{get:function(){return!this.mcVisible&&!this.animationState},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){this.isComponent(this.mcContent)&&this.createDynamicComponent(this.mcContent),this.isModalButtons(this.mcFooter)&&(this.mcFooter=this.formatModalButtons(this.mcFooter)),this.isComponent(this.mcComponent)&&this.createDynamicComponent(this.mcComponent),this.container="function"==typeof this.mcGetContainer?this.mcGetContainer():this.mcGetContainer,this.container instanceof HTMLElement?this.container.appendChild(this.elementRef.nativeElement):this.container instanceof c.OverlayRef&&this.container.overlayElement.appendChild(this.elementRef.nativeElement),this.modalControl.registerModal(this)},n.prototype.ngOnChanges=function(e){e.mcVisible&&this.handleVisibleStateChange(this.mcVisible,!e.mcVisible.firstChange)},n.prototype.ngAfterViewInit=function(){this.contentComponentRef&&this.bodyContainer.insert(this.contentComponentRef.hostView);for(var e=0,t=this.autoFocusedButtons.toArray();e<t.length;e++){var n=t[e];if(n.nativeElement.autofocus){n.nativeElement.focus();break}}},n.prototype.ngOnDestroy=function(){this.container instanceof c.OverlayRef&&this.container.dispose()},n.prototype.open=function(){this.changeVisibleFromInside(!0)},n.prototype.close=function(e){this.changeVisibleFromInside(!1,e)},n.prototype.destroy=function(e){this.close(e)},n.prototype.markForCheck=function(){this.changeDetector.markForCheck()},n.prototype.triggerOk=function(){this.onClickOkCancel("ok")},n.prototype.triggerCancel=function(){this.onClickOkCancel("cancel")},n.prototype.getInstance=function(){return this},n.prototype.getContentComponentRef=function(){return this.contentComponentRef},n.prototype.getContentComponent=function(){return this.contentComponentRef&&this.contentComponentRef.instance},n.prototype.getElement=function(){return this.elementRef&&this.elementRef.nativeElement},n.prototype.onClickMask=function(e){this.mcMask&&this.mcMaskClosable&&e.target.classList.contains("mc-modal-wrap")&&this.mcVisible&&this.onClickOkCancel("cancel")},n.prototype.isModalType=function(e){return this.mcModalType===e},n.prototype.onKeyDown=function(e){e.keyCode===a.ESCAPE&&this.container&&this.container instanceof c.OverlayRef&&(this.close(),e.preventDefault())},n.prototype.onClickCloseBtn=function(){this.mcVisible&&this.onClickOkCancel("cancel")},n.prototype.onClickOkCancel=function(e){var n=this,i={ok:this.mcOnOk,cancel:this.mcOnCancel}[e],o={ok:"mcOkLoading",cancel:"mcCancelLoading"}[e];if(i instanceof t.EventEmitter)i.emit(this.getContentComponent());else if("function"==typeof i){var r=i(this.getContentComponent()),a=function(e){return!1!==e&&n.close(e)};if(ce(r)){this[o]=!0;var s=function(e){n[o]=!1,a(e)};r.then(s).catch(s)}else a(r)}},n.prototype.isNonEmptyString=function(e){return"string"==typeof e&&""!==e},n.prototype.isTemplateRef=function(e){return e instanceof t.TemplateRef},n.prototype.isComponent=function(e){return e instanceof t.Type},n.prototype.isModalButtons=function(e){return Array.isArray(e)&&e.length>0},n.prototype.getButtonCallableProp=function(e,t){var n=e[t],i=[];return this.contentComponentRef&&i.push(this.contentComponentRef.instance),"function"==typeof n?n.apply(e,i):n},n.prototype.onButtonClick=function(e){var t=this.getButtonCallableProp(e,"onClick");ce(t)&&(e.loading=!0,t.then(function(){return e.loading=!1}).catch(function(){return e.loading=!1}))},n.prototype.handleVisibleStateChange=function(e,t,n){var i=this;return void 0===t&&(t=!0),e&&this.changeBodyOverflow(1),Promise.resolve(t&&this.animateTo(e)).then(function(){e?i.mcAfterOpen.emit():(i.mcAfterClose.emit(n),i.changeBodyOverflow())})},n.prototype.changeVisibleFromInside=function(e,t){return this.mcVisible!==e?(this.mcVisible=e,this.mcVisibleChange.emit(e),this.handleVisibleStateChange(e,!0,t)):Promise.resolve()},n.prototype.changeAnimationState=function(e){var t,n;this.animationState=e,e?(this.maskAnimationClassMap=(t={},t["fade-"+e]=!0,t["fade-"+e+"-active"]=!0,t),this.modalAnimationClassMap=(n={},n["zoom-"+e]=!0,n["zoom-"+e+"-active"]=!0,n)):this.maskAnimationClassMap=this.modalAnimationClassMap=null,this.contentComponentRef?this.contentComponentRef.changeDetectorRef.markForCheck():this.changeDetector.markForCheck()},n.prototype.animateTo=function(e){var t=this;return e&&window.setTimeout(function(){return t.updateTransformOrigin()}),this.changeAnimationState(e?"enter":"leave"),new Promise(function(e){return window.setTimeout(function(){t.changeAnimationState(null),e()},200)})},n.prototype.formatModalButtons=function(e){return e.map(function(e){return fe({type:"default",size:"default",autoLoading:!0,show:!0,loading:!1,disabled:!1},e)})},n.prototype.createDynamicComponent=function(e){var n=this.cfr.resolveComponentFactory(e),i=t.Injector.create({providers:[{provide:Fi,useValue:this}],parent:this.viewContainer.injector});this.contentComponentRef=n.create(i),this.mcComponentParams&&Object.assign(this.contentComponentRef.instance,this.mcComponentParams),this.contentComponentRef.changeDetectorRef.detectChanges()},n.prototype.updateTransformOrigin=function(){var e=this.modalContainer.nativeElement,t=Ni.getLastClickPosition();t&&(this.transformOrigin=t.x-e.offsetLeft+"px "+(t.y-e.offsetTop)+"px 0px")},n.prototype.changeBodyOverflow=function(e){void 0===e&&(e=0),this.modalControl.openModals.length+e>0?this.renderer.setStyle(this.document.body,"overflow","hidden"):this.renderer.removeStyle(this.document.body,"overflow")},n.decorators=[{type:t.Component,args:[{selector:"mc-modal",
|
13
|
-
template:'<ng-template #tplOriginContent><ng-content></ng-content></ng-template><div><div *ngIf="mcMask" class="mc-modal-mask" [ngClass]="maskAnimationClassMap" [class.mc-modal-mask-hidden]="hidden" [ngStyle]="mcMaskStyle" [style.zIndex]="mcZIndex"></div><div (mousedown)="onClickMask($event)" class="mc-modal-wrap {{ mcWrapClassName }}" [style.zIndex]="mcZIndex" [style.display]="hidden ? \'none\' : \'\'" tabindex="-1" role="dialog"><div #modalContainer class="mc-modal {{ mcClassName }}" [ngClass]="modalAnimationClassMap" [ngStyle]="mcStyle" [style.width]="mcWidth | toCssUnit" [style.transform-origin]="transformOrigin" role="document"><div class="mc-modal-content" cdkTrapFocus><button *ngIf="mcClosable" mc-button (click)="onClickCloseBtn()" class="mc-modal-close mc-button_transparent" aria-label="Close"><i mc-icon="mc-close-L_16" class="mc-icon mc-icon_light" color="second"></i></button><ng-container [ngSwitch]="true"><ng-container *ngSwitchCase="isModalType(\'default\')" [ngTemplateOutlet]="tplContentDefault"></ng-container><ng-container *ngSwitchCase="isModalType(\'confirm\')" [ngTemplateOutlet]="tplContentConfirm"></ng-container><ng-container *ngSwitchCase="isModalType(\'custom\')" [ngTemplateOutlet]="tplContentCustom"></ng-container></ng-container></div></div></div></div><ng-template #tplContentCustom><ng-container #bodyContainer></ng-container></ng-template><ng-template #tplContentDefault><div *ngIf="mcTitle" class="mc-modal-header"><div class="mc-modal-title"><ng-container [ngSwitch]="true"><ng-container *ngSwitchCase="isTemplateRef(mcTitle)" [ngTemplateOutlet]="mcTitle"></ng-container><ng-container *ngSwitchCase="isNonEmptyString(mcTitle)"><div [innerHTML]="mcTitle"></div></ng-container></ng-container></div></div><div class="mc-modal-body" [ngStyle]="mcBodyStyle"><ng-container #bodyContainer><ng-container *ngIf="!isComponent(mcContent)" [ngSwitch]="true"><ng-container *ngSwitchCase="isTemplateRef(mcContent)" [ngTemplateOutlet]="mcContent"></ng-container><ng-container *ngSwitchCase="isNonEmptyString(mcContent)"><div [innerHTML]="mcContent"></div></ng-container><ng-container *ngSwitchDefault [ngTemplateOutlet]="tplOriginContent"></ng-container></ng-container></ng-container></div><div *ngIf="mcFooter !== null" class="mc-modal-footer"><ng-container [ngSwitch]="true"><ng-container *ngSwitchCase="isTemplateRef(mcFooter)" [ngTemplateOutlet]="mcFooter"></ng-container><ng-container *ngSwitchCase="isNonEmptyString(mcFooter)"><div [innerHTML]="mcFooter"></div></ng-container><ng-container *ngSwitchCase="isModalButtons(mcFooter)"><ng-container *ngFor="let button of mcFooter"><button mc-button #autoFocusedButton [attr.autofocus]="button.autoFocus" *ngIf="getButtonCallableProp(button, \'show\')" [disabled]="getButtonCallableProp(button, \'disabled\')" [class.mc-progress]="getButtonCallableProp(button, \'loading\')" (click)="onButtonClick(button)" [color]="button.type">{{ button.label }}</button></ng-container></ng-container><ng-container *ngSwitchDefault><button #autoFocusedButton [attr.autofocus]="true" *ngIf="mcOkText !== null" mc-button color="primary" (click)="onClickOkCancel(\'ok\')">{{ okText }}</button> <button *ngIf="mcCancelText!==null" mc-button (click)="onClickOkCancel(\'cancel\')">{{ cancelText }}</button></ng-container></ng-container></div></ng-template><ng-template #tplContentConfirm><div class="mc-modal-body" [ngStyle]="mcBodyStyle"><div class="mc-confirm-body-wrapper"><div class="mc-confirm-body"><div class="mc-confirm-content"><ng-container #bodyContainer><ng-container *ngIf="!isComponent(mcContent)" [ngSwitch]="true"><ng-container *ngSwitchCase="isTemplateRef(mcContent)" [ngTemplateOutlet]="mcContent"></ng-container><ng-container *ngSwitchCase="isNonEmptyString(mcContent)"><div [innerHTML]="mcContent"></div></ng-container><ng-container *ngSwitchDefault [ngTemplateOutlet]="tplOriginContent"></ng-container></ng-container></ng-container></div></div></div></div><div class="mc-confirm-btns"><button mc-button #autoFocusedButton [color]="mcOkType" [attr.autofocus]="true" *ngIf="mcOkText !== \'\'" (click)="onClickOkCancel(\'ok\')">{{ okText }}</button> <button mc-button color="second" *ngIf="mcCancelText!==\'\'" (click)="onClickOkCancel(\'cancel\')">{{ cancelText }}</button></div></ng-template>',styles:['@keyframes mcFadeIn{0%{opacity:0}100%{opacity:1}}@keyframes mcFadeOut{0%{opacity:1}100%{opacity:0}}@keyframes mcZoomIn{0%{opacity:0;transform:translate(0,-25%)}100%{opacity:1;transform:scale(1)}}@keyframes mcZoomOut{0%{transform:scale(1)}100%{opacity:0;transform:translate(0,-30%)}}.fade-appear,.fade-enter{animation-duration:.3s;animation-fill-mode:both;animation-play-state:paused}.fade-leave{animation-duration:.3s;animation-fill-mode:both;animation-play-state:paused}.fade-appear.fade-appear-active,.fade-enter.fade-enter-active{animation-name:mcFadeIn;animation-play-state:running}.fade-leave.fade-leave-active{animation-name:mcFadeOut;animation-play-state:running;pointer-events:none}.className-appear,.className-enter{opacity:0;animation-timing-function:ease-out}.className-leave{animation-timing-function:ease-out}.zoom-appear,.zoom-enter{animation-duration:.3s;animation-fill-mode:both;animation-play-state:paused}.zoom-leave{animation-duration:.3s;animation-fill-mode:both;animation-play-state:paused}.zoom-appear.zoom-appear-active,.zoom-enter.zoom-enter-active{animation-name:mcZoomIn;animation-play-state:running}.zoom-leave.zoom-leave-active{animation-name:mcZoomOut;animation-play-state:running;pointer-events:none}.className-appear,.className-enter{transform:translate(0,-25%);animation-timing-function:cubic-bezier(.075,.82,.165,1)}.className-leave{transform:translate(0,0);animation-timing-function:cubic-bezier(.785,.135,.15,.86)}.mc-confirm .mc-modal-header{display:none}.mc-confirm .mc-modal-close{display:none}.mc-confirm .mc-modal-body{padding:24px}.mc-confirm-body-wrapper{zoom:1}.mc-confirm-body-wrapper:after,.mc-confirm-body-wrapper:before{content:"";display:table}.mc-confirm-body-wrapper:after{clear:both}.mc-confirm-body .mc-confirm-title{display:block;overflow:auto}.mc-confirm .mc-confirm-btns{border-radius:0 0 4px 4px;text-align:right}.mc-confirm .mc-confirm-btns button+button{margin:16px 16px 16px}.mc-modal{box-sizing:border-box;position:relative;top:48px;width:auto;margin:0 auto;padding:0 0 24px 0;list-style:none}.mc-modal.zoom-appear,.mc-modal.zoom-enter{animation-duration:.3s;transform:none;opacity:0}.mc-modal .mc-modal-close{position:absolute;z-index:10;top:0;right:0;width:56px;height:56px}.mc-modal-wrap{position:fixed;z-index:1000;top:0;right:0;bottom:0;left:0;overflow:auto;-webkit-overflow-scrolling:touch;outline:0}.mc-modal-title{margin:0}.mc-modal-content{position:relative;border-radius:4px;background-clip:padding-box;background-color:#fff}.mc-modal-header{padding:14px 16px;display:block;border-radius:4px 4px 0 0}.mc-modal-body{display:block;padding:16px 24px 24px 24px;max-height:calc(100vh - 260px);word-wrap:break-word;overflow-y:auto}.mc-modal-footer{display:block;padding:16px 16px;border-radius:0 0 4px 4px;text-align:right}.mc-modal-footer button+button{margin-left:16px;margin-bottom:0}.mc-modal-mask{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0;height:100%;background-color:rgba(0,0,0,.5)}.mc-modal-mask.mc-modal-mask-hidden{display:none}.mc-modal-open{overflow:hidden}'],encapsulation:t.ViewEncapsulation.None,host:{"(keydown)":"onKeyDown($event)"}}]}],n.ctorParameters=function(){return[{type:c.Overlay},{type:t.Renderer2},{type:t.ComponentFactoryResolver},{type:t.ElementRef},{type:t.ViewContainerRef},{type:Vi},{type:t.ChangeDetectorRef},{type:void 0,decorators:[{type:t.Inject,args:[r.DOCUMENT]}]}]},n.propDecorators={mcModalType:[{type:t.Input}],mcComponent:[{type:t.Input}],mcContent:[{type:t.Input}],mcComponentParams:[{type:t.Input}],mcFooter:[{type:t.Input}],mcVisible:[{type:t.Input}],mcVisibleChange:[{type:t.Output}],mcZIndex:[{type:t.Input}],mcWidth:[{type:t.Input}],mcWrapClassName:[{type:t.Input}],mcClassName:[{type:t.Input}],mcStyle:[{type:t.Input}],mcTitle:[{type:t.Input}],mcCloseByESC:[{type:t.Input}],mcClosable:[{type:t.Input}],mcMask:[{type:t.Input}],mcMaskClosable:[{type:t.Input}],mcMaskStyle:[{type:t.Input}],mcBodyStyle:[{type:t.Input}],mcAfterOpen:[{type:t.Output}],mcAfterClose:[{type:t.Output}],mcOkText:[{type:t.Input}],mcOkType:[{type:t.Input}],mcOkLoading:[{type:t.Input}],mcOnOk:[{type:t.Input},{type:t.Output}],mcCancelText:[{type:t.Input}],mcCancelLoading:[{type:t.Input}],mcOnCancel:[{type:t.Input},{type:t.Output}],modalContainer:[{type:t.ViewChild,args:["modalContainer",{static:!0}]}],bodyContainer:[{type:t.ViewChild,args:["bodyContainer",{read:t.ViewContainerRef,static:!1}]}],autoFocusedButtons:[{type:t.ViewChildren,args:["autoFocusedButton",{read:t.ElementRef}]}],mcGetContainer:[{type:t.Input}]},n}(Fi),Bi=function(){function e(){}return e.prototype.transform=function(e,t){void 0===t&&(t="px");var n=+e;return isNaN(n)?""+e:""+n+t},e.decorators=[{type:t.Pipe,args:[{name:"toCssUnit"}]}],e}(),zi=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"[mc-modal-title], mc-modal-title, [mcModalTitle]",host:{class:"mc-modal-header mc-modal-title"}}]}],e}(),Wi=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"[mc-modal-body], mc-modal-body, [mcModalBody]",host:{class:"mc-modal-body"}}]}],e}(),Yi=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"[mc-modal-footer], mc-modal-footer, [mcModalFooter]",host:{class:"mc-modal-footer"}}]}],e}(),Hi=function(){function e(e,t){var n=this;void 0===t&&(t={}),this.overlay=e,this.createModal(),"mcGetContainer"in t||(t.mcGetContainer=void 0),this.changeProps(t),this.modalRef.instance.open(),this.modalRef.instance.mcAfterClose.subscribe(function(){return n.destroyModal()}),this.overlayRef.keydownEvents().pipe(m.filter(function(e){return e.keyCode===a.ESCAPE&&t.mcCloseByESC})).subscribe(function(){return n.modalRef.instance.close()})}return e.prototype.getInstance=function(){return this.modalRef&&this.modalRef.instance},e.prototype.destroyModal=function(){this.modalRef&&(this.overlayRef.dispose(),this.modalRef=null)},e.prototype.changeProps=function(e){this.modalRef&&Object.assign(this.modalRef.instance,e)},e.prototype.createModal=function(){this.overlayRef=this.overlay.create(),this.modalRef=this.overlayRef.attach(new d.ComponentPortal(ji))},e}(),Ki=function(){function e(e,t){this.overlay=e,this.modalControl=t}return Object.defineProperty(e.prototype,"openModals",{get:function(){return this.modalControl.openModals},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"afterAllClose",{get:function(){return this.modalControl.afterAllClose.asObservable()},enumerable:!0,configurable:!0}),e.prototype.closeAll=function(){this.modalControl.closeAll()},e.prototype.create=function(e){return void 0===e&&(e={}),"function"!=typeof e.mcOnCancel&&(e.mcOnCancel=function(){}),"mcCloseByESC"in e||(e.mcCloseByESC=!0),"mcWidth"in e||(e.mcWidth=480),new Hi(this.overlay,e).getInstance()},e.prototype.confirm=function(e,t){return void 0===e&&(e={}),void 0===t&&(t="confirm"),"mcFooter"in e&&console.warn('The Confirm-Modal doesn\'t support "mcFooter", this property will be ignored.'),"function"!=typeof e.mcOnOk&&(e.mcOnOk=function(){}),e.mcModalType="confirm",e.mcClassName="mc-confirm mc-confirm-"+t+" "+(e.mcClassName||""),this.create(e)},e.prototype.open=function(e){return void 0===e&&(e={}),e.mcModalType="custom",this.create(e)},e.prototype.success=function(e){return void 0===e&&(e={}),this.simpleConfirm(e,"success")},e.prototype.delete=function(e){return void 0===e&&(e={}),this.simpleConfirm(e,"warn")},e.prototype.simpleConfirm=function(e,t){return void 0===e&&(e={}),"mcCancelText"in e||(e.mcCancelText=null),this.confirm(e,t)},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:c.Overlay},{type:Vi}]},e}(),Ui=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,c.OverlayModule,y.A11yModule,Qt,wt],exports:[ji,zi,Wi,Yi],declarations:[ji,zi,Wi,Yi,Bi],entryComponents:[ji],providers:[Vi,Ki]}]}],e}(),Gi="mc-navbar-container",Xi="mc-navbar-item",qi="mc-navbar-brand",$i="mc-navbar-title",Zi=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-navbar-logo",host:{class:"mc-navbar-logo"}}]}],e}(),Qi=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:qi,host:{class:qi}}]}],e}(),Ji=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:$i,host:{class:$i}}]}],e}(),eo=function(){function e(e){this.elementRef=e}return e}(),to=w(eo),no=function(e){function n(t,n){var i=e.call(this,t)||this;return i.elementRef=t,i._focusMonitor=n,i.tabIndex=0,i}return v(n,e),Object.defineProperty(n.prototype,"collapsedTitle",{set:function(e){this.elementRef.nativeElement.setAttribute("computedTitle",encodeURI(e))},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){this.denyClickIfDisabled(),this._focusMonitor.monitor(this.elementRef.nativeElement,!0)},n.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this.elementRef.nativeElement)},n.prototype.denyClickIfDisabled=function(){var e=this,t=this.elementRef.nativeElement.eventListeners("click");t.forEach(function(t){return e.elementRef.nativeElement.removeEventListener("click",t)}),this.elementRef.nativeElement.addEventListener("click",function(t){e.elementRef.nativeElement.hasAttribute("disabled")&&t.stopImmediatePropagation()},!0),t.forEach(function(t){return e.elementRef.nativeElement.addEventListener("click",t)})},n.decorators=[{type:t.Component,args:[{selector:Xi,template:"<ng-content></ng-content>",encapsulation:t.ViewEncapsulation.None,inputs:["disabled"],host:{"[attr.tabIndex]":"disabled ? -1 : tabIndex","[attr.disabled]":"disabled || null",class:"mc-navbar-item"}}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:p.FocusMonitor}]},n.propDecorators={tabIndex:[{type:t.Input}],collapsedTitle:[{type:t.Input}]},n}(to),io=function(){function e(){this.position="left"}return Object.defineProperty(e.prototype,"cssClasses",{get:function(){return"left"===this.position?"mc-navbar-left":"mc-navbar-right"},enumerable:!0,configurable:!0}),e.decorators=[{type:t.Directive,args:[{selector:Gi}]}],e.propDecorators={position:[{type:t.Input}],cssClasses:[{type:t.HostBinding,args:["class"]}]},e}(),oo=function(){function e(e,t){this.element=e,this.width=t,this.collapsed=!1}return e.prototype.processCollapsed=function(e){this.collapsed=e,this.updateCollapsedClass()},e.prototype.updateCollapsedClass=function(){this.collapsed?this.element.classList.add("mc-navbar-collapsed-title"):this.element.classList.remove("mc-navbar-collapsed-title")},e}(),ro=function(){function e(e,t,n){void 0===n&&(n=[]),this.element=e,this.width=t,this.itemsForCollapse=n}return Object.defineProperty(e.prototype,"canCollapse",{get:function(){return this.itemsForCollapse.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"collapsedItemsWidth",{get:function(){return void 0!==this._collapsedItemsWidth?this._collapsedItemsWidth:(this.calculateAndCacheCollapsedItemsWidth(),this._collapsedItemsWidth)},enumerable:!0,configurable:!0}),e.prototype.processCollapsed=function(e){this.itemsForCollapse.length>0&&this.updateTitle(e),this.itemsForCollapse.forEach(function(t){return t.processCollapsed(e)})},e.prototype.calculateAndCacheCollapsedItemsWidth=function(){this._collapsedItemsWidth=this.itemsForCollapse.reduce(function(e,t){return e+t.width},0)},e.prototype.getTitle=function(){var e=this.element.getAttribute("computedTitle");return e?decodeURI(e):this.itemsForCollapse.length>0?this.itemsForCollapse[0].element.innerText:""},e.prototype.updateTitle=function(e){e?this.element.setAttribute("title",this.getTitle()):this.element.removeAttribute("title")},e}(),ao=function(){function e(e){this._elementRef=e,this.forceRecalculateItemsWidth=!1,this.resizeDebounceInterval=100,this.firstLevelElement=Gi,this.secondLevelElements=[Xi,qi,$i];var t=o.fromEvent(window,"resize").pipe(m.debounceTime(this.resizeDebounceInterval));this.resizeSubscription=t.subscribe(this.updateCollapsed.bind(this))}return Object.defineProperty(e.prototype,"maxAllowedWidth",{get:function(){return this._elementRef.nativeElement.querySelector("nav").getBoundingClientRect().width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"itemsWidths",{get:function(){return void 0===this._itemsWidths||this.forceRecalculateItemsWidth?(this.calculateAndCacheItemsWidth(),this._itemsWidths):this._itemsWidths},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalItemsWidth",{get:function(){return void 0===this.totalItemsWidths||this.forceRecalculateItemsWidth?(this.calculateAndCacheTotalItemsWidth(),this.totalItemsWidths):this.totalItemsWidths},enumerable:!0,configurable:!0}),e.prototype.updateCollapsed=function(){for(var e=this.totalItemsWidth-this.maxAllowedWidth,t=this.itemsWidths.length-1;t>=0;t--){var n=this.itemsWidths[t];n.canCollapse&&(n.processCollapsed(e>0),e-=n.collapsedItemsWidth)}},e.prototype.ngAfterViewInit=function(){var e=this;setTimeout(function(){return e.updateCollapsed()},0)},e.prototype.ngOnDestroy=function(){this.resizeSubscription.unsubscribe()},e.prototype.calculateAndCacheTotalItemsWidth=function(){this.totalItemsWidths=this.itemsWidths.reduce(function(e,t){return e+t.width},0)},e.prototype.getOuterElementWidth=function(e){return e.getBoundingClientRect().width+parseInt(getComputedStyle(e).getPropertyValue("margin-right"))+parseInt(getComputedStyle(e).getPropertyValue("margin-left"))},e.prototype.calculateAndCacheItemsWidth=function(){var e=this,t=this.secondLevelElements.map(function(t){return e.firstLevelElement+">"+t}),n=Array.from(this._elementRef.nativeElement.querySelectorAll(t));this._itemsWidths=n.map(function(t){return new ro(t,e.getOuterElementWidth(t),e.getItemsForCollapse(t))})},e.prototype.getItemsForCollapse=function(e){return e.querySelector("[mc-icon],mc-navbar-logo,[mc-navbar-logo]")?Array.from(e.querySelectorAll($i)).map(function(e){return new oo(e,e.getBoundingClientRect().width)}):[]},e.decorators=[{type:t.Component,args:[{selector:"mc-navbar",template:'\n <nav class="mc-navbar">\n <ng-content select="['+Gi+"],"+Gi+'"></ng-content>\n </nav>\n ',styles:[".mc-navbar-left,.mc-navbar-right,mc-navbar-container{height:100%;display:flex;flex-shrink:0;flex-direction:row;justify-content:space-between;align-items:center}.mc-navbar{position:relative;height:48px;padding:0 0;display:flex;flex-direction:row;justify-content:space-between;align-items:center}.mc-navbar [mc-icon]+mc-navbar-title{margin-left:8px}.mc-navbar [mc-icon]{min-width:16px;min-height:16px}.mc-navbar mc-navbar-title:not(.mc-navbar-collapsed-title)+[mc-icon]{margin-left:8px}.mc-navbar-brand,.mc-navbar-item,.mc-navbar-title,mc-navbar-brand,mc-navbar-item,mc-navbar-item:first-child{height:100%;position:relative;display:flex;align-items:center;padding-left:16px;padding-right:16px}.mc-navbar-brand,mc-navbar-brand{padding-left:0;padding-right:12px;margin-right:24px}.mc-navbar-brand .mc-navbar-title,mc-navbar-brand .mc-navbar-title{padding-left:12px;padding-right:0}.mc-navbar-title{white-space:nowrap}.mc-navbar-item:not([disabled]){cursor:pointer}.mc-navbar-item .mc-navbar-title,mc-navbar-brand{padding:0}mc-navbar-item.mc-progress:not([disabled]){cursor:pointer}.mc-navbar-item[disabled],mc-navbar-item[disabled] .mc-navbar-item{cursor:default}mc-navbar-title.mc-navbar-collapsed-title{display:none}"],encapsulation:t.ViewEncapsulation.None}]}],e.ctorParameters=function(){return[{type:t.ElementRef}]},e}(),so=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule,h.PlatformModule],exports:[ao,io,Ji,no,Qi,Zi],declarations:[ao,io,Ji,no,Qi,Zi]}]}],e}(),co={popoverState:s.trigger("state",[s.state("initial",s.style({opacity:0,transform:"scale(1, 0.8)"})),s.transition("* => visible",s.animate("120ms cubic-bezier(0, 0, 0.2, 1)",s.style({opacity:1,transform:"scale(1, 1)"}))),s.transition("* => hidden",s.animate("100ms linear",s.style({opacity:0})))])},lo={Click:"click",Focus:"focus",Hover:"hover"},po={Initial:"initial",Visible:"visible",Hidden:"hidden"},uo=function(){function e(e,n){this.changeDetectorRef=e,this.componentElementRef=n,this.positions=Ye.slice(),this.popoverVisibility=po.Initial,this.closeOnInteraction=!1,this.mcVisibleChange=new t.EventEmitter,this._mcTrigger=lo.Hover,this._mcPlacement="top",this._mcVisible=new o.BehaviorSubject(!1),this._classList=[],this.onHideSubject=new o.Subject,this.availablePositions=ze}return Object.defineProperty(e.prototype,"mcTrigger",{get:function(){return this._mcTrigger},set:function(e){this._mcTrigger=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcPlacement",{get:function(){return this._mcPlacement},set:function(e){e!==this._mcPlacement?(this._mcPlacement=e,this.positions.unshift(ze[this.mcPlacement])):e||(this._mcPlacement="top")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcPopoverSize",{get:function(){return this.popoverSize},set:function(e){e!==this.popoverSize?this.popoverSize=e:e||(this.popoverSize="normal")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcVisible",{get:function(){return this._mcVisible.value},set:function(e){var t=i.coerceBooleanProperty(e);this._mcVisible.value!==t&&(this._mcVisible.next(t),this.mcVisibleChange.emit(t))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"classList",{get:function(){return this._classList.join(" ")},set:function(e){var t=[];Array.isArray(e)?t=e:t.push(e),this._classList=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"getCssClassesList",{get:function(){return this.classList+" mc-popover-"+this.mcPopoverSize+" mc-popover_placement-"+this.getPlacementClass},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"getPlacementClass",{get:function(){return it[this.mcPlacement]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this.popoverVisibility===po.Visible},enumerable:!0,configurable:!0}),e.prototype.handleKeydown=function(e){this.isOpen&&e.keyCode===a.ESCAPE&&this.hide()},e.prototype.show=function(){this.isNonEmptyContent()&&(this.closeOnInteraction=!0,this.popoverVisibility=po.Visible,this._mcVisible.next(!0),this.mcVisibleChange.emit(!0),this.markForCheck())},e.prototype.hide=function(){this.popoverVisibility=po.Hidden,this._mcVisible.next(!1),this.mcVisibleChange.emit(!1),this.markForCheck()},e.prototype.isNonEmptyContent=function(){return!!this.mcContent&&(this.isTemplateRef(this.mcContent)||this.isNonEmptyString(this.mcContent))},e.prototype.afterHidden=function(){return this.onHideSubject.asObservable()},e.prototype.isVisible=function(){return this.popoverVisibility===po.Visible},e.prototype.markForCheck=function(){this.changeDetectorRef.markForCheck()},e.prototype.isTemplateRef=function(e){return e instanceof t.TemplateRef},e.prototype.isNonEmptyString=function(e){return"string"==typeof e&&""!==e},e.prototype.animationStart=function(){this.closeOnInteraction=!1},e.prototype.animationDone=function(e){var t=e.toState;t!==po.Hidden||this.isVisible()||this.onHideSubject.next(),t!==po.Visible&&t!==po.Hidden||(this.closeOnInteraction=!0)},e.prototype.ngOnDestroy=function(){this.onHideSubject.complete()},e.decorators=[{type:t.Component,args:[{selector:"mc-popover",template:'<div class="mc-popover" [ngClass]="classList" [@state]="popoverVisibility" (@state.start)="animationStart()" (@state.done)="animationDone($event)"><div class="mc-popover__container"><div class="mc-popover__header" *ngIf="mcHeader"><ng-container *ngIf="isTemplateRef(mcHeader)" [ngTemplateOutlet]="mcHeader"></ng-container><ng-container *ngIf="isNonEmptyString(mcHeader)"><div [innerHTML]="mcHeader"></div></ng-container></div><div class="mc-popover__content" *ngIf="mcContent"><ng-container *ngIf="isTemplateRef(mcContent)" [ngTemplateOutlet]="mcContent"></ng-container><ng-container *ngIf="isNonEmptyString(mcContent)"><div [innerHTML]="mcContent"></div></ng-container></div><div class="mc-popover__footer" *ngIf="mcFooter"><ng-container *ngIf="isTemplateRef(mcFooter)" [ngTemplateOutlet]="mcFooter"></ng-container><ng-container *ngIf="isNonEmptyString(mcFooter)"><div [innerHTML]="mcFooter"></div></ng-container></div></div><div class="mc-popover__arrow" [ngClass]="{ \'mc-popover__arrow_with-footer\': mcFooter }"></div></div>',preserveWhitespaces:!1,styles:["@keyframes mc-progress{from{background-position:0 0}to{background-position:29px 0}}.mc-progress{position:relative}.mc-progress:after{content:'';position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;background:linear-gradient(135deg,rgba(0,0,0,.05) 10px,transparent 10px,transparent 20px,rgba(0,0,0,.05) 20px,rgba(0,0,0,.05) 30px,transparent 30px) repeat;background-size:29px 29px;animation:mc-progress 1s linear infinite}.cdk-overlay-container{pointer-events:none;top:0;left:0;height:100%;width:100%;position:fixed;z-index:1000;box-sizing:border-box;margin:0;padding:0}.cdk-overlay-backdrop{top:0;bottom:0;left:0;right:0;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0;position:absolute;pointer-events:auto;z-index:1000;box-sizing:border-box;margin:0;padding:0}.cdk-overlay-pane{box-sizing:border-box;position:absolute;pointer-events:auto;margin:0;padding:0;z-index:1000;max-width:100%;max-height:100%}.cdk-overlay-connected-position-bounding-box{box-sizing:border-box;position:absolute;z-index:1000;display:flex;flex-direction:column;margin:0;padding:0;min-width:1px;min-height:1px}.mc-popover{position:relative;display:block;margin:0;border-radius:4px;border-width:1px;border-style:solid;padding:0;box-sizing:border-box;visibility:visible;z-index:1060;list-style:none;white-space:pre-line}.mc-popover-small{max-width:280px}.mc-popover-small .mc-popover{max-width:280px}.mc-popover-normal{max-width:400px}.mc-popover-normal .mc-popover{max-width:400px}.mc-popover-large{max-width:640px}.mc-popover-large .mc-popover{max-width:640px}.mc-popover__container{border-radius:4px;overflow:hidden}.mc-popover__header{padding:10px 16px;border-bottom-width:1px;border-bottom-style:solid}.mc-popover__content{padding:16px}.mc-popover__footer{margin-top:8px;padding:12px 16px;border-top-width:1px;border-top-style:solid}.mc-popover_placement-top .mc-popover,.mc-popover_placement-top-left .mc-popover,.mc-popover_placement-top-right .mc-popover{margin-bottom:8px}.mc-popover_placement-right .mc-popover,.mc-popover_placement-right-bottom .mc-popover,.mc-popover_placement-right-top .mc-popover{margin-left:8px}.mc-popover_placement-bottom .mc-popover,.mc-popover_placement-bottom-left .mc-popover,.mc-popover_placement-bottom-right .mc-popover{margin-top:8px}.mc-popover_placement-left .mc-popover,.mc-popover_placement-left-bottom .mc-popover,.mc-popover_placement-left-top .mc-popover{margin-right:8px}.mc-popover__arrow{position:absolute;z-index:-1;width:14px;height:14px;border:solid 1px;transform:rotate(45deg)}.mc-popover_placement-top .mc-popover__arrow{bottom:-6px;left:50%;margin-left:-4px}.mc-popover_placement-top-left .mc-popover__arrow{bottom:-6px;left:20px;margin-left:0}.mc-popover_placement-top-right .mc-popover__arrow{bottom:-6px;right:20px;margin-left:0}.mc-popover_placement-right .mc-popover__arrow{left:-6px;top:50%;margin-top:-4px}.mc-popover_placement-right-top .mc-popover__arrow{left:-6px;top:18px;margin-top:-4px}.mc-popover_placement-right-bottom .mc-popover__arrow{left:-6px;bottom:14px;margin-top:-4px}.mc-popover_placement-left .mc-popover__arrow{right:-6px;top:50%;margin-top:-4px}.mc-popover_placement-left-top .mc-popover__arrow{right:-6px;top:18px;margin-top:-4px}.mc-popover_placement-left-bottom .mc-popover__arrow{right:-6px;bottom:14px;margin-top:-4px}.mc-popover_placement-bottom .mc-popover__arrow{top:-6px;left:50%;margin-left:-4px}.mc-popover_placement-bottom-left .mc-popover__arrow{top:-6px;left:20px;margin-left:0}.mc-popover_placement-bottom-right .mc-popover__arrow{top:-6px;right:20px;margin-left:0}"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,animations:[co.popoverState],host:{"[class]":"getCssClassesList","(keydown)":"handleKeydown($event)"}}]}],e.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:t.ElementRef}]},e.propDecorators={mcVisibleChange:[{type:t.Output,args:["mcPopoverVisibleChange"]}]},e}(),ho=new t.InjectionToken("mc-popover-scroll-strategy"),mo={provide:ho,deps:[c.Overlay],useFactory:le},go=function(){function e(e,n,i,r,a,s,c){var l=this;this.overlay=e,this.elementRef=n,this.ngZone=i,this.scrollDispatcher=r,this.hostView=a,this.scrollStrategy=s,this.direction=c,this.isPopoverOpen=!1,this.isDynamicPopover=!1,this.mcVisibleChange=new t.EventEmitter,this.mcPositionStrategyPlacementChange=new t.EventEmitter,this.$unsubscribe=new o.Subject,this._disabled=!1,this._mcTrigger=lo.Click,this.popoverSize="normal",this._mcPlacementPriority=null,this._mcPlacement="top",this.manualListeners=new Map,this.destroyed=new o.Subject,this.resizeListener=function(){return l.updatePosition()},this.availablePositions=ze,this.defaultPositionsMap=ot}return Object.defineProperty(e.prototype,"mcHeader",{get:function(){return this._mcHeader},set:function(e){this._mcHeader=e,this.updateCompValue("mcHeader",e),this.isPopoverOpen&&this.updatePosition(!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcContent",{get:function(){return this._mcContent},set:function(e){this._mcContent=e,this.updateCompValue("mcContent",e),this.isPopoverOpen&&this.updatePosition(!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcFooter",{get:function(){return this._mcFooter},set:function(e){this._mcFooter=e,this.updateCompValue("mcFooter",e),this.isPopoverOpen&&this.updatePosition(!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcMouseEnterDelay",{get:function(){return this._mcMouseEnterDelay},set:function(e){this._mcMouseEnterDelay=e,this.updateCompValue("mcMouseEnterDelay",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcMouseLeaveDelay",{get:function(){return this._mcMouseLeaveDelay},set:function(e){this._mcMouseLeaveDelay=e,this.updateCompValue("mcMouseLeaveDelay",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcTrigger",{get:function(){return this._mcTrigger},set:function(e){e?(this._mcTrigger=e,this.updateCompValue("mcTrigger",e)):this._mcTrigger=lo.Click,this.resetListeners()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcPopoverSize",{get:function(){return this.popoverSize},set:function(e){!e||"small"!==e&&"normal"!==e&&"large"!==e?this.popoverSize="normal":(this.popoverSize=e,this.updateCompValue("mcPopoverSize",e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcPlacementPriority",{get:function(){return this._mcPlacementPriority},set:function(e){e&&e.length>0?this._mcPlacementPriority=e:this._mcPlacementPriority=null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcPlacement",{get:function(){return this._mcPlacement},set:function(e){e?(this._mcPlacement=e,this.updateCompValue("mcPlacement",e)):this._mcPlacement="top"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"classList",{get:function(){return this._classList},set:function(e){this._classList=e,this.updateCompValue("classList",this._classList)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcVisible",{get:function(){return this._mcVisible},set:function(e){var t=i.coerceBooleanProperty(e);this._mcVisible!==t&&(this._mcVisible=t,
|
14
|
-
this.updateCompValue("mcVisible",t),t?this.show():this.hide())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this.isPopoverOpen},enumerable:!0,configurable:!0}),e.prototype.createOverlay=function(){var e=this;this.overlayRef&&this.overlayRef.dispose();var t=this.overlay.position().flexibleConnectedTo(this.elementRef).withTransformOriginOn(".mc-popover").withFlexibleDimensions(!1).withViewportMargin(8).withPositions(Ye.slice()),n=this.scrollDispatcher.getAncestorScrollContainers(this.elementRef);return t.withScrollableContainers(n),t.positionChanges.pipe(m.takeUntil(this.destroyed)).subscribe(function(t){e.popover&&(e.onPositionChange(t),t.scrollableViewProperties.isOverlayClipped&&e.popover.mcVisible&&e.ngZone.run(function(){return e.hide()}))}),this.overlayRef=this.overlay.create({direction:this.direction,positionStrategy:t,panelClass:"mc-popover__panel",scrollStrategy:this.scrollStrategy(),hasBackdrop:this.mcTrigger===lo.Click,backdropClass:"no-class"}),this.updateOverlayBackdropClick(),this.updatePosition(),this.overlayRef.detachments().pipe(m.takeUntil(this.destroyed)).subscribe(function(){return e.detach()}),this.overlayRef},e.prototype.detach=function(){this.overlayRef&&this.overlayRef.hasAttached()&&this.overlayRef.detach(),this.popover=null},e.prototype.onPositionChange=function(e){var t=this,n=this.mcPlacement;Object.keys(this.availablePositions).some(function(i){return e.connectionPair.originX===t.availablePositions[i].originX&&e.connectionPair.originY===t.availablePositions[i].originY&&e.connectionPair.overlayX===t.availablePositions[i].overlayX&&e.connectionPair.overlayY===t.availablePositions[i].overlayY&&(n=i,!0)}),this.updateCompValue("mcPlacement",n),this.mcPositionStrategyPlacementChange.emit(n),this.popover&&(this.updateCompValue("classList",this.classList),this.popover.markForCheck()),this.defaultPositionsMap[n]||this.handlePositionUpdate(n)},e.prototype.handlePositionUpdate=function(e){this.overlayRef||(this.overlayRef=this.createOverlay());var t=this.overlayRef.overlayElement.style,n=this.hostView.element.nativeElement.clientHeight,i=this.hostView.element.nativeElement.clientWidth,o=Math.floor(n/2),r=Math.floor(i/2-6),a={top:o,bottom:o,right:r,left:r},s=e.split(/(?=[A-Z])/)[1].toLowerCase();("top"===s||"bottom"===s)&&n>44||("left"===s||"right"===s)&&i>44||(this.overlayRef.overlayElement.style[s]||(this.overlayRef.overlayElement.style[s]="0px"),this.overlayRef.overlayElement.style[s]=parseInt(t[s].split("px")[0],10)+a[s]-20+"px")},e.prototype.updateCompValue=function(e,t){this.isDynamicPopover&&t&&this.popover&&(this.popover[e]=t)},e.prototype.ngOnInit=function(){this.initElementRefListeners()},e.prototype.ngOnDestroy=function(){var e=this;this.overlayRef&&this.overlayRef.dispose(),this.manualListeners.forEach(function(t,n){e.elementRef.nativeElement.removeEventListener(n,t)}),this.manualListeners.clear(),this.$unsubscribe.next(),this.$unsubscribe.complete()},e.prototype.handleKeydown=function(e){this.isOpen&&e.keyCode===a.ESCAPE&&this.hide()},e.prototype.handleTouchend=function(){this.hide()},e.prototype.initElementRefListeners=function(){var e=this;this.mcTrigger===lo.Click?this.manualListeners.set("click",function(){return e.show()}).forEach(function(t,n){e.elementRef.nativeElement.addEventListener(n,t)}):this.mcTrigger===lo.Hover?this.manualListeners.set("mouseenter",function(){return e.show()}).set("mouseleave",function(){return e.hide()}).forEach(function(t,n){e.elementRef.nativeElement.addEventListener(n,t)}):this.mcTrigger===lo.Focus&&this.manualListeners.set("focus",function(){return e.show()}).set("blur",function(){return e.hide()}).forEach(function(t,n){e.elementRef.nativeElement.addEventListener(n,t)})},e.prototype.registerResizeHandler=function(){var e=this;this.ngZone.runOutsideAngular(function(){window.addEventListener("resize",e.resizeListener)})},e.prototype.deregisterResizeHandler=function(){window.removeEventListener("resize",this.resizeListener)},e.prototype.resetListeners=function(){var e=this;this.manualListeners.size&&(this.manualListeners.forEach(function(t,n){e.elementRef.nativeElement.removeEventListener(n,t)}),this.manualListeners.clear(),this.initElementRefListeners())},e.prototype.show=function(){var e=this;if(!this.disabled){if(!this.popover){this.detach();var t=this.createOverlay();this.portal=this.portal||new d.ComponentPortal(uo,this.hostView),this.popover=t.attach(this.portal).instance,this.popover.afterHidden().pipe(m.takeUntil(this.destroyed)).subscribe(function(){return e.detach()}),this.isDynamicPopover=!0;["mcPlacement","mcPopoverSize","mcTrigger","mcMouseEnterDelay","mcMouseLeaveDelay","classList","mcVisible","mcHeader","mcContent","mcFooter"].forEach(function(t){return e.updateCompValue(t,e[t])}),this.popover.mcVisibleChange.pipe(m.takeUntil(this.$unsubscribe),m.distinctUntilChanged()).subscribe(function(t){e.mcVisible=t,e.mcVisibleChange.emit(t),e.isPopoverOpen=t})}this.popover.show()}},e.prototype.hide=function(){this.popover&&this.popover.hide()},e.prototype.updateOverlayBackdropClick=function(){var e=this;this.mcTrigger===lo.Click&&this.overlayRef?this.backDropSubscription=this.overlayRef.backdropClick().subscribe(function(){e.popover&&e.popover.hide()}):this.backDropSubscription&&this.overlayRef&&(this.backDropSubscription.unsubscribe(),this.overlayRef.detachBackdrop())},e.prototype.updatePosition=function(e){void 0===e&&(e=!1),this.overlayRef||(this.overlayRef=this.createOverlay());var t=this.overlayRef.getConfig().positionStrategy;t.withPositions(this.getPrioritizedPositions()).withPush(!0),e&&setTimeout(function(){t.reapplyLastPosition()})},e.prototype.getPriorityPlacementStrategy=function(e){var t=this,n=[],i=Object.keys(this.availablePositions);return Array.isArray(e)?e.forEach(function(e){i.indexOf(e)>-1&&n.push(t.availablePositions[e])}):i.indexOf(e)>-1&&n.push(this.availablePositions[e]),n},e.prototype.getPrioritizedPositions=function(){return this.mcPlacementPriority?this.getPriorityPlacementStrategy(this.mcPlacementPriority):nt[this.mcPlacement]},e.decorators=[{type:t.Directive,args:[{selector:"[mcPopover]",exportAs:"mcPopover",host:{"(keydown)":"handleKeydown($event)","(touchend)":"handleTouchend()","[class.mc-popover_open]":"isOpen"}}]}],e.ctorParameters=function(){return[{type:c.Overlay},{type:t.ElementRef},{type:t.NgZone},{type:c.ScrollDispatcher},{type:t.ViewContainerRef},{type:void 0,decorators:[{type:t.Inject,args:[ho]}]},{type:n.Directionality,decorators:[{type:t.Optional}]}]},e.propDecorators={mcVisibleChange:[{type:t.Output,args:["mcPopoverVisibleChange"]}],mcPositionStrategyPlacementChange:[{type:t.Output,args:["mcPopoverPositionStrategyPlacementChange"]}],mcHeader:[{type:t.Input,args:["mcPopoverHeader"]}],mcContent:[{type:t.Input,args:["mcPopoverContent"]}],mcFooter:[{type:t.Input,args:["mcPopoverFooter"]}],disabled:[{type:t.Input,args:["mcPopoverDisabled"]}],mcMouseEnterDelay:[{type:t.Input,args:["mcPopoverMouseEnterDelay"]}],mcMouseLeaveDelay:[{type:t.Input,args:["mcPopoverMouseLeaveDelay"]}],mcTrigger:[{type:t.Input,args:["mcPopoverTrigger"]}],mcPopoverSize:[{type:t.Input,args:["mcPopoverSize"]}],mcPlacementPriority:[{type:t.Input,args:["mcPopoverPlacementPriority"]}],mcPlacement:[{type:t.Input,args:["mcPopoverPlacement"]}],classList:[{type:t.Input,args:["mcPopoverClass"]}],mcVisible:[{type:t.Input,args:["mcPopoverVisible"]}]},e}(),fo=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:[uo,go],exports:[y.A11yModule,uo,go],imports:[r.CommonModule,c.OverlayModule],providers:[mo],entryComponents:[uo]}]}],e}(),yo=0,bo=function(){function e(e){this._elementRef=e}return e}(),vo=O(bo),Co=function(e){function n(t){var n=e.call(this,t)||this;return n.id="mc-progress-bar-"+yo++,n.value=0,n.mode="determinate",n.color=ve.Primary,n}return v(n,e),Object.defineProperty(n.prototype,"percentage",{get:function(){return Math.max(0,Math.min(100,this.value))/100},enumerable:!0,configurable:!0}),n.decorators=[{type:t.Component,args:[{selector:"mc-progress-bar",template:'<div class="mc-progress-bar__inner" [ngSwitch]="mode" [id]="id"><div *ngSwitchCase="\'indeterminate\'" class="mc-progress-bar__line mc-progress-bar__line--indeterminate"></div><div *ngSwitchDefault class="mc-progress-bar__line mc-progress-bar__line--determinate" [ngStyle]="{transform: \'scaleX(\' + percentage + \')\'}"></div></div>',styles:["@keyframes mc-progress-bar-indeterminate{0%{transform:scaleX(.25) translateX(-150%)}100%{transform:scaleX(.4) translateX(250%)}}.mc-progress-bar{display:block;height:4px;overflow:hidden}.mc-progress-bar__inner{height:100%}.mc-progress-bar__line{height:100%;transform-origin:top left}.mc-progress-bar__line--determinate{transition:transform .3s}.mc-progress-bar__line--indeterminate{animation:mc-progress-bar-indeterminate 2.1s cubic-bezier(.455,.03,.515,.955) infinite}"],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,host:{class:"mc-progress-bar","[attr.id]":"id"}}]}],n.ctorParameters=function(){return[{type:t.ElementRef}]},n.propDecorators={id:[{type:t.Input}],value:[{type:t.Input}],mode:[{type:t.Input}],color:[{type:t.Input}]},n}(vo),_o=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,h.PlatformModule],exports:[Co],declarations:[Co]}]}],e}(),xo=0,wo=function(){function e(e){this._elementRef=e}return e}(),Oo=O(wo),ko=function(e){function n(t){var n=e.call(this,t)||this;return n.id="mc-progress-spinner-"+xo++,n.value=0,n.mode="determinate",n.color=ve.Primary,n}return v(n,e),Object.defineProperty(n.prototype,"percentage",{get:function(){return Math.max(0,Math.min(100,this.value))/100},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"dashOffsetPercent",{get:function(){return 273-273*this.percentage+"%"},enumerable:!0,configurable:!0}),n.decorators=[{type:t.Component,args:[{selector:"mc-progress-spinner",template:'<div class="mc-progress-spinner__inner" [ngClass]="{\'mc-progress-spinner__inner--indeterminate\': mode === \'indeterminate\'}"><svg focusable="false" preserveAspectRatio="xMidYMid meet" viewBox="0 0 100 100" class="mc-progress-spinner__svg"><circle cx="50%" cy="50%" r="42.5%" class="mc-progress-spinner__circle" [ngStyle]="{\'stroke-dashoffset\': mode === \'determinate\' ? dashOffsetPercent : null}"></circle></svg></div>',styles:["@keyframes mc-progress-spinner-indeterminate{100%{transform:rotateZ(270deg)}}.mc-progress-spinner{display:inline-block;width:16px;height:16px;overflow:hidden}.mc-progress-spinner__inner{width:100%;height:100%;transform:rotateZ(-90deg)}.mc-progress-spinner__inner--indeterminate{animation:mc-progress-spinner-indeterminate 1.5s cubic-bezier(.455,.03,.515,.955) infinite}.mc-progress-spinner__inner--indeterminate .mc-progress-spinner__circle{stroke-dashoffset:80%}.mc-progress-spinner__svg{width:100%;height:100%}.mc-progress-spinner__circle{fill:none;stroke:#000;stroke-dasharray:273%;stroke-width:13%;transition:stroke-dashoffset .3s;transform-origin:center center}"],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,host:{class:"mc-progress-spinner","[attr.id]":"id"}}]}],n.ctorParameters=function(){return[{type:t.ElementRef}]},n.propDecorators={id:[{type:t.Input}],value:[{type:t.Input}],mode:[{type:t.Input}],color:[{type:t.Input}]},n}(Oo),Io=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,h.PlatformModule],exports:[ko],declarations:[ko]}]}],e}(),So=0,Do=function(){function e(e,t){this.source=e,this.value=t}return e}(),Eo=function(){function e(){}return e}(),Po=w(Eo),Mo={provide:l.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return To}),multi:!0},To=function(e){function n(n){var i=e.call(this)||this;return i._changeDetector=n,i.change=new t.EventEmitter,i._value=null,i._name="mc-radio-group-"+So++,i._selected=null,i.isInitialized=!1,i._labelPosition="after",i._disabled=!1,i._required=!1,i.controlValueAccessorChangeFn=function(){},i.onTouched=function(){},i}return v(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e,this.updateRadioButtonNames()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"labelPosition",{get:function(){return this._labelPosition},set:function(e){this._labelPosition="before"===e?"before":"after",this.markRadiosForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(e){this._value!==e&&(this._value=e,this.updateSelectedRadioFromValue(),this.checkSelectedRadioButton())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selected",{get:function(){return this._selected},set:function(e){this._selected=e,this.value=e?e.value:null,this.checkSelectedRadioButton()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=_(e),this.markRadiosForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"required",{get:function(){return this._required},set:function(e){this._required=_(e),this.markRadiosForCheck()},enumerable:!0,configurable:!0}),n.prototype.checkSelectedRadioButton=function(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)},n.prototype.ngAfterContentInit=function(){this.isInitialized=!0},n.prototype.touch=function(){this.onTouched&&this.onTouched()},n.prototype.emitChangeEvent=function(){this.isInitialized&&this.change.emit(new Do(this._selected,this._value))},n.prototype.markRadiosForCheck=function(){this.radios&&this.radios.forEach(function(e){return e.markForCheck()})},n.prototype.writeValue=function(e){this.value=e,this._changeDetector.markForCheck()},n.prototype.registerOnChange=function(e){this.controlValueAccessorChangeFn=e},n.prototype.registerOnTouched=function(e){this.onTouched=e},n.prototype.setDisabledState=function(e){this.disabled=e,this._changeDetector.markForCheck()},n.prototype.updateRadioButtonNames=function(){var e=this;this.radios&&this.radios.forEach(function(t){t.name=e.name})},n.prototype.updateSelectedRadioFromValue=function(){var e=this,t=null!==this._selected&&this._selected.value===this._value;null==this.radios||t||(this._selected=null,this.radios.forEach(function(t){t.checked=e.value===t.value,t.checked&&(e._selected=t)}))},n.decorators=[{type:t.Directive,args:[{selector:"mc-radio-group",exportAs:"mcRadioGroup",providers:[Mo],host:{role:"radiogroup",class:"mc-radio-group"},inputs:["disabled"]}]}],n.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},n.propDecorators={name:[{type:t.Input}],labelPosition:[{type:t.Input}],value:[{type:t.Input}],selected:[{type:t.Input}],disabled:[{type:t.Input}],required:[{type:t.Input}],change:[{type:t.Output}],radios:[{type:t.ContentChildren,args:[t.forwardRef(function(){return Vo}),{descendants:!0}]}]},n}(Po),Ao=function(){function e(e){this._elementRef=e}return e}(),Ro=O(k(Ao)),Vo=function(e){function n(n,i,o,r,a){var s=e.call(this,i)||this;return s._changeDetector=o,s.focusMonitor=r,s._radioDispatcher=a,s.change=new t.EventEmitter,s.isFocused=!1,s.uniqueId="mc-radio-"+ ++So,s._checked=!1,s._value=null,s.removeUniqueSelectionListener=function(){},s.id=s.uniqueId,s.radioGroup=n,s.removeUniqueSelectionListener=a.listen(function(e,t){e!==s.id&&t===s.name&&(s.checked=!1)}),s}return v(n,e),Object.defineProperty(n.prototype,"checked",{get:function(){return this._checked},set:function(e){var t=_(e);this._checked!==t&&(this._checked=t,t&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!t&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),t&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(e){this._value!==e&&(this._value=e,null!=this.radioGroup&&(this.checked||(this.checked=this.radioGroup.value===e),this.checked&&(this.radioGroup.selected=this)))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled||null!=this.radioGroup&&this.radioGroup.disabled},set:function(e){var t=_(e);this._disabled!==t&&(this._disabled=t,this._changeDetector.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"required",{get:function(){return this._required||this.radioGroup&&this.radioGroup.required},set:function(e){this._required=_(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"labelPosition",{get:function(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"},set:function(e){this._labelPosition=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inputId",{get:function(){return(this.id||this.uniqueId)+"-input"},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.name=this.radioGroup.name)},n.prototype.ngAfterViewInit=function(){var e=this;this.focusMonitor.monitor(this._elementRef,!0).subscribe(function(t){!t&&e.radioGroup&&e.radioGroup.touch()})},n.prototype.ngOnDestroy=function(){this.focusMonitor.stopMonitoring(this._elementRef),this.removeUniqueSelectionListener()},n.prototype.focus=function(){this.inputElement.nativeElement.focus()},n.prototype.markForCheck=function(){this._changeDetector.markForCheck()},n.prototype.onInputClick=function(e){e.stopPropagation()},n.prototype.onInputChange=function(e){e.stopPropagation();var t=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this.emitChangeEvent(),this.radioGroup&&(this.radioGroup.controlValueAccessorChangeFn(this.value),this.radioGroup.touch(),t&&this.radioGroup.emitChangeEvent())},n.prototype.emitChangeEvent=function(){this.change.emit(new Do(this,this._value))},n.decorators=[{type:t.Component,args:[{selector:"mc-radio-button",template:'<label class="mc-radio-label" [attr.for]="inputId" #label><input type="radio" class="mc-radio-input cdk-visually-hidden" #input [id]="inputId" [checked]="checked" [disabled]="disabled" [tabIndex]="tabIndex" [attr.name]="name" [required]="required" [attr.aria-label]="ariaLabel" [attr.aria-labelledby]="ariaLabelledby" [attr.aria-describedby]="ariaDescribedby" (change)="onInputChange($event)" (click)="onInputClick($event)"><div class="mc-radio-label-content" [class.mc-radio-label-before]="labelPosition == \'before\'"><div class="mc-radio-button__outer-circle"></div><div class="mc-radio-button__inner-circle"></div><ng-content></ng-content></div></label>',styles:[".mc-radio-button{display:inline-block}.mc-radio-label{display:inline-flex;align-items:center;vertical-align:middle;cursor:pointer;white-space:nowrap;width:100%}.mc-radio-label-content{display:inline-block;position:relative;order:0;line-height:inherit;padding-left:26px;padding-right:0}.mc-radio-label-content .mc-radio-button__inner-circle,.mc-radio-label-content .mc-radio-button__outer-circle{box-sizing:content-box;position:absolute;content:'';border-style:solid;border-radius:50%}.mc-radio-label-content .mc-radio-button__outer-circle{left:0;top:calc(50% - 8px);width:14px;height:14px;border-width:1px}.mc-radio-label-content .mc-radio-button__inner-circle{display:none;left:1px;top:calc(50% - 7px);width:6px;height:6px;border-width:4px;border-color:transparent}[dir=rtl] .mc-radio-label-content{padding-right:26px;padding-left:0}.mc-radio-input{position:absolute;outline:0;opacity:0}"],inputs:["color","tabIndex"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,exportAs:"mcRadioButton",host:{class:"mc-radio-button","[attr.id]":"id","[class.mc-checked]":"checked","[class.mc-disabled]":"disabled"}}]}],n.ctorParameters=function(){return[{type:To,decorators:[{type:t.Optional}]},{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:y.FocusMonitor},{type:g.UniqueSelectionDispatcher}]},n.propDecorators={checked:[{type:t.Input}],value:[{type:t.Input}],disabled:[{type:t.Input}],required:[{type:t.Input}],labelPosition:[{type:t.Input}],name:[{type:t.Input}],ariaLabel:[{type:t.Input,args:["aria-label"]}],ariaLabelledby:[{type:t.Input,args:["aria-labelledby"]}],ariaDescribedby:[{type:t.Input,args:["aria-describedby"]}],inputElement:[{type:t.ViewChild,args:["input",{static:!1}]}],change:[{type:t.Output}],isFocused:[{type:t.Input}],id:[{type:t.Input}]},n}(Ro),Fo=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule,be],exports:[To,Vo],declarations:[To,Vo]}]}],e}(),Lo=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return v(n,e),n.decorators=[{type:t.Directive,args:[{selector:"[mcTreeNodeDef]",inputs:["when: mcTreeNodeDefWhen"],providers:[{provide:b.CdkTreeNodeDef,useExisting:n}]}]}],n.propDecorators={data:[{type:t.Input,args:["mcTreeNode"]}]},n}(b.CdkTreeNodeDef),No=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.baseLeftPadding=12,t._indent=20,t.iconWidth=20,t}return v(n,e),Object.defineProperty(n.prototype,"leftPadding",{get:function(){return(this.withIcon?0:this.iconWidth)+this.baseLeftPadding},enumerable:!0,configurable:!0}),n.prototype.paddingIndent=function(){var e=this.treeNode.data&&this.tree.treeControl.getLevel?this.tree.treeControl.getLevel(this.treeNode.data):0,t=this.level||e;return t>0?t*this._indent+this.leftPadding+"px":this.leftPadding+"px"},n.prototype.ngOnInit=function(){this.withIcon=this.tree.treeControl.isExpandable(this.treeNode.data),this.setPadding()},n.decorators=[{type:t.Directive,args:[{selector:"[mcTreeNodePadding]",providers:[{provide:b.CdkTreeNodePadding,useExisting:n}]}]}],n.propDecorators={level:[{type:t.Input,args:["mcTreeNodePadding"]}],indent:[{type:t.Input,args:["mcTreeNodePaddingIndent"]}]},n}(b.CdkTreeNodePadding),jo=function(e){function n(t,n){var i=e.call(this,t,n)||this;return i.disabled=!1,i.tree.treeControl.filterValue.pipe(m.map(function(e){return e.length>0})).subscribe(function(e){return i.disabled=e}),i}return v(n,e),Object.defineProperty(n.prototype,"iconState",{get:function(){return this.disabled||this.tree.treeControl.isExpanded(this.node)},enumerable:!0,configurable:!0}),n.decorators=[{type:t.Component,args:[{selector:"mc-tree-node-toggle",template:'\n <i class="mc mc-icon mc-angle-down-S_16"></i>\n ',host:{class:"mc-tree-node-toggle","(click)":"toggle($event)","[class.mc-disabled]":"disabled","[class.mc-opened]":"iconState"},encapsulation:t.ViewEncapsulation.None,providers:[{provide:b.CdkTreeNodeToggle,useExisting:n}]}]}],n.ctorParameters=function(){return[{type:b.CdkTree},{type:b.CdkTreeNode}]},n.propDecorators={node:[{type:t.Input}]},n}(b.CdkTreeNodeToggle),Bo=function(e){function n(t,n){var i=e.call(this,t,n)||this;return i.disabled=!1,i.tree.treeControl.filterValue.pipe(m.map(function(e){return e.length>0})).subscribe(function(e){return i.disabled=e}),i}return v(n,e),n.decorators=[{type:t.Directive,args:[{selector:"[mcTreeNodeToggle]",host:{"(click)":"toggle($event)","[class.mc-disabled]":"disabled"},providers:[{provide:b.CdkTreeNodeToggle,useExisting:n}]}]}],n.ctorParameters=function(){return[{type:b.CdkTree},{type:b.CdkTreeNode}]},n}(b.CdkTreeNodeToggle),zo=new t.InjectionToken("MC_TREE_OPTION_PARENT_COMPONENT"),Wo=function(){function e(e,t){void 0===t&&(t=!1),this.source=e,this.isUserInput=t}return e}(),Yo=0,Ho=function(e){function n(n,i,r,a){var s=e.call(this,n,a)||this;return s.changeDetectorRef=i,s.ngZone=r,s.tree=a,s.onFocus=new o.Subject,s.onBlur=new o.Subject,s._disabled=!1,s.onSelectionChange=new t.EventEmitter,s._selected=!1,s._id="mc-tree-option-"+Yo++,s.hasFocus=!1,s}return v(n,e),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(e){this._value=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled||this.tree&&this.tree.disabled},set:function(e){var t=i.coerceBooleanProperty(e);t!==this._disabled&&(this._disabled=t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"showCheckbox",{get:function(){return void 0!==this._showCheckbox?this._showCheckbox:this.tree.showCheckbox},set:function(e){this._showCheckbox=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selected",{get:function(){return this._selected},set:function(e){var t=i.coerceBooleanProperty(e);t!==this._selected&&this.setSelected(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"multiple",{get:function(){return this.tree.multiple},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"viewValue",{get:function(){return(this.getHostElement().textContent||"").trim()},enumerable:!0,configurable:!0}),n.prototype.ngAfterContentInit=function(){this.value=this.tree.treeControl.getValue(this.data)},n.prototype.toggle=function(){this.selected=!this.selected},n.prototype.setSelected=function(e){this._selected!==e&&this.tree.selectionModel&&(this._selected=e,e?this.tree.selectionModel.select(this.data):this.tree.selectionModel.deselect(this.data),this.changeDetectorRef.markForCheck())},n.prototype.focus=function(e){var t=this;"program"!==e&&(this.disabled||this.hasFocus||(this.elementRef.nativeElement.focus(),this.onFocus.next({option:this}),Promise.resolve().then(function(){t.hasFocus=!0,t.changeDetectorRef.markForCheck()})))},n.prototype.blur=function(){var e=this;this.ngZone.onStable.asObservable().pipe(m.take(1)).subscribe(function(){e.ngZone.run(function(){e.hasFocus=!1,e.onBlur.next({option:e})})})},n.prototype.getHeight=function(){var e=this.elementRef.nativeElement.getClientRects();return e.length?e[0].height:0},n.prototype.select=function(){this._selected||(this._selected=!0,this.changeDetectorRef.markForCheck(),this.emitSelectionChangeEvent())},n.prototype.deselect=function(){this._selected&&(this._selected=!1,this.changeDetectorRef.markForCheck())},n.prototype.selectViaInteraction=function(e){if(!this.disabled){this.changeDetectorRef.markForCheck(),this.emitSelectionChangeEvent(!0);var t=!!e&&a.hasModifierKey(e,"shiftKey"),n=!!e&&a.hasModifierKey(e,"ctrlKey");this.tree.setSelectedOptionsByClick(this,t,n)}},n.prototype.emitSelectionChangeEvent=function(e){void 0===e&&(e=!1),this.onSelectionChange.emit(new Wo(this,e))},n.prototype.getHostElement=function(){return this.elementRef.nativeElement},n.prototype.markForCheck=function(){this.changeDetectorRef.markForCheck()},n.decorators=[{type:t.Component,args:[{selector:"mc-tree-option",exportAs:"mcTreeOption",template:'<ng-content select="[mc-icon]"></ng-content><ng-content select="mc-tree-node-toggle"></ng-content><mc-pseudo-checkbox *ngIf="showCheckbox" [state]="selected ? \'checked\' : \'unchecked\'" [disabled]="disabled"></mc-pseudo-checkbox><span class="mc-option-text mc-no-select"><ng-content></ng-content></span><div class="mc-option-overlay"></div>',host:{"[attr.id]":"id","[attr.tabindex]":"-1","[attr.disabled]":"disabled || null",class:"mc-tree-option","[class.mc-selected]":"selected","[class.mc-focused]":"hasFocus","(focus)":"focus()","(blur)":"blur()","(click)":"selectViaInteraction($event)"},changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,providers:[{provide:b.CdkTreeNode,useExisting:n}]}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:t.NgZone},{type:void 0,decorators:[{type:t.Inject,args:[zo]}]}]},n.propDecorators={disabled:[{type:t.Input}],showCheckbox:[{type:t.Input}],onSelectionChange:[{type:t.Output}]},n}(b.CdkTreeNode),Ko={provide:l.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return Xo}),multi:!0},Uo=function(){function e(e,t){this.source=e,this.option=t}return e}(),Go=function(){function e(e,t){this.source=e,this.option=t}return e}(),Xo=function(e){function n(n,i,r,a,s){var c=e.call(this,i,r)||this;return c.elementRef=n,c.resetFocusedItemOnBlur=!0,c.navigationChange=new t.EventEmitter,c.selectionChange=new t.EventEmitter,c.multipleMode=null,c.userTabIndex=null,c._autoSelect=!0,c._noUnselectLast=!0,c._disabled=!1,c._tabIndex=0,c.destroy=new o.Subject,c.onChange=function(){},c.onTouched=function(){},c.tabIndex=parseInt(a)||0,s===Ie.CHECKBOX||s===Ie.KEYBOARD?c.multipleMode=s:null!==s&&(c.multipleMode=Ie.CHECKBOX),c.multipleMode===Ie.CHECKBOX&&(c.autoSelect=!1,c.noUnselectLast=!1),c.selectionModel=new g.SelectionModel(c.multiple),c}return v(n,e),Object.defineProperty(n.prototype,"optionFocusChanges",{get:function(){return o.merge.apply(void 0,this.renderedOptions.map(function(e){return e.onFocus}))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"optionBlurChanges",{get:function(){return o.merge.apply(void 0,this.renderedOptions.map(function(e){return e.onBlur}))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"multiple",{get:function(){return!!this.multipleMode},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"autoSelect",{get:function(){return this._autoSelect},set:function(e){this._autoSelect=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"noUnselectLast",{get:function(){return this._noUnselectLast},set:function(e){this._noUnselectLast=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled},set:function(e){var t=i.coerceBooleanProperty(e);this._disabled!==t&&(this._disabled=t,this.markOptionsForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"tabIndex",{get:function(){return this._tabIndex},set:function(e){this._tabIndex=e,this.userTabIndex=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"showCheckbox",{get:function(){return this.multipleMode===Ie.CHECKBOX},enumerable:!0,configurable:!0}),n.prototype.ngAfterContentInit=function(){var e=this;this.keyManager=new p.FocusKeyManager(this.renderedOptions).withVerticalOrientation(!0).withHorizontalOrientation(null),this.keyManager.change.pipe(m.takeUntil(this.destroy)).subscribe(function(){e.keyManager.activeItem&&(e.emitNavigationEvent(e.keyManager.activeItem),e.autoSelect&&!e.keyManager.activeItem.disabled&&e.updateOptionsFocus())}),this.keyManager.tabOut.pipe(m.takeUntil(this.destroy)).subscribe(function(){return e.allowFocusEscape()}),this.selectionModel.changed.pipe(m.takeUntil(this.destroy)).subscribe(function(){e.onChange(e.getSelectedValues()),e.renderedOptions.notifyOnChanges()}),this.renderedOptions.changes.pipe(m.takeUntil(this.destroy)).subscribe(function(t){e.resetOptions(),e.updateTabIndex(),t.forEach(function(t){t.deselect(),e.getSelectedValues().forEach(function(e){t.value===e&&t.select()})})})},n.prototype.ngOnDestroy=function(){this.destroy.next(),this.destroy.complete()},n.prototype.focus=function(e){0===this.renderedOptions.length||this.isFocusReceivedFromNestedOption(e)||this.keyManager.setFirstItemActive()},n.prototype.blur=function(){!this.hasFocusedOption()&&this.resetFocusedItemOnBlur&&this.keyManager.setActiveItem(-1),this.onTouched(),this.changeDetectorRef.markForCheck()},n.prototype.onKeyDown=function(e){switch(this.keyManager.setFocusOrigin("keyboard"),e.keyCode){case a.DOWN_ARROW:this.keyManager.setNextItemActive();break;case a.UP_ARROW:this.keyManager.setPreviousItemActive();break;case a.LEFT_ARROW:return this.keyManager.activeItem&&this.treeControl.collapse(this.keyManager.activeItem.data),void e.preventDefault();case a.RIGHT_ARROW:return this.keyManager.activeItem&&this.treeControl.expand(this.keyManager.activeItem.data),void e.preventDefault();case a.SPACE:case a.ENTER:this.toggleFocusedOption(),e.preventDefault();break;case a.HOME:this.keyManager.setFirstItemActive(),e.preventDefault();break
|
15
|
-
;case a.END:this.keyManager.setLastItemActive(),e.preventDefault();break;case a.PAGE_UP:this.keyManager.setPreviousPageItemActive(),e.preventDefault();break;case a.PAGE_DOWN:this.keyManager.setNextPageItemActive(),e.preventDefault();break;default:return}this.keyManager.activeItem&&this.setSelectedOptionsByKey(this.keyManager.activeItem,a.hasModifierKey(e,"shiftKey"),a.hasModifierKey(e,"ctrlKey"))},n.prototype.updateScrollSize=function(){this.renderedOptions.first&&this.keyManager.withScrollSize(Math.floor(this.getHeight()/this.renderedOptions.first.getHeight()))},n.prototype.setSelectedOptionsByKey=function(e,t,n){if(t&&this.multiple)this.setSelectedOptions(e);else if(n){if(!this.canDeselectLast(e))return}else this.autoSelect&&(this.selectionModel.clear(),this.selectionModel.toggle(e.data));this.emitChangeEvent(e)},n.prototype.setSelectedOptionsByClick=function(e,t,n){if(t||n||this.keyManager.setActiveItem(e),t&&this.multiple)this.setSelectedOptions(e);else if(n){if(!this.canDeselectLast(e))return;this.selectionModel.toggle(e.data)}else this.autoSelect?(this.selectionModel.clear(),this.selectionModel.toggle(e.data)):this.selectionModel.toggle(e.data);this.emitChangeEvent(e)},n.prototype.setSelectedOptions=function(e){var t,n=this,i=e.selected,o=this.keyManager.previousActiveItemIndex,r=this.keyManager.previousActiveItemIndex=this.keyManager.activeItemIndex;r!==o&&(o>r&&(t=[r,o],o=t[0],r=t[1]),this.renderedOptions.toArray().slice(o,r+1).filter(function(e){return!e.disabled}).forEach(function(e){e===n.keyManager.activeItem&&e.selected&&n.noUnselectLast||e.setSelected(!i)}))},n.prototype.setFocusedOption=function(e){this.keyManager.setActiveItem(e)},n.prototype.toggleFocusedOption=function(){var e=this.keyManager.activeItem;!e||e.selected&&!this.canDeselectLast(e)||(e.toggle(),this.emitChangeEvent(e))},n.prototype.renderNodeChanges=function(t,n,i,o){void 0===n&&(n=this.dataDiffer),void 0===i&&(i=this.nodeOutlet.viewContainer),e.prototype.renderNodeChanges.call(this,t,n,i,o);var r=[],a=[];i._embeddedViews.forEach(function(e){var t=e.def;t.nodes.forEach(function(n){if(t.nodeMatchedQueries===n.matchedQueryIds){var i=e.nodes[n.nodeIndex];r.push(i.instance),a.push(i.instance.changeDetectorRef)}})}),setTimeout(function(){a.forEach(function(e){e.destroyed||e.detectChanges()})}),this.renderedOptions&&(this.renderedOptions.reset(r),this.renderedOptions.notifyOnChanges()),this.updateScrollSize(),this.nodeOutlet.changeDetectorRef.detectChanges()},n.prototype.getHeight=function(){var e=this.elementRef.nativeElement.getClientRects();return e.length?e[0].height:0},n.prototype.getItemHeight=function(){return this.renderedOptions.first?this.renderedOptions.first.getHeight():0},n.prototype.emitNavigationEvent=function(e){this.navigationChange.emit(new Uo(this,e))},n.prototype.emitChangeEvent=function(e){this.selectionChange.emit(new Uo(this,e))},n.prototype.writeValue=function(e){if(this.multiple&&e&&!Array.isArray(e))throw A();this.renderedOptions&&this.setOptionsFromValues(this.multiple?e:[e])},n.prototype.registerOnChange=function(e){this.onChange=e},n.prototype.registerOnTouched=function(e){this.onTouched=e},n.prototype.setDisabledState=function(e){this._disabled=e,this.changeDetectorRef.markForCheck()},n.prototype.setOptionsFromValues=function(e){var t,n=this;this.selectionModel.clear();var i=e.reduce(function(e,t){return n.treeControl.hasValue(t)?e.concat([n.treeControl.hasValue(t)]):e.slice()},[]);(t=this.selectionModel).select.apply(t,i)},n.prototype.getSelectedValues=function(){var e=this;return this.selectionModel.selected.map(function(t){return e.treeControl.getValue(t)})},n.prototype.updateTabIndex=function(){this._tabIndex=0===this.renderedOptions.length?-1:0},n.prototype.allowFocusEscape=function(){var e=this;-1!==this._tabIndex&&(this._tabIndex=-1,setTimeout(function(){e._tabIndex=e.userTabIndex||0,e.changeDetectorRef.markForCheck()}))},n.prototype.resetOptions=function(){this.dropSubscriptions(),this.listenToOptionsFocus()},n.prototype.dropSubscriptions=function(){this.optionFocusSubscription&&(this.optionFocusSubscription.unsubscribe(),this.optionFocusSubscription=null),this.optionBlurSubscription&&(this.optionBlurSubscription.unsubscribe(),this.optionBlurSubscription=null)},n.prototype.listenToOptionsFocus=function(){var e=this;this.optionFocusSubscription=this.optionFocusChanges.subscribe(function(t){var n=e.renderedOptions.toArray().indexOf(t.option);e.renderedOptions.filter(function(e){return e.hasFocus}).forEach(function(e){return e.hasFocus=!1}),e.isValidIndex(n)&&e.keyManager.updateActiveItem(n)}),this.optionBlurSubscription=this.optionBlurChanges.subscribe(function(){return e.blur()})},n.prototype.isValidIndex=function(e){return e>=0&&e<this.renderedOptions.length},n.prototype.hasFocusedOption=function(){return this.renderedOptions.some(function(e){return e.hasFocus})},n.prototype.markOptionsForCheck=function(){this.renderedOptions&&this.renderedOptions.forEach(function(e){return e.markForCheck()})},n.prototype.updateOptionsFocus=function(){this.renderedOptions.filter(function(e){return e.hasFocus}).forEach(function(e){return e.hasFocus=!1})},n.prototype.canDeselectLast=function(e){return!(this.noUnselectLast&&1===this.selectionModel.selected.length&&e.selected)},n.prototype.isFocusReceivedFromNestedOption=function(e){return!(!e||!e.relatedTarget)&&e.relatedTarget.classList.contains("mc-tree-option")},n.decorators=[{type:t.Component,args:[{selector:"mc-tree-selection",exportAs:"mcTreeSelection",template:"<ng-container cdkTreeNodeOutlet></ng-container>",host:{class:"mc-tree-selection","[attr.tabindex]":"tabIndex","(blur)":"blur()","(focus)":"focus($event)","(keydown)":"onKeyDown($event)","(window:resize)":"updateScrollSize()"},styles:[".mc-tree-selection{display:block}.mc-tree-option{display:flex;align-items:center;height:28px;word-wrap:break-word;border:2px solid transparent}.mc-tree-option>.mc-icon{margin-right:4px;cursor:pointer}.mc-tree-option:focus{outline:0}.mc-tree-option:not([disabled]){cursor:pointer}.mc-tree-option .mc-pseudo-checkbox{margin-right:8px}.mc-tree-node-toggle{margin-right:4px}.mc-tree-node-toggle .mc-icon{transform:rotate(-90deg)}.mc-tree-node-toggle.mc-opened .mc-icon{transform:rotate(0)}.mc-tree-node-toggle.mc-disabled{cursor:default}"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[Ko,{provide:zo,useExisting:n},{provide:b.CdkTree,useExisting:n}]}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:t.IterableDiffers},{type:t.ChangeDetectorRef},{type:String,decorators:[{type:t.Attribute,args:["tabindex"]}]},{type:String,decorators:[{type:t.Attribute,args:["multiple"]}]}]},n.propDecorators={nodeOutlet:[{type:t.ViewChild,args:[b.CdkTreeNodeOutlet,{static:!0}]}],renderedOptions:[{type:t.ContentChildren,args:[Ho]}],treeControl:[{type:t.Input}],navigationChange:[{type:t.Output}],selectionChange:[{type:t.Output}],autoSelect:[{type:t.Input}],noUnselectLast:[{type:t.Input}],disabled:[{type:t.Input}],tabIndex:[{type:t.Input}]},n}(b.CdkTree),qo=[Xo,Ho,Lo,No,jo,Bo],$o=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,b.CdkTreeModule,Se],exports:qo,declarations:qo}]}],e}(),Zo=function(){function e(e,t,n,i){this.transformFunction=e,this.getLevel=t,this.isExpandable=n,this.getChildren=i}return e.prototype.flattenNode=function(e,t,n,i){var o=this,r=this.transformFunction(e,t,i);if(n.push(r),this.isExpandable(r)){var a=this.getChildren(e);a&&(Array.isArray(a)?this.flattenChildren(a,t,n,r):a.pipe(m.take(1)).subscribe(function(e){o.flattenChildren(e,t,n,r)}))}return n},e.prototype.flattenChildren=function(e,t,n,i){var o=this;e.forEach(function(e){o.flattenNode(e,t+1,n,i)})},e.prototype.flattenNodes=function(e){var t=this,n=[];return e.forEach(function(e){return t.flattenNode(e,0,n,null)}),n},e.prototype.expandFlattenedNodes=function(e,t){var n=this,i=[],o=[];return o[0]=!0,e.forEach(function(e){for(var r=!0,a=0;a<=n.getLevel(e);a++)r=r&&o[a];r&&i.push(e),n.isExpandable(e)&&(o[n.getLevel(e)+1]=t.isExpanded(e))}),i},e}(),Qo={Expansion:"expansion",Filter:"filter"},Jo=function(e){function t(t,n,i){void 0===i&&(i=[]);var r=e.call(this)||this;return r.treeControl=t,r.treeFlattener=n,r.flattenedData=new o.BehaviorSubject([]),r.expandedData=new o.BehaviorSubject([]),r.filteredData=new o.BehaviorSubject([]),r._data=new o.BehaviorSubject(i),r}return v(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this._data.value},set:function(e){this._data.next(e),this.flattenedData.next(this.treeFlattener.flattenNodes(this.data)),this.treeControl.dataNodes=this.flattenedData.value},enumerable:!0,configurable:!0}),t.prototype.connect=function(e){var t=this;return o.merge(e.viewChange,this.treeControl.expansionModel.changed.pipe(m.map(function(e){return{type:Qo.Expansion,value:e}})),this.treeControl.filterValue.pipe(m.map(function(e){return{type:Qo.Filter,value:e}})),this.flattenedData).pipe(m.map(function(e){return e.type===Qo.Filter&&e.value&&e.value.length>0?t.filterHandler():t.expansionHandler()}))},t.prototype.filterHandler=function(){return this.filteredData.next(this.treeControl.filterModel.selected),this.filteredData.value},t.prototype.expansionHandler=function(){var e=this.treeFlattener.expandFlattenedNodes(this.flattenedData.value,this.treeControl);return this.expandedData.next(e),this.expandedData.value},t.prototype.disconnect=function(){},t}(g.DataSource),er=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._data=new o.BehaviorSubject([]),t}return v(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this._data.value},set:function(e){this._data.next(e)},enumerable:!0,configurable:!0}),t.prototype.connect=function(e){var t=this;return o.merge.apply(void 0,[e.viewChange,this._data]).pipe(m.map(function(){return t.data}))},t.prototype.disconnect=function(){},t}(g.DataSource),tr=function(){function e(e){this.template=e}return e.decorators=[{type:t.Directive,args:[{selector:"[mcTabContent]"}]}],e.ctorParameters=function(){return[{type:t.TemplateRef}]},e}(),nr=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return v(n,e),n.decorators=[{type:t.Directive,args:[{selector:"[mc-tab-label], [mcTabLabel]"}]}],n}(d.CdkPortal);nr.ctorParameters=function(){return d.CdkPortal.ctorParameters};var ir,or=function(){function e(){}return e}(),rr=w(or),ar=function(e){function n(t){var n=e.call(this)||this;return n.viewContainerRef=t,n.textLabel="",n.stateChanges=new o.Subject,n.position=null,n.origin=null,n.isActive=!1,n.contentPortal=null,n}return v(n,e),Object.defineProperty(n.prototype,"content",{get:function(){return this.contentPortal},enumerable:!0,configurable:!0}),n.prototype.ngOnChanges=function(e){(e.hasOwnProperty("textLabel")||e.hasOwnProperty("disabled"))&&this.stateChanges.next()},n.prototype.ngOnDestroy=function(){this.stateChanges.complete()},n.prototype.ngOnInit=function(){this.contentPortal=new d.TemplatePortal(this.explicitContent||this.implicitContent,this.viewContainerRef)},n.decorators=[{type:t.Component,args:[{selector:"mc-tab",template:"<ng-template><ng-content></ng-content></ng-template>",inputs:["disabled"],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,exportAs:"mcTab"}]}],n.ctorParameters=function(){return[{type:t.ViewContainerRef}]},n.propDecorators={templateLabel:[{type:t.ContentChild,args:[nr,{static:!1}]}],explicitContent:[{type:t.ContentChild,args:[tr,{read:t.TemplateRef,static:!0}]}],implicitContent:[{type:t.ViewChild,args:[t.TemplateRef,{static:!0}]}],textLabel:[{type:t.Input,args:["label"]}],tabId:[{type:t.Input,args:["tabId"]}],ariaLabel:[{type:t.Input,args:["aria-label"]}],ariaLabelledby:[{type:t.Input,args:["aria-labelledby"]}]},n}(rr),sr={translateTab:s.trigger("translateTab",[s.state("center, void, left-origin-center, right-origin-center",s.style({transform:"none"})),s.state("left",s.style({transform:"translate3d(-100%, 0, 0)",minHeight:"1px"})),s.state("right",s.style({transform:"translate3d(100%, 0, 0)",minHeight:"1px"})),s.transition("* => left, * => right, left => center, right => center",s.animate("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")),s.transition("void => left-origin-center",[s.style({transform:"translate3d(-100%, 0, 0)"}),s.animate("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")]),s.transition("void => right-origin-center",[s.style({transform:"translate3d(100%, 0, 0)"}),s.animate("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")])])},cr=function(){function e(e,n,i){var r=this;this.elementRef=e,this.dir=n,this.onCentering=new t.EventEmitter,this.beforeCentering=new t.EventEmitter,this.afterLeavingCenter=new t.EventEmitter,this.onCentered=new t.EventEmitter(!0),this.animationDuration="0ms",this.dirChangeSubscription=o.Subscription.EMPTY,this.dir&&i&&(this.dirChangeSubscription=this.dir.change.subscribe(function(e){r.computePositionAnimationState(e),i.markForCheck()}))}return Object.defineProperty(e.prototype,"position",{set:function(e){this.positionIndex=e,this.computePositionAnimationState()},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){"center"===this.bodyPosition&&null!=this.origin&&(this.bodyPosition=this.computePositionFromOrigin())},e.prototype.ngOnDestroy=function(){this.dirChangeSubscription.unsubscribe()},e.prototype.onTranslateTabStarted=function(e){var t=this.isCenterPosition(e.toState);this.beforeCentering.emit(t),t&&this.onCentering.emit(this.elementRef.nativeElement.clientHeight)},e.prototype.onTranslateTabComplete=function(e){this.isCenterPosition(e.toState)&&this.isCenterPosition(this.bodyPosition)&&this.onCentered.emit(),this.isCenterPosition(e.fromState)&&!this.isCenterPosition(this.bodyPosition)&&this.afterLeavingCenter.emit()},e.prototype.getLayoutDirection=function(){return this.dir&&"rtl"===this.dir.value?"rtl":"ltr"},e.prototype.isCenterPosition=function(e){return"center"===e||"left-origin-center"===e||"right-origin-center"===e},e.prototype.computePositionAnimationState=function(e){void 0===e&&(e=this.getLayoutDirection()),this.positionIndex<0?this.bodyPosition="ltr"===e?"left":"right":this.positionIndex>0?this.bodyPosition="ltr"===e?"right":"left":this.bodyPosition="center"},e.prototype.computePositionFromOrigin=function(){var e=this.getLayoutDirection();return"ltr"===e&&this.origin<=0||"rtl"===e&&this.origin>0?"left-origin-center":"right-origin-center"},e.decorators=[{type:t.Component,args:[{selector:"mc-tab-body",template:'<div class="mc-tab-body__content" #content [@translateTab]="{ value: bodyPosition, params: {animationDuration: animationDuration} }" (@translateTab.start)="onTranslateTabStarted($event)" (@translateTab.done)="onTranslateTabComplete($event)"><ng-template mcTabBodyHost></ng-template></div>',styles:[".mc-tab-body__content{height:100%;overflow:auto}.mc-tab-body__content .mc-tab-group_dynamic-height{overflow:hidden}"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,animations:[sr.translateTab],host:{class:"mc-tab-body"}}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:n.Directionality,decorators:[{type:t.Optional}]},{type:t.ChangeDetectorRef}]},e.propDecorators={position:[{type:t.Input}],onCentering:[{type:t.Output}],beforeCentering:[{type:t.Output}],afterLeavingCenter:[{type:t.Output}],onCentered:[{type:t.Output}],portalHost:[{type:t.ViewChild,args:[d.CdkPortalOutlet,{static:!1}]}],content:[{type:t.Input,args:["content"]}],origin:[{type:t.Input}],animationDuration:[{type:t.Input}]},e}(),lr=function(e){function n(t,n,i){var r=e.call(this,t,n)||this;return r.host=i,r.centeringSub=o.Subscription.EMPTY,r.leavingSub=o.Subscription.EMPTY,r}return v(n,e),n.prototype.ngOnInit=function(){var t=this;e.prototype.ngOnInit.call(this),this.centeringSub=this.host.beforeCentering.pipe(m.startWith(this.host.isCenterPosition(this.host.bodyPosition))).subscribe(function(e){e&&!t.hasAttached()&&t.attach(t.host.content)}),this.leavingSub=this.host.afterLeavingCenter.subscribe(function(){t.detach()})},n.prototype.ngOnDestroy=function(){e.prototype.ngOnDestroy.call(this),this.centeringSub.unsubscribe(),this.leavingSub.unsubscribe()},n.decorators=[{type:t.Directive,args:[{selector:"[mcTabBodyHost]"}]}],n.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:t.ViewContainerRef},{type:cr,decorators:[{type:t.Inject,args:[t.forwardRef(function(){return cr})]}]}]},n}(d.CdkPortalOutlet),pr=function(){function e(){}return e}(),dr=w(pr),ur=function(e){function n(t){var n=e.call(this)||this;return n.elementRef=t,n}return v(n,e),n.prototype.focus=function(){this.elementRef.nativeElement.focus()},n.prototype.getOffsetLeft=function(){return this.elementRef.nativeElement.offsetLeft},n.prototype.getOffsetWidth=function(){return this.elementRef.nativeElement.offsetWidth},n.decorators=[{type:t.Directive,args:[{selector:"[mcTabLabelWrapper]",inputs:["disabled"],host:{"[class.mc-disabled]":"disabled","[attr.aria-disabled]":"!!disabled"}}]}],n.ctorParameters=function(){return[{type:t.ElementRef}]},n}(dr),hr=function(){function e(){}return e}(),mr=function(e){function r(n,i,r,a,s){var c=e.call(this)||this;return c.elementRef=n,c.changeDetectorRef=i,c.viewportRuler=r,c.dir=a,c.ngZone=s,c.showPaginationControls=!1,c.disableScrollAfter=!0,c.disableScrollBefore=!0,c.selectFocusedIndex=new t.EventEmitter,c.indexFocused=new t.EventEmitter,c._scrollDistance=0,c.selectedIndexChanged=!1,c.destroyed=new o.Subject,c._selectedIndex=0,c}return v(r,e),Object.defineProperty(r.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(e){var t=i.coerceNumberProperty(e);this.selectedIndexChanged=this._selectedIndex!==t,this._selectedIndex=t,this.keyManager&&this.keyManager.updateActiveItem(t)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"focusIndex",{get:function(){return this.keyManager?this.keyManager.activeItemIndex:0},set:function(e){this.isValidIndex(e)&&this.focusIndex!==e&&this.keyManager&&this.keyManager.setActiveItem(e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"scrollDistance",{get:function(){return this._scrollDistance},set:function(e){this._scrollDistance=Math.max(0,Math.min(this.getMaxScrollDistance(),e)),this.scrollDistanceChanged=!0,this.checkScrollingControls()},enumerable:!0,configurable:!0}),r.prototype.ngAfterContentChecked=function(){this.tabLabelCount!==this.labelWrappers.length&&(this.updatePagination(),this.tabLabelCount=this.labelWrappers.length,this.changeDetectorRef.markForCheck()),this.selectedIndexChanged&&(this.scrollToLabel(this._selectedIndex),this.checkScrollingControls(),this.selectedIndexChanged=!1,this.changeDetectorRef.markForCheck()),this.scrollDistanceChanged&&(this.updateTabScrollPosition(),this.scrollDistanceChanged=!1,this.changeDetectorRef.markForCheck())},r.prototype.handleKeydown=function(e){switch(e.keyCode){case a.HOME:this.keyManager.setFirstItemActive(),e.preventDefault();break;case a.END:this.keyManager.setLastItemActive(),e.preventDefault();break;case a.ENTER:case a.SPACE:this.selectFocusedIndex.emit(this.focusIndex),e.preventDefault();break;default:this.keyManager.onKeydown(e)}},r.prototype.ngAfterContentInit=function(){var e=this,t=this.dir?this.dir.change:o.of(null),n=this.viewportRuler.change(150),i=function(){e.updatePagination()};this.keyManager=new p.FocusKeyManager(this.labelWrappers).withHorizontalOrientation(this.getLayoutDirection()).withWrap(),this.keyManager.updateActiveItem(0),void 0===typeof requestAnimationFrame?i():requestAnimationFrame(i),o.merge(t,n).pipe(m.takeUntil(this.destroyed)).subscribe(function(){i(),e.keyManager.withHorizontalOrientation(e.getLayoutDirection())}),this.keyManager.change.pipe(m.takeUntil(this.destroyed)).subscribe(function(t){e.indexFocused.emit(t),e.setTabFocus(t)})},r.prototype.ngOnDestroy=function(){this.destroyed.next(),this.destroyed.complete()},r.prototype.onContentChanges=function(){var e=this,t=this.elementRef.nativeElement.textContent;if(t!==this.currentTextContent){this.currentTextContent=t;var n=function(){e.updatePagination(),e.changeDetectorRef.markForCheck()};this.ngZone?this.ngZone.run(n):n()}},r.prototype.updatePagination=function(){this.checkPaginationEnabled(),this.checkScrollingControls(),this.updateTabScrollPosition()},r.prototype.isValidIndex=function(e){if(!this.labelWrappers)return!0;var t=this.labelWrappers?this.labelWrappers.toArray()[e]:null;return!!t&&!t.disabled},r.prototype.setTabFocus=function(e){if(this.showPaginationControls&&this.scrollToLabel(e),this.labelWrappers&&this.labelWrappers.length){this.labelWrappers.toArray()[e].focus();var t=this.tabListContainer.nativeElement,n=this.getLayoutDirection();t.scrollLeft="ltr"===n?0:t.scrollWidth-t.offsetWidth}},r.prototype.getLayoutDirection=function(){return this.dir&&"rtl"===this.dir.value?"rtl":"ltr"},r.prototype.updateTabScrollPosition=function(){var e=this.scrollDistance,t="ltr"===this.getLayoutDirection()?-e:e;this.tabList.nativeElement.style.transform="translateX("+Math.round(t)+"px)",this.tabList.nativeElement.scrollLeft=0},r.prototype.scrollHeader=function(e){var t=this.tabListContainer.nativeElement.offsetWidth;this.scrollDistance+=("before"===e?-1:1)*t/3},r.prototype.scrollToLabel=function(e){var t=this.labelWrappers?this.labelWrappers.toArray()[e]:null;if(t){var n,i,o=this.tabListContainer.nativeElement.offsetWidth;"ltr"===this.getLayoutDirection()?(n=t.getOffsetLeft(),i=n+t.getOffsetWidth()):(i=this.tabList.nativeElement.offsetWidth-t.getOffsetLeft(),n=i-t.getOffsetWidth());var r=this.scrollDistance,a=this.scrollDistance+o;n<r?this.scrollDistance-=r-n+60:i>a&&(this.scrollDistance+=i-a+60)}},r.prototype.checkPaginationEnabled=function(){var e=this.tabList.nativeElement.scrollWidth>this.elementRef.nativeElement.offsetWidth;e||(this.scrollDistance=0),e!==this.showPaginationControls&&this.changeDetectorRef.markForCheck(),this.showPaginationControls=e},r.prototype.checkScrollingControls=function(){this.disableScrollBefore=0===this.scrollDistance,this.disableScrollAfter=this.scrollDistance===this.getMaxScrollDistance(),this.changeDetectorRef.markForCheck()},r.prototype.getMaxScrollDistance=function(){return this.tabList.nativeElement.scrollWidth-this.tabListContainer.nativeElement.offsetWidth||0},r.decorators=[{type:t.Component,args:[{selector:"mc-tab-header",template:'<div class="mc-tab-header__pagination mc-tab-header__pagination_before mc-elevation-z4" aria-hidden="true" [class.mc-tab-header_disabled]="disableScrollBefore" (click)="scrollHeader(\'before\')"><div class="mc-tab-header__pagination-chevron"></div></div><div class="mc-tab-header__content" #tabListContainer (keydown)="handleKeydown($event)"><div class="mc-tab-list" #tabList role="tablist" (cdkObserveContent)="onContentChanges()"><div class="mc-tab-list__content"><ng-content></ng-content></div></div></div><div class="mc-tab-header__pagination mc-tab-header__pagination_after mc-elevation-z4" aria-hidden="true" [class.mc-tab-header_disabled]="disableScrollAfter" (click)="scrollHeader(\'after\')"><div class="mc-tab-header__pagination-chevron"></div></div>',styles:['.mc-tab-header{display:flex}.mc-tab-header__pagination{position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2}.mc-tab-header__pagination .mc-tab-header__pagination-controls_enabled{display:flex}.mc-tab-header__pagination-chevron{border-style:solid;border-width:2px 2px 0 0;content:"";height:8px;width:8px}.mc-tab-header__pagination_after,.mc-tab-header_rtl .mc-tab-header__pagination_before{padding-right:4px}.mc-tab-header__pagination_after .mc-tab-header__pagination-chevron,.mc-tab-header_rtl .mc-tab-header__pagination_before .mc-tab-header__pagination-chevron{transform:rotate(45deg)}.mc-tab-header__pagination_before,.mc-tab-header_rtl .mc-tab-header__pagination_after{padding-left:4px}.mc-tab-header__pagination_before .mc-tab-header__pagination-chevron,.mc-tab-header_rtl .mc-tab-header__pagination_after .mc-tab-header__pagination-chevron{transform:rotate(-135deg)}.mc-tab-header_disabled{box-shadow:none;cursor:default}.mc-tab-header__content{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mc-tab-list{flex-grow:1;position:relative;transition:transform .5s cubic-bezier(.35,0,.25,1)}.mc-tab-list__content{display:flex}.mc-tab-group_align-labels-center .mc-tab-list__content{justify-content:center}.mc-tab-group_align-labels-end .mc-tab-list__content{justify-content:flex-end}.mc-tab-group_stretch-labels .mc-tab-label,.mc-tab-group_stretch-labels .mc-tab-light-label{flex-basis:0;flex-grow:1}'],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,host:{class:"mc-tab-header","[class.mc-tab-header__pagination-controls_enabled]":"showPaginationControls","[class.mc-tab-header_rtl]":"getLayoutDirection() == 'rtl'"}}]}],r.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:u.ViewportRuler},{type:n.Directionality,decorators:[{type:t.Optional}]},{type:t.NgZone}]},r.propDecorators={selectedIndex:[{type:t.Input}],labelWrappers:[{type:t.ContentChildren,args:[ur]}],tabListContainer:[{type:t.ViewChild,args:["tabListContainer",{static:!0}]}],tabList:[{type:t.ViewChild,args:["tabList",{static:!0}]}],selectFocusedIndex:[{type:t.Output}],indexFocused:[{type:t.Output}]},r}(hr),gr=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-tab-group[mc-light-tabs], [mc-tab-nav-bar][mc-light-tabs]",host:{class:"mc-tab-group_light"}}]}],e}(),fr=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-tab-group[mc-align-tabs-center], [mc-tab-nav-bar][mc-align-tabs-center]",host:{class:"mc-tab-group_align-labels-center"}}]}],e}(),yr=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-tab-group[mc-align-tabs-end], [mc-tab-nav-bar][mc-align-tabs-end]",host:{class:"mc-tab-group_align-labels-end"}}]}],e}(),br=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-tab-group[mc-stretch-tabs], [mc-tab-nav-bar][mc-stretch-tabs]",host:{class:"mc-tab-group_stretch-labels"}}]}],e}(),vr=0,Cr=function(){function e(){}return e}(),_r=new t.InjectionToken("MC_TABS_CONFIG"),xr=function(){function e(e){this._elementRef=e}return e}(),wr=O(w(xr)),Or=function(e){function n(n,r,a,s){var c=e.call(this,n)||this;return c.changeDetectorRef=r,c.headerPosition="above",c.selectedIndexChange=new t.EventEmitter,c.focusChange=new t.EventEmitter,c.animationDone=new t.EventEmitter,c.selectedTabChange=new t.EventEmitter(!0),c.indexToSelect=0,c.tabBodyWrapperHeight=0,c.tabsSubscription=o.Subscription.EMPTY,c.tabLabelSubscription=o.Subscription.EMPTY,c._dynamicHeight=!1,c._selectedIndex=null,c.lightTab=i.coerceBooleanProperty(a),c.groupId=vr++,c.animationDuration=s&&s.animationDuration?s.animationDuration:"0ms",c}return v(n,e),Object.defineProperty(n.prototype,"dynamicHeight",{get:function(){return this._dynamicHeight},set:function(e){this._dynamicHeight=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(e){this.indexToSelect=i.coerceNumberProperty(e,null)},enumerable:!0,configurable:!0}),n.prototype.ngAfterContentChecked=function(){var e=this,t=this.indexToSelect=this.clampTabIndex(this.indexToSelect);if(this._selectedIndex!==t){var n=null==this._selectedIndex;n||this.selectedTabChange.emit(this.createChangeEvent(t)),Promise.resolve().then(function(){e.tabs.forEach(function(e,n){return e.isActive=n===t}),n||e.selectedIndexChange.emit(t)})}this.tabs.forEach(function(n,i){n.position=i-t,null==e._selectedIndex||0!==n.position||n.origin||(n.origin=t-e._selectedIndex)}),this._selectedIndex!==t&&(this._selectedIndex=t,this.changeDetectorRef.markForCheck())},n.prototype.ngAfterContentInit=function(){var e=this;this.subscribeToTabLabels(),this.tabsSubscription=this.tabs.changes.subscribe(function(){if(e.clampTabIndex(e.indexToSelect)===e._selectedIndex)for(var t=e.tabs.toArray(),n=0;n<t.length;n++)if(t[n].isActive){e.indexToSelect=e._selectedIndex=n;break}e.subscribeToTabLabels(),e.changeDetectorRef.markForCheck()})},n.prototype.ngOnDestroy=function(){this.tabsSubscription.unsubscribe(),this.tabLabelSubscription.unsubscribe()},n.prototype.focusChanged=function(e){this.focusChange.emit(this.createChangeEvent(e))},n.prototype.getTabLabelId=function(e){return"mc-tab-label-"+this.groupId+"-"+e},n.prototype.getTabContentId=function(e){return"mc-tab-content-"+this.groupId+"-"+e},n.prototype.setTabBodyWrapperHeight=function(e){if(this._dynamicHeight&&this.tabBodyWrapperHeight){var t=this.tabBodyWrapper.nativeElement;t.style.height=this.tabBodyWrapperHeight+"px",this.tabBodyWrapper.nativeElement.offsetHeight&&(t.style.height=e+"px")}},n.prototype.removeTabBodyWrapperHeight=function(){this.tabBodyWrapperHeight=this.tabBodyWrapper.nativeElement.clientHeight,this.tabBodyWrapper.nativeElement.style.height="",this.animationDone.emit()},n.prototype.handleClick=function(e,t,n){e.disabled||(this.selectedIndex=t.focusIndex=n)},n.prototype.getTabIndex=function(e,t){return e.disabled?null:this.selectedIndex===t?0:-1},n.prototype.createChangeEvent=function(e){var t=new Cr;return t.index=e,this.tabs&&this.tabs.length&&(t.tab=this.tabs.toArray()[e]),t},n.prototype.subscribeToTabLabels=function(){var e=this;this.tabLabelSubscription&&this.tabLabelSubscription.unsubscribe(),this.tabLabelSubscription=o.merge.apply(void 0,this.tabs.map(function(e){return e.stateChanges})).subscribe(function(){return e.changeDetectorRef.markForCheck()})},n.prototype.clampTabIndex=function(e){return Math.min(this.tabs.length-1,Math.max(e||0,0))},n.decorators=[{type:t.Component,args:[{selector:"mc-tab-group",exportAs:"mcTabGroup",template:'<mc-tab-header #tabHeader [selectedIndex]="selectedIndex" (indexFocused)="focusChanged($event)" (selectFocusedIndex)="selectedIndex = $event"><div role="tab" mcTabLabelWrapper cdkMonitorElementFocus [class.mc-tab-label]="!lightTab" [class.mc-tab-light-label]="lightTab" *ngFor="let tab of tabs; let i = index" [id]="getTabLabelId(i)" [attr.tabIndex]="getTabIndex(tab, i)" [attr.aria-posinset]="i + 1" [attr.aria-setsize]="tabs.length" [attr.aria-controls]="getTabContentId(i)" [attr.aria-selected]="selectedIndex == i" [attr.aria-label]="tab.ariaLabel || null" [attr.aria-labelledby]="(!tab.ariaLabel && tab.ariaLabelledby) ? tab.ariaLabelledby : null" [class.mc-active]="selectedIndex == i" [disabled]="tab.disabled" (click)="handleClick(tab, tabHeader, i)"><div class="mc-tab-label__content"><ng-template [ngIf]="tab.templateLabel"><ng-template [cdkPortalOutlet]="tab.templateLabel"></ng-template></ng-template><ng-template [ngIf]="!tab.templateLabel">{{tab.textLabel}}</ng-template></div><div class="mc-tab-overlay"></div></div></mc-tab-header><div class="mc-tab-body__wrapper" #tabBodyWrapper><mc-tab-body role="tabpanel" *ngFor="let tab of tabs; let i = index" [id]="getTabContentId(i)" [attr.aria-labelledby]="getTabLabelId(i)" [class.mc-tab-body__active]="selectedIndex == i" [content]="tab.content" [position]="tab.position" [origin]="tab.origin" [animationDuration]="animationDuration" (onCentered)="removeTabBodyWrapperHeight()" (onCentering)="setTabBodyWrapperHeight($event)"></mc-tab-body></div>',
|
11
|
+
e.popupRef.updatePosition()}))},e.prototype.createPopup=function(){var e=this,t=new c.OverlayConfig({positionStrategy:this.createPopupPositionStrategy(),hasBackdrop:!0,backdropClass:"mc-overlay-transparent-backdrop",direction:this.dir,scrollStrategy:this.scrollStrategy(),panelClass:"mc-datepicker__popup"});this.popupRef=this.overlay.create(t),this.popupRef.overlayElement.setAttribute("role","dialog"),o.merge(this.popupRef.backdropClick(),this.popupRef.detachments(),this.popupRef.keydownEvents().pipe(m.filter(function(t){return t.keyCode===a.ESCAPE||e.datepickerInput&&t.altKey&&t.keyCode===a.UP_ARROW}))).subscribe(function(){return e.close()})},e.prototype.createPopupPositionStrategy=function(){return this.overlay.position().flexibleConnectedTo(this.datepickerInput.elementRef).withTransformOriginOn(".mc-datepicker__content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition().withPositions([{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"}])},e.prototype.getValidDateOrNull=function(e){return this.dateAdapter.isDateInstance(e)&&this.dateAdapter.isValid(e)?e:null},e.prototype.setColor=function(){var e=this.color;this.popupComponentRef&&(this.popupComponentRef.instance.color=e)},e.decorators=[{type:t.Component,args:[{selector:"mc-datepicker",template:"",exportAs:"mcDatepicker",changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,providers:[{provide:kt,useExisting:e}]}]}],e.ctorParameters=function(){return[{type:c.Overlay},{type:t.NgZone},{type:t.ViewContainerRef},{type:void 0,decorators:[{type:t.Inject,args:[Yn]}]},{type:f.DateAdapter,decorators:[{type:t.Optional}]},{type:n.Directionality,decorators:[{type:t.Optional}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[r.DOCUMENT]}]}]},e.propDecorators={startAt:[{type:t.Input}],color:[{type:t.Input}],disabled:[{type:t.Input}],opened:[{type:t.Input}],calendarHeaderComponent:[{type:t.Input}],startView:[{type:t.Input}],yearSelected:[{type:t.Output}],monthSelected:[{type:t.Output}],panelClass:[{type:t.Input}],dateClass:[{type:t.Input}],openedStream:[{type:t.Output,args:["opened"]}],closedStream:[{type:t.Output,args:["closed"]}]},e}(),qn={provide:l.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return Qn}),multi:!0},$n={provide:l.NG_VALIDATORS,useExisting:t.forwardRef(function(){return Qn}),multi:!0},Zn=function(){function e(e,t){this.target=e,this.targetElement=t,this.value=this.target.value}return e}(),Qn=function(){function e(e,n,i,r){var a=this;if(this.elementRef=e,this.dateAdapter=n,this.dateFormats=i,this.formField=r,this.dateChange=new t.EventEmitter,this.dateInput=new t.EventEmitter,this.valueChange=new t.EventEmitter,this.disabledChange=new t.EventEmitter,this.datepickerSubscription=o.Subscription.EMPTY,this.localeSubscription=o.Subscription.EMPTY,this.lastValueValid=!1,this.onTouched=function(){},this.cvaOnChange=function(){},this.validatorOnChange=function(){},this.parseValidator=function(){return a.lastValueValid?null:{mcDatepickerParse:{text:a.elementRef.nativeElement.value}}},this.minValidator=function(e){var t=a.getValidDateOrNull(a.dateAdapter.deserialize(e.value));return!a.min||!t||a.dateAdapter.compareDate(a.min,t)<=0?null:{mcDatepickerMin:{min:a.min,actual:t}}},this.maxValidator=function(e){var t=a.getValidDateOrNull(a.dateAdapter.deserialize(e.value));return!a.max||!t||a.dateAdapter.compareDate(a.max,t)>=0?null:{mcDatepickerMax:{max:a.max,actual:t}}},this.filterValidator=function(e){var t=a.getValidDateOrNull(a.dateAdapter.deserialize(e.value));return a.dateFilter&&t&&!a.dateFilter(t)?{mcDatepickerFilter:!0}:null},this.validator=l.Validators.compose([this.parseValidator,this.minValidator,this.maxValidator,this.filterValidator]),!this.dateAdapter)throw te("DateAdapter");if(!this.dateFormats)throw te("MC_DATE_FORMATS");this.localeSubscription=n.localeChanges.subscribe(function(){a.value=a.value})}return Object.defineProperty(e.prototype,"mcDatepicker",{set:function(e){var t=this;e&&(this.datepicker=e,this.datepicker.registerInput(this),this.datepickerSubscription.unsubscribe(),this.datepickerSubscription=this.datepicker.selectedChanged.subscribe(function(e){t.value=e,t.cvaOnChange(e),t.onTouched(),t.dateInput.emit(new Zn(t,t.elementRef.nativeElement)),t.dateChange.emit(new Zn(t,t.elementRef.nativeElement))}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcDatepickerFilter",{set:function(e){this.dateFilter=e,this.validatorOnChange()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){e=this.dateAdapter.deserialize(e),this.lastValueValid=!e||this.dateAdapter.isValid(e),e=this.getValidDateOrNull(e);var t=this.value;this._value=e,this.formatValue(e),this.dateAdapter.sameDate(t,e)||this.valueChange.emit(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},set:function(e){this._min=this.getValidDateOrNull(this.dateAdapter.deserialize(e)),this.validatorOnChange()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},set:function(e){this._max=this.getValidDateOrNull(this.dateAdapter.deserialize(e)),this.validatorOnChange()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return!!this._disabled},set:function(e){var t=i.coerceBooleanProperty(e),n=this.elementRef.nativeElement;this._disabled!==t&&(this._disabled=t,this.disabledChange.emit(t)),t&&n.blur&&n.blur()},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this.datepickerSubscription.unsubscribe(),this.localeSubscription.unsubscribe(),this.valueChange.complete(),this.disabledChange.complete()},e.prototype.registerOnValidatorChange=function(e){this.validatorOnChange=e},e.prototype.validate=function(e){return this.validator?this.validator(e):null},e.prototype.writeValue=function(e){this.value=e},e.prototype.registerOnChange=function(e){this.cvaOnChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.onKeydown=function(e){var t=e.altKey&&e.keyCode===a.DOWN_ARROW;this.datepicker&&t&&!this.elementRef.nativeElement.readOnly&&(this.datepicker.open(),e.preventDefault())},e.prototype.onInput=function(e){var t=this.dateAdapter.parse(e,this.dateFormats.parse.dateInput);this.lastValueValid=!t||this.dateAdapter.isValid(t),t=this.getValidDateOrNull(t),this.dateAdapter.sameDate(t,this._value)||(this._value=t,this.cvaOnChange(t),this.valueChange.emit(t),this.dateInput.emit(new Zn(this,this.elementRef.nativeElement)))},e.prototype.onChange=function(){this.dateChange.emit(new Zn(this,this.elementRef.nativeElement))},e.prototype.getThemePalette=function(){return this.formField?this.formField.color:void 0},e.prototype.onBlur=function(){this.value&&this.formatValue(this.value),this.onTouched()},e.prototype.formatValue=function(e){this.elementRef.nativeElement.value=e?this.dateAdapter.format(e,this.dateFormats.display.dateInput):""},e.prototype.getValidDateOrNull=function(e){return this.dateAdapter.isDateInstance(e)&&this.dateAdapter.isValid(e)?e:null},e.decorators=[{type:t.Directive,args:[{selector:"input[mcDatepicker]",providers:[qn,$n,{provide:_n,useExisting:e}],host:{"[attr.aria-haspopup]":"true","[attr.aria-owns]":"(datepicker?.opened && datepicker.id) || null","[attr.min]":"min ? dateAdapter.toIso8601(min) : null","[attr.max]":"max ? dateAdapter.toIso8601(max) : null","[disabled]":"disabled","(input)":"onInput($event.target.value)","(change)":"onChange()","(blur)":"onBlur()","(keydown)":"onKeydown($event)"},exportAs:"mcDatepickerInput"}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:f.DateAdapter,decorators:[{type:t.Optional}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[f.MC_DATE_FORMATS]}]},{type:Rt,decorators:[{type:t.Optional}]}]},e.propDecorators={mcDatepicker:[{type:t.Input}],mcDatepickerFilter:[{type:t.Input}],value:[{type:t.Input}],min:[{type:t.Input}],max:[{type:t.Input}],disabled:[{type:t.Input}],dateChange:[{type:t.Output}],dateInput:[{type:t.Output}]},e}(),Jn=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"[mcDatepickerToggleIcon]"}]}],e}(),ei=function(){function e(e,t,n){this.intl=e,this.changeDetectorRef=t,this.stateChanges=o.Subscription.EMPTY;var i=Number(n);this.tabIndex=i||0===i?i:null}return Object.defineProperty(e.prototype,"disabled",{get:function(){return void 0===this._disabled?this.datepicker.disabled:!!this._disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(e){e.datepicker&&this.watchStateChanges()},e.prototype.ngOnDestroy=function(){this.stateChanges.unsubscribe()},e.prototype.ngAfterContentInit=function(){this.watchStateChanges()},e.prototype.open=function(e){this.datepicker&&!this.disabled&&(this.datepicker.open(),e.stopPropagation())},e.prototype.watchStateChanges=function(){var e=this,t=this.datepicker?this.datepicker.disabledChange:o.of(),n=this.datepicker&&this.datepicker.datepickerInput?this.datepicker.datepickerInput.disabledChange:o.of(),i=this.datepicker?o.merge(this.datepicker.openedStream,this.datepicker.closedStream):o.of();this.stateChanges.unsubscribe(),this.stateChanges=o.merge(this.intl.changes,t,n,i).subscribe(function(){return e.changeDetectorRef.markForCheck()})},e.decorators=[{type:t.Component,args:[{selector:"mc-datepicker-toggle",template:'<button #button mc-button type="button" class="mc-datepicker-toggle__button" aria-haspopup="true" [attr.aria-label]="intl.openCalendarLabel" [attr.tabindex]="disabled ? -1 : tabIndex" [disabled]="disabled" (click)="open($event)"><i *ngIf="!customIcon" mc-icon="mc-calendar_16" class="mc-datepicker-toggle__default-icon"></i><ng-content select="[mcDatepickerToggleIcon]"></ng-content></button>',styles:[".mc-datepicker-toggle:focus{outline:0}.mc-datepicker-toggle__button.mc-icon-button{width:30px;height:30px;margin-left:2px}.mc-form-field-appearance-legacy .mc-form-field-prefix .mc-datepicker-toggle__default-icon,.mc-form-field-appearance-legacy .mc-form-field-suffix .mc-datepicker-toggle__default-icon{width:1em}.mc-form-field:not(.mc-form-field-appearance-legacy) .mc-form-field-prefix .mc-datepicker-toggle__default-icon,.mc-form-field:not(.mc-form-field-appearance-legacy) .mc-form-field-suffix .mc-datepicker-toggle__default-icon{display:block;width:1.5em;height:1.5em}.mc-form-field:not(.mc-form-field-appearance-legacy) .mc-form-field-prefix .mc-icon-button .mc-datepicker-toggle__default-icon,.mc-form-field:not(.mc-form-field-appearance-legacy) .mc-form-field-suffix .mc-icon-button .mc-datepicker-toggle__default-icon{margin:auto}"],host:{class:"mc-datepicker-toggle","[attr.tabindex]":"-1","[class.mc-datepicker-toggle_active]":"datepicker && datepicker.opened","[class.mc-warn]":'datepicker && datepicker.color === "error"',"(focus)":"button.focus()"},exportAs:"mcDatepickerToggle",encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:An},{type:t.ChangeDetectorRef},{type:String,decorators:[{type:t.Attribute,args:["tabindex"]}]}]},e.propDecorators={disabled:[{type:t.Input}],datepicker:[{type:t.Input,args:["for"]}],tabIndex:[{type:t.Input}],customIcon:[{type:t.ContentChild,args:[Jn,{static:!1}]}],button:[{type:t.ViewChild,args:["button",{static:!1}]}]},e}(),ti=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,Qt,c.OverlayModule,p.A11yModule,d.PortalModule,wt],exports:[Bn,Vn,Xn,Gn,Qn,ei,Jn,Fn,Nn,Ln,jn,Qt],declarations:[Bn,Vn,Xn,Gn,Qn,ei,Jn,Fn,Nn,Ln,jn],providers:[An,Hn],entryComponents:[Gn,jn]}]}],e}(),ni=function(){function e(){this._vertical=!1,this._inset=!1}return Object.defineProperty(e.prototype,"vertical",{get:function(){return this._vertical},set:function(e){this._vertical=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inset",{get:function(){return this._inset},set:function(e){this._inset=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),e.decorators=[{type:t.Component,args:[{selector:"mc-divider",host:{class:"mc-divider",role:"separator","[attr.aria-orientation]":'vertical ? "vertical" : "horizontal"',"[class.mc-divider-vertical]":"vertical","[class.mc-divider-inset]":"inset"},template:"",styles:[".mc-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mc-divider.mc-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mc-divider.mc-divider-inset{margin-left:80px}[dir=rtl] .mc-divider.mc-divider-inset{margin-left:auto;margin-right:80px}"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,preserveWhitespaces:!1}]}],e.propDecorators={vertical:[{type:t.Input}],inset:[{type:t.Input}]},e}(),ii=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule],exports:[ni],declarations:[ni]}]}],e}(),oi=function(){function e(e,t,n,i,r,a){this._template=e,this._componentFactoryResolver=t,this._appRef=n,this._injector=i,this._viewContainerRef=r,this._document=a,this.attached=new o.Subject}return e.prototype.attach=function(e){void 0===e&&(e={}),this.portal||(this.portal=new d.TemplatePortal(this._template,this._viewContainerRef)),this.detach(),this.outlet||(this.outlet=new d.DomPortalOutlet(this._document.createElement("div"),this._componentFactoryResolver,this._appRef,this._injector));var t=this._template.elementRef.nativeElement;t.parentNode.insertBefore(this.outlet.outletElement,t),this.portal.attach(this.outlet,e),this.attached.next()},e.prototype.detach=function(){this.portal.isAttached&&this.portal.detach()},e.prototype.ngOnDestroy=function(){this.outlet&&this.outlet.dispose()},e.decorators=[{type:t.Directive,args:[{selector:"ng-template[mcDropdownContent]"}]}],e.ctorParameters=function(){return[{type:t.TemplateRef},{type:t.ComponentFactoryResolver},{type:t.ApplicationRef},{type:t.Injector},{type:t.ViewContainerRef},{type:void 0,decorators:[{type:t.Inject,args:[r.DOCUMENT]}]}]},e}(),ri=new t.InjectionToken("MC_DROPDOWN_PANEL"),ai=function(){function e(){}return e}(),si=w(ai),ci=function(e){function n(t,n,i,r){var a=e.call(this)||this;return a._elementRef=t,a._focusMonitor=n,a.document=i,a._parentDropdownPanel=r,a.role="menuitem",a.hovered=new o.Subject,a.highlighted=!1,a.triggersNestedDropdown=!1,n&&n.monitor(a._elementRef.nativeElement,!1),r&&r.addItem&&r.addItem(a),a}return v(n,e),n.prototype.focus=function(e){void 0===e&&(e="program"),this._focusMonitor?this._focusMonitor.focusVia(this.getHostElement(),e):this.getHostElement().focus()},n.prototype.ngOnDestroy=function(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef.nativeElement),this._parentDropdownPanel&&this._parentDropdownPanel.removeItem&&this._parentDropdownPanel.removeItem(this),this.hovered.complete()},n.prototype.getTabIndex=function(){return this.disabled?"-1":"0"},n.prototype.getHostElement=function(){return this._elementRef.nativeElement},n.prototype.checkDisabled=function(e){this.disabled&&(e.preventDefault(),e.stopPropagation())},n.prototype.handleMouseEnter=function(){this.hovered.next(this)},n.prototype.getLabel=function(){var e=this.content.nativeElement,t=this.document?this.document.TEXT_NODE:3,n="";if(e.childNodes)for(var i=e.childNodes.length,o=0;o<i;o++)e.childNodes[o].nodeType===t&&(n+=e.childNodes[o].textContent);return n.trim()},n.decorators=[{type:t.Component,args:[{selector:"mc-dropdown-item, [mc-dropdown-item]",exportAs:"mcDropdownItem",inputs:["disabled"],host:{class:"mc-dropdown__item","[class.mc-dropdown__item_highlighted]":"highlighted","[attr.role]":"role","[attr.tabindex]":"getTabIndex()","[class.mc-disabled]":"disabled","(click)":"checkDisabled($event)","(mouseenter)":"handleMouseEnter()"},changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,template:'\n <div #content>\n <ng-content></ng-content>\n </div>\n <i *ngIf="triggersNestedDropdown" mc-icon="mc-angle-right-M_16" class="mc-dropdown__trigger"></i>\n '}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:p.FocusMonitor},{type:void 0,decorators:[{type:t.Inject,args:[r.DOCUMENT]}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[ri]}]}]},n.propDecorators={role:[{type:t.Input}],content:[{type:t.ViewChild,args:["content",{static:!1}]}]},n}(si),li={transformDropdown:s.trigger("transformDropdown",[s.state("void",s.style({opacity:0,transform:"scale(0.8)"})),s.transition("void => enter",s.group([s.query(".mc-dropdown__content",s.animate("50ms linear",s.style({opacity:1}))),s.animate("50ms cubic-bezier(0, 0, 0.2, 1)",s.style({transform:"scale(1)"}))])),s.transition("* => void",s.animate("50ms 25ms linear",s.style({opacity:0})))]),fadeInItems:s.trigger("fadeInItems",[s.state("showing",s.style({opacity:1})),s.transition("void => *",[s.style({opacity:0}),s.animate("200ms 60ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},pi=li.fadeInItems,di=li.transformDropdown,ui=new t.InjectionToken("mc-dropdown-default-options",{providedIn:"root",factory:ae}),hi=function(){function e(e,n,i){this._elementRef=e,this._ngZone=n,this._defaultOptions=i,this._xPosition=this._defaultOptions.xPosition,this._yPosition=this._defaultOptions.yPosition,this._overlapTriggerX=this._defaultOptions.overlapTriggerX,this._overlapTriggerY=this._defaultOptions.overlapTriggerY,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.classList={},this.panelAnimationState="void",this.animationDone=new o.Subject,this.backdropClass=this._defaultOptions.backdropClass,this.closed=new t.EventEmitter,this.itemsArray=[],this.itemChanges=new o.Subject,this.tabSubscription=o.Subscription.EMPTY}return Object.defineProperty(e.prototype,"xPosition",{get:function(){return this._xPosition},set:function(e){"before"!==e&&"after"!==e&&oe(),this._xPosition=e,this.setPositionClasses()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"yPosition",{get:function(){return this._yPosition},set:function(e){"above"!==e&&"below"!==e&&re(),this._yPosition=e,this.setPositionClasses()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"overlapTriggerY",{get:function(){return this._overlapTriggerY},set:function(e){this._overlapTriggerY=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"overlapTriggerX",{get:function(){return this._overlapTriggerX},set:function(e){this._overlapTriggerX=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasBackdrop",{get:function(){return this._hasBackdrop},set:function(e){this._hasBackdrop=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"panelClass",{set:function(e){var t=this,n=this.previousPanelClass;n&&n.length&&n.split(" ").forEach(function(e){t.classList[e]=!1}),this.previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(function(e){t.classList[e]=!0}),this._elementRef.nativeElement.className="")},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.setPositionClasses()},e.prototype.ngAfterContentInit=function(){var e=this;this.keyManager=new p.FocusKeyManager(this.items).withWrap().withTypeAhead(),this.tabSubscription=this.keyManager.tabOut.subscribe(function(){return e.closed.emit("tab")})},e.prototype.ngOnDestroy=function(){this.tabSubscription.unsubscribe(),this.closed.complete()},e.prototype.hovered=function(){return this.itemChanges.pipe(m.startWith(this.itemsArray),m.switchMap(function(e){return o.merge.apply(void 0,e.map(function(e){return e.hovered}))}))},e.prototype.handleKeydown=function(e){var t=e.keyCode;switch(t){case a.ESCAPE:this.closed.emit("keydown");break;case a.LEFT_ARROW:this.parent&&"ltr"===this.direction&&this.closed.emit("keydown");break;case a.RIGHT_ARROW:this.parent&&"rtl"===this.direction&&this.closed.emit("keydown");break;default:t!==a.UP_ARROW&&t!==a.DOWN_ARROW||this.keyManager.setFocusOrigin("keyboard"),this.keyManager.onKeydown(e)}},e.prototype.handleClick=function(){this.closed.emit("click")},e.prototype.focusFirstItem=function(e){var t=this;void 0===e&&(e="program"),this.lazyContent?this._ngZone.onStable.asObservable().pipe(m.take(1)).subscribe(function(){return t.keyManager.setFocusOrigin(e).setFirstItemActive()}):this.keyManager.setFocusOrigin(e).setFirstItemActive()},e.prototype.resetActiveItem=function(){this.keyManager.setActiveItem(-1)},e.prototype.addItem=function(e){-1===this.itemsArray.indexOf(e)&&(this.itemsArray.push(e),this.itemChanges.next(this.itemsArray))},e.prototype.removeItem=function(e){var t=this.itemsArray.indexOf(e);this.itemsArray.indexOf(e)>-1&&(this.itemsArray.splice(t,1),this.itemChanges.next(this.itemsArray))},e.prototype.setPositionClasses=function(e,t){void 0===e&&(e=this.xPosition),void 0===t&&(t=this.yPosition);var n=this.classList;n["mc-dropdown-before"]="before"===e,n["mc-dropdown-after"]="after"===e,n["mc-dropdown-above"]="above"===t,n["mc-dropdown-below"]="below"===t},e.prototype.startAnimation=function(){this.panelAnimationState="enter"},e.prototype.resetAnimation=function(){this.panelAnimationState="void"},e.prototype.onAnimationDone=function(e){this.animationDone.next(e),this.isAnimating=!1},e.prototype.onAnimationStart=function(e){this.isAnimating=!0,"enter"===e.toState&&0===this.keyManager.activeItemIndex&&(e.element.scrollTop=0)},e.decorators=[{type:t.Component,args:[{selector:"mc-dropdown",exportAs:"mcDropdown",template:'<ng-template><div class="mc-dropdown__panel" [ngClass]="classList" (keydown)="handleKeydown($event)" (click)="handleClick()" [@transformDropdown]="panelAnimationState" (@transformDropdown.start)="onAnimationStart($event)" (@transformDropdown.done)="onAnimationDone($event)" role="dropdown"><div class="mc-dropdown__content"><ng-content></ng-content></div></div></ng-template>',styles:[".mc-dropdown__item{display:flex;align-items:center;position:relative;box-sizing:border-box;width:100%;border:1px solid transparent;outline:0;padding:5px 15px;text-align:left;white-space:nowrap}.mc-dropdown__item:not([disabled]):not(.mc-disabled){cursor:pointer}.mc-dropdown__item .mc-dropdown__item-caption{margin-top:4px}.mc-dropdown__trigger{margin-left:auto;padding-left:16px}.mc-dropdown__panel{min-width:100%;overflow:auto;margin-top:-1px;border-width:1px;border-style:solid;border-bottom-left-radius:3px;border-bottom-right-radius:3px;padding:4px 0}.mc-dropdown__content h1,.mc-dropdown__content h2,.mc-dropdown__content h3,.mc-dropdown__content h4,.mc-dropdown__content h5{padding:8px 16px 4px 16px;margin:0}"],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,animations:[li.transformDropdown,li.fadeInItems],providers:[{provide:ri,useExisting:e}]}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.NgZone},{type:void 0,decorators:[{type:t.Inject,args:[ui]}]}]},e.propDecorators={xPosition:[{type:t.Input}],yPosition:[{type:t.Input}],overlapTriggerY:[{type:t.Input}],overlapTriggerX:[{type:t.Input}],hasBackdrop:[{type:t.Input}],panelClass:[{type:t.Input,args:["class"]}],backdropClass:[{type:t.Input}],templateRef:[{type:t.ViewChild,args:[t.TemplateRef,{static:!1}]}],items:[{type:t.ContentChildren,args:[ci]}],lazyContent:[{type:t.ContentChild,args:[oi,{static:!1}]}],closed:[{type:t.Output}]},e}(),mi=new t.InjectionToken("mc-dropdown-scroll-strategy"),gi={provide:mi,deps:[c.Overlay],useFactory:se},fi=h.normalizePassiveListenerOptions({passive:!0}),yi=function(){function e(e,n,i,r,a,s,c,l){var p=this;this._overlay=e,this._element=n,this._viewContainerRef=i,this._scrollStrategy=r,this._parent=a,this._dropdownItemInstance=s,this._dir=c,this._focusMonitor=l,this.openedBy=null,this.dropdownOpened=new t.EventEmitter,this.dropdownClosed=new t.EventEmitter,this._opened=!1,this.overlayRef=null,this.closeSubscription=o.Subscription.EMPTY,this.hoverSubscription=o.Subscription.EMPTY,this.handleTouchStart=function(){return p.openedBy="touch"},n.nativeElement.addEventListener("touchstart",this.handleTouchStart,fi),s&&(s.triggersNestedDropdown=this.triggersNestedDropdown())}return Object.defineProperty(e.prototype,"dir",{get:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dropdown",{get:function(){return this._dropdown},set:function(e){var t=this;e!==this._dropdown&&(this._dropdown=e,this.closeSubscription.unsubscribe(),e&&(this.closeSubscription=e.closed.asObservable().subscribe(function(e){t.destroy(),"click"!==e&&"tab"!==e||!t._parent||t._parent.closed.emit(e)})))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"opened",{get:function(){return this._opened},enumerable:!0,configurable:!0}),e.prototype.ngAfterContentInit=function(){this.check(),this.handleHover()},e.prototype.ngOnDestroy=function(){this.overlayRef&&(this.overlayRef.dispose(),this.overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this.handleTouchStart,fi),this.cleanUpSubscriptions(),this.closeSubscription.unsubscribe()},e.prototype.triggersNestedDropdown=function(){return!(!this._dropdownItemInstance||!this._parent)},e.prototype.toggle=function(){return this._opened?this.close():this.open()},e.prototype.open=function(){var e=this;if(!this._opened){this.check();var t=this.createOverlay(),n=t.getConfig();this.setPosition(n.positionStrategy),n.hasBackdrop=null==this.dropdown.hasBackdrop?!this.triggersNestedDropdown():this.dropdown.hasBackdrop,t.attach(this.getPortal()),this.dropdown.lazyContent&&this.dropdown.lazyContent.attach(this.data),this.closeSubscription=this.closingActions().subscribe(function(){return e.close()}),this.init(),this.dropdown instanceof hi&&this.dropdown.startAnimation()}},e.prototype.close=function(){this.dropdown.closed.emit()},e.prototype.focus=function(e){void 0===e&&(e="program"),this._focusMonitor?this._focusMonitor.focusVia(this._element.nativeElement,e):this._element.nativeElement.focus()},e.prototype.handleMousedown=function(e){this.openedBy=0===e.button?"mouse":null,this.triggersNestedDropdown()&&e.preventDefault()},e.prototype.handleKeydown=function(e){var t=e.key||e.keyCode;t!==a.SPACE&&t!==a.ENTER||this.open(),this.triggersNestedDropdown()&&(t===a.RIGHT_ARROW&&"ltr"===this.dir||t===a.LEFT_ARROW&&"rtl"===this.dir)&&this.open()},e.prototype.handleClick=function(e){this.triggersNestedDropdown()?(e.stopPropagation(),this.open()):this.toggle()},e.prototype.destroy=function(){var e=this;if(this.overlayRef&&this.opened){var t=this.dropdown;this.closeSubscription.unsubscribe(),this.overlayRef.detach(),t instanceof hi?(t.resetAnimation(),t.lazyContent?t.animationDone.pipe(m.filter(function(e){return"void"===e.toState}),m.take(1),m.takeUntil(t.lazyContent.attached)).subscribe({next:function(){return t.lazyContent.detach()},error:void 0,complete:function(){e.reset()}}):this.reset()):(this.reset(),t.lazyContent&&t.lazyContent.detach())}},e.prototype.init=function(){this.dropdown.parent=this.triggersNestedDropdown()?this._parent:void 0,this.dropdown.direction=this.dir,this.setIsOpened(!0),this.dropdown.focusFirstItem(this.openedBy||"program")},e.prototype.reset=function(){this.setIsOpened(!1),this.openedBy?this.triggersNestedDropdown()||this.focus(this.openedBy):this.focus(),this.openedBy=null},e.prototype.setIsOpened=function(e){this._opened=e,this._opened?this.dropdownOpened.emit():this.dropdownClosed.emit(),this.triggersNestedDropdown()&&(this._dropdownItemInstance.highlighted=e)},e.prototype.check=function(){this.dropdown||ie()},e.prototype.createOverlay=function(){if(!this.overlayRef){var e=this.getOverlayConfig();this.subscribeToPositions(e.positionStrategy),this.overlayRef=this._overlay.create(e),this.overlayRef.keydownEvents().subscribe()}return this.overlayRef},e.prototype.getOverlayConfig=function(){return new c.OverlayConfig({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withTransformOriginOn(".mc-dropdown__panel"),backdropClass:this.dropdown.backdropClass||"cdk-overlay-transparent-backdrop",scrollStrategy:this._scrollStrategy(),direction:this._dir})},e.prototype.subscribeToPositions=function(e){var t=this;this.dropdown.setPositionClasses&&e.positionChanges.subscribe(function(e){var n="start"===e.connectionPair.overlayX?"after":"before",i="top"===e.connectionPair.overlayY?"below":"above";t.dropdown.setPositionClasses(n,i)})},e.prototype.setPosition=function(e){var t="before"===this.dropdown.xPosition?["end","start","end","start"]:["start","end","start","end"],n=t[0],i=t[1],o=t[2],r=t[3],a="above"===this.dropdown.yPosition?["bottom","top","bottom","top"]:["top","bottom","top","bottom"],s=a[0],c=a[1],l=a[2],p=a[3],d=0;this.triggersNestedDropdown()?(r=n="before"===this.dropdown.xPosition?"start":"end",i=o="end"===n?"start":"end",d="bottom"===s?2:-2):(this.dropdown.overlapTriggerY||(l="top"===s?"bottom":"top",p="top"===c?"bottom":"top"),this.dropdown.overlapTriggerX||(r=n="before"===this.dropdown.xPosition?"start":"end",i=o="end"===n?"start":"end")),e.withPositions([{originX:n,originY:l,overlayX:o,overlayY:s,offsetY:d},{originX:i,originY:l,overlayX:r,overlayY:s,offsetY:d},{originX:n,originY:p,overlayX:o,overlayY:c,offsetY:-d},{originX:i,originY:p,overlayX:r,overlayY:c,offsetY:-d}])},e.prototype.cleanUpSubscriptions=function(){this.closeSubscription.unsubscribe(),this.hoverSubscription.unsubscribe()},e.prototype.closingActions=function(){var e=this,t=this.overlayRef.backdropClick(),n=this.overlayRef.detachments(),i=this._parent?this._parent.closed:o.of(),r=this._parent?this._parent.hovered().pipe(m.filter(function(t){return t!==e._dropdownItemInstance}),m.filter(function(){return e._opened})):o.of();return o.merge(t,i,r,n)},e.prototype.handleHover=function(){var e=this;this.triggersNestedDropdown()&&(this.hoverSubscription=this._parent.hovered().pipe(m.filter(function(t){return t===e._dropdownItemInstance&&!t.disabled}),m.delay(0,o.asapScheduler)).subscribe(function(){e.openedBy="mouse",e.dropdown instanceof hi&&e.dropdown.isAnimating?e.dropdown.animationDone.pipe(m.take(1),m.delay(0,o.asapScheduler),m.takeUntil(e._parent.hovered())).subscribe(function(){return e.open()}):e.open()}))},e.prototype.getPortal=function(){return this.portal&&this.portal.templateRef===this.dropdown.templateRef||(this.portal=new d.TemplatePortal(this.dropdown.templateRef,this._viewContainerRef)),this.portal},e.decorators=[{type:t.Directive,args:[{selector:"[mcDropdownTriggerFor]",host:{"aria-haspopup":"true","[attr.aria-expanded]":"opened || null","(mousedown)":"handleMousedown($event)","(keydown)":"handleKeydown($event)","(click)":"handleClick($event)"},exportAs:"mcDropdownTrigger"}]}],e.ctorParameters=function(){return[{type:c.Overlay},{type:t.ElementRef},{type:t.ViewContainerRef},{type:void 0,decorators:[{type:t.Inject,args:[mi]}]},{type:hi,decorators:[{type:t.Optional}]},{type:ci,decorators:[{type:t.Optional},{type:t.Self}]},{type:n.Directionality,decorators:[{type:t.Optional}]},{type:p.FocusMonitor}]},e.propDecorators={dropdown:[{type:t.Input,args:["mcDropdownTriggerFor"]}],data:[{type:t.Input,args:["mcDropdownTriggerData"]}],dropdownOpened:[{type:t.Output}],dropdownClosed:[{type:t.Output}]},e}(),bi=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,c.OverlayModule,wt],exports:[hi,ci,yi,oi],declarations:[hi,ci,yi,oi],providers:[gi]}]}],e}(),vi=function(){function e(e,t,n,i,r){this.elementRef=e,this.changeDetector=t,this.ngZone=n,this.listSelection=i,this.group=r,this.hasFocus=!1,this.onFocus=new o.Subject,this.onBlur=new o.Subject,this.inputsInitialized=!1,
|
12
|
+
this._disabled=!1,this._selected=!1}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this.selected&&e!==this.value&&this.inputsInitialized&&(this.selected=!1),this._value=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.listSelection&&this.listSelection.disabled||this.group&&this.group.disabled||this._disabled},set:function(e){var t=_(e);t!==this._disabled&&(this._disabled=t,this.changeDetector.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showCheckbox",{get:function(){return void 0!==this._showCheckbox?this._showCheckbox:this.listSelection.showCheckbox},set:function(e){this._showCheckbox=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selected",{get:function(){return this.listSelection.selectionModel&&this.listSelection.selectionModel.isSelected(this)||!1},set:function(e){var t=_(e);t!==this._selected&&(this.setSelected(t),this.listSelection.reportValueChange())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabIndex",{get:function(){return this.disabled?null:-1},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this,t=this.listSelection;t._value&&t._value.some(function(n){return t.compareWith(n,e._value)})&&this.setSelected(!0);var n=this._selected;Promise.resolve().then(function(){(e._selected||n)&&(e.selected=!0,e.changeDetector.markForCheck())}),this.inputsInitialized=!0},e.prototype.ngOnDestroy=function(){var e=this;this.selected&&Promise.resolve().then(function(){return e.selected=!1}),this.listSelection.removeOptionFromList(this)},e.prototype.toggle=function(){this.selected=!this.selected},e.prototype.getLabel=function(){return this.text?this.text.nativeElement.textContent:""},e.prototype.setSelected=function(e){this._selected!==e&&this.listSelection.selectionModel&&(this._selected=e,e?this.listSelection.selectionModel.select(this):this.listSelection.selectionModel.deselect(this),this.changeDetector.markForCheck())},e.prototype.getHeight=function(){return this.elementRef.nativeElement.getClientRects()[0].height},e.prototype.handleClick=function(e){this.disabled||this.listSelection.setSelectedOptionsByClick(this,a.hasModifierKey(e,"shiftKey"),a.hasModifierKey(e,"ctrlKey"))},e.prototype.focus=function(){var e=this;this.hasFocus||(this.elementRef.nativeElement.focus(),this.onFocus.next({option:this}),Promise.resolve().then(function(){e.hasFocus=!0,e.changeDetector.markForCheck()}))},e.prototype.blur=function(){var e=this;this.ngZone.onStable.asObservable().pipe(m.take(1)).subscribe(function(){e.ngZone.run(function(){e.hasFocus=!1,e.onBlur.next({option:e})})})},e.prototype.getHostElement=function(){return this.elementRef.nativeElement},e.decorators=[{type:t.Component,args:[{exportAs:"mcListOption",selector:"mc-list-option",host:{"[attr.tabindex]":"tabIndex",class:"mc-list-option mc-no-select","[class.mc-selected]":"selected","[class.mc-focused]":"hasFocus","[class.mc-disabled]":"disabled","(focus)":"focus()","(blur)":"blur()","(click)":"handleClick($event)"},template:'<div class="mc-list-item-content"><mc-pseudo-checkbox *ngIf="showCheckbox" [state]="selected ? \'checked\' : \'unchecked\'" [disabled]="disabled"></mc-pseudo-checkbox><div class="mc-list-text" #text><ng-content></ng-content></div></div>',encapsulation:t.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:t.NgZone},{type:Oi,decorators:[{type:t.Inject,args:[t.forwardRef(function(){return Oi})]}]},{type:Te,decorators:[{type:t.Optional}]}]},e.propDecorators={lines:[{type:t.ContentChildren,args:[Ce]}],text:[{type:t.ViewChild,args:["text",{static:!1}]}],checkboxPosition:[{type:t.Input}],value:[{type:t.Input}],disabled:[{type:t.Input}],showCheckbox:[{type:t.Input}],selected:[{type:t.Input}]},e}(),Ci={provide:l.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return Oi}),multi:!0},_i=function(){function e(e,t){this.source=e,this.option=t}return e}(),xi=function(){function e(){}return e}(),wi=k(w(xi)),Oi=function(e){function n(n,i,r,a,s,c){var l=e.call(this)||this;return l.element=n,l.changeDetectorRef=i,l.horizontal=!1,l._tabIndex=0,l.selectionChange=new t.EventEmitter,l.destroyed=new o.Subject,l.compareWith=function(e,t){return e===t},l.onTouched=function(){},l.onChange=function(e){},l.autoSelect=null===a||_(a),l.noUnselect=null===s||_(s),c===Ie.CHECKBOX||c===Ie.KEYBOARD?l.multipleMode=c:null!==c&&(l.multipleMode=Ie.CHECKBOX),l.multipleMode===Ie.CHECKBOX&&(l.noUnselect=!1),l._tabIndex=parseInt(r)||0,l.selectionModel=new g.SelectionModel(l.multiple),l}return v(n,e),Object.defineProperty(n.prototype,"multiple",{get:function(){return!!this.multipleMode},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"tabIndex",{get:function(){return this._tabIndex},set:function(e){this._tabIndex=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"showCheckbox",{get:function(){return this.multipleMode===Ie.CHECKBOX},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"optionFocusChanges",{get:function(){return o.merge.apply(void 0,this.options.map(function(e){return e.onFocus}))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"optionBlurChanges",{get:function(){return o.merge.apply(void 0,this.options.map(function(e){return e.onBlur}))},enumerable:!0,configurable:!0}),n.prototype.ngAfterContentInit=function(){var e=this;this.horizontal=_(this.horizontal),this.keyManager=new p.FocusKeyManager(this.options).withTypeAhead().withVerticalOrientation(!this.horizontal).withHorizontalOrientation(this.horizontal?"ltr":null),this.keyManager.tabOut.pipe(m.takeUntil(this.destroyed)).subscribe(function(){e._tabIndex=-1,setTimeout(function(){e._tabIndex=0,e.changeDetectorRef.markForCheck()})}),this._value&&this.setOptionsFromValues(this._value),this.selectionModel.changed.pipe(m.takeUntil(this.destroyed)).subscribe(function(e){for(var t=0,n=e.added;t<n.length;t++){var i=n[t];i.selected=!0}for(var o=0,r=e.removed;o<r.length;o++){var i=r[o];i.selected=!1}}),this.options.changes.pipe(m.startWith(null),m.takeUntil(this.destroyed)).subscribe(function(){e.resetOptions(),e.updateTabIndex()}),this.updateScrollSize()},n.prototype.ngOnDestroy=function(){this.destroyed.next(),this.destroyed.complete()},n.prototype.focus=function(){0!==this.options.length&&this.keyManager.setFirstItemActive()},n.prototype.blur=function(){this.hasFocusedOption()||this.keyManager.setActiveItem(-1),this.onTouched(),this.changeDetectorRef.markForCheck()},n.prototype.selectAll=function(){this.options.forEach(function(e){return e.setSelected(!0)}),this.reportValueChange()},n.prototype.deselectAll=function(){this.options.forEach(function(e){return e.setSelected(!1)}),this.reportValueChange()},n.prototype.updateScrollSize=function(){!this.horizontal&&this.options.first&&this.keyManager.withScrollSize(Math.floor(this.getHeight()/this.options.first.getHeight()))},n.prototype.setSelectedOptionsByClick=function(e,t,n){if(t&&this.multiple)this.setSelectedOptions(e);else if(n){if(!this.canDeselectLast(e))return;this.selectionModel.toggle(e)}else this.autoSelect&&(this.multipleMode!==Ie.KEYBOARD&&this.selectionModel.toggle(e),this.multipleMode!==Ie.KEYBOARD&&this.multiple||(this.options.forEach(function(e){return e.setSelected(!1)}),e.setSelected(!0)));this.emitChangeEvent(e),this.reportValueChange()},n.prototype.setSelectedOptionsByKey=function(e,t,n){if(t&&this.multiple)this.setSelectedOptions(e);else if(n){if(!this.canDeselectLast(e))return}else this.multipleMode!==Ie.KEYBOARD&&this.multiple||(this.options.forEach(function(e){return e.setSelected(!1)}),e.setSelected(!0));this.emitChangeEvent(e),this.reportValueChange()},n.prototype.setSelectedOptions=function(e){var t,n=this,i=e.selected,o=this.keyManager.previousActiveItemIndex,r=this.keyManager.previousActiveItemIndex=this.keyManager.activeItemIndex;r!==o&&(o>r&&(t=[r,o],o=t[0],r=t[1]),this.options.toArray().slice(o,r+1).filter(function(e){return!e.disabled}).forEach(function(e){e===n.keyManager.activeItem&&e.selected&&n.noUnselect||e.setSelected(!i)}))},n.prototype.writeValue=function(e){this._value=e,this.options&&this.setOptionsFromValues(e||[])},n.prototype.registerOnChange=function(e){this.onChange=e},n.prototype.registerOnTouched=function(e){this.onTouched=e},n.prototype.setDisabledState=function(e){this.options&&this.options.forEach(function(t){return t.disabled=e})},n.prototype.getSelectedOptionValues=function(){return this.options.filter(function(e){return e.selected}).map(function(e){return e.value})},n.prototype.toggleFocusedOption=function(){var e=this.keyManager.activeItemIndex;if(null!=e&&this.isValidIndex(e)){var t=this.options.toArray()[e];t&&this.canDeselectLast(t)&&(t.toggle(),this.emitChangeEvent(t))}},n.prototype.canDeselectLast=function(e){return!(this.noUnselect&&1===this.selectionModel.selected.length&&e.selected)},n.prototype.getHeight=function(){return this.element.nativeElement.getClientRects()[0].height},n.prototype.removeOptionFromList=function(e){if(e.hasFocus){var t=this.getOptionIndex(e);t>0?this.keyManager.setPreviousItemActive():0===t&&this.options.length>1&&this.keyManager.setNextItemActive()}},n.prototype.onKeyDown=function(e){switch(e.keyCode){case a.SPACE:case a.ENTER:this.toggleFocusedOption();break;case a.TAB:return void this.keyManager.tabOut.next();case a.DOWN_ARROW:this.keyManager.setNextItemActive();break;case a.UP_ARROW:this.keyManager.setPreviousItemActive();break;case a.HOME:this.keyManager.setFirstItemActive();break;case a.END:this.keyManager.setLastItemActive();break;case a.PAGE_UP:this.keyManager.setPreviousPageItemActive();break;case a.PAGE_DOWN:this.keyManager.setNextPageItemActive();break;default:return}e.preventDefault(),this.setSelectedOptionsByKey(this.keyManager.activeItem,a.hasModifierKey(e,"shiftKey"),a.hasModifierKey(e,"ctrlKey"))},n.prototype.reportValueChange=function(){if(this.options){var e=this.getSelectedOptionValues();this.onChange(e),this._value=e}},n.prototype.emitChangeEvent=function(e){this.selectionChange.emit(new _i(this,e))},n.prototype.updateTabIndex=function(){this._tabIndex=0===this.options.length?-1:0},n.prototype.resetOptions=function(){this.dropSubscriptions(),this.listenToOptionsFocus()},n.prototype.dropSubscriptions=function(){this.optionFocusSubscription&&(this.optionFocusSubscription.unsubscribe(),this.optionFocusSubscription=null),this.optionBlurSubscription&&(this.optionBlurSubscription.unsubscribe(),this.optionBlurSubscription=null)},n.prototype.listenToOptionsFocus=function(){var e=this;this.optionFocusSubscription=this.optionFocusChanges.subscribe(function(t){var n=e.options.toArray().indexOf(t.option);e.isValidIndex(n)&&e.keyManager.updateActiveItem(n)}),this.optionBlurSubscription=this.optionBlurChanges.subscribe(function(){return e.blur()})},n.prototype.hasFocusedOption=function(){return this.options.some(function(e){return e.hasFocus})},n.prototype.getOptionByValue=function(e){return this.options.find(function(t){return t.value===e})},n.prototype.setOptionsFromValues=function(e){var t=this;this.options.forEach(function(e){return e.setSelected(!1)}),e.map(function(e){return t.getOptionByValue(e)}).filter(Boolean).forEach(function(e){return e.setSelected(!0)})},n.prototype.isValidIndex=function(e){return e>=0&&e<this.options.length},n.prototype.getOptionIndex=function(e){return this.options.toArray().indexOf(e)},n.decorators=[{type:t.Component,args:[{exportAs:"mcListSelection",selector:"mc-list-selection",template:"<ng-content></ng-content>",styles:[".mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mc-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mc-divider.mc-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mc-divider.mc-divider-inset{margin-left:80px}[dir=rtl] .mc-divider.mc-divider-inset{margin-left:auto;margin-right:80px}.mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mc-list,.mc-list-selection{display:block;outline:0}.mc-list .mc-subheader,.mc-list-selection .mc-subheader{display:flex;box-sizing:border-box;height:28px;line-height:-2px;padding:15px;align-items:center}.mc-list .mc-subheader:first-child,.mc-list-selection .mc-subheader:first-child{margin-top:0}.mc-list .mc-list .mc-subheader,.mc-list .mc-list-selection .mc-subheader,.mc-list-selection .mc-list .mc-subheader,.mc-list-selection .mc-list-selection .mc-subheader{margin:0}.mc-list-item,.mc-list-option{display:block;height:28px;border:2px solid transparent}.mc-list-item .mc-list-item-content,.mc-list-option .mc-list-item-content{position:relative;box-sizing:border-box;display:flex;flex-direction:row;align-items:center;height:100%;padding:0 15px}.mc-list-item.mc-2-line,.mc-list-option.mc-2-line{height:72px}.mc-list-item.mc-3-line,.mc-list-option.mc-3-line{height:88px}.mc-list-item.mc-multi-line,.mc-list-option.mc-multi-line{height:auto}.mc-list-item.mc-multi-line .mc-list-item-content,.mc-list-option.mc-multi-line .mc-list-item-content{padding-top:16px;padding-bottom:16px}.mc-list-item .mc-list-text,.mc-list-option .mc-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden;padding:0}.mc-list-item .mc-list-text>*,.mc-list-option .mc-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mc-list-item .mc-list-text:empty,.mc-list-option .mc-list-text:empty{display:none}.mc-list-item .mc-list-item-content .mc-list-text:not(:nth-child(2)),.mc-list-option .mc-list-item-content .mc-list-text:not(:nth-child(2)){padding-right:0}[dir=rtl] .mc-list-item .mc-list-item-content .mc-list-text:not(:nth-child(2)),[dir=rtl] .mc-list-option .mc-list-item-content .mc-list-text:not(:nth-child(2)){padding-left:0}.mc-list-item .mc-list-icon,.mc-list-option .mc-list-icon{box-sizing:content-box;flex-shrink:0;width:24px;height:24px;border-radius:50%;padding:4px;font-size:24px}.mc-list-item .mc-list-icon~.mc-divider-inset,.mc-list-option .mc-list-icon~.mc-divider-inset{margin-left:62px;width:calc(100% - 62px)}[dir=rtl] .mc-list-item .mc-list-icon~.mc-divider-inset,[dir=rtl] .mc-list-option .mc-list-icon~.mc-divider-inset{margin-left:auto;margin-right:62px}.mc-list-item .mc-divider,.mc-list-option .mc-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mc-list-item .mc-divider,[dir=rtl] .mc-list-option .mc-divider{margin-left:auto;margin-right:0}.mc-list-item .mc-divider.mc-divider-inset,.mc-list-option .mc-divider.mc-divider-inset{position:absolute}.mc-list-item .mc-pseudo-checkbox,.mc-list-option .mc-pseudo-checkbox{margin-right:8px}.mc-list-option:not([disabled]):not(.mc-disabled){cursor:pointer}"],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,inputs:["disabled"],host:{"[attr.tabindex]":"tabIndex",class:"mc-list-selection","(focus)":"focus()","(blur)":"blur()","(keydown)":"onKeyDown($event)","(window:resize)":"updateScrollSize()"},providers:[Ci],preserveWhitespaces:!1}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:String,decorators:[{type:t.Attribute,args:["tabindex"]}]},{type:String,decorators:[{type:t.Attribute,args:["auto-select"]}]},{type:String,decorators:[{type:t.Attribute,args:["no-unselect"]}]},{type:String,decorators:[{type:t.Attribute,args:["multiple"]}]}]},n.propDecorators={options:[{type:t.ContentChildren,args:[vi,{descendants:!0}]}],horizontal:[{type:t.Input}],tabIndex:[{type:t.Input}],selectionChange:[{type:t.Output}],compareWith:[{type:t.Input}]},n}(wi),ki=function(){function e(){}return e}(),Ii=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return v(n,e),n.decorators=[{type:t.Component,args:[{selector:"mc-list",host:{class:"mc-list"},template:"<ng-content></ng-content>",styles:[".mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mc-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mc-divider.mc-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mc-divider.mc-divider-inset{margin-left:80px}[dir=rtl] .mc-divider.mc-divider-inset{margin-left:auto;margin-right:80px}.mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mc-list,.mc-list-selection{display:block;outline:0}.mc-list .mc-subheader,.mc-list-selection .mc-subheader{display:flex;box-sizing:border-box;height:28px;line-height:-2px;padding:15px;align-items:center}.mc-list .mc-subheader:first-child,.mc-list-selection .mc-subheader:first-child{margin-top:0}.mc-list .mc-list .mc-subheader,.mc-list .mc-list-selection .mc-subheader,.mc-list-selection .mc-list .mc-subheader,.mc-list-selection .mc-list-selection .mc-subheader{margin:0}.mc-list-item,.mc-list-option{display:block;height:28px;border:2px solid transparent}.mc-list-item .mc-list-item-content,.mc-list-option .mc-list-item-content{position:relative;box-sizing:border-box;display:flex;flex-direction:row;align-items:center;height:100%;padding:0 15px}.mc-list-item.mc-2-line,.mc-list-option.mc-2-line{height:72px}.mc-list-item.mc-3-line,.mc-list-option.mc-3-line{height:88px}.mc-list-item.mc-multi-line,.mc-list-option.mc-multi-line{height:auto}.mc-list-item.mc-multi-line .mc-list-item-content,.mc-list-option.mc-multi-line .mc-list-item-content{padding-top:16px;padding-bottom:16px}.mc-list-item .mc-list-text,.mc-list-option .mc-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden;padding:0}.mc-list-item .mc-list-text>*,.mc-list-option .mc-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mc-list-item .mc-list-text:empty,.mc-list-option .mc-list-text:empty{display:none}.mc-list-item .mc-list-item-content .mc-list-text:not(:nth-child(2)),.mc-list-option .mc-list-item-content .mc-list-text:not(:nth-child(2)){padding-right:0}[dir=rtl] .mc-list-item .mc-list-item-content .mc-list-text:not(:nth-child(2)),[dir=rtl] .mc-list-option .mc-list-item-content .mc-list-text:not(:nth-child(2)){padding-left:0}.mc-list-item .mc-list-icon,.mc-list-option .mc-list-icon{box-sizing:content-box;flex-shrink:0;width:24px;height:24px;border-radius:50%;padding:4px;font-size:24px}.mc-list-item .mc-list-icon~.mc-divider-inset,.mc-list-option .mc-list-icon~.mc-divider-inset{margin-left:62px;width:calc(100% - 62px)}[dir=rtl] .mc-list-item .mc-list-icon~.mc-divider-inset,[dir=rtl] .mc-list-option .mc-list-icon~.mc-divider-inset{margin-left:auto;margin-right:62px}.mc-list-item .mc-divider,.mc-list-option .mc-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mc-list-item .mc-divider,[dir=rtl] .mc-list-option .mc-divider{margin-left:auto;margin-right:0}.mc-list-item .mc-divider.mc-divider-inset,.mc-list-option .mc-divider.mc-divider-inset{position:absolute}.mc-list-item .mc-pseudo-checkbox,.mc-list-option .mc-pseudo-checkbox{margin-right:8px}.mc-list-option:not([disabled]):not(.mc-disabled){cursor:pointer}"],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None}]}],n}(ki),Si=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"[mc-subheader], [mcSubheader]",host:{class:"mc-subheader"}}]}],e}(),Di=function(){function e(){}return e}(),Ei=function(e){function n(t){var n=e.call(this)||this;return n._element=t,n}return v(n,e),n.prototype.ngAfterContentInit=function(){this.lineSetter=new _e(this.lines,this._element)},n.prototype.handleFocus=function(){this._element.nativeElement.classList.add("mc-focused")},n.prototype.handleBlur=function(){this._element.nativeElement.classList.remove("mc-focused")},n.prototype.getHostElement=function(){return this._element.nativeElement},n.decorators=[{type:t.Component,args:[{selector:"mc-list-item, a[mc-list-item]",host:{class:"mc-list-item","(focus)":"handleFocus()","(blur)":"handleBlur()"},template:'<div class="mc-list-item-content"><ng-content select="[mc-list-icon], [mcListIcon]"></ng-content><div class="mc-list-text"><ng-content select="[mc-line], [mcLine]"></ng-content></div><ng-content></ng-content></div>',encapsulation:t.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],n.ctorParameters=function(){return[{type:t.ElementRef}]},n.propDecorators={lines:[{type:t.ContentChildren,args:[Ce]}]},n}(Di),Pi=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule,Se,xe,Le],exports:[Ii,Oi,Ei,vi,Le,Si],declarations:[Ii,Oi,Ei,vi,Si]}]}],e}(),Mi=function(){function e(e){this.elementRef=e}return e}(),Ti=k(w(Mi)),Ai=function(e){function n(t,n,i,o){var r=e.call(this,t)||this;return r.focusMonitor=n,r.changeDetector=i,r._disabled=!1,r.tabIndex=parseInt(o)||0,r.focusMonitor.monitor(t.nativeElement,!0),r}return v(n,e),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled},set:function(e){var t=_(e);t!==this._disabled&&(this._disabled=t,this.changeDetector.markForCheck())},enumerable:!0,configurable:!0}),n.prototype.ngOnDestroy=function(){this.focusMonitor.stopMonitoring(this.elementRef.nativeElement)},n.prototype.focus=function(){this.getHostElement().focus()},n.prototype.getHostElement=function(){return this.elementRef.nativeElement},n.decorators=[{type:t.Directive,args:[{selector:"a.mc-link",exportAs:"mcLink",inputs:["disabled"],host:{"[attr.disabled]":"disabled || null","[attr.tabindex]":"tabIndex"}}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:p.FocusMonitor},{type:t.ChangeDetectorRef},{type:String,decorators:[{type:t.Attribute,args:["tabindex"]}]}]},n.propDecorators={disabled:[{type:t.Input}]},n}(Ti),Ri=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule],declarations:[Ai],exports:[Ai]}]}],e}(),Vi=function(){function e(e){this.parentService=e,this.rootOpenModals=this.parentService?null:[],this.rootAfterAllClose=this.parentService?null:new o.Subject,this.rootRegisteredMetaMap=this.parentService?null:new Map}return Object.defineProperty(e.prototype,"afterAllClose",{get:function(){return this.parentService?this.parentService.afterAllClose:this.rootAfterAllClose},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"openModals",{get:function(){return this.parentService?this.parentService.openModals:this.rootOpenModals},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"registeredMetaMap",{get:function(){return this.parentService?this.parentService.registeredMetaMap:this.rootRegisteredMetaMap},enumerable:!0,configurable:!0}),e.prototype.registerModal=function(e){var t=this;if(!this.hasRegistered(e)){var n=e.afterOpen.subscribe(function(){return t.openModals.push(e)}),i=e.afterClose.subscribe(function(){return t.removeOpenModal(e)});this.registeredMetaMap.set(e,{modalRef:e,afterOpenSubscription:n,afterCloseSubscription:i})}},e.prototype.hasRegistered=function(e){return this.registeredMetaMap.has(e)},e.prototype.closeAll=function(){for(var e=this.openModals.length;e--;)this.openModals[e].close()},e.prototype.removeOpenModal=function(e){var t=this.openModals.indexOf(e);t>-1&&(this.openModals.splice(t,1),this.openModals.length||this.afterAllClose.next())},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:e,decorators:[{type:t.Optional},{type:t.SkipSelf}]}]},e}(),Fi=function(){function e(){}return e}(),Li=function(){function e(e){this.document=e,this.lastPosition={x:-1,y:-1},this.listenDocumentClick()}return e.prototype.getLastClickPosition=function(){return this.lastPosition},e.prototype.listenDocumentClick=function(){var e=this;this.document.addEventListener("click",function(t){e.lastPosition={x:t.clientX,y:t.clientY}})},e}(),Ni=new Li(document),ji=function(e){function n(n,i,o,r,a,s,c,l){var p=e.call(this)||this;return p.overlay=n,p.renderer=i,p.cfr=o,p.elementRef=r,p.viewContainer=a,p.modalControl=s,p.changeDetector=c,p.document=l,p.mcModalType="default",p._mcVisible=!1,p.mcVisibleChange=new t.EventEmitter,p.mcZIndex=1e3,p.mcWidth=480,p.mcCloseByESC=!0,p._mcClosable=!0,p._mcMask=!0,p._mcMaskClosable=!1,p.mcAfterOpen=new t.EventEmitter,p.mcAfterClose=new t.EventEmitter,p.mcOkType="primary",p._mcOkLoading=!1,p.mcOnOk=new t.EventEmitter,p._mcCancelLoading=!1,p.mcOnCancel=new t.EventEmitter,p.transformOrigin="0px 0px 0px",p.mcGetContainer=function(){return p.overlay.create()},p}return v(n,e),Object.defineProperty(n.prototype,"mcVisible",{get:function(){return this._mcVisible},set:function(e){this._mcVisible=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"mcClosable",{get:function(){return this._mcClosable},set:function(e){this._mcClosable=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"mcMask",{get:function(){return this._mcMask},set:function(e){this._mcMask=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"mcMaskClosable",{get:function(){return this._mcMaskClosable},set:function(e){this._mcMaskClosable=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"mcOkLoading",{get:function(){return this._mcOkLoading},set:function(e){this._mcOkLoading=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"mcCancelLoading",{get:function(){return this._mcCancelLoading},set:function(e){this._mcCancelLoading=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"afterOpen",{get:function(){return this.mcAfterOpen.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"afterClose",{get:function(){return this.mcAfterClose.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"okText",{get:function(){return this.mcOkText},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"cancelText",{get:function(){return this.mcCancelText},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hidden",{get:function(){return!this.mcVisible&&!this.animationState},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){this.isComponent(this.mcContent)&&this.createDynamicComponent(this.mcContent),this.isModalButtons(this.mcFooter)&&(this.mcFooter=this.formatModalButtons(this.mcFooter)),this.isComponent(this.mcComponent)&&this.createDynamicComponent(this.mcComponent),this.container="function"==typeof this.mcGetContainer?this.mcGetContainer():this.mcGetContainer,this.container instanceof HTMLElement?this.container.appendChild(this.elementRef.nativeElement):this.container instanceof c.OverlayRef&&this.container.overlayElement.appendChild(this.elementRef.nativeElement),this.modalControl.registerModal(this)},n.prototype.ngOnChanges=function(e){e.mcVisible&&this.handleVisibleStateChange(this.mcVisible,!e.mcVisible.firstChange)},n.prototype.ngAfterViewInit=function(){this.contentComponentRef&&this.bodyContainer.insert(this.contentComponentRef.hostView);for(var e=0,t=this.autoFocusedButtons.toArray();e<t.length;e++){var n=t[e];if(n.nativeElement.autofocus){n.nativeElement.focus();break}}},n.prototype.ngOnDestroy=function(){this.container instanceof c.OverlayRef&&this.container.dispose()},n.prototype.open=function(){this.changeVisibleFromInside(!0)},n.prototype.close=function(e){this.changeVisibleFromInside(!1,e)},n.prototype.destroy=function(e){this.close(e)},n.prototype.markForCheck=function(){this.changeDetector.markForCheck()},n.prototype.triggerOk=function(){this.onClickOkCancel("ok")},n.prototype.triggerCancel=function(){this.onClickOkCancel("cancel")},n.prototype.getInstance=function(){return this},n.prototype.getContentComponentRef=function(){return this.contentComponentRef},n.prototype.getContentComponent=function(){return this.contentComponentRef&&this.contentComponentRef.instance},n.prototype.getElement=function(){return this.elementRef&&this.elementRef.nativeElement},n.prototype.onClickMask=function(e){this.mcMask&&this.mcMaskClosable&&e.target.classList.contains("mc-modal-wrap")&&this.mcVisible&&this.onClickOkCancel("cancel")},n.prototype.isModalType=function(e){return this.mcModalType===e},n.prototype.onKeyDown=function(e){e.keyCode===a.ESCAPE&&this.container&&this.container instanceof c.OverlayRef&&(this.close(),e.preventDefault())},n.prototype.onClickCloseBtn=function(){this.mcVisible&&this.onClickOkCancel("cancel")},n.prototype.onClickOkCancel=function(e){var n=this,i={ok:this.mcOnOk,cancel:this.mcOnCancel}[e],o={ok:"mcOkLoading",cancel:"mcCancelLoading"}[e];if(i instanceof t.EventEmitter)i.emit(this.getContentComponent());else if("function"==typeof i){var r=i(this.getContentComponent()),a=function(e){return!1!==e&&n.close(e)};if(ce(r)){this[o]=!0;var s=function(e){n[o]=!1,a(e)};r.then(s).catch(s)}else a(r)}},n.prototype.isNonEmptyString=function(e){return"string"==typeof e&&""!==e},n.prototype.isTemplateRef=function(e){return e instanceof t.TemplateRef},n.prototype.isComponent=function(e){return e instanceof t.Type},n.prototype.isModalButtons=function(e){return Array.isArray(e)&&e.length>0},n.prototype.getButtonCallableProp=function(e,t){var n=e[t],i=[];return this.contentComponentRef&&i.push(this.contentComponentRef.instance),"function"==typeof n?n.apply(e,i):n},n.prototype.onButtonClick=function(e){var t=this.getButtonCallableProp(e,"onClick");ce(t)&&(e.loading=!0,t.then(function(){return e.loading=!1}).catch(function(){return e.loading=!1}))},n.prototype.handleVisibleStateChange=function(e,t,n){var i=this;return void 0===t&&(t=!0),e&&this.changeBodyOverflow(1),Promise.resolve(t&&this.animateTo(e)).then(function(){e?i.mcAfterOpen.emit():(i.mcAfterClose.emit(n),i.changeBodyOverflow())})},n.prototype.changeVisibleFromInside=function(e,t){return this.mcVisible!==e?(this.mcVisible=e,this.mcVisibleChange.emit(e),this.handleVisibleStateChange(e,!0,t)):Promise.resolve()},n.prototype.changeAnimationState=function(e){var t,n;this.animationState=e,e?(this.maskAnimationClassMap=(t={},t["fade-"+e]=!0,t["fade-"+e+"-active"]=!0,t),this.modalAnimationClassMap=(n={},n["zoom-"+e]=!0,n["zoom-"+e+"-active"]=!0,n)):this.maskAnimationClassMap=this.modalAnimationClassMap=null,this.contentComponentRef?this.contentComponentRef.changeDetectorRef.markForCheck():this.changeDetector.markForCheck()},n.prototype.animateTo=function(e){var t=this;return e&&window.setTimeout(function(){return t.updateTransformOrigin()}),this.changeAnimationState(e?"enter":"leave"),new Promise(function(e){return window.setTimeout(function(){t.changeAnimationState(null),e()},200)})},n.prototype.formatModalButtons=function(e){return e.map(function(e){return fe({type:"default",size:"default",autoLoading:!0,show:!0,loading:!1,disabled:!1},e)})},n.prototype.createDynamicComponent=function(e){var n=this.cfr.resolveComponentFactory(e),i=t.Injector.create({providers:[{provide:Fi,useValue:this}],parent:this.viewContainer.injector});this.contentComponentRef=n.create(i),this.mcComponentParams&&Object.assign(this.contentComponentRef.instance,this.mcComponentParams),this.contentComponentRef.changeDetectorRef.detectChanges()},n.prototype.updateTransformOrigin=function(){var e=this.modalContainer.nativeElement,t=Ni.getLastClickPosition();t&&(this.transformOrigin=t.x-e.offsetLeft+"px "+(t.y-e.offsetTop)+"px 0px")},n.prototype.changeBodyOverflow=function(e){void 0===e&&(e=0),this.modalControl.openModals.length+e>0?this.renderer.setStyle(this.document.body,"overflow","hidden"):this.renderer.removeStyle(this.document.body,"overflow")},n.decorators=[{
|
13
|
+
type:t.Component,args:[{selector:"mc-modal",template:'<ng-template #tplOriginContent><ng-content></ng-content></ng-template><div><div *ngIf="mcMask" class="mc-modal-mask" [ngClass]="maskAnimationClassMap" [class.mc-modal-mask-hidden]="hidden" [ngStyle]="mcMaskStyle" [style.zIndex]="mcZIndex"></div><div (mousedown)="onClickMask($event)" class="mc-modal-wrap {{ mcWrapClassName }}" [style.zIndex]="mcZIndex" [style.display]="hidden ? \'none\' : \'\'" tabindex="-1" role="dialog"><div #modalContainer class="mc-modal {{ mcClassName }}" [ngClass]="modalAnimationClassMap" [ngStyle]="mcStyle" [style.width]="mcWidth | toCssUnit" [style.transform-origin]="transformOrigin" role="document"><div class="mc-modal-content" cdkTrapFocus><button *ngIf="mcClosable" mc-button (click)="onClickCloseBtn()" class="mc-modal-close mc-button_transparent" aria-label="Close"><i mc-icon="mc-close-L_16" class="mc-icon mc-icon_light" color="second"></i></button><ng-container [ngSwitch]="true"><ng-container *ngSwitchCase="isModalType(\'default\')" [ngTemplateOutlet]="tplContentDefault"></ng-container><ng-container *ngSwitchCase="isModalType(\'confirm\')" [ngTemplateOutlet]="tplContentConfirm"></ng-container><ng-container *ngSwitchCase="isModalType(\'custom\')" [ngTemplateOutlet]="tplContentCustom"></ng-container></ng-container></div></div></div></div><ng-template #tplContentCustom><ng-container #bodyContainer></ng-container></ng-template><ng-template #tplContentDefault><div *ngIf="mcTitle" class="mc-modal-header"><div class="mc-modal-title"><ng-container [ngSwitch]="true"><ng-container *ngSwitchCase="isTemplateRef(mcTitle)" [ngTemplateOutlet]="mcTitle"></ng-container><ng-container *ngSwitchCase="isNonEmptyString(mcTitle)"><div [innerHTML]="mcTitle"></div></ng-container></ng-container></div></div><div class="mc-modal-body" [ngStyle]="mcBodyStyle"><ng-container #bodyContainer><ng-container *ngIf="!isComponent(mcContent)" [ngSwitch]="true"><ng-container *ngSwitchCase="isTemplateRef(mcContent)" [ngTemplateOutlet]="mcContent"></ng-container><ng-container *ngSwitchCase="isNonEmptyString(mcContent)"><div [innerHTML]="mcContent"></div></ng-container><ng-container *ngSwitchDefault [ngTemplateOutlet]="tplOriginContent"></ng-container></ng-container></ng-container></div><div *ngIf="mcFooter !== null" class="mc-modal-footer"><ng-container [ngSwitch]="true"><ng-container *ngSwitchCase="isTemplateRef(mcFooter)" [ngTemplateOutlet]="mcFooter"></ng-container><ng-container *ngSwitchCase="isNonEmptyString(mcFooter)"><div [innerHTML]="mcFooter"></div></ng-container><ng-container *ngSwitchCase="isModalButtons(mcFooter)"><ng-container *ngFor="let button of mcFooter"><button mc-button #autoFocusedButton [attr.autofocus]="button.autoFocus" *ngIf="getButtonCallableProp(button, \'show\')" [disabled]="getButtonCallableProp(button, \'disabled\')" [class.mc-progress]="getButtonCallableProp(button, \'loading\')" (click)="onButtonClick(button)" [color]="button.type">{{ button.label }}</button></ng-container></ng-container><ng-container *ngSwitchDefault><button #autoFocusedButton [attr.autofocus]="true" *ngIf="mcOkText !== null" mc-button color="primary" (click)="onClickOkCancel(\'ok\')">{{ okText }}</button> <button *ngIf="mcCancelText!==null" mc-button (click)="onClickOkCancel(\'cancel\')">{{ cancelText }}</button></ng-container></ng-container></div></ng-template><ng-template #tplContentConfirm><div class="mc-modal-body" [ngStyle]="mcBodyStyle"><div class="mc-confirm-body-wrapper"><div class="mc-confirm-body"><div class="mc-confirm-content"><ng-container #bodyContainer><ng-container *ngIf="!isComponent(mcContent)" [ngSwitch]="true"><ng-container *ngSwitchCase="isTemplateRef(mcContent)" [ngTemplateOutlet]="mcContent"></ng-container><ng-container *ngSwitchCase="isNonEmptyString(mcContent)"><div [innerHTML]="mcContent"></div></ng-container><ng-container *ngSwitchDefault [ngTemplateOutlet]="tplOriginContent"></ng-container></ng-container></ng-container></div></div></div></div><div class="mc-confirm-btns"><button mc-button #autoFocusedButton [color]="mcOkType" [attr.autofocus]="true" *ngIf="mcOkText !== \'\'" (click)="onClickOkCancel(\'ok\')">{{ okText }}</button> <button mc-button color="second" *ngIf="mcCancelText!==\'\'" (click)="onClickOkCancel(\'cancel\')">{{ cancelText }}</button></div></ng-template>',styles:['@keyframes mcFadeIn{0%{opacity:0}100%{opacity:1}}@keyframes mcFadeOut{0%{opacity:1}100%{opacity:0}}@keyframes mcZoomIn{0%{opacity:0;transform:translate(0,-25%)}100%{opacity:1;transform:scale(1)}}@keyframes mcZoomOut{0%{transform:scale(1)}100%{opacity:0;transform:translate(0,-30%)}}.fade-appear,.fade-enter{animation-duration:.3s;animation-fill-mode:both;animation-play-state:paused}.fade-leave{animation-duration:.3s;animation-fill-mode:both;animation-play-state:paused}.fade-appear.fade-appear-active,.fade-enter.fade-enter-active{animation-name:mcFadeIn;animation-play-state:running}.fade-leave.fade-leave-active{animation-name:mcFadeOut;animation-play-state:running;pointer-events:none}.className-appear,.className-enter{opacity:0;animation-timing-function:ease-out}.className-leave{animation-timing-function:ease-out}.zoom-appear,.zoom-enter{animation-duration:.3s;animation-fill-mode:both;animation-play-state:paused}.zoom-leave{animation-duration:.3s;animation-fill-mode:both;animation-play-state:paused}.zoom-appear.zoom-appear-active,.zoom-enter.zoom-enter-active{animation-name:mcZoomIn;animation-play-state:running}.zoom-leave.zoom-leave-active{animation-name:mcZoomOut;animation-play-state:running;pointer-events:none}.className-appear,.className-enter{transform:translate(0,-25%);animation-timing-function:cubic-bezier(.075,.82,.165,1)}.className-leave{transform:translate(0,0);animation-timing-function:cubic-bezier(.785,.135,.15,.86)}.mc-confirm .mc-modal-header{display:none}.mc-confirm .mc-modal-close{display:none}.mc-confirm .mc-modal-body{padding:24px}.mc-confirm-body-wrapper{zoom:1}.mc-confirm-body-wrapper:after,.mc-confirm-body-wrapper:before{content:"";display:table}.mc-confirm-body-wrapper:after{clear:both}.mc-confirm-body .mc-confirm-title{display:block;overflow:auto}.mc-confirm .mc-confirm-btns{border-radius:0 0 4px 4px;text-align:right}.mc-confirm .mc-confirm-btns button+button{margin:16px 16px 16px}.mc-modal{box-sizing:border-box;position:relative;top:48px;width:auto;margin:0 auto;padding:0 0 24px 0;list-style:none}.mc-modal.zoom-appear,.mc-modal.zoom-enter{animation-duration:.3s;transform:none;opacity:0}.mc-modal .mc-modal-close{position:absolute;z-index:10;top:0;right:0;width:56px;height:56px}.mc-modal-wrap{position:fixed;z-index:1000;top:0;right:0;bottom:0;left:0;overflow:auto;-webkit-overflow-scrolling:touch;outline:0}.mc-modal-title{margin:0}.mc-modal-content{position:relative;border-radius:4px;background-clip:padding-box;background-color:#fff}.mc-modal-header{padding:14px 16px;display:block;border-radius:4px 4px 0 0}.mc-modal-body{display:block;padding:16px 24px 24px 24px;max-height:calc(100vh - 260px);word-wrap:break-word;overflow-y:auto}.mc-modal-footer{display:block;padding:16px 16px;border-radius:0 0 4px 4px;text-align:right}.mc-modal-footer button+button{margin-left:16px;margin-bottom:0}.mc-modal-mask{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0;height:100%;background-color:rgba(0,0,0,.5)}.mc-modal-mask.mc-modal-mask-hidden{display:none}.mc-modal-open{overflow:hidden}'],encapsulation:t.ViewEncapsulation.None,host:{"(keydown)":"onKeyDown($event)"}}]}],n.ctorParameters=function(){return[{type:c.Overlay},{type:t.Renderer2},{type:t.ComponentFactoryResolver},{type:t.ElementRef},{type:t.ViewContainerRef},{type:Vi},{type:t.ChangeDetectorRef},{type:void 0,decorators:[{type:t.Inject,args:[r.DOCUMENT]}]}]},n.propDecorators={mcModalType:[{type:t.Input}],mcComponent:[{type:t.Input}],mcContent:[{type:t.Input}],mcComponentParams:[{type:t.Input}],mcFooter:[{type:t.Input}],mcVisible:[{type:t.Input}],mcVisibleChange:[{type:t.Output}],mcZIndex:[{type:t.Input}],mcWidth:[{type:t.Input}],mcWrapClassName:[{type:t.Input}],mcClassName:[{type:t.Input}],mcStyle:[{type:t.Input}],mcTitle:[{type:t.Input}],mcCloseByESC:[{type:t.Input}],mcClosable:[{type:t.Input}],mcMask:[{type:t.Input}],mcMaskClosable:[{type:t.Input}],mcMaskStyle:[{type:t.Input}],mcBodyStyle:[{type:t.Input}],mcAfterOpen:[{type:t.Output}],mcAfterClose:[{type:t.Output}],mcOkText:[{type:t.Input}],mcOkType:[{type:t.Input}],mcOkLoading:[{type:t.Input}],mcOnOk:[{type:t.Input},{type:t.Output}],mcCancelText:[{type:t.Input}],mcCancelLoading:[{type:t.Input}],mcOnCancel:[{type:t.Input},{type:t.Output}],modalContainer:[{type:t.ViewChild,args:["modalContainer",{static:!0}]}],bodyContainer:[{type:t.ViewChild,args:["bodyContainer",{read:t.ViewContainerRef,static:!1}]}],autoFocusedButtons:[{type:t.ViewChildren,args:["autoFocusedButton",{read:t.ElementRef}]}],mcGetContainer:[{type:t.Input}]},n}(Fi),Bi=function(){function e(){}return e.prototype.transform=function(e,t){void 0===t&&(t="px");var n=+e;return isNaN(n)?""+e:""+n+t},e.decorators=[{type:t.Pipe,args:[{name:"toCssUnit"}]}],e}(),zi=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"[mc-modal-title], mc-modal-title, [mcModalTitle]",host:{class:"mc-modal-header mc-modal-title"}}]}],e}(),Wi=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"[mc-modal-body], mc-modal-body, [mcModalBody]",host:{class:"mc-modal-body"}}]}],e}(),Yi=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"[mc-modal-footer], mc-modal-footer, [mcModalFooter]",host:{class:"mc-modal-footer"}}]}],e}(),Hi=function(){function e(e,t){var n=this;void 0===t&&(t={}),this.overlay=e,this.createModal(),"mcGetContainer"in t||(t.mcGetContainer=void 0),this.changeProps(t),this.modalRef.instance.open(),this.modalRef.instance.mcAfterClose.subscribe(function(){return n.destroyModal()}),this.overlayRef.keydownEvents().pipe(m.filter(function(e){return e.keyCode===a.ESCAPE&&t.mcCloseByESC})).subscribe(function(){return n.modalRef.instance.close()})}return e.prototype.getInstance=function(){return this.modalRef&&this.modalRef.instance},e.prototype.destroyModal=function(){this.modalRef&&(this.overlayRef.dispose(),this.modalRef=null)},e.prototype.changeProps=function(e){this.modalRef&&Object.assign(this.modalRef.instance,e)},e.prototype.createModal=function(){this.overlayRef=this.overlay.create(),this.modalRef=this.overlayRef.attach(new d.ComponentPortal(ji))},e}(),Ki=function(){function e(e,t){this.overlay=e,this.modalControl=t}return Object.defineProperty(e.prototype,"openModals",{get:function(){return this.modalControl.openModals},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"afterAllClose",{get:function(){return this.modalControl.afterAllClose.asObservable()},enumerable:!0,configurable:!0}),e.prototype.closeAll=function(){this.modalControl.closeAll()},e.prototype.create=function(e){return void 0===e&&(e={}),"function"!=typeof e.mcOnCancel&&(e.mcOnCancel=function(){}),"mcCloseByESC"in e||(e.mcCloseByESC=!0),"mcWidth"in e||(e.mcWidth=480),new Hi(this.overlay,e).getInstance()},e.prototype.confirm=function(e,t){return void 0===e&&(e={}),void 0===t&&(t="confirm"),"mcFooter"in e&&console.warn('The Confirm-Modal doesn\'t support "mcFooter", this property will be ignored.'),"function"!=typeof e.mcOnOk&&(e.mcOnOk=function(){}),e.mcModalType="confirm",e.mcClassName="mc-confirm mc-confirm-"+t+" "+(e.mcClassName||""),this.create(e)},e.prototype.open=function(e){return void 0===e&&(e={}),e.mcModalType="custom",this.create(e)},e.prototype.success=function(e){return void 0===e&&(e={}),this.simpleConfirm(e,"success")},e.prototype.delete=function(e){return void 0===e&&(e={}),this.simpleConfirm(e,"warn")},e.prototype.simpleConfirm=function(e,t){return void 0===e&&(e={}),"mcCancelText"in e||(e.mcCancelText=null),this.confirm(e,t)},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:c.Overlay},{type:Vi}]},e}(),Ui=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,c.OverlayModule,y.A11yModule,Qt,wt],exports:[ji,zi,Wi,Yi],declarations:[ji,zi,Wi,Yi,Bi],entryComponents:[ji],providers:[Vi,Ki]}]}],e}(),Gi="mc-navbar-container",Xi="mc-navbar-item",qi="mc-navbar-brand",$i="mc-navbar-title",Zi=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-navbar-logo",host:{class:"mc-navbar-logo"}}]}],e}(),Qi=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:qi,host:{class:qi}}]}],e}(),Ji=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:$i,host:{class:$i}}]}],e}(),eo=function(){function e(e){this.elementRef=e}return e}(),to=w(eo),no=function(e){function n(t,n){var i=e.call(this,t)||this;return i.elementRef=t,i._focusMonitor=n,i.tabIndex=0,i}return v(n,e),Object.defineProperty(n.prototype,"collapsedTitle",{set:function(e){this.elementRef.nativeElement.setAttribute("computedTitle",encodeURI(e))},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){this.denyClickIfDisabled(),this._focusMonitor.monitor(this.elementRef.nativeElement,!0)},n.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this.elementRef.nativeElement)},n.prototype.denyClickIfDisabled=function(){var e=this,t=this.elementRef.nativeElement.eventListeners("click");t.forEach(function(t){return e.elementRef.nativeElement.removeEventListener("click",t)}),this.elementRef.nativeElement.addEventListener("click",function(t){e.elementRef.nativeElement.hasAttribute("disabled")&&t.stopImmediatePropagation()},!0),t.forEach(function(t){return e.elementRef.nativeElement.addEventListener("click",t)})},n.decorators=[{type:t.Component,args:[{selector:Xi,template:"<ng-content></ng-content>",encapsulation:t.ViewEncapsulation.None,inputs:["disabled"],host:{"[attr.tabIndex]":"disabled ? -1 : tabIndex","[attr.disabled]":"disabled || null",class:"mc-navbar-item"}}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:p.FocusMonitor}]},n.propDecorators={tabIndex:[{type:t.Input}],collapsedTitle:[{type:t.Input}]},n}(to),io=function(){function e(){this.position="left"}return Object.defineProperty(e.prototype,"cssClasses",{get:function(){return"left"===this.position?"mc-navbar-left":"mc-navbar-right"},enumerable:!0,configurable:!0}),e.decorators=[{type:t.Directive,args:[{selector:Gi}]}],e.propDecorators={position:[{type:t.Input}],cssClasses:[{type:t.HostBinding,args:["class"]}]},e}(),oo=function(){function e(e,t){this.element=e,this.width=t,this.collapsed=!1}return e.prototype.processCollapsed=function(e){this.collapsed=e,this.updateCollapsedClass()},e.prototype.updateCollapsedClass=function(){this.collapsed?this.element.classList.add("mc-navbar-collapsed-title"):this.element.classList.remove("mc-navbar-collapsed-title")},e}(),ro=function(){function e(e,t,n){void 0===n&&(n=[]),this.element=e,this.width=t,this.itemsForCollapse=n}return Object.defineProperty(e.prototype,"canCollapse",{get:function(){return this.itemsForCollapse.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"collapsedItemsWidth",{get:function(){return void 0!==this._collapsedItemsWidth?this._collapsedItemsWidth:(this.calculateAndCacheCollapsedItemsWidth(),this._collapsedItemsWidth)},enumerable:!0,configurable:!0}),e.prototype.processCollapsed=function(e){this.itemsForCollapse.length>0&&this.updateTitle(e),this.itemsForCollapse.forEach(function(t){return t.processCollapsed(e)})},e.prototype.calculateAndCacheCollapsedItemsWidth=function(){this._collapsedItemsWidth=this.itemsForCollapse.reduce(function(e,t){return e+t.width},0)},e.prototype.getTitle=function(){var e=this.element.getAttribute("computedTitle");return e?decodeURI(e):this.itemsForCollapse.length>0?this.itemsForCollapse[0].element.innerText:""},e.prototype.updateTitle=function(e){e?this.element.setAttribute("title",this.getTitle()):this.element.removeAttribute("title")},e}(),ao=function(){function e(e){this._elementRef=e,this.forceRecalculateItemsWidth=!1,this.resizeDebounceInterval=100,this.firstLevelElement=Gi,this.secondLevelElements=[Xi,qi,$i];var t=o.fromEvent(window,"resize").pipe(m.debounceTime(this.resizeDebounceInterval));this.resizeSubscription=t.subscribe(this.updateCollapsed.bind(this))}return Object.defineProperty(e.prototype,"maxAllowedWidth",{get:function(){return this._elementRef.nativeElement.querySelector("nav").getBoundingClientRect().width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"itemsWidths",{get:function(){return void 0===this._itemsWidths||this.forceRecalculateItemsWidth?(this.calculateAndCacheItemsWidth(),this._itemsWidths):this._itemsWidths},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalItemsWidth",{get:function(){return void 0===this.totalItemsWidths||this.forceRecalculateItemsWidth?(this.calculateAndCacheTotalItemsWidth(),this.totalItemsWidths):this.totalItemsWidths},enumerable:!0,configurable:!0}),e.prototype.updateCollapsed=function(){for(var e=this.totalItemsWidth-this.maxAllowedWidth,t=this.itemsWidths.length-1;t>=0;t--){var n=this.itemsWidths[t];n.canCollapse&&(n.processCollapsed(e>0),e-=n.collapsedItemsWidth)}},e.prototype.ngAfterViewInit=function(){var e=this;setTimeout(function(){return e.updateCollapsed()},0)},e.prototype.ngOnDestroy=function(){this.resizeSubscription.unsubscribe()},e.prototype.calculateAndCacheTotalItemsWidth=function(){this.totalItemsWidths=this.itemsWidths.reduce(function(e,t){return e+t.width},0)},e.prototype.getOuterElementWidth=function(e){return e.getBoundingClientRect().width+parseInt(getComputedStyle(e).getPropertyValue("margin-right"))+parseInt(getComputedStyle(e).getPropertyValue("margin-left"))},e.prototype.calculateAndCacheItemsWidth=function(){var e=this,t=this.secondLevelElements.map(function(t){return e.firstLevelElement+">"+t}),n=Array.from(this._elementRef.nativeElement.querySelectorAll(t));this._itemsWidths=n.map(function(t){return new ro(t,e.getOuterElementWidth(t),e.getItemsForCollapse(t))})},e.prototype.getItemsForCollapse=function(e){return e.querySelector("[mc-icon],mc-navbar-logo,[mc-navbar-logo]")?Array.from(e.querySelectorAll($i)).map(function(e){return new oo(e,e.getBoundingClientRect().width)}):[]},e.decorators=[{type:t.Component,args:[{selector:"mc-navbar",template:'\n <nav class="mc-navbar">\n <ng-content select="['+Gi+"],"+Gi+'"></ng-content>\n </nav>\n ',styles:[".mc-navbar-left,.mc-navbar-right,mc-navbar-container{height:100%;display:flex;flex-shrink:0;flex-direction:row;justify-content:space-between;align-items:center}.mc-navbar{position:relative;height:48px;padding:0 0;display:flex;flex-direction:row;justify-content:space-between;align-items:center}.mc-navbar [mc-icon]+mc-navbar-title{margin-left:8px}.mc-navbar [mc-icon]{min-width:16px;min-height:16px}.mc-navbar mc-navbar-title:not(.mc-navbar-collapsed-title)+[mc-icon]{margin-left:8px}.mc-navbar-brand,.mc-navbar-item,.mc-navbar-title,mc-navbar-brand,mc-navbar-item,mc-navbar-item:first-child{height:100%;position:relative;display:flex;align-items:center;padding-left:16px;padding-right:16px}.mc-navbar-brand,mc-navbar-brand{padding-left:0;padding-right:12px;margin-right:24px}.mc-navbar-brand .mc-navbar-title,mc-navbar-brand .mc-navbar-title{padding-left:12px;padding-right:0}.mc-navbar-title{white-space:nowrap}.mc-navbar-item:not([disabled]){cursor:pointer}.mc-navbar-item .mc-navbar-title,mc-navbar-brand{padding:0}mc-navbar-item.mc-progress:not([disabled]){cursor:pointer}.mc-navbar-item[disabled],mc-navbar-item[disabled] .mc-navbar-item{cursor:default}mc-navbar-title.mc-navbar-collapsed-title{display:none}"],encapsulation:t.ViewEncapsulation.None}]}],e.ctorParameters=function(){return[{type:t.ElementRef}]},e}(),so=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule,h.PlatformModule],exports:[ao,io,Ji,no,Qi,Zi],declarations:[ao,io,Ji,no,Qi,Zi]}]}],e}(),co={popoverState:s.trigger("state",[s.state("initial",s.style({opacity:0,transform:"scale(1, 0.8)"})),s.transition("* => visible",s.animate("120ms cubic-bezier(0, 0, 0.2, 1)",s.style({opacity:1,transform:"scale(1, 1)"}))),s.transition("* => hidden",s.animate("100ms linear",s.style({opacity:0})))])},lo={Click:"click",Focus:"focus",Hover:"hover"},po={Initial:"initial",Visible:"visible",Hidden:"hidden"},uo=function(){function e(e,n){this.changeDetectorRef=e,this.componentElementRef=n,this.positions=Ye.slice(),this.popoverVisibility=po.Initial,this.closeOnInteraction=!1,this.mcVisibleChange=new t.EventEmitter,this._mcTrigger=lo.Hover,this._mcPlacement="top",this._mcVisible=new o.BehaviorSubject(!1),this._classList=[],this.onHideSubject=new o.Subject,this.availablePositions=ze}return Object.defineProperty(e.prototype,"mcTrigger",{get:function(){return this._mcTrigger},set:function(e){this._mcTrigger=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcPlacement",{get:function(){return this._mcPlacement},set:function(e){e!==this._mcPlacement?(this._mcPlacement=e,this.positions.unshift(ze[this.mcPlacement])):e||(this._mcPlacement="top")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcPopoverSize",{get:function(){return this.popoverSize},set:function(e){e!==this.popoverSize?this.popoverSize=e:e||(this.popoverSize="normal")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcVisible",{get:function(){return this._mcVisible.value},set:function(e){var t=i.coerceBooleanProperty(e);this._mcVisible.value!==t&&(this._mcVisible.next(t),this.mcVisibleChange.emit(t))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"classList",{get:function(){return this._classList.join(" ")},set:function(e){var t=[];Array.isArray(e)?t=e:t.push(e),this._classList=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"getCssClassesList",{get:function(){return this.classList+" mc-popover-"+this.mcPopoverSize+" mc-popover_placement-"+this.getPlacementClass},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"getPlacementClass",{get:function(){return it[this.mcPlacement]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this.popoverVisibility===po.Visible},enumerable:!0,configurable:!0}),e.prototype.handleKeydown=function(e){this.isOpen&&e.keyCode===a.ESCAPE&&this.hide()},e.prototype.show=function(){this.isNonEmptyContent()&&(this.closeOnInteraction=!0,this.popoverVisibility=po.Visible,this._mcVisible.next(!0),this.mcVisibleChange.emit(!0),this.markForCheck())},e.prototype.hide=function(){this.popoverVisibility=po.Hidden,this._mcVisible.next(!1),this.mcVisibleChange.emit(!1),this.markForCheck()},e.prototype.isNonEmptyContent=function(){return!!this.mcContent&&(this.isTemplateRef(this.mcContent)||this.isNonEmptyString(this.mcContent))},e.prototype.afterHidden=function(){return this.onHideSubject.asObservable()},e.prototype.isVisible=function(){return this.popoverVisibility===po.Visible},e.prototype.markForCheck=function(){this.changeDetectorRef.markForCheck()},e.prototype.isTemplateRef=function(e){return e instanceof t.TemplateRef},e.prototype.isNonEmptyString=function(e){return"string"==typeof e&&""!==e},e.prototype.animationStart=function(){this.closeOnInteraction=!1},e.prototype.animationDone=function(e){var t=e.toState;t!==po.Hidden||this.isVisible()||this.onHideSubject.next(),t!==po.Visible&&t!==po.Hidden||(this.closeOnInteraction=!0)},e.prototype.ngOnDestroy=function(){this.onHideSubject.complete()},e.decorators=[{type:t.Component,args:[{selector:"mc-popover",template:'<div class="mc-popover" [ngClass]="classList" [@state]="popoverVisibility" (@state.start)="animationStart()" (@state.done)="animationDone($event)"><div class="mc-popover__container"><div class="mc-popover__header" *ngIf="mcHeader"><ng-container *ngIf="isTemplateRef(mcHeader)" [ngTemplateOutlet]="mcHeader"></ng-container><ng-container *ngIf="isNonEmptyString(mcHeader)"><div [innerHTML]="mcHeader"></div></ng-container></div><div class="mc-popover__content" *ngIf="mcContent"><ng-container *ngIf="isTemplateRef(mcContent)" [ngTemplateOutlet]="mcContent"></ng-container><ng-container *ngIf="isNonEmptyString(mcContent)"><div [innerHTML]="mcContent"></div></ng-container></div><div class="mc-popover__footer" *ngIf="mcFooter"><ng-container *ngIf="isTemplateRef(mcFooter)" [ngTemplateOutlet]="mcFooter"></ng-container><ng-container *ngIf="isNonEmptyString(mcFooter)"><div [innerHTML]="mcFooter"></div></ng-container></div></div><div class="mc-popover__arrow" [ngClass]="{ \'mc-popover__arrow_with-footer\': mcFooter }"></div></div>',preserveWhitespaces:!1,styles:["@keyframes mc-progress{from{background-position:0 0}to{background-position:29px 0}}.mc-progress{position:relative}.mc-progress:after{content:'';position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;background:linear-gradient(135deg,rgba(0,0,0,.05) 10px,transparent 10px,transparent 20px,rgba(0,0,0,.05) 20px,rgba(0,0,0,.05) 30px,transparent 30px) repeat;background-size:29px 29px;animation:mc-progress 1s linear infinite}.cdk-overlay-container{pointer-events:none;top:0;left:0;height:100%;width:100%;position:fixed;z-index:1000;box-sizing:border-box;margin:0;padding:0}.cdk-overlay-backdrop{top:0;bottom:0;left:0;right:0;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0;position:absolute;pointer-events:auto;z-index:1000;box-sizing:border-box;margin:0;padding:0}.cdk-overlay-pane{box-sizing:border-box;position:absolute;pointer-events:auto;margin:0;padding:0;z-index:1000;max-width:100%;max-height:100%}.cdk-overlay-connected-position-bounding-box{box-sizing:border-box;position:absolute;z-index:1000;display:flex;flex-direction:column;margin:0;padding:0;min-width:1px;min-height:1px}.mc-popover{position:relative;display:block;margin:0;border-radius:4px;border-width:1px;border-style:solid;padding:0;box-sizing:border-box;visibility:visible;z-index:1060;list-style:none;white-space:pre-line}.mc-popover-small{max-width:280px}.mc-popover-small .mc-popover{max-width:280px}.mc-popover-normal{max-width:400px}.mc-popover-normal .mc-popover{max-width:400px}.mc-popover-large{max-width:640px}.mc-popover-large .mc-popover{max-width:640px}.mc-popover__container{border-radius:4px;overflow:hidden}.mc-popover__header{padding:10px 16px;border-bottom-width:1px;border-bottom-style:solid}.mc-popover__content{padding:16px}.mc-popover__footer{margin-top:8px;padding:12px 16px;border-top-width:1px;border-top-style:solid}.mc-popover_placement-top .mc-popover,.mc-popover_placement-top-left .mc-popover,.mc-popover_placement-top-right .mc-popover{margin-bottom:8px}.mc-popover_placement-right .mc-popover,.mc-popover_placement-right-bottom .mc-popover,.mc-popover_placement-right-top .mc-popover{margin-left:8px}.mc-popover_placement-bottom .mc-popover,.mc-popover_placement-bottom-left .mc-popover,.mc-popover_placement-bottom-right .mc-popover{margin-top:8px}.mc-popover_placement-left .mc-popover,.mc-popover_placement-left-bottom .mc-popover,.mc-popover_placement-left-top .mc-popover{margin-right:8px}.mc-popover__arrow{position:absolute;z-index:-1;width:14px;height:14px;border:solid 1px;transform:rotate(45deg)}.mc-popover_placement-top .mc-popover__arrow{bottom:-6px;left:50%;margin-left:-4px}.mc-popover_placement-top-left .mc-popover__arrow{bottom:-6px;left:20px;margin-left:0}.mc-popover_placement-top-right .mc-popover__arrow{bottom:-6px;right:20px;margin-left:0}.mc-popover_placement-right .mc-popover__arrow{left:-6px;top:50%;margin-top:-4px}.mc-popover_placement-right-top .mc-popover__arrow{left:-6px;top:18px;margin-top:-4px}.mc-popover_placement-right-bottom .mc-popover__arrow{left:-6px;bottom:14px;margin-top:-4px}.mc-popover_placement-left .mc-popover__arrow{right:-6px;top:50%;margin-top:-4px}.mc-popover_placement-left-top .mc-popover__arrow{right:-6px;top:18px;margin-top:-4px}.mc-popover_placement-left-bottom .mc-popover__arrow{right:-6px;bottom:14px;margin-top:-4px}.mc-popover_placement-bottom .mc-popover__arrow{top:-6px;left:50%;margin-left:-4px}.mc-popover_placement-bottom-left .mc-popover__arrow{top:-6px;left:20px;margin-left:0}.mc-popover_placement-bottom-right .mc-popover__arrow{top:-6px;right:20px;margin-left:0}"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,animations:[co.popoverState],host:{"[class]":"getCssClassesList","(keydown)":"handleKeydown($event)"}}]}],e.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:t.ElementRef}]},e.propDecorators={mcVisibleChange:[{type:t.Output,args:["mcPopoverVisibleChange"]}]},e}(),ho=new t.InjectionToken("mc-popover-scroll-strategy"),mo={provide:ho,deps:[c.Overlay],useFactory:le},go=function(){function e(e,n,i,r,a,s,c){var l=this;this.overlay=e,this.elementRef=n,this.ngZone=i,this.scrollDispatcher=r,this.hostView=a,this.scrollStrategy=s,this.direction=c,this.isPopoverOpen=!1,this.isDynamicPopover=!1,this.mcVisibleChange=new t.EventEmitter,this.mcPositionStrategyPlacementChange=new t.EventEmitter,this.$unsubscribe=new o.Subject,this._disabled=!1,this._mcTrigger=lo.Click,this.popoverSize="normal",this._mcPlacementPriority=null,this._mcPlacement="top",this.manualListeners=new Map,this.destroyed=new o.Subject,this.resizeListener=function(){return l.updatePosition()},this.availablePositions=ze,this.defaultPositionsMap=ot}return Object.defineProperty(e.prototype,"mcHeader",{get:function(){return this._mcHeader},set:function(e){this._mcHeader=e,this.updateCompValue("mcHeader",e),this.isPopoverOpen&&this.updatePosition(!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcContent",{get:function(){return this._mcContent},set:function(e){this._mcContent=e,this.updateCompValue("mcContent",e),this.isPopoverOpen&&this.updatePosition(!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcFooter",{get:function(){return this._mcFooter},set:function(e){this._mcFooter=e,this.updateCompValue("mcFooter",e),this.isPopoverOpen&&this.updatePosition(!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcMouseEnterDelay",{get:function(){return this._mcMouseEnterDelay},set:function(e){this._mcMouseEnterDelay=e,this.updateCompValue("mcMouseEnterDelay",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcMouseLeaveDelay",{get:function(){return this._mcMouseLeaveDelay},set:function(e){this._mcMouseLeaveDelay=e,this.updateCompValue("mcMouseLeaveDelay",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcTrigger",{get:function(){return this._mcTrigger},set:function(e){e?(this._mcTrigger=e,this.updateCompValue("mcTrigger",e)):this._mcTrigger=lo.Click,this.resetListeners()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcPopoverSize",{get:function(){return this.popoverSize},set:function(e){!e||"small"!==e&&"normal"!==e&&"large"!==e?this.popoverSize="normal":(this.popoverSize=e,this.updateCompValue("mcPopoverSize",e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcPlacementPriority",{get:function(){return this._mcPlacementPriority},set:function(e){e&&e.length>0?this._mcPlacementPriority=e:this._mcPlacementPriority=null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcPlacement",{get:function(){return this._mcPlacement},set:function(e){e?(this._mcPlacement=e,this.updateCompValue("mcPlacement",e)):this._mcPlacement="top"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"classList",{get:function(){return this._classList},set:function(e){this._classList=e,this.updateCompValue("classList",this._classList)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcVisible",{get:function(){return this._mcVisible},set:function(e){
|
14
|
+
var t=i.coerceBooleanProperty(e);this._mcVisible!==t&&(this._mcVisible=t,this.updateCompValue("mcVisible",t),t?this.show():this.hide())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this.isPopoverOpen},enumerable:!0,configurable:!0}),e.prototype.createOverlay=function(){var e=this;this.overlayRef&&this.overlayRef.dispose();var t=this.overlay.position().flexibleConnectedTo(this.elementRef).withTransformOriginOn(".mc-popover").withFlexibleDimensions(!1).withViewportMargin(8).withPositions(Ye.slice()),n=this.scrollDispatcher.getAncestorScrollContainers(this.elementRef);return t.withScrollableContainers(n),t.positionChanges.pipe(m.takeUntil(this.destroyed)).subscribe(function(t){e.popover&&(e.onPositionChange(t),t.scrollableViewProperties.isOverlayClipped&&e.popover.mcVisible&&e.ngZone.run(function(){return e.hide()}))}),this.overlayRef=this.overlay.create({direction:this.direction,positionStrategy:t,panelClass:"mc-popover__panel",scrollStrategy:this.scrollStrategy(),hasBackdrop:this.mcTrigger===lo.Click,backdropClass:"no-class"}),this.updateOverlayBackdropClick(),this.updatePosition(),this.overlayRef.detachments().pipe(m.takeUntil(this.destroyed)).subscribe(function(){return e.detach()}),this.overlayRef},e.prototype.detach=function(){this.overlayRef&&this.overlayRef.hasAttached()&&this.overlayRef.detach(),this.popover=null},e.prototype.onPositionChange=function(e){var t=this,n=this.mcPlacement;Object.keys(this.availablePositions).some(function(i){return e.connectionPair.originX===t.availablePositions[i].originX&&e.connectionPair.originY===t.availablePositions[i].originY&&e.connectionPair.overlayX===t.availablePositions[i].overlayX&&e.connectionPair.overlayY===t.availablePositions[i].overlayY&&(n=i,!0)}),this.updateCompValue("mcPlacement",n),this.mcPositionStrategyPlacementChange.emit(n),this.popover&&(this.updateCompValue("classList",this.classList),this.popover.markForCheck()),this.defaultPositionsMap[n]||this.handlePositionUpdate(n)},e.prototype.handlePositionUpdate=function(e){this.overlayRef||(this.overlayRef=this.createOverlay());var t=this.overlayRef.overlayElement.style,n=this.hostView.element.nativeElement.clientHeight,i=this.hostView.element.nativeElement.clientWidth,o=Math.floor(n/2),r=Math.floor(i/2-6),a={top:o,bottom:o,right:r,left:r},s=e.split(/(?=[A-Z])/)[1].toLowerCase();("top"===s||"bottom"===s)&&n>44||("left"===s||"right"===s)&&i>44||(this.overlayRef.overlayElement.style[s]||(this.overlayRef.overlayElement.style[s]="0px"),this.overlayRef.overlayElement.style[s]=parseInt(t[s].split("px")[0],10)+a[s]-20+"px")},e.prototype.updateCompValue=function(e,t){this.isDynamicPopover&&t&&this.popover&&(this.popover[e]=t)},e.prototype.ngOnInit=function(){this.initElementRefListeners()},e.prototype.ngOnDestroy=function(){var e=this;this.overlayRef&&this.overlayRef.dispose(),this.manualListeners.forEach(function(t,n){e.elementRef.nativeElement.removeEventListener(n,t)}),this.manualListeners.clear(),this.$unsubscribe.next(),this.$unsubscribe.complete()},e.prototype.handleKeydown=function(e){this.isOpen&&e.keyCode===a.ESCAPE&&this.hide()},e.prototype.handleTouchend=function(){this.hide()},e.prototype.initElementRefListeners=function(){var e=this;this.mcTrigger===lo.Click?this.manualListeners.set("click",function(){return e.show()}).forEach(function(t,n){e.elementRef.nativeElement.addEventListener(n,t)}):this.mcTrigger===lo.Hover?this.manualListeners.set("mouseenter",function(){return e.show()}).set("mouseleave",function(){return e.hide()}).forEach(function(t,n){e.elementRef.nativeElement.addEventListener(n,t)}):this.mcTrigger===lo.Focus&&this.manualListeners.set("focus",function(){return e.show()}).set("blur",function(){return e.hide()}).forEach(function(t,n){e.elementRef.nativeElement.addEventListener(n,t)})},e.prototype.registerResizeHandler=function(){var e=this;this.ngZone.runOutsideAngular(function(){window.addEventListener("resize",e.resizeListener)})},e.prototype.deregisterResizeHandler=function(){window.removeEventListener("resize",this.resizeListener)},e.prototype.resetListeners=function(){var e=this;this.manualListeners.size&&(this.manualListeners.forEach(function(t,n){e.elementRef.nativeElement.removeEventListener(n,t)}),this.manualListeners.clear(),this.initElementRefListeners())},e.prototype.show=function(){var e=this;if(!this.disabled){if(!this.popover){this.detach();var t=this.createOverlay();this.portal=this.portal||new d.ComponentPortal(uo,this.hostView),this.popover=t.attach(this.portal).instance,this.popover.afterHidden().pipe(m.takeUntil(this.destroyed)).subscribe(function(){return e.detach()}),this.isDynamicPopover=!0;["mcPlacement","mcPopoverSize","mcTrigger","mcMouseEnterDelay","mcMouseLeaveDelay","classList","mcVisible","mcHeader","mcContent","mcFooter"].forEach(function(t){return e.updateCompValue(t,e[t])}),this.popover.mcVisibleChange.pipe(m.takeUntil(this.$unsubscribe),m.distinctUntilChanged()).subscribe(function(t){e.mcVisible=t,e.mcVisibleChange.emit(t),e.isPopoverOpen=t})}this.popover.show()}},e.prototype.hide=function(){this.popover&&this.popover.hide()},e.prototype.updateOverlayBackdropClick=function(){var e=this;this.mcTrigger===lo.Click&&this.overlayRef?this.backDropSubscription=this.overlayRef.backdropClick().subscribe(function(){e.popover&&e.popover.hide()}):this.backDropSubscription&&this.overlayRef&&(this.backDropSubscription.unsubscribe(),this.overlayRef.detachBackdrop())},e.prototype.updatePosition=function(e){void 0===e&&(e=!1),this.overlayRef||(this.overlayRef=this.createOverlay());var t=this.overlayRef.getConfig().positionStrategy;t.withPositions(this.getPrioritizedPositions()).withPush(!0),e&&setTimeout(function(){t.reapplyLastPosition()})},e.prototype.getPriorityPlacementStrategy=function(e){var t=this,n=[],i=Object.keys(this.availablePositions);return Array.isArray(e)?e.forEach(function(e){i.indexOf(e)>-1&&n.push(t.availablePositions[e])}):i.indexOf(e)>-1&&n.push(this.availablePositions[e]),n},e.prototype.getPrioritizedPositions=function(){return this.mcPlacementPriority?this.getPriorityPlacementStrategy(this.mcPlacementPriority):nt[this.mcPlacement]},e.decorators=[{type:t.Directive,args:[{selector:"[mcPopover]",exportAs:"mcPopover",host:{"(keydown)":"handleKeydown($event)","(touchend)":"handleTouchend()","[class.mc-popover_open]":"isOpen"}}]}],e.ctorParameters=function(){return[{type:c.Overlay},{type:t.ElementRef},{type:t.NgZone},{type:c.ScrollDispatcher},{type:t.ViewContainerRef},{type:void 0,decorators:[{type:t.Inject,args:[ho]}]},{type:n.Directionality,decorators:[{type:t.Optional}]}]},e.propDecorators={mcVisibleChange:[{type:t.Output,args:["mcPopoverVisibleChange"]}],mcPositionStrategyPlacementChange:[{type:t.Output,args:["mcPopoverPositionStrategyPlacementChange"]}],mcHeader:[{type:t.Input,args:["mcPopoverHeader"]}],mcContent:[{type:t.Input,args:["mcPopoverContent"]}],mcFooter:[{type:t.Input,args:["mcPopoverFooter"]}],disabled:[{type:t.Input,args:["mcPopoverDisabled"]}],mcMouseEnterDelay:[{type:t.Input,args:["mcPopoverMouseEnterDelay"]}],mcMouseLeaveDelay:[{type:t.Input,args:["mcPopoverMouseLeaveDelay"]}],mcTrigger:[{type:t.Input,args:["mcPopoverTrigger"]}],mcPopoverSize:[{type:t.Input,args:["mcPopoverSize"]}],mcPlacementPriority:[{type:t.Input,args:["mcPopoverPlacementPriority"]}],mcPlacement:[{type:t.Input,args:["mcPopoverPlacement"]}],classList:[{type:t.Input,args:["mcPopoverClass"]}],mcVisible:[{type:t.Input,args:["mcPopoverVisible"]}]},e}(),fo=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:[uo,go],exports:[y.A11yModule,uo,go],imports:[r.CommonModule,c.OverlayModule],providers:[mo],entryComponents:[uo]}]}],e}(),yo=0,bo=function(){function e(e){this._elementRef=e}return e}(),vo=O(bo),Co=function(e){function n(t){var n=e.call(this,t)||this;return n.id="mc-progress-bar-"+yo++,n.value=0,n.mode="determinate",n.color=ve.Primary,n}return v(n,e),Object.defineProperty(n.prototype,"percentage",{get:function(){return Math.max(0,Math.min(100,this.value))/100},enumerable:!0,configurable:!0}),n.decorators=[{type:t.Component,args:[{selector:"mc-progress-bar",template:'<div class="mc-progress-bar__inner" [ngSwitch]="mode" [id]="id"><div *ngSwitchCase="\'indeterminate\'" class="mc-progress-bar__line mc-progress-bar__line--indeterminate"></div><div *ngSwitchDefault class="mc-progress-bar__line mc-progress-bar__line--determinate" [ngStyle]="{transform: \'scaleX(\' + percentage + \')\'}"></div></div>',styles:["@keyframes mc-progress-bar-indeterminate{0%{transform:scaleX(.25) translateX(-150%)}100%{transform:scaleX(.4) translateX(250%)}}.mc-progress-bar{display:block;height:4px;overflow:hidden}.mc-progress-bar__inner{height:100%}.mc-progress-bar__line{height:100%;transform-origin:top left}.mc-progress-bar__line--determinate{transition:transform .3s}.mc-progress-bar__line--indeterminate{animation:mc-progress-bar-indeterminate 2.1s cubic-bezier(.455,.03,.515,.955) infinite}"],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,host:{class:"mc-progress-bar","[attr.id]":"id"}}]}],n.ctorParameters=function(){return[{type:t.ElementRef}]},n.propDecorators={id:[{type:t.Input}],value:[{type:t.Input}],mode:[{type:t.Input}],color:[{type:t.Input}]},n}(vo),_o=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,h.PlatformModule],exports:[Co],declarations:[Co]}]}],e}(),xo=0,wo=function(){function e(e){this._elementRef=e}return e}(),Oo=O(wo),ko=function(e){function n(t){var n=e.call(this,t)||this;return n.id="mc-progress-spinner-"+xo++,n.value=0,n.mode="determinate",n.color=ve.Primary,n}return v(n,e),Object.defineProperty(n.prototype,"percentage",{get:function(){return Math.max(0,Math.min(100,this.value))/100},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"dashOffsetPercent",{get:function(){return 273-273*this.percentage+"%"},enumerable:!0,configurable:!0}),n.decorators=[{type:t.Component,args:[{selector:"mc-progress-spinner",template:'<div class="mc-progress-spinner__inner" [ngClass]="{\'mc-progress-spinner__inner--indeterminate\': mode === \'indeterminate\'}"><svg focusable="false" preserveAspectRatio="xMidYMid meet" viewBox="0 0 100 100" class="mc-progress-spinner__svg"><circle cx="50%" cy="50%" r="42.5%" class="mc-progress-spinner__circle" [ngStyle]="{\'stroke-dashoffset\': mode === \'determinate\' ? dashOffsetPercent : null}"></circle></svg></div>',styles:["@keyframes mc-progress-spinner-indeterminate{100%{transform:rotateZ(270deg)}}.mc-progress-spinner{display:inline-block;width:16px;height:16px;overflow:hidden}.mc-progress-spinner__inner{width:100%;height:100%;transform:rotateZ(-90deg)}.mc-progress-spinner__inner--indeterminate{animation:mc-progress-spinner-indeterminate 1.5s cubic-bezier(.455,.03,.515,.955) infinite}.mc-progress-spinner__inner--indeterminate .mc-progress-spinner__circle{stroke-dashoffset:80%}.mc-progress-spinner__svg{width:100%;height:100%}.mc-progress-spinner__circle{fill:none;stroke:#000;stroke-dasharray:273%;stroke-width:13%;transition:stroke-dashoffset .3s;transform-origin:center center}"],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,host:{class:"mc-progress-spinner","[attr.id]":"id"}}]}],n.ctorParameters=function(){return[{type:t.ElementRef}]},n.propDecorators={id:[{type:t.Input}],value:[{type:t.Input}],mode:[{type:t.Input}],color:[{type:t.Input}]},n}(Oo),Io=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,h.PlatformModule],exports:[ko],declarations:[ko]}]}],e}(),So=0,Do=function(){function e(e,t){this.source=e,this.value=t}return e}(),Eo=function(){function e(){}return e}(),Po=w(Eo),Mo={provide:l.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return To}),multi:!0},To=function(e){function n(n){var i=e.call(this)||this;return i._changeDetector=n,i.change=new t.EventEmitter,i._value=null,i._name="mc-radio-group-"+So++,i._selected=null,i.isInitialized=!1,i._labelPosition="after",i._disabled=!1,i._required=!1,i.controlValueAccessorChangeFn=function(){},i.onTouched=function(){},i}return v(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e,this.updateRadioButtonNames()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"labelPosition",{get:function(){return this._labelPosition},set:function(e){this._labelPosition="before"===e?"before":"after",this.markRadiosForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(e){this._value!==e&&(this._value=e,this.updateSelectedRadioFromValue(),this.checkSelectedRadioButton())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selected",{get:function(){return this._selected},set:function(e){this._selected=e,this.value=e?e.value:null,this.checkSelectedRadioButton()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=_(e),this.markRadiosForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"required",{get:function(){return this._required},set:function(e){this._required=_(e),this.markRadiosForCheck()},enumerable:!0,configurable:!0}),n.prototype.checkSelectedRadioButton=function(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)},n.prototype.ngAfterContentInit=function(){this.isInitialized=!0},n.prototype.touch=function(){this.onTouched&&this.onTouched()},n.prototype.emitChangeEvent=function(){this.isInitialized&&this.change.emit(new Do(this._selected,this._value))},n.prototype.markRadiosForCheck=function(){this.radios&&this.radios.forEach(function(e){return e.markForCheck()})},n.prototype.writeValue=function(e){this.value=e,this._changeDetector.markForCheck()},n.prototype.registerOnChange=function(e){this.controlValueAccessorChangeFn=e},n.prototype.registerOnTouched=function(e){this.onTouched=e},n.prototype.setDisabledState=function(e){this.disabled=e,this._changeDetector.markForCheck()},n.prototype.updateRadioButtonNames=function(){var e=this;this.radios&&this.radios.forEach(function(t){t.name=e.name})},n.prototype.updateSelectedRadioFromValue=function(){var e=this,t=null!==this._selected&&this._selected.value===this._value;null==this.radios||t||(this._selected=null,this.radios.forEach(function(t){t.checked=e.value===t.value,t.checked&&(e._selected=t)}))},n.decorators=[{type:t.Directive,args:[{selector:"mc-radio-group",exportAs:"mcRadioGroup",providers:[Mo],host:{role:"radiogroup",class:"mc-radio-group"},inputs:["disabled"]}]}],n.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},n.propDecorators={name:[{type:t.Input}],labelPosition:[{type:t.Input}],value:[{type:t.Input}],selected:[{type:t.Input}],disabled:[{type:t.Input}],required:[{type:t.Input}],change:[{type:t.Output}],radios:[{type:t.ContentChildren,args:[t.forwardRef(function(){return Vo}),{descendants:!0}]}]},n}(Po),Ao=function(){function e(e){this._elementRef=e}return e}(),Ro=O(k(Ao)),Vo=function(e){function n(n,i,o,r,a){var s=e.call(this,i)||this;return s._changeDetector=o,s.focusMonitor=r,s._radioDispatcher=a,s.change=new t.EventEmitter,s.isFocused=!1,s.uniqueId="mc-radio-"+ ++So,s._checked=!1,s._value=null,s.removeUniqueSelectionListener=function(){},s.id=s.uniqueId,s.radioGroup=n,s.removeUniqueSelectionListener=a.listen(function(e,t){e!==s.id&&t===s.name&&(s.checked=!1)}),s}return v(n,e),Object.defineProperty(n.prototype,"checked",{get:function(){return this._checked},set:function(e){var t=_(e);this._checked!==t&&(this._checked=t,t&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!t&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),t&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(e){this._value!==e&&(this._value=e,null!=this.radioGroup&&(this.checked||(this.checked=this.radioGroup.value===e),this.checked&&(this.radioGroup.selected=this)))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled||null!=this.radioGroup&&this.radioGroup.disabled},set:function(e){var t=_(e);this._disabled!==t&&(this._disabled=t,this._changeDetector.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"required",{get:function(){return this._required||this.radioGroup&&this.radioGroup.required},set:function(e){this._required=_(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"labelPosition",{get:function(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"},set:function(e){this._labelPosition=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inputId",{get:function(){return(this.id||this.uniqueId)+"-input"},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.name=this.radioGroup.name)},n.prototype.ngAfterViewInit=function(){var e=this;this.focusMonitor.monitor(this._elementRef,!0).subscribe(function(t){!t&&e.radioGroup&&e.radioGroup.touch()})},n.prototype.ngOnDestroy=function(){this.focusMonitor.stopMonitoring(this._elementRef),this.removeUniqueSelectionListener()},n.prototype.focus=function(){this.inputElement.nativeElement.focus()},n.prototype.markForCheck=function(){this._changeDetector.markForCheck()},n.prototype.onInputClick=function(e){e.stopPropagation()},n.prototype.onInputChange=function(e){e.stopPropagation();var t=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this.emitChangeEvent(),this.radioGroup&&(this.radioGroup.controlValueAccessorChangeFn(this.value),this.radioGroup.touch(),t&&this.radioGroup.emitChangeEvent())},n.prototype.emitChangeEvent=function(){this.change.emit(new Do(this,this._value))},n.decorators=[{type:t.Component,args:[{selector:"mc-radio-button",template:'<label class="mc-radio-label" [attr.for]="inputId" #label><input type="radio" class="mc-radio-input cdk-visually-hidden" #input [id]="inputId" [checked]="checked" [disabled]="disabled" [tabIndex]="tabIndex" [attr.name]="name" [required]="required" [attr.aria-label]="ariaLabel" [attr.aria-labelledby]="ariaLabelledby" [attr.aria-describedby]="ariaDescribedby" (change)="onInputChange($event)" (click)="onInputClick($event)"><div class="mc-radio-label-content" [class.mc-radio-label-before]="labelPosition == \'before\'"><div class="mc-radio-button__outer-circle"></div><div class="mc-radio-button__inner-circle"></div><ng-content></ng-content></div></label>',styles:[".mc-radio-button{display:inline-block}.mc-radio-label{display:inline-flex;align-items:center;vertical-align:middle;cursor:pointer;white-space:nowrap;width:100%}.mc-radio-label-content{display:inline-block;position:relative;order:0;line-height:inherit;padding-left:26px;padding-right:0}.mc-radio-label-content .mc-radio-button__inner-circle,.mc-radio-label-content .mc-radio-button__outer-circle{box-sizing:content-box;position:absolute;content:'';border-style:solid;border-radius:50%}.mc-radio-label-content .mc-radio-button__outer-circle{left:0;top:calc(50% - 8px);width:14px;height:14px;border-width:1px}.mc-radio-label-content .mc-radio-button__inner-circle{display:none;left:1px;top:calc(50% - 7px);width:6px;height:6px;border-width:4px;border-color:transparent}[dir=rtl] .mc-radio-label-content{padding-right:26px;padding-left:0}.mc-radio-input{position:absolute;outline:0;opacity:0}"],inputs:["color","tabIndex"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,exportAs:"mcRadioButton",host:{class:"mc-radio-button","[attr.id]":"id","[class.mc-checked]":"checked","[class.mc-disabled]":"disabled"}}]}],n.ctorParameters=function(){return[{type:To,decorators:[{type:t.Optional}]},{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:y.FocusMonitor},{type:g.UniqueSelectionDispatcher}]},n.propDecorators={checked:[{type:t.Input}],value:[{type:t.Input}],disabled:[{type:t.Input}],required:[{type:t.Input}],labelPosition:[{type:t.Input}],name:[{type:t.Input}],ariaLabel:[{type:t.Input,args:["aria-label"]}],ariaLabelledby:[{type:t.Input,args:["aria-labelledby"]}],ariaDescribedby:[{type:t.Input,args:["aria-describedby"]}],inputElement:[{type:t.ViewChild,args:["input",{static:!1}]}],change:[{type:t.Output}],isFocused:[{type:t.Input}],id:[{type:t.Input}]},n}(Ro),Fo=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule,be],exports:[To,Vo],declarations:[To,Vo]}]}],e}(),Lo=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return v(n,e),n.decorators=[{type:t.Directive,args:[{selector:"[mcTreeNodeDef]",inputs:["when: mcTreeNodeDefWhen"],providers:[{provide:b.CdkTreeNodeDef,useExisting:n}]}]}],n.propDecorators={data:[{type:t.Input,args:["mcTreeNode"]}]},n}(b.CdkTreeNodeDef),No=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.baseLeftPadding=12,t._indent=20,t.iconWidth=20,t}return v(n,e),Object.defineProperty(n.prototype,"leftPadding",{get:function(){return(this.withIcon?0:this.iconWidth)+this.baseLeftPadding},enumerable:!0,configurable:!0}),n.prototype.paddingIndent=function(){var e=this.treeNode.data&&this.tree.treeControl.getLevel?this.tree.treeControl.getLevel(this.treeNode.data):0,t=this.level||e;return t>0?t*this._indent+this.leftPadding+"px":this.leftPadding+"px"},n.prototype.ngOnInit=function(){this.withIcon=this.tree.treeControl.isExpandable(this.treeNode.data),this.setPadding()},n.decorators=[{type:t.Directive,args:[{selector:"[mcTreeNodePadding]",providers:[{provide:b.CdkTreeNodePadding,useExisting:n}]}]}],n.propDecorators={level:[{type:t.Input,args:["mcTreeNodePadding"]}],indent:[{type:t.Input,args:["mcTreeNodePaddingIndent"]}]},n}(b.CdkTreeNodePadding),jo=function(e){function n(t,n){var i=e.call(this,t,n)||this;return i.disabled=!1,i.tree.treeControl.filterValue.pipe(m.map(function(e){return e.length>0})).subscribe(function(e){return i.disabled=e}),i}return v(n,e),Object.defineProperty(n.prototype,"iconState",{get:function(){return this.disabled||this.tree.treeControl.isExpanded(this.node)},enumerable:!0,configurable:!0}),n.decorators=[{type:t.Component,args:[{selector:"mc-tree-node-toggle",template:'\n <i class="mc mc-icon mc-angle-down-S_16"></i>\n ',host:{class:"mc-tree-node-toggle","(click)":"toggle($event)","[class.mc-disabled]":"disabled","[class.mc-opened]":"iconState"},encapsulation:t.ViewEncapsulation.None,providers:[{provide:b.CdkTreeNodeToggle,useExisting:n}]}]}],n.ctorParameters=function(){return[{type:b.CdkTree},{type:b.CdkTreeNode}]},n.propDecorators={node:[{type:t.Input}]},n}(b.CdkTreeNodeToggle),Bo=function(e){function n(t,n){var i=e.call(this,t,n)||this;return i.disabled=!1,i.tree.treeControl.filterValue.pipe(m.map(function(e){return e.length>0})).subscribe(function(e){return i.disabled=e}),i}return v(n,e),n.decorators=[{type:t.Directive,args:[{selector:"[mcTreeNodeToggle]",host:{"(click)":"toggle($event)","[class.mc-disabled]":"disabled"},providers:[{provide:b.CdkTreeNodeToggle,useExisting:n}]}]}],n.ctorParameters=function(){return[{type:b.CdkTree},{type:b.CdkTreeNode}]},n}(b.CdkTreeNodeToggle),zo=new t.InjectionToken("MC_TREE_OPTION_PARENT_COMPONENT"),Wo=function(){function e(e,t){void 0===t&&(t=!1),this.source=e,this.isUserInput=t}return e}(),Yo=0,Ho=function(e){function n(n,i,r,a){var s=e.call(this,n,a)||this;return s.changeDetectorRef=i,s.ngZone=r,s.tree=a,s.onFocus=new o.Subject,s.onBlur=new o.Subject,s._disabled=!1,s.onSelectionChange=new t.EventEmitter,s._selected=!1,s._id="mc-tree-option-"+Yo++,s.hasFocus=!1,s}return v(n,e),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(e){this._value=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled||this.tree&&this.tree.disabled},set:function(e){var t=i.coerceBooleanProperty(e);t!==this._disabled&&(this._disabled=t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"showCheckbox",{get:function(){return void 0!==this._showCheckbox?this._showCheckbox:this.tree.showCheckbox},set:function(e){this._showCheckbox=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selected",{get:function(){return this._selected},set:function(e){var t=i.coerceBooleanProperty(e);t!==this._selected&&this.setSelected(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"multiple",{get:function(){return this.tree.multiple},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"viewValue",{get:function(){return(this.getHostElement().textContent||"").trim()},enumerable:!0,configurable:!0}),n.prototype.ngAfterContentInit=function(){this.value=this.tree.treeControl.getValue(this.data)},n.prototype.toggle=function(){this.selected=!this.selected},n.prototype.setSelected=function(e){this._selected!==e&&this.tree.selectionModel&&(this._selected=e,e?this.tree.selectionModel.select(this.data):this.tree.selectionModel.deselect(this.data),this.changeDetectorRef.markForCheck())},n.prototype.focus=function(e){var t=this;"program"!==e&&(this.disabled||this.hasFocus||(this.elementRef.nativeElement.focus(),this.onFocus.next({option:this}),Promise.resolve().then(function(){t.hasFocus=!0,t.changeDetectorRef.markForCheck()})))},n.prototype.blur=function(){var e=this;this.ngZone.onStable.asObservable().pipe(m.take(1)).subscribe(function(){e.ngZone.run(function(){e.hasFocus=!1,e.onBlur.next({option:e})})})},n.prototype.getHeight=function(){var e=this.elementRef.nativeElement.getClientRects();return e.length?e[0].height:0},n.prototype.select=function(){this._selected||(this._selected=!0,this.changeDetectorRef.markForCheck(),this.emitSelectionChangeEvent())},n.prototype.deselect=function(){this._selected&&(this._selected=!1,this.changeDetectorRef.markForCheck())},n.prototype.selectViaInteraction=function(e){if(!this.disabled){this.changeDetectorRef.markForCheck(),this.emitSelectionChangeEvent(!0);var t=!!e&&a.hasModifierKey(e,"shiftKey"),n=!!e&&a.hasModifierKey(e,"ctrlKey");this.tree.setSelectedOptionsByClick(this,t,n)}},n.prototype.emitSelectionChangeEvent=function(e){void 0===e&&(e=!1),this.onSelectionChange.emit(new Wo(this,e))},n.prototype.getHostElement=function(){return this.elementRef.nativeElement},n.prototype.markForCheck=function(){this.changeDetectorRef.markForCheck()},n.decorators=[{type:t.Component,args:[{selector:"mc-tree-option",exportAs:"mcTreeOption",template:'<ng-content select="[mc-icon]"></ng-content><ng-content select="mc-tree-node-toggle"></ng-content><mc-pseudo-checkbox *ngIf="showCheckbox" [state]="selected ? \'checked\' : \'unchecked\'" [disabled]="disabled"></mc-pseudo-checkbox><span class="mc-option-text mc-no-select"><ng-content></ng-content></span><div class="mc-option-overlay"></div>',host:{"[attr.id]":"id","[attr.tabindex]":"-1","[attr.disabled]":"disabled || null",class:"mc-tree-option","[class.mc-selected]":"selected","[class.mc-focused]":"hasFocus","(focus)":"focus()","(blur)":"blur()","(click)":"selectViaInteraction($event)"},changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,providers:[{provide:b.CdkTreeNode,useExisting:n}]}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:t.NgZone},{type:void 0,decorators:[{type:t.Inject,args:[zo]}]}]},n.propDecorators={disabled:[{type:t.Input}],showCheckbox:[{type:t.Input}],onSelectionChange:[{type:t.Output}]},n}(b.CdkTreeNode),Ko={provide:l.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return Xo}),multi:!0},Uo=function(){function e(e,t){this.source=e,this.option=t}return e}(),Go=function(){function e(e,t){this.source=e,this.option=t}return e}(),Xo=function(e){function n(n,i,r,a,s){var c=e.call(this,i,r)||this;return c.elementRef=n,c.resetFocusedItemOnBlur=!0,c.navigationChange=new t.EventEmitter,c.selectionChange=new t.EventEmitter,c.multipleMode=null,c.userTabIndex=null,c._autoSelect=!0,c._noUnselectLast=!0,c._disabled=!1,c._tabIndex=0,c.destroy=new o.Subject,c.onChange=function(){},c.onTouched=function(){},c.tabIndex=parseInt(a)||0,s===Ie.CHECKBOX||s===Ie.KEYBOARD?c.multipleMode=s:null!==s&&(c.multipleMode=Ie.CHECKBOX),c.multipleMode===Ie.CHECKBOX&&(c.autoSelect=!1,c.noUnselectLast=!1),c.selectionModel=new g.SelectionModel(c.multiple),c}return v(n,e),Object.defineProperty(n.prototype,"optionFocusChanges",{get:function(){return o.merge.apply(void 0,this.renderedOptions.map(function(e){return e.onFocus}))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"optionBlurChanges",{get:function(){return o.merge.apply(void 0,this.renderedOptions.map(function(e){return e.onBlur}))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"multiple",{get:function(){return!!this.multipleMode},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"autoSelect",{get:function(){return this._autoSelect},set:function(e){this._autoSelect=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"noUnselectLast",{get:function(){return this._noUnselectLast},set:function(e){this._noUnselectLast=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled},set:function(e){var t=i.coerceBooleanProperty(e);this._disabled!==t&&(this._disabled=t,this.markOptionsForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"tabIndex",{get:function(){return this._tabIndex},set:function(e){this._tabIndex=e,this.userTabIndex=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"showCheckbox",{get:function(){return this.multipleMode===Ie.CHECKBOX},enumerable:!0,configurable:!0}),n.prototype.ngAfterContentInit=function(){var e=this;this.keyManager=new p.FocusKeyManager(this.renderedOptions).withVerticalOrientation(!0).withHorizontalOrientation(null),this.keyManager.change.pipe(m.takeUntil(this.destroy)).subscribe(function(){e.keyManager.activeItem&&(e.emitNavigationEvent(e.keyManager.activeItem),e.autoSelect&&!e.keyManager.activeItem.disabled&&e.updateOptionsFocus())}),this.keyManager.tabOut.pipe(m.takeUntil(this.destroy)).subscribe(function(){return e.allowFocusEscape()}),this.selectionModel.changed.pipe(m.takeUntil(this.destroy)).subscribe(function(){e.onChange(e.getSelectedValues()),e.renderedOptions.notifyOnChanges()}),this.renderedOptions.changes.pipe(m.takeUntil(this.destroy)).subscribe(function(t){e.resetOptions(),e.updateTabIndex(),t.forEach(function(t){t.deselect(),e.getSelectedValues().forEach(function(e){t.value===e&&t.select()})})})},n.prototype.ngOnDestroy=function(){this.destroy.next(),this.destroy.complete()},n.prototype.focus=function(e){0===this.renderedOptions.length||this.isFocusReceivedFromNestedOption(e)||this.keyManager.setFirstItemActive()},n.prototype.blur=function(){!this.hasFocusedOption()&&this.resetFocusedItemOnBlur&&this.keyManager.setActiveItem(-1),this.onTouched(),this.changeDetectorRef.markForCheck()},n.prototype.onKeyDown=function(e){switch(this.keyManager.setFocusOrigin("keyboard"),e.keyCode){case a.DOWN_ARROW:this.keyManager.setNextItemActive();break;case a.UP_ARROW:this.keyManager.setPreviousItemActive();break;case a.LEFT_ARROW:return this.keyManager.activeItem&&this.treeControl.collapse(this.keyManager.activeItem.data),void e.preventDefault();case a.RIGHT_ARROW:return this.keyManager.activeItem&&this.treeControl.expand(this.keyManager.activeItem.data),void e.preventDefault();case a.SPACE:case a.ENTER:this.toggleFocusedOption(),e.preventDefault();break
|
15
|
+
;case a.HOME:this.keyManager.setFirstItemActive(),e.preventDefault();break;case a.END:this.keyManager.setLastItemActive(),e.preventDefault();break;case a.PAGE_UP:this.keyManager.setPreviousPageItemActive(),e.preventDefault();break;case a.PAGE_DOWN:this.keyManager.setNextPageItemActive(),e.preventDefault();break;default:return}this.keyManager.activeItem&&this.setSelectedOptionsByKey(this.keyManager.activeItem,a.hasModifierKey(e,"shiftKey"),a.hasModifierKey(e,"ctrlKey"))},n.prototype.updateScrollSize=function(){this.renderedOptions.first&&this.keyManager.withScrollSize(Math.floor(this.getHeight()/this.renderedOptions.first.getHeight()))},n.prototype.setSelectedOptionsByKey=function(e,t,n){if(t&&this.multiple)this.setSelectedOptions(e);else if(n){if(!this.canDeselectLast(e))return}else this.autoSelect&&(this.selectionModel.clear(),this.selectionModel.toggle(e.data));this.emitChangeEvent(e)},n.prototype.setSelectedOptionsByClick=function(e,t,n){if(t||n||this.keyManager.setActiveItem(e),t&&this.multiple)this.setSelectedOptions(e);else if(n){if(!this.canDeselectLast(e))return;this.selectionModel.toggle(e.data)}else this.autoSelect?(this.selectionModel.clear(),this.selectionModel.toggle(e.data)):this.selectionModel.toggle(e.data);this.emitChangeEvent(e)},n.prototype.setSelectedOptions=function(e){var t,n=this,i=e.selected,o=this.keyManager.previousActiveItemIndex,r=this.keyManager.previousActiveItemIndex=this.keyManager.activeItemIndex;r!==o&&(o>r&&(t=[r,o],o=t[0],r=t[1]),this.renderedOptions.toArray().slice(o,r+1).filter(function(e){return!e.disabled}).forEach(function(e){e===n.keyManager.activeItem&&e.selected&&n.noUnselectLast||e.setSelected(!i)}))},n.prototype.setFocusedOption=function(e){this.keyManager.setActiveItem(e)},n.prototype.toggleFocusedOption=function(){var e=this.keyManager.activeItem;!e||e.selected&&!this.canDeselectLast(e)||(e.toggle(),this.emitChangeEvent(e))},n.prototype.renderNodeChanges=function(t,n,i,o){void 0===n&&(n=this.dataDiffer),void 0===i&&(i=this.nodeOutlet.viewContainer),e.prototype.renderNodeChanges.call(this,t,n,i,o);var r=[],a=[];i._embeddedViews.forEach(function(e){var t=e.def;t.nodes.forEach(function(n){if(t.nodeMatchedQueries===n.matchedQueryIds){var i=e.nodes[n.nodeIndex];r.push(i.instance),a.push(i.instance.changeDetectorRef)}})}),setTimeout(function(){a.forEach(function(e){e.destroyed||e.detectChanges()})}),this.renderedOptions&&(this.renderedOptions.reset(r),this.renderedOptions.notifyOnChanges()),this.updateScrollSize(),this.nodeOutlet.changeDetectorRef.detectChanges()},n.prototype.getHeight=function(){var e=this.elementRef.nativeElement.getClientRects();return e.length?e[0].height:0},n.prototype.getItemHeight=function(){return this.renderedOptions.first?this.renderedOptions.first.getHeight():0},n.prototype.emitNavigationEvent=function(e){this.navigationChange.emit(new Uo(this,e))},n.prototype.emitChangeEvent=function(e){this.selectionChange.emit(new Uo(this,e))},n.prototype.writeValue=function(e){if(this.multiple&&e&&!Array.isArray(e))throw A();this.renderedOptions&&this.setOptionsFromValues(this.multiple?e:[e])},n.prototype.registerOnChange=function(e){this.onChange=e},n.prototype.registerOnTouched=function(e){this.onTouched=e},n.prototype.setDisabledState=function(e){this._disabled=e,this.changeDetectorRef.markForCheck()},n.prototype.setOptionsFromValues=function(e){var t,n=this;this.selectionModel.clear();var i=e.reduce(function(e,t){return n.treeControl.hasValue(t)?e.concat([n.treeControl.hasValue(t)]):e.slice()},[]);(t=this.selectionModel).select.apply(t,i)},n.prototype.getSelectedValues=function(){var e=this;return this.selectionModel.selected.map(function(t){return e.treeControl.getValue(t)})},n.prototype.updateTabIndex=function(){this._tabIndex=0===this.renderedOptions.length?-1:0},n.prototype.allowFocusEscape=function(){var e=this;-1!==this._tabIndex&&(this._tabIndex=-1,setTimeout(function(){e._tabIndex=e.userTabIndex||0,e.changeDetectorRef.markForCheck()}))},n.prototype.resetOptions=function(){this.dropSubscriptions(),this.listenToOptionsFocus()},n.prototype.dropSubscriptions=function(){this.optionFocusSubscription&&(this.optionFocusSubscription.unsubscribe(),this.optionFocusSubscription=null),this.optionBlurSubscription&&(this.optionBlurSubscription.unsubscribe(),this.optionBlurSubscription=null)},n.prototype.listenToOptionsFocus=function(){var e=this;this.optionFocusSubscription=this.optionFocusChanges.subscribe(function(t){var n=e.renderedOptions.toArray().indexOf(t.option);e.renderedOptions.filter(function(e){return e.hasFocus}).forEach(function(e){return e.hasFocus=!1}),e.isValidIndex(n)&&e.keyManager.updateActiveItem(n)}),this.optionBlurSubscription=this.optionBlurChanges.subscribe(function(){return e.blur()})},n.prototype.isValidIndex=function(e){return e>=0&&e<this.renderedOptions.length},n.prototype.hasFocusedOption=function(){return this.renderedOptions.some(function(e){return e.hasFocus})},n.prototype.markOptionsForCheck=function(){this.renderedOptions&&this.renderedOptions.forEach(function(e){return e.markForCheck()})},n.prototype.updateOptionsFocus=function(){this.renderedOptions.filter(function(e){return e.hasFocus}).forEach(function(e){return e.hasFocus=!1})},n.prototype.canDeselectLast=function(e){return!(this.noUnselectLast&&1===this.selectionModel.selected.length&&e.selected)},n.prototype.isFocusReceivedFromNestedOption=function(e){return!(!e||!e.relatedTarget)&&e.relatedTarget.classList.contains("mc-tree-option")},n.decorators=[{type:t.Component,args:[{selector:"mc-tree-selection",exportAs:"mcTreeSelection",template:"<ng-container cdkTreeNodeOutlet></ng-container>",host:{class:"mc-tree-selection","[attr.tabindex]":"tabIndex","(blur)":"blur()","(focus)":"focus($event)","(keydown)":"onKeyDown($event)","(window:resize)":"updateScrollSize()"},styles:[".mc-tree-selection{display:block}.mc-tree-option{display:flex;align-items:center;height:28px;word-wrap:break-word;border:2px solid transparent}.mc-tree-option>.mc-icon{margin-right:4px;cursor:pointer}.mc-tree-option:focus{outline:0}.mc-tree-option:not([disabled]){cursor:pointer}.mc-tree-option .mc-pseudo-checkbox{margin-right:8px}.mc-tree-node-toggle{margin-right:4px}.mc-tree-node-toggle .mc-icon{transform:rotate(-90deg)}.mc-tree-node-toggle.mc-opened .mc-icon{transform:rotate(0)}.mc-tree-node-toggle.mc-disabled{cursor:default}"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[Ko,{provide:zo,useExisting:n},{provide:b.CdkTree,useExisting:n}]}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:t.IterableDiffers},{type:t.ChangeDetectorRef},{type:String,decorators:[{type:t.Attribute,args:["tabindex"]}]},{type:String,decorators:[{type:t.Attribute,args:["multiple"]}]}]},n.propDecorators={nodeOutlet:[{type:t.ViewChild,args:[b.CdkTreeNodeOutlet,{static:!0}]}],renderedOptions:[{type:t.ContentChildren,args:[Ho]}],treeControl:[{type:t.Input}],navigationChange:[{type:t.Output}],selectionChange:[{type:t.Output}],autoSelect:[{type:t.Input}],noUnselectLast:[{type:t.Input}],disabled:[{type:t.Input}],tabIndex:[{type:t.Input}]},n}(b.CdkTree),qo=[Xo,Ho,Lo,No,jo,Bo],$o=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,b.CdkTreeModule,Se],exports:qo,declarations:qo}]}],e}(),Zo=function(){function e(e,t,n,i){this.transformFunction=e,this.getLevel=t,this.isExpandable=n,this.getChildren=i}return e.prototype.flattenNode=function(e,t,n,i){var o=this,r=this.transformFunction(e,t,i);if(n.push(r),this.isExpandable(r)){var a=this.getChildren(e);a&&(Array.isArray(a)?this.flattenChildren(a,t,n,r):a.pipe(m.take(1)).subscribe(function(e){o.flattenChildren(e,t,n,r)}))}return n},e.prototype.flattenChildren=function(e,t,n,i){var o=this;e.forEach(function(e){o.flattenNode(e,t+1,n,i)})},e.prototype.flattenNodes=function(e){var t=this,n=[];return e.forEach(function(e){return t.flattenNode(e,0,n,null)}),n},e.prototype.expandFlattenedNodes=function(e,t){var n=this,i=[],o=[];return o[0]=!0,e.forEach(function(e){for(var r=!0,a=0;a<=n.getLevel(e);a++)r=r&&o[a];r&&i.push(e),n.isExpandable(e)&&(o[n.getLevel(e)+1]=t.isExpanded(e))}),i},e}(),Qo={Expansion:"expansion",Filter:"filter"},Jo=function(e){function t(t,n,i){void 0===i&&(i=[]);var r=e.call(this)||this;return r.treeControl=t,r.treeFlattener=n,r.flattenedData=new o.BehaviorSubject([]),r.expandedData=new o.BehaviorSubject([]),r.filteredData=new o.BehaviorSubject([]),r._data=new o.BehaviorSubject(i),r}return v(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this._data.value},set:function(e){this._data.next(e),this.flattenedData.next(this.treeFlattener.flattenNodes(this.data)),this.treeControl.dataNodes=this.flattenedData.value},enumerable:!0,configurable:!0}),t.prototype.connect=function(e){var t=this;return o.merge(e.viewChange,this.treeControl.expansionModel.changed.pipe(m.map(function(e){return{type:Qo.Expansion,value:e}})),this.treeControl.filterValue.pipe(m.map(function(e){return{type:Qo.Filter,value:e}})),this.flattenedData).pipe(m.map(function(e){return e.type===Qo.Filter&&e.value&&e.value.length>0?t.filterHandler():t.expansionHandler()}))},t.prototype.filterHandler=function(){return this.filteredData.next(this.treeControl.filterModel.selected),this.filteredData.value},t.prototype.expansionHandler=function(){var e=this.treeFlattener.expandFlattenedNodes(this.flattenedData.value,this.treeControl);return this.expandedData.next(e),this.expandedData.value},t.prototype.disconnect=function(){},t}(g.DataSource),er=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._data=new o.BehaviorSubject([]),t}return v(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this._data.value},set:function(e){this._data.next(e)},enumerable:!0,configurable:!0}),t.prototype.connect=function(e){var t=this;return o.merge.apply(void 0,[e.viewChange,this._data]).pipe(m.map(function(){return t.data}))},t.prototype.disconnect=function(){},t}(g.DataSource),tr=function(){function e(e){this.template=e}return e.decorators=[{type:t.Directive,args:[{selector:"[mcTabContent]"}]}],e.ctorParameters=function(){return[{type:t.TemplateRef}]},e}(),nr=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return v(n,e),n.decorators=[{type:t.Directive,args:[{selector:"[mc-tab-label], [mcTabLabel]"}]}],n}(d.CdkPortal);nr.ctorParameters=function(){return d.CdkPortal.ctorParameters};var ir,or=function(){function e(){}return e}(),rr=w(or),ar=function(e){function n(t){var n=e.call(this)||this;return n.viewContainerRef=t,n.textLabel="",n.stateChanges=new o.Subject,n.position=null,n.origin=null,n.isActive=!1,n.contentPortal=null,n}return v(n,e),Object.defineProperty(n.prototype,"content",{get:function(){return this.contentPortal},enumerable:!0,configurable:!0}),n.prototype.ngOnChanges=function(e){(e.hasOwnProperty("textLabel")||e.hasOwnProperty("disabled"))&&this.stateChanges.next()},n.prototype.ngOnDestroy=function(){this.stateChanges.complete()},n.prototype.ngOnInit=function(){this.contentPortal=new d.TemplatePortal(this.explicitContent||this.implicitContent,this.viewContainerRef)},n.decorators=[{type:t.Component,args:[{selector:"mc-tab",template:"<ng-template><ng-content></ng-content></ng-template>",inputs:["disabled"],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,exportAs:"mcTab"}]}],n.ctorParameters=function(){return[{type:t.ViewContainerRef}]},n.propDecorators={templateLabel:[{type:t.ContentChild,args:[nr,{static:!1}]}],explicitContent:[{type:t.ContentChild,args:[tr,{read:t.TemplateRef,static:!0}]}],implicitContent:[{type:t.ViewChild,args:[t.TemplateRef,{static:!0}]}],textLabel:[{type:t.Input,args:["label"]}],tabId:[{type:t.Input,args:["tabId"]}],ariaLabel:[{type:t.Input,args:["aria-label"]}],ariaLabelledby:[{type:t.Input,args:["aria-labelledby"]}]},n}(rr),sr={translateTab:s.trigger("translateTab",[s.state("center, void, left-origin-center, right-origin-center",s.style({transform:"none"})),s.state("left",s.style({transform:"translate3d(-100%, 0, 0)",minHeight:"1px"})),s.state("right",s.style({transform:"translate3d(100%, 0, 0)",minHeight:"1px"})),s.transition("* => left, * => right, left => center, right => center",s.animate("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")),s.transition("void => left-origin-center",[s.style({transform:"translate3d(-100%, 0, 0)"}),s.animate("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")]),s.transition("void => right-origin-center",[s.style({transform:"translate3d(100%, 0, 0)"}),s.animate("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")])])},cr=function(){function e(e,n,i){var r=this;this.elementRef=e,this.dir=n,this.onCentering=new t.EventEmitter,this.beforeCentering=new t.EventEmitter,this.afterLeavingCenter=new t.EventEmitter,this.onCentered=new t.EventEmitter(!0),this.animationDuration="0ms",this.dirChangeSubscription=o.Subscription.EMPTY,this.dir&&i&&(this.dirChangeSubscription=this.dir.change.subscribe(function(e){r.computePositionAnimationState(e),i.markForCheck()}))}return Object.defineProperty(e.prototype,"position",{set:function(e){this.positionIndex=e,this.computePositionAnimationState()},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){"center"===this.bodyPosition&&null!=this.origin&&(this.bodyPosition=this.computePositionFromOrigin())},e.prototype.ngOnDestroy=function(){this.dirChangeSubscription.unsubscribe()},e.prototype.onTranslateTabStarted=function(e){var t=this.isCenterPosition(e.toState);this.beforeCentering.emit(t),t&&this.onCentering.emit(this.elementRef.nativeElement.clientHeight)},e.prototype.onTranslateTabComplete=function(e){this.isCenterPosition(e.toState)&&this.isCenterPosition(this.bodyPosition)&&this.onCentered.emit(),this.isCenterPosition(e.fromState)&&!this.isCenterPosition(this.bodyPosition)&&this.afterLeavingCenter.emit()},e.prototype.getLayoutDirection=function(){return this.dir&&"rtl"===this.dir.value?"rtl":"ltr"},e.prototype.isCenterPosition=function(e){return"center"===e||"left-origin-center"===e||"right-origin-center"===e},e.prototype.computePositionAnimationState=function(e){void 0===e&&(e=this.getLayoutDirection()),this.positionIndex<0?this.bodyPosition="ltr"===e?"left":"right":this.positionIndex>0?this.bodyPosition="ltr"===e?"right":"left":this.bodyPosition="center"},e.prototype.computePositionFromOrigin=function(){var e=this.getLayoutDirection();return"ltr"===e&&this.origin<=0||"rtl"===e&&this.origin>0?"left-origin-center":"right-origin-center"},e.decorators=[{type:t.Component,args:[{selector:"mc-tab-body",template:'<div class="mc-tab-body__content" #content [@translateTab]="{ value: bodyPosition, params: {animationDuration: animationDuration} }" (@translateTab.start)="onTranslateTabStarted($event)" (@translateTab.done)="onTranslateTabComplete($event)"><ng-template mcTabBodyHost></ng-template></div>',styles:[".mc-tab-body__content{height:100%;overflow:auto}.mc-tab-body__content .mc-tab-group_dynamic-height{overflow:hidden}"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,animations:[sr.translateTab],host:{class:"mc-tab-body"}}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:n.Directionality,decorators:[{type:t.Optional}]},{type:t.ChangeDetectorRef}]},e.propDecorators={position:[{type:t.Input}],onCentering:[{type:t.Output}],beforeCentering:[{type:t.Output}],afterLeavingCenter:[{type:t.Output}],onCentered:[{type:t.Output}],portalHost:[{type:t.ViewChild,args:[d.CdkPortalOutlet,{static:!1}]}],content:[{type:t.Input,args:["content"]}],origin:[{type:t.Input}],animationDuration:[{type:t.Input}]},e}(),lr=function(e){function n(t,n,i){var r=e.call(this,t,n)||this;return r.host=i,r.centeringSub=o.Subscription.EMPTY,r.leavingSub=o.Subscription.EMPTY,r}return v(n,e),n.prototype.ngOnInit=function(){var t=this;e.prototype.ngOnInit.call(this),this.centeringSub=this.host.beforeCentering.pipe(m.startWith(this.host.isCenterPosition(this.host.bodyPosition))).subscribe(function(e){e&&!t.hasAttached()&&t.attach(t.host.content)}),this.leavingSub=this.host.afterLeavingCenter.subscribe(function(){t.detach()})},n.prototype.ngOnDestroy=function(){e.prototype.ngOnDestroy.call(this),this.centeringSub.unsubscribe(),this.leavingSub.unsubscribe()},n.decorators=[{type:t.Directive,args:[{selector:"[mcTabBodyHost]"}]}],n.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:t.ViewContainerRef},{type:cr,decorators:[{type:t.Inject,args:[t.forwardRef(function(){return cr})]}]}]},n}(d.CdkPortalOutlet),pr=function(){function e(){}return e}(),dr=w(pr),ur=function(e){function n(t){var n=e.call(this)||this;return n.elementRef=t,n}return v(n,e),n.prototype.focus=function(){this.elementRef.nativeElement.focus()},n.prototype.getOffsetLeft=function(){return this.elementRef.nativeElement.offsetLeft},n.prototype.getOffsetWidth=function(){return this.elementRef.nativeElement.offsetWidth},n.decorators=[{type:t.Directive,args:[{selector:"[mcTabLabelWrapper]",inputs:["disabled"],host:{"[class.mc-disabled]":"disabled","[attr.aria-disabled]":"!!disabled"}}]}],n.ctorParameters=function(){return[{type:t.ElementRef}]},n}(dr),hr=function(){function e(){}return e}(),mr=function(e){function r(n,i,r,a,s){var c=e.call(this)||this;return c.elementRef=n,c.changeDetectorRef=i,c.viewportRuler=r,c.dir=a,c.ngZone=s,c.showPaginationControls=!1,c.disableScrollAfter=!0,c.disableScrollBefore=!0,c.selectFocusedIndex=new t.EventEmitter,c.indexFocused=new t.EventEmitter,c._scrollDistance=0,c.selectedIndexChanged=!1,c.destroyed=new o.Subject,c._selectedIndex=0,c}return v(r,e),Object.defineProperty(r.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(e){var t=i.coerceNumberProperty(e);this.selectedIndexChanged=this._selectedIndex!==t,this._selectedIndex=t,this.keyManager&&this.keyManager.updateActiveItem(t)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"focusIndex",{get:function(){return this.keyManager?this.keyManager.activeItemIndex:0},set:function(e){this.isValidIndex(e)&&this.focusIndex!==e&&this.keyManager&&this.keyManager.setActiveItem(e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"scrollDistance",{get:function(){return this._scrollDistance},set:function(e){this._scrollDistance=Math.max(0,Math.min(this.getMaxScrollDistance(),e)),this.scrollDistanceChanged=!0,this.checkScrollingControls()},enumerable:!0,configurable:!0}),r.prototype.ngAfterContentChecked=function(){this.tabLabelCount!==this.labelWrappers.length&&(this.updatePagination(),this.tabLabelCount=this.labelWrappers.length,this.changeDetectorRef.markForCheck()),this.selectedIndexChanged&&(this.scrollToLabel(this._selectedIndex),this.checkScrollingControls(),this.selectedIndexChanged=!1,this.changeDetectorRef.markForCheck()),this.scrollDistanceChanged&&(this.updateTabScrollPosition(),this.scrollDistanceChanged=!1,this.changeDetectorRef.markForCheck())},r.prototype.handleKeydown=function(e){switch(e.keyCode){case a.HOME:this.keyManager.setFirstItemActive(),e.preventDefault();break;case a.END:this.keyManager.setLastItemActive(),e.preventDefault();break;case a.ENTER:case a.SPACE:this.selectFocusedIndex.emit(this.focusIndex),e.preventDefault();break;default:this.keyManager.onKeydown(e)}},r.prototype.ngAfterContentInit=function(){var e=this,t=this.dir?this.dir.change:o.of(null),n=this.viewportRuler.change(150),i=function(){e.updatePagination()};this.keyManager=new p.FocusKeyManager(this.labelWrappers).withHorizontalOrientation(this.getLayoutDirection()).withWrap(),this.keyManager.updateActiveItem(0),void 0===typeof requestAnimationFrame?i():requestAnimationFrame(i),o.merge(t,n).pipe(m.takeUntil(this.destroyed)).subscribe(function(){i(),e.keyManager.withHorizontalOrientation(e.getLayoutDirection())}),this.keyManager.change.pipe(m.takeUntil(this.destroyed)).subscribe(function(t){e.indexFocused.emit(t),e.setTabFocus(t)})},r.prototype.ngOnDestroy=function(){this.destroyed.next(),this.destroyed.complete()},r.prototype.onContentChanges=function(){var e=this,t=this.elementRef.nativeElement.textContent;if(t!==this.currentTextContent){this.currentTextContent=t;var n=function(){e.updatePagination(),e.changeDetectorRef.markForCheck()};this.ngZone?this.ngZone.run(n):n()}},r.prototype.updatePagination=function(){this.checkPaginationEnabled(),this.checkScrollingControls(),this.updateTabScrollPosition()},r.prototype.isValidIndex=function(e){if(!this.labelWrappers)return!0;var t=this.labelWrappers?this.labelWrappers.toArray()[e]:null;return!!t&&!t.disabled},r.prototype.setTabFocus=function(e){if(this.showPaginationControls&&this.scrollToLabel(e),this.labelWrappers&&this.labelWrappers.length){this.labelWrappers.toArray()[e].focus();var t=this.tabListContainer.nativeElement,n=this.getLayoutDirection();t.scrollLeft="ltr"===n?0:t.scrollWidth-t.offsetWidth}},r.prototype.getLayoutDirection=function(){return this.dir&&"rtl"===this.dir.value?"rtl":"ltr"},r.prototype.updateTabScrollPosition=function(){var e=this.scrollDistance,t="ltr"===this.getLayoutDirection()?-e:e;this.tabList.nativeElement.style.transform="translateX("+Math.round(t)+"px)",this.tabList.nativeElement.scrollLeft=0},r.prototype.scrollHeader=function(e){var t=this.tabListContainer.nativeElement.offsetWidth;this.scrollDistance+=("before"===e?-1:1)*t/3},r.prototype.scrollToLabel=function(e){var t=this.labelWrappers?this.labelWrappers.toArray()[e]:null;if(t){var n,i,o=this.tabListContainer.nativeElement.offsetWidth;"ltr"===this.getLayoutDirection()?(n=t.getOffsetLeft(),i=n+t.getOffsetWidth()):(i=this.tabList.nativeElement.offsetWidth-t.getOffsetLeft(),n=i-t.getOffsetWidth());var r=this.scrollDistance,a=this.scrollDistance+o;n<r?this.scrollDistance-=r-n+60:i>a&&(this.scrollDistance+=i-a+60)}},r.prototype.checkPaginationEnabled=function(){var e=this.tabList.nativeElement.scrollWidth>this.elementRef.nativeElement.offsetWidth;e||(this.scrollDistance=0),e!==this.showPaginationControls&&this.changeDetectorRef.markForCheck(),this.showPaginationControls=e},r.prototype.checkScrollingControls=function(){this.disableScrollBefore=0===this.scrollDistance,this.disableScrollAfter=this.scrollDistance===this.getMaxScrollDistance(),this.changeDetectorRef.markForCheck()},r.prototype.getMaxScrollDistance=function(){return this.tabList.nativeElement.scrollWidth-this.tabListContainer.nativeElement.offsetWidth||0},r.decorators=[{type:t.Component,args:[{selector:"mc-tab-header",template:'<div class="mc-tab-header__pagination mc-tab-header__pagination_before mc-elevation-z4" aria-hidden="true" [class.mc-tab-header_disabled]="disableScrollBefore" (click)="scrollHeader(\'before\')"><div class="mc-tab-header__pagination-chevron"></div></div><div class="mc-tab-header__content" #tabListContainer (keydown)="handleKeydown($event)"><div class="mc-tab-list" #tabList role="tablist" (cdkObserveContent)="onContentChanges()"><div class="mc-tab-list__content"><ng-content></ng-content></div></div></div><div class="mc-tab-header__pagination mc-tab-header__pagination_after mc-elevation-z4" aria-hidden="true" [class.mc-tab-header_disabled]="disableScrollAfter" (click)="scrollHeader(\'after\')"><div class="mc-tab-header__pagination-chevron"></div></div>',styles:['.mc-tab-header{display:flex}.mc-tab-header__pagination{position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2}.mc-tab-header__pagination .mc-tab-header__pagination-controls_enabled{display:flex}.mc-tab-header__pagination-chevron{border-style:solid;border-width:2px 2px 0 0;content:"";height:8px;width:8px}.mc-tab-header__pagination_after,.mc-tab-header_rtl .mc-tab-header__pagination_before{padding-right:4px}.mc-tab-header__pagination_after .mc-tab-header__pagination-chevron,.mc-tab-header_rtl .mc-tab-header__pagination_before .mc-tab-header__pagination-chevron{transform:rotate(45deg)}.mc-tab-header__pagination_before,.mc-tab-header_rtl .mc-tab-header__pagination_after{padding-left:4px}.mc-tab-header__pagination_before .mc-tab-header__pagination-chevron,.mc-tab-header_rtl .mc-tab-header__pagination_after .mc-tab-header__pagination-chevron{transform:rotate(-135deg)}.mc-tab-header_disabled{box-shadow:none;cursor:default}.mc-tab-header__content{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mc-tab-list{flex-grow:1;position:relative;transition:transform .5s cubic-bezier(.35,0,.25,1)}.mc-tab-list__content{display:flex}.mc-tab-group_align-labels-center .mc-tab-list__content{justify-content:center}.mc-tab-group_align-labels-end .mc-tab-list__content{justify-content:flex-end}.mc-tab-group_stretch-labels .mc-tab-label,.mc-tab-group_stretch-labels .mc-tab-light-label{flex-basis:0;flex-grow:1}'],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,host:{class:"mc-tab-header","[class.mc-tab-header__pagination-controls_enabled]":"showPaginationControls","[class.mc-tab-header_rtl]":"getLayoutDirection() == 'rtl'"}}]}],r.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:u.ViewportRuler},{type:n.Directionality,decorators:[{type:t.Optional}]},{type:t.NgZone}]},r.propDecorators={selectedIndex:[{type:t.Input}],labelWrappers:[{type:t.ContentChildren,args:[ur]}],tabListContainer:[{type:t.ViewChild,args:["tabListContainer",{static:!0}]}],tabList:[{type:t.ViewChild,args:["tabList",{static:!0}]}],selectFocusedIndex:[{type:t.Output}],indexFocused:[{type:t.Output}]},r}(hr),gr=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-tab-group[mc-light-tabs], [mc-tab-nav-bar][mc-light-tabs]",host:{class:"mc-tab-group_light"}}]}],e}(),fr=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-tab-group[mc-align-tabs-center], [mc-tab-nav-bar][mc-align-tabs-center]",host:{class:"mc-tab-group_align-labels-center"}}]}],e}(),yr=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-tab-group[mc-align-tabs-end], [mc-tab-nav-bar][mc-align-tabs-end]",host:{class:"mc-tab-group_align-labels-end"}}]}],e}(),br=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-tab-group[mc-stretch-tabs], [mc-tab-nav-bar][mc-stretch-tabs]",host:{class:"mc-tab-group_stretch-labels"}}]}],e}(),vr=0,Cr=function(){function e(){}return e}(),_r=new t.InjectionToken("MC_TABS_CONFIG"),xr=function(){function e(e){this._elementRef=e}return e}(),wr=O(w(xr)),Or=function(e){function n(n,r,a,s){var c=e.call(this,n)||this;return c.changeDetectorRef=r,c.headerPosition="above",c.selectedIndexChange=new t.EventEmitter,c.focusChange=new t.EventEmitter,c.animationDone=new t.EventEmitter,c.selectedTabChange=new t.EventEmitter(!0),c.indexToSelect=0,c.tabBodyWrapperHeight=0,c.tabsSubscription=o.Subscription.EMPTY,c.tabLabelSubscription=o.Subscription.EMPTY,c._dynamicHeight=!1,c._selectedIndex=null,c.lightTab=i.coerceBooleanProperty(a),c.groupId=vr++,c.animationDuration=s&&s.animationDuration?s.animationDuration:"0ms",c}return v(n,e),Object.defineProperty(n.prototype,"dynamicHeight",{get:function(){return this._dynamicHeight},set:function(e){this._dynamicHeight=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(e){this.indexToSelect=i.coerceNumberProperty(e,null)},enumerable:!0,configurable:!0}),n.prototype.ngAfterContentChecked=function(){var e=this,t=this.indexToSelect=this.clampTabIndex(this.indexToSelect);if(this._selectedIndex!==t){var n=null==this._selectedIndex;n||this.selectedTabChange.emit(this.createChangeEvent(t)),Promise.resolve().then(function(){e.tabs.forEach(function(e,n){return e.isActive=n===t}),n||e.selectedIndexChange.emit(t)})}this.tabs.forEach(function(n,i){n.position=i-t,null==e._selectedIndex||0!==n.position||n.origin||(n.origin=t-e._selectedIndex)}),this._selectedIndex!==t&&(this._selectedIndex=t,this.changeDetectorRef.markForCheck())},n.prototype.ngAfterContentInit=function(){var e=this;this.subscribeToTabLabels(),this.tabsSubscription=this.tabs.changes.subscribe(function(){if(e.clampTabIndex(e.indexToSelect)===e._selectedIndex)for(var t=e.tabs.toArray(),n=0;n<t.length;n++)if(t[n].isActive){e.indexToSelect=e._selectedIndex=n;break}e.subscribeToTabLabels(),e.changeDetectorRef.markForCheck()})},n.prototype.ngOnDestroy=function(){this.tabsSubscription.unsubscribe(),this.tabLabelSubscription.unsubscribe()},n.prototype.focusChanged=function(e){this.focusChange.emit(this.createChangeEvent(e))},n.prototype.getTabLabelId=function(e){return"mc-tab-label-"+this.groupId+"-"+e},n.prototype.getTabContentId=function(e){return"mc-tab-content-"+this.groupId+"-"+e},n.prototype.setTabBodyWrapperHeight=function(e){if(this._dynamicHeight&&this.tabBodyWrapperHeight){var t=this.tabBodyWrapper.nativeElement;t.style.height=this.tabBodyWrapperHeight+"px",this.tabBodyWrapper.nativeElement.offsetHeight&&(t.style.height=e+"px")}},n.prototype.removeTabBodyWrapperHeight=function(){this.tabBodyWrapperHeight=this.tabBodyWrapper.nativeElement.clientHeight,this.tabBodyWrapper.nativeElement.style.height="",this.animationDone.emit()},n.prototype.handleClick=function(e,t,n){e.disabled||(this.selectedIndex=t.focusIndex=n)},n.prototype.getTabIndex=function(e,t){return e.disabled?null:this.selectedIndex===t?0:-1},n.prototype.createChangeEvent=function(e){var t=new Cr;return t.index=e,this.tabs&&this.tabs.length&&(t.tab=this.tabs.toArray()[e]),t},n.prototype.subscribeToTabLabels=function(){var e=this;this.tabLabelSubscription&&this.tabLabelSubscription.unsubscribe(),this.tabLabelSubscription=o.merge.apply(void 0,this.tabs.map(function(e){return e.stateChanges})).subscribe(function(){return e.changeDetectorRef.markForCheck()})},n.prototype.clampTabIndex=function(e){return Math.min(this.tabs.length-1,Math.max(e||0,0))},n.decorators=[{type:t.Component,args:[{selector:"mc-tab-group",exportAs:"mcTabGroup",template:'<mc-tab-header #tabHeader [selectedIndex]="selectedIndex" (indexFocused)="focusChanged($event)" (selectFocusedIndex)="selectedIndex = $event"><div role="tab" mcTabLabelWrapper cdkMonitorElementFocus [class.mc-tab-label]="!lightTab" [class.mc-tab-light-label]="lightTab" *ngFor="let tab of tabs; let i = index" [id]="getTabLabelId(i)" [attr.tabIndex]="getTabIndex(tab, i)" [attr.aria-posinset]="i + 1" [attr.aria-setsize]="tabs.length" [attr.aria-controls]="getTabContentId(i)" [attr.aria-selected]="selectedIndex == i" [attr.aria-label]="tab.ariaLabel || null" [attr.aria-labelledby]="(!tab.ariaLabel && tab.ariaLabelledby) ? tab.ariaLabelledby : null" [class.mc-active]="selectedIndex == i" [disabled]="tab.disabled" (click)="handleClick(tab, tabHeader, i)"><div class="mc-tab-label__content"><ng-template [ngIf]="tab.templateLabel"><ng-template [cdkPortalOutlet]="tab.templateLabel"></ng-template></ng-template><ng-template [ngIf]="!tab.templateLabel">{{tab.textLabel}}</ng-template></div><div class="mc-tab-overlay"></div></div></mc-tab-header><div class="mc-tab-body__wrapper" #tabBodyWrapper><mc-tab-body role="tabpanel" *ngFor="let tab of tabs; let i = index" [id]="getTabContentId(i)" [attr.aria-labelledby]="getTabLabelId(i)" [class.mc-tab-body__active]="selectedIndex == i" [content]="tab.content" [position]="tab.position" [origin]="tab.origin" [animationDuration]="animationDuration" (onCentered)="removeTabBodyWrapperHeight()" (onCentering)="setTabBodyWrapperHeight($event)"></mc-tab-body></div>',
|
16
16
|
styles:['.mc-tab-label.cdk-keyboard-focused:after,.mc-tab-light-label.cdk-keyboard-focused:after,.mc-tab-light-label.mc-active:before,.mc-tab-light-label:hover:before{display:block;position:absolute;content:""}.mc-tab-light-label.mc-active:before,.mc-tab-light-label:hover:before{bottom:-1px;left:0;height:4px;right:0}.mc-tab-group{display:flex;flex-direction:column;box-sizing:border-box;text-align:center;white-space:nowrap}.mc-tab-group.mc-tab-group_inverted-header{flex-direction:column-reverse}.mc-tab-label{position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;height:40px;text-align:center;white-space:nowrap;cursor:pointer;padding-right:16px;padding-left:16px;outline:0;border-bottom-width:1px;border-bottom-style:solid;border-top-width:1px;border-top-style:solid;border-top-left-radius:3px;border-top-right-radius:3px}.mc-tab-label.cdk-keyboard-focused{z-index:1}.mc-tab-label.cdk-keyboard-focused:after{top:-2px;right:-1px;bottom:-1px;left:-1px;border-width:2px;border-style:solid;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom:none}.mc-tab-label.mc-disabled{pointer-events:none}.mc-tab-label .mc-tab-overlay{position:absolute;top:-1px;left:0;right:0;bottom:0;pointer-events:none}.mc-tab-label.mc-active{padding-right:15px;padding-left:15px;border-width:1px;border-style:solid}.mc-tab-label.mc-active.cdk-keyboard-focused:after{z-index:1;right:-2px;left:-2px}.mc-tab-label .mc-tab-overlay{border-top-width:1px;border-top-style:solid;border-top-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px}.mc-tab-light-label{position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;height:40px;text-align:center;white-space:nowrap;cursor:pointer;padding-right:16px;padding-left:16px;outline:0;border-bottom-width:1px;border-bottom-style:solid}.mc-tab-light-label.cdk-keyboard-focused{z-index:1}.mc-tab-light-label.cdk-keyboard-focused:after{top:-2px;right:-1px;bottom:-1px;left:-1px;border-width:2px;border-style:solid;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom:none}.mc-tab-light-label.mc-disabled{pointer-events:none}.mc-tab-light-label .mc-tab-overlay{position:absolute;top:-1px;left:0;right:0;bottom:0;pointer-events:none}.mc-tab-light-label.cdk-keyboard-focused+:hover:before{left:1px}.mc-tab-light-label.cdk-keyboard-focused:after{top:-1px}.mc-tab-light-label .mc-tab-overlay{position:absolute;top:0}.mc-tab-header__content{padding:1px 1px 0 1px}.mc-tab-body__wrapper{display:flex;overflow:hidden;position:relative}.mc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;flex-basis:100%}.mc-tab-body.mc-tab-body__active{overflow-x:hidden;overflow-y:auto;position:relative;z-index:1;flex-grow:1}.mc-tab-group.mc-tab-group_dynamic-height .mc-tab-body.mc-tab-body__active{overflow-y:hidden}'],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,inputs:["color"],host:{class:"mc-tab-group","[class.mc-tab-group_dynamic-height]":"dynamicHeight","[class.mc-tab-group_inverted-header]":'headerPosition === "below"'}}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:String,decorators:[{type:t.Attribute,args:["mc-light-tabs"]}]},{type:void 0,decorators:[{type:t.Inject,args:[_r]},{type:t.Optional}]}]},n.propDecorators={dynamicHeight:[{type:t.Input}],selectedIndex:[{type:t.Input}],tabs:[{type:t.ContentChildren,args:[ar]}],tabBodyWrapper:[{type:t.ViewChild,args:["tabBodyWrapper",{static:!1}]}],tabHeader:[{type:t.ViewChild,args:["tabHeader",{static:!1}]}],headerPosition:[{type:t.Input}],animationDuration:[{type:t.Input}],selectedIndexChange:[{type:t.Output}],focusChange:[{type:t.Output}],animationDone:[{type:t.Output}],selectedTabChange:[{type:t.Output}]},n}(wr),kr=function(){function e(e){this._elementRef=e}return e}(),Ir=O(kr),Sr=function(e){function n(t){return e.call(this,t)||this}return v(n,e),n.decorators=[{type:t.Component,args:[{selector:"[mc-tab-nav-bar]",exportAs:"mcTabNavBar, mcTabNav",inputs:["color"],template:'<div class="mc-tab-links"><ng-content></ng-content></div>',styles:['.mc-tab-nav-bar.mc-tab-group_light .mc-tab-link.cdk-keyboard-focused:after,.mc-tab-nav-bar.mc-tab-group_light .mc-tab-link.mc-active:before,.mc-tab-nav-bar.mc-tab-group_light .mc-tab-link:hover:before,.mc-tab-nav-bar:not(.mc-tab-group_light) .mc-tab-link.cdk-keyboard-focused:after{display:block;position:absolute;content:""}.mc-tab-nav-bar.mc-tab-group_light .mc-tab-link.mc-active:before,.mc-tab-nav-bar.mc-tab-group_light .mc-tab-link:hover:before{bottom:-1px;left:0;height:4px;right:0}.mc-tab-link{vertical-align:top;text-decoration:none;-webkit-tap-highlight-color:transparent}.mc-tab-group_stretch-labels .mc-tab-link{flex-basis:0;flex-grow:1}.mc-tab-link.mc-disabled{pointer-events:none}.mc-tab-nav-bar{display:flex}.mc-tab-nav-bar:not(.mc-tab-group_light) .mc-tab-link{position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;height:40px;text-align:center;white-space:nowrap;cursor:pointer;padding-right:16px;padding-left:16px;outline:0;border-bottom-width:1px;border-bottom-style:solid;border-top-width:1px;border-top-style:solid;border-top-left-radius:3px;border-top-right-radius:3px}.mc-tab-nav-bar:not(.mc-tab-group_light) .mc-tab-link.cdk-keyboard-focused{z-index:1}.mc-tab-nav-bar:not(.mc-tab-group_light) .mc-tab-link.cdk-keyboard-focused:after{top:-2px;right:-1px;bottom:-1px;left:-1px;border-width:2px;border-style:solid;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom:none}.mc-tab-nav-bar:not(.mc-tab-group_light) .mc-tab-link.mc-disabled{pointer-events:none}.mc-tab-nav-bar:not(.mc-tab-group_light) .mc-tab-link .mc-tab-overlay{position:absolute;top:-1px;left:0;right:0;bottom:0;pointer-events:none}.mc-tab-nav-bar:not(.mc-tab-group_light) .mc-tab-link.mc-active{padding-right:15px;padding-left:15px;border-width:1px;border-style:solid}.mc-tab-nav-bar:not(.mc-tab-group_light) .mc-tab-link.mc-active.cdk-keyboard-focused:after{z-index:1;right:-2px;left:-2px}.mc-tab-nav-bar:not(.mc-tab-group_light) .mc-tab-link .mc-tab-overlay{border-top-width:1px;border-top-style:solid;border-top-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px}.mc-tab-nav-bar.mc-tab-group_light .mc-tab-link{position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;height:40px;text-align:center;white-space:nowrap;cursor:pointer;padding-right:16px;padding-left:16px;outline:0;border-bottom-width:1px;border-bottom-style:solid}.mc-tab-nav-bar.mc-tab-group_light .mc-tab-link.cdk-keyboard-focused{z-index:1}.mc-tab-nav-bar.mc-tab-group_light .mc-tab-link.cdk-keyboard-focused:after{top:-2px;right:-1px;bottom:-1px;left:-1px;border-width:2px;border-style:solid;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom:none}.mc-tab-nav-bar.mc-tab-group_light .mc-tab-link.mc-disabled{pointer-events:none}.mc-tab-nav-bar.mc-tab-group_light .mc-tab-link .mc-tab-overlay{position:absolute;top:-1px;left:0;right:0;bottom:0;pointer-events:none}.mc-tab-nav-bar.mc-tab-group_light .mc-tab-link.cdk-keyboard-focused+:hover:before{left:1px}.mc-tab-nav-bar.mc-tab-group_light .mc-tab-link.cdk-keyboard-focused:after{top:-1px}.mc-tab-nav-bar.mc-tab-group_light .mc-tab-link .mc-tab-overlay{position:absolute;top:0}.mc-tab-links{display:flex;position:relative;padding:1px 1px 0 1px;flex-grow:1}.mc-tab-links .mc-tab-group_align-labels-center{justify-content:center}.mc-tab-links .mc-tab-group_align-labels-end{justify-content:flex-end}'],host:{class:"mc-tab-nav-bar"},encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],n.ctorParameters=function(){return[{type:t.ElementRef}]},n}(Ir),Dr=function(){function e(){}return e}(),Er=k(w(Dr)),Pr=function(e){function n(t,n,i){var o=e.call(this)||this;return o.elementRef=t,o.focusMonitor=i,o.isActive=!1,o.tabIndex=parseInt(n)||0,o.focusMonitor.monitor(o.elementRef.nativeElement),o}return v(n,e),Object.defineProperty(n.prototype,"active",{get:function(){return this.isActive},set:function(e){e!==this.isActive&&(this.isActive=e)},enumerable:!0,configurable:!0}),n.prototype.ngOnDestroy=function(){this.focusMonitor.stopMonitoring(this.elementRef.nativeElement)},n.decorators=[{type:t.Directive,args:[{selector:"[mc-tab-link], [mcTabLink]",exportAs:"mcTabLink",inputs:["disabled","tabIndex"],host:{class:"mc-tab-link","[attr.aria-current]":"active","[attr.aria-disabled]":"disabled.toString()","[attr.tabIndex]":"tabIndex","[class.mc-disabled]":"disabled","[class.mc-active]":"active"}}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:String,decorators:[{type:t.Attribute,args:["tabindex"]}]},{type:p.FocusMonitor}]},n.propDecorators={active:[{type:t.Input}]},n}(Er),Mr=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,be,d.PortalModule,p.A11yModule],exports:[be,Or,nr,ar,Sr,Pr,tr,gr,fr,yr,br],declarations:[Or,nr,ar,ur,Sr,Pr,cr,lr,mr,tr,gr,fr,yr,br]}]}],e}(),Tr=new t.InjectionToken("mc-tags-default-options"),Ar=function(){function e(e,t,n){void 0===n&&(n=!1),this.source=e,this.selected=t,this.isUserInput=n}return e}(),Rr=["mc-basic-tag"],Vr=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-tag-avatar, [mcTagAvatar]",host:{class:"mc-tag-avatar"}}]}],e}(),Fr=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-tag-trailing-icon, [mcTagTrailingIcon]",host:{class:"mc-tag-trailing-icon"}}]}],e}(),Lr=function(){function e(e){this._elementRef=e}return e}(),Nr=O(w(Lr)),jr=function(e){function n(n,i,r){var a=e.call(this,n)||this;return a.elementRef=n,a.changeDetectorRef=i,a._ngZone=r,a.onFocus=new o.Subject,a.onBlur=new o.Subject,a.hasFocus=!1,a.tagListSelectable=!0,a.selectionChange=new t.EventEmitter,a.destroyed=new t.EventEmitter,a.removed=new t.EventEmitter,a._selected=!1,a._selectable=!0,a._removable=!0,a._disabled=!1,a.addHostClassName(),a.nativeElement=n.nativeElement,a}return v(n,e),Object.defineProperty(n.prototype,"selected",{get:function(){return this._selected},set:function(e){var t=i.coerceBooleanProperty(e);t!==this._selected&&(this._selected=t,this.dispatchSelectionChange())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return void 0!==this._value?this._value:this.elementRef.nativeElement.textContent},set:function(e){this._value=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selectable",{get:function(){return this._selectable&&this.tagListSelectable},set:function(e){this._selectable=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"removable",{get:function(){return this._removable},set:function(e){this._removable=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"tabindex",{get:function(){return this.selectable?this.disabled?null:-1:null},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled},set:function(e){e!==this.disabled&&(this._disabled=e)},enumerable:!0,configurable:!0}),n.prototype.ngAfterContentInit=function(){this.addClassModificatorForIcons()},n.prototype.addClassModificatorForIcons=function(){var e=this.contentChildren.map(function(e){return e._elementRef.nativeElement});if(1===e.length){var t=e[0];t.previousElementSibling||t.nextElementSibling||(t.nextSibling&&(t.classList.add("mc-icon_left"),this.nativeElement.classList.add("mc-left-icon")),t.previousSibling&&(t.classList.add("mc-icon_right"),this.nativeElement.classList.add("mc-right-icon")))}else if(e.length>1){var n=e[0],i=e[1];n.classList.add("mc-icon_left"),i.classList.add("mc-icon_right")}},n.prototype.addHostClassName=function(){for(var e=0,t=Rr;e<t.length;e++){var n=t[e];if(this.elementRef.nativeElement.hasAttribute(n)||this.elementRef.nativeElement.tagName.toLowerCase()===n)return void this.elementRef.nativeElement.classList.add(n)}this.elementRef.nativeElement.classList.add("mc-standard-tag")},n.prototype.ngOnDestroy=function(){this.destroyed.emit({tag:this})},n.prototype.select=function(){this._selected||(this._selected=!0,this.dispatchSelectionChange())},n.prototype.deselect=function(){this._selected&&(this._selected=!1,this.dispatchSelectionChange())},n.prototype.selectViaInteraction=function(){this._selected||(this._selected=!0,this.dispatchSelectionChange(!0))},n.prototype.toggleSelected=function(e){return void 0===e&&(e=!1),this._selected=!this.selected,this.dispatchSelectionChange(e),this.selected},n.prototype.focus=function(){var e=this;this.selectable&&(this.hasFocus||(this.elementRef.nativeElement.focus(),this.onFocus.next({tag:this}),Promise.resolve().then(function(){e.hasFocus=!0,e.changeDetectorRef.markForCheck()})))},n.prototype.remove=function(){this.removable&&this.removed.emit({tag:this})},n.prototype.handleClick=function(e){this.disabled?e.preventDefault():e.stopPropagation()},n.prototype.handleKeydown=function(e){if(!this.disabled)switch(e.keyCode){case a.DELETE:case a.BACKSPACE:this.remove(),e.preventDefault();break;case a.SPACE:this.selectable&&this.toggleSelected(!0),e.preventDefault()}},n.prototype.blur=function(){var e=this;this._ngZone.onStable.asObservable().pipe(m.take(1)).subscribe(function(){e._ngZone.run(function(){e.hasFocus=!1,e.onBlur.next({tag:e})})})},n.prototype.dispatchSelectionChange=function(e){void 0===e&&(e=!1),this.selectionChange.emit({source:this,isUserInput:e,selected:this._selected})},n.decorators=[{type:t.Component,args:[{selector:"mc-tag, [mc-tag], mc-basic-tag, [mc-basic-tag]",exportAs:"mcTag",template:'<div class="mc-tag__wrapper"><span class="mc-tag__text"><ng-content></ng-content></span><ng-content select="[mc-icon]"></ng-content><div class="mc-tag-overlay"></div></div>',styles:[".mc-tag{position:relative;display:inline-block;overflow:hidden;margin:2px;height:24px;border-width:1px;border-style:solid;border-radius:4px;cursor:default;outline:0;box-sizing:border-box}.mc-tag.mc-left-icon{padding-left:3px}.mc-tag.mc-right-icon{padding-right:3px}.mc-tag__wrapper{display:flex;align-items:center;height:100%;flex:1 1 100%}.mc-tag__wrapper .mc-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:24px;height:24px}.mc-tag__wrapper .mc-icon_left{margin-right:3px}.mc-tag__wrapper .mc-icon_right{margin-left:3px}.mc-tag-overlay{position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;pointer-events:none;border-radius:inherit}.mc-tag__text{margin-left:7px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}"],inputs:["color","disabled"],host:{class:"mc-tag","[attr.tabindex]":"tabindex","[attr.disabled]":"disabled || null","[class.mc-selected]":"selected","[class.mc-focused]":"hasFocus","[class.mc-tag-with-avatar]":"avatar","[class.mc-tag-with-trailing-icon]":"trailingIcon || removeIcon","[class.mc-tag-disabled]":"disabled","[class.mc-disabled]":"disabled","(click)":"handleClick($event)","(keydown)":"handleKeydown($event)","(focus)":"focus()","(blur)":"blur()"},changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:t.NgZone}]},n.propDecorators={contentChildren:[{type:t.ContentChildren,args:[xt]}],avatar:[{type:t.ContentChild,args:[Vr,{static:!1}]}],trailingIcon:[{type:t.ContentChild,args:[Fr,{static:!1}]}],removeIcon:[{type:t.ContentChild,args:[t.forwardRef(function(){return Br}),{static:!1}]}],selectionChange:[{type:t.Output}],destroyed:[{type:t.Output}],removed:[{type:t.Output}],selected:[{type:t.Input}],value:[{type:t.Input}],selectable:[{type:t.Input}],removable:[{type:t.Input}]},n}(Nr),Br=function(){function e(e){this.parentTag=e}return e.prototype.focus=function(e){e.stopPropagation()},e.prototype.handleClick=function(e){this.parentTag.removable&&this.parentTag.remove(),e.stopPropagation()},e.decorators=[{type:t.Directive,args:[{selector:"[mcTagRemove]",host:{class:"mc-tag-remove mc-tag-trailing-icon","[attr.tabindex]":"-1","(click)":"handleClick($event)","(focus)":"focus($event)"}}]}],e.ctorParameters=function(){return[{type:jr}]},e}(),zr=function(){function e(e,t,n,i){this.defaultErrorStateMatcher=e,this.parentForm=t,this.parentFormGroup=n,this.ngControl=i}return e}(),Wr=I(zr),Yr=0,Hr=function(){function e(e,t){this.source=e,this.value=t}return e}(),Kr=function(e){function r(n,i,r,a,s,c,l,p,d,u,h){var m=e.call(this,r,l,p,d)||this;return m.elementRef=n,m.changeDetectorRef=i,m.rawValidators=a,m.mcValidation=s,m.dir=c,m.ngModel=u,m.formControlName=h,m.controlType="mc-tag-list",m.valueChange=new t.EventEmitter,m.uid="mc-tag-list-"+Yr++,m.userTabIndex=null,m.tagChanges=new t.EventEmitter,m.orientation="horizontal",m.change=new t.EventEmitter,m._tabIndex=0,m._required=!1,m._disabled=!1,m._selectable=!0,m._multiple=!1,m.lastDestroyedTagIndex=null,m.destroyed=new o.Subject,m.onTouched=function(){},m.onChange=function(){},m._compareWith=function(e,t){return e===t},m.ngControl&&(m.ngControl.valueAccessor=m),m}return v(r,e),Object.defineProperty(r.prototype,"tagSelectionChanges",{get:function(){return o.merge.apply(void 0,this.tags.map(function(e){return e.selectionChange}))},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"tagFocusChanges",{get:function(){return o.merge.apply(void 0,this.tags.map(function(e){return e.onFocus}))},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"tagBlurChanges",{get:function(){return o.merge.apply(void 0,this.tags.map(function(e){return e.onBlur}))},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"tagRemoveChanges",{get:function(){return o.merge.apply(void 0,this.tags.map(function(e){return e.destroyed}))},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"selected",{get:function(){return this.multiple?this.selectionModel.selected:this.selectionModel.selected[0]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"canShowCleaner",{get:function(){return this.cleaner&&this.tags.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"multiple",{get:function(){return this._multiple},set:function(e){this._multiple=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"compareWith",{get:function(){return this._compareWith},set:function(e){this._compareWith=e,this.selectionModel&&this.initializeSelection()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"value",{get:function(){return this._value},set:function(e){this.writeValue(e),this._value=e},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"id",{get:function(){return this.tagInput?this.tagInput.id:this.uid},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"required",{get:function(){return this._required},set:function(e){this._required=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"placeholder",{get:function(){return this.tagInput?this.tagInput.placeholder:this._placeholder},set:function(e){this._placeholder=e,this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"focused",{get:function(){return this.tagInput&&this.tagInput.focused||this.hasFocusedTag()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"empty",{get:function(){return(!this.tagInput||this.tagInput.empty)&&0===this.tags.length},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"shouldLabelFloat",{get:function(){return!this.empty||this.focused},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"disabled",{get:function(){return this.ngControl?!!this.ngControl.disabled:this._disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e),this.syncTagsDisabledState()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"selectable",{get:function(){return this._selectable},set:function(e){var t=this;this._selectable=i.coerceBooleanProperty(e),this.tags&&this.tags.forEach(function(e){return e.tagListSelectable=t._selectable})},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"tabIndex",{set:function(e){this.userTabIndex=e,this._tabIndex=e},enumerable:!0,configurable:!0}),r.prototype.ngAfterContentInit=function(){var e=this;this.mcValidation.useValidation&&B(this),this.keyManager=new p.FocusKeyManager(this.tags).withVerticalOrientation().withHorizontalOrientation(this.dir?this.dir.value:"ltr"),this.dir&&this.dir.change.pipe(m.takeUntil(this.destroyed)).subscribe(function(t){return e.keyManager.withHorizontalOrientation(t)}),this.keyManager.tabOut.pipe(m.takeUntil(this.destroyed)).subscribe(function(){e._tabIndex=-1,setTimeout(function(){e._tabIndex=e.userTabIndex||0,e.changeDetectorRef.markForCheck()})}),this.tags.changes.pipe(m.startWith(null),m.takeUntil(this.destroyed)).subscribe(function(){e.disabled&&Promise.resolve().then(function(){e.syncTagsDisabledState()}),e.resetTags(),e.initializeSelection(),e.updateTabIndex(),e.updateFocusForDestroyedTags(),Promise.resolve().then(function(){e.tagChanges.emit(e.tags.toArray()),e.stateChanges.next(),e.propagateTagsChanges()})})},r.prototype.ngOnInit=function(){this.selectionModel=new g.SelectionModel(this.multiple,void 0,!1),this.stateChanges.next()},r.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState()},r.prototype.ngOnDestroy=function(){this.destroyed.next(),this.destroyed.complete(),this.stateChanges.complete(),this.dropSubscriptions()},r.prototype.registerInput=function(e){var t=this;this.tagInput=e,this.ngControl&&e.ngControl&&e.ngControl.statusChanges.subscribe(function(){return t.ngControl.control.setErrors(e.ngControl.errors)})},r.prototype.writeValue=function(e){this.tags&&this.setSelectionByValue(e,!1)},r.prototype.registerOnChange=function(e){this.onChange=e},r.prototype.registerOnTouched=function(e){this.onTouched=e},r.prototype.setDisabledState=function(e){this.disabled=e,this.stateChanges.next()},r.prototype.onContainerClick=function(e){this.originatesFromTag(e)||this.focus()},r.prototype.focus=function(){this.disabled||this.tagInput&&this.tagInput.focused||(this.tags.length>0?(this.keyManager.setFirstItemActive(),this.stateChanges.next()):(this.focusInput(),this.stateChanges.next()))},r.prototype.focusInput=function(){this.tagInput&&this.tagInput.focus()},r.prototype.keydown=function(e){var t=e.target;e.keyCode===a.BACKSPACE&&this.isInputEmpty(t)?(this.keyManager.setLastItemActive(),e.preventDefault()):t&&t.classList.contains("mc-tag")&&(e.keyCode===a.HOME?(this.keyManager.setFirstItemActive(),e.preventDefault()):e.keyCode===a.END?(this.keyManager.setLastItemActive(),e.preventDefault()):this.keyManager.onKeydown(e),this.stateChanges.next())},r.prototype.setSelectionByValue=function(e,t){var n=this;if(void 0===t&&(t=!0),this.clearSelection(),this.tags.forEach(function(e){return e.deselect()}),Array.isArray(e))e.forEach(function(e){return n.selectValue(e,t)}),this.sortValues();else{var i=this.selectValue(e,t);i&&t&&this.keyManager.setActiveItem(i)}},r.prototype.blur=function(){var e=this;this.hasFocusedTag()||this.keyManager.setActiveItem(-1),this.disabled||(this.tagInput?setTimeout(function(){e.focused||e.markAsTouched()}):this.markAsTouched())},r.prototype.markAsTouched=function(){this.onTouched(),this.changeDetectorRef.markForCheck(),this.stateChanges.next()},r.prototype.updateTabIndex=function(){this._tabIndex=this.userTabIndex||(0===this.tags.length?-1:0)},r.prototype.updateFocusForDestroyedTags=function(){if(null!=this.lastDestroyedTagIndex)if(this.tags.length){var e=Math.min(this.lastDestroyedTagIndex,this.tags.length-1);this.keyManager.setActiveItem(e)}else this.focusInput();this.lastDestroyedTagIndex=null},r.prototype.isValidIndex=function(e){return e>=0&&e<this.tags.length},r.prototype.isInputEmpty=function(e){if(e&&"input"===e.nodeName.toLowerCase()){return!e.value}return!1},r.prototype.selectValue=function(e,t){var n=this;void 0===t&&(t=!0);var i=this.tags.find(function(t){return null!=t.value&&n._compareWith(t.value,e)});return i&&(t?i.selectViaInteraction():i.select(),this.selectionModel.select(i)),i},r.prototype.initializeSelection=function(){var e=this;Promise.resolve().then(function(){(e.ngControl||e._value)&&(e.setSelectionByValue(e.ngControl?e.ngControl.value:e._value,!1),e.stateChanges.next())})},r.prototype.clearSelection=function(e){this.selectionModel.clear(),this.tags.forEach(function(t){t!==e&&t.deselect()}),this.stateChanges.next()},r.prototype.sortValues=function(){var e=this;this._multiple&&(this.selectionModel.clear(),this.tags.forEach(function(t){t.selected&&e.selectionModel.select(t)}),this.stateChanges.next())},r.prototype.propagateChanges=function(e){var t=null;t=Array.isArray(this.selected)?this.selected.map(function(e){return e.value}):this.selected?this.selected.value:e,this._value=t,this.change.emit(new Hr(this,t)),this.valueChange.emit(t),this.onChange(t),this.changeDetectorRef.markForCheck()},r.prototype.propagateTagsChanges=function(){var e=this.tags.map(function(e){return e.value});this._value=e,this.change.emit(new Hr(this,e)),this.valueChange.emit(e),this.onChange(e),this.changeDetectorRef.markForCheck()},r.prototype.resetTags=function(){this.dropSubscriptions(),this.listenToTagsFocus(),this.listenToTagsSelection(),this.listenToTagsRemoved()},r.prototype.dropSubscriptions=function(){this.tagFocusSubscription&&(this.tagFocusSubscription.unsubscribe(),this.tagFocusSubscription=null),this.tagBlurSubscription&&(this.tagBlurSubscription.unsubscribe(),this.tagBlurSubscription=null),this.tagSelectionSubscription&&(this.tagSelectionSubscription.unsubscribe(),this.tagSelectionSubscription=null),this.tagRemoveSubscription&&(this.tagRemoveSubscription.unsubscribe(),this.tagRemoveSubscription=null)},r.prototype.listenToTagsSelection=function(){var e=this;this.tagSelectionSubscription=this.tagSelectionChanges.subscribe(function(t){t.source.selected?e.selectionModel.select(t.source):e.selectionModel.deselect(t.source),e.multiple||e.tags.forEach(function(t){!e.selectionModel.isSelected(t)&&t.selected&&t.deselect()}),t.isUserInput&&e.propagateChanges()})},r.prototype.listenToTagsFocus=function(){var e=this;this.tagFocusSubscription=this.tagFocusChanges.subscribe(function(t){var n=e.tags.toArray().indexOf(t.tag);e.isValidIndex(n)&&e.keyManager.updateActiveItem(n),e.stateChanges.next()}),this.tagBlurSubscription=this.tagBlurChanges.subscribe(function(){e.blur(),e.stateChanges.next()})},r.prototype.listenToTagsRemoved=function(){var e=this;this.tagRemoveSubscription=this.tagRemoveChanges.subscribe(function(t){var n=t.tag,i=e.tags.toArray().indexOf(t.tag);e.isValidIndex(i)&&n.hasFocus?e.lastDestroyedTagIndex=i:e.isValidIndex(i)&&!n.hasFocus&&e.focusInput()})},r.prototype.originatesFromTag=function(e){for(var t=e.target;t&&t!==this.elementRef.nativeElement;){if(t.classList.contains("mc-tag"))return!0;t=t.parentElement}return!1},r.prototype.hasFocusedTag=function(){return this.tags.some(function(e){return e.hasFocus})},r.prototype.syncTagsDisabledState=function(){var e=this;this.tags&&this.tags.forEach(function(t){t.disabled=e._disabled})},r.decorators=[{type:t.Component,args:[{selector:"mc-tag-list",exportAs:"mcTagList",template:'<div class="mc-tags-list__list-container"><ng-content></ng-content></div><div class="mc-tags-list__cleaner" *ngIf="canShowCleaner"><ng-content select="mc-cleaner"></ng-content></div>',host:{class:"mc-tag-list","[attr.tabindex]":"disabled ? null : _tabIndex","[class.mc-disabled]":"disabled","[class.mc-invalid]":"errorState","[class.mc-required]":"required","(focus)":"focus()","(blur)":"blur()","(keydown)":"keydown($event)","[id]":"uid"},providers:[{provide:kt,useExisting:r}],styles:[".mc-tag-list{display:flex;flex-direction:row}.mc-tags-list__list-container{display:flex;flex-wrap:wrap;flex:1 1 100%;min-width:0;min-height:28px;padding:2px 6px}.mc-tags-list__list-container .mc-tag-input{max-width:100%;flex:1 1 auto;height:22px;margin:2px 4px}.mc-tags-list__cleaner .mc-cleaner{height:32px}.mc-tag-input{border:none;outline:0;background:0 0}"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],r.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:Oe},{type:Array,decorators:[{type:t.Optional},{type:t.Inject,args:[l.NG_VALIDATORS]}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[bt]}]},{type:n.Directionality,decorators:[{type:t.Optional}]},{type:l.NgForm,decorators:[{type:t.Optional}]},{type:l.FormGroupDirective,decorators:[{type:t.Optional}]},{type:l.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.NgModel,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.FormControlName,decorators:[{type:t.Optional},{type:t.Self}]}]},r.propDecorators={multiple:[{type:t.Input}],compareWith:[{type:t.Input}],value:[{type:t.Input}],required:[{type:t.Input}],placeholder:[{type:t.Input}],disabled:[{type:t.Input}],selectable:[{type:t.Input}],tabIndex:[{type:t.Input}],valueChange:[{type:t.Output}],errorStateMatcher:[{type:t.Input}],orientation:[{type:t.Input,args:["orientation"]}],change:[{type:t.Output}],cleaner:[{type:t.ContentChild,args:["mcTagListCleaner",{static:!0}]}],tags:[{type:t.ContentChildren,args:[jr,{descendants:!0}]}]},r}(Wr),Ur=0,Gr=function(){function e(e,n,i,o){this.elementRef=e,this.renderer=n,this.defaultOptions=i,this.ngControl=o,this.focused=!1,this.separatorKeyCodes=this.defaultOptions.separatorKeyCodes,this.tagEnd=new t.EventEmitter,this.placeholder="",this.id="mc-tag-list-input-"+Ur++,this._addOnBlur=!0,this._disabled=!1,this.countOfSymbolsForUpdateWidth=3,this.inputElement=this.elementRef.nativeElement,this.setDefaultInputWidth()}return Object.defineProperty(e.prototype,"tagList",{set:function(e){e&&(this._tagList=e,this._tagList.registerInput(this))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"addOnBlur",{get:function(){return this._addOnBlur},set:function(e){this._addOnBlur=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled||this._tagList&&this._tagList.disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return!this.inputElement.value},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(){this._tagList.stateChanges.next()},e.prototype.onKeydown=function(e){this.inputElement.value||this._tagList.keydown(e),this.isSeparatorKey(e)&&(this.emitTagEnd(),e.preventDefault())},e.prototype.blur=function(){this.focused=!1,this._tagList.focused||(this.triggerValidation(),this._tagList.blur()),this.addOnBlur&&this.emitTagEnd(),this._tagList.stateChanges.next()},e.prototype.triggerValidation=function(){this.hasControl()&&this.ngControl.statusChanges.emit(this.ngControl.status)},e.prototype.emitTagEnd=function(){(!this.hasControl()||this.hasControl()&&!this.ngControl.invalid)&&(this.tagEnd.emit({input:this.inputElement,value:this.inputElement.value}),this.updateInputWidth())},e.prototype.onInput=function(){this.updateInputWidth(),this._tagList.stateChanges.next()},e.prototype.onPaste=function(e){var t=this;if(e.clipboardData){var n=e.clipboardData.getData("text");if(!n||0!==n.length){for(var i=[],o=0,r=this.separatorKeyCodes;o<r.length;o++){var a=r[o],s=this.separatorKeyToSymbol(a);if(n.search(s)>-1){i.push.apply(i,n.split(s));break}}0===i.length&&i.push(n),i.forEach(function(e){return t.tagEnd.emit({input:t.inputElement,value:e})}),this.updateInputWidth(),e.preventDefault(),e.stopPropagation()}}},e.prototype.updateInputWidth=function(){var e=this.inputElement.value.length;this.renderer.setStyle(this.inputElement,"max-width",0),this.oneSymbolWidth=this.inputElement.scrollWidth/e,
|
17
|
-
this.renderer.setStyle(this.inputElement,"max-width",""),e>this.countOfSymbolsForUpdateWidth?this.renderer.setStyle(this.inputElement,"width",e*this.oneSymbolWidth+"px"):this.setDefaultInputWidth()},e.prototype.onFocus=function(){this.focused=!0,this._tagList.stateChanges.next()},e.prototype.focus=function(){this.inputElement.focus()},e.prototype.separatorKeyToSymbol=function(e){var t,n=(t={},t[a.ENTER]=/\r?\n/,t[a.TAB]=/\t/,t[a.SPACE]=/ /,t[a.COMMA]=/,/,t)[e];return n||e},e.prototype.hasControl=function(){return!!this.ngControl},e.prototype.setDefaultInputWidth=function(){this.renderer.setStyle(this.inputElement,"width","30px")},e.prototype.isSeparatorKey=function(e){return!a.hasModifierKey(e)&&this.separatorKeyCodes.indexOf(e.keyCode)>-1},e.decorators=[{type:t.Directive,args:[{selector:"input[mcTagInputFor]",exportAs:"mcTagInput, mcTagInputFor",host:{class:"mc-tag-input mc-input-element","[id]":"id","[attr.disabled]":"disabled || null","[attr.placeholder]":"placeholder || null","(keydown)":"onKeydown($event)","(blur)":"blur()","(focus)":"onFocus()","(input)":"onInput()","(paste)":"onPaste($event)"}}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:void 0,decorators:[{type:t.Inject,args:[Tr]}]},{type:l.NgControl,decorators:[{type:t.Optional},{type:t.Self}]}]},e.propDecorators={separatorKeyCodes:[{type:t.Input,args:["mcTagInputSeparatorKeyCodes"]}],tagEnd:[{type:t.Output,args:["mcTagInputTokenEnd"]}],placeholder:[{type:t.Input}],id:[{type:t.Input}],tagList:[{type:t.Input,args:["mcTagInputFor"]}],addOnBlur:[{type:t.Input,args:["mcTagInputAddOnBlur"]}],disabled:[{type:t.Input}]},e}(),Xr={separatorKeyCodes:[a.ENTER]},qr=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,h.PlatformModule],exports:[Kr,jr,Gr,Fr,Vr,Br],declarations:[Kr,jr,Gr,Fr,Vr,Br],providers:[{provide:Tr,useValue:Xr}]}]}],e}(),$r=0,Zr=function(){function e(e,t){this.source=e,this.value=t}return e}(),Qr=function(){function e(e,t,n,i,o){this.elementRef=e,this.defaultErrorStateMatcher=t,this.parentForm=n,this.parentFormGroup=i,this.ngControl=o}return e}(),Jr=k(w(I(Qr))),ea=function(){function e(e){this.searchChangesSubscription=new o.Subscription,this.isSearchChanged=!1,e.canCleanerClearByEsc=!1}return e.prototype.focus=function(){this.input.focus()},e.prototype.reset=function(){this.input.ngControl.reset()},e.prototype.ngAfterContentInit=function(){var e=this;if(!this.input)throw Error("McSelectSearch does not work without mcInput");if(!this.input.ngControl)throw Error("McSelectSearch does not work without ngControl");this.searchChangesSubscription=this.input.ngControl.valueChanges.subscribe(function(){e.isSearchChanged=!0})},e.prototype.ngOnDestroy=function(){this.searchChangesSubscription.unsubscribe()},e.prototype.handleKeydown=function(e){e.keyCode===a.ESCAPE&&this.input.value&&(this.reset(),e.stopPropagation())},e.decorators=[{type:t.Directive,args:[{selector:"[mcSelectSearch]",exportAs:"mcSelectSearch",host:{"(keydown)":"handleKeydown($event)"}}]}],e.ctorParameters=function(){return[{type:Rt}]},e.propDecorators={input:[{type:t.ContentChild,args:[In,{static:!1}]}]},e}(),ta=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"[mc-select-search-empty-result]",exportAs:"mcSelectSearchEmptyResult"}]}],e}(),na=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-select-trigger"}]}],e}(),ia=function(e){function r(n,i,r,a,s,c,l,p,d,u,h,g,f,y,b,v,C){var _=e.call(this,c,s,d,u,g)||this;return _._viewportRuler=n,_._changeDetectorRef=i,_._ngZone=r,_._renderer=a,_.rawValidators=l,_._dir=p,_._parentFormField=h,_.ngModel=f,_.formControlName=y,_._scrollStrategyFactory=v,_.mcValidation=C,_.controlType="mc-select",_.hiddenItems=0,_.triggerFontSize=0,_.previousSelectionModelSelected=[],_.transformOrigin="top",_.panelDoneAnimating=!1,_.panelDoneAnimatingStream=new o.Subject,_.scrollStrategy=_._scrollStrategyFactory(),_.offsetY=0,_.positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"}],_.hiddenItemsText="...ещё",_.optionSelectionChanges=o.defer(function(){return _.options?o.merge.apply(void 0,_.options.map(function(e){return e.onSelectionChange}).concat(_.selectionModel.selected.map(function(e){return e.onSelectionChange}))):_._ngZone.onStable.asObservable().pipe(m.take(1),m.switchMap(function(){return _.optionSelectionChanges}))}),_.openedChange=new t.EventEmitter,_.openedStream=_.openedChange.pipe(m.filter(function(e){return e}),m.map(function(){})),_.closedStream=_.openedChange.pipe(m.filter(function(e){return!e}),m.map(function(){})),_.selectionChange=new t.EventEmitter,_.valueChange=new t.EventEmitter,_._required=!1,_._multiple=!1,_._focused=!1,_._panelOpen=!1,_.scrollTop=0,_.uid="mc-select-"+$r++,_.destroy=new o.Subject,_.onChange=function(){},_.onTouched=function(){},_._compareWith=function(e,t){return e===t},_.ngControl&&(_.ngControl.valueAccessor=_),_.tabIndex=parseInt(b)||0,_.id=_.id,_}return v(r,e),Object.defineProperty(r.prototype,"placeholder",{get:function(){return this._placeholder},set:function(e){this._placeholder=e,this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"required",{get:function(){return this._required},set:function(e){this._required=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"multiple",{get:function(){return this._multiple},set:function(e){if(this.selectionModel)throw T();this._multiple=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"compareWith",{get:function(){return this._compareWith},set:function(e){if("function"!=typeof e)throw R();this._compareWith=e,this.selectionModel&&this.initializeSelection()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"value",{get:function(){return this._value},set:function(e){e!==this._value&&(this.writeValue(e),this._value=e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"id",{get:function(){return this._id},set:function(e){this._id=e||this.uid,this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"focused",{get:function(){return this._focused||this._panelOpen},set:function(e){this._focused=e},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"panelOpen",{get:function(){return this._panelOpen},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isEmptySearchResult",{get:function(){return this.search&&0===this.options.length&&!!this.search.input.value},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"canShowCleaner",{get:function(){return this.cleaner&&this.selectionModel.hasValue()},enumerable:!0,configurable:!0}),r.prototype.ngOnInit=function(){var e=this;this.selectionModel=new g.SelectionModel(this.multiple),this.stateChanges.next(),this.panelDoneAnimatingStream.pipe(m.distinctUntilChanged(),m.takeUntil(this.destroy)).subscribe(function(){e.panelOpen?(e.scrollTop=0,e.openedChange.emit(!0)):(e.openedChange.emit(!1),e.panelDoneAnimating=!1,e.overlayDir.offsetX=0,e._changeDetectorRef.markForCheck())})},r.prototype.ngAfterContentInit=function(){var e=this;this.mcValidation.useValidation&&B(this),this.initKeyManager(),this.selectionModel.changed.pipe(m.takeUntil(this.destroy)).subscribe(function(e){e.added.forEach(function(e){return e.select()}),e.removed.forEach(function(e){return e.deselect()})}),this.options.changes.pipe(m.startWith(null),m.takeUntil(this.destroy)).subscribe(function(){e.resetOptions(),e.initializeSelection()})},r.prototype.ngAfterViewInit=function(){var e=this;this.tags.changes.subscribe(function(){setTimeout(function(){return e.calculateHiddenItems()},0)})},r.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState()},r.prototype.ngOnChanges=function(e){e.disabled&&this.stateChanges.next()},r.prototype.ngOnDestroy=function(){this.destroy.next(),this.destroy.complete(),this.stateChanges.complete()},r.prototype.hiddenItemsTextFormatter=function(e,t){return e+" "+t},r.prototype.clearValue=function(e){e.stopPropagation(),this.selectionModel.clear(),this.keyManager.setActiveItem(-1),this.propagateChanges()},r.prototype.resetSearch=function(){this.search&&(this.search.reset(),this.search.isSearchChanged=!1)},r.prototype.toggle=function(){this.panelOpen?this.close():this.open()},r.prototype.open=function(){var e=this;!this.disabled&&this.options&&this.options.length&&!this._panelOpen&&(this.triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this.triggerFontSize=parseInt(getComputedStyle(this.trigger.nativeElement)["font-size"]),this._panelOpen=!0,this.keyManager.withHorizontalOrientation(null),this.highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this._ngZone.onStable.asObservable().pipe(m.take(1)).subscribe(function(){e.triggerFontSize&&e.overlayDir.overlayRef&&e.overlayDir.overlayRef.overlayElement&&(e.overlayDir.overlayRef.overlayElement.style.fontSize=e.triggerFontSize+"px")}))},r.prototype.close=function(){this._panelOpen&&(this.resetSearch(),this._panelOpen=!1,this.keyManager.withHorizontalOrientation(this.isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this.onTouched())},r.prototype.writeValue=function(e){this.options&&this.setSelectionByValue(e)},r.prototype.registerOnChange=function(e){this.onChange=e},r.prototype.registerOnTouched=function(e){this.onTouched=e},r.prototype.setDisabledState=function(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()},Object.defineProperty(r.prototype,"selected",{get:function(){return this.multiple?this.selectionModel.selected:this.selectionModel.selected[0]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"triggerValue",{get:function(){return this.empty?"":this.selectionModel.selected[0].viewValue},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"triggerValues",{get:function(){if(this.empty)return[];var e=this.selectionModel.selected;return this.isRtl()&&e.reverse(),e},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"empty",{get:function(){return!this.selectionModel||this.selectionModel.isEmpty()},enumerable:!0,configurable:!0}),r.prototype.isRtl=function(){return!!this._dir&&"rtl"===this._dir.value},r.prototype.handleKeydown=function(e){this.disabled||(this.panelOpen?this.handleOpenKeydown(e):this.handleClosedKeydown(e))},r.prototype.onFadeInDone=function(){this.panelDoneAnimating=this.panelOpen,this._changeDetectorRef.markForCheck(),this.search&&this._panelOpen&&this.search.focus()},r.prototype.onFocus=function(){this.disabled||(this._focused=!0,this.stateChanges.next())},r.prototype.onBlur=function(){this._focused=!1,this.disabled||this.panelOpen||(this.onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())},r.prototype.onAttached=function(){var e=this;this.overlayDir.positionChange.pipe(m.take(1)).subscribe(function(){e._changeDetectorRef.detectChanges(),e.calculateOverlayOffsetX(),e.optionsContainer.nativeElement.scrollTop=e.scrollTop,e.updateScrollSize()})},r.prototype.getPanelTheme=function(){return this._parentFormField?"mc-"+this._parentFormField.color:""},r.prototype.focus=function(){this.elementRef.nativeElement.focus()},r.prototype.onContainerClick=function(){this.focus(),this.open()},r.prototype.onRemoveMatcherItem=function(e,t){t.stopPropagation(),e.deselect()},r.prototype.calculateHiddenItems=function(){var e=this;if(!this.customTrigger&&!this.empty&&this.multiple){var t=0,n=this.getTotalItemsWidthInMatcher(),i=0;if(this.tags.forEach(function(n){n.nativeElement.offsetTop<n.nativeElement.offsetHeight&&(i+=e.getItemWidth(n.nativeElement),t++)}),this.hiddenItems=this.selected.length-t,this.hiddenItems){var o=this.trigger.nativeElement.querySelector(".mc-select__match-hidden-text"),r=this.trigger.nativeElement.querySelector(".mc-select__match-list"),a=o.offsetTop<o.offsetHeight,s=r.getBoundingClientRect().width,c=s+86;if(a&&n<c&&(this.hiddenItems=0),i===s||i+86<s)return void this._changeDetectorRef.markForCheck();!a&&n+86>c&&this.hiddenItems++}this._changeDetectorRef.markForCheck()}},r.prototype.getItemHeight=function(){return this.options.first?this.options.first.getHeight():0},r.prototype.getHeightOfOptionsContainer=function(){return this.optionsContainer.nativeElement.getClientRects()[0].height},r.prototype.updateScrollSize=function(){this.options.first&&this.keyManager.withScrollSize(Math.floor(this.getHeightOfOptionsContainer()/this.options.first.getHeight()))},r.prototype.getTotalItemsWidthInMatcher=function(){var e=this,t=this.trigger.nativeElement.cloneNode(!0);t.querySelector(".mc-select__match-hidden-text").remove(),this._renderer.setStyle(t,"position","absolute"),this._renderer.setStyle(t,"visibility","hidden"),this._renderer.setStyle(t,"top","-100%"),this._renderer.setStyle(t,"left","0"),this._renderer.appendChild(this.trigger.nativeElement,t);var n=0;return t.querySelectorAll("mc-tag").forEach(function(t){n+=e.getItemWidth(t)}),t.remove(),n},r.prototype.getItemWidth=function(e){var t=window.getComputedStyle(e);return parseInt(t.width)+parseInt(t.marginLeft)+parseInt(t.marginRight)},r.prototype.handleClosedKeydown=function(e){var t=e.keyCode,n=t===a.DOWN_ARROW||t===a.UP_ARROW||t===a.LEFT_ARROW||t===a.RIGHT_ARROW;t===a.ENTER||t===a.SPACE||(this.multiple||e.altKey)&&n?(e.preventDefault(),this.open()):this.multiple||this.keyManager.onKeydown(e)},r.prototype.handleOpenKeydown=function(e){var t=e.keyCode,n=t===a.DOWN_ARROW||t===a.UP_ARROW,i=this.keyManager;if(n&&e.altKey)e.preventDefault(),this.close();else if(t===a.HOME)e.preventDefault(),i.setFirstItemActive();else if(t===a.END)e.preventDefault(),i.setLastItemActive();else if(t===a.PAGE_UP)e.preventDefault(),i.setPreviousPageItemActive();else if(t===a.PAGE_DOWN)e.preventDefault(),i.setNextPageItemActive();else if(t!==a.ENTER&&t!==a.SPACE||!i.activeItem)if(this._multiple&&t===a.A&&e.ctrlKey){e.preventDefault();var o=this.options.some(function(e){return!e.selected});this.options.forEach(function(e){o&&!e.disabled?e.select():e.deselect()})}else{var r=i.activeItemIndex;i.onKeydown(e),this._multiple&&n&&e.shiftKey&&i.activeItem&&i.activeItemIndex!==r&&i.activeItem.selectViaInteraction()}else e.preventDefault(),i.activeItem.selectViaInteraction()},r.prototype.initializeSelection=function(){var e=this;Promise.resolve().then(function(){e.setSelectionByValue(e.ngControl?e.ngControl.value:e._value)})},r.prototype.setSelectionByValue=function(e){var t=this;if(this.previousSelectionModelSelected=this.selectionModel.selected,this.multiple&&e){if(!Array.isArray(e))throw A();this.selectionModel.clear(),e.forEach(function(e){return t.selectValue(e)}),this.sortValues()}else{this.selectionModel.clear();var n=this.selectValue(e);n&&this.keyManager.setActiveItem(n)}this._changeDetectorRef.markForCheck()},r.prototype.getCorrespondOption=function(e){var n=this;return this.options.toArray().concat(this.previousSelectionModelSelected).find(function(i){try{return null!=i.value&&n.compareWith(i.value,e)}catch(e){return t.isDevMode()&&console.warn(e),!1}})},r.prototype.selectValue=function(e){var t=this.getCorrespondOption(e);return t&&this.selectionModel.select(t),t},r.prototype.initKeyManager=function(){var e=this;this.keyManager=new p.ActiveDescendantKeyManager(this.options).withTypeAhead(200,this.search?-1:0).withVerticalOrientation().withHorizontalOrientation(this.isRtl()?"rtl":"ltr"),this.keyManager.tabOut.pipe(m.takeUntil(this.destroy)).subscribe(function(){e.focus(),e.close()}),this.keyManager.change.pipe(m.takeUntil(this.destroy)).subscribe(function(){e._panelOpen&&e.panel?e.scrollActiveOptionIntoView():e._panelOpen||e.multiple||!e.keyManager.activeItem||e.keyManager.activeItem.selectViaInteraction()})},r.prototype.resetOptions=function(){var e=this,t=o.merge(this.options.changes,this.destroy);this.optionSelectionChanges.pipe(m.takeUntil(t)).subscribe(function(t){e.onSelect(t.source,t.isUserInput),e.search&&e.search.isSearchChanged&&(Promise.resolve().then(function(){return e.keyManager.setFirstItemActive()}),e.search.isSearchChanged=!1),t.isUserInput&&!e.multiple&&e._panelOpen&&(e.close(),e.focus())}),o.merge.apply(void 0,this.options.map(function(e){return e.stateChanges})).pipe(m.takeUntil(t)).subscribe(function(){e._changeDetectorRef.markForCheck(),e.stateChanges.next()})},r.prototype.onSelect=function(e,t){var n=this.selectionModel.isSelected(e);null!=e.value||this._multiple?(e.selected?this.selectionModel.select(e):this.selectionModel.deselect(e),t&&this.keyManager.setActiveItem(e),this.multiple&&(this.sortValues(),t&&(this.search?this.search.focus():this.focus()))):(e.deselect(),this.selectionModel.clear(),this.propagateChanges(e.value)),n!==this.selectionModel.isSelected(e)&&this.propagateChanges(),this.stateChanges.next()},r.prototype.sortValues=function(){var e=this;if(this.multiple){var t=this.options.toArray();this.selectionModel.sort(function(n,i){return e.sortComparator?e.sortComparator(n,i,t):t.indexOf(n)-t.indexOf(i)}),this.stateChanges.next()}},r.prototype.propagateChanges=function(e){var t=null;t=this.multiple?this.selected.map(function(e){return e.value}):this.selected?this.selected.value:e,this._value=t,this.valueChange.emit(t),this.onChange(t),this.selectionChange.emit(new Zr(this,t)),this._changeDetectorRef.markForCheck()},r.prototype.highlightCorrectOption=function(){this.keyManager&&(this.empty?this.keyManager.setFirstItemActive():this.keyManager.setActiveItem(this.selectionModel.selected[0]))},r.prototype.scrollActiveOptionIntoView=function(){var e=this.keyManager.activeItemIndex||0,t=S(e,this.options,this.optionGroups);this.optionsContainer.nativeElement.scrollTop=D(e+t,this.getItemHeight(),this.optionsContainer.nativeElement.scrollTop,224)},r.prototype.calculateOverlayOffsetX=function(){var e,t=this.overlayDir.overlayRef.overlayElement.getBoundingClientRect(),n=this._viewportRuler.getViewportSize(),i=this.isRtl(),o=this.selectionModel.selected[0]||this.options.first;e=o&&o.group?2:1,i||(e*=-1);var r=0-(t.left+e-(i?2:0)),a=t.right+e-n.width+(i?0:2);r>0?e+=r+8:a>0&&(e-=a+8),this.overlayDir.offsetX=Math.round(e),this.overlayDir.overlayRef.updatePosition()},r.decorators=[{type:t.Component,args:[{selector:"mc-select",exportAs:"mcSelect",template:'<div cdk-overlay-origin class="mc-select__trigger" (click)="toggle()" [class.mc-select__trigger_multiple]="multiple" #origin="cdkOverlayOrigin" #trigger><div class="mc-select__matcher" [ngSwitch]="empty"><span class="mc-select__placeholder" *ngSwitchCase="true">{{ placeholder || \' \' }}</span> <span *ngSwitchCase="false" [ngSwitch]="!!customTrigger"><div *ngSwitchDefault [ngSwitch]="multiple" class="mc-select__match-container"><span *ngSwitchCase="false" class="mc-select__matcher-text">{{ triggerValue }}</span><div *ngSwitchCase="true" class="mc-select__match-list"><mc-tag *ngFor="let option of triggerValues" [disabled]="disabled" [selectable]="false" [class.mc-error]="errorState">{{ option.viewValue }} <i mc-icon="mc-close-S_16" (click)="onRemoveMatcherItem(option, $event)"></i></mc-tag></div><div class="mc-select__match-hidden-text" [style.display]="hiddenItems > 0 ? \'block\' : \'none\'">{{ hiddenItemsTextFormatter(hiddenItemsText, hiddenItems) }}</div></div><ng-content select="mc-select-trigger" *ngSwitchCase="true"></ng-content></span></div><div class="mc-select__cleaner" *ngIf="canShowCleaner" (click)="clearValue($event)"><ng-content select="mc-cleaner"></ng-content></div><div class="mc-select__arrow-wrapper"><i class="mc-select__arrow" mc-icon="mc-angle-down-L_16" color="second"></i></div></div><ng-template cdk-connected-overlay cdkConnectedOverlayLockPosition cdkConnectedOverlayHasBackdrop cdkConnectedOverlayBackdropClass="cdk-overlay-transparent-backdrop" [cdkConnectedOverlayScrollStrategy]="scrollStrategy" [cdkConnectedOverlayOrigin]="origin" [cdkConnectedOverlayOpen]="panelOpen" [cdkConnectedOverlayPositions]="positions" [cdkConnectedOverlayMinWidth]="triggerRect?.width" [cdkConnectedOverlayOffsetY]="offsetY" (backdropClick)="close()" (attach)="onAttached()" (detach)="close()"><div #panel class="mc-select__panel {{ getPanelTheme() }}" [ngClass]="panelClass" (@transformPanel.done)="panelDoneAnimatingStream.next($event.toState)" [style.transformOrigin]="transformOrigin" [class.mc-select-panel-done-animcing]="panelDoneAnimating" [style.font-size.px]="triggerFontSize" (keydown)="handleKeydown($event)"><div *ngIf="search" class="mc-select__search-container"><ng-content select="[mcSelectSearch]"></ng-content></div><div #optionsContainer class="mc-select__content" [@fadeInContent]="\'showing\'" (@fadeInContent.done)="onFadeInDone()"><div *ngIf="isEmptySearchResult" class="mc-select__no-options-message"><ng-content select="[mc-select-search-empty-result]"></ng-content></div><ng-content select="mc-option,mc-optgroup"></ng-content></div></div></ng-template>',styles:[".mc-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mc-divider.mc-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mc-divider.mc-divider-inset{margin-left:80px}[dir=rtl] .mc-divider.mc-divider-inset{margin-left:auto;margin-right:80px}.mc-select{box-sizing:border-box;display:inline-block;vertical-align:top;width:100%;outline:0}.mc-select.mc-disabled .mc-select__trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mc-select__no-options-message{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;position:relative;max-width:100%;height:32px;cursor:default;outline:0;padding:0 16px}.mc-select__trigger{display:flex;box-sizing:border-box;position:relative;height:30px;cursor:pointer;padding-right:7px;padding-left:15px}.mc-select__trigger.mc-select__trigger_multiple{padding-left:7px}.mc-select__matcher{display:flex;align-items:center;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mc-select__matcher>span{width:100%}.mc-select__match-list{display:flex;flex-wrap:wrap;overflow:hidden;max-height:28px;margin:0;padding-left:0}.mc-select__match-list .mc-tag{margin-right:4px}.mc-select__match-container{display:flex;flex-direction:row;justify-content:space-between;width:100%}.mc-select__match-container .mc-select__match-hidden-text{flex:0 0 70px;align-self:center;padding:0 8px;text-align:right}.mc-select__match-item{display:flex;border:1px solid transparent;border-radius:3px;padding-left:7px;margin-right:4px;max-width:100%}.mc-select__arrow-wrapper{align-self:center}.mc-form-field-appearance-fill .mc-select__arrow-wrapper,.mc-form-field-appearance-standard .mc-select__arrow-wrapper{transform:translateY(-50%)}.mc-form-field-appearance-outline .mc-select__arrow-wrapper{transform:translateY(-25%)}.mc-select__panel{min-width:100%;overflow:hidden;border-width:1px;border-style:solid;border-bottom-left-radius:3px;border-bottom-right-radius:3px;padding:4px 0}.mc-select__content{max-height:224px;overflow:auto}.mc-select__panel .mc-optgroup-label,.mc-select__panel .mc-option{font-size:inherit;line-height:32px;height:32px}.mc-form-field-type-mc-select:not(.mc-disabled) .mc-form-field-flex{cursor:pointer}.mc-form-field-type-mc-select .mc-form-field-label{width:calc(100% - 18px)}"],inputs:["disabled"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,host:{"[attr.id]":"id","[tabindex]":"tabIndex",class:"mc-select","[class.mc-disabled]":"disabled","[class.mc-select-invalid]":"errorState","(keydown)":"handleKeydown($event)","(focus)":"onFocus()","(blur)":"onBlur()","(window:resize)":"calculateHiddenItems()"},animations:[st.transformPanel,st.fadeInContent],providers:[{provide:kt,useExisting:r},{provide:Ve,useExisting:r}]}]}],r.ctorParameters=function(){return[{type:c.ViewportRuler},{type:t.ChangeDetectorRef},{type:t.NgZone},{type:t.Renderer2},{type:Oe},{type:t.ElementRef},{type:Array,decorators:[{type:t.Optional},{type:t.Inject,args:[l.NG_VALIDATORS]}]},{type:n.Directionality,decorators:[{type:t.Optional}]},{type:l.NgForm,decorators:[{type:t.Optional}]},{type:l.FormGroupDirective,decorators:[{type:t.Optional}]},{type:Rt,decorators:[{type:t.Optional}]},{type:l.NgControl,decorators:[{type:t.Self},{type:t.Optional}]},{type:l.NgModel,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.FormControlName,decorators:[{type:t.Optional},{type:t.Self}]},{type:String,decorators:[{type:t.Attribute,args:["tabindex"]}]},{type:void 0,decorators:[{type:t.Inject,args:[rt]}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[bt]}]}]},r.propDecorators={trigger:[{type:t.ViewChild,args:["trigger",{static:!1}]}],panel:[{type:t.ViewChild,args:["panel",{static:!1}]}],optionsContainer:[{type:t.ViewChild,args:["optionsContainer",{static:!1}]}],overlayDir:[{type:t.ViewChild,args:[c.CdkConnectedOverlay,{static:!1}]}],tags:[{type:t.ViewChildren,args:[jr]}],customTrigger:[{type:t.ContentChild,args:[na,{static:!1}]}],cleaner:[{type:t.ContentChild,args:["mcSelectCleaner",{static:!0}]}],options:[{type:t.ContentChildren,args:[Fe,{descendants:!0}]}],optionGroups:[{type:t.ContentChildren,args:[Te]}],search:[{type:t.ContentChild,args:[ea,{static:!1}]}],hiddenItemsText:[{type:t.Input}],panelClass:[{type:t.Input}],errorStateMatcher:[{type:t.Input}],sortComparator:[{type:t.Input}],openedChange:[{type:t.Output}],openedStream:[{type:t.Output,args:["opened"]}],closedStream:[{type:t.Output,args:["closed"]}],selectionChange:[{type:t.Output}],valueChange:[{type:t.Output}],placeholder:[{type:t.Input}],required:[{type:t.Input}],multiple:[{type:t.Input}],compareWith:[{type:t.Input}],value:[{type:t.Input}],id:[{type:t.Input}],hiddenItemsTextFormatter:[{type:t.Input}]},r}(Jr),oa=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,c.OverlayModule,Le,wt,qr],exports:[Ft,ia,ea,ta,na,Le,r.CommonModule],declarations:[ia,ea,ta,na],providers:[at]}]}],e}(),ra=0,aa=function(){function e(e,t,n){void 0===n&&(n=!1),this.source=e,this.value=t,this.isUserInput=n}return e}(),sa=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-tree-select-trigger"}]}],e}(),ca=function(){function e(e,t,n,i,o){this.elementRef=e,this.defaultErrorStateMatcher=t,this.parentForm=n,this.parentFormGroup=i,this.ngControl=o}return e}(),la=k(w(I(ca))),pa=function(e){function r(n,i,r,a,s,c,l,p,d,u,h,g,f,y,b,v,C){var _=e.call(this,n,c,g,f,b)||this;return _.changeDetectorRef=i,_.viewportRuler=r,_.ngZone=a,_.renderer=s,_.scrollStrategyFactory=p,_.rawValidators=d,_.mcValidation=u,_.dir=h,_.parentFormField=y,_.ngModel=v,_.formControlName=C,_.controlType="mc-select",_.hiddenItems=0,_.triggerFontSize=0,_.transformOrigin="top",_.panelDoneAnimating=!1,_.panelDoneAnimatingStream=new o.Subject,_.scrollStrategy=_.scrollStrategyFactory(),_.offsetY=0,_.positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"}],_.hiddenItemsText="...ещё",_.openedChange=new t.EventEmitter,_.openedStream=_.openedChange.pipe(m.filter(function(e){return e}),m.map(function(){})),_.closedStream=_.openedChange.pipe(m.filter(function(e){return!e}),m.map(function(){})),_.selectionChange=new t.EventEmitter,_.valueChange=new t.EventEmitter,_.optionSelectionChanges=o.defer(function(){return _.options?o.merge.apply(void 0,_.options.map(function(e){return e.onSelectionChange})):_.ngZone.onStable.asObservable().pipe(m.take(1),m.switchMap(function(){return _.optionSelectionChanges}))}),_._required=!1,_._multiple=!1,_._autoSelect=!0,_._value=null,_._focused=!1,_._panelOpen=!1,_.scrollTop=0,_.uid="mc-select-"+ra++,_.destroy=new o.Subject,_.onChange=function(){},_.onTouched=function(){},_._compareWith=function(e,t){return e===t},_.ngControl&&(_.ngControl.valueAccessor=_),_.tabIndex=parseInt(l)||0,_.id=_.id,_}return v(r,e),Object.defineProperty(r.prototype,"placeholder",{get:function(){return this._placeholder},set:function(e){this._placeholder=e,this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"required",{get:function(){return this._required},set:function(e){this._required=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"multiple",{get:function(){return this._multiple},set:function(e){if(this.selectionModel)throw T();this._multiple=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"autoSelect",{get:function(){return!this.multiple&&this._autoSelect},set:function(e){this._autoSelect=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"compareWith",{get:function(){return this._compareWith},set:function(e){if("function"!=typeof e)throw R();this._compareWith=e,this.selectionModel&&this.initializeSelection()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"value",{get:function(){return this.multiple?this.tree.getSelectedValues():this.tree.getSelectedValues()[0]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"id",{get:function(){return this._id},set:function(e){this._id=e||this.uid,this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"focused",{get:function(){return this._focused||this._panelOpen},set:function(e){this._focused=e},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"panelOpen",{get:function(){return this._panelOpen},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"canShowCleaner",{get:function(){return this.cleaner&&this.selectionModel.hasValue()},enumerable:!0,configurable:!0}),r.prototype.ngOnInit=function(){var e=this;this.stateChanges.next(),this.panelDoneAnimatingStream.pipe(m.distinctUntilChanged(),m.takeUntil(this.destroy)).subscribe(function(){e.panelOpen?(e.scrollTop=0,e.openedChange.emit(!0)):(e.openedChange.emit(!1),e.panelDoneAnimating=!1,e.overlayDir.offsetX=0,e.changeDetectorRef.markForCheck())})},r.prototype.ngAfterContentInit=function(){var e=this;this.tree&&(this.mcValidation.useValidation&&B(this),this.tree.resetFocusedItemOnBlur=!1,this.selectionModel=this.tree.selectionModel=new g.SelectionModel(this.multiple),this.tree.ngAfterContentInit(),this.initKeyManager(),this.options=this.tree.renderedOptions,this.tree.autoSelect=this.autoSelect,null===this.tree.multipleMode&&(this.tree.multipleMode=this.multiple?Ie.CHECKBOX:null),this.multiple&&(this.tree.noUnselectLast=!1),this.tempValues&&(this.setSelectionByValue(this.tempValues),this.tempValues=null),this.optionSelectionChanges.pipe(m.takeUntil(this.destroy)).subscribe(function(t){!e.multiple&&e.panelOpen&&t.isUserInput&&e.close()}),this.tree.selectionChange.pipe(m.takeUntil(this.destroy)).subscribe(function(t){e.onChange(e.selectedValues),e.selectionChange.emit(new aa(e,t.option))}),this.selectionModel.changed.pipe(m.takeUntil(this.destroy)).subscribe(function(t){t.added.length&&(e.tree.keyManager.setFocusOrigin("program"),e.tree.keyManager.setActiveItem(e.options.find(function(e){return e.data===t.added[0]})))}))},r.prototype.ngAfterViewInit=function(){var e=this;this.tree&&(this.tags.changes.subscribe(function(){setTimeout(function(){return e.calculateHiddenItems()},0)}),setTimeout(function(){return e.calculateHiddenItems()},0))},r.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState()},r.prototype.ngOnChanges=function(e){e.disabled&&this.stateChanges.next()},r.prototype.ngOnDestroy=function(){this.destroy.next(),this.destroy.complete(),this.stateChanges.complete()},r.prototype.hiddenItemsTextFormatter=function(e,t){return e+" "+t},r.prototype.clearValue=function(e){e.stopPropagation(),this.selectionModel.clear(),this.tree.keyManager.setActiveItem(-1),this.setSelectionByValue([]),this.onChange(this.selectedValues)},r.prototype.toggle=function(){this.panelOpen?this.close():this.open()},
|
18
|
-
r.prototype.open=function(){var e=this;!this.disabled&&this.options&&this.options.length&&!this._panelOpen&&(this.triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this.triggerFontSize=parseInt(getComputedStyle(this.trigger.nativeElement)["font-size"]),this._panelOpen=!0,setTimeout(function(){return e.highlightCorrectOption()}),this.changeDetectorRef.markForCheck(),this.ngZone.onStable.asObservable().pipe(m.take(1)).subscribe(function(){e.triggerFontSize&&e.overlayDir.overlayRef&&e.overlayDir.overlayRef.overlayElement&&(e.overlayDir.overlayRef.overlayElement.style.fontSize=e.triggerFontSize+"px")}))},r.prototype.close=function(){var e=this;this._panelOpen&&(this._panelOpen=!1,this.changeDetectorRef.markForCheck(),this.onTouched(),setTimeout(function(){return e.focus()},0))},r.prototype.writeValue=function(e){this.tree?this.setSelectionByValue(e):this.tempValues=e},r.prototype.registerOnChange=function(e){this.onChange=e},r.prototype.registerOnTouched=function(e){this.onTouched=e},r.prototype.setDisabledState=function(e){this.disabled=e,this.changeDetectorRef.markForCheck(),this.stateChanges.next()},Object.defineProperty(r.prototype,"selected",{get:function(){return this.multiple?this.selectionModel.selected:this.selectionModel.selected[0]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"selectedValues",{get:function(){var e=this,t=this.selectionModel.selected.map(function(t){return e.tree.treeControl.getValue(t)});return this.multiple?t:t[0]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"triggerValue",{get:function(){return this.empty?"":this.tree.treeControl.getViewValue(this.selected)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"triggerValues",{get:function(){return this.empty?[]:this.selected},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"empty",{get:function(){return!this.selectionModel||this.selectionModel.isEmpty()},enumerable:!0,configurable:!0}),r.prototype.isRtl=function(){return!!this.dir&&"rtl"===this.dir.value},r.prototype.handleKeydown=function(e){this.disabled||(this.panelOpen?this.handleOpenKeydown(e):this.handleClosedKeydown(e))},r.prototype.onFadeInDone=function(){this.panelDoneAnimating=this.panelOpen,this.changeDetectorRef.markForCheck()},r.prototype.onFocus=function(){this.disabled||(this._focused=!0,this.stateChanges.next())},r.prototype.onBlur=function(){this._focused=!1,this.disabled||this.panelOpen||(this.onTouched(),this.changeDetectorRef.markForCheck(),this.stateChanges.next())},r.prototype.onAttached=function(){var e=this;this.overlayDir.positionChange.pipe(m.take(1)).subscribe(function(){e.changeDetectorRef.detectChanges(),e.calculateOverlayOffsetX(),e.panel.nativeElement.scrollTop=e.scrollTop,e.tree.updateScrollSize()})},r.prototype.getPanelTheme=function(){return this.parentFormField?"mc-"+this.parentFormField.color:""},r.prototype.focus=function(){this.elementRef.nativeElement.focus()},r.prototype.onContainerClick=function(){this.focus()},r.prototype.onRemoveSelectedOption=function(e,t){t.stopPropagation(),this.disabled||(this.selectionModel.deselect(e),this.onChange(this.selectedValues))},r.prototype.calculateHiddenItems=function(){var e=this;if(!this.customTrigger&&!this.empty&&this.multiple){var t=0,n=this.getTotalItemsWidthInMatcher(),i=0;if(this.tags.forEach(function(n){n.nativeElement.offsetTop<n.nativeElement.offsetHeight&&(i+=e.getItemWidth(n.nativeElement),t++)}),this.hiddenItems=this.selectionModel.selected.length-t,this.hiddenItems){var o=this.trigger.nativeElement.querySelector(".mc-tree-select__match-hidden-text"),r=this.trigger.nativeElement.querySelector(".mc-tree-select__match-list"),a=o.offsetTop<o.offsetHeight,s=r.getBoundingClientRect().width,c=s+86;if(a&&n<c&&(this.hiddenItems=0),i===s||i+86<s)return void this.changeDetectorRef.markForCheck();!a&&n+86>c&&this.hiddenItems++}this.changeDetectorRef.markForCheck()}},r.prototype.getTotalItemsWidthInMatcher=function(){var e=this,t=this.trigger.nativeElement.cloneNode(!0);t.querySelector(".mc-tree-select__match-hidden-text").remove(),this.renderer.setStyle(t,"position","absolute"),this.renderer.setStyle(t,"visibility","hidden"),this.renderer.setStyle(t,"top","-100%"),this.renderer.setStyle(t,"left","0"),this.renderer.appendChild(this.trigger.nativeElement,t);var n=0;return t.querySelectorAll("mc-tag").forEach(function(t){n+=e.getItemWidth(t)}),t.remove(),n},r.prototype.getItemWidth=function(e){var t=window.getComputedStyle(e);return parseInt(t.width)+parseInt(t.marginLeft)+parseInt(t.marginRight)},r.prototype.handleClosedKeydown=function(e){var t=e.keyCode,n=t===a.DOWN_ARROW||t===a.UP_ARROW||t===a.LEFT_ARROW||t===a.RIGHT_ARROW;t===a.ENTER||t===a.SPACE||(this.multiple||e.altKey)&&n?(e.preventDefault(),this.open()):!this.multiple&&this.tree.keyManager&&this.tree.keyManager.onKeydown&&this.tree.keyManager.onKeydown(e)},r.prototype.handleOpenKeydown=function(e){var t=e.keyCode,n=t===a.DOWN_ARROW||t===a.UP_ARROW;if(n&&e.altKey)e.preventDefault(),this.close();else{if(t===a.LEFT_ARROW||t===a.RIGHT_ARROW)return this.originalOnKeyDown.call(this.tree,e);if(t===a.HOME)e.preventDefault(),this.tree.keyManager.setFirstItemActive();else if(t===a.END)e.preventDefault(),this.tree.keyManager.setLastItemActive();else if(t===a.PAGE_UP)e.preventDefault(),this.tree.keyManager.setPreviousPageItemActive();else if(t===a.PAGE_DOWN)e.preventDefault(),this.tree.keyManager.setNextPageItemActive();else if(t!==a.ENTER&&t!==a.SPACE||!this.tree.keyManager.activeItem)if(this.multiple&&t===a.A&&e.ctrlKey){e.preventDefault();var i=this.options.some(function(e){return!e.selected});this.options.forEach(function(e){i&&!e.disabled?e.select():e.deselect()})}else{var o=this.tree.keyManager.activeItemIndex;this.tree.keyManager.setFocusOrigin("keyboard"),this.tree.keyManager.onKeydown(e),this.multiple&&n&&e.shiftKey&&this.tree.keyManager.activeItem&&this.tree.keyManager.activeItemIndex!==o&&this.tree.keyManager.activeItem.selectViaInteraction(e),this.autoSelect&&this.tree.keyManager.activeItem&&this.tree.setSelectedOptionsByKey(this.tree.keyManager.activeItem,a.hasModifierKey(e,"shiftKey"),a.hasModifierKey(e,"ctrlKey"))}else e.preventDefault(),this.autoSelect?this.close():this.selectionModel.toggle(this.tree.keyManager.activeItem.data)}},r.prototype.initializeSelection=function(){var e=this;Promise.resolve().then(function(){e.setSelectionByValue(e.ngControl?e.ngControl.value:e._value)})},r.prototype.setSelectionByValue=function(e){if(this.multiple&&e){if(!Array.isArray(e))throw A();this.tree.setOptionsFromValues(e),this.sortValues()}else this.tree.setOptionsFromValues([e]);this.changeDetectorRef.detectChanges()},r.prototype.initKeyManager=function(){var e=this;this.originalOnKeyDown=this.tree.onKeyDown,this.tree.onKeyDown=function(){},this.tree.keyManager.tabOut.pipe(m.takeUntil(this.destroy)).subscribe(function(){e.focus(),e.close()}),this.tree.keyManager.change.pipe(m.takeUntil(this.destroy)).subscribe(function(){e._panelOpen&&e.panel?e.scrollActiveOptionIntoView():e._panelOpen||e.multiple||!e.tree.keyManager.activeItem||e.tree.keyManager.activeItem.selectViaInteraction()})},r.prototype.sortValues=function(){var e=this;if(this.multiple){var t=this.options.toArray();this.selectionModel.sort(function(n,i){return e.sortComparator?e.sortComparator(n,i,t):t.indexOf(n)-t.indexOf(i)}),this.stateChanges.next()}},r.prototype.highlightCorrectOption=function(){if(!this.empty&&this.tree.keyManager){var e=this.multiple?this.selectedValues[0]:this.selectedValues,t=this.options.find(function(t){return t.value===e});t&&this.tree.keyManager.setActiveItem(t)}},r.prototype.scrollActiveOptionIntoView=function(){var e=this.tree.keyManager.activeItemIndex||0;this.panel.nativeElement.scrollTop=D(e,this.tree.getItemHeight(),this.panel.nativeElement.scrollTop,224)},r.prototype.calculateOverlayOffsetX=function(){var e=this.overlayDir.overlayRef.overlayElement.getBoundingClientRect(),t=this.viewportRuler.getViewportSize(),n=this.isRtl(),i=1;n||(i*=-1);var o=0-(e.left+i-(n?2:0)),r=e.right+i-t.width+(n?0:2);o>0?i+=o+8:r>0&&(i-=r+8),this.overlayDir.offsetX=Math.round(i),this.overlayDir.overlayRef.updatePosition()},r.decorators=[{type:t.Component,args:[{selector:"mc-tree-select",exportAs:"mcTreeSelect",template:'<div cdk-overlay-origin class="mc-tree-select__trigger" [class.mc-tree-select__trigger_multiple]="multiple" #origin="cdkOverlayOrigin" #trigger><div class="mc-tree-select__matcher" [ngSwitch]="empty"><span class="mc-tree-select__placeholder" *ngSwitchCase="true">{{ placeholder || \' \' }}</span> <span *ngSwitchCase="false" [ngSwitch]="!!customTrigger"><div *ngSwitchDefault [ngSwitch]="multiple" class="mc-tree-select__match-container"><span *ngSwitchCase="false" class="mc-tree-select__matcher-text">{{ triggerValue }}</span><div *ngSwitchCase="true" class="mc-tree-select__multiple-matcher"><div class="mc-tree-select__match-list"><mc-tag *ngFor="let option of triggerValues" [selectable]="false" [disabled]="disabled" [class.mc-error]="errorState">{{ tree.treeControl.getViewValue(option) }} <i mc-icon="mc-close-S_16" (click)="onRemoveSelectedOption(option, $event)"></i></mc-tag></div><div class="mc-tree-select__match-hidden-text" [style.display]="hiddenItems > 0 ? \'block\' : \'none\'" #hiddenItemsCounter>{{ hiddenItemsTextFormatter(hiddenItemsText, hiddenItems) }}</div></div></div><ng-content select="mc-tree-select-trigger" *ngSwitchCase="true"></ng-content></span></div><div class="mc-select__cleaner" *ngIf="canShowCleaner" (click)="clearValue($event)"><ng-content select="mc-cleaner"></ng-content></div><div class="mc-tree-select__arrow-wrapper"><i class="mc-tree-select__arrow" mc-icon="mc-angle-down-L_16" color="second"></i></div></div><ng-template cdk-connected-overlay cdkConnectedOverlayLockPosition cdkConnectedOverlayHasBackdrop cdkConnectedOverlayBackdropClass="cdk-overlay-transparent-backdrop" [cdkConnectedOverlayScrollStrategy]="scrollStrategy" [cdkConnectedOverlayOrigin]="origin" [cdkConnectedOverlayOpen]="panelOpen" [cdkConnectedOverlayPositions]="positions" [cdkConnectedOverlayMinWidth]="triggerRect?.width" [cdkConnectedOverlayOffsetY]="offsetY" (backdropClick)="close()" (attach)="onAttached()" (detach)="close()"><div #panel class="mc-tree-select__panel {{ getPanelTheme() }}" [ngClass]="panelClass" (@transformPanel.done)="panelDoneAnimatingStream.next($event.toState)" [style.transformOrigin]="transformOrigin" [class.mc-select-panel-done-animcing]="panelDoneAnimating" [style.font-size.px]="triggerFontSize" (keydown)="handleKeydown($event)"><div #optionsContainer class="mc-tree-select__content" [@fadeInContent]="\'showing\'" (@fadeInContent.done)="onFadeInDone()"><ng-content select="mc-tree-selection"></ng-content></div></div></ng-template>',styles:[".mc-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mc-divider.mc-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mc-divider.mc-divider-inset{margin-left:80px}[dir=rtl] .mc-divider.mc-divider-inset{margin-left:auto;margin-right:80px}.mc-tree-selection{display:block}.mc-tree-option{display:flex;align-items:center;height:28px;word-wrap:break-word;border:2px solid transparent}.mc-tree-option>.mc-icon{margin-right:4px;cursor:pointer}.mc-tree-option:focus{outline:0}.mc-tree-option:not([disabled]){cursor:pointer}.mc-tree-option .mc-pseudo-checkbox{margin-right:8px}.mc-tree-node-toggle{margin-right:4px}.mc-tree-node-toggle .mc-icon{transform:rotate(-90deg)}.mc-tree-node-toggle.mc-opened .mc-icon{transform:rotate(0)}.mc-tree-node-toggle.mc-disabled{cursor:default}.mc-tree-select{box-sizing:border-box;display:inline-block;vertical-align:top;width:100%;outline:0}.mc-tree-select.mc-disabled .mc-tree-select__trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mc-tree-select__trigger{display:flex;box-sizing:border-box;position:relative;height:30px;cursor:pointer;padding-right:7px;padding-left:15px}.mc-tree-select__trigger.mc-tree-select__trigger_multiple{padding-left:7px}.mc-tree-select__trigger.mc-tree-select__trigger_multiple .mc-tree-select__placeholder{margin-left:8px}.mc-tree-select__matcher{display:flex;align-items:center;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mc-tree-select__matcher>span{width:100%}.mc-tree-select__multiple-matcher{display:flex;width:100%}.mc-tree-select__match-list{display:flex;flex-wrap:wrap;overflow:hidden;max-height:28px;margin:0;padding-left:0}.mc-tree-select__match-list .mc-tag{margin-right:4px}.mc-tree-select__match-container{display:flex;flex-direction:row;justify-content:space-between;width:100%}.mc-tree-select__match-container .mc-tree-select__match-hidden-text{flex:0 0 70px;align-self:center;padding:0 8px;text-align:right}.mc-tree-select__match-item{display:flex;border:1px solid transparent;border-radius:3px;padding-left:7px;margin-right:4px;max-width:100%}.mc-tree-select__arrow-wrapper{align-self:center}.mc-form-field-appearance-fill .mc-tree-select__arrow-wrapper,.mc-form-field-appearance-standard .mc-tree-select__arrow-wrapper{transform:translateY(-50%)}.mc-form-field-appearance-outline .mc-tree-select__arrow-wrapper{transform:translateY(-25%)}.mc-tree-select__panel{max-height:224px;min-width:100%;overflow:auto;border-width:1px;border-style:solid;border-bottom-left-radius:3px;border-bottom-right-radius:3px;padding:4px 0}.mc-tree-select__content{height:100%}.mc-tree-select__content .mc-tree-selection{height:100%}.mc-tree-select__panel .mc-optgroup-label,.mc-tree-select__panel .mc-tree-select-option{font-size:inherit;line-height:32px;height:32px}.mc-form-field-type-mc-select:not(.mc-disabled) .mc-form-field-flex{cursor:pointer}.mc-form-field-type-mc-select .mc-form-field-label{width:calc(100% - 18px)}"],inputs:["disabled"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,host:{"[attr.id]":"id","[attr.tabindex]":"tabIndex",class:"mc-tree-select","[class.mc-disabled]":"disabled","[class.mc-select-invalid]":"errorState","(click)":"toggle()","(keydown)":"handleKeydown($event)","(focus)":"onFocus()","(blur)":"onBlur()","(window:resize)":"calculateHiddenItems()"},animations:[st.transformPanel,st.fadeInContent],providers:[{provide:kt,useExisting:r},{provide:b.CdkTree,useExisting:r}]}]}],r.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:c.ViewportRuler},{type:t.NgZone},{type:t.Renderer2},{type:Oe},{type:String,decorators:[{type:t.Attribute,args:["tabindex"]}]},{type:void 0,decorators:[{type:t.Inject,args:[rt]}]},{type:Array,decorators:[{type:t.Optional},{type:t.Inject,args:[l.NG_VALIDATORS]}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[bt]}]},{type:n.Directionality,decorators:[{type:t.Optional}]},{type:l.NgForm,decorators:[{type:t.Optional}]},{type:l.FormGroupDirective,decorators:[{type:t.Optional}]},{type:Rt,decorators:[{type:t.Optional}]},{type:l.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.NgModel,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.FormControlName,decorators:[{type:t.Optional},{type:t.Self}]}]},r.propDecorators={trigger:[{type:t.ViewChild,args:["trigger",{static:!1}]}],panel:[{type:t.ViewChild,args:["panel",{static:!1}]}],overlayDir:[{type:t.ViewChild,args:[c.CdkConnectedOverlay,{static:!1}]}],hiddenItemsCounter:[{type:t.ViewChild,args:["hiddenItemsCounter",{static:!1}]}],tags:[{type:t.ViewChildren,args:[jr]}],cleaner:[{type:t.ContentChild,args:["mcSelectCleaner",{static:!0}]}],customTrigger:[{type:t.ContentChild,args:[sa,{static:!1}]}],tree:[{type:t.ContentChild,args:[Xo,{static:!1}]}],hiddenItemsText:[{type:t.Input}],openedChange:[{type:t.Output}],openedStream:[{type:t.Output,args:["opened"]}],closedStream:[{type:t.Output,args:["closed"]}],selectionChange:[{type:t.Output}],valueChange:[{type:t.Output}],panelClass:[{type:t.Input}],errorStateMatcher:[{type:t.Input}],sortComparator:[{type:t.Input}],placeholder:[{type:t.Input}],required:[{type:t.Input}],multiple:[{type:t.Input}],autoSelect:[{type:t.Input}],compareWith:[{type:t.Input}],id:[{type:t.Input}],hiddenItemsTextFormatter:[{type:t.Input}]},r}(la),da=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,c.OverlayModule,b.CdkTreeModule,$o,wt,qr,Se],exports:[pa,sa,r.CommonModule],declarations:[pa,sa],providers:[at]}]}],e}(),ua=new t.InjectionToken("MC_TEXTAREA_VALUE_ACCESSOR"),ha=0,ma=function(){function e(e,t,n,i){this.defaultErrorStateMatcher=e,this.parentForm=t,this.parentFormGroup=n,this.ngControl=i}return e}(),ga=I(ma),fa=function(e){function n(t,n,i,r,a,s,c){var l=e.call(this,a,i,r,n)||this;l.elementRef=t,l.ngControl=n,l.ngZone=c,l.canGrow=!0,l.focused=!1,l.stateChanges=new o.Subject,l.controlType="mc-textarea",l.uid="mc-textsrea-"+ha++,l._disabled=!1,l._required=!1,l.lineHeight=0,l.freeRowsHeight=0,l.minHeight=0,l.valueAccessor=s||l.elementRef.nativeElement,l.previousNativeValue=l.value,l.id=l.id;var p=o.fromEvent(t.nativeElement,"input");return l.growSubscription=p.subscribe(l.grow.bind(l)),l}return v(n,e),Object.defineProperty(n.prototype,"disabled",{get:function(){return this.ngControl&&null!==this.ngControl.disabled?this.ngControl.disabled:this._disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e),this.focused&&(this.focused=!1,this.stateChanges.next())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"id",{get:function(){return this._id},set:function(e){this._id=e||this.uid},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"required",{get:function(){return this._required},set:function(e){this._required=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this.valueAccessor.value},set:function(e){e!==this.value&&(this.valueAccessor.value=e,this.stateChanges.next())},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){var e=this;setTimeout(function(){return e.grow()},0),this.lineHeight=parseInt(getComputedStyle(this.elementRef.nativeElement).lineHeight,10);var t=parseInt(getComputedStyle(this.elementRef.nativeElement).paddingTop,10),n=parseInt(getComputedStyle(this.elementRef.nativeElement).paddingBottom,10);this.minHeight=2*this.lineHeight+t+n,this.freeRowsHeight=this.lineHeight},n.prototype.ngOnChanges=function(){this.stateChanges.next()},n.prototype.ngOnDestroy=function(){this.stateChanges.complete(),this.growSubscription.unsubscribe()},n.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState(),this.dirtyCheckNativeValue()},n.prototype.grow=function(){var e=this;this.canGrow&&this.ngZone.runOutsideAngular(function(){var t=e.elementRef.nativeElement,n=parseInt(window.getComputedStyle(t).height,10),i=n-t.clientHeight;t.style.minHeight=0;var o=Math.max(e.minHeight,+t.scrollHeight+i+e.freeRowsHeight);t.style.minHeight=o+"px"})},n.prototype.focus=function(){this.elementRef.nativeElement.focus()},n.prototype.focusChanged=function(e){e!==this.focused&&(this.focused=e,this.stateChanges.next())},Object.defineProperty(n.prototype,"empty",{get:function(){return!this.elementRef.nativeElement.value&&!this.isBadInput()},enumerable:!0,configurable:!0}),n.prototype.onContainerClick=function(){this.focus()},n.prototype.dirtyCheckNativeValue=function(){var e=this.value;this.previousNativeValue!==e&&(this.previousNativeValue=e,this.stateChanges.next())},n.prototype.isBadInput=function(){var e=this.elementRef.nativeElement.validity;return e&&e.badInput},n.prototype.getGrowHeight=function(){var e=this.elementRef.nativeElement,t=parseInt(window.getComputedStyle(e).height.toString(),10),n=t-e.clientHeight;return Math.max(this.minHeight,+e.scrollHeight+n)},n.decorators=[{type:t.Directive,args:[{selector:"textarea[mcTextarea]",exportAs:"mcTextarea",host:{class:"mc-textarea","[class.mc-textarea-resizable]":"!canGrow","[attr.id]":"id","[attr.placeholder]":"placeholder","[attr.aria-invalid]":"errorState","[disabled]":"disabled","[required]":"required","(blur)":"focusChanged(false)","(focus)":"focusChanged(true)"},providers:[{provide:kt,useExisting:n}]}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:l.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.NgForm,decorators:[{type:t.Optional}]},{type:l.FormGroupDirective,decorators:[{type:t.Optional}]},{type:Oe},{type:void 0,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[ua]}]},{type:t.NgZone}]},n.propDecorators={canGrow:[{type:t.Input}],errorStateMatcher:[{type:t.Input}],disabled:[{type:t.Input}],id:[{type:t.Input}],placeholder:[{type:t.Input}],required:[{type:t.Input}],value:[{type:t.Input}]},n}(ga),ya=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule,be,l.FormsModule],exports:[fa],declarations:[fa]}]}],e}(),ba={hours:0,minutes:1,seconds:2};ba[ba.hours]="hours",ba[ba.minutes]="minutes",ba[ba.seconds]="seconds";var va={HHmmss:"HH:mm:ss",HHmm:"HH:mm"},Ca=(ir={},ir[va.HHmmss]=" : : ",ir[va.HHmm]=" : ",ir),_a=va.HHmm,xa=new RegExp(/^([0-9]|0[0-9]|1[0-9]|2[0-3]):([0-5][0-9]|[0-9]):([0-5][0-9]|[0-9])?$/),wa=/^([0-9]|0[0-9]|1[0-9]|2[0-3]):([0-5][0-9]|[0-9])?$/,Oa=/^([0-9]|0[0-9]|1[0-9]|2[0-3]):?$/,ka=0,Ia=function(){function e(e,t,n,i){this.defaultErrorStateMatcher=e,this.parentForm=t,this.parentFormGroup=n,this.ngControl=i}return e}(),Sa=I(Ia),Da=function(e){function n(t,n,i,r,a,s,c,l){var p=e.call(this,a,i,r,n)||this;if(p.elementRef=t,p.ngControl=n,p.renderer=c,p.dateAdapter=l,p.stateChanges=new o.Subject,p.focused=!1,p.controlType="mc-timepicker",p._minTime=null,p._maxTime=null,p.uid="mc-timepicker-"+ka++,!p.dateAdapter)throw Error("McTimepicker: No provider found for DateAdapter. You must import one of the existing modules at your application root or provide a custom implementation or use exists ones.");if(p.inputValueAccessor=s||p.elementRef.nativeElement,p.previousNativeValue=p.value,p.onChange=o.noop,p.id=p.id,p.placeholder=Ca[_a],p.ngControl){p.ngControl.valueAccessor=p;var d=p.ngControl.control,u=[function(){return p.minTimeValidator()},function(){return p.maxTimeValidator()}],h=d.validator?[d.validator].concat(u):u;d.setValidators(h),d.updateValueAndValidity()}return p}return v(n,e),Object.defineProperty(n.prototype,"disabled",{get:function(){return this.ngControl&&null!==this.ngControl.disabled?this.ngControl.disabled:this._disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e),this.focused&&(this.focused=!1),this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"id",{get:function(){return this._id},set:function(e){this._id=e||this.uid},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"required",{get:function(){return this._required},set:function(e){this._required=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this.inputValueAccessor.value},set:function(e){e!==this.value&&(this.inputValueAccessor.value=e,this.applyInputChanges())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"timeFormat",{get:function(){return this._timeFormat},set:function(e){var t=this;this._timeFormat=Object.keys(va).map(function(e){return va[e]}).indexOf(e)>-1?e:_a,this.placeholder=Ca[this._timeFormat],setTimeout(function(){return t.applyInputChanges({doTimestringReformat:!0})})},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"minTime",{get:function(){return this._minTime},set:function(e){this._minTime=e,this.ngControl.control.updateValueAndValidity()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxTime",{get:function(){return this._maxTime},set:function(e){this._maxTime=e,this.ngControl.control.updateValueAndValidity()},enumerable:!0,configurable:!0}),n.prototype.ngOnDestroy=function(){this.stateChanges.complete()},n.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState(),this.dirtyCheckNativeValue()},n.prototype.focus=function(){this.elementRef.nativeElement.focus()},n.prototype.focusChanged=function(e){e!==this.focused&&(this.focused=e,this.onTouched(),this.stateChanges.next())},n.prototype.onBlur=function(){this.applyInputChanges(),this.focusChanged(!1)},n.prototype.onPaste=function(e){e.preventDefault();var t=e.clipboardData.getData("text");void 0!==this.getDateFromTimeString(t)&&(this.elementRef.nativeElement.value=t,this.onInput())},n.prototype.onInput=function(){var e=this.elementRef.nativeElement.selectionStart,t=this.elementRef.nativeElement.selectionEnd,n=!1,i=this.getParsedTimeParts(this.elementRef.nativeElement.value),o=i.hoursOnly,r=i.hoursAndMinutes,a=i.hoursAndMinutesAndSeconds;o&&o[1]&&2===o[1].length?n=!0:r&&1===r[1].length&&r[2]&&2===r[2].length?n=!0:a&&2===a[1].length&&2===a[2].length&&a[3]&&2===a[3].length&&(n=!0),this.applyInputChanges({doTimestringReformat:n}),this.elementRef.nativeElement.selectionStart=e,this.elementRef.nativeElement.selectionEnd=t,n&&null===this.ngControl.errors&&this.createSelectionOfTimeComponentInInput(e+1)},Object.defineProperty(n.prototype,"empty",{get:function(){return!this.elementRef.nativeElement.value&&!this.isBadInput()},enumerable:!0,configurable:!0}),n.prototype.onContainerClick=function(){this.focus()},n.prototype.writeValue=function(e){null!==e&&(this.saveOriginalValue(e),this.renderer.setProperty(this.elementRef.nativeElement,"value",this.getTimeStringFromDate(e,this.timeFormat)),this.applyInputChanges())},n.prototype.onKeyDown=function(e){var t=this.getKeyCode(e);"ArrowUp"!==t&&"ArrowDown"!==t||this.upDownTimeByArrowKeys(e),"ArrowLeft"!==t&&"ArrowRight"!==t||this.switchSelectionBetweenTimeparts(e)},n.prototype.registerOnChange=function(e){this.onChange=e},n.prototype.registerOnTouched=function(e){this.onTouched=e},n.prototype.saveOriginalValue=function(e){this.dateAdapter.isValid(e)&&(this.originalValue=e)},n.prototype.dirtyCheckNativeValue=function(){var e=this.value;this.previousNativeValue!==e&&(this.previousNativeValue=e,this.stateChanges.next())},n.prototype.isBadInput=function(){var e=this.elementRef.nativeElement.validity;return e&&e.badInput},n.prototype.applyInputChanges=function(e){void 0===e&&(e={});var t=e.changedTime,n=e.doTimestringReformat,i=void 0===n||n,o=t||this.getDateFromTimeString(this.elementRef.nativeElement.value);if(this.currentDateTimeInput=o,i&&void 0!==o){var r=this.elementRef.nativeElement.selectionStart,a=this.elementRef.nativeElement.selectionEnd;this.renderer.setProperty(this.elementRef.nativeElement,"value",this.getTimeStringFromDate(o,this.timeFormat)),this.elementRef.nativeElement.selectionStart=r,this.elementRef.nativeElement.selectionEnd=a}this.ngControl.control.updateValueAndValidity();var s=null===this.ngControl.errors&&void 0!==o?o:null;this.onChange(s),this.stateChanges.next()},n.prototype.upDownTimeByArrowKeys=function(e){e.preventDefault();var t=this.currentDateTimeInput;if(void 0!==t){var n=this.elementRef.nativeElement.selectionStart,i=this.getTimeEditMetrics(n).modifiedTimePart,o=this.getKeyCode(e);"ArrowUp"===o&&(t=this.incrementTime(t,i)),"ArrowDown"===o&&(t=this.decrementTime(t,i)),this.applyInputChanges({changedTime:t}),this.createSelectionOfTimeComponentInInput(n)}},n.prototype.switchSelectionBetweenTimeparts=function(e){var t=this.currentDateTimeInput,n=this.getKeyCode(e);if(void 0!==t){var i=this.elementRef.nativeElement.selectionStart;"ArrowLeft"===n?i=this.getCursorPositionOfPrevTimePartStart(i,this.elementRef.nativeElement.value):"ArrowRight"===n&&(i=this.getCursorPositionOfNextTimePartStart(i,this.elementRef.nativeElement.value)),this.createSelectionOfTimeComponentInInput(i)}},n.prototype.getKeyCode=function(e){return e.code||e.key},n.prototype.createSelectionOfTimeComponentInInput=function(e){var t=this;setTimeout(function(){var n=t.getTimeEditMetrics(e);t.elementRef.nativeElement.selectionStart=n.cursorStartPosition,t.elementRef.nativeElement.selectionEnd=n.cursorEndPosition})},n.prototype.incrementTime=function(e,t){void 0===t&&(t=ba.seconds);var n=this.getTimeDigitsFromDate(e),i=n.hours,o=n.minutes,r=n.seconds;switch(t){case ba.hours:i++;break;case ba.minutes:o++;break;case ba.seconds:r++}return r>59&&(r=0),o>59&&(o=0),i>23&&(i=0),this.getDateFromTimeDigits(i,o,r)},n.prototype.decrementTime=function(e,t){void 0===t&&(t=ba.seconds);var n=this.getTimeDigitsFromDate(e),i=n.hours,o=n.minutes,r=n.seconds;switch(t){case ba.hours:i--;break;case ba.minutes:o--;break;case ba.seconds:r--}return r<0&&(r=59),o<0&&(o=59),i<0&&(i=23),this.getDateFromTimeDigits(i,o,r)},n.prototype.getCursorPositionOfPrevTimePartStart=function(e,t){return 0===e?t.length:e-1},n.prototype.getCursorPositionOfNextTimePartStart=function(e,t,n){void 0===n&&(n=":");var i=t.indexOf(n,e);return void 0!==i?i+1:0},n.prototype.getTimeEditMetrics=function(e){var t,n,i,o=this.elementRef.nativeElement.value,r=o.indexOf(":",1),a=-1!==r?o.indexOf(":",r+1):-1;return-1!==a&&e>a?(t=ba.seconds,n=a+1,i=o.length):-1!==r&&e>r?(t=ba.minutes,n=r+1,i=a>-1?a:o.length):(t=ba.hours,n=0,i=-1!==r?r:o.length),{modifiedTimePart:t,cursorStartPosition:n,cursorEndPosition:i}},n.prototype.getTimeStringFromDate=function(e,t){return void 0===t&&(t=_a),void 0===e||null===e?"":this.dateAdapter.format(e,t)},n.prototype.getParsedTimeParts=function(e){var t=this.dateAdapter.parse(e,["h:m a","h:m:s a","H:m","H:m:s"]),n=null!==t?t.format("H:m:s"):"",i=n.match(xa),o=n.match(wa);return{hoursOnly:n.match(Oa),hoursAndMinutes:o,hoursAndMinutesAndSeconds:i}},n.prototype.getDateFromTimeDigits=function(e,t,n){return void 0===n&&(n=0),this.getDateFromTimeString(e+":"+t+":"+n)},n.prototype.getDateFromTimeString=function(e){if(void 0!==e){var t=this.getParsedTimeParts(e),n=t.hoursOnly,i=t.hoursAndMinutes,o=t.hoursAndMinutesAndSeconds;if(0!==e.trim().length&&(null!==n||null!==i||null!==o)){var r=0,a=0,s=0;n?r=Number(n[1]):i?(r=Number(i[1]),a=Number(i[2])):o&&(r=Number(o[1]),a=Number(o[2]),s=Number(o[3]));var c=this.dateAdapter.createDateTime(this.dateAdapter.getYear(this.originalValue),this.dateAdapter.getMonth(this.originalValue),this.dateAdapter.getDate(this.originalValue),r,a,s,0);return this.dateAdapter.isValid(c)?c:void 0}}},n.prototype.getTimeDigitsFromDate=function(e){return{hours:this.dateAdapter.getHours(e),minutes:this.dateAdapter.getMinutes(e),seconds:this.dateAdapter.getSeconds(e)}},n.prototype.minTimeValidator=function(){return this.minTime&&void 0!==this.currentDateTimeInput&&this.isTimeLowerThenMin(this.currentDateTimeInput)?{mcTimepickerLowerThenMintime:{text:this.elementRef.nativeElement.value}}:null},n.prototype.maxTimeValidator=function(){return this.maxTime&&void 0!==this.currentDateTimeInput&&this.isTimeGreaterThenMax(this.currentDateTimeInput)?{mcTimepickerHigherThenMaxtime:{text:this.elementRef.nativeElement.value}}:null},n.prototype.isTimeLowerThenMin=function(e){return void 0!==e&&null!==e&&null!==this.minTime&&this.dateAdapter.compareDateTime(e,this.getDateFromTimeString(this.minTime))<0},n.prototype.isTimeGreaterThenMax=function(e){return void 0!==e&&null!==e&&null!==this.maxTime&&this.dateAdapter.compareDateTime(e,this.getDateFromTimeString(this.maxTime))>=0},n.decorators=[{type:t.Directive,args:[{selector:"input[mcTimepicker]",exportAs:"mcTimepickerInput",host:{class:"mc-timepicker mc-input","[attr.id]":"id","[attr.placeholder]":"placeholder","[disabled]":"disabled","[required]":"required","[attr.time-format]":"timeFormat","[attr.min-time]":"minTime","[attr.max-time]":"maxTime","[attr.value]":"value","[attr.aria-invalid]":"errorState","(blur)":"onBlur()","(focus)":"focusChanged(true)","(input)":"onInput()","(paste)":"onPaste($event)","(keydown)":"onKeyDown($event)"},providers:[{provide:kt,useExisting:t.forwardRef(function(){return n})}]}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:l.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.NgForm,decorators:[{type:t.Optional}]},{type:l.FormGroupDirective,decorators:[{type:t.Optional}]},{type:Oe},{
|
19
|
-
type:void 0,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[_n]}]},{type:t.Renderer2},{type:f.DateAdapter,decorators:[{type:t.Optional}]}]},n.propDecorators={errorStateMatcher:[{type:t.Input}],placeholder:[{type:t.Input}],disabled:[{type:t.Input}],id:[{type:t.Input}],required:[{type:t.Input}],value:[{type:t.Input}],timeFormat:[{type:t.Input,args:["time-format"]}],minTime:[{type:t.Input,args:["min-time"]}],maxTime:[{type:t.Input,args:["max-time"]}]},n}(Sa),Ea=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule,h.PlatformModule,l.FormsModule],declarations:[Da],exports:[Da]}]}],e}(),Pa={Opened:"opened",Closed:"closed"},Ma={sidebarState:s.trigger("state",[s.state("opened",s.style({minWidth:"{{ openedStateMinWidth }}",width:"{{ openedStateWidth }}",maxWidth:"{{ openedStateMaxWidth }}"}),{params:{openedStateMinWidth:"",openedStateWidth:"",openedStateMaxWidth:""}}),s.state("closed",s.style({minWidth:"{{ closedStateWidth }}",width:"{{ closedStateWidth }}",maxWidth:"{{ closedStateWidth }}"}),{params:{closedStateWidth:""}}),s.transition("opened => closed",[s.animate("0.1s")]),s.transition("closed => opened",[s.animate("0.2s")])])},Ta={Left:"left",Right:"right"},Aa=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"[mc-sidebar-opened]",exportAs:"mcSidebarOpened"}]}],e.propDecorators={minWidth:[{type:t.Input}],width:[{type:t.Input}],maxWidth:[{type:t.Input}]},e}(),Ra=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"[mc-sidebar-closed]",exportAs:"mcSidebarClosed"}]}],e.propDecorators={width:[{type:t.Input}]},e}(),Va=function(){function e(e,n){this.ngZone=e,this.elementRef=n,this._opened=!0,this.params={openedStateWidth:"inherit",openedStateMinWidth:"inherit",openedStateMaxWidth:"inherit",closedStateWidth:"32px"},this.stateChanged=new t.EventEmitter,this.internalState=!0}return Object.defineProperty(e.prototype,"opened",{get:function(){return this._opened},set:function(e){this._opened&&this.saveWidth(),this._opened=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animationState",{get:function(){return this._opened?Pa.Opened:Pa.Closed},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.position!==Ta.Left&&this.position!==Ta.Right||this.registerKeydownListener()},e.prototype.ngOnDestroy=function(){this.position!==Ta.Left&&this.position!==Ta.Right||this.unRegisterKeydownListener()},e.prototype.toggle=function(){this.opened=!this.opened},e.prototype.onAnimationStart=function(){this._opened&&(this.internalState=this._opened)},e.prototype.onAnimationDone=function(){this.internalState=this._opened,this.stateChanged.emit(this._opened)},e.prototype.ngAfterContentInit=function(){this.params={openedStateWidth:this.openedContent.width||"inherit",openedStateMinWidth:this.openedContent.minWidth||"inherit",openedStateMaxWidth:this.openedContent.maxWidth||"inherit",closedStateWidth:this.closedContent.width||"32px"}},e.prototype.registerKeydownListener=function(){var e=this;this.documentKeydownListener=function(t){a.isControl(t)||a.isInput(t)||(e.position===Ta.Left&&a.isLeftBracket(t)||e.position===Ta.Right&&a.isRightBracket(t))&&e.ngZone.run(function(){return e._opened=!e._opened})},this.ngZone.runOutsideAngular(function(){document.addEventListener("keypress",e.documentKeydownListener,!0)})},e.prototype.unRegisterKeydownListener=function(){document.removeEventListener("keypress",this.documentKeydownListener,!0)},e.prototype.saveWidth=function(){this.params.openedStateWidth=this.elementRef.nativeElement.offsetWidth+"px"},e.decorators=[{type:t.Component,args:[{selector:"mc-sidebar",exportAs:"mcSidebar",template:'<ng-container [ngSwitch]="internalState"><ng-container *ngSwitchCase="true"><ng-content select="[mc-sidebar-opened]"></ng-content></ng-container><ng-container *ngSwitchCase="false"><ng-content select="[mc-sidebar-closed]"></ng-content></ng-container></ng-container>',styles:[".mc-sidebar{display:inline-block;height:100%;overflow:hidden}.mc-sidebar-closed,.mc-sidebar-opened{height:100%}"],host:{class:"mc-sidebar","[@state]":"{\n value: animationState,\n params: params\n }","(@state.start)":"onAnimationStart()","(@state.done)":"onAnimationDone()"},animations:[Ma.sidebarState],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:t.NgZone},{type:t.ElementRef}]},e.propDecorators={opened:[{type:t.Input}],position:[{type:t.Input}],stateChanged:[{type:t.Output}],openedContent:[{type:t.ContentChild,args:[Aa,{static:!1}]}],closedContent:[{type:t.ContentChild,args:[Ra,{static:!1}]}]},e}(),Fa=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule],declarations:[Ra,Aa,Va],exports:[Ra,Aa,Va]}]}],e}(),La=new t.InjectionToken("McSidepanelData"),Na={Right:"right",Left:"left",Top:"top",Bottom:"bottom"},ja=function(){function e(){this.data=null,this.position=Na.Right,this.hasBackdrop=!0,this.requiredBackdrop=!1,this.disableClose=!1,this.overlayPanelClass=""}return e}(),Ba={Void:"void",Visible:"visible",Hidden:"hidden"},za={right:{in:"translateX(100%)",out:"translateX(0%)"},left:{in:"translateX(-100%)",out:"translateX(0%)"},top:{in:"translateY(-100%)",out:"translateY(0%)"},bottom:{in:"translateY(100%)",out:"translateY(0%)"}},Wa={sidepanelState:s.trigger("state",[s.state("hidden",s.style({transform:"{{transformIn}}"}),{params:{transformIn:za[Na.Right].in}}),s.state("visible",s.style({transform:"{{transformOut}}"}),{params:{transformOut:za[Na.Right].out}}),s.transition("visible => void, visible => hidden",s.animate("200ms "+Be.AccelerationCurve)),s.transition("void => visible",s.animate("200ms "+Be.DecelerationCurve))])},Ya=new t.InjectionToken("mc-sidepanel-with-indent"),Ha=new t.InjectionToken("mc-sidepanel-with-shadow"),Ka=function(e){function n(n,i,o,r,a){var s=e.call(this)||this;return s.elementRef=n,s.changeDetectorRef=i,s.sidepanelConfig=o,s.withIndent=r,s.withShadow=a,s.animationState=Ba.Void,s.animationStateChanged=new t.EventEmitter,s}return v(n,e),n.prototype.ngOnDestroy=function(){this.destroyed=!0},n.prototype.attachComponentPortal=function(e){return this.validatePortalAttached(),this.setAnimation(),this.setPanelClass(),this.portalOutlet.attachComponentPortal(e)},n.prototype.attachTemplatePortal=function(e){return this.validatePortalAttached(),this.setAnimation(),this.setPanelClass(),this.portalOutlet.attachTemplatePortal(e)},n.prototype.enter=function(){this.destroyed||(this.animationState=Ba.Visible,this.changeDetectorRef.detectChanges())},n.prototype.exit=function(){this.destroyed||(this.animationState=Ba.Hidden,this.changeDetectorRef.markForCheck())},n.prototype.onAnimation=function(e){this.animationStateChanged.emit(e)},n.prototype.setAnimation=function(){var e=this.sidepanelConfig.position;this.animationTransform={transformIn:za[e].in,transformOut:za[e].out}},n.prototype.setPanelClass=function(){var e=this.elementRef.nativeElement,t=this.sidepanelConfig.position;e.classList.add("mc-sidepanel-container_"+t),this.withShadow&&e.classList.add("mc-sidepanel-container_shadowed")},n.prototype.validatePortalAttached=function(){if(this.portalOutlet.hasAttached())throw Error("Attempting to attach sidepanel content after content is already attached")},n.decorators=[{type:t.Component,args:[{selector:"mc-sidepanel-container",template:'<div class="mc-sidepanel-wrapper"><div class="mc-sidepanel-indent" *ngIf="withIndent"><button mcSidepanelClose></button></div><div class="mc-sidepanel-content"><ng-template cdkPortalOutlet></ng-template></div></div>',styles:[".mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mc-sidepanel-container{outline:0;display:flex;flex:1;position:fixed;min-height:0}.mc-sidepanel-container .flex{min-height:0}.mc-sidepanel-container_left,.mc-sidepanel-container_right{width:33%;min-width:400px;height:100%;top:0}.mc-sidepanel-container_left .mc-sidepanel-indent,.mc-sidepanel-container_right .mc-sidepanel-indent{width:16px;height:100%}.mc-sidepanel-container_right{right:0;transform:translateX(100%)}.mc-sidepanel-container_right .mc-sidepanel-wrapper{flex-direction:row}.mc-sidepanel-container_left{left:0;transform:translateX(-100%)}.mc-sidepanel-container_left .mc-sidepanel-wrapper{flex-direction:row-reverse}.mc-sidepanel-container_bottom,.mc-sidepanel-container_top{flex-direction:column;height:33%;min-height:400px;width:100%;left:0}.mc-sidepanel-container_bottom .mc-sidepanel-indent,.mc-sidepanel-container_top .mc-sidepanel-indent{height:16px;width:100%}.mc-sidepanel-container_top{top:0;transform:translateY(-100%)}.mc-sidepanel-container_top .mc-sidepanel-wrapper{flex-direction:column-reverse}.mc-sidepanel-container_bottom{bottom:0;transform:translateY(100%)}.mc-sidepanel-container_bottom .mc-sidepanel-wrapper{flex-direction:column}.mc-sidepanel-wrapper{display:flex;flex:1;min-height:0;width:100%}.mc-sidepanel-indent{display:flex;flex:0 0 auto}.mc-sidepanel-indent .mc-sidepanel-close{width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;background:0 0;padding:0}.mc-sidepanel-content{display:flex;flex-direction:column;flex:1;min-height:0;width:100%}.mc-sidepanel-header{padding:14px 16px;display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;flex:0 0 auto}.mc-sidepanel-header .mc-sidepanel-close{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;background:0 0;padding:0 0 0 8px}.mc-sidepanel-title{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mc-sidepanel-body{overflow-y:auto;display:flex;flex:1;flex-direction:column;min-height:0}.mc-sidepanel-footer{padding:16px;display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;flex:0 0 auto}.mc-sidepanel-footer .mc-sidepanel-actions{display:flex;align-items:center;flex-direction:row;flex:1}.mc-sidepanel-footer .mc-sidepanel-actions[align=left]{justify-content:start}.mc-sidepanel-footer .mc-sidepanel-actions[align=right]{justify-content:flex-end}.mc-sidepanel-footer button+button{margin-left:16px}"],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,animations:[Wa.sidepanelState],host:{class:"mc-sidepanel-container",tabindex:"-1",role:"dialog","aria-modal":"true","[attr.id]":"id","[@state]":"{\n value: animationState,\n params: animationTransform\n }","(@state.start)":"onAnimation($event)","(@state.done)":"onAnimation($event)"}}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:ja},{type:Boolean,decorators:[{type:t.Inject,args:[Ya]}]},{type:Boolean,decorators:[{type:t.Inject,args:[Ha]}]}]},n.propDecorators={portalOutlet:[{type:t.ViewChild,args:[d.CdkPortalOutlet,{static:!0}]}]},n}(d.BasePortalOutlet),Ua=0,Ga=function(){function e(e,t,n){var i=this;this.containerInstance=e,this.overlayRef=t,this.config=n,this.afterClosed$=new o.Subject,this.afterOpened$=new o.Subject,this.id=this.config.id||"mc-sidepanel-"+Ua++,this.containerInstance.id=this.id,e.animationStateChanged.pipe(m.filter(function(e){return"done"===e.phaseName&&e.toState===Ba.Visible}),m.take(1)).subscribe(function(){i.afterOpened$.next(),i.afterOpened$.complete()}),e.animationStateChanged.pipe(m.filter(function(e){return"done"===e.phaseName&&e.toState===Ba.Hidden}),m.take(1)).subscribe(function(){t.dispose(),i.afterClosed$.next(i.result),i.afterClosed$.complete()}),e.sidepanelConfig.disableClose||o.merge(t.backdropClick(),t.keydownEvents().pipe(m.filter(function(e){return e.keyCode===a.ESCAPE}))).subscribe(function(){return i.close()})}return e.prototype.close=function(e){var t=this;this.afterClosed$.closed||(this.containerInstance.animationStateChanged.pipe(m.filter(function(e){return"done"===e.phaseName}),m.take(1)).subscribe(function(){return t.overlayRef.detachBackdrop()}),this.result=e,this.containerInstance.exit())},e.prototype.afterClosed=function(){return this.afterClosed$.asObservable()},e.prototype.afterOpened=function(){return this.afterOpened$.asObservable()},e}(),Xa=new t.InjectionToken("mc-sidepanel-default-options"),qa=function(){function e(e,t,n,i){this.overlay=e,this.injector=t,this.defaultOptions=n,this.parentSidepanelService=i,this.openedSidepanelsAtThisLevel=[]}return Object.defineProperty(e.prototype,"openedSidepanels",{get:function(){return this.parentSidepanelService?this.parentSidepanelService.openedSidepanels:this.openedSidepanelsAtThisLevel},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this.closeSidepanels(this.openedSidepanelsAtThisLevel)},e.prototype.open=function(e,n){var i=this,o=fe({},this.defaultOptions||new ja,n);if(o.id&&this.getSidepanelById(o.id))throw Error('Sidepanel with id "'+o.id+'" exists already. The sidepanel id must be unique.');var r=this.createOverlay(o),a=this.attachContainer(r,o),s=new Ga(a,r,o);if(e instanceof t.TemplateRef)a.attachTemplatePortal(new d.TemplatePortal(e,null,{$implicit:o.data,sidepanelRef:s}));else{var c=this.createInjector(o,s,a),l=new d.ComponentPortal(e,void 0,c),p=a.attachComponentPortal(l);s.instance=p.instance}return this.openedSidepanels.push(s),s.afterClosed().subscribe(function(){return i.removeOpenSidepanel(s)}),a.enter(),s},e.prototype.closeAll=function(){this.closeSidepanels(this.openedSidepanels)},e.prototype.getSidepanelById=function(e){return this.openedSidepanels.find(function(t){return t.id===e})},e.prototype.attachContainer=function(e,t){var n=this.getOpenedSidepanelsWithSamePosition(t),i=new d.PortalInjector(this.injector,new WeakMap([[ja,t],[Ya,n.length>=1],[Ha,n.length<2]])),o=new d.ComponentPortal(Ka,void 0,i);return e.attach(o).instance},e.prototype.createInjector=function(e,t,n){var i=new WeakMap([[Ka,n],[La,e.data],[Ga,t]]);return new d.PortalInjector(this.injector,i)},e.prototype.createOverlay=function(e){var t=new c.OverlayConfig({hasBackdrop:e.hasBackdrop,backdropClass:this.getBackdropClass(e),maxWidth:"100%",panelClass:e.overlayPanelClass,scrollStrategy:this.overlay.scrollStrategies.block(),positionStrategy:this.overlay.position().global()});return this.overlay.create(t)},e.prototype.closeSidepanels=function(e){e.reverse().slice().forEach(function(e){e.close()})},e.prototype.getBackdropClass=function(e){var t=this.openedSidepanels.some(function(e){return e.config.hasBackdrop});return e.requiredBackdrop||!t?"cdk-overlay-dark-backdrop":"cdk-overlay-transparent-backdrop"},e.prototype.getOpenedSidepanelsWithSamePosition=function(e){return this.openedSidepanels.filter(function(t){return t.config.position===e.position})},e.prototype.removeOpenSidepanel=function(e){var t=this.openedSidepanels.indexOf(e);t>-1&&this.openedSidepanels.splice(t,1)},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:c.Overlay},{type:t.Injector},{type:ja,decorators:[{type:t.Optional},{type:t.Inject,args:[Xa]}]},{type:e,decorators:[{type:t.Optional},{type:t.SkipSelf}]}]},e}(),$a=function(){function e(e,t,n){this.sidepanelRef=e,this.elementRef=t,this.sidepanelService=n}return e.prototype.ngOnInit=function(){var e=this;this.sidepanelRef||setTimeout(function(){e.sidepanelRef=de(e.elementRef,e.sidepanelService.openedSidepanels)})},e.prototype.ngOnChanges=function(e){var t=e.mcSidepanelClose||e.sidepanelResult;t&&(this.sidepanelResult=t.currentValue)},e.decorators=[{type:t.Directive,args:[{selector:"button[mc-sidepanel-close], button[mcSidepanelClose]",host:{"(click)":"sidepanelRef.close(sidepanelResult)",class:"mc-sidepanel-close",type:"button"}}]}],e.ctorParameters=function(){return[{type:Ga,decorators:[{type:t.Optional}]},{type:t.ElementRef},{type:qa}]},e.propDecorators={sidepanelResult:[{type:t.Input,args:["mc-sidepanel-close"]}],mcSidepanelClose:[{type:t.Input,args:["mcSidepanelClose"]}]},e}(),Za=function(){function e(){}return e.decorators=[{type:t.Component,args:[{selector:"mc-sidepanel-header",template:'\n <div class="mc-sidepanel-title">\n <ng-content></ng-content>\n </div>\n <button *ngIf="closeable" mc-sidepanel-close>\n <span class="mc-sidepanel-close-x">\n <i mc-icon="mc-close-L_16" class="mc-icon mc-icon_light" color="second"></i>\n </span>\n </button>\n ',host:{class:"mc-sidepanel-header"}}]}],e.propDecorators={closeable:[{type:t.Input}]},e}(),Qa=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-sidepanel-body, [mc-sidepanel-body], mcSidepanelBody",host:{class:"mc-sidepanel-body"}}]}],e}(),Ja=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-sidepanel-footer, [mc-sidepanel-footer], mcSidepanelFooter",host:{class:"mc-sidepanel-footer"}}]}],e}(),es=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-sidepanel-actions, [mc-sidepanel-actions], mcSidepanelActions",host:{class:"mc-sidepanel-actions"}}]}],e}(),ts=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,c.OverlayModule,d.PortalModule,be,wt],providers:[qa],declarations:[Ka,$a,Za,Qa,Ja,es],entryComponents:[Ka],exports:[Ka,$a,Za,Qa,Ja,es]}]}],e}(),ns=function(){function e(e,t){this.elementRef=e,this.renderer=t,this._direction="vertical",this._order=0,this._size=6,this.dragged=!1}return Object.defineProperty(e.prototype,"direction",{get:function(){return this._direction},set:function(e){this._direction=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"order",{get:function(){return this._order},set:function(e){this._order=i.coerceNumberProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._size},set:function(e){this._size=i.coerceNumberProperty(e)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.setStyle("flex-basis",i.coerceCssPixelValue(this.size)),this.setStyle(this.isVertical()?"height":"width",i.coerceCssPixelValue(this.size)),this.setStyle("order",this.order),this.isVertical()||this.setStyle("height","100%"),this.setStyle("flex-direction",this.isVertical()?"row":"column")},e.prototype.isVertical=function(){return"vertical"===this.direction},e.prototype.setStyle=function(e,t){this.renderer.setStyle(this.elementRef.nativeElement,e,t)},e.decorators=[{type:t.Directive,args:[{selector:"mc-gutter",host:{class:"mc-gutter","[class.mc-gutter_vertical]":"isVertical()","[class.mc-gutter_dragged]":"dragged","(mousedown)":"dragged = true"}}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2}]},e.propDecorators={direction:[{type:t.Input}],order:[{type:t.Input}],size:[{type:t.Input}]},e}(),is=function(){function e(e,t,n,i){this.elementRef=e,this.changeDetectorRef=t,this.ngZone=n,this.renderer=i,this.areas=[],this.isDragging=!1,this.areaPositionDivider=2,this.listeners=[],this._hideGutters=!1,this._disabled=!1,this._gutterSize=6}return Object.defineProperty(e.prototype,"hideGutters",{get:function(){return this._hideGutters},set:function(e){this._hideGutters=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"direction",{get:function(){return this._direction},set:function(e){this._direction=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gutterSize",{get:function(){return this._gutterSize},set:function(e){var t=i.coerceNumberProperty(e);this._gutterSize=t>0?t:this.gutterSize},enumerable:!0,configurable:!0}),e.prototype.addArea=function(e){var t=this.areas.length,n=t*this.areaPositionDivider,i=e.getSize();e.setOrder(n),this.areas.push({area:e,index:t,order:n,initialSize:i})},e.prototype.ngOnInit=function(){this.direction||(this.direction="horizontal"),this.setStyle("flex-direction",this.isVertical()?"column":"row")},e.prototype.onMouseDown=function(e,t,n){var i=this;if(!this.disabled){e.preventDefault();var o=this.areas[t],r=this.areas[n],a={x:e.screenX,y:e.screenY};o.initialSize=o.area.getSize(),r.initialSize=r.area.getSize(),this.areas.forEach(function(e){var t=e.area.getSize();e.area.disableFlex(),e.area.setSize(t)}),this.ngZone.runOutsideAngular(function(){i.listeners.push(i.renderer.listen("document","mouseup",function(){return i.onMouseUp()}))}),this.ngZone.runOutsideAngular(function(){i.listeners.push(i.renderer.listen("document","mousemove",function(e){return i.onMouseMove(e,a,o,r)}))}),this.isDragging=!0}},e.prototype.removeArea=function(e){var t=-1;this.areas.some(function(n,i){return n.area===e&&(t=i,!0)}),-1!==t&&this.areas.splice(t,1)},e.prototype.isVertical=function(){return"vertical"===this.direction},e.prototype.updateGutter=function(){var e=this;this.gutters.forEach(function(t){t.dragged&&(t.dragged=!1,e.changeDetectorRef.detectChanges())})},e.prototype.onMouseMove=function(e,t,n,i){if(this.isDragging&&!this.disabled){var o={x:e.screenX,y:e.screenY},r=this.isVertical()?t.y-o.y:t.x-o.x,a=n.initialSize-r,s=i.initialSize+r,c=n.area.getMinSize(),l=i.area.getMinSize();a<=c||s<=l||(a<=0?(n.area.setSize(0),i.area.setSize(i.initialSize+n.initialSize)):s<=0?(n.area.setSize(i.initialSize+n.initialSize),i.area.setSize(0)):(n.area.setSize(a),i.area.setSize(s)))}},e.prototype.onMouseUp=function(){for(;this.listeners.length>0;){var e=this.listeners.pop();e&&e()}this.isDragging=!1,this.updateGutter()},e.prototype.setStyle=function(e,t){this.renderer.setStyle(this.elementRef.nativeElement,e,t)},e.decorators=[{type:t.Component,args:[{selector:"mc-splitter",exportAs:"mcSplitter",host:{class:"mc-splitter"},preserveWhitespaces:!1,styles:[".mc-splitter{display:flex;flex-wrap:nowrap;align-items:stretch;overflow:hidden}.mc-splitter .mc-splitter-area{overflow:hidden}.mc-gutter{display:flex;flex-grow:0;flex-shrink:0;justify-content:center;align-items:center;overflow:hidden}.mc-gutter.mc-gutter_vertical>.mc-icon{transform:rotate(90deg)}"],template:'<ng-content></ng-content><ng-template ngFor let-area [ngForOf]="areas" let-index="index" let-last="last"><mc-gutter *ngIf="last === false" [direction]="direction" [attr.disabled]="disabled || null" [style.display]="hideGutters ? \'none\' : \'flex\'" [size]="gutterSize" [order]="index * 2 + 1" (mousedown)="onMouseDown($event, index, index + 1)"></mc-gutter></ng-template>',encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:t.NgZone},{type:t.Renderer2}]},e.propDecorators={gutters:[{type:t.ViewChildren,args:[ns]}],hideGutters:[{type:t.Input}],direction:[{type:t.Input}],disabled:[{type:t.Input}],gutterSize:[{type:t.Input}]},e}(),os=function(){function e(e,t,n){this.elementRef=e,this.renderer=t,this.splitter=n}return e.prototype.disableFlex=function(){this.renderer.removeStyle(this.elementRef.nativeElement,"flex")},e.prototype.ngOnInit=function(){this.splitter.addArea(this),this.removeStyle("max-width"),"vertical"===this.splitter.direction?(this.setStyle("width","100%"),this.removeStyle("height")):(this.setStyle("height","100%"),this.removeStyle("width"))},e.prototype.ngOnDestroy=function(){this.splitter.removeArea(this)},e.prototype.setOrder=function(e){this.setStyle("order",e)},e.prototype.setSize=function(e){if(e){var t=i.coerceNumberProperty(e);this.setStyle(this.getSizeProperty(),i.coerceCssPixelValue(t))}},e.prototype.getSize=function(){return this.elementRef.nativeElement[this.getOffsetSizeProperty()]},e.prototype.getMinSize=function(){var e=getComputedStyle(this.elementRef.nativeElement);return parseFloat(e[this.getMinSizeProperty()])},e.prototype.isVertical=function(){return"vertical"===this.splitter.direction},e.prototype.getMinSizeProperty=function(){return this.isVertical()?"min-height":"minWidth"},e.prototype.getOffsetSizeProperty=function(){return this.isVertical()?"offsetHeight":"offsetWidth"},e.prototype.getSizeProperty=function(){return this.isVertical()?"height":"width"},e.prototype.setStyle=function(e,t){this.renderer.setStyle(this.elementRef.nativeElement,e,t)},e.prototype.removeStyle=function(e){this.renderer.removeStyle(this.elementRef.nativeElement,e)},e.decorators=[{type:t.Directive,args:[{selector:"[mc-splitter-area]",host:{class:"mc-splitter-area"}}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:is}]},e}(),rs=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,wt],exports:[ns,os,is],declarations:[ns,os,is]}]}],e}(),as=0,ss=function(){function e(e){this._elementRef=e}return e}(),cs=k(O(w(ss),ve.Primary)),ls=function(){function e(){}return e}(),ps=function(e){function n(n,i,o,r){var a=e.call(this,n)||this;return a._elementRef=n,a._focusMonitor=i,a._changeDetectorRef=o,a.labelPosition="right",a.ariaLabel="",a.ariaLabelledby=null,a.name=null,a._disabled=!1,a._checked=!1,a.change=new t.EventEmitter,a.uniqueId="mc-toggle-"+ ++as,a.onTouchedCallback=function(){},a.onChangeCallback=function(e){},a.id=a.uniqueId,a.tabIndex=parseInt(r)||0,a._focusMonitor.monitor(a._elementRef.nativeElement,!0),a}return v(n,e),Object.defineProperty(n.prototype,"inputId",{get:function(){return(this.id||this.uniqueId)+"-input"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled},set:function(e){e!==this._disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"checked",{get:function(){return this._checked},set:function(e){e!==this._checked&&(this._checked=e,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),n.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._elementRef.nativeElement)},n.prototype.focus=function(){this._focusMonitor.focusVia(this.inputElement.nativeElement,"keyboard")},n.prototype.getAriaChecked=function(){return this.checked},n.prototype.onInteractionEvent=function(e){e.stopPropagation()},n.prototype.onLabelTextChange=function(){this._changeDetectorRef.markForCheck()},n.prototype.onInputClick=function(e){e.stopPropagation(),this.updateModelValue(),this.emitChangeEvent()},n.prototype.writeValue=function(e){this.checked=!!e},n.prototype.registerOnChange=function(e){this.onChangeCallback=e},n.prototype.registerOnTouched=function(e){this.onTouchedCallback=e},n.prototype.setDisabledState=function(e){this.disabled=e},n.prototype.updateModelValue=function(){this._checked=!this.checked,this.onChangeCallback(this.checked),this.onTouchedCallback()},n.prototype.emitChangeEvent=function(){var e=new ls;e.source=this,e.checked=this.checked,this.onChangeCallback(this.checked),this.change.emit(e)},n.decorators=[{type:t.Component,args:[{selector:"mc-toggle",exportAs:"mcToggle",template:'<label [attr.for]="inputId" class="mc-toggle-layout" #label><div class="mc-toggle__container" [class.left]="labelPosition === \'left\'"><input #input type="checkbox" class="mc-toggle-input cdk-visually-hidden" [id]="inputId" [checked]="checked" [attr.value]="value" [disabled]="disabled" [attr.name]="name" [tabIndex]="tabIndex" [attr.aria-label]="ariaLabel || null" [attr.aria-labelledby]="ariaLabelledby" [attr.aria-checked]="getAriaChecked()" (click)="onInputClick($event)" (change)="onInteractionEvent($event)"><div class="mc-toggle-bar-container"><div class="mc-toggle__focus-frame"></div><div class="mc-toggle-bar"><div class="mc-toggle__circle" [@switch]="checked"></div></div></div><div class="mc-toggle__content" [class.left]="labelPosition === \'left\'" [class.right]="labelPosition === \'right\'"><span class="mc-toggle-label" (cdkObserveContent)="onLabelTextChange()"><ng-content></ng-content></span></div></div></label>',styles:[".mc-toggle{display:inline-block}.mc-toggle .mc-toggle-layout{cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mc-toggle .mc-toggle-bar{position:relative;border-width:1px;border-style:solid}.mc-toggle .mc-toggle-bar.mc-toggle-label-position-left{order:1}.mc-toggle .mc-toggle-bar-container{position:relative}.mc-toggle__container{display:flex;align-items:center;position:relative}.mc-toggle__container.left{flex-direction:row-reverse}.mc-toggle__content.left{margin-right:8px}.mc-toggle__content.right{margin-left:8px}.mc-toggle__circle{position:absolute;border-width:1px;border-style:solid;border-radius:100%;margin-top:-1px;margin-left:-1px;transform:translateX(-1px)}.mc-toggle__focus-frame{position:absolute;top:0;left:0;z-index:1}.mc-toggle:not(.mc-toggle_small) .mc-toggle-bar{height:16px;width:28px;border-radius:9px}.mc-toggle:not(.mc-toggle_small) .mc-toggle__focus-frame{border-radius:9px;height:16px;width:28px}.mc-toggle:not(.mc-toggle_small) .mc-toggle__circle{height:16px;width:16px}.mc-toggle.mc-toggle_small .mc-toggle-bar{height:14px;width:24px;border-radius:8px}.mc-toggle.mc-toggle_small .mc-toggle__focus-frame{border-radius:8px;height:14px;width:24px}.mc-toggle.mc-toggle_small .mc-toggle__circle{height:14px;width:14px}.mc-toggle:not(.mc-disabled){cursor:pointer}"],providers:[{provide:l.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return n}),multi:!0}],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,inputs:["disabled","color","tabIndex"],host:{class:"mc-toggle","[id]":"id","[attr.id]":"id","[class.mc-disabled]":"disabled","[class.mc-toggle_off]":"!checked"},animations:[s.trigger("switch",[s.state("true",s.style({left:"50%"})),s.state("false",s.style({left:"1px"})),s.transition("true <=> false",s.animate("150ms"))])]}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:p.FocusMonitor},{type:t.ChangeDetectorRef},{type:String,decorators:[{type:t.Attribute,args:["tabindex"]}]}]},n.propDecorators={inputElement:[{type:t.ViewChild,args:["input",{static:!1}]}],labelPosition:[{type:t.Input}],ariaLabel:[{type:t.Input,args:["aria-label"]}],ariaLabelledby:[{type:t.Input,args:["aria-labelledby"]}],id:[{type:t.Input}],name:[{type:t.Input}],value:[{type:t.Input}],disabled:[{type:t.Input}],checked:[{type:t.Input}],change:[{type:t.Output}]},n}(cs),ds=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule,be],exports:[ps],declarations:[ps]}]}],e}(),us=function(){function e(e){this.cdr=e,this.prefix="mc-tooltip_placement",this.positions=We.slice(),this.classMap={},this.mcVisibleChange=new t.EventEmitter,this.mcMouseEnterDelay=400,this.mcMouseLeaveDelay=0,this._mcTrigger="hover",this._mcPlacement="top",this._mcVisible=new o.BehaviorSubject(!1),this.onHideSubject=new o.Subject,this.closeOnInteraction=!1,this.availablePositions=ze,this.$visible=this._mcVisible.asObservable()}return Object.defineProperty(e.prototype,"mcTitle",{get:function(){return this._mcTitle},set:function(e){this.isTitleString=!(e instanceof t.TemplateRef),this.isTitleString&&(this._mcTitle=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcTrigger",{get:function(){return this._mcTrigger},set:function(e){this._mcTrigger=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcPlacement",{get:function(){return this._mcPlacement},set:function(e){e!==this._mcPlacement?(this._mcPlacement=e,this.positions.unshift(ze[this.mcPlacement])):e||(this._mcPlacement="top")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcVisible",{get:function(){return this._mcVisible.value},set:function(e){var t=i.coerceBooleanProperty(e);t&&this._mcVisible.value!==t?this.show():this.hide()},enumerable:!0,configurable:!0}),e.prototype.show=function(){var e=this;this.hideTid&&clearTimeout(this.hideTid),this.isContentEmpty()||("manual"!==this.mcTrigger&&(this.closeOnInteraction=!0),
|
20
|
-
this.showTid=setTimeout(function(){e._mcVisible.next(!0),e.mcVisibleChange.emit(!0),e.markForCheck()},this.mcMouseEnterDelay))},e.prototype.hide=function(){var e=this;this.showTid&&clearTimeout(this.showTid),this.hideTid=setTimeout(function(){e._mcVisible.next(!1),e.mcVisibleChange.emit(!1),e.onHideSubject.next(),e.markForCheck()},this.mcMouseLeaveDelay)},e.prototype.setClassMap=function(){this.classMap=this.prefix+"-"+this.mcPlacement},e.prototype.isContentEmpty=function(){return!!this.isTitleString&&(""===this.mcTitle||!this.mcTitle)},e.prototype.afterHidden=function(){return this.onHideSubject.asObservable()},e.prototype.markForCheck=function(){this.cdr.markForCheck()},e.prototype.handleBodyInteraction=function(){this.closeOnInteraction&&this.hide()},e.decorators=[{type:t.Component,args:[{selector:"mc-tooltip-component",inputs:["mcMouseEnterDelay","mcMouseLeaveDelay","mcTitle","mcVisible","mcTrigger","mcPlacement"],outputs:["mcVisibleChange"],animations:[je],template:'<div class="mc-tooltip" [ngClass]="classMap" [@fadeAnimation]="\'\'+($visible | async)"><div class="mc-tooltip-content"><div class="mc-tooltip-arrow"></div><div class="mc-tooltip-inner"><ng-container>{{ mcTitle }}</ng-container></div></div></div>',preserveWhitespaces:!1,styles:["@keyframes mc-progress{from{background-position:0 0}to{background-position:29px 0}}.mc-progress{position:relative}.mc-progress:after{content:'';position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;background:linear-gradient(135deg,rgba(0,0,0,.05) 10px,transparent 10px,transparent 20px,rgba(0,0,0,.05) 20px,rgba(0,0,0,.05) 30px,transparent 30px) repeat;background-size:29px 29px;animation:mc-progress 1s linear infinite}.cdk-overlay-container{pointer-events:none;top:0;left:0;height:100%;width:100%;position:fixed;z-index:1000;box-sizing:border-box;margin:0;padding:0}.cdk-overlay-backdrop{top:0;bottom:0;left:0;right:0;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0;position:absolute;pointer-events:auto;z-index:1000;box-sizing:border-box;margin:0;padding:0}.cdk-overlay-pane{box-sizing:border-box;position:absolute;pointer-events:auto;margin:0;padding:0;z-index:1000;max-width:100%;max-height:100%}.cdk-overlay-connected-position-bounding-box{box-sizing:border-box;position:absolute;z-index:1000;display:flex;flex-direction:column;margin:0;padding:0;min-width:1px;min-height:1px}.mc-tooltip{display:block;box-sizing:border-box;visibility:visible;position:relative;margin:0;padding:0;z-index:1060;max-width:240px;list-style:none;white-space:pre-line}.mc-tooltip_placement-top{padding-bottom:9px}.mc-tooltip_placement-right{padding-left:9px}.mc-tooltip_placement-bottom{padding-top:9px}.mc-tooltip_placement-left{padding-right:9px}.mc-tooltip-inner{padding:8px 16px;text-align:left;text-decoration:none;border-radius:3px;min-height:16px;height:fit-content;vertical-align:center}.mc-tooltip-arrow{position:absolute;width:12px;height:12px;transform:rotate(45deg)}.mc-tooltip_placement-top .mc-tooltip-arrow{bottom:4px;left:50%;margin-left:-5px}.mc-tooltip_placement-right .mc-tooltip-arrow{left:4px;top:16px;margin-top:-5px}.mc-tooltip_placement-left .mc-tooltip-arrow{right:4px;top:16px;margin-top:-5px}.mc-tooltip_placement-bottom .mc-tooltip-arrow{top:4px;left:50%;margin-left:-5px}"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,host:{"(body:click)":"this.handleBodyInteraction()"}}]}],e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},e.propDecorators={mcVisibleChange:[{type:t.Output}],mcMouseEnterDelay:[{type:t.Input}],mcMouseLeaveDelay:[{type:t.Input}],mcTitle:[{type:t.Input}],mcTrigger:[{type:t.Input}],mcPlacement:[{type:t.Input}],mcVisible:[{type:t.Input}]},e}(),hs=new t.InjectionToken("mc-tooltip-scroll-strategy"),ms={provide:hs,deps:[c.Overlay],useFactory:ue},gs=function(){function e(e,n,i,r,a,s,c){this.overlay=e,this.elementRef=n,this.ngZone=i,this.scrollDispatcher=r,this.hostView=a,this.scrollStrategy=s,this.direction=c,this.isTooltipOpen=!1,this.isDynamicTooltip=!1,this.parentDisabled=!1,this.mcVisibleChange=new t.EventEmitter,this.$unsubscribe=new o.Subject,this._disabled=!1,this._mcTrigger="hover",this._mcPlacement="top",this.manualListeners=new Map,this.destroyed=new o.Subject,this.availablePositions=ze}return Object.defineProperty(e.prototype,"mcTitle",{get:function(){return this._mcTitle},set:function(e){this._mcTitle=e,this.updateCompValue("mcTitle",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"setTitle",{set:function(e){this.mcTitle=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e),this.updateCompValue("mcTooltipDisabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcMouseEnterDelay",{get:function(){return this._mcMouseEnterDelay},set:function(e){this._mcMouseEnterDelay=e,this.updateCompValue("mcMouseEnterDelay",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcMouseLeaveDelay",{get:function(){return this._mcMouseLeaveDelay},set:function(e){this._mcMouseLeaveDelay=e,this.updateCompValue("mcMouseLeaveDelay",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcTrigger",{get:function(){return this._mcTrigger},set:function(e){e?(this._mcTrigger=e,this.updateCompValue("mcTrigger",e)):this._mcTrigger="hover"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcPlacement",{get:function(){return this._mcPlacement},set:function(e){e?(this._mcPlacement=e,this.updateCompValue("mcPlacement",e)):this._mcPlacement="top"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcTooltipClass",{get:function(){return this._mcTooltipClass},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mсTooltipClass",{set:function(e){this._mcTooltipClass=e,this.tooltip&&this.tooltip.setClassMap()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcVisible",{get:function(){return this._mcVisible},set:function(e){var t=i.coerceBooleanProperty(e);this._mcVisible!==t&&(this._mcVisible=t,this.updateCompValue("mcVisible",t),t?this.show():this.hide())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this.isTooltipOpen},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isParentDisabled",{get:function(){return this.parentDisabled},enumerable:!0,configurable:!0}),e.prototype.createOverlay=function(){var e=this;if(this.overlayRef)return this.overlayRef;var t=this.overlay.position().flexibleConnectedTo(this.elementRef).withTransformOriginOn(".mc-tooltip").withFlexibleDimensions(!1).withViewportMargin(8).withPositions(We.slice()),n=this.scrollDispatcher.getAncestorScrollContainers(this.elementRef);return t.withScrollableContainers(n),t.positionChanges.pipe(m.takeUntil(this.destroyed)).subscribe(function(t){e.tooltip&&(e.onPositionChange(t),t.scrollableViewProperties.isOverlayClipped&&e.tooltip.mcVisible&&e.ngZone.run(function(){return e.hide()}))}),this.overlayRef=this.overlay.create({direction:this.direction,positionStrategy:t,panelClass:"mc-tooltip-panel",scrollStrategy:this.scrollStrategy()}),this.updatePosition(),this.overlayRef.detachments().pipe(m.takeUntil(this.destroyed)).subscribe(function(){return e.detach()}),this.overlayRef},e.prototype.detach=function(){this.overlayRef&&this.overlayRef.hasAttached()&&this.overlayRef.detach(),this.tooltip=null},e.prototype.onPositionChange=function(e){var t=this,n=this.mcPlacement;Object.keys(this.availablePositions).some(function(i){return e.connectionPair.originX===t.availablePositions[i].originX&&e.connectionPair.originY===t.availablePositions[i].originY&&e.connectionPair.overlayX===t.availablePositions[i].overlayX&&e.connectionPair.overlayY===t.availablePositions[i].overlayY&&(n=i,!0)}),this.updateCompValue("mcPlacement",n),this.tooltip&&(this.tooltip.setClassMap(),this.tooltip.markForCheck()),this.handlePositioningUpdate()},e.prototype.handlePositioningUpdate=function(){if(this.overlayRef||(this.overlayRef=this.createOverlay()),"right"===this.mcPlacement||"left"===this.mcPlacement){var e=(this.overlayRef.overlayElement.clientHeight-this.hostView.element.nativeElement.clientHeight)/2,t=this.overlayRef.overlayElement.style.top||"0px";this.overlayRef.overlayElement.style.top=parseInt(t.split("px")[0],10)+e-1+"px"}},e.prototype.updateCompValue=function(e,t){this.isDynamicTooltip&&t&&this.tooltip&&(this.tooltip[e]=t)},e.prototype.ngOnInit=function(){this.initElementRefListeners()},e.prototype.ngOnDestroy=function(){var e=this;this.overlayRef&&this.overlayRef.dispose(),this.manualListeners.forEach(function(t,n){return e.elementRef.nativeElement.removeEventListener(n,t)}),this.manualListeners.clear(),this.$unsubscribe.next(),this.$unsubscribe.complete()},e.prototype.handleKeydown=function(e){this.isTooltipOpen&&e.keyCode===a.ESCAPE&&this.hide()},e.prototype.handleTouchend=function(){this.hide()},e.prototype.initElementRefListeners=function(){var e=this;"hover"===this.mcTrigger&&this.manualListeners.set("mouseenter",function(){return e.show()}).set("mouseleave",function(){return e.hide()}).forEach(function(t,n){return e.elementRef.nativeElement.addEventListener(n,t)}),"focus"===this.mcTrigger&&this.manualListeners.set("focus",function(){return e.show()}).set("blur",function(){return e.hide()}).forEach(function(t,n){return e.elementRef.nativeElement.addEventListener(n,t)})},e.prototype.show=function(){var e=this;if(!this.disabled){if(!this.tooltip){var t=this.createOverlay();this.detach(),this.portal=this.portal||new d.ComponentPortal(us,this.hostView),this.tooltip=t.attach(this.portal).instance,this.tooltip.afterHidden().pipe(m.takeUntil(this.destroyed)).subscribe(function(){return e.detach()}),this.isDynamicTooltip=!0;["mcTitle","mcPlacement","mcTrigger","mcTooltipDisabled","mcMouseEnterDelay","mcMouseLeaveDelay","mсTooltipClass"].forEach(function(t){return e.updateCompValue(t,e[t])}),this.tooltip.mcVisibleChange.pipe(m.takeUntil(this.$unsubscribe),m.distinctUntilChanged()).subscribe(function(t){e.mcVisible=t,e.mcVisibleChange.emit(t),e.isTooltipOpen=t})}this.updatePosition(),this.tooltip.show()}},e.prototype.hide=function(){this.tooltip&&this.tooltip.hide()},e.prototype.updatePosition=function(){this.overlayRef||(this.overlayRef=this.createOverlay());var e=this.overlayRef.getConfig().positionStrategy,t=this.getOrigin(),n=this.getOverlayPosition();e.withPositions([fe({},t.main,n.main),fe({},t.fallback,n.fallback)])},e.prototype.getOrigin=function(){var e,t=this.mcPlacement,n=!this.direction||"ltr"===this.direction.value;if("top"===t||"bottom"===t)e={originX:"center",originY:"top"===t?"top":"bottom"};else if("top"===t||"left"===t&&n||"right"===t&&!n)e={originX:"start",originY:"center"};else{if(!("bottom"===t||"right"===t&&n||"left"===t&&!n))throw he(t);e={originX:"end",originY:"center"}}var i=this.invertPosition(e.originX,e.originY);return{main:e,fallback:{originX:i.x,originY:i.y}}},e.prototype.getOverlayPosition=function(){var e,t=this.mcPlacement,n=!this.direction||"ltr"===this.direction.value;if("top"===t)e={overlayX:"center",overlayY:"bottom"};else if("bottom"===t)e={overlayX:"center",overlayY:"top"};else if("top"===t||"left"===t&&n||"right"===t&&!n)e={overlayX:"end",overlayY:"center"};else{if(!("bottom"===t||"right"===t&&n||"left"===t&&!n))throw he(t);e={overlayX:"start",overlayY:"center"}}var i=this.invertPosition(e.overlayX,e.overlayY);return{main:e,fallback:{overlayX:i.x,overlayY:i.y}}},e.prototype.invertPosition=function(e,t){var n=e,i=t;return"top"===this.mcPlacement||"bottom"===this.mcPlacement?"top"===t?i="bottom":"bottom"===t&&(i="top"):"end"===e?n="start":"start"===e&&(n="end"),{x:n,y:i}},e.decorators=[{type:t.Directive,args:[{selector:'[mcTooltip], [attribute^="mcTooltip"]',exportAs:"mcTooltip",host:{"(keydown)":"handleKeydown($event)","(touchend)":"handleTouchend()"}}]}],e.ctorParameters=function(){return[{type:c.Overlay},{type:t.ElementRef},{type:t.NgZone},{type:c.ScrollDispatcher},{type:t.ViewContainerRef},{type:void 0,decorators:[{type:t.Inject,args:[hs]}]},{type:n.Directionality,decorators:[{type:t.Optional}]}]},e.propDecorators={mcVisibleChange:[{type:t.Output}],mcTitle:[{type:t.Input,args:["mcTooltip"]}],setTitle:[{type:t.Input,args:["mcTitle"]}],disabled:[{type:t.Input,args:["mcTooltipDisabled"]}],mcMouseEnterDelay:[{type:t.Input,args:["mcMouseEnterDelay"]}],mcMouseLeaveDelay:[{type:t.Input,args:["mcMouseLeaveDelay"]}],mcTrigger:[{type:t.Input,args:["mcTrigger"]}],mcPlacement:[{type:t.Input,args:["mcPlacement"]}],mcTooltipClass:[{type:t.Input,args:["mcTooltipClass"]}],mcVisible:[{type:t.Input,args:["mcVisible"]}],isOpen:[{type:t.HostBinding,args:["class.mc-tooltip-open"]}],isParentDisabled:[{type:t.HostBinding,args:["class.disabled"]}]},e}(),fs=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:[us,gs],exports:[us,gs],imports:[r.CommonModule,c.OverlayModule],providers:[ms],entryComponents:[us]}]}],e}(),ys=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-vertical-navbar-item-icon",host:{class:"mc-vertical-navbar__item-icon"}}]}],e}(),bs=function(){function e(){}return e.decorators=[{type:t.Component,args:[{selector:"mc-vertical-navbar-badge",template:'\n <span class="mc-badge mc-badge_light">\n <ng-content></ng-content>\n </span>\n ',host:{class:"mc-vertical-navbar__badge"}}]}],e}(),vs=function(){function e(e){this._elementRef=e}return e}(),Cs=w(vs),_s=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o.element=t,o.focusMonitor=n,o.trigger=i,o.tabIndex=0,o.focusMonitor.monitor(o.element.nativeElement).subscribe(),o}return v(n,e),Object.defineProperty(n.prototype,"hasDropdownAttached",{get:function(){return!!this.trigger},enumerable:!0,configurable:!0}),n.prototype.ngOnDestroy=function(){this.focusMonitor.stopMonitoring(this.element.nativeElement)},n.decorators=[{type:t.Component,args:[{selector:"a[mc-vertical-navbar-item], mc-vertical-navbar-item",template:'<div class="mc-vertical-navbar__item"><ng-content></ng-content><i *ngIf="hasDropdownAttached" mc-icon="mc-angle-right-M_16" class="mc-vertical-navbar__item-dropdown-icon"></i></div>',encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".mc-vertical-navbar__badge{position:absolute;width:64px;top:0;left:0}.mc-vertical-navbar__badge .mc-badge{position:absolute;right:4px;top:4px}.mc-vertical-navbar__item-icon{margin-right:16px}.mc-vertical-navbar__item-icon .mc-icon{font-size:32px}.mc-vertical-navbar__title{white-space:nowrap}.mc-vertical-navbar__item-dropdown-icon{margin-left:auto;padding-left:16px}a[mc-vertical-navbar-item],mc-vertical-navbar-item{height:64px;margin:1px 0;width:100%;position:relative;display:flex;align-items:center;box-sizing:border-box;cursor:pointer;text-decoration:none}a[mc-vertical-navbar-item] .mc-vertical-navbar__item,mc-vertical-navbar-item .mc-vertical-navbar__item{padding-left:16px;padding-right:16px;display:flex;align-items:center;width:100%;height:100%}a[mc-vertical-navbar-item].mc-progress,mc-vertical-navbar-item.mc-progress{cursor:pointer}a[mc-vertical-navbar-item].mc-vertical-navbar__item_active,mc-vertical-navbar-item.mc-vertical-navbar__item_active{cursor:default}a[mc-vertical-navbar-item][disabled],mc-vertical-navbar-item[disabled]{cursor:default;pointer-events:none}"],inputs:["disabled"],host:{"[attr.disabled]":"disabled || null","[attr.tabindex]":"disabled ? -1 : 0"}}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:p.FocusMonitor},{type:yi,decorators:[{type:t.Optional},{type:t.Self}]}]},n.propDecorators={tabIndex:[{type:t.Input}]},n}(Cs),xs=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-vertical-navbar-header, a[mc-vertical-navbar-header]",host:{class:"mc-vertical-navbar__header"}}]}],e}(),ws=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-vertical-navbar-title",host:{class:"mc-vertical-navbar__title"}}]}],e}(),Os=function(){function e(e){this.cd=e,this.expanded=!1}return e.prototype.toggle=function(){this.expanded=!this.expanded,this.cd.markForCheck()},e.decorators=[{type:t.Component,args:[{selector:"mc-vertical-navbar",changeDetection:t.ChangeDetectionStrategy.OnPush,template:'<nav class="mc-vertical-navbar" [@toggle]="expanded"><div class="mc-vertical-navbar__header-area"><div cdkMonitorElementFocus tabindex="0" class="mc-vertical-navbar__toggle-button" (click)="toggle()" (keydown.space)="toggle()" (keydown.enter)="toggle()"><i mc-icon="mc-hamburger_32" *ngIf="!expanded"></i> <i mc-icon="mc-close-L_32" *ngIf="expanded"></i></div><div cdkMonitorSubtreeFocus *ngIf="expanded"><ng-content select="mc-vertical-navbar-header, a[mc-vertical-navbar-header]"></ng-content></div></div><ng-content></ng-content></nav>',styles:[".mc-vertical-navbar{height:100%;position:fixed;left:0;top:0;z-index:100;display:flex;flex-direction:column;align-items:flex-start;min-height:100%;overflow:hidden}.mc-vertical-navbar .mc-vertical-navbar__header-area{display:flex;width:100%;align-items:stretch;box-sizing:border-box;min-height:64px}.mc-vertical-navbar .mc-vertical-navbar__header-area .mc-vertical-navbar__header{display:flex;height:100%;justify-content:stretch;text-decoration:none;align-self:stretch;align-items:center}.mc-vertical-navbar .mc-vertical-navbar__header-area .mc-vertical-navbar__toggle-button{cursor:pointer;display:flex;flex:0 0 auto;justify-content:center;align-items:center;align-self:stretch;width:64px}.mc-vertical-navbar .mc-vertical-navbar__header-area .mc-vertical-navbar__title{padding:0 16px}"],encapsulation:t.ViewEncapsulation.None,animations:[me()]}]}],e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},e.propDecorators={expanded:[{type:t.Input}]},e}(),ks=[Os,ws,_s,ys,bs,xs],Is=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule,h.PlatformModule,wt],exports:ks,declarations:ks}]}],e}(),Ss=new t.Version("8.5.3");e.ARROW_DOWN_KEYCODE="ArrowDown",e.ARROW_LEFT_KEYCODE="ArrowLeft",e.ARROW_RIGHT_KEYCODE="ArrowRight",e.ARROW_UP_KEYCODE="ArrowUp",e.AUTOCOMPLETE_BORDER_WIDTH=2,e.AUTOCOMPLETE_OPTION_HEIGHT=32,e.AUTOCOMPLETE_PANEL_HEIGHT=256,e.AnimationCurves=Be,e.BIG_STEP=bn,e.BOTTOM_LEFT_POSITION_PRIORITY=tt,e.BOTTOM_POSITION_PRIORITY=Ke,e.BOTTOM_RIGHT_POSITION_PRIORITY=et,e.DEFAULT_4_POSITIONS=We,e.DEFAULT_4_POSITIONS_TO_CSS_MAP=ot,e.DEFAULT_MC_LOCALE_ID="ru",e.DEFAULT_TIME_FORMAT=_a,e.EXTENDED_OVERLAY_POSITIONS=Ye,e.ErrorStateMatcher=Oe,e.HOURS_MINUTES_REGEXP=wa,e.HOURS_MINUTES_SECONDS_REGEXP=xa,e.HOURS_ONLY_REGEXP=Oa,e.HOURS_PER_DAY=23,e.LEFT_BOTTOM_POSITION_PRIORITY=Ze,e.LEFT_POSITION_PRIORITY=Ge,e.LEFT_TOP_POSITION_PRIORITY=$e,e.MAT_AUTOCOMPLETE_VALUE_ACCESSOR=Ht,e.MC_AUTOCOMPLETE_DEFAULT_OPTIONS=jt,e.MC_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY=K,e.MC_AUTOCOMPLETE_SCROLL_STRATEGY=Wt,e.MC_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY=U,e.MC_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER=Yt,e.MC_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR=Jt,e.MC_CHECKBOX_CLICK_ACTION=sn,e.MC_CHECKBOX_CONTROL_VALUE_ACCESSOR=ln,e.MC_CHECKBOX_REQUIRED_VALIDATOR=gn,e.MC_DATEPICKER_SCROLL_STRATEGY=Yn,e.MC_DATEPICKER_SCROLL_STRATEGY_FACTORY=ne,e.MC_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER=Hn,e.MC_DATEPICKER_VALIDATORS=$n,e.MC_DATEPICKER_VALUE_ACCESSOR=qn,e.MC_DROPDOWN_DEFAULT_OPTIONS=ui,e.MC_DROPDOWN_DEFAULT_OPTIONS_FACTORY=ae,e.MC_DROPDOWN_PANEL=ri,e.MC_DROPDOWN_SCROLL_STRATEGY=mi,e.MC_DROPDOWN_SCROLL_STRATEGY_FACTORY=se,e.MC_DROPDOWN_SCROLL_STRATEGY_FACTORY_PROVIDER=gi,e.MC_INPUT_VALUE_ACCESSOR=_n,e.MC_LABEL_GLOBAL_OPTIONS=Ne,e.MC_LOCALE_ID=pt,e.MC_OPTION_PARENT_COMPONENT=Ve,e.MC_POPOVER_SCROLL_STRATEGY=ho,e.MC_POPOVER_SCROLL_STRATEGY_FACTORY_PROVIDER=mo,e.MC_RADIO_GROUP_CONTROL_VALUE_ACCESSOR=Mo,e.MC_SANITY_CHECKS=ye,e.MC_SELECTION_LIST_VALUE_ACCESSOR=Ci,e.MC_SELECTION_TREE_VALUE_ACCESSOR=Ko,e.MC_SELECT_SCROLL_STRATEGY=rt,e.MC_SELECT_SCROLL_STRATEGY_PROVIDER=at,e.MC_SIDEPANEL_DATA=La,e.MC_SIDEPANEL_DEFAULT_OPTIONS=Xa,e.MC_SIDEPANEL_WITH_INDENT=Ya,e.MC_SIDEPANEL_WITH_SHADOW=Ha,e.MC_TABS_CONFIG=_r,e.MC_TAGS_DEFAULT_OPTIONS=Tr,e.MC_TEXTAREA_VALUE_ACCESSOR=ua,e.MC_TOOLTIP_SCROLL_STRATEGY=hs,e.MC_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER=ms,e.MC_TREE_OPTION_PARENT_COMPONENT=zo,e.MC_VALIDATION=bt,e.MINUTES_PER_HOUR=59,e.McAlignTabsCenterCssStyler=fr,e.McAlignTabsEndCssStyler=yr,e.McAnchor=Zt,e.McAutocomplete=Bt,e.McAutocompleteModule=Ut,e.McAutocompleteOrigin=zt,e.McAutocompleteSelectedEvent=Nt,e.McAutocompleteTrigger=Kt,e.McButton=$t,e.McButtonBase=Xt,e.McButtonCssStyler=Gt,e.McButtonMixinBase=qt,e.McButtonModule=Qt,e.McButtonToggle=nn,e.McButtonToggleChange=en,e.McButtonToggleGroup=tn,e.McButtonToggleModule=on,e.McCalendar=Bn,e.McCalendarBody=Vn,e.McCalendarCell=Rn,e.McCalendarHeader=jn,e.McCard=rn,e.McCardModule=an,e.McCheckbox=mn,e.McCheckboxBase=un,e.McCheckboxChange=dn,e.McCheckboxMixinBase=hn,e.McCheckboxModule=yn,e.McCheckboxRequiredValidator=fn,e.McCleaner=Ot,e.McCommonModule=be,e.McDatepicker=Xn,e.McDatepickerContent=Gn,e.McDatepickerContentBase=Kn,e.McDatepickerContentMixinBase=Un,e.McDatepickerInput=Qn,e.McDatepickerInputEvent=Zn,e.McDatepickerIntl=An,e.McDatepickerModule=ti,e.McDatepickerToggle=ei,e.McDatepickerToggleIcon=Jn,e.McDecimalPipe=ft,e.McDivider=ni,e.McDividerModule=ii,e.McDropdown=hi,e.McDropdownContent=oi,e.McDropdownItem=ci,e.McDropdownItemBase=ai,e.McDropdownItemMixinBase=si,e.McDropdownModule=bi,e.McDropdownTrigger=yi,e.McFormField=Rt,e.McFormFieldBase=Tt,e.McFormFieldControl=kt,e.McFormFieldMixinBase=At,e.McFormFieldModule=Ft,e.McFormFieldWithoutBorders=Vt,e.McFormattersModule=yt,e.McGutterDirective=ns,e.McHighlightModule=lt,e.McHighlightPipe=ct,e.McHint=St,e.McIcon=xt,e.McIconBase=Ct,e.McIconCSSStyler=vt,e.McIconMixinBase=_t,e.McIconModule=wt,e.McInput=In,e.McInputBase=On,e.McInputMixinBase=kn,e.McInputModule=Tn,e.McInputMono=Sn,e.McLightTabsCssStyler=gr,e.McLine=Ce,e.McLineModule=xe,e.McLineSetter=_e,e.McLink=Ai,e.McLinkBase=Mi,e.McLinkMixinBase=Ti,e.McLinkModule=Ri,e.McList=Ii,e.McListBase=ki,e.McListItem=Ei,e.McListItemBase=Di,e.McListModule=Pi,e.McListOption=vi,e.McListSelection=Oi,e.McListSelectionBase=xi,e.McListSelectionChange=_i,e.McListSelectionMixinBase=wi,e.McListSubheaderCssStyler=Si,e.McMeasureScrollbarService=De,e.McModalComponent=ji,e.McModalModule=Ui,e.McModalRef=Fi,e.McModalService=Ki,e.McMonthView=Fn,e.McMultiYearView=Ln,e.McNavbar=ao,e.McNavbarBrand=Qi,e.McNavbarContainer=io,e.McNavbarItem=no,e.McNavbarItemBase=eo,e.McNavbarLogo=Zi,e.McNavbarMixinBase=to,e.McNavbarModule=so,e.McNavbarTitle=Ji,e.McNumberInput=Cn,e.McOptgroup=Te,e.McOptgroupBase=Ee,e.McOptgroupMixinBase=Pe,e.McOption=Fe,e.McOptionModule=Le,e.McOptionSelectionChange=Re,e.McPopover=go,e.McPopoverComponent=uo,e.McPopoverModule=fo,e.McPrefix=Dt,e.McProgressBar=Co,e.McProgressBarBase=bo,e.McProgressBarMixinBase=vo,e.McProgressBarModule=_o,e.McProgressSpinner=ko,e.McProgressSpinnerBase=wo,e.McProgressSpinnerMixinBase=Oo,e.McProgressSpinnerModule=Io,e.McPseudoCheckbox=ke,e.McPseudoCheckboxModule=Se,e.McRadioButton=Vo,e.McRadioButtonBase=Ao;e.McRadioButtonMixinBase=Ro,e.McRadioChange=Do,e.McRadioGroup=To,e.McRadioGroupBase=Eo,e.McRadioGroupMixinBase=Po,e.McRadioModule=Fo,e.McSelect=ia,e.McSelectBase=Qr,e.McSelectChange=Zr,e.McSelectModule=oa,e.McSelectSearch=ea,e.McSelectSearchEmptyResult=ta,e.McSelectTrigger=na,e.McSidebar=Va,e.McSidebarClosed=Ra,e.McSidebarModule=Fa,e.McSidebarOpened=Aa,e.McSidepanelConfig=ja,e.McSidepanelContainerComponent=Ka,e.McSidepanelModule=ts,e.McSidepanelPosition=Na,e.McSidepanelRef=Ga,e.McSidepanelService=qa,e.McSplitterAreaDirective=os,e.McSplitterComponent=is,e.McSplitterModule=rs,e.McStepper=Et,e.McStretchTabsCssStyler=br,e.McSuffix=Pt,e.McTab=ar,e.McTabBody=cr,e.McTabBodyPortal=lr,e.McTabChangeEvent=Cr,e.McTabContent=tr,e.McTabGroup=Or,e.McTabGroupBase=xr,e.McTabGroupMixinBase=wr,e.McTabHeader=mr,e.McTabLabel=nr,e.McTabLabelWrapper=ur,e.McTabLink=Pr,e.McTabNav=Sr,e.McTabsModule=Mr,e.McTag=jr,e.McTagAvatar=Vr,e.McTagBase=Lr,e.McTagInput=Gr,e.McTagList=Kr,e.McTagListBase=zr,e.McTagListChange=Hr,e.McTagListMixinBase=Wr,e.McTagMixinBase=Nr,e.McTagRemove=Br,e.McTagSelectionChange=Ar,e.McTagTrailingIcon=Fr,e.McTagsModule=qr,e.McTextarea=fa,e.McTextareaBase=ma,e.McTextareaMixinBase=ga,e.McTextareaModule=ya,e.McTimepicker=Da,e.McTimepickerBase=Ia,e.McTimepickerMixinBase=Sa,e.McTimepickerModule=Ea,e.McToggleBase=ss,e.McToggleChange=ls,e.McToggleComponent=ps,e.McToggleMixinBase=cs,e.McToggleModule=ds,e.McToolTipModule=fs,e.McTooltip=gs,e.McTooltipComponent=us,e.McTreeFlatDataSource=Jo,e.McTreeFlattener=Zo,e.McTreeModule=$o,e.McTreeNavigationChange=Uo,e.McTreeNestedDataSource=er,e.McTreeNodeDef=Lo,e.McTreeNodePadding=No,e.McTreeNodeToggleComponent=jo,e.McTreeNodeToggleDirective=Bo,e.McTreeOption=Ho,e.McTreeOptionChange=Wo,e.McTreeSelect=pa,e.McTreeSelectChange=aa,e.McTreeSelectModule=da,e.McTreeSelectTrigger=sa,e.McTreeSelection=Xo,e.McTreeSelectionChange=Go,e.McVerticalNavbar=Os,e.McVerticalNavbarHeader=xs,e.McVerticalNavbarItem=_s,e.McVerticalNavbarItemBadge=bs,e.McVerticalNavbarItemIcon=ys,e.McVerticalNavbarMixinBase=Cs,e.McVerticalNavbarModule=Is,e.McVerticalNavbarTitle=ws,e.McYearView=Nn,e.MultipleMode=Ie,e.NESTED_PANEL_TOP_PADDING=2,e.NUMBER_FORMAT_REGEXP=dt,e.POSITION_MAP=ze,e.POSITION_PRIORITY_STRATEGY=nt,e.POSITION_TO_CSS_MAP=it,e.PopoverVisibility=po,e.RIGHT_BOTTOM_POSITION_PRIORITY=qe,e.RIGHT_POSITION_PRIORITY=Ue,e.RIGHT_TOP_POSITION_PRIORITY=Xe,e.SECONDS_PER_MINUTE=59,e.SELECT_PANEL_INDENT_PADDING_X=2,e.SELECT_PANEL_MAX_HEIGHT=224,e.SELECT_PANEL_PADDING_X=1,e.SELECT_PANEL_VIEWPORT_PADDING=8,e.SMALL_STEP=vn,e.ShowOnDirtyErrorStateMatcher=we,e.SidebarPositions=Ta,e.TIMEFORMAT_PLACEHOLDERS=Ca,e.TOP_LEFT_POSITION_PRIORITY=Qe,e.TOP_POSITION_PRIORITY=He,e.TOP_RIGHT_POSITION_PRIORITY=Je,e.ThemePalette=ve,e.TimeFormats=va,e.TimeParts=ba,e.TransitionCheckState=pn,e.VERSION=Ss,e.add=ee,e.countGroupLabelsBeforeOption=S,e.fadeAnimation=je,e.fadeInItems=pi,e.getMcAutocompleteMissingPanelError=G,e.getMcFormFieldMissingControlError=Y,e.getMcFormFieldYouCanNotUseCleanerInNumberInputError=H,e.getMcPopoverInvalidPositionError=pe,e.getMcSelectDynamicMultipleError=T,e.getMcSelectNonArrayValueError=A,e.getMcSelectNonFunctionValueError=R,e.getMcTooltipInvalidPositionError=he,e.getOptionScrollPosition=D,e.getPrecision=J,e.isBoolean=C,e.isDigit=Q,e.isFloat=$,e.isInt=Z,e.mcDatepickerAnimations=zn,e.mcDropdownAnimations=li,e.mcPopoverAnimations=co,e.mcPopoverScrollStrategyFactory=le,e.mcSelectAnimations=st,e.mcSelectScrollStrategyProviderFactory=V,e.mcTabsAnimations=sr,e.mcTooltipScrollStrategyFactory=ue,e.mixinColor=O,e.mixinDisabled=w,e.mixinErrorState=I,e.mixinTabIndex=k,e.normalizeSplitter=q,e.selectEvents="selectEvents",e.setMosaicValidation=B,e.setMosaicValidationForFormControl=W,e.setMosaicValidationForModelControl=z,e.throwMcDropdownInvalidPositionX=oe,e.throwMcDropdownInvalidPositionY=re,e.throwMcDropdownMissingError=ie,e.toBoolean=_,e.transformDropdown=di,e.yearsPerPage=24,e.yearsPerRow=4,e.ɵa15=hr,e.ɵa2=Ma,e.ɵa20=za,e.ɵa22=me,e.ɵa25=Dn,e.ɵa28=Vi,e.ɵa3=x,e.ɵb15=pr,e.ɵb20=Wa,e.ɵb25=En,e.ɵb28=zi,e.ɵc15=dr,e.ɵc20=$a,e.ɵc25=Pn,e.ɵc28=Wi,e.ɵd15=or,e.ɵd20=Za,e.ɵd25=Mn,e.ɵd28=Yi,e.ɵe15=rr,e.ɵe20=Qa,e.ɵe28=Bi,e.ɵf15=kr,e.ɵf20=Ja,e.ɵg15=Ir,e.ɵg20=es,e.ɵh15=Dr,e.ɵi15=Er,Object.defineProperty(e,"__esModule",{value:!0})});
|
17
|
+
this.renderer.setStyle(this.inputElement,"max-width",""),e>this.countOfSymbolsForUpdateWidth?this.renderer.setStyle(this.inputElement,"width",e*this.oneSymbolWidth+"px"):this.setDefaultInputWidth()},e.prototype.onFocus=function(){this.focused=!0,this._tagList.stateChanges.next()},e.prototype.focus=function(){this.inputElement.focus()},e.prototype.separatorKeyToSymbol=function(e){var t,n=(t={},t[a.ENTER]=/\r?\n/,t[a.TAB]=/\t/,t[a.SPACE]=/ /,t[a.COMMA]=/,/,t)[e];return n||e},e.prototype.hasControl=function(){return!!this.ngControl},e.prototype.setDefaultInputWidth=function(){this.renderer.setStyle(this.inputElement,"width","30px")},e.prototype.isSeparatorKey=function(e){return!a.hasModifierKey(e)&&this.separatorKeyCodes.indexOf(e.keyCode)>-1},e.decorators=[{type:t.Directive,args:[{selector:"input[mcTagInputFor]",exportAs:"mcTagInput, mcTagInputFor",host:{class:"mc-tag-input mc-input-element","[id]":"id","[attr.disabled]":"disabled || null","[attr.placeholder]":"placeholder || null","(keydown)":"onKeydown($event)","(blur)":"blur()","(focus)":"onFocus()","(input)":"onInput()","(paste)":"onPaste($event)"}}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:void 0,decorators:[{type:t.Inject,args:[Tr]}]},{type:l.NgControl,decorators:[{type:t.Optional},{type:t.Self}]}]},e.propDecorators={separatorKeyCodes:[{type:t.Input,args:["mcTagInputSeparatorKeyCodes"]}],tagEnd:[{type:t.Output,args:["mcTagInputTokenEnd"]}],placeholder:[{type:t.Input}],id:[{type:t.Input}],tagList:[{type:t.Input,args:["mcTagInputFor"]}],addOnBlur:[{type:t.Input,args:["mcTagInputAddOnBlur"]}],disabled:[{type:t.Input}]},e}(),Xr={separatorKeyCodes:[a.ENTER]},qr=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,h.PlatformModule],exports:[Kr,jr,Gr,Fr,Vr,Br],declarations:[Kr,jr,Gr,Fr,Vr,Br],providers:[{provide:Tr,useValue:Xr}]}]}],e}(),$r=0,Zr=function(){function e(e,t){this.source=e,this.value=t}return e}(),Qr=function(){function e(e,t,n,i,o){this.elementRef=e,this.defaultErrorStateMatcher=t,this.parentForm=n,this.parentFormGroup=i,this.ngControl=o}return e}(),Jr=k(w(I(Qr))),ea=function(){function e(e){this.searchChangesSubscription=new o.Subscription,this.isSearchChanged=!1,e.canCleanerClearByEsc=!1}return e.prototype.focus=function(){this.input.focus()},e.prototype.reset=function(){this.input.ngControl.reset()},e.prototype.ngAfterContentInit=function(){var e=this;if(!this.input)throw Error("McSelectSearch does not work without mcInput");if(!this.input.ngControl)throw Error("McSelectSearch does not work without ngControl");Promise.resolve().then(function(){e.searchChangesSubscription=e.input.ngControl.valueChanges.subscribe(function(){e.isSearchChanged=!0})})},e.prototype.ngOnDestroy=function(){this.searchChangesSubscription.unsubscribe()},e.prototype.handleKeydown=function(e){e.keyCode===a.ESCAPE&&this.input.value&&(this.reset(),e.stopPropagation()),[a.SPACE,a.HOME,a.END].some(function(t){return t===e.keyCode})&&e.stopPropagation()},e.decorators=[{type:t.Directive,args:[{selector:"[mcSelectSearch]",exportAs:"mcSelectSearch",host:{"(keydown)":"handleKeydown($event)"}}]}],e.ctorParameters=function(){return[{type:Rt}]},e.propDecorators={input:[{type:t.ContentChild,args:[In,{static:!1}]}]},e}(),ta=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"[mc-select-search-empty-result]",exportAs:"mcSelectSearchEmptyResult"}]}],e}(),na=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-select-trigger"}]}],e}(),ia=function(e){function r(n,i,r,a,s,c,l,p,d,u,h,g,f,y,b,v,C){var _=e.call(this,c,s,d,u,g)||this;return _._viewportRuler=n,_._changeDetectorRef=i,_._ngZone=r,_._renderer=a,_.rawValidators=l,_._dir=p,_._parentFormField=h,_.ngModel=f,_.formControlName=y,_._scrollStrategyFactory=v,_.mcValidation=C,_.controlType="mc-select",_.hiddenItems=0,_.triggerFontSize=0,_.previousSelectionModelSelected=[],_.transformOrigin="top",_.panelDoneAnimating=!1,_.panelDoneAnimatingStream=new o.Subject,_.scrollStrategy=_._scrollStrategyFactory(),_.offsetY=0,_.positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"}],_.hiddenItemsText="...ещё",_.optionSelectionChanges=o.defer(function(){return _.options?o.merge.apply(void 0,_.options.map(function(e){return e.onSelectionChange}).concat(_.selectionModel.selected.map(function(e){return e.onSelectionChange}))):_._ngZone.onStable.asObservable().pipe(m.take(1),m.switchMap(function(){return _.optionSelectionChanges}))}),_.openedChange=new t.EventEmitter,_.openedStream=_.openedChange.pipe(m.filter(function(e){return e}),m.map(function(){})),_.closedStream=_.openedChange.pipe(m.filter(function(e){return!e}),m.map(function(){})),_.selectionChange=new t.EventEmitter,_.valueChange=new t.EventEmitter,_._required=!1,_._multiple=!1,_._focused=!1,_._panelOpen=!1,_.scrollTop=0,_.uid="mc-select-"+$r++,_.destroy=new o.Subject,_.onChange=function(){},_.onTouched=function(){},_._compareWith=function(e,t){return e===t},_.ngControl&&(_.ngControl.valueAccessor=_),_.tabIndex=parseInt(b)||0,_.id=_.id,_}return v(r,e),Object.defineProperty(r.prototype,"placeholder",{get:function(){return this._placeholder},set:function(e){this._placeholder=e,this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"required",{get:function(){return this._required},set:function(e){this._required=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"multiple",{get:function(){return this._multiple},set:function(e){if(this.selectionModel)throw T();this._multiple=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"compareWith",{get:function(){return this._compareWith},set:function(e){if("function"!=typeof e)throw R();this._compareWith=e,this.selectionModel&&this.initializeSelection()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"value",{get:function(){return this._value},set:function(e){e!==this._value&&(this.writeValue(e),this._value=e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"id",{get:function(){return this._id},set:function(e){this._id=e||this.uid,this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"focused",{get:function(){return this._focused||this._panelOpen},set:function(e){this._focused=e},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"panelOpen",{get:function(){return this._panelOpen},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isEmptySearchResult",{get:function(){return this.search&&0===this.options.length&&!!this.search.input.value},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"canShowCleaner",{get:function(){return this.cleaner&&this.selectionModel.hasValue()},enumerable:!0,configurable:!0}),r.prototype.ngOnInit=function(){var e=this;this.selectionModel=new g.SelectionModel(this.multiple),this.stateChanges.next(),this.panelDoneAnimatingStream.pipe(m.distinctUntilChanged(),m.takeUntil(this.destroy)).subscribe(function(){e.panelOpen?(e.scrollTop=0,e.openedChange.emit(!0)):(e.openedChange.emit(!1),e.panelDoneAnimating=!1,e.overlayDir.offsetX=0,e._changeDetectorRef.markForCheck())})},r.prototype.ngAfterContentInit=function(){var e=this;this.mcValidation.useValidation&&B(this),this.initKeyManager(),this.selectionModel.changed.pipe(m.takeUntil(this.destroy)).subscribe(function(e){e.added.forEach(function(e){return e.select()}),e.removed.forEach(function(e){return e.deselect()})}),this.options.changes.pipe(m.startWith(null),m.takeUntil(this.destroy)).subscribe(function(){e.resetOptions(),e.initializeSelection()})},r.prototype.ngAfterViewInit=function(){var e=this;this.tags.changes.subscribe(function(){setTimeout(function(){return e.calculateHiddenItems()},0)})},r.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState()},r.prototype.ngOnChanges=function(e){e.disabled&&this.stateChanges.next()},r.prototype.ngOnDestroy=function(){this.destroy.next(),this.destroy.complete(),this.stateChanges.complete()},r.prototype.hiddenItemsTextFormatter=function(e,t){return e+" "+t},r.prototype.clearValue=function(e){e.stopPropagation(),this.selectionModel.clear(),this.keyManager.setActiveItem(-1),this.propagateChanges()},r.prototype.resetSearch=function(){this.search&&(this.search.reset(),this.search.isSearchChanged=!1)},r.prototype.toggle=function(){this.panelOpen?this.close():this.open()},r.prototype.open=function(){var e=this;!this.disabled&&this.options&&this.options.length&&!this._panelOpen&&(this.triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this.triggerFontSize=parseInt(getComputedStyle(this.trigger.nativeElement)["font-size"]),this._panelOpen=!0,this.keyManager.withHorizontalOrientation(null),this.highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this._ngZone.onStable.asObservable().pipe(m.take(1)).subscribe(function(){e.triggerFontSize&&e.overlayDir.overlayRef&&e.overlayDir.overlayRef.overlayElement&&(e.overlayDir.overlayRef.overlayElement.style.fontSize=e.triggerFontSize+"px")}))},r.prototype.close=function(){this._panelOpen&&(this.resetSearch(),this._panelOpen=!1,this.keyManager.withHorizontalOrientation(this.isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this.onTouched())},r.prototype.writeValue=function(e){this.options&&this.setSelectionByValue(e)},r.prototype.registerOnChange=function(e){this.onChange=e},r.prototype.registerOnTouched=function(e){this.onTouched=e},r.prototype.setDisabledState=function(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()},Object.defineProperty(r.prototype,"selected",{get:function(){return this.multiple?this.selectionModel.selected:this.selectionModel.selected[0]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"triggerValue",{get:function(){return this.empty?"":this.selectionModel.selected[0].viewValue},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"triggerValues",{get:function(){if(this.empty)return[];var e=this.selectionModel.selected;return this.isRtl()&&e.reverse(),e},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"empty",{get:function(){return!this.selectionModel||this.selectionModel.isEmpty()},enumerable:!0,configurable:!0}),r.prototype.isRtl=function(){return!!this._dir&&"rtl"===this._dir.value},r.prototype.handleKeydown=function(e){this.disabled||(this.panelOpen?this.handleOpenKeydown(e):this.handleClosedKeydown(e))},r.prototype.onFadeInDone=function(){this.panelDoneAnimating=this.panelOpen,this._changeDetectorRef.markForCheck(),this.search&&this._panelOpen&&this.search.focus()},r.prototype.onFocus=function(){this.disabled||(this._focused=!0,this.stateChanges.next())},r.prototype.onBlur=function(){this._focused=!1,this.disabled||this.panelOpen||(this.onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())},r.prototype.onAttached=function(){var e=this;this.overlayDir.positionChange.pipe(m.take(1)).subscribe(function(){e._changeDetectorRef.detectChanges(),e.calculateOverlayOffsetX(),e.optionsContainer.nativeElement.scrollTop=e.scrollTop,e.updateScrollSize()})},r.prototype.getPanelTheme=function(){return this._parentFormField?"mc-"+this._parentFormField.color:""},r.prototype.focus=function(){this.elementRef.nativeElement.focus()},r.prototype.onContainerClick=function(){this.focus(),this.open()},r.prototype.onRemoveMatcherItem=function(e,t){t.stopPropagation(),e.deselect()},r.prototype.calculateHiddenItems=function(){var e=this;if(!this.customTrigger&&!this.empty&&this.multiple){var t=0,n=this.getTotalItemsWidthInMatcher(),i=0;if(this.tags.forEach(function(n){n.nativeElement.offsetTop<n.nativeElement.offsetHeight&&(i+=e.getItemWidth(n.nativeElement),t++)}),this.hiddenItems=this.selected.length-t,this.hiddenItems){var o=this.trigger.nativeElement.querySelector(".mc-select__match-hidden-text"),r=this.trigger.nativeElement.querySelector(".mc-select__match-list"),a=o.offsetTop<o.offsetHeight,s=r.getBoundingClientRect().width,c=s+86;if(a&&n<c&&(this.hiddenItems=0),i===s||i+86<s)return void this._changeDetectorRef.markForCheck();!a&&n+86>c&&this.hiddenItems++}this._changeDetectorRef.markForCheck()}},r.prototype.getItemHeight=function(){return this.options.first?this.options.first.getHeight():0},r.prototype.getHeightOfOptionsContainer=function(){return this.optionsContainer.nativeElement.getClientRects()[0].height},r.prototype.updateScrollSize=function(){this.options.first&&this.keyManager.withScrollSize(Math.floor(this.getHeightOfOptionsContainer()/this.options.first.getHeight()))},r.prototype.getTotalItemsWidthInMatcher=function(){var e=this,t=this.trigger.nativeElement.cloneNode(!0);t.querySelector(".mc-select__match-hidden-text").remove(),this._renderer.setStyle(t,"position","absolute"),this._renderer.setStyle(t,"visibility","hidden"),this._renderer.setStyle(t,"top","-100%"),this._renderer.setStyle(t,"left","0"),this._renderer.appendChild(this.trigger.nativeElement,t);var n=0;return t.querySelectorAll("mc-tag").forEach(function(t){n+=e.getItemWidth(t)}),t.remove(),n},r.prototype.getItemWidth=function(e){var t=window.getComputedStyle(e);return parseInt(t.width)+parseInt(t.marginLeft)+parseInt(t.marginRight)},r.prototype.handleClosedKeydown=function(e){var t=e.keyCode,n=t===a.DOWN_ARROW||t===a.UP_ARROW||t===a.LEFT_ARROW||t===a.RIGHT_ARROW;t===a.ENTER||t===a.SPACE||(this.multiple||e.altKey)&&n?(e.preventDefault(),this.open()):this.multiple||this.keyManager.onKeydown(e)},r.prototype.handleOpenKeydown=function(e){var t=e.keyCode,n=t===a.DOWN_ARROW||t===a.UP_ARROW,i=this.keyManager;if(n&&e.altKey)e.preventDefault(),this.close();else if(t===a.HOME)e.preventDefault(),i.setFirstItemActive();else if(t===a.END)e.preventDefault(),i.setLastItemActive();else if(t===a.PAGE_UP)e.preventDefault(),i.setPreviousPageItemActive();else if(t===a.PAGE_DOWN)e.preventDefault(),i.setNextPageItemActive();else if(t!==a.ENTER&&t!==a.SPACE||!i.activeItem)if(this._multiple&&t===a.A&&e.ctrlKey){e.preventDefault();var o=this.options.some(function(e){return!e.selected});this.options.forEach(function(e){o&&!e.disabled?e.select():e.deselect()})}else{var r=i.activeItemIndex;i.onKeydown(e),this._multiple&&n&&e.shiftKey&&i.activeItem&&i.activeItemIndex!==r&&i.activeItem.selectViaInteraction(),this.search&&this.search.focus()}else e.preventDefault(),i.activeItem.selectViaInteraction()},r.prototype.initializeSelection=function(){var e=this;Promise.resolve().then(function(){e.setSelectionByValue(e.ngControl?e.ngControl.value:e._value)})},r.prototype.setSelectionByValue=function(e){var t=this;if(this.previousSelectionModelSelected=this.selectionModel.selected,this.multiple&&e){if(!Array.isArray(e))throw A();this.selectionModel.clear(),e.forEach(function(e){return t.selectValue(e)}),this.sortValues()}else{this.selectionModel.clear();var n=this.selectValue(e);n&&this.keyManager.setActiveItem(n)}this._changeDetectorRef.markForCheck()},r.prototype.getCorrespondOption=function(e){var n=this;return this.options.toArray().concat(this.previousSelectionModelSelected).find(function(i){try{return null!=i.value&&n.compareWith(i.value,e)}catch(e){return t.isDevMode()&&console.warn(e),!1}})},r.prototype.selectValue=function(e){var t=this.getCorrespondOption(e);return t&&this.selectionModel.select(t),t},r.prototype.initKeyManager=function(){var e=this;this.keyManager=new p.ActiveDescendantKeyManager(this.options).withTypeAhead(200,this.search?-1:0).withVerticalOrientation().withHorizontalOrientation(this.isRtl()?"rtl":"ltr"),this.keyManager.tabOut.pipe(m.takeUntil(this.destroy)).subscribe(function(){e.focus(),e.close()}),this.keyManager.change.pipe(m.takeUntil(this.destroy)).subscribe(function(){e._panelOpen&&e.panel?e.scrollActiveOptionIntoView():e._panelOpen||e.multiple||!e.keyManager.activeItem||e.keyManager.activeItem.selectViaInteraction()})},r.prototype.resetOptions=function(){var e=this,t=o.merge(this.options.changes,this.destroy);this.optionSelectionChanges.pipe(m.takeUntil(t)).subscribe(function(t){e.onSelect(t.source,t.isUserInput),e.search&&e.search.isSearchChanged&&(Promise.resolve().then(function(){return e.keyManager.updateActiveItem(0)}),e.search.isSearchChanged=!1),t.isUserInput&&!e.multiple&&e._panelOpen&&(e.close(),e.focus())}),o.merge.apply(void 0,this.options.map(function(e){return e.stateChanges})).pipe(m.takeUntil(t)).subscribe(function(){e._changeDetectorRef.markForCheck(),e.stateChanges.next()})},r.prototype.onSelect=function(e,t){var n=this.selectionModel.isSelected(e);null!=e.value||this._multiple?(e.selected?this.selectionModel.select(e):this.selectionModel.deselect(e),t&&this.keyManager.setActiveItem(e),this.multiple&&(this.sortValues(),t&&(this.search?this.search.focus():this.focus()))):(e.deselect(),this.selectionModel.clear(),this.propagateChanges(e.value)),n!==this.selectionModel.isSelected(e)&&this.propagateChanges(),this.stateChanges.next()},r.prototype.sortValues=function(){var e=this;if(this.multiple){var t=this.options.toArray();this.selectionModel.sort(function(n,i){return e.sortComparator?e.sortComparator(n,i,t):t.indexOf(n)-t.indexOf(i)}),this.stateChanges.next()}},r.prototype.propagateChanges=function(e){var t=null;t=this.multiple?this.selected.map(function(e){return e.value}):this.selected?this.selected.value:e,this._value=t,this.valueChange.emit(t),this.onChange(t),this.selectionChange.emit(new Zr(this,t)),this._changeDetectorRef.markForCheck()},r.prototype.highlightCorrectOption=function(){this.keyManager&&(this.empty?this.keyManager.setFirstItemActive():this.keyManager.setActiveItem(this.selectionModel.selected[0]))},r.prototype.scrollActiveOptionIntoView=function(){var e=this.keyManager.activeItemIndex||0,t=S(e,this.options,this.optionGroups);this.optionsContainer.nativeElement.scrollTop=D(e+t,this.getItemHeight(),this.optionsContainer.nativeElement.scrollTop,224)},r.prototype.calculateOverlayOffsetX=function(){var e,t=this.overlayDir.overlayRef.overlayElement.getBoundingClientRect(),n=this._viewportRuler.getViewportSize(),i=this.isRtl(),o=this.selectionModel.selected[0]||this.options.first;e=o&&o.group?2:1,i||(e*=-1);var r=0-(t.left+e-(i?2:0)),a=t.right+e-n.width+(i?0:2);r>0?e+=r+8:a>0&&(e-=a+8),this.overlayDir.offsetX=Math.round(e),this.overlayDir.overlayRef.updatePosition()},r.decorators=[{type:t.Component,args:[{selector:"mc-select",exportAs:"mcSelect",template:'<div cdk-overlay-origin class="mc-select__trigger" (click)="toggle()" [class.mc-select__trigger_multiple]="multiple" #origin="cdkOverlayOrigin" #trigger><div class="mc-select__matcher" [ngSwitch]="empty"><span class="mc-select__placeholder" *ngSwitchCase="true">{{ placeholder || \' \' }}</span> <span *ngSwitchCase="false" [ngSwitch]="!!customTrigger"><div *ngSwitchDefault [ngSwitch]="multiple" class="mc-select__match-container"><span *ngSwitchCase="false" class="mc-select__matcher-text">{{ triggerValue }}</span><div *ngSwitchCase="true" class="mc-select__match-list"><mc-tag *ngFor="let option of triggerValues" [disabled]="disabled" [selectable]="false" [class.mc-error]="errorState">{{ option.viewValue }} <i mc-icon="mc-close-S_16" (click)="onRemoveMatcherItem(option, $event)"></i></mc-tag></div><div class="mc-select__match-hidden-text" [style.display]="hiddenItems > 0 ? \'block\' : \'none\'">{{ hiddenItemsTextFormatter(hiddenItemsText, hiddenItems) }}</div></div><ng-content select="mc-select-trigger" *ngSwitchCase="true"></ng-content></span></div><div class="mc-select__cleaner" *ngIf="canShowCleaner" (click)="clearValue($event)"><ng-content select="mc-cleaner"></ng-content></div><div class="mc-select__arrow-wrapper"><i class="mc-select__arrow" mc-icon="mc-angle-down-L_16" color="second"></i></div></div><ng-template cdk-connected-overlay cdkConnectedOverlayLockPosition cdkConnectedOverlayHasBackdrop cdkConnectedOverlayBackdropClass="cdk-overlay-transparent-backdrop" [cdkConnectedOverlayScrollStrategy]="scrollStrategy" [cdkConnectedOverlayOrigin]="origin" [cdkConnectedOverlayOpen]="panelOpen" [cdkConnectedOverlayPositions]="positions" [cdkConnectedOverlayMinWidth]="triggerRect?.width" [cdkConnectedOverlayOffsetY]="offsetY" (backdropClick)="close()" (attach)="onAttached()" (detach)="close()"><div #panel class="mc-select__panel {{ getPanelTheme() }}" [ngClass]="panelClass" (@transformPanel.done)="panelDoneAnimatingStream.next($event.toState)" [style.transformOrigin]="transformOrigin" [class.mc-select-panel-done-animcing]="panelDoneAnimating" [style.font-size.px]="triggerFontSize" (keydown)="handleKeydown($event)"><div *ngIf="search" class="mc-select__search-container"><ng-content select="[mcSelectSearch]"></ng-content></div><div #optionsContainer class="mc-select__content" [@fadeInContent]="\'showing\'" (@fadeInContent.done)="onFadeInDone()"><div *ngIf="isEmptySearchResult" class="mc-select__no-options-message"><ng-content select="[mc-select-search-empty-result]"></ng-content></div><ng-content select="mc-option,mc-optgroup"></ng-content></div></div></ng-template>',styles:[".mc-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mc-divider.mc-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mc-divider.mc-divider-inset{margin-left:80px}[dir=rtl] .mc-divider.mc-divider-inset{margin-left:auto;margin-right:80px}.mc-select{box-sizing:border-box;display:inline-block;vertical-align:top;width:100%;outline:0}.mc-select.mc-disabled .mc-select__trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mc-select__no-options-message{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;position:relative;max-width:100%;height:32px;cursor:default;outline:0;padding:0 16px}.mc-select__trigger{display:flex;box-sizing:border-box;position:relative;height:30px;cursor:pointer;padding-right:7px;padding-left:15px}.mc-select__trigger.mc-select__trigger_multiple{padding-left:7px}.mc-select__matcher{display:flex;align-items:center;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mc-select__matcher>span{width:100%}.mc-select__match-list{display:flex;flex-wrap:wrap;overflow:hidden;max-height:28px;margin:0;padding-left:0}.mc-select__match-list .mc-tag{margin-right:4px}.mc-select__match-container{display:flex;flex-direction:row;justify-content:space-between;width:100%}.mc-select__match-container .mc-select__match-hidden-text{flex:0 0 70px;align-self:center;padding:0 8px;text-align:right}.mc-select__match-item{display:flex;border:1px solid transparent;border-radius:3px;padding-left:7px;margin-right:4px;max-width:100%}.mc-select__arrow-wrapper{align-self:center}.mc-form-field-appearance-fill .mc-select__arrow-wrapper,.mc-form-field-appearance-standard .mc-select__arrow-wrapper{transform:translateY(-50%)}.mc-form-field-appearance-outline .mc-select__arrow-wrapper{transform:translateY(-25%)}.mc-select__panel{min-width:100%;overflow:hidden;border-width:1px;border-style:solid;border-bottom-left-radius:3px;border-bottom-right-radius:3px;padding:4px 0}.mc-select__content{max-height:224px;overflow:auto}.mc-select__panel .mc-optgroup-label,.mc-select__panel .mc-option{font-size:inherit;line-height:32px;height:32px}.mc-form-field-type-mc-select:not(.mc-disabled) .mc-form-field-flex{cursor:pointer}.mc-form-field-type-mc-select .mc-form-field-label{width:calc(100% - 18px)}"],inputs:["disabled"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,host:{"[attr.id]":"id","[tabindex]":"tabIndex",class:"mc-select","[class.mc-disabled]":"disabled","[class.mc-select-invalid]":"errorState","(keydown)":"handleKeydown($event)","(focus)":"onFocus()","(blur)":"onBlur()","(window:resize)":"calculateHiddenItems()"},animations:[st.transformPanel,st.fadeInContent],providers:[{provide:kt,useExisting:r},{provide:Ve,useExisting:r}]}]}],r.ctorParameters=function(){return[{type:c.ViewportRuler},{type:t.ChangeDetectorRef},{type:t.NgZone},{type:t.Renderer2},{type:Oe},{type:t.ElementRef},{type:Array,decorators:[{type:t.Optional},{type:t.Inject,args:[l.NG_VALIDATORS]}]},{type:n.Directionality,decorators:[{type:t.Optional}]},{type:l.NgForm,decorators:[{type:t.Optional}]},{type:l.FormGroupDirective,decorators:[{type:t.Optional}]},{type:Rt,decorators:[{type:t.Optional}]},{type:l.NgControl,decorators:[{type:t.Self},{type:t.Optional}]},{type:l.NgModel,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.FormControlName,decorators:[{type:t.Optional},{type:t.Self}]},{type:String,decorators:[{type:t.Attribute,args:["tabindex"]}]},{type:void 0,decorators:[{type:t.Inject,args:[rt]}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[bt]}]}]},r.propDecorators={trigger:[{type:t.ViewChild,args:["trigger",{static:!1}]}],panel:[{type:t.ViewChild,args:["panel",{static:!1}]}],optionsContainer:[{type:t.ViewChild,args:["optionsContainer",{static:!1}]}],overlayDir:[{type:t.ViewChild,args:[c.CdkConnectedOverlay,{static:!1}]}],tags:[{type:t.ViewChildren,args:[jr]}],customTrigger:[{type:t.ContentChild,args:[na,{static:!1}]}],cleaner:[{type:t.ContentChild,args:["mcSelectCleaner",{static:!0}]}],options:[{type:t.ContentChildren,args:[Fe,{descendants:!0}]}],optionGroups:[{type:t.ContentChildren,args:[Te]}],search:[{type:t.ContentChild,args:[ea,{static:!1}]}],hiddenItemsText:[{type:t.Input}],panelClass:[{type:t.Input}],errorStateMatcher:[{type:t.Input}],sortComparator:[{type:t.Input}],openedChange:[{type:t.Output}],openedStream:[{type:t.Output,args:["opened"]}],closedStream:[{type:t.Output,args:["closed"]}],selectionChange:[{type:t.Output}],valueChange:[{type:t.Output}],placeholder:[{type:t.Input}],required:[{type:t.Input}],multiple:[{type:t.Input}],compareWith:[{type:t.Input}],value:[{type:t.Input}],id:[{type:t.Input}],hiddenItemsTextFormatter:[{type:t.Input}]},r}(Jr),oa=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,c.OverlayModule,Le,wt,qr],exports:[Ft,ia,ea,ta,na,Le,r.CommonModule],declarations:[ia,ea,ta,na],providers:[at]}]}],e}(),ra=0,aa=function(){function e(e,t,n){void 0===n&&(n=!1),this.source=e,this.value=t,this.isUserInput=n}return e}(),sa=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-tree-select-trigger"}]}],e}(),ca=function(){function e(e,t,n,i,o){this.elementRef=e,this.defaultErrorStateMatcher=t,this.parentForm=n,this.parentFormGroup=i,this.ngControl=o}return e}(),la=k(w(I(ca))),pa=function(e){function r(n,i,r,a,s,c,l,p,d,u,h,g,f,y,b,v,C){var _=e.call(this,n,c,g,f,b)||this;return _.changeDetectorRef=i,_.viewportRuler=r,_.ngZone=a,_.renderer=s,_.scrollStrategyFactory=p,_.rawValidators=d,_.mcValidation=u,_.dir=h,_.parentFormField=y,_.ngModel=v,_.formControlName=C,_.controlType="mc-select",_.hiddenItems=0,_.triggerFontSize=0,_.transformOrigin="top",_.panelDoneAnimating=!1,_.panelDoneAnimatingStream=new o.Subject,_.scrollStrategy=_.scrollStrategyFactory(),_.offsetY=0,_.positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"}],_.hiddenItemsText="...ещё",_.openedChange=new t.EventEmitter,_.openedStream=_.openedChange.pipe(m.filter(function(e){return e}),m.map(function(){})),_.closedStream=_.openedChange.pipe(m.filter(function(e){return!e}),m.map(function(){})),_.selectionChange=new t.EventEmitter,_.valueChange=new t.EventEmitter,_.optionSelectionChanges=o.defer(function(){return _.options?o.merge.apply(void 0,_.options.map(function(e){return e.onSelectionChange})):_.ngZone.onStable.asObservable().pipe(m.take(1),m.switchMap(function(){return _.optionSelectionChanges}))}),_._required=!1,_._multiple=!1,_._autoSelect=!0,_._value=null,_._focused=!1,_._panelOpen=!1,_.scrollTop=0,_.uid="mc-select-"+ra++,_.destroy=new o.Subject,_.onChange=function(){},_.onTouched=function(){},_._compareWith=function(e,t){return e===t},_.ngControl&&(_.ngControl.valueAccessor=_),_.tabIndex=parseInt(l)||0,_.id=_.id,_}return v(r,e),Object.defineProperty(r.prototype,"placeholder",{get:function(){return this._placeholder},set:function(e){this._placeholder=e,this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"required",{get:function(){return this._required},set:function(e){this._required=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"multiple",{get:function(){return this._multiple},set:function(e){if(this.selectionModel)throw T();this._multiple=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"autoSelect",{get:function(){return!this.multiple&&this._autoSelect},set:function(e){this._autoSelect=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"compareWith",{get:function(){return this._compareWith},set:function(e){if("function"!=typeof e)throw R();this._compareWith=e,this.selectionModel&&this.initializeSelection()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"value",{get:function(){return this.multiple?this.tree.getSelectedValues():this.tree.getSelectedValues()[0]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"id",{get:function(){return this._id},set:function(e){this._id=e||this.uid,this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"focused",{get:function(){return this._focused||this._panelOpen},set:function(e){this._focused=e},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"panelOpen",{get:function(){return this._panelOpen},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"canShowCleaner",{get:function(){return this.cleaner&&this.selectionModel.hasValue()},enumerable:!0,configurable:!0}),r.prototype.ngOnInit=function(){var e=this;this.stateChanges.next(),this.panelDoneAnimatingStream.pipe(m.distinctUntilChanged(),m.takeUntil(this.destroy)).subscribe(function(){e.panelOpen?(e.scrollTop=0,e.openedChange.emit(!0)):(e.openedChange.emit(!1),e.panelDoneAnimating=!1,e.overlayDir.offsetX=0,e.changeDetectorRef.markForCheck())})},r.prototype.ngAfterContentInit=function(){var e=this;this.tree&&(this.mcValidation.useValidation&&B(this),this.tree.resetFocusedItemOnBlur=!1,this.selectionModel=this.tree.selectionModel=new g.SelectionModel(this.multiple),this.tree.ngAfterContentInit(),this.initKeyManager(),this.options=this.tree.renderedOptions,this.tree.autoSelect=this.autoSelect,null===this.tree.multipleMode&&(this.tree.multipleMode=this.multiple?Ie.CHECKBOX:null),this.multiple&&(this.tree.noUnselectLast=!1),this.tempValues&&(this.setSelectionByValue(this.tempValues),this.tempValues=null),this.optionSelectionChanges.pipe(m.takeUntil(this.destroy)).subscribe(function(t){!e.multiple&&e.panelOpen&&t.isUserInput&&e.close()}),this.tree.selectionChange.pipe(m.takeUntil(this.destroy)).subscribe(function(t){e.onChange(e.selectedValues),e.selectionChange.emit(new aa(e,t.option))}),this.selectionModel.changed.pipe(m.takeUntil(this.destroy)).subscribe(function(t){t.added.length&&(e.tree.keyManager.setFocusOrigin("program"),e.tree.keyManager.setActiveItem(e.options.find(function(e){return e.data===t.added[0]})))}))},r.prototype.ngAfterViewInit=function(){var e=this;this.tree&&(this.tags.changes.subscribe(function(){setTimeout(function(){return e.calculateHiddenItems()},0)}),setTimeout(function(){return e.calculateHiddenItems()},0))},r.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState()},r.prototype.ngOnChanges=function(e){e.disabled&&this.stateChanges.next()},r.prototype.ngOnDestroy=function(){this.destroy.next(),this.destroy.complete(),this.stateChanges.complete()},r.prototype.hiddenItemsTextFormatter=function(e,t){return e+" "+t},r.prototype.clearValue=function(e){e.stopPropagation(),this.selectionModel.clear(),
|
18
|
+
this.tree.keyManager.setActiveItem(-1),this.setSelectionByValue([]),this.onChange(this.selectedValues)},r.prototype.toggle=function(){this.panelOpen?this.close():this.open()},r.prototype.open=function(){var e=this;!this.disabled&&this.options&&this.options.length&&!this._panelOpen&&(this.triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this.triggerFontSize=parseInt(getComputedStyle(this.trigger.nativeElement)["font-size"]),this._panelOpen=!0,setTimeout(function(){return e.highlightCorrectOption()}),this.changeDetectorRef.markForCheck(),this.ngZone.onStable.asObservable().pipe(m.take(1)).subscribe(function(){e.triggerFontSize&&e.overlayDir.overlayRef&&e.overlayDir.overlayRef.overlayElement&&(e.overlayDir.overlayRef.overlayElement.style.fontSize=e.triggerFontSize+"px")}))},r.prototype.close=function(){var e=this;this._panelOpen&&(this._panelOpen=!1,this.changeDetectorRef.markForCheck(),this.onTouched(),setTimeout(function(){return e.focus()},0))},r.prototype.writeValue=function(e){this.tree?this.setSelectionByValue(e):this.tempValues=e},r.prototype.registerOnChange=function(e){this.onChange=e},r.prototype.registerOnTouched=function(e){this.onTouched=e},r.prototype.setDisabledState=function(e){this.disabled=e,this.changeDetectorRef.markForCheck(),this.stateChanges.next()},Object.defineProperty(r.prototype,"selected",{get:function(){return this.multiple?this.selectionModel.selected:this.selectionModel.selected[0]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"selectedValues",{get:function(){var e=this,t=this.selectionModel.selected.map(function(t){return e.tree.treeControl.getValue(t)});return this.multiple?t:t[0]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"triggerValue",{get:function(){return this.empty?"":this.tree.treeControl.getViewValue(this.selected)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"triggerValues",{get:function(){return this.empty?[]:this.selected},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"empty",{get:function(){return!this.selectionModel||this.selectionModel.isEmpty()},enumerable:!0,configurable:!0}),r.prototype.isRtl=function(){return!!this.dir&&"rtl"===this.dir.value},r.prototype.handleKeydown=function(e){this.disabled||(this.panelOpen?this.handleOpenKeydown(e):this.handleClosedKeydown(e))},r.prototype.onFadeInDone=function(){this.panelDoneAnimating=this.panelOpen,this.changeDetectorRef.markForCheck()},r.prototype.onFocus=function(){this.disabled||(this._focused=!0,this.stateChanges.next())},r.prototype.onBlur=function(){this._focused=!1,this.disabled||this.panelOpen||(this.onTouched(),this.changeDetectorRef.markForCheck(),this.stateChanges.next())},r.prototype.onAttached=function(){var e=this;this.overlayDir.positionChange.pipe(m.take(1)).subscribe(function(){e.changeDetectorRef.detectChanges(),e.calculateOverlayOffsetX(),e.panel.nativeElement.scrollTop=e.scrollTop,e.tree.updateScrollSize()})},r.prototype.getPanelTheme=function(){return this.parentFormField?"mc-"+this.parentFormField.color:""},r.prototype.focus=function(){this.elementRef.nativeElement.focus()},r.prototype.onContainerClick=function(){this.focus()},r.prototype.onRemoveSelectedOption=function(e,t){t.stopPropagation(),this.disabled||(this.selectionModel.deselect(e),this.onChange(this.selectedValues))},r.prototype.calculateHiddenItems=function(){var e=this;if(!this.customTrigger&&!this.empty&&this.multiple){var t=0,n=this.getTotalItemsWidthInMatcher(),i=0;if(this.tags.forEach(function(n){n.nativeElement.offsetTop<n.nativeElement.offsetHeight&&(i+=e.getItemWidth(n.nativeElement),t++)}),this.hiddenItems=this.selectionModel.selected.length-t,this.hiddenItems){var o=this.trigger.nativeElement.querySelector(".mc-tree-select__match-hidden-text"),r=this.trigger.nativeElement.querySelector(".mc-tree-select__match-list"),a=o.offsetTop<o.offsetHeight,s=r.getBoundingClientRect().width,c=s+86;if(a&&n<c&&(this.hiddenItems=0),i===s||i+86<s)return void this.changeDetectorRef.markForCheck();!a&&n+86>c&&this.hiddenItems++}this.changeDetectorRef.markForCheck()}},r.prototype.getTotalItemsWidthInMatcher=function(){var e=this,t=this.trigger.nativeElement.cloneNode(!0);t.querySelector(".mc-tree-select__match-hidden-text").remove(),this.renderer.setStyle(t,"position","absolute"),this.renderer.setStyle(t,"visibility","hidden"),this.renderer.setStyle(t,"top","-100%"),this.renderer.setStyle(t,"left","0"),this.renderer.appendChild(this.trigger.nativeElement,t);var n=0;return t.querySelectorAll("mc-tag").forEach(function(t){n+=e.getItemWidth(t)}),t.remove(),n},r.prototype.getItemWidth=function(e){var t=window.getComputedStyle(e);return parseInt(t.width)+parseInt(t.marginLeft)+parseInt(t.marginRight)},r.prototype.handleClosedKeydown=function(e){var t=e.keyCode,n=t===a.DOWN_ARROW||t===a.UP_ARROW||t===a.LEFT_ARROW||t===a.RIGHT_ARROW;t===a.ENTER||t===a.SPACE||(this.multiple||e.altKey)&&n?(e.preventDefault(),this.open()):!this.multiple&&this.tree.keyManager&&this.tree.keyManager.onKeydown&&this.tree.keyManager.onKeydown(e)},r.prototype.handleOpenKeydown=function(e){var t=e.keyCode,n=t===a.DOWN_ARROW||t===a.UP_ARROW;if(n&&e.altKey)e.preventDefault(),this.close();else{if(t===a.LEFT_ARROW||t===a.RIGHT_ARROW)return this.originalOnKeyDown.call(this.tree,e);if(t===a.HOME)e.preventDefault(),this.tree.keyManager.setFirstItemActive();else if(t===a.END)e.preventDefault(),this.tree.keyManager.setLastItemActive();else if(t===a.PAGE_UP)e.preventDefault(),this.tree.keyManager.setPreviousPageItemActive();else if(t===a.PAGE_DOWN)e.preventDefault(),this.tree.keyManager.setNextPageItemActive();else if(t!==a.ENTER&&t!==a.SPACE||!this.tree.keyManager.activeItem)if(this.multiple&&t===a.A&&e.ctrlKey){e.preventDefault();var i=this.options.some(function(e){return!e.selected});this.options.forEach(function(e){i&&!e.disabled?e.select():e.deselect()})}else{var o=this.tree.keyManager.activeItemIndex;this.tree.keyManager.setFocusOrigin("keyboard"),this.tree.keyManager.onKeydown(e),this.multiple&&n&&e.shiftKey&&this.tree.keyManager.activeItem&&this.tree.keyManager.activeItemIndex!==o&&this.tree.keyManager.activeItem.selectViaInteraction(e),this.autoSelect&&this.tree.keyManager.activeItem&&this.tree.setSelectedOptionsByKey(this.tree.keyManager.activeItem,a.hasModifierKey(e,"shiftKey"),a.hasModifierKey(e,"ctrlKey"))}else e.preventDefault(),this.autoSelect?this.close():this.selectionModel.toggle(this.tree.keyManager.activeItem.data)}},r.prototype.initializeSelection=function(){var e=this;Promise.resolve().then(function(){e.setSelectionByValue(e.ngControl?e.ngControl.value:e._value)})},r.prototype.setSelectionByValue=function(e){if(this.multiple&&e){if(!Array.isArray(e))throw A();this.tree.setOptionsFromValues(e),this.sortValues()}else this.tree.setOptionsFromValues([e]);this.changeDetectorRef.detectChanges()},r.prototype.initKeyManager=function(){var e=this;this.originalOnKeyDown=this.tree.onKeyDown,this.tree.onKeyDown=function(){},this.tree.keyManager.tabOut.pipe(m.takeUntil(this.destroy)).subscribe(function(){e.focus(),e.close()}),this.tree.keyManager.change.pipe(m.takeUntil(this.destroy)).subscribe(function(){e._panelOpen&&e.panel?e.scrollActiveOptionIntoView():e._panelOpen||e.multiple||!e.tree.keyManager.activeItem||e.tree.keyManager.activeItem.selectViaInteraction()})},r.prototype.sortValues=function(){var e=this;if(this.multiple){var t=this.options.toArray();this.selectionModel.sort(function(n,i){return e.sortComparator?e.sortComparator(n,i,t):t.indexOf(n)-t.indexOf(i)}),this.stateChanges.next()}},r.prototype.highlightCorrectOption=function(){if(!this.empty&&this.tree.keyManager){var e=this.multiple?this.selectedValues[0]:this.selectedValues,t=this.options.find(function(t){return t.value===e});t&&this.tree.keyManager.setActiveItem(t)}},r.prototype.scrollActiveOptionIntoView=function(){var e=this.tree.keyManager.activeItemIndex||0;this.panel.nativeElement.scrollTop=D(e,this.tree.getItemHeight(),this.panel.nativeElement.scrollTop,224)},r.prototype.calculateOverlayOffsetX=function(){var e=this.overlayDir.overlayRef.overlayElement.getBoundingClientRect(),t=this.viewportRuler.getViewportSize(),n=this.isRtl(),i=1;n||(i*=-1);var o=0-(e.left+i-(n?2:0)),r=e.right+i-t.width+(n?0:2);o>0?i+=o+8:r>0&&(i-=r+8),this.overlayDir.offsetX=Math.round(i),this.overlayDir.overlayRef.updatePosition()},r.decorators=[{type:t.Component,args:[{selector:"mc-tree-select",exportAs:"mcTreeSelect",template:'<div cdk-overlay-origin class="mc-tree-select__trigger" [class.mc-tree-select__trigger_multiple]="multiple" #origin="cdkOverlayOrigin" #trigger><div class="mc-tree-select__matcher" [ngSwitch]="empty"><span class="mc-tree-select__placeholder" *ngSwitchCase="true">{{ placeholder || \' \' }}</span> <span *ngSwitchCase="false" [ngSwitch]="!!customTrigger"><div *ngSwitchDefault [ngSwitch]="multiple" class="mc-tree-select__match-container"><span *ngSwitchCase="false" class="mc-tree-select__matcher-text">{{ triggerValue }}</span><div *ngSwitchCase="true" class="mc-tree-select__multiple-matcher"><div class="mc-tree-select__match-list"><mc-tag *ngFor="let option of triggerValues" [selectable]="false" [disabled]="disabled" [class.mc-error]="errorState">{{ tree.treeControl.getViewValue(option) }} <i mc-icon="mc-close-S_16" (click)="onRemoveSelectedOption(option, $event)"></i></mc-tag></div><div class="mc-tree-select__match-hidden-text" [style.display]="hiddenItems > 0 ? \'block\' : \'none\'" #hiddenItemsCounter>{{ hiddenItemsTextFormatter(hiddenItemsText, hiddenItems) }}</div></div></div><ng-content select="mc-tree-select-trigger" *ngSwitchCase="true"></ng-content></span></div><div class="mc-select__cleaner" *ngIf="canShowCleaner" (click)="clearValue($event)"><ng-content select="mc-cleaner"></ng-content></div><div class="mc-tree-select__arrow-wrapper"><i class="mc-tree-select__arrow" mc-icon="mc-angle-down-L_16" color="second"></i></div></div><ng-template cdk-connected-overlay cdkConnectedOverlayLockPosition cdkConnectedOverlayHasBackdrop cdkConnectedOverlayBackdropClass="cdk-overlay-transparent-backdrop" [cdkConnectedOverlayScrollStrategy]="scrollStrategy" [cdkConnectedOverlayOrigin]="origin" [cdkConnectedOverlayOpen]="panelOpen" [cdkConnectedOverlayPositions]="positions" [cdkConnectedOverlayMinWidth]="triggerRect?.width" [cdkConnectedOverlayOffsetY]="offsetY" (backdropClick)="close()" (attach)="onAttached()" (detach)="close()"><div #panel class="mc-tree-select__panel {{ getPanelTheme() }}" [ngClass]="panelClass" (@transformPanel.done)="panelDoneAnimatingStream.next($event.toState)" [style.transformOrigin]="transformOrigin" [class.mc-select-panel-done-animcing]="panelDoneAnimating" [style.font-size.px]="triggerFontSize" (keydown)="handleKeydown($event)"><div #optionsContainer class="mc-tree-select__content" [@fadeInContent]="\'showing\'" (@fadeInContent.done)="onFadeInDone()"><ng-content select="mc-tree-selection"></ng-content></div></div></ng-template>',styles:[".mc-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mc-divider.mc-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mc-divider.mc-divider-inset{margin-left:80px}[dir=rtl] .mc-divider.mc-divider-inset{margin-left:auto;margin-right:80px}.mc-tree-selection{display:block}.mc-tree-option{display:flex;align-items:center;height:28px;word-wrap:break-word;border:2px solid transparent}.mc-tree-option>.mc-icon{margin-right:4px;cursor:pointer}.mc-tree-option:focus{outline:0}.mc-tree-option:not([disabled]){cursor:pointer}.mc-tree-option .mc-pseudo-checkbox{margin-right:8px}.mc-tree-node-toggle{margin-right:4px}.mc-tree-node-toggle .mc-icon{transform:rotate(-90deg)}.mc-tree-node-toggle.mc-opened .mc-icon{transform:rotate(0)}.mc-tree-node-toggle.mc-disabled{cursor:default}.mc-tree-select{box-sizing:border-box;display:inline-block;vertical-align:top;width:100%;outline:0}.mc-tree-select.mc-disabled .mc-tree-select__trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mc-tree-select__trigger{display:flex;box-sizing:border-box;position:relative;height:30px;cursor:pointer;padding-right:7px;padding-left:15px}.mc-tree-select__trigger.mc-tree-select__trigger_multiple{padding-left:7px}.mc-tree-select__trigger.mc-tree-select__trigger_multiple .mc-tree-select__placeholder{margin-left:8px}.mc-tree-select__matcher{display:flex;align-items:center;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mc-tree-select__matcher>span{width:100%}.mc-tree-select__multiple-matcher{display:flex;width:100%}.mc-tree-select__match-list{display:flex;flex-wrap:wrap;overflow:hidden;max-height:28px;margin:0;padding-left:0}.mc-tree-select__match-list .mc-tag{margin-right:4px}.mc-tree-select__match-container{display:flex;flex-direction:row;justify-content:space-between;width:100%}.mc-tree-select__match-container .mc-tree-select__match-hidden-text{flex:0 0 70px;align-self:center;padding:0 8px;text-align:right}.mc-tree-select__match-item{display:flex;border:1px solid transparent;border-radius:3px;padding-left:7px;margin-right:4px;max-width:100%}.mc-tree-select__arrow-wrapper{align-self:center}.mc-form-field-appearance-fill .mc-tree-select__arrow-wrapper,.mc-form-field-appearance-standard .mc-tree-select__arrow-wrapper{transform:translateY(-50%)}.mc-form-field-appearance-outline .mc-tree-select__arrow-wrapper{transform:translateY(-25%)}.mc-tree-select__panel{max-height:224px;min-width:100%;overflow:auto;border-width:1px;border-style:solid;border-bottom-left-radius:3px;border-bottom-right-radius:3px;padding:4px 0}.mc-tree-select__content{height:100%}.mc-tree-select__content .mc-tree-selection{height:100%}.mc-tree-select__panel .mc-optgroup-label,.mc-tree-select__panel .mc-tree-select-option{font-size:inherit;line-height:32px;height:32px}.mc-form-field-type-mc-select:not(.mc-disabled) .mc-form-field-flex{cursor:pointer}.mc-form-field-type-mc-select .mc-form-field-label{width:calc(100% - 18px)}"],inputs:["disabled"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,host:{"[attr.id]":"id","[attr.tabindex]":"tabIndex",class:"mc-tree-select","[class.mc-disabled]":"disabled","[class.mc-select-invalid]":"errorState","(click)":"toggle()","(keydown)":"handleKeydown($event)","(focus)":"onFocus()","(blur)":"onBlur()","(window:resize)":"calculateHiddenItems()"},animations:[st.transformPanel,st.fadeInContent],providers:[{provide:kt,useExisting:r},{provide:b.CdkTree,useExisting:r}]}]}],r.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:c.ViewportRuler},{type:t.NgZone},{type:t.Renderer2},{type:Oe},{type:String,decorators:[{type:t.Attribute,args:["tabindex"]}]},{type:void 0,decorators:[{type:t.Inject,args:[rt]}]},{type:Array,decorators:[{type:t.Optional},{type:t.Inject,args:[l.NG_VALIDATORS]}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[bt]}]},{type:n.Directionality,decorators:[{type:t.Optional}]},{type:l.NgForm,decorators:[{type:t.Optional}]},{type:l.FormGroupDirective,decorators:[{type:t.Optional}]},{type:Rt,decorators:[{type:t.Optional}]},{type:l.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.NgModel,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.FormControlName,decorators:[{type:t.Optional},{type:t.Self}]}]},r.propDecorators={trigger:[{type:t.ViewChild,args:["trigger",{static:!1}]}],panel:[{type:t.ViewChild,args:["panel",{static:!1}]}],overlayDir:[{type:t.ViewChild,args:[c.CdkConnectedOverlay,{static:!1}]}],hiddenItemsCounter:[{type:t.ViewChild,args:["hiddenItemsCounter",{static:!1}]}],tags:[{type:t.ViewChildren,args:[jr]}],cleaner:[{type:t.ContentChild,args:["mcSelectCleaner",{static:!0}]}],customTrigger:[{type:t.ContentChild,args:[sa,{static:!1}]}],tree:[{type:t.ContentChild,args:[Xo,{static:!1}]}],hiddenItemsText:[{type:t.Input}],openedChange:[{type:t.Output}],openedStream:[{type:t.Output,args:["opened"]}],closedStream:[{type:t.Output,args:["closed"]}],selectionChange:[{type:t.Output}],valueChange:[{type:t.Output}],panelClass:[{type:t.Input}],errorStateMatcher:[{type:t.Input}],sortComparator:[{type:t.Input}],placeholder:[{type:t.Input}],required:[{type:t.Input}],multiple:[{type:t.Input}],autoSelect:[{type:t.Input}],compareWith:[{type:t.Input}],id:[{type:t.Input}],hiddenItemsTextFormatter:[{type:t.Input}]},r}(la),da=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,c.OverlayModule,b.CdkTreeModule,$o,wt,qr,Se],exports:[pa,sa,r.CommonModule],declarations:[pa,sa],providers:[at]}]}],e}(),ua=new t.InjectionToken("MC_TEXTAREA_VALUE_ACCESSOR"),ha=0,ma=function(){function e(e,t,n,i){this.defaultErrorStateMatcher=e,this.parentForm=t,this.parentFormGroup=n,this.ngControl=i}return e}(),ga=I(ma),fa=function(e){function n(t,n,i,r,a,s,c){var l=e.call(this,a,i,r,n)||this;l.elementRef=t,l.ngControl=n,l.ngZone=c,l.canGrow=!0,l.focused=!1,l.stateChanges=new o.Subject,l.controlType="mc-textarea",l.uid="mc-textsrea-"+ha++,l._disabled=!1,l._required=!1,l.lineHeight=0,l.freeRowsHeight=0,l.minHeight=0,l.valueAccessor=s||l.elementRef.nativeElement,l.previousNativeValue=l.value,l.id=l.id;var p=o.fromEvent(t.nativeElement,"input");return l.growSubscription=p.subscribe(l.grow.bind(l)),l}return v(n,e),Object.defineProperty(n.prototype,"disabled",{get:function(){return this.ngControl&&null!==this.ngControl.disabled?this.ngControl.disabled:this._disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e),this.focused&&(this.focused=!1,this.stateChanges.next())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"id",{get:function(){return this._id},set:function(e){this._id=e||this.uid},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"required",{get:function(){return this._required},set:function(e){this._required=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this.valueAccessor.value},set:function(e){e!==this.value&&(this.valueAccessor.value=e,this.stateChanges.next())},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){var e=this;setTimeout(function(){return e.grow()},0),this.lineHeight=parseInt(getComputedStyle(this.elementRef.nativeElement).lineHeight,10);var t=parseInt(getComputedStyle(this.elementRef.nativeElement).paddingTop,10),n=parseInt(getComputedStyle(this.elementRef.nativeElement).paddingBottom,10);this.minHeight=2*this.lineHeight+t+n,this.freeRowsHeight=this.lineHeight},n.prototype.ngOnChanges=function(){this.stateChanges.next()},n.prototype.ngOnDestroy=function(){this.stateChanges.complete(),this.growSubscription.unsubscribe()},n.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState(),this.dirtyCheckNativeValue()},n.prototype.grow=function(){var e=this;this.canGrow&&this.ngZone.runOutsideAngular(function(){var t=e.elementRef.nativeElement,n=parseInt(window.getComputedStyle(t).height,10),i=n-t.clientHeight;t.style.minHeight=0;var o=Math.max(e.minHeight,+t.scrollHeight+i+e.freeRowsHeight);t.style.minHeight=o+"px"})},n.prototype.focus=function(){this.elementRef.nativeElement.focus()},n.prototype.focusChanged=function(e){e!==this.focused&&(this.focused=e,this.stateChanges.next())},Object.defineProperty(n.prototype,"empty",{get:function(){return!this.elementRef.nativeElement.value&&!this.isBadInput()},enumerable:!0,configurable:!0}),n.prototype.onContainerClick=function(){this.focus()},n.prototype.dirtyCheckNativeValue=function(){var e=this.value;this.previousNativeValue!==e&&(this.previousNativeValue=e,this.stateChanges.next())},n.prototype.isBadInput=function(){var e=this.elementRef.nativeElement.validity;return e&&e.badInput},n.prototype.getGrowHeight=function(){var e=this.elementRef.nativeElement,t=parseInt(window.getComputedStyle(e).height.toString(),10),n=t-e.clientHeight;return Math.max(this.minHeight,+e.scrollHeight+n)},n.decorators=[{type:t.Directive,args:[{selector:"textarea[mcTextarea]",exportAs:"mcTextarea",host:{class:"mc-textarea","[class.mc-textarea-resizable]":"!canGrow","[attr.id]":"id","[attr.placeholder]":"placeholder","[attr.aria-invalid]":"errorState","[disabled]":"disabled","[required]":"required","(blur)":"focusChanged(false)","(focus)":"focusChanged(true)"},providers:[{provide:kt,useExisting:n}]}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:l.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.NgForm,decorators:[{type:t.Optional}]},{type:l.FormGroupDirective,decorators:[{type:t.Optional}]},{type:Oe},{type:void 0,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[ua]}]},{type:t.NgZone}]},n.propDecorators={canGrow:[{type:t.Input}],errorStateMatcher:[{type:t.Input}],disabled:[{type:t.Input}],id:[{type:t.Input}],placeholder:[{type:t.Input}],required:[{type:t.Input}],value:[{type:t.Input}]},n}(ga),ya=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule,be,l.FormsModule],exports:[fa],declarations:[fa]}]}],e}(),ba={hours:0,minutes:1,seconds:2};ba[ba.hours]="hours",ba[ba.minutes]="minutes",ba[ba.seconds]="seconds";var va={HHmmss:"HH:mm:ss",HHmm:"HH:mm"},Ca=(ir={},ir[va.HHmmss]=" : : ",ir[va.HHmm]=" : ",ir),_a=va.HHmm,xa=new RegExp(/^([0-9]|0[0-9]|1[0-9]|2[0-3]):([0-5][0-9]|[0-9]):([0-5][0-9]|[0-9])?$/),wa=/^([0-9]|0[0-9]|1[0-9]|2[0-3]):([0-5][0-9]|[0-9])?$/,Oa=/^([0-9]|0[0-9]|1[0-9]|2[0-3]):?$/,ka=0,Ia=function(){function e(e,t,n,i){this.defaultErrorStateMatcher=e,this.parentForm=t,this.parentFormGroup=n,this.ngControl=i}return e}(),Sa=I(Ia),Da=function(e){function n(t,n,i,r,a,s,c,l){var p=e.call(this,a,i,r,n)||this;if(p.elementRef=t,p.ngControl=n,p.renderer=c,p.dateAdapter=l,p.stateChanges=new o.Subject,p.focused=!1,p.controlType="mc-timepicker",p._minTime=null,p._maxTime=null,p.uid="mc-timepicker-"+ka++,!p.dateAdapter)throw Error("McTimepicker: No provider found for DateAdapter. You must import one of the existing modules at your application root or provide a custom implementation or use exists ones.");if(p.inputValueAccessor=s||p.elementRef.nativeElement,p.previousNativeValue=p.value,p.onChange=o.noop,p.id=p.id,p.placeholder=Ca[_a],p.ngControl){p.ngControl.valueAccessor=p;var d=p.ngControl.control,u=[function(){return p.minTimeValidator()},function(){return p.maxTimeValidator()}],h=d.validator?[d.validator].concat(u):u;d.setValidators(h),d.updateValueAndValidity()}return p}return v(n,e),Object.defineProperty(n.prototype,"disabled",{get:function(){return this.ngControl&&null!==this.ngControl.disabled?this.ngControl.disabled:this._disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e),this.focused&&(this.focused=!1),this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"id",{get:function(){return this._id},set:function(e){this._id=e||this.uid},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"required",{get:function(){return this._required},set:function(e){this._required=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this.inputValueAccessor.value},set:function(e){e!==this.value&&(this.inputValueAccessor.value=e,this.applyInputChanges())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"timeFormat",{get:function(){return this._timeFormat},set:function(e){var t=this;this._timeFormat=Object.keys(va).map(function(e){return va[e]}).indexOf(e)>-1?e:_a,this.placeholder=Ca[this._timeFormat],setTimeout(function(){return t.applyInputChanges({doTimestringReformat:!0})})},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"minTime",{get:function(){return this._minTime},set:function(e){this._minTime=e,this.ngControl.control.updateValueAndValidity()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxTime",{get:function(){return this._maxTime},set:function(e){this._maxTime=e,this.ngControl.control.updateValueAndValidity()},enumerable:!0,configurable:!0}),n.prototype.ngOnDestroy=function(){this.stateChanges.complete()},n.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState(),this.dirtyCheckNativeValue()},n.prototype.focus=function(){this.elementRef.nativeElement.focus()},n.prototype.focusChanged=function(e){e!==this.focused&&(this.focused=e,this.onTouched(),this.stateChanges.next())},n.prototype.onBlur=function(){this.applyInputChanges(),this.focusChanged(!1)},n.prototype.onPaste=function(e){e.preventDefault();var t=e.clipboardData.getData("text");void 0!==this.getDateFromTimeString(t)&&(this.elementRef.nativeElement.value=t,this.onInput())},n.prototype.onInput=function(){var e=this.elementRef.nativeElement.selectionStart,t=this.elementRef.nativeElement.selectionEnd,n=!1,i=this.getParsedTimeParts(this.elementRef.nativeElement.value),o=i.hoursOnly,r=i.hoursAndMinutes,a=i.hoursAndMinutesAndSeconds;o&&o[1]&&2===o[1].length?n=!0:r&&1===r[1].length&&r[2]&&2===r[2].length?n=!0:a&&2===a[1].length&&2===a[2].length&&a[3]&&2===a[3].length&&(n=!0),this.applyInputChanges({doTimestringReformat:n}),this.elementRef.nativeElement.selectionStart=e,this.elementRef.nativeElement.selectionEnd=t,n&&null===this.ngControl.errors&&this.createSelectionOfTimeComponentInInput(e+1)},Object.defineProperty(n.prototype,"empty",{get:function(){return!this.elementRef.nativeElement.value&&!this.isBadInput()},enumerable:!0,configurable:!0}),n.prototype.onContainerClick=function(){this.focus()},n.prototype.writeValue=function(e){null!==e&&(this.saveOriginalValue(e),this.renderer.setProperty(this.elementRef.nativeElement,"value",this.getTimeStringFromDate(e,this.timeFormat)),this.applyInputChanges())},n.prototype.onKeyDown=function(e){var t=this.getKeyCode(e);"ArrowUp"!==t&&"ArrowDown"!==t||this.upDownTimeByArrowKeys(e),"ArrowLeft"!==t&&"ArrowRight"!==t||this.switchSelectionBetweenTimeparts(e)},n.prototype.registerOnChange=function(e){this.onChange=e},n.prototype.registerOnTouched=function(e){this.onTouched=e},n.prototype.saveOriginalValue=function(e){this.dateAdapter.isValid(e)&&(this.originalValue=e)},n.prototype.dirtyCheckNativeValue=function(){var e=this.value;this.previousNativeValue!==e&&(this.previousNativeValue=e,this.stateChanges.next())},n.prototype.isBadInput=function(){var e=this.elementRef.nativeElement.validity;return e&&e.badInput},n.prototype.applyInputChanges=function(e){void 0===e&&(e={});var t=e.changedTime,n=e.doTimestringReformat,i=void 0===n||n,o=t||this.getDateFromTimeString(this.elementRef.nativeElement.value);if(this.currentDateTimeInput=o,i&&void 0!==o){var r=this.elementRef.nativeElement.selectionStart,a=this.elementRef.nativeElement.selectionEnd;this.renderer.setProperty(this.elementRef.nativeElement,"value",this.getTimeStringFromDate(o,this.timeFormat)),this.elementRef.nativeElement.selectionStart=r,this.elementRef.nativeElement.selectionEnd=a}this.ngControl.control.updateValueAndValidity();var s=null===this.ngControl.errors&&void 0!==o?o:null;this.onChange(s),this.stateChanges.next()},n.prototype.upDownTimeByArrowKeys=function(e){e.preventDefault();var t=this.currentDateTimeInput;if(void 0!==t){var n=this.elementRef.nativeElement.selectionStart,i=this.getTimeEditMetrics(n).modifiedTimePart,o=this.getKeyCode(e);"ArrowUp"===o&&(t=this.incrementTime(t,i)),"ArrowDown"===o&&(t=this.decrementTime(t,i)),this.applyInputChanges({changedTime:t}),this.createSelectionOfTimeComponentInInput(n)}},n.prototype.switchSelectionBetweenTimeparts=function(e){var t=this.currentDateTimeInput,n=this.getKeyCode(e);if(void 0!==t){var i=this.elementRef.nativeElement.selectionStart;"ArrowLeft"===n?i=this.getCursorPositionOfPrevTimePartStart(i,this.elementRef.nativeElement.value):"ArrowRight"===n&&(i=this.getCursorPositionOfNextTimePartStart(i,this.elementRef.nativeElement.value)),this.createSelectionOfTimeComponentInInput(i)}},n.prototype.getKeyCode=function(e){return e.code||e.key},n.prototype.createSelectionOfTimeComponentInInput=function(e){var t=this;setTimeout(function(){var n=t.getTimeEditMetrics(e);t.elementRef.nativeElement.selectionStart=n.cursorStartPosition,t.elementRef.nativeElement.selectionEnd=n.cursorEndPosition})},n.prototype.incrementTime=function(e,t){void 0===t&&(t=ba.seconds);var n=this.getTimeDigitsFromDate(e),i=n.hours,o=n.minutes,r=n.seconds;switch(t){case ba.hours:i++;break;case ba.minutes:o++;break;case ba.seconds:r++}return r>59&&(r=0),o>59&&(o=0),i>23&&(i=0),this.getDateFromTimeDigits(i,o,r)},n.prototype.decrementTime=function(e,t){void 0===t&&(t=ba.seconds);var n=this.getTimeDigitsFromDate(e),i=n.hours,o=n.minutes,r=n.seconds;switch(t){case ba.hours:i--;break;case ba.minutes:o--;break;case ba.seconds:r--}return r<0&&(r=59),o<0&&(o=59),i<0&&(i=23),this.getDateFromTimeDigits(i,o,r)},n.prototype.getCursorPositionOfPrevTimePartStart=function(e,t){return 0===e?t.length:e-1},n.prototype.getCursorPositionOfNextTimePartStart=function(e,t,n){void 0===n&&(n=":");var i=t.indexOf(n,e);return void 0!==i?i+1:0},n.prototype.getTimeEditMetrics=function(e){var t,n,i,o=this.elementRef.nativeElement.value,r=o.indexOf(":",1),a=-1!==r?o.indexOf(":",r+1):-1;return-1!==a&&e>a?(t=ba.seconds,n=a+1,i=o.length):-1!==r&&e>r?(t=ba.minutes,n=r+1,i=a>-1?a:o.length):(t=ba.hours,n=0,i=-1!==r?r:o.length),{modifiedTimePart:t,cursorStartPosition:n,cursorEndPosition:i}},n.prototype.getTimeStringFromDate=function(e,t){return void 0===t&&(t=_a),void 0===e||null===e?"":this.dateAdapter.format(e,t)},n.prototype.getParsedTimeParts=function(e){var t=this.dateAdapter.parse(e,["h:m a","h:m:s a","H:m","H:m:s"]),n=null!==t?t.format("H:m:s"):"",i=n.match(xa),o=n.match(wa);return{hoursOnly:n.match(Oa),hoursAndMinutes:o,hoursAndMinutesAndSeconds:i}},n.prototype.getDateFromTimeDigits=function(e,t,n){return void 0===n&&(n=0),this.getDateFromTimeString(e+":"+t+":"+n)},n.prototype.getDateFromTimeString=function(e){if(void 0!==e){var t=this.getParsedTimeParts(e),n=t.hoursOnly,i=t.hoursAndMinutes,o=t.hoursAndMinutesAndSeconds;if(0!==e.trim().length&&(null!==n||null!==i||null!==o)){var r=0,a=0,s=0;n?r=Number(n[1]):i?(r=Number(i[1]),a=Number(i[2])):o&&(r=Number(o[1]),a=Number(o[2]),s=Number(o[3]));var c=this.dateAdapter.createDateTime(this.dateAdapter.getYear(this.originalValue),this.dateAdapter.getMonth(this.originalValue),this.dateAdapter.getDate(this.originalValue),r,a,s,0);return this.dateAdapter.isValid(c)?c:void 0}}},n.prototype.getTimeDigitsFromDate=function(e){return{hours:this.dateAdapter.getHours(e),minutes:this.dateAdapter.getMinutes(e),seconds:this.dateAdapter.getSeconds(e)}},n.prototype.minTimeValidator=function(){return this.minTime&&void 0!==this.currentDateTimeInput&&this.isTimeLowerThenMin(this.currentDateTimeInput)?{mcTimepickerLowerThenMintime:{text:this.elementRef.nativeElement.value}}:null},n.prototype.maxTimeValidator=function(){return this.maxTime&&void 0!==this.currentDateTimeInput&&this.isTimeGreaterThenMax(this.currentDateTimeInput)?{mcTimepickerHigherThenMaxtime:{text:this.elementRef.nativeElement.value}}:null},n.prototype.isTimeLowerThenMin=function(e){return void 0!==e&&null!==e&&null!==this.minTime&&this.dateAdapter.compareDateTime(e,this.getDateFromTimeString(this.minTime))<0},n.prototype.isTimeGreaterThenMax=function(e){return void 0!==e&&null!==e&&null!==this.maxTime&&this.dateAdapter.compareDateTime(e,this.getDateFromTimeString(this.maxTime))>=0},n.decorators=[{type:t.Directive,args:[{selector:"input[mcTimepicker]",exportAs:"mcTimepickerInput",host:{class:"mc-timepicker mc-input","[attr.id]":"id","[attr.placeholder]":"placeholder","[disabled]":"disabled","[required]":"required","[attr.time-format]":"timeFormat","[attr.min-time]":"minTime","[attr.max-time]":"maxTime","[attr.value]":"value","[attr.aria-invalid]":"errorState","(blur)":"onBlur()","(focus)":"focusChanged(true)","(input)":"onInput()","(paste)":"onPaste($event)","(keydown)":"onKeyDown($event)"},providers:[{provide:kt,useExisting:t.forwardRef(function(){return n})}]}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{
|
19
|
+
type:l.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.NgForm,decorators:[{type:t.Optional}]},{type:l.FormGroupDirective,decorators:[{type:t.Optional}]},{type:Oe},{type:void 0,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[_n]}]},{type:t.Renderer2},{type:f.DateAdapter,decorators:[{type:t.Optional}]}]},n.propDecorators={errorStateMatcher:[{type:t.Input}],placeholder:[{type:t.Input}],disabled:[{type:t.Input}],id:[{type:t.Input}],required:[{type:t.Input}],value:[{type:t.Input}],timeFormat:[{type:t.Input,args:["time-format"]}],minTime:[{type:t.Input,args:["min-time"]}],maxTime:[{type:t.Input,args:["max-time"]}]},n}(Sa),Ea=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule,h.PlatformModule,l.FormsModule],declarations:[Da],exports:[Da]}]}],e}(),Pa={Opened:"opened",Closed:"closed"},Ma={sidebarState:s.trigger("state",[s.state("opened",s.style({minWidth:"{{ openedStateMinWidth }}",width:"{{ openedStateWidth }}",maxWidth:"{{ openedStateMaxWidth }}"}),{params:{openedStateMinWidth:"",openedStateWidth:"",openedStateMaxWidth:""}}),s.state("closed",s.style({minWidth:"{{ closedStateWidth }}",width:"{{ closedStateWidth }}",maxWidth:"{{ closedStateWidth }}"}),{params:{closedStateWidth:""}}),s.transition("opened => closed",[s.animate("0.1s")]),s.transition("closed => opened",[s.animate("0.2s")])])},Ta={Left:"left",Right:"right"},Aa=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"[mc-sidebar-opened]",exportAs:"mcSidebarOpened"}]}],e.propDecorators={minWidth:[{type:t.Input}],width:[{type:t.Input}],maxWidth:[{type:t.Input}]},e}(),Ra=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"[mc-sidebar-closed]",exportAs:"mcSidebarClosed"}]}],e.propDecorators={width:[{type:t.Input}]},e}(),Va=function(){function e(e,n){this.ngZone=e,this.elementRef=n,this._opened=!0,this.params={openedStateWidth:"inherit",openedStateMinWidth:"inherit",openedStateMaxWidth:"inherit",closedStateWidth:"32px"},this.stateChanged=new t.EventEmitter,this.internalState=!0}return Object.defineProperty(e.prototype,"opened",{get:function(){return this._opened},set:function(e){this._opened&&this.saveWidth(),this._opened=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animationState",{get:function(){return this._opened?Pa.Opened:Pa.Closed},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.position!==Ta.Left&&this.position!==Ta.Right||this.registerKeydownListener()},e.prototype.ngOnDestroy=function(){this.position!==Ta.Left&&this.position!==Ta.Right||this.unRegisterKeydownListener()},e.prototype.toggle=function(){this.opened=!this.opened},e.prototype.onAnimationStart=function(){this._opened&&(this.internalState=this._opened)},e.prototype.onAnimationDone=function(){this.internalState=this._opened,this.stateChanged.emit(this._opened)},e.prototype.ngAfterContentInit=function(){this.params={openedStateWidth:this.openedContent.width||"inherit",openedStateMinWidth:this.openedContent.minWidth||"inherit",openedStateMaxWidth:this.openedContent.maxWidth||"inherit",closedStateWidth:this.closedContent.width||"32px"}},e.prototype.registerKeydownListener=function(){var e=this;this.documentKeydownListener=function(t){a.isControl(t)||a.isInput(t)||(e.position===Ta.Left&&a.isLeftBracket(t)||e.position===Ta.Right&&a.isRightBracket(t))&&e.ngZone.run(function(){return e._opened=!e._opened})},this.ngZone.runOutsideAngular(function(){document.addEventListener("keypress",e.documentKeydownListener,!0)})},e.prototype.unRegisterKeydownListener=function(){document.removeEventListener("keypress",this.documentKeydownListener,!0)},e.prototype.saveWidth=function(){this.params.openedStateWidth=this.elementRef.nativeElement.offsetWidth+"px"},e.decorators=[{type:t.Component,args:[{selector:"mc-sidebar",exportAs:"mcSidebar",template:'<ng-container [ngSwitch]="internalState"><ng-container *ngSwitchCase="true"><ng-content select="[mc-sidebar-opened]"></ng-content></ng-container><ng-container *ngSwitchCase="false"><ng-content select="[mc-sidebar-closed]"></ng-content></ng-container></ng-container>',styles:[".mc-sidebar{display:inline-block;height:100%;overflow:hidden}.mc-sidebar-closed,.mc-sidebar-opened{height:100%}"],host:{class:"mc-sidebar","[@state]":"{\n value: animationState,\n params: params\n }","(@state.start)":"onAnimationStart()","(@state.done)":"onAnimationDone()"},animations:[Ma.sidebarState],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:t.NgZone},{type:t.ElementRef}]},e.propDecorators={opened:[{type:t.Input}],position:[{type:t.Input}],stateChanged:[{type:t.Output}],openedContent:[{type:t.ContentChild,args:[Aa,{static:!1}]}],closedContent:[{type:t.ContentChild,args:[Ra,{static:!1}]}]},e}(),Fa=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule],declarations:[Ra,Aa,Va],exports:[Ra,Aa,Va]}]}],e}(),La=new t.InjectionToken("McSidepanelData"),Na={Right:"right",Left:"left",Top:"top",Bottom:"bottom"},ja=function(){function e(){this.data=null,this.position=Na.Right,this.hasBackdrop=!0,this.requiredBackdrop=!1,this.disableClose=!1,this.overlayPanelClass=""}return e}(),Ba={Void:"void",Visible:"visible",Hidden:"hidden"},za={right:{in:"translateX(100%)",out:"translateX(0%)"},left:{in:"translateX(-100%)",out:"translateX(0%)"},top:{in:"translateY(-100%)",out:"translateY(0%)"},bottom:{in:"translateY(100%)",out:"translateY(0%)"}},Wa={sidepanelState:s.trigger("state",[s.state("hidden",s.style({transform:"{{transformIn}}"}),{params:{transformIn:za[Na.Right].in}}),s.state("visible",s.style({transform:"{{transformOut}}"}),{params:{transformOut:za[Na.Right].out}}),s.transition("visible => void, visible => hidden",s.animate("200ms "+Be.AccelerationCurve)),s.transition("void => visible",s.animate("200ms "+Be.DecelerationCurve))])},Ya=new t.InjectionToken("mc-sidepanel-with-indent"),Ha=new t.InjectionToken("mc-sidepanel-with-shadow"),Ka=function(e){function n(n,i,o,r,a){var s=e.call(this)||this;return s.elementRef=n,s.changeDetectorRef=i,s.sidepanelConfig=o,s.withIndent=r,s.withShadow=a,s.animationState=Ba.Void,s.animationStateChanged=new t.EventEmitter,s}return v(n,e),n.prototype.ngOnDestroy=function(){this.destroyed=!0},n.prototype.attachComponentPortal=function(e){return this.validatePortalAttached(),this.setAnimation(),this.setPanelClass(),this.portalOutlet.attachComponentPortal(e)},n.prototype.attachTemplatePortal=function(e){return this.validatePortalAttached(),this.setAnimation(),this.setPanelClass(),this.portalOutlet.attachTemplatePortal(e)},n.prototype.enter=function(){this.destroyed||(this.animationState=Ba.Visible,this.changeDetectorRef.detectChanges())},n.prototype.exit=function(){this.destroyed||(this.animationState=Ba.Hidden,this.changeDetectorRef.markForCheck())},n.prototype.onAnimation=function(e){this.animationStateChanged.emit(e)},n.prototype.setAnimation=function(){var e=this.sidepanelConfig.position;this.animationTransform={transformIn:za[e].in,transformOut:za[e].out}},n.prototype.setPanelClass=function(){var e=this.elementRef.nativeElement,t=this.sidepanelConfig.position;e.classList.add("mc-sidepanel-container_"+t),this.withShadow&&e.classList.add("mc-sidepanel-container_shadowed")},n.prototype.validatePortalAttached=function(){if(this.portalOutlet.hasAttached())throw Error("Attempting to attach sidepanel content after content is already attached")},n.decorators=[{type:t.Component,args:[{selector:"mc-sidepanel-container",template:'<div class="mc-sidepanel-wrapper"><div class="mc-sidepanel-indent" *ngIf="withIndent"><button mcSidepanelClose></button></div><div class="mc-sidepanel-content"><ng-template cdkPortalOutlet></ng-template></div></div>',styles:[".mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mc-sidepanel-container{outline:0;display:flex;flex:1;position:fixed;min-height:0}.mc-sidepanel-container .flex{min-height:0}.mc-sidepanel-container_left,.mc-sidepanel-container_right{width:33%;min-width:400px;height:100%;top:0}.mc-sidepanel-container_left .mc-sidepanel-indent,.mc-sidepanel-container_right .mc-sidepanel-indent{width:16px;height:100%}.mc-sidepanel-container_right{right:0;transform:translateX(100%)}.mc-sidepanel-container_right .mc-sidepanel-wrapper{flex-direction:row}.mc-sidepanel-container_left{left:0;transform:translateX(-100%)}.mc-sidepanel-container_left .mc-sidepanel-wrapper{flex-direction:row-reverse}.mc-sidepanel-container_bottom,.mc-sidepanel-container_top{flex-direction:column;height:33%;min-height:400px;width:100%;left:0}.mc-sidepanel-container_bottom .mc-sidepanel-indent,.mc-sidepanel-container_top .mc-sidepanel-indent{height:16px;width:100%}.mc-sidepanel-container_top{top:0;transform:translateY(-100%)}.mc-sidepanel-container_top .mc-sidepanel-wrapper{flex-direction:column-reverse}.mc-sidepanel-container_bottom{bottom:0;transform:translateY(100%)}.mc-sidepanel-container_bottom .mc-sidepanel-wrapper{flex-direction:column}.mc-sidepanel-wrapper{display:flex;flex:1;min-height:0;width:100%}.mc-sidepanel-indent{display:flex;flex:0 0 auto}.mc-sidepanel-indent .mc-sidepanel-close{width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;background:0 0;padding:0}.mc-sidepanel-content{display:flex;flex-direction:column;flex:1;min-height:0;width:100%}.mc-sidepanel-header{padding:14px 16px;display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;flex:0 0 auto}.mc-sidepanel-header .mc-sidepanel-close{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;background:0 0;padding:0 0 0 8px}.mc-sidepanel-title{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mc-sidepanel-body{overflow-y:auto;display:flex;flex:1;flex-direction:column;min-height:0}.mc-sidepanel-footer{padding:16px;display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;flex:0 0 auto}.mc-sidepanel-footer .mc-sidepanel-actions{display:flex;align-items:center;flex-direction:row;flex:1}.mc-sidepanel-footer .mc-sidepanel-actions[align=left]{justify-content:start}.mc-sidepanel-footer .mc-sidepanel-actions[align=right]{justify-content:flex-end}.mc-sidepanel-footer button+button{margin-left:16px}"],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,animations:[Wa.sidepanelState],host:{class:"mc-sidepanel-container",tabindex:"-1",role:"dialog","aria-modal":"true","[attr.id]":"id","[@state]":"{\n value: animationState,\n params: animationTransform\n }","(@state.start)":"onAnimation($event)","(@state.done)":"onAnimation($event)"}}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:ja},{type:Boolean,decorators:[{type:t.Inject,args:[Ya]}]},{type:Boolean,decorators:[{type:t.Inject,args:[Ha]}]}]},n.propDecorators={portalOutlet:[{type:t.ViewChild,args:[d.CdkPortalOutlet,{static:!0}]}]},n}(d.BasePortalOutlet),Ua=0,Ga=function(){function e(e,t,n){var i=this;this.containerInstance=e,this.overlayRef=t,this.config=n,this.afterClosed$=new o.Subject,this.afterOpened$=new o.Subject,this.id=this.config.id||"mc-sidepanel-"+Ua++,this.containerInstance.id=this.id,e.animationStateChanged.pipe(m.filter(function(e){return"done"===e.phaseName&&e.toState===Ba.Visible}),m.take(1)).subscribe(function(){i.afterOpened$.next(),i.afterOpened$.complete()}),e.animationStateChanged.pipe(m.filter(function(e){return"done"===e.phaseName&&e.toState===Ba.Hidden}),m.take(1)).subscribe(function(){t.dispose(),i.afterClosed$.next(i.result),i.afterClosed$.complete()}),e.sidepanelConfig.disableClose||o.merge(t.backdropClick(),t.keydownEvents().pipe(m.filter(function(e){return e.keyCode===a.ESCAPE}))).subscribe(function(){return i.close()})}return e.prototype.close=function(e){var t=this;this.afterClosed$.closed||(this.containerInstance.animationStateChanged.pipe(m.filter(function(e){return"done"===e.phaseName}),m.take(1)).subscribe(function(){return t.overlayRef.detachBackdrop()}),this.result=e,this.containerInstance.exit())},e.prototype.afterClosed=function(){return this.afterClosed$.asObservable()},e.prototype.afterOpened=function(){return this.afterOpened$.asObservable()},e}(),Xa=new t.InjectionToken("mc-sidepanel-default-options"),qa=function(){function e(e,t,n,i){this.overlay=e,this.injector=t,this.defaultOptions=n,this.parentSidepanelService=i,this.openedSidepanelsAtThisLevel=[]}return Object.defineProperty(e.prototype,"openedSidepanels",{get:function(){return this.parentSidepanelService?this.parentSidepanelService.openedSidepanels:this.openedSidepanelsAtThisLevel},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this.closeSidepanels(this.openedSidepanelsAtThisLevel)},e.prototype.open=function(e,n){var i=this,o=fe({},this.defaultOptions||new ja,n);if(o.id&&this.getSidepanelById(o.id))throw Error('Sidepanel with id "'+o.id+'" exists already. The sidepanel id must be unique.');var r=this.createOverlay(o),a=this.attachContainer(r,o),s=new Ga(a,r,o);if(e instanceof t.TemplateRef)a.attachTemplatePortal(new d.TemplatePortal(e,null,{$implicit:o.data,sidepanelRef:s}));else{var c=this.createInjector(o,s,a),l=new d.ComponentPortal(e,void 0,c),p=a.attachComponentPortal(l);s.instance=p.instance}return this.openedSidepanels.push(s),s.afterClosed().subscribe(function(){return i.removeOpenSidepanel(s)}),a.enter(),s},e.prototype.closeAll=function(){this.closeSidepanels(this.openedSidepanels)},e.prototype.getSidepanelById=function(e){return this.openedSidepanels.find(function(t){return t.id===e})},e.prototype.attachContainer=function(e,t){var n=this.getOpenedSidepanelsWithSamePosition(t),i=new d.PortalInjector(this.injector,new WeakMap([[ja,t],[Ya,n.length>=1],[Ha,n.length<2]])),o=new d.ComponentPortal(Ka,void 0,i);return e.attach(o).instance},e.prototype.createInjector=function(e,t,n){var i=new WeakMap([[Ka,n],[La,e.data],[Ga,t]]);return new d.PortalInjector(this.injector,i)},e.prototype.createOverlay=function(e){var t=new c.OverlayConfig({hasBackdrop:e.hasBackdrop,backdropClass:this.getBackdropClass(e),maxWidth:"100%",panelClass:e.overlayPanelClass,scrollStrategy:this.overlay.scrollStrategies.block(),positionStrategy:this.overlay.position().global()});return this.overlay.create(t)},e.prototype.closeSidepanels=function(e){e.reverse().slice().forEach(function(e){e.close()})},e.prototype.getBackdropClass=function(e){var t=this.openedSidepanels.some(function(e){return e.config.hasBackdrop});return e.requiredBackdrop||!t?"cdk-overlay-dark-backdrop":"cdk-overlay-transparent-backdrop"},e.prototype.getOpenedSidepanelsWithSamePosition=function(e){return this.openedSidepanels.filter(function(t){return t.config.position===e.position})},e.prototype.removeOpenSidepanel=function(e){var t=this.openedSidepanels.indexOf(e);t>-1&&this.openedSidepanels.splice(t,1)},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:c.Overlay},{type:t.Injector},{type:ja,decorators:[{type:t.Optional},{type:t.Inject,args:[Xa]}]},{type:e,decorators:[{type:t.Optional},{type:t.SkipSelf}]}]},e}(),$a=function(){function e(e,t,n){this.sidepanelRef=e,this.elementRef=t,this.sidepanelService=n}return e.prototype.ngOnInit=function(){var e=this;this.sidepanelRef||setTimeout(function(){e.sidepanelRef=de(e.elementRef,e.sidepanelService.openedSidepanels)})},e.prototype.ngOnChanges=function(e){var t=e.mcSidepanelClose||e.sidepanelResult;t&&(this.sidepanelResult=t.currentValue)},e.decorators=[{type:t.Directive,args:[{selector:"button[mc-sidepanel-close], button[mcSidepanelClose]",host:{"(click)":"sidepanelRef.close(sidepanelResult)",class:"mc-sidepanel-close",type:"button"}}]}],e.ctorParameters=function(){return[{type:Ga,decorators:[{type:t.Optional}]},{type:t.ElementRef},{type:qa}]},e.propDecorators={sidepanelResult:[{type:t.Input,args:["mc-sidepanel-close"]}],mcSidepanelClose:[{type:t.Input,args:["mcSidepanelClose"]}]},e}(),Za=function(){function e(){}return e.decorators=[{type:t.Component,args:[{selector:"mc-sidepanel-header",template:'\n <div class="mc-sidepanel-title">\n <ng-content></ng-content>\n </div>\n <button *ngIf="closeable" mc-sidepanel-close>\n <span class="mc-sidepanel-close-x">\n <i mc-icon="mc-close-L_16" class="mc-icon mc-icon_light" color="second"></i>\n </span>\n </button>\n ',host:{class:"mc-sidepanel-header"}}]}],e.propDecorators={closeable:[{type:t.Input}]},e}(),Qa=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-sidepanel-body, [mc-sidepanel-body], mcSidepanelBody",host:{class:"mc-sidepanel-body"}}]}],e}(),Ja=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-sidepanel-footer, [mc-sidepanel-footer], mcSidepanelFooter",host:{class:"mc-sidepanel-footer"}}]}],e}(),es=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-sidepanel-actions, [mc-sidepanel-actions], mcSidepanelActions",host:{class:"mc-sidepanel-actions"}}]}],e}(),ts=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,c.OverlayModule,d.PortalModule,be,wt],providers:[qa],declarations:[Ka,$a,Za,Qa,Ja,es],entryComponents:[Ka],exports:[Ka,$a,Za,Qa,Ja,es]}]}],e}(),ns={Horizontal:"horizontal",Vertical:"vertical"},is=function(){function e(e,t){this.elementRef=e,this.renderer=t,this._direction=ns.Vertical,this._order=0,this._size=6,this.dragged=!1}return Object.defineProperty(e.prototype,"direction",{get:function(){return this._direction},set:function(e){this._direction=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"order",{get:function(){return this._order},set:function(e){this._order=i.coerceNumberProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._size},set:function(e){this._size=i.coerceNumberProperty(e)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.setStyle("flex-basis",i.coerceCssPixelValue(this.size)),this.setStyle(this.isVertical()?"height":"width",i.coerceCssPixelValue(this.size)),this.setStyle("order",this.order),this.isVertical()||this.setStyle("height","100%"),this.setStyle("flex-direction",this.isVertical()?"row":"column")},e.prototype.isVertical=function(){return this.direction===ns.Vertical},e.prototype.setStyle=function(e,t){this.renderer.setStyle(this.elementRef.nativeElement,e,t)},e.decorators=[{type:t.Directive,args:[{selector:"mc-gutter",host:{class:"mc-gutter","[class.mc-gutter_vertical]":"isVertical()","[class.mc-gutter_dragged]":"dragged","(mousedown)":"dragged = true"}}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2}]},e.propDecorators={direction:[{type:t.Input}],order:[{type:t.Input}],size:[{type:t.Input}]},e}(),os=function(){function e(e,t,n,i){this.elementRef=e,this.changeDetectorRef=t,this.ngZone=n,this.renderer=i,this.areas=[],this.isDragging=!1,this.areaPositionDivider=2,this.listeners=[],this._hideGutters=!1,this._disabled=!1,this._gutterSize=6}return Object.defineProperty(e.prototype,"hideGutters",{get:function(){return this._hideGutters},set:function(e){this._hideGutters=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"direction",{get:function(){return this._direction},set:function(e){this._direction=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gutterSize",{get:function(){return this._gutterSize},set:function(e){var t=i.coerceNumberProperty(e);this._gutterSize=t>0?t:this.gutterSize},enumerable:!0,configurable:!0}),e.prototype.addArea=function(e){var t=this.areas.length,n=t*this.areaPositionDivider,i=e.getSize();e.setOrder(n),this.areas.push({area:e,index:t,order:n,initialSize:i})},e.prototype.ngOnInit=function(){this.direction||(this.direction=ns.Horizontal),this.setStyle("flex-direction",this.isVertical()?"column":"row")},e.prototype.onMouseDown=function(e,t,n){var i=this;if(!this.disabled){e.preventDefault();var o=this.areas[t],r=this.areas[n],a={x:e.screenX,y:e.screenY};o.initialSize=o.area.getSize(),r.initialSize=r.area.getSize(),this.areas.forEach(function(e){var t=e.area.getSize();e.area.disableFlex(),e.area.setSize(t)}),this.ngZone.runOutsideAngular(function(){i.listeners.push(i.renderer.listen("document","mouseup",function(){return i.onMouseUp()}))}),this.ngZone.runOutsideAngular(function(){i.listeners.push(i.renderer.listen("document","mousemove",function(e){return i.onMouseMove(e,a,o,r)}))}),this.isDragging=!0}},e.prototype.removeArea=function(e){var t=-1;this.areas.some(function(n,i){return n.area===e&&(t=i,!0)}),-1!==t&&this.areas.splice(t,1)},e.prototype.isVertical=function(){return this.direction===ns.Vertical},e.prototype.updateGutter=function(){var e=this;this.gutters.forEach(function(t){t.dragged&&(t.dragged=!1,e.changeDetectorRef.detectChanges())})},e.prototype.onMouseMove=function(e,t,n,i){if(this.isDragging&&!this.disabled){var o={x:e.screenX,y:e.screenY},r=this.isVertical()?t.y-o.y:t.x-o.x,a=n.initialSize-r,s=i.initialSize+r,c=n.area.getMinSize(),l=i.area.getMinSize();a<=c||s<=l||(a<=0?(n.area.setSize(0),i.area.setSize(i.initialSize+n.initialSize)):s<=0?(n.area.setSize(i.initialSize+n.initialSize),i.area.setSize(0)):(n.area.setSize(a),i.area.setSize(s)))}},e.prototype.onMouseUp=function(){for(;this.listeners.length>0;){var e=this.listeners.pop();e&&e()}this.isDragging=!1,this.updateGutter()},e.prototype.setStyle=function(e,t){this.renderer.setStyle(this.elementRef.nativeElement,e,t)},e.decorators=[{type:t.Component,args:[{selector:"mc-splitter",exportAs:"mcSplitter",host:{class:"mc-splitter"},preserveWhitespaces:!1,styles:[".mc-splitter{display:flex;flex-wrap:nowrap;align-items:stretch;overflow:hidden}.mc-splitter .mc-splitter-area{overflow:hidden}.mc-gutter{display:flex;flex-grow:0;flex-shrink:0;justify-content:center;align-items:center;overflow:hidden}.mc-gutter.mc-gutter_vertical>.mc-icon{transform:rotate(90deg)}"],template:'<ng-content></ng-content><ng-template ngFor let-area [ngForOf]="areas" let-index="index" let-last="last"><mc-gutter *ngIf="last === false" [direction]="direction" [attr.disabled]="disabled || null" [style.display]="hideGutters ? \'none\' : \'flex\'" [size]="gutterSize" [order]="index * 2 + 1" (mousedown)="onMouseDown($event, index, index + 1)"></mc-gutter></ng-template>',encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:t.NgZone},{type:t.Renderer2}]},e.propDecorators={gutters:[{type:t.ViewChildren,args:[is]}],hideGutters:[{type:t.Input}],direction:[{type:t.Input}],disabled:[{type:t.Input}],gutterSize:[{type:t.Input}]},e}(),rs=function(){function e(e,t,n){this.elementRef=e,this.renderer=t,this.splitter=n}return e.prototype.disableFlex=function(){this.renderer.removeStyle(this.elementRef.nativeElement,"flex")},e.prototype.ngOnInit=function(){this.splitter.addArea(this),this.removeStyle("max-width"),this.splitter.direction===ns.Vertical?(this.setStyle("width","100%"),this.removeStyle("height")):(this.setStyle("height","100%"),this.removeStyle("width"))},e.prototype.ngOnDestroy=function(){this.splitter.removeArea(this)},e.prototype.setOrder=function(e){this.setStyle("order",e)},e.prototype.setSize=function(e){if(e){var t=i.coerceNumberProperty(e);this.setStyle(this.getSizeProperty(),i.coerceCssPixelValue(t))}},e.prototype.getSize=function(){return this.elementRef.nativeElement[this.getOffsetSizeProperty()]},e.prototype.getMinSize=function(){var e=getComputedStyle(this.elementRef.nativeElement);return parseFloat(e[this.getMinSizeProperty()])},e.prototype.isVertical=function(){return this.splitter.direction===ns.Vertical},e.prototype.getMinSizeProperty=function(){return this.isVertical()?"min-height":"minWidth"},e.prototype.getOffsetSizeProperty=function(){return this.isVertical()?"offsetHeight":"offsetWidth"},e.prototype.getSizeProperty=function(){return this.isVertical()?"height":"width"},e.prototype.setStyle=function(e,t){this.renderer.setStyle(this.elementRef.nativeElement,e,t)},e.prototype.removeStyle=function(e){this.renderer.removeStyle(this.elementRef.nativeElement,e)},e.decorators=[{type:t.Directive,args:[{selector:"[mc-splitter-area]",host:{class:"mc-splitter-area"}}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:os}]},e}(),as=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,wt],exports:[is,rs,os],declarations:[is,rs,os]}]}],e}(),ss=0,cs=function(){function e(e){this._elementRef=e}return e}(),ls=k(O(w(cs),ve.Primary)),ps=function(){function e(){}return e}(),ds=function(e){function n(n,i,o,r){var a=e.call(this,n)||this;return a._elementRef=n,a._focusMonitor=i,a._changeDetectorRef=o,a.labelPosition="right",a.ariaLabel="",a.ariaLabelledby=null,a.name=null,a._disabled=!1,a._checked=!1,a.change=new t.EventEmitter,a.uniqueId="mc-toggle-"+ ++ss,a.onTouchedCallback=function(){},a.onChangeCallback=function(e){},a.id=a.uniqueId,a.tabIndex=parseInt(r)||0,a._focusMonitor.monitor(a._elementRef.nativeElement,!0),a}return v(n,e),Object.defineProperty(n.prototype,"inputId",{get:function(){return(this.id||this.uniqueId)+"-input"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled},set:function(e){e!==this._disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"checked",{get:function(){return this._checked},set:function(e){e!==this._checked&&(this._checked=e,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),n.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._elementRef.nativeElement)},n.prototype.focus=function(){this._focusMonitor.focusVia(this.inputElement.nativeElement,"keyboard")},n.prototype.getAriaChecked=function(){return this.checked},n.prototype.onChangeEvent=function(e){e.stopPropagation(),this.updateModelValue(),this.emitChangeEvent()},n.prototype.onLabelTextChange=function(){this._changeDetectorRef.markForCheck()},n.prototype.onInputClick=function(e){e.stopPropagation()},n.prototype.writeValue=function(e){this.checked=!!e},n.prototype.registerOnChange=function(e){this.onChangeCallback=e},n.prototype.registerOnTouched=function(e){this.onTouchedCallback=e},n.prototype.setDisabledState=function(e){this.disabled=e},n.prototype.updateModelValue=function(){this._checked=!this.checked,this.onTouchedCallback()},n.prototype.emitChangeEvent=function(){var e=new ps;e.source=this,e.checked=this.checked,this.onChangeCallback(this.checked),this.change.emit(e)},n.decorators=[{type:t.Component,args:[{selector:"mc-toggle",exportAs:"mcToggle",template:'<label [attr.for]="inputId" class="mc-toggle-layout"><div class="mc-toggle__container" [class.left]="labelPosition === \'left\'"><input #input type="checkbox" role="switch" class="mc-toggle-input cdk-visually-hidden" [id]="inputId" [checked]="checked" [attr.value]="value" [disabled]="disabled" [attr.name]="name" [tabIndex]="tabIndex" [attr.aria-label]="ariaLabel || null" [attr.aria-labelledby]="ariaLabelledby" [attr.aria-checked]="getAriaChecked()" (click)="onInputClick($event)" (change)="onChangeEvent($event)"><div class="mc-toggle-bar-container"><div class="mc-toggle__focus-frame"></div><div class="mc-toggle-bar"><div class="mc-toggle__circle" [@switch]="checked"></div></div></div><div class="mc-toggle__content" [class.left]="labelPosition === \'left\'" [class.right]="labelPosition === \'right\'"><span class="mc-toggle-label" (cdkObserveContent)="onLabelTextChange()"><ng-content></ng-content></span></div></div></label>',styles:[".mc-toggle{display:inline-block}.mc-toggle .mc-toggle-layout{cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mc-toggle .mc-toggle-bar{position:relative;border-width:1px;border-style:solid}.mc-toggle .mc-toggle-bar.mc-toggle-label-position-left{order:1}.mc-toggle .mc-toggle-bar-container{position:relative}.mc-toggle__container{display:flex;align-items:center;position:relative}.mc-toggle__container.left{flex-direction:row-reverse}.mc-toggle__content.left{margin-right:8px}.mc-toggle__content.right{margin-left:8px}.mc-toggle__circle{position:absolute;border-width:1px;border-style:solid;border-radius:100%;margin-top:-1px;margin-left:-1px;transform:translateX(-1px)}.mc-toggle__focus-frame{position:absolute;top:0;left:0;z-index:1}.mc-toggle:not(.mc-toggle_small) .mc-toggle-bar{height:16px;width:28px;border-radius:9px}.mc-toggle:not(.mc-toggle_small) .mc-toggle__focus-frame{border-radius:9px;height:16px;width:28px}.mc-toggle:not(.mc-toggle_small) .mc-toggle__circle{height:16px;width:16px}.mc-toggle.mc-toggle_small .mc-toggle-bar{height:14px;width:24px;border-radius:8px}.mc-toggle.mc-toggle_small .mc-toggle__focus-frame{border-radius:8px;height:14px;width:24px}.mc-toggle.mc-toggle_small .mc-toggle__circle{height:14px;width:14px}.mc-toggle:not(.mc-disabled){cursor:pointer}"],providers:[{provide:l.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return n}),multi:!0}],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,inputs:["disabled","color","tabIndex"],host:{class:"mc-toggle","[id]":"id","[attr.id]":"id","[class.mc-disabled]":"disabled","[class.mc-toggle_off]":"!checked"},animations:[s.trigger("switch",[s.state("true",s.style({left:"50%"})),s.state("false",s.style({left:"1px"})),s.transition("true <=> false",s.animate("150ms"))])]}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:p.FocusMonitor},{type:t.ChangeDetectorRef},{type:String,decorators:[{type:t.Attribute,args:["tabindex"]}]}]},n.propDecorators={inputElement:[{type:t.ViewChild,args:["input",{static:!1}]}],labelPosition:[{type:t.Input}],ariaLabel:[{type:t.Input,args:["aria-label"]}],ariaLabelledby:[{type:t.Input,args:["aria-labelledby"]}],id:[{type:t.Input}],name:[{type:t.Input}],value:[{type:t.Input}],disabled:[{type:t.Input}],checked:[{type:t.Input}],change:[{type:t.Output}]},n}(ls),us=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule,be],exports:[ds],declarations:[ds]}]}],e}(),hs=function(){function e(e){this.cdr=e,this.prefix="mc-tooltip_placement",this.positions=We.slice(),this.classMap={},this.mcVisibleChange=new t.EventEmitter,this.mcMouseEnterDelay=400,this.mcMouseLeaveDelay=0,this._mcTrigger="hover",this._mcPlacement="top",this._mcVisible=new o.BehaviorSubject(!1),this.onHideSubject=new o.Subject,this.closeOnInteraction=!1,this.availablePositions=ze,this.$visible=this._mcVisible.asObservable()}return Object.defineProperty(e.prototype,"mcTitle",{get:function(){return this._mcTitle},set:function(e){this.isTitleString=!(e instanceof t.TemplateRef),this.isTitleString&&(this._mcTitle=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcTrigger",{get:function(){return this._mcTrigger},set:function(e){this._mcTrigger=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcPlacement",{get:function(){return this._mcPlacement},set:function(e){e!==this._mcPlacement?(this._mcPlacement=e,this.positions.unshift(ze[this.mcPlacement])):e||(this._mcPlacement="top")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcVisible",{get:function(){return this._mcVisible.value},set:function(e){var t=i.coerceBooleanProperty(e);t&&this._mcVisible.value!==t?this.show():this.hide()},
|
20
|
+
enumerable:!0,configurable:!0}),e.prototype.show=function(){var e=this;this.hideTid&&clearTimeout(this.hideTid),this.isContentEmpty()||("manual"!==this.mcTrigger&&(this.closeOnInteraction=!0),this.showTid=setTimeout(function(){e._mcVisible.next(!0),e.mcVisibleChange.emit(!0),e.markForCheck()},this.mcMouseEnterDelay))},e.prototype.hide=function(){var e=this;this.showTid&&clearTimeout(this.showTid),this.hideTid=setTimeout(function(){e._mcVisible.next(!1),e.mcVisibleChange.emit(!1),e.onHideSubject.next(),e.markForCheck()},this.mcMouseLeaveDelay)},e.prototype.setClassMap=function(){this.classMap=this.prefix+"-"+this.mcPlacement},e.prototype.isContentEmpty=function(){return!!this.isTitleString&&(""===this.mcTitle||!this.mcTitle)},e.prototype.afterHidden=function(){return this.onHideSubject.asObservable()},e.prototype.markForCheck=function(){this.cdr.markForCheck()},e.prototype.handleBodyInteraction=function(){this.closeOnInteraction&&this.hide()},e.decorators=[{type:t.Component,args:[{selector:"mc-tooltip-component",inputs:["mcMouseEnterDelay","mcMouseLeaveDelay","mcTitle","mcVisible","mcTrigger","mcPlacement"],outputs:["mcVisibleChange"],animations:[je],template:'<div class="mc-tooltip" [ngClass]="classMap" [@fadeAnimation]="\'\'+($visible | async)"><div class="mc-tooltip-content"><div class="mc-tooltip-arrow"></div><div class="mc-tooltip-inner"><ng-container>{{ mcTitle }}</ng-container></div></div></div>',preserveWhitespaces:!1,styles:["@keyframes mc-progress{from{background-position:0 0}to{background-position:29px 0}}.mc-progress{position:relative}.mc-progress:after{content:'';position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;background:linear-gradient(135deg,rgba(0,0,0,.05) 10px,transparent 10px,transparent 20px,rgba(0,0,0,.05) 20px,rgba(0,0,0,.05) 30px,transparent 30px) repeat;background-size:29px 29px;animation:mc-progress 1s linear infinite}.cdk-overlay-container{pointer-events:none;top:0;left:0;height:100%;width:100%;position:fixed;z-index:1000;box-sizing:border-box;margin:0;padding:0}.cdk-overlay-backdrop{top:0;bottom:0;left:0;right:0;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0;position:absolute;pointer-events:auto;z-index:1000;box-sizing:border-box;margin:0;padding:0}.cdk-overlay-pane{box-sizing:border-box;position:absolute;pointer-events:auto;margin:0;padding:0;z-index:1000;max-width:100%;max-height:100%}.cdk-overlay-connected-position-bounding-box{box-sizing:border-box;position:absolute;z-index:1000;display:flex;flex-direction:column;margin:0;padding:0;min-width:1px;min-height:1px}.mc-tooltip{display:block;box-sizing:border-box;visibility:visible;position:relative;margin:0;padding:0;z-index:1060;max-width:240px;list-style:none;white-space:pre-line}.mc-tooltip_placement-top{padding-bottom:9px}.mc-tooltip_placement-right{padding-left:9px}.mc-tooltip_placement-bottom{padding-top:9px}.mc-tooltip_placement-left{padding-right:9px}.mc-tooltip-inner{padding:8px 16px;text-align:left;text-decoration:none;border-radius:3px;min-height:16px;height:fit-content;vertical-align:center}.mc-tooltip-arrow{position:absolute;width:12px;height:12px;transform:rotate(45deg)}.mc-tooltip_placement-top .mc-tooltip-arrow{bottom:4px;left:50%;margin-left:-5px}.mc-tooltip_placement-right .mc-tooltip-arrow{left:4px;top:16px;margin-top:-5px}.mc-tooltip_placement-left .mc-tooltip-arrow{right:4px;top:16px;margin-top:-5px}.mc-tooltip_placement-bottom .mc-tooltip-arrow{top:4px;left:50%;margin-left:-5px}"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,host:{"(body:click)":"this.handleBodyInteraction()"}}]}],e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},e.propDecorators={mcVisibleChange:[{type:t.Output}],mcMouseEnterDelay:[{type:t.Input}],mcMouseLeaveDelay:[{type:t.Input}],mcTitle:[{type:t.Input}],mcTrigger:[{type:t.Input}],mcPlacement:[{type:t.Input}],mcVisible:[{type:t.Input}]},e}(),ms=new t.InjectionToken("mc-tooltip-scroll-strategy"),gs={provide:ms,deps:[c.Overlay],useFactory:ue},fs=function(){function e(e,n,i,r,a,s,c){this.overlay=e,this.elementRef=n,this.ngZone=i,this.scrollDispatcher=r,this.hostView=a,this.scrollStrategy=s,this.direction=c,this.isTooltipOpen=!1,this.isDynamicTooltip=!1,this.parentDisabled=!1,this.mcVisibleChange=new t.EventEmitter,this.$unsubscribe=new o.Subject,this._disabled=!1,this._mcTrigger="hover",this._mcPlacement="top",this.manualListeners=new Map,this.destroyed=new o.Subject,this.availablePositions=ze}return Object.defineProperty(e.prototype,"mcTitle",{get:function(){return this._mcTitle},set:function(e){this._mcTitle=e,this.updateCompValue("mcTitle",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"setTitle",{set:function(e){this.mcTitle=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e),this.updateCompValue("mcTooltipDisabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcMouseEnterDelay",{get:function(){return this._mcMouseEnterDelay},set:function(e){this._mcMouseEnterDelay=e,this.updateCompValue("mcMouseEnterDelay",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcMouseLeaveDelay",{get:function(){return this._mcMouseLeaveDelay},set:function(e){this._mcMouseLeaveDelay=e,this.updateCompValue("mcMouseLeaveDelay",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcTrigger",{get:function(){return this._mcTrigger},set:function(e){e?(this._mcTrigger=e,this.updateCompValue("mcTrigger",e)):this._mcTrigger="hover"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcPlacement",{get:function(){return this._mcPlacement},set:function(e){e?(this._mcPlacement=e,this.updateCompValue("mcPlacement",e)):this._mcPlacement="top"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcTooltipClass",{get:function(){return this._mcTooltipClass},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mсTooltipClass",{set:function(e){this._mcTooltipClass=e,this.tooltip&&this.tooltip.setClassMap()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcVisible",{get:function(){return this._mcVisible},set:function(e){var t=i.coerceBooleanProperty(e);this._mcVisible!==t&&(this._mcVisible=t,this.updateCompValue("mcVisible",t),t?this.show():this.hide())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this.isTooltipOpen},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isParentDisabled",{get:function(){return this.parentDisabled},enumerable:!0,configurable:!0}),e.prototype.createOverlay=function(){var e=this;if(this.overlayRef)return this.overlayRef;var t=this.overlay.position().flexibleConnectedTo(this.elementRef).withTransformOriginOn(".mc-tooltip").withFlexibleDimensions(!1).withViewportMargin(8).withPositions(We.slice()),n=this.scrollDispatcher.getAncestorScrollContainers(this.elementRef);return t.withScrollableContainers(n),t.positionChanges.pipe(m.takeUntil(this.destroyed)).subscribe(function(t){e.tooltip&&(e.onPositionChange(t),t.scrollableViewProperties.isOverlayClipped&&e.tooltip.mcVisible&&e.ngZone.run(function(){return e.hide()}))}),this.overlayRef=this.overlay.create({direction:this.direction,positionStrategy:t,panelClass:"mc-tooltip-panel",scrollStrategy:this.scrollStrategy()}),this.updatePosition(),this.overlayRef.detachments().pipe(m.takeUntil(this.destroyed)).subscribe(function(){return e.detach()}),this.overlayRef},e.prototype.detach=function(){this.overlayRef&&this.overlayRef.hasAttached()&&this.overlayRef.detach(),this.tooltip=null},e.prototype.onPositionChange=function(e){var t=this,n=this.mcPlacement;Object.keys(this.availablePositions).some(function(i){return e.connectionPair.originX===t.availablePositions[i].originX&&e.connectionPair.originY===t.availablePositions[i].originY&&e.connectionPair.overlayX===t.availablePositions[i].overlayX&&e.connectionPair.overlayY===t.availablePositions[i].overlayY&&(n=i,!0)}),this.updateCompValue("mcPlacement",n),this.tooltip&&(this.tooltip.setClassMap(),this.tooltip.markForCheck()),this.handlePositioningUpdate()},e.prototype.handlePositioningUpdate=function(){if(this.overlayRef||(this.overlayRef=this.createOverlay()),"right"===this.mcPlacement||"left"===this.mcPlacement){var e=(this.overlayRef.overlayElement.clientHeight-this.hostView.element.nativeElement.clientHeight)/2,t=this.overlayRef.overlayElement.style.top||"0px";this.overlayRef.overlayElement.style.top=parseInt(t.split("px")[0],10)+e-1+"px"}},e.prototype.updateCompValue=function(e,t){this.isDynamicTooltip&&t&&this.tooltip&&(this.tooltip[e]=t)},e.prototype.ngOnInit=function(){this.initElementRefListeners()},e.prototype.ngOnDestroy=function(){var e=this;this.overlayRef&&this.overlayRef.dispose(),this.manualListeners.forEach(function(t,n){return e.elementRef.nativeElement.removeEventListener(n,t)}),this.manualListeners.clear(),this.$unsubscribe.next(),this.$unsubscribe.complete()},e.prototype.handleKeydown=function(e){this.isTooltipOpen&&e.keyCode===a.ESCAPE&&this.hide()},e.prototype.handleTouchend=function(){this.hide()},e.prototype.initElementRefListeners=function(){var e=this;"hover"===this.mcTrigger&&this.manualListeners.set("mouseenter",function(){return e.show()}).set("mouseleave",function(){return e.hide()}).forEach(function(t,n){return e.elementRef.nativeElement.addEventListener(n,t)}),"focus"===this.mcTrigger&&this.manualListeners.set("focus",function(){return e.show()}).set("blur",function(){return e.hide()}).forEach(function(t,n){return e.elementRef.nativeElement.addEventListener(n,t)})},e.prototype.show=function(){var e=this;if(!this.disabled){if(!this.tooltip){var t=this.createOverlay();this.detach(),this.portal=this.portal||new d.ComponentPortal(hs,this.hostView),this.tooltip=t.attach(this.portal).instance,this.tooltip.afterHidden().pipe(m.takeUntil(this.destroyed)).subscribe(function(){return e.detach()}),this.isDynamicTooltip=!0;["mcTitle","mcPlacement","mcTrigger","mcTooltipDisabled","mcMouseEnterDelay","mcMouseLeaveDelay","mсTooltipClass"].forEach(function(t){return e.updateCompValue(t,e[t])}),this.tooltip.mcVisibleChange.pipe(m.takeUntil(this.$unsubscribe),m.distinctUntilChanged()).subscribe(function(t){e.mcVisible=t,e.mcVisibleChange.emit(t),e.isTooltipOpen=t})}this.updatePosition(),this.tooltip.show()}},e.prototype.hide=function(){this.tooltip&&this.tooltip.hide()},e.prototype.updatePosition=function(){this.overlayRef||(this.overlayRef=this.createOverlay());var e=this.overlayRef.getConfig().positionStrategy,t=this.getOrigin(),n=this.getOverlayPosition();e.withPositions([fe({},t.main,n.main),fe({},t.fallback,n.fallback)])},e.prototype.getOrigin=function(){var e,t=this.mcPlacement,n=!this.direction||"ltr"===this.direction.value;if("top"===t||"bottom"===t)e={originX:"center",originY:"top"===t?"top":"bottom"};else if("top"===t||"left"===t&&n||"right"===t&&!n)e={originX:"start",originY:"center"};else{if(!("bottom"===t||"right"===t&&n||"left"===t&&!n))throw he(t);e={originX:"end",originY:"center"}}var i=this.invertPosition(e.originX,e.originY);return{main:e,fallback:{originX:i.x,originY:i.y}}},e.prototype.getOverlayPosition=function(){var e,t=this.mcPlacement,n=!this.direction||"ltr"===this.direction.value;if("top"===t)e={overlayX:"center",overlayY:"bottom"};else if("bottom"===t)e={overlayX:"center",overlayY:"top"};else if("top"===t||"left"===t&&n||"right"===t&&!n)e={overlayX:"end",overlayY:"center"};else{if(!("bottom"===t||"right"===t&&n||"left"===t&&!n))throw he(t);e={overlayX:"start",overlayY:"center"}}var i=this.invertPosition(e.overlayX,e.overlayY);return{main:e,fallback:{overlayX:i.x,overlayY:i.y}}},e.prototype.invertPosition=function(e,t){var n=e,i=t;return"top"===this.mcPlacement||"bottom"===this.mcPlacement?"top"===t?i="bottom":"bottom"===t&&(i="top"):"end"===e?n="start":"start"===e&&(n="end"),{x:n,y:i}},e.decorators=[{type:t.Directive,args:[{selector:'[mcTooltip], [attribute^="mcTooltip"]',exportAs:"mcTooltip",host:{"(keydown)":"handleKeydown($event)","(touchend)":"handleTouchend()"}}]}],e.ctorParameters=function(){return[{type:c.Overlay},{type:t.ElementRef},{type:t.NgZone},{type:c.ScrollDispatcher},{type:t.ViewContainerRef},{type:void 0,decorators:[{type:t.Inject,args:[ms]}]},{type:n.Directionality,decorators:[{type:t.Optional}]}]},e.propDecorators={mcVisibleChange:[{type:t.Output}],mcTitle:[{type:t.Input,args:["mcTooltip"]}],setTitle:[{type:t.Input,args:["mcTitle"]}],disabled:[{type:t.Input,args:["mcTooltipDisabled"]}],mcMouseEnterDelay:[{type:t.Input,args:["mcMouseEnterDelay"]}],mcMouseLeaveDelay:[{type:t.Input,args:["mcMouseLeaveDelay"]}],mcTrigger:[{type:t.Input,args:["mcTrigger"]}],mcPlacement:[{type:t.Input,args:["mcPlacement"]}],mcTooltipClass:[{type:t.Input,args:["mcTooltipClass"]}],mcVisible:[{type:t.Input,args:["mcVisible"]}],isOpen:[{type:t.HostBinding,args:["class.mc-tooltip-open"]}],isParentDisabled:[{type:t.HostBinding,args:["class.disabled"]}]},e}(),ys=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:[hs,fs],exports:[hs,fs],imports:[r.CommonModule,c.OverlayModule],providers:[gs],entryComponents:[hs]}]}],e}(),bs=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-vertical-navbar-item-icon",host:{class:"mc-vertical-navbar__item-icon"}}]}],e}(),vs=function(){function e(){}return e.decorators=[{type:t.Component,args:[{selector:"mc-vertical-navbar-badge",template:'\n <span class="mc-badge mc-badge_light">\n <ng-content></ng-content>\n </span>\n ',host:{class:"mc-vertical-navbar__badge"}}]}],e}(),Cs=function(){function e(e){this._elementRef=e}return e}(),_s=w(Cs),xs=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o.element=t,o.focusMonitor=n,o.trigger=i,o.tabIndex=0,o.focusMonitor.monitor(o.element.nativeElement).subscribe(),o}return v(n,e),Object.defineProperty(n.prototype,"hasDropdownAttached",{get:function(){return!!this.trigger},enumerable:!0,configurable:!0}),n.prototype.ngOnDestroy=function(){this.focusMonitor.stopMonitoring(this.element.nativeElement)},n.decorators=[{type:t.Component,args:[{selector:"a[mc-vertical-navbar-item], mc-vertical-navbar-item",template:'<div class="mc-vertical-navbar__item"><ng-content></ng-content><i *ngIf="hasDropdownAttached" mc-icon="mc-angle-right-M_16" class="mc-vertical-navbar__item-dropdown-icon"></i></div>',encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".mc-vertical-navbar__badge{position:absolute;width:64px;top:0;left:0}.mc-vertical-navbar__badge .mc-badge{position:absolute;right:4px;top:4px}.mc-vertical-navbar__item-icon{margin-right:16px}.mc-vertical-navbar__item-icon .mc-icon{font-size:32px}.mc-vertical-navbar__title{white-space:nowrap}.mc-vertical-navbar__item-dropdown-icon{margin-left:auto;padding-left:16px}a[mc-vertical-navbar-item],mc-vertical-navbar-item{height:64px;margin:1px 0;width:100%;position:relative;display:flex;align-items:center;box-sizing:border-box;cursor:pointer;text-decoration:none}a[mc-vertical-navbar-item] .mc-vertical-navbar__item,mc-vertical-navbar-item .mc-vertical-navbar__item{padding-left:16px;padding-right:16px;display:flex;align-items:center;width:100%;height:100%}a[mc-vertical-navbar-item].mc-progress,mc-vertical-navbar-item.mc-progress{cursor:pointer}a[mc-vertical-navbar-item].mc-vertical-navbar__item_active,mc-vertical-navbar-item.mc-vertical-navbar__item_active{cursor:default}a[mc-vertical-navbar-item][disabled],mc-vertical-navbar-item[disabled]{cursor:default;pointer-events:none}"],inputs:["disabled"],host:{"[attr.disabled]":"disabled || null","[attr.tabindex]":"disabled ? -1 : 0"}}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:p.FocusMonitor},{type:yi,decorators:[{type:t.Optional},{type:t.Self}]}]},n.propDecorators={tabIndex:[{type:t.Input}]},n}(_s),ws=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-vertical-navbar-header, a[mc-vertical-navbar-header]",host:{class:"mc-vertical-navbar__header"}}]}],e}(),Os=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-vertical-navbar-title",host:{class:"mc-vertical-navbar__title"}}]}],e}(),ks=function(){function e(e){this.cd=e,this.expanded=!1}return e.prototype.toggle=function(){this.expanded=!this.expanded,this.cd.markForCheck()},e.decorators=[{type:t.Component,args:[{selector:"mc-vertical-navbar",changeDetection:t.ChangeDetectionStrategy.OnPush,template:'<nav class="mc-vertical-navbar" [@toggle]="expanded"><div class="mc-vertical-navbar__header-area"><div cdkMonitorElementFocus tabindex="0" class="mc-vertical-navbar__toggle-button" (click)="toggle()" (keydown.space)="toggle()" (keydown.enter)="toggle()"><i mc-icon="mc-hamburger_32" *ngIf="!expanded"></i> <i mc-icon="mc-close-L_32" *ngIf="expanded"></i></div><div cdkMonitorSubtreeFocus *ngIf="expanded"><ng-content select="mc-vertical-navbar-header, a[mc-vertical-navbar-header]"></ng-content></div></div><ng-content></ng-content></nav>',styles:[".mc-vertical-navbar{height:100%;position:fixed;left:0;top:0;z-index:100;display:flex;flex-direction:column;align-items:flex-start;min-height:100%;overflow:hidden}.mc-vertical-navbar .mc-vertical-navbar__header-area{display:flex;width:100%;align-items:stretch;box-sizing:border-box;min-height:64px}.mc-vertical-navbar .mc-vertical-navbar__header-area .mc-vertical-navbar__header{display:flex;height:100%;justify-content:stretch;text-decoration:none;align-self:stretch;align-items:center}.mc-vertical-navbar .mc-vertical-navbar__header-area .mc-vertical-navbar__toggle-button{cursor:pointer;display:flex;flex:0 0 auto;justify-content:center;align-items:center;align-self:stretch;width:64px}.mc-vertical-navbar .mc-vertical-navbar__header-area .mc-vertical-navbar__title{padding:0 16px}"],encapsulation:t.ViewEncapsulation.None,animations:[me()]}]}],e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},e.propDecorators={expanded:[{type:t.Input}]},e}(),Is=[ks,Os,xs,bs,vs,ws],Ss=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule,h.PlatformModule,wt],exports:Is,declarations:Is}]}],e}(),Ds=new t.Version("8.5.7");e.ARROW_DOWN_KEYCODE="ArrowDown",e.ARROW_LEFT_KEYCODE="ArrowLeft",e.ARROW_RIGHT_KEYCODE="ArrowRight",e.ARROW_UP_KEYCODE="ArrowUp",e.AUTOCOMPLETE_BORDER_WIDTH=2,e.AUTOCOMPLETE_OPTION_HEIGHT=32,e.AUTOCOMPLETE_PANEL_HEIGHT=256,e.AnimationCurves=Be,e.BIG_STEP=bn,e.BOTTOM_LEFT_POSITION_PRIORITY=tt,e.BOTTOM_POSITION_PRIORITY=Ke,e.BOTTOM_RIGHT_POSITION_PRIORITY=et,e.DEFAULT_4_POSITIONS=We,e.DEFAULT_4_POSITIONS_TO_CSS_MAP=ot,e.DEFAULT_MC_LOCALE_ID="ru",e.DEFAULT_TIME_FORMAT=_a,e.Direction=ns,e.EXTENDED_OVERLAY_POSITIONS=Ye,e.ErrorStateMatcher=Oe,e.HOURS_MINUTES_REGEXP=wa,e.HOURS_MINUTES_SECONDS_REGEXP=xa,e.HOURS_ONLY_REGEXP=Oa,e.HOURS_PER_DAY=23,e.LEFT_BOTTOM_POSITION_PRIORITY=Ze,e.LEFT_POSITION_PRIORITY=Ge,e.LEFT_TOP_POSITION_PRIORITY=$e,e.MAT_AUTOCOMPLETE_VALUE_ACCESSOR=Ht,e.MC_AUTOCOMPLETE_DEFAULT_OPTIONS=jt,e.MC_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY=K,e.MC_AUTOCOMPLETE_SCROLL_STRATEGY=Wt,e.MC_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY=U,e.MC_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER=Yt,e.MC_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR=Jt,e.MC_CHECKBOX_CLICK_ACTION=sn,e.MC_CHECKBOX_CONTROL_VALUE_ACCESSOR=ln,e.MC_CHECKBOX_REQUIRED_VALIDATOR=gn,e.MC_DATEPICKER_SCROLL_STRATEGY=Yn,e.MC_DATEPICKER_SCROLL_STRATEGY_FACTORY=ne,e.MC_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER=Hn,e.MC_DATEPICKER_VALIDATORS=$n,e.MC_DATEPICKER_VALUE_ACCESSOR=qn,e.MC_DROPDOWN_DEFAULT_OPTIONS=ui,e.MC_DROPDOWN_DEFAULT_OPTIONS_FACTORY=ae,e.MC_DROPDOWN_PANEL=ri,e.MC_DROPDOWN_SCROLL_STRATEGY=mi,e.MC_DROPDOWN_SCROLL_STRATEGY_FACTORY=se,e.MC_DROPDOWN_SCROLL_STRATEGY_FACTORY_PROVIDER=gi,e.MC_INPUT_VALUE_ACCESSOR=_n,e.MC_LABEL_GLOBAL_OPTIONS=Ne,e.MC_LOCALE_ID=pt,e.MC_OPTION_PARENT_COMPONENT=Ve,e.MC_POPOVER_SCROLL_STRATEGY=ho,e.MC_POPOVER_SCROLL_STRATEGY_FACTORY_PROVIDER=mo,e.MC_RADIO_GROUP_CONTROL_VALUE_ACCESSOR=Mo,e.MC_SANITY_CHECKS=ye,e.MC_SELECTION_LIST_VALUE_ACCESSOR=Ci,e.MC_SELECTION_TREE_VALUE_ACCESSOR=Ko,e.MC_SELECT_SCROLL_STRATEGY=rt,e.MC_SELECT_SCROLL_STRATEGY_PROVIDER=at,e.MC_SIDEPANEL_DATA=La,e.MC_SIDEPANEL_DEFAULT_OPTIONS=Xa,e.MC_SIDEPANEL_WITH_INDENT=Ya,e.MC_SIDEPANEL_WITH_SHADOW=Ha,e.MC_TABS_CONFIG=_r,e.MC_TAGS_DEFAULT_OPTIONS=Tr,e.MC_TEXTAREA_VALUE_ACCESSOR=ua,e.MC_TOOLTIP_SCROLL_STRATEGY=ms,e.MC_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER=gs,e.MC_TREE_OPTION_PARENT_COMPONENT=zo,e.MC_VALIDATION=bt,e.MINUTES_PER_HOUR=59,e.McAlignTabsCenterCssStyler=fr,e.McAlignTabsEndCssStyler=yr,e.McAnchor=Zt,e.McAutocomplete=Bt,e.McAutocompleteModule=Ut,e.McAutocompleteOrigin=zt,e.McAutocompleteSelectedEvent=Nt,e.McAutocompleteTrigger=Kt,e.McButton=$t,e.McButtonBase=Xt,e.McButtonCssStyler=Gt,e.McButtonMixinBase=qt,e.McButtonModule=Qt,e.McButtonToggle=nn,e.McButtonToggleChange=en,e.McButtonToggleGroup=tn,e.McButtonToggleModule=on,e.McCalendar=Bn,e.McCalendarBody=Vn,e.McCalendarCell=Rn,e.McCalendarHeader=jn,e.McCard=rn,e.McCardModule=an,e.McCheckbox=mn,e.McCheckboxBase=un,e.McCheckboxChange=dn,e.McCheckboxMixinBase=hn,e.McCheckboxModule=yn,e.McCheckboxRequiredValidator=fn,e.McCleaner=Ot,e.McCommonModule=be,e.McDatepicker=Xn,e.McDatepickerContent=Gn,e.McDatepickerContentBase=Kn,e.McDatepickerContentMixinBase=Un,e.McDatepickerInput=Qn,e.McDatepickerInputEvent=Zn,e.McDatepickerIntl=An,e.McDatepickerModule=ti,e.McDatepickerToggle=ei,e.McDatepickerToggleIcon=Jn,e.McDecimalPipe=ft,e.McDivider=ni,e.McDividerModule=ii,e.McDropdown=hi,e.McDropdownContent=oi,e.McDropdownItem=ci,e.McDropdownItemBase=ai,e.McDropdownItemMixinBase=si,e.McDropdownModule=bi,e.McDropdownTrigger=yi,e.McFormField=Rt,e.McFormFieldBase=Tt,e.McFormFieldControl=kt,e.McFormFieldMixinBase=At,e.McFormFieldModule=Ft,e.McFormFieldWithoutBorders=Vt,e.McFormattersModule=yt,e.McGutterDirective=is,e.McHighlightModule=lt,e.McHighlightPipe=ct,e.McHint=St,e.McIcon=xt,e.McIconBase=Ct,e.McIconCSSStyler=vt,e.McIconMixinBase=_t,e.McIconModule=wt,e.McInput=In,e.McInputBase=On,e.McInputMixinBase=kn,e.McInputModule=Tn,e.McInputMono=Sn,e.McLightTabsCssStyler=gr,e.McLine=Ce,e.McLineModule=xe,e.McLineSetter=_e,e.McLink=Ai,e.McLinkBase=Mi,e.McLinkMixinBase=Ti,e.McLinkModule=Ri,e.McList=Ii,e.McListBase=ki,e.McListItem=Ei,e.McListItemBase=Di,e.McListModule=Pi,e.McListOption=vi,e.McListSelection=Oi,e.McListSelectionBase=xi,e.McListSelectionChange=_i,e.McListSelectionMixinBase=wi,e.McListSubheaderCssStyler=Si,e.McMeasureScrollbarService=De,e.McModalComponent=ji,e.McModalModule=Ui,e.McModalRef=Fi,e.McModalService=Ki,e.McMonthView=Fn,e.McMultiYearView=Ln,e.McNavbar=ao,e.McNavbarBrand=Qi,e.McNavbarContainer=io,e.McNavbarItem=no,e.McNavbarItemBase=eo,e.McNavbarLogo=Zi,e.McNavbarMixinBase=to,e.McNavbarModule=so,e.McNavbarTitle=Ji,e.McNumberInput=Cn,e.McOptgroup=Te,e.McOptgroupBase=Ee,e.McOptgroupMixinBase=Pe,e.McOption=Fe,e.McOptionModule=Le,e.McOptionSelectionChange=Re,e.McPopover=go,e.McPopoverComponent=uo,e.McPopoverModule=fo,e.McPrefix=Dt,e.McProgressBar=Co,e.McProgressBarBase=bo,e.McProgressBarMixinBase=vo,e.McProgressBarModule=_o,e.McProgressSpinner=ko,e.McProgressSpinnerBase=wo,e.McProgressSpinnerMixinBase=Oo,e.McProgressSpinnerModule=Io,e.McPseudoCheckbox=ke,e.McPseudoCheckboxModule=Se,e.McRadioButton=Vo;e.McRadioButtonBase=Ao,e.McRadioButtonMixinBase=Ro,e.McRadioChange=Do,e.McRadioGroup=To,e.McRadioGroupBase=Eo,e.McRadioGroupMixinBase=Po,e.McRadioModule=Fo,e.McSelect=ia,e.McSelectBase=Qr,e.McSelectChange=Zr,e.McSelectModule=oa,e.McSelectSearch=ea,e.McSelectSearchEmptyResult=ta,e.McSelectTrigger=na,e.McSidebar=Va,e.McSidebarClosed=Ra,e.McSidebarModule=Fa,e.McSidebarOpened=Aa,e.McSidepanelConfig=ja,e.McSidepanelContainerComponent=Ka,e.McSidepanelModule=ts,e.McSidepanelPosition=Na,e.McSidepanelRef=Ga,e.McSidepanelService=qa,e.McSplitterAreaDirective=rs,e.McSplitterComponent=os,e.McSplitterModule=as,e.McStepper=Et,e.McStretchTabsCssStyler=br,e.McSuffix=Pt,e.McTab=ar,e.McTabBody=cr,e.McTabBodyPortal=lr,e.McTabChangeEvent=Cr,e.McTabContent=tr,e.McTabGroup=Or,e.McTabGroupBase=xr,e.McTabGroupMixinBase=wr,e.McTabHeader=mr,e.McTabLabel=nr,e.McTabLabelWrapper=ur,e.McTabLink=Pr,e.McTabNav=Sr,e.McTabsModule=Mr,e.McTag=jr,e.McTagAvatar=Vr,e.McTagBase=Lr,e.McTagInput=Gr,e.McTagList=Kr,e.McTagListBase=zr,e.McTagListChange=Hr,e.McTagListMixinBase=Wr,e.McTagMixinBase=Nr,e.McTagRemove=Br,e.McTagSelectionChange=Ar,e.McTagTrailingIcon=Fr,e.McTagsModule=qr,e.McTextarea=fa,e.McTextareaBase=ma,e.McTextareaMixinBase=ga,e.McTextareaModule=ya,e.McTimepicker=Da,e.McTimepickerBase=Ia,e.McTimepickerMixinBase=Sa,e.McTimepickerModule=Ea,e.McToggleBase=cs,e.McToggleChange=ps,e.McToggleComponent=ds,e.McToggleMixinBase=ls,e.McToggleModule=us,e.McToolTipModule=ys,e.McTooltip=fs,e.McTooltipComponent=hs,e.McTreeFlatDataSource=Jo,e.McTreeFlattener=Zo,e.McTreeModule=$o,e.McTreeNavigationChange=Uo,e.McTreeNestedDataSource=er,e.McTreeNodeDef=Lo,e.McTreeNodePadding=No,e.McTreeNodeToggleComponent=jo,e.McTreeNodeToggleDirective=Bo,e.McTreeOption=Ho,e.McTreeOptionChange=Wo,e.McTreeSelect=pa,e.McTreeSelectChange=aa,e.McTreeSelectModule=da,e.McTreeSelectTrigger=sa,e.McTreeSelection=Xo,e.McTreeSelectionChange=Go,e.McVerticalNavbar=ks,e.McVerticalNavbarHeader=ws,e.McVerticalNavbarItem=xs,e.McVerticalNavbarItemBadge=vs,e.McVerticalNavbarItemIcon=bs,e.McVerticalNavbarMixinBase=_s,e.McVerticalNavbarModule=Ss,e.McVerticalNavbarTitle=Os,e.McYearView=Nn,e.MultipleMode=Ie,e.NESTED_PANEL_TOP_PADDING=2,e.NUMBER_FORMAT_REGEXP=dt,e.POSITION_MAP=ze,e.POSITION_PRIORITY_STRATEGY=nt,e.POSITION_TO_CSS_MAP=it,e.PopoverVisibility=po,e.RIGHT_BOTTOM_POSITION_PRIORITY=qe,e.RIGHT_POSITION_PRIORITY=Ue,e.RIGHT_TOP_POSITION_PRIORITY=Xe,e.SECONDS_PER_MINUTE=59,e.SELECT_PANEL_INDENT_PADDING_X=2,e.SELECT_PANEL_MAX_HEIGHT=224,e.SELECT_PANEL_PADDING_X=1,e.SELECT_PANEL_VIEWPORT_PADDING=8,e.SMALL_STEP=vn,e.ShowOnDirtyErrorStateMatcher=we,e.SidebarPositions=Ta,e.TIMEFORMAT_PLACEHOLDERS=Ca,e.TOP_LEFT_POSITION_PRIORITY=Qe,e.TOP_POSITION_PRIORITY=He,e.TOP_RIGHT_POSITION_PRIORITY=Je,e.ThemePalette=ve,e.TimeFormats=va,e.TimeParts=ba,e.TransitionCheckState=pn,e.VERSION=Ds,e.add=ee,e.countGroupLabelsBeforeOption=S,e.fadeAnimation=je,e.fadeInItems=pi,e.getMcAutocompleteMissingPanelError=G,e.getMcFormFieldMissingControlError=Y,e.getMcFormFieldYouCanNotUseCleanerInNumberInputError=H,e.getMcPopoverInvalidPositionError=pe,e.getMcSelectDynamicMultipleError=T,e.getMcSelectNonArrayValueError=A,e.getMcSelectNonFunctionValueError=R,e.getMcTooltipInvalidPositionError=he,e.getOptionScrollPosition=D,e.getPrecision=J,e.isBoolean=C,e.isDigit=Q,e.isFloat=$,e.isInt=Z,e.mcDatepickerAnimations=zn,e.mcDropdownAnimations=li,e.mcPopoverAnimations=co,e.mcPopoverScrollStrategyFactory=le,e.mcSelectAnimations=st,e.mcSelectScrollStrategyProviderFactory=V,e.mcTabsAnimations=sr,e.mcTooltipScrollStrategyFactory=ue,e.mixinColor=O,e.mixinDisabled=w,e.mixinErrorState=I,e.mixinTabIndex=k,e.normalizeSplitter=q,e.selectEvents="selectEvents",e.setMosaicValidation=B,e.setMosaicValidationForFormControl=W,e.setMosaicValidationForModelControl=z,e.throwMcDropdownInvalidPositionX=oe,e.throwMcDropdownInvalidPositionY=re,e.throwMcDropdownMissingError=ie,e.toBoolean=_,e.transformDropdown=di,e.yearsPerPage=24,e.yearsPerRow=4,e.ɵa15=hr,e.ɵa2=Ma,e.ɵa20=za,e.ɵa22=me,e.ɵa25=Dn,e.ɵa28=Vi,e.ɵa3=x,e.ɵb15=pr,e.ɵb20=Wa,e.ɵb25=En,e.ɵb28=zi,e.ɵc15=dr,e.ɵc20=$a,e.ɵc25=Pn,e.ɵc28=Wi,e.ɵd15=or,e.ɵd20=Za,e.ɵd25=Mn,e.ɵd28=Yi,e.ɵe15=rr,e.ɵe20=Qa,e.ɵe28=Bi,e.ɵf15=kr,e.ɵf20=Ja,e.ɵg15=Ir,e.ɵg20=es,e.ɵh15=Dr,e.ɵi15=Er,Object.defineProperty(e,"__esModule",{value:!0})});
|
21
21
|
//# sourceMappingURL=mosaic.umd.min.js.map
|